dorkos 0.114.0 → 0.115.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +39739 -38935
- package/dist/browser/native/package-manifest.json +1 -1
- package/dist/browser/source-manifest.json +1 -1
- package/dist/client/assets/{AboutPage-mErbIY0l.js → AboutPage-Cz8ijNrK.js} +1 -1
- package/dist/client/assets/{ActivityErrorState-AlI4F82u.js → ActivityErrorState-BzmfwxSZ.js} +1 -1
- package/dist/client/assets/ActivityPage-BK7T3OiI.js +1 -0
- package/dist/client/assets/{ActivityRow-Baqdr6cP.js → ActivityRow-Ig5atv15.js} +1 -1
- package/dist/client/assets/AdapterIcon-BXPv5J8h.js +1 -0
- package/dist/client/assets/{AdapterSetupWizard-BL70qy2J.js → AdapterSetupWizard-BEziztL3.js} +2 -2
- package/dist/client/assets/AgentOptionRow-BqFQvFeN.js +1 -0
- package/dist/client/assets/AgentPicker-dCfEIsU-.js +1 -0
- package/dist/client/assets/{AgentRequestCard-CcMh6JyE.js → AgentRequestCard-BAhfGJxx.js} +3 -3
- package/dist/client/assets/AppearancePage-7qHhFeEv.js +1 -0
- package/dist/client/assets/ApplyToOverridesDialog-jqOFh0d1.js +1 -0
- package/dist/client/assets/AttentionSignalRow-3CgglXkd.js +1 -0
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-DHr_AhUv.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-BMKtHI0D.js} +3 -3
- package/dist/client/assets/BindingDialog-DSBxRyzA.js +1 -0
- package/dist/client/assets/{BlintzCanvas-Bq4e7n__.js → BlintzCanvas-CyRuqAJV.js} +1 -1
- package/dist/client/assets/{CanvasCsvContent-OR226CLS.js → CanvasCsvContent-Bd1c6TGx.js} +4 -4
- package/dist/client/assets/CanvasFileContent-DelYwSH8.js +2 -0
- package/dist/client/assets/CanvasModel3dContent-BExIu4RY.js +2 -0
- package/dist/client/assets/ChatAppsOff-SWemSaUp.js +6 -0
- package/dist/client/assets/{CodeMirrorDiff-D7BWMOim.js → CodeMirrorDiff-0WF4ITRZ.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-BodwsIG7.js → CodeMirrorEditor-Bg7wC_Q8.js} +1 -1
- package/dist/client/assets/CommitmentList-CTvEGUV3.js +1 -0
- package/dist/client/assets/{CommitmentsPage-DL_jJQbw.js → CommitmentsPage-C68etoLe.js} +1 -1
- package/dist/client/assets/ConnectionAccessLists-9oeVn_GK.js +1 -0
- package/dist/client/assets/ConnectionsPage-CJOY4-kp.js +6 -0
- package/dist/client/assets/ConventionPage-DD-f5o6y.js +11 -0
- package/dist/client/assets/{ExtensionPageRoute-CzXGvVRm.js → ExtensionPageRoute-C6fW17AG.js} +2 -2
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-BV3h0rFa.js → FloatingTanStackRouterDevtools-CqogiFob-Zccd0fv6.js} +1 -1
- package/dist/client/assets/HandlePage-DOxlquWl.js +1 -0
- package/dist/client/assets/HeartbeatPage-cJM6NuTD.js +1 -0
- package/dist/client/assets/KeyEntry-K5k_3TfU.js +6 -0
- package/dist/client/assets/{LexicalField-Cc6wFZAZ.js → LexicalField-DB5V20zv.js} +2 -2
- package/dist/client/assets/{ManagesPage-BxHSb65X.js → ManagesPage-Cj0-hwfr.js} +1 -1
- package/dist/client/assets/{Marketplace-EgG6JmBG.js → Marketplace-eWEtLmd9.js} +2 -2
- package/dist/client/assets/{MarketplaceSourcesView-D9kq9hl6.js → MarketplaceSourcesView-B1h70C20.js} +1 -1
- package/dist/client/assets/{McpAppFrame-6zxszx9A.js → McpAppFrame-BaJ_r-QR.js} +2 -2
- package/dist/client/assets/McpSigninBody-Coaq5Fkf.js +1 -0
- package/dist/client/assets/{Model3dViewer-CgeJ2v-F.js → Model3dViewer-cKa-Jnbl.js} +1 -1
- package/dist/client/assets/NamePage-W7Frb1yy.js +1 -0
- package/dist/client/assets/{NewDirectMessageMenu-BnBO4aGI.js → NewDirectMessageMenu-C4zNIv9x.js} +1 -1
- package/dist/client/assets/{NotificationsPage-C5aRITCd.js → NotificationsPage-gKNClvNU.js} +1 -1
- package/dist/client/assets/{OpenMeshSwitch-UKMQeS7-.js → OpenMeshSwitch-RzB2u6-Q.js} +2 -2
- package/dist/client/assets/OperatorIdentityForm-B_78Vqh8.js +1 -0
- package/dist/client/assets/PermissionHistory-DrtlA4YM.js +1 -0
- package/dist/client/assets/PermissionsPage-O7kUVaQv.js +1 -0
- package/dist/client/assets/{PersonalityPopover-vLDfndfo.js → PersonalityPopover-DiNuuoWu.js} +1 -1
- package/dist/client/assets/PhotoPage-DdBke3yj.js +1 -0
- package/dist/client/assets/PresetPicker-BUFwg8RS.js +19 -0
- package/dist/client/assets/{PreviewRefusedNotice-Dh3SCC_A.js → PreviewRefusedNotice-DXZp669C.js} +1 -1
- package/dist/client/assets/ProfileFields-BCfMzNcT.js +1 -0
- package/dist/client/assets/ProfilePanelContainer-BzC2MGdi.js +1 -0
- package/dist/client/assets/ProfileRolePicker-f0FKXLtu.js +1 -0
- package/dist/client/assets/PromptSuggestionChips-EgeMFibt.js +1 -0
- package/dist/client/assets/ReportsToPopover-CQ4Xxslu.js +1 -0
- package/dist/client/assets/RoomSurface-oDbc6jnO.js +44 -0
- package/dist/client/assets/{RoomsPage-pPw8vrsB.js → RoomsPage-D_EbiSZ3.js} +1 -1
- package/dist/client/assets/RunsOnPopover-LtmmbIsD.js +1 -0
- package/dist/client/assets/RuntimeConnectFlow-Kv2ytk2m.js +1 -0
- package/dist/client/assets/RuntimeSetupDialog-CiWxlcPc.js +1 -0
- package/dist/client/assets/{SessionsPage-BASybh9v.js → SessionsPage-1rDO0SGV.js} +1 -1
- package/dist/client/assets/SettingsDialog-_ctp2AfE.js +12 -0
- package/dist/client/assets/SkillsPage-gPuQHKps.js +1 -0
- package/dist/client/assets/TaskDialogWrapper-BPFpCgsN.js +1 -0
- package/dist/client/assets/TasksEmptyState-D0Jlzmed.js +3 -0
- package/dist/client/assets/TasksPage-DvGfg5Bk.js +1 -0
- package/dist/client/assets/{ToolsPage-C3xfGWdb.js → ToolsPage-B0qZ85pR.js} +2 -2
- package/dist/client/assets/{TopologyGraph-D7Ik1Xt6.js → TopologyGraph-q1ammgpG.js} +3 -3
- package/dist/client/assets/TourHost-Dc8qw1Ef.js +1 -0
- package/dist/client/assets/{UnlinkDialog-TTK5Z_QD.js → UnlinkDialog-DXdrLsGV.js} +1 -1
- package/dist/client/assets/{WidgetErrorCard-D--KcgW1.js → WidgetErrorCard-ChDNC060.js} +23 -23
- package/dist/client/assets/_shell-BxPza3Lx.js +88 -0
- package/dist/client/assets/{_shell._home-CzpVyTzo.js → _shell._home-DjGunhLV.js} +1 -1
- package/dist/client/assets/_shell._home.activity-B014dET1.js +1 -0
- package/dist/client/assets/_shell._home.index-DEmtTHZg.js +3 -0
- package/dist/client/assets/_shell._home.tasks-CnDEbUOd.js +1 -0
- package/dist/client/assets/_shell._home.workspaces-AQtMUWuu.js +1 -0
- package/dist/client/assets/{_shell.channels-CCGSs0Bn.js → _shell.channels-C8NOhmJd.js} +4 -4
- package/dist/client/assets/_shell.connections-Bxe0wxOB.js +1 -0
- package/dist/client/assets/{_shell.feedback-requests-C6alx2ox.js → _shell.feedback-requests-C6ku9F5_.js} +2 -2
- package/dist/client/assets/_shell.marketplace-CEnzWFmI.js +1 -0
- package/dist/client/assets/_shell.marketplace_.sources-BZq1d2ih.js +1 -0
- package/dist/client/assets/_shell.session-Dn0C0mEZ.js +66 -0
- package/dist/client/assets/{_shell.team-BIwJNdkd.js → _shell.team-DoLdOMoC.js} +4 -4
- package/dist/client/assets/_shell.x._extensionId-DhE3OYMF.js +1 -0
- package/dist/client/assets/_shell.x._extensionId_._-DhE3OYMF.js +1 -0
- package/dist/client/assets/access-copy-CBGtcTk0.js +1 -0
- package/dist/client/assets/{agent-browser-CO5haI5Y.js → agent-browser-DbcLtsAx.js} +1 -1
- package/dist/client/assets/{banner-Dh5mO27l.js → banner-rPsz3suJ.js} +2 -2
- package/dist/client/assets/{card-CKZCX8ol.js → card-BqN3lfJn.js} +1 -1
- package/dist/client/assets/command-ZTLTCj0l.js +1 -0
- package/dist/client/assets/cpu-D70xMHl2.js +11 -0
- package/dist/client/assets/dead-letter-reasons-DtBHju9v.js +1 -0
- package/dist/client/assets/empty-state-yl1dLwLN.js +1 -0
- package/dist/client/assets/execution-config-BbBEe6FO.js +1 -0
- package/dist/client/assets/{file-CMPbZedq.js → file-CGg2M6ED.js} +1 -1
- package/dist/client/assets/{file-exclamation-point-emLeXvmw.js → file-exclamation-point-DZrVsShR.js} +1 -1
- package/dist/client/assets/{file-text-9a0DChCq.js → file-text-BYq_4IAt.js} +1 -1
- package/dist/client/assets/{find-latest-widget-fence--3kWMT1F.js → find-latest-widget-fence-CWs9nr10.js} +3 -3
- package/dist/client/assets/form-vPuXuaYT.js +1 -0
- package/dist/client/assets/format-cron-D02Tnupo.js +1 -0
- package/dist/client/assets/{git-branch-hfu8isLA.js → git-branch-DbjXDO_F.js} +1 -1
- package/dist/client/assets/{heart-SRafwnSd.js → heart-Dblp_miM.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-Dxwd3mxT.js → highlighted-body-KPVGNVTW-CaMXMak-.js} +1 -1
- package/dist/client/assets/index-B-WvQ24u.js +23 -0
- package/dist/client/assets/{index-Ch41JOI2.js → index-BKuzoeSn.js} +1 -1
- package/dist/client/assets/{index-DdsKmfEH.js → index-BOL391En.js} +1 -1
- package/dist/client/assets/{index-DLZi_nae.js → index-BPqkuMIa.js} +1 -1
- package/dist/client/assets/{index-BTXBESRm.js → index-BPwUl0Bz.js} +1 -1
- package/dist/client/assets/{index-DIlV08Vw.js → index-BV0tZnYg.js} +1 -1
- package/dist/client/assets/{index-3GDQSKet.js → index-BW98owO8.js} +1 -1
- package/dist/client/assets/{index-BTreBsWa.js → index-Bd23EYYT.js} +2 -2
- package/dist/client/assets/{index-BYp9xcmS.js → index-BdVOtoFr.js} +1 -1
- package/dist/client/assets/{index-CpYs0Lli.js → index-Bi7Um5RU.js} +1 -1
- package/dist/client/assets/{index-BRGOMmOM.js → index-BiIbMZ6d.js} +36 -36
- package/dist/client/assets/{index-C7BTAdSc.js → index-BxqUb-n7.js} +1 -1
- package/dist/client/assets/{index-DmTI5Hye.js → index-BzczIyv5.js} +1 -1
- package/dist/client/assets/index-C6NUjpzQ.js +38 -0
- package/dist/client/assets/{index-D67aFWxz.js → index-C88NZagl.js} +1 -1
- package/dist/client/assets/{index-BDfoFNcA.js → index-CHvi6xUU.js} +1 -1
- package/dist/client/assets/{index-CbFo-7kM.js → index-CMWMhbec.js} +1 -1
- package/dist/client/assets/{index-BB18IeC2.js → index-CN9fywRC.js} +1 -1
- package/dist/client/assets/{index-iD0epmn3.js → index-CRZXSh_q.js} +1 -1
- package/dist/client/assets/{index-YswfjpmW.js → index-CWNsRK97.js} +1 -1
- package/dist/client/assets/index-CaLw69VE.js +1 -0
- package/dist/client/assets/index-CdKpQ1hI.js +1018 -0
- package/dist/client/assets/{index-Cp7oifSs.js → index-CrK4rKAq.js} +1 -1
- package/dist/client/assets/{index-D_Wc_qTa.js → index-D16KF-iC.js} +3 -3
- package/dist/client/assets/index-D6m2SWHr.js +1 -0
- package/dist/client/assets/index-DDYi817r.js +1 -0
- package/dist/client/assets/{index-BokDvdOG.js → index-Db2EOzA3.js} +1 -1
- package/dist/client/assets/index-DdbHrvr0.js +1 -0
- package/dist/client/assets/index-Dg_bax15.js +17 -0
- package/dist/client/assets/index-DwUdUliR.js +1 -0
- package/dist/client/assets/{index-D0Nd2LA-.js → index-DzeYt-GT.js} +1 -1
- package/dist/client/assets/{index-lJc8v0Z3.js → index-Gq3gqBhY.js} +1 -1
- package/dist/client/assets/index-O_HMols_.js +1 -0
- package/dist/client/assets/{index-Cow815Qa.js → index-P5j6zmcN.js} +1 -1
- package/dist/client/assets/{index-BNn3-chz.js → index-XE46wAj9.js} +1 -1
- package/dist/client/assets/{index-C4nEz6I-.js → index-Z8YcKwIB.js} +1 -1
- package/dist/client/assets/{index-DFEF2MFy.css → index-kktlr1TJ.css} +1 -1
- package/dist/client/assets/{index-CAlXjm0N.js → index-lNMJBFB0.js} +1 -1
- package/dist/client/assets/{index-DX7V94qe.js → index-oWLYcpm4.js} +1 -1
- package/dist/client/assets/{index-DRqEM5Wb.js → index-vRc1D4KI.js} +1 -1
- package/dist/client/assets/inline-code-Cvn43Gqu.js +1 -0
- package/dist/client/assets/{layers-Cy8Tme6i.js → layers-Bmz62WF4.js} +1 -1
- package/dist/client/assets/{lightbulb-tNm7gLYi.js → lightbulb-CAd6slmc.js} +1 -1
- package/dist/client/assets/link-2-C0mn8T24.js +6 -0
- package/dist/client/assets/list-runtime-types-DxwGcKLx.js +1 -0
- package/dist/client/assets/{markdown-content-CoK3F0c0.js → markdown-content-1-B7PdbY.js} +1 -1
- package/dist/client/assets/{mention-pill-Bgs_yujj.js → mention-pill-D_-KXznh.js} +1 -1
- package/dist/client/assets/{message-square-off-CF2Bzen3.js → message-square-off-Di7kQvfe.js} +1 -1
- package/dist/client/assets/more-details-C6UGVeDE.js +1 -0
- package/dist/client/assets/{owner-notice-cgCWG4hG.js → owner-notice-CudDDBX4.js} +1 -1
- package/dist/client/assets/{package-DE8sQpId.js → package-D2eMoFCI.js} +1 -1
- package/dist/client/assets/{page-container-BoXmmBSs.js → page-container-CDHAACRA.js} +1 -1
- package/dist/client/assets/{paperclip-IgDeVFea.js → paperclip-p0W24D54.js} +1 -1
- package/dist/client/assets/path-input-j04LMj9z.js +1 -0
- package/dist/client/assets/primer-trigger-DkCcHf2Q.js +3 -0
- package/dist/client/assets/profile-errors-CqflLCzu.js +1 -0
- package/dist/client/assets/progress-BcuH4Eod.js +6 -0
- package/dist/client/assets/query-error-state-CEZs7dhg.js +1 -0
- package/dist/client/assets/{radio-BzTkFBDD.js → radio-DGWfQ5Rf.js} +1 -1
- package/dist/client/assets/registry-ChxwU0f4.js +1 -0
- package/dist/client/assets/relay-trace-schemas-y0nd8fzi.js +6 -0
- package/dist/client/assets/{room-files-source-CIIDTSTA.js → room-files-source-C1TCg4W_.js} +2 -2
- package/dist/client/assets/{rotate-ccw-clock-CGcSqHnk.js → rotate-ccw-clock-DcBojy-0.js} +1 -1
- package/dist/client/assets/{rotate-cw-DaduzRfP.js → rotate-cw-D0vUyeR2.js} +1 -1
- package/dist/client/assets/runtime-connect-Dn0T5YWv.js +1 -0
- package/dist/client/assets/{scroll-area-DW0-Liri.js → scroll-area-CQ9lO56h.js} +1 -1
- package/dist/client/assets/{search-x-Sme5ElYi.js → search-x-EJGj73JB.js} +2 -2
- package/dist/client/assets/settings-for-runtime-BoOa-ZFG.js +1 -0
- package/dist/client/assets/shield-check-Bp58y9u7.js +6 -0
- package/dist/client/assets/{shield-x-Bh5xap8N.js → shield-x-jF_NCCvp.js} +1 -1
- package/dist/client/assets/soul-file-Cag2i87x.js +1 -0
- package/dist/client/assets/{table-BEtvgYmW.js → table-D89CWVJX.js} +1 -1
- package/dist/client/assets/terminal-BUhNMZAt.js +6 -0
- package/dist/client/assets/trust-posture-15DMDZTA.js +1 -0
- package/dist/client/assets/unplug-opnrSXAi.js +6 -0
- package/dist/client/assets/unverified-catalog-notice-DHM5Coia.js +1 -0
- package/dist/client/assets/use-adapter-catalog-ClMqVelU.js +1 -0
- package/dist/client/assets/use-bindings-Ch6UUBvz.js +1 -0
- package/dist/client/assets/use-composer-prefs-Qn7KRpYe.js +1 -0
- package/dist/client/assets/{use-connector-management-Cohvs7jD.js → use-connector-management-dX_4x0d3.js} +1 -1
- package/dist/client/assets/use-deep-link-scroll-BV2fY4gy.js +1 -0
- package/dist/client/assets/use-delete-binding-BklxjB_c.js +1 -0
- package/dist/client/assets/{use-dev-links-DRnLdl--.js → use-dev-links-D4Bqam6F.js} +1 -1
- package/dist/client/assets/use-external-adapter-catalog-nHiD8BKZ.js +1 -0
- package/dist/client/assets/use-full-activity-feed-vYU7wQWT.js +1 -0
- package/dist/client/assets/use-is-below-desktop-G-mTu2Ga.js +1 -0
- package/dist/client/assets/{use-jump-back-in-CkFErfWY.js → use-jump-back-in-BVunjzyr.js} +3 -3
- package/dist/client/assets/use-mesh-topology-NaUKSKol.js +1 -0
- package/dist/client/assets/use-mounted-ref-BWpQ8f91.js +1 -0
- package/dist/client/assets/use-notification-prefs-qO1zRRFN.js +1 -0
- package/dist/client/assets/{use-panel-tab-placements-AFrWTQ0a.js → use-panel-tab-placements-Db6p2vLD.js} +1 -1
- package/dist/client/assets/use-pending-read-DUqJZUza.js +1 -0
- package/dist/client/assets/use-personality-commit-DUEKxHt_.js +1 -0
- package/dist/client/assets/{use-promo-activation-Dxt-1yuT.js → use-promo-activation-CnGaw39P.js} +2 -2
- package/dist/client/assets/use-promo-dismissals-bkSHhGhj.js +1 -0
- package/dist/client/assets/{use-pulse-freshness-DRRM5Hza.js → use-pulse-freshness-Oc_1gs-Y.js} +1 -1
- package/dist/client/assets/use-relay-config-Ba-S4wxY.js +1 -0
- package/dist/client/assets/{use-room-follow-claim-huRfaa4e.js → use-room-follow-claim-DqE5b95Z.js} +1 -1
- package/dist/client/assets/{use-roving-tab-list-BZIBAGgJ.js → use-roving-tab-list-DnMqliqf.js} +1 -1
- package/dist/client/assets/{use-session-canvas-CZIsr9qL.js → use-session-canvas-OdljtBE8.js} +4 -4
- package/dist/client/assets/{use-session-diagnostics-C41hV7rK.js → use-session-diagnostics-CtjxsM8_.js} +4 -4
- package/dist/client/assets/use-unclaimed-chats-5RCD5wIp.js +1 -0
- package/dist/client/assets/use-update-config-xkznZMHr.js +1 -0
- package/dist/client/assets/useMutationState-Mjr_y4xX.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/index.js +11367 -9690
- package/dist/server/index.js.map +2 -2
- package/package.json +4 -4
- package/dist/client/assets/ActivityPage-CHUqb-8c.js +0 -1
- package/dist/client/assets/AdapterIcon-C_fBZXHQ.js +0 -1
- package/dist/client/assets/AppearancePage-t9SnSRs-.js +0 -1
- package/dist/client/assets/AttentionSignalRow-jlgWaSSd.js +0 -1
- package/dist/client/assets/CanvasFileContent-BejM-9Wg.js +0 -2
- package/dist/client/assets/CanvasModel3dContent-BD-eCVsX.js +0 -2
- package/dist/client/assets/CommitmentList-YVb3yTvO.js +0 -1
- package/dist/client/assets/ConnectionAccessLists-BPsgToSR.js +0 -1
- package/dist/client/assets/ConnectionsPage-D7vlYnjf.js +0 -6
- package/dist/client/assets/ConventionPage-BR7I3AdE.js +0 -11
- package/dist/client/assets/HandlePage-B33P0oh0.js +0 -1
- package/dist/client/assets/HeartbeatPage-CfjZuvtQ.js +0 -1
- package/dist/client/assets/McpSigninBody-DBWSc6bm.js +0 -1
- package/dist/client/assets/NamePage-MfybpnwN.js +0 -1
- package/dist/client/assets/OperatorIdentityForm-DH2au7QU.js +0 -1
- package/dist/client/assets/PermissionsPage-BgLLmdg2.js +0 -1
- package/dist/client/assets/PhotoPage-BgyB3B2_.js +0 -1
- package/dist/client/assets/PromptSuggestionChips-EO_0zbzq.js +0 -1
- package/dist/client/assets/ReportsToPopover-C9Ceg1AW.js +0 -1
- package/dist/client/assets/RoomSurface-B8ec3_at.js +0 -44
- package/dist/client/assets/RunsOnPopover-CJoSj8w7.js +0 -1
- package/dist/client/assets/RuntimeSetupDialog-Cqn_Grel.js +0 -1
- package/dist/client/assets/SkillsPage-DL0909et.js +0 -1
- package/dist/client/assets/TasksPage-BwUW6dia.js +0 -1
- package/dist/client/assets/TourHost-Db0fxAXo.js +0 -1
- package/dist/client/assets/_shell-CGWsN6Gs.js +0 -88
- package/dist/client/assets/_shell._home.activity-BbWquOK0.js +0 -1
- package/dist/client/assets/_shell._home.index-Cg0nRFMN.js +0 -3
- package/dist/client/assets/_shell._home.tasks-BpoOVihw.js +0 -1
- package/dist/client/assets/_shell._home.workspaces-DVF1rM3t.js +0 -1
- package/dist/client/assets/_shell.connections-0_34lXIQ.js +0 -1
- package/dist/client/assets/_shell.marketplace-Dp-p8E3V.js +0 -1
- package/dist/client/assets/_shell.marketplace_.sources-SN2Fb1eb.js +0 -1
- package/dist/client/assets/_shell.session-Bt3jdQdD.js +0 -66
- package/dist/client/assets/_shell.x._extensionId-Bjn-MKsP.js +0 -1
- package/dist/client/assets/_shell.x._extensionId_._-Bjn-MKsP.js +0 -1
- package/dist/client/assets/index-BBQMqcO_.js +0 -1
- package/dist/client/assets/index-BUVKya1M.js +0 -23
- package/dist/client/assets/index-C3xuhmPa.js +0 -38
- package/dist/client/assets/index-C63bLSO4.js +0 -1099
- package/dist/client/assets/index-CTxEG5rD.js +0 -1
- package/dist/client/assets/index-CkknQ52Q.js +0 -17
- package/dist/client/assets/index-DLNwEM2Q.js +0 -1
- package/dist/client/assets/index-DX-j3Ul0.js +0 -1
- package/dist/client/assets/index-g_5oOlG6.js +0 -1
- package/dist/client/assets/index-t7gsOfUI.js +0 -1
- package/dist/client/assets/kickoff-xkt4LpIP.js +0 -3
- package/dist/client/assets/soul-file-NcuTUIiB.js +0 -1
- package/dist/client/assets/use-delete-binding-C19umm_i.js +0 -1
- package/dist/client/assets/use-external-adapter-catalog-BOn9aj72.js +0 -1
- package/dist/client/assets/use-full-activity-feed-BpQANbns.js +0 -1
- package/dist/client/assets/use-is-below-desktop-5LlietdR.js +0 -1
- package/dist/client/assets/use-mesh-topology-CIsDeAY0.js +0 -1
- package/dist/client/assets/use-pending-read-Dol8yvIx.js +0 -1
- package/dist/client/assets/use-personality-commit-fUtuc2lC.js +0 -1
- package/dist/client/assets/use-unclaimed-chats-BMlFQ2v1.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as M,M as S}from"./Marketplace-EgG6JmBG.js";import{M as u,P as x,m as P,u as d,a as g}from"./index-C63bLSO4.js";import{M as h}from"./MarketplaceSourcesView-D9kq9hl6.js";import{U as I}from"./UnlinkDialog-TTK5Z_QD.js";import"./PreviewRefusedNotice-Dh3SCC_A.js";import"./shield-x-Bh5xap8N.js";import"./card-CKZCX8ol.js";import"./markdown-content-CoK3F0c0.js";import"./use-unclaimed-chats-BMlFQ2v1.js";import"./use-dev-links-DRnLdl--.js";import"./file-CMPbZedq.js";import"./file-exclamation-point-emLeXvmw.js";import"./rotate-ccw-clock-CGcSqHnk.js";import"./use-pending-read-Dol8yvIx.js";export{M as InstalledPackagesView,S as Marketplace,u as MarketplaceSidebar,h as MarketplaceSourcesView,x as PackageCard,I as UnlinkDialog,P as marketplaceSearchSchema,d as useMarketplaceParams,g as useMarketplaceStore};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{a4 as Se,gz as Me,ae as ne,r as s,ik as Ie,il as Q,im as W,io as H,gs as ie,ip as Ce,cT as X,iq as ee,ap as it,ih as lt,af as oe,ir as ct,is as dt,it as ut,iu as ft,aQ as Te,iv as ht,j as e,F as Fe,di as pt,C as Ke,iw as mt,e3 as be,ix as xt,hx as gt,Z as Pe,iy as yt,iz as vt,iA as Ct,iB as J,iC as ue,gb as fe,gc as he,gd as pe,ge as me,gf as xe,gg as ge,gh as ye,gi as ve,B as G,b4 as bt,ea as _e,hB as kt,iD as jt,aj as ce,iE as He,dg as wt,iF as Et,iG as Dt,iH as Nt,iI as Rt,ek as De,iJ as qe,ag as St,gq as Tt,aw as Ft,cS as Pt,iK as Ot,dF as Mt,hF as _t,iL as At,cY as Lt,cZ as zt,c_ as $t,c$ as It,d0 as Kt,dd as Ht,I as qt,d1 as Ut}from"./index-C63bLSO4.js";import{t as ae,g as Qt,C as Bt,n as Ue,r as Qe,a as Yt,p as Gt,F as Wt,w as Vt,c as Be,b as Zt}from"./room-files-source-CIIDTSTA.js";import{N as ts,R as ns}from"./room-files-source-CIIDTSTA.js";import{r as Jt,c as Xt}from"./composer-insert-BpyATrmR.js";import{u as en}from"./index-BDfoFNcA.js";import{r as Ye,h as Ge,F as tn}from"./file-drag-GDx2qhdk.js";import{R as We}from"./rotate-cw-DaduzRfP.js";import{F as Ve}from"./file-CMPbZedq.js";import{G as Ze}from"./git-branch-hfu8isLA.js";import"./markdown-content-CoK3F0c0.js";import"./file-exclamation-point-emLeXvmw.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 Je={name:"corner-left-up",size:24,node:[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]]};Je.node;const nn=Se(Je);/**
|
|
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 Xe={name:"file-plus",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:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]};Xe.node;const et=Se(Xe);/**
|
|
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 tt={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};tt.node;const sn=Se(tt);function le(t,n,a){return["file-explorer","tree",t.scopeKey,n,t.filtersHidden?a:null]}function je(t,n,a,x){return{queryKey:le(t,n,a),queryFn:()=>t.list(n,{showHidden:a}),staleTime:Me.FILE_TREE_STALE_TIME_MS,gcTime:Me.FILE_TREE_GC_TIME_MS,placeholderData:p=>p??x.getQueryData(le(t,n,!a))}}const an=[".git",".dork",".claude",".agents","node_modules"];function rn(t){return t.startsWith(".")||an.includes(t)}const Ne=["ROOM.md","README.md"];function Re(t){return Ne.some(n=>n.toLowerCase()===t.toLowerCase())}function nt(t){return t.filter(n=>!rn(n.name))}function on(t){if(t.reduce((p,c)=>c.type==="file"&&Re(c.name)?p+1:p,0)===0)return t;const a=[],x=[];for(const p of t)p.type==="file"&&Re(p.name)?a.push(p):x.push(p);return a.sort((p,c)=>Ne.findIndex(o=>o.toLowerCase()===p.name.toLowerCase())-Ne.findIndex(o=>o.toLowerCase()===c.name.toLowerCase())),[...a,...x]}const ln=/ copy(?: \d+)?$/;function Oe({name:t,isDir:n,taken:a}){const x=new Set(a);if(!x.has(t))return t;const p=n?-1:t.lastIndexOf("."),c=p>0,o=c?t.slice(p):"",m=(c?t.slice(0,p):t).replace(ln,"");for(let r=1;;r+=1){const i=r===1?`${m} copy${o}`:`${m} copy ${r}${o}`;if(!x.has(i))return i}}function Ae(t,n,a){return{name:n,path:t,type:a,size:0,mtime:Date.now(),isSymlink:!1}}function cn(t){const n=ne(),{source:a,showHidden:x,queryClient:p,inFlightRef:c}=t,o=a.cwd??"",[m,r]=s.useState(null),i=s.useCallback(async h=>{c.current+=1;try{return await h()}finally{c.current-=1}},[c]),u=s.useMemo(()=>{const h=g=>le(a,g,x);return{getChildren:g=>{var w;return((w=p.getQueryData(h(g)))==null?void 0:w.entries)??[]},isLoaded:g=>p.getQueryData(h(g))!==void 0,takenNames:async g=>(await n.readFileTree(o,{path:g===Q?void 0:g,showHidden:!0})).entries.map(b=>b.name),snapshot:g=>p.getQueryData(h(g)),setChildren:(g,w)=>{p.setQueryData(h(g),b=>({entries:Ie(w((b==null?void 0:b.entries)??[]))}))},restore:(g,w)=>{p.setQueryData(h(g),w)},invalidate:g=>{p.invalidateQueries({queryKey:h(g),exact:!0})}}},[p,n,o,a,x]),N=s.useCallback((h,g,w)=>i(async()=>{const b=ee(h,g),S=!u.getChildren(h).some(A=>A.path===b),K=u.snapshot(h);S&&u.setChildren(h,A=>[...A,Ae(b,g,w)]);try{return await n.createEntry(o,b,w),!0}catch(A){return S&&u.restore(h,K),ae(A,`Couldn’t create ${w==="dir"?"folder":"file"}`),!1}finally{u.invalidate(h)}}),[n,o,u,i]),F=s.useCallback((h,g)=>i(async()=>{if(g===h.name||g.length===0)return!0;const w=W(h.path),b=ee(w,g),S=u.getChildren(w).some(_=>_.path===b),K=u.snapshot(w),A={...h,name:g,path:b};S||u.setChildren(w,_=>_.map($=>$.path===h.path?A:$));try{return await n.renameEntry(o,h.path,b),H.getState().remapExpandedPaths(h.path,b),!0}catch(_){return S||u.restore(w,K),ae(_,"Couldn’t rename"),!1}finally{u.invalidate(w)}}),[n,o,u,i]),D=s.useCallback(h=>i(async()=>{const g=W(h.path),w=u.snapshot(g);u.setChildren(g,b=>b.filter(S=>S.path!==h.path));try{await n.deleteEntry(o,h.path,{recursive:!0}),H.getState().dropExpandedPaths(h.path)}catch(b){u.restore(g,w),ae(b,"Couldn’t delete")}finally{u.invalidate(g)}}),[n,o,u,i]),L=s.useCallback(h=>i(async()=>{const g=W(h.path);if(h.type==="file"){const w=u.snapshot(g);u.setChildren(g,b=>b.filter(S=>S.path!==h.path));try{await n.deleteEntry(o,h.path),H.getState().dropExpandedPaths(h.path)}catch(b){u.restore(g,w),ae(b,"Couldn’t delete")}finally{u.invalidate(g)}return}try{await n.deleteEntry(o,h.path),u.setChildren(g,w=>w.filter(b=>b.path!==h.path)),H.getState().dropExpandedPaths(h.path),u.invalidate(g)}catch(w){if(Qt(w)==="DIR_NOT_EMPTY"){r(h);return}ae(w,"Couldn’t delete")}}),[n,o,u,i]),C=s.useCallback(async()=>{const h=m;r(null),h&&await D(h)},[m,D]),q=s.useCallback(()=>r(null),[]),I=s.useCallback((h,g)=>i(async()=>{const w=W(h),b=ie(h),S=ee(g,b);if(g===w||S===h||Ce(g,h))return;const K=u.getChildren(w).find(v=>v.path===h);if(!K)return;const A=u.isLoaded(g),_=A&&u.getChildren(g).some(v=>v.path===S),$={...K,name:b,path:S},Y=u.snapshot(w),P=A?u.snapshot(g):void 0;u.setChildren(w,v=>v.filter(z=>z.path!==h)),A&&!_&&u.setChildren(g,v=>[...v,$]);try{await n.renameEntry(o,h,S),H.getState().remapExpandedPaths(h,S)}catch(v){u.restore(w,Y),A&&!_&&u.restore(g,P),ae(v,"Couldn’t move")}finally{u.invalidate(w),A&&u.invalidate(g)}}),[n,o,u,i]),j=s.useCallback((h,g)=>i(async()=>{if(h.isDir&&Ce(g,h.path)){X.error(Bt);return}let w;try{w=await u.takenNames(g)}catch(_){ae(_,"Couldn’t copy");return}const b=Oe({name:ie(h.path),isDir:h.isDir,taken:w}),S=ee(g,b),K=u.isLoaded(g),A=K?u.snapshot(g):void 0;if(K){const _=u.getChildren(W(h.path)).find(Y=>Y.path===h.path),$=_?{..._,name:b,path:S}:Ae(S,b,h.isDir?"dir":"file");u.setChildren(g,Y=>[...Y,$])}try{await n.copyEntry(o,h.path,S)}catch(_){K&&u.restore(g,A),ae(_,"Couldn’t copy")}finally{u.invalidate(g)}}),[n,o,u,i]);return{createEntry:N,renameEntry:F,removeEntry:L,moveEntry:I,copyEntry:j,pendingRecursiveDelete:m,confirmRecursiveDelete:C,cancelRecursiveDelete:q}}function dn(t){return t!=null&&t.startsWith("darwin")?"Reveal in Finder":t!=null&&t.startsWith("win32")?"Reveal in File Explorer":"Show in file manager"}function un(t,n){const a=t.includes("\\")&&!t.includes("/"),x=t.replace(/[\\/]+$/,""),p=a?n.split("/").join("\\"):n;return`${x}${a?"\\":"/"}${p}`}function fn(t){const n=ne(),{data:a}=it(),x=s.useMemo(()=>n.supportsReveal?dn(a==null?void 0:a.platform):null,[n.supportsReveal,a==null?void 0:a.platform]),p=s.useCallback(async i=>{if(t)try{await n.revealEntry(t,i.path)}catch(u){ae(u,"Couldn’t open the file manager")}},[n,t]),{copy:c}=lt(),o=s.useCallback(async(i,u)=>{const N=u==="absolute"&&t?un(t,i.path):i.path;await c(N)||X.error("Couldn’t copy to the clipboard")},[t,c]),m=s.useCallback(i=>{Jt(Xt(i.path))||X.error("Open a chat to add this file")},[]),r=s.useCallback(i=>{H.getState().setClipboard({path:i.path,isDir:i.type==="dir"});try{navigator.clipboard.writeText(i.path).catch(()=>{})}catch{}},[]);return{revealLabel:x,reveal:p,copyPath:o,addToChat:m,copyToClipboard:r}}const hn=1e3;function pn(t){const{source:n,showHidden:a,queryClient:x,inFlightRef:p}=t,c=n.changes,[o,m]=s.useState(null),[r,i]=s.useState(null),[u,N]=s.useState(null),[F,D]=s.useState(0),L=s.useCallback(async d=>{p.current+=1,D(f=>f+1);try{return await d()}finally{p.current-=1,D(f=>f-1)}},[p]),C=s.useMemo(()=>{const d=f=>le(n,f,a);return{listing:f=>x.getQueryData(d(f)),isLoaded:f=>x.getQueryData(d(f))!==void 0,entries:f=>{var T;return((T=x.getQueryData(d(f)))==null?void 0:T.entries)??[]},setEntries:(f,T)=>x.setQueryData(d(f),y=>({...y,entries:Ie(T((y==null?void 0:y.entries)??[]))})),restore:(f,T)=>x.setQueryData(d(f),T),fetch:f=>n.list(f,{showHidden:!0}),refreshAll:()=>{x.invalidateQueries({queryKey:["file-explorer","tree",n.scopeKey]}),x.invalidateQueries({queryKey:["file-explorer","preview",n.scopeKey]})}}},[x,n,a]),q=s.useCallback(async d=>{const f=C.listing(d);return(f==null?void 0:f.commit)!==void 0?f.commit:(await C.fetch(d)).commit??null},[C]),I=s.useCallback((d,f,T,y)=>{switch(d.status){case"changed":return!0;case"conflict":return N({kind:f,path:d.path,lastCommit:d.lastCommit,retry:()=>T(d.commit)}),!1;case"exists":return X.error(y===void 0?d.reason:Ue(y)),!1;case"refused":return X.error(d.reason),!1}},[]),j=s.useCallback((d,f)=>{X.error(Qe(d)??f)},[]),h=s.useCallback((d,f,T)=>{const y=O=>L(async()=>{if(c===void 0)return!1;const E=W(d.path),R=W(f),k=ie(f),U=C.isLoaded(R),te=U&&C.entries(R).some(Z=>Z.path===f),V=C.listing(E),de=R===E?void 0:C.listing(R),l={...d,name:k,path:f};te||(R===E?C.setEntries(E,Z=>Z.map(se=>se.path===d.path?l:se)):(C.setEntries(E,Z=>Z.filter(se=>se.path!==d.path)),U&&C.setEntries(R,Z=>[...Z,l])));const M=()=>{C.restore(E,V),R!==E&&U&&C.restore(R,de)};try{const Z=O??await q(E);if(Z===null)return M(),X.error("This room has no files to change yet."),!1;const se=await c.move({from:d.path,to:f,baseCommit:Z}),we=I(se,T,async re=>{await y(re)},k);return we?H.getState().remapExpandedPaths(d.path,f):M(),we}catch(Z){return M(),j(Z,T==="rename"?"Couldn’t rename":"Couldn’t move"),!1}finally{C.refreshAll()}});return y(null)},[c,C,L,q,I,j]),g=s.useCallback(async(d,f)=>f===d.name||f.length===0?!0:h(d,ee(W(d.path),f),"rename"),[h]),w=s.useCallback(async(d,f)=>{const T=W(d),y=ee(f,ie(d));if(f===T||y===d||Ce(f,d))return;const O=C.entries(T).find(E=>E.path===d);O&&await h(O,y,"move")},[C,h]),b=s.useCallback(async d=>{let f=0;const T=[d];for(;T.length>0;){const y=T.shift(),O=await C.fetch(y);for(const E of O.entries)if(E.type==="dir"?T.push(E.path):f+=1,f>=hn)return{count:f,moreThan:!0}}return{count:f,moreThan:!1}},[C]),S=s.useCallback(d=>{if(d.type!=="dir"){m({entry:d,fileCount:1,moreThan:!1});return}m({entry:d,fileCount:null,moreThan:!1}),b(d.path).then(({count:f,moreThan:T})=>m(y=>(y==null?void 0:y.entry.path)===d.path?{entry:d,fileCount:f,moreThan:T}:y),()=>{})},[b]),K=s.useCallback(d=>{const f=T=>L(async()=>{if(c===void 0)return;const y=W(d.path),O=C.listing(y);C.setEntries(y,E=>E.filter(R=>R.path!==d.path));try{const E=T??await q(y);if(E===null){C.restore(y,O);return}const R=await c.remove({path:d.path,baseCommit:E});I(R,"delete",U=>f(U))?H.getState().dropExpandedPaths(d.path):C.restore(y,O)}catch(E){C.restore(y,O),j(E,"Couldn’t delete")}finally{C.refreshAll()}});return f(null)},[c,C,L,q,I,j]),A=s.useCallback(async()=>{const d=o;m(null),d&&await K(d.entry)},[o,K]),_=s.useCallback(()=>m(null),[]),$=s.useCallback((d,f,T,y)=>{const O=E=>L(async()=>{if(c===void 0)return;const R=C.isLoaded(d),k=R?C.listing(d):void 0;if(R){const U=new Set(C.entries(d).map(V=>V.name)),te=f.filter(V=>!U.has(V.name)).map(V=>({name:V.name,path:ee(d,V.name),type:"file",size:V.size}));te.length>0&&C.setEntries(d,V=>[...V,...te])}try{const U=await c.upload({dir:d,baseCommit:E,replace:T,files:f});!I(U,"upload",V=>O(V))&&R&&C.restore(d,k)}catch(U){R&&C.restore(d,k),j(U,"Couldn’t upload")}finally{C.refreshAll()}});return O(y)},[c,C,L,I,j]),Y=s.useCallback(async(d,f)=>{if(c===void 0||f.length===0)return;if(f.length>c.maxUploadFiles){X.error(`Nothing was uploaded. One upload takes up to ${c.maxUploadFiles} files.`);return}let T;try{T=await C.fetch(d)}catch(k){j(k,"Couldn’t upload");return}const y=T.entries.map(k=>k.name),O=new Set(y),E=f.map(k=>k.name).filter(k=>O.has(k)),R=T.commit??null;if(E.length===0){await $(d,f,[],R);return}i({dir:d,files:f,names:E,taken:y,baseCommit:R})},[c,C,j,$]),P=s.useCallback(async d=>{const f=r;if(i(null),f===null)return;if(d==="replace"){await $(f.dir,f.files,f.names,f.baseCommit);return}const T=new Set([...f.taken,...f.files.map(E=>E.name)]),y=new Set(f.names),O=f.files.map(E=>{if(!y.has(E.name))return E;const R=Oe({name:E.name,isDir:!1,taken:T});return T.add(R),new File([E],R,{type:E.type,lastModified:E.lastModified})});await $(f.dir,O,[],f.baseCommit)},[r,$]),v=s.useCallback(()=>i(null),[]),z=s.useCallback(()=>N(null),[]),B=s.useMemo(()=>r===null?null:{dir:r.dir,names:r.names},[r]);return{renameEntry:g,moveEntry:w,requestDelete:S,pendingDelete:o,confirmDelete:A,cancelDelete:_,upload:Y,pendingClash:B,resolveClash:P,cancelClash:v,conflict:u,dismissConflict:z,busy:F>0}}const Le={scopeKey:"",cwd:null,writable:!1,provenance:!1,filtersHidden:!0,preview:"canvas",editable:!1,list:()=>Promise.resolve({entries:[]})};function mn(t){var d,f,T;const n=ne(),a=oe(),{setTheme:x}=ct(),p=H(y=>y.showHidden),c=H(y=>y.expanded),o=H(y=>y.loadExplorerForCwd),m=H(y=>y.pruneMissing),r=(t==null?void 0:t.scopeKey)??null,i=(t==null?void 0:t.cwd)??null;s.useEffect(()=>{o(r)},[r,o]);const u=s.useMemo(()=>[Q,...dt(c)],[c]),N=ut({queries:t?u.map(y=>je(t,y,p,a)):[]}),F=(t==null?void 0:t.filtersHidden)??!0,D=s.useMemo(()=>{const y={};return u.forEach((O,E)=>{var U;const R=N[E];let k=((U=R==null?void 0:R.data)==null?void 0:U.entries)??[];!p&&!F&&(k=nt(k)),O===Q&&(k=on(k)),y[O]={entries:k,loading:(R==null?void 0:R.isLoading)??!1,error:(R==null?void 0:R.isError)??!1}}),y},[u,N,p,F]),L=s.useRef(0),C=s.useRef({});s.useEffect(()=>{L.current>0||u.forEach((y,O)=>{var R,k,U;const E=(k=(R=N[O])==null?void 0:R.data)==null?void 0:k.entries;!E||(U=N[O])!=null&&U.isError||C.current[y]!==E&&(C.current[y]=E,m(y,E.map(te=>te.name)))})},[u,N,m]);const q=s.useMemo(()=>ft(c,D),[c,D]),I=!!t&&!!((d=D[Q])!=null&&d.loading),j=!!t&&!!((f=D[Q])!=null&&f.error),h=(T=N[0])==null?void 0:T.error,g=j&&h?Yt(h):void 0,w=(g==null?void 0:g.message)??null,b=(g==null?void 0:g.command)??null,S=s.useMemo(()=>{var O;const y=new Set;for(const E of u)E!==Q&&((O=D[E])!=null&&O.error)&&y.add(E);return y},[u,D]),K=s.useCallback(y=>{if(y.type!=="dir")return;const O=H.getState();O.setDirExpanded(y.path,!O.expanded[y.path])},[]),A=s.useCallback(y=>{if(y===Q)return;const O=H.getState();O.expanded[y]||O.setDirExpanded(y,!0)},[]),_=(t==null?void 0:t.preview)==="canvas",$=s.useCallback(y=>{if(y.type!=="file"||!_)return;const O={getStore:Te.getState,setTheme:x,supportsTerminal:n.supportsTerminal};ht(O,{action:"open_file",sourcePath:y.path},"user")},[_,x,n]),Y=s.useCallback(()=>{r!==null&&a.invalidateQueries({queryKey:["file-explorer","tree",r]})},[a,r]),P=s.useCallback(y=>{t!==null&&a.invalidateQueries({queryKey:le(t,y,p),exact:!0})},[a,t,p]);s.useEffect(()=>{if(t!=null&&t.events)return t.events(Y)},[t,Y]);const v=cn({source:t??Le,showHidden:p,queryClient:a,inFlightRef:L}),z=pn({source:t??Le,showHidden:p,queryClient:a,inFlightRef:L}),B=fn(i);return{rows:q,rootLoading:I,rootError:j,rootErrorMessage:w,rootErrorCommand:b,errorPaths:S,toggleExpand:K,ensureExpanded:A,openFile:$,reload:Y,retryDir:P,changes:t!=null&&t.changes?z:null,...v,...B}}function xn(t){const{transport:n,cwd:a}=t;return{scopeKey:a,cwd:a,writable:!0,provenance:!1,filtersHidden:!0,preview:"canvas",editable:!1,list(x,p){return n.readFileTree(a,{path:x===""?void 0:x,showHidden:p.showHidden})}}}function ke(t){return Array.from(t).includes("Files")}function st(t){const n=Array.from(t.items??[]);if(!(n.length>0&&n.every(c=>"webkitGetAsEntry"in c)))return{files:Array.from(t.files??[]),folders:0};const x=[];let p=0;for(const c of n){if(c.kind!=="file")continue;const o=c.webkitGetAsEntry();if(o!=null&&o.isDirectory){p+=1;continue}const m=c.getAsFile();m&&x.push(m)}return{files:x,folders:p}}const gn=12;function yn({row:t,selected:n,renaming:a,error:x,onSelect:p,onActivate:c,onRetry:o,onSubmitRename:m,onCancelRename:r,onNewFile:i,onNewFolder:u,onStartRename:N,onDelete:F,onMove:D,onCopyInto:L,onCopy:C,onPaste:q,onDuplicate:I,canPasteInto:j,revealLabel:h,onReveal:g,onAddToChat:w,onCopyPath:b,readOnly:S=!1,provenance:K=!1,copyable:A=!0,onDisk:_=!0,onUpload:$,onPickUpload:Y}){const{entry:P,depth:v,expanded:z,loading:B}=t,d=P.type==="dir",f=d?P.path:W(P.path),[T,y]=s.useState(!1),O=!d&&v===0&&Re(P.name),E=Gt(P.lastCommit),R=e.jsxs("div",{role:"treeitem","aria-label":P.name,"aria-expanded":d?z:void 0,"aria-selected":n,tabIndex:-1,onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),p(P),c(P))},draggable:!a&&!S,onDragStart:k=>{S||(k.dataTransfer.setData("text/plain",P.path),k.dataTransfer.setData(tn,P.path),k.dataTransfer.effectAllowed="copyMove")},onDragOver:k=>{if(k.stopPropagation(),!S&&$&&ke(k.dataTransfer.types)){k.preventDefault(),k.dataTransfer.dropEffect="copy",y(!0);return}S||!d||!Ge(k.dataTransfer.types)||(k.preventDefault(),k.dataTransfer.dropEffect=k.altKey&&A?"copy":"move",y(!0))},onDragLeave:()=>y(!1),onDrop:k=>{if(k.stopPropagation(),S)return;if(y(!1),$&&ke(k.dataTransfer.types)){k.preventDefault();const{files:te}=st(k.dataTransfer);$(f,te);return}if(!d)return;const U=Ye(k.dataTransfer);U!==null&&(k.preventDefault(),k.altKey&&A?L(U,P.path):D(U,P.path))},onClick:()=>{p(P),c(P)},className:Pe("flex w-full cursor-pointer items-center gap-1 py-1 pr-2 text-sm transition-colors",n?"bg-accent text-foreground":"hover:bg-accent/50",T&&"ring-ring/60 bg-accent ring-1"),style:{paddingLeft:v*gn+8},children:[e.jsx("span",{className:"flex size-4 flex-shrink-0 items-center justify-center",children:d&&(B?e.jsx(Fe,{size:"xs",className:"text-muted-foreground"}):x?e.jsx("button",{type:"button","aria-label":"Retry loading",title:"Couldn’t load. Retry",onClick:k=>{k.stopPropagation(),o()},className:"flex items-center justify-center",children:e.jsx(We,{className:"text-destructive size-3.5"})}):z?e.jsx(pt,{className:"text-muted-foreground size-3.5"}):e.jsx(Ke,{className:"text-muted-foreground size-3.5"}))}),d?z?e.jsx(mt,{className:"size-(--size-icon-sm) flex-shrink-0 text-sky-500"}):e.jsx(be,{className:"size-(--size-icon-sm) flex-shrink-0 text-sky-500"}):P.isSymlink===!0?e.jsx(xt,{className:"text-muted-foreground size-(--size-icon-sm) flex-shrink-0"}):e.jsx(Ve,{className:"text-muted-foreground size-(--size-icon-sm) flex-shrink-0"}),a?e.jsx(vn,{initialName:P.name,onSubmit:k=>m(P,k),onCancel:r}):e.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.name}),O&&!a&&e.jsx(gt,{"aria-label":"Pinned to the top",className:"text-muted-foreground/60 size-3 flex-shrink-0"}),K&&!a&&e.jsx("span",{className:"text-muted-foreground/70 text-2xs max-w-[45%] flex-shrink-0 truncate tabular-nums",title:E.title??void 0,children:E.label})]});return S?R:e.jsxs(yt,{children:[e.jsx(vt,{asChild:!0,children:R}),e.jsxs(Ct,{className:"w-52",children:[e.jsx(J,{movesFocus:!0,onClick:()=>i(f),children:"New file"}),e.jsx(J,{movesFocus:!0,onClick:()=>u(f),children:"New folder"}),Y&&e.jsx(J,{onClick:()=>Y(f),children:"Upload files…"}),_&&e.jsxs(e.Fragment,{children:[e.jsx(ue,{}),h&&e.jsx(J,{onClick:()=>g(P),children:h}),e.jsx(J,{movesFocus:!0,onClick:()=>w(P),children:"Add to chat"})]}),A&&e.jsxs(e.Fragment,{children:[e.jsx(ue,{}),e.jsx(J,{onClick:()=>C(P),children:"Copy"}),e.jsx(J,{disabled:!j(f),onClick:()=>q(f),children:"Paste"}),e.jsx(J,{onClick:()=>I(P),children:"Duplicate"})]}),e.jsx(ue,{}),_?e.jsxs(e.Fragment,{children:[e.jsx(J,{onClick:()=>b(P,"absolute"),children:"Copy path"}),e.jsx(J,{onClick:()=>b(P,"relative"),children:"Copy relative path"})]}):e.jsx(J,{onClick:()=>b(P,"relative"),children:"Copy path"}),e.jsx(ue,{}),e.jsx(J,{movesFocus:!0,onClick:()=>N(P),children:"Rename"}),e.jsx(J,{variant:"destructive",onClick:()=>F(P),children:"Delete"})]})]})}function vn({initialName:t,onSubmit:n,onCancel:a}){const x=s.useRef(null),[p,c]=s.useState(t);s.useEffect(()=>{const m=x.current;if(!m)return;m.focus();const r=t.lastIndexOf(".");m.setSelectionRange(0,r>0?r:t.length)},[t]);const o=()=>{const m=p.trim();m&&m!==t?n(m):a()};return e.jsx("input",{ref:x,type:"text",value:p,"aria-label":"New name",onChange:m=>c(m.target.value),onClick:m=>m.stopPropagation(),onBlur:o,onKeyDown:m=>{m.stopPropagation(),m.key==="Enter"?o():m.key==="Escape"&&a()},className:"border-border bg-background min-w-0 flex-1 rounded border px-1 py-0 text-sm outline-none"})}const Cn=100,bn=28,kn=250;function jn(t){const{rows:n,selectedPath:a,renamingPath:x,errorPaths:p,onSelectPath:c,onRetryDir:o}=t,m=s.useRef(null),r=H(v=>v.setScrollTop),i=H(v=>v.scopeKey),u=s.useCallback(v=>v.type==="dir"?t.onToggle(v):t.onOpen(v),[t]),N=En(t,u),F=n.length>Cn,D=en({count:n.length,getScrollElement:()=>m.current,estimateSize:()=>bn,overscan:12,enabled:F}),L=s.useRef({scope:void 0,done:!1}),C=s.useRef(null);s.useLayoutEffect(()=>{const v=L.current;if(v.scope!==i&&(v.scope=i,v.done=!1),v.done||n.length===0)return;const z=m.current;if(!z)return;const B=H.getState().scrollTop;if(B<=0){v.done=!0;return}F?D.scrollToOffset(B):z.scrollTop=B,C.current=z.scrollTop,z.scrollTop>=B&&(v.done=!0)},[n.length,i,F,D]);const q=s.useRef(null),I=s.useRef(null),j=s.useCallback(()=>{const v=m.current;v&&v.scrollTop!==C.current&&(L.current.done=!0,q.current=v.scrollTop,I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{I.current=null,q.current!==null&&r(q.current)},kn))},[r]);s.useEffect(()=>()=>{I.current&&clearTimeout(I.current),q.current!==null&&r(q.current)},[r]);const h=s.useRef(void 0);s.useEffect(()=>{var d,f;const v=h.current;if(h.current=a,v===void 0||a===v||a===null)return;const z=n.findIndex(T=>T.entry.path===a);if(z<0)return;const B=m.current;B&&(F?D.scrollToIndex(z,{align:"auto"}):(f=(d=B.querySelector(`[data-row-index="${z}"]`))==null?void 0:d.scrollIntoView)==null||f.call(d,{block:"nearest"}),C.current=B.scrollTop)},[a,n,F,D]);const[g,w]=s.useState(!1),{onCopyInto:b,onMove:S}=t,K=t.readOnly===!0,A=t.copyable!==!1,_=s.useCallback(v=>{K||!Ge(v.dataTransfer.types)||(v.preventDefault(),v.dataTransfer.dropEffect=v.altKey&&A?"copy":"move",w(!0))},[K,A]),$=s.useCallback((v,z)=>{const B=n.find(d=>d.entry.path===v);B&&b({path:v,isDir:B.entry.type==="dir"},z)},[n,b]),Y=s.useCallback(v=>{if(w(!1),K)return;const z=Ye(v.dataTransfer);z!==null&&(v.preventDefault(),v.altKey&&A?$(z,Q):S(z,Q))},[$,S,K,A]),P=v=>e.jsx(yn,{row:v,selected:v.entry.path===a,renaming:v.entry.path===x,error:v.entry.type==="dir"&&v.expanded&&p.has(v.entry.path),onSelect:z=>c(z.path),onActivate:u,onRetry:()=>o(v.entry.path),onSubmitRename:t.onSubmitRename,onCancelRename:t.onCancelRename,onStartRename:t.onStartRename,onNewFile:t.onNewFile,onNewFolder:t.onNewFolder,onDelete:t.onDelete,onMove:t.onMove,onCopyInto:$,onCopy:t.onCopy,onPaste:t.onPaste,onDuplicate:t.onDuplicate,canPasteInto:t.canPasteInto,revealLabel:t.revealLabel,onReveal:t.onReveal,onAddToChat:t.onAddToChat,onCopyPath:t.onCopyPath,readOnly:t.readOnly,provenance:t.provenance,copyable:t.copyable,onDisk:t.onDisk,onUpload:t.onUpload,onPickUpload:t.onPickUpload});return e.jsx("div",{ref:m,role:"tree","aria-label":"File explorer",tabIndex:0,onKeyDown:N,onScroll:j,onDragOver:_,onDragLeave:()=>w(!1),onDrop:Y,className:Pe("focus-visible:ring-ring h-full overflow-auto outline-none focus-visible:ring-1 focus-visible:ring-inset",g&&"ring-ring/60 bg-accent/30 ring-1 ring-inset"),children:F?e.jsx("div",{style:{height:D.getTotalSize()},className:"relative w-full",children:D.getVirtualItems().map(v=>e.jsx("div",{"data-row-index":v.index,className:"absolute top-0 left-0 w-full",style:{transform:`translateY(${v.start}px)`},children:P(n[v.index])},n[v.index].entry.path))}):n.map((v,z)=>e.jsx("div",{"data-row-index":z,children:P(v)},v.entry.path))})}function wn(t){return t?t.type==="dir"?t.path:W(t.path):Q}function En(t,n){const{rows:a,selectedPath:x,renamingPath:p,onSelectPath:c}=t;return s.useCallback(o=>{var i,u,N,F;if(p!==null)return;const m=a.findIndex(D=>D.entry.path===x),r=m>=0?a[m]:void 0;if(o.metaKey||o.ctrlKey){if(t.readOnly===!0||t.copyable===!1)return;const D=o.key.toLowerCase();if(D==="c"&&r){o.preventDefault(),t.onCopy(r.entry);return}if(D==="v"){o.preventDefault(),t.onPaste(wn(r==null?void 0:r.entry));return}return}switch(o.key){case"ArrowDown":o.preventDefault(),c(((i=a[Math.min(m+1,a.length-1)])==null?void 0:i.entry.path)??((u=a[0])==null?void 0:u.entry.path));break;case"ArrowUp":o.preventDefault(),c(((N=a[Math.max(m-1,0)])==null?void 0:N.entry.path)??((F=a[0])==null?void 0:F.entry.path));break;case"ArrowRight":(r==null?void 0:r.entry.type)==="dir"&&!r.expanded&&(o.preventDefault(),t.onToggle(r.entry));break;case"ArrowLeft":if(!r)break;if(o.preventDefault(),r.entry.type==="dir"&&r.expanded)t.onToggle(r.entry);else{const D=W(r.entry.path);D&&c(D)}break;case"Enter":r&&(o.preventDefault(),n(r.entry));break;case"F2":r&&t.readOnly!==!0&&(o.preventDefault(),t.onStartRename(r.entry));break;case"Delete":case"Backspace":r&&t.readOnly!==!0&&(o.preventDefault(),t.onDelete(r.entry));break}},[a,x,p,c,t,n])}const Dn={rename:"Rename it anyway",move:"Move it anyway",delete:"Delete it anyway",upload:"Upload mine over it"},Nn={rename:"nothing was renamed",move:"nothing was moved",delete:"nothing was deleted",upload:"nothing was uploaded"};function Rn(t){const{entry:n,fileCount:a,moreThan:x}=t;if(n.type!=="dir")return`“${n.name}” leaves the room’s files.`;const p=a===null?"everything in it":x?`the more than ${a.toLocaleString()} files in it`:a===1?"the 1 file in it":`the ${a.toLocaleString()} files in it`;return`“${n.name}” and ${p} leave the room’s files.`}const Sn="The room’s history keeps a copy. An agent can restore it.";function Tn({changes:t,onOpenTheirs:n,onReturnFocus:a}){var D;const x=L=>{L.preventDefault();const C=document.activeElement;C!==null&&C!==document.body||a()},{pendingDelete:p,pendingClash:c,conflict:o}=t,[m,r]=s.useState(p);p!==null&&p!==m&&r(p);const[i,u]=s.useState(c);c!==null&&c!==i&&u(c);const N=i===null?"":i.dir===Q?"The top folder":`“${i.dir}”`,F=(i==null?void 0:i.names.length)===1;return e.jsxs(e.Fragment,{children:[e.jsx(fe,{open:p!==null,onOpenChange:L=>!L&&t.cancelDelete(),children:e.jsxs(he,{onCloseAutoFocus:x,children:[e.jsxs(pe,{children:[e.jsx(me,{children:m===null?"":`Delete “${m.entry.name}”?`}),e.jsx(xe,{asChild:!0,children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{children:m===null?"":Rn(m)}),e.jsx("p",{children:Sn})]})})]}),e.jsxs(ge,{children:[e.jsx(ye,{onClick:t.cancelDelete,children:"Cancel"}),e.jsx(ve,{onClick:()=>void t.confirmDelete(),className:"bg-destructive hover:bg-destructive/90 dark:bg-destructive/60 text-white",children:(m==null?void 0:m.entry.type)==="dir"?"Delete folder":"Delete file"})]})]})}),e.jsx(fe,{open:c!==null,onOpenChange:L=>!L&&t.cancelClash(),children:e.jsxs(he,{onCloseAutoFocus:x,children:[e.jsxs(pe,{children:[e.jsx(me,{children:F?`Replace “${i==null?void 0:i.names[0]}”?`:`Replace ${(i==null?void 0:i.names.length)??0} files?`}),e.jsx(xe,{children:F?`${N} already has a file with this name. Replace it, or keep both.`:`${N} already has files named ${(i==null?void 0:i.names.join(", "))??""}. Replace them, or keep both.`})]}),e.jsxs(ge,{children:[e.jsx(ye,{onClick:t.cancelClash,children:"Cancel"}),e.jsx(G,{variant:"outline",onClick:()=>void t.resolveClash("keep-both"),children:"Keep both"}),e.jsx(ve,{onClick:()=>void t.resolveClash("replace"),children:"Replace"})]})]})}),e.jsx(fe,{open:o!==null,onOpenChange:L=>!L&&t.dismissConflict(),children:e.jsxs(he,{onCloseAutoFocus:x,children:[e.jsxs(pe,{children:[e.jsx(me,{children:"Somebody changed this first"}),e.jsx(xe,{children:o===null?"":`${((D=o.lastCommit)==null?void 0:D.author)??"Somebody"} changed “${o.path}” after you opened it, so ${Nn[o.kind]}.`})]}),(o==null?void 0:o.lastCommit)&&e.jsxs("p",{className:"text-muted-foreground text-xs",children:[o.lastCommit.subject," · ",bt(o.lastCommit.at)]}),e.jsxs(ge,{children:[e.jsx(ye,{onClick:t.dismissConflict,children:"Cancel"}),e.jsx(G,{variant:"outline",onClick:()=>{o!==null&&(t.dismissConflict(),n(o.path))},children:"Open their version"}),e.jsx(ve,{onClick:()=>{o!==null&&(t.dismissConflict(),o.retry())},className:"bg-destructive hover:bg-destructive/90 dark:bg-destructive/60 text-white",children:o===null?"":Dn[o.kind]})]})]})})]})}function ze(t,n){return n.name===t?Ue(t):`“${n.name}” is already there. Some computers ignore capital letters in names. Pick another name.`}const Fn="Folders can’t be uploaded. Drop the files inside instead.";function Pn({source:t,className:n,onCommands:a}={}){var de;const x=ne(),p=Te(l=>l.selectedCwd),c=s.useMemo(()=>p?xn({transport:x,cwd:p}):null,[x,p]),o=t===void 0?c:t,m=o!==null&&!o.writable,r=mn(o),i=r.changes,u=oe(),N=H(l=>l.showHidden),{rows:F,rootLoading:D,rootError:L,rootErrorMessage:C,rootErrorCommand:q,errorPaths:I}=r,j=H(l=>l.setCommands),h=H(l=>l.selectedPath),g=H(l=>l.setSelectedPath),w=H(l=>l.clipboard),[b,S]=s.useState(null),[K,A]=s.useState(null),[_,$]=s.useState(null),Y=s.useCallback(l=>$(l===null?null:{path:l,isNew:!1}),[]),P=s.useRef(null),v=s.useRef(Q),[z,B]=s.useState(!1),d=s.useCallback((l,M)=>{if(i!==null){if(M.length===0){X.error(Fn);return}r.ensureExpanded(l),i.upload(l,M)}},[i,r]),f=s.useRef(null),T=s.useCallback(()=>{var l,M;(M=(l=f.current)==null?void 0:l.querySelector('[role="tree"]'))==null||M.focus()},[]),y=s.useCallback(l=>{var M;v.current=l,(M=P.current)==null||M.click()},[]),O=s.useCallback(l=>w!==null&&!(w.isDir&&Ce(l,w.path)),[w]),E=s.useCallback((l,M)=>{r.ensureExpanded(l),_e.flushSync(()=>{A(null),S({parent:l,type:M})})},[r]),R=s.useCallback(l=>{_e.flushSync(()=>A(l.path))},[]),k=s.useRef({startCreate:E,reload:r.reload,pickUpload:y});s.useEffect(()=>{k.current={startCreate:E,reload:r.reload,pickUpload:y}});const U=i!==null;s.useEffect(()=>{if(m||a===void 0&&U)return;const l=a??j;return l({newFile:()=>k.current.startCreate(Q,"file"),newFolder:()=>k.current.startCreate(Q,"dir"),refresh:()=>k.current.reload(),...U&&{upload:()=>k.current.pickUpload(Q)}}),()=>l(null)},[j,a,m,U]);const te=s.useCallback(async l=>{var se;if(!b||o===null)return;const M=b;if(S(null),i!==null){const re=(((se=u.getQueryData(le(o,M.parent,N)))==null?void 0:se.entries)??[]).find(ot=>ot.name.toLowerCase()===l.toLowerCase());if(M.type==="dir"){if(re!==void 0&&!(re.type==="dir"&&re.name===l)){X.error(ze(l,re));return}S({parent:ee(M.parent,l),type:"file",firstInFolder:l});return}if(re!==void 0){X.error(ze(l,re));return}const rt=ee(M.parent,l);$({path:rt,isNew:!0});return}await r.createEntry(M.parent,l,M.type)&&g(ee(M.parent,l))},[b,o,i,u,N,r,g]),V=s.useCallback(async(l,M)=>{A(null),(i?await i.renameEntry(l,M):await r.renameEntry(l,M))&&g(ee(W(l.path),M))},[i,r,g]);return o===null?t!==void 0?null:e.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-6 text-center text-sm",children:"Pick a folder to see its files."}):e.jsxs("div",{ref:f,className:Pe("flex h-full flex-col",z&&"ring-ring/60 bg-accent/30 ring-1 ring-inset",n),onDragOver:l=>{i===null||!ke(l.dataTransfer.types)||(l.preventDefault(),l.dataTransfer.dropEffect="copy",B(!0))},onDragLeave:l=>{l.currentTarget.contains(l.relatedTarget)||B(!1)},onDrop:l=>{B(!1),!(i===null||!ke(l.dataTransfer.types))&&(l.preventDefault(),d(Q,st(l.dataTransfer).files))},children:[i!==null&&e.jsx("input",{ref:P,type:"file",multiple:!0,hidden:!0,"aria-hidden":!0,tabIndex:-1,"data-testid":"room-files-upload-input",onChange:l=>{const M=Array.from(l.target.files??[]);l.target.value="",d(v.current,M)}}),e.jsxs("div",{className:"min-h-0 flex-1",children:[b&&e.jsx(On,{type:b.type,firstInFolder:b.firstInFolder,onSubmit:l=>void te(l),onCancel:()=>S(null)},`${b.parent}:${b.type}:${b.firstInFolder??""}`),D&&F.length===0?e.jsx("div",{className:"flex h-20 items-center justify-center",children:e.jsx(Fe,{size:"md",className:"text-muted-foreground",label:"Loading files"})}):L&&F.length===0?e.jsxs("div",{className:"text-muted-foreground flex min-h-20 flex-col items-center justify-center gap-2 px-4 py-3 text-center text-xs [overflow-wrap:anywhere]",children:[e.jsx("span",{children:C??"Couldn’t load files."}),q!==null&&e.jsx("code",{"aria-label":"Command that removes the settings",className:"bg-muted text-foreground block w-full rounded px-2 py-1.5 text-left font-mono select-all",children:q}),e.jsxs(G,{variant:"outline",size:"xs",onClick:r.reload,children:[e.jsx(We,{}),"Retry"]})]}):F.length===0&&!b?e.jsx("div",{className:"text-muted-foreground/60 flex h-20 items-center justify-center px-4 text-center text-xs",children:i!==null?"No files yet. Drop files here, or use Upload.":"Empty folder"}):e.jsx(jn,{rows:F,selectedPath:h,renamingPath:K,errorPaths:I,onSelectPath:g,onToggle:r.toggleExpand,onOpen:l=>{o.preview==="inline"?Y(l.path):r.openFile(l)},onRetryDir:r.retryDir,onSubmitRename:(l,M)=>void V(l,M),onCancelRename:()=>A(null),onStartRename:R,onNewFile:l=>E(l,"file"),onNewFolder:l=>E(l,"dir"),onDelete:l=>i?i.requestDelete(l):void r.removeEntry(l),onMove:(l,M)=>void(i?i.moveEntry(l,M):r.moveEntry(l,M)),onCopyInto:(l,M)=>void r.copyEntry(l,M),onCopy:r.copyToClipboard,onPaste:l=>{w&&r.copyEntry(w,l)},onDuplicate:l=>void r.copyEntry({path:l.path,isDir:l.type==="dir"},W(l.path)),canPasteInto:O,readOnly:m,provenance:o.provenance,copyable:i===null,onDisk:o.cwd!==null,onUpload:i?d:void 0,onPickUpload:i?y:void 0,revealLabel:r.revealLabel,onReveal:l=>void r.reveal(l),onAddToChat:r.addToChat,onCopyPath:(l,M)=>void r.copyPath(l,M)})]}),o.preview==="inline"&&e.jsx(Wt,{source:o,path:(_==null?void 0:_.path)??null,isNew:(_==null?void 0:_.isNew)??!1,onCreated:()=>{_!==null&&($({path:_.path,isNew:!1}),g(_.path))},onClose:()=>$(null)}),i!==null&&e.jsx(Tn,{changes:i,onOpenTheirs:l=>Y(l),onReturnFocus:T}),e.jsx(fe,{open:r.pendingRecursiveDelete!==null,onOpenChange:l=>!l&&r.cancelRecursiveDelete(),children:e.jsxs(he,{children:[e.jsxs(pe,{children:[e.jsxs(me,{children:["Delete “",(de=r.pendingRecursiveDelete)==null?void 0:de.name,"”?"]}),e.jsx(xe,{children:"This folder isn’t empty. Everything inside is deleted. This can’t be undone."})]}),e.jsxs(ge,{children:[e.jsx(ye,{onClick:r.cancelRecursiveDelete,children:"Cancel"}),e.jsx(ve,{onClick:()=>void r.confirmRecursiveDelete(),className:"bg-destructive hover:bg-destructive/90 dark:bg-destructive/60 text-white",children:"Delete folder"})]})]})})]})}function On({type:t,firstInFolder:n,onSubmit:a,onCancel:x}){const p=s.useRef(null),[c,o]=s.useState("");s.useEffect(()=>{var i;(i=p.current)==null||i.focus()},[]);const m=()=>{const i=c.trim();i?a(i):x()},r=e.jsxs("div",{className:"flex items-center gap-1",children:[t==="dir"?e.jsx(be,{className:"size-(--size-icon-sm) flex-shrink-0 text-sky-500"}):e.jsx(Ve,{className:"text-muted-foreground size-(--size-icon-sm) flex-shrink-0"}),e.jsx("input",{ref:p,type:"text",value:c,"aria-label":n!==void 0?`First file in ${n}`:t==="dir"?"New folder name":"New file name",placeholder:t==="dir"?"folder-name":"file-name",onChange:i=>o(i.target.value),onBlur:m,onKeyDown:i=>{i.key==="Enter"?m():i.key==="Escape"&&x()},className:"border-border bg-background min-w-0 flex-1 rounded border px-1 py-0 text-sm outline-none"})]});return n===void 0?e.jsx("div",{className:"px-3 py-1",children:r}):e.jsxs("div",{className:"space-y-1 px-3 py-1",children:[e.jsxs("p",{className:"text-muted-foreground flex min-w-0 items-center gap-1 text-xs",children:[e.jsx(be,{className:"size-(--size-icon-xs) flex-shrink-0 text-sky-500"}),e.jsx("span",{className:"truncate",children:n})]}),r,e.jsx("p",{className:"text-muted-foreground text-2xs",children:"Name its first file. The folder appears on save."})]})}function at(){const t=H(x=>x.showHidden),n=H(x=>x.setShowHidden),a=t?"Hide hidden files":"Show hidden files";return e.jsx(G,{variant:"ghost",size:"icon-xs","aria-label":a,title:a,onClick:()=>n(!t),children:t?e.jsx(kt,{className:"text-muted-foreground"}):e.jsx(jt,{className:"text-muted-foreground"})})}function Mn({cwd:t}){const n=ne(),{data:a}=ce({queryKey:["file-explorer","workspace",t],queryFn:()=>n.resolveWorkspace(t),staleTime:6e4});return a!=null&&a.branch?e.jsxs("span",{className:"text-muted-foreground bg-muted/50 text-2xs inline-flex min-w-0 items-center gap-1 rounded px-1.5 py-0.5",title:`Workspace ${a.key} on ${a.branch}`,children:[e.jsx(Ze,{className:"size-3 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:a.branch})]}):null}function Vn(){const t=Te(a=>a.selectedCwd),n=H(a=>a.commands);return t?e.jsxs(e.Fragment,{children:[e.jsx(Mn,{cwd:t}),e.jsx(G,{variant:"ghost",size:"icon-xs","aria-label":"New file",title:"New file",onClick:()=>n==null?void 0:n.newFile(),children:e.jsx(et,{className:"text-muted-foreground"})}),e.jsx(G,{variant:"ghost",size:"icon-xs","aria-label":"New folder",title:"New folder",onClick:()=>n==null?void 0:n.newFolder(),children:e.jsx(He,{className:"text-muted-foreground"})}),e.jsx(at,{}),e.jsx(G,{variant:"ghost",size:"icon-xs","aria-label":"Refresh",title:"Refresh",onClick:()=>n==null?void 0:n.refresh(),children:e.jsx(wt,{className:"text-muted-foreground"})})]}):null}function _n({roomId:t}){const n=ne(),a=oe(),x=ce(qe(n,t));s.useEffect(()=>Vt(a,t,()=>{a.invalidateQueries({queryKey:De.repoStatus(t)})}),[a,t]);const p=s.useMemo(()=>{var r;return((r=x.data)==null?void 0:r.kind)==="ok"?Et(x.data.status):[]},[x.data]),c=Dt(p),o=Nt(p);if(!o)return null;const m=p.map((r,i)=>`${c[i]}: ${Rt(r)}`);return e.jsxs("span",{"data-slot":"pending-work-badge",title:m.join(`
|
|
17
|
-
`),className:"text-muted-foreground bg-muted/50 text-2xs inline-flex min-w-0 items-center gap-1 rounded px-1.5 py-0.5",children:[e.jsx(Ze,{className:"size-3 flex-shrink-0"}),e.jsxs("span",{className:"sr-only",children:["Not merged into the room yet. ",m.join(". "),"."]}),e.jsx("span",{"aria-hidden":"true",className:"truncate",children:o})]})}const An={added:"added",modified:"changed",deleted:"deleted",untracked:"new"},Ln=new Map([["OPERATOR_ONLY","Only the owner of this DorkOS can keep or discard these."],["ROOM_FILE_NOT_FOUND","One of those changes is gone, so nothing was discarded. The list is refreshed."],["MERGE_IN_FLIGHT","Something else is writing to these files. Nothing changed. Try again in a moment."],["MAIN_CHECKOUT_DIRTY","These files are on another branch. Switch them back to main yourself."],["ROOM_REPO_GIT_UNAVAILABLE","Room files need git, and git isn’t installed on this computer."],["ROOM_HAS_NO_REPO","This room no longer has its own files."],["ROOM_REPOS_DISABLED","Room files are turned off on this install."]]);function zn({roomId:t}){var q,I;const n=ne(),a=oe(),x=ce(qe(n,t)),[p,c]=s.useState([]),[o,m]=s.useState(!1),[r,i]=s.useState(null),u=St({mutationFn:j=>n.repairRoomMain(t,j),onSuccess:()=>{c([]),m(!1),i(null),a.invalidateQueries({queryKey:De.repoStatus(t)})},onError:j=>{m(!1);const h=Ln.get(Tt(j)??"");i(h??"Couldn’t update the files. Try again in a moment."),a.invalidateQueries({queryKey:De.repoStatus(t)})}});if(((q=x.data)==null?void 0:q.kind)==="unavailable")return e.jsx("p",{role:"alert","data-slot":"room-main-warning",className:"border-border/60 text-muted-foreground rounded-lg border px-3 py-2.5 text-xs",children:"Couldn’t check this room’s files. Saves may not work. Try again soon."});const N=((I=x.data)==null?void 0:I.kind)==="ok"?x.data.status.main:void 0;if(N===void 0||!N.dirty)return null;const F=N.branch!=="main",D=p.filter(j=>N.strays.some(h=>h.path===j)),L=o&&D.length>0,C=j=>c(h=>h.includes(j)?h.filter(g=>g!==j):[...h,j]);return e.jsxs("div",{"data-slot":"room-main-warning",className:"border-border/60 bg-muted/40 space-y-3 rounded-lg border px-3 py-2.5 text-sm",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Ft,{className:"text-muted-foreground mt-0.5 size-(--size-icon-sm) flex-shrink-0"}),e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsxs("div",{role:"alert",className:"space-y-1",children:[e.jsx("p",{className:"font-medium",children:"Somebody changed this room’s files outside DorkOS"}),F?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-muted-foreground text-xs",children:`This room’s files are on ${N.branch??"no branch"}, not main.`}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Saves and agent merges wait until they’re back on main."})]}):e.jsx("p",{className:"text-muted-foreground text-xs",children:"Saves and agent merges wait until you keep or discard these."})]}),F&&e.jsx(Pt,{className:"text-xs",children:e.jsx("p",{children:"DorkOS won’t switch the branch for you. There may be work on it."})})]})]}),!F&&e.jsxs(e.Fragment,{children:[e.jsx("ul",{className:"space-y-1.5",children:N.strays.map(j=>e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(Ot,{id:`stray-${t}-${j.path}`,checked:D.includes(j.path),onCheckedChange:()=>C(j.path),disabled:u.isPending}),e.jsx("label",{htmlFor:`stray-${t}-${j.path}`,className:"min-w-0 flex-1 cursor-pointer truncate font-mono text-xs",title:j.path,children:j.path}),e.jsx("span",{className:"text-muted-foreground flex-shrink-0 text-xs",children:An[j.kind]})]},j.path))}),N.strayCount>N.strays.length&&e.jsxs("p",{className:"text-muted-foreground text-xs",children:["…and ",N.strayCount-N.strays.length," more not shown. “Keep them all” keeps these too."]}),L?e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs",children:D.length===1?"Discard this change? It can’t be undone.":`Discard these ${D.length} changes? They can’t be undone.`}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(G,{type:"button",variant:"ghost",size:"sm",disabled:u.isPending,onClick:()=>m(!1),children:"Cancel"}),e.jsx(G,{type:"button",variant:"destructive",size:"sm",disabled:u.isPending,onClick:()=>u.mutate({action:"discard",paths:[...D]}),children:D.length===1?"Discard change":`Discard ${D.length} changes`})]})]}):e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(G,{type:"button",variant:"outline",size:"sm",disabled:u.isPending,onClick:()=>u.mutate({action:"commit"}),children:"Keep them all"}),e.jsx(G,{type:"button",variant:"ghost",size:"sm",disabled:u.isPending||D.length===0,onClick:()=>m(!0),children:D.length===0?"Discard…":`Discard ${D.length}`})]})]}),r!==null&&e.jsx("p",{role:"alert",className:"text-destructive text-xs",children:r})]})}const Ee="pointer-coarse:size-11";function Zn({roomId:t,canChange:n}){const a=ne(),x=oe(),p=H(F=>F.showHidden),[c,o]=s.useState(null),m=s.useMemo(()=>Be({transport:a,queryClient:x,roomId:t,canChange:n}),[a,x,t,n]),r=ce(je(m,Q,p,x)),i=r.isSuccess&&r.data.absent!==!0||r.isError,[u,N]=s.useState(null);return i&&u!==t&&N(t),!i&&u!==t?null:e.jsxs("section",{"aria-label":"Room files",className:"space-y-2",children:[e.jsxs("header",{className:"flex items-center gap-2",children:[e.jsx(Mt,{className:"text-muted-foreground size-(--size-icon-sm) flex-shrink-0"}),e.jsx("h3",{className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Files"}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx(_n,{roomId:t})}),n&&e.jsxs(e.Fragment,{children:[e.jsx(G,{variant:"ghost",size:"icon-xs",className:Ee,"aria-label":"New file",title:"New file",disabled:c===null,onClick:()=>c==null?void 0:c.newFile(),children:e.jsx(et,{className:"text-muted-foreground"})}),e.jsx(G,{variant:"ghost",size:"icon-xs",className:Ee,"aria-label":"New folder",title:"New folder",disabled:c===null,onClick:()=>c==null?void 0:c.newFolder(),children:e.jsx(He,{className:"text-muted-foreground"})}),e.jsx(G,{variant:"ghost",size:"icon-xs",className:Ee,"aria-label":"Upload files",title:"Upload files",disabled:(c==null?void 0:c.upload)===void 0,onClick:()=>{var F;return(F=c==null?void 0:c.upload)==null?void 0:F.call(c)},children:e.jsx(sn,{className:"text-muted-foreground"})})]}),e.jsx(at,{})]}),e.jsx(zn,{roomId:t}),e.jsx("div",{"data-slot":"room-files-body",className:"border-border/60 h-72 overflow-hidden rounded-lg border",children:e.jsx(Pn,{source:m,onCommands:o})})]})}function Jn({roomId:t,attachment:n}){var i;const a=ne(),x=oe(),p=s.useMemo(()=>Be({transport:a,queryClient:x,roomId:t}),[a,x,t]),c=ce(je(p,Q,!1,x)),[o,m]=s.useState(!1),r=_t(t);return!c.isSuccess||c.data.absent===!0||((i=r.data)==null?void 0:i.archived)!==!1?null:e.jsxs(e.Fragment,{children:[e.jsx(G,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`Save ${n.name} to the room’s files`,title:"Save to room files",className:"text-muted-foreground hover:text-foreground mt-0.5 pointer-coarse:size-11",onClick:()=>m(!0),children:e.jsx(At,{})}),o&&e.jsx($n,{roomId:t,source:p,attachment:n,onClose:()=>m(!1)})]})}function $n({roomId:t,source:n,attachment:a,onClose:x}){const p=ne(),c=oe(),[o,m]=s.useState(Q),[r,i]=s.useState(a.name),[u,N]=s.useState(null),[F,D]=s.useState(!1),L=s.useId(),C=ce(je(n,o,!1,c)),q=s.useMemo(()=>{var j;return nt(((j=C.data)==null?void 0:j.entries)??[]).filter(h=>h.type==="dir")},[C.data]),I=async()=>{var h,g;const j=r.trim();if(j!==""){D(!0),N(null);try{await p.saveAttachmentToRoomFiles(t,{attachmentId:a.id,dir:o,name:j,baseCommit:((h=C.data)==null?void 0:h.commit)??null}),c.invalidateQueries({queryKey:["file-explorer","tree",n.scopeKey]}),X.success(`Saved ${j} to the room’s files`),x()}catch(w){let b;try{b=Zt(w,c,t)}catch{b={status:"refused",reason:Qe(w)??"Couldn’t save. Try again in a moment."}}if(b.status==="exists"){const S=(((g=C.data)==null?void 0:g.entries)??[]).map(K=>K.name);N({reason:`This folder already has a file called “${j}”. Pick another name.`,suggestion:Oe({name:j,isDir:!1,taken:[...S,j]})})}else b.status==="conflict"?(N({reason:"This folder changed while you chose, so nothing was saved. Try again."}),C.refetch()):b.status==="refused"&&N({reason:b.reason})}finally{D(!1)}}};return e.jsx(Lt,{open:!0,onOpenChange:j=>!j&&x(),children:e.jsxs(zt,{className:"sm:max-w-md",children:[e.jsxs($t,{children:[e.jsx(It,{children:"Save to room files"}),e.jsx(Kt,{children:"Everyone in the room, and their agents, can find it there."})]}),e.jsxs(Ht,{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:"Folder"}),e.jsxs("div",{role:"group","aria-label":"Folders",className:"border-border/60 max-h-56 overflow-auto rounded-md border",children:[e.jsx("p",{className:"bg-muted/40 truncate px-3 py-1.5 font-mono text-xs",children:o===Q?"Top folder":`${o}/`}),o!==Q&&e.jsx($e,{label:"Up one folder",icon:e.jsx(nn,{className:"text-muted-foreground size-(--size-icon-sm)"}),onClick:()=>m(W(o))}),C.isPending?e.jsx("div",{className:"flex h-12 items-center justify-center",children:e.jsx(Fe,{size:"sm",className:"text-muted-foreground",label:"Loading folders"})}):q.length===0?e.jsx("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:"No folders in here."}):q.map(j=>e.jsx($e,{label:j.name,icon:e.jsx(be,{className:"size-(--size-icon-sm) text-sky-500"}),chevron:!0,onClick:()=>m(ee(o,ie(j.path)))},j.path))]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{htmlFor:L,className:"text-muted-foreground text-xs font-medium",children:"Name"}),e.jsx(qt,{id:L,value:r,onChange:j=>{i(j.target.value),N(null)},spellCheck:!1,autoComplete:"off"})]}),u!==null&&e.jsxs("div",{role:"alert",className:"text-destructive space-y-1 text-xs",children:[e.jsx("p",{children:u.reason}),u.suggestion!==void 0&&e.jsxs(G,{type:"button",variant:"outline",size:"xs",onClick:()=>{i(u.suggestion),N(null)},children:["Use “",u.suggestion,"”"]})]})]}),e.jsxs(Ut,{className:"gap-2",children:[e.jsx(G,{type:"button",variant:"ghost",onClick:x,children:"Cancel"}),e.jsx(G,{type:"button",disabled:F||r.trim()===""||C.isPending,onClick:()=>void I(),children:F?"Saving…":o===Q?"Save to the top folder":`Save to ${ie(o)}`})]})]})})}function $e({label:t,icon:n,chevron:a=!1,onClick:x}){return e.jsxs("button",{type:"button",onClick:x,className:"hover:bg-accent/50 focus-visible:bg-accent flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm outline-none",children:[n,e.jsx("span",{className:"min-w-0 flex-1 truncate",children:t}),a&&e.jsx(Ke,{className:"text-muted-foreground size-3.5"})]})}export{Pn as FileExplorer,Vn as FileExplorerActions,Wt as FilePreviewDialog,an as HIDDEN_ENTRY_NAMES,at as HiddenEntriesToggle,ts as NO_PROVENANCE,Ne as PINNED_ENTRY_NAMES,ns as ROOM_FILES_REFRESH_INTERVAL_MS,Zn as RoomFilesSection,Jn as SaveToRoomFilesButton,Be as createRoomFilesSource,xn as createSessionCwdSource,le as explorerDirQueryKey,je as explorerDirQueryOptions,rn as isHiddenEntryName,Re as isPinnedEntryName,on as pinnedFirst,Gt as provenanceLine,qe as roomRepoStatusQueryOptions,nt as withoutHidden};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,by as C,bz as M,e as i,bA as w,bB as I,aQ as u,bC as O,bD as L,V as z,bE as F,bF as v,r as o,bG as T,bH as U,bI as V,bJ as q,bK as K,bL as Q,bM as _,bN as B}from"./index-C63bLSO4.js";import{bO as Z,bP as ee,bQ as se,bR as te,bS as ne,bT as ae,bU as re,d as le,bV as oe,bW as ie,bX as ce}from"./index-C63bLSO4.js";import{O as ue,u as fe,a as xe,b as me}from"./OperatorIdentityForm-DH2au7QU.js";function G(){return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-6 text-center",children:[e.jsx("div",{className:"bg-muted flex size-12 items-center justify-center rounded-full",children:e.jsx(C,{className:"text-muted-foreground size-5"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"No agent selected"}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Pick an agent to see its profile."})]})]})}function H({agentPath:s}){return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-6 text-center",children:[e.jsx("div",{className:"bg-destructive/10 flex size-12 items-center justify-center rounded-full",children:e.jsx(M,{className:"text-destructive size-5"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Agent not found"}),e.jsx("p",{className:"text-muted-foreground font-mono text-xs break-all",children:s}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Nothing here could be opened as an agent."})]})]})}function J(){return e.jsxs("div",{"data-slot":"profile-dock-skeleton",className:"flex h-full flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 pt-6 pb-4",children:[e.jsx(i,{className:"size-16 rounded-full"}),e.jsx(i,{className:"mt-1 h-4 w-28 rounded"}),e.jsx(i,{className:"h-3 w-16 rounded"}),e.jsx(i,{className:"h-3 w-36 rounded"})]}),e.jsx("div",{className:"space-y-2 px-4",children:["w-full","w-full","w-full"].map((s,f)=>e.jsx(i,{className:`h-8 ${s} rounded`},f))})]})}function X(){var N;const s=w(),f=I(),p=u(t=>t.rightPanelOpen),S=O(),c=L(s??void 0),b=z({enabled:c!==void 0}),r=(N=b.data)==null?void 0:N.members,D=c===void 0||r==null?void 0:r.find(t=>t.id===c),x=S.isFetched&&(c===void 0||b.isFetched),n=D??null,g=F(s),d=v(t=>t.setDockedEntries),m=v(t=>t.clearDockedStacks),E=u(t=>t.setRightPanelOpen),j=u(t=>t.releaseRightPanelRequest),[y,h]=o.useState(!1),a=o.useMemo(()=>n?T(n.id,[...g]):null,[n,g]),P=a===null?null:U(a),l=(P===(n==null?void 0:n.id)?n:r==null?void 0:r.find(t=>t.id===P))??n,A=o.useCallback(t=>{!s||!a||d(s,V(a,t).entries)},[s,a,d]),R=o.useCallback(()=>{!s||!a||d(s,q(a).entries)},[s,a,d]);o.useEffect(()=>{s===null||!x||l!==null||j(s)},[s,x,l,j]);const k=K(l===null?null:{home:"docked",memberId:l.id});return o.useEffect(()=>{if(p)return()=>{if(!u.getState().rightPanelOpen){if(Q(k.read()))return h(!0);m()}}},[p,m,k]),s?!n||!a||!l?x?e.jsx(H,{agentPath:s}):e.jsx(J,{}):e.jsxs("div",{"data-slot":"profile-dock",className:"flex h-full min-h-0 flex-col overflow-hidden",children:[e.jsx(_,{member:l,roster:r??[],home:"docked",inOwnSession:s===f.agentPath&&l.id===n.id,stack:a,onPush:A,onPop:R}),e.jsx(B,{open:y,onKeep:()=>{h(!1),E(!0)},onDiscard:()=>{h(!1),m()}})]}):e.jsx(G,{})}export{Z as AccountMenu,ee as AccountMenuContainer,ue as OperatorIdentityForm,se as PROFILE_PANEL_ID,X as ProfileDock,te as ProfilePanel,ne as ProfilePanelContainer,ae as ProfileSheet,re as ProfileSheetContainer,_ as ProfileView,le as deriveRelationship,oe as handleErrorMessage,ie as identityLinkErrorMessage,T as profileStack,fe as useLegacyProfileLinkRedirect,xe as useProfileDockDeepLink,me as useProfileShortcut,v as useProfileStore,ce as useSetIdentityLinkedToMe};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as t,D as a}from"./TourHost-Db0fxAXo.js";import{T as h,a as g,b as j}from"./TourHost-Db0fxAXo.js";import{j as e,a3 as l,B as r}from"./index-C63bLSO4.js";import"./dorkbot-templates-8Yu9POWJ.js";import"./use-external-adapter-catalog-BOn9aj72.js";function p(){const{pendingOffer:s,pendingOfferId:i,acceptOffer:o,declineOffer:n}=t();return!s||i===null||!s.offerLine?null:e.jsxs(l.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},role:"group","aria-label":"DorkBot suggestion",className:"bg-secondary/60 mt-1.5 flex flex-col gap-2 rounded-lg border p-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("span",{className:"mt-0.5 shrink-0",children:[e.jsx(a,{size:18,className:"dark:hidden"}),e.jsx(a,{variant:"white",size:18,className:"hidden dark:block"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:s.offerLine})]}),e.jsxs("div",{className:"flex items-center gap-2 pl-6",children:[e.jsx(r,{size:"sm",onClick:()=>o(i),children:"Show me"}),e.jsx(r,{size:"sm",variant:"ghost",onClick:()=>n(i),children:"Later"})]})]})}export{h as TOUR_DEFINITIONS,g as TourHost,p as TourOfferChips,j as useTourOccasions,t as useTours};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as x,C as h,a as m,c as p,p as g}from"./use-session-diagnostics-C41hV7rK.js";import{A as se,b as te,d as ne,e as ae,G as oe,M as re,f as ie,P as ce,g as le,R as ue,h as de,S as xe,i as he,j as me,U as pe,k as ge,l as fe,m as je,n as be,o as Se,q as ve,r as ke,s as Ne,t as Ie,v as Ce,w as we,x as ye,y as Me,z as Pe,B as Re,D as Ae}from"./use-session-diagnostics-C41hV7rK.js";import{bY as f,j as s,l as j,B as b,bZ as S,aQ as v,b_ as k,b$ as t,Z as N,c0 as r,c1 as I,c2 as C,r as l,c3 as w,aa as y}from"./index-C63bLSO4.js";import{c4 as Ue,c5 as De,c6 as Ee,c7 as $e,c8 as Ge,c9 as Oe,ca as Le,cb as Be,cc as qe,cd as _e,ce as Fe,cf as ze,cg as Qe,ch as He,ci as Ve,cj as Ze}from"./index-C63bLSO4.js";import{f as M}from"./format-duration-BCr6uzby.js";import{r as P}from"./composer-insert-BpyATrmR.js";import{S as R}from"./ConnectionAccessLists-BPsgToSR.js";import"./git-branch-hfu8isLA.js";import"./card-CKZCX8ol.js";import"./RuntimeSetupDialog-Cqn_Grel.js";import"./layers-Cy8Tme6i.js";const A="I need access to another service. Ask me which service and actions you need, then request only that access.";function T({sessionId:e}){const a=f(),o=s.jsx(b,{variant:"secondary",size:"sm","data-testid":`ask-agent-for-connection-${e}`,onClick:()=>P(A),children:"Ask your agent"});return s.jsx(R,{sessionId:e,onManage:()=>void a({...j.connections()}),emptyAction:o,footer:s.jsx("div",{className:"pt-1",children:o})})}const U=1e3;function W(){const[e]=S(),a=x(e??""),o=v(n=>n.rightPanelOpen);return e?s.jsx(D,{diagnostics:a,live:o,connectors:s.jsx(T,{sessionId:e})}):s.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-6 text-center text-xs",children:"Open a chat to inspect it."})}function D({diagnostics:e,live:a=!0,connectors:o}){return s.jsxs("div",{"data-slot":"session-inspector",className:"flex h-full min-w-0 flex-col gap-4 overflow-y-auto p-3",children:[s.jsx(E,{diagnostics:e,live:a}),s.jsx($,{diagnostics:e}),s.jsx(G,{diagnostics:e}),s.jsx(O,{diagnostics:e}),o,s.jsxs("div",{className:"mt-auto pt-2",children:[s.jsx(k,{className:"mb-2"}),s.jsx(h,{diagnostics:e,className:"w-full justify-center"})]})]})}function E({diagnostics:e,live:a}){const o=_(e.lastEventAt,a),n=m[e.connectionState];return s.jsxs(c,{label:"Live",children:[s.jsx(t,{label:"Live updates",children:s.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[s.jsx("span",{"aria-hidden":!0,className:N("inline-block size-1.5 rounded-full",n.color,n.tasks&&"animate-breath")}),n.shortLabel]})}),s.jsx(t,{label:"Turn",children:L(e)}),s.jsx(t,{label:"Last event",children:e.lastEventSeq===0?"none yet":`seq ${e.lastEventSeq}`}),s.jsx(t,{label:"Resumed from",children:e.snapshotCursor===null?"not hydrated":`cursor ${e.snapshotCursor}`}),s.jsx(t,{label:"Last update",children:o===null?"—":`${M(o)} ago`}),s.jsx(t,{label:"Queued messages",children:String(e.queueDepth)})]})}function $({diagnostics:e}){return s.jsxs(c,{label:"Resolved",children:[s.jsx(t,{label:"Directory",wrap:!0,children:e.cwd??"—"}),s.jsx(t,{label:"Git",children:q(e.git)}),s.jsx(t,{label:"Runs on",children:e.runtime??"—"}),s.jsx(t,{label:"Model",wrap:!0,children:e.model??"—"}),e.selectedModel!==null&&e.selectedModel!==e.model&&s.jsx(t,{label:"Model selected",children:e.selectedModel}),s.jsx(t,{label:"Effort",children:e.effort??"—"}),s.jsx(t,{label:"Fast mode",children:e.fastMode?"on":"off"}),s.jsx(t,{label:"Permissions",children:e.permissionMode}),s.jsx(t,{label:"Chat ID",wrap:!0,children:e.sessionId}),s.jsx(t,{label:"DorkOS version",children:e.clientVersion??"—"})]})}function G({diagnostics:e}){var o;const a=(((o=e.contextUsage)==null?void 0:o.categories)??[]).filter(n=>n.tokens>0).sort((n,i)=>i.tokens-n.tokens);return s.jsxs(c,{label:"Usage",children:[s.jsx(t,{label:"Context",children:e.contextPercent===null?"—":`${e.contextPercent}% full`}),e.contextUsage&&s.jsxs(t,{label:"Tokens",children:[r(e.contextUsage.totalTokens)," / ",r(e.contextUsage.maxTokens)]}),a.map(n=>s.jsx(t,{label:n.name,indent:!0,swatch:n.color,"data-testid":`context-category-${n.name}`,children:r(n.tokens)},n.name)),e.cache===null?s.jsx(t,{label:"Cache",children:"nothing cached yet"}):s.jsxs(s.Fragment,{children:[s.jsx(t,{label:"Cache hit",children:`${p(e.cache)}%`}),s.jsx(t,{label:"Cache read",indent:!0,children:r(e.cache.readTokens)}),s.jsx(t,{label:"Cache written",indent:!0,children:r(e.cache.creationTokens)})]}),e.usage!==null&&I(e.usage)?s.jsx("div",{className:"pt-1",children:s.jsx(C,{usage:e.usage})}):s.jsx(t,{label:"Usage & cost",children:"no usage reported"})]})}function O({diagnostics:e}){const{running:a,finished:o}=g(e.activeSubagents);return s.jsxs(c,{label:"Subagents",children:[s.jsx(t,{label:"Running",children:B(a.length,e.runningSubagentCount)}),a.map(n=>s.jsx(u,{subagent:n},n.taskId)),o.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(t,{label:"Finished this turn",children:String(o.length)}),o.map(n=>s.jsx(u,{subagent:n},n.taskId))]}),s.jsx(t,{label:"Available",children:e.subagents.length===0?"none":e.subagents.map(n=>n.name).join(", ")})]})}function u({subagent:e}){return s.jsxs("div",{"data-testid":`active-subagent-${e.taskId}`,"data-status":e.status,className:"space-y-0.5 py-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(w,{className:"text-muted-foreground size-3.5 shrink-0","aria-hidden":!0}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.description??e.taskId}),s.jsx(y,{size:"xs",variant:"secondary",className:"shrink-0",children:e.status})]}),s.jsxs("p",{className:"text-muted-foreground text-3xs pl-5 leading-tight",children:[e.toolUses??0," tool",e.toolUses===1?"":"s",e.lastToolName?` · last ${e.lastToolName}`:""]})]})}function c({label:e,children:a}){return s.jsxs("section",{className:"min-w-0",children:[s.jsx("h3",{className:"text-muted-foreground px-1 pb-1 text-xs font-medium tracking-wide uppercase",children:e}),s.jsx("div",{className:"space-y-1 px-1 text-xs",children:a})]})}function L(e){return e.triggerPending?"sending":e.streaming?"streaming":e.lifecycle??"not hydrated"}function B(e,a){const o=e===0?"none":String(e);return a===null||a===e?o:`${o} · server says ${a}`}function q(e){return e.state==="unknown"?"—":e.state==="no-repo"?"no repo":e.dirty?`${e.branch} · changed`:`${e.branch} · clean`}function _(e,a){const[o,n]=l.useState(()=>Date.now());return l.useEffect(()=>{if(e===null||!a)return;const i=()=>n(Date.now());i();const d=setInterval(i,U);return()=>clearInterval(d)},[e,a]),e===null?null:Math.max(0,o-e)}export{Ue as AccountBadge,De as AccountBadgeView,Ee as AccountItem,$e as AccountMenuRow,Ge as AccountPopover,Oe as AccountTrigger,se as AutoModeConfirmDialog,te as ConnectionItem,ne as ContextItem,ae as CwdItem,oe as GitStatusItem,re as MakeDefaultStopLine,ie as ModelConfigPopover,ce as PermissionModeItem,le as PlanModeItem,ue as ReadOnlyModeNotice,de as RuntimeItem,W as SessionInspector,xe as SessionPopover,D as SessionReadout,he as StatusLine,me as SubagentsItem,pe as UsageRevealPopover,Le as UsageStatusItem,Be as accountChipPromotion,ge as applyStatusBudget,qe as canOfferContinue,_e as chipToneFor,fe as evaluateExtensionStatusItems,Fe as formatCost,je as formatDiagnostics,be as gitPromotionState,I as hasRenderableUsage,Se as isGitStatusOk,ve as isUsageAbsorbed,g as partitionSubagents,ke as resolveStatusBudget,Ne as selectPromotedItems,ze as showsStaleMark,Ie as useExtensionStatusItems,Ce as useGitStatus,we as useMakeDefaultStop,ye as useReadOnlyModeHint,Qe as useResolvedSessionRuntime,He as useRuntimeChip,Ve as useSessionAccount,x as useSessionDiagnostics,Ze as useSessionPermissionPicker,Me as useSessionPopoverShortcut,Pe as useStatusBarPins,Re as useStatusBudget,Ae as useStatusUsage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{eN as Z,j as e,eO as Q,eP as J,eQ as E,eR as ee,eS as z,dz as se,eT as te,r as O,eU as A,eV as D,H as Y,aM as U,X as ne,eW as ae,eX as ie,eY as re,eZ as oe,B as C,f as de,e_ as le,e$ as ce,f0 as me,f1 as ue,f2 as xe,f3 as T,f4 as R,f5 as X,f6 as he,f7 as G,aw as ge,b9 as fe,f8 as pe,f9 as ve,fa as je,fb as Ne,fc as be,fd as we,di as ye,Z as I,e7 as Se,fe as M,ff as ke,fg as Ee,aa as _,ad as Ce,fh as $e,fi as Pe,cS as q,fj as Te,fk as Re,fl as _e,fm as Ae,fn as De,fo as Ie,fp as B,dg as Le,cT as S,fq as Oe,fr as F}from"./index-C63bLSO4.js";import{fs as os,ft as ds,fu as ls,fv as cs,fw as ms,fx as us}from"./index-C63bLSO4.js";import{C as ze}from"./card-CKZCX8ol.js";import{u as Me,a as Be}from"./use-panel-tab-placements-AFrWTQ0a.js";import{F as K}from"./file-text-9a0DChCq.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 Ve(s,r){return L(s)?He[s](r):null}function Ye(s){return`Restarting ${s}…`}function Ue({extensionId:s}){const r=Z("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(Ge,{tab:d,labelled:r.length>1},d.id))})}function Xe(){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 Ge({tab:s,labelled:r}){const d=Q(Me(),s.id),{setPlacement:l}=Be(),c=Xe(),a=J(d,s.declaredPlacement),g=a.show.pages.includes(E),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!==E).map(i=>({kind:j,id:i}))),n=(t,u)=>({...t,[u.kind]:t[u.kind].filter(j=>j!==u.id)}),f=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:[E]}:{...a.show,pages:a.show.pages.filter(u=>u!==E)}}),"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:[f.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(Ke,{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)})}),f.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 qe={agents:U,rooms:Y,pages:K};function H({place:s,name:r,removeLabel:d,onRemove:l}){const c=qe[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 Ke({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(C,{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(ce,{children:[e.jsx(me,{placeholder:"Find an agent, channel or page"}),e.jsxs(ue,{className:"max-h-64",children:[e.jsx(xe,{children:"Nothing matches."}),m.length>0&&e.jsx(T,{heading:"Agents",children:m.map(n=>e.jsxs(R,{value:`agent ${A(n)} ${n.id}`,onSelect:()=>g({kind:"agents",id:n.id}),children:[e.jsx(U,{className:"size-3.5"}),A(n)]},n.id))}),v.length>0&&e.jsx(T,{heading:"Channels and DMs",children:v.map(n=>e.jsxs(R,{value:`room ${D(n)} ${n.id}`,onSelect:()=>g({kind:"rooms",id:n.id}),children:[e.jsx(Y,{className:"size-3.5"}),D(n)]},n.id))}),o.length>0&&e.jsx(T,{heading:"Pages",children:o.map(n=>e.jsxs(R,{value:`page ${n.label}`,onSelect:()=>g({kind:"pages",id:n.key}),children:[e.jsx(K,{className:"size-3.5"}),n.label]},n.key))})]})]})})]})}const We=new Set(["disabled","discovered","incompatible","invalid"]),Ze="/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:f,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,p=!(N==="core"&&o.canDisable===!1),k=s.hasServerEntry||s.hasDataProxy,w=X(s),W=he(s.id,G(w)),$=h?"Not working":x?"Incompatible":b?"Can’t load":null;return e.jsx(ze,{"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(ge,{className:"text-status-warning-dot size-4 shrink-0","aria-hidden":"true"}),(x||b)&&!h&&e.jsx(fe,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),!h&&!x&&!b&&e.jsx(pe,{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(ve,{})]}),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(je,{path:s.devLink.path,className:"min-w-0"}),e.jsx("button",{type:"button",onClick:()=>void Ne(Ze),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(be,{gifts:we(s),"data-testid":`extension-agent-gifts-${s.id}`}),i&&e.jsx(Ue,{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(ye,{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})]}),f&&L(f.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:f.message||Ve(f.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&&!f&&e.jsx("p",{className:"text-muted-foreground text-sm",role:"status",children:Ye(o.name)}),f&&!L(f.code)&&e.jsxs("p",{className:"text-status-warning-fg text-sm",children:["Couldn’t rebuild its server part: ",f.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(Se,{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:ke(k,(w==null?void 0:w.runtime)==="subprocess")}),e.jsx("p",{className:"text-muted-foreground text-sm",children:Ee}),e.jsx(C,{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(_,{variant:"outline",children:v}),$&&e.jsx(_,{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:p?e.jsx(Ce,{checked:i,onCheckedChange:P=>r(s.id,P),disabled:!y||d,"aria-label":`${i?"Disable":"Enable"} ${o.name}`}):e.jsx(_,{variant:"secondary",title:"This extension is always on","data-testid":`extension-required-${s.id}`,children:"Required"})})]})})}function V(s){const r=new Date(s);return Number.isNaN(r.getTime())?"":r.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function Je(){const{data:s=[]}=$e(),{stop:r,pendingSource:d}=Pe();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(q,{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}),V(c)&&e.jsxs("p",{className:"text-muted-foreground text-xs",children:["Trusted ",V(c)]})]}),e.jsx(C,{type:"button",variant:"outline",size:"sm",disabled:d===l,onClick:()=>r(l),children:"Stop trusting"})]},l))})]})}function as(){const{data:s=[],isLoading:r}=Te(),{section:d}=Re();_e(r?null:d);const l=Ae(),c=De(),a=Ie(),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(p=>p.id===i);if(!h)return;const y=x?G(X(h)):void 0;b.mutate({id:i,version:h.manifest.version,plugin:h.sourcePlugin??null,...y?{permissions:y}:{}},{onSuccess:p=>{x&&F.getState().forget(i);const k=p.extension.manifest.name,w=p.extension.isolation?"":" inside DorkOS";S.success(x?`${k} can now run${w}`:`${k} stopped running`)},onError:p=>{if(p instanceof Oe&&p.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:p.message})}})}async function f(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:f,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(q,{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(Je,{}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(C,{variant:"outline",size:"sm",onClick:N,disabled:a.isPending,"data-testid":"reload-extensions-button",children:[e.jsx(Le,{className:I("mr-2 size-4",a.isPending&&"animate-spin")}),"Reload extensions"]})})]})}export{os as ExtensionEventBridge,ds as ExtensionLoader,ls as ExtensionProvider,as as ExtensionsSettingsTab,cs as createExtensionAPI,ms as createExtensionEventBridge,us as useExtensions};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{df as C,dM as I,r as i,j as u,bo as M,a3 as P,Z as b,gw as A,gx as N,gy as O,aQ as S,ae as w,aj as x,gz as p,gA as v,gB as D}from"./index-C63bLSO4.js";import{u as _}from"./use-is-below-desktop-5LlietdR.js";const G=.16,K=`[&_button]:${A}`;function Q({candidates:t,ready:e,name:o="sidebar-bottom-slot",className:s}){const r=C(),a=I(),n=e?t.find(R=>R.show):void 0,[c,y]=i.useState(void 0),d=i.useRef(!1);i.useEffect(()=>{!e||d.current||(d.current=!0,y((n==null?void 0:n.id)??null))},[e,n]);const T=c!==void 0&&(n==null?void 0:n.id)!==c&&!r;return u.jsx("div",{"data-slot":o,className:b("shrink-0 px-2 pb-2 empty:p-0",a&&K,s),children:u.jsx(M,{initial:!1,children:n!==void 0&&u.jsx(P.div,{initial:T?{height:0,opacity:0}:!1,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:r?0:G,ease:[0,0,.2,1]},className:"overflow-hidden",children:n.render()},n.id)})})}const U={knock:"/knock.wav",settle:"/settle.wav","turn-end":"/notification.wav"},m=new Map;function j(t){try{let e=m.get(t);e||(e=new Audio(U[t]),m.set(t,e)),e.currentTime=0,e.play().catch(()=>{})}catch{}}function q(){const t=S(s=>s.loadRightPanelState),e=_(),o=i.useRef(!e);i.useEffect(()=>{t({restoreOpen:o.current})},[t])}const h=Symbol("right-panel-layout-key-pending");function Y(){const[t]=N(),{data:e,isPending:o}=O(t),s=S(c=>c.loadRightPanelForAgent),r=_(),a=i.useRef(r);i.useEffect(()=>{a.current=r},[r]);let n;t?o?n=h:n=(e==null?void 0:e.id)??t:n=null,i.useEffect(()=>{n!==h&&s(n,t,{inherit:!a.current})},[n,t,s]),i.useEffect(()=>()=>s(null),[s])}function z(t,e,o){const s=w();return x({queryKey:["commands",{cwd:t??null,sessionId:e??null,runtime:o??null}],queryFn:()=>s.getCommands(!1,t??void 0,{sessionId:e,runtime:o}),staleTime:p.COMMANDS_STALE_TIME_MS,gcTime:p.COMMANDS_GC_TIME_MS})}const L={knock:"knock",settle:"allClear","turn-end":"turnEnd"};function Z(){const{prefs:t}=v(),{sounds:e}=t;return{play:i.useCallback(s=>{e[L[s]]&&j(s)},[e])}}const J=3e4;let l=!1;const f=new Set;function V(){if(!l){l=!0;for(const t of f)t()}}function B(t){return f.add(t),()=>{f.delete(t)}}function F(){return l}function X(){return i.useSyncExternalStore(B,F,()=>!1)}const k="dork-kickoff",E=`<${k}>`,g=`</${k}>`;function tt(t){return`${E}
|
|
2
|
-
${t.trim()}
|
|
3
|
-
${g}`}function $(t){const e=D(t);return e.startsWith(E)&&e.endsWith(g)}function et(t){const e=t.findIndex(o=>o.role==="user");return e===-1||!$(t[e].content)?t:t.filter((o,s)=>s!==e)}export{Q as B,J as L,V as a,Z as b,z as c,Y as d,q as e,et as f,X as u,tt as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a1 as e,a2 as n}from"./index-C63bLSO4.js";function s(t,o){return n(o,t)}function u(t,o){return{traits:o,soulContent:s(o,e(t.soulContent??""))}}export{u as p,s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ae as a,af as r,ag as o,ah as s}from"./index-C63bLSO4.js";function i(){const e=a(),t=r();return o({mutationFn:n=>e.deleteBinding(n),onSuccess:()=>{t.invalidateQueries({queryKey:[...s]})},meta:{errorLabel:"Couldn’t remove that connection"}})}export{i as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ai as s,r as n}from"./index-C63bLSO4.js";const u="internal";function i(e=!0){const t=s(e),r=n.useMemo(()=>{var a;return((a=t.data)==null?void 0:a.filter(o=>o.manifest.category!==u))??[]},[t.data]);return{...t,data:r}}export{i as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ae as r,as as a}from"./index-C63bLSO4.js";const s=["activity"];function o(t={}){const i=r();return a({queryKey:[...s,t],queryFn:({pageParam:e})=>i.listActivityEvents({...t,limit:50,before:e}),initialPageParam:void 0,getNextPageParam:e=>e.nextCursor??void 0,staleTime:3e4,refetchOnWindowFocus:!0})}export{s as A,o as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{at as e}from"./index-C63bLSO4.js";const t=1024;function s(){return e(`(max-width: ${t-1}px)`)}export{s as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ae as t,aj as s}from"./index-C63bLSO4.js";const u=["mesh","topology"];function a(e,o=!0){const r=t();return s({queryKey:[...u,e],queryFn:()=>r.getMeshTopology(e),enabled:o,staleTime:3e4,refetchInterval:3e4})}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{am as n}from"./index-C63bLSO4.js";function r(s){const e=n();return s||e}export{r as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as u,gC as Oe,bg as Le,be as H,d3 as Fe,j as t,bd as F,bk as He,bf as U,gD as Ke,bj as ye,gE as Ge,bl as q,bm as ze,gF as Ue,gG as Ye,Z as P,ao as we,gH as ve,df as We,gI as Xe,bo as pe,a3 as re,gJ as qe,cU as xe,gK as Je}from"./index-C63bLSO4.js";import{g as Ze}from"./dorkbot-templates-8Yu9POWJ.js";import{p as G}from"./sound-D3r8dGFH.js";import{p as Qe}from"./soul-file-NcuTUIiB.js";var et=Object.defineProperty,h=(r,e)=>et(r,"name",{value:e,configurable:!0}),je=["PageUp","PageDown"],ke=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ce={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Y="Slider",[oe,tt,rt]=Oe(Y),[ae,Ot]=Le(Y,[rt]),[nt,W]=ae(Y),st=u.forwardRef(h(function(e,s){const{name:a,min:i=0,max:n=100,step:d=1,orientation:l="horizontal",disabled:p=!1,minStepsBetweenThumbs:c=0,defaultValue:o=[i],value:x,onValueChange:f=h(()=>{},"onValueChange"),onValueCommit:g=h(()=>{},"onValueCommit"),inverted:j=!1,form:v,...S}=e,R=u.useRef(new Set),C=u.useRef(0),T=u.useRef(!1),_=l==="horizontal"?ot:it,[k,O]=u.useState(null),b=H(s,O),[m=[],w]=Fe({prop:x,defaultProp:o,onChange:h(y=>{var B;(B=[...R.current][C.current])==null||B.focus({preventScroll:!0,focusVisible:T.current}),T.current=!1,f(y)},"onChange")}),$=u.useRef(m),X=u.useRef(m);u.useEffect(()=>{const y=v?k==null?void 0:k.ownerDocument.getElementById(v):k==null?void 0:k.closest("form");if(y instanceof HTMLFormElement){const N=h(()=>w(X.current),"reset");return y.addEventListener("reset",N),()=>y.removeEventListener("reset",N)}},[k,v,w]);function I(y){const N=_e(m,y);E(y,N)}h(I,"handleSlideStart");function D(y){E(y,C.current)}h(D,"handleSlideMove");function M(){String(m)!==String($.current)&&g(m)}h(M,"handleSlideEnd");function E(y,N,{commit:B}={commit:!1}){const fe=ce(d),te=z(Math.round((y-i)/d)*d+i,fe),K=ye(te,[i,n]);w((L=[])=>{const V=Te(L,K,N);if(Be(V,c*d)){C.current=V.indexOf(K);const me=String(V)!==String(L);return me&&B&&g(V),me?V:L}else return L})}return h(E,"updateValues"),t.jsx(nt,{scope:e.__scopeSlider,name:a,disabled:p,min:i,max:n,valueIndexToChangeRef:C,thumbs:R.current,values:m,orientation:l,form:v,children:t.jsx(oe.Provider,{scope:e.__scopeSlider,children:t.jsx(oe.Slot,{scope:e.__scopeSlider,children:t.jsx(_,{"aria-disabled":p,"data-disabled":p?"":void 0,...S,ref:b,onPointerDown:F(S.onPointerDown,()=>{p||($.current=m,T.current=!1)}),min:i,max:n,inverted:j,onSlideStart:p?void 0:I,onSlideMove:p?void 0:D,onSlideEnd:p?void 0:M,onHomeKeyDown:()=>{p||(T.current=!0,E(i,0,{commit:!0}))},onEndKeyDown:()=>{p||(T.current=!0,E(n,m.length-1,{commit:!0}))},onStepKeyDown:({event:y,direction:N})=>{if(!p){T.current=!0;const te=je.includes(y.key)||y.shiftKey&&ke.includes(y.key)?10:1,K=C.current,L=m[K],V=Ie(L,{min:i,step:d,direction:N,multiplier:te});E(V,K,{commit:!0})}}})})})})},"Slider")),[Re,Me]=ae(Y,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ot=u.forwardRef(h(function(e,s){const{min:a,max:i,dir:n,inverted:d,onSlideStart:l,onSlideMove:p,onSlideEnd:c,onStepKeyDown:o,...x}=e,[f,g]=u.useState(null),j=H(s,g),v=u.useRef(void 0),S=He(n),R=S==="ltr",C=R&&!d||!R&&d;function T(A){const _=v.current||f.getBoundingClientRect(),k=[0,_.width],b=ee(k,C?[a,i]:[i,a]);return v.current=_,b(A-_.left)}return h(T,"getValueFromPointer"),t.jsx(Re,{scope:e.__scopeSlider,startEdge:C?"left":"right",endEdge:C?"right":"left",direction:C?1:-1,size:"width",children:t.jsx(Ee,{dir:S,"data-orientation":"horizontal",...x,ref:j,style:{...x.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:A=>{const _=T(A.clientX);l==null||l(_)},onSlideMove:A=>{const _=T(A.clientX);p==null||p(_)},onSlideEnd:()=>{v.current=void 0,c==null||c()},onStepKeyDown:A=>{const k=Ce[C?"from-left":"from-right"].includes(A.key);o==null||o({event:A,direction:k?-1:1})}})})},"SliderHorizontal")),it=u.forwardRef(h(function(e,s){const{min:a,max:i,inverted:n,onSlideStart:d,onSlideMove:l,onSlideEnd:p,onStepKeyDown:c,...o}=e,x=u.useRef(null),f=H(s,x),g=u.useRef(void 0),j=!n;function v(S){const R=g.current||x.current.getBoundingClientRect(),C=[0,R.height],A=ee(C,j?[i,a]:[a,i]);return g.current=R,A(S-R.top)}return h(v,"getValueFromPointer"),t.jsx(Re,{scope:e.__scopeSlider,startEdge:j?"bottom":"top",endEdge:j?"top":"bottom",size:"height",direction:j?1:-1,children:t.jsx(Ee,{"data-orientation":"vertical",...o,ref:f,style:{...o.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:S=>{const R=v(S.clientY);d==null||d(R)},onSlideMove:S=>{const R=v(S.clientY);l==null||l(R)},onSlideEnd:()=>{g.current=void 0,p==null||p()},onStepKeyDown:S=>{const C=Ce[j?"from-bottom":"from-top"].includes(S.key);c==null||c({event:S,direction:C?-1:1})}})})},"SliderVertical")),Ee=u.forwardRef(h(function(e,s){const{__scopeSlider:a,onSlideStart:i,onSlideMove:n,onSlideEnd:d,onHomeKeyDown:l,onEndKeyDown:p,onStepKeyDown:c,...o}=e,x=W(Y,a);return t.jsx(U.span,{...o,ref:s,onKeyDown:F(e.onKeyDown,f=>{f.key==="Home"?(l(f),f.preventDefault()):f.key==="End"?(p(f),f.preventDefault()):je.concat(ke).includes(f.key)&&(c(f),f.preventDefault())}),onPointerDown:F(e.onPointerDown,f=>{const g=f.target;g.setPointerCapture(f.pointerId),f.preventDefault(),x.thumbs.has(g)?g.focus({preventScroll:!0,focusVisible:!1}):i(f)}),onPointerMove:F(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&n(f)}),onPointerUp:F(e.onPointerUp,f=>{const g=f.target;g.hasPointerCapture(f.pointerId)&&(g.releasePointerCapture(f.pointerId),d(f))})})},"SliderImpl")),at="SliderTrack",lt=u.forwardRef(h(function(e,s){const{__scopeSlider:a,...i}=e,n=W(at,a);return t.jsx(U.span,{"data-disabled":n.disabled?"":void 0,"data-orientation":n.orientation,...i,ref:s})},"SliderTrack")),he="SliderRange",ct=u.forwardRef(h(function(e,s){const{__scopeSlider:a,...i}=e,n=W(he,a),d=Me(he,a),l=u.useRef(null),p=H(s,l),c=n.values.length,o=n.values.map(g=>le(g,n.min,n.max)),x=c>1?Math.min(...o):0,f=100-Math.max(...o);return t.jsx(U.span,{"data-orientation":n.orientation,"data-disabled":n.disabled?"":void 0,...i,ref:p,style:{...e.style,[d.startEdge]:x+"%",[d.endEdge]:f+"%"}})},"SliderRange")),dt="SliderThumb",[ut,Pe]=ae(dt),ft="SliderThumbProvider";function Ae(r){const{__scopeSlider:e,name:s,children:a,internal_do_not_use_render:i}=r,n=W(ft,e),d=tt(e),[l,p]=u.useState(null),c=u.useMemo(()=>l?d().findIndex(S=>S.ref.current===l):-1,[d,l]),o=Ge(l),x=l?!!n.form||!!l.closest("form"):!0,f=n.values[c],g=s??(n.name?n.name+(n.values.length>1?"[]":""):void 0),j=f===void 0?0:le(f,n.min,n.max);u.useEffect(()=>{if(l)return n.thumbs.add(l),()=>{n.thumbs.delete(l)}},[l,n.thumbs]);const v={value:f,name:g,form:n.form,isFormControl:x,index:c,thumb:l,onThumbChange:p,percent:j,size:o};return t.jsx(ut,{scope:e,...v,children:Ve(i)?i(v):a})}h(Ae,"SliderThumbProvider");var ne="SliderThumbTrigger",mt=u.forwardRef(h(function(e,s){const{__scopeSlider:a,...i}=e,n=W(ne,a),d=Me(ne,a),{index:l,value:p,percent:c,size:o,onThumbChange:x}=Pe(ne,a),f=H(s,x),g=Ne(l,n.values.length),j=o==null?void 0:o[d.size],v=j?De(j,c,d.direction):0;return t.jsx("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${c}% + ${v}px)`},children:t.jsx(oe.ItemSlot,{scope:a,children:t.jsx(U.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":n.min,"aria-valuenow":p,"aria-valuemax":n.max,"aria-orientation":n.orientation,"data-orientation":n.orientation,"data-disabled":n.disabled?"":void 0,tabIndex:n.disabled?void 0:0,...i,ref:f,style:p===void 0?{display:"none"}:e.style,onFocus:F(e.onFocus,()=>{n.valueIndexToChangeRef.current=l})})})})},"SliderThumbTrigger")),pt=u.forwardRef(h(function(e,s){const{__scopeSlider:a,name:i,...n}=e;return t.jsx(Ae,{__scopeSlider:a,name:i,internal_do_not_use_render:({index:d,isFormControl:l})=>t.jsxs(t.Fragment,{children:[t.jsx(mt,{...n,ref:s,__scopeSlider:a}),l?t.jsx(ht,{__scopeSlider:a},d):null]})})},"SliderThumb")),xt="SliderBubbleInput",ht=u.forwardRef(h(function({__scopeSlider:e,...s},a){const{value:i,name:n,form:d}=Pe(xt,e),l=u.useRef(null),p=H(l,a),c=Ke(i);return u.useEffect(()=>{const o=l.current;if(!o)return;const x=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(x,"value").set;if(c!==i&&g){const j=new Event("input",{bubbles:!0});g.call(o,i),o.dispatchEvent(j)}},[c,i]),t.jsx(U.input,{style:{display:"none"},name:n,form:d,...s,ref:p,defaultValue:i})},"SliderBubbleInput"));function Te(r=[],e,s){const a=[...r];return a[s]=e,a.sort((i,n)=>i-n)}h(Te,"getNextSortedValues");function le(r,e,s){const n=100/(s-e)*(r-e);return ye(n,[0,100])}h(le,"convertValueToPercentage");function Ne(r,e){return e>2?`Value ${r+1} of ${e}`:e===2?["Minimum","Maximum"][r]:void 0}h(Ne,"getLabel");function _e(r,e){if(r.length===1)return 0;const s=r.map(i=>Math.abs(i-e)),a=Math.min(...s);return s.indexOf(a)}h(_e,"getClosestValueIndex");function De(r,e,s){const a=r/2,n=ee([0,50],[0,a]);return(a-n(e)*s)*s}h(De,"getThumbInBoundsOffset");function $e(r){return r.slice(0,-1).map((e,s)=>r[s+1]-e)}h($e,"getStepsBetweenValues");function Be(r,e){if(e>0){const s=$e(r);return Math.min(...s)>=e}return!0}h(Be,"hasMinStepsBetweenValues");function ee(r,e){return s=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const a=(e[1]-e[0])/(r[1]-r[0]);return e[0]+a*(s-r[0])}}h(ee,"linearScale");function ce(r){if(!Number.isFinite(r))return 0;const e=r.toString();if(e.includes("e")){const[a,i]=e.split("e"),n=a.split(".")[1]||"",d=Number(i);return Math.max(0,n.length-d)}const s=e.split(".")[1];return s?s.length:0}h(ce,"getDecimalCount");function z(r,e){const s=Math.pow(10,e);return Math.round(r*s)/s}h(z,"roundValue");function Ie(r,{min:e,step:s,direction:a,multiplier:i}){const n=ce(s),d=(r-e)/s,l=Math.round(d),p=z(l*s+e,n)===z(r,n);let c;return p?c=l+i*a:a>0?c=Math.ceil(d):c=Math.floor(d),z(c*s+e,n)}h(Ie,"getNextStepValue");function Ve(r){return typeof r=="function"}h(Ve,"isFunction");function gt({className:r,defaultValue:e,value:s,min:a=0,max:i=100,...n}){const d=u.useMemo(()=>Array.isArray(s)?s:Array.isArray(e)?e:[a,i],[s,e,a,i]);return t.jsxs(st,{"data-slot":"slider",defaultValue:e,value:s,min:a,max:i,className:q("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",r),...n,children:[t.jsx(lt,{"data-slot":"slider-track",className:q("bg-dui-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:t.jsx(ct,{"data-slot":"slider-range",className:q("bg-dui-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:d.length},(l,p)=>t.jsx(pt,{"data-slot":"slider-thumb",className:q("border-dui-primary hover:ring-dui-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 motion-reduce:transition-none!",ze)},p))]})}const ge={light:{heroGlow:"28",heroGlowOuter:"14",pillBgStart:"20",pillBgEnd:"14",pillBorder:"50",pillGlow:"30"},dark:{heroGlow:"18",heroGlowOuter:"08",pillBgStart:"12",pillBgEnd:"08",pillBorder:"40",pillGlow:"33"}};function bt(){return document.documentElement.classList.contains("dark")}function St(){return!1}function yt(r){const e=new MutationObserver(s=>{for(const a of s)if(a.attributeName==="class"){r();return}});return e.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>e.disconnect()}function de(){return u.useSyncExternalStore(yt,bt,St)}function wt(){return de()?ge.dark:ge.light}function vt({traits:r,onChange:e,onSliderChange:s}){const a=u.useCallback((i,n)=>{s==null||s(i,n),e({...r,[i]:n})},[r,e,s]);return t.jsx("div",{className:"space-y-4",children:Ue.map(i=>t.jsx(jt,{name:i,level:r[i]??3,onChange:a},i))})}function jt({name:r,level:e,onChange:s}){const a=Ye[r][e];return t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between text-sm",children:[t.jsx("span",{className:"font-medium capitalize",children:r}),t.jsxs("span",{className:"text-muted-foreground",children:[e,"/5 ",a.label]})]}),t.jsx(gt,{value:[e],onValueChange:([i])=>s(r,i),min:1,max:5,step:1,"aria-label":`${r} trait level`})]})}const kt=we("inline-flex shrink-0 items-center gap-1.5 rounded-full border font-medium transition-[color,background-color,border-color,box-shadow]",{variants:{size:{sm:"text-2xs px-2.5 py-1",md:"px-3 py-1 text-xs"},state:{rest:"bg-accent text-muted-foreground hover:text-foreground border-transparent",active:"text-foreground",glowing:"text-foreground"}},defaultVariants:{size:"md",state:"rest"}}),Ct=we("",{variants:{gradient:{true:"bg-clip-text text-transparent",false:""}},defaultVariants:{gradient:!1}});function Rt({emoji:r,name:e,colors:s,size:a="md",state:i="rest",gradientText:n=!1,className:d,style:l,...p}){const c=de(),o=wt(),x=i==="active"||i==="glowing";return t.jsxs("button",{type:"button",className:P(kt({size:a,state:i}),d),style:{...x?{borderColor:c?s.stroke+o.pillBorder:s.stroke+"AA",background:`linear-gradient(135deg, ${s.nebula}${o.pillBgStart}, ${s.wisp}${o.pillBgEnd})`,...i==="glowing"?{boxShadow:`0 0 12px ${s.nebula}${o.pillGlow}`}:{}}:{},...l},...p,children:[t.jsx("span",{children:r}),t.jsx("span",{className:Ct({gradient:n}),style:n?{backgroundImage:`linear-gradient(135deg, ${s.stroke}, ${s.strokeEnd})`,...c?{}:{filter:"brightness(0.65) saturate(1.3)"}}:void 0,children:e})]})}const Mt=["Verbosity","Autonomy","Chaos","Creativity","Humor","Spice"],J=["verbosity","autonomy","chaos","creativity","humor","spice"],Q=6,ue=5,be=3,Et=800,Pt=600,Se={light:{nebulaCenter:.45,nebulaMid:.25,wispStart:.2,fillStart:.25,fillEnd:.15,haloBase:.25,haloAmplitude:.12,breatheMin:.25,breatheMax:.4,guideBase:.1,guideStep:.04,axis:.12,stardustPeak:1,glowBlur:12,vertexBlur:4},dark:{nebulaCenter:.35,nebulaMid:.15,wispStart:.12,fillStart:.35,fillEnd:.25,haloBase:.15,haloAmplitude:.1,breatheMin:.15,breatheMax:.25,guideBase:.06,guideStep:.02,axis:.08,stardustPeak:.8,glowBlur:10,vertexBlur:4}},At=[{r:1.2,dur:"9s",fade:"4.5s",begin:"0s",path:"M0,0 C30,-40 60,0 40,40 C20,60 -20,40 -30,10 C-40,-20 -10,-50 0,0"},{r:.9,dur:"7s",fade:"3.5s",begin:"0s",path:"M0,0 C-20,30 -40,20 -30,-10 C-20,-30 10,-40 20,-20 C30,0 20,30 0,0"},{r:1,dur:"11s",fade:"5s",begin:"0s",path:"M0,0 C40,10 30,50 0,40 C-30,30 -40,-10 -20,-30 C0,-50 30,-20 0,0"},{r:.7,dur:"8s",fade:"4s",begin:"2s",path:"M0,0 C15,-35 45,-15 35,20 C25,45 -15,40 -25,15 C-35,-10 -5,-40 0,0"},{r:1.1,dur:"12s",fade:"6s",begin:"1s",path:"M0,0 C-25,25 -45,5 -30,-20 C-15,-45 20,-35 30,-10 C40,15 15,35 0,0"}];function Z(r,e,s,a){const i=Math.PI*2*r/Q-Math.PI/2,n=e/ue*a;return{x:s+n*Math.cos(i),y:s+n*Math.sin(i)}}function ie(r){return r.map(e=>`${e.x},${e.y}`).join(" ")}function Tt(r,e,s){return ie(Array.from({length:Q},(a,i)=>Z(i,r*ue,e,s)))}function Nt(r){return r<.5?4*r*r*r:1-(-2*r+2)**3/2}function _t({traits:r,colors:e=ve,size:s=180,animated:a=!0,className:i}){const n=u.useId().replace(/:/g,""),d=de(),l=d?Se.dark:Se.light,p=u.useRef(l);p.current=l;const c=d?{strokeStart:e.stroke,strokeEnd:e.strokeEnd,fillStart:e.fill,fillEnd:e.fillEnd,dot:e.dot,glow:e.glow}:{strokeStart:e.fill,strokeEnd:e.fillEnd,fillStart:e.stroke,fillEnd:e.strokeEnd,dot:e.fill,glow:e.stroke},o=s/2,x=s*.32,f=x+16,g=s/200,j=u.useRef(null),v=u.useRef(null),S=u.useRef([]),R=u.useRef([]),C=u.useRef({current:{...r},from:null,target:{...r},morphStart:0,breathe:0}),T=u.useRef(r);u.useEffect(()=>{const b=T.current;if(J.some(w=>b[w]!==r[w])){const w=C.current;if(a){w.from={...w.current},w.target={...r},w.morphStart=performance.now();const $=v.current;if($){const X=performance.now();(function I(){const D=Math.min((performance.now()-X)/Pt,1),M=1-(1-D)*(1-D);$.setAttribute("r",String(x*(.7+.6*M))),$.setAttribute("opacity",String(.4*(1-M))),D<1&&requestAnimationFrame(I)})()}}else Object.assign(w.current,r),Object.assign(w.target,r)}T.current=r},[r,a,x]),u.useEffect(()=>{if(!a)return;let b;const m=C.current;function w(){var D;m.breathe+=.015;const $=1+Math.sin(m.breathe)*.04;if(m.from){const M=Math.min((performance.now()-m.morphStart)/Et,1),E=Nt(M);for(const y of J)m.current[y]=m.from[y]+(m.target[y]-m.from[y])*E;M>=1&&(m.from=null,Object.assign(m.current,m.target))}const I=J.map(M=>m.current[M]).map((M,E)=>Z(E,M*$,o,x));(D=j.current)==null||D.setAttribute("points",ie(I)),I.forEach((M,E)=>{const y=S.current[E],N=R.current[E];if(y){y.setAttribute("cx",String(M.x)),y.setAttribute("cy",String(M.y)),y.setAttribute("r",String(8+Math.sin(m.breathe+E*1.2)*3));const B=p.current;y.setAttribute("opacity",String(B.haloBase+Math.sin(m.breathe+E)*B.haloAmplitude))}N&&(N.setAttribute("cx",String(M.x)),N.setAttribute("cy",String(M.y)),N.setAttribute("r",String(3.5+Math.sin(m.breathe+E*.8)*.8)))}),b=requestAnimationFrame(w)}return b=requestAnimationFrame(w),()=>cancelAnimationFrame(b)},[a,o,x]);const A=J.map((b,m)=>Z(m,r[b],o,x)),_=ie(A),k={transition:"stop-color 0.6s ease"},O={transition:"fill 0.6s ease"};return t.jsxs("svg",{viewBox:`0 0 ${s} ${s}`,className:P("aspect-square",i),"aria-label":"Personality radar chart",role:"img",children:[t.jsxs("defs",{children:[d?t.jsxs("filter",{id:`ng-${n}`,x:"-80%",y:"-80%",width:"260%",height:"260%",children:[t.jsx("feGaussianBlur",{stdDeviation:l.glowBlur,result:"blur"}),t.jsxs("feMerge",{children:[t.jsx("feMergeNode",{in:"blur"}),t.jsx("feMergeNode",{in:"blur"}),t.jsx("feMergeNode",{in:"SourceGraphic"})]})]}):t.jsx("filter",{id:`ng-${n}`,x:"-50%",y:"-30%",width:"200%",height:"200%",children:t.jsx("feDropShadow",{dx:"0",dy:"2",stdDeviation:"6",floodColor:c.strokeStart,floodOpacity:"0.18"})}),t.jsxs("filter",{id:`vg-${n}`,x:"-100%",y:"-100%",width:"300%",height:"300%",children:[t.jsx("feGaussianBlur",{stdDeviation:l.vertexBlur,result:"blur"}),t.jsxs("feMerge",{children:[t.jsx("feMergeNode",{in:"blur"}),t.jsx("feMergeNode",{in:"SourceGraphic"})]})]}),t.jsxs("radialGradient",{id:`nc-${n}`,cx:"50%",cy:"50%",r:"50%",children:[t.jsx("stop",{offset:"0%",style:{stopColor:e.nebula,stopOpacity:l.nebulaCenter,...k}}),t.jsx("stop",{offset:"50%",style:{stopColor:e.nebula,stopOpacity:l.nebulaMid,...k}}),t.jsx("stop",{offset:"100%",style:{stopColor:"var(--nebula-edge)"},stopOpacity:0})]}),t.jsxs("radialGradient",{id:`nw-${n}`,cx:"35%",cy:"35%",r:"60%",children:[t.jsx("stop",{offset:"0%",style:{stopColor:e.wisp,stopOpacity:l.wispStart,...k}}),t.jsx("stop",{offset:"100%",style:{stopColor:"var(--nebula-edge)"},stopOpacity:0})]}),t.jsxs("linearGradient",{id:`sf-${n}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[t.jsx("stop",{offset:"0%",style:{stopColor:c.fillStart,stopOpacity:l.fillStart,...k}}),t.jsx("stop",{offset:"100%",style:{stopColor:c.fillEnd,stopOpacity:l.fillEnd,...k}})]}),t.jsxs("linearGradient",{id:`ss-${n}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[t.jsx("stop",{offset:"0%",style:{stopColor:c.strokeStart,...k}}),t.jsx("stop",{offset:"100%",style:{stopColor:c.strokeEnd,...k}})]})]}),t.jsx("circle",{cx:o,cy:o,r:s*.44,fill:`url(#nc-${n})`,children:a&&t.jsx("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${o} ${o};360 ${o} ${o}`,dur:"90s",repeatCount:"indefinite"})}),t.jsx("ellipse",{cx:o*.94,cy:o*.97,rx:s*.35,ry:s*.25,fill:`url(#nw-${n})`,children:a&&t.jsx("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${o} ${o};-360 ${o} ${o}`,dur:"60s",repeatCount:"indefinite"})}),a&&t.jsxs("circle",{cx:o,cy:o,r:x*.92,fill:"none",style:{stroke:c.strokeStart,transition:"stroke 0.6s ease"},strokeWidth:.3,opacity:l.breatheMin,children:[t.jsx("animate",{attributeName:"r",values:`${x*.85};${x*1.08};${x*.85}`,dur:"4s",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.4 0 0.6 1;0.4 0 0.6 1"}),t.jsx("animate",{attributeName:"opacity",values:`${l.breatheMin};${l.breatheMax};${l.breatheMin}`,dur:"4s",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.4 0 0.6 1;0.4 0 0.6 1"})]}),a&&t.jsx("g",{transform:`translate(${o},${o}) scale(${g})`,children:At.map((b,m)=>t.jsxs("circle",{r:b.r,style:{fill:c.dot,...O},children:[t.jsx("animateMotion",{dur:b.dur,repeatCount:"indefinite",begin:b.begin,path:b.path}),t.jsx("animate",{attributeName:"opacity",values:`0;${l.stardustPeak};0`,dur:b.fade,repeatCount:"indefinite",begin:b.begin})]},`star-${m}`))}),t.jsx("circle",{ref:v,cx:o,cy:o,r:0,fill:e.nebula,opacity:0}),Array.from({length:be},(b,m)=>t.jsx("polygon",{points:Tt((m+1)/be,o,x),fill:"none",stroke:d?"currentColor":c.strokeStart,strokeWidth:.5,opacity:l.guideBase+m*l.guideStep},`ring-${m}`)),Array.from({length:Q},(b,m)=>{const w=Z(m,ue,o,x);return t.jsx("line",{x1:o,y1:o,x2:w.x,y2:w.y,stroke:d?"currentColor":c.strokeStart,strokeWidth:.5,opacity:l.axis},`axis-${m}`)}),t.jsx("polygon",{ref:j,points:_,fill:`url(#sf-${n})`,stroke:`url(#ss-${n})`,strokeWidth:2,strokeLinejoin:"round",filter:`url(#ng-${n})`}),A.map((b,m)=>t.jsx("circle",{ref:w=>{S.current[m]=w},cx:b.x,cy:b.y,r:8,style:{fill:c.glow,...O},opacity:l.haloBase},`halo-${m}`)),A.map((b,m)=>t.jsx("circle",{ref:w=>{R.current[m]=w},cx:b.x,cy:b.y,r:d?4:4.5,style:{fill:c.dot,...O},stroke:d?"none":"white",strokeWidth:d?0:1.5,filter:`url(#vg-${n})`},`dot-${m}`)),Mt.map((b,m)=>{const w=Math.PI*2*m/Q-Math.PI/2;return t.jsx("text",{x:o+f*Math.cos(w),y:o+f*Math.sin(w),textAnchor:"middle",dominantBaseline:"middle",fill:"currentColor",opacity:.5,fontSize:8,className:"select-none",children:b},b)})]})}const se={duration:.2,ease:"easeInOut"};function Lt({traits:r,onTraitsChange:e,compact:s=!1,layout:a="inline",sampleLabel:i="How this agent talks",className:n}){const[d,l]=u.useState("presets"),p=We()??!1,c=a==="stacked",o=Xe(r),x=(o==null?void 0:o.colors)??ve,f=c?Ze(r,o==null?void 0:o.id):"",g=u.useCallback(S=>{e(S.traits),l("presets"),G()},[e]),j=u.useCallback(()=>{l("custom"),G()},[]),v=u.useCallback(()=>{l("presets"),G()},[]);return t.jsxs("div",{className:P("@container/picker w-full",n),children:[t.jsxs("div",{className:P("flex flex-col items-center gap-3",!c&&"@[480px]/picker:flex-row @[480px]/picker:items-center @[480px]/picker:gap-6",c&&"gap-4"),children:[t.jsxs("div",{className:P("flex flex-col items-center gap-1",!c&&"@[480px]/picker:w-[200px] @[480px]/picker:shrink-0",c&&"gap-1.5"),children:[t.jsx("div",{"data-testid":"personality-radar",children:t.jsx(_t,{traits:r,colors:x,size:c?240:s?180:200,className:P(c&&"w-full max-w-[240px]",!c&&(s?"w-[90%] max-w-[240px]":"w-full max-w-[200px]"))})}),t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:P("bg-clip-text font-bold text-transparent",c?"text-base":"text-sm"),style:{backgroundImage:`linear-gradient(135deg, ${x.stroke}, ${x.strokeEnd})`},children:(o==null?void 0:o.name)??"Custom"}),t.jsx("p",{className:P("text-muted-foreground mt-0.5",c?"text-xs":"text-2xs"),children:(o==null?void 0:o.tagline)??"A custom blend of personality traits."})]})]}),t.jsx("div",{className:P("flex w-full min-w-0 flex-col items-center gap-3",!c&&"@[480px]/picker:items-start"),children:t.jsx(pe,{mode:"wait",initial:!1,children:d==="presets"?t.jsxs(re.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:se,className:P("flex max-w-sm flex-wrap justify-center gap-1.5",!c&&"@[480px]/picker:justify-start"),"data-testid":"preset-pills",children:[qe.map(S=>t.jsx(Rt,{emoji:S.emoji,name:S.name,colors:S.colors,size:s?"sm":"md",state:(o==null?void 0:o.id)===S.id?"glowing":"rest",onClick:()=>g(S)},S.id)),t.jsxs("button",{type:"button",onClick:j,className:P("inline-flex shrink-0 items-center gap-1.5 rounded-full border border-dashed font-medium transition-[color,border-color]","text-muted-foreground hover:text-foreground hover:border-foreground/20 border-border",s?"text-2xs px-2.5 py-1":"px-3 py-1 text-xs"),"data-testid":"custom-toggle",children:[t.jsx(xe,{className:"size-3"}),t.jsx("span",{children:"Custom"})]})]},"presets"):t.jsxs(re.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:se,className:P("flex w-full flex-col items-center gap-3",!c&&"@[480px]/picker:items-start"),children:[t.jsxs("div",{className:"flex gap-1.5","data-testid":"custom-mode-pills",children:[t.jsxs("button",{type:"button",onClick:v,className:P("inline-flex shrink-0 items-center gap-1.5 rounded-full border border-dashed font-medium transition-[color,border-color]","text-muted-foreground hover:text-foreground hover:border-foreground/20 border-border",s?"text-2xs px-2.5 py-1":"px-3 py-1 text-xs"),"data-testid":"presets-toggle",children:[t.jsx("span",{children:"←"}),t.jsx("span",{children:"Presets"})]}),t.jsxs("span",{className:P("bg-accent text-foreground inline-flex shrink-0 items-center gap-1.5 rounded-full border font-medium","border-foreground/15",s?"text-2xs px-2.5 py-1":"px-3 py-1 text-xs"),children:[t.jsx(xe,{className:"size-3"}),t.jsx("span",{children:"Custom"})]})]}),t.jsx("div",{className:P("w-full",s?"max-w-sm":"max-w-md"),onPointerDown:()=>G(),children:t.jsx(vt,{traits:r,onChange:e,onSliderChange:()=>G()})})]},"custom")})})]}),t.jsxs("div",{className:P("w-full max-w-sm",c?"mt-4 flex flex-col items-center":"hidden"),children:[t.jsx("span",{className:"text-muted-foreground text-3xs self-start font-medium tracking-wider uppercase",children:i}),t.jsx("div",{className:"border-primary/40 bg-accent/40 mt-1 w-full rounded-md border-l-2 py-2 pr-3 pl-3",children:c?t.jsx(pe,{mode:"wait",initial:!1,children:t.jsxs(re.p,{"data-testid":"personality-sample",initial:p?!1:{opacity:0,y:4},animate:{opacity:1,y:0},exit:p?void 0:{opacity:0,y:-4},transition:se,className:"text-muted-foreground text-xs leading-relaxed italic",children:["“",f,"”"]},f)}):t.jsx("p",{className:"text-muted-foreground text-xs leading-relaxed italic",children:(o==null?void 0:o.sampleResponse)??"Custom blend. Pick a preset to see a sample reply."})})]})]})}const Dt=400;function Ft(r,e){const s=(r==null?void 0:r.traits)??Je,[a,i]=u.useState(null),n=u.useRef(null),d=u.useRef(null),l=u.useRef({agent:r,update:e});u.useEffect(()=>{l.current={agent:r,update:e}});const p=(r==null?void 0:r.id)??null;u.useEffect(()=>{n.current!==null&&(clearTimeout(n.current),n.current=null),d.current=null,i(null)},[p]);const c=u.useCallback(()=>{n.current!==null&&(clearTimeout(n.current),n.current=null);const x=d.current;if(d.current=null,x===null)return;const{agent:f,update:g}=l.current;f!==null&&g(Qe(f,x))},[]);u.useEffect(()=>()=>c(),[c]);const o=u.useCallback(x=>{i(x),d.current=x,n.current!==null&&clearTimeout(n.current),n.current=setTimeout(c,Dt)},[c]);return{traits:a??s,onTraitsChange:o}}export{Lt as P,Ft as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ae as a,aj as l,af as s,an as c,ag as r,ah as d}from"./index-C63bLSO4.js";const u=["relay","unclaimed-chats"];function m(e){return[...u,e]}function h(e="pending",t=!0){const n=a();return l({queryKey:m(e),queryFn:()=>n.listUnclaimedChats(e),enabled:t})}function y(){const e=s(),t=()=>{e.invalidateQueries({queryKey:[...u]})};c("relay_chat_unclaimed",t),c("relay_chat_unclaimed_burst",t)}function i(e){e.invalidateQueries({queryKey:[...u]})}function U(){const e=a(),t=s();return r({mutationFn:({id:n,input:o})=>e.claimUnclaimedChat(n,o),meta:{suppressErrorToast:!0},onSuccess:()=>{i(t),t.invalidateQueries({queryKey:[...d]})}})}function p(){const e=a(),t=s();return r({mutationFn:n=>e.ignoreUnclaimedChat(n),meta:{errorLabel:"Couldn’t ignore this chat"},onSuccess:()=>i(t)})}function v(){const e=a(),t=s();return r({mutationFn:n=>e.blockUnclaimedChat(n),meta:{errorLabel:"Couldn’t block this chat"},onSuccess:()=>i(t)})}function f(){const e=a(),t=s();return r({mutationFn:n=>e.leaveUnclaimedChat(n),meta:{errorLabel:"Couldn’t leave this chat"},onSuccess:()=>i(t)})}export{u as U,y as a,U as b,p as c,v as d,f as e,h as u};
|