refactor(codemode): simplify tools types (#36941)

This commit is contained in:
Aiden Cline
2026-07-14 18:40:43 -05:00
committed by GitHub
parent fca3bca19d
commit 563f6a65de
8 changed files with 77 additions and 93 deletions
+2 -2
View File
@@ -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 = []