You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(assistant): one-click "Ask assistant to debug/fix" affordances
Add entry points that open the AI assistant and auto-submit a targeted
debug prompt for a specific failure. Everything is gated on
AppConfig().aiEnabled and renders/registers nothing when AI is off.
Surfaces:
- Inline "Ask assistant to fix" CodeLens on schema syntax errors and
failed assertions, in the schema/assertions editors.
- "Ask assistant to debug" button in the Watches panel for every
non-passing check-watch state (denied, errored, couldn't run, missing
context).
- "Ask assistant to fix" action on Problems-panel error rows (schema,
assertion, validation).
Mechanism: a transient, non-persisted pendingPrompt on the assistant
store; requestAssistantDebug(prompt, source) opens the assistant dock and
stashes the prompt; a usePendingPromptConsumer hook in AssistantPanel
submits it once the panel is not mid-turn (it defers only while a turn is
streaming or executing tools, not on the terminal error state, so a
request after a failed turn still fires). A pure debugPrompts module
builds the prompts. Emits a single playground_ai_debug_requested
analytics event tagged with the source surface.
Covered by unit tests (prompt builders, predicate, store actions,
dispatcher) and browser tests (affordance components and the
pending-prompt hook, including the error-state case).
0 commit comments