@yolk_vat-y/dsh-project-memory 0.6.7 → 0.6.9
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/CHANGELOG.md +56 -0
- package/README.md +10 -9
- package/README.zh-CN.md +10 -9
- package/client/client.js +518 -144
- package/client/client.js.map +1 -1
- package/cordis.patch.yml +4 -0
- package/package.json +4 -4
- package/src/auto-inject.js +4 -2
- package/src/client/SettingsCard.module.css +185 -0
- package/src/client/client.ts +4 -1
- package/src/client/locales.ts +31 -0
- package/src/client/settings-card.tsx +346 -0
- package/src/enhancer.js +7 -3
- package/src/index-failures.js +46 -0
- package/src/index-pipeline.js +26 -7
- package/src/index.js +36 -11
- package/src/insight-store.js +6 -1
- package/src/lazy.js +208 -43
- package/src/parsers/pdfjs-parser.js +33 -4
- package/src/setup/taskbridge.js +5 -2
- package/src/store.js +211 -80
- package/src/tools/index-doc.js +24 -4
- package/src/tools/index-repo.js +18 -6
- package/src/tools/query-memory.js +20 -8
- package/src/tools/stats.js +8 -0
- package/src/tools/watch-repo.js +10 -7
- package/src/util/config.js +65 -0
- package/src/util/fs.js +144 -23
- package/src/watch.js +81 -7
package/client/client.js
CHANGED
|
@@ -169,7 +169,22 @@ window.__ModuleLoader__.load({
|
|
|
169
169
|
"slash.group": "工作流",
|
|
170
170
|
"slash.tasks-desc": "任务清单:步骤进度、涉及文件、当前会话绑定",
|
|
171
171
|
"slash.project-desc": "项目记忆:本项目的教训 / 决策 / 流程",
|
|
172
|
-
"slash.global-desc": "全局记忆:跨项目的经验条目"
|
|
172
|
+
"slash.global-desc": "全局记忆:跨项目的经验条目",
|
|
173
|
+
"settings.title": "常用设置",
|
|
174
|
+
"settings.subtitle": "保存后立即生效(启动时全量索引除外);其余配置在 profile 的 cordis.patch.yml 里。",
|
|
175
|
+
"settings.unsaved": "未保存",
|
|
176
|
+
"settings.autoIndexOnFirstUse.title": "启动时全量索引",
|
|
177
|
+
"settings.autoIndexOnFirstUse.hint": "插件加载后扫描当前工作目录;打开后从下次启动开始生效。",
|
|
178
|
+
"settings.watchInterval.title": "刷新间隔",
|
|
179
|
+
"settings.watchInterval.hint": "后台自动刷新索引的频率(秒)。回合进行中降频,空闲时最多退避到 2 分钟。",
|
|
180
|
+
"settings.llmQueryExpansion.title": "检索时扩展查询",
|
|
181
|
+
"settings.llmQueryExpansion.hint": "让模型先改写几条变体查询再检索,命中更准,但会消耗 token。",
|
|
182
|
+
"settings.unit.seconds": "秒",
|
|
183
|
+
"settings.form.unavailable": "设置不可用:宿主没有提供本插件的配置命名空间。",
|
|
184
|
+
"settings.form.readOnly": "当前部署只读,改动无法保存。",
|
|
185
|
+
"settings.form.saveFailed": "宿主没有接受这次保存,请检查取值。",
|
|
186
|
+
"settings.form.save": "保存",
|
|
187
|
+
"settings.form.saving": "保存中…"
|
|
173
188
|
};
|
|
174
189
|
const en = {
|
|
175
190
|
"panel.title": "Task Flow",
|
|
@@ -254,7 +269,22 @@ window.__ModuleLoader__.load({
|
|
|
254
269
|
"slash.group": "Workflow",
|
|
255
270
|
"slash.tasks-desc": "Task list: progress, involved files, current session binding",
|
|
256
271
|
"slash.project-desc": "Project memory: this project’s lessons / decisions / procedures",
|
|
257
|
-
"slash.global-desc": "Global memory: experience entries shared across projects"
|
|
272
|
+
"slash.global-desc": "Global memory: experience entries shared across projects",
|
|
273
|
+
"settings.title": "Common settings",
|
|
274
|
+
"settings.subtitle": "Saved changes apply immediately, except the startup full index; the rest stays in the profile’s cordis.patch.yml.",
|
|
275
|
+
"settings.unsaved": "Unsaved",
|
|
276
|
+
"settings.autoIndexOnFirstUse.title": "Full index on startup",
|
|
277
|
+
"settings.autoIndexOnFirstUse.hint": "Scan the current working directory after the plugin loads; takes effect from the next start.",
|
|
278
|
+
"settings.watchInterval.title": "Refresh interval",
|
|
279
|
+
"settings.watchInterval.hint": "How often the index refreshes in the background, in seconds. Slower during a turn, up to two minutes when idle.",
|
|
280
|
+
"settings.llmQueryExpansion.title": "Expand queries",
|
|
281
|
+
"settings.llmQueryExpansion.hint": "Ask the model for a few query variants before search: better recall, spends tokens.",
|
|
282
|
+
"settings.unit.seconds": "s",
|
|
283
|
+
"settings.form.unavailable": "Settings unavailable: the host serves no configuration namespace for this plugin.",
|
|
284
|
+
"settings.form.readOnly": "This deployment is read-only; changes cannot be saved.",
|
|
285
|
+
"settings.form.saveFailed": "The host rejected this save; check the values.",
|
|
286
|
+
"settings.form.save": "Save",
|
|
287
|
+
"settings.form.saving": "Saving…"
|
|
258
288
|
};
|
|
259
289
|
function createTranslate(dict) {
|
|
260
290
|
return (key, params) => {
|
|
@@ -954,109 +984,109 @@ window.__ModuleLoader__.load({
|
|
|
954
984
|
}
|
|
955
985
|
//#endregion
|
|
956
986
|
//#region \0dsh-css:src/client/TaskPanel.module.css.mjs
|
|
957
|
-
const css$1 = ".vZSZnG_panel{pointer-events:auto;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-base,#fff));border:1px solid var(--dsw-alias-border-l2,#7f7f7f4d);border-radius:14px;flex-direction:column;width:380px;max-width:calc(100vw - 24px);max-height:min(70vh,640px);font-family:inherit;animation:.18s ease-out vZSZnG_panelIn;display:flex;position:fixed;overflow:hidden;box-shadow:0 12px 32px #00000029,0 2px 8px #00000014}@keyframes vZSZnG_panelIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}.vZSZnG_dragHandle{cursor:grab;z-index:1;justify-content:center;align-items:center;height:12px;display:flex;position:absolute;top:0;left:0;right:0}.vZSZnG_dragHandle:active{cursor:grabbing}.vZSZnG_handleGrip{background:var(--dsw-alias-separator-primary,#7f7f7f59);opacity:.8;border-radius:2px;width:32px;height:3px}.vZSZnG_header{border-bottom:1px solid var(--dsw-alias-border-l1,#7f7f7f2e);-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;gap:8px;padding:10px 10px 8px 14px;display:flex}.vZSZnG_headerLeft{align-items:center;gap:6px;min-width:0;display:flex}.vZSZnG_headerIcon{color:var(--dsw-alias-label-secondary);flex:none}.vZSZnG_headerTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;margin:0;font-size:13px;font-weight:600;line-height:20px}.vZSZnG_headerRight{align-items:center;gap:2px;margin-left:auto;display:flex}.vZSZnG_hintsOff{opacity:.45}.vZSZnG_hintsOff:hover{opacity:.75}.vZSZnG_counts{color:var(--dsw-alias-label-tertiary);white-space:nowrap;margin-right:4px;font-size:11px;line-height:16px}.vZSZnG_boundBadge{color:var(--dsw-alias-label-primary-foreground,#fff);background:var(--dsw-alias-button-primary-fill,#3a6ef5);white-space:nowrap;border-radius:7px;flex:none;padding:0 6px;font-size:10px;line-height:14px}.vZSZnG_notice{color:var(--dsw-alias-state-warn-label,#b7791f);background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1a);word-break:break-all;border-radius:8px;margin:8px 12px 0;padding:6px 10px;font-size:12px;line-height:18px}.vZSZnG_taskList{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-scrollbar-bg-l2,transparent) transparent;flex-direction:column;gap:6px;padding:8px;display:flex;overflow-y:auto}.vZSZnG_emptyState{text-align:center;color:var(--dsw-alias-label-secondary);padding:36px 24px 30px}.vZSZnG_emptyTitle{color:var(--dsw-alias-label-primary);margin:0 0 6px;font-size:13px;font-weight:600}.vZSZnG_emptyDesc{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:20px}.vZSZnG_syncHint{color:var(--dsw-alias-label-dimmed);justify-content:center;align-items:center;gap:6px;margin:10px 0 0;font-size:11px;display:flex}.vZSZnG_card{border:1px solid var(--dsw-alias-border-l1,#7f7f7f29);background:var(--dsw-alias-bg-base,transparent);content-visibility:auto;contain-intrinsic-size:auto 140px;border-radius:10px;transition:border-color .15s;overflow:hidden}.vZSZnG_cardBound{border-color:var(--dsw-alias-border-l3,#7f7f7f59);box-shadow:inset 0 0 0 .5px var(--dsw-alias-border-l3,transparent)}.vZSZnG_cardHead{cursor:pointer;text-align:left;background:0 0;border:none;justify-content:space-between;align-items:center;gap:8px;width:100%;padding:8px 10px 7px;display:flex}.vZSZnG_cardHead:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.vZSZnG_cardTitleRow{align-items:center;gap:6px;min-width:0;display:flex}.vZSZnG_cardTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.vZSZnG_cardMeta{color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:8px;display:flex}.vZSZnG_progressText{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);font-size:11px;line-height:16px}.vZSZnG_updated{color:var(--dsw-alias-label-dimmed);font-size:10px;line-height:14px}.vZSZnG_chevron{color:var(--dsw-alias-label-tertiary);display:inline-flex}.vZSZnG_track{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1f);border-radius:1px;height:2px;margin:0 10px 6px;overflow:hidden}.vZSZnG_trackFill{background:var(--dsw-alias-label-primary-bluish,var(--dsw-alias-button-primary-fill,#3a6ef5));border-radius:1px;height:100%;transition:width .2s}.vZSZnG_cardBody{border-top:1px solid var(--dsw-alias-border-l1,#7f7f7f24);overscroll-behavior:contain;max-height:300px;padding:8px 10px 10px;overflow-y:auto}.vZSZnG_section{margin-bottom:8px}.vZSZnG_section:last-child{margin-bottom:0}.vZSZnG_sectionLabel{color:var(--dsw-alias-label-secondary);align-items:center;gap:6px;margin-bottom:4px;font-size:11px;line-height:16px;display:flex}.vZSZnG_sectionCount{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1a);color:var(--dsw-alias-label-tertiary);border-radius:6px;padding:0 5px;font-size:10px;line-height:14px}.vZSZnG_stepsList{flex-direction:column;gap:1px;margin:0;padding:0;list-style:none;display:flex}.vZSZnG_stepRow{align-items:flex-start;gap:7px;padding:3px 2px;display:flex}.vZSZnG_stepRow>svg{flex:none;margin-top:2px}.vZSZnG_stepDone{color:var(--dsw-alias-label-dimmed)}.vZSZnG_stepRun{color:var(--dsw-alias-label-primary-bluish,#3a6ef5)}.vZSZnG_stepPending{background:var(--dsw-alias-border-l3,#7f7f7f80);border-radius:50%;flex:none;width:8px;height:8px;margin:5px 3px}.vZSZnG_stepContent{color:var(--dsw-alias-label-secondary);word-break:break-word;white-space:pre-wrap;font-size:12px;line-height:20px}.vZSZnG_stepContentDone{color:var(--dsw-alias-label-dimmed);text-decoration:line-through}.vZSZnG_stepContentRun{color:var(--dsw-alias-label-primary)}.vZSZnG_muted{color:var(--dsw-alias-label-dimmed);font-size:11px;line-height:18px}.vZSZnG_filesList{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.vZSZnG_fileRow{cursor:pointer;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:6px;width:100%;padding:3px 4px;display:flex}.vZSZnG_fileRow:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.vZSZnG_fileDot{background:var(--dsw-alias-border-l3,#7f7f7f80);border-radius:50%;flex:none;width:5px;height:5px}.vZSZnG_filePath{color:var(--dsw-alias-label-secondary);white-space:nowrap;text-overflow:ellipsis;text-align:left;direction:rtl;font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:11px;line-height:18px;overflow:hidden}.vZSZnG_fileLine{color:var(--dsw-alias-label-dimmed);flex:none;font-size:10px;line-height:18px}.vZSZnG_cardFooter{gap:6px;margin-top:8px;display:flex}@media (prefers-reduced-motion:reduce){.vZSZnG_panel{animation:none}.vZSZnG_trackFill,.vZSZnG_card{transition:none}}.vZSZnG_miniBar{border:1px solid var(--dsw-alias-border-l3,#7f7f7f4d);background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-base,#fff));max-width:min(46vw,340px);height:34px;color:var(--dsw-alias-label-primary);cursor:grab;-webkit-user-select:none;user-select:none;pointer-events:auto;border-radius:999px;align-items:center;gap:7px;padding:0 12px;font-size:12px;line-height:18px;transition:background .15s,border-color .15s;display:inline-flex;position:fixed;box-shadow:0 6px 20px #00000024,0 1px 4px #00000014}.vZSZnG_miniBar:active{cursor:grabbing}.vZSZnG_miniBar:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.vZSZnG_miniIcon{color:var(--dsw-alias-label-secondary);flex:none}.vZSZnG_miniText{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.vZSZnG_miniChevron{color:var(--dsw-alias-label-tertiary);flex:none}.vZSZnG_taskList{flex:auto;min-height:0}.vZSZnG_card{flex-direction:column;display:flex}.vZSZnG_boundaryFallback{border:1px solid var(--dsw-alias-border-l3,#7f7f7f4d);background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-secondary);cursor:pointer;pointer-events:auto;border-radius:999px;padding:4px 10px;font-size:12px;line-height:18px;position:fixed;top:64px;right:16px}.vZSZnG_stepToggle{cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;align-items:center;margin-top:2px;padding:0;display:inline-flex}.vZSZnG_stepToggle:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1f)}.vZSZnG_stepToggle:disabled{cursor:default;opacity:.5}.vZSZnG_stepEditable{cursor:text;border-radius:3px}.vZSZnG_stepEditable:hover{outline:1px dashed var(--dsw-alias-border-l3,#7f7f7f66);outline-offset:1px}.vZSZnG_stepInput{box-sizing:border-box;width:auto;min-width:0;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-base,transparent);border:1px solid var(--dsw-alias-border-l3,#7f7f7f73);border-radius:5px;flex:auto;padding:0 5px;font-size:12px;line-height:20px}.vZSZnG_editorArea{box-sizing:border-box;min-width:0;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-base,transparent);border:1px solid var(--dsw-alias-border-l3,#7f7f7f73);resize:none;vertical-align:middle;cursor:text;white-space:pre-wrap;word-break:break-word;border-radius:5px;flex:1;margin:0;padding:2px 5px;font-family:inherit;font-size:12px;line-height:20px;overflow:hidden}.vZSZnG_editorArea:focus{border-color:var(--dsw-alias-border-l3,#7f7f7f99);outline:none}.vZSZnG_stepDragging{opacity:.3;background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.vZSZnG_cardTitleEditable{cursor:text;border-radius:3px}.vZSZnG_cardTitleEditable:hover{outline:1px dashed var(--dsw-alias-border-l3,#7f7f7f66);outline-offset:1px}.vZSZnG_panel[data-theme=glass],.vZSZnG_miniBar[data-theme=glass]{background:color-mix(in srgb, var(--dsw-alias-bg-layer-2,#fff) 90%, transparent);-webkit-backdrop-filter:blur(18px)saturate(1.2);border:1px solid color-mix(in srgb, var(--dsw-alias-border-l2,#7f7f7f4d) 80%, transparent)}.vZSZnG_panel[data-theme=glass] .vZSZnG_card{background:color-mix(in srgb, var(--dsw-alias-bg-base,transparent) 84%, transparent);border-color:color-mix(in srgb, var(--dsw-alias-border-l1,#7f7f7f29) 60%, transparent)}.vZSZnG_panel[data-theme=glass] .vZSZnG_cardBody{border-top-color:color-mix(in srgb, var(--dsw-alias-border-l1,#7f7f7f24) 60%, transparent)}@media (prefers-reduced-transparency:reduce){.vZSZnG_panel[data-theme=glass],.vZSZnG_miniBar[data-theme=glass]{background:var(--dsw-alias-bg-layer-2,#fff);-webkit-backdrop-filter:none;backdrop-filter:none}.vZSZnG_panel[data-theme=glass] .vZSZnG_card{background:var(--dsw-alias-bg-base,transparent)}}@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.vZSZnG_panel[data-theme=glass],.vZSZnG_miniBar[data-theme=glass]{background:var(--dsw-alias-bg-layer-2,#fff)}}.vZSZnG_panel[data-theme=brutal]{box-shadow:none;border-width:1px;border-radius:6px}.vZSZnG_panel[data-theme=brutal] .vZSZnG_card{border:1px solid var(--dsw-alias-border-l3,#7f7f7f6b);background:var(--dsw-alias-bg-base,transparent);box-shadow:none;border-radius:3px}.vZSZnG_panel[data-theme=brutal] .vZSZnG_cardHead{padding:7px 10px 6px}.vZSZnG_panel[data-theme=brutal] .vZSZnG_cardTitle{letter-spacing:.01em;font-weight:650}.vZSZnG_panel[data-theme=brutal] .vZSZnG_headerTitle{letter-spacing:.03em}.vZSZnG_panel[data-theme=brutal] .vZSZnG_boundBadge{border-radius:2px}.vZSZnG_panel[data-theme=brutal] .vZSZnG_track{border-radius:0;height:3px}.vZSZnG_panel[data-theme=brutal] .vZSZnG_trackFill{border-radius:0}.vZSZnG_panel[data-theme=brutal] .vZSZnG_cardBody{border-top:1px solid var(--dsw-alias-border-l2,#7f7f7f3d)}.vZSZnG_panel[data-theme=mono] .vZSZnG_headerTitle,.vZSZnG_panel[data-theme=mono] .vZSZnG_counts,.vZSZnG_panel[data-theme=mono] .vZSZnG_cardTitle,.vZSZnG_panel[data-theme=mono] .vZSZnG_progressText,.vZSZnG_panel[data-theme=mono] .vZSZnG_stepContent,.vZSZnG_panel[data-theme=mono] .vZSZnG_filePath{font-family:ui-monospace,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.vZSZnG_panel[data-theme=mono] .vZSZnG_cardTitle{font-size:12px}.vZSZnG_panel[data-theme=mono] .vZSZnG_stepContent{font-size:11.5px}.vZSZnG_panel[data-theme=mono] .vZSZnG_card{border-radius:5px}.vZSZnG_panel[data-theme=mono] .vZSZnG_trackFill{border-radius:0}.vZSZnG_panel[data-theme=mono] .vZSZnG_stepPending{border-radius:1px}.vZSZnG_panel[data-theme=mono] .vZSZnG_updated{letter-spacing:.02em}.vZSZnG_headerIconBtn{color:inherit;cursor:pointer;background:0 0;border:none;border-radius:0;flex:none;justify-content:center;align-items:center;margin:0;padding:0;display:inline-flex}.vZSZnG_headerIcon{color:var(--dsw-alias-label-secondary);flex:none;display:block}.vZSZnG_headerLeft{min-width:0}.vZSZnG_headerTitle{text-overflow:ellipsis;flex:0 auto;min-width:0;overflow:hidden}.vZSZnG_headerRight{min-width:0}.vZSZnG_counts{text-overflow:ellipsis;flex:none;max-width:45%;margin-left:auto;overflow:hidden}.vZSZnG_dragGhost{pointer-events:none;z-index:9999;transition:left 50ms,top 50ms;position:fixed;transform:translate(-50%,-50%)}.vZSZnG_dragGhostCard{background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-base,#fff));border:1px solid var(--dsw-alias-border-l3,#7f7f7f59);color:var(--dsw-alias-label-primary);white-space:nowrap;border-radius:8px;align-items:center;gap:8px;max-width:280px;padding:8px 12px;font-size:12px;line-height:20px;display:inline-flex;transform:scale(.9);box-shadow:0 8px 24px #0000002e,0 2px 8px #0000001a}.vZSZnG_dragGhostContent{text-overflow:ellipsis;word-break:break-word;flex:1;min-width:0;overflow:hidden}.vZSZnG_dragGhostClose{width:20px;height:20px;color:var(--dsw-alias-label-tertiary);cursor:pointer;opacity:.6;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;margin-left:8px;font-size:16px;line-height:1;transition:opacity .15s,background .15s,color .15s;display:inline-flex}.vZSZnG_dragGhostClose:hover{opacity:1;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1f)}.vZSZnG_dropTargetBefore{position:relative}.vZSZnG_dropTargetBefore:before{content:\"\";background:var(--dsw-alias-button-primary-fill,#3a6ef5);height:2px;box-shadow:0 0 4px var(--dsw-alias-button-primary-fill,#3a6ef5);border-radius:1px;animation:.8s ease-in-out infinite vZSZnG_dropPulse;position:absolute;top:-1px;left:0;right:0}.vZSZnG_dropTargetAfter{position:relative}.vZSZnG_dropTargetAfter:after{content:\"\";background:var(--dsw-alias-button-primary-fill,#3a6ef5);height:2px;box-shadow:0 0 4px var(--dsw-alias-button-primary-fill,#3a6ef5);border-radius:1px;animation:.8s ease-in-out infinite vZSZnG_dropPulse;position:absolute;bottom:-1px;left:0;right:0}@keyframes vZSZnG_dropPulse{0%,to{opacity:.6}50%{opacity:1}}.vZSZnG_memoryPane{flex-direction:column;gap:6px;max-height:480px;padding:8px 10px 10px;display:flex;overflow:auto}.vZSZnG_memToolbar{justify-content:space-between;align-items:center;gap:8px;display:flex}.vZSZnG_memCount{opacity:.75;font-size:12px;font-weight:600}.vZSZnG_memList{flex-direction:column;gap:6px;display:flex}.vZSZnG_memSentinel{flex:none;height:1px}.vZSZnG_memFooter{flex-direction:column;align-items:center;gap:4px;padding:6px 0 2px;font-size:12px;display:flex}.vZSZnG_memRow{border:1px solid var(--dsw-border-weak,#80808040);background:color-mix(in srgb, var(--dsw-bg-secondary,#f5f5f5) 45%, transparent);content-visibility:auto;contain-intrinsic-size:auto 76px;border-radius:6px;flex-direction:column;gap:4px;padding:6px 8px;display:flex}.vZSZnG_memRowArchived{opacity:.55}.vZSZnG_memRowMain{flex-direction:column;gap:2px;display:flex}.vZSZnG_memTitle{word-break:break-word;align-items:flex-start;gap:6px;font-size:13px;line-height:1.35;display:flex}.vZSZnG_kindBadge{background:var(--dsw-accent-soft,#5078ff26);color:var(--dsw-accent,#4d6bfe);border-radius:4px;flex:none;padding:0 5px;font-size:11px;line-height:1.5}.vZSZnG_memMeta{flex-wrap:wrap;align-items:center;gap:4px;display:flex}.vZSZnG_badge{background:color-mix(in srgb, var(--dsw-fg,#222) 8%, transparent);border-radius:4px;padding:0 5px;font-size:11px;line-height:1.5}.vZSZnG_badgeDraft{color:#b26a00;background:#ffb40029}.vZSZnG_badgeArchived{opacity:.8}.vZSZnG_memBody{opacity:.8;word-break:break-word;font-size:12px}.vZSZnG_memActs{flex-wrap:wrap;gap:4px;display:flex}.vZSZnG_memToolbarActs{align-items:center;gap:6px;display:flex}.vZSZnG_memNew{border:1px solid var(--dsw-border-weak,#80808040);border-radius:6px;flex-direction:column;gap:6px;padding:8px;display:flex}.vZSZnG_memNewRow{align-items:center;gap:8px;display:flex}.vZSZnG_memLabel{opacity:.8;align-items:center;gap:6px;font-size:12px;display:inline-flex}.vZSZnG_memNew select,.vZSZnG_memNew textarea{box-sizing:border-box;width:100%}";
|
|
958
|
-
const tagId$
|
|
987
|
+
const css$2 = ".i54Wjq_panel{pointer-events:auto;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-base,#fff));border:1px solid var(--dsw-alias-border-l2,#7f7f7f4d);border-radius:14px;flex-direction:column;width:380px;max-width:calc(100vw - 24px);max-height:min(70vh,640px);font-family:inherit;animation:.18s ease-out i54Wjq_panelIn;display:flex;position:fixed;overflow:hidden;box-shadow:0 12px 32px #00000029,0 2px 8px #00000014}@keyframes i54Wjq_panelIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}.i54Wjq_dragHandle{cursor:grab;z-index:1;justify-content:center;align-items:center;height:12px;display:flex;position:absolute;top:0;left:0;right:0}.i54Wjq_dragHandle:active{cursor:grabbing}.i54Wjq_handleGrip{background:var(--dsw-alias-separator-primary,#7f7f7f59);opacity:.8;border-radius:2px;width:32px;height:3px}.i54Wjq_header{border-bottom:1px solid var(--dsw-alias-border-l1,#7f7f7f2e);-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;gap:8px;padding:10px 10px 8px 14px;display:flex}.i54Wjq_headerLeft{align-items:center;gap:6px;min-width:0;display:flex}.i54Wjq_headerIcon{color:var(--dsw-alias-label-secondary);flex:none}.i54Wjq_headerTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;margin:0;font-size:13px;font-weight:600;line-height:20px}.i54Wjq_headerRight{align-items:center;gap:2px;margin-left:auto;display:flex}.i54Wjq_hintsOff{opacity:.45}.i54Wjq_hintsOff:hover{opacity:.75}.i54Wjq_counts{color:var(--dsw-alias-label-tertiary);white-space:nowrap;margin-right:4px;font-size:11px;line-height:16px}.i54Wjq_boundBadge{color:var(--dsw-alias-label-primary-foreground,#fff);background:var(--dsw-alias-button-primary-fill,#3a6ef5);white-space:nowrap;border-radius:7px;flex:none;padding:0 6px;font-size:10px;line-height:14px}.i54Wjq_notice{color:var(--dsw-alias-state-warn-label,#b7791f);background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1a);word-break:break-all;border-radius:8px;margin:8px 12px 0;padding:6px 10px;font-size:12px;line-height:18px}.i54Wjq_taskList{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-scrollbar-bg-l2,transparent) transparent;flex-direction:column;gap:6px;padding:8px;display:flex;overflow-y:auto}.i54Wjq_emptyState{text-align:center;color:var(--dsw-alias-label-secondary);padding:36px 24px 30px}.i54Wjq_emptyTitle{color:var(--dsw-alias-label-primary);margin:0 0 6px;font-size:13px;font-weight:600}.i54Wjq_emptyDesc{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:20px}.i54Wjq_syncHint{color:var(--dsw-alias-label-dimmed);justify-content:center;align-items:center;gap:6px;margin:10px 0 0;font-size:11px;display:flex}.i54Wjq_card{border:1px solid var(--dsw-alias-border-l1,#7f7f7f29);background:var(--dsw-alias-bg-base,transparent);content-visibility:auto;contain-intrinsic-size:auto 140px;border-radius:10px;transition:border-color .15s;overflow:hidden}.i54Wjq_cardBound{border-color:var(--dsw-alias-border-l3,#7f7f7f59);box-shadow:inset 0 0 0 .5px var(--dsw-alias-border-l3,transparent)}.i54Wjq_cardHead{cursor:pointer;text-align:left;background:0 0;border:none;justify-content:space-between;align-items:center;gap:8px;width:100%;padding:8px 10px 7px;display:flex}.i54Wjq_cardHead:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.i54Wjq_cardTitleRow{align-items:center;gap:6px;min-width:0;display:flex}.i54Wjq_cardTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.i54Wjq_cardMeta{color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:8px;display:flex}.i54Wjq_progressText{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);font-size:11px;line-height:16px}.i54Wjq_updated{color:var(--dsw-alias-label-dimmed);font-size:10px;line-height:14px}.i54Wjq_chevron{color:var(--dsw-alias-label-tertiary);display:inline-flex}.i54Wjq_track{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1f);border-radius:1px;height:2px;margin:0 10px 6px;overflow:hidden}.i54Wjq_trackFill{background:var(--dsw-alias-label-primary-bluish,var(--dsw-alias-button-primary-fill,#3a6ef5));border-radius:1px;height:100%;transition:width .2s}.i54Wjq_cardBody{border-top:1px solid var(--dsw-alias-border-l1,#7f7f7f24);overscroll-behavior:contain;max-height:300px;padding:8px 10px 10px;overflow-y:auto}.i54Wjq_section{margin-bottom:8px}.i54Wjq_section:last-child{margin-bottom:0}.i54Wjq_sectionLabel{color:var(--dsw-alias-label-secondary);align-items:center;gap:6px;margin-bottom:4px;font-size:11px;line-height:16px;display:flex}.i54Wjq_sectionCount{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1a);color:var(--dsw-alias-label-tertiary);border-radius:6px;padding:0 5px;font-size:10px;line-height:14px}.i54Wjq_stepsList{flex-direction:column;gap:1px;margin:0;padding:0;list-style:none;display:flex}.i54Wjq_stepRow{align-items:flex-start;gap:7px;padding:3px 2px;display:flex}.i54Wjq_stepRow>svg{flex:none;margin-top:2px}.i54Wjq_stepDone{color:var(--dsw-alias-label-dimmed)}.i54Wjq_stepRun{color:var(--dsw-alias-label-primary-bluish,#3a6ef5)}.i54Wjq_stepPending{background:var(--dsw-alias-border-l3,#7f7f7f80);border-radius:50%;flex:none;width:8px;height:8px;margin:5px 3px}.i54Wjq_stepContent{color:var(--dsw-alias-label-secondary);word-break:break-word;white-space:pre-wrap;font-size:12px;line-height:20px}.i54Wjq_stepContentDone{color:var(--dsw-alias-label-dimmed);text-decoration:line-through}.i54Wjq_stepContentRun{color:var(--dsw-alias-label-primary)}.i54Wjq_muted{color:var(--dsw-alias-label-dimmed);font-size:11px;line-height:18px}.i54Wjq_filesList{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.i54Wjq_fileRow{cursor:pointer;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:6px;width:100%;padding:3px 4px;display:flex}.i54Wjq_fileRow:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.i54Wjq_fileDot{background:var(--dsw-alias-border-l3,#7f7f7f80);border-radius:50%;flex:none;width:5px;height:5px}.i54Wjq_filePath{color:var(--dsw-alias-label-secondary);white-space:nowrap;text-overflow:ellipsis;text-align:left;direction:rtl;font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:11px;line-height:18px;overflow:hidden}.i54Wjq_fileLine{color:var(--dsw-alias-label-dimmed);flex:none;font-size:10px;line-height:18px}.i54Wjq_cardFooter{gap:6px;margin-top:8px;display:flex}@media (prefers-reduced-motion:reduce){.i54Wjq_panel{animation:none}.i54Wjq_trackFill,.i54Wjq_card{transition:none}}.i54Wjq_miniBar{border:1px solid var(--dsw-alias-border-l3,#7f7f7f4d);background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-base,#fff));max-width:min(46vw,340px);height:34px;color:var(--dsw-alias-label-primary);cursor:grab;-webkit-user-select:none;user-select:none;pointer-events:auto;border-radius:999px;align-items:center;gap:7px;padding:0 12px;font-size:12px;line-height:18px;transition:background .15s,border-color .15s;display:inline-flex;position:fixed;box-shadow:0 6px 20px #00000024,0 1px 4px #00000014}.i54Wjq_miniBar:active{cursor:grabbing}.i54Wjq_miniBar:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.i54Wjq_miniIcon{color:var(--dsw-alias-label-secondary);flex:none}.i54Wjq_miniText{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.i54Wjq_miniChevron{color:var(--dsw-alias-label-tertiary);flex:none}.i54Wjq_taskList{flex:auto;min-height:0}.i54Wjq_card{flex-direction:column;display:flex}.i54Wjq_boundaryFallback{border:1px solid var(--dsw-alias-border-l3,#7f7f7f4d);background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-secondary);cursor:pointer;pointer-events:auto;border-radius:999px;padding:4px 10px;font-size:12px;line-height:18px;position:fixed;top:64px;right:16px}.i54Wjq_stepToggle{cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;align-items:center;margin-top:2px;padding:0;display:inline-flex}.i54Wjq_stepToggle:hover{background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1f)}.i54Wjq_stepToggle:disabled{cursor:default;opacity:.5}.i54Wjq_stepEditable{cursor:text;border-radius:3px}.i54Wjq_stepEditable:hover{outline:1px dashed var(--dsw-alias-border-l3,#7f7f7f66);outline-offset:1px}.i54Wjq_stepInput{box-sizing:border-box;width:auto;min-width:0;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-base,transparent);border:1px solid var(--dsw-alias-border-l3,#7f7f7f73);border-radius:5px;flex:auto;padding:0 5px;font-size:12px;line-height:20px}.i54Wjq_editorArea{box-sizing:border-box;min-width:0;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-base,transparent);border:1px solid var(--dsw-alias-border-l3,#7f7f7f73);resize:none;vertical-align:middle;cursor:text;white-space:pre-wrap;word-break:break-word;border-radius:5px;flex:1;margin:0;padding:2px 5px;font-family:inherit;font-size:12px;line-height:20px;overflow:hidden}.i54Wjq_editorArea:focus{border-color:var(--dsw-alias-border-l3,#7f7f7f99);outline:none}.i54Wjq_stepDragging{opacity:.3;background:var(--dsw-alias-interactive-bg-hover,#7f7f7f14)}.i54Wjq_cardTitleEditable{cursor:text;border-radius:3px}.i54Wjq_cardTitleEditable:hover{outline:1px dashed var(--dsw-alias-border-l3,#7f7f7f66);outline-offset:1px}.i54Wjq_panel[data-theme=glass],.i54Wjq_miniBar[data-theme=glass]{background:color-mix(in srgb, var(--dsw-alias-bg-layer-2,#fff) 90%, transparent);-webkit-backdrop-filter:blur(18px)saturate(1.2);border:1px solid color-mix(in srgb, var(--dsw-alias-border-l2,#7f7f7f4d) 80%, transparent)}.i54Wjq_panel[data-theme=glass] .i54Wjq_card{background:color-mix(in srgb, var(--dsw-alias-bg-base,transparent) 84%, transparent);border-color:color-mix(in srgb, var(--dsw-alias-border-l1,#7f7f7f29) 60%, transparent)}.i54Wjq_panel[data-theme=glass] .i54Wjq_cardBody{border-top-color:color-mix(in srgb, var(--dsw-alias-border-l1,#7f7f7f24) 60%, transparent)}@media (prefers-reduced-transparency:reduce){.i54Wjq_panel[data-theme=glass],.i54Wjq_miniBar[data-theme=glass]{background:var(--dsw-alias-bg-layer-2,#fff);-webkit-backdrop-filter:none;backdrop-filter:none}.i54Wjq_panel[data-theme=glass] .i54Wjq_card{background:var(--dsw-alias-bg-base,transparent)}}@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.i54Wjq_panel[data-theme=glass],.i54Wjq_miniBar[data-theme=glass]{background:var(--dsw-alias-bg-layer-2,#fff)}}.i54Wjq_panel[data-theme=brutal]{box-shadow:none;border-width:1px;border-radius:6px}.i54Wjq_panel[data-theme=brutal] .i54Wjq_card{border:1px solid var(--dsw-alias-border-l3,#7f7f7f6b);background:var(--dsw-alias-bg-base,transparent);box-shadow:none;border-radius:3px}.i54Wjq_panel[data-theme=brutal] .i54Wjq_cardHead{padding:7px 10px 6px}.i54Wjq_panel[data-theme=brutal] .i54Wjq_cardTitle{letter-spacing:.01em;font-weight:650}.i54Wjq_panel[data-theme=brutal] .i54Wjq_headerTitle{letter-spacing:.03em}.i54Wjq_panel[data-theme=brutal] .i54Wjq_boundBadge{border-radius:2px}.i54Wjq_panel[data-theme=brutal] .i54Wjq_track{border-radius:0;height:3px}.i54Wjq_panel[data-theme=brutal] .i54Wjq_trackFill{border-radius:0}.i54Wjq_panel[data-theme=brutal] .i54Wjq_cardBody{border-top:1px solid var(--dsw-alias-border-l2,#7f7f7f3d)}.i54Wjq_panel[data-theme=mono] .i54Wjq_headerTitle,.i54Wjq_panel[data-theme=mono] .i54Wjq_counts,.i54Wjq_panel[data-theme=mono] .i54Wjq_cardTitle,.i54Wjq_panel[data-theme=mono] .i54Wjq_progressText,.i54Wjq_panel[data-theme=mono] .i54Wjq_stepContent,.i54Wjq_panel[data-theme=mono] .i54Wjq_filePath{font-family:ui-monospace,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.i54Wjq_panel[data-theme=mono] .i54Wjq_cardTitle{font-size:12px}.i54Wjq_panel[data-theme=mono] .i54Wjq_stepContent{font-size:11.5px}.i54Wjq_panel[data-theme=mono] .i54Wjq_card{border-radius:5px}.i54Wjq_panel[data-theme=mono] .i54Wjq_trackFill{border-radius:0}.i54Wjq_panel[data-theme=mono] .i54Wjq_stepPending{border-radius:1px}.i54Wjq_panel[data-theme=mono] .i54Wjq_updated{letter-spacing:.02em}.i54Wjq_headerIconBtn{color:inherit;cursor:pointer;background:0 0;border:none;border-radius:0;flex:none;justify-content:center;align-items:center;margin:0;padding:0;display:inline-flex}.i54Wjq_headerIcon{color:var(--dsw-alias-label-secondary);flex:none;display:block}.i54Wjq_headerLeft{min-width:0}.i54Wjq_headerTitle{text-overflow:ellipsis;flex:0 auto;min-width:0;overflow:hidden}.i54Wjq_headerRight{min-width:0}.i54Wjq_counts{text-overflow:ellipsis;flex:none;max-width:45%;margin-left:auto;overflow:hidden}.i54Wjq_dragGhost{pointer-events:none;z-index:9999;transition:left 50ms,top 50ms;position:fixed;transform:translate(-50%,-50%)}.i54Wjq_dragGhostCard{background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-base,#fff));border:1px solid var(--dsw-alias-border-l3,#7f7f7f59);color:var(--dsw-alias-label-primary);white-space:nowrap;border-radius:8px;align-items:center;gap:8px;max-width:280px;padding:8px 12px;font-size:12px;line-height:20px;display:inline-flex;transform:scale(.9);box-shadow:0 8px 24px #0000002e,0 2px 8px #0000001a}.i54Wjq_dragGhostContent{text-overflow:ellipsis;word-break:break-word;flex:1;min-width:0;overflow:hidden}.i54Wjq_dragGhostClose{width:20px;height:20px;color:var(--dsw-alias-label-tertiary);cursor:pointer;opacity:.6;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;margin-left:8px;font-size:16px;line-height:1;transition:opacity .15s,background .15s,color .15s;display:inline-flex}.i54Wjq_dragGhostClose:hover{opacity:1;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover,#7f7f7f1f)}.i54Wjq_dropTargetBefore{position:relative}.i54Wjq_dropTargetBefore:before{content:\"\";background:var(--dsw-alias-button-primary-fill,#3a6ef5);height:2px;box-shadow:0 0 4px var(--dsw-alias-button-primary-fill,#3a6ef5);border-radius:1px;animation:.8s ease-in-out infinite i54Wjq_dropPulse;position:absolute;top:-1px;left:0;right:0}.i54Wjq_dropTargetAfter{position:relative}.i54Wjq_dropTargetAfter:after{content:\"\";background:var(--dsw-alias-button-primary-fill,#3a6ef5);height:2px;box-shadow:0 0 4px var(--dsw-alias-button-primary-fill,#3a6ef5);border-radius:1px;animation:.8s ease-in-out infinite i54Wjq_dropPulse;position:absolute;bottom:-1px;left:0;right:0}@keyframes i54Wjq_dropPulse{0%,to{opacity:.6}50%{opacity:1}}.i54Wjq_memoryPane{flex-direction:column;gap:6px;max-height:480px;padding:8px 10px 10px;display:flex;overflow:auto}.i54Wjq_memToolbar{justify-content:space-between;align-items:center;gap:8px;display:flex}.i54Wjq_memCount{opacity:.75;font-size:12px;font-weight:600}.i54Wjq_memList{flex-direction:column;gap:6px;display:flex}.i54Wjq_memSentinel{flex:none;height:1px}.i54Wjq_memFooter{flex-direction:column;align-items:center;gap:4px;padding:6px 0 2px;font-size:12px;display:flex}.i54Wjq_memRow{border:1px solid var(--dsw-border-weak,#80808040);background:color-mix(in srgb, var(--dsw-bg-secondary,#f5f5f5) 45%, transparent);content-visibility:auto;contain-intrinsic-size:auto 76px;border-radius:6px;flex-direction:column;gap:4px;padding:6px 8px;display:flex}.i54Wjq_memRowArchived{opacity:.55}.i54Wjq_memRowMain{flex-direction:column;gap:2px;display:flex}.i54Wjq_memTitle{word-break:break-word;align-items:flex-start;gap:6px;font-size:13px;line-height:1.35;display:flex}.i54Wjq_kindBadge{background:var(--dsw-accent-soft,#5078ff26);color:var(--dsw-accent,#4d6bfe);border-radius:4px;flex:none;padding:0 5px;font-size:11px;line-height:1.5}.i54Wjq_memMeta{flex-wrap:wrap;align-items:center;gap:4px;display:flex}.i54Wjq_badge{background:color-mix(in srgb, var(--dsw-fg,#222) 8%, transparent);border-radius:4px;padding:0 5px;font-size:11px;line-height:1.5}.i54Wjq_badgeDraft{color:#b26a00;background:#ffb40029}.i54Wjq_badgeArchived{opacity:.8}.i54Wjq_memBody{opacity:.8;word-break:break-word;font-size:12px}.i54Wjq_memActs{flex-wrap:wrap;gap:4px;display:flex}.i54Wjq_memToolbarActs{align-items:center;gap:6px;display:flex}.i54Wjq_memNew{border:1px solid var(--dsw-border-weak,#80808040);border-radius:6px;flex-direction:column;gap:6px;padding:8px;display:flex}.i54Wjq_memNewRow{align-items:center;gap:8px;display:flex}.i54Wjq_memLabel{opacity:.8;align-items:center;gap:6px;font-size:12px;display:inline-flex}.i54Wjq_memNew select,.i54Wjq_memNew textarea{box-sizing:border-box;width:100%}";
|
|
988
|
+
const tagId$2 = "@yolk_vat-y/dsh-project-memory/TaskPanel.module.css";
|
|
959
989
|
if (typeof document !== "undefined") {
|
|
960
|
-
const selector = "style[data-plugin-css=" + JSON.stringify(tagId$
|
|
990
|
+
const selector = "style[data-plugin-css=" + JSON.stringify(tagId$2) + "]";
|
|
961
991
|
const existing = document.querySelector(selector);
|
|
962
|
-
if (existing) existing.textContent = css$
|
|
992
|
+
if (existing) existing.textContent = css$2;
|
|
963
993
|
else {
|
|
964
994
|
const tag = document.createElement("style");
|
|
965
995
|
tag.dataset.plugin = "@yolk_vat-y/dsh-project-memory";
|
|
966
|
-
tag.dataset.pluginCss = tagId$
|
|
967
|
-
tag.textContent = css$
|
|
996
|
+
tag.dataset.pluginCss = tagId$2;
|
|
997
|
+
tag.textContent = css$2;
|
|
968
998
|
document.head.appendChild(tag);
|
|
969
999
|
}
|
|
970
1000
|
}
|
|
971
1001
|
var TaskPanel_module_css_default = {
|
|
972
|
-
"badge": "
|
|
973
|
-
"badgeArchived": "
|
|
974
|
-
"badgeDraft": "
|
|
975
|
-
"boundBadge": "
|
|
976
|
-
"boundaryFallback": "
|
|
977
|
-
"card": "
|
|
978
|
-
"cardBody": "
|
|
979
|
-
"cardBound": "
|
|
980
|
-
"cardFooter": "
|
|
981
|
-
"cardHead": "
|
|
982
|
-
"cardMeta": "
|
|
983
|
-
"cardTitle": "
|
|
984
|
-
"cardTitleEditable": "
|
|
985
|
-
"cardTitleRow": "
|
|
986
|
-
"chevron": "
|
|
987
|
-
"counts": "
|
|
988
|
-
"dragGhost": "
|
|
989
|
-
"dragGhostCard": "
|
|
990
|
-
"dragGhostClose": "
|
|
991
|
-
"dragGhostContent": "
|
|
992
|
-
"dragHandle": "
|
|
993
|
-
"dropPulse": "
|
|
994
|
-
"dropTargetAfter": "
|
|
995
|
-
"dropTargetBefore": "
|
|
996
|
-
"editorArea": "
|
|
997
|
-
"emptyDesc": "
|
|
998
|
-
"emptyState": "
|
|
999
|
-
"emptyTitle": "
|
|
1000
|
-
"fileDot": "
|
|
1001
|
-
"fileLine": "
|
|
1002
|
-
"filePath": "
|
|
1003
|
-
"fileRow": "
|
|
1004
|
-
"filesList": "
|
|
1005
|
-
"handleGrip": "
|
|
1006
|
-
"header": "
|
|
1007
|
-
"headerIcon": "
|
|
1008
|
-
"headerIconBtn": "
|
|
1009
|
-
"headerLeft": "
|
|
1010
|
-
"headerRight": "
|
|
1011
|
-
"headerTitle": "
|
|
1012
|
-
"hintsOff": "
|
|
1013
|
-
"kindBadge": "
|
|
1014
|
-
"memActs": "
|
|
1015
|
-
"memBody": "
|
|
1016
|
-
"memCount": "
|
|
1017
|
-
"memFooter": "
|
|
1018
|
-
"memLabel": "
|
|
1019
|
-
"memList": "
|
|
1020
|
-
"memMeta": "
|
|
1021
|
-
"memNew": "
|
|
1022
|
-
"memNewRow": "
|
|
1023
|
-
"memRow": "
|
|
1024
|
-
"memRowArchived": "
|
|
1025
|
-
"memRowMain": "
|
|
1026
|
-
"memSentinel": "
|
|
1027
|
-
"memTitle": "
|
|
1028
|
-
"memToolbar": "
|
|
1029
|
-
"memToolbarActs": "
|
|
1030
|
-
"memoryPane": "
|
|
1031
|
-
"miniBar": "
|
|
1032
|
-
"miniChevron": "
|
|
1033
|
-
"miniIcon": "
|
|
1034
|
-
"miniText": "
|
|
1035
|
-
"muted": "
|
|
1036
|
-
"notice": "
|
|
1037
|
-
"panel": "
|
|
1038
|
-
"panelIn": "
|
|
1039
|
-
"progressText": "
|
|
1040
|
-
"section": "
|
|
1041
|
-
"sectionCount": "
|
|
1042
|
-
"sectionLabel": "
|
|
1043
|
-
"stepContent": "
|
|
1044
|
-
"stepContentDone": "
|
|
1045
|
-
"stepContentRun": "
|
|
1046
|
-
"stepDone": "
|
|
1047
|
-
"stepDragging": "
|
|
1048
|
-
"stepEditable": "
|
|
1049
|
-
"stepInput": "
|
|
1050
|
-
"stepPending": "
|
|
1051
|
-
"stepRow": "
|
|
1052
|
-
"stepRun": "
|
|
1053
|
-
"stepToggle": "
|
|
1054
|
-
"stepsList": "
|
|
1055
|
-
"syncHint": "
|
|
1056
|
-
"taskList": "
|
|
1057
|
-
"track": "
|
|
1058
|
-
"trackFill": "
|
|
1059
|
-
"updated": "
|
|
1002
|
+
"badge": "i54Wjq_badge",
|
|
1003
|
+
"badgeArchived": "i54Wjq_badgeArchived",
|
|
1004
|
+
"badgeDraft": "i54Wjq_badgeDraft",
|
|
1005
|
+
"boundBadge": "i54Wjq_boundBadge",
|
|
1006
|
+
"boundaryFallback": "i54Wjq_boundaryFallback",
|
|
1007
|
+
"card": "i54Wjq_card",
|
|
1008
|
+
"cardBody": "i54Wjq_cardBody",
|
|
1009
|
+
"cardBound": "i54Wjq_cardBound",
|
|
1010
|
+
"cardFooter": "i54Wjq_cardFooter",
|
|
1011
|
+
"cardHead": "i54Wjq_cardHead",
|
|
1012
|
+
"cardMeta": "i54Wjq_cardMeta",
|
|
1013
|
+
"cardTitle": "i54Wjq_cardTitle",
|
|
1014
|
+
"cardTitleEditable": "i54Wjq_cardTitleEditable",
|
|
1015
|
+
"cardTitleRow": "i54Wjq_cardTitleRow",
|
|
1016
|
+
"chevron": "i54Wjq_chevron",
|
|
1017
|
+
"counts": "i54Wjq_counts",
|
|
1018
|
+
"dragGhost": "i54Wjq_dragGhost",
|
|
1019
|
+
"dragGhostCard": "i54Wjq_dragGhostCard",
|
|
1020
|
+
"dragGhostClose": "i54Wjq_dragGhostClose",
|
|
1021
|
+
"dragGhostContent": "i54Wjq_dragGhostContent",
|
|
1022
|
+
"dragHandle": "i54Wjq_dragHandle",
|
|
1023
|
+
"dropPulse": "i54Wjq_dropPulse",
|
|
1024
|
+
"dropTargetAfter": "i54Wjq_dropTargetAfter",
|
|
1025
|
+
"dropTargetBefore": "i54Wjq_dropTargetBefore",
|
|
1026
|
+
"editorArea": "i54Wjq_editorArea",
|
|
1027
|
+
"emptyDesc": "i54Wjq_emptyDesc",
|
|
1028
|
+
"emptyState": "i54Wjq_emptyState",
|
|
1029
|
+
"emptyTitle": "i54Wjq_emptyTitle",
|
|
1030
|
+
"fileDot": "i54Wjq_fileDot",
|
|
1031
|
+
"fileLine": "i54Wjq_fileLine",
|
|
1032
|
+
"filePath": "i54Wjq_filePath",
|
|
1033
|
+
"fileRow": "i54Wjq_fileRow",
|
|
1034
|
+
"filesList": "i54Wjq_filesList",
|
|
1035
|
+
"handleGrip": "i54Wjq_handleGrip",
|
|
1036
|
+
"header": "i54Wjq_header",
|
|
1037
|
+
"headerIcon": "i54Wjq_headerIcon",
|
|
1038
|
+
"headerIconBtn": "i54Wjq_headerIconBtn",
|
|
1039
|
+
"headerLeft": "i54Wjq_headerLeft",
|
|
1040
|
+
"headerRight": "i54Wjq_headerRight",
|
|
1041
|
+
"headerTitle": "i54Wjq_headerTitle",
|
|
1042
|
+
"hintsOff": "i54Wjq_hintsOff",
|
|
1043
|
+
"kindBadge": "i54Wjq_kindBadge",
|
|
1044
|
+
"memActs": "i54Wjq_memActs",
|
|
1045
|
+
"memBody": "i54Wjq_memBody",
|
|
1046
|
+
"memCount": "i54Wjq_memCount",
|
|
1047
|
+
"memFooter": "i54Wjq_memFooter",
|
|
1048
|
+
"memLabel": "i54Wjq_memLabel",
|
|
1049
|
+
"memList": "i54Wjq_memList",
|
|
1050
|
+
"memMeta": "i54Wjq_memMeta",
|
|
1051
|
+
"memNew": "i54Wjq_memNew",
|
|
1052
|
+
"memNewRow": "i54Wjq_memNewRow",
|
|
1053
|
+
"memRow": "i54Wjq_memRow",
|
|
1054
|
+
"memRowArchived": "i54Wjq_memRowArchived",
|
|
1055
|
+
"memRowMain": "i54Wjq_memRowMain",
|
|
1056
|
+
"memSentinel": "i54Wjq_memSentinel",
|
|
1057
|
+
"memTitle": "i54Wjq_memTitle",
|
|
1058
|
+
"memToolbar": "i54Wjq_memToolbar",
|
|
1059
|
+
"memToolbarActs": "i54Wjq_memToolbarActs",
|
|
1060
|
+
"memoryPane": "i54Wjq_memoryPane",
|
|
1061
|
+
"miniBar": "i54Wjq_miniBar",
|
|
1062
|
+
"miniChevron": "i54Wjq_miniChevron",
|
|
1063
|
+
"miniIcon": "i54Wjq_miniIcon",
|
|
1064
|
+
"miniText": "i54Wjq_miniText",
|
|
1065
|
+
"muted": "i54Wjq_muted",
|
|
1066
|
+
"notice": "i54Wjq_notice",
|
|
1067
|
+
"panel": "i54Wjq_panel",
|
|
1068
|
+
"panelIn": "i54Wjq_panelIn",
|
|
1069
|
+
"progressText": "i54Wjq_progressText",
|
|
1070
|
+
"section": "i54Wjq_section",
|
|
1071
|
+
"sectionCount": "i54Wjq_sectionCount",
|
|
1072
|
+
"sectionLabel": "i54Wjq_sectionLabel",
|
|
1073
|
+
"stepContent": "i54Wjq_stepContent",
|
|
1074
|
+
"stepContentDone": "i54Wjq_stepContentDone",
|
|
1075
|
+
"stepContentRun": "i54Wjq_stepContentRun",
|
|
1076
|
+
"stepDone": "i54Wjq_stepDone",
|
|
1077
|
+
"stepDragging": "i54Wjq_stepDragging",
|
|
1078
|
+
"stepEditable": "i54Wjq_stepEditable",
|
|
1079
|
+
"stepInput": "i54Wjq_stepInput",
|
|
1080
|
+
"stepPending": "i54Wjq_stepPending",
|
|
1081
|
+
"stepRow": "i54Wjq_stepRow",
|
|
1082
|
+
"stepRun": "i54Wjq_stepRun",
|
|
1083
|
+
"stepToggle": "i54Wjq_stepToggle",
|
|
1084
|
+
"stepsList": "i54Wjq_stepsList",
|
|
1085
|
+
"syncHint": "i54Wjq_syncHint",
|
|
1086
|
+
"taskList": "i54Wjq_taskList",
|
|
1087
|
+
"track": "i54Wjq_track",
|
|
1088
|
+
"trackFill": "i54Wjq_trackFill",
|
|
1089
|
+
"updated": "i54Wjq_updated"
|
|
1060
1090
|
};
|
|
1061
1091
|
//#endregion
|
|
1062
1092
|
//#region src/client/TaskComponents.tsx
|
|
@@ -1526,13 +1556,10 @@ window.__ModuleLoader__.load({
|
|
|
1526
1556
|
]
|
|
1527
1557
|
});
|
|
1528
1558
|
}
|
|
1529
|
-
/**
|
|
1530
|
-
* 预取提前量:哨兵进入视口**下方 600px** 就开始取下一页,
|
|
1531
|
-
* 让用户在真正滚到底之前数据已经到位——这是"无感"的来源,不是滚到底再转圈。
|
|
1532
|
-
*/
|
|
1559
|
+
/** 预取提前量:哨兵进入视口**下方 600px** 就开始取下一页,数据在滚到底之前到位。 */
|
|
1533
1560
|
const PREFETCH_MARGIN = "600px 0px";
|
|
1534
1561
|
/**
|
|
1535
|
-
*
|
|
1562
|
+
* 拼一页的请求命令行:数据通道是命令文本,协议只在这里拼一次。
|
|
1536
1563
|
* @param {string} scope - `task` | `project` | `global`。
|
|
1537
1564
|
* @param {number} offset - 起始下标。
|
|
1538
1565
|
* @param {number} limit - 本页条数。
|
|
@@ -1542,9 +1569,8 @@ window.__ModuleLoader__.load({
|
|
|
1542
1569
|
return `/tasks insight list ${scope} ${offset} ${limit}`;
|
|
1543
1570
|
}
|
|
1544
1571
|
/**
|
|
1545
|
-
* 追加一页并**按 id
|
|
1546
|
-
*
|
|
1547
|
-
* 重复的按钮,点错一个就是误删。
|
|
1572
|
+
* 追加一页并**按 id 去重**。去重是必需的:前缀重放(见 {@link reloadWindowRequest})与并发
|
|
1573
|
+
* 刷新都可能让同一 id 出现两次,重复行带重复按钮,点错一个就是误删。
|
|
1548
1574
|
* @param {ReadonlyArray<{id?: string}>} prev - 已渲染条目。
|
|
1549
1575
|
* @param {ReadonlyArray<{id?: string}>} page - 新到的一页。
|
|
1550
1576
|
* @returns {Array} 追加后的数组;无新增时**原样返回** prev(避免无意义的重渲染)。
|
|
@@ -1557,15 +1583,9 @@ window.__ModuleLoader__.load({
|
|
|
1557
1583
|
return [...prev, ...fresh];
|
|
1558
1584
|
}
|
|
1559
1585
|
/**
|
|
1560
|
-
* 动作(archive/delete/promote
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
1563
|
-
* 用 offset 分页而不是 keyset 游标,正是为了让这条路可行:游标只能"往后翻",
|
|
1564
|
-
* 表达不了"把 0..N 重取一遍"。删除/归档导致的窗口收缩下,前缀重取依然不重不漏。
|
|
1565
|
-
*
|
|
1566
|
-
* **上限**:宿主单页最多 {@link HOST_PAGE_MAX} 条,超过就静默截断。所以已加载数超过上限时
|
|
1567
|
-
* 这一窗只重放前 200 条(`limit` 夹住),载荷回报的 `nextOffset` 会让哨兵继续把 200..N
|
|
1568
|
-
* 追加回来——宁可多一轮分页,也不能发一个"请求 500、只回 200"的值把列表打回 200 条。
|
|
1586
|
+
* 动作(archive/delete/promote…)之后的重载窗口:刷新**已加载的整个前缀**而非重置成第一页(否则
|
|
1587
|
+
* 会把正在看第 5 页的用户弹回顶部);用 offset 分页而非 keyset 游标正是为了让"把 0..N 重取一遍"
|
|
1588
|
+
* 可行。**上限**:宿主单页最多 {@link HOST_PAGE_MAX} 条且静默截断,`limit` 在这里夹住,余下的由 `nextOffset` 追加。
|
|
1569
1589
|
* @param {number} loadedCount - 当前已渲染条数。
|
|
1570
1590
|
* @param {number} [pageSize] - 每页条数下界,保证至少取一页。
|
|
1571
1591
|
* @returns {{offset: number, limit: number}} 重放请求窗口(limit ≤ HOST_PAGE_MAX)。
|
|
@@ -1577,10 +1597,8 @@ window.__ModuleLoader__.load({
|
|
|
1577
1597
|
};
|
|
1578
1598
|
}
|
|
1579
1599
|
/**
|
|
1580
|
-
*
|
|
1581
|
-
*
|
|
1582
|
-
* - 新宿主不分页(省略 limit):`nextOffset === null`;
|
|
1583
|
-
* - 老宿主/老 bundle:两个字段都没有 → 视为"一次给全,没有下一页"。
|
|
1600
|
+
* 把宿主载荷归一成窗口状态,兼容三种形态:新宿主分页(有 `total` + `nextOffset`)、新宿主不
|
|
1601
|
+
* 分页(省略 limit,`nextOffset === null`)、老宿主/老 bundle(两个字段都没有 → 视为一次给全)。
|
|
1584
1602
|
* @param {any} data - 已解析的 JSON 载荷。
|
|
1585
1603
|
* @param {number} fallbackOffset - 请求时的 offset(载荷没给 offset 时用它)。
|
|
1586
1604
|
* @returns {{items: any[], total: number, offset: number, nextOffset: number|null}} 归一化窗口。
|
|
@@ -1612,13 +1630,11 @@ window.__ModuleLoader__.load({
|
|
|
1612
1630
|
};
|
|
1613
1631
|
}
|
|
1614
1632
|
/**
|
|
1615
|
-
* 请求闸门:协调首屏 / 追加 /
|
|
1616
|
-
*
|
|
1617
|
-
* 这里踩过一个坑,规则就是照着它定的:早期实现用"有在途请求就直接 return"的布尔守卫。
|
|
1618
|
-
* 于是"上一页还在飞的时候切 scope(或点动作)"时,新请求被**直接丢掉**,而过期响应又
|
|
1619
|
-
* 被作用域检查丢掉 → 新列表永远空白,只能手动刷新才出来。正确语义是两件事分开:
|
|
1633
|
+
* 请求闸门:协调首屏 / 追加 / 动作后重放这几类**会重叠**的请求。两件事必须分开:
|
|
1620
1634
|
* - **过期响应丢弃**(靠序号 + 作用域判定);
|
|
1621
1635
|
* - **新请求照发**(只有同一个 key 正在飞时才去重,避免哨兵连续触发重复取同一页)。
|
|
1636
|
+
* 用"有在途请求就直接 return"的布尔守卫会让切 scope 时新请求被丢掉、过期响应又被作用域检查
|
|
1637
|
+
* 丢掉 → 新列表永远空白。
|
|
1622
1638
|
* @returns {{begin: Function, end: Function, isStale: Function}} 闸门。
|
|
1623
1639
|
*/
|
|
1624
1640
|
function createRequestGate() {
|
|
@@ -2765,23 +2781,23 @@ window.__ModuleLoader__.load({
|
|
|
2765
2781
|
}
|
|
2766
2782
|
//#endregion
|
|
2767
2783
|
//#region \0dsh-css:src/client/TaskCommandNode.module.css.mjs
|
|
2768
|
-
const css = ".
|
|
2769
|
-
const tagId = "@yolk_vat-y/dsh-project-memory/TaskCommandNode.module.css";
|
|
2784
|
+
const css$1 = "._9r5h7a_row{max-width:100%;color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;align-items:center;gap:6px;padding:2px 0;font-size:12px;line-height:20px;display:inline-flex;overflow:hidden}._9r5h7a_row[data-variant=ok]{color:var(--dsw-alias-label-secondary)}._9r5h7a_row[data-variant=error]{color:var(--dsw-alias-state-warn-label,#b7791f)}._9r5h7a_row[data-variant=running]{color:var(--dsw-alias-label-dimmed)}._9r5h7a_icon{color:var(--dsw-alias-label-tertiary);flex:none}";
|
|
2785
|
+
const tagId$1 = "@yolk_vat-y/dsh-project-memory/TaskCommandNode.module.css";
|
|
2770
2786
|
if (typeof document !== "undefined") {
|
|
2771
|
-
const selector = "style[data-plugin-css=" + JSON.stringify(tagId) + "]";
|
|
2787
|
+
const selector = "style[data-plugin-css=" + JSON.stringify(tagId$1) + "]";
|
|
2772
2788
|
const existing = document.querySelector(selector);
|
|
2773
|
-
if (existing) existing.textContent = css;
|
|
2789
|
+
if (existing) existing.textContent = css$1;
|
|
2774
2790
|
else {
|
|
2775
2791
|
const tag = document.createElement("style");
|
|
2776
2792
|
tag.dataset.plugin = "@yolk_vat-y/dsh-project-memory";
|
|
2777
|
-
tag.dataset.pluginCss = tagId;
|
|
2778
|
-
tag.textContent = css;
|
|
2793
|
+
tag.dataset.pluginCss = tagId$1;
|
|
2794
|
+
tag.textContent = css$1;
|
|
2779
2795
|
document.head.appendChild(tag);
|
|
2780
2796
|
}
|
|
2781
2797
|
}
|
|
2782
2798
|
var TaskCommandNode_module_css_default = {
|
|
2783
|
-
"icon": "
|
|
2784
|
-
"row": "
|
|
2799
|
+
"icon": "_9r5h7a_icon",
|
|
2800
|
+
"row": "_9r5h7a_row"
|
|
2785
2801
|
};
|
|
2786
2802
|
//#endregion
|
|
2787
2803
|
//#region src/client/TaskCommandNode.tsx
|
|
@@ -2964,9 +2980,8 @@ window.__ModuleLoader__.load({
|
|
|
2964
2980
|
}
|
|
2965
2981
|
/**
|
|
2966
2982
|
* 一轮候选:把三行装配成菜单行,再按查询与位置过滤。
|
|
2967
|
-
*
|
|
2968
|
-
*
|
|
2969
|
-
* 不弹这一整组(宿主对无 input 命令在前导/行内都放行,这里更保守)。
|
|
2983
|
+
* 三行都不接参数(动作全在面板卡片里),所以位置过滤只做一件事:非 leading 位置不弹这一整组
|
|
2984
|
+
* (行内出现的 `/` 多半是路径)。
|
|
2970
2985
|
* @param t - 翻译函数。
|
|
2971
2986
|
* @param req - 宿主给的候选请求(query / position)。
|
|
2972
2987
|
* @returns 菜单行;永不抛出。
|
|
@@ -2988,7 +3003,7 @@ window.__ModuleLoader__.load({
|
|
|
2988
3003
|
}
|
|
2989
3004
|
/**
|
|
2990
3005
|
* 把触发 token 从草稿里删掉(span 做 CAS:草稿被改过就拒绝,什么都不动)。
|
|
2991
|
-
*
|
|
3006
|
+
* 与宿主 command 源消费菜单点击是同一条契约事件。
|
|
2992
3007
|
* @returns true 表示确实消费掉了。
|
|
2993
3008
|
*/
|
|
2994
3009
|
function consumeSpan(deps, pick) {
|
|
@@ -3005,16 +3020,8 @@ window.__ModuleLoader__.load({
|
|
|
3005
3020
|
}
|
|
3006
3021
|
}
|
|
3007
3022
|
/**
|
|
3008
|
-
* 一次菜单点击:消费掉触发 token
|
|
3009
|
-
*
|
|
3010
|
-
* 这三行是「打开某个视图」,不是「执行某条命令」,所以走客户端自己的 UI store:
|
|
3011
|
-
* 面板的 `closed` / `view` 都是浏览器侧状态,宿主命令碰不到它们。旧实现执行
|
|
3012
|
-
* `remote.commands.execute('/tasks insight list project')`,只在对话里留下一个命令节点,
|
|
3013
|
-
* 而客户端渲染命令节点的是按**命令名**分发的 `TaskCommandNode`(`name === 'tasks'`),
|
|
3014
|
-
* 它拿任务解析器去解记忆载荷 → 解析失败 → 对面板零影响。**这就是"点了没反应"的原因。**
|
|
3015
|
-
*
|
|
3016
|
-
* 不返回 claim(回填 `/xxx ` 再等回车):claim 会多要一次回车,而这三行没有参数要填。
|
|
3017
|
-
* 消费失败时仍然切页 —— 草稿里残留的触发文本要用户自己清掉,比"点了完全没反应"好。
|
|
3023
|
+
* 一次菜单点击:消费掉触发 token 后**直接打开面板的对应页** —— 这三行是「打开某个视图」不是
|
|
3024
|
+
* 「执行命令」,`closed`/`view` 是浏览器侧状态;不返回 claim 是因为没有参数要填,消费失败仍切页。
|
|
3018
3025
|
* @param t - 翻译函数(按当前语言把候选 name 映射回 ROWS)。
|
|
3019
3026
|
* @param deps - 会话服务与 UI store 动作。
|
|
3020
3027
|
* @param pick - 宿主给的点击载荷。
|
|
@@ -3051,6 +3058,372 @@ window.__ModuleLoader__.load({
|
|
|
3051
3058
|
};
|
|
3052
3059
|
}
|
|
3053
3060
|
//#endregion
|
|
3061
|
+
//#region \0dsh-css:src/client/SettingsCard.module.css.mjs
|
|
3062
|
+
const css = ".CSjuLW_card{box-sizing:border-box;border:.5px solid var(--dsw-alias-settings-card-stroke,var(--dsw-alias-border-l4,#00000029));border-radius:var(--dsw-radius-lg,16px);background:var(--dsw-alias-bg-layer-3,#fff);transition:border-color .16s,background .16s}.CSjuLW_card:hover{border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.CSjuLW_cardOpen{background:var(--dsw-alias-bg-layer-2,#f7f8fa);border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.CSjuLW_header{-webkit-appearance:none;appearance:none;border-radius:inherit;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:12px;padding:14px 16px;display:flex}.CSjuLW_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:-2px}.CSjuLW_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.CSjuLW_name{color:var(--dsw-alias-label-primary,#1f2328);font-size:15px;font-weight:600;line-height:1.4}.CSjuLW_desc{color:var(--dsw-alias-label-tertiary,#8b93a1);font-size:13px;line-height:1.5}.CSjuLW_unsaved{color:var(--dsw-alias-label-secondary,#6b7280);background:var(--dsw-alias-bg-module-platform,#eef0f4);border-radius:9px;flex:none;padding:0 6px;font-size:11px;font-weight:600;line-height:17px}.CSjuLW_chevron{color:var(--dsw-alias-label-tertiary,#8b93a1);flex:none;transition:transform .16s;display:inline-flex}.CSjuLW_chevronOpen{transform:rotate(180deg)}.CSjuLW_body{border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);margin:0 16px;padding-bottom:8px}.CSjuLW_row{align-items:center;gap:12px;padding:12px 0;display:flex}.CSjuLW_row+.CSjuLW_row{border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb)}.CSjuLW_labelBox{flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.CSjuLW_label{color:var(--dsw-alias-label-primary,#1f2328);font-size:13px;line-height:20px}.CSjuLW_hint{color:var(--dsw-alias-label-tertiary,#8b93a1);font-size:12px;line-height:18px}.CSjuLW_control{flex:none;align-items:center;gap:6px;display:flex}.CSjuLW_number{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2,#d1d5db);background:var(--dsw-alias-bg-layer-3,#fff);width:84px;font:inherit;color:var(--dsw-alias-label-primary,#1f2328);text-align:right;border-radius:7px;padding:6px 8px;font-size:12px;line-height:18px}.CSjuLW_number:disabled{opacity:.5;cursor:default}.CSjuLW_number:focus{border-color:var(--dsw-alias-brand-primary,#4f6ef7);outline:2px solid color-mix(in srgb, var(--dsw-alias-brand-primary,#4f6ef7) 18%, transparent)}.CSjuLW_number[aria-invalid=true]{border-color:var(--dsw-alias-state-error-primary,#dc2626)}.CSjuLW_unit{color:var(--dsw-alias-label-tertiary,#8b93a1);font-size:12px;line-height:18px}.CSjuLW_actions{border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}.CSjuLW_failed{min-width:0;color:var(--dsw-alias-label-error,#dc2626);flex:1;margin:0;font-size:12px;line-height:18px}.CSjuLW_notice{color:var(--dsw-alias-label-tertiary,#8b93a1);margin:0;padding:12px 0;font-size:12px;line-height:18px}";
|
|
3063
|
+
const tagId = "@yolk_vat-y/dsh-project-memory/SettingsCard.module.css";
|
|
3064
|
+
if (typeof document !== "undefined") {
|
|
3065
|
+
const selector = "style[data-plugin-css=" + JSON.stringify(tagId) + "]";
|
|
3066
|
+
const existing = document.querySelector(selector);
|
|
3067
|
+
if (existing) existing.textContent = css;
|
|
3068
|
+
else {
|
|
3069
|
+
const tag = document.createElement("style");
|
|
3070
|
+
tag.dataset.plugin = "@yolk_vat-y/dsh-project-memory";
|
|
3071
|
+
tag.dataset.pluginCss = tagId;
|
|
3072
|
+
tag.textContent = css;
|
|
3073
|
+
document.head.appendChild(tag);
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
var SettingsCard_module_css_default = {
|
|
3077
|
+
"actions": "CSjuLW_actions",
|
|
3078
|
+
"body": "CSjuLW_body",
|
|
3079
|
+
"card": "CSjuLW_card",
|
|
3080
|
+
"cardOpen": "CSjuLW_cardOpen",
|
|
3081
|
+
"chevron": "CSjuLW_chevron",
|
|
3082
|
+
"chevronOpen": "CSjuLW_chevronOpen",
|
|
3083
|
+
"control": "CSjuLW_control",
|
|
3084
|
+
"desc": "CSjuLW_desc",
|
|
3085
|
+
"failed": "CSjuLW_failed",
|
|
3086
|
+
"headText": "CSjuLW_headText",
|
|
3087
|
+
"header": "CSjuLW_header",
|
|
3088
|
+
"hint": "CSjuLW_hint",
|
|
3089
|
+
"label": "CSjuLW_label",
|
|
3090
|
+
"labelBox": "CSjuLW_labelBox",
|
|
3091
|
+
"name": "CSjuLW_name",
|
|
3092
|
+
"notice": "CSjuLW_notice",
|
|
3093
|
+
"number": "CSjuLW_number",
|
|
3094
|
+
"row": "CSjuLW_row",
|
|
3095
|
+
"unit": "CSjuLW_unit",
|
|
3096
|
+
"unsaved": "CSjuLW_unsaved"
|
|
3097
|
+
};
|
|
3098
|
+
//#endregion
|
|
3099
|
+
//#region src/client/settings-card.tsx
|
|
3100
|
+
/**
|
|
3101
|
+
* 插件详情页上的「常用设置」卡片。
|
|
3102
|
+
*
|
|
3103
|
+
* 座位是 `plugins.bundle.config`(key = 包名),外形照宿主自己的插件卡片长:
|
|
3104
|
+
* 一行标题 + 说明 + 折叠箭头,**默认收起**;展开后是一列开关,底部右对齐一个保存。
|
|
3105
|
+
*
|
|
3106
|
+
* 数据面**完全走宿主设置**,不自建第二份配置:
|
|
3107
|
+
* Config 里标了 `.volatile()` 的字段 → 宿主 settings 文档的一个命名空间(ns = 条目 id
|
|
3108
|
+
* `project-memory`)→ 客户端 `ctx.configForms.get('project-memory')` 读写 → 宿主校验 +
|
|
3109
|
+
* revision fence + volatile 原地更新(不重启插件)。这里既不写 profile 的 yml,也不缓存
|
|
3110
|
+
* 值:卡片永远是宿主那份配置的投影,命令行改配置和这里改配置是同一条链路。
|
|
3111
|
+
*
|
|
3112
|
+
* 只放**用户真的会想调、且调了不会让记忆失真**的旋钮(见 SETTINGS_FIELDS 的注释)。
|
|
3113
|
+
* memoryDir / roots / insight.* 这类一改就换数据位置或需要理解上下文的,仍留在 profile。
|
|
3114
|
+
*/
|
|
3115
|
+
/** bundle 包名:`plugins.bundle.config` 的 key 必须与 profile 里安装的包名一致。 */
|
|
3116
|
+
const SETTINGS_PACKAGE_NAME = "@yolk_vat-y/dsh-project-memory";
|
|
3117
|
+
/** 本插件在 profile 的 loader 条目 id(bundle 的 cordis.patch.yml 定死的那个),也是 settings 命名空间。 */
|
|
3118
|
+
const SETTINGS_ENTRY_ID = "project-memory";
|
|
3119
|
+
/** 卡片文案的 locale 命名空间。与面板共用一份词典,但独立注册,互不影响。 */
|
|
3120
|
+
const SETTINGS_NS = "dsh-project-memory.settings";
|
|
3121
|
+
/**
|
|
3122
|
+
* 卡片编辑的字段;顺序即渲染顺序。
|
|
3123
|
+
*
|
|
3124
|
+
* 入选标准只有两条:**用户会主动想调**,且**调坏了不会让记忆失真**。
|
|
3125
|
+
* - `autoIndexOnFirstUse`:换项目时最常见的诉求("启动就把这里索引好"),默认关。
|
|
3126
|
+
* - `watchInterval`:后台刷新唯一值得调的成本旋钮(频率)。监视本身**不提供关闭**——
|
|
3127
|
+
* 关掉之后记忆只会越来越旧,那不是一个选项,是一个坑。
|
|
3128
|
+
* - `llmQueryExpansion`:唯一直接花 token 的开关,该由用户自己决定。
|
|
3129
|
+
* 刻意**没有**的:lazyIndexing(默认开,关掉只会让断言变旧)、enableTypeScript(内部实现
|
|
3130
|
+
* 细节,用户无从判断)、watch(见上)、memoryDir / roots / 扫描上限(改的是数据落在哪)。
|
|
3131
|
+
*/
|
|
3132
|
+
const SETTINGS_FIELDS = [
|
|
3133
|
+
"autoIndexOnFirstUse",
|
|
3134
|
+
"watchInterval",
|
|
3135
|
+
"llmQueryExpansion"
|
|
3136
|
+
];
|
|
3137
|
+
/** 布尔字段:草稿是 `'true'` / `'false'`,其它文本判为非法(挡住保存,而不是吞掉)。 */
|
|
3138
|
+
function settingsBooleanField(field) {
|
|
3139
|
+
return {
|
|
3140
|
+
field,
|
|
3141
|
+
format: (value) => typeof value === "boolean" ? String(value) : "",
|
|
3142
|
+
parse: (text) => text === "true" ? {
|
|
3143
|
+
kind: "set",
|
|
3144
|
+
value: true
|
|
3145
|
+
} : text === "false" ? {
|
|
3146
|
+
kind: "set",
|
|
3147
|
+
value: false
|
|
3148
|
+
} : void 0
|
|
3149
|
+
};
|
|
3150
|
+
}
|
|
3151
|
+
/** 把 `project-memory` 命名空间桥到卡片的状态上。 */
|
|
3152
|
+
var SettingsCardController = class {
|
|
3153
|
+
form;
|
|
3154
|
+
store;
|
|
3155
|
+
expanded = false;
|
|
3156
|
+
/**
|
|
3157
|
+
* @param scope - 宿主共享配置表单(`ctx.configForms.get('project-memory')`)
|
|
3158
|
+
*/
|
|
3159
|
+
constructor(scope) {
|
|
3160
|
+
this.form = new _deepseek_ai_dsh_client_ui_primitives.SettingsFormModel(scope, [
|
|
3161
|
+
settingsBooleanField("autoIndexOnFirstUse"),
|
|
3162
|
+
(0, _deepseek_ai_dsh_client_ui_primitives.settingsNumberField)("watchInterval"),
|
|
3163
|
+
settingsBooleanField("llmQueryExpansion")
|
|
3164
|
+
]);
|
|
3165
|
+
this.store = this.form.bind(() => this.projection());
|
|
3166
|
+
}
|
|
3167
|
+
/**
|
|
3168
|
+
* 构造槽位注入面。
|
|
3169
|
+
* @returns 快照钩子、展开动作与表单动作
|
|
3170
|
+
*/
|
|
3171
|
+
inject() {
|
|
3172
|
+
return {
|
|
3173
|
+
hooks: { settingsCard: this.store },
|
|
3174
|
+
toggleExpanded: () => {
|
|
3175
|
+
this.expanded = !this.expanded;
|
|
3176
|
+
this.store.set(this.projection());
|
|
3177
|
+
},
|
|
3178
|
+
...this.form.actions()
|
|
3179
|
+
};
|
|
3180
|
+
}
|
|
3181
|
+
/** 释放对宿主命名空间的订阅。 */
|
|
3182
|
+
dispose() {
|
|
3183
|
+
this.form.dispose();
|
|
3184
|
+
}
|
|
3185
|
+
projection() {
|
|
3186
|
+
const fields = {};
|
|
3187
|
+
for (const field of SETTINGS_FIELDS) fields[field] = this.form.field(field);
|
|
3188
|
+
return {
|
|
3189
|
+
...this.form.shell(),
|
|
3190
|
+
expanded: this.expanded,
|
|
3191
|
+
fields
|
|
3192
|
+
};
|
|
3193
|
+
}
|
|
3194
|
+
};
|
|
3195
|
+
/** 一行:左侧标题 + 说明,右侧控件(与宿主插件卡片的行同构)。 */
|
|
3196
|
+
function SettingRow(props) {
|
|
3197
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3198
|
+
className: SettingsCard_module_css_default.row,
|
|
3199
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3200
|
+
className: SettingsCard_module_css_default.labelBox,
|
|
3201
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3202
|
+
className: SettingsCard_module_css_default.label,
|
|
3203
|
+
children: props.title
|
|
3204
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3205
|
+
className: SettingsCard_module_css_default.hint,
|
|
3206
|
+
children: props.hint
|
|
3207
|
+
})]
|
|
3208
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3209
|
+
className: SettingsCard_module_css_default.control,
|
|
3210
|
+
children: props.children
|
|
3211
|
+
})]
|
|
3212
|
+
});
|
|
3213
|
+
}
|
|
3214
|
+
/** 宿主导出的"可渲染组件":普通函数组件,或 `forwardRef` / `memo` 返回的对象。 */
|
|
3215
|
+
function isComponent(value) {
|
|
3216
|
+
return typeof value === "function" || typeof value === "object" && value !== null;
|
|
3217
|
+
}
|
|
3218
|
+
/** 渲染器缺钩子时的占位状态:卡片只显示标题,不读任何宿主值。 */
|
|
3219
|
+
const UNAVAILABLE_STATE = {
|
|
3220
|
+
available: false,
|
|
3221
|
+
writable: false,
|
|
3222
|
+
dirty: false,
|
|
3223
|
+
invalid: false,
|
|
3224
|
+
saving: false,
|
|
3225
|
+
failed: false,
|
|
3226
|
+
expanded: false,
|
|
3227
|
+
fields: Object.fromEntries(SETTINGS_FIELDS.map((field) => [field, {
|
|
3228
|
+
text: "",
|
|
3229
|
+
overridden: false,
|
|
3230
|
+
invalid: false
|
|
3231
|
+
}]))
|
|
3232
|
+
};
|
|
3233
|
+
/** 非 Hook 的稳定回退:hook 数量在两次渲染之间不变,避免条件调用 Hooks。 */
|
|
3234
|
+
const fallbackHook = (selector) => selector(UNAVAILABLE_STATE);
|
|
3235
|
+
/**
|
|
3236
|
+
* 渲染本插件的常用设置。
|
|
3237
|
+
* @param props - 表单快照与动作(由槽位注入)
|
|
3238
|
+
* @returns 折叠卡片;`summary` 视图不渲染
|
|
3239
|
+
*/
|
|
3240
|
+
function SettingsCard(props) {
|
|
3241
|
+
const t = props.t ?? createTranslate(zh);
|
|
3242
|
+
const state = (props.useSettingsCard ?? fallbackHook)((snapshot) => snapshot);
|
|
3243
|
+
const discard = props.discard;
|
|
3244
|
+
(0, react.useEffect)(() => () => {
|
|
3245
|
+
discard?.();
|
|
3246
|
+
}, [discard]);
|
|
3247
|
+
if (props.view === "summary") return null;
|
|
3248
|
+
const edit = props.edit;
|
|
3249
|
+
const save = props.save;
|
|
3250
|
+
if (edit === void 0 || save === void 0) return null;
|
|
3251
|
+
const disabled = !state.writable || state.saving;
|
|
3252
|
+
const on = (field) => state.fields[field]?.text === "true";
|
|
3253
|
+
const toggle = (field, next) => {
|
|
3254
|
+
edit(field, next ? "true" : "false");
|
|
3255
|
+
};
|
|
3256
|
+
const expanded = state.expanded === true;
|
|
3257
|
+
const saveBlocked = !state.dirty || state.invalid || state.saving || !state.writable;
|
|
3258
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3259
|
+
className: expanded ? `${SettingsCard_module_css_default.card} ${SettingsCard_module_css_default.cardOpen}` : SettingsCard_module_css_default.card,
|
|
3260
|
+
"data-project-memory-settings": true,
|
|
3261
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3262
|
+
type: "button",
|
|
3263
|
+
className: SettingsCard_module_css_default.header,
|
|
3264
|
+
"aria-expanded": expanded,
|
|
3265
|
+
onClick: props.toggleExpanded,
|
|
3266
|
+
children: [
|
|
3267
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3268
|
+
className: SettingsCard_module_css_default.headText,
|
|
3269
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3270
|
+
className: SettingsCard_module_css_default.name,
|
|
3271
|
+
children: t("settings.title")
|
|
3272
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3273
|
+
className: SettingsCard_module_css_default.desc,
|
|
3274
|
+
children: t("settings.subtitle")
|
|
3275
|
+
})]
|
|
3276
|
+
}),
|
|
3277
|
+
state.dirty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3278
|
+
className: SettingsCard_module_css_default.unsaved,
|
|
3279
|
+
children: t("settings.unsaved")
|
|
3280
|
+
}) : null,
|
|
3281
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3282
|
+
className: expanded ? `${SettingsCard_module_css_default.chevron} ${SettingsCard_module_css_default.chevronOpen}` : SettingsCard_module_css_default.chevron,
|
|
3283
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronDownOutline14, {})
|
|
3284
|
+
})
|
|
3285
|
+
]
|
|
3286
|
+
}), expanded ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3287
|
+
className: SettingsCard_module_css_default.body,
|
|
3288
|
+
children: state.available ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
3289
|
+
!state.writable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3290
|
+
className: SettingsCard_module_css_default.notice,
|
|
3291
|
+
children: t("settings.form.readOnly")
|
|
3292
|
+
}) : null,
|
|
3293
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, {
|
|
3294
|
+
title: t("settings.autoIndexOnFirstUse.title"),
|
|
3295
|
+
hint: t("settings.autoIndexOnFirstUse.hint"),
|
|
3296
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
3297
|
+
checked: on("autoIndexOnFirstUse"),
|
|
3298
|
+
disabled,
|
|
3299
|
+
label: t("settings.autoIndexOnFirstUse.title"),
|
|
3300
|
+
onChange: (next) => {
|
|
3301
|
+
toggle("autoIndexOnFirstUse", next);
|
|
3302
|
+
}
|
|
3303
|
+
})
|
|
3304
|
+
}),
|
|
3305
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SettingRow, {
|
|
3306
|
+
title: t("settings.watchInterval.title"),
|
|
3307
|
+
hint: t("settings.watchInterval.hint"),
|
|
3308
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3309
|
+
className: SettingsCard_module_css_default.number,
|
|
3310
|
+
type: "number",
|
|
3311
|
+
min: 5,
|
|
3312
|
+
max: 600,
|
|
3313
|
+
step: 1,
|
|
3314
|
+
inputMode: "numeric",
|
|
3315
|
+
"aria-label": t("settings.watchInterval.title"),
|
|
3316
|
+
value: state.fields.watchInterval.text,
|
|
3317
|
+
disabled,
|
|
3318
|
+
"aria-invalid": state.fields.watchInterval.invalid || void 0,
|
|
3319
|
+
onChange: (event) => {
|
|
3320
|
+
edit("watchInterval", event.target.value);
|
|
3321
|
+
}
|
|
3322
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3323
|
+
className: SettingsCard_module_css_default.unit,
|
|
3324
|
+
children: t("settings.unit.seconds")
|
|
3325
|
+
})]
|
|
3326
|
+
}),
|
|
3327
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, {
|
|
3328
|
+
title: t("settings.llmQueryExpansion.title"),
|
|
3329
|
+
hint: t("settings.llmQueryExpansion.hint"),
|
|
3330
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
3331
|
+
checked: on("llmQueryExpansion"),
|
|
3332
|
+
disabled,
|
|
3333
|
+
label: t("settings.llmQueryExpansion.title"),
|
|
3334
|
+
onChange: (next) => {
|
|
3335
|
+
toggle("llmQueryExpansion", next);
|
|
3336
|
+
}
|
|
3337
|
+
})
|
|
3338
|
+
}),
|
|
3339
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3340
|
+
className: SettingsCard_module_css_default.actions,
|
|
3341
|
+
children: [state.failed ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3342
|
+
className: SettingsCard_module_css_default.failed,
|
|
3343
|
+
role: "status",
|
|
3344
|
+
children: t("settings.form.saveFailed")
|
|
3345
|
+
}) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3346
|
+
variant: "primary",
|
|
3347
|
+
size: "sm",
|
|
3348
|
+
disabled: saveBlocked,
|
|
3349
|
+
onClick: save,
|
|
3350
|
+
children: state.saving ? t("settings.form.saving") : t("settings.form.save")
|
|
3351
|
+
})]
|
|
3352
|
+
})
|
|
3353
|
+
] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3354
|
+
className: SettingsCard_module_css_default.notice,
|
|
3355
|
+
children: t("settings.form.unavailable")
|
|
3356
|
+
})
|
|
3357
|
+
}) : null]
|
|
3358
|
+
});
|
|
3359
|
+
}
|
|
3360
|
+
/**
|
|
3361
|
+
* 注册卡片(软依赖,永不抛出)。
|
|
3362
|
+
*
|
|
3363
|
+
* 两层门控:
|
|
3364
|
+
* 1. 嵌套 `inject(['slots','configForms','locale'])` —— 宿主没有设置服务时这里根本不跑;
|
|
3365
|
+
* 2. `configForms.whileServed(['project-memory'])` + `slots.inject('plugins.bundle.config')`
|
|
3366
|
+
* —— 命名空间没被宿主提供、或该版本没有这个槽时,不留下任何注册痕迹。
|
|
3367
|
+
* @param ctx - client 根上下文
|
|
3368
|
+
*/
|
|
3369
|
+
function registerSettingsCard(ctx) {
|
|
3370
|
+
if (typeof ctx?.inject !== "function") return;
|
|
3371
|
+
try {
|
|
3372
|
+
ctx.inject([
|
|
3373
|
+
"slots",
|
|
3374
|
+
"configForms",
|
|
3375
|
+
"locale"
|
|
3376
|
+
], (scope) => {
|
|
3377
|
+
try {
|
|
3378
|
+
mountSettingsCard(scope);
|
|
3379
|
+
} catch (err) {
|
|
3380
|
+
console.warn(`[${SETTINGS_NS}] settings card registration failed:`, err);
|
|
3381
|
+
}
|
|
3382
|
+
});
|
|
3383
|
+
} catch (err) {
|
|
3384
|
+
console.warn(`[${SETTINGS_NS}] settings card injection failed:`, err);
|
|
3385
|
+
}
|
|
3386
|
+
}
|
|
3387
|
+
/**
|
|
3388
|
+
* 在已就绪的 scope 上挂载卡片。
|
|
3389
|
+
* @param scope - 三个服务齐备的嵌套上下文
|
|
3390
|
+
*/
|
|
3391
|
+
function mountSettingsCard(scope) {
|
|
3392
|
+
const slots = scope?.slots;
|
|
3393
|
+
const configForms = scope?.configForms;
|
|
3394
|
+
const locale = scope?.locale;
|
|
3395
|
+
if (typeof slots?.inject !== "function" || typeof configForms?.get !== "function" || typeof configForms?.whileServed !== "function" || typeof locale?.register !== "function") return;
|
|
3396
|
+
if (typeof _deepseek_ai_dsh_client_ui_primitives.SettingsFormModel !== "function" || !isComponent(_deepseek_ai_dsh_client_ui_primitives.Switch) || !isComponent(_deepseek_ai_dsh_client_ui_primitives.Button)) {
|
|
3397
|
+
console.warn(`[${SETTINGS_NS}] host ui-primitives has no settings controls — visual settings disabled`);
|
|
3398
|
+
return;
|
|
3399
|
+
}
|
|
3400
|
+
const effect = typeof scope.effect === "function" ? scope.effect.bind(scope) : null;
|
|
3401
|
+
const keep = (dispose) => {
|
|
3402
|
+
if (typeof dispose !== "function" || effect === null) return;
|
|
3403
|
+
effect(() => () => {
|
|
3404
|
+
try {
|
|
3405
|
+
dispose();
|
|
3406
|
+
} catch {}
|
|
3407
|
+
});
|
|
3408
|
+
};
|
|
3409
|
+
try {
|
|
3410
|
+
keep(locale.register(SETTINGS_NS, {
|
|
3411
|
+
zh,
|
|
3412
|
+
en
|
|
3413
|
+
}));
|
|
3414
|
+
} catch (err) {
|
|
3415
|
+
console.warn(`[${SETTINGS_NS}] locale dictionary already registered:`, err);
|
|
3416
|
+
}
|
|
3417
|
+
const controller = new SettingsCardController(configForms.get(SETTINGS_ENTRY_ID));
|
|
3418
|
+
keep(() => controller.dispose());
|
|
3419
|
+
keep(configForms.whileServed([SETTINGS_ENTRY_ID], () => slots.inject("plugins.bundle.config", () => slots.register({
|
|
3420
|
+
name: "plugins.bundle.config",
|
|
3421
|
+
key: SETTINGS_PACKAGE_NAME,
|
|
3422
|
+
locale: SETTINGS_NS,
|
|
3423
|
+
inject: () => controller.inject()
|
|
3424
|
+
}, SettingsCard))));
|
|
3425
|
+
}
|
|
3426
|
+
//#endregion
|
|
3054
3427
|
//#region src/client/client.ts
|
|
3055
3428
|
/**
|
|
3056
3429
|
* dsh-project-memory Client Entry
|
|
@@ -3187,6 +3560,7 @@ window.__ModuleLoader__.load({
|
|
|
3187
3560
|
function apply(ctx) {
|
|
3188
3561
|
registerTaskPanel(ctx);
|
|
3189
3562
|
registerSlashSource(ctx);
|
|
3563
|
+
registerSettingsCard(ctx);
|
|
3190
3564
|
reportDegradedLater(ctx);
|
|
3191
3565
|
}
|
|
3192
3566
|
//#endregion
|