Skip to content

Commit 250103d

Browse files
authored
Merge branch 'dev' into bugfix-do-not-prune-pending-or-running-tool-inputs
2 parents 063a743 + 5c88b84 commit 250103d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

lib/state/state.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,20 @@ export async function ensureSessionInitialized(
8484
logger.info("session ID = " + sessionId)
8585
logger.info("Initializing session state", { sessionId: sessionId })
8686

87-
// Clear previous session data
8887
resetSessionState(state)
8988
state.sessionId = sessionId
9089

9190
const isSubAgent = await isSubAgentSession(client, sessionId)
9291
state.isSubAgent = isSubAgent
9392
logger.info("isSubAgent = " + isSubAgent)
9493

95-
// Load session data from storage
94+
state.lastCompaction = findLastCompactionTimestamp(messages)
95+
9696
const persisted = await loadSessionState(sessionId, logger)
9797
if (persisted === null) {
9898
return;
9999
}
100100

101-
// Populate state with loaded data
102101
state.prune = {
103102
toolIds: persisted.prune.toolIds || []
104103
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json.schemastore.org/package.json",
33
"name": "@tarquinen/opencode-dcp",
4-
"version": "1.0.2",
4+
"version": "1.0.3",
55
"type": "module",
66
"description": "OpenCode plugin that optimizes token usage by pruning obsolete tool outputs from conversation context",
77
"main": "./dist/index.js",

0 commit comments

Comments
 (0)