feat(chat): stop button + cmd/ctrl+K shortcut + IME guard#178
Merged
Conversation
…uard Three more copilotkit-parity behaviors landed in the input + popup primitives. ## chat-input - **Stop button**: while \`agent.isLoading()\` the send button switches to a square stop button (aria-label="Stop generating"). Click calls \`agent.stop()\` and emits a \`stopped\` output. Adds a \`showStopButton\` input (default true) to opt out. - **Textarea no longer disables during streaming** — copilotkit pattern. Users can keep composing the next prompt while the assistant is responding. - **IME composition guard**: tracks \`compositionstart\`/\`compositionend\` and additionally checks \`event.isComposing\` and the legacy \`event.keyCode === 229\`. Prevents Enter from submitting mid-IME (CJK input methods, dead-key accents, autocorrect popups), which otherwise discards the in-progress character. ## chat-popup - **Cmd/Ctrl + K shortcut** to toggle the popup (configurable via the \`shortcut\` input, set to \`null\` to disable). Mac uses cmd, others use ctrl, detected from \`navigator.platform\`/\`userAgent\`. - **Escape closes** when open (configurable via \`closeOnEscape\`). ## styling - New \`.chat-input__send--stop\` rule: filled dark square button with inverted color, distinct from the disabled-send muted look. Bumps @ngaf/chat 0.0.11 → 0.0.12. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Three more copilotkit-parity behaviors
chat-input
chat-popup
Verified live
Versions
🤖 Generated with Claude Code