feat(chat,langgraph): message actions + streaming-stability fixes#177
Merged
Conversation
…tability Combined patch addressing live-smoke findings + a copilotkit chat-UI audit. ## chat (0.0.10 → 0.0.11) - New primitive: ChatMessageActionsComponent (regenerate / copy / thumbs up / thumbs down) auto-rendered under each assistant message in the default chat composition. Mirrors copilotkit's AssistantMessage controls: hidden by default, fades in via :host-context() on hover or on the current message, always visible on mobile, suppressed during streaming. Copy uses the navigator clipboard API with a 2000ms checkmark feedback fallback to execCommand. Thumb buttons toggle between active/inactive on click. New outputs on chat: `regenerate`, `rate`, `messageCopy`. `regenerate` calls `agent.reload()`. - Caret animation: switched from harsh step-end blink to copilotkit's smooth pulse (2s cubic-bezier(0.4, 0, 0.6, 1)) with marginTop and vertical-align tweaks so the caret sits inline with the last text line. - Public API exports the new component. ## langgraph (0.0.6 → 0.0.9) - buildSubmitPayload: optimistic human messages now carry both `type: 'human'` (what toMessage reads) and `role: 'human'` (what the server expects). Without `type`, toMessage fell through to the 'ai' default and the user's question rendered as an assistant message — the duplicate-bubble bug we observed in live testing. - values-event sync: ALWAYS merge state messages into existing instead of replacing. LangGraph emits intermediate values events during streaming whose state.messages can lag behind what we've already received via messages-tuple. Replacing dropped the partial AI (and even the optimistic human) and tore down their DOM mid-stream. Verified against the local LangGraph LLM backend with MutationObserver instrumentation: a single-turn streaming response now produces exactly two CHAT-MESSAGE additions and zero removals, with action controls appearing only after the stream finishes. 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.
Why
Three things converged this round:
chat (0.0.10 → 0.0.11)
langgraph (0.0.6 → 0.0.9)
Verified
🤖 Generated with Claude Code