dorkos 0.117.0 → 0.118.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.
Files changed (273) hide show
  1. package/dist/bin/cli.js +1266 -938
  2. package/dist/browser/native/package-manifest.json +1 -1
  3. package/dist/browser/source-manifest.json +1 -1
  4. package/dist/client/assets/{AboutPage-H-acF3Uh.js → AboutPage-BOS59p1y.js} +1 -1
  5. package/dist/client/assets/{ActivityErrorState-DHDeFsXG.js → ActivityErrorState-DOmV85tr.js} +1 -1
  6. package/dist/client/assets/{ActivityPage-xyMrmAY2.js → ActivityPage-DbsBpb6N.js} +1 -1
  7. package/dist/client/assets/ActivityRow-B1ZeL7Jb.js +1 -0
  8. package/dist/client/assets/AdapterIcon-XPLZ-NAi.js +1 -0
  9. package/dist/client/assets/AdapterSetupWizard-DfNJz5SD.js +2 -0
  10. package/dist/client/assets/{AgentOptionRow-BgPnj-jY.js → AgentOptionRow-C15RQsub.js} +1 -1
  11. package/dist/client/assets/{AgentPicker-3POlE_TY.js → AgentPicker-CydNJYi_.js} +1 -1
  12. package/dist/client/assets/{AgentRequestCard-CL5bwXYH.js → AgentRequestCard-BBSbluBs.js} +3 -3
  13. package/dist/client/assets/{AppearancePage-D3z40f_b.js → AppearancePage-8ALtWGZZ.js} +1 -1
  14. package/dist/client/assets/{ApplyToOverridesDialog-GafmL5mr.js → ApplyToOverridesDialog-Cv3KEf7T.js} +1 -1
  15. package/dist/client/assets/{AttentionSignalRow-4ZSIhmin.js → AttentionSignalRow-c-u1cE1l.js} +1 -1
  16. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-CD8bGnb5.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-Re2CfOlC.js} +3 -3
  17. package/dist/client/assets/BindingDialog-8xnsM47D.js +1 -0
  18. package/dist/client/assets/{BlintzCanvas-B-PoJThg.js → BlintzCanvas-DUDSNxlM.js} +1 -1
  19. package/dist/client/assets/{CanvasCsvContent-CgiQWBJA.js → CanvasCsvContent-D697P3sa.js} +6 -6
  20. package/dist/client/assets/CanvasFileContent-BJ39nHuR.js +2 -0
  21. package/dist/client/assets/{CanvasModel3dContent-BXCQRGHN.js → CanvasModel3dContent-TaunlbT2.js} +2 -2
  22. package/dist/client/assets/{ChatAppsOff-C60EWHju.js → ChatAppsOff-CFEmPGm1.js} +1 -1
  23. package/dist/client/assets/{CodeMirrorDiff-B5dKqE-I.js → CodeMirrorDiff-B7VUevZG.js} +1 -1
  24. package/dist/client/assets/{CodeMirrorEditor-BzB4Bznz.js → CodeMirrorEditor-BX1bJlnT.js} +1 -1
  25. package/dist/client/assets/CommitmentList-CDocwl5K.js +1 -0
  26. package/dist/client/assets/{CommitmentsPage-ChzV2lIP.js → CommitmentsPage-Cr_MvU96.js} +1 -1
  27. package/dist/client/assets/{ComputerResourceView-mF8l9rkm.js → ComputerResourceView-CJMUZPDy.js} +1 -1
  28. package/dist/client/assets/{ComputerViewer-CKR_ZSO1.js → ComputerViewer-BA-9lBBN.js} +1 -1
  29. package/dist/client/assets/ConnectionAccessLists-BLLpxhn3.js +1 -0
  30. package/dist/client/assets/{ConnectionsPage-6PEoOCSe.js → ConnectionsPage-BWVfAPd1.js} +2 -2
  31. package/dist/client/assets/ConventionPage-EK3WUWVa.js +11 -0
  32. package/dist/client/assets/{ExtensionPageRoute-Bv2i-Pqm.js → ExtensionPageRoute-C9hsJNX2.js} +2 -2
  33. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-C5S-Mncm.js → FloatingTanStackRouterDevtools-CqogiFob-BeyAgBfh.js} +1 -1
  34. package/dist/client/assets/HandlePage-CfeEzfDk.js +1 -0
  35. package/dist/client/assets/HeartbeatPage-DfbNenFv.js +1 -0
  36. package/dist/client/assets/{KeyEntry-IgIIE1HE.js → KeyEntry-CEbe5Xvn.js} +2 -2
  37. package/dist/client/assets/{LexicalField-B3neANKd.js → LexicalField-DC_6Z-Ye.js} +1 -1
  38. package/dist/client/assets/{ManagesPage-gDDvLXjS.js → ManagesPage-CYnGvNM2.js} +1 -1
  39. package/dist/client/assets/{Marketplace-DAe-slPr.js → Marketplace-CWiiq8of.js} +1 -1
  40. package/dist/client/assets/{MarketplaceSourcesView-jhoKlyGb.js → MarketplaceSourcesView-DF3cHMR0.js} +1 -1
  41. package/dist/client/assets/{McpAppFrame-BQxyYB23.js → McpAppFrame-D5Muf5Sf.js} +2 -2
  42. package/dist/client/assets/{McpSigninBody-DNB9IVJs.js → McpSigninBody-CLZFoQgC.js} +1 -1
  43. package/dist/client/assets/{Model3dViewer-CZYCij-x.js → Model3dViewer-C9ODHy5I.js} +1 -1
  44. package/dist/client/assets/NamePage-B4YrH-ug.js +1 -0
  45. package/dist/client/assets/NewDirectMessageMenu-Co9Uv5t5.js +1 -0
  46. package/dist/client/assets/{NotificationsPage-BZIME3p9.js → NotificationsPage-ldulSpVu.js} +1 -1
  47. package/dist/client/assets/{OpenMeshSwitch-C1E_5NM2.js → OpenMeshSwitch-BfEvR7s7.js} +2 -2
  48. package/dist/client/assets/{OperatorIdentityForm-BV0aT5IX.js → OperatorIdentityForm-ZM_zDnjM.js} +1 -1
  49. package/dist/client/assets/{PermissionHistory-Btciwm3c.js → PermissionHistory-liL_pJDR.js} +1 -1
  50. package/dist/client/assets/{PermissionsPage-CdLK-g0S.js → PermissionsPage-DFMjDQby.js} +1 -1
  51. package/dist/client/assets/{PersonalityPopover-D7hczXpC.js → PersonalityPopover-CITFG0_N.js} +1 -1
  52. package/dist/client/assets/PhotoPage-DYDJPBfu.js +1 -0
  53. package/dist/client/assets/{PresetPicker-Cw2jlFQM.js → PresetPicker-CpYu7nb6.js} +2 -2
  54. package/dist/client/assets/{PreviewRefusedNotice-CcoKHPsy.js → PreviewRefusedNotice-CF3bzfSe.js} +1 -1
  55. package/dist/client/assets/{ProfileFields-xAsiq8Mz.js → ProfileFields-D4p6bhIa.js} +1 -1
  56. package/dist/client/assets/{ProfilePanelContainer-DM8F3Evu.js → ProfilePanelContainer-XCuCnd1t.js} +1 -1
  57. package/dist/client/assets/{ProfileRolePicker-CJYZpLNj.js → ProfileRolePicker-qRf3DSdk.js} +1 -1
  58. package/dist/client/assets/{PromptSuggestionChips-CHWGhlr1.js → PromptSuggestionChips-CUwLk83h.js} +1 -1
  59. package/dist/client/assets/{ReportsToPopover-D781EUfA.js → ReportsToPopover-Cu-Cnzij.js} +1 -1
  60. package/dist/client/assets/{RoomSurface-CT_OGVWw.js → RoomSurface-CsAifwp2.js} +7 -7
  61. package/dist/client/assets/{RoomsPage-DcoGt4-A.js → RoomsPage-DZYMR2in.js} +1 -1
  62. package/dist/client/assets/{RunsOnPopover-6PnPqbut.js → RunsOnPopover-CTBEMstG.js} +1 -1
  63. package/dist/client/assets/RuntimeConnectFlow-DY4sjRgN.js +1 -0
  64. package/dist/client/assets/RuntimeSetupDialog-DJu_-eNa.js +1 -0
  65. package/dist/client/assets/{SessionsPage-Cnai5quH.js → SessionsPage-thndqcpY.js} +1 -1
  66. package/dist/client/assets/{SettingsDialog-DUWvCqf_.js → SettingsDialog-CKmcLF66.js} +3 -3
  67. package/dist/client/assets/SkillsPage-CmXyAw3J.js +1 -0
  68. package/dist/client/assets/{TaskDialogWrapper-CepIueBg.js → TaskDialogWrapper-Boxr_hgF.js} +1 -1
  69. package/dist/client/assets/{TasksEmptyState-CCPObBmm.js → TasksEmptyState-CQf1YroK.js} +2 -2
  70. package/dist/client/assets/{TasksPage-CqoHRhDG.js → TasksPage-DGNXrDAk.js} +1 -1
  71. package/dist/client/assets/{TeamComputerEntry-mHbMrj9_.js → TeamComputerEntry-CIfFRo6-.js} +1 -1
  72. package/dist/client/assets/ToolsPage-BKZkSarf.js +2 -0
  73. package/dist/client/assets/{TopologyGraph-Br4qaSXn.js → TopologyGraph-og2tlLj7.js} +1 -1
  74. package/dist/client/assets/{TourHost-BNT2J0zS.js → TourHost-DzEG8bZP.js} +1 -1
  75. package/dist/client/assets/{UnlinkDialog-CPtwQ55a.js → UnlinkDialog-BTYC_Sit.js} +1 -1
  76. package/dist/client/assets/{WidgetErrorCard-BeQ2x8Ar.js → WidgetErrorCard-CT4sl_T6.js} +8 -8
  77. package/dist/client/assets/_shell-BDlkTSin.js +90 -0
  78. package/dist/client/assets/{_shell._home-DzhKFHpd.js → _shell._home-CP7HQ7Cs.js} +1 -1
  79. package/dist/client/assets/_shell._home.activity-DGXa_ouh.js +1 -0
  80. package/dist/client/assets/_shell._home.index-D5kOfqnL.js +3 -0
  81. package/dist/client/assets/_shell._home.tasks-BSMD-atB.js +1 -0
  82. package/dist/client/assets/_shell._home.workspaces-Cdsw2-jI.js +1 -0
  83. package/dist/client/assets/_shell.channels-B4VQ7tiZ.js +10 -0
  84. package/dist/client/assets/_shell.connections-sF5vS-Lm.js +1 -0
  85. package/dist/client/assets/{_shell.feedback-requests-dFRmIBE1.js → _shell.feedback-requests-hu21WXyA.js} +2 -2
  86. package/dist/client/assets/_shell.marketplace-B-T-ALMv.js +1 -0
  87. package/dist/client/assets/_shell.marketplace_.sources-Chu-9-Vi.js +1 -0
  88. package/dist/client/assets/{_shell.session-DnREJ52s.js → _shell.session-Bz6wvDBp.js} +3 -3
  89. package/dist/client/assets/{_shell.team-B1hbq8aH.js → _shell.team-raG7wRwF.js} +4 -4
  90. package/dist/client/assets/_shell.x._extensionId-DSqMu6Ey.js +1 -0
  91. package/dist/client/assets/_shell.x._extensionId_._-DSqMu6Ey.js +1 -0
  92. package/dist/client/assets/{access-copy-BLfnVgF5.js → access-copy-CcG3wpsK.js} +1 -1
  93. package/dist/client/assets/{banner-Cqt8YzUW.js → banner-nt7EFLr6.js} +2 -2
  94. package/dist/client/assets/card-B_zeSZiU.js +1 -0
  95. package/dist/client/assets/{command-C9CeOcFB.js → command-CDfYcQI6.js} +1 -1
  96. package/dist/client/assets/{cpu-D0mdP6ki.js → cpu-D861493C.js} +1 -1
  97. package/dist/client/assets/empty-state-CQ1oXLFa.js +1 -0
  98. package/dist/client/assets/{execution-config-AW7ORH0Y.js → execution-config-on8kVvnW.js} +1 -1
  99. package/dist/client/assets/{file-D3iv2i0G.js → file-Bwo21EVR.js} +1 -1
  100. package/dist/client/assets/{file-exclamation-point-zZf2-mqw.js → file-exclamation-point-BedYLbs2.js} +1 -1
  101. package/dist/client/assets/{file-text-CwK7EV60.js → file-text-BTj3WyHS.js} +1 -1
  102. package/dist/client/assets/{find-latest-widget-fence-DW1zqXSL.js → find-latest-widget-fence-B8fM5rIs.js} +3 -3
  103. package/dist/client/assets/form-lSBktWDn.js +1 -0
  104. package/dist/client/assets/{format-cron-BtOOA5e7.js → format-cron-W7G0In8e.js} +1 -1
  105. package/dist/client/assets/{git-branch-DPgttvPa.js → git-branch-CKlZ81Bg.js} +1 -1
  106. package/dist/client/assets/{heart-BwQb2EFQ.js → heart-BSVjeGLA.js} +1 -1
  107. package/dist/client/assets/{highlighted-body-KPVGNVTW-GGvkvk_S.js → highlighted-body-KPVGNVTW-Ct8vmPkj.js} +1 -1
  108. package/dist/client/assets/index-09EqfhW0.js +1 -0
  109. package/dist/client/assets/{index-C7BvPaXV.js → index-6pYWHTBx.js} +1 -1
  110. package/dist/client/assets/{index-ukv5t1cK.js → index-7Fd_Eeda.js} +1 -1
  111. package/dist/client/assets/{index-CkluSB9W.js → index-B-C_A3lP.js} +2 -2
  112. package/dist/client/assets/index-BDCqg2iM.css +1 -0
  113. package/dist/client/assets/index-BHt5KOZA.js +1 -0
  114. package/dist/client/assets/{index-2MwCJp-O.js → index-BVedye9r.js} +1 -1
  115. package/dist/client/assets/{index-C1zEos_1.js → index-BdrbKBym.js} +1 -1
  116. package/dist/client/assets/index-BjTJ6p2k.js +1 -0
  117. package/dist/client/assets/{index-DUvx8VEa.js → index-C0TknRcB.js} +1 -1
  118. package/dist/client/assets/index-C8-dwIPp.js +1018 -0
  119. package/dist/client/assets/{index-BCwnroTw.js → index-C96eZrOR.js} +1 -1
  120. package/dist/client/assets/index-CAv_6Po4.js +1 -0
  121. package/dist/client/assets/index-CCWSicoJ.js +1 -0
  122. package/dist/client/assets/{index-DvpWMPrj.js → index-CF73kwtO.js} +36 -36
  123. package/dist/client/assets/{index-DxU-VkDj.js → index-CNnnXzI4.js} +1 -1
  124. package/dist/client/assets/{index-Dk05g-u9.js → index-CQrM6oF9.js} +1 -1
  125. package/dist/client/assets/{index-6TyLF_Kz.js → index-CaKe9EaL.js} +1 -1
  126. package/dist/client/assets/{index-obbYyK_q.js → index-CeZ13dpH.js} +1 -1
  127. package/dist/client/assets/{index-DylucJZe.js → index-CeeHkxIC.js} +1 -1
  128. package/dist/client/assets/index-ClELcMX1.js +1 -0
  129. package/dist/client/assets/{index-B-032E-J.js → index-CrEyJcPM.js} +3 -3
  130. package/dist/client/assets/{index-CmELWXLL.js → index-D7kjWnlR.js} +1 -1
  131. package/dist/client/assets/{index-8XbUBB9y.js → index-DEOzZEcu.js} +3 -3
  132. package/dist/client/assets/{index-2kcIgMts.js → index-DOuj--Yi.js} +1 -1
  133. package/dist/client/assets/{index-DsRVcCEI.js → index-DQJM5kjJ.js} +1 -1
  134. package/dist/client/assets/{index-D09-6MJl.js → index-DShrfGYE.js} +1 -1
  135. package/dist/client/assets/{index-BSGR71VY.js → index-DURo45pu.js} +1 -1
  136. package/dist/client/assets/{index-mPmWFWvR.js → index-DeNVXdMl.js} +1 -1
  137. package/dist/client/assets/{index-CYRBybyy.js → index-DgRqCuFH.js} +1 -1
  138. package/dist/client/assets/{index-BzHf9H2D.js → index-Dh8D-3Sb.js} +1 -1
  139. package/dist/client/assets/{index-5jiMMwFO.js → index-DjI5vH_U.js} +1 -1
  140. package/dist/client/assets/{index-BBKtLMOE.js → index-Dq4bx2np.js} +1 -1
  141. package/dist/client/assets/{index-BtUom5gL.js → index-GINKfP45.js} +1 -1
  142. package/dist/client/assets/{index-DhWcN0iH.js → index-KaSZDcGa.js} +1 -1
  143. package/dist/client/assets/{index-Xmzz0kKG.js → index-RFknyjho.js} +1 -1
  144. package/dist/client/assets/{index-BYRhWLhr.js → index-SdTS2P3x.js} +1 -1
  145. package/dist/client/assets/{index-aRrsIRtW.js → index-UNxDevG6.js} +1 -1
  146. package/dist/client/assets/{index-D_bIHF5l.js → index-V_EcsvR4.js} +1 -1
  147. package/dist/client/assets/{index--IvDgnWz.js → index-bvqpTKLz.js} +1 -1
  148. package/dist/client/assets/{index-Bw9sMeWJ.js → index-gbNK9zj5.js} +3 -3
  149. package/dist/client/assets/{index-aqnG9V3q.js → index-sfSRuIXm.js} +6 -6
  150. package/dist/client/assets/{inline-code-BDPvCbUE.js → inline-code-Beal0546.js} +1 -1
  151. package/dist/client/assets/{layers-C0fTjhD3.js → layers-DUfQMkMa.js} +1 -1
  152. package/dist/client/assets/{lightbulb-CauvTp1H.js → lightbulb-DTSn-mNB.js} +2 -2
  153. package/dist/client/assets/{link-2-BFWagtwF.js → link-2-CHr2s4m2.js} +2 -2
  154. package/dist/client/assets/{list-runtime-types-DWuilOeW.js → list-runtime-types-CwEp9Lg4.js} +1 -1
  155. package/dist/client/assets/{markdown-content-irJMN3oI.js → markdown-content-GoymYcRL.js} +1 -1
  156. package/dist/client/assets/mention-pill-XE9mX9G8.js +1 -0
  157. package/dist/client/assets/{message-square-off-CEgJ9mPa.js → message-square-off-DUkKSITA.js} +1 -1
  158. package/dist/client/assets/more-details-3dDtVYc6.js +1 -0
  159. package/dist/client/assets/{owner-notice-D0r6ZH_Y.js → owner-notice-BKmuWRki.js} +1 -1
  160. package/dist/client/assets/{package-DzrvXxqm.js → package-DM7e-GVa.js} +1 -1
  161. package/dist/client/assets/page-container-nGewlFnj.js +1 -0
  162. package/dist/client/assets/{paperclip-C_2eggQt.js → paperclip-BgXlvBBI.js} +1 -1
  163. package/dist/client/assets/{path-input-ExHSfE6J.js → path-input-RzOiTE45.js} +1 -1
  164. package/dist/client/assets/primer-trigger-B60oEVY7.js +3 -0
  165. package/dist/client/assets/{profile-errors-C-4JXW0u.js → profile-errors-CFZN0y6a.js} +1 -1
  166. package/dist/client/assets/{progress--zm5Rh4c.js → progress-Cvnh4Qcr.js} +1 -1
  167. package/dist/client/assets/{query-error-state-CPMymRkX.js → query-error-state-CfJfYpa3.js} +1 -1
  168. package/dist/client/assets/{radio-oT4bYZ-T.js → radio-BOcAjXVO.js} +1 -1
  169. package/dist/client/assets/registry-B9wsS5De.js +1 -0
  170. package/dist/client/assets/{relay-trace-schemas-CfXA97kO.js → relay-trace-schemas-Cvb7RGjg.js} +2 -2
  171. package/dist/client/assets/{room-files-source-BgBqLMLB.js → room-files-source-B-ZJA_NM.js} +2 -2
  172. package/dist/client/assets/{rotate-ccw-clock-CrElPm6O.js → rotate-ccw-clock-vRQP4hWE.js} +1 -1
  173. package/dist/client/assets/{rotate-cw-CdW7VTvV.js → rotate-cw-DD2nOAQ-.js} +2 -2
  174. package/dist/client/assets/{scroll-area-BqDwmAjQ.js → scroll-area-DTvv8_DS.js} +1 -1
  175. package/dist/client/assets/search-x-Ig8nk-DU.js +6 -0
  176. package/dist/client/assets/{shield-check-B7JJvCBE.js → shield-check-DjnWx7aT.js} +1 -1
  177. package/dist/client/assets/{shield-x-DvFRtrsO.js → shield-x-BrtccpM7.js} +1 -1
  178. package/dist/client/assets/{soul-file-BDthDhZW.js → soul-file-C5mMIP4v.js} +1 -1
  179. package/dist/client/assets/{table-CK_OyzSy.js → table-Rll_Jxd8.js} +1 -1
  180. package/dist/client/assets/{terminal-CqyyqODz.js → terminal-Bjss9oke.js} +1 -1
  181. package/dist/client/assets/{trust-posture-JGG7FWhE.js → trust-posture-Dmk2WlZv.js} +1 -1
  182. package/dist/client/assets/{unplug-D2Avzz6s.js → unplug-BHYMc4ND.js} +1 -1
  183. package/dist/client/assets/{unverified-catalog-notice-BgsW86t7.js → unverified-catalog-notice-BmIVQhjE.js} +1 -1
  184. package/dist/client/assets/{use-adapter-catalog-NFvlYTrH.js → use-adapter-catalog-RzlxX2Wa.js} +1 -1
  185. package/dist/client/assets/{use-bindings-Ofq1UjvW.js → use-bindings-Ds_MAC67.js} +1 -1
  186. package/dist/client/assets/{use-composer-prefs-Cr3bdM7x.js → use-composer-prefs-ckA_eZQS.js} +1 -1
  187. package/dist/client/assets/{use-connector-management-Dz2D5qIt.js → use-connector-management-oEqok0QG.js} +1 -1
  188. package/dist/client/assets/{use-deep-link-scroll-wwMMFsmG.js → use-deep-link-scroll-Clu9Sz2-.js} +1 -1
  189. package/dist/client/assets/use-delete-binding-B_zHPcy8.js +1 -0
  190. package/dist/client/assets/{use-dev-links-Buq6rA0h.js → use-dev-links-BO7-IHe9.js} +1 -1
  191. package/dist/client/assets/{use-external-adapter-catalog-DXgiQHcR.js → use-external-adapter-catalog-7lRWtn7J.js} +1 -1
  192. package/dist/client/assets/{use-full-activity-feed-FN5AfUr-.js → use-full-activity-feed-DrcMJL9m.js} +1 -1
  193. package/dist/client/assets/use-is-below-desktop-BhzXZsbH.js +1 -0
  194. package/dist/client/assets/{use-jump-back-in-CF-nu5zW.js → use-jump-back-in-Dav0ttfs.js} +3 -3
  195. package/dist/client/assets/use-local-browser-CtltDlof.js +1 -0
  196. package/dist/client/assets/{use-mesh-topology-BdnC6sCG.js → use-mesh-topology-CiS9XQsg.js} +1 -1
  197. package/dist/client/assets/{use-mounted-ref-B5J2da-A.js → use-mounted-ref-DuK0vm9N.js} +1 -1
  198. package/dist/client/assets/{use-notification-prefs-B1iYUOEO.js → use-notification-prefs-Chf4UNbq.js} +1 -1
  199. package/dist/client/assets/{use-panel-tab-placements-J6Ed141H.js → use-panel-tab-placements-C5y831aL.js} +1 -1
  200. package/dist/client/assets/use-pending-read-i6TB4gGQ.js +1 -0
  201. package/dist/client/assets/use-personality-commit-KKJ2ve1V.js +1 -0
  202. package/dist/client/assets/{use-promo-activation-CZfM_gjU.js → use-promo-activation-D45fuXdT.js} +3 -3
  203. package/dist/client/assets/{use-promo-dismissals-DlSguZS3.js → use-promo-dismissals-8-hGry_v.js} +1 -1
  204. package/dist/client/assets/{use-pulse-freshness-Bxf5sc_M.js → use-pulse-freshness-CWudgqNc.js} +1 -1
  205. package/dist/client/assets/{use-relay-config-BwMES9xB.js → use-relay-config-8mXfegbP.js} +1 -1
  206. package/dist/client/assets/{use-room-follow-claim-lzWFVGRY.js → use-room-follow-claim-DgEWUsoP.js} +1 -1
  207. package/dist/client/assets/{use-roving-tab-list-0RaD5Yyr.js → use-roving-tab-list-CXy0Hv5J.js} +1 -1
  208. package/dist/client/assets/use-session-canvas-CUvHGgMf.js +64 -0
  209. package/dist/client/assets/{use-session-diagnostics-gBgn5q2r.js → use-session-diagnostics-LKiXub1H.js} +3 -3
  210. package/dist/client/assets/{use-unclaimed-chats-DOqEolFt.js → use-unclaimed-chats-Cr812OTh.js} +1 -1
  211. package/dist/client/assets/use-update-config-Bad4g6mB.js +1 -0
  212. package/dist/client/assets/useMutationState-BnXJ-0A_.js +1 -0
  213. package/dist/client/index.html +2 -2
  214. package/dist/drizzle/20261015190907_bored_skreet.sql +30 -0
  215. package/dist/drizzle/20261016144104_remote_command_hub_kinds.sql +21 -0
  216. package/dist/drizzle/meta/20261015190907_snapshot.json +14012 -0
  217. package/dist/drizzle/meta/20261016144104_snapshot.json +14012 -0
  218. package/dist/drizzle/meta/_journal.json +14 -0
  219. package/dist/server/index.js +130465 -126661
  220. package/dist/server/index.js.map +2 -2
  221. package/package.json +4 -4
  222. package/dist/client/assets/ActivityRow-CXLwJ28E.js +0 -1
  223. package/dist/client/assets/AdapterIcon-DsMXg2AE.js +0 -1
  224. package/dist/client/assets/AdapterSetupWizard-CuKhSucd.js +0 -2
  225. package/dist/client/assets/BindingDialog-DUqmAWDb.js +0 -1
  226. package/dist/client/assets/CanvasFileContent-D5egw6o3.js +0 -2
  227. package/dist/client/assets/CommitmentList-EjCcpBJ1.js +0 -1
  228. package/dist/client/assets/ConnectionAccessLists-BkFNTeLh.js +0 -1
  229. package/dist/client/assets/ConventionPage-Cc1bx5BQ.js +0 -11
  230. package/dist/client/assets/HandlePage-B0l9YTdO.js +0 -1
  231. package/dist/client/assets/HeartbeatPage-COV5M0c_.js +0 -1
  232. package/dist/client/assets/NamePage-BaS8zqwG.js +0 -1
  233. package/dist/client/assets/NewDirectMessageMenu-Dvmoevnh.js +0 -1
  234. package/dist/client/assets/PhotoPage-Copz-uyh.js +0 -1
  235. package/dist/client/assets/RuntimeConnectFlow-COnfwsEa.js +0 -1
  236. package/dist/client/assets/RuntimeSetupDialog-cfZVbgJJ.js +0 -1
  237. package/dist/client/assets/SkillsPage-BVt3zxB-.js +0 -1
  238. package/dist/client/assets/ToolsPage-IYUQ8OGL.js +0 -2
  239. package/dist/client/assets/_shell-TKho4VPJ.js +0 -90
  240. package/dist/client/assets/_shell._home.activity-DyrGuSto.js +0 -1
  241. package/dist/client/assets/_shell._home.index-jWJ7womG.js +0 -3
  242. package/dist/client/assets/_shell._home.tasks-tOBxVLcL.js +0 -1
  243. package/dist/client/assets/_shell._home.workspaces-B0ovWo_a.js +0 -1
  244. package/dist/client/assets/_shell.channels-Cs-s7a-W.js +0 -10
  245. package/dist/client/assets/_shell.connections-BXVkOfW_.js +0 -1
  246. package/dist/client/assets/_shell.marketplace-CuTHl0Cy.js +0 -1
  247. package/dist/client/assets/_shell.marketplace_.sources-UWbdjpMd.js +0 -1
  248. package/dist/client/assets/_shell.x._extensionId-DdiN22Ga.js +0 -1
  249. package/dist/client/assets/_shell.x._extensionId_._-DdiN22Ga.js +0 -1
  250. package/dist/client/assets/agent-browser-BkFCE19g.js +0 -1
  251. package/dist/client/assets/card-BaRHWQF1.js +0 -1
  252. package/dist/client/assets/empty-state-C0Xjezko.js +0 -1
  253. package/dist/client/assets/form-CwnBnnFI.js +0 -1
  254. package/dist/client/assets/index-CMaIfS_G.js +0 -1018
  255. package/dist/client/assets/index-CTxREsg3.js +0 -1
  256. package/dist/client/assets/index-D5QS-i8I.css +0 -1
  257. package/dist/client/assets/index-DLE5hltn.js +0 -1
  258. package/dist/client/assets/index-DaWx8Mly.js +0 -1
  259. package/dist/client/assets/index-GvMV_K0T.js +0 -1
  260. package/dist/client/assets/index-lbAGzLtf.js +0 -1
  261. package/dist/client/assets/mention-pill-C0AzfrQH.js +0 -1
  262. package/dist/client/assets/more-details-CwkthrCT.js +0 -1
  263. package/dist/client/assets/page-container-CH8mJ_Yk.js +0 -1
  264. package/dist/client/assets/primer-trigger-CgHlhMZL.js +0 -3
  265. package/dist/client/assets/registry-DLUlxXR7.js +0 -1
  266. package/dist/client/assets/search-x-DqLtufOG.js +0 -6
  267. package/dist/client/assets/use-delete-binding-j0PZzvHt.js +0 -1
  268. package/dist/client/assets/use-is-below-desktop-BudV2uCQ.js +0 -1
  269. package/dist/client/assets/use-pending-read-BNKrtv93.js +0 -1
  270. package/dist/client/assets/use-personality-commit-CWBNZX4E.js +0 -1
  271. package/dist/client/assets/use-session-canvas-CAxswuAf.js +0 -64
  272. package/dist/client/assets/use-update-config-9fndji1c.js +0 -1
  273. package/dist/client/assets/useMutationState-CtolUzjw.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a2 as ge,r as b,j as o,I as Ie,Q as k,ay as he,$ as Ne,hY as je,hZ as we,h_ as Te,B as D,e5 as Pe,h$ as Ae,a8 as v,dB as ve,bY as _e,hf as $e,dW as Oe,af as P,i0 as Re,dT as Me,i1 as Le,hg as Be,dE as De,a9 as K,i2 as Ke,i3 as Ue,aa as qe,aw as Fe,eN as le,i4 as xe,eO as ue,e as We,gx as Ye,ha as ze,ae as Ge}from"./index-CMaIfS_G.js";import{u as He}from"./use-update-config-9fndji1c.js";import{u as Qe}from"./use-promo-dismissals-DlSguZS3.js";import{a as Ve,d as Je,k as Ze}from"./execution-config-AW7ORH0Y.js";import{s as Xe}from"./settings-for-runtime-BoOa-ZFG.js";import{u as et,a as tt,e as C,c as nt,h as st,P as rt,A as at,d as ot}from"./ApplyToOverridesDialog-GafmL5mr.js";/**
1
+ import{W as ge,r as b,j as o,I as Ie,G as k,ar as he,T as je,h_ as Ne,h$ as we,i0 as Te,B as D,dY as Pe,i1 as Ae,a1 as v,ds as ve,bP as _e,hi as $e,dN as Oe,a8 as P,i2 as Re,dK as Me,i3 as Le,hj as Be,dv as De,a2 as K,i4 as Ke,i5 as Ue,a3 as Fe,ap as qe,eE as le,i6 as xe,eF as ue,e as We,gB as Ye,hd as Ge,a7 as ze}from"./index-C8-dwIPp.js";import{u as He}from"./use-update-config-Bad4g6mB.js";import{u as Qe}from"./use-promo-dismissals-8-hGry_v.js";import{a as Ve,d as Je,k as Xe}from"./execution-config-on8kVvnW.js";import{s as Ze}from"./settings-for-runtime-BoOa-ZFG.js";import{u as et,a as tt,e as C,c as nt,h as st,P as rt,A as at,d as ot}from"./ApplyToOverridesDialog-Cv3KEf7T.js";/**
2
2
  * @license lucide-react v1.48.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -16,4 +16,4 @@ import{a2 as ge,r as b,j as o,I as Ie,Q as k,ay as he,$ as Ne,hY as je,hZ as we,
16
16
  "tunnelEnabled": false,
17
17
  "cloudLinked": false,
18
18
  "counts": { "agents": 4, "tasks": 2, "relayAdapters": 1 }
19
- }`;function Ut({className:e}){return o.jsxs("div",{className:k("space-y-1.5 text-left",e),children:[o.jsx("pre",{className:"text-muted-foreground bg-background/60 max-w-full overflow-x-auto rounded-md border p-3 text-xs",children:o.jsx("code",{children:lt})}),o.jsx("p",{className:"text-muted-foreground text-xs",children:"That’s the whole daily ping."})]})}function qt({open:e,onToggle:t,className:s}){return o.jsxs("button",{type:"button",onClick:t,"aria-expanded":e,className:k("text-foreground focus-visible:ring-ring inline-flex items-center gap-1 rounded-sm text-xs font-medium underline underline-offset-2 outline-none hover:no-underline focus-visible:ring-2",s),children:["See what’s sent",o.jsx(Ne,{"aria-hidden":!0,className:k("size-3 transition-transform duration-200",e&&"rotate-180")})]})}const B="official-space-join";function ut(){var x;const{officialLink:e}=je(),t=we(e!==null),{dismissedIds:s,dismissPromo:n}=Qe(),r=Te(h=>h.ask),a=((x=t.data)==null?void 0:x.some(h=>h.official===!0))??!1,l=e!==null&&t.data!==void 0&&!a&&!s.includes(B),u=e!==null&&t.isLoading===!0&&!s.includes(B),i=b.useCallback(()=>{e!==null&&r(e)},[r,e]),m=b.useCallback(()=>n(B),[n]);return{link:e,joined:a,offered:l,pending:u,join:i,skip:m}}function Ft({className:e,onDone:t,compact:s=!1}){const n=ut(),r=b.useId();if(!n.offered)return null;const a=s?"h4":"h3";return o.jsxs("section",{"aria-labelledby":r,"data-testid":"official-space-offer",className:k("flex items-start",s?"gap-2":"gap-3 rounded-md border p-3",e),children:[o.jsx(it,{className:k("text-muted-foreground mt-0.5 shrink-0",s?"size-3.5":"size-4"),"aria-hidden":!0}),o.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[o.jsx(a,{id:r,className:k("font-medium",s?"text-xs":"text-sm"),children:"Join the DorkOS community"}),o.jsx("p",{className:k("text-muted-foreground",s?"text-xs":"text-sm"),children:"One space for everyone using DorkOS. Your agents join only if you add them."}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx(D,{size:"sm",onClick:()=>{n.join(),t==null||t()},children:"Join"}),o.jsx(D,{size:"sm",variant:"ghost",onClick:()=>{n.skip(),t==null||t()},children:"Not now"})]})]})]})}const ct="Paid plans and hosted spaces are for people in the United States, 18 or older.",dt="Paid plans are for people in the United States, 18 or older.",ft=Ae("/pricing#faq");function Wt({className:e,withSpaces:t=!0}){return o.jsxs("p",{className:k("text-muted-foreground text-xs",e),children:[t?ct:dt," ",o.jsx(Pe,{href:ft,className:"text-foreground underline underline-offset-2",children:"Who can buy a plan?"})]})}const mt=[];function ce(e,t){return t?`${e}\0credits`:e}function pt(e){const[t,s]=e.split("\0");return s?{runtime:t,account:P}:{runtime:t}}function Yt(e){var H,Q,V,J,Z,X,ee,te,ne,se;const t=(e==null?void 0:e.checkModels)??!1,s=v(),{data:n}=he(),{data:r}=ve(),{data:a}=_e(),l=b.useMemo(()=>((a==null?void 0:a.agents)??[]).map(d=>d.projectPath),[a]),{data:u}=$e(l),i=((H=n==null?void 0:n.executionDefaults)==null?void 0:H.runtime)??"claude-code",m=r?Object.keys(r.capabilities):void 0,x=(Q=n==null?void 0:n.executionDefaults)==null?void 0:Q.perRuntime,h=(V=n==null?void 0:n.claudeCode)==null?void 0:V.accounts,c=(J=n==null?void 0:n.claudeCode)==null?void 0:J.accountsUnavailable,y=h&&[...h.flatMap(d=>d.id===null?[]:[{id:d.id,label:Re(d.path,h)}]),...(Z=n==null?void 0:n.claudeCode)!=null&&Z.credits?[{id:P,label:Oe}]:[]],E=new Set(((ee=(X=n==null?void 0:n.claudeCode)==null?void 0:X.credits)==null?void 0:ee.allowedAgents)??[]),Se=d=>{var f;return((f=x==null?void 0:x.find(g=>g.runtime===d))==null?void 0:f.model)??null},M=m==null?void 0:m.join(","),Y=(te=n==null?void 0:n.claudeCode)==null?void 0:te.credits,w=(ne=Me().data)==null?void 0:ne.defaults,L=b.useCallback(d=>Ve(d,{defaultRuntime:i,runtimeDeclaresCredits:f=>{var g;return((g=r==null?void 0:r.capabilities[f])==null?void 0:g.credits)!==void 0},credits:Y,runtimeDefaultsToCredits:f=>{var g;return((g=w==null?void 0:w[f])==null?void 0:g.runsOn)==="credits"}}),[i,r,Y,w]),z=b.useMemo(()=>{if(!t||!u)return[];const d=M===void 0?null:new Set(M.split(",")),f=new Set;for(const g of Object.values(u)){if(!(g!=null&&g.model)&&!(g!=null&&g.effort))continue;const S=g.runtime??i;d&&!d.has(S)||f.add(ce(S,L(g)))}return[...f].sort()},[t,u,i,M,L]),ke=Le({queries:z.map(d=>({...Be(s,pt(d)),retry:!1}))}),G=new Map;if(z.forEach((d,f)=>{var S;const g=(S=ke[f])==null?void 0:S.data;g&&G.set(d,g)}),!u)return{exceptions:mt,brokenPaths:[],defaultRuntime:i};const T=[];for(const[d,f]of Object.entries(u)){if(!f)continue;const g=f.runtime??i,S=G.get(ce(g,L(f))),re=Se(g),ae=f.model??re,oe=ae?S==null?void 0:S.find(N=>N.value===ae):void 0,ie=Je({agent:{runtime:f.runtime,model:f.model,effort:f.effort,account:f.account},defaultRuntime:i,serverDefaultModel:re,knownRuntimes:m,knownModels:Ze(S),knownAccounts:f.account===P&&!E.has(f.id)?y==null?void 0:y.filter(N=>N.id!==P):y,accountsUnavailable:c,modelSupportsEffort:oe?oe.supportsEffort??!1:void 0,runtimeSupportsEffort:(se=Xe(r,g))==null?void 0:se.supportsEffort,runtimeLabel:N=>De(N).label});ie.isException&&T.push({path:d,agent:f,report:ie})}return T.sort((d,f)=>d.report.isBroken!==f.report.isBroken?d.report.isBroken?-1:1:d.agent.name.localeCompare(f.agent.name)),{exceptions:T,brokenPaths:T.filter(d=>d.report.isBroken).map(d=>d.path),defaultRuntime:i}}const A={all:["cloud","communities"],list:()=>[...A.all,"list"],move:e=>[...A.all,"move",e],name:e=>[...A.all,"name",e]};function zt(){var s;const e=v();return((s=K({queryKey:Ue,queryFn:()=>e.getCloudStatus(),staleTime:3e4}).data)==null?void 0:s.linked)===!0}function Gt(e){const t=v(),s=Ke();return K({queryKey:A.list(),queryFn:()=>t.listHostedCommunities(),enabled:e&&s,staleTime:15e3})}const gt=/^-?(0|[1-9][0-9]*)$/,ht=/^[1-9][0-9]*$/,xt=/^[A-Z]{3}$/,_=6,bt=BigInt(10)**BigInt(_),p=BigInt(0),$=BigInt(1),yt=BigInt(2),O=BigInt(10);function Ce(e,t){const s=e/t;return e%t!==p&&e<p?s-$:s}function U(e,t){const s=e<p?-e:e;let n=s/t;return s%t*yt>=t&&(n+=$),e<p?-n:n}function I(e){return typeof e!="string"||!gt.test(e)?null:BigInt(e)}function R(e){if(typeof e!="object"||e===null)return null;const{microPerCredit:t}=e;return typeof t!="string"||!ht.test(t)||q(e)===null?null:BigInt(t)}const de=new Map;function Ct(e){const t=de.get(e);if(t!==void 0)return t;let s=null;try{const n=new Intl.NumberFormat("en-US",{style:"currency",currency:e}),r=n.formatToParts(0),a=new Set(["integer","group","decimal","fraction"]),l=r.findIndex(m=>a.has(m.type));let u=-1;r.forEach((m,x)=>{a.has(m.type)&&(u=x)});const i=n.resolvedOptions().maximumFractionDigits??0;if(l>=0&&i>=0&&i<=_){const m=x=>x.filter(h=>h.type!=="minusSign"&&h.type!=="plusSign").map(h=>h.value).join("");s={prefix:m(r.slice(0,l)),suffix:m(r.slice(u+1)),minorDigits:i}}}catch{s=null}return de.set(e,s),s}function q(e){if(typeof e!="object"||e===null)return null;const{currency:t}=e;return typeof t!="string"||!xt.test(t)?null:Ct(t)}function j(e){const t=e.toString();let s="";for(let n=0;n<t.length;n+=1)n>0&&(t.length-n)%3===0&&(s+=","),s+=t[n];return s}function F(e,t,s){const n=O**BigInt(t),r=e/n;let a=t>0?(e%n).toString().padStart(t,"0"):"";for(;a.length>s&&a.endsWith("0");)a=a.slice(0,-1);return a.length>0?`${j(r)}.${a}`:j(r)}function W(e){return e<p?`-${j(-e)}`:j(e)}function fe(e,t,s){const n=e<p?-e:e,r=s?j(n/O**BigInt(t.minorDigits)):F(n,t.minorDigits,t.minorDigits);return`${e<p?"-":""}${t.prefix}${r}${t.suffix}`}function Et(e,t,s){const n=I(e),r=q(t);if(n===null||r===null)return null;const a=O**BigInt(_-r.minorDigits),l=s(n,a);if(l===p&&n!==p){const u=fe($,r,r.minorDigits===0);return n<p?`-<${u}`:`<${u}`}return fe(l,r,n%bt===p)}function St(e,t){const s=I(e),n=R(t);return s===null||n===null?null:W(Ce(s,n))}function Ht(e,t){const s=I(e),n=R(t);if(s===null||n===null)return null;if(s===p)return"0";const r=U(s,n);return r===p?s<p?"-<1":"<1":W(r)}function kt(e,t){const s=I(e),n=R(t);if(s===null||n===null)return null;let r=0,a=s<p?-s:s,l=$;for(;a*l%n!==p;)if(r+=1,l*=O,r>n.toString().length*4)return null;a=a*l/n;const u=F(a,r,0);return s<p?`-${u}`:u}function me(e,t){return Et(e,t,U)}function It(e,t){const s=I(e),n=q(t);if(s===null||n===null)return null;const r=s<p?-s:s;return`${s<p?"-":""}${n.prefix}${F(r,_,n.minorDigits)}${n.suffix}`}function Qt(e,t,s){const n=I(e),r=R(t);if(n===null||r===null)return null;const a=i=>i==="1"||i==="-1"?`${i} credit`:`${i} credits`;if(s==="rate"){const i=kt(e,t),m=It(e,t);return i===null||m===null?null:`${a(i)} (${m})`}let l;if(s==="position")l=Ce(n,r);else if(l=n===p?p:U(n,r),l===p&&n!==p){const i=me(r.toString(),t);if(i===null)return null;const m=i.startsWith("<")?i:`<${i}`;return n<p?`-<1 credit (-${m})`:`<1 credit (${m})`}const u=me((l*r).toString(),t);return u===null?null:`${a(W(l))} (${u})`}function Vt(e){return St("0",e)!==null}function Jt(e){return e===null?null:`${e} ${e==="1"||e==="-1"||e==="<1"||e==="-<1"?"credit":"credits"}`}const pe=1n<<16n;function Zt(e,t){if(!/^\d+$/.test(e)||!/^\d+$/.test(t))return null;const s=BigInt(t);if(s===0n)return null;const n=BigInt(e);return n>=s?1:n<=0n?0:Number(n*pe/s)/Number(pe)}const Ee=["keep-awake"],Nt=5*6e4;function Xt(){const e=v(),{data:t}=K({queryKey:[...Ee],queryFn:()=>e.getKeepAwake(),staleTime:Nt});return t}function jt(e){if(typeof e!="object"||e===null)return!1;const t=e,s=t.working;return typeof t.enabled=="boolean"&&typeof t.supported=="boolean"&&typeof t.asserted=="boolean"&&typeof s=="object"&&s!==null&&typeof s.chats=="number"&&typeof s.rooms=="number"&&typeof s.tasks=="number"}function en(){const e=qe();Fe("keep_awake_status",t=>{jt(t)&&e.setQueryData([...Ee],t)})}const tn={tab:"tools",section:"sleep"},wt=[["chats","chat","chats"],["rooms","room","rooms"],["tasks","task","tasks"]];function Tt(e){const t=wt.filter(([s])=>e[s]>0).map(([s,n,r])=>`${e[s]} ${e[s]===1?n:r}`);return t.length===0?null:t.length===1?`${t[0]} running`:t.join(", ")}function nn(e){return(e==null?void 0:e.asserted)===!0&&Tt(e.working)!==null}const sn={container:"Not available in a container.","tool-missing":"Not available: this computer has no sleep control tool.",denied:"This computer refused to stay awake. Tries again while agents work.",platform:"Not available on this operating system."};function rn(e){return e.supported||e.reason==="denied"}const an="Closing the lid usually still sleeps. The screen still locks. Uses more battery.";function Pt(e,t){return t===0?C[e]:`${C[e]}, ${t} ${t===1?"change":"changes"}`}function At(e){const t=new Map,s=(n,r)=>{const a=t.get(n)??{agentName:r,count:0};a.count+=1,t.set(n,a)};for(const n of e.exceptions)s(n.agentId,n.agentName);for(const n of e.filesAndCommands.exceptions)s(n.agentId,n.agentName);return[...t].map(([n,{agentName:r,count:a}])=>({agentId:n,agentName:r,detail:`${a} ${a===1?"setting":"settings"} of its own`}))}function vt(e){const t=xe;return t.includes(e)?t:[...t,e]}function on({surface:e}){const t=et(),s=tt({kind:"default"}),[n,r]=b.useState(null),a=b.useMemo(()=>t.data?At(t.data):[],[t.data]);if(t.isError)return o.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read the permissions."});if(!t.data)return o.jsxs("div",{className:"flex flex-col gap-3","data-testid":"preset-picker","aria-busy":"true",children:[o.jsx(le,{"aria-label":"Preset",className:"w-full",value:"",onValueChange:()=>{},children:xe.map(c=>o.jsx(ue,{value:c,"aria-label":C[c],children:o.jsx("span",{className:"truncate",children:C[c]})},c))}),o.jsx(We,{className:"h-4 w-2/3"})]});const l=t.data,u=l.preset??"trusted",i=nt(l,{kind:"preset"}),m=`Changing it ${ot(i)}`,x=(c,y)=>s.mutate({kind:"preset",preset:c,surface:e,...y&&y.length>0?{applyToAgents:y}:{}},{onError:E=>Ge.error(E instanceof Error?E.message:"Couldn’t save that change. Try again.")}),h=c=>{c===l.preset&&l.changeCount===0||(a.length>0?r(c):x(c))};return o.jsxs("div",{className:"flex flex-col gap-3","data-testid":"preset-picker",children:[o.jsx(le,{"aria-label":"Preset",className:"w-full",value:u,onValueChange:c=>c&&h(c),disabled:s.isPending,children:vt(u).map(c=>o.jsx(ue,{value:c,"aria-label":C[c],children:o.jsx("span",{className:"truncate",children:C[c]})},c))}),o.jsxs("div",{className:"flex flex-col gap-1 @lg:flex-row @lg:items-center @lg:justify-between",children:[o.jsxs("div",{className:"space-y-0.5",children:[o.jsxs("p",{className:"text-sm","data-testid":"permissions-preset",children:[o.jsx("span",{className:"font-medium",children:Pt(u,l.changeCount)}),o.jsxs("span",{className:"text-muted-foreground",children:[" · ",st[u]]})]}),o.jsxs("p",{className:"text-muted-foreground text-xs","data-testid":"permissions-preset-preview",children:[m," ·"," ",o.jsx(rt,{question:`Why is the preset set to ${C[u]}?`,sentence:`${C[u]} is the preset every agent starts from.`,...l.presetLastChange?{lastChange:l.presetLastChange}:{}})]})]}),l.changeCount>0?o.jsxs(D,{variant:"ghost",size:"sm",className:"self-start",disabled:s.isPending,onClick:()=>h(u),children:["Reset to ",C[u]]}):null]}),o.jsx(Ye,{descriptor:ze.find(c=>c.stop===l.filesAndCommands.stop)}),o.jsx(at,{open:n!==null,onCancel:()=>r(null),subject:"Preset",title:n?`Switch everyone to ${C[n]}?`:void 0,next:n?C[n]:"",agents:a,affectedCount:i,onKeep:()=>{n&&x(n),r(null)},onUpdate:c=>{n&&x(n,c),r(null)},pending:s.isPending})]})}export{Dt as B,Wt as C,Ee as K,Ft as O,on as P,tn as S,qt as T,sn as U,Bt as W,Ut as a,St as b,Qt as c,me as d,Kt as e,Ht as f,Xt as g,rn as h,Vt as i,an as j,Yt as k,ut as l,A as m,zt as n,it as o,nn as p,Tt as q,Zt as r,en as s,Gt as u,Jt as w};
19
+ }`;function Ut({className:e}){return o.jsxs("div",{className:k("space-y-1.5 text-left",e),children:[o.jsx("pre",{className:"text-muted-foreground bg-background/60 max-w-full overflow-x-auto rounded-md border p-3 text-xs",children:o.jsx("code",{children:lt})}),o.jsx("p",{className:"text-muted-foreground text-xs",children:"That’s the whole daily ping."})]})}function Ft({open:e,onToggle:t,className:s}){return o.jsxs("button",{type:"button",onClick:t,"aria-expanded":e,className:k("text-foreground focus-visible:ring-ring inline-flex items-center gap-1 rounded-sm text-xs font-medium underline underline-offset-2 outline-none hover:no-underline focus-visible:ring-2",s),children:["See what’s sent",o.jsx(je,{"aria-hidden":!0,className:k("size-3 transition-transform duration-200",e&&"rotate-180")})]})}const B="official-space-join";function ut(){var x;const{officialLink:e}=Ne(),t=we(e!==null),{dismissedIds:s,dismissPromo:n}=Qe(),r=Te(h=>h.ask),a=((x=t.data)==null?void 0:x.some(h=>h.official===!0))??!1,l=e!==null&&t.data!==void 0&&!a&&!s.includes(B),u=e!==null&&t.isLoading===!0&&!s.includes(B),i=b.useCallback(()=>{e!==null&&r(e)},[r,e]),m=b.useCallback(()=>n(B),[n]);return{link:e,joined:a,offered:l,pending:u,join:i,skip:m}}function qt({className:e,onDone:t,compact:s=!1}){const n=ut(),r=b.useId();if(!n.offered)return null;const a=s?"h4":"h3";return o.jsxs("section",{"aria-labelledby":r,"data-testid":"official-space-offer",className:k("flex items-start",s?"gap-2":"gap-3 rounded-md border p-3",e),children:[o.jsx(it,{className:k("text-muted-foreground mt-0.5 shrink-0",s?"size-3.5":"size-4"),"aria-hidden":!0}),o.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[o.jsx(a,{id:r,className:k("font-medium",s?"text-xs":"text-sm"),children:"Join the DorkOS community"}),o.jsx("p",{className:k("text-muted-foreground",s?"text-xs":"text-sm"),children:"One space for everyone using DorkOS. Your agents join only if you add them."}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx(D,{size:"sm",onClick:()=>{n.join(),t==null||t()},children:"Join"}),o.jsx(D,{size:"sm",variant:"ghost",onClick:()=>{n.skip(),t==null||t()},children:"Not now"})]})]})]})}const ct="Paid plans and hosted spaces are for people in the United States, 18 or older.",dt="Paid plans are for people in the United States, 18 or older.",ft=Ae("/pricing#faq");function Wt({className:e,withSpaces:t=!0}){return o.jsxs("p",{className:k("text-muted-foreground text-xs",e),children:[t?ct:dt," ",o.jsx(Pe,{href:ft,className:"text-foreground underline underline-offset-2",children:"Who can buy a plan?"})]})}const mt=[];function ce(e,t){return t?`${e}\0credits`:e}function pt(e){const[t,s]=e.split("\0");return s?{runtime:t,account:P}:{runtime:t}}function Yt(e){var H,Q,V,J,X,Z,ee,te,ne,se;const t=(e==null?void 0:e.checkModels)??!1,s=v(),{data:n}=he(),{data:r}=ve(),{data:a}=_e(),l=b.useMemo(()=>((a==null?void 0:a.agents)??[]).map(d=>d.projectPath),[a]),{data:u}=$e(l),i=((H=n==null?void 0:n.executionDefaults)==null?void 0:H.runtime)??"claude-code",m=r?Object.keys(r.capabilities):void 0,x=(Q=n==null?void 0:n.executionDefaults)==null?void 0:Q.perRuntime,h=(V=n==null?void 0:n.claudeCode)==null?void 0:V.accounts,c=(J=n==null?void 0:n.claudeCode)==null?void 0:J.accountsUnavailable,y=h&&[...h.flatMap(d=>d.id===null?[]:[{id:d.id,label:Re(d.path,h)}]),...(X=n==null?void 0:n.claudeCode)!=null&&X.credits?[{id:P,label:Oe}]:[]],E=new Set(((ee=(Z=n==null?void 0:n.claudeCode)==null?void 0:Z.credits)==null?void 0:ee.allowedAgents)??[]),Se=d=>{var f;return((f=x==null?void 0:x.find(g=>g.runtime===d))==null?void 0:f.model)??null},M=m==null?void 0:m.join(","),Y=(te=n==null?void 0:n.claudeCode)==null?void 0:te.credits,w=(ne=Me().data)==null?void 0:ne.defaults,L=b.useCallback(d=>Ve(d,{defaultRuntime:i,runtimeDeclaresCredits:f=>{var g;return((g=r==null?void 0:r.capabilities[f])==null?void 0:g.credits)!==void 0},credits:Y,runtimeDefaultsToCredits:f=>{var g;return((g=w==null?void 0:w[f])==null?void 0:g.runsOn)==="credits"}}),[i,r,Y,w]),G=b.useMemo(()=>{if(!t||!u)return[];const d=M===void 0?null:new Set(M.split(",")),f=new Set;for(const g of Object.values(u)){if(!(g!=null&&g.model)&&!(g!=null&&g.effort))continue;const S=g.runtime??i;d&&!d.has(S)||f.add(ce(S,L(g)))}return[...f].sort()},[t,u,i,M,L]),ke=Le({queries:G.map(d=>({...Be(s,pt(d)),retry:!1}))}),z=new Map;if(G.forEach((d,f)=>{var S;const g=(S=ke[f])==null?void 0:S.data;g&&z.set(d,g)}),!u)return{exceptions:mt,brokenPaths:[],defaultRuntime:i};const T=[];for(const[d,f]of Object.entries(u)){if(!f)continue;const g=f.runtime??i,S=z.get(ce(g,L(f))),re=Se(g),ae=f.model??re,oe=ae?S==null?void 0:S.find(j=>j.value===ae):void 0,ie=Je({agent:{runtime:f.runtime,model:f.model,effort:f.effort,account:f.account},defaultRuntime:i,serverDefaultModel:re,knownRuntimes:m,knownModels:Xe(S),knownAccounts:f.account===P&&!E.has(f.id)?y==null?void 0:y.filter(j=>j.id!==P):y,accountsUnavailable:c,modelSupportsEffort:oe?oe.supportsEffort??!1:void 0,runtimeSupportsEffort:(se=Ze(r,g))==null?void 0:se.supportsEffort,runtimeLabel:j=>De(j).label});ie.isException&&T.push({path:d,agent:f,report:ie})}return T.sort((d,f)=>d.report.isBroken!==f.report.isBroken?d.report.isBroken?-1:1:d.agent.name.localeCompare(f.agent.name)),{exceptions:T,brokenPaths:T.filter(d=>d.report.isBroken).map(d=>d.path),defaultRuntime:i}}const A={all:["cloud","communities"],list:()=>[...A.all,"list"],move:e=>[...A.all,"move",e],name:e=>[...A.all,"name",e]};function Gt(){var s;const e=v();return((s=K({queryKey:Ue,queryFn:()=>e.getCloudStatus(),staleTime:3e4}).data)==null?void 0:s.linked)===!0}function zt(e){const t=v(),s=Ke();return K({queryKey:A.list(),queryFn:()=>t.listHostedCommunities(),enabled:e&&s,staleTime:15e3})}const gt=/^-?(0|[1-9][0-9]*)$/,ht=/^[1-9][0-9]*$/,xt=/^[A-Z]{3}$/,_=6,bt=BigInt(10)**BigInt(_),p=BigInt(0),$=BigInt(1),yt=BigInt(2),O=BigInt(10);function Ce(e,t){const s=e/t;return e%t!==p&&e<p?s-$:s}function U(e,t){const s=e<p?-e:e;let n=s/t;return s%t*yt>=t&&(n+=$),e<p?-n:n}function I(e){return typeof e!="string"||!gt.test(e)?null:BigInt(e)}function R(e){if(typeof e!="object"||e===null)return null;const{microPerCredit:t}=e;return typeof t!="string"||!ht.test(t)||F(e)===null?null:BigInt(t)}const de=new Map;function Ct(e){const t=de.get(e);if(t!==void 0)return t;let s=null;try{const n=new Intl.NumberFormat("en-US",{style:"currency",currency:e}),r=n.formatToParts(0),a=new Set(["integer","group","decimal","fraction"]),l=r.findIndex(m=>a.has(m.type));let u=-1;r.forEach((m,x)=>{a.has(m.type)&&(u=x)});const i=n.resolvedOptions().maximumFractionDigits??0;if(l>=0&&i>=0&&i<=_){const m=x=>x.filter(h=>h.type!=="minusSign"&&h.type!=="plusSign").map(h=>h.value).join("");s={prefix:m(r.slice(0,l)),suffix:m(r.slice(u+1)),minorDigits:i}}}catch{s=null}return de.set(e,s),s}function F(e){if(typeof e!="object"||e===null)return null;const{currency:t}=e;return typeof t!="string"||!xt.test(t)?null:Ct(t)}function N(e){const t=e.toString();let s="";for(let n=0;n<t.length;n+=1)n>0&&(t.length-n)%3===0&&(s+=","),s+=t[n];return s}function q(e,t,s){const n=O**BigInt(t),r=e/n;let a=t>0?(e%n).toString().padStart(t,"0"):"";for(;a.length>s&&a.endsWith("0");)a=a.slice(0,-1);return a.length>0?`${N(r)}.${a}`:N(r)}function W(e){return e<p?`-${N(-e)}`:N(e)}function fe(e,t,s){const n=e<p?-e:e,r=s?N(n/O**BigInt(t.minorDigits)):q(n,t.minorDigits,t.minorDigits);return`${e<p?"-":""}${t.prefix}${r}${t.suffix}`}function Et(e,t,s){const n=I(e),r=F(t);if(n===null||r===null)return null;const a=O**BigInt(_-r.minorDigits),l=s(n,a);if(l===p&&n!==p){const u=fe($,r,r.minorDigits===0);return n<p?`-<${u}`:`<${u}`}return fe(l,r,n%bt===p)}function St(e,t){const s=I(e),n=R(t);return s===null||n===null?null:W(Ce(s,n))}function Ht(e,t){const s=I(e),n=R(t);if(s===null||n===null)return null;if(s===p)return"0";const r=U(s,n);return r===p?s<p?"-<1":"<1":W(r)}function kt(e,t){const s=I(e),n=R(t);if(s===null||n===null)return null;let r=0,a=s<p?-s:s,l=$;for(;a*l%n!==p;)if(r+=1,l*=O,r>n.toString().length*4)return null;a=a*l/n;const u=q(a,r,0);return s<p?`-${u}`:u}function me(e,t){return Et(e,t,U)}function It(e,t){const s=I(e),n=F(t);if(s===null||n===null)return null;const r=s<p?-s:s;return`${s<p?"-":""}${n.prefix}${q(r,_,n.minorDigits)}${n.suffix}`}function Qt(e,t,s){const n=I(e),r=R(t);if(n===null||r===null)return null;const a=i=>i==="1"||i==="-1"?`${i} credit`:`${i} credits`;if(s==="rate"){const i=kt(e,t),m=It(e,t);return i===null||m===null?null:`${a(i)} (${m})`}let l;if(s==="position")l=Ce(n,r);else if(l=n===p?p:U(n,r),l===p&&n!==p){const i=me(r.toString(),t);if(i===null)return null;const m=i.startsWith("<")?i:`<${i}`;return n<p?`-<1 credit (-${m})`:`<1 credit (${m})`}const u=me((l*r).toString(),t);return u===null?null:`${a(W(l))} (${u})`}function Vt(e){return St("0",e)!==null}function Jt(e){return e===null?null:`${e} ${e==="1"||e==="-1"||e==="<1"||e==="-<1"?"credit":"credits"}`}const pe=1n<<16n;function Xt(e,t){if(!/^\d+$/.test(e)||!/^\d+$/.test(t))return null;const s=BigInt(t);if(s===0n)return null;const n=BigInt(e);return n>=s?1:n<=0n?0:Number(n*pe/s)/Number(pe)}const Ee=["keep-awake"],jt=5*6e4;function Zt(){const e=v(),{data:t}=K({queryKey:[...Ee],queryFn:()=>e.getKeepAwake(),staleTime:jt});return t}function Nt(e){if(typeof e!="object"||e===null)return!1;const t=e,s=t.working;return typeof t.enabled=="boolean"&&typeof t.supported=="boolean"&&typeof t.asserted=="boolean"&&typeof s=="object"&&s!==null&&typeof s.chats=="number"&&typeof s.rooms=="number"&&typeof s.tasks=="number"}function en(){const e=Fe();qe("keep_awake_status",t=>{Nt(t)&&e.setQueryData([...Ee],t)})}const tn={tab:"tools",section:"sleep"},wt=[["chats","chat","chats"],["rooms","room","rooms"],["tasks","task","tasks"]];function Tt(e){const t=wt.filter(([s])=>e[s]>0).map(([s,n,r])=>`${e[s]} ${e[s]===1?n:r}`);return t.length===0?null:t.length===1?`${t[0]} running`:t.join(", ")}function nn(e){return(e==null?void 0:e.asserted)===!0&&Tt(e.working)!==null}const sn={container:"Not available in a container.","tool-missing":"Not available: this computer has no sleep control tool.",denied:"This computer refused to stay awake. Tries again while agents work.",platform:"Not available on this operating system."};function rn(e){return e.supported||e.reason==="denied"}const an="Closing the lid usually still sleeps. The screen still locks. Uses more battery.";function Pt(e,t){return t===0?C[e]:`${C[e]}, ${t} ${t===1?"change":"changes"}`}function At(e){const t=new Map,s=(n,r)=>{const a=t.get(n)??{agentName:r,count:0};a.count+=1,t.set(n,a)};for(const n of e.exceptions)s(n.agentId,n.agentName);for(const n of e.filesAndCommands.exceptions)s(n.agentId,n.agentName);return[...t].map(([n,{agentName:r,count:a}])=>({agentId:n,agentName:r,detail:`${a} ${a===1?"setting":"settings"} of its own`}))}function vt(e){const t=xe;return t.includes(e)?t:[...t,e]}function on({surface:e}){const t=et(),s=tt({kind:"default"}),[n,r]=b.useState(null),a=b.useMemo(()=>t.data?At(t.data):[],[t.data]);if(t.isError)return o.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read the permissions."});if(!t.data)return o.jsxs("div",{className:"flex flex-col gap-3","data-testid":"preset-picker","aria-busy":"true",children:[o.jsx(le,{"aria-label":"Preset",className:"w-full",value:"",onValueChange:()=>{},children:xe.map(c=>o.jsx(ue,{value:c,"aria-label":C[c],children:o.jsx("span",{className:"truncate",children:C[c]})},c))}),o.jsx(We,{className:"h-4 w-2/3"})]});const l=t.data,u=l.preset??"trusted",i=nt(l,{kind:"preset"}),m=`Changing it ${ot(i)}`,x=(c,y)=>s.mutate({kind:"preset",preset:c,surface:e,...y&&y.length>0?{applyToAgents:y}:{}},{onError:E=>ze.error(E instanceof Error?E.message:"Couldn’t save that change. Try again.")}),h=c=>{c===l.preset&&l.changeCount===0||(a.length>0?r(c):x(c))};return o.jsxs("div",{className:"flex flex-col gap-3","data-testid":"preset-picker",children:[o.jsx(le,{"aria-label":"Preset",className:"w-full",value:u,onValueChange:c=>c&&h(c),disabled:s.isPending,children:vt(u).map(c=>o.jsx(ue,{value:c,"aria-label":C[c],children:o.jsx("span",{className:"truncate",children:C[c]})},c))}),o.jsxs("div",{className:"flex flex-col gap-1 @lg:flex-row @lg:items-center @lg:justify-between",children:[o.jsxs("div",{className:"space-y-0.5",children:[o.jsxs("p",{className:"text-sm","data-testid":"permissions-preset",children:[o.jsx("span",{className:"font-medium",children:Pt(u,l.changeCount)}),o.jsxs("span",{className:"text-muted-foreground",children:[" · ",st[u]]})]}),o.jsxs("p",{className:"text-muted-foreground text-xs","data-testid":"permissions-preset-preview",children:[m," ·"," ",o.jsx(rt,{question:`Why is the preset set to ${C[u]}?`,sentence:`${C[u]} is the preset every agent starts from.`,...l.presetLastChange?{lastChange:l.presetLastChange}:{}})]})]}),l.changeCount>0?o.jsxs(D,{variant:"ghost",size:"sm",className:"self-start",disabled:s.isPending,onClick:()=>h(u),children:["Reset to ",C[u]]}):null]}),o.jsx(Ye,{descriptor:Ge.find(c=>c.stop===l.filesAndCommands.stop)}),o.jsx(at,{open:n!==null,onCancel:()=>r(null),subject:"Preset",title:n?`Switch everyone to ${C[n]}?`:void 0,next:n?C[n]:"",agents:a,affectedCount:i,onKeep:()=>{n&&x(n),r(null)},onUpdate:c=>{n&&x(n,c),r(null)},pending:s.isPending})]})}export{Dt as B,Wt as C,Ee as K,qt as O,on as P,tn as S,Ft as T,sn as U,Bt as W,Ut as a,St as b,Qt as c,me as d,Kt as e,Ht as f,Zt as g,rn as h,Vt as i,an as j,Yt as k,ut as l,A as m,Gt as n,it as o,nn as p,Tt as q,Xt as r,en as s,zt as u,Jt as w};
@@ -1 +1 @@
1
- import{r as b,j as n,bt as _,bw as p,bx as E,eC as j,bB as I,dt as S,dk as N,eD as R,eE as A,bu as T,bC as h,eF as M,eG as D,eH as $,eI as F,a8 as O,a9 as G,ah as V}from"./index-CMaIfS_G.js";import{S as L}from"./shield-x-DvFRtrsO.js";var K=Object.defineProperty,g=(e,t)=>K(e,"name",{value:t,configurable:!0}),x="Tabs",[H,oe]=E(x,[j]),C=j(),[U,y]=H(x),q=b.forwardRef(g(function(t,a){const{__scopeTabs:r,value:s,onValueChange:o,defaultValue:d,orientation:i="horizontal",dir:l,activationMode:v="automatic",...m}=t,u=I(l),[c,f]=S({prop:s,onChange:o,defaultProp:d??"",caller:x});return n.jsx(U,{scope:r,baseId:N(),value:c,onValueChange:f,orientation:i,dir:u,activationMode:v,children:n.jsx(p.div,{dir:u,"data-orientation":i,...m,ref:a})})},"Tabs")),B="TabsList",z=b.forwardRef(g(function(t,a){const{__scopeTabs:r,loop:s=!0,...o}=t,d=y(B,r),i=C(r);return n.jsx(R,{asChild:!0,...i,orientation:d.orientation,dir:d.dir,loop:s,children:n.jsx(p.div,{role:"tablist","aria-orientation":d.orientation,...o,ref:a})})},"TabsList")),Q="TabsTrigger",W=b.forwardRef(g(function(t,a){const{__scopeTabs:r,value:s,disabled:o=!1,...d}=t,i=y(Q,r),l=C(r),v=w(i.baseId,s),m=k(i.baseId,s),u=s===i.value;return n.jsx(A,{asChild:!0,...l,focusable:!o,active:u,children:n.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":m,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:v,...d,ref:a,onMouseDown:T(t.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?i.onValueChange(s):c.preventDefault()}),onKeyDown:T(t.onKeyDown,c=>{o||c.target!==c.currentTarget||[" ","Enter"].includes(c.key)&&i.onValueChange(s)}),onFocus:T(t.onFocus,()=>{const c=i.activationMode!=="manual";!u&&!o&&c&&i.onValueChange(s)})})})},"TabsTrigger")),X="TabsContent",J=b.forwardRef(g(function(t,a){const{__scopeTabs:r,value:s,forceMount:o,children:d,...i}=t,l=y(X,r),v=w(l.baseId,s),m=k(l.baseId,s),u=s===l.value,c=b.useRef(u);return b.useEffect(()=>{const f=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(f)},[]),n.jsx(_,{present:o||u,children:({present:f})=>n.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":v,hidden:!f,id:m,tabIndex:0,...i,ref:a,style:{...t.style,animationDuration:c.current?"0s":void 0},children:f&&d})})},"TabsContent"));function w(e,t){return`${e}-trigger-${t}`}g(w,"makeTriggerId");function k(e,t){return`${e}-content-${t}`}g(k,"makeContentId");var Y=q,Z=z,ee=W,te=J;function ie({...e}){return n.jsx(Y,{"data-slot":"tabs",...e})}function ce({className:e,responsive:t=!0,...a}){return n.jsx(Z,{"data-slot":"tabs-list",className:h("bg-dui-muted text-dui-muted-foreground inline-flex items-center justify-center rounded-lg p-1",t?M:"h-9",e),...a})}function ue({className:e,...t}){return n.jsx(ee,{"data-slot":"tabs-trigger",className:h("ring-offset-dui-background inline-flex items-center justify-center rounded-md px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-[color,background-color,box-shadow,opacity] motion-reduce:transition-none! md:py-1","focus-visible:ring-dui-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-dui-background data-[state=active]:text-dui-foreground data-[state=active]:shadow",e),...t})}function de({className:e,...t}){return n.jsx(te,{"data-slot":"tabs-content",className:h("ring-offset-dui-background mt-2","data-[state=active]:animate-in data-[state=active]:fade-in-0 data-[state=active]:duration-150 motion-reduce:animate-none!","focus-visible:ring-dui-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...t})}const ae={default:!1,plan:!1,acceptEdits:!1,dontAsk:!0,bypassPermissions:!0,auto:!0};function le(e){return ae[e]??!1}function se(e){try{return F.toString(e)}catch{return`On the schedule ${e}`}}function fe(e){const t=e.cron?se(e.cron):"Runs only when you ask",a=D(e.startsEnabled);return`${t}, ${a}. This job ${$(e.permissionMode)}.`}function be(e,t){const a=O(),{enabled:r=!0,...s}=t??{},o=Object.keys(s).length>0;return G({queryKey:V.permissionPreview(e??"",o?s:void 0),queryFn:()=>a.previewMarketplacePackage(e,o?s:void 0),enabled:r&&e!==null,staleTime:3e4,networkMode:"always"})}function P(e){const t=e==null?void 0:e.body,a=Array.isArray(t==null?void 0:t.errors)?t.errors.filter(r=>typeof r=="string"):[];return a.length>0?{reasons:a,checked:!0}:{reasons:e instanceof Error&&e.message?[e.message]:[],checked:!1}}function ge(e){return P(e).checked}function ve({error:e}){const{reasons:t,checked:a}=P(e);return n.jsxs("div",{role:"alert",className:"border-destructive/40 bg-destructive/5 space-y-2 rounded-md border p-3 text-sm",children:[n.jsxs("p",{className:"text-destructive flex items-center gap-2 font-medium",children:[n.jsx(L,{className:"size-4 shrink-0","aria-hidden":!0}),"DorkOS won’t install this package"]}),n.jsx("p",{className:"text-muted-foreground text-xs",children:a?"What it found:":"It couldn’t check what this package does."}),t.length>0&&n.jsx("ul",{className:"text-muted-foreground list-disc space-y-1 pl-5 text-xs [overflow-wrap:anywhere]",children:t.map(r=>n.jsx("li",{children:r},r))})]})}export{ve as P,ie as T,ce as a,ue as b,de as c,fe as d,ge as i,le as r,be as u};
1
+ import{r as b,j as n,bk as _,bn as p,bo as S,et as k,bs as E,dj as I,db as N,eu as R,ev as A,bl as T,bt as h,ew as M,ex as $,ey as D,ez as O,a1 as F,a2 as V,aa as G}from"./index-C8-dwIPp.js";import{S as L}from"./shield-x-BrtccpM7.js";var K=Object.defineProperty,v=(e,t)=>K(e,"name",{value:t,configurable:!0}),x="Tabs",[U,oe]=S(x,[k]),C=k(),[q,y]=U(x),z=b.forwardRef(v(function(t,a){const{__scopeTabs:r,value:s,onValueChange:o,defaultValue:d,orientation:i="horizontal",dir:l,activationMode:g="automatic",...m}=t,u=E(l),[c,f]=I({prop:s,onChange:o,defaultProp:d??"",caller:x});return n.jsx(q,{scope:r,baseId:N(),value:c,onValueChange:f,orientation:i,dir:u,activationMode:g,children:n.jsx(p.div,{dir:u,"data-orientation":i,...m,ref:a})})},"Tabs")),H="TabsList",B=b.forwardRef(v(function(t,a){const{__scopeTabs:r,loop:s=!0,...o}=t,d=y(H,r),i=C(r);return n.jsx(R,{asChild:!0,...i,orientation:d.orientation,dir:d.dir,loop:s,children:n.jsx(p.div,{role:"tablist","aria-orientation":d.orientation,...o,ref:a})})},"TabsList")),Q="TabsTrigger",W=b.forwardRef(v(function(t,a){const{__scopeTabs:r,value:s,disabled:o=!1,...d}=t,i=y(Q,r),l=C(r),g=w(i.baseId,s),m=j(i.baseId,s),u=s===i.value;return n.jsx(A,{asChild:!0,...l,focusable:!o,active:u,children:n.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":m,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:g,...d,ref:a,onMouseDown:T(t.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?i.onValueChange(s):c.preventDefault()}),onKeyDown:T(t.onKeyDown,c=>{o||c.target!==c.currentTarget||[" ","Enter"].includes(c.key)&&i.onValueChange(s)}),onFocus:T(t.onFocus,()=>{const c=i.activationMode!=="manual";!u&&!o&&c&&i.onValueChange(s)})})})},"TabsTrigger")),X="TabsContent",J=b.forwardRef(v(function(t,a){const{__scopeTabs:r,value:s,forceMount:o,children:d,...i}=t,l=y(X,r),g=w(l.baseId,s),m=j(l.baseId,s),u=s===l.value,c=b.useRef(u);return b.useEffect(()=>{const f=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(f)},[]),n.jsx(_,{present:o||u,children:({present:f})=>n.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":g,hidden:!f,id:m,tabIndex:0,...i,ref:a,style:{...t.style,animationDuration:c.current?"0s":void 0},children:f&&d})})},"TabsContent"));function w(e,t){return`${e}-trigger-${t}`}v(w,"makeTriggerId");function j(e,t){return`${e}-content-${t}`}v(j,"makeContentId");var Y=z,Z=B,ee=W,te=J;function ie({...e}){return n.jsx(Y,{"data-slot":"tabs",...e})}function ce({className:e,responsive:t=!0,...a}){return n.jsx(Z,{"data-slot":"tabs-list",className:h("bg-dui-muted text-dui-muted-foreground inline-flex items-center justify-center rounded-lg p-1",t?M:"h-9",e),...a})}function ue({className:e,...t}){return n.jsx(ee,{"data-slot":"tabs-trigger",className:h("ring-offset-dui-background inline-flex items-center justify-center rounded-md px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-[color,background-color,box-shadow,opacity] motion-reduce:transition-none! md:py-1","focus-visible:ring-dui-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-dui-background data-[state=active]:text-dui-foreground data-[state=active]:shadow",e),...t})}function de({className:e,...t}){return n.jsx(te,{"data-slot":"tabs-content",className:h("ring-offset-dui-background mt-2","data-[state=active]:animate-in data-[state=active]:fade-in-0 data-[state=active]:duration-150 motion-reduce:animate-none!","focus-visible:ring-dui-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...t})}const ae={default:!1,plan:!1,acceptEdits:!1,dontAsk:!0,bypassPermissions:!0,auto:!0};function le(e){return ae[e]??!1}function se(e){try{return O.toString(e)}catch{return`On the schedule ${e}`}}function fe(e){const t=e.cron?se(e.cron):"Runs only when you ask",a=$(e.startsEnabled);return`${t}, ${a}. This job ${D(e.permissionMode)}.`}function be(e,t){const a=F(),{enabled:r=!0,...s}=t??{},o=Object.keys(s).length>0;return V({queryKey:G.permissionPreview(e??"",o?s:void 0),queryFn:()=>a.previewMarketplacePackage(e,o?s:void 0),enabled:r&&e!==null,staleTime:3e4,networkMode:"always"})}function P(e){const t=e==null?void 0:e.body,a=Array.isArray(t==null?void 0:t.errors)?t.errors.filter(r=>typeof r=="string"):[];return a.length>0?{reasons:a,checked:!0}:{reasons:e instanceof Error&&e.message?[e.message]:[],checked:!1}}function ve(e){return P(e).checked}function ge({error:e}){const{reasons:t,checked:a}=P(e);return n.jsxs("div",{role:"alert",className:"border-destructive/40 bg-destructive/5 space-y-2 rounded-md border p-3 text-sm",children:[n.jsxs("p",{className:"text-destructive flex items-center gap-2 font-medium",children:[n.jsx(L,{className:"size-4 shrink-0","aria-hidden":!0}),"DorkOS won’t install this package"]}),n.jsx("p",{className:"text-muted-foreground text-xs",children:a?"What it found:":"It couldn’t check what this package does."}),t.length>0&&n.jsx("ul",{className:"text-muted-foreground list-disc space-y-1 pl-5 text-xs [overflow-wrap:anywhere]",children:t.map(r=>n.jsx("li",{children:r},r))})]})}export{ge as P,ie as T,ce as a,ue as b,de as c,fe as d,ve as i,le as r,be as u};
@@ -1 +1 @@
1
- import{r as x,t as S,j as e,bm as u,bn as h,bo as m,g as E,B as d,I as p,bp as g,bq as b}from"./index-CMaIfS_G.js";import{u as y,a as C,b as f,c as k,h as A,d as F,n as I}from"./profile-errors-C-4JXW0u.js";import{u as j}from"./use-mounted-ref-B5J2da-A.js";function v(t){const[r,a]=x.useState(t),[n,s]=x.useState(t);return n!==t&&(s(t),a(t)),[r,a]}const D="image/png,image/jpeg,image/webp";function l({tone:t,children:r}){return e.jsx("p",{role:t==="error"?"alert":"status",className:t==="error"?"text-destructive text-xs":"text-muted-foreground text-xs",children:r})}function H({member:t}){const r=S(t),a=x.useRef(null),n=y(),s=C();function c(i){const o=i==null?void 0:i[0];o&&(n.mutate({file:o}),a.current&&(a.current.value=""))}return e.jsx(u,{children:e.jsxs(h,{className:"space-y-3",children:[e.jsx(m,{label:"Photo",description:"PNG, JPEG or WebP, up to 2 MB.",orientation:"vertical",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(E,{size:"lg",kind:r.kind,color:r.color,emoji:r.emoji,imageUrl:r.imageUrl,fallback:r.fallback,origin:r.origin}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("input",{ref:a,type:"file",accept:D,className:"hidden","data-testid":"profile-photo-input",onChange:i=>c(i.target.files)}),e.jsx(d,{size:"sm",variant:"outline",disabled:n.isPending,onClick:()=>{var i;return(i=a.current)==null?void 0:i.click()},children:t.imageUrl?"Change photo":"Upload a photo"}),t.imageUrl&&e.jsx(d,{size:"sm",variant:"ghost",disabled:s.isPending,onClick:()=>s.mutate(),children:"Remove"})]})]})}),n.isError&&e.jsx(l,{tone:"error",children:f(n.error)}),s.isError&&e.jsx(l,{tone:"error",children:f(s.error)})]})})}function L({member:t}){const r=j(),a=F({isShownInline:()=>r.current}),n=t.displayName===g?"":t.displayName,[s,c]=v(n),i=b(t),o=s.trim().length>0&&s.trim()!==n,N=s.trim().length>0&&(o||i!==null);return e.jsx(u,{children:e.jsxs(h,{className:"space-y-3",children:[e.jsx(m,{label:"Display name",description:i?`${i}. Save it to make it yours.`:"What DorkOS calls you.",orientation:"vertical",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{value:s,maxLength:80,"aria-label":"Display name",placeholder:g,onChange:P=>c(P.target.value)}),e.jsx(d,{size:"sm",disabled:!N||a.isPending,onClick:()=>a.mutate(s.trim()),children:"Save"})]})}),a.isError&&e.jsx(l,{tone:"error",children:I(a.error)}),a.isSuccess&&s.trim()===a.variables&&e.jsx(l,{tone:"ok",children:"Saved."})]})})}function w({member:t}){var i;const r=j(),a=k({isShownInline:()=>r.current}),[n,s]=v(t.handle??""),c=n.trim()!==(t.handle??"");return e.jsx(u,{children:e.jsxs(h,{className:"space-y-3",children:[e.jsx(m,{label:"Handle",description:"What others type after @ to reach you.",orientation:"vertical",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{value:n,maxLength:64,placeholder:"yourname","aria-label":"Handle",onChange:o=>s(o.target.value)}),e.jsx(d,{size:"sm",disabled:!c||a.isPending,onClick:()=>a.mutate({authorId:t.id,handle:n.trim()}),children:"Save"})]})}),a.isError&&e.jsx(l,{tone:"error",children:A(a.error,n.trim())}),a.isSuccess&&n.trim()===((i=a.variables)==null?void 0:i.handle)&&e.jsx(l,{tone:"ok",children:"Saved."})]})})}function z({member:t}){var r,a;return e.jsx(u,{children:e.jsx(h,{children:e.jsx(m,{label:"Email",description:(r=t.person)!=null&&r.email?"Your sign-in email. It stays fixed.":"No login on this machine. Turn one on in Settings › Login & security.",orientation:"vertical",children:e.jsx(p,{readOnly:!0,"aria-label":"Email",value:((a=t.person)==null?void 0:a.email)??"",placeholder:"No email on this machine",className:"text-muted-foreground"})})})})}export{l as F,L as P,w as a,H as b,z as c,v as u};
1
+ import{r as x,t as S,j as e,bd as u,be as h,bf as m,g as E,B as d,I as p,bg as g,bh as b}from"./index-C8-dwIPp.js";import{u as y,a as C,b as f,c as k,h as A,d as F,n as I}from"./profile-errors-CFZN0y6a.js";import{u as j}from"./use-mounted-ref-DuK0vm9N.js";function v(t){const[r,a]=x.useState(t),[n,s]=x.useState(t);return n!==t&&(s(t),a(t)),[r,a]}const D="image/png,image/jpeg,image/webp";function l({tone:t,children:r}){return e.jsx("p",{role:t==="error"?"alert":"status",className:t==="error"?"text-destructive text-xs":"text-muted-foreground text-xs",children:r})}function H({member:t}){const r=S(t),a=x.useRef(null),n=y(),s=C();function c(i){const o=i==null?void 0:i[0];o&&(n.mutate({file:o}),a.current&&(a.current.value=""))}return e.jsx(u,{children:e.jsxs(h,{className:"space-y-3",children:[e.jsx(m,{label:"Photo",description:"PNG, JPEG or WebP, up to 2 MB.",orientation:"vertical",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(E,{size:"lg",kind:r.kind,color:r.color,emoji:r.emoji,imageUrl:r.imageUrl,fallback:r.fallback,origin:r.origin}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("input",{ref:a,type:"file",accept:D,className:"hidden","data-testid":"profile-photo-input",onChange:i=>c(i.target.files)}),e.jsx(d,{size:"sm",variant:"outline",disabled:n.isPending,onClick:()=>{var i;return(i=a.current)==null?void 0:i.click()},children:t.imageUrl?"Change photo":"Upload a photo"}),t.imageUrl&&e.jsx(d,{size:"sm",variant:"ghost",disabled:s.isPending,onClick:()=>s.mutate(),children:"Remove"})]})]})}),n.isError&&e.jsx(l,{tone:"error",children:f(n.error)}),s.isError&&e.jsx(l,{tone:"error",children:f(s.error)})]})})}function L({member:t}){const r=j(),a=F({isShownInline:()=>r.current}),n=t.displayName===g?"":t.displayName,[s,c]=v(n),i=b(t),o=s.trim().length>0&&s.trim()!==n,N=s.trim().length>0&&(o||i!==null);return e.jsx(u,{children:e.jsxs(h,{className:"space-y-3",children:[e.jsx(m,{label:"Display name",description:i?`${i}. Save it to make it yours.`:"What DorkOS calls you.",orientation:"vertical",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{value:s,maxLength:80,"aria-label":"Display name",placeholder:g,onChange:P=>c(P.target.value)}),e.jsx(d,{size:"sm",disabled:!N||a.isPending,onClick:()=>a.mutate(s.trim()),children:"Save"})]})}),a.isError&&e.jsx(l,{tone:"error",children:I(a.error)}),a.isSuccess&&s.trim()===a.variables&&e.jsx(l,{tone:"ok",children:"Saved."})]})})}function w({member:t}){var i;const r=j(),a=k({isShownInline:()=>r.current}),[n,s]=v(t.handle??""),c=n.trim()!==(t.handle??"");return e.jsx(u,{children:e.jsxs(h,{className:"space-y-3",children:[e.jsx(m,{label:"Handle",description:"What others type after @ to reach you.",orientation:"vertical",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{value:n,maxLength:64,placeholder:"yourname","aria-label":"Handle",onChange:o=>s(o.target.value)}),e.jsx(d,{size:"sm",disabled:!c||a.isPending,onClick:()=>a.mutate({authorId:t.id,handle:n.trim()}),children:"Save"})]})}),a.isError&&e.jsx(l,{tone:"error",children:A(a.error,n.trim())}),a.isSuccess&&n.trim()===((i=a.variables)==null?void 0:i.handle)&&e.jsx(l,{tone:"ok",children:"Saved."})]})})}function z({member:t}){var r,a;return e.jsx(u,{children:e.jsx(h,{children:e.jsx(m,{label:"Email",description:(r=t.person)!=null&&r.email?"Your sign-in email. It stays fixed.":"No login on this machine. Turn one on in Settings › Login & security.",orientation:"vertical",children:e.jsx(p,{readOnly:!0,"aria-label":"Email",value:((a=t.person)==null?void 0:a.email)??"",placeholder:"No email on this machine",className:"text-muted-foreground"})})})})}export{l as F,L as P,w as a,H as b,z as c,v as u};
@@ -1 +1 @@
1
- import{r as f,j as t,bm as D,bn as R,bo as E,dY as _,dZ as H,d_ as M,d$ as Z,e0 as A,Q as V,I as v,B as P,L as Y}from"./index-CMaIfS_G.js";import{F as j,b as $,P as B,a as K,c as G}from"./ProfileFields-xAsiq8Mz.js";import{u as I,P as Q,b as q}from"./ProfileRolePicker-CJYZpLNj.js";function U(e,s){if(e.length!==s.length)return!1;const n=new Set(s);return e.every(r=>n.has(r))}function J(){const{roles:e,isLoading:s,saveRoles:n}=I(),[r,i]=f.useState(e),[l,o]=f.useState(e),[d,u]=f.useState("idle"),[x,m]=f.useState(null);!s&&!U(l,e)&&(o(e),i(e));const h=()=>{u("saving"),n(r).then(()=>{u("idle"),m(r)}).catch(()=>u("error"))};return t.jsx(D,{children:t.jsxs(R,{className:"space-y-3",children:[t.jsx(E,{label:"What kind of work you do",description:"Only DorkBot and your agents read this. It stays on this machine.",orientation:"vertical",children:t.jsx(Q,{selected:r,onChange:i,onConfirm:h,confirmLabel:d==="saving"?"Saving…":"Save",busy:d==="saving"||s})}),d==="error"&&t.jsx(j,{tone:"error",children:"Couldn’t save that. Try again."}),d!=="error"&&x&&U(r,x)&&t.jsx(j,{tone:"ok",children:"Saved."})]})})}const X=Object.freeze({days:[1,2,3,4,5],start:"09:00",end:"17:00"});function ee(){return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}const k=new Map;function te(e){let s=k.get(e);return s||(s=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",weekday:"short"}),k.set(e,s)),s}const ne={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function w(e,s){const n={};for(const r of te(s).formatToParts(new Date(e)))n[r.type]=r.value;return{year:Number(n.year),month:Number(n.month),day:Number(n.day),hour:Number(n.hour),minute:Number(n.minute),second:Number(n.second),weekday:ne[n.weekday??""]??0}}function z(e,s){const n=w(e,s);return Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second)-Math.floor(e/1e3)*1e3}function se(e){const[s,n]=e.split(":").map(Number);return(s??0)*60+(n??0)}function ae(e,s,n,r,i){const l=se(r),o=Date.UTC(e,s-1,n,Math.floor(l/60),l%60),d=o-z(o-864e5,i),u=o-z(o+864e5,i),x=h=>{const y=w(h,i);return y.year===e&&y.month===s&&y.day===n&&y.hour*60+y.minute===l},m=[d,u].filter(x);return m.length>0?Math.min(...m):Math.max(d,u)}function re(e,s,n){const[r,i,l]=e.split("-").map(Number);return new Date(ae(r??1970,i??1,l??1,s,n))}function oe(e,s){const n=w(e.getTime(),s);return`${n.year}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}const ie=[{day:1,short:"M",name:"Monday"},{day:2,short:"T",name:"Tuesday"},{day:3,short:"W",name:"Wednesday"},{day:4,short:"T",name:"Thursday"},{day:5,short:"F",name:"Friday"},{day:6,short:"S",name:"Saturday"},{day:0,short:"S",name:"Sunday"}];function le(e){const s=typeof Intl.supportedValuesOf=="function"?Intl.supportedValuesOf("timeZone"):[];return s.includes(e)?s:[e,...s]}function de(e,s,n){const r=e??q()??ee(),i=s??X;return{timezone:r,days:[...i.days],start:i.start,end:i.end,awayUntil:n!=null&&n.until?oe(new Date(n.until),r):""}}function b(e,s){return e.timezone===s.timezone&&e.start===s.start&&e.end===s.end&&e.awayUntil===s.awayUntil&&[...e.days].sort().join()===[...s.days].sort().join()}function ue(e){return e.days.length===0?"Pick at least one working day.":!e.start||!e.end?"Set a start and an end time.":e.end<=e.start?"The day has to end after it starts.":null}function ce(e,s,n){return e.awayUntil===s.awayUntil?n:e.awayUntil?{...n,until:re(e.awayUntil,"00:00",e.timezone).toISOString()}:null}function me(){const{timezone:e,workingHours:s,away:n,isLoading:r,saveHours:i}=I(),l=de(e,s,n),[o,d]=f.useState(l),[u,x]=f.useState(l),[m,h]=f.useState("idle"),[y,C]=f.useState(null),[F,O]=f.useState(null);!r&&!b(u,l)&&(x(l),d(l));const p=ue(o),g=a=>d(c=>({...c,...a})),L=a=>g({days:o.days.includes(a)?o.days.filter(c=>c!==a):[...o.days,a]}),W=()=>{if(p)return;h("saving");const a=o;i({timezone:a.timezone,workingHours:{days:[...a.days].sort((c,S)=>c-S),start:a.start,end:a.end},away:ce(a,u,n)}).then(()=>{h("idle"),C(null),O(a)}).catch(c=>{h("error"),C(c instanceof Error?c.message:null)})};return t.jsx(D,{children:t.jsxs(R,{className:"space-y-4",children:[t.jsx(E,{label:"Your hours",description:"Your time zone and working hours.",orientation:"vertical",children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("label",{htmlFor:"profile-timezone",className:"text-muted-foreground text-xs",children:"Time zone"}),t.jsxs(_,{value:o.timezone,onValueChange:a=>g({timezone:a}),children:[t.jsx(H,{id:"profile-timezone",className:"h-8 text-sm",responsive:!1,children:t.jsx(M,{})}),t.jsx(Z,{children:le(o.timezone).map(a=>t.jsx(A,{value:a,responsive:!1,children:a.replace(/_/g," ")},a))})]})]}),t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{id:"profile-days-label",className:"text-muted-foreground text-xs",children:"Working days"}),t.jsx("div",{role:"group","aria-labelledby":"profile-days-label",className:"flex gap-1",children:ie.map(({day:a,short:c,name:S})=>{const T=o.days.includes(a);return t.jsx("button",{type:"button","aria-label":S,"aria-pressed":T,onClick:()=>L(a),className:V("size-8 rounded-md border text-xs font-medium",T?"bg-primary text-primary-foreground border-transparent":"text-muted-foreground hover:bg-accent"),children:c},a)})})]}),t.jsxs("div",{className:"flex gap-3",children:[t.jsxs("div",{className:"flex-1 space-y-1",children:[t.jsx("label",{htmlFor:"profile-hours-start",className:"text-muted-foreground text-xs",children:"Start"}),t.jsx(v,{id:"profile-hours-start",type:"time",value:o.start,onChange:a=>g({start:a.target.value})})]}),t.jsxs("div",{className:"flex-1 space-y-1",children:[t.jsx("label",{htmlFor:"profile-hours-end",className:"text-muted-foreground text-xs",children:"End"}),t.jsx(v,{id:"profile-hours-end",type:"time",value:o.end,onChange:a=>g({end:a.target.value})})]})]}),t.jsxs("div",{className:"space-y-1",children:[t.jsx("label",{htmlFor:"profile-away-until",className:"text-muted-foreground text-xs",children:"Away until"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(v,{id:"profile-away-until",type:"date",value:o.awayUntil,onChange:a=>g({awayUntil:a.target.value})}),o.awayUntil&&t.jsx(P,{type:"button",variant:"ghost",size:"sm",onClick:()=>g({awayUntil:""}),children:"Clear"})]})]})]})}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(P,{type:"button",size:"sm",onClick:W,disabled:r||m==="saving"||p!==null||b(o,u),children:m==="saving"?"Saving…":"Save"}),p&&t.jsx(j,{tone:"error",children:p}),!p&&m==="error"&&t.jsx(j,{tone:"error",children:y??"Couldn’t save that. Try again."}),!p&&m!=="error"&&F&&b(o,F)&&t.jsx(j,{tone:"ok",children:"Saved."})]})]})})}function fe({member:e}){return t.jsxs("div",{className:"space-y-4",children:[t.jsx("p",{className:"text-muted-foreground text-sm",children:"How you appear on your team page, in rooms and beside your messages."}),t.jsx($,{member:e}),t.jsx(B,{member:e}),t.jsx(K,{member:e}),t.jsx(G,{member:e}),t.jsx(J,{}),t.jsx(me,{})]})}function N({children:e}){return t.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:e})}function pe(){var n;const e=Y(),s=(n=e.data)==null?void 0:n.members.find(r=>r.isSelf);return e.isPending?t.jsx(N,{children:"Loading your profile…"}):e.isError?t.jsx(N,{children:"Couldn’t load your profile. Reopen this tab to try again."}):s?t.jsx(fe,{member:s}):t.jsx(N,{children:"Couldn’t find your profile. Reopen this tab to try again."})}export{fe as P,pe as a};
1
+ import{r as f,j as t,bd as D,be as R,bf as E,dP as H,dQ as M,dR as _,dS as Z,dT as A,G as V,I as v,B as P,z as B}from"./index-C8-dwIPp.js";import{F as j,b as K,P as Y,a as $,c as G}from"./ProfileFields-D4p6bhIa.js";import{u as I,P as Q,b as q}from"./ProfileRolePicker-qRf3DSdk.js";function U(e,s){if(e.length!==s.length)return!1;const n=new Set(s);return e.every(r=>n.has(r))}function J(){const{roles:e,isLoading:s,saveRoles:n}=I(),[r,i]=f.useState(e),[l,o]=f.useState(e),[d,u]=f.useState("idle"),[x,m]=f.useState(null);!s&&!U(l,e)&&(o(e),i(e));const h=()=>{u("saving"),n(r).then(()=>{u("idle"),m(r)}).catch(()=>u("error"))};return t.jsx(D,{children:t.jsxs(R,{className:"space-y-3",children:[t.jsx(E,{label:"What kind of work you do",description:"Only DorkBot and your agents read this. It stays on this machine.",orientation:"vertical",children:t.jsx(Q,{selected:r,onChange:i,onConfirm:h,confirmLabel:d==="saving"?"Saving…":"Save",busy:d==="saving"||s})}),d==="error"&&t.jsx(j,{tone:"error",children:"Couldn’t save that. Try again."}),d!=="error"&&x&&U(r,x)&&t.jsx(j,{tone:"ok",children:"Saved."})]})})}const X=Object.freeze({days:[1,2,3,4,5],start:"09:00",end:"17:00"});function ee(){return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}const k=new Map;function te(e){let s=k.get(e);return s||(s=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",weekday:"short"}),k.set(e,s)),s}const ne={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function w(e,s){const n={};for(const r of te(s).formatToParts(new Date(e)))n[r.type]=r.value;return{year:Number(n.year),month:Number(n.month),day:Number(n.day),hour:Number(n.hour),minute:Number(n.minute),second:Number(n.second),weekday:ne[n.weekday??""]??0}}function z(e,s){const n=w(e,s);return Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second)-Math.floor(e/1e3)*1e3}function se(e){const[s,n]=e.split(":").map(Number);return(s??0)*60+(n??0)}function ae(e,s,n,r,i){const l=se(r),o=Date.UTC(e,s-1,n,Math.floor(l/60),l%60),d=o-z(o-864e5,i),u=o-z(o+864e5,i),x=h=>{const y=w(h,i);return y.year===e&&y.month===s&&y.day===n&&y.hour*60+y.minute===l},m=[d,u].filter(x);return m.length>0?Math.min(...m):Math.max(d,u)}function re(e,s,n){const[r,i,l]=e.split("-").map(Number);return new Date(ae(r??1970,i??1,l??1,s,n))}function oe(e,s){const n=w(e.getTime(),s);return`${n.year}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}const ie=[{day:1,short:"M",name:"Monday"},{day:2,short:"T",name:"Tuesday"},{day:3,short:"W",name:"Wednesday"},{day:4,short:"T",name:"Thursday"},{day:5,short:"F",name:"Friday"},{day:6,short:"S",name:"Saturday"},{day:0,short:"S",name:"Sunday"}];function le(e){const s=typeof Intl.supportedValuesOf=="function"?Intl.supportedValuesOf("timeZone"):[];return s.includes(e)?s:[e,...s]}function de(e,s,n){const r=e??q()??ee(),i=s??X;return{timezone:r,days:[...i.days],start:i.start,end:i.end,awayUntil:n!=null&&n.until?oe(new Date(n.until),r):""}}function b(e,s){return e.timezone===s.timezone&&e.start===s.start&&e.end===s.end&&e.awayUntil===s.awayUntil&&[...e.days].sort().join()===[...s.days].sort().join()}function ue(e){return e.days.length===0?"Pick at least one working day.":!e.start||!e.end?"Set a start and an end time.":e.end<=e.start?"The day has to end after it starts.":null}function ce(e,s,n){return e.awayUntil===s.awayUntil?n:e.awayUntil?{...n,until:re(e.awayUntil,"00:00",e.timezone).toISOString()}:null}function me(){const{timezone:e,workingHours:s,away:n,isLoading:r,saveHours:i}=I(),l=de(e,s,n),[o,d]=f.useState(l),[u,x]=f.useState(l),[m,h]=f.useState("idle"),[y,T]=f.useState(null),[C,O]=f.useState(null);!r&&!b(u,l)&&(x(l),d(l));const p=ue(o),g=a=>d(c=>({...c,...a})),W=a=>g({days:o.days.includes(a)?o.days.filter(c=>c!==a):[...o.days,a]}),L=()=>{if(p)return;h("saving");const a=o;i({timezone:a.timezone,workingHours:{days:[...a.days].sort((c,S)=>c-S),start:a.start,end:a.end},away:ce(a,u,n)}).then(()=>{h("idle"),T(null),O(a)}).catch(c=>{h("error"),T(c instanceof Error?c.message:null)})};return t.jsx(D,{children:t.jsxs(R,{className:"space-y-4",children:[t.jsx(E,{label:"Your hours",description:"Your time zone and working hours.",orientation:"vertical",children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("label",{htmlFor:"profile-timezone",className:"text-muted-foreground text-xs",children:"Time zone"}),t.jsxs(H,{value:o.timezone,onValueChange:a=>g({timezone:a}),children:[t.jsx(M,{id:"profile-timezone",className:"h-8 text-sm",responsive:!1,children:t.jsx(_,{})}),t.jsx(Z,{children:le(o.timezone).map(a=>t.jsx(A,{value:a,responsive:!1,children:a.replace(/_/g," ")},a))})]})]}),t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{id:"profile-days-label",className:"text-muted-foreground text-xs",children:"Working days"}),t.jsx("div",{role:"group","aria-labelledby":"profile-days-label",className:"flex gap-1",children:ie.map(({day:a,short:c,name:S})=>{const F=o.days.includes(a);return t.jsx("button",{type:"button","aria-label":S,"aria-pressed":F,onClick:()=>W(a),className:V("size-8 rounded-md border text-xs font-medium",F?"bg-primary text-primary-foreground border-transparent":"text-muted-foreground hover:bg-accent"),children:c},a)})})]}),t.jsxs("div",{className:"flex gap-3",children:[t.jsxs("div",{className:"flex-1 space-y-1",children:[t.jsx("label",{htmlFor:"profile-hours-start",className:"text-muted-foreground text-xs",children:"Start"}),t.jsx(v,{id:"profile-hours-start",type:"time",value:o.start,onChange:a=>g({start:a.target.value})})]}),t.jsxs("div",{className:"flex-1 space-y-1",children:[t.jsx("label",{htmlFor:"profile-hours-end",className:"text-muted-foreground text-xs",children:"End"}),t.jsx(v,{id:"profile-hours-end",type:"time",value:o.end,onChange:a=>g({end:a.target.value})})]})]}),t.jsxs("div",{className:"space-y-1",children:[t.jsx("label",{htmlFor:"profile-away-until",className:"text-muted-foreground text-xs",children:"Away until"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(v,{id:"profile-away-until",type:"date",value:o.awayUntil,onChange:a=>g({awayUntil:a.target.value})}),o.awayUntil&&t.jsx(P,{type:"button",variant:"ghost",size:"sm",onClick:()=>g({awayUntil:""}),children:"Clear"})]})]})]})}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(P,{type:"button",size:"sm",onClick:L,disabled:r||m==="saving"||p!==null||b(o,u),children:m==="saving"?"Saving…":"Save"}),p&&t.jsx(j,{tone:"error",children:p}),!p&&m==="error"&&t.jsx(j,{tone:"error",children:y??"Couldn’t save that. Try again."}),!p&&m!=="error"&&C&&b(o,C)&&t.jsx(j,{tone:"ok",children:"Saved."})]})]})})}function fe({member:e}){return t.jsxs("div",{className:"space-y-4",children:[t.jsx("p",{className:"text-muted-foreground text-sm",children:"How you appear on your team page, in rooms and beside your messages."}),t.jsx(K,{member:e}),t.jsx(Y,{member:e}),t.jsx($,{member:e}),t.jsx(G,{member:e}),t.jsx(J,{}),t.jsx(me,{})]})}function N({children:e}){return t.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:e})}function pe(){var n;const e=B(),s=(n=e.data)==null?void 0:n.members.find(r=>r.isSelf);return e.isPending?t.jsx(N,{children:"Loading your profile…"}):e.isError?t.jsx(N,{children:"Couldn’t load your profile. Reopen this tab to try again."}):s?t.jsx(fe,{member:s}):t.jsx(N,{children:"Couldn’t find your profile. Reopen this tab to try again."})}export{fe as P,pe as a};
@@ -1 +1 @@
1
- import{a8 as O,aa as E,a9 as S,aA as h,ab as j,az as D,ek as T,r as b,j as l,Q as z,I as q,B as k}from"./index-CMaIfS_G.js";function B(){var a,d,c,m,g,p;const r=O(),s=E(),{data:e,isLoading:o}=S({queryKey:h.current(),queryFn:()=>r.getConfig(),staleTime:T}),i=j({mutationKey:D,mutationFn:u=>r.updateConfig({profile:u}),onSuccess:()=>{s.invalidateQueries({queryKey:h.all})}});return{roles:((a=e==null?void 0:e.profile)==null?void 0:a.roles)??[],rolePromptDismissedAt:((d=e==null?void 0:e.profile)==null?void 0:d.rolePromptDismissedAt)??null,identityPromptDismissedAt:((c=e==null?void 0:e.profile)==null?void 0:c.identityPromptDismissedAt)??null,timezone:((m=e==null?void 0:e.profile)==null?void 0:m.timezone)??null,workingHours:((g=e==null?void 0:e.profile)==null?void 0:g.workingHours)??null,away:((p=e==null?void 0:e.profile)==null?void 0:p.away)??null,isLoading:o,saveHours:u=>i.mutateAsync(u).then(()=>{}),saveRoles:u=>i.mutateAsync({roles:u}).then(()=>{}),dismissRolePrompt:()=>i.mutateAsync({rolePromptDismissedAt:new Date().toISOString()}).then(()=>{}),dismissIdentityPrompt:()=>i.mutateAsync({identityPromptDismissedAt:new Date().toISOString()}).then(()=>{})}}let x=!1;function K(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}}function G(){const r=O(),s=E(),{data:e,isSuccess:o}=S({queryKey:h.current(),queryFn:()=>r.getConfig(),staleTime:T}),i=e==null?void 0:e.profile;b.useEffect(()=>{if(x||!o||!i)return;if(i.timezone!=null){x=!0;return}const a=K();a&&(x=!0,r.updateConfig({profile:{timezone:a}}).then(()=>s.invalidateQueries({queryKey:h.all})).catch(()=>{}))},[o,i,r,s])}const w=[{id:"software-development",label:"Building software"},{id:"hiring",label:"Hiring people"},{id:"marketing",label:"Marketing"},{id:"writing",label:"Writing"},{id:"research",label:"Research"},{id:"business-ops",label:"Running a business"},{id:"design",label:"Design"},{id:"sales",label:"Sales"}],M=6,F={developer:"software-development",engineer:"software-development",programmer:"software-development",coder:"software-development","software engineer":"software-development",recruiter:"hiring",recruiting:"hiring",talent:"hiring",marketer:"marketing",growth:"marketing",writer:"writing",author:"writing",researcher:"research",scientist:"research",founder:"business-ops",entrepreneur:"business-ops",operations:"business-ops",ops:"business-ops",designer:"design",seller:"sales",salesperson:"sales"};function H(r){var i;const s=r.trim().toLowerCase();if(s.length===0)return;const e=w.find(a=>a.id===s);if(e)return e.id;const o=F[s];return o||((i=w.find(a=>a.label.toLowerCase()===s))==null?void 0:i.id)}const A=10,N=60;function v(r,s){const e=s.trim().toLowerCase();return r.some(o=>o.trim().toLowerCase()===e)}function W({selected:r,onChange:s,onConfirm:e,confirmLabel:o,onSkip:i,skipLabel:a,busy:d=!1,error:c=null}){const[m,g]=b.useState(!1),[p,u]=b.useState(""),C=b.useRef(null),y=w.slice(0,M),I=r.filter(t=>!y.some(n=>n.id===t)),f=r.length>=A,P=t=>{v(r,t)?s(r.filter(n=>n!==t)):f||s([...r,t])},L=()=>{const t=p.trim().slice(0,N);if(!t)return;const n=H(t),R=n&&y.some(_=>_.id===n)?n:t;!v(r,R)&&r.length<A&&s([...r,R]),u("")};return l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs("div",{className:"flex flex-wrap gap-1.5",role:"group","aria-label":"What kind of work you do",children:[y.map(t=>{const n=v(r,t.id);return l.jsx("button",{type:"button","aria-pressed":n,disabled:f&&!n,onClick:()=>P(t.id),className:z("focus-visible:ring-ring rounded-md border px-2.5 py-1 text-xs transition-colors duration-150 focus-visible:ring-2 focus-visible:outline-none disabled:opacity-50",n?"border-primary bg-primary text-primary-foreground":"border-input bg-background text-foreground hover:bg-accent"),children:t.label},t.id)}),I.map(t=>l.jsx("button",{type:"button","aria-pressed":!0,onClick:()=>s(r.filter(n=>n!==t)),className:"border-primary bg-primary text-primary-foreground focus-visible:ring-ring rounded-md border px-2.5 py-1 text-xs transition-colors duration-150 focus-visible:ring-2 focus-visible:outline-none",children:t},t)),!m&&l.jsx("button",{type:"button",disabled:f,onClick:()=>{g(!0),setTimeout(()=>{var t;return(t=C.current)==null?void 0:t.focus()},0)},className:"border-input text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:ring-ring rounded-md border border-dashed px-2.5 py-1 text-xs transition-colors duration-150 focus-visible:ring-2 focus-visible:outline-none disabled:opacity-50",children:"Something else"})]}),f&&l.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"profile-role-cap-hint",children:"Ten at most. Remove a role to add another."}),m&&!f&&l.jsx(q,{ref:C,value:p,onChange:t=>u(t.target.value),onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),L())},maxLength:N,placeholder:"Type your work and press Enter","aria-label":"Something else: describe your work",className:"h-8 text-xs"}),c&&l.jsx("p",{className:"text-destructive text-sm",role:"alert","data-testid":"profile-save-error",children:c}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(k,{size:"sm",onClick:e,disabled:d||r.length===0,"data-testid":"confirm-profile",children:o}),i&&l.jsx(k,{size:"sm",variant:"ghost",onClick:i,disabled:d,"data-testid":"skip-profile",children:a})]})]})}export{W as P,G as a,K as b,B as u};
1
+ import{a1 as O,a3 as E,a2 as S,at as h,a4 as j,as as D,eb as T,r as b,j as l,G as z,I as q,B as k}from"./index-C8-dwIPp.js";function B(){var a,d,c,m,g,p;const r=O(),s=E(),{data:e,isLoading:o}=S({queryKey:h.current(),queryFn:()=>r.getConfig(),staleTime:T}),i=j({mutationKey:D,mutationFn:u=>r.updateConfig({profile:u}),onSuccess:()=>{s.invalidateQueries({queryKey:h.all})}});return{roles:((a=e==null?void 0:e.profile)==null?void 0:a.roles)??[],rolePromptDismissedAt:((d=e==null?void 0:e.profile)==null?void 0:d.rolePromptDismissedAt)??null,identityPromptDismissedAt:((c=e==null?void 0:e.profile)==null?void 0:c.identityPromptDismissedAt)??null,timezone:((m=e==null?void 0:e.profile)==null?void 0:m.timezone)??null,workingHours:((g=e==null?void 0:e.profile)==null?void 0:g.workingHours)??null,away:((p=e==null?void 0:e.profile)==null?void 0:p.away)??null,isLoading:o,saveHours:u=>i.mutateAsync(u).then(()=>{}),saveRoles:u=>i.mutateAsync({roles:u}).then(()=>{}),dismissRolePrompt:()=>i.mutateAsync({rolePromptDismissedAt:new Date().toISOString()}).then(()=>{}),dismissIdentityPrompt:()=>i.mutateAsync({identityPromptDismissedAt:new Date().toISOString()}).then(()=>{})}}let x=!1;function K(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}}function Q(){const r=O(),s=E(),{data:e,isSuccess:o}=S({queryKey:h.current(),queryFn:()=>r.getConfig(),staleTime:T}),i=e==null?void 0:e.profile;b.useEffect(()=>{if(x||!o||!i)return;if(i.timezone!=null){x=!0;return}const a=K();a&&(x=!0,r.updateConfig({profile:{timezone:a}}).then(()=>s.invalidateQueries({queryKey:h.all})).catch(()=>{}))},[o,i,r,s])}const w=[{id:"software-development",label:"Building software"},{id:"hiring",label:"Hiring people"},{id:"marketing",label:"Marketing"},{id:"writing",label:"Writing"},{id:"research",label:"Research"},{id:"business-ops",label:"Running a business"},{id:"design",label:"Design"},{id:"sales",label:"Sales"}],M=6,F={developer:"software-development",engineer:"software-development",programmer:"software-development",coder:"software-development","software engineer":"software-development",recruiter:"hiring",recruiting:"hiring",talent:"hiring",marketer:"marketing",growth:"marketing",writer:"writing",author:"writing",researcher:"research",scientist:"research",founder:"business-ops",entrepreneur:"business-ops",operations:"business-ops",ops:"business-ops",designer:"design",seller:"sales",salesperson:"sales"};function H(r){var i;const s=r.trim().toLowerCase();if(s.length===0)return;const e=w.find(a=>a.id===s);if(e)return e.id;const o=F[s];return o||((i=w.find(a=>a.label.toLowerCase()===s))==null?void 0:i.id)}const A=10,N=60;function v(r,s){const e=s.trim().toLowerCase();return r.some(o=>o.trim().toLowerCase()===e)}function W({selected:r,onChange:s,onConfirm:e,confirmLabel:o,onSkip:i,skipLabel:a,busy:d=!1,error:c=null}){const[m,g]=b.useState(!1),[p,u]=b.useState(""),C=b.useRef(null),y=w.slice(0,M),I=r.filter(t=>!y.some(n=>n.id===t)),f=r.length>=A,P=t=>{v(r,t)?s(r.filter(n=>n!==t)):f||s([...r,t])},L=()=>{const t=p.trim().slice(0,N);if(!t)return;const n=H(t),R=n&&y.some(_=>_.id===n)?n:t;!v(r,R)&&r.length<A&&s([...r,R]),u("")};return l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs("div",{className:"flex flex-wrap gap-1.5",role:"group","aria-label":"What kind of work you do",children:[y.map(t=>{const n=v(r,t.id);return l.jsx("button",{type:"button","aria-pressed":n,disabled:f&&!n,onClick:()=>P(t.id),className:z("focus-visible:ring-ring rounded-md border px-2.5 py-1 text-xs transition-colors duration-150 focus-visible:ring-2 focus-visible:outline-none disabled:opacity-50",n?"border-primary bg-primary text-primary-foreground":"border-input bg-background text-foreground hover:bg-accent"),children:t.label},t.id)}),I.map(t=>l.jsx("button",{type:"button","aria-pressed":!0,onClick:()=>s(r.filter(n=>n!==t)),className:"border-primary bg-primary text-primary-foreground focus-visible:ring-ring rounded-md border px-2.5 py-1 text-xs transition-colors duration-150 focus-visible:ring-2 focus-visible:outline-none",children:t},t)),!m&&l.jsx("button",{type:"button",disabled:f,onClick:()=>{g(!0),setTimeout(()=>{var t;return(t=C.current)==null?void 0:t.focus()},0)},className:"border-input text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:ring-ring rounded-md border border-dashed px-2.5 py-1 text-xs transition-colors duration-150 focus-visible:ring-2 focus-visible:outline-none disabled:opacity-50",children:"Something else"})]}),f&&l.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"profile-role-cap-hint",children:"Ten at most. Remove a role to add another."}),m&&!f&&l.jsx(q,{ref:C,value:p,onChange:t=>u(t.target.value),onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),L())},maxLength:N,placeholder:"Type your work and press Enter","aria-label":"Something else: describe your work",className:"h-8 text-xs"}),c&&l.jsx("p",{className:"text-destructive text-sm",role:"alert","data-testid":"profile-save-error",children:c}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(k,{size:"sm",onClick:e,disabled:d||r.length===0,"data-testid":"confirm-profile",children:o}),i&&l.jsx(k,{size:"sm",variant:"ghost",onClick:i,disabled:d,"data-testid":"skip-profile",children:a})]})]})}export{W as P,Q as a,K as b,B as u};
@@ -1 +1 @@
1
- import{j as e,W as c,aT as l,Q as i}from"./index-CMaIfS_G.js";const p=4,m={compact:"max-w-[200px] gap-1.5 px-2.5 py-1 text-xs",comfortable:"min-h-9 max-w-[280px] gap-2 px-3 py-1.5 text-sm"};function u({suggestions:o,onChipClick:s,ariaLabel:r="Suggested follow-ups",size:a="compact"}){const n=o.slice(0,p);return e.jsx(c.div,{"data-slot":"prompt-suggestion-chips",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},role:"group","aria-label":r,className:"mt-1.5 flex flex-wrap items-center gap-2",children:n.map(t=>e.jsxs("button",{type:"button","aria-label":t,title:t,onClick:()=>s(t),className:i("bg-secondary text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:ring-ring inline-flex items-center truncate rounded-md transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-offset-2",m[a]),children:[e.jsx(l,{className:i("shrink-0",a==="compact"?"size-3":"size-3.5")}),e.jsx("span",{className:"truncate",children:t})]},t))})}export{u as P};
1
+ import{j as e,O as c,aM as l,G as i}from"./index-C8-dwIPp.js";const p=4,m={compact:"max-w-[200px] gap-1.5 px-2.5 py-1 text-xs",comfortable:"min-h-9 max-w-[280px] gap-2 px-3 py-1.5 text-sm"};function u({suggestions:o,onChipClick:s,ariaLabel:r="Suggested follow-ups",size:a="compact"}){const n=o.slice(0,p);return e.jsx(c.div,{"data-slot":"prompt-suggestion-chips",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},role:"group","aria-label":r,className:"mt-1.5 flex flex-wrap items-center gap-2",children:n.map(t=>e.jsxs("button",{type:"button","aria-label":t,title:t,onClick:()=>s(t),className:i("bg-secondary text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:ring-ring inline-flex items-center truncate rounded-md transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-offset-2",m[a]),children:[e.jsx(l,{className:i("shrink-0",a==="compact"?"size-3":"size-3.5")}),e.jsx("span",{className:"truncate",children:t})]},t))})}export{u as P};
@@ -1 +1 @@
1
- import{r as g,b as O,L as P,j as e,e as D,N as _,O as U,Q as C,t as z,g as F,R as M,T as Y}from"./index-CMaIfS_G.js";import{u as q}from"./use-mounted-ref-B5J2da-A.js";const A="REPORTS_TO_CYCLE",B="text-muted-foreground text-3xs font-medium tracking-wider uppercase";function H({option:a,selected:d,focusable:i,isDefault:p,disabled:x,onPick:c}){const n=z(a.member);return e.jsxs("button",{type:"button",role:"radio","aria-checked":d,tabIndex:i?0:-1,disabled:x,onClick:c,className:C(Y,"flex w-full min-w-0 items-center gap-2 rounded-md px-1.5 py-1 text-left text-sm","hover:bg-accent disabled:opacity-60"),children:[e.jsx(F,{size:"xs",kind:n.kind,color:n.color,emoji:n.emoji,imageUrl:n.imageUrl,fallback:n.fallback,origin:n.origin,badge:null}),e.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[a.label,p&&e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{className:"text-muted-foreground",children:"(default)"})]})]}),d&&e.jsx(M,{"aria-hidden":!0,className:"size-3.5 shrink-0"})]})}function W({member:a}){var y,R;const d=q(),i=g.useRef(null),p=g.useId(),x=g.useId(),{agent:c,isPending:n,isSaving:h,error:u,update:b}=O(a,{errorLabel:"Couldn’t change who this agent reports to",isShownInline:t=>d.current===!0&&t.code===A}),j=P();if(n||j.isPending)return e.jsx(D,{className:"h-24 w-full"});if(!c)return e.jsx("p",{className:"text-muted-foreground p-1 text-sm",children:"Couldn’t read this agent’s settings."});const I=((y=j.data)==null?void 0:y.members)??[],l=_(c,I,a),m=U(c.id,I,a),E=m.some(t=>t.accountId===l.accountId)?l.accountId:((R=m[0])==null?void 0:R.accountId)??null,L=t=>{var v;const s=Array.from(((v=i.current)==null?void 0:v.querySelectorAll('[role="radio"]'))??[]),r=s.indexOf(document.activeElement),o={ArrowDown:r+1,ArrowRight:r+1,ArrowUp:r-1,ArrowLeft:r-1,Home:0,End:s.length-1}[t.key];if(o===void 0||s.length===0)return;t.preventDefault();const f=s[(o+s.length)%s.length];s.forEach(N=>N.tabIndex=N===f?0:-1),f==null||f.focus()},T=m.filter(t=>t.kind==="person"),S=m.filter(t=>t.kind==="agent"),k=(u==null?void 0:u.code)===A?u.message:null,w=(t,s,r)=>r.length>0&&e.jsxs("div",{role:"group","aria-labelledby":s,className:"space-y-0.5",children:[e.jsx("div",{id:s,className:C(B,"px-1.5"),children:t}),r.map(o=>e.jsx(H,{option:o,selected:l.accountId===o.accountId,focusable:E===o.accountId,isDefault:l.isDefault&&l.accountId===o.accountId,disabled:h,onPick:()=>{o.accountId!==c.reportsTo&&b({reportsTo:o.accountId})}},o.accountId))]});return e.jsxs("div",{className:"space-y-3 p-1","data-slot":"profile-reports-to",children:[e.jsxs("div",{ref:i,role:"radiogroup","aria-label":"Reports to",onKeyDown:L,className:"max-h-72 space-y-2 overflow-y-auto",children:[w("People",p,T),w("Agents",x,S)]}),k&&e.jsx("p",{role:"alert",className:"text-status-error px-1.5 text-xs",children:k}),!l.isDefault&&e.jsx("button",{type:"button",disabled:h,onClick:()=>b({reportsTo:null}),className:"text-muted-foreground hover:text-foreground px-1.5 text-xs underline-offset-2 hover:underline",children:"Use the default"})]})}export{W as ReportsToPopover};
1
+ import{r as g,b as D,z as P,j as e,e as O,D as _,F as U,G as C,t as z,g as F,J as K,K as M}from"./index-C8-dwIPp.js";import{u as Y}from"./use-mounted-ref-DuK0vm9N.js";const A="REPORTS_TO_CYCLE",q="text-muted-foreground text-3xs font-medium tracking-wider uppercase";function B({option:a,selected:d,focusable:i,isDefault:p,disabled:x,onPick:c}){const n=z(a.member);return e.jsxs("button",{type:"button",role:"radio","aria-checked":d,tabIndex:i?0:-1,disabled:x,onClick:c,className:C(M,"flex w-full min-w-0 items-center gap-2 rounded-md px-1.5 py-1 text-left text-sm","hover:bg-accent disabled:opacity-60"),children:[e.jsx(F,{size:"xs",kind:n.kind,color:n.color,emoji:n.emoji,imageUrl:n.imageUrl,fallback:n.fallback,origin:n.origin,badge:null}),e.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[a.label,p&&e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{className:"text-muted-foreground",children:"(default)"})]})]}),d&&e.jsx(K,{"aria-hidden":!0,className:"size-3.5 shrink-0"})]})}function J({member:a}){var y,R;const d=Y(),i=g.useRef(null),p=g.useId(),x=g.useId(),{agent:c,isPending:n,isSaving:h,error:u,update:b}=D(a,{errorLabel:"Couldn’t change who this agent reports to",isShownInline:t=>d.current===!0&&t.code===A}),j=P();if(n||j.isPending)return e.jsx(O,{className:"h-24 w-full"});if(!c)return e.jsx("p",{className:"text-muted-foreground p-1 text-sm",children:"Couldn’t read this agent’s settings."});const I=((y=j.data)==null?void 0:y.members)??[],l=_(c,I,a),m=U(c.id,I,a),E=m.some(t=>t.accountId===l.accountId)?l.accountId:((R=m[0])==null?void 0:R.accountId)??null,L=t=>{var v;const s=Array.from(((v=i.current)==null?void 0:v.querySelectorAll('[role="radio"]'))??[]),r=s.indexOf(document.activeElement),o={ArrowDown:r+1,ArrowRight:r+1,ArrowUp:r-1,ArrowLeft:r-1,Home:0,End:s.length-1}[t.key];if(o===void 0||s.length===0)return;t.preventDefault();const f=s[(o+s.length)%s.length];s.forEach(N=>N.tabIndex=N===f?0:-1),f==null||f.focus()},S=m.filter(t=>t.kind==="person"),T=m.filter(t=>t.kind==="agent"),k=(u==null?void 0:u.code)===A?u.message:null,w=(t,s,r)=>r.length>0&&e.jsxs("div",{role:"group","aria-labelledby":s,className:"space-y-0.5",children:[e.jsx("div",{id:s,className:C(q,"px-1.5"),children:t}),r.map(o=>e.jsx(B,{option:o,selected:l.accountId===o.accountId,focusable:E===o.accountId,isDefault:l.isDefault&&l.accountId===o.accountId,disabled:h,onPick:()=>{o.accountId!==c.reportsTo&&b({reportsTo:o.accountId})}},o.accountId))]});return e.jsxs("div",{className:"space-y-3 p-1","data-slot":"profile-reports-to",children:[e.jsxs("div",{ref:i,role:"radiogroup","aria-label":"Reports to",onKeyDown:L,className:"max-h-72 space-y-2 overflow-y-auto",children:[w("People",p,S),w("Agents",x,T)]}),k&&e.jsx("p",{role:"alert",className:"text-status-error px-1.5 text-xs",children:k}),!l.isDefault&&e.jsx("button",{type:"button",disabled:h,onClick:()=>b({reportsTo:null}),className:"text-muted-foreground hover:text-foreground px-1.5 text-xs underline-offset-2 hover:underline",children:"Use the default"})]})}export{J as ReportsToPopover};