Skip to content

Commit 9819eb0

Browse files
committed
tweak: disable
1 parent aa86fb7 commit 9819eb0

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/opencode/src/session/compaction.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ export namespace SessionCompaction {
4646
}
4747

4848
function usable(input: { cfg: Config.Info; model: Provider.Model }) {
49-
const reserved =
50-
input.cfg.compaction?.reserved ?? Math.min(20_000, ProviderTransform.maxOutputTokens(input.model))
49+
const reserved = input.cfg.compaction?.reserved ?? Math.min(20_000, ProviderTransform.maxOutputTokens(input.model))
5150
return input.model.limit.input
5251
? Math.max(0, input.model.limit.input - reserved)
5352
: Math.max(0, input.model.limit.context - ProviderTransform.maxOutputTokens(input.model))
@@ -183,7 +182,7 @@ export namespace SessionCompaction {
183182
// calls, then erases output of older tool calls to free context space
184183
const prune = Effect.fn("SessionCompaction.prune")(function* (input: { sessionID: SessionID }) {
185184
const cfg = yield* config.get()
186-
if (cfg.compaction?.prune === false) return
185+
if (cfg.compaction?.prune !== true) return
187186
log.info("pruning")
188187

189188
const msgs = yield* session

0 commit comments

Comments
 (0)