@jingyi0605/codingns 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/public/assets/{AdaptiveButlerPage-SffCV4Vb.js → AdaptiveButlerPage-uFwDdN-F.js} +3 -3
- package/dist/public/assets/App-BZvapsi8.js +30 -0
- package/dist/public/assets/App-CcDXqFl1.css +1 -0
- package/dist/public/assets/{BootstrapPage--zExdgfM.js → BootstrapPage-gHSoa4JN.js} +1 -1
- package/dist/public/assets/ConversationPage-z3sXtKZ7.js +4 -0
- package/dist/public/assets/{DesktopDetachPreviewPage-DvI9CIKi.js → DesktopDetachPreviewPage-4eMRxiBW.js} +1 -1
- package/dist/public/assets/DesktopWindowPage-CZcoGApB.js +2 -0
- package/dist/public/assets/FileContextPanel-C3qex8bb.js +1 -0
- package/dist/public/assets/GitSidebar-BK6H16XU.js +6 -0
- package/dist/public/assets/{MobileCreateSessionSheet-CXSKMnYn.js → MobileCreateSessionSheet-BYfbvK8o.js} +1 -1
- package/dist/public/assets/MobileSheet-Ckug8hTb.js +1 -0
- package/dist/public/assets/{MobileTopHeaderFrame-BWorAJ1C.js → MobileTopHeaderFrame-Bwv8Ovm_.js} +1 -1
- package/dist/public/assets/MobileWorkspaceSwitcherHeader-RqWrBdn2.js +1 -0
- package/dist/public/assets/RelayConnectEntryPage-D_4YL-YH.js +1 -0
- package/dist/public/assets/ServerSettingsModal-CMSm3BZU.js +1 -0
- package/dist/public/assets/SessionIndexPage-DuK10DL5.js +1 -0
- package/dist/public/assets/SettingsPage-fyD-xaHL.js +1 -0
- package/dist/public/assets/TerminalManagerPanel-CCLr1Ypk.js +1 -0
- package/dist/public/assets/{TerminalPage-CvnHXBhw.js → TerminalPage-DaooFaJ4.js} +19 -19
- package/dist/public/assets/{TerminalRuntimeFallbackModal-D7Aq186N.js → TerminalRuntimeFallbackModal-aUzjEBwP.js} +1 -1
- package/dist/public/assets/ToolFilesPage-CGxBvYG0.js +1 -0
- package/dist/public/assets/ToolGitPage-C264yjS9.js +1 -0
- package/dist/public/assets/ToolProcessesPage-BOP4A1cb.js +1 -0
- package/dist/public/assets/ToolsHomePage-CQxGiKQA.js +1 -0
- package/dist/public/assets/WorkbenchLandingPage-CvAY68ca.js +1 -0
- package/dist/public/assets/WorkbenchLayout-DGm8Tc5M.js +3 -0
- package/dist/public/assets/{WorkbenchModal-B09hC9b5.js → WorkbenchModal-0tPIIhca.js} +1 -1
- package/dist/public/assets/{WorkbenchShellRoute-DsW4mBTX.css → WorkbenchShellRoute-BF0nHWOk.css} +1 -1
- package/dist/public/assets/WorkbenchShellRoute-DBBOsJo9.js +1 -0
- package/dist/public/assets/WorkspaceDebugDetailPage-CDerFYd2.js +1 -0
- package/dist/public/assets/WorkspaceDetailPage-BlJc1CHE.js +1 -0
- package/dist/public/assets/WorkspaceHomePage-BUsKJ3lv.js +1 -0
- package/dist/public/assets/client-runtime-manager-BZpL17fc.js +1 -0
- package/dist/public/assets/{default-session-permission-mode-D0wZ9Jek.js → default-session-permission-mode-DT4SGiwp.js} +1 -1
- package/dist/public/assets/file-tree-icon-Db5LXC8h.js +31 -0
- package/dist/public/assets/index-BZLcEHW3.js +42 -0
- package/dist/public/assets/index-BbspQPC2.css +1 -0
- package/dist/public/assets/login-direct-candidate-resolver-1mxe_Oh8.js +1 -0
- package/dist/public/assets/{preferences-service-gOt2ZjKZ.js → preferences-service-DWnzl5a0.js} +1 -1
- package/dist/public/assets/relay-entry-C5_Iay0I.js +1 -0
- package/dist/public/assets/session-runtime-machine-DdLeDqQr.js +17 -0
- package/dist/public/assets/{styles-BWPBZvze.css → styles-CsEMfdaS.css} +1 -1
- package/dist/public/assets/{terminal-runtime-meta-BMT-rSEe.js → terminal-runtime-meta-cdtWVfCm.js} +1 -1
- package/dist/public/assets/{useRegisteredDebugTemplates-zMcEOGca.js → useRegisteredDebugTemplates-oFAQNIqh.js} +1 -1
- package/dist/public/assets/window-BVUB8gMK.js +1 -0
- package/dist/public/index.html +2 -2
- package/dist/server/config/env.d.ts +2 -0
- package/dist/server/config/env.js +39 -0
- package/dist/server/config/env.js.map +1 -1
- package/dist/server/modules/client/npm-global-package-service.d.ts +7 -1
- package/dist/server/modules/client/npm-global-package-service.js +149 -43
- package/dist/server/modules/client/npm-global-package-service.js.map +1 -1
- package/dist/server/modules/client/service-update-task-service.js +6 -2
- package/dist/server/modules/client/service-update-task-service.js.map +1 -1
- package/dist/server/modules/client/service-update-types.d.ts +2 -0
- package/dist/server/modules/git/git-controller.d.ts +3 -0
- package/dist/server/modules/git/git-controller.js +3 -0
- package/dist/server/modules/git/git-controller.js.map +1 -1
- package/dist/server/modules/git/git-read-service.js +47 -1
- package/dist/server/modules/git/git-read-service.js.map +1 -1
- package/dist/server/modules/git/git-write-service.d.ts +4 -0
- package/dist/server/modules/git/git-write-service.js +24 -0
- package/dist/server/modules/git/git-write-service.js.map +1 -1
- package/dist/server/modules/git/types.d.ts +1 -0
- package/dist/server/modules/git/workspace-repo-guard.d.ts +2 -0
- package/dist/server/modules/git/workspace-repo-guard.js +24 -10
- package/dist/server/modules/git/workspace-repo-guard.js.map +1 -1
- package/dist/server/modules/parallel-sessions/parallel-session-controller.d.ts +53 -0
- package/dist/server/modules/parallel-sessions/parallel-session-controller.js +70 -0
- package/dist/server/modules/parallel-sessions/parallel-session-controller.js.map +1 -0
- package/dist/server/modules/parallel-sessions/parallel-session-group-service.d.ts +83 -0
- package/dist/server/modules/parallel-sessions/parallel-session-group-service.js +591 -0
- package/dist/server/modules/parallel-sessions/parallel-session-group-service.js.map +1 -0
- package/dist/server/modules/parallel-sessions/session-isolated-workspace-service.d.ts +56 -0
- package/dist/server/modules/parallel-sessions/session-isolated-workspace-service.js +483 -0
- package/dist/server/modules/parallel-sessions/session-isolated-workspace-service.js.map +1 -0
- package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-packets.d.ts +16 -1
- package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-packets.js.map +1 -1
- package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-protocol.d.ts +2 -1
- package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-protocol.js +18 -0
- package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-protocol.js.map +1 -1
- package/dist/server/modules/relay-tunnel/relay-tunnel-candidate-endpoints.d.ts +2 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-candidate-endpoints.js +129 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-candidate-endpoints.js.map +1 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-client-context.d.ts +13 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-client-context.js +2 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-client-context.js.map +1 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-gateway-service.d.ts +6 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-gateway-service.js +110 -10
- package/dist/server/modules/relay-tunnel/relay-tunnel-gateway-service.js.map +1 -1
- package/dist/server/modules/relay-tunnel/relay-tunnel-runtime-adapter.d.ts +16 -4
- package/dist/server/modules/relay-tunnel/relay-tunnel-runtime-adapter.js +220 -102
- package/dist/server/modules/relay-tunnel/relay-tunnel-runtime-adapter.js.map +1 -1
- package/dist/server/modules/relay-tunnel/relay-tunnel-service.d.ts +4 -1
- package/dist/server/modules/relay-tunnel/relay-tunnel-service.js +257 -162
- package/dist/server/modules/relay-tunnel/relay-tunnel-service.js.map +1 -1
- package/dist/server/modules/sessions/codex-app-server-helper-client.d.ts +3 -0
- package/dist/server/modules/sessions/codex-app-server-helper-client.js +56 -45
- package/dist/server/modules/sessions/codex-app-server-helper-client.js.map +1 -1
- package/dist/server/modules/sessions/codex-app-server-helper-process.js +21 -2
- package/dist/server/modules/sessions/codex-app-server-helper-process.js.map +1 -1
- package/dist/server/modules/sessions/session-activity-inspector.js +6 -8
- package/dist/server/modules/sessions/session-activity-inspector.js.map +1 -1
- package/dist/server/modules/sessions/session-history-service.d.ts +11 -1
- package/dist/server/modules/sessions/session-history-service.js +204 -21
- package/dist/server/modules/sessions/session-history-service.js.map +1 -1
- package/dist/server/modules/sessions/session-live-runtime-service.d.ts +8 -0
- package/dist/server/modules/sessions/session-live-runtime-service.js +208 -25
- package/dist/server/modules/sessions/session-live-runtime-service.js.map +1 -1
- package/dist/server/modules/workbench/codex-archive-watcher.d.ts +16 -0
- package/dist/server/modules/workbench/codex-archive-watcher.js +50 -0
- package/dist/server/modules/workbench/codex-archive-watcher.js.map +1 -0
- package/dist/server/modules/workbench/workbench-service.d.ts +43 -4
- package/dist/server/modules/workbench/workbench-service.js +72 -9
- package/dist/server/modules/workbench/workbench-service.js.map +1 -1
- package/dist/server/modules/workbench/workspace-panel-snapshot-service.d.ts +1 -1
- package/dist/server/modules/workbench/workspace-panel-snapshot-service.js +26 -3
- package/dist/server/modules/workbench/workspace-panel-snapshot-service.js.map +1 -1
- package/dist/server/modules/workspace/workspace-service.d.ts +3 -1
- package/dist/server/modules/workspace/workspace-service.js +10 -2
- package/dist/server/modules/workspace/workspace-service.js.map +1 -1
- package/dist/server/modules/worktree/worktree-base-ref-resolver.d.ts +20 -0
- package/dist/server/modules/worktree/worktree-base-ref-resolver.js +111 -0
- package/dist/server/modules/worktree/worktree-base-ref-resolver.js.map +1 -0
- package/dist/server/modules/worktree/worktree-cleanup-service.js +9 -3
- package/dist/server/modules/worktree/worktree-cleanup-service.js.map +1 -1
- package/dist/server/modules/worktree/worktree-manager.d.ts +0 -1
- package/dist/server/modules/worktree/worktree-manager.js +14 -20
- package/dist/server/modules/worktree/worktree-manager.js.map +1 -1
- package/dist/server/routes/git.js +1 -0
- package/dist/server/routes/git.js.map +1 -1
- package/dist/server/routes/parallel-groups.d.ts +3 -0
- package/dist/server/routes/parallel-groups.js +9 -0
- package/dist/server/routes/parallel-groups.js.map +1 -0
- package/dist/server/server/create-server.d.ts +8 -0
- package/dist/server/server/create-server.js +48 -9
- package/dist/server/server/create-server.js.map +1 -1
- package/dist/server/server/workbench-runtime-terminal-sync.d.ts +14 -0
- package/dist/server/server/workbench-runtime-terminal-sync.js +17 -0
- package/dist/server/server/workbench-runtime-terminal-sync.js.map +1 -0
- package/dist/server/storage/repositories/parallel-session-group-repository.d.ts +11 -0
- package/dist/server/storage/repositories/parallel-session-group-repository.js +131 -0
- package/dist/server/storage/repositories/parallel-session-group-repository.js.map +1 -0
- package/dist/server/storage/repositories/parallel-session-member-repository.d.ts +12 -0
- package/dist/server/storage/repositories/parallel-session-member-repository.js +150 -0
- package/dist/server/storage/repositories/parallel-session-member-repository.js.map +1 -0
- package/dist/server/storage/repositories/session-isolated-workspace-repository.d.ts +15 -0
- package/dist/server/storage/repositories/session-isolated-workspace-repository.js +230 -0
- package/dist/server/storage/repositories/session-isolated-workspace-repository.js.map +1 -0
- package/dist/server/storage/sqlite/schema.sql +73 -0
- package/dist/server/types/domain.d.ts +72 -0
- package/dist/server/ws/workbench-ws-hub.d.ts +3 -1
- package/dist/server/ws/workbench-ws-hub.js +189 -20
- package/dist/server/ws/workbench-ws-hub.js.map +1 -1
- package/dist/server/ws/ws-server.js +141 -8
- package/dist/server/ws/ws-server.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/codex.d.ts +1 -0
- package/node_modules/@codingns/session-sync-core/dist/providers/codex.js +67 -6
- package/node_modules/@codingns/session-sync-core/dist/providers/codex.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.d.ts +3 -0
- package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.js +46 -22
- package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js +558 -309
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/opencode-runtime.js +29 -5
- package/node_modules/@codingns/session-sync-core/dist/runtime/opencode-runtime.js.map +1 -1
- package/package.json +1 -1
- package/dist/public/assets/App-DUAg5urj.css +0 -1
- package/dist/public/assets/App-WOLwMld_.js +0 -30
- package/dist/public/assets/ConversationPage-D9pzRmOg.js +0 -2
- package/dist/public/assets/DesktopWindowPage-D8FpOSLE.js +0 -2
- package/dist/public/assets/FileContextPanel-C8T7oqRN.js +0 -1
- package/dist/public/assets/GitSidebar-Bze7DNnc.js +0 -6
- package/dist/public/assets/MobileSheet-Gzc14EpR.js +0 -1
- package/dist/public/assets/MobileWorkspaceSwitcherHeader-DOr4pTUq.js +0 -1
- package/dist/public/assets/ServerSettingsModal-BYB0GvTl.js +0 -1
- package/dist/public/assets/SessionIndexPage-CR3IARXX.js +0 -1
- package/dist/public/assets/SettingsPage-B_BQtnwE.js +0 -1
- package/dist/public/assets/TerminalManagerPanel-PQ-EM64j.js +0 -1
- package/dist/public/assets/ToolFilesPage-Qzkc6K2I.js +0 -1
- package/dist/public/assets/ToolGitPage-BdNDN-cV.js +0 -1
- package/dist/public/assets/ToolProcessesPage-EXJ9DHWI.js +0 -1
- package/dist/public/assets/ToolsHomePage-CjF3CWzR.js +0 -1
- package/dist/public/assets/WorkbenchLandingPage-DZPk4SmX.js +0 -1
- package/dist/public/assets/WorkbenchLayout-rwQib5In.js +0 -3
- package/dist/public/assets/WorkbenchShellRoute-Cerk5uK7.js +0 -1
- package/dist/public/assets/WorkspaceDebugDetailPage-Bcq8s-Ma.js +0 -1
- package/dist/public/assets/WorkspaceDetailPage-DNAa8pKr.js +0 -1
- package/dist/public/assets/WorkspaceHomePage-BoiLuACV.js +0 -1
- package/dist/public/assets/client-runtime-manager-CRQ-F5d2.js +0 -1
- package/dist/public/assets/file-tree-icon-Dp_xhVfD.js +0 -31
- package/dist/public/assets/index-C2G8Gmf1.js +0 -42
- package/dist/public/assets/index-CpPTUeA3.css +0 -1
- package/dist/public/assets/session-runtime-machine-Dq3pW-UF.js +0 -17
- package/dist/public/assets/window-BWqRixxq.js +0 -1
- /package/dist/public/assets/{styles-CSUx5LGe.js → styles-DRVvx_kv.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./index-C2G8Gmf1.js";import{a as e}from"./WorkbenchLayout-rwQib5In.js";import{d as m,r as s}from"./App-WOLwMld_.js";import"./MobileSheet-Gzc14EpR.js";import"./window-BWqRixxq.js";import"./event-DvH9tcej.js";import"./WorkbenchModal-B09hC9b5.js";function h(){const o=m(),r=s(o);return t.jsx(e,{shellMode:r})}export{h as WorkbenchShellRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as c,j as e,t as s}from"./index-C2G8Gmf1.js";import{j as G,u as $,b as R,f as z,k as H,r as _,a as L,D as J,h as T,d as y,e as A,l as K,m as Q,c as U,g as X,i as Y}from"./useRegisteredDebugTemplates-zMcEOGca.js";import{u as Z,q as ee,p as se}from"./WorkbenchLayout-rwQib5In.js";import{c as C}from"./MobileSheet-Gzc14EpR.js";import{g as I,r as ae}from"./terminal-runtime-meta-BMT-rSEe.js";import{c as le,u as te,e as ne}from"./App-WOLwMld_.js";import"./window-BWqRixxq.js";import"./event-DvH9tcej.js";import"./WorkbenchModal-B09hC9b5.js";function pe(){var S;const{workspaceId:u=""}=le(),j=te(),{showToast:d}=ne(),{navigationGroups:E,selectWorkspace:f}=Z(),r=((S=E.find(a=>a.workspace.id===u))==null?void 0:S.workspace)??null,[h,m]=c.useState(null),[N,o]=c.useState(null),[n,k]=c.useState(null),w=c.useRef(null);c.useEffect(()=>{u&&f(u)},[f,u]);const P=c.useMemo(()=>r?{id:r.id,path:r.path,name:r.name}:null,[r]),l=G(P),b=$(P),g=c.useMemo(()=>n??R(l.templates,l.runtimeStatuses),[n,l.runtimeStatuses,l.templates]),M=c.useMemo(()=>(n==null?void 0:n.items.some(a=>{var t;return(t=a.planItem)==null?void 0:t.missingRequirements.includes("service_discovery")}))??!1,[n]),O=c.useMemo(()=>new Map(l.runtimeStatuses.map(a=>[a.templateId,a])),[l.runtimeStatuses]);if(c.useEffect(()=>{!n||!w.current||typeof w.current.scrollIntoView=="function"&&w.current.scrollIntoView({behavior:"smooth",block:"start"})},[n]),!r)return e.jsx("main",{className:"workbench-page conversation-page-shell debug-readiness-page-shell",children:e.jsxs("div",{className:"workbench-empty-guide surface-card",children:[e.jsx("h1",{children:s("shell.workspaceDetailMissingTitle")}),e.jsx("p",{children:s("shell.workspaceDetailMissingBody")})]})});return e.jsx("main",{className:"workbench-page conversation-page-shell debug-readiness-page-shell",children:e.jsxs("div",{className:"debug-readiness-page",children:[e.jsxs("section",{className:"debug-readiness-hero surface-card",children:[e.jsx("div",{className:"debug-readiness-hero-header",children:e.jsxs("div",{className:"debug-readiness-hero-copy",children:[e.jsx("h2",{children:s("shell.workspaceDetailDebugPageTitle")}),e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugPageDescription")})]})}),e.jsxs("div",{className:"debug-readiness-hero-toolbar",children:[e.jsxs("div",{className:"workbench-modal-actions",children:[e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>j(ee(r.id)),children:s("shell.goBack")}),e.jsx("button",{type:"button",className:"secondary-button",disabled:h!==null,onClick:()=>{B()},children:h==="sync"?s("shell.workspaceDetailRegisteredDebugActionSyncingTemplates"):s("shell.workspaceDetailRegisteredDebugActionSyncTemplates")}),e.jsx("button",{type:"button",className:"secondary-button",disabled:h!==null,onClick:()=>{F()},children:h==="plan"?s("shell.workspaceDetailDebugActionPlanning"):s("shell.workspaceDetailDebugActionPlan")}),e.jsx("button",{type:"button",className:"primary-button",disabled:h!==null,onClick:()=>{W()},children:h==="run"?s("shell.workspaceDetailRegisteredDebugActionRunningRegistered"):s("shell.workspaceDetailRegisteredDebugActionRunRegistered")}),e.jsx("button",{type:"button",className:"secondary-button",disabled:h!==null,onClick:()=>{V()},children:h==="refresh"?s("shell.workspaceDetailDebugActionRefreshing"):s("shell.workspaceDetailDebugActionRefresh")})]}),N?e.jsx("p",{className:"workbench-manage-status status-text","data-tone":"error",children:N}):null]}),e.jsxs("div",{className:"debug-readiness-summary-grid debug-readiness-summary-grid-hero",children:[e.jsxs("article",{className:"debug-readiness-summary-card","data-tone":_(g,l.templates.length),children:[e.jsx("span",{children:s("shell.workspaceDetailDebugOverallStatusLabel")}),e.jsx("strong",{children:z(g,l.templates.length)}),e.jsx("small",{children:H(g,l.templates.length)})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRegisteredCountLabel")}),e.jsx("strong",{children:l.templates.length})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryConfiguredPortLabel")}),e.jsx("strong",{children:l.templates.filter(a=>a.port!==null).length}),e.jsx("small",{children:s("shell.workspaceDetailRegisteredDebugRuntimeScopeNote")})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRunnableCountLabel")}),e.jsx("strong",{children:g.runnableCount})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryOrchestratedCountLabel")}),e.jsx("strong",{children:g.orchestratedCount})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryBlockedCountLabel")}),e.jsx("strong",{children:g.blockedCount})]}),e.jsxs("article",{className:"debug-readiness-summary-card",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryLastRefreshLabel")}),e.jsx("strong",{children:L(l.lastRefreshedAt)}),e.jsx("small",{children:r.path})]})]})]}),e.jsx(J,{workspace:{id:r.id,path:r.path,name:r.name},state:b,variant:"page"}),n?e.jsxs("section",{ref:w,className:"debug-readiness-section surface-card",children:[e.jsxs("div",{className:"debug-readiness-section-header",children:[e.jsxs("div",{children:[e.jsx("h3",{children:s("shell.workspaceDetailDebugLaunchPlanTitle")}),e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanDescription")})]}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>k(null),children:s("shell.workspaceDetailDebugLaunchPlanDismissAction")})]}),e.jsxs("div",{className:"workbench-manage-kv-list",children:[e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanGeneratedAtLabel")}),e.jsx("span",{children:L(n.generatedAt)})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailDebugLaunchPlanAutoStartLabel")}),e.jsx("span",{children:n.autoStartAllowed?s("shell.workspaceDetailDebugLaunchPlanAutoStartAllowed"):s("shell.workspaceDetailDebugLaunchPlanAutoStartBlocked")})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanRunnableLabel")}),e.jsx("span",{children:n.runnableCount})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanOrchestratedLabel")}),e.jsx("span",{children:n.orchestratedCount})]}),e.jsxs("div",{className:"workbench-manage-kv-item",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugLaunchPlanBlockedLabel")}),e.jsx("span",{children:n.blockedCount})]})]}),e.jsx("p",{className:"workbench-manage-hint",children:s("shell.workspaceDetailRegisteredDebugLaunchPlanNote")}),M?e.jsx("p",{className:"workbench-manage-hint",children:s("shell.workspaceDetailRegisteredDebugLaunchPlanServiceDiscoveryHelp")}):null,n.items.length>0?e.jsx("div",{className:"debug-readiness-runtime-list",children:n.items.map(a=>e.jsxs("article",{className:"debug-readiness-runtime-item",children:[e.jsxs("div",{className:"debug-readiness-runtime-item-header",children:[e.jsx("strong",{children:a.template.name}),e.jsx("span",{children:T(a.template)})]}),e.jsxs("div",{className:"debug-readiness-runtime-item-grid",children:[e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePathLabel")}),e.jsx("strong",{title:a.template.cwd,children:y(a.template.cwd,r.path)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePortLabel")}),e.jsx("strong",{children:A(a.assignedPort)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemRuntimeLabel")}),e.jsx("strong",{children:I(a.template.runtimeType)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemActionLabel")}),e.jsx("strong",{children:K(a.decision)})]})]}),e.jsxs("p",{className:"workbench-manage-hint",children:[s("shell.workspaceDetailRegisteredDebugPlanItemReasonLabel"),": ",a.reason]})]},a.template.id))}):e.jsx("p",{className:"workbench-section-empty",children:s("shell.workspaceDetailRegisteredDebugTemplatesEmpty")})]}):null,e.jsxs("section",{className:"debug-readiness-section surface-card",children:[e.jsxs("div",{className:"debug-readiness-section-header",children:[e.jsxs("div",{children:[e.jsx("h3",{children:s("shell.workspaceDetailRegisteredDebugTemplatesTitle")}),e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugTemplatesDescription")})]}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>j(se(r.id)),children:s("shell.workspaceDetailRegisteredDebugOpenProcessManagerAction")})]}),l.loading&&l.templates.length===0?e.jsx("p",{className:"workbench-section-empty",children:s("common.loading")}):null,l.error&&l.templates.length===0?e.jsx("p",{className:"workbench-manage-status status-text","data-tone":"error",children:l.error}):null,!l.loading&&l.templates.length===0?e.jsx("p",{className:"workbench-section-empty",children:s("shell.workspaceDetailRegisteredDebugTemplatesEmpty")}):null,l.templates.length>0?e.jsx("div",{className:"debug-readiness-service-grid",children:l.templates.map(a=>{const t=O.get(a.id)??null,p=Q(a,t);return e.jsxs("article",{className:"debug-readiness-service-card",children:[e.jsxs("div",{className:"debug-readiness-service-card-header",children:[e.jsxs("div",{children:[e.jsx("strong",{children:a.name}),e.jsx("p",{title:a.cwd,children:y(a.cwd,r.path)})]}),e.jsx("span",{className:"debug-readiness-chip","data-tone":p,children:U(a,t)})]}),e.jsxs("div",{className:"debug-readiness-service-card-grid",children:[e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePathLabel")}),e.jsx("strong",{title:a.cwd,children:y(a.cwd,r.path)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePortLabel")}),e.jsx("strong",{children:A(a.port)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplateRuntimeTypeLabel")}),e.jsx("strong",{children:I(a.runtimeType)})]}),e.jsxs("div",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugRuntimeProcessLabel")}),e.jsx("strong",{children:X(t)})]})]}),e.jsxs("div",{className:"debug-readiness-service-card-list",children:[e.jsxs("p",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemCommandLabel")}),e.jsx("strong",{children:T(a)})]}),e.jsxs("p",{children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemReasonLabel")}),e.jsx("strong",{children:Y(a,t)})]})]})]},a.id)})}):null]})]})});async function B(){m("sync"),o(null);try{await l.refreshAll(),k(null),d({title:s("shell.workspaceDetailRegisteredDebugActionSyncTemplatesSuccess"),tone:"success"})}catch(a){const t=x(a,s("shell.workspaceDetailRegisteredDebugActionSyncTemplatesFailed"));o(t),d({title:t,tone:"error"})}finally{m(null)}}async function F(){m("plan"),o(null);try{if(!b.targetId)throw new Error(s("shell.workspaceDetailDebugActionTargetMissing"));const a=await C(b.targetId),t=R(l.templates,l.runtimeStatuses,a);k(t),d({title:s("shell.workspaceDetailDebugActionPlanSuccess"),tone:"info"})}catch(a){const t=x(a,s("shell.workspaceDetailDebugActionPlanFailed"));o(t),d({title:t,tone:"error"})}finally{m(null)}}async function W(){var a,t;m("run"),o(null);try{const p=n??(b.targetId?R(l.templates,l.runtimeStatuses,await C(b.targetId)):R(l.templates,l.runtimeStatuses));k(p);const D=p.items.filter(i=>i.decision!=="blocked");if(D.length===0){const i=s("shell.workspaceDetailRegisteredDebugActionRunRegisteredSkipped");o(i),d({title:i,tone:"info"});return}const v=[];for(const i of D)try{await ae(i.template.id,{runtimeType:i.template.runtimeType??void 0,argsOverride:(a=i.planItem)==null?void 0:a.args,envPatch:(t=i.planItem)==null?void 0:t.envPatch,portOverride:i.assignedPort})}catch(q){v.push(`${i.template.name}: ${x(q,s("shell.workspaceDetailRegisteredDebugActionRunRegisteredFailed"))}`)}if(await l.refreshRuntime(),v.length>0)throw new Error(v.join(";"));d({title:s("shell.workspaceDetailRegisteredDebugActionRunRegisteredSuccess"),tone:"success"})}catch(p){const D=x(p,s("shell.workspaceDetailRegisteredDebugActionRunRegisteredFailed"));o(D),d({title:D,tone:"error"})}finally{m(null)}}async function V(){m("refresh"),o(null);try{await l.refreshRuntime(),d({title:s("shell.workspaceDetailDebugActionRefreshSuccess"),tone:"success"})}catch(a){const t=x(a,s("shell.workspaceDetailRegisteredDebugActionRefreshFailed"));o(t),d({title:t,tone:"error"})}finally{m(null)}}}function x(u,j){return u instanceof Error&&u.message.trim()?u.message:j}export{pe as WorkspaceDebugDetailPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as d,j as e,t as s}from"./index-C2G8Gmf1.js";import{u as J,r as N,s as Q,t as U,v as Y,k as ee,q as se,x as ae,p as L,y as le,z as ie,b as oe,i as O}from"./WorkbenchLayout-rwQib5In.js";import{a as F,r as ne}from"./MobileSheet-Gzc14EpR.js";import{b as te,f as re,a as ce,c as de,d as me,e as he,g as ue,h as pe,i as be,u as je,j as ge,D as ke}from"./useRegisteredDebugTemplates-zMcEOGca.js";import{g as xe}from"./terminal-runtime-meta-BMT-rSEe.js";import{f as fe,a as ve,M as we}from"./MobileWorkspaceSwitcherHeader-DOr4pTUq.js";import{M as Ne}from"./MobileCreateSessionSheet-CXSKMnYn.js";import{c as Ce,u as ye,e as Re}from"./App-WOLwMld_.js";import"./window-BWqRixxq.js";import"./event-DvH9tcej.js";import"./WorkbenchModal-B09hC9b5.js";import"./MobileTopHeaderFrame-BWorAJ1C.js";function De({workspaceId:a,workspacePath:o,state:t,onOpenProcessManager:b}){const u=d.useMemo(()=>te(t.templates,t.runtimeStatuses),[t.runtimeStatuses,t.templates]),x=d.useMemo(()=>new Map(t.runtimeStatuses.map(c=>[c.templateId,c])),[t.runtimeStatuses]);return e.jsxs("section",{className:"mobile-feature-panel surface-card mobile-workspace-composition-panel",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.workspaceDetailRegisteredDebugTemplatesTitle")})}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>b(a),children:s("shell.workspaceDetailRegisteredDebugOpenProcessManagerAction")})]}),e.jsx("p",{className:"mobile-workspace-composition-note",children:s("shell.workspaceDetailRegisteredDebugTemplatesDescription")}),e.jsxs("div",{className:"mobile-detail-grid mobile-workspace-detail-grid",children:[e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailDebugOverallStatusLabel")}),e.jsx("strong",{children:re(u,t.templates.length)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRegisteredCountLabel")}),e.jsx("strong",{children:t.templates.length})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryRunnableCountLabel")}),e.jsx("strong",{children:u.runnableCount})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryOrchestratedCountLabel")}),e.jsx("strong",{children:u.orchestratedCount})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryBlockedCountLabel")}),e.jsx("strong",{children:u.blockedCount})]}),e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugSummaryLastRefreshLabel")}),e.jsx("strong",{children:ce(t.lastRefreshedAt)})]})]}),t.loading&&t.templates.length===0?e.jsx("p",{children:s("common.loading")}):null,t.error&&t.templates.length===0?e.jsx("p",{className:"status-text","data-tone":"error",children:t.error}):null,!t.loading&&t.templates.length===0?e.jsx("p",{children:s("shell.workspaceDetailRegisteredDebugTemplatesEmpty")}):null,t.templates.length>0?e.jsx("div",{className:"mobile-feature-stack",children:t.templates.map(c=>{const m=x.get(c.id)??null;return e.jsxs("article",{className:"surface-card mobile-session-row",children:[e.jsxs("div",{className:"mobile-session-row-primary mobile-session-row-primary-static",children:[e.jsx("span",{className:"mobile-session-row-title",children:c.name}),e.jsx("span",{className:"mobile-session-row-provider",children:de(c,m)})]}),e.jsxs("div",{className:"mobile-detail-grid mobile-workspace-detail-grid",children:[e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePathLabel")}),e.jsx("strong",{title:c.cwd,children:me(c.cwd,o)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplatePortLabel")}),e.jsx("strong",{children:he(c.port)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugTemplateRuntimeTypeLabel")}),e.jsx("strong",{children:xe(c.runtimeType)})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugRuntimeProcessLabel")}),e.jsx("strong",{children:ue(m)})]}),e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemCommandLabel")}),e.jsx("strong",{children:pe(c)})]}),e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.workspaceDetailRegisteredDebugPlanItemReasonLabel")}),e.jsx("strong",{children:be(c,m)})]})]})]},c.id)})}):null]})}function We(a){return a.isArchived!==!0&&!O(a)}function Me(a){return a.isArchived===!0&&!O(a)}const C=60*1e3,y=10;function $e(){var E;const{workspaceId:a=""}=Ce(),o=ye(),{showToast:t}=Re(),{navigationGroups:b,currentWorkspaceId:u,favoriteSessionIds:x,workspaceManagementStateById:c,selectWorkspace:m,subscribeGitSnapshot:R,requestGitRefresh:D,subscribeWorkspaceManagementSnapshot:W,requestWorkspaceManagementRefresh:M,toggleFavoriteSession:_,archiveSession:G,unarchiveSession:V,startDraftSession:H}=J(),[S,T]=d.useState(!1),[Z,f]=d.useState(!1),[P,A]=d.useState(y),v=fe(b),h=ve(b,a),i=(h==null?void 0:h.workspace)??null,p=v.find(l=>l.workspace.id===(i==null?void 0:i.id))??(i?{workspace:i,label:i.name,subtitle:i.path}:null),w=d.useMemo(()=>[...(h==null?void 0:h.sessions)??[]].filter(We),[h]),g=d.useMemo(()=>[...(h==null?void 0:h.sessions)??[]].filter(Me),[h]);d.useEffect(()=>{a&&m(a)},[m,a]),d.useEffect(()=>{if(!a)return;const l=N(Pe(a),C),r=N(B(a),C);R(a,{knownRevision:(l==null?void 0:l.revision)??null}),W(a,{knownRevision:(r==null?void 0:r.revision)??null}),l||D(a),r||M(a)},[D,M,R,W,a]),d.useEffect(()=>{A(y)},[a]);const n=d.useMemo(()=>{if(!a)return{loading:!1,error:null,hasMeaningfulSummary:!1,summary:null};const l=N(B(a),C),r=c[a]??null,j=(r==null?void 0:r.detail)??(i?Ae(i,l):l??null);return{loading:(r==null?void 0:r.loading)??!1,error:(r==null?void 0:r.error)??null,hasMeaningfulSummary:Ie(j),summary:j}},[i,a,c]),k=d.useMemo(()=>n.summary?Q(n.summary.codeComposition.items,s("shell.manageWorkspaceCodeCompositionOther")):[],[n.summary]),q=d.useMemo(()=>k.length>0?U(k):void 0,[k]),I=d.useMemo(()=>g.slice(0,P),[g,P]),K=je(i?{id:i.id,path:i.path,name:i.name}:null),$=ge(i?{id:i.id,path:i.path,name:i.name}:null);async function z(){if(!(!i||!(typeof window>"u"||window.confirm(s("shell.manageWorkspaceRemoveConfirmTarget",{name:i.name}))))){T(!0);try{await ne(i.id),t({title:s("shell.manageWorkspaceRemoveSuccess"),tone:"success"}),o("/workspaces",{replace:!0})}catch(r){t({title:r instanceof Error?r.message:s("shell.manageWorkspaceRemoveFailed"),tone:"error"})}finally{T(!1)}}}function X(l,r){f(!1),H(l,r)}return i?e.jsxs("main",{className:"mobile-feature-page mobile-page-scroll-root mobile-page-with-top-header mobile-workspace-detail-page",children:[e.jsx(we,{currentWorkspace:p?{id:p.workspace.id,name:p.label,path:p.subtitle}:null,workspaces:b.map(l=>l.workspace),workspaceOptions:v,heading:s("shell.workspaceDetailTitle"),triggerLabel:(p==null?void 0:p.label)??i.name,onSelectWorkspace:l=>{m(l),o(se(l))},content:e.jsxs("div",{className:"mobile-workspace-detail-header-actions",children:[e.jsx("button",{type:"button",className:"primary-button",onClick:()=>f(!0),children:s("shell.createSession")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(Y(i.id))},children:s("shell.filesEntry")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(ee(i.id))},children:s("shell.terminalsEntry")})]})}),e.jsxs("div",{className:"mobile-page-top-body mobile-workspace-detail-body",children:[e.jsxs("section",{className:"mobile-feature-panel surface-card mobile-workspace-detail-summary-panel",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.workspaceDetailSummaryTitle")})}),u!==i.id?e.jsx("button",{type:"button",className:"secondary-button mobile-workspace-detail-switch-button",onClick:()=>m(i.id),children:s("shell.switchWorkspace")}):null]}),n.loading&&n.summary===null?e.jsx("p",{children:s("common.loading")}):null,n.error?e.jsx("p",{className:"status-text","data-tone":"error",children:n.error}):null,n.summary?e.jsxs("div",{className:"mobile-detail-grid mobile-workspace-detail-grid",children:[e.jsxs("div",{className:"mobile-detail-metric mobile-detail-metric-wide",children:[e.jsx("span",{children:s("shell.manageWorkspacePathLabel")}),e.jsx("strong",{title:n.summary.path,children:n.summary.path})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.manageWorkspaceCurrentBranch")}),e.jsx("strong",{title:n.summary.git.currentBranch??s("common.unknown"),children:n.summary.git.currentBranch??s("common.unknown")})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.manageWorkspaceGitCommitCount")}),e.jsx("strong",{children:n.hasMeaningfulSummary?n.summary.git.commitCount??0:"—"})]}),e.jsxs("div",{className:"mobile-detail-metric",children:[e.jsx("span",{children:s("shell.manageWorkspaceCodeCompositionFiles")}),e.jsx("strong",{children:n.hasMeaningfulSummary?n.summary.codeComposition.scannedFileCount:"—"})]})]}):null,e.jsxs("div",{className:"mobile-feature-inline-actions mobile-workspace-detail-summary-actions",children:[e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(ae(i.id))},children:s("shell.gitEntry")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>{m(i.id),o(L(i.id))},children:s("shell.terminalManagerEntry")}),e.jsx("button",{type:"button",className:"secondary-button workbench-danger-button",disabled:S,onClick:()=>{z()},children:S?s("shell.manageWorkspaceRemoving"):s("shell.manageWorkspaceRemoveAction")})]})]}),e.jsx(ke,{workspace:i?{id:i.id,path:i.path,name:i.name}:null,state:K,variant:"mobile"}),i?e.jsx(De,{workspaceId:i.id,workspacePath:i.path,state:$,onOpenProcessManager:l=>{m(l),o(L(l))}}):null,e.jsxs("section",{className:"mobile-feature-panel surface-card mobile-workspace-composition-panel",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.manageWorkspaceCodeCompositionLabel")})}),n.summary?e.jsx("span",{className:"mobile-feature-counter",children:n.summary.codeComposition.scannedFileCount}):null]}),n.loading&&n.summary===null?e.jsx("p",{children:s("common.loading")}):null,n.summary?k.length>0?e.jsxs("div",{className:"workbench-manage-type-chart",children:[e.jsxs("div",{className:"workbench-manage-type-chart-ring",style:q,"aria-hidden":"true",children:[e.jsx("strong",{className:"workbench-manage-type-chart-total",children:n.summary.codeComposition.scannedFileCount}),e.jsx("span",{className:"workbench-manage-type-chart-caption",children:s("shell.manageWorkspaceCodeCompositionFiles")})]}),e.jsx("div",{className:"workbench-manage-type-list",children:k.map(l=>e.jsxs("div",{className:"workbench-manage-type-item",children:[e.jsxs("span",{className:"workbench-manage-type-meta",children:[e.jsx("span",{className:"workbench-manage-type-swatch",style:{backgroundColor:l.color},"aria-hidden":"true"}),e.jsx("span",{className:"workbench-manage-type-name",children:l.type})]}),e.jsxs("span",{children:[l.count," · ",le(l)]})]},l.key))})]}):e.jsx("p",{children:n.summary.codeComposition.error??s("shell.manageWorkspaceNoCodeComposition")}):null,(E=n.summary)!=null&&E.codeComposition.truncated?e.jsx("p",{className:"mobile-workspace-composition-note",children:s("shell.manageWorkspaceCodeTruncated",{count:n.summary.codeComposition.scannedFileCount})}):null]}),e.jsxs("section",{className:"mobile-feature-section",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.recentSessionsSectionTitle")})}),e.jsx("span",{className:"mobile-feature-counter",children:w.length})]}),e.jsx("div",{className:"mobile-feature-stack",children:w.length===0?e.jsx("article",{className:"mobile-feature-empty surface-card",children:e.jsx("p",{children:s("shell.emptyWorkspaceSessions")})}):w.map(l=>{const r=ie(l.title,s("common.unknown")),j=x.includes(l.sessionId);return e.jsxs("article",{className:"mobile-session-row surface-card",children:[e.jsxs("button",{type:"button",className:"mobile-session-row-primary",onClick:()=>o(oe(i.id,l.sessionId)),children:[e.jsx("span",{className:"mobile-session-row-title",title:r.fullTitle,children:r.displayTitle}),e.jsx("span",{className:"mobile-session-row-provider",children:F(l.provider)})]}),e.jsxs("div",{className:"mobile-session-row-actions",children:[e.jsx("span",{className:"mobile-feature-badge mobile-session-row-count",children:l.messageCount}),e.jsx("button",{type:"button",className:"mobile-session-row-action","aria-label":j?s("shell.unfavoriteAction"):s("shell.favoriteAction"),title:j?s("shell.unfavoriteAction"):s("shell.favoriteAction"),onClick:()=>{_(l.sessionId)},children:e.jsx(Se,{active:j})}),e.jsx("button",{type:"button",className:"mobile-session-row-action","aria-label":s("shell.archiveAction"),title:s("shell.archiveAction"),onClick:()=>{G(l.sessionId)},children:e.jsx(Te,{})})]})]},l.sessionId)})})]}),g.length>0?e.jsxs("section",{className:"mobile-feature-section",children:[e.jsxs("div",{className:"mobile-feature-section-header",children:[e.jsx("div",{children:e.jsx("h2",{children:s("shell.archiveModalTitle")})}),e.jsx("span",{className:"mobile-feature-counter",children:g.length})]}),e.jsx("div",{className:"mobile-feature-stack",children:I.map(l=>e.jsxs("article",{className:"mobile-session-row surface-card",children:[e.jsxs("div",{className:"mobile-session-row-primary mobile-session-row-primary-static",children:[e.jsx("span",{className:"mobile-session-row-title",title:l.title,children:l.title}),e.jsx("span",{className:"mobile-session-row-provider",children:F(l.provider)})]}),e.jsx("div",{className:"mobile-session-row-actions",children:e.jsx("button",{type:"button",className:"secondary-button mobile-session-row-restore",onClick:()=>{V(l.sessionId)},children:s("shell.unarchiveAction")})})]},l.sessionId))}),I.length<g.length?e.jsx("button",{type:"button",className:"secondary-button mobile-workspace-detail-expand-button",onClick:()=>{A(l=>l+y)},children:s("shell.archiveExpandMore")}):null]}):null]}),e.jsx(Ne,{open:Z,workspaces:b.map(l=>l.workspace),workspaceOptions:v,initialWorkspaceId:u??i.id,onClose:()=>f(!1),onSelect:X})]}):e.jsx("main",{className:"mobile-feature-page mobile-page-scroll-root",children:e.jsxs("article",{className:"mobile-feature-empty surface-card",children:[e.jsx("h1",{children:s("shell.workspaceDetailMissingTitle")}),e.jsx("p",{children:s("shell.workspaceDetailMissingBody")}),e.jsx("button",{type:"button",className:"secondary-button",onClick:()=>o("/workspaces"),children:s("shell.mobileWorkspacesEntry")})]})})}function Se({active:a}){return e.jsx("svg",{viewBox:"0 0 24 24",fill:a?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.8",children:e.jsx("path",{d:"m12 3.6 2.6 5.2 5.7.8-4.1 4 1 5.7L12 16.5 6.8 19.3l1-5.7-4.1-4 5.7-.8Z"})})}function Te(){return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[e.jsx("path",{d:"M4 7.5h16"}),e.jsx("path",{d:"M6.4 7.5h11.2l-.9 10.2a2 2 0 0 1-2 1.8H9.3a2 2 0 0 1-2-1.8Z"}),e.jsx("path",{d:"M8 4.5h8a1.5 1.5 0 0 1 1.5 1.5v1.5h-11V6A1.5 1.5 0 0 1 8 4.5Z"}),e.jsx("path",{d:"M10 11.5h4"})]})}function B(a){return`workspace-management.summary.${a}`}function Pe(a){return`git-sidebar.snapshot.${a}`}function Ae(a,o){const t=(o==null?void 0:o.git.repoRoot)??a.repoRoot??null;return{workspaceId:a.id,name:a.name,path:a.path,git:{isRepository:(o==null?void 0:o.git.isRepository)??!!t,repoRoot:t,currentBranch:(o==null?void 0:o.git.currentBranch)??null,commitCount:(o==null?void 0:o.git.commitCount)??null,remotes:(o==null?void 0:o.git.remotes)??[],error:(o==null?void 0:o.git.error)??null},codeComposition:(o==null?void 0:o.codeComposition)??{scannedFileCount:0,truncated:!1,items:[],error:null}}}function Ie(a){return a?a.git.isRepository||a.git.repoRoot!==null||a.git.currentBranch!==null||a.git.commitCount!==null||a.git.remotes.length>0||a.codeComposition.scannedFileCount>0||a.codeComposition.items.length>0||a.codeComposition.error!==null:!1}export{$e as WorkspaceDetailPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r,j as e,t as s}from"./index-C2G8Gmf1.js";import{u as Be,r as L,w as ee,B as ie,b as oe,c as Fe,d as Oe,e as qe,i as Ue,g as De,f as Ve,l as Ke,h as Ge,j as We,k as Qe,n as Xe,o as $e,p as ze,q as _}from"./WorkbenchLayout-rwQib5In.js";import{s as Je}from"./butler-records-events-DgWCG364.js";import{a as ne}from"./MobileSheet-Gzc14EpR.js";import{f as Ye,a as te,M as Ze}from"./MobileWorkspaceSwitcherHeader-DOr4pTUq.js";import{u as ei,e as ii}from"./App-WOLwMld_.js";import{M as oi}from"./MobileCreateSessionSheet-CXSKMnYn.js";import{W as ni}from"./WorkbenchModal-B09hC9b5.js";import"./window-BWqRixxq.js";import"./event-DvH9tcej.js";import"./MobileTopHeaderFrame-BWorAJ1C.js";function ti(n){return n.status==="active"}function si(n){return n.status==="queued"||n.status==="running"}function ai(n,m){return n.filter(ti).length+m.filter(si).length}function li(n){const m=r.useMemo(()=>n.notifications.filter(a=>n.showArchivedNotifications||!n.archivedNotificationIds.has(a.id)),[n.archivedNotificationIds,n.notifications,n.showArchivedNotifications]);return e.jsx(ni,{open:n.open,title:s("shell.globalNotificationsPanelTitle"),description:s("shell.globalNotificationsPanelDescription"),className:"workbench-notification-modal-card mobile-notification-modal-card",onClose:n.onClose,children:e.jsxs("div",{className:"workbench-notification-pane mobile-notification-pane",role:"tabpanel","aria-label":s("shell.globalNotificationsAction"),children:[e.jsx("div",{className:"workbench-notification-toolbar",children:e.jsxs("label",{className:"workbench-notification-filter",children:[e.jsx("input",{type:"checkbox",checked:n.showArchivedNotifications,onChange:a=>n.onToggleShowArchivedNotifications(a.target.checked)}),e.jsx("span",{children:s("shell.globalNotificationsShowArchived")})]})}),m.length>0?e.jsx("div",{className:"workbench-notification-list",children:m.map(a=>{const u=n.archivedNotificationIds.has(a.id);return e.jsxs("article",{className:"workbench-notification-item","data-archived":u,children:[e.jsxs("button",{type:"button",className:"workbench-notification-item-content",onClick:()=>{n.onSelectNotification(a)},children:[e.jsx("span",{className:"workbench-notification-item-kind",children:ci(a.kind)}),e.jsx("strong",{children:a.title}),e.jsx("p",{children:a.body})]}),e.jsxs("div",{className:"workbench-notification-item-side",children:[e.jsx("time",{children:ri(a.createdAt)}),e.jsx("button",{type:"button",className:"secondary-button workbench-notification-item-action-button",onClick:()=>{if(u){n.onUnarchiveNotification(a.id);return}n.onArchiveNotification(a.id)},children:u?s("shell.globalNotificationsRemoveArchiveAction"):s("shell.globalNotificationsArchiveAction")})]})]},a.id)})}):e.jsx("p",{className:"workbench-notification-empty",children:s("shell.globalNotificationsEmpty")})]})})}function ci(n){switch(n){case"follow_up_waiting_user":return s("shell.globalNotificationKindWaitingUser");case"follow_up_completed":return s("shell.globalNotificationKindFollowUpCompleted");case"follow_up_failed":return s("shell.globalNotificationKindFollowUpFailed");case"verification_failed":return s("shell.globalNotificationKindVerificationFailed");default:return s("shell.globalNotificationsPanelTitle")}}function ri(n){const m=new Date(n);return Number.isNaN(m.getTime())?n:new Intl.DateTimeFormat(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(m)}function di(n){return n.isArchived!==!0&&!Ue(n)}function ce(n){return n.activityState==="running"||n.runningState==="starting"||n.runningState==="running"||n.runningState==="reconnecting"}function mi(n){return n.activityState==="idle"&&ce(n)===!1}function se(n){return n==="creating"||n==="running"}function ae(n){return n.lastEventAt??n.lastMessageAt??n.updatedAt??n.createdAt}function le(n){return n?new Date(n).toLocaleString(void 0,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}):s("common.unknown")}function N(n){return n!==null&&n>0}const y=60*1e3,ui=15e3;function Ci(){var Z;const n=ei(),{showToast:m}=ii(),a=Be(),{navigationGroups:u,currentWorkspaceId:F,refreshNavigation:O,selectWorkspace:p,startDraftSession:re,subscribeGitSnapshot:q,requestGitRefresh:U,addGitSnapshotListener:D,subscribeTerminalManagerSnapshot:V,requestTerminalManagerRefresh:K,addTerminalManagerSnapshotListener:G}=a,de=a.globalNotifications??[],me=new Set(a.archivedNotificationIds??[]),ue=a.showArchivedNotifications??!1,W=a.unreadNotificationCount??0,he=a.setShowArchivedNotifications??(()=>{}),pe=a.archiveNotification??(()=>{}),be=a.unarchiveNotification??(()=>{}),[Q,b]=r.useState(null),[fe,A]=r.useState(!1),[we,X]=r.useState(!1),[ke,R]=r.useState(!1),[d,k]=r.useState({gitLoading:!1,terminalLoading:!1,branch:null,activeTerminalCount:null,changedFileCount:null,quickLaunchRunning:null}),[f,j]=r.useState({loading:!0,activeTaskCount:0,pendingInboxCount:0}),M=Ye(u),x=te(u,F)??te(u,((Z=u[0])==null?void 0:Z.workspace.id)??null),i=(x==null?void 0:x.workspace)??null,I=M.find(o=>o.workspace.id===(i==null?void 0:i.id))??(i?{workspace:i,label:i.name,subtitle:i.path}:null),C=[...(x==null?void 0:x.sessions)??[]].filter(di),E=C.filter(ce),$=C.filter(mi),ge=C.filter(o=>o.isFavorite===!0),z=E.slice(0,6),J=ge.slice(0,6),ve=d.quickLaunchRunning===null?"…":d.quickLaunchRunning?s("shell.workspaceHomeQuickLaunchRunning"):s("shell.workspaceHomeQuickLaunchStopped");r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){k({gitLoading:!1,terminalLoading:!1,branch:null,activeTerminalCount:null,changedFileCount:null,quickLaunchRunning:null});return}const t=L(H(o),y);k(c=>{var l,g;return{...c,gitLoading:t===null,branch:((l=t==null?void 0:t.status)==null?void 0:l.snapshot.branch)??null,changedFileCount:((g=t==null?void 0:t.status)==null?void 0:g.changes.length)??null}})},[i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(o)return D(t=>{t.workspaceId===o&&(ee(H(o),t),k(c=>{var l,g,S;return{...c,gitLoading:!1,branch:((l=t.status)==null?void 0:l.snapshot.branch)??((g=t.branches)==null?void 0:g.currentBranch)??null,changedFileCount:((S=t.status)==null?void 0:S.changes.length)??null}}))})},[D,i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){k(c=>({...c,gitLoading:!1,branch:null,changedFileCount:null}));return}const t=L(B(o),y);k(c=>({...c,terminalLoading:t===null,activeTerminalCount:t?t.terminals.filter(l=>se(l.status)).length:null,quickLaunchRunning:t?t.templateStatuses.some(l=>l.occupied):null}))},[i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){k(t=>({...t,terminalLoading:!1,activeTerminalCount:null,quickLaunchRunning:null}));return}return G(t=>{t.workspaceId===o&&(ee(B(o),{revision:t.revision??null,terminals:t.terminals,templates:t.templates,templateStatuses:t.templateStatuses}),k(c=>({...c,terminalLoading:!1,activeTerminalCount:t.terminals.filter(l=>se(l.status)).length,quickLaunchRunning:t.templateStatuses.some(l=>l.occupied)})))})},[G,i==null?void 0:i.id]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o)return;const t=L(H(o),y);q(o,{knownRevision:(t==null?void 0:t.revision)??null}),!t&&U(o)},[i==null?void 0:i.id,U,q]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o)return;const t=L(B(o),y);V(o,{knownRevision:(t==null?void 0:t.revision)??null}),!t&&K(o)},[i==null?void 0:i.id,K,V]),r.useEffect(()=>{const o=(i==null?void 0:i.id)??null;if(!o){j({loading:!1,activeTaskCount:0,pendingInboxCount:0});return}let t=!1;async function c(Me){j(v=>({...v,loading:!0}));try{const v=await De();if(!v.initialized||!v.profile){t||j({loading:!1,activeTaskCount:0,pendingInboxCount:0});return}const[T,Ee,Pe]=await Promise.all([Ve(),Ke(),Ge({workspaceId:o})]);if(t)return;const _e=new Set(T.overview.projects.filter(h=>h.workspaceId===o).map(h=>h.id)),He=T.overview.verifications.filter(h=>h.projectId?_e.has(h.projectId):!1);j({loading:!1,activeTaskCount:ai(Ee.items.filter(h=>h.workspaceId===o),He),pendingInboxCount:Pe.items.filter(h=>h.status!=="closed").length})}catch(v){if(t)return;j(T=>({...T,loading:!1})),Me&&m({title:s("shell.butlerLoadFailed"),description:v instanceof Error?v.message:void 0,tone:"error"})}}c(!0);const l=window.setInterval(()=>{c(!1)},ui),g=Je(()=>{c(!1)}),S=()=>{c(!1)};return window.addEventListener(ie,S),()=>{t=!0,window.clearInterval(l),g(),window.removeEventListener(ie,S)}},[i==null?void 0:i.id,m]);async function Ne(o){await O(),p(o.id),b(null),n(_(o.id))}async function xe(o){await O(),p(o.id),b(null),n(_(o.id))}function je(){i&&(p(i.id),n(Xe(i.id,"git")))}function Ce(){i&&(p(i.id),n(Qe(i.id)))}function Se(){i&&(p(i.id),n(ze(i.id)))}function Ie(){i&&(p(i.id),n($e(i.id)))}function P(){i&&n(We(i.id))}function Y(){i&&A(!0)}function Te(o,t){A(!1),re(o,t)}function Le(){i&&(p(i.id),n(_(i.id)))}function ye(o){p(o)}const Ae=[{label:s("shell.workspaceHomeMetricActive"),value:E.length,accent:N(E.length),onClick:C.length>0?P:void 0},{label:s("shell.workspaceHomeMetricUnread"),value:W,accent:N(W),onClick:()=>R(!0)},{label:s("shell.workspaceHomeMetricTerminal"),value:d.terminalLoading?"…":d.activeTerminalCount??"—",accent:d.terminalLoading===!1&&N(d.activeTerminalCount),onClick:i?Ce:void 0},{label:s("shell.workspaceHomeMetricChanges"),value:d.gitLoading?"…":d.changedFileCount??"—",accent:d.gitLoading===!1&&N(d.changedFileCount),onClick:i?je:void 0}],Re=[{label:s("shell.workspaceHomeWaitingInputLabel"),value:$.length,accent:N($.length),onClick:C.length>0?P:void 0},{label:s("shell.workspaceHomeButlerLabel"),value:f.loading?"…":f.activeTaskCount,accent:f.loading===!1&&N(f.activeTaskCount),onClick:i?Ie:void 0},{label:s("shell.workspaceHomeQuickLaunchStatusLabel"),value:ve,accent:d.quickLaunchRunning===!0,onClick:i?Se:void 0},{label:s("shell.butlerInboxAction"),value:f.loading?"…":f.pendingInboxCount,accent:f.loading===!1&&N(f.pendingInboxCount),onClick:i?()=>X(!0):void 0}];return e.jsxs("main",{className:"mobile-feature-page mobile-page-scroll-root mobile-page-with-top-header mobile-workspace-home-page",children:[e.jsx(Ze,{currentWorkspace:I?{id:I.workspace.id,name:I.label,path:I.subtitle}:null,workspaces:u.map(o=>o.workspace),workspaceOptions:M,onSelectWorkspace:ye,sheetContent:o=>e.jsxs("div",{className:"mobile-workspace-home-group mobile-workspace-home-sheet-group",children:[e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-sheet-row",onClick:()=>{o(),b("import")},children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:s("shell.importWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(w,{})})]}),e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-sheet-row",onClick:()=>{o(),b("clone")},children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:s("shell.cloneWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(w,{})})]})]})}),i?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"mobile-page-top-body mobile-workspace-home-body",children:[e.jsx("section",{className:"mobile-workspace-home-section",children:e.jsx("div",{className:"mobile-workspace-home-metrics-card","aria-label":s("shell.workspaceHomeStatusSectionTitle"),children:e.jsx("div",{className:"mobile-workspace-home-toolbar-summary",children:Ae.map(o=>o.onClick?e.jsxs("button",{type:"button",className:"mobile-workspace-home-toolbar-metric","data-accent":o.accent?"true":void 0,onClick:o.onClick,children:[e.jsx("strong",{className:"mobile-workspace-home-toolbar-metric-value",children:o.value}),e.jsx("span",{className:"mobile-workspace-home-toolbar-metric-label",children:o.label})]},o.label):e.jsxs("div",{className:"mobile-workspace-home-toolbar-metric","data-accent":o.accent?"true":void 0,role:"listitem",children:[e.jsx("strong",{className:"mobile-workspace-home-toolbar-metric-value",children:o.value}),e.jsx("span",{className:"mobile-workspace-home-toolbar-metric-label",children:o.label})]},o.label))})})}),e.jsx("section",{className:"mobile-workspace-home-section",children:e.jsxs("div",{className:"mobile-workspace-home-primary-actions",children:[e.jsx("button",{type:"button",className:"secondary-button",onClick:Le,children:s("shell.workspaceDetailTitle")}),e.jsx("button",{type:"button",className:"primary-button",onClick:Y,children:s("shell.createSession")})]})}),e.jsx("section",{className:"mobile-workspace-home-section",children:e.jsx("div",{className:"mobile-workspace-home-group",children:Re.map(o=>e.jsxs("button",{type:"button",className:"mobile-workspace-home-row","data-accent":o.accent?"true":void 0,onClick:o.onClick,children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:o.label}),e.jsxs("span",{className:"mobile-workspace-home-row-trailing",children:[e.jsx("strong",{children:o.value}),e.jsx(w,{})]})]},o.label))})}),e.jsxs("section",{className:"mobile-workspace-home-section",children:[e.jsxs("div",{className:"mobile-workspace-home-section-header",children:[e.jsx("p",{className:"mobile-workspace-home-section-title",children:s("shell.workspaceHomeActiveSessionsSectionTitle")}),i?e.jsx("button",{type:"button",className:"mobile-workspace-home-link-button",onClick:P,children:s("shell.workspaceHomeViewAllAction")}):null]}),e.jsx("div",{className:"mobile-workspace-home-group",children:z.length===0?e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-empty-row",onClick:Y,children:[e.jsxs("div",{className:"mobile-workspace-home-session-main",children:[e.jsx("span",{className:"mobile-workspace-home-session-title",children:s("shell.createSession")}),e.jsx("span",{className:"mobile-workspace-home-session-meta",children:i.name})]}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(w,{})})]}):z.map(o=>e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-session-row",onClick:()=>n(oe(i.id,o.sessionId)),children:[e.jsxs("div",{className:"mobile-workspace-home-session-main",children:[e.jsx("span",{className:"mobile-workspace-home-session-title",children:o.title||s("common.unknown")}),e.jsxs("span",{className:"mobile-workspace-home-session-meta",children:[ne(o.provider,"full")," · ",le(ae(o))]})]}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(w,{})})]},o.sessionId))})]}),J.length>0?e.jsxs("section",{className:"mobile-workspace-home-section",children:[e.jsx("div",{className:"mobile-workspace-home-section-header",children:e.jsx("p",{className:"mobile-workspace-home-section-title",children:s("shell.favoriteSectionTitle")})}),e.jsx("div",{className:"mobile-workspace-home-group",children:J.map(o=>e.jsxs("button",{type:"button",className:"mobile-workspace-home-row mobile-workspace-home-session-row",onClick:()=>n(oe(i.id,o.sessionId)),children:[e.jsxs("div",{className:"mobile-workspace-home-session-main",children:[e.jsx("span",{className:"mobile-workspace-home-session-title",children:o.title||s("common.unknown")}),e.jsxs("span",{className:"mobile-workspace-home-session-meta",children:[ne(o.provider,"full")," · ",le(ae(o))]})]}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(w,{})})]},o.sessionId))})]}):null]})}):e.jsx("div",{className:"mobile-page-top-body mobile-workspace-home-body",children:e.jsxs("section",{className:"mobile-workspace-home-section mobile-workspace-home-empty",children:[e.jsx("p",{className:"mobile-workspace-home-section-title",children:s("shell.workspaceHomeSwitcherTitle")}),e.jsxs("div",{className:"mobile-workspace-home-group",children:[e.jsxs("button",{type:"button",className:"mobile-workspace-home-row",onClick:()=>b("import"),children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:s("shell.importWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(w,{})})]}),e.jsxs("button",{type:"button",className:"mobile-workspace-home-row",onClick:()=>b("clone"),children:[e.jsx("span",{className:"mobile-workspace-home-row-label",children:s("shell.cloneWorkspaceTitle")}),e.jsx("span",{className:"mobile-workspace-home-row-trailing",children:e.jsx(w,{})})]})]})]})}),e.jsx(Fe,{open:Q==="import",onClose:()=>b(null),onImported:Ne}),e.jsx(Oe,{open:Q==="clone",onClose:()=>b(null),onCloned:xe}),e.jsx(oi,{open:fe,workspaces:u.map(o=>o.workspace),workspaceOptions:M,initialWorkspaceId:(i==null?void 0:i.id)??F??null,onClose:()=>A(!1),onSelect:Te}),e.jsx(qe,{open:we,preferredWorkspaceId:(i==null?void 0:i.id)??null,compactComposer:!0,onClose:()=>X(!1)}),e.jsx(li,{open:ke,notifications:de,archivedNotificationIds:me,showArchivedNotifications:ue,onClose:()=>R(!1),onToggleShowArchivedNotifications:he,onArchiveNotification:pe,onUnarchiveNotification:be,onSelectNotification:o=>{R(!1),o.routePath&&n(o.routePath)}})]})}function H(n){return`git-sidebar.snapshot.${n}`}function B(n){return`terminal-manager.snapshot.${n}`}function w(){return e.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:e.jsx("path",{d:"M6 3.5L10.5 8 6 12.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.6"})})}export{Ci as WorkspaceHomePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as d,B as a,h as u,i as c}from"./index-C2G8Gmf1.js";async function l(){const t=d.getState().platform==="desktop"?"desktop":"web";return await a.request(`/api/client/runtime-config?platform=${encodeURIComponent(t)}`)}async function g(){const n=d.getState(),t=u(n);if(!t)return;const s=await l(),r=p(s.relayTunnel);if(m(t.relayTunnel??null,r))return;const e=new Date().toISOString();if(c(t)){d.updateRuntime({discoveredHosts:n.discoveredHosts.map(i=>i.id===t.id?{...i,relayTunnel:r,updatedAt:e}:i)});return}await d.update({hosts:n.hosts.map(i=>i.id===t.id?{...i,relayTunnel:r,updatedAt:e}:i)})}function p(n){return!n||n.provider!=="codingns_relay"||!n.controlBaseUrl||!n.tunnelDomain||!n.bindingId?null:{provider:n.provider,enabled:n.enabled,controlBaseUrl:n.controlBaseUrl,tunnelDomain:n.tunnelDomain.trim().toLowerCase(),bindingId:n.bindingId,hostFingerprint:n.hostFingerprint,candidateEndpoints:n.candidateEndpoints}}function m(n,t){if(n===t)return!0;if(!n||!t)return n===t;if(n.provider!==t.provider||n.enabled!==t.enabled||n.controlBaseUrl!==t.controlBaseUrl||n.tunnelDomain!==t.tunnelDomain||(n.bindingId??null)!==(t.bindingId??null)||(n.hostFingerprint??null)!==(t.hostFingerprint??null))return!1;const s=n.candidateEndpoints??[],r=t.candidateEndpoints??[];return s.length!==r.length?!1:s.every((e,i)=>{const o=r[i];return e.endpointId===(o==null?void 0:o.endpointId)&&e.kind===o.kind&&e.url===o.url&&e.priority===o.priority&&e.expiresAt===o.expiresAt&&e.source===o.source})}export{l as fetchAuthenticatedClientRuntimeConfig,g as syncActiveHostAuthenticatedRuntimeConfig};
|