@codexhost/cli-darwin-arm64 0.18.0-beta.1 → 0.18.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +109 -94
- package/app/console-web.js +110 -95
- package/app/desktop-controller.mjs +109 -110
- package/app/host-runtime.mjs +14225 -10527
- package/app/plugins/antigravity/plugin.mjs +109 -94
- package/app/plugins/claude-code/plugin.mjs +229 -148
- package/app/plugins/codebuddy/plugin.mjs +109 -94
- package/app/plugins/codex-usage/plugin.mjs +109 -94
- package/app/plugins/copilot/plugin.mjs +109 -94
- package/app/plugins/cursor-cli/plugin.mjs +109 -94
- package/app/plugins/deepseek-harness/plugin.mjs +109 -94
- package/app/plugins/devin/plugin.mjs +109 -94
- package/app/plugins/enabled.json +0 -1
- package/app/plugins/grok/plugin.mjs +109 -94
- package/app/plugins/hermes/plugin.mjs +109 -94
- package/app/plugins/kimi-code/plugin.mjs +109 -94
- package/app/plugins/kiro-cli/plugin.mjs +109 -94
- package/app/plugins/omp/plugin.mjs +109 -94
- package/app/plugins/opencode/plugin.mjs +109 -94
- package/app/plugins/pi/plugin.mjs +109 -94
- package/app/plugins/qoder/plugin.mjs +109 -94
- package/app/plugins/qoder-cn/plugin.mjs +109 -94
- package/app/plugins/qwen-code/plugin.mjs +109 -94
- package/app/plugins/workbuddy/plugin.mjs +109 -94
- package/app/plugins/zcode/plugin.mjs +109 -94
- package/app/renderer-extension.js +128 -150
- package/app/web/assets/index-C3lniEH1.css +1 -0
- package/app/web/assets/index-D1dOzBMI.js +199 -0
- package/app/web/codexhost-settings.js +110 -95
- package/app/web/index.html +2 -2
- package/app/web/plugins/deepseek-ai__dsh-api-gateway/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +64 -64
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +69 -69
- package/app/web/plugins/deepseek-ai__dsh-client-connection/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +57 -56
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +87 -87
- package/app/web/plugins/deepseek-ai__dsh-client-ui-directory-picker-browse/client.js +10 -10
- package/app/web/plugins/deepseek-ai__dsh-client-ui-input-trigger/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-ui-model-selection/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-permission-presets/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-right/client.js +55 -55
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +8 -12
- package/app/web/plugins.json +4 -0
- package/app/web/sw.js +55 -24
- package/app/web-modules/server.mjs +1415 -784
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
- package/app/plugins/codex-cli/manifest.json +0 -16
- package/app/plugins/codex-cli/plugin.mjs +0 -20374
- package/app/web/assets/index-CIeTchMu.css +0 -1
- package/app/web/assets/index-DeAPBQbV.js +0 -199
- /package/app/{plugins/codex-cli/assets/icon.png → web/codex.png} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-settings-general`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/dsh-client-ui-slots"),i=e("@deepseek-ai/dsh-client-ui-primitives"),a=e("@deepseek-ai/dsh-client-store"),o=e("react"),s=e("react-dom"),c=e("react/jsx-runtime");function l(){return(0,a.defineStore)({init:()=>({open:!1,activeId:void 0}),actions:{open:e=>{e.open=!0},close:e=>{e.open=!1,e.activeId=void 0},select:(e,t)=>{e.activeId=t},openSection:(e,t)=>{e.activeId=t,e.open=!0}}})}function u(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=u(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function d(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=u(e))&&(r&&(r+=` `),r+=t);return r}let f=`@deepseek-ai/dsh-client-ui-settings-general/SettingsRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(f)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=f,e.textContent=`.f-TuTG_triggerRow{flex:none;align-items:center;gap:8px;width:calc(100% + 4px);margin:4px -2px;display:flex;position:relative}.f-TuTG_triggerRow.f-TuTG_railRow{width:36px;margin:8px 0 10px}.f-TuTG_trigger{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;width:auto;min-width:0;height:42px;color:var(--dsw-alias-label-primary);background:0 0;border:none;flex:1;align-items:center;gap:8px;margin:0;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.f-TuTG_trigger:hover{background:var(--dsw-alias-interactive-bg-hover)}.f-TuTG_trigger.f-TuTG_rail{flex:none;justify-content:center;gap:0;width:36px;height:36px;margin:0;padding:0}.f-TuTG_triggerLabel{white-space:nowrap;overflow:hidden}.f-TuTG_overlay{z-index:1000;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.f-TuTG_mask{inset:var(--dsh-frame-chrome-top,0px) 0 0;background:var(--dsw-alias-bg-mask-1);backdrop-filter:var(--dsw-mask-blur);position:absolute}.f-TuTG_panel{z-index:1;width:1040px;height:min(800px, calc(100vh - 2 * max(24px, var(--dsh-frame-overlay-top,24px))));border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-2);max-width:calc(100vw - 48px);box-shadow:var(--dsw-elevation-prominent);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);display:flex;position:relative;overflow:hidden}.f-TuTG_panel:focus{outline:none}.f-TuTG_nav{box-sizing:border-box;flex-direction:column;flex:none;gap:18px;width:188px;padding:22px 12px 0;display:flex}.f-TuTG_navTitle{color:var(--dsw-alias-label-primary);padding:0 12px;font-size:16px;font-weight:500;line-height:24px}.f-TuTG_navList{flex-direction:column;gap:4px;display:flex;overflow-y:auto}.f-TuTG_navCell{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;height:40px;color:var(--dsw-alias-label-primary);text-align:left;background:0 0;border:none;align-items:center;gap:8px;padding:9px 16px 9px 12px;font-family:inherit;font-size:14px;font-weight:400;line-height:22px;display:flex}.f-TuTG_navCell:hover{background:var(--dsw-specific-sidebar-nav-item-hover)}.f-TuTG_navCell.f-TuTG_active{background:var(--dsw-specific-sidebar-nav-item-active)}.f-TuTG_navIcon{flex:none}.f-TuTG_navLabel{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.f-TuTG_content{flex-direction:column;flex:1;min-width:0;display:flex}.f-TuTG_header{box-sizing:border-box;flex:none;justify-content:space-between;align-items:flex-start;gap:8px;height:54px;padding:20px 14px 8px 10px;display:flex}.f-TuTG_actions{justify-content:flex-end;align-items:center;gap:8px;min-width:0;margin-left:auto;display:flex}.f-TuTG_close{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-primary);background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.f-TuTG_close:hover{background:var(--dsw-alias-interactive-bg-hover)}.f-TuTG_options{flex:1;min-height:0;padding:0 24px 24px;overflow-y:auto}@media (width<=600px){.f-TuTG_panel{max-width:calc(100vw - 24px);height:calc(100dvh - 2 * max(12px, env(safe-area-inset-top), env(safe-area-inset-bottom)));flex-direction:column}.f-TuTG_nav{gap:12px;width:100%;padding:16px 12px 8px}.f-TuTG_navTitle{padding:0 44px 0 4px}.f-TuTG_navList{flex-direction:row;overflow-x:auto}.f-TuTG_navCell{flex:none;height:44px}.f-TuTG_content{min-height:0}.f-TuTG_header{height:auto;padding:0 16px}.f-TuTG_close{width:44px;height:44px;position:absolute;top:6px;right:6px}.f-TuTG_options{padding:0 16px 16px}}.f-TuTG_hiddenLabel{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}`,document.head.appendChild(e)}var p={actions:`f-TuTG_actions`,active:`f-TuTG_active`,close:`f-TuTG_close`,content:`f-TuTG_content`,header:`f-TuTG_header`,hiddenLabel:`f-TuTG_hiddenLabel`,mask:`f-TuTG_mask`,nav:`f-TuTG_nav`,navCell:`f-TuTG_navCell`,navIcon:`f-TuTG_navIcon`,navLabel:`f-TuTG_navLabel`,navList:`f-TuTG_navList`,navTitle:`f-TuTG_navTitle`,options:`f-TuTG_options`,overlay:`f-TuTG_overlay`,panel:`f-TuTG_panel`,rail:`f-TuTG_rail`,railRow:`f-TuTG_railRow`,trigger:`f-TuTG_trigger`,triggerLabel:`f-TuTG_triggerLabel`,triggerRow:`f-TuTG_triggerRow`};let m=`@deepseek-ai/dsh-client-ui-settings-general/DesktopUpdateIndicator.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(m)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=m,e.textContent=`.NQzlxG_indicator{box-sizing:border-box;border:1px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent);border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-brand-primary-new-colorprimary-new-color);background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 8%, transparent);text-align:left;white-space:nowrap;cursor:pointer;flex:none;grid-template-columns:14px max-content;align-items:center;column-gap:4px;padding:0 8px;font-family:inherit;font-size:12px;font-weight:500;line-height:18px;display:inline-grid}.NQzlxG_icon{place-items:center;width:14px;height:14px;display:grid}.NQzlxG_badge{inset-inline-end:2px;corner-shape:round;background:var(--dsw-alias-brand-primary-new-colorprimary-new-color);border-radius:50%;width:6px;height:6px;position:absolute;top:2px}.NQzlxG_errorDot{corner-shape:round;background:currentColor;border-radius:50%;width:6px;height:6px}.NQzlxG_spinner{animation:1s linear infinite NQzlxG_spin}@keyframes NQzlxG_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.NQzlxG_spinner{animation:none}}.NQzlxG_indicator[aria-disabled=true]{cursor:default}`,document.head.appendChild(e)}var h={badge:`NQzlxG_badge`,errorDot:`NQzlxG_errorDot`,icon:`NQzlxG_icon`,indicator:`NQzlxG_indicator`,spin:`NQzlxG_spin`,spinner:`NQzlxG_spinner`};let g=/* @__PURE__ */ new Set([`checking`,`downloading`,`verifying`,`installing`]);function _(e,t){let n={idle:``,checking:t(`desktop.update.checking`),available:t(`desktop.update.available`),downloading:t(`desktop.update.progress`,{percent:e.percent??0}),verifying:t(`desktop.update.verifying`),installing:t(`desktop.update.installing`),ready:t(`desktop.update.ready`),error:t(`desktop.update.retry`)}[e.phase];return e.phase===`checking`||e.phase===`verifying`||e.phase===`installing`?{label:n,detail:e.version??n}:e.phase===`error`?{label:n,detail:{check:t(`desktop.update.checkFailed`),"check-network":t(`desktop.update.checkNetworkFailed`),download:t(`desktop.update.downloadFailed`),"download-network":t(`desktop.update.downloadNetworkFailed`),install:t(`desktop.update.installFailed`),"install-network":t(`desktop.update.installNetworkFailed`),"stop-failed":t(`desktop.update.stopFailed`),"tasks-changed":t(`desktop.update.tasksChanged`),"tasks-unavailable":t(`desktop.update.tasksUnavailable`)}[e.failure??`install`]}:e.phase===`downloading`&&e.version!==void 0?{label:n,detail:t(`desktop.update.downloadDetail`,{percent:e.percent??0,version:e.version})}:{label:n,detail:e.version===void 0?n:t(`desktop.update.versionDetail`,{label:n,version:e.version})}}function v({wide:e,hidden:t,t:n,view:r,onOpen:a}){let{presentation:o,failed:s,opening:l}=r;if(!e||t||!s&&(o===void 0||o.phase===`idle`))return null;let u=n(`desktop.update.retry`),d=o===void 0?{label:u,detail:u}:_(o,n),f=s?u:d.label,p=s||o?.phase===`error`,m=l||o!==void 0&&g.has(o.phase);return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:s?u:d.detail,side:`top`,children:/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:h.indicator,"aria-label":f,"aria-disabled":m,onClick:()=>{m||a()},children:[/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.icon,"aria-hidden":`true`,children:p?/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.errorDot}):m?/* @__PURE__ */ (0,c.jsx)(i.IconLoadingOutlineRegular,{className:h.spinner,size:14}):/* @__PURE__ */ (0,c.jsx)(i.IconDownloadOutlineRegular,{size:14})}),/* @__PURE__ */ (0,c.jsx)(`span`,{children:f})]})})}function y({useDesktopUpdate:e,useConnectionState:t,t:n}){let{presentation:r,failed:a}=e(e=>e),o=t(e=>e);if((o===`disconnected`||o===`connecting`)&&r?.phase!==`installing`||!a&&(r===void 0||r.phase===`idle`))return null;let s=n(`desktop.update.retry`),l=r===void 0?{label:s,detail:s}:_(r,n),u=a?s:l.label;return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:a?u:l.detail,side:`right`,children:/* @__PURE__ */ (0,c.jsx)(`span`,{role:`img`,"aria-label":u,className:h.badge})})}function b(e){return e===`account`||e===`codexhost-accounts`?/* @__PURE__ */ (0,c.jsx)(i.IconUserOutlineMedium,{className:p.navIcon,size:16}):e===`models`||e===`codexhost-usage-statistics`?/* @__PURE__ */ (0,c.jsx)(i.IconDataOutlineMedium,{className:p.navIcon,size:16}):e===`agent-presets`?/* @__PURE__ */ (0,c.jsx)(i.IconAgentPresetOutlineMedium,{className:p.navIcon,size:16}):e===`plugins`||e===`codexhost-connections`?/* @__PURE__ */ (0,c.jsx)(i.IconPersonalizationOutlineMedium,{className:p.navIcon,size:16}):e===`archived-sessions`?/* @__PURE__ */ (0,c.jsx)(i.IconArchiveOutlineMedium,{className:p.navIcon,size:16}):/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{className:p.navIcon,size:16})}function x({rows:e,renderSlot:t,activeId:n,onSelect:r,onClose:a}){let l=e.find(e=>e.id===n)?.id??e[0]?.id,u=(0,o.useId)(),f=(0,o.useRef)(null);return(0,i.useModalLayer)(f,!0,a),(0,s.createPortal)(/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.overlay,role:`presentation`,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.mask,"aria-hidden":`true`,onClick:a}),/* @__PURE__ */ (0,c.jsxs)(`div`,{ref:f,tabIndex:-1,"data-shortcut-modal":`settings`,className:p.panel,role:`dialog`,"aria-modal":`true`,"aria-labelledby":u,children:[/* @__PURE__ */ (0,c.jsxs)(`nav`,{className:p.nav,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navTitle,id:u,tabIndex:-1,"data-modal-autofocus":l===void 0?``:void 0,children:t(`settings.header`,{})}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navList,children:e.map(e=>/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:d(p.navCell,e.id===l&&p.active),"aria-current":e.id===l?`true`:void 0,"data-modal-autofocus":e.id===l?``:void 0,onClick:()=>{r(e.id)},children:[b(e.id),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.navLabel,children:e.label})]},e.id))})]}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.content,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.header,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.actions,children:t(`settings.action`,{})}),/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:p.close,onClick:a,children:[/* @__PURE__ */ (0,c.jsx)(i.IconCloseOutlineRegular,{size:14}),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.hiddenLabel,children:t(`settings.close`,{})})]})]}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.options,children:l!==void 0&&t(`settings.section`,{close:a},{only:l})})]})]})]}),document.body)}function S(e){let{wide:t,reconnect:n,useConnectionState:r,useSections:a,useOnboardingSteps:s,useSessions:l,renderSlot:u,t:f,useDesktopUpdate:m,openDesktopUpdate:h,useStore:g,actions:_,useShortcuts:y}=e,{open:b,activeId:S}=g(e=>e),C=y(e=>e.find(e=>e.id===`settings.open`)),{close:w,openSection:T}=_;(0,o.useEffect)(()=>{if(window.location.hash!==`#connect-devices`)return;T(`codexhost-connect-devices`);let e=new URL(window.location.href);e.hash=``,window.history.replaceState(window.history.state,``,e.href)},[T]);let[E,D]=(0,o.useState)(),[O,k]=(0,o.useState)(()=>/* @__PURE__ */ new Set),[A,j]=(0,o.useState)(!1),[M,N]=(0,o.useState)(!1),P=(0,o.useRef)(void 0),F=a(e=>e),I=m(e=>e),L=r(e=>e),R=(0,o.useRef)(L),z=s(e=>e),B=l(e=>{let t=Object.values(e.byId).find(e=>(e.retainedBy.mainView??0)>0);return e.phase===`ready`&&(t===void 0||t.blank)}),V=E===void 0?B?z.find(e=>!O.has(e.id)):void 0:z.find(e=>e.id===E);(0,o.useEffect)(()=>{B||k(/* @__PURE__ */ new Set)},[B]);let H=(0,o.useRef)(V);(0,o.useEffect)(()=>{let e=H.current===void 0&&V!==void 0;H.current=V,e&&b&&w()},[V,b,w]),(0,o.useLayoutEffect)(()=>{let e=R.current;R.current=L,L===`connected`?(e===`disconnected`||e===`connecting`)&&j(!0):j(!1)},[L]),(0,o.useLayoutEffect)(()=>{if(!A||M)return;let e=window.setTimeout(()=>{j(!1)},2e3);return()=>{window.clearTimeout(e)}},[A,M]),(0,o.useLayoutEffect)(()=>{if(L===`connecting`){P.current=Date.now();return}let e=P.current;if(e===void 0)return;P.current=void 0;let t=800-(Date.now()-e);if(t<=0)return;N(!0);let n=window.setTimeout(()=>{N(!1)},t);return()=>{window.clearTimeout(n),N(!1)}},[L]);let U=(0,o.useCallback)(e=>{D(void 0),k(t=>t.has(e)?t:/* @__PURE__ */ new Set([...t,e]))},[]),W;return L===`connecting`||M?W=`connecting`:L===`disconnected`?W=`disconnected`:A&&(W=`recovered`),/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:d(p.triggerRow,!t&&p.railRow),children:[u(`settings.launcher`,{wide:t,settingsOpen:b,openSettings:_.open,...C?.keys.length?{settingsShortcut:{keys:C.keys,aria:C.aria}}:{},openOnboarding:e=>{w(),D(e)}},{fallback:/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{disabled:b,label:f(`trigger`),shortcutKeys:C?.keys,children:/* @__PURE__ */ (0,c.jsx)(`button`,{type:`button`,className:d(p.trigger,!t&&p.rail),"aria-label":f(`trigger`),"aria-keyshortcuts":C?.aria,"aria-haspopup":`dialog`,"aria-expanded":b,onClick:()=>{_.open()},children:u(`settings.trigger`,{wide:t})})})}),/* @__PURE__ */ (0,c.jsx)(i.ConnectionIndicator,{state:t&&I.presentation?.phase!==`installing`?W:void 0,disconnectedLabel:f(`connection.error`),connectingLabel:f(`connection.connecting`),recoveredLabel:f(`connection.connected`),reconnectActionLabel:f(`connection.reconnect`),restartActionLabel:f(`connection.restart`),onReconnect:n}),/* @__PURE__ */ (0,c.jsx)(v,{wide:t,hidden:W!==void 0&&I.presentation?.phase!==`installing`,t:f,view:I,onOpen:h})]}),b&&/* @__PURE__ */ (0,c.jsx)(x,{rows:F,renderSlot:u,activeId:S,onSelect:_.select,onClose:w}),V!==void 0&&u(`settings.onboarding`,{stepId:V.id,explicit:E!==void 0,complete:()=>{U(V.id)},openSection:T},{only:V.id})]})}var C=class{bridge;store=(0,a.createSnapshotStore)({failed:!1,opening:!1});live=!0;received=!1;unsubscribe;constructor(e){this.bridge=e,this.unsubscribe=e?.subscribe(e=>{this.live&&(this.received=!0,this.store.set({...this.store.getSnapshot(),presentation:e,failed:!1}))}),e?.status().then(e=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),presentation:e})},()=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),failed:!0})})}open(){if(!this.live||this.bridge===void 0)return;let e=this.store.getSnapshot();e.opening||e.presentation!==void 0&&[`checking`,`downloading`,`verifying`,`installing`].includes(e.presentation.phase)||(this.store.set({...e,opening:!0}),this.bridge.open().catch(()=>{this.live&&this.store.set({...this.store.getSnapshot(),failed:!0})}).finally(()=>{this.live&&this.store.set({...this.store.getSnapshot(),opening:!1})}))}dispose(){this.live=!1,this.unsubscribe?.()}};let w=`@deepseek-ai/dsh-client-ui-settings-general/chrome.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(w)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=w,e.textContent=`.JK2ZxG_triggerLabel{white-space:nowrap;overflow:hidden}`,document.head.appendChild(e)}var T={triggerLabel:`JK2ZxG_triggerLabel`};function E({wide:e,t}){return/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{size:e?16:18}),e&&/* @__PURE__ */ (0,c.jsx)(`span`,{className:T.triggerLabel,children:t(`trigger`)})]})}function D({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`title`)})}function O({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`close`)})}let k=`@deepseek-ai/dsh-client-ui-settings-general/GeneralSection.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(k)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=k,e.textContent=`.GkoitG_section{flex-direction:column;width:100%;display:flex}.GkoitG_heading{margin-bottom:28px}.GkoitG_title{color:var(--dsw-alias-label-primary);letter-spacing:-.5px;margin:0;font-size:24px;font-weight:600;line-height:32px}.GkoitG_description{color:var(--dsw-alias-label-secondary);margin:8px 0 0;font-size:13px;line-height:20px}.GkoitG_group+.GkoitG_group{margin-top:28px}.GkoitG_groupTitle{color:var(--dsw-alias-label-primary);margin:0 0 10px;font-size:13px;font-weight:600;line-height:20px}.GkoitG_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:12px}.GkoitG_item{min-width:0;margin:0 20px}.GkoitG_item+.GkoitG_item{border-top:1px solid var(--dsw-alias-border-l1)}.GkoitG_item>[data-slot="settings.general.item"]>*{border-bottom:none}.GkoitG_footer{margin-top:8px}@media (width<=600px){.GkoitG_heading{margin-bottom:24px}.GkoitG_group+.GkoitG_group{margin-top:24px}.GkoitG_item{margin:0 12px}}`,document.head.appendChild(e)}var A={card:`GkoitG_card`,description:`GkoitG_description`,footer:`GkoitG_footer`,group:`GkoitG_group`,groupTitle:`GkoitG_groupTitle`,heading:`GkoitG_heading`,item:`GkoitG_item`,section:`GkoitG_section`,title:`GkoitG_title`};let j=[{title:`general.display`,items:[`language`,`appearance`,`font-size`]},{title:`general.interaction`,items:[`transcript-view`,`developer-tools`,`shortcuts`,`link-opening`,`composer-enter`]},{title:`general.notifications`,items:[`codexhost.notifications`]}],M=new Set(j.flatMap(e=>e.items));function N({renderSlot:e,t,useItems:n}){let r=(0,o.useId)(),i=n(e=>e),a=j.map(e=>({title:e.title,items:i.filter(t=>e.items.includes(t))}));return a.push({title:`general.other`,items:i.filter(e=>e!==`current-version`&&!M.has(e))}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:A.section,children:[/* @__PURE__ */ (0,c.jsxs)(`header`,{className:A.heading,children:[/* @__PURE__ */ (0,c.jsx)(`h2`,{className:A.title,children:t(`general.nav`)}),/* @__PURE__ */ (0,c.jsx)(`p`,{className:A.description,children:t(`general.description`)})]}),a.filter(e=>e.items.length>0).map(n=>/* @__PURE__ */ (0,c.jsxs)(`section`,{className:A.group,"aria-labelledby":`${r}-${n.title}`,children:[/* @__PURE__ */ (0,c.jsx)(`h3`,{className:A.groupTitle,id:`${r}-${n.title}`,children:t(n.title)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.card,children:n.items.map(t=>/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.item,children:e(`settings.general.item`,{},{only:t})},t))})]},n.title)),i.includes(`current-version`)&&/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.footer,children:e(`settings.general.item`,{},{only:`current-version`})})]})}let P=`@deepseek-ai/dsh-client-ui-settings-general/CurrentVersionRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(P)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=P,e.textContent=`.Ve8J0W_row{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;padding:16px 0;font-size:14px;line-height:22px}`,document.head.appendChild(e)}var F={row:`Ve8J0W_row`};function I({t:e}){let t={}.DSH_CLIENT_VERSION;return t===void 0?null:/* @__PURE__ */ (0,c.jsx)(`div`,{className:F.row,children:e(`general.currentVersion`,{version:t})})}let L=`@deepseek-ai/dsh-client-ui-settings-general/DeveloperToolsRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(L)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=L,e.textContent=`.OciNza_row{border-bottom:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:24px;padding:16px 0;display:flex}.OciNza_title{font-size:14px;line-height:20px}.OciNza_description{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:12px;line-height:18px}`,document.head.appendChild(e)}var R={description:`OciNza_description`,row:`OciNza_row`,title:`OciNza_title`};function z({useDeveloperTools:e,setEnabled:t,t:n}){let r=e(e=>e),[a,s]=(0,o.useState)(!1),[l,u]=(0,o.useState)(!1);return/* @__PURE__ */ (0,c.jsxs)(`div`,{className:R.row,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.title,children:n(`developerTools.title`)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.description,children:n(`developerTools.description`)}),l&&/* @__PURE__ */ (0,c.jsx)(`div`,{role:`alert`,children:n(`developerTools.error`)})]}),/* @__PURE__ */ (0,c.jsx)(i.Switch,{checked:r,disabled:a,label:n(`developerTools.title`),onChange:e=>{u(!1),s(!0),t(e).catch(()=>{u(!0)}).finally(()=>{s(!1)})}})]})}let B=`@deepseek-ai/dsh-client-ui-settings-general/SettingsDocumentAction.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(B)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=B,e.textContent=`.cOdd9G_action{align-items:center;gap:8px;min-width:0;display:flex}.cOdd9G_error{max-width:180px;color:var(--dsw-alias-state-error-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}`,document.head.appendChild(e)}var V={action:`cOdd9G_action`,error:`cOdd9G_error`};function H({controller:e,useSnapshot:t,t:n}){let r=t(e=>e);return(0,o.useEffect)(()=>{e.load()},[e]),r.status===`ready`?/* @__PURE__ */ (0,c.jsxs)(`div`,{className:V.action,children:[r.error===null?null:/* @__PURE__ */ (0,c.jsx)(`span`,{className:V.error,role:`alert`,children:n(`openDocument.error`)}),/* @__PURE__ */ (0,c.jsx)(i.Button,{variant:`outline`,size:`sm`,disabled:r.opening,onClick:()=>{e.open()},children:n(`openDocument`)})]}):null}var U=class{ctx;describeFace;store=(0,a.createSnapshotStore)({status:`idle`,opening:!1,error:null});following;constructor(e,t){this.ctx=e,this.describeFace=t}async load(){this.following??=this.describeFace.subscribe(()=>{this.derive()}),this.store.update(e=>{e.status=`loading`,e.error=null}),await this.describeFace.ensure(),this.derive()}async open(){let e=this.store.getSnapshot();if(!(e.status!==`ready`||e.opening)){this.store.update(e=>{e.opening=!0,e.error=null});try{let e=await this.ctx.remote.settings.openSettingsDocument();if(!e.ok){let{message:t}=e.error;this.store.update(e=>{e.error=t})}}finally{this.store.update(e=>{e.opening=!1})}}}dispose(){this.following?.(),this.following=void 0}derive(){let e=this.describeFace.getSnapshot();if(e.view===void 0){e.error!==null&&this.store.update(t=>{t.status=`unavailable`,t.error=e.error});return}let{hasDocument:t}=e.view;this.store.update(e=>{e.status=t?`ready`:`unavailable`,e.error=null})}};let W={trigger:`设置`,"shortcut.open":`打开设置`,"desktop.update.available":`新版本`,"desktop.update.checking":`正在检查更新…`,"desktop.update.progress":`{percent}%`,"desktop.update.verifying":`正在校验更新文件…`,"desktop.update.installing":`正在准备重启…`,"desktop.update.ready":`安装并重启`,"desktop.update.retry":`重试更新`,"desktop.update.versionDetail":`{label}:{version}`,"desktop.update.downloadDetail":`正在下载更新:{percent}%
|
|
1
|
+
window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-settings-general`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/dsh-client-ui-slots"),i=e("@deepseek-ai/dsh-client-ui-primitives"),a=e("@deepseek-ai/dsh-client-store"),o=e("react"),s=e("react-dom"),c=e("react/jsx-runtime");function l(){return(0,a.defineStore)({init:()=>({open:!1,activeId:void 0}),actions:{open:e=>{e.open=!0},close:e=>{e.open=!1,e.activeId=void 0},select:(e,t)=>{e.activeId=t},openSection:(e,t)=>{e.activeId=t,e.open=!0}}})}function u(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=u(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function d(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=u(e))&&(r&&(r+=` `),r+=t);return r}let f=`@deepseek-ai/dsh-client-ui-settings-general/SettingsRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(f)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=f,e.textContent=`.f-TuTG_triggerRow{flex:none;align-items:center;gap:8px;width:calc(100% + 4px);margin:4px -2px;display:flex;position:relative}.f-TuTG_triggerRow.f-TuTG_railRow{width:36px;margin:8px 0 10px}.f-TuTG_trigger{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;width:auto;min-width:0;height:42px;color:var(--dsw-alias-label-primary);background:0 0;border:none;flex:1;align-items:center;gap:8px;margin:0;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.f-TuTG_trigger:hover{background:var(--dsw-alias-interactive-bg-hover)}.f-TuTG_trigger.f-TuTG_rail{flex:none;justify-content:center;gap:0;width:36px;height:36px;margin:0;padding:0}.f-TuTG_triggerLabel{white-space:nowrap;overflow:hidden}.f-TuTG_overlay{z-index:1000;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.f-TuTG_mask{inset:var(--dsh-frame-chrome-top,0px) 0 0;background:var(--dsw-alias-bg-mask-1);backdrop-filter:var(--dsw-mask-blur);position:absolute}.f-TuTG_panel{z-index:1;width:1040px;height:min(800px, calc(100vh - 2 * max(24px, var(--dsh-frame-overlay-top,24px))));border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-2);max-width:calc(100vw - 48px);box-shadow:var(--dsw-elevation-prominent);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);display:flex;position:relative;overflow:hidden}.f-TuTG_panel:focus{outline:none}.f-TuTG_nav{box-sizing:border-box;flex-direction:column;flex:none;gap:18px;width:188px;padding:22px 12px 0;display:flex}.f-TuTG_navTitle{color:var(--dsw-alias-label-primary);padding:0 12px;font-size:16px;font-weight:500;line-height:24px}.f-TuTG_navList{flex-direction:column;gap:4px;display:flex;overflow-y:auto}.f-TuTG_navCell{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;height:40px;color:var(--dsw-alias-label-primary);text-align:left;background:0 0;border:none;align-items:center;gap:8px;padding:9px 16px 9px 12px;font-family:inherit;font-size:14px;font-weight:400;line-height:22px;display:flex}.f-TuTG_navCell:hover{background:var(--dsw-specific-sidebar-nav-item-hover)}.f-TuTG_navCell.f-TuTG_active{background:var(--dsw-specific-sidebar-nav-item-active)}.f-TuTG_navIcon{flex:none}.f-TuTG_navLabel{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.f-TuTG_content{flex-direction:column;flex:1;min-width:0;display:flex}.f-TuTG_header{box-sizing:border-box;flex:none;justify-content:space-between;align-items:flex-start;gap:8px;height:54px;padding:20px 14px 8px 10px;display:flex}.f-TuTG_actions{justify-content:flex-end;align-items:center;gap:8px;min-width:0;margin-left:auto;display:flex}.f-TuTG_close{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-primary);background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.f-TuTG_close:hover{background:var(--dsw-alias-interactive-bg-hover)}.f-TuTG_options{flex:1;min-height:0;padding:0 24px 24px;overflow-y:auto}@media (width<=600px){.f-TuTG_panel{max-width:calc(100vw - 24px);height:calc(100dvh - 2 * max(12px, env(safe-area-inset-top), env(safe-area-inset-bottom)));flex-direction:column}.f-TuTG_nav{gap:12px;width:100%;padding:16px 12px 8px}.f-TuTG_navTitle{padding:0 44px 0 4px}.f-TuTG_navList{flex-direction:row;overflow-x:auto}.f-TuTG_navCell{flex:none;height:44px}.f-TuTG_content{min-height:0}.f-TuTG_header{height:auto;padding:0 16px}.f-TuTG_close{width:44px;height:44px;position:absolute;top:6px;right:6px}.f-TuTG_options{padding:0 16px 16px}}.f-TuTG_hiddenLabel{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}`,document.head.appendChild(e)}var p={actions:`f-TuTG_actions`,active:`f-TuTG_active`,close:`f-TuTG_close`,content:`f-TuTG_content`,header:`f-TuTG_header`,hiddenLabel:`f-TuTG_hiddenLabel`,mask:`f-TuTG_mask`,nav:`f-TuTG_nav`,navCell:`f-TuTG_navCell`,navIcon:`f-TuTG_navIcon`,navLabel:`f-TuTG_navLabel`,navList:`f-TuTG_navList`,navTitle:`f-TuTG_navTitle`,options:`f-TuTG_options`,overlay:`f-TuTG_overlay`,panel:`f-TuTG_panel`,rail:`f-TuTG_rail`,railRow:`f-TuTG_railRow`,trigger:`f-TuTG_trigger`,triggerLabel:`f-TuTG_triggerLabel`,triggerRow:`f-TuTG_triggerRow`};let m=`@deepseek-ai/dsh-client-ui-settings-general/DesktopUpdateIndicator.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(m)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=m,e.textContent=`.NQzlxG_indicator{box-sizing:border-box;border:1px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent);border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-brand-primary-new-colorprimary-new-color);background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 8%, transparent);text-align:left;white-space:nowrap;cursor:pointer;flex:none;grid-template-columns:14px max-content;align-items:center;column-gap:4px;padding:0 8px;font-family:inherit;font-size:12px;font-weight:500;line-height:18px;display:inline-grid}.NQzlxG_icon{place-items:center;width:14px;height:14px;display:grid}.NQzlxG_badge{inset-inline-end:2px;corner-shape:round;background:var(--dsw-alias-brand-primary-new-colorprimary-new-color);border-radius:50%;width:6px;height:6px;position:absolute;top:2px}.NQzlxG_errorDot{corner-shape:round;background:currentColor;border-radius:50%;width:6px;height:6px}.NQzlxG_spinner{animation:1s linear infinite NQzlxG_spin}@keyframes NQzlxG_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.NQzlxG_spinner{animation:none}}.NQzlxG_indicator[aria-disabled=true]{cursor:default}`,document.head.appendChild(e)}var h={badge:`NQzlxG_badge`,errorDot:`NQzlxG_errorDot`,icon:`NQzlxG_icon`,indicator:`NQzlxG_indicator`,spin:`NQzlxG_spin`,spinner:`NQzlxG_spinner`};let g=/* @__PURE__ */ new Set([`checking`,`downloading`,`verifying`,`installing`]);function _(e,t){let n={idle:``,checking:t(`desktop.update.checking`),available:t(`desktop.update.available`),downloading:t(`desktop.update.progress`,{percent:e.percent??0}),verifying:t(`desktop.update.verifying`),installing:t(`desktop.update.installing`),ready:t(`desktop.update.ready`),error:t(`desktop.update.retry`)}[e.phase];return e.phase===`checking`||e.phase===`verifying`||e.phase===`installing`?{label:n,detail:e.version??n}:e.phase===`error`?{label:n,detail:{check:t(`desktop.update.checkFailed`),"check-network":t(`desktop.update.checkNetworkFailed`),download:t(`desktop.update.downloadFailed`),"download-network":t(`desktop.update.downloadNetworkFailed`),install:t(`desktop.update.installFailed`),"install-network":t(`desktop.update.installNetworkFailed`),"stop-failed":t(`desktop.update.stopFailed`),"tasks-changed":t(`desktop.update.tasksChanged`),"tasks-unavailable":t(`desktop.update.tasksUnavailable`)}[e.failure??`install`]}:e.phase===`downloading`&&e.version!==void 0?{label:n,detail:t(`desktop.update.downloadDetail`,{percent:e.percent??0,version:e.version})}:{label:n,detail:e.version===void 0?n:t(`desktop.update.versionDetail`,{label:n,version:e.version})}}function v({wide:e,hidden:t,t:n,view:r,onOpen:a}){let{presentation:o,failed:s,opening:l}=r;if(!e||t||!s&&(o===void 0||o.phase===`idle`))return null;let u=n(`desktop.update.retry`),d=o===void 0?{label:u,detail:u}:_(o,n),f=s?u:d.label,p=s||o?.phase===`error`,m=l||o!==void 0&&g.has(o.phase);return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:s?u:d.detail,side:`top`,children:/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:h.indicator,"aria-label":f,"aria-disabled":m,onClick:()=>{m||a()},children:[/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.icon,"aria-hidden":`true`,children:p?/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.errorDot}):m?/* @__PURE__ */ (0,c.jsx)(i.IconLoadingOutlineRegular,{className:h.spinner,size:14}):/* @__PURE__ */ (0,c.jsx)(i.IconDownloadOutlineRegular,{size:14})}),/* @__PURE__ */ (0,c.jsx)(`span`,{children:f})]})})}function y({useDesktopUpdate:e,useConnectionState:t,t:n}){let{presentation:r,failed:a}=e(e=>e),o=t(e=>e);if((o===`disconnected`||o===`connecting`)&&r?.phase!==`installing`||!a&&(r===void 0||r.phase===`idle`))return null;let s=n(`desktop.update.retry`),l=r===void 0?{label:s,detail:s}:_(r,n),u=a?s:l.label;return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:a?u:l.detail,side:`right`,children:/* @__PURE__ */ (0,c.jsx)(`span`,{role:`img`,"aria-label":u,className:h.badge})})}function b(e){return e===`account`||e===`codexhost-accounts`?/* @__PURE__ */ (0,c.jsx)(i.IconUserOutlineMedium,{className:p.navIcon,size:16}):e===`models`||e===`codexhost-usage-statistics`?/* @__PURE__ */ (0,c.jsx)(i.IconDataOutlineMedium,{className:p.navIcon,size:16}):e===`agent-presets`?/* @__PURE__ */ (0,c.jsx)(i.IconAgentPresetOutlineMedium,{className:p.navIcon,size:16}):e===`plugins`||e===`codexhost-connections`?/* @__PURE__ */ (0,c.jsx)(i.IconPersonalizationOutlineMedium,{className:p.navIcon,size:16}):e===`archived-sessions`?/* @__PURE__ */ (0,c.jsx)(i.IconArchiveOutlineMedium,{className:p.navIcon,size:16}):/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{className:p.navIcon,size:16})}function x({rows:e,renderSlot:t,activeId:n,onSelect:r,onClose:a}){let l=e.find(e=>e.id===n)?.id??e[0]?.id,u=(0,o.useId)(),f=(0,o.useRef)(null);return(0,i.useModalLayer)(f,!0,a),(0,s.createPortal)(/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.overlay,role:`presentation`,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.mask,"aria-hidden":`true`,onClick:a}),/* @__PURE__ */ (0,c.jsxs)(`div`,{ref:f,tabIndex:-1,"data-shortcut-modal":`settings`,className:p.panel,role:`dialog`,"aria-modal":`true`,"aria-labelledby":u,children:[/* @__PURE__ */ (0,c.jsxs)(`nav`,{className:p.nav,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navTitle,id:u,tabIndex:-1,"data-modal-autofocus":l===void 0?``:void 0,children:t(`settings.header`,{})}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navList,children:e.map(e=>/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:d(p.navCell,e.id===l&&p.active),"aria-current":e.id===l?`true`:void 0,"data-modal-autofocus":e.id===l?``:void 0,onClick:()=>{r(e.id)},children:[b(e.id),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.navLabel,children:e.label})]},e.id))})]}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.content,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.header,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.actions,children:t(`settings.action`,{})}),/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:p.close,onClick:a,children:[/* @__PURE__ */ (0,c.jsx)(i.IconCloseOutlineRegular,{size:14}),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.hiddenLabel,children:t(`settings.close`,{})})]})]}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.options,children:l!==void 0&&t(`settings.section`,{close:a},{only:l})})]})]})]}),document.body)}function S(e){let{wide:t,reconnect:n,useConnectionState:r,useSections:a,useOnboardingSteps:s,useSessions:l,renderSlot:u,t:f,useDesktopUpdate:m,openDesktopUpdate:h,useStore:g,actions:_,useShortcuts:y}=e,{open:b,activeId:S}=g(e=>e),C=y(e=>e.find(e=>e.id===`settings.open`)),{close:w,openSection:T}=_;(0,o.useEffect)(()=>{if(window.location.hash!==`#connect-devices`)return;T(`codexhost-connect-devices`);let e=new URL(window.location.href);e.hash=``,window.history.replaceState(window.history.state,``,e.href)},[T]);let[E,D]=(0,o.useState)(),[O,k]=(0,o.useState)(()=>/* @__PURE__ */ new Set),[A,j]=(0,o.useState)(!1),[M,N]=(0,o.useState)(!1),P=(0,o.useRef)(void 0),F=a(e=>e),I=m(e=>e),L=r(e=>e),R=(0,o.useRef)(L),z=s(e=>e),B=l(e=>{let t=Object.values(e.byId).find(e=>(e.retainedBy.mainView??0)>0);return e.phase===`ready`&&(t===void 0||t.blank)}),V=E===void 0?B?z.find(e=>!O.has(e.id)):void 0:z.find(e=>e.id===E);(0,o.useEffect)(()=>{B||k(/* @__PURE__ */ new Set)},[B]);let H=(0,o.useRef)(V);(0,o.useEffect)(()=>{let e=H.current===void 0&&V!==void 0;H.current=V,e&&b&&w()},[V,b,w]),(0,o.useLayoutEffect)(()=>{let e=R.current;R.current=L,L===`connected`?(e===`disconnected`||e===`connecting`)&&j(!0):j(!1)},[L]),(0,o.useLayoutEffect)(()=>{if(!A||M)return;let e=window.setTimeout(()=>{j(!1)},2e3);return()=>{window.clearTimeout(e)}},[A,M]),(0,o.useLayoutEffect)(()=>{if(L===`connecting`){P.current=Date.now();return}let e=P.current;if(e===void 0)return;P.current=void 0;let t=800-(Date.now()-e);if(t<=0)return;N(!0);let n=window.setTimeout(()=>{N(!1)},t);return()=>{window.clearTimeout(n),N(!1)}},[L]);let U=(0,o.useCallback)(e=>{D(void 0),k(t=>t.has(e)?t:/* @__PURE__ */ new Set([...t,e]))},[]),W;return L===`connecting`||M?W=`connecting`:L===`disconnected`?W=`disconnected`:A&&(W=`recovered`),/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:d(p.triggerRow,!t&&p.railRow),children:[u(`settings.launcher`,{wide:t,settingsOpen:b,openSettings:_.open,...C?.keys.length?{settingsShortcut:{keys:C.keys,aria:C.aria}}:{},openOnboarding:e=>{w(),D(e)}},{fallback:/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{disabled:b,label:f(`trigger`),shortcutKeys:C?.keys,children:/* @__PURE__ */ (0,c.jsx)(`button`,{type:`button`,className:d(p.trigger,!t&&p.rail),"aria-label":f(`trigger`),"aria-keyshortcuts":C?.aria,"aria-haspopup":`dialog`,"aria-expanded":b,onClick:()=>{_.open()},children:u(`settings.trigger`,{wide:t})})})}),/* @__PURE__ */ (0,c.jsx)(i.ConnectionIndicator,{state:t&&I.presentation?.phase!==`installing`?W:void 0,disconnectedLabel:f(`connection.error`),connectingLabel:f(`connection.connecting`),recoveredLabel:f(`connection.connected`),reconnectActionLabel:f(`connection.reconnect`),restartActionLabel:f(`connection.restart`),onReconnect:n}),/* @__PURE__ */ (0,c.jsx)(v,{wide:t,hidden:W!==void 0&&I.presentation?.phase!==`installing`,t:f,view:I,onOpen:h})]}),b&&/* @__PURE__ */ (0,c.jsx)(x,{rows:F,renderSlot:u,activeId:S,onSelect:_.select,onClose:w}),V!==void 0&&u(`settings.onboarding`,{stepId:V.id,explicit:E!==void 0,complete:()=>{U(V.id)},openSection:T},{only:V.id})]})}var C=class{bridge;store=(0,a.createSnapshotStore)({failed:!1,opening:!1});live=!0;received=!1;unsubscribe;constructor(e){this.bridge=e,this.unsubscribe=e?.subscribe(e=>{this.live&&(this.received=!0,this.store.set({...this.store.getSnapshot(),presentation:e,failed:!1}))}),e?.status().then(e=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),presentation:e})},()=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),failed:!0})})}open(){if(!this.live||this.bridge===void 0)return;let e=this.store.getSnapshot();e.opening||e.presentation!==void 0&&[`checking`,`downloading`,`verifying`,`installing`].includes(e.presentation.phase)||(this.store.set({...e,opening:!0}),this.bridge.open().catch(()=>{this.live&&this.store.set({...this.store.getSnapshot(),failed:!0})}).finally(()=>{this.live&&this.store.set({...this.store.getSnapshot(),opening:!1})}))}dispose(){this.live=!1,this.unsubscribe?.()}};let w=`@deepseek-ai/dsh-client-ui-settings-general/chrome.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(w)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=w,e.textContent=`.JK2ZxG_triggerLabel{white-space:nowrap;overflow:hidden}`,document.head.appendChild(e)}var T={triggerLabel:`JK2ZxG_triggerLabel`};function E({wide:e,t}){return/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{size:e?16:18}),e&&/* @__PURE__ */ (0,c.jsx)(`span`,{className:T.triggerLabel,children:t(`trigger`)})]})}function D({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`title`)})}function O({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`close`)})}let k=`@deepseek-ai/dsh-client-ui-settings-general/GeneralSection.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(k)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=k,e.textContent=`.GkoitG_section{flex-direction:column;width:100%;display:flex}.GkoitG_heading{margin-bottom:28px}.GkoitG_title{color:var(--dsw-alias-label-primary);letter-spacing:-.5px;margin:0;font-size:24px;font-weight:600;line-height:32px}.GkoitG_description{color:var(--dsw-alias-label-secondary);margin:8px 0 0;font-size:13px;line-height:20px}.GkoitG_group+.GkoitG_group{margin-top:28px}.GkoitG_groupTitle{color:var(--dsw-alias-label-primary);margin:0 0 10px;font-size:13px;font-weight:600;line-height:20px}.GkoitG_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:12px}.GkoitG_item{min-width:0;margin:0 20px}.GkoitG_item+.GkoitG_item{border-top:1px solid var(--dsw-alias-border-l1)}.GkoitG_item>[data-slot="settings.general.item"]>*{border-bottom:none}.GkoitG_footer{margin-top:8px}@media (width<=600px){.GkoitG_heading{margin-bottom:24px}.GkoitG_group+.GkoitG_group{margin-top:24px}.GkoitG_item{margin:0 12px}}`,document.head.appendChild(e)}var A={card:`GkoitG_card`,description:`GkoitG_description`,footer:`GkoitG_footer`,group:`GkoitG_group`,groupTitle:`GkoitG_groupTitle`,heading:`GkoitG_heading`,item:`GkoitG_item`,section:`GkoitG_section`,title:`GkoitG_title`};let j=[{title:`general.display`,items:[`language`,`appearance`,`font-size`,`workspace.recent-navigation`]},{title:`general.interaction`,items:[`transcript-view`,`developer-tools`,`shortcuts`,`link-opening`,`composer-enter`]},{title:`general.notifications`,items:[`codexhost.notifications`]}],M=new Set(j.flatMap(e=>e.items));function N({renderSlot:e,t,useItems:n}){let r=(0,o.useId)(),i=n(e=>e),a=j.map(e=>({title:e.title,items:i.filter(t=>e.items.includes(t))}));return a.push({title:`general.other`,items:i.filter(e=>e!==`current-version`&&!M.has(e))}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:A.section,children:[/* @__PURE__ */ (0,c.jsxs)(`header`,{className:A.heading,children:[/* @__PURE__ */ (0,c.jsx)(`h2`,{className:A.title,children:t(`general.nav`)}),/* @__PURE__ */ (0,c.jsx)(`p`,{className:A.description,children:t(`general.description`)})]}),a.filter(e=>e.items.length>0).map(n=>/* @__PURE__ */ (0,c.jsxs)(`section`,{className:A.group,"aria-labelledby":`${r}-${n.title}`,children:[/* @__PURE__ */ (0,c.jsx)(`h3`,{className:A.groupTitle,id:`${r}-${n.title}`,children:t(n.title)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.card,children:n.items.map(t=>/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.item,children:e(`settings.general.item`,{},{only:t})},t))})]},n.title)),i.includes(`current-version`)&&/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.footer,children:e(`settings.general.item`,{},{only:`current-version`})})]})}let P=`@deepseek-ai/dsh-client-ui-settings-general/CurrentVersionRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(P)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=P,e.textContent=`.Ve8J0W_row{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;padding:16px 0;font-size:14px;line-height:22px}`,document.head.appendChild(e)}var F={row:`Ve8J0W_row`};function I({t:e}){let t={}.DSH_CLIENT_VERSION;return t===void 0?null:/* @__PURE__ */ (0,c.jsx)(`div`,{className:F.row,children:e(`general.currentVersion`,{version:t})})}let L=`@deepseek-ai/dsh-client-ui-settings-general/DeveloperToolsRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(L)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=L,e.textContent=`.OciNza_row{border-bottom:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:24px;padding:16px 0;display:flex}.OciNza_title{font-size:14px;line-height:20px}.OciNza_description{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:12px;line-height:18px}`,document.head.appendChild(e)}var R={description:`OciNza_description`,row:`OciNza_row`,title:`OciNza_title`};function z({useDeveloperTools:e,setEnabled:t,t:n}){let r=e(e=>e),[a,s]=(0,o.useState)(!1),[l,u]=(0,o.useState)(!1);return/* @__PURE__ */ (0,c.jsxs)(`div`,{className:R.row,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.title,children:n(`developerTools.title`)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.description,children:n(`developerTools.description`)}),l&&/* @__PURE__ */ (0,c.jsx)(`div`,{role:`alert`,children:n(`developerTools.error`)})]}),/* @__PURE__ */ (0,c.jsx)(i.Switch,{checked:r,disabled:a,label:n(`developerTools.title`),onChange:e=>{u(!1),s(!0),t(e).catch(()=>{u(!0)}).finally(()=>{s(!1)})}})]})}let B=`@deepseek-ai/dsh-client-ui-settings-general/SettingsDocumentAction.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(B)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=B,e.textContent=`.cOdd9G_action{align-items:center;gap:8px;min-width:0;display:flex}.cOdd9G_error{max-width:180px;color:var(--dsw-alias-state-error-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}`,document.head.appendChild(e)}var V={action:`cOdd9G_action`,error:`cOdd9G_error`};function H({controller:e,useSnapshot:t,t:n}){let r=t(e=>e);return(0,o.useEffect)(()=>{e.load()},[e]),r.status===`ready`?/* @__PURE__ */ (0,c.jsxs)(`div`,{className:V.action,children:[r.error===null?null:/* @__PURE__ */ (0,c.jsx)(`span`,{className:V.error,role:`alert`,children:n(`openDocument.error`)}),/* @__PURE__ */ (0,c.jsx)(i.Button,{variant:`outline`,size:`sm`,disabled:r.opening,onClick:()=>{e.open()},children:n(`openDocument`)})]}):null}var U=class{ctx;describeFace;store=(0,a.createSnapshotStore)({status:`idle`,opening:!1,error:null});following;constructor(e,t){this.ctx=e,this.describeFace=t}async load(){this.following??=this.describeFace.subscribe(()=>{this.derive()}),this.store.update(e=>{e.status=`loading`,e.error=null}),await this.describeFace.ensure(),this.derive()}async open(){let e=this.store.getSnapshot();if(!(e.status!==`ready`||e.opening)){this.store.update(e=>{e.opening=!0,e.error=null});try{let e=await this.ctx.remote.settings.openSettingsDocument();if(!e.ok){let{message:t}=e.error;this.store.update(e=>{e.error=t})}}finally{this.store.update(e=>{e.opening=!1})}}}dispose(){this.following?.(),this.following=void 0}derive(){let e=this.describeFace.getSnapshot();if(e.view===void 0){e.error!==null&&this.store.update(t=>{t.status=`unavailable`,t.error=e.error});return}let{hasDocument:t}=e.view;this.store.update(e=>{e.status=t?`ready`:`unavailable`,e.error=null})}};let W={trigger:`设置`,"shortcut.open":`打开设置`,"desktop.update.available":`新版本`,"desktop.update.checking":`正在检查更新…`,"desktop.update.progress":`{percent}%`,"desktop.update.verifying":`正在校验更新文件…`,"desktop.update.installing":`正在准备重启…`,"desktop.update.ready":`安装并重启`,"desktop.update.retry":`重试更新`,"desktop.update.versionDetail":`{label}:{version}`,"desktop.update.downloadDetail":`正在下载更新:{percent}%
|
|
2
2
|
目标版本:{version}`,"desktop.update.checkFailed":`检查更新失败,请稍后重试。`,"desktop.update.downloadFailed":`下载更新失败,请重试。`,"desktop.update.installFailed":`安装更新失败,请稍后重试。`,"desktop.update.checkNetworkFailed":`检查更新失败,请检查网络连接后重试。`,"desktop.update.downloadNetworkFailed":`下载更新失败,请检查网络连接后重试。`,"desktop.update.installNetworkFailed":`安装更新失败,请检查网络连接后重试。`,"desktop.update.stopFailed":`未能安全停止任务,更新尚未安装,请稍后重试。`,"desktop.update.tasksChanged":`有新任务开始运行,请重新确认是否停止任务并更新。`,"desktop.update.tasksUnavailable":`无法确认任务状态,请在工作区就绪后重试更新。`,title:`设置`,close:`关闭`,openDocument:`打开配置文件`,"openDocument.error":`无法打开配置文件`,"general.nav":`通用设置`,"general.description":`调整界面显示、阅读与交互偏好。`,"general.display":`显示与语言`,"general.interaction":`交互与阅读`,"general.notifications":`通知`,"general.other":`其他设置`,"general.currentVersion":`当前版本:{version}`,"developerTools.title":`显示代码工作视图`,"developerTools.error":`保存失败,请重试`,"developerTools.description":`在对话中显示代码 diff 和工具调用详情`,"connection.error":`连接异常,刷新重试`,"connection.connecting":`重新连接中`,"connection.connected":`连接成功`,"connection.reconnect":`连接异常,点击立即重连`,"connection.restart":`连接中断,正在重试,点击立即重连`},G={trigger:`Settings`,"shortcut.open":`Open settings`,"desktop.update.available":`Update`,"desktop.update.checking":`Checking for updates…`,"desktop.update.progress":`{percent}%`,"desktop.update.verifying":`Verifying update files…`,"desktop.update.installing":`Preparing to restart…`,"desktop.update.ready":`Install and Restart`,"desktop.update.retry":`Retry update`,"desktop.update.versionDetail":`{label}: {version}`,"desktop.update.downloadDetail":`Downloading update: {percent}%
|
|
3
3
|
Target version: {version}`,"desktop.update.checkFailed":`Could not check for updates. Please try again later.`,"desktop.update.downloadFailed":`Could not download the update. Please try again.`,"desktop.update.installFailed":`Could not install the update. Please try again later.`,"desktop.update.checkNetworkFailed":`Could not check for updates. Check your connection and try again.`,"desktop.update.downloadNetworkFailed":`Could not download the update. Check your connection and try again.`,"desktop.update.installNetworkFailed":`Could not install the update. Check your connection and try again.`,"desktop.update.stopFailed":`Could not safely stop the tasks. The update has not been installed. Please try again later.`,"desktop.update.tasksChanged":`New tasks have started. Confirm again to stop the tasks and update.`,"desktop.update.tasksUnavailable":`Task status is unavailable. Try updating again when the workspace is ready.`,title:`Settings`,close:`Close`,openDocument:`Open configuration file`,"openDocument.error":`Could not open configuration file`,"general.nav":`General`,"general.description":`Adjust your display, reading, and interaction preferences.`,"general.display":`Display & language`,"general.interaction":`Interaction & reading`,"general.notifications":`Notifications`,"general.other":`Other settings`,"general.currentVersion":`Current version: {version}`,"developerTools.title":`Show coding view`,"developerTools.error":`Could not save. Please try again.`,"developerTools.description":`Shows code diffs and detailed tool output in conversations`,"connection.error":`Disconnected`,"connection.connecting":`Reconnecting`,"connection.connected":`Connected`,"connection.reconnect":`Disconnected, reconnect now`,"connection.restart":`Reconnecting, reconnect now`},K=`settings`,q=[`slots`,`locale`,`connection`,`remote`,`remote.settings`,`configForms`,`shortcuts`];function J(e){e.slots.inject(`settings.general.item`,()=>e.slots.register({name:`settings.general.item`,id:`developer-tools`,order:15,locale:K,inject:()=>({hooks:{developerTools:e.configForms.developerTools.enabled},setEnabled:t=>e.configForms.developerTools.setEnabled(t)})},z)),e.slots.inject(`settings.general.item`,()=>e.slots.register({name:`settings.general.item`,id:`current-version`,order:100,locale:K},I)),e.effect(()=>e.locale.register(K,{zh:W,en:G}),`ui-settings-general: dictionaries`);let t=e.get(`connection`),n=globalThis.dshDesktop,a=new C(n?.protocolVersion===1?n.updates:void 0);e.effect(()=>()=>{a.dispose()},`ui-settings-general: desktop update carrier`),e.slots.inject(`sidebar.toggle.badge`,()=>e.slots.register({name:`sidebar.toggle.badge`,locale:K,inject:()=>({hooks:{desktopUpdate:a.store,connectionState:t.state}})},y));let o=e.locale.bind(K),s=e.remote.$host.isLoopback?new U(e,e.configForms.describe()):void 0,c=s===void 0?void 0:()=>({controller:s,hooks:{snapshot:s.store}});e.effect(()=>()=>{s?.dispose()},`ui-settings-general: document action directory`);let u=-1,d=-1,f=[],p=-1,m=[],h=()=>({openDesktopUpdate:()=>{a.open()},reconnect:()=>{t.reconnect()},hooks:{shortcuts:e.shortcuts.catalog,desktopUpdate:a.store,connectionState:t.state,sections:{getSnapshot:()=>{let t=e.slots.getVersion(`settings.section`),n=e.locale.getSnapshot().revision;return(t!==u||n!==d)&&(u=t,d=n,f=e.slots.entries(`settings.section`).map(e=>({
|
|
4
4
|
/* v8 ignore next -- list-slot registration requires id (SlotCore rejects an entry without one) */
|
|
5
5
|
id:e.options.id??``,order:e.options.order??0,label:(0,r.resolveSlotLabel)(e.options.label)??``})).sort((e,t)=>e.order-t.order)),f},subscribe:t=>{let n=e.slots.subscribe(`settings.section`,t),r=e.locale.subscribe(t);return()=>{n(),r()}}},onboardingSteps:{getSnapshot:()=>{let t=e.slots.getVersion(`settings.onboarding`);return t!==p&&(p=t,m=e.slots.entries(`settings.onboarding`).map(e=>({
|
|
6
6
|
/* v8 ignore next -- list-slot registration requires id */
|
|
7
|
-
id:e.options.id??``,order:e.options.order??0})).sort((e,t)=>e.order-t.order)),m},subscribe:t=>e.slots.subscribe(`settings.onboarding`,t)}}});e.slots.inject(`sidebar.settings`,()=>{let t=l(),n=t.create(),r={...t,create:()=>n},a=e.shortcuts.register({id:`settings.open`,label:()=>o(`shortcut.open`),aliases:[`settings`,`preferences`],defaults:{"desktop:macos":{code:`Comma`,modifiers:[`primary`]},"desktop:windows":{code:`Comma`,modifiers:[`primary`]},"desktop:linux":{code:`Comma`,modifiers:[`primary`]},"web:macos":{code:`Comma`,modifiers:[`primary`,`alt`]},"web:windows":{code:`Comma`,modifiers:[`primary`,`alt`]}},regions:[`page`,`editable`,`terminal`],modals:[`settings`],resolve:({modal:e})=>e!==null&&e!==`settings`?{status:`blocked`,reason:`modal`}:{status:`handled`,run:()=>{e===`settings`?(0,i.closeTopModal)(document):n.actions.open()}}}),
|
|
7
|
+
id:e.options.id??``,order:e.options.order??0})).sort((e,t)=>e.order-t.order)),m},subscribe:t=>e.slots.subscribe(`settings.onboarding`,t)}}});e.slots.inject(`sidebar.settings`,()=>{let t=l(),n=t.create(),r={...t,create:()=>n},a=e.reflect.provide(`settingsNavigation`,{openSection:e=>n.actions.openSection(e)}),s=e.shortcuts.register({id:`settings.open`,label:()=>o(`shortcut.open`),aliases:[`settings`,`preferences`],defaults:{"desktop:macos":{code:`Comma`,modifiers:[`primary`]},"desktop:windows":{code:`Comma`,modifiers:[`primary`]},"desktop:linux":{code:`Comma`,modifiers:[`primary`]},"web:macos":{code:`Comma`,modifiers:[`primary`,`alt`]},"web:windows":{code:`Comma`,modifiers:[`primary`,`alt`]}},regions:[`page`,`editable`,`terminal`],modals:[`settings`],resolve:({modal:e})=>e!==null&&e!==`settings`?{status:`blocked`,reason:`modal`}:{status:`handled`,run:()=>{e===`settings`?(0,i.closeTopModal)(document):n.actions.open()}}}),c=e.slots.register({name:`sidebar.settings`,locale:K,store:r,children:{"settings.launcher":{kind:`single`,scope:`root`},"settings.trigger":{kind:`single`,scope:`root`},"settings.header":{kind:`single`,scope:`root`},"settings.action":{kind:`list`,scope:`root`},"settings.close":{kind:`single`,scope:`root`},"settings.section":{kind:`list`,scope:`root`},"settings.onboarding":{kind:`list`,scope:`root`}},inject:h},S);return()=>{s(),c(),a()}}),e.slots.inject(`settings.trigger`,()=>e.slots.register({name:`settings.trigger`,locale:K},E)),e.slots.inject(`settings.header`,()=>e.slots.register({name:`settings.header`,locale:K},D)),c!==void 0&&e.slots.inject(`settings.action`,()=>e.slots.register({name:`settings.action`,id:`open-document`,order:0,locale:K,inject:c},H)),e.slots.inject(`settings.close`,()=>e.slots.register({name:`settings.close`,locale:K},O)),e.slots.inject(`settings.section`,()=>e.slots.register({name:`settings.section`,id:`general`,order:0,label:()=>o(`general.nav`),locale:K,children:{"settings.general.item":{kind:`list`,scope:`root`}},inject:()=>{let t=-1,n=[];return{hooks:{items:{getSnapshot:()=>{let r=e.slots.getVersion(`settings.general.item`);return r!==t&&(t=r,n=[...new Set([...e.slots.entries(`settings.general.item`)].sort((e,t)=>(e.options.order??0)-(t.options.order??0)).flatMap(e=>e.options.id?[e.options.id]:[]))]),n},subscribe:t=>e.slots.subscribe(`settings.general.item`,t)}}}}},N))}return n.SettingsDocumentStore=U,n.apply=J,n.inject=q,t.exports}});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-sidebar`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/dsh-client-store"),i=e("@deepseek-ai/dsh-client-ui-slots"),a=e("@deepseek-ai/dsh-client-ui-primitives"),o=e("react/jsx-runtime"),s=e("react"),c=`@deepseek-ai/dsh-client-ui-sidebar/HeaderLeadingControls.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(c)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-sidebar`,e.dataset.pluginCss=c,e.textContent=`.fqofDG_controls{align-items:center;gap:8px;display:flex}.fqofDG_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}.fqofDG_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}`,document.head.appendChild(e)}var l={controls:`fqofDG_controls`,iconButton:`fqofDG_iconButton`};function u({toggleSidebar:e,startSession:t,useShortcuts:n,t:r}){let i=n(e=>e.find(e=>e.id===`sidebar.left.toggle`)),s=n(e=>e.find(e=>e.id===`session.new`));return/* @__PURE__ */ (0,o.jsxs)(`div`,{className:l.controls,children:[/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:r(`toggle.open`),shortcutKeys:i?.keys,delayMs:500,children:/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:l.iconButton,"aria-label":r(`toggle.open`),"aria-keyshortcuts":i?.aria,onClick:()=>{e()},children:/* @__PURE__ */ (0,o.jsx)(a.IconPanelLeftOutlineRegular,{size:16})})}),/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:r(`session.new.label`),shortcutKeys:s?.keys,delayMs:500,children:/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:l.iconButton,"aria-label":r(`session.new.label`),"aria-keyshortcuts":s?.aria,onClick:()=>{t()},children:/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineRegular,{size:16})})})]})}function d(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=d(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function f(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=d(e))&&(r&&(r+=` `),r+=t);return r}let p=`@deepseek-ai/dsh-client-ui-sidebar/SidebarRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(p)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-sidebar`,e.dataset.pluginCss=p,e.textContent=`.W2Gj0G_root{--ch-sidebar-text-primary:#1a1c1f;--ch-sidebar-text-muted:#1a1c1f7e;--dsw-font-family:-apple-system, "system-ui", "Segoe UI", sans-serif;--dsw-alias-label-primary:color-mix(in oklab, var(--ch-sidebar-text-primary) 85%, transparent);--dsw-alias-label-secondary:color-mix(in srgb, var(--ch-sidebar-text-primary) 65%, transparent);--dsw-alias-label-tertiary:var(--ch-sidebar-text-muted);--dsw-alias-label-caption:var(--ch-sidebar-text-muted);--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);font-family:var(--dsw-font-family);font-synthesis-weight:none;--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;font-weight:430;line-height:20px;display:flex}body[data-ds-dark-theme] .W2Gj0G_root{--ch-sidebar-text-primary:#fff;--ch-sidebar-text-muted:#ffffff7f}[data-platform=darwin] .W2Gj0G_root{background:0 0}.W2Gj0G_root.W2Gj0G_collapsed{padding:18px 10px 6px}[data-windows-titlebar] .W2Gj0G_root .W2Gj0G_logoRow{height:40px;margin:0;padding:0}[data-windows-titlebar] .W2Gj0G_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] .W2Gj0G_root.W2Gj0G_collapsed .W2Gj0G_logoRow{height:0}[data-windows-titlebar] .W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_brand{padding-left:4px}[data-windows-titlebar] .W2Gj0G_brandIdentity{transform:translateY(1px)}[data-windows-titlebar] .W2Gj0G_brandMark{transform:translate(1px)}[data-windows-titlebar] .W2Gj0G_brandName{font-weight:400}[data-windows-titlebar] .W2Gj0G_root.W2Gj0G_collapsed{padding:0}[data-windows-titlebar] .W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_newSession{margin-top:8px;margin-left:0}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_panelList,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_regionArea,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_footArea{display:none}html[data-windows-titlebar]:has([data-sidebar-collapsed=true]){--dsh-windows-menu-start:84px}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_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] .W2Gj0G_railIn .W2Gj0G_iconButton,[data-windows-titlebar] .W2Gj0G_railIn .W2Gj0G_newSession{animation:none}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_toggle,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_newSession{corner-shape:round;width:28px;height:28px;color:var(--dsw-alias-label-secondary);border-radius:50%}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_toggle .W2Gj0G_panelIcon{display:inline}.W2Gj0G_root.W2Gj0G_quietBars{--dsh-scrollbar-thumb:transparent;--dsh-scrollbar-thumb-hover:transparent}.W2Gj0G_fading>*{opacity:0;transition:opacity .15s var(--ds-ease-in-out)}.W2Gj0G_wide{animation:W2Gj0G_wide-in .2s var(--ds-ease-in-out)}@keyframes W2Gj0G_wide-in{0%{opacity:0}}.W2Gj0G_railIn .W2Gj0G_iconButton,.W2Gj0G_railIn .W2Gj0G_newSession,.W2Gj0G_railIn .W2Gj0G_panelList,.W2Gj0G_railIn .W2Gj0G_regionArea{animation:W2Gj0G_rail-in .15s var(--ds-ease-in-out) backwards}.W2Gj0G_railIn .W2Gj0G_footArea{animation:W2Gj0G_rail-fade-in .15s var(--ds-ease-in-out) backwards}@keyframes W2Gj0G_rail-in{0%{opacity:0;transform:translate(49px)}}@keyframes W2Gj0G_rail-fade-in{0%{opacity:0}}.W2Gj0G_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] .W2Gj0G_topStrip{justify-content:flex-start}.W2Gj0G_topStrip+.W2Gj0G_logoRow{margin-top:-12px}.W2Gj0G_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}.W2Gj0G_collapsed .W2Gj0G_logoRow{justify-content:flex-start;height:36px;margin-bottom:12px;padding:0;overflow:visible}.W2Gj0G_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] .W2Gj0G_brand{cursor:default}.W2Gj0G_brandIdentity{align-items:center;gap:8px;min-width:0;height:24px;display:inline-flex}.W2Gj0G_brandMark{flex:none;justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_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}.W2Gj0G_fallbackBrandName{letter-spacing:0;white-space:nowrap;font-size:17px}.W2Gj0G_localBuildBrand{white-space:nowrap;flex-direction:column;flex:none;justify-content:center;align-items:flex-start;gap:1px;height:24px;display:inline-flex}.W2Gj0G_localBuildTitle{letter-spacing:0;font-size:12px;line-height:13px}.W2Gj0G_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}.W2Gj0G_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_iconButton.W2Gj0G_toggle:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.W2Gj0G_collapsed .W2Gj0G_iconButton{border-radius:var(--dsw-radius-md);width:36px;height:36px}.W2Gj0G_collapsed .W2Gj0G_toggle .W2Gj0G_panelIcon{display:none}.W2Gj0G_collapsed .W2Gj0G_toggle:hover .W2Gj0G_panelIcon{display:inline}.W2Gj0G_collapsed .W2Gj0G_toggle:hover .W2Gj0G_railMark{display:none}.W2Gj0G_railMark{justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_collapsed .W2Gj0G_iconButton{color:var(--dsw-alias-label-primary)}.W2Gj0G_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}.W2Gj0G_newSession{box-sizing:border-box;border-radius:var(--dsw-radius-md);height:36px;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;gap:0;margin:0 0 2px;padding:6px 8px;font-family:inherit;font-size:14px;font-weight:430;line-height:21px;display:flex;position:relative;overflow:hidden;container-type:inline-size}.W2Gj0G_newSession:hover{background:var(--dsw-alias-interactive-bg-hover)}[data-platform=darwin] .W2Gj0G_newSession{background:#ffffff8c}[data-platform=darwin] .W2Gj0G_newSession:hover{background:#ffffff4d}[data-platform=darwin] [data-ds-dark-theme] .W2Gj0G_newSession{background:#ffffff26}[data-platform=darwin] [data-ds-dark-theme] .W2Gj0G_newSession:hover{background:#fff3}.W2Gj0G_collapsed .W2Gj0G_newSession{background:0 0;border-color:#0000;align-self:flex-start;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}.W2Gj0G_collapsed .W2Gj0G_newSession:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_newSessionLabel{white-space:nowrap;max-width:200px;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_newSessionLabel{max-width:0}.W2Gj0G_newSessionLabelMask{flex:1;min-width:0}.W2Gj0G_newSession:is(:hover,:focus-visible) .W2Gj0G_newSessionLabelMask:has(+.W2Gj0G_newSessionShortcut){overflow:hidden;mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000)}.W2Gj0G_newSessionContent{justify-content:flex-start;align-items:center;gap:8px;width:100cqw;display:flex}.W2Gj0G_newSessionContent>svg{flex:none}.W2Gj0G_collapsed .W2Gj0G_newSessionContent{justify-content:center}@media (hover:none),(pointer:coarse){.W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_newSession,.W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_panelRow{min-height:44px}}.W2Gj0G_newSessionShortcut{opacity:0;pointer-events:none;flex:none;font-weight:400;display:inline-flex}.W2Gj0G_newSession:is(:hover,:focus-visible) .W2Gj0G_newSessionShortcut{opacity:1}.W2Gj0G_panelList{flex-direction:column;flex:none;gap:4px;margin-bottom:16px;display:flex}.W2Gj0G_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;padding:7px 8px;line-height:22px;display:flex}.W2Gj0G_panelRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_panelRow.W2Gj0G_panelActive{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.W2Gj0G_panelRow:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.W2Gj0G_panelGlyph{flex:none;justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_panelTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_panelList{gap:12px;margin-bottom:12px}.W2Gj0G_collapsed .W2Gj0G_panelRow{width:36px;height:36px;color:var(--dsw-alias-label-primary);justify-content:center;margin:0;padding:0}.W2Gj0G_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}.W2Gj0G_collapsed .W2Gj0G_regionArea{margin-left:0;margin-right:0;padding-left:0}.W2Gj0G_footArea{flex-direction:column;flex:none;display:flex}.W2Gj0G_settingsArea,.W2Gj0G_footerActions{flex:none;width:100%;min-width:0}.W2Gj0G_footerActions{display:flex}.W2Gj0G_collapsed .W2Gj0G_footArea{align-items:center}.W2Gj0G_collapsed .W2Gj0G_settingsArea,.W2Gj0G_collapsed .W2Gj0G_footerActions{justify-content:center;width:auto;display:flex}@media (prefers-reduced-motion:reduce){.W2Gj0G_wide,.W2Gj0G_fading>*,.W2Gj0G_railIn .W2Gj0G_iconButton,.W2Gj0G_railIn .W2Gj0G_newSession,.W2Gj0G_railIn .W2Gj0G_panelList,.W2Gj0G_railIn .W2Gj0G_footArea,.W2Gj0G_railIn .W2Gj0G_regionArea{transition:none;animation:none}}`,document.head.appendChild(e)}var m={brand:`W2Gj0G_brand`,brandIdentity:`W2Gj0G_brandIdentity`,brandMark:`W2Gj0G_brandMark`,brandName:`W2Gj0G_brandName`,buildVersion:`W2Gj0G_buildVersion`,collapsed:`W2Gj0G_collapsed`,fading:`W2Gj0G_fading`,fallbackBrandName:`W2Gj0G_fallbackBrandName`,footArea:`W2Gj0G_footArea`,footerActions:`W2Gj0G_footerActions`,iconButton:`W2Gj0G_iconButton`,localBuildBrand:`W2Gj0G_localBuildBrand`,localBuildTitle:`W2Gj0G_localBuildTitle`,logoRow:`W2Gj0G_logoRow`,newSession:`W2Gj0G_newSession`,newSessionContent:`W2Gj0G_newSessionContent`,newSessionLabel:`W2Gj0G_newSessionLabel`,newSessionLabelMask:`W2Gj0G_newSessionLabelMask`,newSessionShortcut:`W2Gj0G_newSessionShortcut`,panelActive:`W2Gj0G_panelActive`,panelGlyph:`W2Gj0G_panelGlyph`,panelIcon:`W2Gj0G_panelIcon`,panelList:`W2Gj0G_panelList`,panelRow:`W2Gj0G_panelRow`,panelTitle:`W2Gj0G_panelTitle`,quietBars:`W2Gj0G_quietBars`,"rail-fade-in":`W2Gj0G_rail-fade-in`,"rail-in":`W2Gj0G_rail-in`,railIn:`W2Gj0G_railIn`,railMark:`W2Gj0G_railMark`,regionArea:`W2Gj0G_regionArea`,root:`W2Gj0G_root`,settingsArea:`W2Gj0G_settingsArea`,toggle:`W2Gj0G_toggle`,topStrip:`W2Gj0G_topStrip`,wide:`W2Gj0G_wide`,"wide-in":`W2Gj0G_wide-in`};function h(){let e={}.DSH_CLIENT_VERSION;if(e===void 0)return;let t={}.DSH_CLIENT_COMMIT_HASH;return e+(t===void 0?``:`-${t}`)+({}.DSH_CLIENT_GIT_DIRTY===`true`?`-dirty`:``)}function g({id:e,label:t,wide:n,usePanelInfo:r,selectPanel:i,renderSlot:s}){let c=r(t=>t.activePanelId===e);return/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:t,delayMs:500,disabled:n,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:f(m.panelRow,c&&m.panelActive),"aria-label":t,"aria-current":c?`page`:void 0,onClick:()=>{i(e)},children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.panelGlyph,"aria-hidden":`true`,children:s(`sidebar.panellist`,{size:n?16:18,active:c},{only:e})}),n&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.panelTitle,m.wide),children:t})]})})}function _({collapsed:e,width:t,startSession:n,toggleSidebar:r,selectPanel:i,usePanels:c,useShortcuts:l,usePanelInfo:u,t:d,renderSlot:p}){let _=c(e=>e),v=l(e=>e.find(e=>e.id===`sidebar.left.toggle`)),y=l(e=>e.find(e=>e.id===`session.new`)),b=d(e?`toggle.open`:`toggle.collapse`),[x,S]=(0,s.useState)(e);(0,s.useEffect)(()=>{if(!e){S(!1);return}let t=window.setTimeout(()=>{S(!0)},150);return()=>{window.clearTimeout(t)}},[e]);let C=document.documentElement.hasAttribute(`data-windows-titlebar`),w=C?!e:!e||!x,T=C?`bottom`:`right`,E=(0,s.useRef)(t);e||(E.current=t);let D=(0,s.useRef)(!e);e||(D.current=!0);let O=(0,s.useRef)(null),[k,A]=(0,s.useState)(!1),j=(0,s.useRef)(void 0),M=()=>{j.current===void 0&&(j.current=window.setTimeout(()=>{j.current=void 0,A(!1)},2e3))},N=()=>{window.clearTimeout(j.current),j.current=void 0};(0,s.useEffect)(()=>{if(!k)return;let e=e=>{let t=O.current?.getBoundingClientRect();
|
|
1
|
+
window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-sidebar`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/dsh-client-store"),i=e("@deepseek-ai/dsh-client-ui-slots"),a=e("@deepseek-ai/dsh-client-ui-primitives"),o=e("react/jsx-runtime"),s=e("react"),c=`@deepseek-ai/dsh-client-ui-sidebar/HeaderLeadingControls.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(c)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-sidebar`,e.dataset.pluginCss=c,e.textContent=`.fqofDG_controls{align-items:center;gap:8px;display:flex}.fqofDG_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}.fqofDG_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}`,document.head.appendChild(e)}var l={controls:`fqofDG_controls`,iconButton:`fqofDG_iconButton`};function u({toggleSidebar:e,startSession:t,useShortcuts:n,t:r}){let i=n(e=>e.find(e=>e.id===`sidebar.left.toggle`)),s=n(e=>e.find(e=>e.id===`session.new`));return/* @__PURE__ */ (0,o.jsxs)(`div`,{className:l.controls,children:[/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:r(`toggle.open`),shortcutKeys:i?.keys,delayMs:500,children:/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:l.iconButton,"aria-label":r(`toggle.open`),"aria-keyshortcuts":i?.aria,onClick:()=>{e()},children:/* @__PURE__ */ (0,o.jsx)(a.IconPanelLeftOutlineRegular,{size:16})})}),/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:r(`session.new.label`),shortcutKeys:s?.keys,delayMs:500,children:/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:l.iconButton,"aria-label":r(`session.new.label`),"aria-keyshortcuts":s?.aria,onClick:()=>{t()},children:/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineRegular,{size:16})})})]})}function d(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=d(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function f(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=d(e))&&(r&&(r+=` `),r+=t);return r}let p=`@deepseek-ai/dsh-client-ui-sidebar/SidebarRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(p)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-sidebar`,e.dataset.pluginCss=p,e.textContent=`.W2Gj0G_root{--ch-sidebar-text-primary:#1a1c1f;--ch-sidebar-text-muted:#1a1c1f7e;--dsw-font-family:-apple-system, "system-ui", "Segoe UI", sans-serif;--dsw-alias-label-primary:color-mix(in oklab, var(--ch-sidebar-text-primary) 85%, transparent);--dsw-alias-label-secondary:color-mix(in srgb, var(--ch-sidebar-text-primary) 65%, transparent);--dsw-alias-label-tertiary:var(--ch-sidebar-text-muted);--dsw-alias-label-caption:var(--ch-sidebar-text-muted);--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);font-family:var(--dsw-font-family);font-synthesis-weight:none;--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;font-weight:430;line-height:20px;display:flex}body[data-ds-dark-theme] .W2Gj0G_root{--ch-sidebar-text-primary:#fff;--ch-sidebar-text-muted:#ffffff7f}[data-platform=darwin] .W2Gj0G_root{background:0 0}[data-phone-drawer] .W2Gj0G_root{background:0 0;max-width:100%}.W2Gj0G_root.W2Gj0G_collapsed{padding:18px 10px 6px}[data-windows-titlebar] .W2Gj0G_root .W2Gj0G_logoRow{height:40px;margin:0;padding:0}[data-windows-titlebar] .W2Gj0G_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] .W2Gj0G_root.W2Gj0G_collapsed .W2Gj0G_logoRow{height:0}[data-windows-titlebar] .W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_brand{padding-left:4px}[data-windows-titlebar] .W2Gj0G_brandIdentity{transform:translateY(1px)}[data-windows-titlebar] .W2Gj0G_brandMark{transform:translate(1px)}[data-windows-titlebar] .W2Gj0G_brandName{font-weight:400}[data-windows-titlebar] .W2Gj0G_root.W2Gj0G_collapsed{padding:0}[data-windows-titlebar] .W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_newSession{margin-top:8px;margin-left:0}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_panelList,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_regionArea,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_footArea{display:none}html[data-windows-titlebar]:has([data-sidebar-collapsed=true]){--dsh-windows-menu-start:84px}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_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] .W2Gj0G_railIn .W2Gj0G_iconButton,[data-windows-titlebar] .W2Gj0G_railIn .W2Gj0G_newSession{animation:none}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_toggle,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_newSession{corner-shape:round;width:28px;height:28px;color:var(--dsw-alias-label-secondary);border-radius:50%}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_toggle .W2Gj0G_panelIcon{display:inline}.W2Gj0G_root.W2Gj0G_quietBars{--dsh-scrollbar-thumb:transparent;--dsh-scrollbar-thumb-hover:transparent}.W2Gj0G_fading>*{opacity:0;transition:opacity .15s var(--ds-ease-in-out)}.W2Gj0G_wide{animation:W2Gj0G_wide-in .2s var(--ds-ease-in-out)}@keyframes W2Gj0G_wide-in{0%{opacity:0}}.W2Gj0G_railIn .W2Gj0G_iconButton,.W2Gj0G_railIn .W2Gj0G_newSession,.W2Gj0G_railIn .W2Gj0G_panelList,.W2Gj0G_railIn .W2Gj0G_regionArea{animation:W2Gj0G_rail-in .15s var(--ds-ease-in-out) backwards}.W2Gj0G_railIn .W2Gj0G_footArea{animation:W2Gj0G_rail-fade-in .15s var(--ds-ease-in-out) backwards}@keyframes W2Gj0G_rail-in{0%{opacity:0;transform:translate(49px)}}@keyframes W2Gj0G_rail-fade-in{0%{opacity:0}}.W2Gj0G_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] .W2Gj0G_topStrip{justify-content:flex-start}.W2Gj0G_topStrip+.W2Gj0G_logoRow{margin-top:-12px}.W2Gj0G_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}.W2Gj0G_collapsed .W2Gj0G_logoRow{justify-content:flex-start;height:36px;margin-bottom:12px;padding:0;overflow:visible}.W2Gj0G_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] .W2Gj0G_brand{cursor:default}.W2Gj0G_brandIdentity{align-items:center;gap:8px;min-width:0;height:24px;display:inline-flex}.W2Gj0G_brandMark{flex:none;justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_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}.W2Gj0G_fallbackBrandName{letter-spacing:0;white-space:nowrap;font-size:17px}.W2Gj0G_localBuildBrand{white-space:nowrap;flex-direction:column;flex:none;justify-content:center;align-items:flex-start;gap:1px;height:24px;display:inline-flex}.W2Gj0G_localBuildTitle{letter-spacing:0;font-size:12px;line-height:13px}.W2Gj0G_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}.W2Gj0G_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_iconButton.W2Gj0G_toggle:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.W2Gj0G_collapsed .W2Gj0G_iconButton{border-radius:var(--dsw-radius-md);width:36px;height:36px}.W2Gj0G_collapsed .W2Gj0G_toggle .W2Gj0G_panelIcon{display:none}.W2Gj0G_collapsed .W2Gj0G_toggle:hover .W2Gj0G_panelIcon{display:inline}.W2Gj0G_collapsed .W2Gj0G_toggle:hover .W2Gj0G_railMark{display:none}.W2Gj0G_railMark{justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_collapsed .W2Gj0G_iconButton{color:var(--dsw-alias-label-primary)}.W2Gj0G_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}.W2Gj0G_newSession{box-sizing:border-box;border-radius:var(--dsw-radius-md);height:36px;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;gap:0;margin:0 0 2px;padding:6px 8px;font-family:inherit;font-size:14px;font-weight:430;line-height:21px;display:flex;position:relative;overflow:hidden;container-type:inline-size}.W2Gj0G_newSession:hover{background:var(--dsw-alias-interactive-bg-hover)}[data-platform=darwin] .W2Gj0G_newSession{background:#ffffff8c}[data-platform=darwin] .W2Gj0G_newSession:hover{background:#ffffff4d}[data-platform=darwin] [data-ds-dark-theme] .W2Gj0G_newSession{background:#ffffff26}[data-platform=darwin] [data-ds-dark-theme] .W2Gj0G_newSession:hover{background:#fff3}.W2Gj0G_collapsed .W2Gj0G_newSession{background:0 0;border-color:#0000;align-self:flex-start;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}.W2Gj0G_collapsed .W2Gj0G_newSession:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_newSessionLabel{white-space:nowrap;max-width:200px;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_newSessionLabel{max-width:0}.W2Gj0G_newSessionLabelMask{flex:1;min-width:0}.W2Gj0G_newSession:is(:hover,:focus-visible) .W2Gj0G_newSessionLabelMask:has(+.W2Gj0G_newSessionShortcut){overflow:hidden;mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000)}.W2Gj0G_newSessionContent{justify-content:flex-start;align-items:center;gap:8px;width:100cqw;display:flex}.W2Gj0G_newSessionContent>svg{flex:none}.W2Gj0G_collapsed .W2Gj0G_newSessionContent{justify-content:center}@media (hover:none),(pointer:coarse){.W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_newSession,.W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_panelRow{min-height:44px}}.W2Gj0G_newSessionShortcut{opacity:0;pointer-events:none;flex:none;font-weight:400;display:inline-flex}.W2Gj0G_newSession:is(:hover,:focus-visible) .W2Gj0G_newSessionShortcut{opacity:1}.W2Gj0G_panelList{flex-direction:column;flex:none;gap:4px;margin-bottom:16px;display:flex}.W2Gj0G_panelList:empty{display:none}.W2Gj0G_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;padding:7px 8px;line-height:22px;display:flex}.W2Gj0G_panelRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_panelRow.W2Gj0G_panelActive{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.W2Gj0G_panelRow:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.W2Gj0G_panelGlyph{flex:none;justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_panelTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_panelList{gap:12px;margin-bottom:12px}.W2Gj0G_collapsed .W2Gj0G_panelRow{width:36px;height:36px;color:var(--dsw-alias-label-primary);justify-content:center;margin:0;padding:0}.W2Gj0G_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}.W2Gj0G_collapsed .W2Gj0G_regionArea{margin-left:0;margin-right:0;padding-left:0}.W2Gj0G_footArea{flex-direction:column;flex:none;display:flex}.W2Gj0G_settingsArea,.W2Gj0G_footerActions{flex:none;width:100%;min-width:0}.W2Gj0G_footerActions{display:flex}.W2Gj0G_collapsed .W2Gj0G_footArea{align-items:center}.W2Gj0G_collapsed .W2Gj0G_settingsArea,.W2Gj0G_collapsed .W2Gj0G_footerActions{justify-content:center;width:auto;display:flex}@media (prefers-reduced-motion:reduce){.W2Gj0G_wide,.W2Gj0G_fading>*,.W2Gj0G_railIn .W2Gj0G_iconButton,.W2Gj0G_railIn .W2Gj0G_newSession,.W2Gj0G_railIn .W2Gj0G_panelList,.W2Gj0G_railIn .W2Gj0G_footArea,.W2Gj0G_railIn .W2Gj0G_regionArea{transition:none;animation:none}}`,document.head.appendChild(e)}var m={brand:`W2Gj0G_brand`,brandIdentity:`W2Gj0G_brandIdentity`,brandMark:`W2Gj0G_brandMark`,brandName:`W2Gj0G_brandName`,buildVersion:`W2Gj0G_buildVersion`,collapsed:`W2Gj0G_collapsed`,fading:`W2Gj0G_fading`,fallbackBrandName:`W2Gj0G_fallbackBrandName`,footArea:`W2Gj0G_footArea`,footerActions:`W2Gj0G_footerActions`,iconButton:`W2Gj0G_iconButton`,localBuildBrand:`W2Gj0G_localBuildBrand`,localBuildTitle:`W2Gj0G_localBuildTitle`,logoRow:`W2Gj0G_logoRow`,newSession:`W2Gj0G_newSession`,newSessionContent:`W2Gj0G_newSessionContent`,newSessionLabel:`W2Gj0G_newSessionLabel`,newSessionLabelMask:`W2Gj0G_newSessionLabelMask`,newSessionShortcut:`W2Gj0G_newSessionShortcut`,panelActive:`W2Gj0G_panelActive`,panelGlyph:`W2Gj0G_panelGlyph`,panelIcon:`W2Gj0G_panelIcon`,panelList:`W2Gj0G_panelList`,panelRow:`W2Gj0G_panelRow`,panelTitle:`W2Gj0G_panelTitle`,quietBars:`W2Gj0G_quietBars`,"rail-fade-in":`W2Gj0G_rail-fade-in`,"rail-in":`W2Gj0G_rail-in`,railIn:`W2Gj0G_railIn`,railMark:`W2Gj0G_railMark`,regionArea:`W2Gj0G_regionArea`,root:`W2Gj0G_root`,settingsArea:`W2Gj0G_settingsArea`,toggle:`W2Gj0G_toggle`,topStrip:`W2Gj0G_topStrip`,wide:`W2Gj0G_wide`,"wide-in":`W2Gj0G_wide-in`};function h(){let e={}.DSH_CLIENT_VERSION;if(e===void 0)return;let t={}.DSH_CLIENT_COMMIT_HASH;return e+(t===void 0?``:`-${t}`)+({}.DSH_CLIENT_GIT_DIRTY===`true`?`-dirty`:``)}function g({id:e,label:t,wide:n,usePanelInfo:r,selectPanel:i,renderSlot:s}){let c=r(t=>t.activePanelId===e);return/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:t,delayMs:500,disabled:n,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:f(m.panelRow,c&&m.panelActive),"aria-label":t,"aria-current":c?`page`:void 0,onClick:()=>{i(e)},children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.panelGlyph,"aria-hidden":`true`,children:s(`sidebar.panellist`,{size:n?16:18,active:c},{only:e})}),n&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.panelTitle,m.wide),children:t})]})})}function _({collapsed:e,width:t,startSession:n,toggleSidebar:r,selectPanel:i,usePanels:c,useShortcuts:l,usePanelInfo:u,t:d,renderSlot:p}){let _=c(e=>e),v=l(e=>e.find(e=>e.id===`sidebar.left.toggle`)),y=l(e=>e.find(e=>e.id===`session.new`)),b=d(e?`toggle.open`:`toggle.collapse`),[x,S]=(0,s.useState)(e);(0,s.useEffect)(()=>{if(!e){S(!1);return}let t=window.setTimeout(()=>{S(!0)},150);return()=>{window.clearTimeout(t)}},[e]);let C=document.documentElement.hasAttribute(`data-windows-titlebar`),w=C?!e:!e||!x,T=C?`bottom`:`right`,E=(0,s.useRef)(t);e||(E.current=t);let D=(0,s.useRef)(!e);e||(D.current=!0);let O=(0,s.useRef)(null),[k,A]=(0,s.useState)(!1),j=(0,s.useRef)(void 0),M=()=>{j.current===void 0&&(j.current=window.setTimeout(()=>{j.current=void 0,A(!1)},2e3))},N=()=>{window.clearTimeout(j.current),j.current=void 0};(0,s.useEffect)(()=>{if(!k)return;let e=e=>{let t=O.current?.getBoundingClientRect();
|
|
2
2
|
/* v8 ignore next -- the listener only exists while the column is mounted and revealed. */
|
|
3
|
-
t!==void 0&&(e.clientX>=t.left&&e.clientX<t.right&&e.clientY>=t.top&&e.clientY<t.bottom?N():M())};return document.addEventListener(`pointermove`,e),()=>{document.removeEventListener(`pointermove`,e),N()}},[k]);let P=h(),F=(0,a.isDarwinDesktop)(),I=/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:b,shortcutKeys:v?.keys,delayMs:500,side:T,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:f(m.iconButton,m.toggle),"aria-label":b,"aria-keyshortcuts":v?.aria,onClick:()=>{r()},children:[!w&&!C&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.railMark,"aria-hidden":`true`,children:p(`sidebar.brand.mark`,{size:24},{fallback:/* @__PURE__ */ (0,o.jsx)(a.FishLogo,{size:24})})}),/* @__PURE__ */ (0,o.jsx)(a.IconPanelLeftOutlineRegular,{className:m.panelIcon,size:w||C?16:18}),!w&&p(`sidebar.toggle.badge`,{})]})});return/* @__PURE__ */ (0,o.jsxs)(`div`,{ref:O,className:f(m.root,!w&&m.collapsed,!w&&D.current&&m.railIn,e&&w&&m.fading,!k&&m.quietBars),style:w?{width:e?E.current:t}:void 0,onPointerEnter:()=>{N(),A(!0)},onPointerLeave:()=>{M()},children:[F&&/* @__PURE__ */ (0,o.jsx)(`div`,{className:m.topStrip,"data-window-drag":!0,children:I}),/* @__PURE__ */ (0,o.jsxs)(`div`,{className:m.logoRow,"data-window-drag":!0,children:[w&&(()=>{let e=/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.brandIdentity,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.brandMark,children:p(`sidebar.brand.mark`,{size:24},{fallback:/* @__PURE__ */ (0,o.jsx)(a.FishLogo,{size:24})})}),/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.brandName,children:p(`sidebar.brand.name`,{},{fallback:P===void 0?/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.fallbackBrandName,children:d(`brand.localBuild`)}):/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.localBuildBrand,children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.localBuildTitle,children:d(`brand.localBuild`)}),/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.buildVersion,children:P})]})})})]});return F?/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.brand,m.wide),children:e}):/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:f(m.brand,m.wide),"aria-label":d(`session.new.label`),"aria-keyshortcuts":y?.aria,onClick:()=>{n()},children:e})})(),!F&&I]}),/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:d(`session.new.label`),shortcutKeys:y?.keys,delayMs:500,side:T,disabled:w,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:m.newSession,"aria-label":d(`session.new.label`),"aria-keyshortcuts":y?.aria,onClick:()=>{n()},children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.newSessionLabelMask,children:/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.newSessionContent,children:[w?/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineMedium,{size:18}):/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineRegular,{size:C?16:18}),w&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.newSessionLabel,m.wide),children:d(`session.new`)})]})}),w&&y!==void 0&&y.keys.length>0&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.newSessionShortcut,"aria-hidden":`true`,children:/* @__PURE__ */ (0,o.jsx)(a.ShortcutKeys,{keys:y.keys})})]})})
|
|
3
|
+
t!==void 0&&(e.clientX>=t.left&&e.clientX<t.right&&e.clientY>=t.top&&e.clientY<t.bottom?N():M())};return document.addEventListener(`pointermove`,e),()=>{document.removeEventListener(`pointermove`,e),N()}},[k]);let P=h(),F=(0,a.isDarwinDesktop)(),I=/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:b,shortcutKeys:v?.keys,delayMs:500,side:T,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:f(m.iconButton,m.toggle),"aria-label":b,"aria-keyshortcuts":v?.aria,onClick:()=>{r()},children:[!w&&!C&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.railMark,"aria-hidden":`true`,children:p(`sidebar.brand.mark`,{size:24},{fallback:/* @__PURE__ */ (0,o.jsx)(a.FishLogo,{size:24})})}),/* @__PURE__ */ (0,o.jsx)(a.IconPanelLeftOutlineRegular,{className:m.panelIcon,size:w||C?16:18}),!w&&p(`sidebar.toggle.badge`,{})]})});return/* @__PURE__ */ (0,o.jsxs)(`div`,{ref:O,className:f(m.root,!w&&m.collapsed,!w&&D.current&&m.railIn,e&&w&&m.fading,!k&&m.quietBars),style:w?{width:e?E.current:t}:void 0,onPointerEnter:()=>{N(),A(!0)},onPointerLeave:()=>{M()},children:[F&&/* @__PURE__ */ (0,o.jsx)(`div`,{className:m.topStrip,"data-window-drag":!0,children:I}),/* @__PURE__ */ (0,o.jsxs)(`div`,{className:m.logoRow,"data-window-drag":!0,children:[w&&(()=>{let e=/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.brandIdentity,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.brandMark,children:p(`sidebar.brand.mark`,{size:24},{fallback:/* @__PURE__ */ (0,o.jsx)(a.FishLogo,{size:24})})}),/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.brandName,children:p(`sidebar.brand.name`,{},{fallback:P===void 0?/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.fallbackBrandName,children:d(`brand.localBuild`)}):/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.localBuildBrand,children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.localBuildTitle,children:d(`brand.localBuild`)}),/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.buildVersion,children:P})]})})})]});return F?/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.brand,m.wide),children:e}):/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:f(m.brand,m.wide),"aria-label":d(`session.new.label`),"aria-keyshortcuts":y?.aria,onClick:()=>{n()},children:e})})(),!F&&I]}),/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:d(`session.new.label`),shortcutKeys:y?.keys,delayMs:500,side:T,disabled:w,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:m.newSession,"aria-label":d(`session.new.label`),"aria-keyshortcuts":y?.aria,onClick:()=>{n()},children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.newSessionLabelMask,children:/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.newSessionContent,children:[w?/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineMedium,{size:18}):/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineRegular,{size:C?16:18}),w&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.newSessionLabel,m.wide),children:d(`session.new`)})]})}),w&&y!==void 0&&y.keys.length>0&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.newSessionShortcut,"aria-hidden":`true`,children:/* @__PURE__ */ (0,o.jsx)(a.ShortcutKeys,{keys:y.keys})})]})}),/* @__PURE__ */ (0,o.jsxs)(`nav`,{className:m.panelList,"aria-label":d(`panels.label`),children:[_.map(({id:e,label:t})=>/* @__PURE__ */ (0,o.jsx)(g,{id:e,label:t,wide:w,usePanelInfo:u,selectPanel:i,renderSlot:p},e)),p(`sidebar.primary.action`,{size:w?16:18,renderAction:({label:e,icon:t,onClick:n})=>/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:e,delayMs:500,disabled:w,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:m.panelRow,"aria-label":e,onClick:n,children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.panelGlyph,"aria-hidden":`true`,children:t}),w&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.panelTitle,m.wide),children:e})]})})})]}),/* @__PURE__ */ (0,o.jsx)(`div`,{className:m.regionArea,children:p(`sidebar.workspaces`,{wide:w,expandSidebar:()=>{e&&r()}})}),/* @__PURE__ */ (0,o.jsxs)(`div`,{className:m.footArea,children:[/* @__PURE__ */ (0,o.jsx)(`div`,{className:m.footerActions,children:p(`sidebar.footer.action`,{wide:w})}),/* @__PURE__ */ (0,o.jsx)(`div`,{className:m.settingsArea,children:p(`sidebar.settings`,{wide:w})})]})]})}let v={"session.new":`新会话`,"session.new.label":`新建会话`,"toggle.open":`打开侧边栏`,"toggle.collapse":`收起侧边栏`,"panels.label":`全局面板`},y={"session.new":`New Session`,"session.new.label":`New session`,"toggle.open":`Open sidebar`,"toggle.collapse":`Collapse sidebar`,"panels.label":`Global panels`},b=`sidebar`,x=[`slots`,`layout`,`uiWorkspace`,`locale`,`shortcuts`];function S(e){let t=e.get(`uiWorkspace`);e.effect(()=>e.locale.register(b,{zh:v,en:y}),`ui-sidebar: dictionaries`);let n=(0,r.createSnapshotStore)([]),a=()=>{let t=e.slots.entriesOfSlot(`sidebar.panellist`).map(({options:e})=>{let t=e.id;return{id:t,order:e.order??0,label:(0,i.resolveSlotLabel)(e.label)??t}}).sort((e,t)=>e.order-t.order),r=n.getSnapshot();r.length===t.length&&r.every((e,n)=>{let r=t[n];return e.id===r.id&&e.order===r.order&&e.label===r.label})||n.set(t)};e.effect(()=>e.slots.subscribe(`sidebar.panellist`,a),`ui-sidebar: panel entries`),e.effect(()=>e.locale.subscribe(a),`ui-sidebar: panel labels`);let o=()=>({startSession:e=>{t.startSession(e)},toggleSidebar:()=>{e.layout.toggleSidebar()},selectPanel:t=>{(t===`plugins`||t===`schedules`)&&e.get(`productAnalytics`)?.track(`sidebar_menu_click`,{menu_name:t===`plugins`?`plugin`:`cron`}),e.layout.selectPanel(t)},hooks:{panels:n,shortcuts:e.shortcuts.catalog}});e.slots.inject(`sidebar`,()=>e.slots.register({name:`sidebar`,locale:b,children:{"sidebar.brand.mark":{kind:`single`,scope:`root`},"sidebar.brand.name":{kind:`single`,scope:`root`},"sidebar.toggle.badge":{kind:`single`,scope:`root`},"sidebar.panellist":{kind:`list`,scope:`root`},"sidebar.primary.action":{kind:`list`,scope:`root`},"sidebar.workspaces":{kind:`single`,scope:`root`},"sidebar.settings":{kind:`single`,scope:`root`},"sidebar.footer.action":{kind:`list`,scope:`root`}},inject:o},_)),e.slots.inject(`shell.leading`,()=>e.slots.register({name:`shell.leading`,locale:b,inject:o},u)),a()}return n.apply=S,n.inject=x,t.exports}});
|