@hyperdreamer/pi-webui 1.10.2 → 1.10.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/client/assets/{CodeViewer-BdULrLxb.js → CodeViewer-Ddszn9bT.js} +1 -1
- package/dist/client/assets/{UnifiedDiffViewer-DDlEJGJ4.js → UnifiedDiffViewer-BIR0ksAc.js} +1 -1
- package/dist/client/assets/{index-Bq-PmNe2.js → index-BB7O_b10.js} +427 -405
- package/dist/client/index.html +1 -1
- package/dist/pi-webui-plugins/workspace-memory/memoryPanelElement.js +45 -72
- package/dist/pi-webui-plugins/workspace-memory/pi-webui-plugin.js +13 -2
- package/dist/server/memory/memoryCatalog.js +34 -0
- package/dist/server/memory/memoryCatalog.js.map +1 -0
- package/dist/server/memory/memoryProvider.js +2 -0
- package/dist/server/memory/memoryProvider.js.map +1 -0
- package/dist/server/memory/memoryRoutes.js +21 -0
- package/dist/server/memory/memoryRoutes.js.map +1 -1
- package/dist/server/memory/memoryService.js +5 -35
- package/dist/server/memory/memoryService.js.map +1 -1
- package/dist/server/memory/piHermesMemoryProvider.js +118 -0
- package/dist/server/memory/piHermesMemoryProvider.js.map +1 -0
- package/dist/shared/apiTypes.d.ts +8 -0
- package/dist/shared/federatedRoutes.js +1 -0
- package/dist/shared/federatedRoutes.js.map +1 -1
- package/docs/plugins.md +2 -0
- package/package.json +1 -1
- package/dist/pi-webui-plugins/workspace-memory/memoryClient.js +0 -55
- package/dist/pi-webui-plugins/workspace-memory/memoryLoadController.js +0 -54
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// Generated from pi-webui-plugins/workspace-memory/memoryLoadController.ts. Do not edit directly.
|
|
2
|
-
const PROJECT_UNAVAILABLE_MESSAGE = "Project-specific memory could not be loaded.";
|
|
3
|
-
/** Coordinates independently fetched memory scopes and suppresses superseded loads. */
|
|
4
|
-
export class MemoryLoadController {
|
|
5
|
-
fetchers;
|
|
6
|
-
generation = 0;
|
|
7
|
-
constructor(fetchers) {
|
|
8
|
-
this.fetchers = fetchers;
|
|
9
|
-
}
|
|
10
|
-
async load(projectPath) {
|
|
11
|
-
const loadGeneration = ++this.generation;
|
|
12
|
-
const globalLoad = invokeFetcher(() => this.fetchers.fetchGlobalMemories());
|
|
13
|
-
const projectLoad = invokeFetcher(() => this.fetchers.fetchProjectMemories(projectPath))
|
|
14
|
-
.then((entries) => ({ kind: "available", entries }))
|
|
15
|
-
.catch(() => ({ kind: "unavailable" }));
|
|
16
|
-
let globalEntries;
|
|
17
|
-
try {
|
|
18
|
-
globalEntries = await globalLoad;
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
if (!this.isCurrent(loadGeneration))
|
|
22
|
-
return undefined;
|
|
23
|
-
return {
|
|
24
|
-
kind: "global-error",
|
|
25
|
-
message: error instanceof Error ? error.message : "Failed to load memories.",
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
const projectOutcome = await projectLoad;
|
|
29
|
-
if (!this.isCurrent(loadGeneration))
|
|
30
|
-
return undefined;
|
|
31
|
-
if (projectOutcome.kind === "unavailable") {
|
|
32
|
-
return {
|
|
33
|
-
kind: "loaded",
|
|
34
|
-
globalEntries,
|
|
35
|
-
projectEntries: [],
|
|
36
|
-
projectUnavailableMessage: PROJECT_UNAVAILABLE_MESSAGE,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
kind: "loaded",
|
|
41
|
-
globalEntries,
|
|
42
|
-
projectEntries: projectOutcome.entries,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
invalidate() {
|
|
46
|
-
this.generation += 1;
|
|
47
|
-
}
|
|
48
|
-
isCurrent(loadGeneration) {
|
|
49
|
-
return this.generation === loadGeneration;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
async function invokeFetcher(fetcher) {
|
|
53
|
-
return fetcher();
|
|
54
|
-
}
|