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:02:01 +02:00
parent 778054c742
commit e89b3cf7e8
33 changed files with 294 additions and 257 deletions
+6 -6
View File
@@ -47,14 +47,14 @@ function groupPreludeHelpers(helpers: PreludeHelper[]): PreludeCategory[] {
export const pythonSchema = Type.Object({
cells: Type.Array(
Type.Object({
code: Type.String({ description: "Python code to execute" }),
title: Type.Optional(Type.String({ description: "Cell label, e.g. 'imports', 'helper'" })),
code: Type.String({ description: "python code", examples: ["print('hello')", "import json"] }),
title: Type.Optional(Type.String({ description: "cell label", examples: ["imports", "helper"] })),
}),
{ description: "Cells to execute sequentially in persistent kernel" },
{ description: "cells to execute" },
),
timeout: Type.Optional(Type.Number({ description: "Timeout in seconds", default: 30 })),
cwd: Type.Optional(Type.String({ description: "Working directory (default: cwd)" })),
reset: Type.Optional(Type.Boolean({ description: "Restart kernel before execution" })),
timeout: Type.Optional(Type.Number({ description: "timeout in seconds", default: 30 })),
cwd: Type.Optional(Type.String({ description: "working directory", examples: ["src/"] })),
reset: Type.Optional(Type.Boolean({ description: "restart kernel" })),
});
export type PythonToolParams = Static<typeof pythonSchema>;