fix(core): clarify empty Code Mode guidance (#38883)
This commit is contained in:
parent
02c66c5fc1
commit
cce8bb0e1c
3 changed files with 4 additions and 4 deletions
|
|
@ -18,7 +18,7 @@ Use \`search\` to discover exact paths and signatures for additional tools:
|
|||
|
||||
export function render(catalog: CodeModeCatalog.Summary) {
|
||||
if (catalog.total === 0)
|
||||
return "No Code Mode tools are currently available. Do not call `execute` until a later system update announces available tools."
|
||||
return "No Code Mode tools are currently available. Later Code Mode catalog updates may add or remove tools. Do not call `execute` unless there is at least one available Code Mode tool."
|
||||
|
||||
const tools = catalog.namespaces.flatMap((namespace) => {
|
||||
const count = namespace.count === 1 ? "1 tool" : `${namespace.count} tools`
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ describe("CodeModeInstructions.render", () => {
|
|||
|
||||
test("renders only the no-tools notice for an empty catalog", () => {
|
||||
expect(render([])).toBe(
|
||||
"No Code Mode tools are currently available. Do not call `execute` until a later system update announces available tools.",
|
||||
"No Code Mode tools are currently available. Later Code Mode catalog updates may add or remove tools. Do not call `execute` unless there is at least one available Code Mode tool.",
|
||||
)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ describe("CodeModeInstructions", () => {
|
|||
Effect.gen(function* () {
|
||||
const initialized = yield* readInitial(CodeModeInstructions.make([]))
|
||||
expect(initialized.text).toBe(
|
||||
"No Code Mode tools are currently available. Do not call `execute` until a later system update announces available tools.",
|
||||
"No Code Mode tools are currently available. Later Code Mode catalog updates may add or remove tools. Do not call `execute` unless there is at least one available Code Mode tool.",
|
||||
)
|
||||
|
||||
const added = yield* readUpdate(CodeModeInstructions.make([echo]), initialized)
|
||||
|
|
@ -35,7 +35,7 @@ describe("CodeModeInstructions", () => {
|
|||
expect(yield* readUpdate(CodeModeInstructions.make([]), { values: added.values })).toMatchObject({
|
||||
text:
|
||||
"The Code Mode tool catalog has changed. This catalog supersedes the previous Code Mode tool catalog.\n\n" +
|
||||
"No Code Mode tools are currently available. Do not call `execute` until a later system update announces available tools.",
|
||||
"No Code Mode tools are currently available. Later Code Mode catalog updates may add or remove tools. Do not call `execute` unless there is at least one available Code Mode tool.",
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue