fix(inspect): show agent invoke parsing errors - #373
Conversation
◈ PR Lens
Architecture 1 component touched across 3 lanes. Data flow
Drill down
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
🟡 Changes recommended
The new error element id generation is based on a lossy tool-name transform and can create duplicate DOM ids, breaking the intended aria-describedby association.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR improves the Inspect devframe’s Agent tab by surfacing malformed JSON argument parsing errors inline, tying them to the arguments textarea for accessibility, and clearing the error state on edits or successful parses.
Changes:
- Added per-tool parsing error state (
invokeErrors) and changed invocation to report JSON parse failures inline instead of throwing. - Improved textarea accessibility with
aria-invalidandaria-describedby, and added an inline error alert UI viaFeedbackTip.
File summaries
| File | Description |
|---|---|
| plugins/inspect/app/components/AgentView.vue | Adds inline JSON parse error reporting and accessibility wiring for the Agent tool invocation textarea. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| function invokeErrorId(id: string): string { | ||
| return `agent-invoke-error-${toAgentToolName(id)}` | ||
| } |
|
Actually, we could redo this view completely with better async state handling, filters, auto discovery of values, etc |
currently clicking the invoke button with malformed json does nothing