dsh-mnemon 0.5.20 → 0.5.22
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/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/lib/bundle.js +1 -1
- package/lib/client.js +174 -19
- package/lib/index.js +377 -64
- package/lib/{starter-resolution-Dgz1uPrs.js → starter-resolution-BJPNaa9v.js} +2 -2
- package/lib/starter.js +1 -1
- package/lib/types/src/client/locales.d.ts +7 -0
- package/lib/types/src/host/protocol.d.ts +24 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ npx @deepseek-ai/dsh web
|
|
|
92
92
|
4. For Memory Spaces, install the Mnemon CLI for Mnemon Native with `npm install --global @mnemon-dev/mnemon`, or enable another Provider on the Memory Spaces page.
|
|
93
93
|
5. Choose the main strategy and enhancements under **Plugins → dsh-mnemon**.
|
|
94
94
|
|
|
95
|
-
dsh-mnemon supports DSH `0.
|
|
95
|
+
dsh-mnemon supports DSH `0.2.0-rc.2` (npm `latest` and `next`) and `0.1.7-rc.2`. The same package serves the desktop app's Plugins page, `dsh plugin --profile web add dsh-mnemon` on the command line, and Headless with `dsh plugin --profile headless add dsh-mnemon`; keep `v0.5.16` on older hosts. [Getting started](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/en/guides/getting-started.md) continues from here, and [compatibility and upgrades](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/en/reference/compatibility.md) covers existing installations.
|
|
96
96
|
|
|
97
97
|
## How it works
|
|
98
98
|
|
package/README.zh-CN.md
CHANGED
|
@@ -93,7 +93,7 @@ npx @deepseek-ai/dsh web
|
|
|
93
93
|
4. 使用记忆空间时,可用 `npm install --global @mnemon-dev/mnemon` 安装 Mnemon Native 所需的 CLI,或在记忆空间页面启用其他 Provider。
|
|
94
94
|
5. 在**插件 → 可组合记忆**中选择主策略与增强。
|
|
95
95
|
|
|
96
|
-
dsh-mnemon 支持 DSH `0.
|
|
96
|
+
dsh-mnemon 支持 DSH `0.2.0-rc.2`(npm `latest` 与 `next`)与 `0.1.7-rc.2`。同一个包也用于桌面版的插件页、命令行 `dsh plugin --profile web add dsh-mnemon`,以及 Headless:`dsh plugin --profile headless add dsh-mnemon`;更早的宿主请继续使用 `v0.5.16`。接下来可以看[快速开始](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/zh-CN/guides/getting-started.md),已有安装的升级见[兼容性与升级](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/zh-CN/reference/compatibility.md)。
|
|
97
97
|
|
|
98
98
|
## 工作原理
|
|
99
99
|
|
package/lib/bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as prepareStarterResolution } from "./starter-resolution-
|
|
1
|
+
import { t as prepareStarterResolution } from "./starter-resolution-BJPNaa9v.js";
|
|
2
2
|
//#region src/bundle.ts
|
|
3
3
|
const groupKey = Symbol.for("cordis.group");
|
|
4
4
|
const init = Symbol.for("cordis.init");
|
package/lib/client.js
CHANGED
|
@@ -47,6 +47,7 @@ window.__ModuleLoader__.load({
|
|
|
47
47
|
}
|
|
48
48
|
const DEFAULT_IDLE_REVIEW = {
|
|
49
49
|
enabled: true,
|
|
50
|
+
runtimeMemory: true,
|
|
50
51
|
provider: "spawn",
|
|
51
52
|
fallback: "spawn",
|
|
52
53
|
agentTeams: "pause",
|
|
@@ -1763,6 +1764,8 @@ window.__ModuleLoader__.load({
|
|
|
1763
1764
|
"config.reviewTitle": "空闲审查",
|
|
1764
1765
|
"config.reviewDescription": "对话空闲时整理记忆;关闭不影响召回与写入",
|
|
1765
1766
|
"config.reviewEnabled": "启用空闲审查",
|
|
1767
|
+
"config.reviewRuntimeMemory": "写入运行时记忆",
|
|
1768
|
+
"config.reviewRuntimeMemoryHint": "只记你明确说过的偏好和规则;关闭后只建项目档案",
|
|
1766
1769
|
"config.reviewLimits": "审查参数",
|
|
1767
1770
|
"config.reviewProvider": "审查方式",
|
|
1768
1771
|
"config.reviewSpawn": "有界检查点(spawn)",
|
|
@@ -1851,7 +1854,7 @@ window.__ModuleLoader__.load({
|
|
|
1851
1854
|
"versions.packagesOutdated": "{count} 个有新版本",
|
|
1852
1855
|
"versions.packagesDetail": "展开查看维护方式",
|
|
1853
1856
|
"versions.packagesHide": "收起子包详情",
|
|
1854
|
-
"versions.packagesHint": "默认组合随主包更新;在当前 Profile 中独立安装的子包可单独更新。更新后重启
|
|
1857
|
+
"versions.packagesHint": "默认组合随主包更新;在当前 Profile 中独立安装的子包可单独更新。更新后重启 DSH。",
|
|
1855
1858
|
"versions.managedStarter": "随主包维护",
|
|
1856
1859
|
"versions.managedProfile": "Profile 独立维护",
|
|
1857
1860
|
"versions.starterVersion": "主包指定",
|
|
@@ -1877,7 +1880,11 @@ window.__ModuleLoader__.load({
|
|
|
1877
1880
|
"versions.updating": "更新中…",
|
|
1878
1881
|
"versions.updated": "{name} 已更新",
|
|
1879
1882
|
"versions.alreadyCurrent": "当前已经是最新版本",
|
|
1880
|
-
"versions.restartRequired": "请重启
|
|
1883
|
+
"versions.restartRequired": "请重启 DSH 以加载新的 dsh-mnemon 插件代码;桌面版请完全退出后重新打开。",
|
|
1884
|
+
"versions.pendingInstalledTitle": "dsh-mnemon {version} 已安装",
|
|
1885
|
+
"versions.pendingInstalledDetail": "当前运行的仍是 {running};重启 DSH 后生效,桌面版请完全退出后重新打开。",
|
|
1886
|
+
"versions.pendingPackagesTitle": "{names} 已更新",
|
|
1887
|
+
"versions.pendingPackagesDetail": "重启 DSH 后生效,桌面版请完全退出后重新打开。",
|
|
1881
1888
|
"versions.checkedAt": "检查于 {time}",
|
|
1882
1889
|
"versions.latestUnavailable": "暂时无法读取远程最新版本;请检查网络后重试。",
|
|
1883
1890
|
"versions.modeHomebrew": "Homebrew",
|
|
@@ -1889,8 +1896,9 @@ window.__ModuleLoader__.load({
|
|
|
1889
1896
|
"versions.hintHomebrew": "由 Homebrew 管理;发现新版本时可在此安全更新。",
|
|
1890
1897
|
"versions.hintBrewMissing": "检测到 Homebrew 安装,但当前找不到 brew 命令。",
|
|
1891
1898
|
"versions.hintGo": "由 go install 管理;发现新版本时可在此安全更新。",
|
|
1892
|
-
"versions.
|
|
1893
|
-
"versions.
|
|
1899
|
+
"versions.hintDsh": "由当前 DSH Profile 管理;用 DSH 自己的插件安装方式更新,完成后重启 DSH。",
|
|
1900
|
+
"versions.hintPnpm": "由当前 DSH Profile 管理;更新后需要重启 DSH。",
|
|
1901
|
+
"versions.hintPnpmMissing": "检测到 DSH Profile 安装,但宿主找不到 pnpm 命令;安装 pnpm 并重启 DSH 后即可在此更新。",
|
|
1894
1902
|
"versions.hintLink": "当前为本地 Link 开发版本;请在源码目录拉取并构建,避免覆盖本地修改。",
|
|
1895
1903
|
"versions.hintInstall": "未安装 Mnemon CLI。只有 Mnemon Native 需要它;需要时安装并确保 mnemon 位于 PATH,或设置 MNEMON_CLI_PATH / mnemon.cliPath。",
|
|
1896
1904
|
"versions.hintManual": "无法安全识别安装来源;请沿用原安装方式手工更新。",
|
|
@@ -2352,6 +2360,8 @@ window.__ModuleLoader__.load({
|
|
|
2352
2360
|
"config.reviewTitle": "Idle review",
|
|
2353
2361
|
"config.reviewDescription": "Tidies memory while the conversation is idle; recall and writes work either way",
|
|
2354
2362
|
"config.reviewEnabled": "Enable idle review",
|
|
2363
|
+
"config.reviewRuntimeMemory": "Write runtime memory",
|
|
2364
|
+
"config.reviewRuntimeMemoryHint": "Only preferences and rules you stated; when off, review creates Documents only",
|
|
2355
2365
|
"config.reviewLimits": "Review limits",
|
|
2356
2366
|
"config.reviewProvider": "Review method",
|
|
2357
2367
|
"config.reviewSpawn": "Bounded checkpoint (spawn)",
|
|
@@ -2440,7 +2450,7 @@ window.__ModuleLoader__.load({
|
|
|
2440
2450
|
"versions.packagesOutdated": "{count} updates available",
|
|
2441
2451
|
"versions.packagesDetail": "Expand for maintenance options",
|
|
2442
2452
|
"versions.packagesHide": "Collapse package details",
|
|
2443
|
-
"versions.packagesHint": "Default packages update with the Starter. Packages installed independently in this Profile can update individually. Restart
|
|
2453
|
+
"versions.packagesHint": "Default packages update with the Starter. Packages installed independently in this Profile can update individually. Restart DSH afterward.",
|
|
2444
2454
|
"versions.managedStarter": "Maintained with Starter",
|
|
2445
2455
|
"versions.managedProfile": "Managed by Profile",
|
|
2446
2456
|
"versions.starterVersion": "Starter pin",
|
|
@@ -2466,7 +2476,11 @@ window.__ModuleLoader__.load({
|
|
|
2466
2476
|
"versions.updating": "Updating…",
|
|
2467
2477
|
"versions.updated": "{name} updated",
|
|
2468
2478
|
"versions.alreadyCurrent": "Already on the latest version",
|
|
2469
|
-
"versions.restartRequired": "Restart
|
|
2479
|
+
"versions.restartRequired": "Restart DSH to load the new dsh-mnemon plugin code; in the desktop app, quit and reopen it.",
|
|
2480
|
+
"versions.pendingInstalledTitle": "dsh-mnemon {version} is installed",
|
|
2481
|
+
"versions.pendingInstalledDetail": "This Host still runs {running}. Restart DSH to load it; in the desktop app, quit and reopen it.",
|
|
2482
|
+
"versions.pendingPackagesTitle": "{names} updated",
|
|
2483
|
+
"versions.pendingPackagesDetail": "Restart DSH to load the update; in the desktop app, quit and reopen it.",
|
|
2470
2484
|
"versions.checkedAt": "Checked at {time}",
|
|
2471
2485
|
"versions.latestUnavailable": "The remote latest version is unavailable. Check the network and try again.",
|
|
2472
2486
|
"versions.modeHomebrew": "Homebrew",
|
|
@@ -2478,8 +2492,9 @@ window.__ModuleLoader__.load({
|
|
|
2478
2492
|
"versions.hintHomebrew": "Managed by Homebrew; an available release can be safely updated here.",
|
|
2479
2493
|
"versions.hintBrewMissing": "A Homebrew installation was detected, but the brew command is unavailable.",
|
|
2480
2494
|
"versions.hintGo": "Managed by go install; an available release can be safely updated here.",
|
|
2481
|
-
"versions.
|
|
2482
|
-
"versions.
|
|
2495
|
+
"versions.hintDsh": "Managed by the current DSH Profile. Updates use DSH's own plugin installer; restart DSH afterwards.",
|
|
2496
|
+
"versions.hintPnpm": "Managed by the current DSH Profile; restart DSH after updating.",
|
|
2497
|
+
"versions.hintPnpmMissing": "A DSH Profile installation was detected, but the Host cannot find the pnpm command. Install pnpm and restart DSH to update here.",
|
|
2483
2498
|
"versions.hintLink": "This is a local linked development build. Pull and build in the source directory to preserve local changes.",
|
|
2484
2499
|
"versions.hintInstall": "Mnemon CLI is not installed. Only Mnemon Native needs it; to use Native, install it and place mnemon on PATH, or set MNEMON_CLI_PATH / mnemon.cliPath.",
|
|
2485
2500
|
"versions.hintManual": "The installation source cannot be identified safely. Update it using the original installation method.",
|
|
@@ -7818,6 +7833,7 @@ window.__ModuleLoader__.load({
|
|
|
7818
7833
|
}
|
|
7819
7834
|
const choiceOf = (review) => ({
|
|
7820
7835
|
enabled: review.enabled,
|
|
7836
|
+
runtimeMemory: review.runtimeMemory,
|
|
7821
7837
|
provider: review.provider,
|
|
7822
7838
|
fallback: review.fallback,
|
|
7823
7839
|
agentTeams: review.agentTeams
|
|
@@ -8126,6 +8142,14 @@ window.__ModuleLoader__.load({
|
|
|
8126
8142
|
disabled: props.disabled,
|
|
8127
8143
|
onChange: (enabled) => props.onChoice({ enabled })
|
|
8128
8144
|
}), choice.enabled && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
8145
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, {
|
|
8146
|
+
id: "mnemon-review-runtime-memory",
|
|
8147
|
+
label: t("config.reviewRuntimeMemory"),
|
|
8148
|
+
hint: t("config.reviewRuntimeMemoryHint"),
|
|
8149
|
+
checked: choice.runtimeMemory,
|
|
8150
|
+
disabled: props.disabled,
|
|
8151
|
+
onChange: (runtimeMemory) => props.onChoice({ runtimeMemory })
|
|
8152
|
+
}),
|
|
8129
8153
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, {
|
|
8130
8154
|
id: "mnemon-review-provider",
|
|
8131
8155
|
label: t("config.reviewProvider"),
|
|
@@ -8924,6 +8948,74 @@ window.__ModuleLoader__.load({
|
|
|
8924
8948
|
}
|
|
8925
8949
|
};
|
|
8926
8950
|
//#endregion
|
|
8951
|
+
//#region src/client/starter-update.ts
|
|
8952
|
+
const STORAGE_KEY = "dsh-mnemon.starter-update";
|
|
8953
|
+
/** An older record belongs to an earlier visit, not to an update this page just ran. */
|
|
8954
|
+
const FRESH_MS = 6e5;
|
|
8955
|
+
function sessionStore() {
|
|
8956
|
+
try {
|
|
8957
|
+
return typeof window === "undefined" ? void 0 : window.sessionStorage;
|
|
8958
|
+
} catch {
|
|
8959
|
+
return;
|
|
8960
|
+
}
|
|
8961
|
+
}
|
|
8962
|
+
function recordStarterUpdate(update, now = Date.now()) {
|
|
8963
|
+
const record = {
|
|
8964
|
+
at: now,
|
|
8965
|
+
...update.from === void 0 ? {} : { from: update.from },
|
|
8966
|
+
...update.to === void 0 ? {} : { to: update.to }
|
|
8967
|
+
};
|
|
8968
|
+
try {
|
|
8969
|
+
sessionStore()?.setItem(STORAGE_KEY, JSON.stringify(record));
|
|
8970
|
+
} catch {}
|
|
8971
|
+
}
|
|
8972
|
+
function clearStarterUpdate() {
|
|
8973
|
+
try {
|
|
8974
|
+
sessionStore()?.removeItem(STORAGE_KEY);
|
|
8975
|
+
} catch {}
|
|
8976
|
+
}
|
|
8977
|
+
function pendingStarterUpdate(now = Date.now()) {
|
|
8978
|
+
let raw;
|
|
8979
|
+
try {
|
|
8980
|
+
raw = sessionStore()?.getItem(STORAGE_KEY);
|
|
8981
|
+
} catch {
|
|
8982
|
+
return;
|
|
8983
|
+
}
|
|
8984
|
+
if (raw === null || raw === void 0) return void 0;
|
|
8985
|
+
let value;
|
|
8986
|
+
try {
|
|
8987
|
+
value = JSON.parse(raw);
|
|
8988
|
+
} catch {
|
|
8989
|
+
value = void 0;
|
|
8990
|
+
}
|
|
8991
|
+
if (!isRecord(value) || typeof value.at !== "number" || now - value.at > FRESH_MS || value.at > now + 6e4) {
|
|
8992
|
+
clearStarterUpdate();
|
|
8993
|
+
return;
|
|
8994
|
+
}
|
|
8995
|
+
return {
|
|
8996
|
+
at: value.at,
|
|
8997
|
+
...typeof value.from === "string" ? { from: value.from } : {},
|
|
8998
|
+
...typeof value.to === "string" ? { to: value.to } : {}
|
|
8999
|
+
};
|
|
9000
|
+
}
|
|
9001
|
+
/** Open the Memory System once it can open, when this page just started a Starter update. */
|
|
9002
|
+
function reopenAfterStarterUpdate(workspace) {
|
|
9003
|
+
if (pendingStarterUpdate() === void 0) return () => {};
|
|
9004
|
+
let unsubscribe;
|
|
9005
|
+
const attempt = () => {
|
|
9006
|
+
const open = workspace.getSnapshot();
|
|
9007
|
+
if (open === void 0) return;
|
|
9008
|
+
unsubscribe?.();
|
|
9009
|
+
unsubscribe = void 0;
|
|
9010
|
+
if (pendingStarterUpdate() !== void 0) open();
|
|
9011
|
+
};
|
|
9012
|
+
unsubscribe = workspace.subscribe(attempt);
|
|
9013
|
+
attempt();
|
|
9014
|
+
return () => {
|
|
9015
|
+
unsubscribe?.();
|
|
9016
|
+
};
|
|
9017
|
+
}
|
|
9018
|
+
//#endregion
|
|
8927
9019
|
//#region src/client/change-signal.ts
|
|
8928
9020
|
/**
|
|
8929
9021
|
* A revision other surfaces bump when something they cannot observe directly
|
|
@@ -9219,6 +9311,7 @@ window.__ModuleLoader__.load({
|
|
|
9219
9311
|
if (component.updateHint === "brew") return t("versions.hintHomebrew");
|
|
9220
9312
|
if (component.updateHint === "brew-missing") return t("versions.hintBrewMissing");
|
|
9221
9313
|
if (component.updateHint === "go") return t("versions.hintGo");
|
|
9314
|
+
if (component.updateHint === "dsh") return t("versions.hintDsh");
|
|
9222
9315
|
if (component.updateHint === "pnpm") return t("versions.hintPnpm");
|
|
9223
9316
|
if (component.updateHint === "pnpm-missing") return t("versions.hintPnpmMissing");
|
|
9224
9317
|
if (component.updateHint === "link") return t("versions.hintLink");
|
|
@@ -9339,20 +9432,41 @@ window.__ModuleLoader__.load({
|
|
|
9339
9432
|
setUpdating(component.id);
|
|
9340
9433
|
setError(null);
|
|
9341
9434
|
setResult(null);
|
|
9435
|
+
if (component.id === "dsh-mnemon") recordStarterUpdate({
|
|
9436
|
+
from: component.current,
|
|
9437
|
+
to: component.latest
|
|
9438
|
+
});
|
|
9342
9439
|
try {
|
|
9343
9440
|
const next = await props.client.updateVersion(component.id);
|
|
9344
9441
|
setResult(next);
|
|
9345
9442
|
await check();
|
|
9346
9443
|
props.onRefreshStatus();
|
|
9347
9444
|
} catch (reason) {
|
|
9445
|
+
if (component.id === "dsh-mnemon") clearStarterUpdate();
|
|
9348
9446
|
setError(message(reason));
|
|
9349
9447
|
} finally {
|
|
9350
9448
|
setUpdating(null);
|
|
9351
9449
|
updateInFlight.current = false;
|
|
9352
9450
|
}
|
|
9353
9451
|
};
|
|
9452
|
+
const close = () => {
|
|
9453
|
+
clearStarterUpdate();
|
|
9454
|
+
props.onClose();
|
|
9455
|
+
};
|
|
9354
9456
|
const updatingBusy = updating !== null;
|
|
9355
9457
|
const controlsBusy = checking || updatingBusy;
|
|
9458
|
+
const resumed = props.resumedUpdate;
|
|
9459
|
+
const starter = snapshot?.components.find((component) => component.id === "dsh-mnemon");
|
|
9460
|
+
const outcome = result === null && error === null && resumed !== void 0 && snapshot?.lastUpdate?.component === "dsh-mnemon" && Date.parse(snapshot.lastUpdate.at) >= resumed.at - 6e4 ? snapshot.lastUpdate : void 0;
|
|
9461
|
+
const resumedResult = outcome !== void 0 ? outcome.result ?? null : result === null && resumed !== void 0 && snapshot?.lastUpdate === void 0 && starter?.restartRequired === true && (resumed.to === void 0 || starter.current === resumed.to) ? {
|
|
9462
|
+
component: "dsh-mnemon",
|
|
9463
|
+
updated: true,
|
|
9464
|
+
restartRequired: true,
|
|
9465
|
+
...resumed.from === void 0 ? {} : { previousVersion: resumed.from },
|
|
9466
|
+
...starter.current === void 0 ? {} : { currentVersion: starter.current }
|
|
9467
|
+
} : null;
|
|
9468
|
+
const shownResult = result ?? resumedResult;
|
|
9469
|
+
const shownError = error ?? outcome?.error ?? null;
|
|
9356
9470
|
const updateButton = (component) => props.writeEnabled && component.outdated && component.updateSupported && component.checkError === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
9357
9471
|
type: "button",
|
|
9358
9472
|
className: MnemonView_module_css_default.primaryButton,
|
|
@@ -9405,7 +9519,7 @@ window.__ModuleLoader__.load({
|
|
|
9405
9519
|
description: t("versions.description"),
|
|
9406
9520
|
busy: updatingBusy,
|
|
9407
9521
|
contentReady: !checking,
|
|
9408
|
-
onClose:
|
|
9522
|
+
onClose: close,
|
|
9409
9523
|
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
9410
9524
|
className: MnemonView_module_css_default.modalFooterMeta,
|
|
9411
9525
|
children: snapshot === null ? "" : t("versions.checkedAt", { time: new Date(snapshot.checkedAt).toLocaleTimeString() })
|
|
@@ -9423,7 +9537,7 @@ window.__ModuleLoader__.load({
|
|
|
9423
9537
|
"data-dialog-close": true,
|
|
9424
9538
|
className: MnemonView_module_css_default.secondaryButton,
|
|
9425
9539
|
disabled: updatingBusy,
|
|
9426
|
-
onClick:
|
|
9540
|
+
onClick: close,
|
|
9427
9541
|
children: t("common.close")
|
|
9428
9542
|
})]
|
|
9429
9543
|
})] }),
|
|
@@ -9435,19 +9549,19 @@ window.__ModuleLoader__.load({
|
|
|
9435
9549
|
role: "status",
|
|
9436
9550
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}), t("versions.checking")]
|
|
9437
9551
|
}),
|
|
9438
|
-
|
|
9552
|
+
shownError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9439
9553
|
className: MnemonView_module_css_default.versionError,
|
|
9440
9554
|
role: "alert",
|
|
9441
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("versions.failed") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children:
|
|
9555
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("versions.failed") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: shownError })]
|
|
9442
9556
|
}),
|
|
9443
9557
|
!props.writeEnabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
9444
9558
|
className: MnemonView_module_css_default.versionNotice,
|
|
9445
9559
|
children: t("versions.readOnly")
|
|
9446
9560
|
}),
|
|
9447
|
-
|
|
9561
|
+
shownResult !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9448
9562
|
className: MnemonView_module_css_default.versionResult,
|
|
9449
9563
|
role: "status",
|
|
9450
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children:
|
|
9564
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: shownResult.updated ? t("versions.updated", { name: shownResult.component === "mnemon" ? "Mnemon CLI" : shownResult.component }) : t("versions.alreadyCurrent") }), shownResult.restartRequired && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("versions.restartRequired") })]
|
|
9451
9565
|
}),
|
|
9452
9566
|
snapshot !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9453
9567
|
className: MnemonView_module_css_default.versionList,
|
|
@@ -9973,8 +10087,19 @@ window.__ModuleLoader__.load({
|
|
|
9973
10087
|
}
|
|
9974
10088
|
function StatusPage(props) {
|
|
9975
10089
|
const t = useT();
|
|
10090
|
+
const [resumedUpdate, setResumedUpdate] = (0, react.useState)(() => pendingStarterUpdate());
|
|
9976
10091
|
const [versionsOpen, setVersionsOpen] = (0, react.useState)(false);
|
|
9977
10092
|
const status = props.status;
|
|
10093
|
+
const answered = status !== null || !props.loading;
|
|
10094
|
+
(0, react.useEffect)(() => {
|
|
10095
|
+
if (resumedUpdate === void 0 || !answered) return;
|
|
10096
|
+
if (status !== null && status.restartPending === void 0 && resumedUpdate.to !== void 0 && status.dshMnemonVersion === resumedUpdate.to) {
|
|
10097
|
+
clearStarterUpdate();
|
|
10098
|
+
setResumedUpdate(void 0);
|
|
10099
|
+
return;
|
|
10100
|
+
}
|
|
10101
|
+
setVersionsOpen(true);
|
|
10102
|
+
}, [answered]);
|
|
9978
10103
|
const reviewError = status?.lifecycle?.current?.lastError;
|
|
9979
10104
|
const storage = status?.storage;
|
|
9980
10105
|
const selectedScopeKind = storage?.activeKind ?? "global";
|
|
@@ -10042,12 +10167,32 @@ window.__ModuleLoader__.load({
|
|
|
10042
10167
|
versionsOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VersionDialog, {
|
|
10043
10168
|
client: props.client,
|
|
10044
10169
|
writeEnabled: props.writeEnabled,
|
|
10045
|
-
|
|
10170
|
+
resumedUpdate,
|
|
10171
|
+
onClose: () => {
|
|
10172
|
+
setResumedUpdate(void 0);
|
|
10173
|
+
setVersionsOpen(false);
|
|
10174
|
+
},
|
|
10046
10175
|
onRefreshStatus: props.onRefresh
|
|
10047
10176
|
})
|
|
10048
10177
|
]
|
|
10049
10178
|
});
|
|
10050
10179
|
}
|
|
10180
|
+
/**
|
|
10181
|
+
* An installed update waits for DSH to restart: the Host keeps the code it loaded, while DSH has
|
|
10182
|
+
* already swapped in this page. Every Memory System page says so until the restart.
|
|
10183
|
+
*/
|
|
10184
|
+
function RestartReminder({ pending }) {
|
|
10185
|
+
const t = useT();
|
|
10186
|
+
return pending.installed !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Callout, {
|
|
10187
|
+
tone: "warning",
|
|
10188
|
+
title: t("versions.pendingInstalledTitle", { version: pending.installed }),
|
|
10189
|
+
children: t("versions.pendingInstalledDetail", { running: pending.running })
|
|
10190
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Callout, {
|
|
10191
|
+
tone: "warning",
|
|
10192
|
+
title: t("versions.pendingPackagesTitle", { names: (pending.packages ?? []).join(t("config.listSeparator")) }),
|
|
10193
|
+
children: t("versions.pendingPackagesDetail")
|
|
10194
|
+
});
|
|
10195
|
+
}
|
|
10051
10196
|
/** Mnemon Native is one Provider among peers: it has a health card once its CLI is installed or a space uses it. */
|
|
10052
10197
|
function nativeInUse(status) {
|
|
10053
10198
|
return status.commandFound || (status.memoryBodies ?? []).some((body) => body.provider.origin === "native");
|
|
@@ -10887,6 +11032,10 @@ window.__ModuleLoader__.load({
|
|
|
10887
11032
|
children: notice.detail
|
|
10888
11033
|
})
|
|
10889
11034
|
}),
|
|
11035
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, {
|
|
11036
|
+
className: MnemonView_module_css_default.notice,
|
|
11037
|
+
children: status?.restartPending !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RestartReminder, { pending: status.restartPending })
|
|
11038
|
+
}),
|
|
10890
11039
|
workspaceToast.element,
|
|
10891
11040
|
remoteReadOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10892
11041
|
className: MnemonView_module_css_default.alert,
|
|
@@ -10967,7 +11116,7 @@ window.__ModuleLoader__.load({
|
|
|
10967
11116
|
}
|
|
10968
11117
|
//#endregion
|
|
10969
11118
|
//#region \0dsh-mnemon-css:/home/runner/work/dsh-mnemon/dsh-mnemon/src/client/MnemonWorkspace.module.css.mjs
|
|
10970
|
-
const css = ".NS3bAW_workspacePanel{box-sizing:border-box;background:var(--dsw-alias-bg-overlay,var(--dsw-alias-bg-base));pointer-events:auto;min-width:0;min-height:0;display:flex;position:fixed;overflow:hidden}.NS3bAW_workspacePanel>*{flex:auto;width:100%;min-width:0}.NS3bAW_betterSidebarSeat,.NS3bAW_nativeWorkspace{flex:auto;width:100%;min-width:0;height:100%;min-height:0;display:flex;overflow:hidden}.NS3bAW_betterSidebarSeat>*,.NS3bAW_nativeWorkspace>*{flex:auto;min-width:0}.NS3bAW_nativeWorkspace{z-index:2;position:relative}.NS3bAW_nativeWorkspace[data-dsh-mnemon-main-seat]{box-sizing:border-box;padding-block-start:var(--dsh-frame-top-clearance,0px)}.NS3bAW_nativeWorkspace[hidden]{display:none}.NS3bAW_entry{box-sizing:border-box;width:100
|
|
11119
|
+
const css = ".NS3bAW_workspacePanel{box-sizing:border-box;background:var(--dsw-alias-bg-overlay,var(--dsw-alias-bg-base));pointer-events:auto;min-width:0;min-height:0;display:flex;position:fixed;overflow:hidden}.NS3bAW_workspacePanel>*{flex:auto;width:100%;min-width:0}.NS3bAW_betterSidebarSeat,.NS3bAW_nativeWorkspace{flex:auto;width:100%;min-width:0;height:100%;min-height:0;display:flex;overflow:hidden}.NS3bAW_betterSidebarSeat>*,.NS3bAW_nativeWorkspace>*{flex:auto;min-width:0}.NS3bAW_nativeWorkspace{z-index:2;position:relative}.NS3bAW_nativeWorkspace[data-dsh-mnemon-main-seat]{box-sizing:border-box;padding-block-start:var(--dsh-frame-top-clearance,0px)}.NS3bAW_nativeWorkspace[hidden]{display:none}.NS3bAW_entry{box-sizing:border-box;border-radius:var(--dsw-radius-md);width:calc(100% - 4px);min-height:36px;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;white-space:nowrap;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;margin:0 2px;padding:7px 8px;line-height:22px;display:flex}.NS3bAW_entry:hover,.NS3bAW_entry[data-active]{background:var(--dsw-alias-interactive-bg-hover)}.NS3bAW_entry:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.NS3bAW_entryIcon{flex:none;justify-content:center;align-items:center;display:inline-flex}.NS3bAW_entryIcon svg{width:16px;height:16px;display:block}.NS3bAW_entryLabel{text-overflow:ellipsis;min-width:0;overflow:hidden}[data-sidebar-collapsed] .NS3bAW_entry{justify-content:center;width:36px;height:36px;min-height:36px;margin:0 auto 12px;padding:0}[data-sidebar-collapsed] .NS3bAW_entryIcon svg{width:18px;height:18px}[data-sidebar-collapsed] .NS3bAW_entryLabel{display:none}";
|
|
10971
11120
|
const tagId = "dsh-mnemon/src/client/MnemonWorkspace.module.css";
|
|
10972
11121
|
if (typeof document !== "undefined") {
|
|
10973
11122
|
let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]");
|
|
@@ -11008,7 +11157,7 @@ window.__ModuleLoader__.load({
|
|
|
11008
11157
|
entry.className = MnemonWorkspace_module_css_default.entry ?? "";
|
|
11009
11158
|
const icon = document.createElement("span");
|
|
11010
11159
|
icon.className = MnemonWorkspace_module_css_default.entryIcon ?? "";
|
|
11011
|
-
icon.append(createMemoryIcon(
|
|
11160
|
+
icon.append(createMemoryIcon(16));
|
|
11012
11161
|
const label = document.createElement("span");
|
|
11013
11162
|
label.className = MnemonWorkspace_module_css_default.entryLabel ?? "";
|
|
11014
11163
|
entry.append(icon, label);
|
|
@@ -11077,8 +11226,13 @@ window.__ModuleLoader__.load({
|
|
|
11077
11226
|
subtree: true
|
|
11078
11227
|
});
|
|
11079
11228
|
const syncActive = () => {
|
|
11080
|
-
if (controller.getSnapshot().open)
|
|
11081
|
-
|
|
11229
|
+
if (controller.getSnapshot().open) {
|
|
11230
|
+
entry.dataset.active = "true";
|
|
11231
|
+
entry.setAttribute("aria-current", "page");
|
|
11232
|
+
} else {
|
|
11233
|
+
delete entry.dataset.active;
|
|
11234
|
+
entry.removeAttribute("aria-current");
|
|
11235
|
+
}
|
|
11082
11236
|
};
|
|
11083
11237
|
const unsubscribe = controller.subscribe(syncActive);
|
|
11084
11238
|
const unsubscribeLocale = subscribeLocale(syncLabel);
|
|
@@ -12036,6 +12190,7 @@ window.__ModuleLoader__.load({
|
|
|
12036
12190
|
activeMemoryWorkspace = void 0;
|
|
12037
12191
|
};
|
|
12038
12192
|
}, "dsh-mnemon: memory workspace entry");
|
|
12193
|
+
ctx.effect(() => reopenAfterStarterUpdate(seats.workspace), "dsh-mnemon: reopen after a Starter update");
|
|
12039
12194
|
const componentSettingsDirectory = createComponentSettingsDirectory(ctx);
|
|
12040
12195
|
const configurationServices = () => ({
|
|
12041
12196
|
componentSettingsDirectory,
|