Skip to content

Commit e2cb885

Browse files
committed
cleanup: remove unused lastToolPrune
1 parent 3684485 commit e2cb885

File tree

4 files changed

+0
-10
lines changed

4 files changed

+0
-10
lines changed

lib/state/state.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export function createSessionState(): SessionState {
7676
},
7777
toolParameters: new Map<string, ToolParameterEntry>(),
7878
toolIdList: [],
79-
lastToolPrune: false,
8079
lastCompaction: 0,
8180
currentTurn: 0,
8281
variant: undefined,
@@ -102,7 +101,6 @@ export function resetSessionState(state: SessionState): void {
102101
}
103102
state.toolParameters.clear()
104103
state.toolIdList = []
105-
state.lastToolPrune = false
106104
state.lastCompaction = 0
107105
state.currentTurn = 0
108106
state.variant = undefined

lib/state/tool-cache.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ export function syncToolCache(
4343
turnProtectionTurns > 0 &&
4444
state.currentTurn - turnCounter < turnProtectionTurns
4545

46-
if (part.tool === "compress") {
47-
state.lastToolPrune = true
48-
} else {
49-
state.lastToolPrune = false
50-
}
51-
5246
if (state.toolParameters.has(part.callID)) {
5347
continue
5448
}

lib/state/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export interface SessionState {
4747
stats: SessionStats
4848
toolParameters: Map<string, ToolParameterEntry>
4949
toolIdList: string[]
50-
lastToolPrune: boolean
5150
lastCompaction: number
5251
currentTurn: number
5352
variant: string | undefined

lib/state/utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,4 @@ export function resetOnCompaction(state: SessionState): void {
5151
state.prune.messages = new Map<string, number>()
5252
state.compressSummaries = []
5353
state.contextLimitAnchors = new Set<string>()
54-
state.lastToolPrune = false
5554
}

0 commit comments

Comments
 (0)