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:
can1357
2026-04-26 01:03:21 +02:00
parent 778054c742
commit e89b3cf7e8
33 changed files with 294 additions and 257 deletions
+7 -5
View File
@@ -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"],
}),
),
});