feat(apollo-vertex): ai-chat text selection — Ask AI floating pill + quote chip [5/5]#632
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Apr 30, 2026
7dd0761 to
d7825bc
Compare
7beb110 to
a27c80c
Compare
Contributor
Dependency License Review
License distribution
Excluded packages
|
d7825bc to
81ea0f5
Compare
a27c80c to
30bd3d9
Compare
81ea0f5 to
cbb42da
Compare
30bd3d9 to
8012d26
Compare
cbb42da to
e056918
Compare
405b118 to
ce7867d
Compare
8cdb31f to
fa624d3
Compare
7e4b0e5 to
873677f
Compare
fa624d3 to
549b6d0
Compare
Contributor
|
I think this is part of a PR stack? Seems like |
5 tasks
873677f to
2162d40
Compare
549b6d0 to
11b444a
Compare
48009fd to
34906a0
Compare
11b444a to
0af048f
Compare
There was a problem hiding this comment.
Pull request overview
Adds opt-in “text selection → Ask AI” UX to the Apollo Vertex AiChat experience, enabling users to quote selected chat text into the composer and ask a follow-up with that context.
Changes:
- Introduces
enableTextSelectiononAiChat, showing a floating “Ask AI” pill on selection and inserting the selected text as a markdown blockquote in the next user message. - Enhances markdown rendering to optionally preserve soft line breaks (
remark-breaks) and renders user bubbles via markdown to support quoted blockquotes. - Refactors AI chat UI into smaller components (empty suggestions, error banner, scroll-to-bottom button) and updates AgentHub template to enable the feature.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Adds lock entries for remark-breaks and lockfile reshuffles. |
| apps/apollo-vertex/package.json | Adds remark-breaks dependency. |
| apps/apollo-vertex/registry.json | Registers the new dependency and newly added UI components in the registry. |
| apps/apollo-vertex/templates/ai-chat/AiChatAgentHubMode.tsx | Enables text selection in the AgentHub chat template; updates assistant naming. |
| apps/apollo-vertex/registry/ai-chat/hooks/use-sticky-scroll.ts | Exposes scroll element ref and merged listener ref for consumers (selection menu positioning). |
| apps/apollo-vertex/registry/ai-chat/content-parts.ts | Adds helpers for visible-assistant detection and blockquote composition. |
| apps/apollo-vertex/registry/ai-chat/components/ai-chat.tsx | Wires selection menu, quoted text state, and new subcomponents; composes quoted blockquote into submitted content. |
| apps/apollo-vertex/registry/ai-chat/components/ai-chat-selection-menu.tsx | New floating “Ask AI” pill shown for in-container selections. |
| apps/apollo-vertex/registry/ai-chat/components/ai-chat-scroll-to-bottom-button.tsx | New extracted scroll-to-bottom button component. |
| apps/apollo-vertex/registry/ai-chat/components/ai-chat-error-banner.tsx | New extracted error banner component. |
| apps/apollo-vertex/registry/ai-chat/components/ai-chat-empty-suggestions.tsx | New extracted empty-state suggestion buttons component. |
| apps/apollo-vertex/registry/ai-chat/components/ai-chat-message.tsx | Renders user messages using markdown (with preserved line breaks) to display blockquote quotes. |
| apps/apollo-vertex/registry/ai-chat/components/ai-chat-markdown.tsx | Adds preserveLineBreaks support via remark-breaks and a wrapper className prop. |
| apps/apollo-vertex/registry/ai-chat/components/ai-chat-input.tsx | Adds quote chip UI and remove-quote affordance. |
| apps/apollo-vertex/registry/ai-chat/animations.ts | Adds “pop” animation constants used by the selection menu. |
| apps/apollo-vertex/locales/en.json | Adds i18n strings for “Ask AI” and quote removal. |
| apps/apollo-vertex/app/patterns/ai-chat/page.mdx | Documents the new enableTextSelection behavior and usage. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
0af048f to
570cfbc
Compare
frankkluijtmans
requested changes
May 20, 2026
570cfbc to
45e21dc
Compare
45e21dc to
025646d
Compare
frankkluijtmans
approved these changes
May 20, 2026
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.
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.
enableTextSelectionprop (off by default) so teams can opt in only where it makes senseTest plan
enableTextSelection={false}(default) — pill never appears🤖 Generated with Claude Code