dsh-edge 0.32.0 → 0.33.0
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 +2 -0
- package/README.zh.md +2 -0
- package/THIRD_PARTY_NOTICES.md +514 -512
- package/dist/assets/{index-BxpfOGf3.css → index-BNyAYEM7.css} +1 -1
- package/dist/assets/index-BXV-oxvX.js +191 -0
- package/dist/index.html +3 -3
- package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +118 -4
- package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +50 -15
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +227 -30
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +8 -2
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +146 -18
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-right/client.js +149 -18
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +7 -6
- package/dist/plugins/dsh-edge-client-ui/client.js +35 -0
- package/package.json +124 -124
- package/worker/direct/index.js +1184 -1183
- package/worker/isolated/index.js +930 -929
- package/dist/assets/index-CN7NIWNw.js +0 -191
|
@@ -9,6 +9,26 @@ window.__ModuleLoader__.load({
|
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
11
11
|
let react = require("react");
|
|
12
|
+
const NO_PANELS = [];
|
|
13
|
+
/**
|
|
14
|
+
* Create the in-memory panel pin list; the snapshot keeps its reference until the list changes.
|
|
15
|
+
* @returns Unpinned panel ids and the pin mutation.
|
|
16
|
+
*/
|
|
17
|
+
function createPanelPins() {
|
|
18
|
+
const store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)({ unpinned: NO_PANELS });
|
|
19
|
+
return {
|
|
20
|
+
unpinned: {
|
|
21
|
+
getSnapshot: () => store.getSnapshot().unpinned,
|
|
22
|
+
subscribe: (listener) => store.subscribe(listener)
|
|
23
|
+
},
|
|
24
|
+
setPinned: (id, pinned) => {
|
|
25
|
+
const current = store.getSnapshot().unpinned;
|
|
26
|
+
if (id === "plugins" || pinned !== current.includes(id)) return;
|
|
27
|
+
store.set({ unpinned: pinned ? current.filter((entry) => entry !== id) : [...current, id] });
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
12
32
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-sidebar/src/client/HeaderLeadingControls.module.css.mjs
|
|
13
33
|
const css$1 = ".IW6AQa_controls{align-items:center;gap:8px;display:flex}.IW6AQa_iconButton{border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.IW6AQa_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}";
|
|
14
34
|
const tagId$1 = "@deepseek-ai/dsh-client-ui-sidebar/HeaderLeadingControls.module.css";
|
|
@@ -35,7 +55,7 @@ window.__ModuleLoader__.load({
|
|
|
35
55
|
* @param props - Injected sidebar actions plus the sidebar locale seat.
|
|
36
56
|
* @returns the two window-chrome controls.
|
|
37
57
|
*/
|
|
38
|
-
function HeaderLeadingControls({ toggleSidebar, startSession, useShortcuts, t }) {
|
|
58
|
+
function HeaderLeadingControls({ toggleSidebar, startSession, trackEntryClick, useShortcuts, t }) {
|
|
39
59
|
const shortcut = useShortcuts((rows) => rows.find((row) => row.id === "sidebar.left.toggle"));
|
|
40
60
|
const newShortcut = useShortcuts((rows) => rows.find((row) => row.id === "session.new"));
|
|
41
61
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -64,6 +84,10 @@ window.__ModuleLoader__.load({
|
|
|
64
84
|
"aria-label": t("session.new.label"),
|
|
65
85
|
"aria-keyshortcuts": newShortcut?.aria,
|
|
66
86
|
onClick: () => {
|
|
87
|
+
trackEntryClick({
|
|
88
|
+
menu_name: "new_session",
|
|
89
|
+
position: "titlebar"
|
|
90
|
+
});
|
|
67
91
|
startSession();
|
|
68
92
|
},
|
|
69
93
|
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconNewChatOutlineRegular, { size: 16 })
|
|
@@ -88,7 +112,7 @@ window.__ModuleLoader__.load({
|
|
|
88
112
|
}
|
|
89
113
|
//#endregion
|
|
90
114
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-sidebar/src/client/SidebarRoot.module.css.mjs
|
|
91
|
-
const css = ".hHd-Xa_root{--dsh-sidebar-inline-padding:12px;height:100%;padding:6px var(--dsh-sidebar-inline-padding);box-sizing:border-box;background:var(--dsw-specific-sidebar-fill);color:var(--dsw-alias-label-primary);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);flex-direction:column;font-size:14px;display:flex}[data-platform=darwin] .hHd-Xa_root{background:0 0}.hHd-Xa_root.hHd-Xa_collapsed{padding:18px 10px 6px}[data-windows-titlebar] .hHd-Xa_root .hHd-Xa_logoRow{height:40px;margin:0;padding:0}[data-windows-titlebar] .hHd-Xa_toggle{top:calc((var(--dsh-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;position:fixed;left:12px}[data-windows-titlebar] .hHd-Xa_root.hHd-Xa_collapsed .hHd-Xa_logoRow{height:0}[data-windows-titlebar] .hHd-Xa_root:not(.hHd-Xa_collapsed) .hHd-Xa_brand{padding-left:4px}[data-windows-titlebar] .hHd-Xa_brandIdentity{transform:translateY(1px)}[data-windows-titlebar] .hHd-Xa_brandMark{transform:translate(1px)}[data-windows-titlebar] .hHd-Xa_brandName{font-weight:400}[data-windows-titlebar] .hHd-Xa_root.hHd-Xa_collapsed{padding:0}[data-windows-titlebar] .hHd-Xa_root:not(.hHd-Xa_collapsed) .hHd-Xa_newSession{margin-top:8px;margin-left:0}[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_panelList,[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_regionArea,[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_footArea{display:none}html[data-windows-titlebar]:has([data-sidebar-collapsed=true]){--dsh-windows-menu-start:84px}[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_newSession{top:calc((var(--dsh-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;border:none;margin:0;padding:0;position:fixed;left:48px}[data-windows-titlebar] .hHd-Xa_railIn .hHd-Xa_iconButton,[data-windows-titlebar] .hHd-Xa_railIn .hHd-Xa_newSession{animation:none}[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_toggle,[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_newSession{border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--dsw-alias-label-secondary)}[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_toggle .hHd-Xa_panelIcon{display:inline}.hHd-Xa_root.hHd-Xa_quietBars{--dsh-scrollbar-thumb:transparent;--dsh-scrollbar-thumb-hover:transparent}.hHd-Xa_fading>*{opacity:0;transition:opacity .15s var(--ds-ease-in-out)}.hHd-Xa_wide{animation:hHd-Xa_wide-in .2s var(--ds-ease-in-out)}@keyframes hHd-Xa_wide-in{0%{opacity:0}}.hHd-Xa_railIn .hHd-Xa_iconButton,.hHd-Xa_railIn .hHd-Xa_newSession,.hHd-Xa_railIn .hHd-Xa_panelList,.hHd-Xa_railIn .hHd-Xa_regionArea{animation:hHd-Xa_rail-in .15s var(--ds-ease-in-out) backwards}.hHd-Xa_railIn .hHd-Xa_footArea{animation:hHd-Xa_rail-fade-in .15s var(--ds-ease-in-out) backwards}@keyframes hHd-Xa_rail-in{0%{opacity:0;transform:translate(49px)}}@keyframes hHd-Xa_rail-fade-in{0%{opacity:0}}.hHd-Xa_topStrip{box-sizing:border-box;height:52px;margin:-6px calc(-1 * var(--dsh-sidebar-inline-padding)) 0;flex:none;justify-content:flex-end;align-items:center;padding:0 12px 2px;display:flex}[data-fullscreen] .hHd-Xa_topStrip{justify-content:flex-start}.hHd-Xa_topStrip+.hHd-Xa_logoRow{margin-top:-12px}.hHd-Xa_logoRow{box-sizing:border-box;flex:none;justify-content:flex-end;align-items:center;gap:8px;height:60px;margin-bottom:4px;padding:8px 0 8px 4px;display:flex;overflow:hidden}.hHd-Xa_collapsed .hHd-Xa_logoRow{justify-content:flex-start;height:36px;margin-bottom:12px;padding:0;overflow:visible}.hHd-Xa_brand{min-width:0;color:inherit;cursor:pointer;background:0 0;border:none;flex:1;align-items:center;padding:0;display:inline-flex;overflow:hidden}[data-platform=darwin] .hHd-Xa_brand{cursor:default}.hHd-Xa_brandIdentity{align-items:center;gap:8px;min-width:0;height:24px;display:inline-flex}.hHd-Xa_brandMark{flex:none;justify-content:center;align-items:center;display:inline-flex}.hHd-Xa_brandName{letter-spacing:.04em;align-items:center;gap:6px;min-width:0;height:24px;font-size:18px;font-weight:600;line-height:24px;display:inline-flex}.hHd-Xa_fallbackBrandName{letter-spacing:0;white-space:nowrap;font-size:17px}.hHd-Xa_localBuildBrand{white-space:nowrap;flex-direction:column;flex:none;justify-content:center;align-items:flex-start;gap:1px;height:24px;display:inline-flex}.hHd-Xa_localBuildTitle{letter-spacing:0;font-size:12px;line-height:13px}.hHd-Xa_iconButton{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:relative}.hHd-Xa_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.hHd-Xa_iconButton.hHd-Xa_toggle:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.hHd-Xa_collapsed .hHd-Xa_iconButton{border-radius:var(--dsw-radius-md);width:36px;height:36px}.hHd-Xa_collapsed .hHd-Xa_toggle .hHd-Xa_panelIcon{display:none}.hHd-Xa_collapsed .hHd-Xa_toggle:hover .hHd-Xa_panelIcon{display:inline}.hHd-Xa_collapsed .hHd-Xa_toggle:hover .hHd-Xa_railMark{display:none}.hHd-Xa_railMark{justify-content:center;align-items:center;display:inline-flex}.hHd-Xa_collapsed .hHd-Xa_iconButton{color:var(--dsw-alias-label-primary)}.hHd-Xa_buildVersion{height:10px;color:var(--dsw-alias-label-primary-inverted);background:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code);white-space:nowrap;border-radius:2px;flex:none;align-items:center;padding:0 3px;font-size:6px;font-weight:500;line-height:10px;display:inline-flex}.hHd-Xa_newSession{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-button-elevated-fill);height:38px;color:var(--dsw-alias-label-primary);cursor:pointer;flex:none;justify-content:center;align-items:center;gap:0;margin:0 2px 12px;padding:8px 12px;font-size:14px;font-weight:500;line-height:22px;display:flex;position:relative;overflow:hidden;container-type:inline-size}.hHd-Xa_newSession:hover{background:var(--dsw-alias-button-floating-hover)}[data-platform=darwin] .hHd-Xa_newSession{background:#ffffff8c}[data-platform=darwin] .hHd-Xa_newSession:hover{background:#ffffff4d}[data-platform=darwin] [data-ds-dark-theme] .hHd-Xa_newSession{background:#ffffff26}[data-platform=darwin] [data-ds-dark-theme] .hHd-Xa_newSession:hover{background:#fff3}.hHd-Xa_collapsed .hHd-Xa_newSession{background:0 0;border-color:#0000;align-self:flex-start;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}.hHd-Xa_collapsed .hHd-Xa_newSession:hover{background:var(--dsw-alias-interactive-bg-hover)}.hHd-Xa_newSessionLabel{white-space:nowrap;max-width:200px;overflow:hidden}.hHd-Xa_collapsed .hHd-Xa_newSessionLabel{max-width:0}.hHd-Xa_newSessionLabelMask{flex:1;min-width:0}.hHd-Xa_newSession:is(:hover,:focus-visible) .hHd-Xa_newSessionLabelMask:has(+.hHd-Xa_newSessionShortcut){overflow:hidden;mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000)}.hHd-Xa_newSessionContent{justify-content:center;align-items:center;gap:6px;width:100cqw;display:flex}.hHd-Xa_newSessionContent>svg{flex:none}.hHd-Xa_newSessionShortcut{opacity:0;pointer-events:none;flex:none;font-weight:400;display:inline-flex}.hHd-Xa_newSession:is(:hover,:focus-visible) .hHd-Xa_newSessionShortcut{opacity:1}.hHd-Xa_panelList{flex-direction:column;flex:none;gap:
|
|
115
|
+
const css = ".hHd-Xa_root{--dsh-sidebar-inline-padding:12px;height:100%;padding:6px var(--dsh-sidebar-inline-padding);box-sizing:border-box;background:var(--dsw-specific-sidebar-fill);color:var(--dsw-alias-label-primary);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);flex-direction:column;font-size:14px;display:flex}[data-platform=darwin] .hHd-Xa_root{background:0 0}.hHd-Xa_root.hHd-Xa_collapsed{padding:18px 10px 6px}[data-windows-titlebar] .hHd-Xa_root .hHd-Xa_logoRow{height:40px;margin:0;padding:0}[data-windows-titlebar] .hHd-Xa_toggle{top:calc((var(--dsh-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;position:fixed;left:12px}[data-windows-titlebar] .hHd-Xa_root.hHd-Xa_collapsed .hHd-Xa_logoRow{height:0}[data-windows-titlebar] .hHd-Xa_root:not(.hHd-Xa_collapsed) .hHd-Xa_brand{padding-left:4px}[data-windows-titlebar] .hHd-Xa_brandIdentity{transform:translateY(1px)}[data-windows-titlebar] .hHd-Xa_brandMark{transform:translate(1px)}[data-windows-titlebar] .hHd-Xa_brandName{font-weight:400}[data-windows-titlebar] .hHd-Xa_root.hHd-Xa_collapsed{padding:0}[data-windows-titlebar] .hHd-Xa_root:not(.hHd-Xa_collapsed) .hHd-Xa_newSession{margin-top:8px;margin-left:0}[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_panelList,[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_regionArea,[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_footArea{display:none}html[data-windows-titlebar]:has([data-sidebar-collapsed=true]){--dsh-windows-menu-start:84px}[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_newSession{top:calc((var(--dsh-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;border:none;margin:0;padding:0;position:fixed;left:48px}[data-windows-titlebar] .hHd-Xa_railIn .hHd-Xa_iconButton,[data-windows-titlebar] .hHd-Xa_railIn .hHd-Xa_newSession{animation:none}[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_toggle,[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_newSession{border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--dsw-alias-label-secondary)}[data-windows-titlebar] .hHd-Xa_collapsed .hHd-Xa_toggle .hHd-Xa_panelIcon{display:inline}.hHd-Xa_root.hHd-Xa_quietBars{--dsh-scrollbar-thumb:transparent;--dsh-scrollbar-thumb-hover:transparent}.hHd-Xa_fading>*{opacity:0;transition:opacity .15s var(--ds-ease-in-out)}.hHd-Xa_wide{animation:hHd-Xa_wide-in .2s var(--ds-ease-in-out)}@keyframes hHd-Xa_wide-in{0%{opacity:0}}.hHd-Xa_railIn .hHd-Xa_iconButton,.hHd-Xa_railIn .hHd-Xa_newSession,.hHd-Xa_railIn .hHd-Xa_panelList,.hHd-Xa_railIn .hHd-Xa_regionArea{animation:hHd-Xa_rail-in .15s var(--ds-ease-in-out) backwards}.hHd-Xa_railIn .hHd-Xa_footArea{animation:hHd-Xa_rail-fade-in .15s var(--ds-ease-in-out) backwards}@keyframes hHd-Xa_rail-in{0%{opacity:0;transform:translate(49px)}}@keyframes hHd-Xa_rail-fade-in{0%{opacity:0}}.hHd-Xa_topStrip{box-sizing:border-box;height:52px;margin:-6px calc(-1 * var(--dsh-sidebar-inline-padding)) 0;flex:none;justify-content:flex-end;align-items:center;padding:0 12px 2px;display:flex}[data-fullscreen] .hHd-Xa_topStrip{justify-content:flex-start}.hHd-Xa_topStrip+.hHd-Xa_logoRow{margin-top:-12px}.hHd-Xa_logoRow{box-sizing:border-box;flex:none;justify-content:flex-end;align-items:center;gap:8px;height:60px;margin-bottom:4px;padding:8px 0 8px 4px;display:flex;overflow:hidden}.hHd-Xa_collapsed .hHd-Xa_logoRow{justify-content:flex-start;height:36px;margin-bottom:12px;padding:0;overflow:visible}.hHd-Xa_brand{min-width:0;color:inherit;cursor:pointer;background:0 0;border:none;flex:1;align-items:center;padding:0;display:inline-flex;overflow:hidden}[data-platform=darwin] .hHd-Xa_brand{cursor:default}.hHd-Xa_brandIdentity{align-items:center;gap:8px;min-width:0;height:24px;display:inline-flex}.hHd-Xa_brandMark{flex:none;justify-content:center;align-items:center;display:inline-flex}.hHd-Xa_brandName{letter-spacing:.04em;align-items:center;gap:6px;min-width:0;height:24px;font-size:18px;font-weight:600;line-height:24px;display:inline-flex}.hHd-Xa_fallbackBrandName{letter-spacing:0;white-space:nowrap;font-size:17px}.hHd-Xa_localBuildBrand{white-space:nowrap;flex-direction:column;flex:none;justify-content:center;align-items:flex-start;gap:1px;height:24px;display:inline-flex}.hHd-Xa_localBuildTitle{letter-spacing:0;font-size:12px;line-height:13px}.hHd-Xa_iconButton{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:relative}.hHd-Xa_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.hHd-Xa_iconButton.hHd-Xa_toggle:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.hHd-Xa_collapsed .hHd-Xa_iconButton{border-radius:var(--dsw-radius-md);width:36px;height:36px}.hHd-Xa_collapsed .hHd-Xa_toggle .hHd-Xa_panelIcon{display:none}.hHd-Xa_collapsed .hHd-Xa_toggle:hover .hHd-Xa_panelIcon{display:inline}.hHd-Xa_collapsed .hHd-Xa_toggle:hover .hHd-Xa_railMark{display:none}.hHd-Xa_railMark{justify-content:center;align-items:center;display:inline-flex}.hHd-Xa_collapsed .hHd-Xa_iconButton{color:var(--dsw-alias-label-primary)}.hHd-Xa_buildVersion{height:10px;color:var(--dsw-alias-label-primary-inverted);background:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code);white-space:nowrap;border-radius:2px;flex:none;align-items:center;padding:0 3px;font-size:6px;font-weight:500;line-height:10px;display:inline-flex}.hHd-Xa_newSession{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-button-elevated-fill);height:38px;color:var(--dsw-alias-label-primary);cursor:pointer;flex:none;justify-content:center;align-items:center;gap:0;margin:0 2px 12px;padding:8px 12px;font-size:14px;font-weight:500;line-height:22px;display:flex;position:relative;overflow:hidden;container-type:inline-size}.hHd-Xa_newSession:hover{background:var(--dsw-alias-button-floating-hover)}[data-platform=darwin] .hHd-Xa_newSession{background:#ffffff8c}[data-platform=darwin] .hHd-Xa_newSession:hover{background:#ffffff4d}[data-platform=darwin] [data-ds-dark-theme] .hHd-Xa_newSession{background:#ffffff26}[data-platform=darwin] [data-ds-dark-theme] .hHd-Xa_newSession:hover{background:#fff3}.hHd-Xa_collapsed .hHd-Xa_newSession{background:0 0;border-color:#0000;align-self:flex-start;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}.hHd-Xa_collapsed .hHd-Xa_newSession:hover{background:var(--dsw-alias-interactive-bg-hover)}.hHd-Xa_newSessionLabel{white-space:nowrap;max-width:200px;overflow:hidden}.hHd-Xa_collapsed .hHd-Xa_newSessionLabel{max-width:0}.hHd-Xa_newSessionLabelMask{flex:1;min-width:0}.hHd-Xa_newSession:is(:hover,:focus-visible) .hHd-Xa_newSessionLabelMask:has(+.hHd-Xa_newSessionShortcut){overflow:hidden;mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000)}.hHd-Xa_newSessionContent{justify-content:center;align-items:center;gap:6px;width:100cqw;display:flex}.hHd-Xa_newSessionContent>svg{flex:none}.hHd-Xa_newSessionShortcut{opacity:0;pointer-events:none;flex:none;font-weight:400;display:inline-flex}.hHd-Xa_newSession:is(:hover,:focus-visible) .hHd-Xa_newSessionShortcut{opacity:1}.hHd-Xa_panelList{flex-direction:column;flex:none;gap:2px;margin-bottom:8px;display:flex}.hHd-Xa_panelRow{box-sizing:border-box;border-radius:var(--dsw-radius-md);min-height:36px;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;margin:0 2px;padding:7px 8px;line-height:22px;display:flex}.hHd-Xa_panelRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.hHd-Xa_panelRow.hHd-Xa_panelActive{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.hHd-Xa_panelRow:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.hHd-Xa_moreAnchor{flex-direction:column;display:flex}.hHd-Xa_panelRow[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.hHd-Xa_moreMenu{width:288px;max-width:calc(100vw - 24px)}.hHd-Xa_panelGlyph{flex:none;justify-content:center;align-items:center;display:inline-flex}.hHd-Xa_panelTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.hHd-Xa_collapsed .hHd-Xa_panelList{gap:12px;margin-bottom:12px}.hHd-Xa_collapsed .hHd-Xa_panelRow{width:36px;height:36px;color:var(--dsw-alias-label-primary);justify-content:center;margin:0;padding:0}.hHd-Xa_regionArea{min-height:0;margin-left:-4px;margin-right:calc(-1 * var(--dsh-sidebar-inline-padding));flex-direction:column;flex:1;padding-left:4px;display:flex;overflow:hidden}.hHd-Xa_collapsed .hHd-Xa_regionArea{margin-left:0;margin-right:0;padding-left:0}.hHd-Xa_footArea{flex-direction:column;flex:none;display:flex}.hHd-Xa_settingsArea,.hHd-Xa_footerActions{flex:none;width:100%;min-width:0}.hHd-Xa_footerActions{display:flex}.hHd-Xa_collapsed .hHd-Xa_footArea{align-items:center}.hHd-Xa_collapsed .hHd-Xa_settingsArea,.hHd-Xa_collapsed .hHd-Xa_footerActions{justify-content:center;width:auto;display:flex}@media (prefers-reduced-motion:reduce){.hHd-Xa_wide,.hHd-Xa_fading>*,.hHd-Xa_railIn .hHd-Xa_iconButton,.hHd-Xa_railIn .hHd-Xa_newSession,.hHd-Xa_railIn .hHd-Xa_panelList,.hHd-Xa_railIn .hHd-Xa_footArea,.hHd-Xa_railIn .hHd-Xa_regionArea{transition:none;animation:none}}";
|
|
92
116
|
const tagId = "@deepseek-ai/dsh-client-ui-sidebar/SidebarRoot.module.css";
|
|
93
117
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
94
118
|
const tag = document.createElement("style");
|
|
@@ -112,6 +136,8 @@ window.__ModuleLoader__.load({
|
|
|
112
136
|
"localBuildBrand": "hHd-Xa_localBuildBrand",
|
|
113
137
|
"localBuildTitle": "hHd-Xa_localBuildTitle",
|
|
114
138
|
"logoRow": "hHd-Xa_logoRow",
|
|
139
|
+
"moreAnchor": "hHd-Xa_moreAnchor",
|
|
140
|
+
"moreMenu": "hHd-Xa_moreMenu",
|
|
115
141
|
"newSession": "hHd-Xa_newSession",
|
|
116
142
|
"newSessionContent": "hHd-Xa_newSessionContent",
|
|
117
143
|
"newSessionLabel": "hHd-Xa_newSessionLabel",
|
|
@@ -167,10 +193,15 @@ window.__ModuleLoader__.load({
|
|
|
167
193
|
const SCROLLBAR_LINGER_MS = 2e3;
|
|
168
194
|
/** Format complete-build metadata for the local brand badge. */
|
|
169
195
|
function localBuildVersion() {
|
|
170
|
-
return `0.2.1-rc.
|
|
196
|
+
return `0.2.1-rc.3-be72761` + ({}.DSH_CLIENT_GIT_DIRTY === "true" ? "-dirty" : "");
|
|
197
|
+
}
|
|
198
|
+
/** Analytics category of an official panel; other panels are never reported. */
|
|
199
|
+
function officialEntry(id) {
|
|
200
|
+
if (id === "plugins") return "plugin";
|
|
201
|
+
return id === "schedules" ? "cron" : void 0;
|
|
171
202
|
}
|
|
172
203
|
/** Each panel row subscribes only to its own selection state. */
|
|
173
|
-
function PanelRow({ id, label, wide, usePanelInfo, selectPanel, renderSlot }) {
|
|
204
|
+
function PanelRow({ id, label, wide, usePanelInfo, selectPanel, trackEntryClick, renderSlot }) {
|
|
174
205
|
const active = usePanelInfo((info) => info.activePanelId === id);
|
|
175
206
|
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
176
207
|
label,
|
|
@@ -182,6 +213,11 @@ window.__ModuleLoader__.load({
|
|
|
182
213
|
"aria-label": label,
|
|
183
214
|
"aria-current": active ? "page" : void 0,
|
|
184
215
|
onClick: () => {
|
|
216
|
+
const entry = officialEntry(id);
|
|
217
|
+
if (entry !== void 0) trackEntryClick({
|
|
218
|
+
menu_name: entry,
|
|
219
|
+
position: "sidebar"
|
|
220
|
+
});
|
|
185
221
|
selectPanel(id);
|
|
186
222
|
},
|
|
187
223
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
@@ -198,13 +234,64 @@ window.__ModuleLoader__.load({
|
|
|
198
234
|
})
|
|
199
235
|
});
|
|
200
236
|
}
|
|
237
|
+
/** The panel list's More launcher: a panel-row button whose menu rows come from `sidebar.panellist.actions`. */
|
|
238
|
+
function PanelMoreMenu({ wide, label, entries, onOpen, onPinnedChange, trackEntryClick, renderSlot }) {
|
|
239
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
240
|
+
const onDismiss = () => {
|
|
241
|
+
setOpen(false);
|
|
242
|
+
};
|
|
243
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
244
|
+
open,
|
|
245
|
+
onClose: onDismiss,
|
|
246
|
+
portal: true,
|
|
247
|
+
autoFocus: true,
|
|
248
|
+
className: SidebarRoot_module_css_default.moreAnchor,
|
|
249
|
+
listClassName: SidebarRoot_module_css_default.moreMenu,
|
|
250
|
+
anchor: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
251
|
+
label,
|
|
252
|
+
delayMs: 500,
|
|
253
|
+
disabled: wide,
|
|
254
|
+
children: (0, react_jsx_runtime.jsxs)("button", {
|
|
255
|
+
type: "button",
|
|
256
|
+
className: SidebarRoot_module_css_default.panelRow,
|
|
257
|
+
"aria-label": label,
|
|
258
|
+
"aria-haspopup": "menu",
|
|
259
|
+
"aria-expanded": open,
|
|
260
|
+
onClick: () => {
|
|
261
|
+
trackEntryClick({
|
|
262
|
+
menu_name: "more",
|
|
263
|
+
position: "sidebar"
|
|
264
|
+
});
|
|
265
|
+
setOpen((value) => !value);
|
|
266
|
+
},
|
|
267
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
268
|
+
className: SidebarRoot_module_css_default.panelGlyph,
|
|
269
|
+
"aria-hidden": "true",
|
|
270
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconAppsAddOutlineRegular, { size: wide ? 16 : 18 })
|
|
271
|
+
}), wide && (0, react_jsx_runtime.jsx)("span", {
|
|
272
|
+
className: clsx(SidebarRoot_module_css_default.panelTitle, SidebarRoot_module_css_default.wide),
|
|
273
|
+
children: label
|
|
274
|
+
})]
|
|
275
|
+
})
|
|
276
|
+
}),
|
|
277
|
+
children: renderSlot("sidebar.panellist.actions", {
|
|
278
|
+
entries,
|
|
279
|
+
onOpen,
|
|
280
|
+
onPinnedChange,
|
|
281
|
+
onDismiss
|
|
282
|
+
})
|
|
283
|
+
});
|
|
284
|
+
}
|
|
201
285
|
/**
|
|
202
286
|
* Render the sidebar column shell.
|
|
203
287
|
* @param props - composed slot props (runtime share + injected callbacks, contract/slots.ts).
|
|
204
288
|
* @returns the sidebar element tree.
|
|
205
289
|
*/
|
|
206
|
-
function SidebarRoot({ collapsed, width, startSession, toggleSidebar, selectPanel, usePanels, useShortcuts, usePanelInfo, t, renderSlot }) {
|
|
290
|
+
function SidebarRoot({ collapsed, width, startSession, toggleSidebar, selectPanel, setPinned, trackEntryClick, usePanels, useEntryPins, useEntryActions, useShortcuts, usePanelInfo, t, renderSlot }) {
|
|
207
291
|
const panels = usePanels((snapshot) => snapshot);
|
|
292
|
+
const unpinned = useEntryPins((ids) => ids);
|
|
293
|
+
const activePanelId = usePanelInfo((info) => info.activePanelId);
|
|
294
|
+
const hasEntryActions = useEntryActions((registered) => registered);
|
|
208
295
|
const shortcut = useShortcuts((rows) => rows.find((row) => row.id === "sidebar.left.toggle"));
|
|
209
296
|
const newShortcut = useShortcuts((rows) => rows.find((row) => row.id === "session.new"));
|
|
210
297
|
const toggleLabel = collapsed ? t("toggle.open") : t("toggle.collapse");
|
|
@@ -223,6 +310,13 @@ window.__ModuleLoader__.load({
|
|
|
223
310
|
}, [collapsed]);
|
|
224
311
|
const windowsTitlebar = document.documentElement.hasAttribute("data-windows-titlebar");
|
|
225
312
|
const wide = windowsTitlebar ? !collapsed : !collapsed || !settled;
|
|
313
|
+
const openNewSession = () => {
|
|
314
|
+
trackEntryClick({
|
|
315
|
+
menu_name: "new_session",
|
|
316
|
+
position: windowsTitlebar && collapsed ? "titlebar" : "sidebar"
|
|
317
|
+
});
|
|
318
|
+
startSession();
|
|
319
|
+
};
|
|
226
320
|
const captionTooltipSide = windowsTitlebar ? "bottom" : "right";
|
|
227
321
|
const lastWideWidth = (0, react.useRef)(width);
|
|
228
322
|
if (!collapsed) lastWideWidth.current = width;
|
|
@@ -338,9 +432,7 @@ window.__ModuleLoader__.load({
|
|
|
338
432
|
className: clsx(SidebarRoot_module_css_default.brand, SidebarRoot_module_css_default.wide),
|
|
339
433
|
"aria-label": t("session.new.label"),
|
|
340
434
|
"aria-keyshortcuts": newShortcut?.aria,
|
|
341
|
-
onClick:
|
|
342
|
-
startSession();
|
|
343
|
-
},
|
|
435
|
+
onClick: openNewSession,
|
|
344
436
|
children: identity
|
|
345
437
|
});
|
|
346
438
|
})(), !darwinDesktop && toggle]
|
|
@@ -356,9 +448,7 @@ window.__ModuleLoader__.load({
|
|
|
356
448
|
className: SidebarRoot_module_css_default.newSession,
|
|
357
449
|
"aria-label": t("session.new.label"),
|
|
358
450
|
"aria-keyshortcuts": newShortcut?.aria,
|
|
359
|
-
onClick:
|
|
360
|
-
startSession();
|
|
361
|
-
},
|
|
451
|
+
onClick: openNewSession,
|
|
362
452
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
363
453
|
className: SidebarRoot_module_css_default.newSessionLabelMask,
|
|
364
454
|
children: (0, react_jsx_runtime.jsxs)("span", {
|
|
@@ -375,17 +465,39 @@ window.__ModuleLoader__.load({
|
|
|
375
465
|
})]
|
|
376
466
|
})
|
|
377
467
|
}),
|
|
378
|
-
panels.length > 0 && (0, react_jsx_runtime.
|
|
468
|
+
panels.length > 0 && (0, react_jsx_runtime.jsxs)("nav", {
|
|
379
469
|
className: SidebarRoot_module_css_default.panelList,
|
|
380
470
|
"aria-label": t("panels.label"),
|
|
381
|
-
children: panels.map(({ id, label }) => (0, react_jsx_runtime.jsx)(PanelRow, {
|
|
471
|
+
children: [panels.filter(({ id }) => id === "plugins" || !unpinned.includes(id)).map(({ id, label }) => (0, react_jsx_runtime.jsx)(PanelRow, {
|
|
382
472
|
id,
|
|
383
473
|
label,
|
|
384
474
|
wide,
|
|
385
475
|
usePanelInfo,
|
|
386
476
|
selectPanel,
|
|
477
|
+
trackEntryClick,
|
|
478
|
+
renderSlot
|
|
479
|
+
}, id)), hasEntryActions && (0, react_jsx_runtime.jsx)(PanelMoreMenu, {
|
|
480
|
+
wide,
|
|
481
|
+
label: t("panels.more"),
|
|
482
|
+
entries: panels.filter(({ id }) => id !== "plugins").map(({ id, label }) => ({
|
|
483
|
+
id,
|
|
484
|
+
label,
|
|
485
|
+
pinned: !unpinned.includes(id),
|
|
486
|
+
active: id === activePanelId
|
|
487
|
+
})),
|
|
488
|
+
onOpen: (id) => {
|
|
489
|
+
const entry = officialEntry(id);
|
|
490
|
+
if (entry !== void 0) trackEntryClick({
|
|
491
|
+
menu_name: entry,
|
|
492
|
+
position: "sidebar_more"
|
|
493
|
+
});
|
|
494
|
+
const panel = panels.find((candidate) => candidate.id === id);
|
|
495
|
+
if (panel !== void 0) selectPanel(panel.id);
|
|
496
|
+
},
|
|
497
|
+
onPinnedChange: setPinned,
|
|
498
|
+
trackEntryClick,
|
|
387
499
|
renderSlot
|
|
388
|
-
}
|
|
500
|
+
})]
|
|
389
501
|
}),
|
|
390
502
|
(0, react_jsx_runtime.jsx)("div", {
|
|
391
503
|
className: SidebarRoot_module_css_default.regionArea,
|
|
@@ -418,7 +530,8 @@ window.__ModuleLoader__.load({
|
|
|
418
530
|
"session.new.label": "新建会话",
|
|
419
531
|
"toggle.open": "打开侧边栏",
|
|
420
532
|
"toggle.collapse": "收起侧边栏",
|
|
421
|
-
"panels.label": "全局面板"
|
|
533
|
+
"panels.label": "全局面板",
|
|
534
|
+
"panels.more": "更多"
|
|
422
535
|
};
|
|
423
536
|
/** English dictionary, checked complete against the zh key set. */
|
|
424
537
|
const en = {
|
|
@@ -426,7 +539,8 @@ window.__ModuleLoader__.load({
|
|
|
426
539
|
"session.new.label": "New session",
|
|
427
540
|
"toggle.open": "Open sidebar",
|
|
428
541
|
"toggle.collapse": "Collapse sidebar",
|
|
429
|
-
"panels.label": "Global panels"
|
|
542
|
+
"panels.label": "Global panels",
|
|
543
|
+
"panels.more": "More"
|
|
430
544
|
};
|
|
431
545
|
//#endregion
|
|
432
546
|
//#region lib/types/client/index.js
|
|
@@ -468,6 +582,11 @@ window.__ModuleLoader__.load({
|
|
|
468
582
|
};
|
|
469
583
|
ctx.effect(() => ctx.slots.subscribe("sidebar.panellist", syncPanels), "ui-sidebar: panel entries");
|
|
470
584
|
ctx.effect(() => ctx.locale.subscribe(syncPanels), "ui-sidebar: panel labels");
|
|
585
|
+
const panelPins = createPanelPins();
|
|
586
|
+
const entryActions = {
|
|
587
|
+
getSnapshot: () => ctx.slots.entriesOfSlot("sidebar.panellist.actions").length > 0,
|
|
588
|
+
subscribe: (listener) => ctx.slots.subscribe("sidebar.panellist.actions", listener)
|
|
589
|
+
};
|
|
471
590
|
const injectProps = () => ({
|
|
472
591
|
startSession: (workspaceId) => {
|
|
473
592
|
workspaceNavigation.startSession(workspaceId);
|
|
@@ -476,12 +595,17 @@ window.__ModuleLoader__.load({
|
|
|
476
595
|
ctx.layout.toggleSidebar();
|
|
477
596
|
},
|
|
478
597
|
selectPanel: (id) => {
|
|
479
|
-
if (id === "plugins" || id === "schedules") ctx.get("productAnalytics")?.track("sidebar_menu_click", { menu_name: id === "plugins" ? "plugin" : "cron" });
|
|
480
598
|
ctx.layout.selectPanel(id);
|
|
481
599
|
},
|
|
600
|
+
setPinned: panelPins.setPinned,
|
|
601
|
+
trackEntryClick: (attributes) => {
|
|
602
|
+
ctx.get("productAnalytics")?.track("sidebar_menu_click", attributes);
|
|
603
|
+
},
|
|
482
604
|
hooks: {
|
|
483
605
|
panels,
|
|
484
|
-
shortcuts: ctx.shortcuts.catalog
|
|
606
|
+
shortcuts: ctx.shortcuts.catalog,
|
|
607
|
+
entryPins: panelPins.unpinned,
|
|
608
|
+
entryActions
|
|
485
609
|
}
|
|
486
610
|
});
|
|
487
611
|
ctx.slots.inject("sidebar", () => ctx.slots.register({
|
|
@@ -504,6 +628,10 @@ window.__ModuleLoader__.load({
|
|
|
504
628
|
kind: "list",
|
|
505
629
|
scope: "root"
|
|
506
630
|
},
|
|
631
|
+
"sidebar.panellist.actions": {
|
|
632
|
+
kind: "list",
|
|
633
|
+
scope: "root"
|
|
634
|
+
},
|
|
507
635
|
"sidebar.workspaces": {
|
|
508
636
|
kind: "single",
|
|
509
637
|
scope: "root"
|
|
@@ -30,8 +30,8 @@ window.__ModuleLoader__.load({
|
|
|
30
30
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
31
31
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
let react = require("react");
|
|
33
|
-
let _deepseek_ai_dsh_client_ui_dockkit = require("@deepseek-ai/dsh-client-ui-dockkit");
|
|
34
33
|
let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
|
|
34
|
+
let _deepseek_ai_dsh_client_ui_dockkit = require("@deepseek-ai/dsh-client-ui-dockkit");
|
|
35
35
|
let zod = require("zod");
|
|
36
36
|
let react_dom = require("react-dom");
|
|
37
37
|
//#region lib/types/client/focus.js
|
|
@@ -351,7 +351,7 @@ window.__ModuleLoader__.load({
|
|
|
351
351
|
}
|
|
352
352
|
//#endregion
|
|
353
353
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-sidebar-right/src/client/tabs/guide/GuideBody.module.css.mjs
|
|
354
|
-
const css$2 = ".geFEbW_guide{--dsl-guide-entry-radius:var(--dsw-radius-xl);box-sizing:border-box;flex-direction:column;justify-content:center;align-items:center;gap:14px;min-height:100%;padding:0 24px;display:flex}.geFEbW_guide:after{content:\"\";flex:0 10%}.geFEbW_hero{color:var(--dsw-static-neutral-200);margin-bottom:16px;display:flex}body[data-ds-dark-theme] .geFEbW_hero{color:var(--dsw-static-neutral-700)}.geFEbW_entry{box-sizing:border-box;width:380px;max-width:100%;min-height:56px;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;background:var(--dsw-alias-bg-layer-1);border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsl-guide-entry-radius);cursor:pointer;align-items:center;gap:14px;padding:14px 20px;display:flex}.geFEbW_entry:hover{background:var(--dsw-alias-interactive-bg-hover)}.geFEbW_entryIcon{width:26px;height:26px;color:var(--dsw-alias-label-secondary);flex:none;justify-content:center;align-items:center;display:flex}.geFEbW_placeholderInk{color:var(--dsw-alias-label-tertiary)}.geFEbW_entryText{flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.geFEbW_entryTitle{white-space:nowrap;text-overflow:ellipsis;font-size:14px;line-height:1.4;overflow:hidden}.geFEbW_entryDescription{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:11px;line-height:1.4;overflow:hidden}.geFEbW_titleIcon{color:var(--dsw-alias-label-tertiary);flex:none}.geFEbW_entryCell{width:380px;max-width:100%}";
|
|
354
|
+
const css$2 = ".geFEbW_guide{--dsl-guide-entry-radius:var(--dsw-radius-xl);box-sizing:border-box;flex-direction:column;justify-content:center;align-items:center;gap:14px;min-height:100%;padding:0 24px;display:flex}.geFEbW_guide:after{content:\"\";flex:0 10%}.geFEbW_hero{color:var(--dsw-static-neutral-200);margin-bottom:16px;display:flex}body[data-ds-dark-theme] .geFEbW_hero{color:var(--dsw-static-neutral-700)}.geFEbW_entry{box-sizing:border-box;width:380px;max-width:100%;min-height:56px;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;background:var(--dsw-alias-bg-layer-1);border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsl-guide-entry-radius);cursor:pointer;align-items:center;gap:14px;padding:14px 20px;display:flex}.geFEbW_entry:hover{background:var(--dsw-alias-interactive-bg-hover)}.geFEbW_entryIcon{width:26px;height:26px;color:var(--dsw-alias-label-secondary);flex:none;justify-content:center;align-items:center;display:flex}.geFEbW_placeholderInk{color:var(--dsw-alias-label-tertiary)}.geFEbW_entryText{flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.geFEbW_entryTitle{white-space:nowrap;text-overflow:ellipsis;font-size:14px;line-height:1.4;overflow:hidden}.geFEbW_entryDescription{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:11px;line-height:1.4;overflow:hidden}.geFEbW_titleIcon{color:var(--dsw-alias-label-tertiary);flex:none}.geFEbW_entryCell{width:380px;max-width:100%}.geFEbW_moreAnchor{width:380px;max-width:100%;display:flex}.geFEbW_moreAnchor .geFEbW_entry[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.geFEbW_moreMenu{width:max-content;max-width:min(480px,100vw - 24px)}";
|
|
355
355
|
const tagId$2 = "@deepseek-ai/dsh-client-ui-sidebar-right/GuideBody.module.css";
|
|
356
356
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
357
357
|
const tag = document.createElement("style");
|
|
@@ -369,6 +369,8 @@ window.__ModuleLoader__.load({
|
|
|
369
369
|
"entryTitle": "geFEbW_entryTitle",
|
|
370
370
|
"guide": "geFEbW_guide",
|
|
371
371
|
"hero": "geFEbW_hero",
|
|
372
|
+
"moreAnchor": "geFEbW_moreAnchor",
|
|
373
|
+
"moreMenu": "geFEbW_moreMenu",
|
|
372
374
|
"placeholderInk": "geFEbW_placeholderInk",
|
|
373
375
|
"titleIcon": "geFEbW_titleIcon"
|
|
374
376
|
};
|
|
@@ -435,6 +437,59 @@ window.__ModuleLoader__.load({
|
|
|
435
437
|
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(CompassGlyph, { className: GuideBody_module_css_default.titleIcon }), tab.title] });
|
|
436
438
|
}
|
|
437
439
|
//#endregion
|
|
440
|
+
//#region lib/types/client/tabs/guide/GuideMoreIcon.js
|
|
441
|
+
/** Designer-supplied artwork used only by the right-sidebar More tools card. */
|
|
442
|
+
/**
|
|
443
|
+
* Render the More tools glyph at its authored size and ink.
|
|
444
|
+
* @returns Decorative 22px More tools artwork.
|
|
445
|
+
*/
|
|
446
|
+
function GuideMoreIcon() {
|
|
447
|
+
return (0, react_jsx_runtime.jsxs)("svg", {
|
|
448
|
+
width: "22",
|
|
449
|
+
height: "22",
|
|
450
|
+
viewBox: "0 0 22 22",
|
|
451
|
+
fill: "none",
|
|
452
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
453
|
+
stroke: "#A6B2C7",
|
|
454
|
+
strokeWidth: "1.38181",
|
|
455
|
+
"aria-hidden": "true",
|
|
456
|
+
focusable: "false",
|
|
457
|
+
children: [
|
|
458
|
+
(0, react_jsx_runtime.jsx)("path", { d: "M5.45873 5.04102H7.90157C8.57615 5.04102 9.123 5.58787 9.123 6.26244V8.70528C9.123 9.37986 8.57615 9.92671 7.90157 9.92671H5.45873C4.78415 9.92671 4.2373 9.37986 4.2373 8.70528V6.26244C4.2373 5.58787 4.78415 5.04102 5.45873 5.04102Z" }),
|
|
459
|
+
(0, react_jsx_runtime.jsx)("path", { d: "M5.45873 12.9805H7.90157C8.57615 12.9805 9.123 13.5273 9.123 14.2019V16.6447C9.123 17.3193 8.57615 17.8662 7.90157 17.8662H5.45873C4.78415 17.8662 4.2373 17.3193 4.2373 16.6447V14.2019C4.2373 13.5273 4.78415 12.9805 5.45873 12.9805Z" }),
|
|
460
|
+
(0, react_jsx_runtime.jsx)("path", { d: "M13.3992 12.9805H15.842C16.5166 12.9805 17.0634 13.5273 17.0634 14.2019V16.6447C17.0634 17.3193 16.5166 17.8662 15.842 17.8662H13.3992C12.7246 17.8662 12.1777 17.3193 12.1777 16.6447V14.2019C12.1777 13.5273 12.7246 12.9805 13.3992 12.9805Z" }),
|
|
461
|
+
(0, react_jsx_runtime.jsx)("path", { d: "M15.0692 3.86523V6.91879M15.0692 6.91879V9.97235M15.0692 6.91879H12.0156M15.0692 6.91879H18.1227" })
|
|
462
|
+
]
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
const NO_CARDS = [];
|
|
466
|
+
/**
|
|
467
|
+
* Pin identity of one guide card; the kind survives an extension taking over that kind.
|
|
468
|
+
* @param entry - Guide card from the tab registry.
|
|
469
|
+
* @returns `kind:id`.
|
|
470
|
+
*/
|
|
471
|
+
function guideEntryId(entry) {
|
|
472
|
+
return `${entry.kind}:${entry.id}`;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Create the in-memory guide pin list; the snapshot keeps its reference until the list changes.
|
|
476
|
+
* @returns Unpinned card ids and the pin mutation.
|
|
477
|
+
*/
|
|
478
|
+
function createGuidePins() {
|
|
479
|
+
const store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)({ unpinned: NO_CARDS });
|
|
480
|
+
return {
|
|
481
|
+
unpinned: {
|
|
482
|
+
getSnapshot: () => store.getSnapshot().unpinned,
|
|
483
|
+
subscribe: (listener) => store.subscribe(listener)
|
|
484
|
+
},
|
|
485
|
+
setPinned: (id, pinned) => {
|
|
486
|
+
const current = store.getSnapshot().unpinned;
|
|
487
|
+
if (id.startsWith(`files:`) || pinned !== current.includes(id)) return;
|
|
488
|
+
store.set({ unpinned: pinned ? current.filter((entry) => entry !== id) : [...current, id] });
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
//#endregion
|
|
438
493
|
//#region lib/types/client/tabs/guide/GuideBody.js
|
|
439
494
|
/**
|
|
440
495
|
* The guide tab's body: a chain host, and the guide it falls back to.
|
|
@@ -446,11 +501,12 @@ window.__ModuleLoader__.load({
|
|
|
446
501
|
* entry of its own, so there is always exactly one body and the shipped one
|
|
447
502
|
* cannot be outvoted by accident.
|
|
448
503
|
*
|
|
449
|
-
* The shipped guide is a muted compass over the entry capsules every
|
|
450
|
-
* registered type contributed, centred in the body,
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
*
|
|
504
|
+
* The shipped guide is a muted compass over the pinned entry capsules every
|
|
505
|
+
* registered type contributed, centred in the body, with no heading, as a
|
|
506
|
+
* browser start page shows its doors without a caption. While at most four
|
|
507
|
+
* capsules are visible, a capsule with a description shows it under the title;
|
|
508
|
+
* a longer list drops every description to stay light. A More card follows
|
|
509
|
+
* while `sidebar.right.tab.guide.actions` has registrations.
|
|
454
510
|
* Picking one opens that type as a page
|
|
455
511
|
* in this tab's place, so the guide is a doorway rather than a page that stays
|
|
456
512
|
* open.
|
|
@@ -491,6 +547,49 @@ window.__ModuleLoader__.load({
|
|
|
491
547
|
]
|
|
492
548
|
});
|
|
493
549
|
}
|
|
550
|
+
/** The guide's More card; its menu rows come from `sidebar.right.tab.guide.actions` and span at least the card width. */
|
|
551
|
+
function GuideMoreMenu({ label, entries, onOpen, onPinnedChange, renderSlot }) {
|
|
552
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
553
|
+
const onDismiss = () => {
|
|
554
|
+
setOpen(false);
|
|
555
|
+
};
|
|
556
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
557
|
+
open,
|
|
558
|
+
onClose: onDismiss,
|
|
559
|
+
portal: true,
|
|
560
|
+
autoFocus: true,
|
|
561
|
+
minWidthFromAnchor: true,
|
|
562
|
+
align: "end",
|
|
563
|
+
className: GuideBody_module_css_default.moreAnchor,
|
|
564
|
+
listClassName: GuideBody_module_css_default.moreMenu,
|
|
565
|
+
anchor: (0, react_jsx_runtime.jsxs)("button", {
|
|
566
|
+
type: "button",
|
|
567
|
+
className: GuideBody_module_css_default.entry,
|
|
568
|
+
"aria-label": label,
|
|
569
|
+
"aria-haspopup": "menu",
|
|
570
|
+
"aria-expanded": open,
|
|
571
|
+
onClick: () => {
|
|
572
|
+
setOpen((value) => !value);
|
|
573
|
+
},
|
|
574
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
575
|
+
className: GuideBody_module_css_default.entryIcon,
|
|
576
|
+
children: (0, react_jsx_runtime.jsx)(GuideMoreIcon, {})
|
|
577
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
578
|
+
className: GuideBody_module_css_default.entryText,
|
|
579
|
+
children: (0, react_jsx_runtime.jsx)("span", {
|
|
580
|
+
className: GuideBody_module_css_default.entryTitle,
|
|
581
|
+
children: label
|
|
582
|
+
})
|
|
583
|
+
})]
|
|
584
|
+
}),
|
|
585
|
+
children: renderSlot("sidebar.right.tab.guide.actions", {
|
|
586
|
+
entries,
|
|
587
|
+
onOpen,
|
|
588
|
+
onPinnedChange,
|
|
589
|
+
onDismiss
|
|
590
|
+
})
|
|
591
|
+
});
|
|
592
|
+
}
|
|
494
593
|
/** The shipped guide: the tab's own compass over the doors out of the column. */
|
|
495
594
|
function ShippedGuide({ children }) {
|
|
496
595
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -504,14 +603,17 @@ window.__ModuleLoader__.load({
|
|
|
504
603
|
});
|
|
505
604
|
}
|
|
506
605
|
/** The guide tab's body, replaceable through its chain child. */
|
|
507
|
-
function GuideBody({ useTabInfo, useGuideEntries, renderSlot, renderSlotChain, useShortcuts }) {
|
|
606
|
+
function GuideBody({ useTabInfo, useGuideEntries, renderSlot, renderSlotChain, useShortcuts, useEntryPins, useEntryActions, setPinned, t }) {
|
|
508
607
|
const shortcuts = useShortcuts((entries) => entries);
|
|
509
608
|
const { tab } = useTabInfo();
|
|
510
609
|
const entries = useGuideEntries((entries) => entries);
|
|
610
|
+
const unpinned = useEntryPins((ids) => ids);
|
|
611
|
+
const hasEntryActions = useEntryActions((registered) => registered);
|
|
612
|
+
const visibleEntries = entries.filter((entry) => entry.kind === "files" || !unpinned.includes(guideEntryId(entry)));
|
|
511
613
|
return renderSlotChain("sidebar.right.tab.guide", {}, {
|
|
512
614
|
hookContext: useTabInfo,
|
|
513
|
-
fallback: (0, react_jsx_runtime.
|
|
514
|
-
const described =
|
|
615
|
+
fallback: (0, react_jsx_runtime.jsxs)(ShippedGuide, { children: [visibleEntries.map((entry) => {
|
|
616
|
+
const described = visibleEntries.length <= MAX_DESCRIBED_ENTRIES;
|
|
515
617
|
const description = described ? entry.description?.() : void 0;
|
|
516
618
|
return (0, react_jsx_runtime.jsx)("div", {
|
|
517
619
|
className: GuideBody_module_css_default.entryCell,
|
|
@@ -533,7 +635,20 @@ window.__ModuleLoader__.load({
|
|
|
533
635
|
})
|
|
534
636
|
})
|
|
535
637
|
}, JSON.stringify([entry.providerId, entry.id]));
|
|
536
|
-
})
|
|
638
|
+
}), hasEntryActions && (0, react_jsx_runtime.jsx)(GuideMoreMenu, {
|
|
639
|
+
label: t("tab.guide.more"),
|
|
640
|
+
entries: entries.filter((entry) => entry.kind !== "files").map((entry) => ({
|
|
641
|
+
id: guideEntryId(entry),
|
|
642
|
+
label: entry.title(),
|
|
643
|
+
pinned: !unpinned.includes(guideEntryId(entry))
|
|
644
|
+
})),
|
|
645
|
+
onOpen: (id) => {
|
|
646
|
+
const entry = entries.find((candidate) => guideEntryId(candidate) === id);
|
|
647
|
+
if (entry !== void 0) tab.actions.openTab(entry.kind, { replaceTab: true });
|
|
648
|
+
},
|
|
649
|
+
onPinnedChange: setPinned,
|
|
650
|
+
renderSlot
|
|
651
|
+
})] })
|
|
537
652
|
});
|
|
538
653
|
}
|
|
539
654
|
//#endregion
|
|
@@ -4668,6 +4783,7 @@ window.__ModuleLoader__.load({
|
|
|
4668
4783
|
"dock.drop.top": "上分栏",
|
|
4669
4784
|
"dock.drop.bottom": "下分栏",
|
|
4670
4785
|
"tab.guide.title": "开始",
|
|
4786
|
+
"tab.guide.more": "更多工具",
|
|
4671
4787
|
"tab.unavailable": "这类内容还没有可用的查看方式。"
|
|
4672
4788
|
};
|
|
4673
4789
|
/** English dictionary, checked against the Chinese key set. */
|
|
@@ -4705,6 +4821,7 @@ window.__ModuleLoader__.load({
|
|
|
4705
4821
|
"dock.drop.top": "Add top split",
|
|
4706
4822
|
"dock.drop.bottom": "Add bottom split",
|
|
4707
4823
|
"tab.guide.title": "Start",
|
|
4824
|
+
"tab.guide.more": "More tools",
|
|
4708
4825
|
"tab.unavailable": "Nothing here can view this kind of content yet."
|
|
4709
4826
|
};
|
|
4710
4827
|
//#endregion
|
|
@@ -4965,17 +5082,31 @@ window.__ModuleLoader__.load({
|
|
|
4965
5082
|
store,
|
|
4966
5083
|
inject: () => ({ hooks: { shortcuts: ctx.shortcuts.catalog } })
|
|
4967
5084
|
}, ExpandButton));
|
|
4968
|
-
const
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
5085
|
+
const guidePins = createGuidePins();
|
|
5086
|
+
const guideInjected = {
|
|
5087
|
+
hooks: {
|
|
5088
|
+
shortcuts: ctx.shortcuts.catalog,
|
|
5089
|
+
guideEntries: {
|
|
5090
|
+
subscribe: (listener) => tabs.subscribe(listener),
|
|
5091
|
+
getSnapshot: () => tabs.guide()
|
|
5092
|
+
},
|
|
5093
|
+
entryPins: guidePins.unpinned,
|
|
5094
|
+
entryActions: {
|
|
5095
|
+
getSnapshot: () => ctx.slots.entriesOfSlot("sidebar.right.tab.guide.actions").length > 0,
|
|
5096
|
+
subscribe: (listener) => ctx.slots.subscribe("sidebar.right.tab.guide.actions", listener)
|
|
5097
|
+
}
|
|
5098
|
+
},
|
|
5099
|
+
setPinned: guidePins.setPinned
|
|
5100
|
+
};
|
|
4975
5101
|
const disposeGuide = ctx.slots.inject("sidebar.right.pane.tab", () => ctx.slots.register({
|
|
4976
5102
|
name: "sidebar.right.pane.tab",
|
|
4977
5103
|
key: GUIDE_ID,
|
|
5104
|
+
locale: NS,
|
|
4978
5105
|
children: {
|
|
5106
|
+
"sidebar.right.tab.guide.actions": {
|
|
5107
|
+
kind: "list",
|
|
5108
|
+
scope: "root"
|
|
5109
|
+
},
|
|
4979
5110
|
"sidebar.right.tab.guide.entry": {
|
|
4980
5111
|
kind: "keyed",
|
|
4981
5112
|
scope: "session",
|
|
@@ -1398,12 +1398,11 @@ window.__ModuleLoader__.load({
|
|
|
1398
1398
|
return this.connectBlank(workspaceId, options);
|
|
1399
1399
|
}
|
|
1400
1400
|
/**
|
|
1401
|
-
* @param reuse - preset for the reused or created blank
|
|
1401
|
+
* @param reuse - preset for the reused or created blank.
|
|
1402
1402
|
*/
|
|
1403
1403
|
async connectBlank(workspaceId, reuse) {
|
|
1404
1404
|
const workspace = this.workspaces.list.getSnapshot().items.find((item) => item.workspaceId === workspaceId);
|
|
1405
1405
|
if (workspace === void 0) throw new Error(`uiWorkspace.connectWorkspace: unknown workspace ${workspaceId}`);
|
|
1406
|
-
if (reuse === void 0) return this.sessions.create({ workspaceId });
|
|
1407
1406
|
const inflight = this.connecting.get(workspaceId);
|
|
1408
1407
|
if (inflight !== void 0 && inflight.agentPreset === reuse.agentPreset) return inflight.attempt;
|
|
1409
1408
|
const attempt = this.createInWorkspace(workspace, reuse).finally(() => {
|
|
@@ -1415,12 +1414,14 @@ window.__ModuleLoader__.load({
|
|
|
1415
1414
|
});
|
|
1416
1415
|
return attempt;
|
|
1417
1416
|
}
|
|
1417
|
+
/** Name the first reusable member blank; a requested preset also skips blanks listing another preset. */
|
|
1418
1418
|
createInWorkspace(workspace, options) {
|
|
1419
1419
|
const archived = this.workspaces.list.getSnapshot().archivedSessionIds;
|
|
1420
1420
|
const sessions = this.sessions.list.getSnapshot();
|
|
1421
1421
|
const blank = sessions.ids.find((id) => {
|
|
1422
1422
|
const summary = sessions.byId[id];
|
|
1423
|
-
|
|
1423
|
+
const listed = summary?.projectionValues?.agentPreset;
|
|
1424
|
+
return summary !== void 0 && summary.blank && summary.cwd === workspace.path && workspace.sessionIds.includes(id) && !archived.includes(id) && (options.agentPreset === void 0 || typeof listed !== "string" || listed === options.agentPreset);
|
|
1424
1425
|
});
|
|
1425
1426
|
return this.createNamed({
|
|
1426
1427
|
workspaceId: workspace.workspaceId,
|
|
@@ -1499,7 +1500,7 @@ window.__ModuleLoader__.load({
|
|
|
1499
1500
|
startSession(workspaceId, options) {
|
|
1500
1501
|
const { agentPreset, ...draft } = options ?? {};
|
|
1501
1502
|
const draftOptions = options === void 0 ? void 0 : draft;
|
|
1502
|
-
const initializeDraft = draftOptions !== void 0 && (draftOptions.prompt !== void 0 || draftOptions.clearPreviousDraft === true);
|
|
1503
|
+
const initializeDraft = draftOptions !== void 0 && (draftOptions.prompt !== void 0 || (draftOptions.whenDraftExists ?? (draftOptions.clearPreviousDraft === true ? "replace" : "keep")) === "replace");
|
|
1503
1504
|
const workspace = this.workspaces.list.getSnapshot();
|
|
1504
1505
|
const sessions = this.sessions.list.getSnapshot();
|
|
1505
1506
|
const current = this.mainReference?.sessionId;
|
|
@@ -1517,11 +1518,11 @@ window.__ModuleLoader__.load({
|
|
|
1517
1518
|
this.clearMain();
|
|
1518
1519
|
return;
|
|
1519
1520
|
}
|
|
1520
|
-
|
|
1521
|
+
this.openWorkspace(target, initializeDraft ? (id) => {
|
|
1521
1522
|
const binding = this.sessions.binding(id);
|
|
1522
1523
|
if (binding === void 0) this.draftPreparationFailed();
|
|
1523
1524
|
this.prepareDraft(binding, draftOptions);
|
|
1524
|
-
} : void 0, agentPreset === void 0 ? {} : { agentPreset })
|
|
1525
|
+
} : void 0, agentPreset === void 0 ? {} : { agentPreset }).catch((reason) => {
|
|
1525
1526
|
console.warn("new session failed:", reason);
|
|
1526
1527
|
});
|
|
1527
1528
|
}
|