Skip to content

feat: add prompt stashing#8918

Closed
llx-openai wants to merge 1 commit intomainfrom
llx/stash-prompt
Closed

feat: add prompt stashing#8918
llx-openai wants to merge 1 commit intomainfrom
llx/stash-prompt

Conversation

@llx-openai
Copy link

Add the QOL feature to "stash" a prompt locally, which is auto-popped on next submit.
Stash is triggered by the hotkey ctrl + s. The stack has depth 1 and overrides on multiple stashes.

image image

Test Plan

Added unit tests. Tested locally for tui and tui2.
I was unable to fully e2e test image stash pops due to the way openai configures terminal permissions for local dev, but the image pointer is successfully popped.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@llx-openai llx-openai requested a review from joshka-oai January 8, 2026 17:32
Copy link
Collaborator

@joshka-oai joshka-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good.
I think we should probably do this automatically on clear / delete line rather than explicitly like this though. Chatting internally on it.

@@ -318,6 +334,69 @@ impl ChatComposer {
self.sync_popups();
}

/// Replace the composer content with text, rebuilding attachment elements.
pub(crate) fn apply_external_edit(&mut self, text: String) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method's name is at a high level of abstraction, while the implementation drops to low level. There's nothing in between that binds the overall intent to the actual implementation detail. Add an overview of what this method does to help validate the intention of the logic inside this method aligns with what it actually does, as well as probably some inline comments helping make that clear. Codex is pretty good at rewriting this sort of thing to fit that criteria.

@etraut-openai etraut-openai added accessibility Issues related to accessibility oai PRs contributed by OpenAI employees and removed accessibility Issues related to accessibility labels Jan 14, 2026
@github-actions
Copy link
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants