File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/opencode/src/session Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export namespace SessionCompaction {
2929
3030 export async function isOverflow ( input : { tokens : MessageV2 . Assistant [ "tokens" ] ; model : Provider . Model } ) {
3131 const config = await Config . get ( )
32- if ( ( config . compaction ?. auto ?? true ) === false ) return false
32+ if ( config . compaction ?. auto === false ) return false
3333 const context = input . model . limit . context
3434 if ( context === 0 ) return false
3535 const count = input . tokens . input + input . tokens . cache . read + input . tokens . output
@@ -48,7 +48,7 @@ export namespace SessionCompaction {
4848 // tool calls that are no longer relevant.
4949 export async function prune ( input : { sessionID : string } ) {
5050 const config = await Config . get ( )
51- if ( ( config . compaction ?. prune ?? true ) === false ) return
51+ if ( config . compaction ?. prune === false ) return
5252 log . info ( "pruning" )
5353 const msgs = await Session . messages ( { sessionID : input . sessionID } )
5454 let total = 0
You can’t perform that action at this time.
0 commit comments