Skip to content

feat(apollo-vertex): ai-chat text selection — Ask AI floating pill + quote chip [5/5]#632

Draft
petervachon wants to merge 1 commit into
feat/ai-chat-4-attachmentsfrom
feat/ai-chat-5-text-selection
Draft

feat(apollo-vertex): ai-chat text selection — Ask AI floating pill + quote chip [5/5]#632
petervachon wants to merge 1 commit into
feat/ai-chat-4-attachmentsfrom
feat/ai-chat-5-text-selection

Conversation

@petervachon
Copy link
Copy Markdown
Collaborator

What this does

Lets users ask the AI about specific text they've selected — a natural way to go from reading a response to asking a follow-up about a particular part of it.

  • "Ask AI" floating pill — appears above any selected text within the chat container, with the Autopilot icon and a gradient background to make it feel intentional
  • Quote chip in the input — when the user clicks "Ask AI", the selected text appears as a small truncated chip above the textarea so they can see the context they're referencing before they type their question
  • Dismiss — clicking × on the chip removes the quoted context; submitting the message clears it automatically
  • Scoped to the chat container — selecting text elsewhere on the page (browser UI, other panels) doesn't trigger the pill
  • Enabled via enableTextSelection prop (off by default) so teams can opt in only where it makes sense

Test plan

  • Select text in an assistant message — "Ask AI" pill appears above the selection
  • Click pill — quote chip appears in input with the selected text, input is focused
  • Long quoted text truncates with ellipsis rather than wrapping to two lines
  • × on chip clears the quote
  • Submitting clears the chip and sends the message
  • Selecting text outside the chat container does not show the pill
  • enableTextSelection={false} (default) — pill never appears

🤖 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 angeloaltamiranom and frankkluijtmans 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 04, 2026, 07:39:28 AM
apollo-docs 🟢 Ready Preview, Logs May 04, 2026, 07:38:05 AM
apollo-landing 🟢 Ready Preview, Logs May 04, 2026, 07:36:12 AM
apollo-ui-react 🟢 Ready Preview, Logs May 04, 2026, 07:37:56 AM
apollo-vertex 🟢 Ready Preview, Logs May 04, 2026, 07:37:54 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-5-text-selection branch from d7825bc to 81ea0f5 Compare April 30, 2026 16:56
@petervachon petervachon force-pushed the feat/ai-chat-4-attachments branch from a27c80c to 30bd3d9 Compare April 30, 2026 16:56
@petervachon petervachon force-pushed the feat/ai-chat-5-text-selection branch from 81ea0f5 to cbb42da Compare April 30, 2026 17:36
@petervachon petervachon force-pushed the feat/ai-chat-4-attachments branch from 30bd3d9 to 8012d26 Compare April 30, 2026 17:36
@petervachon petervachon force-pushed the feat/ai-chat-5-text-selection branch from cbb42da to e056918 Compare May 1, 2026 13:11
@petervachon petervachon force-pushed the feat/ai-chat-4-attachments branch 2 times, most recently from 405b118 to ce7867d Compare May 1, 2026 13:22
@petervachon petervachon force-pushed the feat/ai-chat-5-text-selection branch 2 times, most recently from 8cdb31f to fa624d3 Compare May 1, 2026 13:42
@petervachon petervachon force-pushed the feat/ai-chat-4-attachments branch 2 times, most recently from 7e4b0e5 to 873677f Compare May 1, 2026 13:57
@petervachon petervachon force-pushed the feat/ai-chat-5-text-selection branch from fa624d3 to 549b6d0 Compare May 1, 2026 13:57
@frankkluijtmans
Copy link
Copy Markdown
Contributor

I think this is part of a PR stack? Seems like [feat/ai-chat-4-attachments](https://github.com/UiPath/apollo-ui/tree/feat/ai-chat-4-attachments) needs to go in first. Let's keep this in draft until then.

Adds text-selection-to-AI flow:
- AiChatSelectionMenu: floating "Ask AI" pill shown on text selection,
  scoped to the chat container, with fade+scale entrance animation
- AiChatInput: quotedText chip with left-accent border, dismissable with X
- AiChat: enableTextSelection prop wires selection menu to quote chip;
  clicking "Ask AI" pre-fills the input and focuses the textarea
- registry.json: ai-chat-selection-menu.tsx registered

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@petervachon petervachon force-pushed the feat/ai-chat-4-attachments branch from 873677f to 2162d40 Compare May 4, 2026 14:34
@petervachon petervachon force-pushed the feat/ai-chat-5-text-selection branch from 549b6d0 to 11b444a Compare May 4, 2026 14:34
@petervachon petervachon marked this pull request as draft May 4, 2026 14:38
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.

2 participants