Skip to content

feat(apollo-vertex): ai-chat message actions — copy, feedback, edit, regenerate [3/5]#630

Open
petervachon wants to merge 1 commit intofeat/ai-chat-2-code-blocksfrom
feat/ai-chat-3-message-actions
Open

feat(apollo-vertex): ai-chat message actions — copy, feedback, edit, regenerate [3/5]#630
petervachon wants to merge 1 commit intofeat/ai-chat-2-code-blocksfrom
feat/ai-chat-3-message-actions

Conversation

@petervachon
Copy link
Copy Markdown
Collaborator

@petervachon petervachon commented Apr 30, 2026

What this does

Adds the per-message action layer — the controls that let users interact with individual messages rather than just reading them.

  • Copy message — copies the full text of any message to clipboard with a brief "Copied!" confirmation
  • Thumbs up / thumbs down on assistant messages — surfaces a onFeedback callback so the host app can record quality signals
  • Edit user message — tap the pencil on any user bubble to revise your message; the conversation rewinds to that point and re-sends, so the thread stays coherent
  • Regenerate — reruns the last AI response without resending the user message, useful when the answer is off
  • Actions appear on hover (desktop) or are always visible on touch, so they don't clutter the UI by default
  • Shared state lives in AiChatProvider context so all message components can read it without prop-drilling

Test plan

  • Hover a message — action bar appears
  • Copy copies the message text and shows "Copied!" briefly
  • Thumbs up/down fires onFeedback with the message ID and type
  • Edit pencil opens inline edit mode; submitting rewinds history and re-sends
  • Regenerate button (on latest assistant message) fires onRegenerate

🤖 Generated with Claude Code

@petervachon petervachon requested a review from a team as a code owner April 30, 2026 13:51
@petervachon petervachon requested review from 0xr3ngar and pieman1313 and removed request for a team April 30, 2026 13:51
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs May 01, 2026, 07:01:18 AM
apollo-docs 🟢 Ready Preview, Logs May 01, 2026, 06:59:57 AM
apollo-landing 🟢 Ready Preview, Logs May 01, 2026, 06:59:03 AM
apollo-ui-react 🟢 Ready Preview, Logs May 01, 2026, 07:00:02 AM
apollo-vertex 🟢 Ready Preview, Logs May 01, 2026, 07:00:01 AM

@github-actions
Copy link
Copy Markdown

Dependency License Review

  • 2104 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 15 package(s) excluded (see details below)
License distribution
License Packages
MIT 1825
ISC 104
Apache-2.0 69
BSD-3-Clause 30
BSD-2-Clause 24
Copyright 2022, UiPath, all rights reserved 9
BlueOak-1.0.0 8
MPL-2.0 5
MIT OR Apache-2.0 3
MIT-0 3
Unknown 3
Unlicense 3
CC0-1.0 3
LGPL-3.0-or-later 2
(MIT OR Apache-2.0) 2
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
BSD 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
@img/sharp-libvips-linuxmusl-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
@uipath/apollo-angular-elements 5.86.3 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/apollo-core 4.35.0, 4.35.1 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/apollo-fonts 1.25.8 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/apollo-icons 1.33.7 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/apollo-mui5 2.31.26 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/portal-shell 3.351.4 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/portal-shell-react 3.149.36 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/portal-shell-types 3.325.2 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/portal-shell-util 1.112.0 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/apollo-lab 25.12.0 Unknown UiPath first-party package
@uipath/telemetry-client-web 5.1.0 Unknown UiPath first-party package
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json
hyperx 2.5.4 BSD BSD-2-Clause per LICENSE file, non-SPDX "BSD" in package.json

@petervachon petervachon force-pushed the feat/ai-chat-3-message-actions branch from cc1b25a to 1cd03f4 Compare April 30, 2026 17:36
@petervachon petervachon force-pushed the feat/ai-chat-2-code-blocks branch from e6653c8 to 7817feb Compare April 30, 2026 17:36
@petervachon petervachon force-pushed the feat/ai-chat-3-message-actions branch from 1cd03f4 to c39dd48 Compare May 1, 2026 13:11
@petervachon petervachon force-pushed the feat/ai-chat-2-code-blocks branch 2 times, most recently from 7b409a5 to 2c7e90f Compare May 1, 2026 13:22
@petervachon petervachon force-pushed the feat/ai-chat-3-message-actions branch 2 times, most recently from ccb80ab to cf9efc2 Compare May 1, 2026 13:42
@petervachon petervachon force-pushed the feat/ai-chat-2-code-blocks branch from 2c7e90f to d332c03 Compare May 1, 2026 13:42
…/feedback/edit

- types.ts: AiChatConfig interface + MessageFeedbackType shared across components
- AiChatProvider: React context that distributes config (assistantName, action
  callbacks, isLoading, latestAssistantMessageId) to message components without
  prop drilling; uses display:contents wrapper to preserve h-full layout
- AiChatMessageActions: copy / thumbs up+down / regenerate / edit toolbar;
  latest assistant message keeps actions always-visible, older messages reveal
  on hover/focus for clean reading
- AiChatMessage: rewritten to use provider context; adds entrance animation
  (fade + 8px slide-up), styled user/assistant bubbles, inline edit mode
  (textarea swap, Save & re-run / Cancel, auto-scroll to centre)
- AiChat: wraps children with AiChatProvider; adds onFeedback, onRegenerate,
  onEditMessage, showMessageActions, showCopyButton props; computes
  latestAssistantMessageId for the provider
- AiChatAgentHubMode: removes assistantName from AiChatMessage (now in provider)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@petervachon petervachon force-pushed the feat/ai-chat-2-code-blocks branch from d332c03 to 6a9cb61 Compare May 1, 2026 13:57
@petervachon petervachon force-pushed the feat/ai-chat-3-message-actions branch from cf9efc2 to b3871a0 Compare May 1, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant