mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-20 18:57:17 +03:00
fix(core): raise the Code Mode tool summary limit to 500 characters (#64341)
This commit is contained in:
committed by
GitHub
Unverified
parent
a9e910d2d4
commit
a0777f3182
@@ -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
|
||||
|
||||
|
||||
@@ -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("...")
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user