Skip to content

Conversation

@ManojINaik
Copy link

@ManojINaik ManojINaik commented Dec 26, 2025

Related Issue

Resolves #531

Description

This PR adds a prompt stashing feature that allows users to temporarily save their typed input and restore it later. This is useful when you're typing a message but need to quickly send something else first.

New Key Bindings

Keybinding Action
Ctrl-Q Toggle Stash/Restore:
- If input buffer has text: Stashes current input (clears buffer).
- If input buffer is empty: Restores stashed input.

Implementation Details

  • Uses a single-slot stash for simplicity (replaced previous deque approach)
  • 10KB size limit per stashed entry to prevent memory abuse
  • Stash is automatically cleared on session exit
  • Toast notifications provide user feedback on stash/restore actions
  • Shortcut hint ctrl-q: stash/pop added to bottom toolbar

Testing

  • Manual testing: Start kimi, type text, use Ctrl-Q to stash, clear buffer, use Ctrl-Q again to restore.
  • Verified toggle behavior (stash when text present, restore when empty).

<img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin">

Add prompt stashing feature to temporarily save typed input:

- Ctrl-S: Stash current input (saves to stack, clears buffer)
- Ctrl-R: Restore most recently stashed input

Security measures:
- Bounded deque with max 10 items to prevent memory growth
- 10KB limit per stashed entry
- Auto-cleared on session exit

This is useful when typing a message but needing to quickly
send something else first.
@ManojINaik ManojINaik force-pushed the feat/prompt-stashing branch from 7ffb171 to 92192dd Compare January 22, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add prompt stashing (Ctrl-S/Ctrl-R)

1 participant