fix(core): raise the Code Mode tool summary limit to 500 characters (#64341)

This commit is contained in:
James Long
2026-11-16 21:27:56 -05:00
committed by GitHub
Unverified
parent a9e910d2d4
commit a0777f3182
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ export type Options = {
readonly budget?: number
}
const DESCRIPTION_LIMIT = 120
const DESCRIPTION_LIMIT = 500
const CHARACTERS_PER_TOKEN = 4
const INLINE_BUDGET = 2_000
+3 -3
View File
@@ -100,10 +100,10 @@ describe("CodeModeCatalog.summarize", () => {
expect(catalog.namespaces[0]?.entries[0]?.line).toEndWith("// Summary")
})
test("limits inline descriptions to 120 characters", () => {
const catalog = CodeModeCatalog.summarize({ tools: [entry("alpha.one", "x".repeat(121))] })
test("limits inline descriptions to 500 characters", () => {
const catalog = CodeModeCatalog.summarize({ tools: [entry("alpha.one", "x".repeat(501))] })
const description = catalog.namespaces[0]?.entries[0]?.line.split(" // ")[1]
expect(description).toHaveLength(120)
expect(description).toHaveLength(500)
expect(description).toEndWith("...")
})