fix(core): clarify Code Mode tool boundary (#39540)
This commit is contained in:
parent
c2e975c4e6
commit
b2010220f9
5 changed files with 12 additions and 3 deletions
|
|
@ -67,6 +67,7 @@ describe("CodeModeInstructions.render", () => {
|
|||
expect(instructions).toContain(` - ${lookup.signature} // Look up an order by ID`)
|
||||
expect(instructions).not.toContain("## Search")
|
||||
expect(instructions).toContain("The Code Mode tool catalog below is complete.")
|
||||
expect(instructions).toContain("This catalog is the complete set of tools available within Code Mode.")
|
||||
expect(instructions).not.toContain("surrounding top-level agent tools")
|
||||
})
|
||||
|
||||
|
|
@ -76,6 +77,9 @@ describe("CodeModeInstructions.render", () => {
|
|||
expect(partial).toContain("- orders (1 tool, none shown)")
|
||||
expect(partial).toContain("## Search")
|
||||
expect(partial).toContain("The Code Mode tool catalog below is partial.")
|
||||
expect(partial).toContain(
|
||||
"The Code Mode catalog and `search` results are the complete set of tools available within Code Mode.",
|
||||
)
|
||||
expect(partial).not.toContain("surrounding top-level agent tools")
|
||||
expect(partial).toContain("- search(input: {")
|
||||
expect(partial).toContain(" limit?: number,\n offset?: number,")
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@ describe("CodeModeInstructions", () => {
|
|||
it.effect("renders the initial catalog, semantic deltas, and removal", () =>
|
||||
Effect.gen(function* () {
|
||||
const initialized = yield* readInitial(CodeModeInstructions.make([echo]))
|
||||
expect(initialized.text).toContain(
|
||||
"This catalog is the complete set of tools available within Code Mode. Tools presented elsewhere are not available in this runtime.",
|
||||
)
|
||||
expect(initialized.text).toContain("## Available tools")
|
||||
expect(initialized.text).not.toContain("## Search")
|
||||
expect(initialized.text).toContain(` - ${echo.signature} // Echo text`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue