refactor(codemode): simplify tools types (#36941)
This commit is contained in:
parent
fca3bca19d
commit
563f6a65de
8 changed files with 77 additions and 93 deletions
|
|
@ -3,7 +3,7 @@ import { Effect, Schema } from "effect"
|
|||
import { CodeMode, Tool } from "../src/index.js"
|
||||
|
||||
// Key enumeration: Object.keys and for...in share one surface over plain objects, arrays
|
||||
// (index strings), and tool references (namespace/tool names from the host tool tree), so a
|
||||
// (index strings), and tool references (namespace/tool names from the supplied tools), so a
|
||||
// model can discover what it may call instead of guessing names from the instructions. The
|
||||
// motivating transcript: `Object.keys(tools)` failed with the generic plain-objects-only
|
||||
// message and `for (const key in tools)` was unsupported syntax, forcing blind guesses.
|
||||
|
|
@ -137,7 +137,7 @@ describe("for...in", () => {
|
|||
).toBe("only")
|
||||
})
|
||||
|
||||
test("enumerates namespaces and tools from the callable tool tree", async () => {
|
||||
test("enumerates namespaces and tools from the supplied tools", async () => {
|
||||
expect(
|
||||
await value(`
|
||||
const names = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue