Skip to content

Conversation

@RhysSullivan
Copy link
Contributor

@RhysSullivan RhysSullivan commented Dec 23, 2025

Some times you have something in your input that you need to preserve but have to send something else before sending it. Prompt stashing allows you to save it.

Screen.Recording.2025-12-23.at.8.07.13.AM.mov

Adds 3 commands,

  • "Stash Prompt"
  • Puts the current input into prompt-stash.jsonl
  • "Stash Pop"
  • Pops whatever the most recent stashed prompt was
  • "Stash list"
  • Lists all stashed prompts

Matches the prompt history pattern, this could be made more reusable but outside scope of this PR

Reorders store to happen before command.register due to not initializing store before reading from it

@RhysSullivan RhysSullivan marked this pull request as ready for review December 23, 2025 08:08
@rekram1-node
Copy link
Collaborator

/review

import { createStore, produce } from "solid-js/store"
import { clone } from "remeda"
import { createSimpleContext } from "../../context/helper"
import { appendFile, writeFile } from "fs/promises"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Consider using Bun.write() instead of writeFile from fs/promises to align with the style guide preference for Bun APIs. This would also simplify error handling since Bun.write returns a promise that handles errors more gracefully.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Eh this matches pattern that history.tsx uses, so dw about it

@rekram1-node rekram1-node merged commit 48898fd into sst:dev Dec 23, 2025
3 checks passed
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.

2 participants