feat(coding-agent/tools): added examples to coding-agent tools
- Added `examples` support to `StringEnum` schemas and propagated it to tool metadata. - Added concise descriptions and example values across coding-agent tool schemas for clearer guidance. - Documented the new StringEnum examples capability in `packages/ai/CHANGELOG.md`. - Cast `real` to `HASHLINE_BIGRAMS` elements in `staleBigramFor` test setup.
This commit is contained in:
@@ -13,14 +13,16 @@ import { formatCount, formatErrorMessage, PREVIEW_LIMITS } from "./render-utils"
|
||||
|
||||
const notebookSchema = Type.Object({
|
||||
action: StringEnum(["edit", "insert", "delete"], {
|
||||
description: "Action to perform on the notebook cell",
|
||||
description: "cell action",
|
||||
examples: ["edit", "insert", "delete"],
|
||||
}),
|
||||
notebook_path: Type.String({ description: "Path to the .ipynb file" }),
|
||||
cell_index: Type.Number({ description: "0-based index of the cell to operate on" }),
|
||||
content: Type.Optional(Type.String({ description: "New cell content (required for edit/insert)" })),
|
||||
notebook_path: Type.String({ description: "notebook path", examples: ["analysis.ipynb"] }),
|
||||
cell_index: Type.Number({ description: "cell index", examples: [0, 1] }),
|
||||
content: Type.Optional(Type.String({ description: "new cell content" })),
|
||||
cell_type: Type.Optional(
|
||||
StringEnum(["code", "markdown"], {
|
||||
description: "Cell type for insert (default: code)",
|
||||
description: "cell type",
|
||||
examples: ["code", "markdown"],
|
||||
}),
|
||||
),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user