feat(app,ui): add undo/fork buttons on user messages and agent description placeholder#13266
feat(app,ui): add undo/fork buttons on user messages and agent description placeholder#13266cooooooooooode wants to merge 3 commits intoanomalyco:devfrom
Conversation
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found two potentially related PRs (excluding the current PR #13266):
These PRs may represent earlier implementations or iterations of similar features. You may want to review them to ensure there's no duplicate work or to understand how previous attempts were handled. |
Display the current agent's description in the prompt input placeholder
using the format 'I am {name}, {description}' with full i18n support
across all 16 locales.
- Undo: aborts running session and reverts the message - Fork: creates a new session branching from the selected message - Two-step confirmation with forceOpen tooltip and 3s timeout reset - Full i18n support across all 16 locales
After reverting a user message, extract its parts and fill the original text back into the prompt input via a pendingRestore signal in DataProvider, consumed by session.tsx through extractPromptFromParts.
939bfa7 to
93106ef
Compare
Closes #13265
Summary
Changes
UI layer (packages/ui):
UserMessageDisplay: new fork/undo/copy button group with click-to-confirm (3s timeout reset + forceOpen tooltip)undoicon SVGDataProvider: wrapsundoMessageto capture message parts before revert, exposespendingRestoresignal +consumeRestore()for prompt restorationApp layer (packages/app):
directory-layout.tsx:undoMessage(abort + revert) andforkMessage(find next message ID as truncation point →session.fork) callbackssession.tsx: watchesdata.pendingRestore, extracts prompt viaextractPromptFromParts, and fills it back into the inputplaceholder.ts: agent description placeholder viaprompt.placeholder.agenti18n keyVerification