Repository navigation
feat: slash commands in the composer, starting with /clear - #63
Merged
Merged
Conversation
Typing / opens a command menu above the input. A typed command stays in the composer and never reaches the saved draft, so /clear does not leave the command in the old conversation or save an empty one.
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.
What
Typing
/in the chat input opens a command menu above it. The first command is/clear, which starts a new conversation the same way the + button does./namewithout running itA
/wordthat matches nothing, or whose menu was closed, is sent as an ordinary message.Why the command never enters the draft
Each change to the draft is saved right away and moves the conversation to the top of history. If
/clearwent through the draft, an empty conversation would be saved by its first/and left as an empty entry in history, and an existing conversation would move to the top. Instead, the composer keeps the typed command itself.use-conversation.tsis unchanged, andstartNewstill skips creating a conversation when the current one is empty.Extension point
SlashCommand = { name, description, run }; the list is defined inconversation-panel.tsx.Verification
/cl+ Enter opens an empty conversation, the old conversation's draft stays empty, and only one conversation is stored.biome check ., webtypecheck, and all web tests pass (331).