🤖 feat: real-time command highlighting in ChatInput#2006
Open
ammar-agent wants to merge 3 commits intomainfrom
Open
🤖 feat: real-time command highlighting in ChatInput#2006ammar-agent wants to merge 3 commits intomainfrom
ammar-agent wants to merge 3 commits intomainfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
7c5fb38 to
2a09335
Compare
Add visual highlighting for slash commands as you type in the chat input. Commands are highlighted with the same blue tint used in sent messages.
- Move typography (font-size, font-family) to wrapper container - Overlay inherits all styles via 'font: inherit', no duplication - Make textarea text transparent when command prefix exists - Overlay positioned behind textarea, shows through transparent text - Caret remains visible via caret-color - Background moved to wrapper so overlay renders correctly - CommandPrefixText accepts className for font override when needed
2a09335 to
9404c25
Compare
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.
Summary
Add real-time visual highlighting for slash commands as you type in the chat input, using the same blue tint (
--color-plan-mode-light) that appears on commands in sent messages.Background
Currently, slash commands are styled with a blue highlight color only after sending the message (via
CommandPrefixBadgeinUserMessageContent). This PR brings the same visual treatment to the input field itself, providing immediate feedback that a command is being typed.Implementation
CommandHighlightOverlaycomponent: Extracts the command prefix (first line starting with/) and renders it with the highlight color. The rest of the text is transparent so the original textarea text shows through.VimTextArea: The overlay is positioned absolutely on top of the textarea withpointer-events: noneso all interactions pass through to the underlying input.extractCommandPrefixfunction covering various input patterns.How it works
/compact/compact/compact -t 5000/compact -t 5000/compact\nContinue working/compact(only first line)/model sonnet/model sonnetregular messageGenerated with
mux• Model:anthropic:claude-opus-4-5• Thinking:high• Cost:$2.72