dsh-daoing-memory 0.1.4 → 0.1.5
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/client.js +277 -111
- package/lib/client.js.map +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -4,7 +4,6 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
-
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
8
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
8
|
let react = require("react");
|
|
10
9
|
let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
|
|
@@ -7724,44 +7723,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7724
7723
|
]
|
|
7725
7724
|
};
|
|
7726
7725
|
//#endregion
|
|
7727
|
-
//#region \0dsh-css:D:\DSH 插件项目\项目源码\deepseek-harness-master\packages\memory\dsh-daoing-memory\src\client\
|
|
7728
|
-
const css$
|
|
7729
|
-
const tagId$
|
|
7730
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$
|
|
7726
|
+
//#region \0dsh-css:D:\DSH 插件项目\项目源码\deepseek-harness-master\packages\memory\dsh-daoing-memory\src\client\MemoryHeaderAction.module.css.mjs
|
|
7727
|
+
const css$2 = ".S16TIG_memoryButton{border:1px solid var(--dsw-alias-border-l2);height:32px;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);cursor:pointer;white-space:nowrap;background:0 0;border-radius:18px;justify-content:center;align-items:center;padding:6px 12px;font-size:13px;font-weight:400;line-height:20px;display:inline-flex}.S16TIG_memoryButton:hover{background:var(--dsw-alias-interactive-bg-hover)}";
|
|
7728
|
+
const tagId$2 = "dsh-daoing-memory/MemoryHeaderAction.module.css";
|
|
7729
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
7731
7730
|
const tag = document.createElement("style");
|
|
7732
7731
|
tag.dataset.plugin = "dsh-daoing-memory";
|
|
7733
|
-
tag.dataset.pluginCss = tagId$
|
|
7734
|
-
tag.textContent = css$
|
|
7732
|
+
tag.dataset.pluginCss = tagId$2;
|
|
7733
|
+
tag.textContent = css$2;
|
|
7735
7734
|
document.head.appendChild(tag);
|
|
7736
7735
|
}
|
|
7737
|
-
var
|
|
7738
|
-
"action": "O-5X5a_action",
|
|
7739
|
-
"label": "O-5X5a_label"
|
|
7740
|
-
};
|
|
7736
|
+
var MemoryHeaderAction_module_css_default = { "memoryButton": "S16TIG_memoryButton" };
|
|
7741
7737
|
//#endregion
|
|
7742
|
-
//#region src/client/
|
|
7738
|
+
//#region src/client/MemoryHeaderAction.tsx
|
|
7743
7739
|
/**
|
|
7744
|
-
* Render the
|
|
7745
|
-
* the
|
|
7746
|
-
*
|
|
7740
|
+
* Render the header entry. Clicking selects the first monitoring page, which
|
|
7741
|
+
* opens the workbench overlay. The button carries `data-memory-nav` so the
|
|
7742
|
+
* workbench's click-outside dismissal treats it as part of the monitoring
|
|
7743
|
+
* surface.
|
|
7747
7744
|
* @param props - composed slot props.
|
|
7748
|
-
* @returns the
|
|
7745
|
+
* @returns the capsule button.
|
|
7749
7746
|
*/
|
|
7750
|
-
function
|
|
7751
|
-
|
|
7752
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
7747
|
+
function MemoryHeaderAction(props) {
|
|
7748
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
7753
7749
|
type: "button",
|
|
7754
|
-
className:
|
|
7750
|
+
className: MemoryHeaderAction_module_css_default.memoryButton,
|
|
7755
7751
|
"data-memory-nav": true,
|
|
7756
7752
|
"aria-label": "记忆监控",
|
|
7757
|
-
title: "记忆监控",
|
|
7758
7753
|
onClick: () => {
|
|
7759
7754
|
props.actions.select("experience");
|
|
7760
7755
|
},
|
|
7761
|
-
children:
|
|
7762
|
-
className: MemoryFooterAction_module_css_default.label,
|
|
7763
|
-
children: "记忆"
|
|
7764
|
-
})]
|
|
7756
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "记忆" })
|
|
7765
7757
|
});
|
|
7766
7758
|
}
|
|
7767
7759
|
//#endregion
|
|
@@ -7822,8 +7814,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7822
7814
|
//#endregion
|
|
7823
7815
|
//#region src/client/navStore.ts
|
|
7824
7816
|
/**
|
|
7825
|
-
* Memory monitoring nav store: shared viewing state between the
|
|
7826
|
-
*
|
|
7817
|
+
* Memory monitoring nav store: shared viewing state between the session header
|
|
7818
|
+
* entry (conversation.session.header.utilities) and the right-pane takeover (shell.overlay).
|
|
7827
7819
|
* One factory handle is created in apply and passed to both registrations so
|
|
7828
7820
|
* selecting a menu in the sidebar and rendering the matching page read the
|
|
7829
7821
|
* same state. Module level exports the factory only — a module-level handle
|
|
@@ -7876,71 +7868,71 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7876
7868
|
}
|
|
7877
7869
|
//#endregion
|
|
7878
7870
|
//#region \0dsh-css:D:\DSH 插件项目\项目源码\deepseek-harness-master\packages\memory\dsh-daoing-memory\src\client\Workbench.module.css.mjs
|
|
7879
|
-
const css = ".KAfEAG_panel{background:var(--dsw-alias-bg-base);border-left:1px solid var(--dsw-alias-border-l2);flex-direction:column;display:flex;position:absolute;top:0;bottom:0;right:0;overflow:hidden}.KAfEAG_header{border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);flex-wrap:wrap;align-items:center;gap:16px;padding:10px 16px;display:flex}.KAfEAG_titleBlock{flex-direction:column;gap:2px;min-width:180px;display:flex}.KAfEAG_title{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600}.KAfEAG_subtitle{color:var(--dsw-alias-label-caption);font-size:11px}.KAfEAG_statline{color:var(--dsw-alias-label-tertiary);margin-left:auto;font-size:11px}.KAfEAG_body{flex:1;padding:12px 16px 24px;overflow:auto}.KAfEAG_workbenchTabs{border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);align-items:center;gap:2px;padding:0 16px;display:flex}.KAfEAG_workbenchTab{color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:none;padding:10px 14px;font-size:13px;line-height:20px;position:relative}.KAfEAG_workbenchTab:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.KAfEAG_workbenchTabActive{color:var(--dsw-alias-label-primary);font-weight:600}.KAfEAG_workbenchTabActive:after{content:\"\";background:var(--ds-color-accent,#4c8dff);border-radius:2px 2px 0 0;height:2px;position:absolute;bottom:-1px;left:14px;right:14px}.KAfEAG_page{flex-direction:column;gap:10px;display:flex}.KAfEAG_toolbar{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.KAfEAG_tabs{border-bottom:1px solid var(--dsw-alias-border-l2);flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:12px;padding-bottom:8px;display:flex}.KAfEAG_tab{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;border-radius:999px;padding:6px 12px;font-size:12px}.KAfEAG_tab:hover{background:var(--dsw-alias-interactive-bg-hover)}.KAfEAG_tabActive{background:var(--dsw-alias-interactive-bg-active,var(--dsw-alias-bg-module-platform));color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l3,var(--dsw-alias-border-l2));font-weight:600}.KAfEAG_field{color:var(--dsw-alias-label-caption);flex-direction:column;gap:3px;font-size:11px;display:flex}.KAfEAG_field input,.KAfEAG_field select,.KAfEAG_field textarea{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);border-radius:6px;min-width:140px;padding:5px 8px;font-size:12px}.KAfEAG_field textarea{resize:vertical}.KAfEAG_check{color:var(--dsw-alias-label-secondary);align-items:center;gap:5px;font-size:12px;display:flex}.KAfEAG_btn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;border-radius:6px;padding:5px 10px;font-size:12px}.KAfEAG_btn:hover{background:var(--dsw-alias-interactive-bg-hover)}.KAfEAG_btn:disabled{opacity:.5;cursor:default}.KAfEAG_btnDanger{color:var(--dsw-alias-state-error-primary)}.KAfEAG_btnDanger:hover{background:var(--dsw-alias-interactive-bg-hover-danger)}.KAfEAG_error{color:var(--dsw-alias-state-error-primary);font-size:12px}.KAfEAG_okLine{color:var(--dsw-alias-state-success-primary);font-size:12px}.KAfEAG_warnLine{color:var(--dsw-alias-state-warn-label);margin-bottom:6px;font-size:12px}.KAfEAG_empty{color:var(--dsw-alias-label-caption);padding:14px 4px;font-size:12px}.KAfEAG_list{flex-direction:column;gap:8px;display:flex}.KAfEAG_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);border-radius:8px;padding:8px 12px}.KAfEAG_cardHead{cursor:pointer;flex-wrap:wrap;align-items:center;gap:8px;display:flex}.KAfEAG_cardTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500}.KAfEAG_cardMeta{color:var(--dsw-alias-label-caption);font-size:11px}.KAfEAG_cardSub{align-items:center;gap:12px;margin-top:4px;display:flex}.KAfEAG_concernBg{color:var(--dsw-alias-label-caption);margin-top:3px;font-size:11px;line-height:1.5}.KAfEAG_cardDetail{border-top:1px solid var(--dsw-alias-border-l2);flex-direction:column;gap:5px;margin-top:8px;padding-top:8px;display:flex}.KAfEAG_detailRow{color:var(--dsw-alias-label-secondary);font-size:12px}.KAfEAG_detailLabel{min-width:64px;color:var(--dsw-alias-label-caption);display:inline-block}.KAfEAG_actions{flex-wrap:wrap;gap:6px;margin-top:4px;display:flex}.KAfEAG_historyTitle{color:var(--dsw-alias-label-secondary);margin-top:10px;font-size:12px;font-weight:600}.KAfEAG_table{border-collapse:collapse;width:100%;color:var(--dsw-alias-label-secondary);font-size:12px}.KAfEAG_table th{text-align:left;color:var(--dsw-alias-label-caption);border-bottom:1px solid var(--dsw-alias-border-l2);padding:5px 8px;font-weight:500}.KAfEAG_table td{border-bottom:1px solid var(--dsw-alias-border-l2);vertical-align:top;padding:5px 8px}.KAfEAG_valueCell{text-overflow:ellipsis;white-space:nowrap;max-width:320px;overflow:hidden}.KAfEAG_payloadFull{white-space:pre-wrap;word-break:break-all;max-width:480px}.KAfEAG_payloadToggle{cursor:pointer;color:var(--ds-color-accent,#4c8dff);user-select:none;margin-left:6px;font-size:12px}.KAfEAG_payloadToggle:hover{text-decoration:underline}.KAfEAG_cellActions{flex-wrap:wrap;gap:4px;display:flex}.KAfEAG_badge{white-space:nowrap;border-radius:9px;padding:1px 7px;font-size:11px}.KAfEAG_badgePositive{background:var(--dsw-alias-state-success-tertiary);color:var(--dsw-alias-state-success-primary)}.KAfEAG_badgeNegative{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-label)}.KAfEAG_badgePinned{background:var(--dsw-alias-state-business-tertiary);color:var(--dsw-alias-state-business-primary)}.KAfEAG_badgeConflict{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-label)}.KAfEAG_statusLive{background:var(--dsw-alias-state-success-tertiary);color:var(--dsw-alias-state-success-primary)}.KAfEAG_statusCandidate{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-secondary)}.KAfEAG_statusChallenged{background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary)}.KAfEAG_statusOther{background:var(--dsw-alias-bg-skeleton);color:var(--dsw-alias-label-caption)}.KAfEAG_trust{color:var(--dsw-alias-label-tertiary);font-size:11px}.KAfEAG_columns{grid-template-columns:minmax(0,3fr) minmax(0,2fr);align-items:start;gap:16px;display:grid}.KAfEAG_column{flex-direction:column;gap:8px;min-width:0;display:flex}.KAfEAG_sectionTitle{color:var(--dsw-alias-label-primary);margin-top:6px;font-size:13px;font-weight:600}.KAfEAG_form{border:1px solid var(--dsw-alias-border-l2);border-radius:8px;flex-direction:column;gap:8px;padding:12px;display:flex}.KAfEAG_form .KAfEAG_btn{align-self:flex-start}.KAfEAG_rules{color:var(--dsw-alias-label-secondary);flex-direction:column;gap:4px;margin:0;padding-left:18px;font-size:12px;display:flex}";
|
|
7880
|
-
const tagId = "dsh-daoing-memory/Workbench.module.css";
|
|
7881
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
7871
|
+
const css$1 = ".KAfEAG_panel{background:var(--dsw-alias-bg-base);border-left:1px solid var(--dsw-alias-border-l2);flex-direction:column;display:flex;position:absolute;top:0;bottom:0;right:0;overflow:hidden}.KAfEAG_header{border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);flex-wrap:wrap;align-items:center;gap:16px;padding:10px 16px;display:flex}.KAfEAG_titleBlock{flex-direction:column;gap:2px;min-width:180px;display:flex}.KAfEAG_title{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600}.KAfEAG_subtitle{color:var(--dsw-alias-label-caption);font-size:11px}.KAfEAG_statline{color:var(--dsw-alias-label-tertiary);margin-left:auto;font-size:11px}.KAfEAG_body{flex:1;padding:12px 16px 24px;overflow:auto}.KAfEAG_workbenchTabs{border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);align-items:center;gap:2px;padding:0 16px;display:flex}.KAfEAG_workbenchTab{color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:none;padding:10px 14px;font-size:13px;line-height:20px;position:relative}.KAfEAG_workbenchTab:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.KAfEAG_workbenchTabActive{color:var(--dsw-alias-label-primary);font-weight:600}.KAfEAG_workbenchTabActive:after{content:\"\";background:var(--ds-color-accent,#4c8dff);border-radius:2px 2px 0 0;height:2px;position:absolute;bottom:-1px;left:14px;right:14px}.KAfEAG_page{flex-direction:column;gap:10px;display:flex}.KAfEAG_toolbar{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.KAfEAG_tabs{border-bottom:1px solid var(--dsw-alias-border-l2);flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:12px;padding-bottom:8px;display:flex}.KAfEAG_tab{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;border-radius:999px;padding:6px 12px;font-size:12px}.KAfEAG_tab:hover{background:var(--dsw-alias-interactive-bg-hover)}.KAfEAG_tabActive{background:var(--dsw-alias-interactive-bg-active,var(--dsw-alias-bg-module-platform));color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l3,var(--dsw-alias-border-l2));font-weight:600}.KAfEAG_field{color:var(--dsw-alias-label-caption);flex-direction:column;gap:3px;font-size:11px;display:flex}.KAfEAG_field input,.KAfEAG_field select,.KAfEAG_field textarea{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);border-radius:6px;min-width:140px;padding:5px 8px;font-size:12px}.KAfEAG_field textarea{resize:vertical}.KAfEAG_check{color:var(--dsw-alias-label-secondary);align-items:center;gap:5px;font-size:12px;display:flex}.KAfEAG_btn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;border-radius:6px;padding:5px 10px;font-size:12px}.KAfEAG_btn:hover{background:var(--dsw-alias-interactive-bg-hover)}.KAfEAG_btn:disabled{opacity:.5;cursor:default}.KAfEAG_btnDanger{color:var(--dsw-alias-state-error-primary)}.KAfEAG_btnDanger:hover{background:var(--dsw-alias-interactive-bg-hover-danger)}.KAfEAG_error{color:var(--dsw-alias-state-error-primary);font-size:12px}.KAfEAG_okLine{color:var(--dsw-alias-state-success-primary);font-size:12px}.KAfEAG_warnLine{color:var(--dsw-alias-state-warn-label);margin-bottom:6px;font-size:12px}.KAfEAG_empty{color:var(--dsw-alias-label-caption);padding:14px 4px;font-size:12px}.KAfEAG_list{flex-direction:column;gap:8px;display:flex}.KAfEAG_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);border-radius:8px;padding:8px 12px}.KAfEAG_cardHead{cursor:pointer;flex-wrap:wrap;align-items:center;gap:8px;display:flex}.KAfEAG_cardTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500}.KAfEAG_cardMeta{color:var(--dsw-alias-label-caption);font-size:11px}.KAfEAG_cardSub{align-items:center;gap:12px;margin-top:4px;display:flex}.KAfEAG_concernBg{color:var(--dsw-alias-label-caption);margin-top:3px;font-size:11px;line-height:1.5}.KAfEAG_cardDetail{border-top:1px solid var(--dsw-alias-border-l2);flex-direction:column;gap:5px;margin-top:8px;padding-top:8px;display:flex}.KAfEAG_detailRow{color:var(--dsw-alias-label-secondary);font-size:12px}.KAfEAG_detailLabel{min-width:64px;color:var(--dsw-alias-label-caption);display:inline-block}.KAfEAG_actions{flex-wrap:wrap;gap:6px;margin-top:4px;display:flex}.KAfEAG_historyTitle{color:var(--dsw-alias-label-secondary);margin-top:10px;font-size:12px;font-weight:600}.KAfEAG_table{border-collapse:collapse;width:100%;color:var(--dsw-alias-label-secondary);font-size:12px}.KAfEAG_table th{text-align:left;color:var(--dsw-alias-label-caption);border-bottom:1px solid var(--dsw-alias-border-l2);padding:5px 8px;font-weight:500}.KAfEAG_table td{border-bottom:1px solid var(--dsw-alias-border-l2);vertical-align:top;padding:5px 8px}.KAfEAG_valueCell{text-overflow:ellipsis;white-space:nowrap;max-width:320px;overflow:hidden}.KAfEAG_payloadFull{white-space:pre-wrap;word-break:break-all;max-width:480px}.KAfEAG_payloadToggle{cursor:pointer;color:var(--ds-color-accent,#4c8dff);user-select:none;margin-left:6px;font-size:12px}.KAfEAG_payloadToggle:hover{text-decoration:underline}.KAfEAG_cellActions{flex-wrap:wrap;gap:4px;display:flex}.KAfEAG_badge{white-space:nowrap;border-radius:9px;padding:1px 7px;font-size:11px}.KAfEAG_badgePositive{background:var(--dsw-alias-state-success-tertiary);color:var(--dsw-alias-state-success-primary)}.KAfEAG_badgeNegative{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-label)}.KAfEAG_badgePinned{background:var(--dsw-alias-state-business-tertiary);color:var(--dsw-alias-state-business-primary)}.KAfEAG_badgeConflict{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-label)}.KAfEAG_statusLive{background:var(--dsw-alias-state-success-tertiary);color:var(--dsw-alias-state-success-primary)}.KAfEAG_statusCandidate{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-secondary)}.KAfEAG_statusChallenged{background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary)}.KAfEAG_statusOther{background:var(--dsw-alias-bg-skeleton);color:var(--dsw-alias-label-caption)}.KAfEAG_trust{color:var(--dsw-alias-label-tertiary);font-size:11px}.KAfEAG_columns{grid-template-columns:minmax(0,3fr) minmax(0,2fr);align-items:start;gap:16px;display:grid}.KAfEAG_column{flex-direction:column;gap:8px;min-width:0;display:flex}.KAfEAG_sectionTitle{color:var(--dsw-alias-label-primary);margin-top:6px;font-size:13px;font-weight:600}.KAfEAG_form{border:1px solid var(--dsw-alias-border-l2);border-radius:8px;flex-direction:column;gap:8px;padding:12px;display:flex}.KAfEAG_form .KAfEAG_btn{align-self:flex-start}.KAfEAG_rules{color:var(--dsw-alias-label-secondary);flex-direction:column;gap:4px;margin:0;padding-left:18px;font-size:12px;display:flex}";
|
|
7872
|
+
const tagId$1 = "dsh-daoing-memory/Workbench.module.css";
|
|
7873
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
7882
7874
|
const tag = document.createElement("style");
|
|
7883
7875
|
tag.dataset.plugin = "dsh-daoing-memory";
|
|
7884
|
-
tag.dataset.pluginCss = tagId;
|
|
7885
|
-
tag.textContent = css;
|
|
7876
|
+
tag.dataset.pluginCss = tagId$1;
|
|
7877
|
+
tag.textContent = css$1;
|
|
7886
7878
|
document.head.appendChild(tag);
|
|
7887
7879
|
}
|
|
7888
7880
|
var Workbench_module_css_default = {
|
|
7889
|
-
"statusCandidate": "KAfEAG_statusCandidate",
|
|
7890
|
-
"trust": "KAfEAG_trust",
|
|
7891
|
-
"concernBg": "KAfEAG_concernBg",
|
|
7892
|
-
"column": "KAfEAG_column",
|
|
7893
|
-
"sectionTitle": "KAfEAG_sectionTitle",
|
|
7894
|
-
"tabs": "KAfEAG_tabs",
|
|
7895
|
-
"title": "KAfEAG_title",
|
|
7896
|
-
"btnDanger": "KAfEAG_btnDanger",
|
|
7897
|
-
"cardDetail": "KAfEAG_cardDetail",
|
|
7898
|
-
"table": "KAfEAG_table",
|
|
7899
|
-
"tabActive": "KAfEAG_tabActive",
|
|
7900
|
-
"statusChallenged": "KAfEAG_statusChallenged",
|
|
7901
7881
|
"statline": "KAfEAG_statline",
|
|
7902
|
-
"
|
|
7903
|
-
"
|
|
7904
|
-
"
|
|
7905
|
-
"btn": "KAfEAG_btn",
|
|
7906
|
-
"badgeConflict": "KAfEAG_badgeConflict",
|
|
7907
|
-
"columns": "KAfEAG_columns",
|
|
7908
|
-
"titleBlock": "KAfEAG_titleBlock",
|
|
7909
|
-
"cardHead": "KAfEAG_cardHead",
|
|
7910
|
-
"header": "KAfEAG_header",
|
|
7911
|
-
"historyTitle": "KAfEAG_historyTitle",
|
|
7912
|
-
"workbenchTab": "KAfEAG_workbenchTab",
|
|
7913
|
-
"rules": "KAfEAG_rules",
|
|
7914
|
-
"detailRow": "KAfEAG_detailRow",
|
|
7915
|
-
"payloadToggle": "KAfEAG_payloadToggle",
|
|
7916
|
-
"cellActions": "KAfEAG_cellActions",
|
|
7882
|
+
"error": "KAfEAG_error",
|
|
7883
|
+
"btnDanger": "KAfEAG_btnDanger",
|
|
7884
|
+
"cardMeta": "KAfEAG_cardMeta",
|
|
7917
7885
|
"payloadFull": "KAfEAG_payloadFull",
|
|
7918
7886
|
"form": "KAfEAG_form",
|
|
7919
|
-
"
|
|
7887
|
+
"toolbar": "KAfEAG_toolbar",
|
|
7888
|
+
"statusCandidate": "KAfEAG_statusCandidate",
|
|
7889
|
+
"sectionTitle": "KAfEAG_sectionTitle",
|
|
7890
|
+
"concernBg": "KAfEAG_concernBg",
|
|
7891
|
+
"tab": "KAfEAG_tab",
|
|
7892
|
+
"list": "KAfEAG_list",
|
|
7920
7893
|
"actions": "KAfEAG_actions",
|
|
7921
|
-
"
|
|
7922
|
-
"
|
|
7923
|
-
"subtitle": "KAfEAG_subtitle",
|
|
7924
|
-
"card": "KAfEAG_card",
|
|
7925
|
-
"cardSub": "KAfEAG_cardSub",
|
|
7894
|
+
"columns": "KAfEAG_columns",
|
|
7895
|
+
"badgeConflict": "KAfEAG_badgeConflict",
|
|
7926
7896
|
"workbenchTabActive": "KAfEAG_workbenchTabActive",
|
|
7927
|
-
"list": "KAfEAG_list",
|
|
7928
|
-
"statusLive": "KAfEAG_statusLive",
|
|
7929
|
-
"okLine": "KAfEAG_okLine",
|
|
7930
|
-
"tab": "KAfEAG_tab",
|
|
7931
7897
|
"workbenchTabs": "KAfEAG_workbenchTabs",
|
|
7932
|
-
"cardTitle": "KAfEAG_cardTitle",
|
|
7933
|
-
"toolbar": "KAfEAG_toolbar",
|
|
7934
|
-
"check": "KAfEAG_check",
|
|
7935
7898
|
"field": "KAfEAG_field",
|
|
7899
|
+
"card": "KAfEAG_card",
|
|
7900
|
+
"cardTitle": "KAfEAG_cardTitle",
|
|
7901
|
+
"cardDetail": "KAfEAG_cardDetail",
|
|
7902
|
+
"cellActions": "KAfEAG_cellActions",
|
|
7903
|
+
"header": "KAfEAG_header",
|
|
7936
7904
|
"warnLine": "KAfEAG_warnLine",
|
|
7905
|
+
"statusLive": "KAfEAG_statusLive",
|
|
7906
|
+
"payloadToggle": "KAfEAG_payloadToggle",
|
|
7907
|
+
"okLine": "KAfEAG_okLine",
|
|
7908
|
+
"badgePinned": "KAfEAG_badgePinned",
|
|
7909
|
+
"trust": "KAfEAG_trust",
|
|
7910
|
+
"rules": "KAfEAG_rules",
|
|
7911
|
+
"column": "KAfEAG_column",
|
|
7912
|
+
"panel": "KAfEAG_panel",
|
|
7913
|
+
"cardSub": "KAfEAG_cardSub",
|
|
7914
|
+
"workbenchTab": "KAfEAG_workbenchTab",
|
|
7915
|
+
"tabActive": "KAfEAG_tabActive",
|
|
7916
|
+
"detailRow": "KAfEAG_detailRow",
|
|
7917
|
+
"check": "KAfEAG_check",
|
|
7918
|
+
"historyTitle": "KAfEAG_historyTitle",
|
|
7919
|
+
"table": "KAfEAG_table",
|
|
7937
7920
|
"page": "KAfEAG_page",
|
|
7921
|
+
"cardHead": "KAfEAG_cardHead",
|
|
7938
7922
|
"valueCell": "KAfEAG_valueCell",
|
|
7939
|
-
"
|
|
7940
|
-
"
|
|
7941
|
-
"
|
|
7923
|
+
"body": "KAfEAG_body",
|
|
7924
|
+
"titleBlock": "KAfEAG_titleBlock",
|
|
7925
|
+
"tabs": "KAfEAG_tabs",
|
|
7926
|
+
"badgePositive": "KAfEAG_badgePositive",
|
|
7927
|
+
"subtitle": "KAfEAG_subtitle",
|
|
7928
|
+
"detailLabel": "KAfEAG_detailLabel",
|
|
7929
|
+
"badgeNegative": "KAfEAG_badgeNegative",
|
|
7930
|
+
"btn": "KAfEAG_btn",
|
|
7931
|
+
"statusChallenged": "KAfEAG_statusChallenged",
|
|
7932
|
+
"title": "KAfEAG_title",
|
|
7933
|
+
"badge": "KAfEAG_badge",
|
|
7942
7934
|
"empty": "KAfEAG_empty",
|
|
7943
|
-
"
|
|
7935
|
+
"statusOther": "KAfEAG_statusOther"
|
|
7944
7936
|
};
|
|
7945
7937
|
//#endregion
|
|
7946
7938
|
//#region src/client/ExperiencePage.tsx
|
|
@@ -8028,7 +8020,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8028
8020
|
});
|
|
8029
8021
|
}, [actions, expanded]);
|
|
8030
8022
|
const runPin = (0, react.useCallback)(async (item) => {
|
|
8031
|
-
const reason = promptReason(item.pinned ? "取消永久标记" : "永久标记(置顶信任,豁免预算)");
|
|
8023
|
+
const reason = await promptReason(item.pinned ? "取消永久标记" : "永久标记(置顶信任,豁免预算)");
|
|
8032
8024
|
if (reason === void 0) return;
|
|
8033
8025
|
await actions.humanPin({
|
|
8034
8026
|
id: item.id,
|
|
@@ -8043,7 +8035,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8043
8035
|
refresh
|
|
8044
8036
|
]);
|
|
8045
8037
|
const runPromote = (0, react.useCallback)(async (item) => {
|
|
8046
|
-
const reason = promptReason("人工转正(候选 → 生效,V2 人工权威)");
|
|
8038
|
+
const reason = await promptReason("人工转正(候选 → 生效,V2 人工权威)");
|
|
8047
8039
|
if (reason === void 0) return;
|
|
8048
8040
|
await actions.humanPromote(item.id, reason);
|
|
8049
8041
|
refresh();
|
|
@@ -8054,7 +8046,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8054
8046
|
refresh
|
|
8055
8047
|
]);
|
|
8056
8048
|
const runReleaseCold = (0, react.useCallback)(async (item) => {
|
|
8057
|
-
const reason = promptReason("从冷宫放回候选(可再次被试探验证)");
|
|
8049
|
+
const reason = await promptReason("从冷宫放回候选(可再次被试探验证)");
|
|
8058
8050
|
if (reason === void 0) return;
|
|
8059
8051
|
await actions.humanReleaseCold({
|
|
8060
8052
|
id: item.id,
|
|
@@ -8068,7 +8060,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8068
8060
|
refresh
|
|
8069
8061
|
]);
|
|
8070
8062
|
const runDelete = (0, react.useCallback)(async (item) => {
|
|
8071
|
-
const reason = promptReason(`删除经验「${item.gist.slice(0, 24)}」(指纹保留在账本)`);
|
|
8063
|
+
const reason = await promptReason(`删除经验「${item.gist.slice(0, 24)}」(指纹保留在账本)`);
|
|
8072
8064
|
if (reason === void 0) return;
|
|
8073
8065
|
await actions.humanDeleteExperience({
|
|
8074
8066
|
id: item.id,
|
|
@@ -8082,7 +8074,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8082
8074
|
refresh
|
|
8083
8075
|
]);
|
|
8084
8076
|
const runRollback = (0, react.useCallback)(async (item, toRevision) => {
|
|
8085
|
-
const reason = promptReason(`回滚到 v${String(toRevision)}`);
|
|
8077
|
+
const reason = await promptReason(`回滚到 v${String(toRevision)}`);
|
|
8086
8078
|
if (reason === void 0) return;
|
|
8087
8079
|
await actions.humanRollback({
|
|
8088
8080
|
id: item.id,
|
|
@@ -8392,6 +8384,183 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8392
8384
|
});
|
|
8393
8385
|
}
|
|
8394
8386
|
//#endregion
|
|
8387
|
+
//#region \0dsh-css:D:\DSH 插件项目\项目源码\deepseek-harness-master\packages\memory\dsh-daoing-memory\src\client\ReasonDialog.module.css.mjs
|
|
8388
|
+
const css = ".L4KK8a_overlay{z-index:10000;backdrop-filter:blur(2px);background:#0006;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.L4KK8a_dialog{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);border-radius:12px;flex-direction:column;gap:12px;width:480px;max-width:90vw;max-height:80vh;padding:20px 24px;display:flex;box-shadow:0 8px 32px #00000026}.L4KK8a_header{flex-direction:column;gap:4px;display:flex}.L4KK8a_title{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600}.L4KK8a_subtitle{color:var(--dsw-alias-label-caption);font-size:12px}.L4KK8a_textarea{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);width:100%;min-height:80px;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);resize:vertical;box-sizing:border-box;border-radius:8px;outline:none;padding:10px 12px;font-size:13px;line-height:20px}.L4KK8a_textarea:focus{border-color:var(--ds-color-accent,#4c8dff);box-shadow:0 0 0 2px #4c8dff26}.L4KK8a_textarea::placeholder{color:var(--dsw-alias-label-dimmed)}.L4KK8a_footer{justify-content:space-between;align-items:center;display:flex}.L4KK8a_hint{color:var(--dsw-alias-label-dimmed);font-size:11px}.L4KK8a_buttons{gap:8px;display:flex}.L4KK8a_btnCancel,.L4KK8a_btnConfirm{height:32px;font-family:var(--dsw-font-family);cursor:pointer;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:0 16px;font-size:13px;font-weight:500}.L4KK8a_btnCancel{color:var(--dsw-alias-label-secondary);background:0 0}.L4KK8a_btnCancel:hover{background:var(--dsw-alias-interactive-bg-hover)}.L4KK8a_btnConfirm{background:var(--ds-color-accent,#4c8dff);color:#fff;border-color:#0000}.L4KK8a_btnConfirm:hover{opacity:.9}";
|
|
8389
|
+
const tagId = "dsh-daoing-memory/ReasonDialog.module.css";
|
|
8390
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
8391
|
+
const tag = document.createElement("style");
|
|
8392
|
+
tag.dataset.plugin = "dsh-daoing-memory";
|
|
8393
|
+
tag.dataset.pluginCss = tagId;
|
|
8394
|
+
tag.textContent = css;
|
|
8395
|
+
document.head.appendChild(tag);
|
|
8396
|
+
}
|
|
8397
|
+
var ReasonDialog_module_css_default = {
|
|
8398
|
+
"btnConfirm": "L4KK8a_btnConfirm",
|
|
8399
|
+
"header": "L4KK8a_header",
|
|
8400
|
+
"btnCancel": "L4KK8a_btnCancel",
|
|
8401
|
+
"textarea": "L4KK8a_textarea",
|
|
8402
|
+
"subtitle": "L4KK8a_subtitle",
|
|
8403
|
+
"dialog": "L4KK8a_dialog",
|
|
8404
|
+
"overlay": "L4KK8a_overlay",
|
|
8405
|
+
"title": "L4KK8a_title",
|
|
8406
|
+
"hint": "L4KK8a_hint",
|
|
8407
|
+
"footer": "L4KK8a_footer",
|
|
8408
|
+
"buttons": "L4KK8a_buttons"
|
|
8409
|
+
};
|
|
8410
|
+
//#endregion
|
|
8411
|
+
//#region src/client/ReasonDialog.tsx
|
|
8412
|
+
/**
|
|
8413
|
+
* Custom modal dialogs: replaces the browser's native window.prompt for
|
|
8414
|
+
* audited human operations (delete, rollback, etc.) and value editing.
|
|
8415
|
+
* A modal overlay with a textarea, confirm/cancel buttons, and DSH theme tokens.
|
|
8416
|
+
*
|
|
8417
|
+
* Usage:
|
|
8418
|
+
* showReasonDialog(action) → Promise<string | undefined> (reason required)
|
|
8419
|
+
* showInputDialog(title, defaultValue?) → Promise<string | undefined> (value optional)
|
|
8420
|
+
*
|
|
8421
|
+
* The dialog is rendered as a fixed overlay (DSH slots don't provide a modal
|
|
8422
|
+
* seat; a fixed-position element is the standard pattern).
|
|
8423
|
+
*/
|
|
8424
|
+
let pendingRequest = null;
|
|
8425
|
+
let renderCallback = null;
|
|
8426
|
+
function showDialog(request) {
|
|
8427
|
+
return new Promise((resolve) => {
|
|
8428
|
+
pendingRequest = {
|
|
8429
|
+
...request,
|
|
8430
|
+
resolve
|
|
8431
|
+
};
|
|
8432
|
+
renderCallback?.();
|
|
8433
|
+
});
|
|
8434
|
+
}
|
|
8435
|
+
/**
|
|
8436
|
+
* Show the reason dialog and wait for the user's response.
|
|
8437
|
+
* @param action - human-readable action name shown in the title.
|
|
8438
|
+
* @returns the trimmed reason on confirm, or undefined on cancel/empty.
|
|
8439
|
+
*/
|
|
8440
|
+
function showReasonDialog(action) {
|
|
8441
|
+
return showDialog({
|
|
8442
|
+
title: `「${action}」需要填写原因`,
|
|
8443
|
+
subtitle: "此操作将写入审计账本,原因必填",
|
|
8444
|
+
placeholder: "请填写原因…",
|
|
8445
|
+
defaultValue: "",
|
|
8446
|
+
requireNonEmpty: true
|
|
8447
|
+
});
|
|
8448
|
+
}
|
|
8449
|
+
/**
|
|
8450
|
+
* Show a generic input dialog and wait for the user's response.
|
|
8451
|
+
* @param title - dialog title.
|
|
8452
|
+
* @param defaultValue - pre-filled value (optional).
|
|
8453
|
+
* @returns the trimmed value on confirm, or undefined on cancel. Empty string is allowed.
|
|
8454
|
+
*/
|
|
8455
|
+
function showInputDialog(title, defaultValue = "") {
|
|
8456
|
+
return showDialog({
|
|
8457
|
+
title,
|
|
8458
|
+
subtitle: "",
|
|
8459
|
+
placeholder: "请输入…",
|
|
8460
|
+
defaultValue,
|
|
8461
|
+
requireNonEmpty: false
|
|
8462
|
+
});
|
|
8463
|
+
}
|
|
8464
|
+
/**
|
|
8465
|
+
* The dialog component. Mount once at the workbench root; it stays invisible
|
|
8466
|
+
* until showReasonDialog or showInputDialog is called.
|
|
8467
|
+
*/
|
|
8468
|
+
function ReasonDialogHost() {
|
|
8469
|
+
const [, forceRender] = (0, react.useState)(0);
|
|
8470
|
+
const textareaRef = (0, react.useRef)(null);
|
|
8471
|
+
(0, react.useEffect)(() => {
|
|
8472
|
+
renderCallback = () => {
|
|
8473
|
+
forceRender((n) => n + 1);
|
|
8474
|
+
};
|
|
8475
|
+
return () => {
|
|
8476
|
+
renderCallback = null;
|
|
8477
|
+
};
|
|
8478
|
+
}, []);
|
|
8479
|
+
(0, react.useEffect)(() => {
|
|
8480
|
+
if (pendingRequest) requestAnimationFrame(() => {
|
|
8481
|
+
const el = textareaRef.current;
|
|
8482
|
+
if (el) {
|
|
8483
|
+
el.focus();
|
|
8484
|
+
el.select();
|
|
8485
|
+
}
|
|
8486
|
+
});
|
|
8487
|
+
}, [pendingRequest?.title]);
|
|
8488
|
+
if (!pendingRequest) return null;
|
|
8489
|
+
const { title, subtitle, placeholder, defaultValue, requireNonEmpty, resolve } = pendingRequest;
|
|
8490
|
+
const handleConfirm = () => {
|
|
8491
|
+
const value = textareaRef.current?.value?.trim() ?? "";
|
|
8492
|
+
if (requireNonEmpty && value === "") return;
|
|
8493
|
+
pendingRequest = null;
|
|
8494
|
+
resolve(value);
|
|
8495
|
+
forceRender((n) => n + 1);
|
|
8496
|
+
};
|
|
8497
|
+
const handleCancel = () => {
|
|
8498
|
+
pendingRequest = null;
|
|
8499
|
+
resolve(void 0);
|
|
8500
|
+
forceRender((n) => n + 1);
|
|
8501
|
+
};
|
|
8502
|
+
const handleKeyDown = (e) => {
|
|
8503
|
+
if (e.key === "Escape") {
|
|
8504
|
+
e.preventDefault();
|
|
8505
|
+
handleCancel();
|
|
8506
|
+
}
|
|
8507
|
+
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) {
|
|
8508
|
+
e.preventDefault();
|
|
8509
|
+
handleConfirm();
|
|
8510
|
+
}
|
|
8511
|
+
};
|
|
8512
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8513
|
+
className: ReasonDialog_module_css_default.overlay,
|
|
8514
|
+
onClick: handleCancel,
|
|
8515
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8516
|
+
className: ReasonDialog_module_css_default.dialog,
|
|
8517
|
+
onClick: (e) => {
|
|
8518
|
+
e.stopPropagation();
|
|
8519
|
+
},
|
|
8520
|
+
onKeyDown: handleKeyDown,
|
|
8521
|
+
children: [
|
|
8522
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8523
|
+
className: ReasonDialog_module_css_default.header,
|
|
8524
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8525
|
+
className: ReasonDialog_module_css_default.title,
|
|
8526
|
+
children: title
|
|
8527
|
+
}), subtitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8528
|
+
className: ReasonDialog_module_css_default.subtitle,
|
|
8529
|
+
children: subtitle
|
|
8530
|
+
})]
|
|
8531
|
+
}),
|
|
8532
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
8533
|
+
ref: textareaRef,
|
|
8534
|
+
className: ReasonDialog_module_css_default.textarea,
|
|
8535
|
+
placeholder,
|
|
8536
|
+
defaultValue,
|
|
8537
|
+
rows: 4
|
|
8538
|
+
}),
|
|
8539
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8540
|
+
className: ReasonDialog_module_css_default.footer,
|
|
8541
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8542
|
+
className: ReasonDialog_module_css_default.hint,
|
|
8543
|
+
children: "Ctrl+Enter 确认 · Esc 取消"
|
|
8544
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8545
|
+
className: ReasonDialog_module_css_default.buttons,
|
|
8546
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
8547
|
+
type: "button",
|
|
8548
|
+
className: ReasonDialog_module_css_default.btnCancel,
|
|
8549
|
+
onClick: handleCancel,
|
|
8550
|
+
children: "取消"
|
|
8551
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
8552
|
+
type: "button",
|
|
8553
|
+
className: ReasonDialog_module_css_default.btnConfirm,
|
|
8554
|
+
onClick: handleConfirm,
|
|
8555
|
+
children: "确认"
|
|
8556
|
+
})]
|
|
8557
|
+
})]
|
|
8558
|
+
})
|
|
8559
|
+
]
|
|
8560
|
+
})
|
|
8561
|
+
});
|
|
8562
|
+
}
|
|
8563
|
+
//#endregion
|
|
8395
8564
|
//#region src/client/FactDiaryPage.tsx
|
|
8396
8565
|
/**
|
|
8397
8566
|
* Profile·concerns page, split into two sub-pages: 关心事项 (open-loop memos) /
|
|
@@ -8548,7 +8717,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8548
8717
|
refresh();
|
|
8549
8718
|
}, [refresh]);
|
|
8550
8719
|
const runConfirm = (0, react.useCallback)(async (fact) => {
|
|
8551
|
-
const reason = promptReason(fact.locked ? "解除人工确认" : "人工确认(锁定,禁止自动取代)");
|
|
8720
|
+
const reason = await promptReason(fact.locked ? "解除人工确认" : "人工确认(锁定,禁止自动取代)");
|
|
8552
8721
|
if (reason === void 0) return;
|
|
8553
8722
|
await actions.humanConfirmFact({
|
|
8554
8723
|
factId: fact.id,
|
|
@@ -8563,9 +8732,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8563
8732
|
refresh
|
|
8564
8733
|
]);
|
|
8565
8734
|
const runEditFact = (0, react.useCallback)(async (fact) => {
|
|
8566
|
-
const value =
|
|
8567
|
-
if (value ===
|
|
8568
|
-
const reason = promptReason("人工编辑画像");
|
|
8735
|
+
const value = await showInputDialog(`编辑画像「${fact.category}/${fact.factKey}」的新值`, fact.value);
|
|
8736
|
+
if (value === void 0 || value.trim() === "") return;
|
|
8737
|
+
const reason = await promptReason("人工编辑画像");
|
|
8569
8738
|
if (reason === void 0) return;
|
|
8570
8739
|
await actions.humanEditFact({
|
|
8571
8740
|
factId: fact.id,
|
|
@@ -8580,7 +8749,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8580
8749
|
refresh
|
|
8581
8750
|
]);
|
|
8582
8751
|
const runDeleteFact = (0, react.useCallback)(async (fact) => {
|
|
8583
|
-
const reason = promptReason(`删除画像「${fact.category}/${fact.factKey}」(墓碑保留)`);
|
|
8752
|
+
const reason = await promptReason(`删除画像「${fact.category}/${fact.factKey}」(墓碑保留)`);
|
|
8584
8753
|
if (reason === void 0) return;
|
|
8585
8754
|
await actions.humanDeleteFact({
|
|
8586
8755
|
factId: fact.id,
|
|
@@ -8622,7 +8791,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8622
8791
|
factSources
|
|
8623
8792
|
]);
|
|
8624
8793
|
const runSetConcernStatus = (0, react.useCallback)(async (tree, status) => {
|
|
8625
|
-
const reason = promptReason(`把关心事项「${tree.concern.title}」改为 ${CONCERN_STATUS_LABELS[status] ?? status}`);
|
|
8794
|
+
const reason = await promptReason(`把关心事项「${tree.concern.title}」改为 ${CONCERN_STATUS_LABELS[status] ?? status}`);
|
|
8626
8795
|
if (reason === void 0) return;
|
|
8627
8796
|
await actions.humanSetConcernStatus({
|
|
8628
8797
|
id: tree.concern.id,
|
|
@@ -8637,7 +8806,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8637
8806
|
refresh
|
|
8638
8807
|
]);
|
|
8639
8808
|
const runDeleteConcern = (0, react.useCallback)(async (tree) => {
|
|
8640
|
-
const reason = promptReason(`删除关心事项「${tree.concern.title}」及其更新(墓碑保留)`);
|
|
8809
|
+
const reason = await promptReason(`删除关心事项「${tree.concern.title}」及其更新(墓碑保留)`);
|
|
8641
8810
|
if (reason === void 0) return;
|
|
8642
8811
|
await actions.humanDeleteConcern({
|
|
8643
8812
|
id: tree.concern.id,
|
|
@@ -9466,7 +9635,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9466
9635
|
setNotice(null);
|
|
9467
9636
|
};
|
|
9468
9637
|
const submitExperience = async () => {
|
|
9469
|
-
const reason = promptReason("人工注入经验(固定格式)");
|
|
9638
|
+
const reason = await promptReason("人工注入经验(固定格式)");
|
|
9470
9639
|
if (reason === void 0) return;
|
|
9471
9640
|
if (gist.trim() === "" || family.trim() === "" || situation.trim() === "" || path.trim() === "" || reasoning.trim() === "") {
|
|
9472
9641
|
setError("固定格式不完整:任务族、摘要、情境、路径、判断背景均为必填。");
|
|
@@ -9517,7 +9686,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9517
9686
|
setError("负经验必须填写确认的失败原因。");
|
|
9518
9687
|
return;
|
|
9519
9688
|
}
|
|
9520
|
-
const reason = promptReason("人工摄取(固定格式 + 出处,产出候选待验证)");
|
|
9689
|
+
const reason = await promptReason("人工摄取(固定格式 + 出处,产出候选待验证)");
|
|
9521
9690
|
if (reason === void 0) return;
|
|
9522
9691
|
try {
|
|
9523
9692
|
const result = await actions.ingest({
|
|
@@ -9557,7 +9726,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9557
9726
|
setError("编辑需要先填写经验 id。");
|
|
9558
9727
|
return;
|
|
9559
9728
|
}
|
|
9560
|
-
const reason = promptReason("人工编辑经验");
|
|
9729
|
+
const reason = await promptReason("人工编辑经验");
|
|
9561
9730
|
if (reason === void 0) return;
|
|
9562
9731
|
try {
|
|
9563
9732
|
const snapshot = await actions.humanEditExperience({
|
|
@@ -9578,7 +9747,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9578
9747
|
}
|
|
9579
9748
|
};
|
|
9580
9749
|
const submitFact = async () => {
|
|
9581
|
-
const reason = promptReason("人工添加画像");
|
|
9750
|
+
const reason = await promptReason("人工添加画像");
|
|
9582
9751
|
if (reason === void 0) return;
|
|
9583
9752
|
if (factKey.trim() === "" || factValue.trim() === "") {
|
|
9584
9753
|
setError("画像的键与值均为必填。");
|
|
@@ -10047,9 +10216,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10047
10216
|
/**
|
|
10048
10217
|
* Memory workbench takeover: covers the frame area to the right of the
|
|
10049
10218
|
* sidebar while a monitoring page is selected. The entry point is the
|
|
10050
|
-
*
|
|
10051
|
-
* inside this panel as a tab bar so all
|
|
10052
|
-
*
|
|
10219
|
+
* conversation.session.header.utilities button (MemoryHeaderAction, left of
|
|
10220
|
+
* Session log); page switching lives inside this panel as a tab bar so all
|
|
10221
|
+
* four pages remain reachable. Opening a session row clears the selection
|
|
10053
10222
|
* and returns to the native conversation view. All human mutations go through
|
|
10054
10223
|
* the audited Remote callbacks.
|
|
10055
10224
|
*/
|
|
@@ -10057,16 +10226,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10057
10226
|
function formatTs(ts) {
|
|
10058
10227
|
return new Date(ts).toLocaleString("zh-CN", { hour12: false });
|
|
10059
10228
|
}
|
|
10060
|
-
/**
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
window.alert("原因是必填项:人工操作必须可审计。");
|
|
10067
|
-
return;
|
|
10068
|
-
}
|
|
10069
|
-
return trimmed;
|
|
10229
|
+
/**
|
|
10230
|
+
* Confirmation prompt with an audited reason; resolves undefined when cancelled.
|
|
10231
|
+
* Uses the custom ReasonDialog instead of the browser's native window.prompt.
|
|
10232
|
+
*/
|
|
10233
|
+
async function promptReason(action) {
|
|
10234
|
+
return showReasonDialog(action);
|
|
10070
10235
|
}
|
|
10071
10236
|
/**
|
|
10072
10237
|
* The workbench entry component. Renders nothing unless a monitoring page is
|
|
@@ -10200,7 +10365,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10200
10365
|
onChanged: refreshStats
|
|
10201
10366
|
})
|
|
10202
10367
|
]
|
|
10203
|
-
})
|
|
10368
|
+
}),
|
|
10369
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReasonDialogHost, {})
|
|
10204
10370
|
]
|
|
10205
10371
|
});
|
|
10206
10372
|
}
|
|
@@ -10224,7 +10390,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10224
10390
|
}
|
|
10225
10391
|
/**
|
|
10226
10392
|
* Client plugin body: mount the memory Remote contribution, then register the
|
|
10227
|
-
*
|
|
10393
|
+
* header entry and the overlay takeover sharing one nav store handle.
|
|
10228
10394
|
* @param ctx - client root context.
|
|
10229
10395
|
* @returns disposer after both entries and the Remote namespace unregister.
|
|
10230
10396
|
*/
|
|
@@ -10276,12 +10442,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10276
10442
|
ingest: async (session, request) => unwrap(await memory.ingest(session, request))
|
|
10277
10443
|
};
|
|
10278
10444
|
const navStore = createMemoryNavStore();
|
|
10279
|
-
const disposeNav = ctx.slots.inject("
|
|
10280
|
-
name: "
|
|
10445
|
+
const disposeNav = ctx.slots.inject("conversation.session.header.utilities", () => ctx.slots.register({
|
|
10446
|
+
name: "conversation.session.header.utilities",
|
|
10281
10447
|
id: "memory-nav",
|
|
10282
|
-
order:
|
|
10448
|
+
order: -10,
|
|
10283
10449
|
store: navStore
|
|
10284
|
-
},
|
|
10450
|
+
}, MemoryHeaderAction));
|
|
10285
10451
|
const disposeOverlay = ctx.slots.inject("shell.overlay", () => ctx.slots.register({
|
|
10286
10452
|
name: "shell.overlay",
|
|
10287
10453
|
id: "memory-workbench",
|