opencode-fractal-memory 0.6.2 → 0.6.3
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/plugin/index.js +0 -18
- package/package.json +1 -1
package/dist/plugin/index.js
CHANGED
|
@@ -2,23 +2,6 @@ import { initStorage, loadPluginConfig, seedRuleNodes, backfillData, scheduleBac
|
|
|
2
2
|
import { createHookHandlers } from "./hooks";
|
|
3
3
|
import { createToolMap } from "./tools";
|
|
4
4
|
import { memLog, perfNow } from "../logging";
|
|
5
|
-
import { VERSION } from "../version";
|
|
6
|
-
function showToast(serverUrl, version) {
|
|
7
|
-
setTimeout(() => {
|
|
8
|
-
const url = `${serverUrl.origin}/tui/show-toast`;
|
|
9
|
-
fetch(url, {
|
|
10
|
-
method: "POST",
|
|
11
|
-
headers: { "Content-Type": "application/json" },
|
|
12
|
-
body: JSON.stringify({
|
|
13
|
-
title: "Fractal Memory",
|
|
14
|
-
message: `v${version} loaded`,
|
|
15
|
-
variant: "info",
|
|
16
|
-
}),
|
|
17
|
-
}).catch((err) => {
|
|
18
|
-
memLog("warn", "init", "Toast notification failed", { error: String(err), serverUrl: serverUrl.origin });
|
|
19
|
-
});
|
|
20
|
-
}, 2000);
|
|
21
|
-
}
|
|
22
5
|
export const MemoryPlugin = async (ctx) => {
|
|
23
6
|
const { directory, client } = ctx;
|
|
24
7
|
const t0 = perfNow();
|
|
@@ -52,7 +35,6 @@ export const MemoryPlugin = async (ctx) => {
|
|
|
52
35
|
const handlers = createHookHandlers(store, client, memConfig, ruleCache, ruleCacheDirty, sessionInjectionLock, latestUserMessage);
|
|
53
36
|
const toolMap = createToolMap(store, journalTools, client);
|
|
54
37
|
memLog("info", "init", "Plugin initialization completed", { totalDurationMs: perfNow() - t0 });
|
|
55
|
-
showToast(ctx.serverUrl, VERSION);
|
|
56
38
|
return {
|
|
57
39
|
...handlers,
|
|
58
40
|
...(autoRetrieveHook || {}),
|