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

This commit is contained in:
Aiden Cline 2026-07-14 18:40:43 -05:00 committed by GitHub
commit 563f6a65de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 77 additions and 93 deletions

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 = []