summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2026-04-09 23:11:09 -0500
committerAiden Cline <[email protected]>2026-04-09 23:11:09 -0500
commit9819eb04614fd607cacb07d754052f1531a82331 (patch)
tree48ca4a3515cddaa1087ec3d6de04b20ef9e9fdad
parentaa86fb75adb61cec725d3b2b26b574eb701008d7 (diff)
downloadopencode-9819eb04614fd607cacb07d754052f1531a82331.tar.gz
opencode-9819eb04614fd607cacb07d754052f1531a82331.zip
tweak: disable
-rw-r--r--packages/opencode/src/session/compaction.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/opencode/src/session/compaction.ts b/packages/opencode/src/session/compaction.ts
index 9ca98804d..6848ccf17 100644
--- a/packages/opencode/src/session/compaction.ts
+++ b/packages/opencode/src/session/compaction.ts
@@ -46,8 +46,7 @@ export namespace SessionCompaction {
}
function usable(input: { cfg: Config.Info; model: Provider.Model }) {
- const reserved =
- input.cfg.compaction?.reserved ?? Math.min(20_000, ProviderTransform.maxOutputTokens(input.model))
+ const reserved = input.cfg.compaction?.reserved ?? Math.min(20_000, ProviderTransform.maxOutputTokens(input.model))
return input.model.limit.input
? Math.max(0, input.model.limit.input - reserved)
: Math.max(0, input.model.limit.context - ProviderTransform.maxOutputTokens(input.model))
@@ -183,7 +182,7 @@ export namespace SessionCompaction {
// calls, then erases output of older tool calls to free context space
const prune = Effect.fn("SessionCompaction.prune")(function* (input: { sessionID: SessionID }) {
const cfg = yield* config.get()
- if (cfg.compaction?.prune === false) return
+ if (cfg.compaction?.prune !== true) return
log.info("pruning")
const msgs = yield* session