@lexwdex-org/opencode-dcp 3.4.5 → 3.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/commands/manual.d.ts.map +1 -1
- package/dist/lib/message-ids.d.ts.map +1 -1
- package/dist/lib/state/persistence.d.ts +1 -0
- package/dist/lib/state/persistence.d.ts.map +1 -1
- package/dist/lib/state/state.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1993,6 +1993,9 @@ function assignMessageRefs(state, messages) {
|
|
|
1993
1993
|
if (typeof rawMessageId !== "string" || rawMessageId.length === 0) {
|
|
1994
1994
|
continue;
|
|
1995
1995
|
}
|
|
1996
|
+
if (state.lastCompaction > 0 && message.info.time.created < state.lastCompaction && !state.messageIds.byRawId.has(rawMessageId)) {
|
|
1997
|
+
continue;
|
|
1998
|
+
}
|
|
1996
1999
|
const existingRef = state.messageIds.byRawId.get(rawMessageId);
|
|
1997
2000
|
if (existingRef) {
|
|
1998
2001
|
if (state.messageIds.byRef.get(existingRef) !== rawMessageId) {
|
|
@@ -2976,6 +2979,7 @@ async function saveSessionState(sessionState, logger, sessionName) {
|
|
|
2976
2979
|
}
|
|
2977
2980
|
const state = {
|
|
2978
2981
|
sessionName,
|
|
2982
|
+
manualMode: !!sessionState.manualMode,
|
|
2979
2983
|
prune: {
|
|
2980
2984
|
tools: Object.fromEntries(sessionState.prune.tools),
|
|
2981
2985
|
messages: serializePruneMessagesState(sessionState.prune.messages)
|
|
@@ -3265,6 +3269,9 @@ async function ensureSessionInitialized(client, state, sessionId, logger, messag
|
|
|
3265
3269
|
if (persisted === null) {
|
|
3266
3270
|
return;
|
|
3267
3271
|
}
|
|
3272
|
+
if (typeof persisted.manualMode === "boolean") {
|
|
3273
|
+
state.manualMode = persisted.manualMode ? "active" : false;
|
|
3274
|
+
}
|
|
3268
3275
|
state.prune.tools = loadPruneMap(persisted.prune.tools);
|
|
3269
3276
|
state.prune.messages = loadPruneMessagesState(persisted.prune.messages);
|
|
3270
3277
|
state.nudges.contextLimitAnchors = new Set(persisted.nudges.contextLimitAnchors || []);
|
|
@@ -7301,6 +7308,7 @@ async function handleManualToggleCommand(ctx, modeArg) {
|
|
|
7301
7308
|
} else {
|
|
7302
7309
|
state.manualMode = state.manualMode ? false : "active";
|
|
7303
7310
|
}
|
|
7311
|
+
await saveSessionState(state, logger);
|
|
7304
7312
|
const params = getCurrentParams(state, messages, logger);
|
|
7305
7313
|
await sendIgnoredMessage(
|
|
7306
7314
|
client,
|