feat(ag-ui): context-aware welcome suggestions (App mode leads with itinerary prompts)#746
feat(ag-ui): context-aware welcome suggestions (App mode leads with itinerary prompts)#746blove wants to merge 2 commits into
Conversation
…tinerary prompts) Tag each welcome prompt as capability vs itinerary and pick the featured prompt + "More prompts" order from the current context via suggestionsForAppMode(appModeOn): - App mode ON (map cockpit on screen): feature "Read my itinerary"; the remaining itinerary prompts lead the dropdown, capability prompts trail. - App mode OFF (plain chat): feature "Search docs and cite sources"; capability prompts lead, itinerary prompts trail. Each mode passes [appModeOn]="shell.appMode() === 'on'" so the surface reorders live when the toggle flips. Copy unchanged — only selection and order — so no e2e assertions move. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
79dbc21 added the [appModeOn] binding to embed/popup only; main's sidebar also renders <welcome-suggestions>, so wire it there too (context-aware ordering must work in sidebar mode, where App mode actually lives).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @blove's task in 2m 44s —— View job PR Review
SummaryThe implementation is clean. The Three minor items worth noting: Stale JSDoc in
|
| ...ITINERARY_SUGGESTIONS, | ||
| ...CAPABILITY_SUGGESTIONS.slice(3), | ||
| ]; | ||
| export const WELCOME_SUGGESTIONS: readonly WelcomeSuggestion[] = [ |
There was a problem hiding this comment.
WELCOME_SUGGESTIONS silently changed order: previously [...FEATURED_SUGGESTIONS, ...MORE_SUGGESTIONS] put "Delegate to a research subagent" last; now [...CAPABILITY_SUGGESTIONS, ...ITINERARY_SUGGESTIONS] promotes it to 4th (after the other capability prompts, before the itinerary ones). The comment says there are no in-tree consumers today, so this is low-risk — just worth noting if anyone has an external dependency on this export's ordering.
| readonly more: readonly WelcomeSuggestion[]; | ||
| } { | ||
| if (appModeOn) { | ||
| const [featured, ...restItinerary] = ITINERARY_SUGGESTIONS; |
There was a problem hiding this comment.
If ITINERARY_SUGGESTIONS is ever empty, featured will be undefined and the template will throw. The arrays are module-level constants so this can't happen today, but an explicit guard or a compile-time assertion (ITINERARY_SUGGESTIONS.length > 0 as true) would make the invariant explicit.
This is a very low-risk theoretical concern given the fixed constants — mentioning it only because the pattern is easy to break later if someone removes a suggestion.
Salvaged from the closed #738 (its uncommitted/committed WIP) onto a fresh branch off main.
The welcome-state suggestions now reorder by context: each prompt is tagged
kind: 'capability' | 'itinerary', andsuggestionsForAppMode(appModeOn)leads with the itinerary prompts (featured + first in "More prompts") when the map cockpit is on, and with the broad transport-capability prompts in plain chat.welcome-suggestions.ts—kindtagging +suggestionsForAppMode()split (CAPABILITY vs ITINERARY).welcome-suggestions.component.ts—appModeOninput; featured chip + More-prompts derive fromsuggestionsForAppMode.[appModeOn]="shell.appMode() === 'on'"(the sidebar wiring is added here — the salvaged commit only covered embed/popup, but on main the sidebar renders welcome-suggestions and is where App mode actually lives).Verified: lint 0 errors, unit ✓, build ✓, ag-ui e2e 28/28, and live in Chrome — embed (App off) features "Search docs and cite sources" (capability); sidebar App-on features "Read my itinerary" (itinerary).
🤖 Generated with Claude Code