dorkos 0.123.0 → 0.124.1
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/bin/cli.js +1688 -837
- package/dist/browser/native/package-manifest.json +1 -1
- package/dist/browser/source-manifest.json +1 -1
- package/dist/client/assets/{AboutPage-BmtoPqP9.js → AboutPage-DHaZvsJE.js} +1 -1
- package/dist/client/assets/{ActivityErrorState-CEzdFJiR.js → ActivityErrorState-BP-qFk2S.js} +1 -1
- package/dist/client/assets/{ActivityPage-mFYgTr3e.js → ActivityPage-Bme3TzdQ.js} +1 -1
- package/dist/client/assets/{ActivityRow-Bkc0kkim.js → ActivityRow-BRZyW9MA.js} +1 -1
- package/dist/client/assets/{AdapterIcon-DVgTrgnM.js → AdapterIcon-BcfquTja.js} +1 -1
- package/dist/client/assets/{AdapterSetupWizard-I03EluU5.js → AdapterSetupWizard-B4I23pBg.js} +2 -2
- package/dist/client/assets/{AgentOptionRow-DI1TzLaR.js → AgentOptionRow-Cb34LtmH.js} +1 -1
- package/dist/client/assets/{AgentPicker-CBYeBzjf.js → AgentPicker-ouNRFSDh.js} +1 -1
- package/dist/client/assets/{AgentRequestCard-DQ6GYoeE.js → AgentRequestCard-B6MHIsxa.js} +3 -3
- package/dist/client/assets/{AppearancePage-62xIPNPn.js → AppearancePage-CutehigK.js} +1 -1
- package/dist/client/assets/ApplyToOverridesDialog-B-wIUI27.js +1 -0
- package/dist/client/assets/{AttentionSignalRow-Coe5pYX6.js → AttentionSignalRow-B1aMjgX_.js} +1 -1
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-D07cg75s.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-CdWF4WLz.js} +1 -1
- package/dist/client/assets/{BindingDialog-DVyxVXZM.js → BindingDialog-BAdueON5.js} +1 -1
- package/dist/client/assets/{BlintzCanvas-BmfkiUQJ.js → BlintzCanvas-b30dG4gx.js} +3 -3
- package/dist/client/assets/{CanvasCsvContent-CRTr-AI7.js → CanvasCsvContent-DGHgSikG.js} +1 -1
- package/dist/client/assets/{CanvasFileContent-rOmY1s3T.js → CanvasFileContent-D1bFaUeh.js} +2 -2
- package/dist/client/assets/{CanvasModel3dContent-D7oRT6ey.js → CanvasModel3dContent-dST7g1v2.js} +2 -2
- package/dist/client/assets/{ChatAppsOff-BmuOTq83.js → ChatAppsOff-DiObvmJS.js} +1 -1
- package/dist/client/assets/{CodeMirrorDiff-DidSWwYJ.js → CodeMirrorDiff-BncI1OY1.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-BUAWGbRo.js → CodeMirrorEditor-DV6psv19.js} +1 -1
- package/dist/client/assets/{CommitmentList-uK4CKaz0.js → CommitmentList-Dx_Ek_Gl.js} +1 -1
- package/dist/client/assets/{CommitmentsPage-BWITH1r2.js → CommitmentsPage-Bca8NMUa.js} +1 -1
- package/dist/client/assets/{ComputerResourceView-adgF_EZU.js → ComputerResourceView-DNVNFTdn.js} +1 -1
- package/dist/client/assets/{ComputerViewer-D87LhxwL.js → ComputerViewer-D8SxJdMm.js} +1 -1
- package/dist/client/assets/{ConnectionAccessLists-BFEFqcSZ.js → ConnectionAccessLists-Bhj1YT15.js} +1 -1
- package/dist/client/assets/{ConnectionsPage-Cd_cLoSY.js → ConnectionsPage-B20JZxoK.js} +2 -2
- package/dist/client/assets/{ConventionPage-BSztD-gU.js → ConventionPage-De645wxU.js} +1 -1
- package/dist/client/assets/{ExtensionPageRoute-BSge6XRv.js → ExtensionPageRoute-nTeiOBRQ.js} +2 -2
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-TO2CUPG0.js → FloatingTanStackRouterDevtools-CqogiFob-DM79UITv.js} +1 -1
- package/dist/client/assets/HandlePage-B08V-om7.js +1 -0
- package/dist/client/assets/{HeartbeatPage-DIJzdOhj.js → HeartbeatPage-CBoUxz6t.js} +1 -1
- package/dist/client/assets/{KeyEntry-DJnzW3Mu.js → KeyEntry-Cug8ocpX.js} +1 -1
- package/dist/client/assets/{LexicalField-BxzNvIjJ.js → LexicalField-Bv_ogmAq.js} +1 -1
- package/dist/client/assets/{ManagesPage-BQj8KbYA.js → ManagesPage-DfJBQKK3.js} +1 -1
- package/dist/client/assets/{Marketplace-CIG5_a_H.js → Marketplace-swCVUbdY.js} +2 -2
- package/dist/client/assets/{MarketplaceSourcesView-16HKvFK-.js → MarketplaceSourcesView-CDZDChpV.js} +1 -1
- package/dist/client/assets/{McpAppFrame-5xlga1jD.js → McpAppFrame-BM9cNPPd.js} +1 -1
- package/dist/client/assets/McpSigninBody-DKyUKrEE.js +1 -0
- package/dist/client/assets/{Model3dViewer-CQ0sA_kr.js → Model3dViewer-rXSL5y2P.js} +1 -1
- package/dist/client/assets/NamePage-JwMDK1JD.js +1 -0
- package/dist/client/assets/{NewDirectMessageMenu-D092y0K9.js → NewDirectMessageMenu-GCEMS5oV.js} +1 -1
- package/dist/client/assets/{NotificationsPage-CskOPdhh.js → NotificationsPage-DSWsOVLa.js} +1 -1
- package/dist/client/assets/{OpenMeshSwitch-BHRm328L.js → OpenMeshSwitch-BTuctDj4.js} +2 -2
- package/dist/client/assets/OperatorIdentityForm-ODDMd2YN.js +1 -0
- package/dist/client/assets/PermissionHistory-41a58Se7.js +1 -0
- package/dist/client/assets/{PermissionsPage-XuPOSYll.js → PermissionsPage-DefmymZ6.js} +1 -1
- package/dist/client/assets/{PersonalityPopover-BrZjxakx.js → PersonalityPopover-7zPVBI1I.js} +1 -1
- package/dist/client/assets/PhotoPage-DlOVhkW9.js +1 -0
- package/dist/client/assets/{PreviewRefusedNotice-BANdpT9O.js → PreviewRefusedNotice-CwGlBJ7U.js} +1 -1
- package/dist/client/assets/{ProfileFields-Dp68ebW9.js → ProfileFields-DVMkpJSb.js} +1 -1
- package/dist/client/assets/{ProfilePanelContainer-BKwGdI90.js → ProfilePanelContainer-RrhoPD3T.js} +1 -1
- package/dist/client/assets/{ProfileRolePicker-ClOdfLda.js → ProfileRolePicker-CXRVBCAu.js} +1 -1
- package/dist/client/assets/{PromptSuggestionChips-zcW4UJ_O.js → PromptSuggestionChips-bBroJdTi.js} +1 -1
- package/dist/client/assets/{ReportsToPopover-BwDVGqFg.js → ReportsToPopover-CfPatsWM.js} +1 -1
- package/dist/client/assets/{RoomSurface-CSKIvyHH.js → RoomSurface-CdgCdV6h.js} +10 -10
- package/dist/client/assets/{RoomsPage-CAvrRbPk.js → RoomsPage-C3dDp1Mb.js} +1 -1
- package/dist/client/assets/{RunsOnPopover-CQ4t9EZ-.js → RunsOnPopover-BcKjfQi-.js} +1 -1
- package/dist/client/assets/{RuntimeConnectFlow--fVpIf0B.js → RuntimeConnectFlow-DCIRnvOH.js} +1 -1
- package/dist/client/assets/{RuntimeSetupDialog-COpyPrqL.js → RuntimeSetupDialog-Bg-0b-LC.js} +1 -1
- package/dist/client/assets/SeenDevices-nMsGUQTv.js +19 -0
- package/dist/client/assets/{SessionsPage-FDyYzuXs.js → SessionsPage-Cqfx4FGW.js} +1 -1
- package/dist/client/assets/SettingsDialog-C8r2igJ_.js +12 -0
- package/dist/client/assets/{SkillsPage-PLXEY0LB.js → SkillsPage-BleHQavF.js} +1 -1
- package/dist/client/assets/TaskDialogWrapper-BhTEvf-u.js +1 -0
- package/dist/client/assets/{TasksEmptyState-8RZxhRh6.js → TasksEmptyState-Bprx1k8M.js} +2 -2
- package/dist/client/assets/{TasksPage-C-EtQXKb.js → TasksPage-Dub39yEJ.js} +1 -1
- package/dist/client/assets/{TeamComputerEntry-qx_19Htj.js → TeamComputerEntry-CJ-NG0u5.js} +1 -1
- package/dist/client/assets/ToolsPage-IsD6M-ZW.js +2 -0
- package/dist/client/assets/{TopologyGraph-1wtG1BE9.js → TopologyGraph-CwyasvFI.js} +2 -2
- package/dist/client/assets/{TourHost-C664E8OY.js → TourHost-BYfztuPb.js} +1 -1
- package/dist/client/assets/{UnlinkDialog-Di1oBFA_.js → UnlinkDialog-BKhgxVdF.js} +1 -1
- package/dist/client/assets/{WidgetErrorCard-BfgGzyqg.js → WidgetErrorCard-1NyzIJBj.js} +7 -7
- package/dist/client/assets/_shell-Ct2Bz7D0.js +80 -0
- package/dist/client/assets/{_shell._home-Hz78BY6-.js → _shell._home-xWj7wO5z.js} +1 -1
- package/dist/client/assets/{_shell._home.activity-BxvI0gkw.js → _shell._home.activity-BqcLoaB1.js} +1 -1
- package/dist/client/assets/{_shell._home.index-Cqq81f3P.js → _shell._home.index-D4sQsKKk.js} +1 -1
- package/dist/client/assets/{_shell._home.tasks-Cth56CwC.js → _shell._home.tasks--UhQB6h3.js} +1 -1
- package/dist/client/assets/{_shell._home.workspaces-DkoOJSWz.js → _shell._home.workspaces-BPFD8Of2.js} +1 -1
- package/dist/client/assets/_shell.channels-CnFdvRzc.js +10 -0
- package/dist/client/assets/_shell.connections-Ik01wS5M.js +1 -0
- package/dist/client/assets/{_shell.feedback-requests-BTxHdsfb.js → _shell.feedback-requests-Czu42kzo.js} +2 -2
- package/dist/client/assets/_shell.marketplace-Cezv-i16.js +1 -0
- package/dist/client/assets/_shell.marketplace_.sources-BTENmr4W.js +1 -0
- package/dist/client/assets/_shell.session-BjevHF_O.js +63 -0
- package/dist/client/assets/{_shell.team-ZxGwa39m.js → _shell.team-UfaJqohh.js} +4 -4
- package/dist/client/assets/_shell.x._extensionId-0OO_Xr72.js +1 -0
- package/dist/client/assets/_shell.x._extensionId_._-0OO_Xr72.js +1 -0
- package/dist/client/assets/{abnfDiagram-WEYOIA3C-CzqPVMdw.js → abnfDiagram-WEYOIA3C-oxkfGyl6.js} +1 -1
- package/dist/client/assets/{access-copy-Dj09Xk4b.js → access-copy-Dggxx2cX.js} +1 -1
- package/dist/client/assets/{arc-Bgy7ExYl.js → arc-CqQdP0Qe.js} +1 -1
- package/dist/client/assets/{architectureDiagram-ZHVYKT53-DYfb2p9r.js → architectureDiagram-ZHVYKT53-89xM7zJD.js} +1 -1
- package/dist/client/assets/{banner-dlsHTWSf.js → banner-DqJ2pM0Y.js} +1 -1
- package/dist/client/assets/{blockDiagram-RJAE7QA3-BkOzLL8s.js → blockDiagram-RJAE7QA3-CcxwDmZC.js} +1 -1
- package/dist/client/assets/{c4Diagram-XDPPPE54-CsZm4qpD.js → c4Diagram-XDPPPE54-DCIhIyXa.js} +1 -1
- package/dist/client/assets/{card-Dj6ZfRgu.js → card-DT-vFAns.js} +1 -1
- package/dist/client/assets/channel-Ngk70nQZ.js +1 -0
- package/dist/client/assets/{chunk-2E7WHVMD-GA96Jfps.js → chunk-2E7WHVMD-BfWEXcCj.js} +1 -1
- package/dist/client/assets/{chunk-2Q5K7J3B-CW2i0IkT.js → chunk-2Q5K7J3B-KLXLZXlR.js} +1 -1
- package/dist/client/assets/{chunk-4EMNKR2T-BwFvnPZg.js → chunk-4EMNKR2T-CL5Gttmj.js} +1 -1
- package/dist/client/assets/{chunk-55XCU76K-MOezzAAB.js → chunk-55XCU76K-cfAl84Mv.js} +1 -1
- package/dist/client/assets/{chunk-5VM5RSS4-woru6zOC.js → chunk-5VM5RSS4-BqUyGgoH.js} +1 -1
- package/dist/client/assets/{chunk-JWPE2WC7-CUrKlP2M.js → chunk-JWPE2WC7-BWr2ST9i.js} +1 -1
- package/dist/client/assets/{chunk-VQ5W62QI-CqZ2cdEu.js → chunk-VQ5W62QI-V5zYx50O.js} +1 -1
- package/dist/client/assets/{chunk-XXDRQBXY-ByAcvWaE.js → chunk-XXDRQBXY-gnvheN_J.js} +1 -1
- package/dist/client/assets/{chunk-ZCHMQSOR-3nkba9kj.js → chunk-ZCHMQSOR-ClGxxZvV.js} +2 -2
- package/dist/client/assets/{classDiagram-v2-4MYWR3UA-B-zZKAmI.js → classDiagram-v2-4MYWR3UA-DvmHzDb5.js} +1 -1
- package/dist/client/assets/{command-BAOEURY7.js → command-CNx4L11m.js} +1 -1
- package/dist/client/assets/{cose-bilkent-JH36ORCC-sCKxRv1H.js → cose-bilkent-JH36ORCC-Df8nXBRj.js} +1 -1
- package/dist/client/assets/{cpu-TtYQqONc.js → cpu-D8KJEkdh.js} +1 -1
- package/dist/client/assets/{cynefin-EF2NZ3EQ-CXzvL5Cg.js → cynefin-EF2NZ3EQ-CAn6ufHs.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-WF24UDRP-C0wjhu9X.js → cynefinDiagram-WF24UDRP-Cep_NrRw.js} +1 -1
- package/dist/client/assets/{dagre-NK4GIZVX-Doi2IPkY.js → dagre-NK4GIZVX-sWD3z9wf.js} +1 -1
- package/dist/client/assets/{diagram-CBK3MWTC-11TVuPel.js → diagram-CBK3MWTC-CUpaBATr.js} +1 -1
- package/dist/client/assets/{diagram-I5XIIV2D-CJq7fHFM.js → diagram-I5XIIV2D-BejWB2ry.js} +1 -1
- package/dist/client/assets/{diagram-ODIL2UCW-2Ae6unuU.js → diagram-ODIL2UCW-BGKJfNk9.js} +1 -1
- package/dist/client/assets/{diagram-PFBEJUXE-BXza6_iz.js → diagram-PFBEJUXE-V0dP8H8k.js} +1 -1
- package/dist/client/assets/{diagram-RJA3I4VV-Z0i3uBW9.js → diagram-RJA3I4VV-Bf5dVsFX.js} +1 -1
- package/dist/client/assets/{diagram-TYUNFSNR-Dq_-g1oP.js → diagram-TYUNFSNR-CLrMSqb4.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-V4P3TTPT-vxzIvg-W.js → ebnfDiagram-V4P3TTPT-BGG4CWA0.js} +1 -1
- package/dist/client/assets/{elk-QONTBCTQ-BBIXXtg_.js → elk-QONTBCTQ-bf9D6f0w.js} +1 -1
- package/dist/client/assets/{empty-state-kISAAp0z.js → empty-state-CDoXnrKn.js} +1 -1
- package/dist/client/assets/{erDiagram-KYQIGQAA-Bk2MeLBx.js → erDiagram-KYQIGQAA-fEUv-33P.js} +1 -1
- package/dist/client/assets/{execution-config-DYFe-VNC.js → execution-config-Ca9MDOtV.js} +1 -1
- package/dist/client/assets/{file-DEt4KgZG.js → file-CiyVL55_.js} +1 -1
- package/dist/client/assets/{file-exclamation-point-QqXJhXD9.js → file-exclamation-point-DaFRIKco.js} +1 -1
- package/dist/client/assets/{file-text-CRw31ZWd.js → file-text-DsnD-A8g.js} +1 -1
- package/dist/client/assets/{find-latest-widget-fence-B3aaiBNI.js → find-latest-widget-fence-CNsnCgbB.js} +1 -1
- package/dist/client/assets/{flowDiagram-IUGLLWBU-B53m4r8u.js → flowDiagram-IUGLLWBU-CRbeSDod.js} +1 -1
- package/dist/client/assets/{form-Bjhk9zOn.js → form-Cru78aT-.js} +1 -1
- package/dist/client/assets/{format-cron-9tmNIcgl.js → format-cron-9K38-tn1.js} +1 -1
- package/dist/client/assets/{ganttDiagram-R7GPNTJY-CS6TN3R1.js → ganttDiagram-R7GPNTJY-Mkk7zgs_.js} +1 -1
- package/dist/client/assets/{git-branch-DWerghmw.js → git-branch-CONwEYiR.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-D096ZtqE.js → gitGraphDiagram-PDYL7XHY-Drre0vyA.js} +1 -1
- package/dist/client/assets/{graph-DQpTuPmX.js → graph-BJlnKWgo.js} +1 -1
- package/dist/client/assets/{heart-CRkjVW7-.js → heart-CqwUlIUG.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-DoVCXOMU.js → highlighted-body-KPVGNVTW-e4LXC_pS.js} +1 -1
- package/dist/client/assets/image-lightbox-DHDtzoja.js +1 -0
- package/dist/client/assets/{image-off-VyMBVwgK.js → image-off-DZuLkaRJ.js} +2 -2
- package/dist/client/assets/{index-DN2sTT2U.js → index-1yEXEZiH.js} +1 -1
- package/dist/client/assets/{index-BBcAekWE.js → index-A41zxoWk.js} +1 -1
- package/dist/client/assets/{index-CEVwhauU.js → index-B25gvCK_.js} +1 -1
- package/dist/client/assets/index-B9bZYNKR.js +1 -0
- package/dist/client/assets/{index-TnoaFCrj.js → index-BBmkfbXd.js} +1 -1
- package/dist/client/assets/{index-CvhR1oZB.js → index-BDD2EyoW.js} +1 -1
- package/dist/client/assets/{index-BcFMs7lK.js → index-BFNy-Yp3.js} +1 -1
- package/dist/client/assets/{index-CyGRWyhV.js → index-BIB-maE5.js} +1 -1
- package/dist/client/assets/{index-DBo2XfNv.js → index-BKp2B9JS.js} +1 -1
- package/dist/client/assets/index-BLP5O7X9.js +1 -0
- package/dist/client/assets/{index-2EaVZrJe.js → index-BTjZIgFn.js} +1 -1
- package/dist/client/assets/{index-DKWpwwxo.js → index-BV2Ezdxv.js} +1 -1
- package/dist/client/assets/{index-igLqtuoO.js → index-B_0LYi32.js} +1 -1
- package/dist/client/assets/{index-BpjEclkM.js → index-Bd7vUYhr.js} +1 -1
- package/dist/client/assets/{index-_emDKzsu.js → index-Bo7x9IkO.js} +1 -1
- package/dist/client/assets/{index-C3sW6rkN.js → index-BtDxwJsM.js} +22 -20
- package/dist/client/assets/{index-C6Fo2htT.js → index-By58MgcZ.js} +1 -1
- package/dist/client/assets/index-C3cvP8Fo.js +1033 -0
- package/dist/client/assets/{index-Cs3WB8yn.js → index-CVuEUzi5.js} +1 -1
- package/dist/client/assets/{index-n3-zWcH-.js → index-CoWJD3Jg.js} +2 -2
- package/dist/client/assets/{index-Ctqe81qr.js → index-CyVH876g.js} +1 -1
- package/dist/client/assets/index-D67Kfy-M.js +1 -0
- package/dist/client/assets/{index-C6udJCgz.js → index-DAlpmAIA.js} +1 -1
- package/dist/client/assets/{index-setKr4xl.js → index-DDNwNOHF.js} +1 -1
- package/dist/client/assets/{index-COMRALJO.js → index-DL8ISRMH.js} +1 -1
- package/dist/client/assets/{index-Czm6C7FZ.js → index-DabU6r9W.js} +3 -3
- package/dist/client/assets/{index-CDuYKaGY.js → index-DdJBZE0H.js} +1 -1
- package/dist/client/assets/{index-CiVeycsn.js → index-DijWcSDZ.js} +5 -5
- package/dist/client/assets/index-DyRGZyur.css +1 -0
- package/dist/client/assets/{index-DmFNztTX.js → index-DzwZJuO1.js} +1 -1
- package/dist/client/assets/{index-Csr_C1sk.js → index-HR8BYVRQ.js} +1 -1
- package/dist/client/assets/{index-BLkXoquZ.js → index-LEcodwyW.js} +1 -1
- package/dist/client/assets/index-UPF8suf2.js +1 -0
- package/dist/client/assets/{index-rCvQat0D.js → index-Vz7VUm9l.js} +1 -1
- package/dist/client/assets/index-YW-v746p.js +1 -0
- package/dist/client/assets/{index-DgyhdQnI.js → index-cI2u8WZS.js} +1 -1
- package/dist/client/assets/{index-DNzk9m1D.js → index-iTQUa_b2.js} +3 -3
- package/dist/client/assets/{index-b9p_y2Ql.js → index-mZqojApH.js} +1 -1
- package/dist/client/assets/{index-gIQ7FrL9.js → index-pVFjKNjX.js} +1 -1
- package/dist/client/assets/{index-t3eRSGcT.js → index-skAhJyIF.js} +1 -1
- package/dist/client/assets/{index-BiFJIg4n.js → index-vJy88bwb.js} +1 -1
- package/dist/client/assets/index-wY5OcS4a.js +43 -0
- package/dist/client/assets/{index-B2rBVMNl.js → index-x1yAu9zJ.js} +1 -1
- package/dist/client/assets/index-xAgihCJ7.js +1 -0
- package/dist/client/assets/{index.esm-bLeQzVWT.js → index.esm-BUPoRUaG.js} +1 -1
- package/dist/client/assets/{infoDiagram-MVDRKAX5-nN_N76Fn.js → infoDiagram-MVDRKAX5-B_Wyzufh.js} +1 -1
- package/dist/client/assets/{inline-code-D9bLKHjY.js → inline-code-BIzGDx6z.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-CiLFbWXd.js → ishikawaDiagram-HPEHV2GE-BDk2-6Pd.js} +1 -1
- package/dist/client/assets/{journeyDiagram-BOSHW7O7-Dn3yOv96.js → journeyDiagram-BOSHW7O7-7qf9KWEQ.js} +1 -1
- package/dist/client/assets/{kanban-definition-FNSA4HC5-JxiBdBQC.js → kanban-definition-FNSA4HC5-CFYDQmXn.js} +1 -1
- package/dist/client/assets/{layers-DTnLoRvE.js → layers-C9tVVcXg.js} +1 -1
- package/dist/client/assets/{lightbulb-CRKLr5q3.js → lightbulb-f4jtsAh0.js} +1 -1
- package/dist/client/assets/{link-2-hgHg-lyw.js → link-2-ZNlK1BG1.js} +1 -1
- package/dist/client/assets/{list-runtime-types-Bb33QiMC.js → list-runtime-types-CqO-QFYD.js} +1 -1
- package/dist/client/assets/{markdown-content-D0FpU2cz.js → markdown-content-DaEVxezf.js} +1 -1
- package/dist/client/assets/{mention-pill-uuaUvwSW.js → mention-pill-BiCPflY-.js} +1 -1
- package/dist/client/assets/{mermaid.core-x3Hh6iut.js → mermaid.core-SX8SzrsU.js} +4 -4
- package/dist/client/assets/{message-square-off-B8N6YF9R.js → message-square-off-_qbedNGF.js} +1 -1
- package/dist/client/assets/{mindmap-definition-6OY57UG3-D0SEv5Re.js → mindmap-definition-6OY57UG3-BloJIArH.js} +1 -1
- package/dist/client/assets/{more-details-CadxnGyH.js → more-details-CdJT0Ehl.js} +1 -1
- package/dist/client/assets/{owner-notice-CJHyha58.js → owner-notice-BDafFD_I.js} +1 -1
- package/dist/client/assets/{package-B8G7jQm-.js → package-Cb7lEm7t.js} +1 -1
- package/dist/client/assets/{page-container-Bb-_N7lw.js → page-container-DsRgIMAL.js} +1 -1
- package/dist/client/assets/{paperclip-BDeYGKqh.js → paperclip-DNu1VtoX.js} +1 -1
- package/dist/client/assets/{path-input-BIfexEKz.js → path-input-D3O71b-X.js} +1 -1
- package/dist/client/assets/{pegDiagram-ECIUJNBX-7ivMd0-b.js → pegDiagram-ECIUJNBX-Di48kPNu.js} +1 -1
- package/dist/client/assets/{pieDiagram-GNMPY74T-DGDkbFvu.js → pieDiagram-GNMPY74T-DY8B_SPD.js} +1 -1
- package/dist/client/assets/{plug-wP1d6OUX.js → plug-IIS_cL9-.js} +1 -1
- package/dist/client/assets/{primer-trigger-CEli_z4n.js → primer-trigger-DurKYe8C.js} +2 -2
- package/dist/client/assets/{profile-errors-C1qSJkiG.js → profile-errors-BdhZfdvZ.js} +1 -1
- package/dist/client/assets/{progress-DmUieXLn.js → progress-g5kkqvlR.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-D57K4MC3-AFQRVSsK.js → quadrantDiagram-D57K4MC3-Depv_dON.js} +1 -1
- package/dist/client/assets/{query-error-state--8AnWSSn.js → query-error-state-PuLGD7Jp.js} +1 -1
- package/dist/client/assets/{radio-mkA-Sqe0.js → radio-QOLZSBz1.js} +1 -1
- package/dist/client/assets/{railroadDiagram-Y72NRBL7-3QBa2d3j.js → railroadDiagram-Y72NRBL7-BfD2AiZM.js} +1 -1
- package/dist/client/assets/registry-Ck8p6n1T.js +1 -0
- package/dist/client/assets/{relay-trace-schemas-fScydQ3A.js → relay-trace-schemas-DF_DfZ7s.js} +2 -2
- package/dist/client/assets/{requirementDiagram-EQYSW5RA-BVBqcASy.js → requirementDiagram-EQYSW5RA-B1iTjrkD.js} +1 -1
- package/dist/client/assets/{room-files-source-BhkPUTiP.js → room-files-source-g1th8mWs.js} +2 -2
- package/dist/client/assets/{rotate-ccw-clock-DiuTseKz.js → rotate-ccw-clock-BGwYMaGL.js} +1 -1
- package/dist/client/assets/{rotate-cw-DvoxWwSx.js → rotate-cw-B4Y0q4GY.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-SY24JHO5-DFjfOD38.js → sankeyDiagram-SY24JHO5-D5TzVJrQ.js} +1 -1
- package/dist/client/assets/{scroll-area-DYyyRqW_.js → scroll-area-BvScZKSa.js} +1 -1
- package/dist/client/assets/{search-x-CA-FzEqZ.js → search-x-CqN5twBj.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-BLEHNHQU-Cr9LzoSF.js → sequenceDiagram-BLEHNHQU-BhUahaNf.js} +1 -1
- package/dist/client/assets/{shield-x-B0W_7qwR.js → shield-x-DHJrwtKp.js} +1 -1
- package/dist/client/assets/{signed-in-X2utDqQS.js → signed-in-BmywDpR5.js} +1 -1
- package/dist/client/assets/{sizeCapture-INFHLROL-Do_jfNyT.js → sizeCapture-INFHLROL-D2Vi1Kq9.js} +1 -1
- package/dist/client/assets/{soul-file-DgfhKQIK.js → soul-file-BMpVFN7U.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-BCi9yk_0.js → stateDiagram-v2-A6IESKWZ-b9gSbZnF.js} +1 -1
- package/dist/client/assets/{swimlanes-B3ENRKFQ-3SSAw2av.js → swimlanes-B3ENRKFQ-i47jxLY6.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-CA9gW19w.js +8 -0
- package/dist/client/assets/{table-DvU_oS4E.js → table-CN2HCi4p.js} +1 -1
- package/dist/client/assets/{terminal-Dw2QZ7Dh.js → terminal-BORQniao.js} +1 -1
- package/dist/client/assets/{timeline-definition-JXYKGLGB-DTLPXTMA.js → timeline-definition-JXYKGLGB-eY5gj0js.js} +1 -1
- package/dist/client/assets/{trust-posture-2MR0ap9o.js → trust-posture-Bcyy5Fub.js} +1 -1
- package/dist/client/assets/{unplug-CAVOLB2R.js → unplug-lkD35Rwp.js} +1 -1
- package/dist/client/assets/{unverified-catalog-notice-u4ikVg8J.js → unverified-catalog-notice-DiCIrrhU.js} +1 -1
- package/dist/client/assets/{use-adapter-catalog-BQKfRxXC.js → use-adapter-catalog-BrqVd-47.js} +1 -1
- package/dist/client/assets/{use-bindings-BV6HA0MD.js → use-bindings-CU2RSXOy.js} +1 -1
- package/dist/client/assets/{use-composer-prefs-DCSzOnEO.js → use-composer-prefs-Dy2oTM8Y.js} +1 -1
- package/dist/client/assets/{use-connector-management-fr1tx-GZ.js → use-connector-management-5oRqzydY.js} +1 -1
- package/dist/client/assets/{use-deep-link-scroll-v02TbidQ.js → use-deep-link-scroll-Bg5nW8qq.js} +1 -1
- package/dist/client/assets/{use-delete-binding-CnziYpXo.js → use-delete-binding-qeyRkvR1.js} +1 -1
- package/dist/client/assets/{use-dev-links-k4YWFO1v.js → use-dev-links-FY4J_PjA.js} +1 -1
- package/dist/client/assets/{use-external-adapter-catalog-DoGUfa2F.js → use-external-adapter-catalog-HiWFZZrW.js} +1 -1
- package/dist/client/assets/{use-full-activity-feed-CQNxgxnw.js → use-full-activity-feed-K1uk9Wya.js} +1 -1
- package/dist/client/assets/use-is-below-desktop-Cu_jKnft.js +1 -0
- package/dist/client/assets/use-is-hub-BX7ypNRJ.js +1 -0
- package/dist/client/assets/{use-jump-back-in-BuO6A0P7.js → use-jump-back-in-BjZ8EswV.js} +3 -3
- package/dist/client/assets/{use-local-browser-BNzN5O1P.js → use-local-browser-CTFiF0wf.js} +1 -1
- package/dist/client/assets/{use-mesh-topology-CpIDE8lD.js → use-mesh-topology-CafidaIH.js} +1 -1
- package/dist/client/assets/{use-mounted-ref-BAO3qunF.js → use-mounted-ref-B38uSLCx.js} +1 -1
- package/dist/client/assets/{use-notification-prefs-CtqeH5Pk.js → use-notification-prefs-m9XSNB6W.js} +1 -1
- package/dist/client/assets/{use-panel-tab-placements-DFobGBRm.js → use-panel-tab-placements-D9n6rNJ1.js} +1 -1
- package/dist/client/assets/use-pending-read-BoV-UI1E.js +1 -0
- package/dist/client/assets/{use-personality-commit-BvqCwzAC.js → use-personality-commit-ChLQfLrK.js} +1 -1
- package/dist/client/assets/{use-promo-activation-Dz5cYm-X.js → use-promo-activation-DbJDgp4_.js} +3 -3
- package/dist/client/assets/{use-promo-dismissals-CuOsnqnZ.js → use-promo-dismissals-Csw0j0N0.js} +1 -1
- package/dist/client/assets/{use-pulse-freshness-qcTH6PM7.js → use-pulse-freshness-BIZ7daHW.js} +1 -1
- package/dist/client/assets/{use-relay-config-1mAMDNbc.js → use-relay-config-hUB3lVFv.js} +1 -1
- package/dist/client/assets/{use-room-follow-claim-CCGhsyH3.js → use-room-follow-claim-BpKzhniV.js} +1 -1
- package/dist/client/assets/{use-roving-tab-list-Bsg2dfUx.js → use-roving-tab-list-BtM0bZL7.js} +1 -1
- package/dist/client/assets/{use-session-canvas-awPngMKg.js → use-session-canvas-DRrkNRcL.js} +3 -3
- package/dist/client/assets/use-session-diagnostics-BTNgouum.js +16 -0
- package/dist/client/assets/{use-unclaimed-chats-Db_wuzt0.js → use-unclaimed-chats-BbMZtNG9.js} +1 -1
- package/dist/client/assets/use-update-config-CkWwKNkY.js +1 -0
- package/dist/client/assets/{useMutationState-BvwBDXKc.js → useMutationState-CVpvw27W.js} +1 -1
- package/dist/client/assets/{usecaseDiagram-WPOLBNNX-1zKygEKR.js → usecaseDiagram-WPOLBNNX-CHcpeLg4.js} +1 -1
- package/dist/client/assets/{vennDiagram-Q3Y3IDCW-BR2EbgGY.js → vennDiagram-Q3Y3IDCW-gQbZL_A6.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-IVAIDKWA-D0OwouJc.js → wardleyDiagram-IVAIDKWA-BFH_WHzZ.js} +1 -1
- package/dist/client/assets/{xychartDiagram-4URNHDU4-BM-7_FQQ.js → xychartDiagram-4URNHDU4-B0QpyqeZ.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/drizzle/20261018210140_remote_command_agent_computer_kind.sql +21 -0
- package/dist/drizzle/20261019142317_turn_marks.sql +3 -0
- package/dist/drizzle/20261019185620_dor3037_wifi_holds.sql +8 -0
- package/dist/drizzle/meta/20261018210140_snapshot.json +14027 -0
- package/dist/drizzle/meta/20261019142317_snapshot.json +14048 -0
- package/dist/drizzle/meta/20261019185620_snapshot.json +14079 -0
- package/dist/drizzle/meta/_journal.json +21 -0
- package/dist/server/extension-child.cjs +18 -2
- package/dist/server/index.js +64322 -32299
- package/dist/server/index.js.map +2 -2
- package/package.json +4 -4
- package/dist/client/assets/ApplyToOverridesDialog-CrqkeHQb.js +0 -1
- package/dist/client/assets/HandlePage-BKiqymRF.js +0 -1
- package/dist/client/assets/McpSigninBody-COIHpHq_.js +0 -1
- package/dist/client/assets/NamePage-D7W6VMYd.js +0 -1
- package/dist/client/assets/OperatorIdentityForm-C3op6BIC.js +0 -1
- package/dist/client/assets/PermissionHistory-CKebTVkq.js +0 -1
- package/dist/client/assets/PhotoPage-Ch1at4A6.js +0 -1
- package/dist/client/assets/SeenDevices-BPw3UgjX.js +0 -19
- package/dist/client/assets/SettingsDialog-Bdws5dbS.js +0 -12
- package/dist/client/assets/TaskDialogWrapper-CTcW70s8.js +0 -1
- package/dist/client/assets/ToolsPage-D5-fx1EA.js +0 -2
- package/dist/client/assets/_shell-BLTSXXDw.js +0 -80
- package/dist/client/assets/_shell.channels-D_GQU4RB.js +0 -10
- package/dist/client/assets/_shell.connections-DZrlxs4G.js +0 -1
- package/dist/client/assets/_shell.marketplace-CZxkAmFz.js +0 -1
- package/dist/client/assets/_shell.marketplace_.sources-Q0BTQIuE.js +0 -1
- package/dist/client/assets/_shell.session-DvGL0DoX.js +0 -63
- package/dist/client/assets/_shell.x._extensionId-B6Tm5KuT.js +0 -1
- package/dist/client/assets/_shell.x._extensionId_._-B6Tm5KuT.js +0 -1
- package/dist/client/assets/channel-CGffcDRq.js +0 -1
- package/dist/client/assets/image-lightbox-BXzbN27o.js +0 -1
- package/dist/client/assets/index-1qv8ldHx.js +0 -1
- package/dist/client/assets/index-8-iQ6PnT.js +0 -1028
- package/dist/client/assets/index-BFitbVs4.js +0 -1
- package/dist/client/assets/index-C24HfJir.js +0 -1
- package/dist/client/assets/index-CI84yP-g.js +0 -1
- package/dist/client/assets/index-D5zUdnZM.js +0 -1
- package/dist/client/assets/index-DUZrTFYD.css +0 -1
- package/dist/client/assets/index-DX_2Mxwv.js +0 -1
- package/dist/client/assets/index-Dgrk2udV.js +0 -38
- package/dist/client/assets/registry-Bnd-HFt3.js +0 -1
- package/dist/client/assets/shield-check-CpUB_Ju1.js +0 -6
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-jpZCGfva.js +0 -8
- package/dist/client/assets/use-is-below-desktop-DR8FEbRW.js +0 -1
- package/dist/client/assets/use-is-hub-BmpgFnFp.js +0 -1
- package/dist/client/assets/use-pending-read-Do0_vZ2I.js +0 -1
- package/dist/client/assets/use-session-diagnostics-D5g8Mc52.js +0 -16
- package/dist/client/assets/use-update-config-DwtH_H9Z.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{eG as J,j as e,eH as Q,eI as Z,eJ as C,eK as ee,eL as z,ct as se,eM as te,r as O,ak as A,eN as D,H as V,aS as Y,X as ne,eO as ae,eP as ie,eQ as re,eR as oe,B as E,f as de,eS as le,eT as U,eU as ce,eV as X,a0 as me,bb as ue,eW as xe,eX as he,eY as ge,eZ as pe,e_ as fe,e$ as ve,T as je,G as I,f0 as M,f1 as Ne,f2 as be,_ as T,$ as we,f3 as ye,f4 as Se,f5 as ke,f6 as Ce,f7 as Ee,f8 as $e,f9 as Pe,fa as B,dz as Te,a7 as S,fb as Re,fc as F}from"./index-8-iQ6PnT.js";import{fd as ms,fe as us,ff as xs,fg as hs,fh as gs,fi as ps}from"./index-8-iQ6PnT.js";import{u as _e}from"./use-deep-link-scroll-v02TbidQ.js";import{M as K}from"./more-details-CadxnGyH.js";import{C as Ae}from"./card-Dj6ZfRgu.js";import{u as De,a as Ie}from"./use-panel-tab-placements-DFobGBRm.js";import{C as Le,a as Oe,b as ze,c as Me,d as R,e as _}from"./command-BAOEURY7.js";import{F as q}from"./file-text-CRw31ZWd.js";import{S as Be}from"./shield-check-CpUB_Ju1.js";const Fe=["server_crashed","server_out_of_memory","server_unresponsive","isolation_unavailable","server_start_failed","server_start_timeout"],He={server_crashed:s=>`${s} stopped unexpectedly 3 times. Reload it to try again.`,server_out_of_memory:s=>`${s} ran out of memory and stopped. Reload it to try again.`,server_unresponsive:s=>`${s} stopped responding, so DorkOS stopped it.`,isolation_unavailable:s=>`${s} can’t run with its limits on this computer.`,server_start_failed:s=>`${s} couldn’t start. Reload it to try again.`,server_start_timeout:s=>`${s} took too long to start. Reload it to try again.`};function L(s){return Fe.includes(s)}function Ge(s,r){return L(s)?He[s](r):null}function Ve(s){return`Restarting ${s}…`}function Ye({extensionId:s}){const r=J("right-panel").filter(d=>d.extensionId===s);return r.length===0?null:e.jsx("div",{className:"space-y-3 pt-1","data-testid":`panel-tab-placement-${s}`,children:r.map(d=>e.jsx(Xe,{tab:d,labelled:r.length>1},d.id))})}function Ue(){var d;const s=(d=se().data)==null?void 0:d.agents,r=te().data;return O.useMemo(()=>{const l=new Map((s??[]).map(a=>[a.id,A(a)])),c=new Map((r??[]).map(a=>[a.id,D(a)]));return{agents:s??[],rooms:r??[],agentNames:l,roomNames:c}},[s,r])}function Xe({tab:s,labelled:r}){const d=Q(De(),s.id),{setPlacement:l}=Ie(),c=Ue(),a=Z(d,s.declaredPlacement),g=a.show.pages.includes(C),o=t=>l(s.id,{show:t.show,hide:t.hide}),m=t=>t.kind==="agents"?c.agentNames.get(t.id)??"An agent that is gone":t.kind==="rooms"?c.roomNames.get(t.id)??"A channel that is gone":ae(t.id),v=(t,u)=>["agents","rooms","pages"].flatMap(j=>t[j].filter(i=>u||i!==C).map(i=>({kind:j,id:i}))),n=(t,u)=>({...t,[u.kind]:t[u.kind].filter(j=>j!==u.id)}),p=v(a.show,!1),N=v(a.hide,!0);return e.jsxs("div",{className:"space-y-2","data-testid":`panel-tab-placement-${s.id}`,children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm",children:r?`${s.title} tab shows`:"Panel tab shows"}),e.jsxs(ee,{value:g?"everywhere":"only",onValueChange:t=>o({hide:a.hide,show:t==="everywhere"?{...a.show,pages:[C]}:{...a.show,pages:a.show.pages.filter(u=>u!==C)}}),"aria-label":`Where the ${s.title} tab shows`,children:[e.jsx(z,{value:"everywhere",children:"Everywhere"}),e.jsx(z,{value:"only",children:"Only in…"})]}),d&&e.jsx("button",{type:"button",onClick:()=>l(s.id,null),className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm text-xs underline underline-offset-2",children:s.declaredPlacement?"Use its default":"Reset"})]}),!g&&e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[p.map(t=>e.jsx(H,{place:t,name:m(t),removeLabel:`Remove ${m(t)}`,onRemove:()=>o({...a,show:n(a.show,t)})},`${t.kind}:${t.id}`)),e.jsx(qe,{tabTitle:s.title,names:c,taken:a.show,onAdd:t=>o({show:{...a.show,[t.kind]:[...a.show[t.kind],t.id]},hide:n(a.hide,t)})}),p.length===0&&e.jsx("span",{className:"text-muted-foreground text-xs",children:"Shows nowhere yet. Add a place."})]}),N.length>0&&e.jsxs("div",{role:"group","aria-labelledby":`${s.id}-hidden-in`,className:"flex flex-wrap items-center gap-1.5",children:[e.jsx("span",{id:`${s.id}-hidden-in`,className:"text-muted-foreground text-xs",children:"Hidden in"}),N.map(t=>e.jsx(H,{place:t,name:m(t),removeLabel:`Show in ${m(t)} again`,onRemove:()=>o({...a,hide:n(a.hide,t)})},`${t.kind}:${t.id}`))]})]})}const Ke={agents:Y,rooms:V,pages:q};function H({place:s,name:r,removeLabel:d,onRemove:l}){const c=Ke[s.kind];return e.jsxs("span",{className:"bg-muted inline-flex h-6 items-center gap-1 rounded-md pr-0.5 pl-1.5 text-xs",children:[e.jsx(c,{className:"text-muted-foreground size-3","aria-hidden":!0}),e.jsx("span",{className:"max-w-40 truncate",children:r}),e.jsx("button",{type:"button",onClick:l,"aria-label":d,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm p-0.5",children:e.jsx(ne,{className:"size-3"})})]})}function qe({tabTitle:s,names:r,taken:d,onAdd:l}){const[c,a]=O.useState(!1),g=n=>{l(n),a(!1)},o=ie.filter(n=>!d.pages.includes(n.key)),m=r.agents.filter(n=>!d.agents.includes(n.id)),v=r.rooms.filter(n=>!d.rooms.includes(n.id));return e.jsxs(re,{open:c,onOpenChange:a,children:[e.jsx(oe,{asChild:!0,children:e.jsxs(E,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-xs","aria-label":`Add a place for the ${s} tab`,children:[e.jsx(de,{className:"size-3"}),"Add"]})}),e.jsx(le,{align:"start",className:"w-64 p-0",children:e.jsxs(Le,{children:[e.jsx(Oe,{placeholder:"Find an agent, channel or page"}),e.jsxs(ze,{className:"max-h-64",children:[e.jsx(Me,{children:"Nothing matches."}),m.length>0&&e.jsx(R,{heading:"Agents",children:m.map(n=>e.jsxs(_,{value:`agent ${A(n)} ${n.id}`,onSelect:()=>g({kind:"agents",id:n.id}),children:[e.jsx(Y,{className:"size-3.5"}),A(n)]},n.id))}),v.length>0&&e.jsx(R,{heading:"Channels and DMs",children:v.map(n=>e.jsxs(_,{value:`room ${D(n)} ${n.id}`,onSelect:()=>g({kind:"rooms",id:n.id}),children:[e.jsx(V,{className:"size-3.5"}),D(n)]},n.id))}),o.length>0&&e.jsx(R,{heading:"Pages",children:o.map(n=>e.jsxs(_,{value:`page ${n.label}`,onSelect:()=>g({kind:"pages",id:n.key}),children:[e.jsx(q,{className:"size-3.5"}),n.label]},n.key))})]})]})})]})}const We=new Set(["disabled","discovered","incompatible","invalid"]),Je="/marketplace?view=installed";function Qe({extension:s,onToggle:r,isToggling:d,onSetRunApproval:l,isSettingApproval:c,onReload:a,isReloading:g}){const{manifest:o,status:m,scope:v,error:n,serverError:p,origin:N,approvedToRun:t}=s,[u,j]=O.useState(!1),i=!We.has(m),x=m==="incompatible",b=m==="invalid",h=m==="compile_error"||m==="activate_error",y=!x&&!b,f=!(N==="core"&&o.canDisable===!1),k=s.hasServerEntry||s.hasDataProxy,w=U(s),W=ce(s.id,X(w)),$=h?"Not working":x?"Incompatible":b?"Can’t load":null;return e.jsx(Ae,{"data-slot":"extension-card","data-testid":`extension-card-${s.id}`,"data-section":s.id,radius:"lg",gap:"none",className:I(h&&"border-amber-500/50",(x||b)&&"opacity-70"),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h&&e.jsx(me,{className:"text-status-warning-dot size-4 shrink-0","aria-hidden":"true"}),(x||b)&&!h&&e.jsx(ue,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),!h&&!x&&!b&&e.jsx(xe,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"font-medium",children:o.name}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:["v",o.version]}),s.devLink&&e.jsx(he,{})]}),s.devLink&&e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1","data-testid":`extension-dev-link-${s.id}`,children:[e.jsx(ge,{path:s.devLink.path,className:"min-w-0"}),e.jsx("button",{type:"button",onClick:()=>void pe(Je),className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm text-xs underline underline-offset-2",children:"Unlink or switch"})]}),o.description&&e.jsx("p",{className:"text-muted-foreground text-sm",children:o.description}),e.jsx(fe,{gifts:ve(s),"data-testid":`extension-agent-gifts-${s.id}`}),i&&e.jsx(Ye,{extensionId:s.id}),x&&o.minHostVersion&&e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Needs DorkOS ",o.minHostVersion," or newer"]}),h&&n&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-status-warning-fg text-sm",children:[m==="compile_error"?"Couldn’t build: ":"Couldn’t start: ",n.message]}),n.details&&e.jsxs("button",{type:"button",onClick:()=>j(P=>!P),className:"text-muted-foreground hover:text-foreground flex items-center gap-1 text-xs transition-colors","aria-expanded":u,children:[e.jsx(je,{className:I("size-3 transition-transform",u&&"rotate-180")}),u?"Hide details":"Show details"]}),u&&n.details&&e.jsx("pre",{className:"bg-muted mt-1 max-h-32 overflow-auto rounded-md p-2 text-xs",children:n.details})]}),p&&L(p.code)&&e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1","data-testid":`extension-server-status-${s.id}`,children:[e.jsx("p",{className:"text-status-warning-fg text-sm",children:p.message||Ge(p.code,o.name)}),e.jsx("button",{type:"button",onClick:a,disabled:g,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm text-xs underline underline-offset-2 disabled:opacity-50",children:"Reload"})]}),s.restartingAt&&!p&&e.jsx("p",{className:"text-muted-foreground text-sm",role:"status",children:Ve(o.name)}),p&&!L(p.code)&&e.jsxs("p",{className:"text-status-warning-fg text-sm",children:["Couldn’t rebuild its server part: ",p.message,". The last version still runs."]}),N==="user"&&(t?e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs","data-testid":`extension-run-allowed-${s.id}`,children:[e.jsx(Be,{className:"size-3.5 shrink-0","aria-hidden":"true"}),e.jsx("span",{children:"You allowed this to run."}),s.originProblem==="changed"&&e.jsx("span",{children:"You approved its changed files. Any further change asks again."}),e.jsx("button",{type:"button",onClick:()=>l(s.id,!1),disabled:c,className:"hover:text-foreground underline underline-offset-2 disabled:opacity-50",children:"Stop it"}),e.jsx(M,{permissions:w,className:"basis-full","data-testid":`extension-permissions-${s.id}`})]}):e.jsxs("div",{className:"space-y-2 rounded-lg border border-amber-500/40 bg-amber-500/5 p-3","data-testid":`extension-needs-approval-${s.id}`,children:[e.jsx("p",{className:"text-sm font-medium",children:"This extension is waiting for you"}),s.originProblem&&e.jsx("p",{className:"text-status-warning-fg text-sm","data-testid":`extension-origin-problem-${s.id}`,children:s.originProblem==="changed"?"Its files changed after install, so DorkOS can’t vouch for it. Look it over first.":s.originProblem==="dev-link"?"It runs from your folder, so DorkOS can’t vouch for its source.":"Its plugin links to files elsewhere, so DorkOS can’t vouch for its source."}),e.jsx(M,{permissions:w,added:W,"data-testid":`extension-permissions-${s.id}`}),e.jsx("p",{className:"text-muted-foreground text-sm",children:Ne(k,(w==null?void 0:w.runtime)==="subprocess")}),e.jsx("p",{className:"text-muted-foreground text-sm",children:be}),e.jsx(E,{size:"sm",onClick:()=>l(s.id,!0),disabled:c,"data-testid":`extension-approve-run-${s.id}`,children:"Turn it on"})]})),e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs",children:[e.jsx(T,{variant:"outline",children:v}),$&&e.jsx(T,{variant:$==="Not working"?"destructive":"secondary","data-testid":`extension-health-${s.id}`,children:$}),o.author&&e.jsx("span",{children:o.author})]})]}),e.jsx("div",{className:"flex shrink-0 items-center pt-0.5",children:f?e.jsx(we,{checked:i,onCheckedChange:P=>r(s.id,P),disabled:!y||d,"aria-label":`${i?"Disable":"Enable"} ${o.name}`}):e.jsx(T,{variant:"secondary",title:"This extension is always on","data-testid":`extension-required-${s.id}`,children:"Required"})})]})})}function G(s){const r=new Date(s);return Number.isNaN(r.getTime())?"":r.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function Ze(){const{data:s=[]}=ye(),{stop:r,pendingSource:d}=Se();return s.length===0?null:e.jsxs("section",{className:"space-y-3","data-testid":"trusted-sources-section",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Trusted sources"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Extensions from these sources turn on without asking."}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Stop trusting one, and extensions already on keep running."}),e.jsx(K,{className:"text-muted-foreground text-sm",label:"If you stop trusting one",openLabel:"If you stop trusting one",children:e.jsx("p",{children:"Newer versions and new extensions from it wait for your yes."})})]}),e.jsx("ul",{className:"divide-y rounded-xl border",children:s.map(({source:l,trustedAt:c})=>e.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1.5 px-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate font-mono text-sm",children:l}),G(c)&&e.jsxs("p",{className:"text-muted-foreground text-xs",children:["Trusted ",G(c)]})]}),e.jsx(E,{type:"button",variant:"outline",size:"sm",disabled:d===l,onClick:()=>r(l),children:"Stop trusting"})]},l))})]})}function ds(){const{data:s=[],isLoading:r}=ke(),{section:d}=Ce();_e(r?null:d);const l=Ee(),c=$e(),a=Pe(),g=B(!0),o=B(!1),m=new Set([...l.variables?[l.variables]:[],...c.variables?[c.variables]:[]]),v=new Set([...g.isPending&&g.variables?[g.variables.id]:[],...o.isPending&&o.variables?[o.variables.id]:[]]);function n(i,x){const b=x?g:o,h=s.find(f=>f.id===i);if(!h)return;const y=x?X(U(h)):void 0;b.mutate({id:i,version:h.manifest.version,plugin:h.sourcePlugin??null,...y?{permissions:y}:{}},{onSuccess:f=>{x&&F.getState().forget(i);const k=f.extension.manifest.name,w=f.extension.isolation?"":" inside DorkOS";S.success(x?`${k} can now run${w}`:`${k} stopped running`)},onError:f=>{if(f instanceof Re&&f.stale){y&&F.getState().remember(i,y),S.error(`${h.manifest.name} changed since you saw it. Check it again.`);return}S.error(x?"Couldn’t let it run.":"Couldn’t stop it running.",{description:f.message})}})}async function p(i,x){(x?l:c).mutate(i,{onError:h=>{S.error(x?"Couldn’t turn that on.":"Couldn’t turn that off.",{description:h.message})}})}function N(){a.mutate(void 0,{onSuccess:i=>{S.success(`Reloaded ${i.length} extension${i.length===1?"":"s"}`)},onError:i=>{S.error("Couldn’t reload your extensions.",{description:i.message})}})}if(r)return e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm",children:"Loading extensions…"});const t=s.filter(i=>i.origin==="core"),u=s.filter(i=>i.origin==="user"),j=i=>e.jsx(Qe,{extension:i,onToggle:p,isToggling:m.has(i.id),onSetRunApproval:n,isSettingApproval:v.has(i.id),onReload:N,isReloading:a.isPending},i.id);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"text-muted-foreground space-y-1 text-sm",children:[e.jsx("p",{children:"Extensions add new screens and tools to DorkOS."}),e.jsxs(K,{children:[e.jsx("p",{children:"Core extensions come with DorkOS."}),e.jsxs("p",{children:["Installed ones live in"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:"~/.dork/extensions/"})," or your project’s"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:".dork/extensions/"}),"."]})]})]}),s.length===0?e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"no-extensions",children:e.jsx("p",{children:"No extensions installed."})}):e.jsxs(e.Fragment,{children:[t.length>0&&e.jsxs("section",{className:"space-y-3","data-testid":"core-extensions-section",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Core extensions"}),e.jsx("div",{className:"space-y-3",children:t.map(j)})]}),e.jsxs("section",{className:"space-y-3","data-testid":"installed-extensions-section",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Installed extensions"}),u.length>0?e.jsx("div",{className:"space-y-3",children:u.map(j)}):e.jsxs("div",{className:"text-muted-foreground rounded-xl border border-dashed p-4 text-sm","data-testid":"no-installed-extensions",children:["No extensions installed yet. Browse"," ",e.jsx("span",{className:"text-foreground font-medium",children:"Marketplace"})," to add some."]})]})]}),e.jsx(Ze,{}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(E,{variant:"outline",size:"sm",onClick:N,disabled:a.isPending,"data-testid":"reload-extensions-button",children:[e.jsx(Te,{className:I("mr-2 size-4",a.isPending&&"animate-spin")}),"Reload extensions"]})})]})}export{ms as ExtensionEventBridge,us as ExtensionLoader,xs as ExtensionProvider,ds as ExtensionsSettingsTab,hs as createExtensionAPI,gs as createExtensionEventBridge,ps as useExtensions};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
var De=Object.defineProperty;var Ie=(t,n,s)=>n in t?De(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s;var U=(t,n,s)=>Ie(t,typeof n!="symbol"?n+"":n,s);import{W as N,a1 as P,i9 as ze,r as f,aM as Me,ia as X,aK as Se,j as e,hJ as O,ib as Te,g as B,ic as H,id as V,G as A,ie as Fe,ig as Ae,X as Oe,ih as _e,B as C,dy as Ee,ar as T,aN as Le,ii as Ue,fr as $e,ij as Pe,ik as Be,il as He,im as Ve,io as Ye,ip as Z,J as Ke,a3 as We,h3 as ne,aW as y,iq as qe,ir as Je,is as Ge,a7 as ee,it as Qe,iu as Xe,iv as Ze}from"./index-8-iQ6PnT.js";import{u as et}from"./use-roving-tab-list-Bsg2dfUx.js";import{F as se,c as tt,d as te,e as nt,R as st,C as ae}from"./use-session-canvas-awPngMKg.js";import{f as un,g as mn,h as pn,b as hn,i as fn}from"./use-session-canvas-awPngMKg.js";import{A as at}from"./McpAppFrame-5xlga1jD.js";import{F as ot}from"./file-DEt4KgZG.js";import{F as oe}from"./file-text-CRw31ZWd.js";import{R as rt}from"./rotate-cw-DvoxWwSx.js";import{u as it}from"./use-room-follow-claim-CCGhsyH3.js";import{c as lt,F as ct}from"./room-files-source-BhkPUTiP.js";import"./query-keys-DeYqUDia.js";import"./index.esm-bLeQzVWT.js";import"./WidgetErrorCard-BfgGzyqg.js";import"./index-D5zUdnZM.js";import"./card-Dj6ZfRgu.js";import"./progress-DmUieXLn.js";import"./markdown-content-D0FpU2cz.js";import"./table-DvU_oS4E.js";import"./terminal-Dw2QZ7Dh.js";import"./package-B8G7jQm-.js";import"./heart-CRkjVW7-.js";import"./git-branch-DWerghmw.js";import"./more-details-CadxnGyH.js";import"./file-exclamation-point-QqXJhXD9.js";/**
|
|
2
|
-
* @license lucide-react v1.48.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const re={name:"box",size:24,node:[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]};re.node;const dt=N(re);/**
|
|
7
|
-
* @license lucide-react v1.48.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const ie={name:"braces",size:24,node:[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],aliases:["curly-braces"]};ie.node;const le=N(ie);/**
|
|
12
|
-
* @license lucide-react v1.48.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const ce={name:"file-headphone",size:24,node:[["path",{d:"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343",key:"1vfytu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0",key:"1etmh7"}]],aliases:["file-audio","file-audio-2"]};ce.node;const ut=N(ce);/**
|
|
17
|
-
* @license lucide-react v1.48.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const de={name:"file-play",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z",key:"1tzo1f"}]],aliases:["file-video"]};de.node;const mt=N(de);/**
|
|
22
|
-
* @license lucide-react v1.48.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const ue={name:"git-compare",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]};ue.node;const pt=N(ue);/**
|
|
27
|
-
* @license lucide-react v1.48.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const me={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};me.node;const ht=N(me);/**
|
|
32
|
-
* @license lucide-react v1.48.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const pe={name:"table",size:24,node:[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]};pe.node;const ft=N(pe);function xt(t){const n=P(),{roomId:s,viewerAuthorId:r,documentId:i,url:u,readScrollY:m,subscribe:d}=t,a=ze(s,r),b=f.useRef({roomId:s,documentId:i,url:u,readScrollY:m});b.current={roomId:s,documentId:i,url:u,readScrollY:m};const x=f.useRef(null),p=f.useRef(0);f.useEffect(()=>{if(!a||s===null||i===null)return;const j=()=>{x.current=null,p.current=Date.now();const g=b.current;if(g.roomId===null||g.documentId===null)return;const R=g.roomId,E={documentId:g.documentId,...g.url!==void 0?{url:g.url}:{},...g.readScrollY?{scrollY:Math.max(0,Math.round(g.readScrollY()))}:{}};n.publishRoomView(R,E).then(L=>{!L.followed&&r!==null&&Se.getState().noteNobodyFollowing(R,r)}).catch(()=>{})},k=()=>{if(x.current!==null)return;const g=Date.now()-p.current;if(g>=X){j();return}x.current=setTimeout(j,X-g)};k();const c=d==null?void 0:d(k),_=setInterval(k,Me);return()=>{clearInterval(_),c==null||c()}},[n,a,s,r,i,u,d]),f.useEffect(()=>()=>{x.current!==null&&clearTimeout(x.current)},[])}const yt={url:O,markdown:oe,json:le,image:ht,pdf:ot,widget:Te,mcp_app:at,file:se,model3d:dt,audio:ut,video:mt,csv:ft,browser:O,diff:pt},vt="after:absolute after:inset-x-0 after:-inset-y-2 md:after:hidden";function Y(t){return t==="browser"?"browser-panel":"canvas-panel"}const gt={canvas:"Open canvas documents",browser:"Open browser pages"};function K(t){return`canvas-tab-${t}`}const bt=3;function jt(t){const n=t.map(r=>r.displayName);if(n.length===0)return null;if(n.length===1)return`${n[0]} is looking at this.`;if(n.length===2)return`${n[0]} and ${n[1]} are looking at this.`;const s=n.length-2;return`${n[0]}, ${n[1]} and ${s} ${s===1?"other":"others"} are looking at this.`}function kt({watchers:t}){const n=jt(t);if(n===null)return null;const s=t.slice(0,bt),r=t.length-s.length;return e.jsxs(e.Fragment,{children:[e.jsxs("span",{"data-slot":"canvas-tab-watchers","aria-hidden":!0,className:"flex shrink-0 -space-x-1",children:[s.map(i=>e.jsx(B,{size:"xs",className:"ring-background text-3xs size-3.5 ring-1",kind:i.kind,color:i.color??V(i.id),emoji:i.emoji,imageUrl:i.imageUrl,badge:null,fallback:H(i.displayName)},i.id)),r>0&&e.jsxs("span",{className:"bg-muted text-muted-foreground ring-background text-3xs flex size-3.5 shrink-0 items-center justify-center rounded-full ring-1",children:["+",r]})]}),e.jsx("span",{className:"sr-only",children:n})]})}function he({view:t,documents:n,activeDocumentId:s,onActivate:r,onClose:i,onPin:u}){const m=Y(t),{getTabProps:d}=et({orderedIds:n.map(a=>a.id),activeId:s,onActivate:a=>r(a),onClose:a=>i(a),getFallbackFocus:()=>document.getElementById(m)});return n.length===0?null:e.jsx("div",{role:"tablist","aria-label":gt[t],className:"flex items-stretch gap-1 overflow-x-auto border-b px-2 py-1",children:n.map(a=>{const b=yt[a.contentType],x=a.id===s,p=a.author;return e.jsxs("div",{role:"presentation",className:"group relative flex shrink-0",children:[e.jsxs("button",{type:"button",role:"tab","aria-selected":x,id:K(a.id),"aria-controls":x?m:void 0,...d(a.id),className:A("focus-ring flex items-center gap-1.5 rounded-md py-3 pl-2 text-xs transition-colors md:py-1",u?"pr-12":"pr-7",x?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[p&&e.jsx(B,{"aria-hidden":!0,size:"xs",className:"text-3xs size-3.5 shrink-0",kind:p.kind,color:p.color??V(p.id),emoji:p.emoji,imageUrl:p.imageUrl,badge:null,fallback:H(p.displayName)}),e.jsx(b,{className:"size-3.5 shrink-0"}),e.jsx("span",{className:"max-w-40 truncate font-medium",children:a.sourceLabel}),a.watchers&&a.watchers.length>0&&e.jsx(kt,{watchers:a.watchers}),a.unread&&e.jsx("span",{"data-slot":"canvas-tab-unread","aria-hidden":!0,className:"bg-primary size-1.5 shrink-0 rounded-full"})]}),u&&e.jsx("button",{type:"button",tabIndex:-1,onClick:()=>u(a.id,!a.pinned),"aria-label":a.pinned?`Unpin ${a.sourceLabel}`:`Pin ${a.sourceLabel}`,className:A("focus-ring hover:bg-background/80 absolute top-1/2 right-6 -translate-y-1/2 rounded-sm p-1.5 transition-opacity md:p-0.5",a.pinned?"opacity-100":"opacity-0 group-hover:opacity-60"),children:a.pinned?e.jsx(Fe,{className:"size-3"}):e.jsx(Ae,{className:"size-3"})}),e.jsx("button",{type:"button",tabIndex:-1,onClick:()=>i(a.id),"aria-label":`Close ${a.sourceLabel}`,className:A("focus-ring hover:bg-background/80 absolute top-1/2 right-1 -translate-y-1/2 rounded-sm p-1.5 opacity-60 transition-opacity group-hover:opacity-100 md:p-0.5",vt),children:e.jsx(Oe,{className:"size-3"})})]},a.id)})})}function wt({error:t,onRetry:n}){const s=_e(t);return e.jsxs("div",{className:"text-muted-foreground flex h-full flex-col items-center justify-center gap-3 p-8 text-center",children:[e.jsx("p",{children:"This tab hit a problem"}),s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"The app may have updated. Reloading usually fixes it."}),e.jsx(C,{type:"button",size:"sm",onClick:()=>window.location.reload(),children:"Reload DorkOS"})]}):e.jsxs(C,{type:"button",variant:"outline",size:"sm",onClick:n,children:[e.jsx(rt,{className:"size-4"}),"Try again"]})]})}class fe extends f.Component{constructor(){super(...arguments);U(this,"state",{error:null,retryKey:0});U(this,"handleRetry",()=>{this.setState(s=>({error:null,retryKey:s.retryKey+1}))})}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,r){console.error(`[Canvas] Document viewer error (${this.props.documentId}):`,s,r)}render(){const{error:s,retryKey:r}=this.state;return s?e.jsx(wt,{error:s,onRetry:this.handleRetry}):e.jsx(f.Fragment,{children:this.props.children},r)}}function Ct({onReload:t,onKeepMine:n}){return e.jsxs("div",{role:"status",className:"border-border/60 bg-muted/40 mx-2 mt-2 space-y-2 rounded-md border px-3 py-2 text-sm",children:[e.jsx("p",{children:"Your agent changed this while you were editing. Your edit is safe."}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(C,{type:"button",variant:"outline",size:"sm",onClick:t,children:"Reload"}),e.jsx(C,{type:"button",variant:"ghost",size:"sm",onClick:n,children:"Keep mine"})]}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Reload shows its version and ends your edit. Keep mine discards it."})]})}const Nt={canvas:{heading:"A blank canvas",blurb:"Your agent can show documents, data and files here.",actions:[{icon:oe,label:"Markdown",description:"Render a document",action:()=>({type:"markdown",content:`# Untitled
|
|
37
|
-
|
|
38
|
-
Start writing…`,title:"Document"})},{icon:le,label:"JSON",description:"Inspect structured data",action:()=>({type:"json",data:{message:"Your data here"},title:"JSON data"})}]},browser:{heading:"No page open",blurb:"This tab shows web pages: your files, dev servers, or sites from your agent.",actions:[{icon:O,label:"Web page",description:"Open a page, then type any address",action:()=>({type:"url",url:Ue.site,title:"Web Page"})}]}};function $(t,n,s,r){return t.split("").reduce((u,m)=>u+m.charCodeAt(0),0)*(n+1)*7%(r-s)+s}function xe({view:t,onAction:n}){const s=Ee(),r=f.useId(),i=Nt[t],u=f.useMemo(()=>Array.from({length:6},(m,d)=>({x:$(r,d*3,10,90),y:$(r,d*3+1,10,80),size:$(r,d*3+2,24,56),delay:d*.4})),[r]);return e.jsxs("div",{className:"relative flex h-full flex-col items-center justify-center overflow-hidden px-6",children:[!s&&u.map((m,d)=>e.jsx(T.div,{className:"border-border/40 absolute rounded-lg border",style:{left:`${m.x}%`,top:`${m.y}%`,width:m.size,height:m.size},initial:{opacity:0,scale:.6,rotate:-10},animate:{opacity:[0,.15,.08,.15],scale:[.6,1,.9,1],rotate:[-10,0,5,0]},transition:{duration:8,delay:m.delay,repeat:1/0,repeatType:"reverse",ease:"easeInOut"}},d)),e.jsxs(T.div,{className:"relative z-10 flex max-w-sm flex-col items-center gap-6 text-center",initial:s?!1:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},children:[e.jsx(T.div,{className:"bg-muted/50 text-muted-foreground flex size-14 items-center justify-center rounded-2xl",initial:s?!1:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.3,delay:.1},children:t==="browser"?e.jsx(O,{className:"size-7"}):e.jsx(Le,{className:"size-7"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-lg font-semibold tracking-tight",children:i.heading}),e.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:[i.blurb,e.jsx("br",{}),"Or pick a starting point below."]})]}),e.jsx(T.div,{className:"mt-2 flex w-full flex-col gap-2",initial:"hidden",animate:"visible",variants:s?{}:{visible:{transition:{staggerChildren:.08,delayChildren:.25}}},children:i.actions.map(({icon:m,label:d,description:a,action:b})=>e.jsxs(T.button,{variants:s?{}:{hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},transition:{duration:.25},className:"border-border hover:bg-accent/50 flex items-center gap-3 rounded-lg border px-4 py-3 text-left transition-colors",onClick:()=>n(b()),children:[e.jsx(m,{className:"text-muted-foreground size-4 shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-sm font-medium",children:d}),e.jsx("span",{className:"text-muted-foreground ml-2 text-xs",children:a})]})]},d))})]})]})}function Rt({sourceLabel:t,people:n,following:s,onFollow:r,onStopFollowing:i,onDiscuss:u,discussing:m=!1}){const d=n.find(a=>a.id===s)??null;return t===void 0&&n.length===0&&u===void 0?null:e.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 border-b px-3 py-1 text-xs",children:[t!==void 0&&e.jsx("span",{className:"min-w-0 flex-1 truncate",children:t}),t===void 0&&e.jsx("span",{className:"flex-1"}),u&&e.jsxs(C,{type:"button",variant:"ghost",size:"sm",className:"h-6 gap-1 px-1.5",disabled:m,onClick:u,children:[e.jsx($e,{className:"size-3.5"}),"Discuss"]}),n.length>0&&e.jsxs(Pe,{children:[e.jsx(Be,{asChild:!0,children:e.jsxs(C,{type:"button",variant:"ghost",size:"sm",className:A("h-6 gap-1 px-1.5",d&&"text-foreground"),children:[e.jsx(He,{className:"size-3.5"}),d?`Following ${d.displayName}`:"Follow"]})}),e.jsxs(Ve,{align:"end",children:[e.jsx(Ye,{children:"Follow somebody’s browser"}),n.map(a=>e.jsxs(Z,{onSelect:()=>a.id===s?i():r(a.id),children:[e.jsx(B,{"aria-hidden":!0,size:"xs",className:"size-4 shrink-0 text-[9px]",kind:a.kind,color:a.color??V(a.id),emoji:a.emoji,imageUrl:a.imageUrl,badge:null,fallback:H(a.displayName)}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.displayName}),a.id===s&&e.jsx(Ke,{className:"size-3.5 shrink-0"})]},a.id)),d&&e.jsx(Z,{onSelect:i,children:"Stop following"})]})]})]})}function Dt({roomId:t,document:n,reading:s}){const r=P(),i=We(),[u,m]=f.useState(null),d=f.useMemo(()=>lt({transport:r,queryClient:i,roomId:t}),[r,i,t]);return e.jsxs("div",{className:"flex h-full items-start justify-center p-6",children:[e.jsxs("div",{className:"bg-card shadow-soft w-full max-w-md space-y-3 rounded-lg border p-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(se,{className:"text-muted-foreground size-4 shrink-0"}),e.jsx("span",{className:"truncate text-sm font-medium",children:n.title||s.sourcePath})]}),e.jsx("p",{className:"text-muted-foreground font-mono text-xs break-all",children:s.sourcePath}),s.kind==="elsewhere"?e.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s.sentence}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:"A room file. Each save is recorded with your name."}),e.jsx(C,{type:"button",size:"sm",onClick:()=>m(s.sourcePath),children:"Open file"})]})]}),s.kind==="room-file"&&e.jsx(ct,{source:d,path:u,onClose:()=>m(null)})]})}const It=["image","pdf","audio","video","csv","model3d"];function zt(t){return/^(https?:|data:)/.test(t)}function Mt(t){if(t.type==="file"||t.type==="diff")return t.sourcePath;if(t.type==="markdown")return t.sourcePath??null;if(It.includes(t.type)){const n=t.src;return zt(n)?null:n}return null}function St(t){return t.type==="file"||t.type==="diff"||t.type==="markdown"}function Tt(t){const n=/^(?:in )?(.+?)['’]s /.exec(t.sourceLabel??"");return(n==null?void 0:n[1])??"another member"}function Ft(t){const n=Mt(t.content);if(n===null)return{kind:"inline"};if(t.treeKind==="room-main"||t.treeKind===void 0)return St(t.content)?{kind:"room-file",sourcePath:n}:{kind:"elsewhere",sourcePath:n,sentence:"This file is in the room’s files. Open it from Files in the Room tab."};if(t.content.type==="diff"&&t.treeKind==="worktree"&&typeof t.aheadOfMain=="number"&&t.aheadOfMain>0)return{kind:"worktree-diff",sourcePath:n,content:t.content};if(t.content.type==="markdown")return{kind:"inline"};const s=Tt(t);return{kind:"elsewhere",sourcePath:n,sentence:`${s.charAt(0).toUpperCase()}${s.slice(1)}’s project isn’t open to you. Ask them to share it, or open your copy.`}}function At(t){return t.title||t.contentType}function Ot({roomId:t,document:n,onUpdate:s}){const r=Ft(n);return r.kind==="worktree-diff"?e.jsx(Xe,{roomId:t,content:r.content,documentId:n.id,authorId:n.authorId}):r.kind!=="inline"?e.jsx(Dt,{roomId:t,document:n,reading:r}):n.content.type==="markdown"?e.jsx(st,{roomId:t,document:n,content:n.content,onSave:s}):e.jsx(ae,{documentId:n.id,content:n.content,onContentChange:()=>{}})}function ye({roomId:t,view:n}){var J;const s=ne(),r=y(o=>o.roomCanvasDocuments[t]),i=y(o=>{var l;return((l=o.roomCanvasActive[t])==null?void 0:l[n])??null}),u=y(o=>{var l;return(l=o.roomCanvasUnread[t])==null?void 0:l[n]}),m=y(o=>o.activateRoomCanvasDocument),d=y(o=>o.clearRoomCanvasUnread),a=y(o=>o.roomCanvasPresence[t]),b=tt(t),x=qe(t),p=P(),j=((J=x.data)==null?void 0:J.viewerAuthorId)??null,k=y(o=>o.roomCanvasEditing[t]??null),c=Je(o=>o.openThread),[_,g]=f.useState(!1),R=n==="browser"?t:null,{following:E,follow:L,stop:ge}=it(R),w=Ge(R),I=f.useRef(null),F=f.useCallback(async(o,l)=>{try{return await l(),!0}catch(M){return ee.error(o,{description:te(M)}),!1}},[]),z=f.useMemo(()=>Qe(r??[],n),[r,n]),v=z.find(o=>o.id===i)??null,W=(u==null?void 0:u.length)??0;f.useEffect(()=>{W>0&&d(t,n)},[W,d,t,n]);const be=f.useMemo(()=>{var G;const o=new Map(((G=x.data)==null?void 0:G.members.map(h=>[h.author.id,h.author]))??[]),l=h=>({id:h.id,displayName:h.displayName,kind:h.kind,...h.emoji?{emoji:h.emoji}:{},...h.color?{color:h.color}:{},...h.imageUrl?{imageUrl:h.imageUrl}:{}}),M=new Map;for(const[h,S]of Object.entries(a??{})){if(h===j)continue;const D=o.get(h);if(!D)continue;const Q=M.get(S);Q?Q.push(l(D)):M.set(S,[l(D)])}return z.map(h=>{const S=o.get(h.authorId),D=M.get(h.id);return{id:h.id,sourceLabel:At(h),contentType:h.content.type,pinned:h.pinned,unread:(u==null?void 0:u.includes(h.id))??!1,...S?{author:l(S)}:{},...D?{watchers:D}:{}}})},[z,x.data,u,a,j]);nt(t,(v==null?void 0:v.id)??null);const je=f.useMemo(()=>{var o;return(((o=x.data)==null?void 0:o.members)??[]).map(l=>l.author).filter(l=>l.kind==="human"&&l.id!==j).map(l=>({id:l.id,displayName:l.displayName,kind:l.kind,emoji:l.emoji,color:l.color,imageUrl:l.imageUrl}))},[x.data,j]),ke=y(o=>{if(i===null)return;const l=o.browserHistories[i];return l?l.stack[l.cursor]:void 0}),we=f.useCallback(()=>{var o;return((o=I.current)==null?void 0:o.scrollTop)??0},[]),Ce=f.useCallback(o=>{const l=I.current;return l?(l.addEventListener("scroll",o,{passive:!0}),()=>l.removeEventListener("scroll",o)):()=>{}},[]);xt({roomId:R,viewerAuthorId:j,documentId:i,url:ke,readScrollY:we,subscribe:Ce});const q=f.useMemo(()=>z.map(o=>o.id).join("\0"),[z]);f.useEffect(()=>{if(!(w===null||k!==null)&&q.split("\0").includes(w.documentId)){if(w.documentId!==i){m(t,w.documentId);return}w.scrollY!==void 0&&I.current&&(I.current.scrollTop=w.scrollY)}},[w,k,i,q,m,t]);const Ne=f.useCallback(()=>{v!==null&&(g(!0),p.discussCanvasDocument(t,v.id).then(o=>c(t,o.threadRootEntryId,!1)).catch(o=>{ee.error("Couldn’t start a discussion.",{description:te(o)})}).finally(()=>g(!1)))},[v,p,t,c]),Re=Y(n);return e.jsxs(e.Fragment,{children:[!s&&e.jsx(he,{view:n,documents:be,activeDocumentId:i,onActivate:o=>m(t,o),onClose:o=>void F("Couldn’t take that off the canvas.",()=>b.close(o)),onPin:(o,l)=>void F(l?"Couldn’t pin that.":"Couldn’t unpin that.",()=>b.pin(o,l))}),e.jsx(Rt,{sourceLabel:v==null?void 0:v.sourceLabel,people:n==="browser"?je:[],following:E,onFollow:L,onStopFollowing:ge,onDiscuss:v===null?void 0:Ne,discussing:_}),e.jsx("div",{id:Re,ref:I,tabIndex:-1,className:"min-h-0 flex-1 overflow-auto focus-visible:outline-none",...!s&&v?{role:"tabpanel","aria-labelledby":K(v.id)}:{},children:v?e.jsx(fe,{documentId:v.id,children:e.jsx(Ot,{roomId:t,document:v,onUpdate:(o,l)=>F("Couldn’t save that for the room.",()=>b.update(o,l))})},v.id):e.jsx(xe,{view:n,onAction:o=>void F("Couldn’t put that on the canvas.",()=>b.open(o))})})]})}function ve({view:t}){const n=ne(),s=y(c=>c.openDocuments),r=y(c=>t==="browser"?c.activeBrowserDocumentId:c.activeCanvasDocumentId),i=y(c=>c.activateCanvasDocument),u=y(c=>c.closeCanvasDocument),m=y(c=>c.setDocumentContent),d=y(c=>c.openCanvasDocument),a=y(c=>c.applyHeldUpdate),b=y(c=>c.discardHeldUpdate),x=Ze(s,t),p=x.find(c=>c.id===r)??null,j=x.map(c=>({id:c.id,sourceLabel:c.sourceLabel,contentType:c.content.type})),k=Y(t);return e.jsxs(e.Fragment,{children:[!n&&e.jsx(he,{view:t,documents:j,activeDocumentId:r,onActivate:i,onClose:u}),(p==null?void 0:p.heldUpdate)&&e.jsx(Ct,{onReload:()=>a(p.id),onKeepMine:()=>b(p.id)}),e.jsx("div",{id:k,tabIndex:-1,className:"min-h-0 flex-1 overflow-auto focus-visible:outline-none",...!n&&p?{role:"tabpanel","aria-labelledby":K(p.id)}:{},children:p?e.jsx(fe,{documentId:p.id,children:e.jsx(ae,{documentId:p.id,content:p.content,onContentChange:c=>m(p.id,c)})},p.id):e.jsx(xe,{view:t,onAction:d})})]})}function rn(){const t=y(n=>n.roomCanvasLiveRoomId);return e.jsx("div",{"data-slot":"canvas",className:"flex h-full flex-col overflow-hidden",children:t?e.jsx(ye,{roomId:t,view:"canvas"}):e.jsx(ve,{view:"canvas"})})}function ln(){const t=y(n=>n.roomCanvasLiveRoomId);return e.jsx("div",{"data-slot":"browser",className:"flex h-full flex-col overflow-hidden",children:t?e.jsx(ye,{roomId:t,view:"browser"}):e.jsx(ve,{view:"browser"})})}export{ln as BrowserContent,rn as CanvasContent,un as CanvasWidgetContent,mn as resetSessionCanvasImport,pn as useDevtoolsBridge,hn as useDocChannel,fn as useSessionCanvas};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aN as a,aO as s}from"./index-8-iQ6PnT.js";const t={tasks:s,moment:a};export{t as i};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{W as a}from"./index-8-iQ6PnT.js";/**
|
|
2
|
-
* @license lucide-react v1.48.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const e={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};e.node;const o=a(e);export{o as S};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{c as r,s as e}from"./flowDiagram-IUGLLWBU-B53m4r8u.js";import{_ as o}from"./mermaid.core-x3Hh6iut.js";import"./transform-BqqRT-Iy.js";import"./chunk-5VM5RSS4-woru6zOC.js";import"./chunk-XXDRQBXY-ByAcvWaE.js";import"./chunk-VQ5W62QI-CqZ2cdEu.js";import"./chunk-55XCU76K-MOezzAAB.js";import"./BlintzCanvas-BmfkiUQJ.js";import"./index-8-iQ6PnT.js";import"./index-CyGRWyhV.js";import"./index-Czm6C7FZ.js";import"./channel-CGffcDRq.js";var a=o(t=>`${e(t)}
|
|
2
|
-
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
|
-
stroke: ${t.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,"getStyles"),m=a,v=r({styles:m});export{v as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aw as e}from"./index-8-iQ6PnT.js";const o=1024;function t(){return e(`(max-width: ${o-1}px)`)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{as as r}from"./index-8-iQ6PnT.js";function u(){var e;return((e=r().data)==null?void 0:e.serverRole)==="hub"}export{u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ac as n}from"./index-8-iQ6PnT.js";function r(s){const e=n();return s||e}export{r as u};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{W as de,as as ne,a1 as Q,a3 as me,a4 as Cs,at as ws,au as B,r as h,l5 as Es,l6 as Ve,l7 as Ye,l8 as Ms,aW as Z,hK as Je,du as pe,y as fe,a2 as he,gZ as Rs,l9 as _s,iy as Ze,la as As,dQ as es,lb as Os,lc as Me,ld as Ds,le as Ps,a7 as Is,j as s,bx as xe,ar as ge,G as k,dZ as Us,aR as Re,lf as oe,lg as Ls,lh as zs,ig as ss,li as Bs,kX as $s,bL as Ne,gk as Fs,cs as H,gU as Gs,lj as Hs,lk as Ws,gS as Qs,ll as W,cM as P,cN as I,cO as U,by as je,bz as ye,bA as be,bC as ve,gW as qs,aN as ts,gT as Ks,lm as Xs,ln as $,lo as Vs,b8 as Ys,B as F,lp as Js,lq as Zs,a9 as et,lr as ns,dt as st,dR as tt,ls as _e,lt as nt,ij as rt,ik as it,j6 as Ae,im as at,io as ot,lu as lt,lv as ct,ip as Oe,lw as ut,f as dt,dx as De,hb as rs,lx as mt,ly as pt,lz as is,lA as as,lB as ft,g9 as ht,ga as xt,gb as gt,gc as Nt,_ as ee,gd as jt,ge as yt,gf as bt,gg as vt,e as K,dz as os,jC as Pe,dj as St,I as Tt,jD as kt,j5 as Ct,aS as ls,aO as Se,c7 as wt,dO as se,c9 as ae,lC as le,lD as cs,ca as us,lE as Et,lF as Mt,lG as Rt,eQ as _t,lH as At,eS as Ot,cb as Dt,lI as Pt,bD as X,cc as ds,lJ as It,jU as Ut,aq as Lt,eW as zt,lK as Bt,gX as $t,lL as Ft,hE as Gt,iI as Ht,J as Wt,X as Qt,ad as qt,kT as Kt,g2 as Xt,hI as Vt,ea as Yt,hu as Jt,ie as Zt,$ as en,eG as sn,lM as tn,cp as nn,lN as rn,lO as an,lP as on,lQ as ln,lR as cn,lS as un,lT as dn}from"./index-8-iQ6PnT.js";import{G as V}from"./git-branch-DWerghmw.js";import{u as mn}from"./use-update-config-DwtH_H9Z.js";import{s as pn}from"./settings-for-runtime-BoOa-ZFG.js";import{C as fn}from"./card-Dj6ZfRgu.js";import{R as hn,H as xn,a as gn,b as Nn}from"./RuntimeSetupDialog-COpyPrqL.js";import{r as jn}from"./RuntimeConnectFlow--fVpIf0B.js";import{U as Ie}from"./unverified-catalog-notice-u4ikVg8J.js";import{L as yn}from"./layers-DTnLoRvE.js";import{C as bn,a as vn}from"./cpu-TtYQqONc.js";/**
|
|
2
|
-
* @license lucide-react v1.48.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const ms={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};ms.node;const Sn=de(ms);/**
|
|
7
|
-
* @license lucide-react v1.48.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const ps={name:"clipboard-copy",size:24,node:[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]};ps.node;const Tn=de(ps);/**
|
|
12
|
-
* @license lucide-react v1.48.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const fs={name:"wifi",size:24,node:[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]};fs.node;const Y=de(fs);function kn(e){return e.ambient===!0&&e.status!=="error"}function yi(e){const t=[],n=[];for(const r of e)(r.ambient?n:t).push(r);return{shown:t,ambient:n}}function Cn(e){var t;return((t=e==null?void 0:e.ui)==null?void 0:t.statusBar)??Es}function wn(){const{data:e}=ne();return Cn(e)}function En(){const e=Q(),t=me(),n=Cs({mutationKey:ws,mutationFn:i=>e.updateConfig({ui:{statusBar:{pins:[...i]}}}),onMutate:async i=>{await t.cancelQueries({queryKey:B.current()});const o=t.getQueryData(B.current());return t.setQueryData(B.current(),a=>a!=null&&a.ui?{...a,ui:{...a.ui,statusBar:{pins:[...i]}}}:a),{previous:o}},onError:(i,o,a)=>{a&&a.previous!==void 0&&t.setQueryData(B.current(),a.previous)},onSettled:()=>{t.invalidateQueries({queryKey:B.current()})}});return{setPins:h.useCallback(i=>n.mutate(i),[n]),isPending:n.isPending}}const Mn=80,Rn=95,_n=70,hs=85;function An(e){return e>=Rn?"critical":e>=Mn?"warning":"ok"}function xs(e,t){return e==null||e<=0||t==null||t<=0?null:Math.min(100,Math.round(e/t*100))}function gs(e,t){return t?Math.round(t.percentage):e}function On(e){var n;const t=e.cacheStats;return!t||t.cacheReadTokens===0&&t.cacheCreationTokens===0?null:{cacheReadTokens:t.cacheReadTokens,cacheCreationTokens:t.cacheCreationTokens,contextTokens:(n=e.contextUsage)==null?void 0:n.totalTokens}}function Dn(e){var t,n;return e?{contextPercent:xs((t=e.contextUsage)==null?void 0:t.totalTokens,(n=e.contextUsage)==null?void 0:n.maxTokens),costUsd:e.cost,model:e.model,cacheStatus:On(e),usage:e.usage}:{contextPercent:null,costUsd:null,model:null,cacheStatus:null,usage:null}}function Ns(e,t,n){if(t)return"streaming";if(e===void 0)return n;switch(e){case"streaming":return"streaming";case"error":return"error";default:return"idle"}}function bi(e,t){var n;return Ns((n=e.status)==null?void 0:n.lifecycle,e.triggerPending,t)}function Pn(e){const t=Ve(e),n=Ye(e),r=Ms(e);return Ns(t,n,r)}function In(e,t){return e??t??"default"}function J(e){return!e.isPending||e.fetchStatus==="idle"||e.fetchStatus==="paused"}const Un=5e3;function Ln(e,t){const n=Q(),r=Z(N=>N.selectedCwd),{sessions:i,isAnswered:o,isLoading:a}=Je(),u=ne(),f=pe(),{data:m}=u,{data:p}=f,c=t??(p==null?void 0:p.defaultRuntime)??null,d=fe(c),y=e!==null&&o&&!i.some(N=>N.id===e),v=he({queryKey:Ze.storedSettings(e),queryFn:()=>n.getStoredSessionSettings(e),staleTime:Un,enabled:y,networkMode:"always"}),{data:l}=v;if(r===null)return{mode:void 0,settled:!1};if(a)return{mode:void 0,settled:!1};if(!y)return{mode:void 0,settled:!0};if(!J(v)||!J(u)||!J(f))return{mode:void 0,settled:!1};if((l==null?void 0:l.permissionMode)!==void 0)return{mode:l.permissionMode,settled:!0};if(!c||!(d!=null&&d.permissionModes.supported))return{mode:void 0,settled:!0};const x=Rs(m==null?void 0:m.executionDefaults,c);return{mode:_s(x,d.permissionModes),settled:!0}}function zn(e,t,n,r){var Te,ke;const i=Q(),o=me(),a=Z(j=>j.selectedCwd),u=As(e),f=(u==null?void 0:u.cwd)??a,m=Z(j=>j.pendingAccount),{data:p}=es({sessionId:e??void 0,runtime:r??void 0}),c=Os(e??""),d=Me(j=>j.apply),y=Me(j=>j.clear),v=Ds(e),{data:l}=v,{sessions:x}=Je(),N=e===null?void 0:x.find(j=>j.id===e),w=Ln(e,r),g=((Te=p==null?void 0:p.find(j=>j.isDefault))==null?void 0:Te.value)??((ke=p==null?void 0:p[0])==null?void 0:ke.value)??"",T=Ps(e??""),_=!r||!(l!=null&&l.runtime)||l.runtime===r?l==null?void 0:l.model:void 0,E=T&&_===T.from?T.to:_,O=c.model??(n?t==null?void 0:t.model:null)??E??g,D=p==null?void 0:p.find(j=>j.value===O),M=(t==null?void 0:t.contextTokens)??(l==null?void 0:l.contextTokens)??null,C=(t==null?void 0:t.contextMaxTokens)??(D==null?void 0:D.contextWindow)??null,b=c.effort??(l==null?void 0:l.effort)??null,q=c.fastMode??(l==null?void 0:l.fastMode)??!1,G=c.permissionMode??(l==null?void 0:l.permissionMode)??(N==null?void 0:N.permissionMode)??w.mode,R=e===null||G!==void 0||J(v)&&w.settled,L={permissionMode:In(c.permissionMode,G),permissionModeKnown:R,model:O,effort:b,fastMode:q,costUsd:(t==null?void 0:t.costUsd)??null,contextPercent:xs(M,C),isStreaming:n,cwd:(l==null?void 0:l.cwd)??null},re=h.useCallback(async j=>{if(!e)return;const Ce={...j.model?{model:j.model}:{},...j.permissionMode?{permissionMode:j.permissionMode}:{},...j.effort?{effort:j.effort}:{},...j.fastMode!==void 0?{fastMode:j.fastMode}:{}};d(e,Ce);const we=(m==null?void 0:m.sessionId)===e?m.id:void 0,Ts={...r?{runtime:r}:{},...we?{account:we}:{},...j};try{const{permissionModePendingUntilNextTurn:ie,runtimeUnbound:ks,...Ee}=await i.updateSession(e,Ts,f??void 0);return ie&&Is.warning("Saved · starts on your next message",{description:"The current reply keeps its old setting."}),o.setQueriesData({queryKey:Ze.bySession(e)},z=>({...z,...Ee,...j.model===void 0?{model:z==null?void 0:z.model}:{},...ks?{runtime:z==null?void 0:z.runtime}:{}})),Ee}catch(ie){console.error("[useSessionStatus] updateSession failed for session",e,ie),y(e,Ce)}},[i,e,r,f,m,o,d,y]);return h.useEffect(()=>{if(!e)return;const j={};c.model!==void 0&&(l==null?void 0:l.model)===c.model&&(j.model=c.model),c.permissionMode!==void 0&&(l==null?void 0:l.permissionMode)===c.permissionMode&&(j.permissionMode=c.permissionMode),c.effort!==void 0&&(l==null?void 0:l.effort)===c.effort&&(j.effort=c.effort),c.fastMode!==void 0&&(l==null?void 0:l.fastMode)===c.fastMode&&(j.fastMode=c.fastMode),Object.keys(j).length>0&&y(e,j)},[e,l==null?void 0:l.model,l==null?void 0:l.permissionMode,l==null?void 0:l.effort,l==null?void 0:l.fastMode,c,y]),{...L,updateSession:re}}function Bn(e){const t=Q();return he({queryKey:["subagents",e??null],queryFn:()=>t.getSubagents({sessionId:e}),staleTime:1800*1e3})}const $n={duration:.2,ease:[.4,0,.2,1]},Fn="pointer-coarse:[&_button]:py-3";function vi({items:e,trailing:t}){const n=e.filter(i=>i.cluster==="left"),r=e.filter(i=>i.cluster==="right");return s.jsxs("div",{role:"toolbar","aria-label":"Chat status","aria-live":"polite","data-testid":"status-line",className:"text-muted-foreground flex items-center gap-2 overflow-hidden px-1 text-xs whitespace-nowrap pointer-coarse:min-h-11",children:[s.jsx(Ue,{items:n,className:"min-w-0 flex-auto"}),s.jsx(Ue,{items:r,className:"min-w-0 shrink"}),t!==void 0&&s.jsx("span",{className:"flex shrink-0 items-center",children:t})]})}const Gn=8;function Hn(e,t){return Gn**Math.max(0,t.indexOf(e.key))}function Ue({items:e,className:t}){const n=[...e].sort((r,i)=>i.severity-r.severity).map(r=>r.key);return s.jsx("div",{className:k("flex items-center gap-2",t),children:s.jsx(xe,{initial:!1,mode:"popLayout",children:e.map((r,i)=>s.jsxs(ge.div,{"data-testid":`status-item-${r.key}`,"data-rigid":r.rigid?"true":void 0,layout:"position",initial:{opacity:0,scale:.8,filter:"blur(4px)"},animate:{opacity:1,scale:1,filter:"blur(0px)"},exit:{opacity:0,scale:.8,filter:"blur(4px)"},transition:$n,style:r.rigid?void 0:{flexShrink:Hn(r,n)},className:k("inline-flex items-center gap-2",r.rigid?"shrink-0":"min-w-10",Fn),children:[i>0&&s.jsx(Wn,{}),r.node]},r.key))})})}function Wn(){return s.jsx("span",{className:"text-muted-foreground/30 shrink-0","aria-hidden":"true",children:"·"})}function Si({cwd:e}){const t=e.split("/").filter(Boolean).pop()??e;return s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1",title:e,children:[s.jsx(Us,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"truncate",children:t})]})}const Qn=Object.freeze({state:"unknown"}),qn=Object.freeze({state:"no-repo"});function Kn(e){const t=Q();return he({queryKey:["git-status",e],queryFn:()=>t.getGitStatus(e??void 0),enabled:!!e,refetchInterval:Re.GIT_STATUS_REFETCH_MS,refetchIntervalInBackground:!1,staleTime:Re.GIT_STATUS_STALE_TIME_MS})}function Xn(e){return!!e&&!("error"in e)}function Vn(e){return e===void 0?Qn:"error"in e?qn:{state:"repo",branch:e.branch,dirty:!e.clean}}function te(e){const t=e.trim(),n=Array.from(t);return n.length<=oe?t:`${n.slice(0,oe-1).join("").trimEnd()}…`}function Yn(e){return e.replace(/\s*\([^()]*\)\s*$/,"").split("·")[0].trim()}function Jn(e,t){return te(Zn(e,t))}function Zn(e,t){const n=t.find(i=>i.value===e);if(n)return Yn(n.displayName);const r=/claude-(\w+)-/.exec(e);return r?`${r[1].charAt(0).toUpperCase()}${r[1].slice(1)}`:e==="default"?"Default":Ls(e)??e}function Ti({data:e,workspace:t,compact:n}){if(!e)return null;if(!Xn(e))return s.jsxs("span",{className:"text-muted-foreground/50 inline-flex min-w-0 items-center gap-1",title:"Not a git repository",children:[s.jsx(V,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"truncate",children:"No repo"})]});const r=e.modified+e.staged+e.untracked,i=r===1?"1 change":`${r} changes`,o=[];if(e.modified>0&&o.push(`${e.modified} modified`),e.staged>0&&o.push(`${e.staged} staged`),e.untracked>0&&o.push(`${e.untracked} untracked`),e.conflicted>0&&o.push(`${e.conflicted} conflicted`),t){const u=zs(t.portBase),f=[`${t.key} · ${t.projectKey}`,`${t.branch??e.branch} · ${t.provider}`,e.ahead>0?`↑${e.ahead}`:"",e.behind>0?`↓${e.behind}`:"",o.length>0?o.join(", "):"clean",`ports ${u.DORKOS_PORT} / ${u.VITE_PORT} / ${u.SITE_PORT}`,t.pinned?"pinned":""].filter(Boolean);return s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1",title:f.join(" · "),children:[s.jsx(V,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"max-w-[20ch] truncate font-medium",children:n?te(t.key):t.key}),!n&&s.jsxs("span",{className:"text-muted-foreground truncate",children:["· ",t.projectKey]}),t.pinned&&s.jsx(ss,{className:"text-muted-foreground size-(--size-icon-xs) shrink-0"}),r>0&&(n?s.jsx(Le,{label:i}):s.jsxs("span",{className:"text-muted-foreground shrink-0",children:["· ",i]}))]})}const a=o.length>0?`${e.branch} · ${o.join(", ")}`:`${e.branch} · clean`;return s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1",title:a,children:[s.jsx(V,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"max-w-[25ch] truncate",children:n?te(e.branch):e.branch}),e.ahead>0&&s.jsxs("span",{className:"text-muted-foreground inline-flex shrink-0 items-center gap-0.5",children:[s.jsx(Bs,{className:"size-(--size-icon-xs)"}),e.ahead]}),e.behind>0&&s.jsxs("span",{className:"text-muted-foreground inline-flex shrink-0 items-center gap-0.5",children:[s.jsx($s,{className:"size-(--size-icon-xs)"}),e.behind]}),r>0&&(n?s.jsx(Le,{label:i}):s.jsxs("span",{className:"text-muted-foreground shrink-0",children:["· ",i]}))]})}function Le({label:e}){return s.jsx("span",{role:"img","aria-label":e,title:e,className:"bg-muted-foreground/70 size-1 shrink-0 rounded-full"})}function er({stop:e,onMakeDefault:t,onDismiss:n,pending:r,error:i,placement:o="inline"}){const a=o==="overlay";return a&&!e?null:s.jsx("div",{className:k("flex items-center px-1",a?"bg-background/95 pointer-events-auto absolute right-0 bottom-full left-0 z-20 mb-1 rounded-md py-0.5 backdrop-blur-sm":"min-h-5"),"data-testid":a?"make-default-slot-overlay":"make-default-slot",children:e&&s.jsxs("p",{role:"status","data-testid":"make-default-offer",className:k("animate-in fade-in-0 flex min-w-0 items-center gap-1.5 text-xs duration-200 motion-reduce:animate-none",i?"text-destructive":"text-muted-foreground"),children:[s.jsx("span",{className:"min-w-0 flex-1 truncate",children:i?s.jsxs(s.Fragment,{children:[s.jsx(Ne,{className:"mr-1 inline size-3 shrink-0 align-[-2px]","aria-hidden":!0}),i]}):s.jsxs(s.Fragment,{children:["Start every new chat in ",Fs(e),"?"]})})," ",s.jsxs("span",{className:"flex shrink-0 items-center gap-1 whitespace-nowrap",children:[i?s.jsx("button",{type:"button",disabled:r,onClick:t,"data-testid":"make-default-retry",className:"focus-ring text-foreground rounded-sm underline underline-offset-2 disabled:opacity-50",children:"Try again"}):s.jsx("button",{type:"button",disabled:r,onClick:t,"data-testid":"make-default-confirm",className:"focus-ring text-foreground rounded-sm underline underline-offset-2 disabled:opacity-50",children:"Make default"}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("button",{type:"button",onClick:n,"data-testid":"make-default-dismiss",className:"focus-ring hover:text-foreground rounded-sm underline underline-offset-2",children:"Dismiss"})]})]})})}const sr="Auto mode needs Opus 4.6+ or Sonnet 4.6";function ki({mode:e,onChangeMode:t,disabled:n,pending:r,runtime:i,modelSupportsAutoMode:o,planActive:a,compact:u,makeDefault:f,onOpenChange:m}){var C;const p=fe(i),c=Z(b=>b.setControlCenterOpen),d=H(b=>b.open),y=H(b=>b.setOpen),v=H(b=>b.setAvailable),l=!(p&&!p.permissionModes.supported)&&n!==!0&&r!==!0;h.useEffect(()=>(v(l),()=>v(!1)),[l,v]);const x=h.useRef(m);if(h.useEffect(()=>{x.current=m},[m]),h.useEffect(()=>()=>{var b;y(!1),(b=x.current)==null||b.call(x,!1)},[y]),p&&!p.permissionModes.supported)return null;const N=(p==null?void 0:p.permissionModes.values)??[],w=!o&&N.some(b=>b.id==="auto"),g=w?N.filter(b=>b.id!=="auto"):N,T=g.find(b=>b.id===e),A=(T==null?void 0:T.label)??Gs(e),_=u?te(A):A,E=Hs(T),O=(C=Ws(g).find(b=>b.mode.id===e))==null?void 0:C.stop,D=w&&(O==="act"||e==="auto"),M=s.jsxs("button",{disabled:n,"data-testid":"permission-mode-trigger","aria-label":`Permissions: ${A}`,className:k(W,"items-center gap-1 disabled:cursor-not-allowed disabled:opacity-40",E),children:[s.jsx(Qs,{descriptor:T,className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"truncate",children:_})]});return n?s.jsxs(P,{children:[s.jsx(I,{asChild:!0,children:s.jsx("span",{className:"inline-flex",children:M})}),s.jsx(U,{side:"top",children:"Send a message first"})]}):r?s.jsxs("span",{"data-testid":"permission-mode-pending","aria-busy":"true","aria-label":"Permissions: still loading",className:k(W,"items-center gap-1 opacity-40"),children:[s.jsx("span",{className:"bg-muted-foreground/30 size-(--size-icon-xs) shrink-0 animate-pulse rounded-full"}),s.jsx("span",{className:"bg-muted-foreground/30 h-2 w-10 animate-pulse rounded"})]}):s.jsxs(je,{open:d,onOpenChange:b=>{y(b),m==null||m(b)},children:[s.jsx(ye,{asChild:!0,children:M}),s.jsxs(be,{side:"top",align:"start",className:"w-80 p-3","aria-label":"Permissions",children:[s.jsx(ve,{children:"Permissions"}),s.jsx(qs,{mode:e,descriptors:g,onChangeMode:t,planActive:a,onUnlock:()=>c(!0)}),f&&s.jsx(er,{...f}),D&&s.jsxs(P,{children:[s.jsx(I,{asChild:!0,children:s.jsxs("p",{"data-testid":"auto-unsupported-hint",className:"text-muted-foreground text-3xs mt-2 flex items-center gap-1.5 px-1",children:[s.jsx(ts,{className:"size-(--size-icon-xs) shrink-0"}),"Auto unavailable on this model"]})}),s.jsx(U,{side:"top",children:sr})]}),s.jsx(Ks,{mode:e,descriptor:T,className:"mt-2 px-1"})]})]})}const tr=6e3;function nr(e){return e instanceof Error&&e.message||"Couldn’t save that. Try again."}function Ci(e){var b,q,G;const{sessionId:t,runtime:n,declaredModes:r,runtimeDefaultMode:i}=e,{data:o}=ne(),{data:a}=pe(),u=mn(),f=me(),m=Xs(t),p=$(R=>R.dismissDefaultStopOffer),[c,d]=h.useState(null),[y,v]=h.useState(null),[l,x]=h.useState(t);l!==t&&(x(t),d(null),v(null));const N=o==null?void 0:o.executionDefaults,w=n??(N==null?void 0:N.runtime),g=(b=N==null?void 0:N.perRuntime.find(R=>R.runtime===w))==null?void 0:b.trustStop,T=g??(N==null?void 0:N.trustStop)??null,A=(q=r.find(R=>R.id===i))==null?void 0:q.stop,_=T??A,E=g!=null?(G=pn(a,w))==null?void 0:G.configSection:void 0,O=o!==void 0;h.useEffect(()=>{if(!c)return;const R=setTimeout(()=>d(null),tr);return()=>clearTimeout(R)},[c]);const D=h.useCallback(R=>{const L=r.find(re=>re.id===R);!L||Vs(L)||!O||m||L.stop!==_&&(v(null),d(L.stop))},[r,O,m,_,d,v]),M=h.useCallback(()=>{if(!c)return;const R=c;v(null),u.mutate({runtimes:E?{[E]:{defaultTrustStop:R}}:{defaultTrustStop:R}},{onSuccess:()=>{f.invalidateQueries({queryKey:B.all}),d(null)},onError:L=>v(nr(L))})},[c,u,f,E,d,v]),C=h.useCallback(()=>{p(t),d(null)},[p,t,d]);return{line:O?{stop:c,onMakeDefault:M,onDismiss:C,pending:u.isPending,error:y}:null,offerFor:D}}function wi({runtimeLabel:e,onShown:t,onDismiss:n}){const r=H(o=>o.available),i=H(o=>o.setOpen);return h.useEffect(()=>{t==null||t()},[t]),s.jsxs(fn,{"data-slot":"read-only-mode-notice","data-testid":"read-only-mode-notice",gap:"none",className:"flex-row flex-wrap items-center gap-x-3 gap-y-2 px-3 py-2",children:[s.jsx(Ys,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":!0}),s.jsxs("p",{className:"text-muted-foreground min-w-0 flex-1 text-xs",children:["In this mode, ",e," reads files but won’t change them. Asking won’t help."]}),s.jsxs("div",{className:"flex w-full shrink-0 flex-wrap items-center justify-end gap-1.5 sm:w-auto",children:[s.jsx(F,{variant:"ghost",size:"sm",responsive:!1,className:"h-7 px-2 text-xs",onClick:n,children:"Dismiss"}),r&&s.jsx(F,{variant:"outline",size:"sm",responsive:!1,className:"h-7 px-2 text-xs",onClick:()=>i(!0),children:"Change permissions"})]})]})}function Ei(e,t,n){const r=fe(t??void 0),i=$(c=>c.recordReadOnlyHintShown),o=$(c=>c.spendReadOnlyHint),a=Js(e??""),u=r==null?void 0:r.permissionModes.values.find(c=>c.id===n),f=u!==void 0&&Zs(u);h.useEffect(()=>{f||!e||a!=="shown"||o(e)},[f,e,a,o]);const m=h.useCallback(()=>{e&&i(e)},[e,i]),p=h.useCallback(()=>{e&&o(e)},[e,o]);return h.useMemo(()=>({eligible:!!e&&f&&a!=="spent",runtimeLabel:t?et(t):"This agent",markShown:m,dismiss:p}),[e,f,a,t,m,p])}function Mi({descriptor:e,active:t,onToggle:n,disabled:r}){return s.jsxs(P,{children:[s.jsx(I,{asChild:!0,children:s.jsxs("button",{type:"button","aria-pressed":t,disabled:r,onClick:()=>n(!t),className:k(W,"items-center gap-1","disabled:cursor-not-allowed disabled:opacity-40",t&&"text-foreground"),children:[s.jsx(ns,{className:"size-(--size-icon-xs) shrink-0","aria-hidden":!0}),s.jsx("span",{className:"truncate",children:e.label})]})}),s.jsx(U,{side:"top",children:r?"Send a message first":e.promise})]})}function Ri({runtime:e,model:t,onChangeRuntime:n,canSelect:r,compact:i,account:o}){const{data:a}=pe(),{data:u}=st(),{nameFor:f}=tt(),[m,p]=h.useState({open:!1}),c=Object.keys((a==null?void 0:a.capabilities)??{}),d=c.filter(g=>_e(u,g)),y=c.filter(g=>!_e(u,g)),v=a!==void 0&&Object.values(nt).some(g=>g.setup&&!c.includes(g.type)),l=!!n&&(c.length>1||y.length>0||v),x=i?null:t,N=s.jsx(Ae,{runtime:e,model:x,iconClassName:"size-(--size-icon-xs)"}),w=o?`Account: ${f(o)}`:null;return r?l?s.jsxs(s.Fragment,{children:[s.jsxs(rt,{children:[s.jsx(it,{asChild:!0,children:s.jsx("button",{className:W,children:s.jsx(Ae,{runtime:e,model:x,iconClassName:"size-(--size-icon-xs)"})})}),s.jsxs(at,{side:"top",align:"start",className:"w-56",children:[s.jsx(ot,{children:"Runs on"}),s.jsx(lt,{value:e,onValueChange:g=>n==null?void 0:n(g),children:d.map(g=>{const T=De(g);return s.jsx(ct,{value:g,icon:T.icon,children:T.label},g)})}),y.map(g=>{const T=De(g);return s.jsx(Oe,{icon:T.icon,description:"Connect",onSelect:()=>p({open:!0,runtime:g}),children:T.label},g)}),v&&s.jsxs(s.Fragment,{children:[s.jsx(ut,{}),s.jsx(Oe,{icon:dt,onSelect:()=>p({open:!0}),children:"Add a runtime"})]})]})]}),s.jsx(hn,{runtime:m.runtime,open:m.open,onOpenChange:g=>p(T=>({...T,open:g})),renderConnect:jn,showConnectSuccess:!0,onRuntimeReady:g=>{n==null||n(g)}})]}):w?s.jsxs(P,{children:[s.jsx(I,{asChild:!0,children:N}),s.jsx(U,{side:"top",children:w})]}):N:s.jsxs(P,{children:[s.jsx(I,{asChild:!0,children:N}),s.jsxs(U,{side:"top",children:[s.jsx("span",{className:"block",children:"Set when the chat starts. It can’t change after."}),w&&s.jsx("span",{className:"block",children:w})]})]})}function _i(e,t,n){const r=rs(),i=mt(e),o=new Date(r),a=t.pending?null:t.usage;return{...pt({liveTurnUsage:n,liveTurnAt:i,accountStatus:ft(a,o),accountObservedAt:is(as(a))}),accountUsage:a}}function Ai({open:e,onOpenChange:t,onConfirm:n}){return s.jsx(ht,{open:e,onOpenChange:t,children:s.jsxs(xt,{children:[s.jsxs(gt,{children:[s.jsxs(Nt,{className:"flex items-center gap-2",children:[s.jsx(ts,{className:"text-muted-foreground size-4"}),"Turn on Auto mode?",s.jsx(ee,{size:"xs",variant:"secondary",className:"tracking-wide uppercase",children:"Preview"})]}),s.jsx(jt,{children:"Asks only before risky steps, like deleting files. Switch back anytime."})]}),s.jsxs(yt,{children:[s.jsx(bt,{children:"Cancel"}),s.jsx(vt,{onClick:n,children:"Turn on Auto mode"})]})]})})}const ze=[{slug:"frontier",label:"Frontier"},{slug:"solid-coders",label:"Solid coders"},{slug:"quick-helpers",label:"Quick helpers"},{slug:"more-models",label:"More models"},{slug:"no-tools",label:"Can’t do agent work"}],rr=10,ir="Can’t use tools, so it can’t read files or run commands.",ar="Makes images DorkOS can’t show yet.",or=["openrouter/openrouter/auto","openrouter/auto"];function lr(e){return or.some(t=>e.value===t||e.value.startsWith(`${t}-`))}function js(e){return e.supportsToolUse!==!1}function cr(e){return e.supportsImageOutput===!0&&!lr(e)?ar:js(e)?null:ir}function ur(e){if(!js(e))return"no-tools";switch(e.tier){case"frontier":return"frontier";case"solid-coder":return"solid-coders";case"quick-helper":return"quick-helpers";default:return"more-models"}}function dr(e){return e.some(t=>t.tier!=null)||e.length>rr}function mr(e,t){const n=t.trim().toLowerCase();return n?e.value.toLowerCase().includes(n)||e.displayName.toLowerCase().includes(n):!0}function pr(e){const t=new Map(ze.map(n=>[n.slug,[]]));for(const n of e)t.get(ur(n)).push(n);return ze.map(n=>({...n,models:t.get(n.slug)})).filter(n=>n.models.length>0)}function fr(e){return e>=1e6?`${Math.round(e/1e6)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e)}function hr(){return s.jsx("div",{className:"space-y-2","data-testid":"model-cards-skeleton",children:Array.from({length:3}).map((e,t)=>s.jsxs("div",{className:"flex items-center gap-3 rounded-xl p-3",children:[s.jsx(K,{className:"size-4 rounded-full"}),s.jsxs("div",{className:"flex-1 space-y-1.5",children:[s.jsx(K,{className:"h-3.5 w-24"}),s.jsx(K,{className:"h-2.5 w-32"})]}),s.jsx(K,{className:"h-5 w-10 rounded-md"})]},t))})}function xr({onRetry:e,message:t}){return s.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center","data-testid":"model-load-error",children:[s.jsx(Ne,{className:"text-muted-foreground size-5"}),s.jsx("p",{className:"text-muted-foreground text-xs",children:t??"Couldn’t load the model list."}),s.jsxs("button",{onClick:e,className:"text-foreground hover:bg-accent inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs transition-colors",children:[s.jsx(os,{className:"size-3"}),"Retry"]})]})}function gr(e){const t=e.slice(e.lastIndexOf(" ")+1);return t.includes("/")||t.includes(":")}function ys({text:e,className:t}){return gr(e)?s.jsx("div",{dir:"rtl",className:k("truncate text-left",t),title:e,children:s.jsx("bdi",{dir:"ltr",children:e})}):s.jsx("div",{className:k("truncate",t),title:e,children:e})}function Be({model:e,isSelected:t}){const n=cr(e);return s.jsxs("label",{className:k("flex w-full cursor-pointer items-center gap-3 rounded-xl border p-3 transition-colors duration-150",t?"bg-secondary border-foreground/15":"border-border hover:border-muted-foreground/30 hover:bg-muted/50 opacity-70"),children:[s.jsx(kt,{value:e.value,className:"shrink-0"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"text-foreground line-clamp-2 text-sm font-medium break-words",children:[e.displayName,e.local&&s.jsxs("span",{className:"text-muted-foreground text-3xs ml-1.5 font-normal",children:[Ct()," · private"]})]}),s.jsx(ys,{text:e.description,className:"text-muted-foreground text-2xs leading-tight"}),n&&s.jsx("div",{className:"text-2xs text-status-warning-fg mt-0.5 leading-tight","data-testid":`model-limitation-${e.value}`,children:n})]}),e.contextWindow&&s.jsx(ee,{size:"xs",variant:"secondary",className:"shrink-0",children:fr(e.contextWindow)})]})}function Nr({value:e}){return s.jsxs("div",{className:"space-y-1.5","data-testid":"model-unavailable-saved",children:[s.jsxs("div",{className:"border-border flex w-full items-center gap-3 rounded-xl border border-dashed p-3 opacity-80",children:[s.jsx(Ne,{className:"text-status-warning-fg size-4 shrink-0"}),s.jsxs("div",{className:"flex min-w-0 flex-1 items-baseline gap-1.5",children:[s.jsx(ys,{text:e,className:"text-foreground min-w-0 text-sm font-medium"}),s.jsx("span",{className:"text-muted-foreground text-2xs shrink-0 font-normal",children:"(not available)"})]})]}),s.jsx("p",{className:"text-muted-foreground text-2xs leading-snug",children:"This model isn’t available anymore. Pick another."})]})}function jr({slug:e,label:t}){return s.jsx("div",{className:"text-muted-foreground text-2xs mt-2 mb-1 font-medium tracking-wide uppercase first:mt-0","data-testid":`model-group-${e}`,children:t})}function yr({models:e,selectedModel:t,onChangeModel:n,emptyMessage:r}){const[i,o]=h.useState(""),a=dr(e),f=e.length>0&&t.length>0&&!e.some(d=>d.value===t)?s.jsx(Nr,{value:t}):null,m=e.some(d=>d.unverified),p=h.useMemo(()=>a?e.filter(d=>mr(d,i)):e,[e,i,a]),c=h.useMemo(()=>a?pr(p):[],[p,a]);return e.length===0?s.jsx("div",{className:"border-border text-muted-foreground text-2xs rounded-xl border border-dashed p-3 leading-snug","data-testid":"model-catalog-unavailable",children:r??"Couldn’t load models. Check Settings, then try again."}):a?s.jsxs("div",{className:"space-y-2",children:[f,m&&s.jsx(Ie,{}),s.jsxs("div",{className:"relative",children:[s.jsx(St,{className:"text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2"}),s.jsx(Tt,{type:"text",value:i,onChange:d=>o(d.target.value),placeholder:"Search models…","aria-label":"Search models","data-testid":"model-search",className:"h-8 pl-8 text-xs"})]}),c.length===0?s.jsx("p",{className:"text-muted-foreground py-4 text-center text-xs","data-testid":"model-search-empty",children:m?"No match in this short list. Connect a provider to see more.":"No models match"}):s.jsx(Pe,{value:t,onValueChange:n,className:"grid-cols-1 gap-1.5","aria-label":"Model selection","data-testid":"model-card-list",children:c.map(d=>s.jsxs(h.Fragment,{children:[s.jsx(jr,{slug:d.slug,label:d.label}),d.models.map(y=>s.jsx(Be,{model:y,isSelected:y.value===t},y.value))]},d.slug))})]}):s.jsxs("div",{className:"space-y-2",children:[f,m&&s.jsx(Ie,{}),s.jsx(Pe,{value:t,onValueChange:n,className:"grid-cols-1 gap-1.5","aria-label":"Model selection","data-testid":"model-card-list",children:e.map(d=>s.jsx(Be,{model:d,isSelected:d.value===t},d.value))})]})}const ce={none:{label:"None",description:"No reasoning"},minimal:{label:"Minimal",description:"Near-zero thinking"},low:{label:"Low",description:"Fastest responses"},medium:{label:"Medium",description:"Moderate thinking"},high:{label:"High",description:"Deep reasoning"},max:{label:"Max",description:"Maximum thinking"},xhigh:{label:"XHigh",description:"Beyond maximum"}},br={duration:.15,ease:"easeOut"};function vr({effortLevels:e,effort:t,onChangeEffort:n}){return s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-2xs mb-2 font-medium tracking-wide uppercase",children:"Effort"}),s.jsxs("div",{className:"flex flex-wrap gap-1.5",role:"radiogroup","aria-label":"Effort level",children:[s.jsx(ue,{role:"radio",label:"Default",isSelected:t===null,onClick:()=>n(null)}),e.map(r=>s.jsx(ue,{role:"radio",label:ce[r].label,description:ce[r].description,isSelected:t===r,onClick:()=>n(r)},r))]})]})}function Sr({supportsFastMode:e,fastMode:t,onChangeFastMode:n}){return e?s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-2xs mb-2 font-medium tracking-wide uppercase",children:"Mode"}),s.jsx("div",{className:"flex gap-1.5",children:s.jsx(ue,{role:"switch",label:"Fast",icon:s.jsx(Se,{className:"size-3"}),isSelected:t,onClick:()=>n(!t)})})]}):null}function ue({role:e,label:t,description:n,icon:r,isSelected:i,onClick:o}){const a=s.jsxs("button",{role:e,"aria-checked":i,onClick:o,className:k("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors duration-150",i?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"),children:[r,t]});return n?s.jsxs(P,{children:[s.jsx(I,{asChild:!0,children:a}),s.jsx(U,{side:"top",className:"text-xs",children:n})]}):a}function Oi({model:e,onChangeModel:t,effort:n,onChangeEffort:r,fastMode:i,onChangeFastMode:o,disabled:a,sessionId:u,runtime:f,onCredits:m,compact:p}){var _;const{data:c,isLoading:d,isError:y,refetch:v}=es({sessionId:u,runtime:f??void 0}),l=c??[],x=l.find(E=>E.value===e),N=!!(x!=null&&x.supportsEffort&&(((_=x.supportedEffortLevels)==null?void 0:_.length)??0)>0),w=(x==null?void 0:x.supportsFastMode)??!1,g=!p&&N&&n?ce[n].label:null,T=!p&&i,A=s.jsxs("button",{disabled:a,className:k(W,"items-center gap-1 disabled:cursor-not-allowed disabled:opacity-40"),"data-testid":"model-config-trigger",children:[s.jsx(ls,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"truncate",children:Jn(e,l)}),g&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground text-2xs",children:"·"}),s.jsx(ee,{size:"xs",variant:"secondary",children:g})]}),T&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground text-2xs",children:"·"}),s.jsxs(ee,{size:"xs",variant:"secondary",children:[s.jsx(Se,{className:"mr-0.5 inline size-2.5"}),"Fast"]})]})]});return a?s.jsxs(P,{children:[s.jsx(I,{asChild:!0,children:s.jsx("span",{className:"inline-flex",children:A})}),s.jsx(U,{side:"top",children:"Send a message first"})]}):s.jsxs(je,{children:[s.jsx(ye,{asChild:!0,children:A}),s.jsxs(be,{side:"top",align:"start",className:"w-120 max-w-[calc(100vw-1.5rem)] p-3","data-testid":"model-config-popover",children:[s.jsx(ve,{children:"Model"}),l.some(E=>E.paidFromCredits)&&s.jsx("p",{className:"text-muted-foreground text-2xs mb-2","data-testid":"model-credits-note",children:l.some(E=>E.creditsListOutOfDate)?"Models your DorkOS credits cover. This list may be out of date.":"Models your DorkOS credits cover"}),d&&s.jsx(hr,{}),y&&s.jsx(xr,{onRetry:()=>v(),message:m?"Couldn’t load the models DorkOS credits cover. Your model stays as it is.":void 0}),!d&&!y&&s.jsx(yr,{models:l,selectedModel:e,onChangeModel:t,emptyMessage:m?"DorkOS credits don’t cover a model for this runtime yet.":void 0}),s.jsx(xe,{children:!d&&!y&&(N||w)&&s.jsxs(ge.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:br,children:[s.jsx(wt,{className:"my-3"}),s.jsx("div",{className:"text-muted-foreground text-2xs mb-3 font-medium tracking-wide uppercase",children:"Configuration"}),s.jsxs("div",{className:"space-y-3",children:[N&&s.jsx(vr,{effortLevels:x.supportedEffortLevels,effort:n,onChangeEffort:r}),w&&s.jsx(Sr,{supportsFastMode:(x==null?void 0:x.supportsFastMode)??!1,fastMode:i,onChangeFastMode:o})]})]},"config")})]})]})}function Di({percent:e,contextUsage:t,compact:n,reading:r,now:i}){const o=gs(e,t)??e,a=An(o),u=a==="critical"?se.error:a==="warning"?se.warning:"",f=n!=null&&o>=hs,m=t?{total:t.totalTokens,max:t.maxTokens}:r&&r.maxTokens>0?{total:r.totalTokens,max:r.maxTokens}:null,p=(r==null?void 0:r.observedAt)??null,c=m!==null,d=s.jsxs("span",{"aria-label":c?"Context window usage":void 0,className:k("inline-flex shrink-0 items-center gap-1",c&&"cursor-default",u),children:[s.jsx(yn,{className:"size-(--size-icon-xs) shrink-0"}),s.jsxs("span",{children:[o,"%"]})]});return s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5",children:[m?s.jsx(Tr,{totals:m,categories:(t==null?void 0:t.categories)??[],observedAt:p,now:i,children:d}):d,s.jsx(xe,{initial:!1,children:f&&s.jsxs(ge.button,{type:"button",onClick:n.onCompact,disabled:n.pending,"aria-label":n.pending?"Compacting chat…":`Context ${o}% full. Compact now`,"aria-busy":n.pending,"data-testid":"compaction-chip",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},className:"bg-secondary text-muted-foreground hover:text-foreground hover:bg-muted inline-flex min-w-0 shrink items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors duration-150 disabled:cursor-not-allowed disabled:opacity-60",children:[s.jsx(os,{"aria-hidden":"true",className:k("size-(--size-icon-xs) shrink-0",n.pending&&"animate-spin")}),s.jsx("span",{className:"truncate",children:"Compact"})]},"compact")})]})}function Tr({totals:e,categories:t,observedAt:n,now:r,children:i}){const o=t.filter(a=>a.tokens>0).sort((a,u)=>u.tokens-a.tokens);return s.jsxs(P,{children:[s.jsx(I,{asChild:!0,children:i}),s.jsx(U,{side:"top",className:"max-w-64",children:s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"text-xs font-medium",children:[ae(e.total)," / ",ae(e.max)," tokens"]}),o.length>0&&s.jsx("div",{className:"space-y-0.5",children:o.map(a=>s.jsxs("div",{className:"text-3xs flex items-center justify-between gap-3",children:[s.jsxs("span",{className:"flex items-center gap-1 truncate",children:[s.jsx("span",{className:"inline-block size-1.5 shrink-0 rounded-full",style:{backgroundColor:a.color}}),a.name]}),s.jsx("span",{className:k(le,"shrink-0"),children:ae(a.tokens)})]},a.name))}),n!==null&&s.jsx(cs,{observedAt:n,now:r,surface:"tooltip"})]})})]})}function Pi({usage:e,accountUsage:t=null,observedAt:n=null,open:r,onOpenChange:i,now:o}){const a=rs(),u=o??new Date(a),f=as(t),m=f.length>0?is(f):n,p=e!=null&&us(e);let c;return f.length>0?c=s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-xs font-medium",children:"Subscription usage"}),s.jsx("div",{className:"flex flex-col gap-2.5",children:f.map(d=>s.jsx(Et,{window:d,label:Mt(d.key,d.label),now:u},d.key))}),e&&s.jsx("div",{className:"text-3xs space-y-0.5",children:s.jsx(Rt,{usage:e})})]}):p?c=s.jsx(Dt,{usage:e}):c=s.jsx("p",{className:"text-muted-foreground text-xs",children:"No usage yet."}),s.jsxs(_t,{open:r,onOpenChange:i,children:[s.jsx(At,{asChild:!0,children:s.jsx("span",{"aria-hidden":!0,className:"inline-block h-0 w-0"})}),s.jsx(Ot,{side:"top",align:"end",className:"w-72 max-w-[calc(100vw-1.5rem)]","aria-label":"Usage and cost",children:s.jsxs("div",{className:"space-y-2",children:[c,m!==null&&(f.length>0||p)&&s.jsx(cs,{observedAt:m,now:u})]})})]})}const kr={connecting:{color:X.warning,label:"Connecting",shortLabel:"Connecting",icon:Y,tasks:!0},connected:{color:X.success,label:"Connected",shortLabel:"Connected",icon:Y,tasks:!1},reconnecting:{color:X.warning,label:"Reconnecting",shortLabel:"Reconnecting",icon:Y,tasks:!0},disconnected:{color:X.error,label:"Live updates lost",shortLabel:"Offline",icon:Pt,tasks:!1}};function Ii({connectionState:e,compact:t}){const n=kr[e],r=n.icon;return s.jsxs(xn,{openDelay:200,children:[s.jsx(gn,{asChild:!0,children:s.jsxs("span",{className:"flex min-w-0 cursor-default items-center gap-1.5 text-xs",children:[s.jsx("span",{className:k("size-1.5 shrink-0 rounded-full",n.color,n.tasks&&"animate-breath")}),s.jsx("span",{className:"text-muted-foreground truncate",children:t?n.shortLabel:n.label})]})}),s.jsx(Nn,{side:"top",align:"center",className:"w-72 p-3",children:s.jsxs("div",{className:"flex items-start gap-2.5",children:[s.jsx(r,{className:k("mt-0.5 size-4 shrink-0",e==="disconnected"?se.error:se.warning)}),s.jsxs("div",{className:"min-w-0 space-y-1.5",children:[s.jsx("p",{className:"text-sm font-medium",children:n.label}),s.jsx(Cr,{connectionState:e})]})]})})]})}function Cr({connectionState:e}){const t="text-muted-foreground text-xs leading-relaxed";return e==="connecting"?s.jsx("p",{className:t,children:"Connecting to live updates. New messages appear once connected."}):e==="reconnecting"?s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("p",{className:t,children:"Live updates dropped and are reconnecting. Nothing is lost."}),s.jsx("p",{className:k(t,"text-muted-foreground/70"),children:"No action needed."})]}):s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("p",{className:t,children:"Couldn’t reconnect live updates. New messages won’t appear until they’re back."}),s.jsx("p",{className:k(t,"text-muted-foreground/70"),children:"Refresh the page. If that doesn’t help, check that DorkOS is running."})]})}function Ui({count:e,running:t,waiting:n}){const r=e===1?"":"s",i=e-t.length,o=`${e} subagent${r} running`;return s.jsxs(P,{children:[s.jsx(I,{asChild:!0,children:s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1","aria-label":o,children:[s.jsx(ds,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"shrink-0 tabular-nums",children:e})]})}),s.jsxs(U,{side:"top",className:"max-w-64",children:[n&&s.jsx("p",{className:"mb-1 font-medium",children:"Still working. The agent continues when they finish."}),s.jsx("ul",{className:"space-y-1",children:t.map(a=>s.jsxs("li",{children:[s.jsx("span",{className:"font-medium",children:a.description??"Working…"}),s.jsxs("p",{className:k(le,"text-3xs leading-tight"),children:[a.toolUses??0," tool",a.toolUses===1?"":"s",a.lastToolName?` · last ${a.lastToolName}`:""]})]},a.taskId))}),i>0&&s.jsx("p",{className:k(le,"text-3xs leading-tight"),children:t.length>0?`and ${i} more`:`${i} task${r} from earlier`})]})]})}const wr=new Set(["main","master"]);function Li(e,t,n){return{dirty:!t,onDefaultBranch:!n&&wr.has(e)}}const S={AGENT_ANCHOR:1e3,CONNECTION_LOST:100,CONTEXT_CRITICAL:90,ACCOUNT_ATTENTION:85,USAGE_EXHAUSTED:80,PERMISSION_BYPASS:70,CONTEXT_WARNING:50,USAGE_WARNING:50,PERMISSION_ELEVATED:40,PLAN_ACTIVE:40,SUBAGENTS_RUNNING:35,EXTENSION_ITEM:35,RUNTIME_NON_DEFAULT:30,GIT_DIRTY:20,MODEL:10,CWD:5,QUIET:0},Er={session:"Session",diagnostics:"Diagnostics"};function $e(e){return e.runtime&&!e.runtime.isDefault?S.RUNTIME_NON_DEFAULT:S.QUIET}function Mr(e){return e.account!==null}const Rr=new Set(["near","model-out","out"]);function Fe(e){return e.permissionDescriptor?e.permissionDescriptor.stop!=="ask":e.permissionMode!=="default"}const bs=[{key:"agent",label:"Agent",description:"Who you are talking to",cluster:"left",group:null,icon:Ut,promote:()=>!0,severity:()=>S.AGENT_ANCHOR},{key:"cwd",label:"Directory",description:"The folder this chat can touch",cluster:"left",group:"session",icon:Lt,promote:e=>e.cwd!==null,severity:()=>S.CWD},{key:"git",label:"Git",description:"Branch and uncommitted changes",cluster:"left",group:"session",icon:V,promote:e=>e.git!==null&&(e.git.dirty||!e.git.onDefaultBranch),severity:e=>{var t;return(t=e.git)!=null&&t.dirty?S.GIT_DIRTY:S.QUIET}},{key:"runtime",label:"Runs on",description:"What runs this chat",cluster:"right",group:"session",icon:bn,promote:e=>e.runtime!==null&&e.runtime.type!=="doe"&&(!e.runtime.isDefault||e.runtime.canSelect),severity:$e},{key:"account",label:"Account",description:"Which Claude account this uses, and what’s left",cluster:"right",group:null,icon:vn,promote:e=>e.account!==null,severity:e=>e.account&&Rr.has(e.account.chipState)?S.ACCOUNT_ATTENTION:$e(e)},{key:"extensions",label:"Add-ons",description:"What your extensions show here",cluster:"right",group:null,icon:zt,promote:e=>e.extensionItems.some(t=>t.visible),severity:e=>e.extensionItems.some(t=>t.visible&&t.urgent)?S.ACCOUNT_ATTENTION:S.EXTENSION_ITEM},{key:"model",label:"Model",description:"The model answering you",cluster:"right",group:"session",icon:ls,promote:()=>!1,severity:()=>S.MODEL},{key:"cache",label:"Cache",description:"How much came from cache",cluster:"right",group:"session",icon:Se,promote:()=>!1,severity:()=>S.QUIET,neverInLine:!0},{key:"context",label:"Context",description:"How full the context window is",cluster:"right",group:"session",icon:Sn,rigid:!0,promote:e=>e.contextPercent!==null,severity:e=>e.contextPercent===null?S.QUIET:e.contextPercent>=hs?S.CONTEXT_CRITICAL:e.contextPercent>=_n?S.CONTEXT_WARNING:S.QUIET},{key:"usage",label:"Usage & cost",description:"Plan limits or chat cost",cluster:"right",group:"session",icon:Bt,rigid:!0,promote:e=>e.usage!==null&&us(e.usage)&&!Mr(e),wide:e=>e.usageStale,severity:e=>{var t,n;return((t=e.usage)==null?void 0:t.state)==="exhausted"?S.USAGE_EXHAUSTED:((n=e.usage)==null?void 0:n.state)==="warning"?S.USAGE_WARNING:S.QUIET}},{key:"permission",label:"Permissions",description:"How freely the agent acts",cluster:"right",group:"session",icon:$t,promote:e=>Fe(e)||e.permissionPickerOpen===!0,severity:e=>(e.permissionDescriptor?Ft(e.permissionDescriptor):Gt(e.permissionMode))?S.PERMISSION_BYPASS:Fe(e)||e.permissionPickerOpen===!0?S.PERMISSION_ELEVATED:S.QUIET},{key:"plan",label:"Plan",description:"Plan first, change nothing until approved",cluster:"right",group:"session",icon:ns,promote:e=>e.plan!==null,severity:e=>{var t;return(t=e.plan)!=null&&t.active?S.PLAN_ACTIVE:S.QUIET}},{key:"subagents",label:"Subagents",description:"Subagents working on this turn",cluster:"right",group:"diagnostics",icon:ds,rigid:!0,promote:e=>e.subagentsInFlight>0,severity:e=>e.subagentsInFlight>0?S.SUBAGENTS_RUNNING:S.QUIET},{key:"connection",label:"Live updates",description:"The live link that delivers messages",cluster:"right",group:"diagnostics",icon:Y,promote:e=>e.connectionState!=="connected",severity:e=>e.connectionState==="connected"?S.QUIET:S.CONNECTION_LOST}];function vs(e){return e.group==="session"&&e.neverInLine!==!0}function _r(){const{pins:e}=wn(),{setPins:t}=En(),n=h.useCallback(i=>{const o=It.find(a=>a===i);o&&t(e.includes(o)?e.filter(a=>a!==o):[...e,o])},[e,t]),r=h.useCallback(()=>t([]),[t]);return{pins:e,toggle:n,reset:r}}function Ar(){return["session","diagnostics"].map(t=>({group:t,label:Er[t],items:bs.filter(n=>n.group===t)})).filter(t=>t.items.length>0)}function Ss(e){const t=e.contextTokens??e.readTokens+e.creationTokens;return t<=0?0:Math.round(e.readTokens/t*100)}function Or(e){return e?e.kind==="subscription"&&e.utilization!=null?`${Math.round(e.utilization*100)}% of ${e.windowLabel??"your plan"}`:e.costUsd!=null?`$${e.costUsd.toFixed(2)}`:null:null}function Dr(e){return e.split("/").filter(Boolean).pop()??e}function Pr(e,t){switch(e){case"cwd":return t.cwd?Dr(t.cwd):null;case"git":return t.git.state==="unknown"?null:t.git.state==="no-repo"?"No repo":t.git.dirty?`${t.git.branch} · changed`:t.git.branch;case"runtime":return t.runtime;case"model":return t.model;case"context":return t.contextPercent===null?null:`${t.contextPercent}% full`;case"cache":return t.cache===null?null:`${Ss(t.cache)}% from cache`;case"usage":return Or(t.usage);case"permission":return t.permissionMode;case"connection":return`${t.connectionState} · event ${t.lastEventSeq}`;default:return null}}function Ir(e){return JSON.stringify({sessionId:e.sessionId,cwd:e.cwd,git:e.git,runtime:e.runtime,model:e.model,selectedModel:e.selectedModel,effort:e.effort,fastMode:e.fastMode,permissionMode:e.permissionMode,contextPercent:e.contextPercent,contextUsage:e.contextUsage,cache:e.cache===null?null:{readTokens:e.cache.readTokens,creationTokens:e.cache.creationTokens,contextTokens:e.cache.contextTokens??null,hitPercent:Ss(e.cache)},usage:e.usage,connectionState:e.connectionState,streaming:e.streaming,lifecycle:e.lifecycle,triggerPending:e.triggerPending,lastEventSeq:e.lastEventSeq,snapshotCursor:e.snapshotCursor,lastEventAt:e.lastEventAt===null?null:new Date(e.lastEventAt).toISOString(),queueDepth:e.queueDepth,subagents:e.subagents.map(t=>t.name),activeSubagents:e.activeSubagents,runningSubagentCount:e.runningSubagentCount,clientVersion:e.clientVersion,capturedAt:new Date().toISOString()},null,2)}function Ur({copied:e,failed:t}){return e?s.jsx(Wt,{className:"text-status-success size-3.5","aria-hidden":!0}):t?s.jsx(Qt,{className:"text-destructive size-3.5","aria-hidden":!0}):s.jsx(Tn,{className:"size-3.5","aria-hidden":!0})}function Lr(e,t){return e?"Copied":t?"Couldn’t copy":"Copy diagnostics"}function zr({diagnostics:e,className:t}){const{copied:n,failed:r,copy:i}=Ht(),o=()=>void i(Ir(e));return s.jsxs(F,{variant:"ghost",size:"sm",className:k("gap-1.5 text-xs",t),onClick:o,children:[s.jsx(Ur,{copied:n,failed:r}),Lr(n,r)]})}function zi({open:e,onOpenChange:t,diagnostics:n,controls:r,promotionContext:i,urgentAction:o,overflowCount:a=0,addOns:u}){const f=qt(),{pins:m,toggle:p,reset:c}=_r(),d=Ar(),y=new Set(m),v=a>0;return s.jsxs(je,{open:e,onOpenChange:t,children:[s.jsx(Kt,{children:s.jsxs(P,{children:[s.jsx(ye,{asChild:!0,children:s.jsx(I,{asChild:!0,children:s.jsxs("button",{type:"button","data-testid":"status-reveal","aria-label":v?`Chat details, ${a} more`:"Chat details",className:"text-muted-foreground/50 hover:text-muted-foreground inline-flex shrink-0 items-center justify-center gap-0.5 transition-colors duration-150 pointer-coarse:min-h-11 pointer-coarse:min-w-11",children:[s.jsx(Xt,{className:"size-4"}),v&&s.jsxs("span",{className:"tabular-nums",children:["+",a]})]})})}),s.jsx(U,{side:"top",children:v?`Chat details, ${a} more`:"Chat details"})]})}),s.jsxs(be,{side:"top",align:"end",className:"w-80 p-3","aria-label":"Chat",children:[s.jsx(ve,{children:"Chat"}),o&&s.jsx(F,{variant:"secondary",className:"mb-3 w-full",disabled:o.pending,onClick:()=>{o.onAction(),t(!1)},children:o.label}),s.jsxs("div",{className:"flex flex-col gap-4",children:[u&&s.jsxs("section",{className:"space-y-1","data-testid":"session-add-ons",children:[s.jsx("h3",{className:"text-muted-foreground px-1 text-xs font-medium tracking-wide uppercase",children:"Add-ons"}),u]}),d.map(l=>s.jsxs("section",{className:"space-y-1",children:[s.jsx("h3",{className:"text-muted-foreground px-1 text-xs font-medium tracking-wide uppercase",children:l.label}),Br($r(l.items,r),f?i:null).map(x=>s.jsx(Gr,{item:x,value:Pr(x.key,n),pinned:y.has(x.key),onTogglePin:vs(x)?()=>p(x.key):null,control:Fr(x.key,r)},x.key)),l.group==="diagnostics"&&s.jsxs(s.Fragment,{children:[s.jsx(Ge,{label:"Queued messages",value:String(n.queueDepth)}),s.jsx(Ge,{label:"Chat ID",value:n.sessionId||"—"})]})]},l.group))]}),n.sessionId!==""&&s.jsxs(F,{variant:"ghost",size:"sm",className:"text-muted-foreground mt-3 h-7 w-full justify-start gap-1.5 text-xs",onClick:()=>{t(!1),Yt({sessionId:n.sessionId})},children:[s.jsx(Vt,{className:"size-3.5","aria-hidden":!0}),"View notifications"]}),s.jsxs("div",{className:"mt-4 flex items-center justify-between gap-2",children:[s.jsx(zr,{diagnostics:n}),s.jsxs(F,{variant:"ghost",size:"sm",className:"text-muted-foreground gap-1.5 text-xs",disabled:m.length===0,onClick:c,children:[s.jsx(Jt,{className:"size-3.5","aria-hidden":!0}),"Reset pins"]})]})]})]})}function Br(e,t){return t?[...e].sort((n,r)=>r.severity(t)-n.severity(t)):e}function $r(e,t){return e.filter(n=>n.key!=="plan"||t.plan!==null)}function Fr(e,t){return e==="plan"&&t.plan?s.jsx(en,{checked:t.plan.active,onCheckedChange:t.plan.onToggle,"aria-label":"Plan first, change nothing until approved"}):null}function Gr({item:e,value:t,pinned:n,onTogglePin:r,control:i}){const o=e.icon;return s.jsxs("div",{"data-testid":`session-row-${e.key}`,className:"flex items-center gap-2 px-1 py-1 text-sm",children:[s.jsx(o,{className:"text-muted-foreground size-3.5 shrink-0","aria-hidden":!0}),s.jsx("span",{className:"shrink-0",children:e.label}),s.jsx("span",{className:"min-w-0 flex-1"}),s.jsx("span",{className:"text-muted-foreground truncate text-xs",title:t??void 0,children:t??"—"}),i,r&&s.jsx("button",{type:"button",onClick:r,"aria-pressed":n,"aria-label":n?`Stop keeping ${e.label} in the status bar`:`Keep ${e.label} in the status bar`,className:k("hover:text-foreground inline-flex size-6 shrink-0 items-center justify-center rounded-md transition-colors duration-150",n?"text-foreground":"text-muted-foreground/50"),children:n?s.jsx(ss,{className:"size-3.5"}):s.jsx(Zt,{className:"size-3.5"})})]})}function Ge({label:e,value:t}){return s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-sm",children:[s.jsx("span",{className:"w-3.5 shrink-0","aria-hidden":!0}),s.jsx("span",{className:"shrink-0",children:e}),s.jsx("span",{className:"min-w-0 flex-1"}),s.jsx("span",{className:"text-muted-foreground truncate text-xs",title:t,children:t})]})}function Bi(e){const t=h.useRef(e);h.useEffect(()=>{t.current=e},[e]),h.useEffect(()=>{const n=r=>{const i=r.key==="."||r.key===">";(r.metaKey||r.ctrlKey)&&r.shiftKey&&i&&(r.preventDefault(),t.current())};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[])}function Hr(e){const t=new Map;for(const r of e){if(r.type!=="subagent_update")continue;const i=t.get(r.taskId);t.set(r.taskId,{taskId:r.taskId,status:r.status,description:r.description??(i==null?void 0:i.description),toolUses:r.toolUses??(i==null?void 0:i.toolUses),lastToolName:r.lastToolName??(i==null?void 0:i.lastToolName),summary:r.summary??(i==null?void 0:i.summary),ambient:r.ambient??(i==null?void 0:i.ambient)})}const n=[];for(const{ambient:r,...i}of t.values())kn({ambient:r,status:i.status})||n.push(i);return n}function $i(e){const t=[],n=[];for(const r of e)r.status==="running"?t.push(r):n.push(r);return{running:t,finished:n}}const He=new WeakMap;function We(e,t,n){let r=He.get(e);r||(r=new Set,He.set(e,r)),!r.has(t)&&(r.add(t),n())}function Qe(e,t,n){let r;try{r=n()}catch(i){return We(e,`${t}:throw`,()=>console.warn(`[extensions] ${e.extensionId}'s status-bar item "${e.id}" threw in ${t}(); it is hidden until it stops throwing.`,i)),!1}return typeof r!="boolean"?(We(e,`${t}:type`,()=>console.warn(`[extensions] ${e.extensionId}'s status-bar item "${e.id}": ${t}() must return true or false, synchronously, reading only its ctx; it returned ${Wr(r)}, read as false.`)),!1):r}function Wr(e){return e instanceof Promise?"a Promise":e===null?"null":typeof e=="object"?"an object":`a ${typeof e}`}function Qr(e,t){const n=[],r=[];for(const i of e){const o=i.when?Qe(i,"when",()=>i.when(t)):!0,a=o&&i.urgent?Qe(i,"urgent",()=>i.urgent(t)):!1;n.push({id:i.id,visible:o,urgent:a}),o&&r.push(i)}return r.sort((i,o)=>(i.priority??0)-(o.priority??0)),{promotion:n,visible:r}}function Fi(e){const t=sn("status-bar");return h.useMemo(()=>Qr(t,e),[t,e])}function qr(e){return e!=null&&e!==!1}function Gi({ctx:e,pins:t,nodes:n}){var o;const r=new Set(t),i=[];for(const a of bs){if(a.neverInLine)continue;const u=n[a.key];if(!qr(u))continue;const f=r.has(a.key)&&vs(a);!f&&!a.promote(e)||i.push({key:a.key,cluster:a.cluster,severity:a.severity(e),pinned:f,rigid:a.rigid===!0,wide:((o=a.wide)==null?void 0:o.call(a,e))===!0,node:u})}return i}const qe=648,Kr=440,Xr=340,Vr=3,Yr=3,Jr=2,Zr=4,ei=8,si=20,ti=oe*ei+si,ni=Number.POSITIVE_INFINITY,Ke=[],ri=["cwd"],Xe=["cwd","git"];function ii(e){if(e===null||e<=0)return{density:"full",rightBudget:ni,dropped:Ke};if(e>=qe){const t=Math.floor((e-qe)/ti);return{density:"full",rightBudget:Zr+t,dropped:Ke}}return e>=Kr?{density:"compact",rightBudget:Vr,dropped:ri}:e>=Xr?{density:"identity",rightBudget:Yr,dropped:Xe}:{density:"avatar",rightBudget:Jr,dropped:Xe}}function ai(e,t){return t.severity!==e.severity?t.severity-e.severity:Number(t.pinned)-Number(e.pinned)}const oi=2,li=2;function Hi(e,t){const n=new Set(t.dropped),r=e.filter(u=>u.cluster==="right"),i=new Set;let o=0,a=0;for(const u of[...r].sort(ai)){if(a>=t.rightBudget)break;u.rigid&&o>=oi||(u.rigid&&(o+=1),i.add(u.key),a+=u.wide?Math.min(li,t.rightBudget-a):1)}return{items:e.filter(u=>u.cluster==="right"?i.has(u.key):!n.has(u.key)),overflow:r.length-i.size}}function Wi(){const e=h.useRef(null),[t,n]=h.useState(null);h.useLayoutEffect(()=>{const i=e.current;if(!i)return;n(i.getBoundingClientRect().width);const o=new ResizeObserver(a=>{var m,p;const u=a.at(0);if(!u)return;const f=((p=(m=u.contentBoxSize)==null?void 0:m.at(0))==null?void 0:p.inlineSize)??u.contentRect.width;n(f)});return o.observe(i),()=>o.disconnect()},[]);const r=h.useMemo(()=>ii(t),[t]);return{ref:e,budget:r}}const ci=[];function Qi(e){const t=tn(e),n=h.useMemo(()=>Dn(t),[t]),r=Pn(e)==="streaming",i=$(h.useCallback(M=>{var C;return((C=M.sessions[e])==null?void 0:C.sessionStatus)??null},[e])),o=nn(e),a=zn(e||null,i,r,o.runtime),u=$(h.useCallback(M=>{var C;return((C=M.sessions[e])==null?void 0:C.contextUsage)??null},[e])),f=$(rn(M=>{var b;const C=(b=M.sessions[e])==null?void 0:b.sessionStatus;return!(C!=null&&C.cacheReadTokens)&&!(C!=null&&C.cacheCreationTokens)?null:{cacheReadTokens:C.cacheReadTokens??0,cacheCreationTokens:C.cacheCreationTokens??0,contextTokens:C.contextTokens}})),m=n.cacheStatus??f,{data:p}=Kn(a.cwd),{data:c}=Bn(e),{data:d}=ne(),y=an(e),v=Ve(e),l=on(e),x=ln(e),N=cn(e),w=Ye(e),g=un(e).length,T=dn(e),A=h.useMemo(()=>{let M=null;return()=>M??(M=Hr(T))},[T]),_=(t==null?void 0:t.runningSubagentCount)??null,E=h.useMemo(()=>Vn(p),[p]),O=gs(n.contextPercent??a.contextPercent,u),D=(o.model??n.model??a.model)||null;return h.useMemo(()=>({sessionId:e,cwd:a.cwd,git:E,runtime:o.runtime,model:D,selectedModel:a.model||null,effort:a.effort??null,fastMode:a.fastMode,permissionMode:a.permissionMode,contextPercent:O,contextUsage:u,cache:m?{readTokens:m.cacheReadTokens,creationTokens:m.cacheCreationTokens,contextTokens:m.contextTokens}:null,usage:n.usage,connectionState:y,streaming:r,lifecycle:v??null,triggerPending:w,lastEventSeq:l,snapshotCursor:N,lastEventAt:x,queueDepth:g,subagents:c??ci,get activeSubagents(){return A()},runningSubagentCount:_,clientVersion:(d==null?void 0:d.version)??null}),[e,a.cwd,a.model,a.effort,a.fastMode,a.permissionMode,E,o.runtime,D,O,u,m,n,y,v,r,w,l,N,x,g,c,A,_,d==null?void 0:d.version])}export{Ai as A,Wi as B,zr as C,_i as D,yi as E,hs as F,Ti as G,zn as H,Ln as I,bi as J,kn as K,er as M,ki as P,wi as R,zi as S,Pi as U,kr as a,Ii as b,Ss as c,Di as d,Si as e,Oi as f,Mi as g,Ri as h,vi as i,Ui as j,Hi as k,Qr as l,Ir as m,Li as n,Xn as o,$i as p,Mr as q,ii as r,Gi as s,Fi as t,Qi as u,Kn as v,Ci as w,Ei as x,Bi as y,_r as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a1 as n,a3 as s,a4 as u,at as o,au as r}from"./index-8-iQ6PnT.js";function c(){const t=n(),e=s();return u({mutationKey:o,mutationFn:a=>t.updateConfig(a),onSuccess:()=>{e.invalidateQueries({queryKey:r.current()})}})}export{c as u};
|