@openviking/opencode-plugin 2026.10.6-1 → 2026.10.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/lib/memory-session.mjs +14 -8
- package/package.json +2 -2
package/lib/memory-session.mjs
CHANGED
|
@@ -296,14 +296,20 @@ export function createMemorySessionManager({ config, pluginRoot }) {
|
|
|
296
296
|
const state = sessions.get(opencodeSessionId)
|
|
297
297
|
if (!state) return false
|
|
298
298
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
299
|
+
// Overlapping flushes of one session (e.g. session.idle and dispose) must
|
|
300
|
+
// not send the same pending messages twice.
|
|
301
|
+
const run = (state.flushChain ?? Promise.resolve()).then(async () => {
|
|
302
|
+
const added = await flushPendingMessages(opencodeSessionId, state)
|
|
303
|
+
if (commit && isCaptureEnabled(config)) {
|
|
304
|
+
await commitOvSession(state.ovSessionId, { force: true, reason })
|
|
305
|
+
} else if (added > 0) {
|
|
306
|
+
await maybeCommitByThreshold(state)
|
|
307
|
+
}
|
|
308
|
+
await enqueueSave()
|
|
309
|
+
return true
|
|
310
|
+
})
|
|
311
|
+
state.flushChain = run.catch(() => {})
|
|
312
|
+
return run
|
|
307
313
|
}
|
|
308
314
|
|
|
309
315
|
async function commitSession(sessionId, opencodeSessionId, abortSignal) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openviking/opencode-plugin",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.7",
|
|
4
4
|
"author": "@openviking",
|
|
5
5
|
"description": "Unified OpenCode plugin for OpenViking repository retrieval and long-term memory",
|
|
6
6
|
"type": "module",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"code-search"
|
|
47
47
|
],
|
|
48
48
|
"license": "Apache-2.0",
|
|
49
|
-
"openvikingSourceCommit": "
|
|
49
|
+
"openvikingSourceCommit": "9b9ac101f1c47a62c050a7d7bb372c6f36266302"
|
|
50
50
|
}
|