feat(tools): render optional description or intent in tool approval cards - #1367
Conversation
nc-review: comments — 1 important, 1 nit@Shreyasnalle — a few things worth a look, none blocking. Adds an optional 🟠 important · The new prompt rule explicitly lists only But Either generalize the rule (e.g. "when calling any tool that triggers a confirmation preview, provide a concise ⚪ nit · The three new tests only cover the presence path — formatter called with a 🔴 blocking · 🟠 a reviewer would ask for a change · ⚪ optional Automated code review — correctness, security, design, tests, plus duplicates and scope. A human still decides; this is not a substitute for review and is not exhaustive. The required status checks separately cover lint, formatting, types, unused dependencies, the test suite and the build. This bot never merges. Maintainers can rerun with |
|
Addressed the review comments, added description parameter schema and preview support to diff_edit and file_op, aligned tool-rules.md and added negative test assertions across all tool formatters. |
|
Great work, thanks for the PR @Shreyasnalle |
|
My pleasure, thankyou |
Description
Adds an optional
descriptionparameter to the schemas of mutation tools (execute_bash, string_replace, write_file, diff_edit, and file_op) thus rendering it directly above the command or file path in the tool confirmation preview cards.This improves transparency during the tool approval phase by allowing models to communicate their code work intend before the user approves execution which reduces the need to cancel commands to ask for an explanation over the changes made in the code by the agent.
Type of Change
Changeset
pnpm changeset) describing this change for the changelogTesting
Automated Tests
.spec.ts/tsxfiles (execute-bash.spec.tsx,string-replace.spec.tsx,write-file.spec.tsx)pnpm test:avaruns with 100% passes)pnpm run test:typespasses (0 errors)pnpm run test:lintpasses (0 errors)Manual Testing
Description:when passed as tool argumentsdescriptionis omittedChecklist
tool-rules.md).changeset/tool-approval-description.md)