feat(gtm): Spec 4 — cockpit activation recipes (try-this-prompt suggestions)#388
Merged
Conversation
Pre-baked "Try this prompt" suggestions on the four capability examples that map to activation signals (streaming, persistence, interrupts, generative-ui), plus a ChatComponent enhancement so firstMessageSent flips on the first stream-start regardless of submit path (input, suggestion-click, programmatic). A developer landing in the cockpit gets a 1-click path to firing each activation signal. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ath) ChatComponent now subscribes to agent.lifecycle.streamStartedAt and flips CHAT_LIFECYCLE.firstMessageSent on its first transition to a non-null value. This makes the lifecycle robust to programmatic agent.submit() calls, including the <chat-welcome-suggestion> click handler pattern in cockpit examples. messageCount and inputSubmittedAt remain input-bound by design — they measure typing engagement, not stream initiation. Two new lifecycle tests cover the agent-driven flip + stickiness across multiple stream-starts. The chat mock-agent gained a minimal lifecycle stub (streamStartedAt only, with a writable _internal handle) so the tests can drive the signal directly without a full adapter. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two <chat-welcome-suggestion> rows in the empty-state — "Stream a long
answer" and "Walk me through agent tool calls". Clicking either calls
agent.submit({ message: ... }) which fires AGENT_LIFECYCLE.streamStartedAt
on first chunk arrival → cockpit:transport_connected. ChatComponent's
new effect (Phase 0) then flips firstMessageSent → cockpit:chat_first_message.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
One <chat-welcome-suggestion> row — "Save this thread for later" — that prompts a project-brief conversation. After the user reloads the page, AGENT_LIFECYCLE.threadPersistedAt fires → cockpit:thread_persisted activation signal. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
One <chat-welcome-suggestion> row — "Approve a tool call" — that prompts a flight-booking conversation. The graph pauses at an interrupt; when the user approves via the ChatInterruptPanelComponent, AGENT_LIFECYCLE.interruptResolvedAt fires → cockpit:interrupt_handled activation signal. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two <chat-welcome-suggestion> rows — "Render a dashboard" and "Render a form". Clicking either prompts the agent to emit a generative-UI payload that RenderSpecComponent mounts, firing RENDER_LIFECYCLE.firstMountAt → cockpit:generative_component_rendered activation signal. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Phase 1 activation deliverable. Two cohesive changes:
A developer landing in the cockpit gets a 1-click path to firing each activation signal.
Spec & Plan
Notable
Test plan
🤖 Generated with Claude Code