[Feat] Save and reuse named personal prompt templates - #2396
Draft
roomote-roomote[bot] wants to merge 1 commit into
Draft
[Feat] Save and reuse named personal prompt templates#2396roomote-roomote[bot] wants to merge 1 commit into
roomote-roomote[bot] wants to merge 1 commit into
Conversation
Contributor
| } | ||
| try { | ||
| // Re-read before each action so another composer cannot overwrite newer entries. | ||
| const current = readTemplates(); |
Contributor
There was a problem hiding this comment.
The read-modify-write sequence is not atomic across browser tabs. Two tabs can both read the same library, append different templates, and then each setItem, so the later write silently drops the other template despite the stated no-eviction behavior. Serialize mutations per storage key (or otherwise merge/retry after detecting a competing write) before claiming this protects concurrent composers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
No linked issue. Related existing work: #1605 remains open and unmerged; its implementation is absent from this base. This PR implements named templates in the current shared NewTaskForm architecture. Review the overlap before merging either PR.
Why this PR exists
Let users keep named personal prompts and reuse them without retyping, while retaining the existing Session launch flow.
What changed
How it was tested
mintignore entry.Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changesetThe exact full lint/typecheck commands and changeset generation were not run; the successful fast/static checks are listed above.
Screenshots