@jingyi0605/codingns 0.5.0 → 0.5.5

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.
Files changed (110) hide show
  1. package/dist/public/assets/AdaptiveButlerPage-CUyNL98E.js +3 -0
  2. package/dist/public/assets/App-BFP7LCSC.js +30 -0
  3. package/dist/public/assets/{BootstrapPage-Vu5oEJ8z.js → BootstrapPage-G74dX2Us.js} +1 -1
  4. package/dist/public/assets/ConversationPage-Bz0_tvvM.js +2 -0
  5. package/dist/public/assets/{DesktopDetachPreviewPage-BgeEqbc5.js → DesktopDetachPreviewPage-IV7oEdOX.js} +1 -1
  6. package/dist/public/assets/DesktopWindowPage-BBmHyRg5.js +2 -0
  7. package/dist/public/assets/FileContextPanel--FVTxDrq.js +1 -0
  8. package/dist/public/assets/GitSidebar-DAiSi9oc.js +6 -0
  9. package/dist/public/assets/{MobileCreateSessionSheet-DLq5qPkx.js → MobileCreateSessionSheet-DqVwz_Hp.js} +1 -1
  10. package/dist/public/assets/MobileSheet-D1lMrcvD.js +1 -0
  11. package/dist/public/assets/{MobileTopHeaderFrame-DArgZI7L.js → MobileTopHeaderFrame-COTc7cRr.js} +1 -1
  12. package/dist/public/assets/{MobileWorkspaceSwitcherHeader-0ywJKfBQ.js → MobileWorkspaceSwitcherHeader-DJPV9ym2.js} +1 -1
  13. package/dist/public/assets/RelayConnectEntryPage-dSwU8VzK.js +1 -0
  14. package/dist/public/assets/{ServerSettingsModal-izoYMx9U.js → ServerSettingsModal-B34ms3ze.js} +1 -1
  15. package/dist/public/assets/{SessionIndexPage-C5aG8FIv.js → SessionIndexPage-D3tG1gmM.js} +1 -1
  16. package/dist/public/assets/SettingsPage-B3-6-5GL.js +1 -0
  17. package/dist/public/assets/TerminalManagerPanel-DhuTEdzV.js +1 -0
  18. package/dist/public/assets/{TerminalPage-CtKXIU0h.js → TerminalPage-DpsvQQVR.js} +19 -19
  19. package/dist/public/assets/{TerminalRuntimeFallbackModal-CRhOQOsT.js → TerminalRuntimeFallbackModal-CNzOt5v5.js} +1 -1
  20. package/dist/public/assets/{ToolFilesPage-DcYPsS-e.js → ToolFilesPage-BX9QDi9Y.js} +1 -1
  21. package/dist/public/assets/{ToolGitPage-CsPl89ty.js → ToolGitPage-4VtFox3p.js} +1 -1
  22. package/dist/public/assets/{ToolProcessesPage-D0dvR8xK.js → ToolProcessesPage-DZJC6Qnt.js} +1 -1
  23. package/dist/public/assets/{ToolsHomePage-4fP-KRiv.js → ToolsHomePage-D7JbrAWv.js} +1 -1
  24. package/dist/public/assets/{WorkbenchLandingPage-kvlfyxRo.js → WorkbenchLandingPage-C0yqnzqh.js} +1 -1
  25. package/dist/public/assets/WorkbenchLayout-Brlj8K3i.js +3 -0
  26. package/dist/public/assets/{WorkbenchModal-Ctob14VR.js → WorkbenchModal-CbDxaCOR.js} +1 -1
  27. package/dist/public/assets/WorkbenchShellRoute-BMcnFadA.css +1 -0
  28. package/dist/public/assets/WorkbenchShellRoute-puGpdDFY.js +1 -0
  29. package/dist/public/assets/{WorkspaceDebugDetailPage-Com5kEXJ.js → WorkspaceDebugDetailPage-fTGweC9N.js} +1 -1
  30. package/dist/public/assets/WorkspaceDetailPage-BtaIzSDB.js +1 -0
  31. package/dist/public/assets/WorkspaceHomePage-CUmmYDrM.js +1 -0
  32. package/dist/public/assets/client-runtime-manager-RHFa_iWo.js +1 -0
  33. package/dist/public/assets/{default-session-permission-mode-CcGwR4Kk.js → default-session-permission-mode-Cu5SreTG.js} +1 -1
  34. package/dist/public/assets/file-tree-icon-BMKuc5pw.js +31 -0
  35. package/dist/public/assets/index-Cq3ue0za.css +1 -0
  36. package/dist/public/assets/index-DEbFT-Aq.js +42 -0
  37. package/dist/public/assets/{preferences-service-KIYeE2gk.js → preferences-service-gv_9vGKz.js} +1 -1
  38. package/dist/public/assets/session-runtime-machine-Bfnxkk9B.js +17 -0
  39. package/dist/public/assets/{terminal-runtime-meta-AWXJpN4r.js → terminal-runtime-meta-B9xJGY__.js} +1 -1
  40. package/dist/public/assets/{useRegisteredDebugTemplates-DBDRdptr.js → useRegisteredDebugTemplates-CDfl54Wt.js} +1 -1
  41. package/dist/public/index.html +2 -2
  42. package/dist/server/config/env.d.ts +1 -0
  43. package/dist/server/config/env.js +36 -0
  44. package/dist/server/config/env.js.map +1 -1
  45. package/dist/server/modules/client/client-controller.js +1 -1
  46. package/dist/server/modules/client/client-controller.js.map +1 -1
  47. package/dist/server/modules/client/client-service.d.ts +16 -2
  48. package/dist/server/modules/client/client-service.js +21 -3
  49. package/dist/server/modules/client/client-service.js.map +1 -1
  50. package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-packets.d.ts +16 -1
  51. package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-packets.js.map +1 -1
  52. package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-protocol.d.ts +2 -1
  53. package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-protocol.js +18 -0
  54. package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-protocol.js.map +1 -1
  55. package/dist/server/modules/relay-tunnel/relay-tunnel-client-context.d.ts +13 -0
  56. package/dist/server/modules/relay-tunnel/relay-tunnel-client-context.js +2 -0
  57. package/dist/server/modules/relay-tunnel/relay-tunnel-client-context.js.map +1 -0
  58. package/dist/server/modules/relay-tunnel/relay-tunnel-gateway-service.d.ts +6 -0
  59. package/dist/server/modules/relay-tunnel/relay-tunnel-gateway-service.js +110 -10
  60. package/dist/server/modules/relay-tunnel/relay-tunnel-gateway-service.js.map +1 -1
  61. package/dist/server/modules/relay-tunnel/relay-tunnel-runtime-adapter.d.ts +16 -4
  62. package/dist/server/modules/relay-tunnel/relay-tunnel-runtime-adapter.js +216 -101
  63. package/dist/server/modules/relay-tunnel/relay-tunnel-runtime-adapter.js.map +1 -1
  64. package/dist/server/modules/relay-tunnel/relay-tunnel-service.d.ts +6 -2
  65. package/dist/server/modules/relay-tunnel/relay-tunnel-service.js +457 -40
  66. package/dist/server/modules/relay-tunnel/relay-tunnel-service.js.map +1 -1
  67. package/dist/server/modules/sessions/session-activity-inspector.js +6 -8
  68. package/dist/server/modules/sessions/session-activity-inspector.js.map +1 -1
  69. package/dist/server/modules/sessions/session-history-service.d.ts +1 -0
  70. package/dist/server/modules/sessions/session-history-service.js +62 -7
  71. package/dist/server/modules/sessions/session-history-service.js.map +1 -1
  72. package/dist/server/modules/workbench/snapshot-revision.d.ts +4 -0
  73. package/dist/server/modules/workbench/snapshot-revision.js +13 -0
  74. package/dist/server/modules/workbench/snapshot-revision.js.map +1 -0
  75. package/dist/server/modules/workbench/workbench-service.d.ts +33 -2
  76. package/dist/server/modules/workbench/workbench-service.js +39 -4
  77. package/dist/server/modules/workbench/workbench-service.js.map +1 -1
  78. package/dist/server/modules/workbench/workspace-panel-snapshot-service.d.ts +6 -1
  79. package/dist/server/modules/workbench/workspace-panel-snapshot-service.js +10 -8
  80. package/dist/server/modules/workbench/workspace-panel-snapshot-service.js.map +1 -1
  81. package/dist/server/server/create-server.js +11 -6
  82. package/dist/server/server/create-server.js.map +1 -1
  83. package/dist/server/types/domain.d.ts +9 -0
  84. package/dist/server/ws/workbench-ws-hub.js +295 -43
  85. package/dist/server/ws/workbench-ws-hub.js.map +1 -1
  86. package/dist/server/ws/ws-server.js +141 -8
  87. package/dist/server/ws/ws-server.js.map +1 -1
  88. package/node_modules/@codingns/session-sync-core/dist/providers/codex.js +33 -6
  89. package/node_modules/@codingns/session-sync-core/dist/providers/codex.js.map +1 -1
  90. package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js +78 -36
  91. package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js.map +1 -1
  92. package/package.json +1 -1
  93. package/dist/public/assets/AdaptiveButlerPage-R-XZw7pd.js +0 -3
  94. package/dist/public/assets/App-DkvE5EyM.js +0 -30
  95. package/dist/public/assets/ConversationPage-Cjpg6g0J.js +0 -2
  96. package/dist/public/assets/DesktopWindowPage-1WelvxdH.js +0 -2
  97. package/dist/public/assets/FileContextPanel-D_ghXJuW.js +0 -1
  98. package/dist/public/assets/GitSidebar-D9f9Jxwr.js +0 -6
  99. package/dist/public/assets/MobileSheet-DLg-gX1t.js +0 -1
  100. package/dist/public/assets/SettingsPage-HJIC-P-4.js +0 -1
  101. package/dist/public/assets/TerminalManagerPanel-DpyUTo9k.js +0 -1
  102. package/dist/public/assets/WorkbenchLayout-ByFw4eeu.js +0 -3
  103. package/dist/public/assets/WorkbenchShellRoute-BUITtdAg.css +0 -1
  104. package/dist/public/assets/WorkbenchShellRoute-Kw7JEZI3.js +0 -1
  105. package/dist/public/assets/WorkspaceDetailPage-D0Lrx4Uz.js +0 -1
  106. package/dist/public/assets/WorkspaceHomePage-wR8d3aP9.js +0 -1
  107. package/dist/public/assets/file-tree-icon-UFVoVzhM.js +0 -31
  108. package/dist/public/assets/index-Byp9hJ0c.js +0 -42
  109. package/dist/public/assets/index-_52jxu4a.css +0 -1
  110. package/dist/public/assets/session-runtime-machine-0KNSSPp5.js +0 -17
@@ -0,0 +1 @@
1
+ import{b as r,j as e,t as s}from"./index-DEbFT-Aq.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-Brlj8K3i.js";import{s as Je}from"./butler-records-events-DgWCG364.js";import{a as ne}from"./MobileSheet-D1lMrcvD.js";import{f as Ye,a as te,M as Ze}from"./MobileWorkspaceSwitcherHeader-DJPV9ym2.js";import{u as ei,f as ii}from"./App-BFP7LCSC.js";import{M as oi}from"./MobileCreateSessionSheet-DqVwz_Hp.js";import{W as ni}from"./WorkbenchModal-CbDxaCOR.js";import"./window-BWqRixxq.js";import"./event-DvH9tcej.js";import"./MobileTopHeaderFrame-COTc7cRr.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};
@@ -0,0 +1 @@
1
+ import{e as d,C as a,h as u,i as c}from"./index-DEbFT-Aq.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};
@@ -1 +1 @@
1
- import{d as o}from"./index-Byp9hJ0c.js";function t(){const e=o.getState().profile.defaultPermissionMode;return e==="default"?null:e}export{t as g};
1
+ import{d as o}from"./index-DEbFT-Aq.js";function t(){const e=o.getState().profile.defaultPermissionMode;return e==="default"?null:e}export{t as g};