Add app-mode itinerary demo and markdown coverage#798
Merged
Conversation
Design for porting the ag-ui App-mode map/itinerary cockpit to examples/chat (langgraph), single shared agent. Key divergence: itinerary lives in graph state (per-thread checkpoint) alongside messages, synced client-authoritatively via input.state + updateState; no localStorage. Local-first; deploy deferred.
No seed/seeding: a fresh thread starts empty; users prompt the agent (via welcome suggestions) to generate a trip plan. Adds a first-class Planner behavior & prompt-tuning section (recommend + populate app state via client tools), empty-state CTA, and empty-thread live gate.
… demo 16 tasks across 5 phases (spike → backend state/planner → frontend port → shell/wiring → verify). TDD, subagent-executable, local-first.
…ng (#itinerary) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…client tools present
Mirrors examples/ag-ui/angular: inject-env.mjs reads GOOGLE_MAPS_API_KEY/ GOOGLE_MAPS_MAP_ID from the repo-root .env and writes a gitignored generated-keys.local.ts, swapped in via project.json fileReplacements. Ships empty in CI; local/preview builds get the real value.
…on, no localStorage
…langgraph agent) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… use demo agent) Copies examples/ag-ui/angular/src/app/client-tools.ts into examples/chat/angular, removing the get_itinerary tool, ITINERARY_AGENT ref, and ItineraryState interface since the chat demo's DEMO_AGENT_REF/DemoState already covers agent typing and the model now sees itinerary state via injected graph-state context instead of a read round-trip. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…+ SDK checkpoint push
… compiles specs) tsconfig.app.json includes src/**/*.ts, so spec files are type-checked in the AOT build; the T8 client-tools.spec relied on ambient describe/it/expect and broke the build. Import them explicitly, matching sibling specs.
…sidebar coercion) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lay + sidenav→drawer) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…aware welcome suggestions Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ool error strings get_itinerary was removed (the model sees the itinerary via injected graph context); the move_stop/reorder_stop 'not found' errors no longer point at a nonexistent tool.
…id-run 409) The live gate caught that reload lost the trip: the client-tool resume loop keeps the agent loading for the whole plan, so the run-gated updateState push never fired with the final itinerary and the checkpoint kept the empty list sent at first submit. Drop the isLoading gate and retry the updateState on the 409 a mid-run write returns until the run settles, so the final itinerary always lands. Also guard hydration so a behind/empty server snapshot can't wipe a populated local working copy mid-plan. Verified live: plan → reload restores.
Address final-review findings: the retry now discriminates — only a mid-run 409 (conflict) is retried, and only up to MAX_PUSH_RETRIES, so a persistently failing thread (404/auth/500) can't spin an unbounded background loop. Track the retry timer, and correct the now-stale run-gated/500ms comment. Adds isConflict unit tests.
…dency The map's dark theme was a cloud-based map style bound to a specific GCP Map ID — brittle (lives in the Console, tied to one project/billing acct, invisible to git). Replace it with an in-code colorScheme: DARK on the vector map, which keeps AdvancedMarkers, works with any mapId (incl. the DEMO_MAP_ID fallback), and is version-controlled + project-independent. Kept as a plain string so the field carries no runtime google.maps reference (map-canvas builds under jsdom in the shell specs).
The map now tracks the app's light/dark toggle (the <html data-color-scheme> the shell reflects), not the gen-UI mode. mapColorScheme is derived from a MutationObserver-backed signal; since Google's colorScheme is init-only, the template remounts <google-map> via a scheme-keyed @for when it flips.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
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.
Summary
Verification