dsh-edge 0.18.0 → 0.19.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +8 -8
- package/README.zh.md +8 -8
- package/THIRD_PARTY_NOTICES.md +2011 -449
- package/dist/assets/fonts/Montserrat-OFL.txt +93 -0
- package/dist/assets/fonts/montserrat-light-Cvd2VjE_.woff2 +0 -0
- package/dist/assets/fonts/montserrat-medium-B4OyO9CN.woff2 +0 -0
- package/dist/assets/fonts/montserrat-regular-DYep38cA.woff2 +0 -0
- package/dist/assets/index-Cq6ljTv2.css +1 -0
- package/dist/assets/index-Dy0OhsZ5.js +127 -0
- package/dist/assets/langs/asciidoc-Ve4PFQV2.js +2 -0
- package/dist/assets/langs/bat-BkioyH1T.js +2 -0
- package/dist/assets/langs/bibtex-CHM0blh-.js +2 -0
- package/dist/assets/langs/clojure-P80f7IUj.js +2 -0
- package/dist/assets/langs/cmake-D1j8_8rp.js +2 -0
- package/dist/assets/langs/csv-fuZLfV_i.js +2 -0
- package/dist/assets/langs/dart-bE4Kk8sk.js +2 -0
- package/dist/assets/langs/diff-D97Zzqfu.js +2 -0
- package/dist/assets/langs/dotenv-Da5cRb03.js +2 -0
- package/dist/assets/langs/elixir-CvYZzuDY.js +2 -0
- package/dist/assets/langs/erlang-DsQrWhSR.js +2 -0
- package/dist/assets/langs/fish-BvzEVeQv.js +2 -0
- package/dist/assets/langs/fsharp-CXgrBDvD.js +2 -0
- package/dist/assets/langs/graphql-DujV8YkJ.js +2 -0
- package/dist/assets/langs/groovy-gcz8RCvz.js +2 -0
- package/dist/assets/langs/haskell-Df6bDoY_.js +2 -0
- package/dist/assets/langs/hcl-BWvSN4gD.js +2 -0
- package/dist/assets/langs/html-derivative-DOyKdj44.js +2 -0
- package/dist/assets/langs/html-fwsONPVS.js +2 -0
- package/dist/assets/langs/http-DcV90OkR.js +2 -0
- package/dist/assets/langs/javascript-DI5JR1nB.js +2 -0
- package/dist/assets/langs/julia-BpJ6DjL_.js +2 -0
- package/dist/assets/langs/latex-B4C7GdlO.js +2 -0
- package/dist/assets/langs/log-2UxHyX5q.js +2 -0
- package/dist/assets/langs/make-CHLpvVh8.js +2 -0
- package/dist/assets/langs/nix-CwoSXNpI.js +2 -0
- package/dist/assets/langs/perl-DsWkoyyU.js +2 -0
- package/dist/assets/langs/php-LEPfNACG.js +2 -0
- package/dist/assets/langs/powershell-Dpen1YoG.js +2 -0
- package/dist/assets/langs/proto-C7zT0LnQ.js +2 -0
- package/dist/assets/langs/r-Dspwwk_N.js +2 -0
- package/dist/assets/langs/rst-BbocfKWr.js +2 -0
- package/dist/assets/langs/ruby-R292Iif0.js +2 -0
- package/dist/assets/langs/scala-C151Ov-r.js +2 -0
- package/dist/assets/langs/svelte-DNMY6jOf.js +2 -0
- package/dist/assets/langs/system-verilog-CnnmHF94.js +2 -0
- package/dist/assets/langs/vb-D17OF-Vu.js +2 -0
- package/dist/assets/langs/verilog-BQ8w6xss.js +2 -0
- package/dist/assets/langs/vue-Dq2x6432.js +2 -0
- package/dist/favicon-dark.svg +3 -0
- package/dist/favicon.svg +0 -5
- package/dist/index.html +5 -4
- package/dist/manifest.webmanifest +3 -4
- package/dist/plugins/@deepseek-ai/dsh-api-gateway/client.js +353 -101
- package/dist/plugins/@deepseek-ai/dsh-api-job-controller/client.js +367 -0
- package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +7223 -3584
- package/dist/plugins/@deepseek-ai/dsh-api-session-controller/client.js +1107 -991
- package/dist/plugins/@deepseek-ai/dsh-api-workspace-controller/client.js +119 -6
- package/dist/plugins/@deepseek-ai/dsh-api-workspace-files/client.js +41 -35
- package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +354 -5279
- package/dist/plugins/@deepseek-ai/dsh-client-file-upload/client.js +10 -23
- package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +234 -80
- package/dist/plugins/@deepseek-ai/dsh-client-modules/client.js +554 -46
- package/dist/plugins/@deepseek-ai/dsh-client-shortcuts/client.js +2006 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +1090 -914
- package/dist/plugins/@deepseek-ai/dsh-client-ui-approval/client.js +79 -6
- package/dist/plugins/@deepseek-ai/dsh-client-ui-attachment/client.js +126 -155
- package/dist/plugins/@deepseek-ai/dsh-client-ui-chat/client.js +5776 -1593
- package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +375 -121
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +3524 -1923
- package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +1615 -258
- package/dist/plugins/@deepseek-ai/dsh-client-ui-directory-picker-browse/client.js +9 -9
- package/dist/plugins/@deepseek-ai/dsh-client-ui-goal/client.js +25 -10
- package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +169 -24
- package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +413 -63
- package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +131 -14
- package/dist/plugins/@deepseek-ai/dsh-client-ui-message-feedback/client.js +24 -22
- package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +281 -128
- package/dist/plugins/@deepseek-ai/dsh-client-ui-open-in-app/client.js +674 -223
- package/dist/plugins/@deepseek-ai/dsh-client-ui-plan/client.js +596 -18
- package/dist/plugins/@deepseek-ai/dsh-client-ui-reference/client.js +92 -9
- package/dist/plugins/@deepseek-ai/dsh-client-ui-renderer/client.js +467 -59
- package/dist/plugins/@deepseek-ai/dsh-client-ui-session/client.js +231 -72
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings/client.js +281 -117
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +642 -122
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-models/client.js +1565 -438
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/client.js +201 -75
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-plugins/client.js +30 -1628
- package/dist/plugins/@deepseek-ai/dsh-client-ui-shortcuts/client.js +1163 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +165 -39
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-browser/client.js +1648 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/client.js +5515 -25622
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-files/client.js +419 -118
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-right/client.js +5692 -260
- package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +156 -41
- package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +386 -263
- package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +183 -73
- package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +2367 -429
- package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +788 -270
- package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +87 -79
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +28 -14
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +2647 -1044
- package/dist/plugins/@deepseek-ai/dsh-typert-registry/client.js +22 -7
- package/dist/plugins/dsh-edge-client-ui/client.js +1 -10
- package/package.json +96 -86
- package/scripts/cli.mjs +16 -4
- package/scripts/install.d.mts +12 -2
- package/scripts/install.mjs +36 -9
- package/scripts/legal-files.mjs +15 -0
- package/worker/direct/index.js +2564 -1822
- package/worker/isolated/index.js +2144 -1402
- package/dist/assets/index-BKQ_L1z6.js +0 -117
- package/dist/assets/index-DPX2bQLO.css +0 -1
- package/dist/assets/langs/html-CfGypltT.js +0 -2
- package/dist/assets/langs/php-DJl5gRdb.js +0 -2
- package/dist/assets/langs/ruby-5eNB0pDK.js +0 -2
- package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +0 -505
- package/dist/plugins/@deepseek-ai/dsh-client-ui-schedule/client.js +0 -307
|
@@ -23,7 +23,7 @@ window.__ModuleLoader__.load({
|
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-directory-picker-browse/src/client/DirectoryBrowser.module.css.mjs
|
|
26
|
-
const css = ".ZuhsRW_dialog.ZuhsRW_dialog{--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);gap:0;width:min(680px,100%);height:min(500px,100dvh - 32px);padding:0}.ZuhsRW_editorScope{display:contents}.ZuhsRW_header{border-bottom:.5px solid var(--dsw-alias-border-l3);flex-direction:column;flex:none;gap:8px;padding:16px 14px 8px 24px;display:flex}.ZuhsRW_title{min-height:28px;color:var(--dsw-alias-label-primary);align-items:flex-end;margin:0;font-size:16px;font-weight:510;line-height:24px;display:flex}.ZuhsRW_crumbBar{box-sizing:border-box;border:1px solid #0000;
|
|
26
|
+
const css = ".ZuhsRW_dialog.ZuhsRW_dialog{--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);gap:0;width:min(680px,100%);height:min(500px,100dvh - 32px);padding:0}.ZuhsRW_editorScope{display:contents}.ZuhsRW_header{border-bottom:.5px solid var(--dsw-alias-border-l3);flex-direction:column;flex:none;gap:8px;padding:16px 14px 8px 24px;display:flex}.ZuhsRW_title{min-height:28px;color:var(--dsw-alias-label-primary);align-items:flex-end;margin:0;font-size:16px;font-weight:510;line-height:24px;display:flex}.ZuhsRW_crumbBar{box-sizing:border-box;border-radius:var(--dsw-radius-sm);border:1px solid #0000;align-items:center;gap:4px;min-height:24px;margin-left:-9px;padding:0 8px;display:flex}.ZuhsRW_crumbBar:has(.ZuhsRW_crumbEditZone:enabled:hover),.ZuhsRW_crumbBar:has(.ZuhsRW_crumbEditZone:focus-visible),.ZuhsRW_crumbBar:has(.ZuhsRW_pathInput){border-color:var(--dsw-alias-border-l2)}.ZuhsRW_millerRow{scrollbar-width:none;flex:1 1 0;align-items:stretch;gap:12px;min-height:0;display:flex;overflow-x:auto}.ZuhsRW_crumbTrail{scrollbar-width:none;flex:0 auto;align-items:center;gap:4px;min-width:0;display:flex;overflow-x:auto}.ZuhsRW_crumbSeat{flex:none;align-items:center;gap:4px;min-width:0;display:inline-flex}.ZuhsRW_crumb{text-overflow:ellipsis;white-space:nowrap;max-width:160px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;padding:0;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.ZuhsRW_crumb:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.ZuhsRW_crumb:hover{color:var(--dsw-alias-label-primary)}.ZuhsRW_crumbChevron{color:var(--dsw-alias-label-tertiary);flex:none}.ZuhsRW_crumbEditZone{cursor:text;background:0 0;border:none;outline:none;flex:1 0 34px;justify-content:flex-end;align-items:center;min-width:34px;height:22px;padding:0;display:flex}.ZuhsRW_crumbEditGlyph{color:var(--dsw-alias-label-tertiary);flex:none}.ZuhsRW_crumbEditZone:enabled:hover .ZuhsRW_crumbEditGlyph,.ZuhsRW_crumbEditZone:focus-visible .ZuhsRW_crumbEditGlyph{color:var(--dsw-alias-label-primary)}.ZuhsRW_crumbEditZone:disabled{cursor:default}.ZuhsRW_crumbEditZone:disabled .ZuhsRW_crumbEditGlyph{color:var(--dsw-alias-label-caption)}.ZuhsRW_pathInput{box-sizing:border-box;min-width:0;height:22px;color:var(--dsw-alias-label-primary);background:0 0;border:none;outline:none;flex:1 1 0;padding:0;font-size:13px;line-height:20px}.ZuhsRW_content{flex-direction:column;flex:1 1 0;min-height:0;padding:16px 16px 16px 24px;display:flex;position:relative}.ZuhsRW_column{flex-direction:column;flex:1 1 0;gap:2px;min-width:256px;padding-right:8px;display:flex;overflow-y:auto}.ZuhsRW_divider{background:var(--dsw-alias-border-l3);flex:none;width:.5px}.ZuhsRW_rowSeat{flex:none;display:flex}.ZuhsRW_row{border-radius:var(--dsw-radius-sm);text-align:left;cursor:pointer;background:0 0;border:none;flex:none;align-items:center;gap:4px;width:100%;height:28px;padding:4px;display:flex}.ZuhsRW_row:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.ZuhsRW_row:hover{background:var(--dsw-alias-interactive-bg-hover)}.ZuhsRW_rowSelected,.ZuhsRW_rowSelected:hover{background:var(--dsw-alias-interactive-bg-active,var(--dsw-alias-interactive-bg-hover))}.ZuhsRW_rowIcon{color:var(--dsw-alias-label-secondary);flex:none}.ZuhsRW_rowIconSelected{color:var(--dsw-alias-button-info-fill);flex:none}.ZuhsRW_rowName{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-primary);flex:1 1 0;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.ZuhsRW_rowChevron{color:var(--dsw-alias-label-tertiary);flex:none}.ZuhsRW_status,.ZuhsRW_error{padding:4px 120px 4px 4px;font-size:12px;line-height:18px}.ZuhsRW_status{color:var(--dsw-alias-label-secondary)}.ZuhsRW_error{color:var(--dsw-alias-state-error-primary)}.ZuhsRW_loadingFloat{background:var(--dsw-alias-bg-layer-2);padding:2px 8px;position:absolute;bottom:8px;right:16px}.ZuhsRW_footerBar{border-top:.5px solid var(--dsw-alias-border-l3);flex-wrap:wrap;flex:none;align-items:center;gap:8px;padding:16px 24px;display:flex}.ZuhsRW_showHiddenToggle{color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:none;align-items:center;gap:4px;padding:0;font-size:13px;font-weight:500;line-height:20px;display:inline-flex}.ZuhsRW_showHiddenToggle:hover{color:var(--dsw-alias-label-primary)}.ZuhsRW_showHiddenToggle:disabled{color:var(--dsw-alias-label-caption);cursor:default}.ZuhsRW_showHiddenToggleActive{color:var(--dsw-alias-label-primary)}.ZuhsRW_footerGap{flex:1 1 0}.ZuhsRW_footerAction{min-width:72px}.ZuhsRW_createDialog.ZuhsRW_createDialog{gap:0;width:min(380px,100%);padding:0}.ZuhsRW_createBody{flex-direction:column;gap:12px;padding:22px 24px 20px;display:flex}.ZuhsRW_createTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:510;line-height:24px}.ZuhsRW_createIn{color:var(--dsw-alias-label-primary);margin:0;font-size:14px;line-height:22px}.ZuhsRW_createInput{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);width:100%;height:44px;color:var(--dsw-alias-label-primary);background:0 0;outline:none;padding:7px 14px;font-size:14px;line-height:22px}.ZuhsRW_createInput::placeholder{color:var(--dsw-alias-label-caption)}.ZuhsRW_createActions{justify-content:flex-end;align-items:center;gap:8px;margin-top:8px;display:flex}";
|
|
27
27
|
const tagId = "@deepseek-ai/dsh-client-ui-directory-picker-browse/DirectoryBrowser.module.css";
|
|
28
28
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
29
29
|
const tag = document.createElement("style");
|
|
@@ -254,10 +254,10 @@ window.__ModuleLoader__.load({
|
|
|
254
254
|
onPick(entry);
|
|
255
255
|
},
|
|
256
256
|
children: [
|
|
257
|
-
selected ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
257
|
+
selected ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpenRegular, {
|
|
258
258
|
size: 16,
|
|
259
259
|
className: DirectoryBrowser_module_css_default.rowIconSelected
|
|
260
|
-
}) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
260
|
+
}) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderCloseRegular, {
|
|
261
261
|
size: 16,
|
|
262
262
|
className: DirectoryBrowser_module_css_default.rowIcon
|
|
263
263
|
}),
|
|
@@ -265,7 +265,7 @@ window.__ModuleLoader__.load({
|
|
|
265
265
|
className: DirectoryBrowser_module_css_default.rowName,
|
|
266
266
|
children: entry.name
|
|
267
267
|
}),
|
|
268
|
-
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
268
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, {
|
|
269
269
|
size: 12,
|
|
270
270
|
className: DirectoryBrowser_module_css_default.rowChevron
|
|
271
271
|
})
|
|
@@ -712,7 +712,7 @@ window.__ModuleLoader__.load({
|
|
|
712
712
|
ref: crumbTrailRef,
|
|
713
713
|
children: crumbs.map((crumb, index) => (0, react_jsx_runtime.jsxs)("span", {
|
|
714
714
|
className: DirectoryBrowser_module_css_default.crumbSeat,
|
|
715
|
-
children: [index > 0 && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
715
|
+
children: [index > 0 && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, {
|
|
716
716
|
size: 12,
|
|
717
717
|
className: DirectoryBrowser_module_css_default.crumbChevron
|
|
718
718
|
}), (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -744,7 +744,7 @@ window.__ModuleLoader__.load({
|
|
|
744
744
|
const sep = separatorOf(parent);
|
|
745
745
|
setPathDraft(base.endsWith(sep) ? base : `${base}${sep}`);
|
|
746
746
|
},
|
|
747
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
747
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, {
|
|
748
748
|
size: 14,
|
|
749
749
|
className: DirectoryBrowser_module_css_default.crumbEditGlyph
|
|
750
750
|
})
|
|
@@ -825,7 +825,7 @@ window.__ModuleLoader__.load({
|
|
|
825
825
|
children: [
|
|
826
826
|
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
827
827
|
variant: "outline",
|
|
828
|
-
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
828
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutlineRegular, { size: 14 }),
|
|
829
829
|
disabled: parent === null || loading || parentInert || draftPending,
|
|
830
830
|
onClick: () => {
|
|
831
831
|
setFolderDraft("");
|
|
@@ -844,7 +844,7 @@ window.__ModuleLoader__.load({
|
|
|
844
844
|
onClick: () => {
|
|
845
845
|
setShowHidden((prev) => !prev);
|
|
846
846
|
},
|
|
847
|
-
children: [t("browser.showHidden"), showHidden && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
847
|
+
children: [t("browser.showHidden"), showHidden && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineRegular, { size: 14 })]
|
|
848
848
|
}),
|
|
849
849
|
(0, react_jsx_runtime.jsx)("span", { className: DirectoryBrowser_module_css_default.footerGap }),
|
|
850
850
|
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
@@ -891,7 +891,7 @@ window.__ModuleLoader__.load({
|
|
|
891
891
|
value: folderDraft ?? "",
|
|
892
892
|
"aria-label": t("browser.folderName"),
|
|
893
893
|
placeholder: t("browser.untitledFolder"),
|
|
894
|
-
|
|
894
|
+
"data-modal-autofocus": true,
|
|
895
895
|
disabled: creatingFolder,
|
|
896
896
|
onChange: (event) => {
|
|
897
897
|
setFolderDraft(event.target.value);
|
|
@@ -57,6 +57,8 @@ window.__ModuleLoader__.load({
|
|
|
57
57
|
revision: goal.revision,
|
|
58
58
|
activation: goal.activation
|
|
59
59
|
});
|
|
60
|
+
}, (error) => {
|
|
61
|
+
console.warn("[ui-goal] goal activation read failed:", error);
|
|
60
62
|
});
|
|
61
63
|
};
|
|
62
64
|
const refreshProjection = () => {
|
|
@@ -124,7 +126,7 @@ window.__ModuleLoader__.load({
|
|
|
124
126
|
}
|
|
125
127
|
//#endregion
|
|
126
128
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-goal/src/client/GoalBar.module.css.mjs
|
|
127
|
-
const css$1 = ".nLMEza_dock{box-sizing:border-box;width:calc(100% - var(--dsh-composer-side-clearance) - var(--dsh-composer-side-clearance) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset));margin:0 auto}.nLMEza_bar{box-sizing:border-box;width:100%;max-width:calc(var(--dsh-composer-card-max-width) - 4 * var(--dsh-composer-dock-inset))
|
|
129
|
+
const css$1 = ".nLMEza_dock{box-sizing:border-box;width:calc(100% - var(--dsh-composer-side-clearance) - var(--dsh-composer-side-clearance) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset));margin:0 auto}.nLMEza_bar{isolation:isolate;box-sizing:border-box;width:100%;max-width:calc(var(--dsh-composer-card-max-width) - 4 * var(--dsh-composer-dock-inset));--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-md);height:36px;box-shadow:var(--dsw-elevation-panel);border:0;align-items:center;gap:10px;margin:0 auto;padding:4px 5px 4px 12px;display:flex;position:relative}.nLMEza_bar:before{z-index:-1;border-radius:inherit;background:var(--dsw-specific-menu);backdrop-filter:var(--dsw-menu-backdrop-filter);content:\"\";pointer-events:none;position:absolute;inset:0}.nLMEza_goalGlyph{color:var(--dsw-alias-label-tertiary);flex:none;display:inline-flex}.nLMEza_label{color:var(--dsw-alias-label-primary);flex:none;font-size:13px;font-weight:500;line-height:24px}.nLMEza_objective{min-width:0;color:var(--dsw-alias-label-primary-dimmed);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;line-height:20px;overflow:hidden}.nLMEza_error{min-width:0;color:var(--dsw-alias-state-error-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:12px;line-height:20px;overflow:hidden}.nLMEza_objectiveInput{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-base);min-width:0;height:26px;color:var(--dsw-alias-label-primary);outline:none;flex:1;padding:0 8px;font-size:13px;line-height:20px}.nLMEza_objectiveInput:focus{border-color:var(--dsw-alias-state-business-primary)}.nLMEza_objectiveInput::placeholder{color:var(--dsw-alias-label-caption)}.nLMEza_actions{flex:none;align-items:center;gap:10px;display:flex}.nLMEza_iconBtn{corner-shape:round;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;justify-content:center;align-items:center;padding:0;display:inline-flex}.nLMEza_iconBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.nLMEza_iconBtn:disabled{opacity:.4;cursor:default}";
|
|
128
130
|
const tagId$1 = "@deepseek-ai/dsh-client-ui-goal/GoalBar.module.css";
|
|
129
131
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
130
132
|
const tag = document.createElement("style");
|
|
@@ -231,6 +233,7 @@ window.__ModuleLoader__.load({
|
|
|
231
233
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
232
234
|
className: GoalBar_module_css_default.actions,
|
|
233
235
|
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
236
|
+
portal: true,
|
|
234
237
|
label: t("action.save"),
|
|
235
238
|
side: "bottom",
|
|
236
239
|
delayMs: 500,
|
|
@@ -242,9 +245,10 @@ window.__ModuleLoader__.load({
|
|
|
242
245
|
},
|
|
243
246
|
disabled: pending || draft.trim() === "",
|
|
244
247
|
"aria-label": t("action.save"),
|
|
245
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
248
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineRegular, { size: 14 })
|
|
246
249
|
})
|
|
247
250
|
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
251
|
+
portal: true,
|
|
248
252
|
label: t("action.cancel"),
|
|
249
253
|
side: "bottom",
|
|
250
254
|
delayMs: 500,
|
|
@@ -256,7 +260,7 @@ window.__ModuleLoader__.load({
|
|
|
256
260
|
},
|
|
257
261
|
disabled: pending,
|
|
258
262
|
"aria-label": t("action.cancel"),
|
|
259
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
263
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutlineRegular, { size: 14 })
|
|
260
264
|
})
|
|
261
265
|
})]
|
|
262
266
|
})
|
|
@@ -275,7 +279,7 @@ window.__ModuleLoader__.load({
|
|
|
275
279
|
children: [
|
|
276
280
|
(0, react_jsx_runtime.jsx)("span", {
|
|
277
281
|
className: GoalBar_module_css_default.goalGlyph,
|
|
278
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
282
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconGoalOutlineRegular, { size: 14 })
|
|
279
283
|
}),
|
|
280
284
|
(0, react_jsx_runtime.jsx)("span", {
|
|
281
285
|
className: GoalBar_module_css_default.label,
|
|
@@ -294,6 +298,7 @@ window.__ModuleLoader__.load({
|
|
|
294
298
|
className: GoalBar_module_css_default.actions,
|
|
295
299
|
children: [
|
|
296
300
|
goal.phase === "active" && activation === "armed" && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
301
|
+
portal: true,
|
|
297
302
|
label: t("action.pause"),
|
|
298
303
|
side: "bottom",
|
|
299
304
|
delayMs: 500,
|
|
@@ -305,10 +310,11 @@ window.__ModuleLoader__.load({
|
|
|
305
310
|
runAction(onPause);
|
|
306
311
|
},
|
|
307
312
|
"aria-label": t("action.pause"),
|
|
308
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
313
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPauseOutlineRegular, { size: 14 })
|
|
309
314
|
})
|
|
310
315
|
}),
|
|
311
316
|
showResume && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
317
|
+
portal: true,
|
|
312
318
|
label: t("action.resume"),
|
|
313
319
|
side: "bottom",
|
|
314
320
|
delayMs: 500,
|
|
@@ -320,10 +326,11 @@ window.__ModuleLoader__.load({
|
|
|
320
326
|
runAction(onResume);
|
|
321
327
|
},
|
|
322
328
|
"aria-label": t("action.resume"),
|
|
323
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
329
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlayOutlineRegular, { size: 14 })
|
|
324
330
|
})
|
|
325
331
|
}),
|
|
326
332
|
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
333
|
+
portal: true,
|
|
327
334
|
label: t("action.edit"),
|
|
328
335
|
side: "bottom",
|
|
329
336
|
delayMs: 500,
|
|
@@ -336,10 +343,11 @@ window.__ModuleLoader__.load({
|
|
|
336
343
|
setEditing(true);
|
|
337
344
|
},
|
|
338
345
|
"aria-label": t("action.edit"),
|
|
339
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
346
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, { size: 14 })
|
|
340
347
|
})
|
|
341
348
|
}),
|
|
342
349
|
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
350
|
+
portal: true,
|
|
343
351
|
label: t("action.clear"),
|
|
344
352
|
side: "bottom",
|
|
345
353
|
delayMs: 500,
|
|
@@ -351,7 +359,7 @@ window.__ModuleLoader__.load({
|
|
|
351
359
|
handleClear(goal.id);
|
|
352
360
|
},
|
|
353
361
|
"aria-label": t("action.clear"),
|
|
354
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
362
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutlineRegular, { size: 14 })
|
|
355
363
|
})
|
|
356
364
|
})
|
|
357
365
|
]
|
|
@@ -427,7 +435,7 @@ window.__ModuleLoader__.load({
|
|
|
427
435
|
};
|
|
428
436
|
//#endregion
|
|
429
437
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-goal/src/client/GoalCommandInputView.module.css.mjs
|
|
430
|
-
const css = ".oRe1gG_row{flex-direction:column;align-items:flex-end;gap:6px;display:flex}.oRe1gG_stack{min-width:0;max-width:min(calc(var(--dsh-chat-content-width,748px) * .702), 82%);flex-direction:column;align-items:flex-end;display:flex}.oRe1gG_bubble{overflow-wrap:anywhere;background:var(--dsw-specific-bubble);max-width:100%;color:var(--dsw-alias-label-primary);font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));white-space:pre-wrap;
|
|
438
|
+
const css = ".oRe1gG_row{flex-direction:column;align-items:flex-end;gap:6px;display:flex}.oRe1gG_stack{min-width:0;max-width:min(calc(var(--dsh-chat-content-width,748px) * .702), 82%);flex-direction:column;align-items:flex-end;display:flex}.oRe1gG_bubble{overflow-wrap:anywhere;border-radius:var(--dsw-radius-xl);background:var(--dsw-specific-bubble);max-width:100%;color:var(--dsw-alias-label-primary);font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));white-space:pre-wrap;padding:10px 16px}";
|
|
431
439
|
const tagId = "@deepseek-ai/dsh-client-ui-goal/GoalCommandInputView.module.css";
|
|
432
440
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
433
441
|
const tag = document.createElement("style");
|
|
@@ -558,7 +566,14 @@ window.__ModuleLoader__.load({
|
|
|
558
566
|
hooks: { goalActivation: createGoalActivationSource({
|
|
559
567
|
projection: binding.session.projections.faceOf("goal"),
|
|
560
568
|
session: binding.session,
|
|
561
|
-
getGoal: () =>
|
|
569
|
+
getGoal: async () => {
|
|
570
|
+
if (sessions.binding(sessionId) !== binding) throw new Error(`ui-goal: session "${sessionId}" is unavailable`);
|
|
571
|
+
return sessions.using(sessionId, { source: "goalActivation" }, async (reference) => {
|
|
572
|
+
const state = reference.binding.session.getSnapshot();
|
|
573
|
+
if (state.openState !== "open") throw state.openError ?? /* @__PURE__ */ new Error(`session "${sessionId}" is not open`);
|
|
574
|
+
return ctx.remote.goals.get(sessionId);
|
|
575
|
+
});
|
|
576
|
+
},
|
|
562
577
|
subscribeActivation: (listener) => ctx.remote.$on("goal/activation-changed", (event) => {
|
|
563
578
|
if (event.sessionId === sessionId) listener(event.goal);
|
|
564
579
|
}),
|
|
@@ -7,8 +7,71 @@ window.__ModuleLoader__.load({
|
|
|
7
7
|
let _deepseek_ai_cordis = require("@deepseek-ai/cordis");
|
|
8
8
|
let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
-
let react = require("react");
|
|
11
10
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
11
|
+
let react = require("react");
|
|
12
|
+
//#region ../../util/values/src/index.ts
|
|
13
|
+
/**
|
|
14
|
+
* Weak-key lookup with a strongly retained iterable set of associated values.
|
|
15
|
+
*
|
|
16
|
+
* Each value must belong to only one key. The container performs no automatic
|
|
17
|
+
* cleanup; owners delete associations or clear the container at lifecycle end.
|
|
18
|
+
*/
|
|
19
|
+
var WeakMapWithValues = class {
|
|
20
|
+
keys = /* @__PURE__ */ new WeakMap();
|
|
21
|
+
valueSet = /* @__PURE__ */ new Set();
|
|
22
|
+
/** Live strongly retained values in insertion order. */
|
|
23
|
+
values = this.valueSet;
|
|
24
|
+
/**
|
|
25
|
+
* Read the value associated with a key.
|
|
26
|
+
* @param key - weakly held lookup key.
|
|
27
|
+
* @returns the associated value, or absence.
|
|
28
|
+
*/
|
|
29
|
+
get(key) {
|
|
30
|
+
return this.keys.get(key);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Test whether a key has an association.
|
|
34
|
+
* @param key - weakly held lookup key.
|
|
35
|
+
* @returns whether the key is present.
|
|
36
|
+
*/
|
|
37
|
+
has(key) {
|
|
38
|
+
return this.keys.has(key);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Associate one key with one caller-unique value.
|
|
42
|
+
* @param key - weakly held lookup key.
|
|
43
|
+
* @param value - strongly retained value that belongs to no other key.
|
|
44
|
+
* @returns this container.
|
|
45
|
+
*/
|
|
46
|
+
set(key, value) {
|
|
47
|
+
if (this.keys.has(key)) {
|
|
48
|
+
const previous = this.keys.get(key);
|
|
49
|
+
if (previous === value) return this;
|
|
50
|
+
this.valueSet.delete(previous);
|
|
51
|
+
}
|
|
52
|
+
this.keys.set(key, value);
|
|
53
|
+
this.valueSet.add(value);
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Remove one association and its strongly retained value.
|
|
58
|
+
* @param key - weakly held lookup key.
|
|
59
|
+
* @returns whether an association was removed.
|
|
60
|
+
*/
|
|
61
|
+
delete(key) {
|
|
62
|
+
if (!this.keys.has(key)) return false;
|
|
63
|
+
const value = this.keys.get(key);
|
|
64
|
+
const deleted = this.keys.delete(key);
|
|
65
|
+
this.valueSet.delete(value);
|
|
66
|
+
return deleted;
|
|
67
|
+
}
|
|
68
|
+
/** Remove every association and strongly retained value. */
|
|
69
|
+
clear() {
|
|
70
|
+
this.keys = /* @__PURE__ */ new WeakMap();
|
|
71
|
+
this.valueSet.clear();
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
12
75
|
//#region ../../context/file-reference/src/grammar.ts
|
|
13
76
|
/**
|
|
14
77
|
* Extract an `@path` or `@"path with spaces` token at the cursor. An `@`
|
|
@@ -269,6 +332,10 @@ window.__ModuleLoader__.load({
|
|
|
269
332
|
};
|
|
270
333
|
//#endregion
|
|
271
334
|
//#region lib/types/client/controller.js
|
|
335
|
+
/** Whether a tracked hit is the one the user just dismissed (same token, same query). */
|
|
336
|
+
function dismissedHit(dismissed, hit) {
|
|
337
|
+
return dismissed.trigger === hit.trigger && dismissed.query === hit.query && dismissed.quoted === hit.quoted && dismissed.start === hit.span.start && dismissed.end === hit.span.end;
|
|
338
|
+
}
|
|
272
339
|
/**
|
|
273
340
|
* Per-session trigger pipeline state and orchestration. All mutation stays
|
|
274
341
|
* inside; MenuView renders from {@link InputTriggerController.menu} and routes
|
|
@@ -304,6 +371,13 @@ window.__ModuleLoader__.load({
|
|
|
304
371
|
lexicon = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(/* @__PURE__ */ new Map());
|
|
305
372
|
/** The authoritative hit: single truth for span CAS material (menu snapshot never carries it alone). */
|
|
306
373
|
hit = null;
|
|
374
|
+
/**
|
|
375
|
+
* Identity of the hit whose menu the user dismissed. A dismissal means "not
|
|
376
|
+
* this one, not now": the same token with the same query keeps its menu
|
|
377
|
+
* closed, so restoring the caret after a dismissal cannot reopen it. Typing
|
|
378
|
+
* (a new query) or moving to another token clears it.
|
|
379
|
+
*/
|
|
380
|
+
dismissed = null;
|
|
307
381
|
/** Whether the open menu was reached by a drill pick; cleared with the menu. */
|
|
308
382
|
drilled = false;
|
|
309
383
|
fetch = null;
|
|
@@ -333,7 +407,9 @@ window.__ModuleLoader__.load({
|
|
|
333
407
|
this.clearLauncher();
|
|
334
408
|
const raw = detectTrigger(draft, caret, guard);
|
|
335
409
|
if (raw === null) {
|
|
410
|
+
if (launched) return;
|
|
336
411
|
this.hit = null;
|
|
412
|
+
if (guard.tier !== "frozen") this.dismissed = null;
|
|
337
413
|
this.stopFetch();
|
|
338
414
|
this.reduce({ type: "close" });
|
|
339
415
|
return;
|
|
@@ -345,6 +421,12 @@ window.__ModuleLoader__.load({
|
|
|
345
421
|
draftRev
|
|
346
422
|
}
|
|
347
423
|
};
|
|
424
|
+
if (launched) this.dismissed = null;
|
|
425
|
+
if (this.dismissed !== null) if (!dismissedHit(this.dismissed, hit)) this.dismissed = null;
|
|
426
|
+
else {
|
|
427
|
+
this.hit = hit;
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
348
430
|
const prev = this.menu.getSnapshot();
|
|
349
431
|
const same = !launched && prev.open && prev.hit !== null && prev.hit.trigger === hit.trigger && prev.hit.query === hit.query && prev.hit.quoted === hit.quoted && prev.hit.span.start === hit.span.start && prev.hit.span.end === hit.span.end;
|
|
350
432
|
this.hit = hit;
|
|
@@ -473,6 +555,8 @@ window.__ModuleLoader__.load({
|
|
|
473
555
|
});
|
|
474
556
|
return "consumed";
|
|
475
557
|
case "escape":
|
|
558
|
+
case "tabBack":
|
|
559
|
+
this.rememberDismissed();
|
|
476
560
|
this.stopFetch();
|
|
477
561
|
this.reduce({ type: "close" });
|
|
478
562
|
return "consumed";
|
|
@@ -534,6 +618,21 @@ window.__ModuleLoader__.load({
|
|
|
534
618
|
return owner.codec.serialize(ref, signal);
|
|
535
619
|
}
|
|
536
620
|
/**
|
|
621
|
+
* Route a chip to its owner or an editable token to its current lexicon owner.
|
|
622
|
+
* @param source - chip source name; undefined for editable text.
|
|
623
|
+
* @param reference - source-owned id and optional chip glyph.
|
|
624
|
+
* @returns whether an owner accepted the preview, possibly awaiting its catalog.
|
|
625
|
+
*/
|
|
626
|
+
openReference(source, reference) {
|
|
627
|
+
if (this.disposed) return false;
|
|
628
|
+
const session = this.project();
|
|
629
|
+
for (const owner of this.deps.roster.all()) if ((source === void 0 ? reference.ref.startsWith(owner.trigger) && owner.lexicon?.(session)?.includes(reference.ref.slice(1)) : owner.name === source) && owner.openReference?.(session, reference)) {
|
|
630
|
+
this.dismiss();
|
|
631
|
+
return true;
|
|
632
|
+
}
|
|
633
|
+
return false;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
537
636
|
* Enter last adjudication: polls sources' matchEnter in registration
|
|
538
637
|
* order, first non-undefined wins. The outcome returns to the caller (the
|
|
539
638
|
* input machine applies it inside the same submit attempt — no event).
|
|
@@ -584,6 +683,7 @@ window.__ModuleLoader__.load({
|
|
|
584
683
|
/** External dismiss (e.g. pointer outside the composer area). */
|
|
585
684
|
dismiss() {
|
|
586
685
|
if (this.disposed) return;
|
|
686
|
+
this.rememberDismissed();
|
|
587
687
|
this.stopFetch();
|
|
588
688
|
this.reduce({ type: "close" });
|
|
589
689
|
}
|
|
@@ -714,6 +814,7 @@ window.__ModuleLoader__.load({
|
|
|
714
814
|
span: hit.span
|
|
715
815
|
});
|
|
716
816
|
this.stopFetch();
|
|
817
|
+
if (action === "pick") this.rememberDismissed();
|
|
717
818
|
this.reduce({ type: "close" });
|
|
718
819
|
this.drilled = action === "drill";
|
|
719
820
|
if (!this.execute(outcome, hit.span)) this.drilled = false;
|
|
@@ -744,6 +845,17 @@ window.__ModuleLoader__.load({
|
|
|
744
845
|
if (this.headers.getSnapshot().size === 0 && next.size === 0) return;
|
|
745
846
|
this.headers.set(next);
|
|
746
847
|
}
|
|
848
|
+
/** Record the open menu's identity as dismissed, so a bare re-track cannot revive it. */
|
|
849
|
+
rememberDismissed() {
|
|
850
|
+
const hit = this.hit;
|
|
851
|
+
this.dismissed = hit === null ? null : {
|
|
852
|
+
trigger: hit.trigger,
|
|
853
|
+
query: hit.query,
|
|
854
|
+
quoted: hit.quoted,
|
|
855
|
+
start: hit.span.start,
|
|
856
|
+
end: hit.span.end
|
|
857
|
+
};
|
|
858
|
+
}
|
|
747
859
|
clearLauncher() {
|
|
748
860
|
if (this.launcher.getSnapshot() !== null) this.launcher.set(null);
|
|
749
861
|
}
|
|
@@ -771,7 +883,7 @@ window.__ModuleLoader__.load({
|
|
|
771
883
|
static inject = ["sessions"];
|
|
772
884
|
live = {
|
|
773
885
|
sources: [],
|
|
774
|
-
controllers:
|
|
886
|
+
controllers: new WeakMapWithValues()
|
|
775
887
|
};
|
|
776
888
|
/**
|
|
777
889
|
* @param ctx - owning root context (the service registers itself as `slash`).
|
|
@@ -779,7 +891,7 @@ window.__ModuleLoader__.load({
|
|
|
779
891
|
constructor(ctx) {
|
|
780
892
|
super(ctx, "inputTriggers");
|
|
781
893
|
ctx.on("locale/change", () => {
|
|
782
|
-
for (const controller of this.live.controllers.values
|
|
894
|
+
for (const controller of this.live.controllers.values) controller.refreshOpenMenu();
|
|
783
895
|
});
|
|
784
896
|
}
|
|
785
897
|
/**
|
|
@@ -793,7 +905,7 @@ window.__ModuleLoader__.load({
|
|
|
793
905
|
const { live } = this;
|
|
794
906
|
if (live.sources.some((s) => s.trigger === src.trigger && s.name === src.name)) throw new Error(`slash source "${src.trigger}${src.name}" is already registered`);
|
|
795
907
|
live.sources.push(src);
|
|
796
|
-
for (const controller of live.controllers.values
|
|
908
|
+
for (const controller of live.controllers.values) try {
|
|
797
909
|
controller.sourceAdded(src);
|
|
798
910
|
} catch (error) {
|
|
799
911
|
console.error(`[ui-input-trigger] source "${src.trigger}${src.name}" late-registration setup failed:`, error);
|
|
@@ -802,7 +914,7 @@ window.__ModuleLoader__.load({
|
|
|
802
914
|
const at = live.sources.indexOf(src);
|
|
803
915
|
if (at < 0) return;
|
|
804
916
|
live.sources.splice(at, 1);
|
|
805
|
-
for (const controller of live.controllers.values
|
|
917
|
+
for (const controller of live.controllers.values) controller.sourceRemoved(src);
|
|
806
918
|
};
|
|
807
919
|
}
|
|
808
920
|
/**
|
|
@@ -812,25 +924,29 @@ window.__ModuleLoader__.load({
|
|
|
812
924
|
* single prewarm moment.
|
|
813
925
|
* @param actx - session-scope ctx.
|
|
814
926
|
* @returns the resident controller.
|
|
927
|
+
* @throws when the Context no longer belongs to a retained Session generation.
|
|
815
928
|
*/
|
|
816
929
|
sessionOf(actx) {
|
|
817
|
-
const
|
|
818
|
-
|
|
930
|
+
const sessions = this.sessions();
|
|
931
|
+
const session = sessions.sessionOf(actx);
|
|
932
|
+
const binding = session === void 0 ? void 0 : sessions.binding(session.sessionId);
|
|
933
|
+
if (binding === void 0 || binding.session !== session) throw new Error("slash.sessionOf requires a retained Session scope");
|
|
934
|
+
const id = binding.sessionId;
|
|
819
935
|
const { live } = this;
|
|
820
|
-
const existing = live.controllers.get(
|
|
936
|
+
const existing = live.controllers.get(binding);
|
|
821
937
|
if (existing !== void 0) return existing;
|
|
822
938
|
const controller = new InputTriggerController({
|
|
823
|
-
actx,
|
|
939
|
+
actx: binding.ctx,
|
|
824
940
|
sessionId: id,
|
|
825
941
|
roster: {
|
|
826
942
|
sources: (trigger) => live.sources.filter((s) => s.trigger === trigger).sort((a, b) => (a.order ?? 0) - (b.order ?? 0)),
|
|
827
943
|
all: () => live.sources
|
|
828
944
|
}
|
|
829
945
|
});
|
|
830
|
-
live.controllers.set(
|
|
831
|
-
|
|
946
|
+
live.controllers.set(binding, controller);
|
|
947
|
+
binding.ctx.effect(() => () => {
|
|
832
948
|
controller.dispose();
|
|
833
|
-
live.controllers.delete(
|
|
949
|
+
live.controllers.delete(binding);
|
|
834
950
|
}, "slash: session controller");
|
|
835
951
|
return controller;
|
|
836
952
|
}
|
|
@@ -857,7 +973,7 @@ window.__ModuleLoader__.load({
|
|
|
857
973
|
}
|
|
858
974
|
//#endregion
|
|
859
975
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-input-trigger/src/client/MenuView.module.css.mjs
|
|
860
|
-
const css = "._3e4SsG_menu{z-index:100;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2)
|
|
976
|
+
const css = "._3e4SsG_menu{z-index:100;box-sizing:border-box;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);--dsh-scrollbar-width:6px;--dsh-scrollbar-thumb-border:2px;--dsh-scrollbar-track-margin:12px;--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);max-height:400px;box-shadow:var(--dsw-elevation-prominent);border:0;flex-direction:column;padding:4px;display:flex;position:absolute;bottom:calc(100% + 4px);left:0;right:0;overflow:hidden}._3e4SsG_menu[data-overflow-below]:after{content:\"\";background:linear-gradient(to bottom, transparent, var(--dsw-specific-menu));pointer-events:none;height:16px;position:absolute;bottom:4px;left:4px;right:14px}._3e4SsG_viewport{flex-direction:column;min-height:0;display:flex;overflow-y:auto}._3e4SsG_item{border-radius:var(--dsw-radius-md);cursor:pointer;width:100%;min-height:34px;color:var(--dsw-alias-label-primary);text-align:left;background:0 0;border:none;align-items:center;gap:6px;padding:6px 8px;font-size:13px;line-height:20px;display:flex}._3e4SsG_item._3e4SsG_active{background:var(--dsw-alias-interactive-bg-hover)}._3e4SsG_sectionTitle{min-height:23px;color:var(--dsw-alias-label-tertiary);flex:none;padding:5px 8px 2px;font-size:11px;font-weight:500;line-height:16px}._3e4SsG_sectionTitle:not(:first-child){margin-top:3px}._3e4SsG_itemIcon{width:14px;height:14px;color:var(--dsw-alias-menu-icon);flex:none;justify-content:center;align-items:center;display:inline-flex}._3e4SsG_itemIcon svg{width:14px;height:14px}._3e4SsG_itemName{text-overflow:ellipsis;white-space:nowrap;flex:none;max-width:40%;overflow:hidden}._3e4SsG_itemAlias{text-overflow:ellipsis;white-space:nowrap;max-width:20%;color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px;line-height:18px;overflow:hidden}._3e4SsG_itemDescription{text-overflow:ellipsis;white-space:nowrap;text-align:right;min-width:0;color:var(--dsw-alias-label-tertiary);flex:1;font-size:12px;line-height:18px;overflow:hidden}._3e4SsG_trailing{flex:none;align-items:center;gap:3px;margin-left:auto;display:inline-flex}._3e4SsG_drillHintText{color:var(--dsw-alias-label-caption);white-space:nowrap;font-size:10px;line-height:16px;display:none}._3e4SsG_drillHint{border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-caption);padding:0 4px;font-family:inherit;font-size:10px;line-height:16px;display:none}._3e4SsG_item._3e4SsG_active ._3e4SsG_drillHintText,._3e4SsG_item._3e4SsG_active ._3e4SsG_drillHint{display:inline-flex}._3e4SsG_drill{border-radius:var(--dsw-radius-xs);width:18px;height:18px;color:var(--dsw-alias-menu-icon);flex:none;place-items:center;display:inline-grid}._3e4SsG_drill:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._3e4SsG_groupTitle{color:var(--dsw-alias-label-tertiary);padding:6px 8px;font-size:11px;line-height:15px}._3e4SsG_skeletonRow{box-sizing:border-box;align-items:center;min-height:34px;padding:6px 8px;display:flex}._3e4SsG_skeletonBar{border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-bg-skeleton);height:18px;animation:2s cubic-bezier(.36,0,.64,1) infinite _3e4SsG_dsh-menu-skeleton}@keyframes _3e4SsG_dsh-menu-skeleton{0%{opacity:1}40%{opacity:.6}80%,to{opacity:1}}._3e4SsG_crumbs{border-bottom:.5px solid var(--dsw-alias-border-l1);flex-wrap:wrap;flex:none;align-items:center;gap:2px;margin-bottom:2px;padding:3px 3px 5px;display:flex}._3e4SsG_crumb{border-radius:var(--dsw-radius-sm);max-width:40%;color:var(--dsw-alias-label-tertiary);cursor:pointer;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:none;flex:0 auto;padding:2px 5px;font-family:inherit;font-size:11px;line-height:16px;overflow:hidden}._3e4SsG_crumb:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._3e4SsG_crumbCurrent,._3e4SsG_crumbCurrent:hover{color:var(--dsw-alias-label-primary);cursor:default;background:0 0}._3e4SsG_crumbSeparator{color:var(--dsw-alias-menu-icon);flex:none;display:inline-flex}";
|
|
861
977
|
const tagId = "@deepseek-ai/dsh-client-ui-input-trigger/MenuView.module.css";
|
|
862
978
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
863
979
|
const tag = document.createElement("style");
|
|
@@ -878,6 +994,7 @@ window.__ModuleLoader__.load({
|
|
|
878
994
|
"dsh-menu-skeleton": "_3e4SsG_dsh-menu-skeleton",
|
|
879
995
|
"groupTitle": "_3e4SsG_groupTitle",
|
|
880
996
|
"item": "_3e4SsG_item",
|
|
997
|
+
"itemAlias": "_3e4SsG_itemAlias",
|
|
881
998
|
"itemDescription": "_3e4SsG_itemDescription",
|
|
882
999
|
"itemIcon": "_3e4SsG_itemIcon",
|
|
883
1000
|
"itemName": "_3e4SsG_itemName",
|
|
@@ -899,11 +1016,19 @@ window.__ModuleLoader__.load({
|
|
|
899
1016
|
* rows only while it has none; pointer picks route back through
|
|
900
1017
|
* the service (combobox pattern — focus never leaves the textarea, so rows
|
|
901
1018
|
* are mousedown-handled and the highlight is exposed via
|
|
902
|
-
* aria-activedescendant on the listbox). A
|
|
903
|
-
*
|
|
1019
|
+
* aria-activedescendant on the listbox). A row reads title, then the
|
|
1020
|
+
* command-name alias when the title is not the name in another letter case
|
|
1021
|
+
* (a localized title), then the description right-aligned. A source publishing crumbs gets a breadcrumb
|
|
1022
|
+
* header pinned above the scrolling list.
|
|
904
1023
|
*/
|
|
905
|
-
/**
|
|
906
|
-
const MAX_HEIGHT =
|
|
1024
|
+
/** Height cap that fits the two headings and eight built-in command rows. */
|
|
1025
|
+
const MAX_HEIGHT = 400;
|
|
1026
|
+
/**
|
|
1027
|
+
* Viewport top margin: the conversation header's 76px block (title row plus
|
|
1028
|
+
* view tabs, ui-conversation) plus 8px of air, so a tall list stops below the
|
|
1029
|
+
* header instead of sliding under it.
|
|
1030
|
+
*/
|
|
1031
|
+
const TOP_MARGIN = 84;
|
|
907
1032
|
/** DOM id of one option row (the aria-activedescendant target). */
|
|
908
1033
|
function optionId(source, index) {
|
|
909
1034
|
return `dsh-slash-option-${source}-${index}`;
|
|
@@ -917,7 +1042,20 @@ window.__ModuleLoader__.load({
|
|
|
917
1042
|
const state = (0, react.useSyncExternalStore)((fn) => menu.subscribe(fn), () => menu.getSnapshot());
|
|
918
1043
|
const crumbs = (0, react.useSyncExternalStore)((fn) => headers.subscribe(fn), () => headers.getSnapshot());
|
|
919
1044
|
const listRef = (0, react.useRef)(null);
|
|
920
|
-
const
|
|
1045
|
+
const viewportRef = (0, react.useRef)(null);
|
|
1046
|
+
const [hasOverflowBelow, setHasOverflowBelow] = (0, react.useState)(false);
|
|
1047
|
+
const maxHeight = (0, _deepseek_ai_dsh_client_ui_primitives.useAnchoredMaxHeight)(listRef, MAX_HEIGHT, state, TOP_MARGIN);
|
|
1048
|
+
const updateOverflowHint = (0, react.useCallback)(() => {
|
|
1049
|
+
const viewport = viewportRef.current;
|
|
1050
|
+
setHasOverflowBelow(viewport !== null && viewport.scrollTop + viewport.clientHeight < viewport.scrollHeight - 1);
|
|
1051
|
+
}, []);
|
|
1052
|
+
(0, react.useLayoutEffect)(() => {
|
|
1053
|
+
updateOverflowHint();
|
|
1054
|
+
}, [
|
|
1055
|
+
state,
|
|
1056
|
+
maxHeight,
|
|
1057
|
+
updateOverflowHint
|
|
1058
|
+
]);
|
|
921
1059
|
const highlight = state.open ? state.highlight : null;
|
|
922
1060
|
(0, react.useEffect)(() => {
|
|
923
1061
|
if (highlight === null) return;
|
|
@@ -937,11 +1075,12 @@ window.__ModuleLoader__.load({
|
|
|
937
1075
|
};
|
|
938
1076
|
}, [state.open, onDismiss]);
|
|
939
1077
|
if (!state.open) return null;
|
|
940
|
-
return (0, react_jsx_runtime.jsxs)(
|
|
1078
|
+
return (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.MenuSurface, {
|
|
941
1079
|
ref: listRef,
|
|
942
1080
|
className: MenuView_module_css_default.menu,
|
|
943
1081
|
style: { maxHeight },
|
|
944
1082
|
"data-trigger-menu": "",
|
|
1083
|
+
"data-overflow-below": hasOverflowBelow || void 0,
|
|
945
1084
|
children: [state.groups.map((group) => {
|
|
946
1085
|
const trail = crumbs.get(group.source);
|
|
947
1086
|
return trail === void 0 ? null : (0, react_jsx_runtime.jsx)("nav", {
|
|
@@ -950,7 +1089,7 @@ window.__ModuleLoader__.load({
|
|
|
950
1089
|
children: trail.map((crumb, index) => (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [index > 0 && (0, react_jsx_runtime.jsx)("span", {
|
|
951
1090
|
className: MenuView_module_css_default.crumbSeparator,
|
|
952
1091
|
"aria-hidden": true,
|
|
953
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
1092
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, {})
|
|
954
1093
|
}), (0, react_jsx_runtime.jsx)("button", {
|
|
955
1094
|
type: "button",
|
|
956
1095
|
className: clsx(MenuView_module_css_default.crumb, crumb.current === true && MenuView_module_css_default.crumbCurrent),
|
|
@@ -964,10 +1103,12 @@ window.__ModuleLoader__.load({
|
|
|
964
1103
|
})] }, `${String(index)}-${crumb.value}`))
|
|
965
1104
|
}, group.source);
|
|
966
1105
|
}), (0, react_jsx_runtime.jsx)("div", {
|
|
1106
|
+
ref: viewportRef,
|
|
967
1107
|
className: MenuView_module_css_default.viewport,
|
|
968
1108
|
role: "listbox",
|
|
969
1109
|
"aria-label": t("suggestions.aria"),
|
|
970
1110
|
"aria-activedescendant": highlight !== null ? optionId(highlight.source, highlight.index) : void 0,
|
|
1111
|
+
onScroll: updateOverflowHint,
|
|
971
1112
|
children: state.groups.map((group) => group.status === "ready" && group.items.length === 0 ? null : (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [group.showGroupTitle === false || group.items.some((item) => item.section !== void 0) ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
972
1113
|
className: MenuView_module_css_default.groupTitle,
|
|
973
1114
|
role: "presentation",
|
|
@@ -1013,13 +1154,17 @@ window.__ModuleLoader__.load({
|
|
|
1013
1154
|
item.icon !== void 0 && (0, react_jsx_runtime.jsx)("span", {
|
|
1014
1155
|
className: MenuView_module_css_default.itemIcon,
|
|
1015
1156
|
"aria-hidden": true,
|
|
1016
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
1157
|
+
children: typeof item.icon === "string" ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.ReferenceIconRegular, {
|
|
1017
1158
|
kind: item.icon,
|
|
1018
|
-
size:
|
|
1019
|
-
})
|
|
1159
|
+
size: 14
|
|
1160
|
+
}) : (0, react_jsx_runtime.jsx)(item.icon, { size: 14 })
|
|
1020
1161
|
}),
|
|
1021
1162
|
(0, react_jsx_runtime.jsx)("span", {
|
|
1022
1163
|
className: MenuView_module_css_default.itemName,
|
|
1164
|
+
children: item.label ?? item.name
|
|
1165
|
+
}),
|
|
1166
|
+
item.label !== void 0 && item.label.toLowerCase() !== item.name.toLowerCase() && (0, react_jsx_runtime.jsx)("span", {
|
|
1167
|
+
className: MenuView_module_css_default.itemAlias,
|
|
1023
1168
|
children: item.name
|
|
1024
1169
|
}),
|
|
1025
1170
|
item.description !== void 0 && (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -1048,7 +1193,7 @@ window.__ModuleLoader__.load({
|
|
|
1048
1193
|
ev.stopPropagation();
|
|
1049
1194
|
onPick(group.source, index, "drill");
|
|
1050
1195
|
},
|
|
1051
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
1196
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, { size: 12 })
|
|
1052
1197
|
})
|
|
1053
1198
|
]
|
|
1054
1199
|
})
|