@p4code/cli 0.9.7 → 0.9.8

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 (314) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/{binCli-BDhIHi_h.mjs → binCli-CLYknQ8Q.mjs} +2397 -3012
  3. package/dist/client/.vite/manifest.json +2000 -2001
  4. package/dist/client/assets/{2NI2N5EU-sFO2CLlt.js → 2NI2N5EU-D0DC_qzC.js} +2 -2
  5. package/dist/client/assets/{4UO7MD6I-CcT8Zfhc.js → 4UO7MD6I-CUZSFvTG.js} +2 -2
  6. package/dist/client/assets/{5B3SVYGG-Bd_wcJLx.js → 5B3SVYGG-5ibYwkgG.js} +2 -2
  7. package/dist/client/assets/{5GK6JWQ2-Cp0eFbVE.js → 5GK6JWQ2-DEtRbsDS.js} +2 -2
  8. package/dist/client/assets/{5N7A7DKN-Czpp-hnK.js → 5N7A7DKN-CwQP1dKj.js} +2 -2
  9. package/dist/client/assets/{5OC2THR4-C6OEDFC6.js → 5OC2THR4-BriFYPQx.js} +2 -2
  10. package/dist/client/assets/{5S6HY5KT-DUo-T0Pv.js → 5S6HY5KT-BBNxENgt.js} +2 -2
  11. package/dist/client/assets/{6IMQ5BUJ-ZY7dYS3y.js → 6IMQ5BUJ-xl7U-rLA.js} +2 -2
  12. package/dist/client/assets/{6OLKWJ4F-KMXuFNsu.js → 6OLKWJ4F-BGGDxoUW.js} +2 -2
  13. package/dist/client/assets/{74OO7NKP-aJ6kvSey.js → 74OO7NKP-9vkDTl8T.js} +2 -2
  14. package/dist/client/assets/{75O6YZUN-DIHv8J29.js → 75O6YZUN-B9ocscUs.js} +2 -2
  15. package/dist/client/assets/{77XECAW3-JuMUaReb.js → 77XECAW3-DQ3S_7U7.js} +2 -2
  16. package/dist/client/assets/{ABYRPUBD-2Yn9PEzm.js → ABYRPUBD-DFu3UszL.js} +2 -2
  17. package/dist/client/assets/AlertDialogRoot-Dxu9crTa.js +2 -0
  18. package/dist/client/assets/{AnimatedHeight-Cd_V66Dq.js → AnimatedHeight-DEH7bEtg.js} +2 -2
  19. package/dist/client/assets/{AuthSurfaceShell-z6JhHCp1.js → AuthSurfaceShell-DDlvsg4m.js} +2 -2
  20. package/dist/client/assets/{BB2UYUI2-D5xDmPxh.js → BB2UYUI2-DzdR7ZyB.js} +2 -2
  21. package/dist/client/assets/{BUM34MOA-B9FvXzqk.js → BUM34MOA-LkeHTV8a.js} +2 -2
  22. package/dist/client/assets/{CEQABKGZ-Dx_FGvDv.js → CEQABKGZ-BX1CWous.js} +2 -2
  23. package/dist/client/assets/{CXAC5362-DGpvh6KQ.js → CXAC5362-DMlUWuvv.js} +2 -2
  24. package/dist/client/assets/ChatGptUsageButton-CXEX1qrn.js +2 -0
  25. package/dist/client/assets/ChatMarkdown-yTbjRmgo.js +48 -0
  26. package/dist/client/assets/{CheckboxIndicator-mFuXoA30.js → CheckboxIndicator-DSA5Ujdj.js} +2 -2
  27. package/dist/client/assets/{ClippedText-3QYVxO0t.js → ClippedText-DlUFaCzw.js} +2 -2
  28. package/dist/client/assets/CodexSetupSection.logic-D3odRubx.js +2 -0
  29. package/dist/client/assets/{ComboboxClear-BNtFgSHF.js → ComboboxClear-DkaA60b7.js} +2 -2
  30. package/dist/client/assets/{ComboboxGroupLabel-sq7Mhle4.js → ComboboxGroupLabel-AEuoHUH8.js} +2 -2
  31. package/dist/client/assets/{CommandBlock-DHXlU5C7.js → CommandBlock-BUHVWYBr.js} +2 -2
  32. package/dist/client/assets/{ComposerPromptEditor-qOyyjScc.js → ComposerPromptEditor-zRTz5xec.js} +11 -11
  33. package/dist/client/assets/{CompositeRoot-DY7iUA_s.js → CompositeRoot-38NDvFsA.js} +2 -2
  34. package/dist/client/assets/{ConnectionDiagnosisDetails-xhfXplsX.js → ConnectionDiagnosisDetails-WKkRENJB.js} +2 -2
  35. package/dist/client/assets/{ConnectionStatusDot-BBmbajLh.js → ConnectionStatusDot-B-U5Wv6b.js} +2 -2
  36. package/dist/client/assets/{DRLTVNUE-v1NbOvdX.js → DRLTVNUE-CNkbJcIE.js} +2 -2
  37. package/dist/client/assets/{DYY6UVD2-Dgv-rkDR.js → DYY6UVD2-Csqmb0Yg.js} +2 -2
  38. package/dist/client/assets/{DevicePanel-Cyg1Yk9F.js → DevicePanel-B3G_KDJN.js} +2 -2
  39. package/dist/client/assets/DeviceSetup-DqTJRSli.js +2 -0
  40. package/dist/client/assets/{DialogTitle-9BKGozK3.js → DialogTitle-Bz-7IYD8.js} +2 -2
  41. package/dist/client/assets/{DiffCommentAnnotation-shKWlLXb.js → DiffCommentAnnotation-C3_yEiAB.js} +2 -2
  42. package/dist/client/assets/{DiffFileTree-Cw3IoBPF.js → DiffFileTree-BJxoYt-I.js} +2 -2
  43. package/dist/client/assets/DiffPanel-Bfxdj8td.js +2 -0
  44. package/dist/client/assets/{DiffWorkerPoolProvider-DwAxcJ_J.js → DiffWorkerPoolProvider-DPfZNt42.js} +3 -3
  45. package/dist/client/assets/{EmbeddedDesign-BwBy_4w8.js → EmbeddedDesign-CsCt-RW1.js} +5 -5
  46. package/dist/client/assets/{EnvironmentMachineIcon-KqncPHh8.js → EnvironmentMachineIcon-CKfntUmE.js} +2 -2
  47. package/dist/client/assets/{ExpandableText-CEDcsLah.js → ExpandableText-DGu2RH_j.js} +2 -2
  48. package/dist/client/assets/{FNOVOB4O-D_GK0hHx.js → FNOVOB4O-CH8BTfJM.js} +2 -2
  49. package/dist/client/assets/{FieldControl-CVCCrg1T.js → FieldControl-DAh0lUDV.js} +2 -2
  50. package/dist/client/assets/{FileDiff-CkTyrHs_.js → FileDiff-C1enHrMi.js} +2 -2
  51. package/dist/client/assets/{FilePreviewPanel-pD3XdWFT.js → FilePreviewPanel-67DQ3_gp.js} +5 -5
  52. package/dist/client/assets/{FoldedSettingsSection-VcaJg5wH.js → FoldedSettingsSection-CILGGC6I.js} +2 -2
  53. package/dist/client/assets/{FormContext-CbLQYizu.js → FormContext-BdrDIRv0.js} +2 -2
  54. package/dist/client/assets/{HDGCDEEZ-B_87CdVQ.js → HDGCDEEZ-Ox1-cFjL.js} +2 -2
  55. package/dist/client/assets/{HSJLKHB7-BWrZ2oua.js → HSJLKHB7-BEBG51eo.js} +2 -2
  56. package/dist/client/assets/{Icons-CQY6Z_tn.js → Icons-C-FXpOud.js} +2 -2
  57. package/dist/client/assets/Input-DWhR3WLZ.js +2 -0
  58. package/dist/client/assets/JZOYTAAL-K5yyV5fj.js +1 -0
  59. package/dist/client/assets/{K3MD6TGW-Dl_xvRh8.js → K3MD6TGW-DhfhwRRq.js} +2 -2
  60. package/dist/client/assets/{K7RP3OMA-CMEWK15T.js → K7RP3OMA-DdE8zx2_.js} +2 -2
  61. package/dist/client/assets/{KeybindingsSettings.logic-6SIFjdPx.js → KeybindingsSettings.logic-Ddu7cDVA.js} +2 -2
  62. package/dist/client/assets/{LHDIQX7Q-BYodQH-L.js → LHDIQX7Q-_CTEfstz.js} +2 -2
  63. package/dist/client/assets/{LUXOKEGN-qRQxfpo6.js → LUXOKEGN-BZTFKFlr.js} +2 -2
  64. package/dist/client/assets/{MathTypeset-DEu7ewh2.js → MathTypeset-hiZgZUOa.js} +2 -2
  65. package/dist/client/assets/{N3JZAHOW-D39dZXbh.js → N3JZAHOW-CC607oJ3.js} +2 -2
  66. package/dist/client/assets/{NUIALGQ3-DesFcM7Z.js → NUIALGQ3-YZiFnb1D.js} +2 -2
  67. package/dist/client/assets/{NoProjectsHero-DR2kWrZ4.js → NoProjectsHero-BaAbresy.js} +2 -2
  68. package/dist/client/assets/{O65XPQGZ-xGzNLFO_.js → O65XPQGZ-CJWG3hrr.js} +2 -2
  69. package/dist/client/assets/{O7XIQ6OM-D_A5CSzR.js → O7XIQ6OM-CO58SxOd.js} +2 -2
  70. package/dist/client/assets/{OFQON5FD-wUDkF0Vl.js → OFQON5FD-ZVCn5Afz.js} +2 -2
  71. package/dist/client/assets/{P4ConnectAccountPages-CCDq5J6P.js → P4ConnectAccountPages-nuGk_jH6.js} +2 -2
  72. package/dist/client/assets/{P4ConnectSidebarSignIn-CX9WTYV1.js → P4ConnectSidebarSignIn-DMU_ZGur.js} +2 -2
  73. package/dist/client/assets/{PJQHF43J-CDUmALBZ.js → PJQHF43J-Dyo99try.js} +2 -2
  74. package/dist/client/assets/PanelLayoutControls-CwJW9Vo-.js +216 -0
  75. package/dist/client/assets/{PierreEntryIcon-Cuq8Bvxz.js → PierreEntryIcon-BGnGqbZS.js} +2 -2
  76. package/dist/client/assets/{PopoverHandle-CaIeAISC.js → PopoverHandle-BGTDdU32.js} +2 -2
  77. package/dist/client/assets/PreviewPanel-C914U2vc.js +2 -0
  78. package/dist/client/assets/{ProjectDefaultsSettings-Bxz5MdOY.js → ProjectDefaultsSettings-B8-DHhbT.js} +2 -2
  79. package/dist/client/assets/ProjectFavicon-Bnd4lTxL.js +3 -0
  80. package/dist/client/assets/{ProjectIconPickerDialog-DqEEBoMA.js → ProjectIconPickerDialog-D_7XapzM.js} +2 -2
  81. package/dist/client/assets/{ProjectMonogram-CjI4Va2u.js → ProjectMonogram-BRycZjMZ.js} +2 -2
  82. package/dist/client/assets/{ProviderAuthTerminal-UctA57cb.js → ProviderAuthTerminal-ejODeZci.js} +2 -2
  83. package/dist/client/assets/ProviderModelPicker-BigVoJfZ.js +2 -0
  84. package/dist/client/assets/{ProviderSettingsForm-BEq2pSXW.js → ProviderSettingsForm-TxiFYWfI.js} +2 -2
  85. package/dist/client/assets/PullRequestCodeTab-D99_acmK.js +6 -0
  86. package/dist/client/assets/{RHNBAITX-C7xWa0v8.js → RHNBAITX-B2MpzGNB.js} +2 -2
  87. package/dist/client/assets/{ReadOnlySourcePreview-BzoQdNnt.js → ReadOnlySourcePreview-Clh1I7db.js} +2 -2
  88. package/dist/client/assets/{RenderErrorBoundary-BQJlFG3C.js → RenderErrorBoundary-UQ8iqwRx.js} +3 -3
  89. package/dist/client/assets/{SLD4V6NK-DmuNvRiU.js → SLD4V6NK-DDlJ2xA8.js} +2 -2
  90. package/dist/client/assets/{ScheduledTasksSettings-BslOTNM_.js → ScheduledTasksSettings-VxM8-W1a.js} +4 -4
  91. package/dist/client/assets/{ScopedSwitch-B93s5VHZ.js → ScopedSwitch-B9HsEBfG.js} +2 -2
  92. package/dist/client/assets/{ScrollAreaCorner-Dhc-TjWb.js → ScrollAreaCorner-DaAMqe_x.js} +2 -2
  93. package/dist/client/assets/{SecretInput-B2ihrOsq.js → SecretInput-Dfsqp38C.js} +2 -2
  94. package/dist/client/assets/{SelectScrollUpArrow-krk2Fk-_.js → SelectScrollUpArrow-CBbON2Cr.js} +2 -2
  95. package/dist/client/assets/SettingsPanels-D16J4fBs.js +46 -0
  96. package/dist/client/assets/{SettingsPanels.logic-Bl4RFuAy.js → SettingsPanels.logic-DLPcHVw0.js} +2 -2
  97. package/dist/client/assets/{SettingsScopeNotice-LfKqlEQx.js → SettingsScopeNotice-CLuK5ZOQ.js} +2 -2
  98. package/dist/client/assets/{SidebarStageBackdrop-6e7hvpNA.js → SidebarStageBackdrop-Bgae69g1.js} +2 -2
  99. package/dist/client/assets/{T3PCR2KE-CiK8lMNJ.js → T3PCR2KE-DQ6cSkUG.js} +2 -2
  100. package/dist/client/assets/{TKWO2OVW-BdJsjYHm.js → TKWO2OVW-DlInq0TH.js} +2 -2
  101. package/dist/client/assets/{TSHNXIZL-CRJjDWez.js → TSHNXIZL-DL8cfasx.js} +2 -2
  102. package/dist/client/assets/{ThemeEditorPanel-D8zwe2Nv.js → ThemeEditorPanel-Dhd_0CzC.js} +2 -2
  103. package/dist/client/assets/ThreadTerminalDrawer-Bga-TMJR.js +5 -0
  104. package/dist/client/assets/{TooltipViewport-MMBPNW3u.js → TooltipViewport-UaR0JZsl.js} +2 -2
  105. package/dist/client/assets/{UQJE5E4I-V8ZBwQ4s.js → UQJE5E4I-WMwM-nEH.js} +2 -2
  106. package/dist/client/assets/{USNYFO5S-B5nY9-j7.js → USNYFO5S-D-mgcpxb.js} +2 -2
  107. package/dist/client/assets/{Virtualizer-CzVPu6W0.js → Virtualizer-CUj2Cqvm.js} +2 -2
  108. package/dist/client/assets/{WEVWDWVA-roZxnVYX.js → WEVWDWVA-CiAqWYrx.js} +2 -2
  109. package/dist/client/assets/{WorkspaceBreadcrumb-DHwNjJoP.js → WorkspaceBreadcrumb-D8GTBuA5.js} +2 -2
  110. package/dist/client/assets/{WorkspacePageContainer-BEL6F4GP.js → WorkspacePageContainer-BKXvWv-9.js} +2 -2
  111. package/dist/client/assets/{WorkspacePageHeader-eTadd7tx.js → WorkspacePageHeader-zMZD9Zz8.js} +2 -2
  112. package/dist/client/assets/{X5RFHQXM-3waZyk5u.js → X5RFHQXM-YS48_sFp.js} +2 -2
  113. package/dist/client/assets/{X62E3GBT-B2f7sUz7.js → X62E3GBT-C444MNd3.js} +2 -2
  114. package/dist/client/assets/{XBNEOJTC-C4ImOubv.js → XBNEOJTC-0O1bjE8y.js} +2 -2
  115. package/dist/client/assets/{YHV2MVVZ-D1HZySVT.js → YHV2MVVZ-Coy_OiWg.js} +2 -2
  116. package/dist/client/assets/{YURCZMG2-B95ZHwnq.js → YURCZMG2-Lc2Tv_HR.js} +2 -2
  117. package/dist/client/assets/{YVG2LODB-Ba9ElJXR.js → YVG2LODB-CWUTdxUc.js} +2 -2
  118. package/dist/client/assets/_chat-BWNTWBCr.js +45 -0
  119. package/dist/client/assets/_chat.design-CajRPBez.js +2 -0
  120. package/dist/client/assets/_chat.index-OsM078CN.js +2 -0
  121. package/dist/client/assets/_chat.new-BI8wuTGQ.js +4 -0
  122. package/dist/client/assets/_chat.pull-requests-Alx1g9Xh.js +2 -0
  123. package/dist/client/assets/{alert-BeaSxmEt.js → alert-RktpFBv6.js} +2 -2
  124. package/dist/client/assets/{assetUrls-DSRw9lrZ.js → assetUrls-COCOS1bm.js} +2 -2
  125. package/dist/client/assets/assets-B36wSN1M.js +2 -0
  126. package/dist/client/assets/{browserHistoryStore-Cb-pQxvb.js → browserHistoryStore-CBcm7bje.js} +2 -2
  127. package/dist/client/assets/{browserLinkTarget-DnEgq1JN.js → browserLinkTarget-D-M5yQc0.js} +2 -2
  128. package/dist/client/assets/{checkbox-BwnKO_BU.js → checkbox-vIS3kn6A.js} +2 -2
  129. package/dist/client/assets/{color-picker-D8AK_9SM.js → color-picker-vozMHo5G.js} +2 -2
  130. package/dist/client/assets/{combobox-CXEo8oot.js → combobox-CzEFd5LA.js} +2 -2
  131. package/dist/client/assets/{command-BAykm7lf.js → command-CLf9yckl.js} +2 -2
  132. package/dist/client/assets/{connect-DsnzdYd-.js → connect-BoLhf5rG.js} +2 -2
  133. package/dist/client/assets/{connect-agent-BHUM9uJ5.js → connect-agent-BUjhhqbv.js} +2 -2
  134. package/dist/client/assets/{design-BugojS6P.js → design-LeaOcSZl.js} +2 -2
  135. package/dist/client/assets/device-D9IuUJmU.js +2 -0
  136. package/dist/client/assets/{dialog-CsGXTrQp.js → dialog-B69qrNtB.js} +2 -2
  137. package/dist/client/assets/{diffRendering-WBaaL1Hw.js → diffRendering-DU37Uneg.js} +2 -2
  138. package/dist/client/assets/{dist-CEhsFKQt.js → dist-CtnQm06p.js} +3 -3
  139. package/dist/client/assets/{draft-input-DSO1M98X.js → draft-input-BUsvwNIU.js} +2 -2
  140. package/dist/client/assets/{duoViewer-DWTF6ZzH.js → duoViewer-CPd6U9x5.js} +2 -2
  141. package/dist/client/assets/{dynamic-cm3g4l5C.js → dynamic-DDiw9bBP.js} +2 -2
  142. package/dist/client/assets/{embeddedScripts-CCEJSzbY.js → embeddedScripts-DjnGPWZd.js} +2 -2
  143. package/dist/client/assets/{empty-D39LEkAH.js → empty-B1FuCXoG.js} +2 -2
  144. package/dist/client/assets/entities-Cd_YDhEa.js +2 -0
  145. package/dist/client/assets/{fileLinks-BGiaZuCI.js → fileLinks-DzCsEQpS.js} +2 -2
  146. package/dist/client/assets/{fileTreeExpansion-B5-rhZPf.js → fileTreeExpansion-eHhwnC6l.js} +2 -2
  147. package/dist/client/assets/{getDiffFileInput-BVsGumGL.js → getDiffFileInput-eC26FmPf.js} +2 -2
  148. package/dist/client/assets/{guideRunStore-CIC0I9tc.js → guideRunStore-CugTzRRn.js} +2 -2
  149. package/dist/client/assets/{htmlRender-CuZDEfr_.js → htmlRender-CcVnPpcS.js} +2 -2
  150. package/dist/client/assets/{index-DFvDwgHR.js → index-CZlF3wQ9.js} +3 -3
  151. package/dist/client/assets/{input-DTnuNfU_.js → input-D8R-9BO3.js} +2 -2
  152. package/dist/client/assets/{input-group-ZnG52HFh.js → input-group-CevCumL6.js} +2 -2
  153. package/dist/client/assets/{kbd-NONAAU_c.js → kbd-Fy-v90ND.js} +2 -2
  154. package/dist/client/assets/keybindings-DMghyE3A.js +2 -0
  155. package/dist/client/assets/{lazy-BGLv0LoM.js → lazy-BA6aXmZc.js} +4 -4
  156. package/dist/client/assets/{lazyRouteComponent-D02c00C-.js → lazyRouteComponent-DVNAnyiv.js} +2 -2
  157. package/dist/client/assets/{link-oQzJ7nu3.js → link-ci_EPfAz.js} +2 -2
  158. package/dist/client/assets/{linkedPrompt-C_XIR4Xr.js → linkedPrompt-CPHt2jcO.js} +2 -2
  159. package/dist/client/assets/{main-DsXJbQH-.css → main-B-tAk2zT.css} +1 -1
  160. package/dist/client/assets/main-om7hc1qE.js +37 -0
  161. package/dist/client/assets/{mediaReference-DKoeCSSJ.js → mediaReference-CZmbKByR.js} +2 -2
  162. package/dist/client/assets/{mediaSource-CENz-NYA.js → mediaSource-DX6oP8x9.js} +2 -2
  163. package/dist/client/assets/{number-field-D1mdZQVp.js → number-field-CmK8oJMM.js} +2 -2
  164. package/dist/client/assets/{observeResize-BNf0FASw.js → observeResize-YxzDUnDW.js} +2 -2
  165. package/dist/client/assets/{onboarding-B-b2hpCr.js → onboarding-eClefFKp.js} +2 -2
  166. package/dist/client/assets/openFileInPreview-H9M5FxLy.js +2 -0
  167. package/dist/client/assets/{p4ProjectFile-BQUacEue.js → p4ProjectFile-BC2tSEs4.js} +2 -2
  168. package/dist/client/assets/{pair-DTrJC971.js → pair-BUZJqgA1.js} +2 -2
  169. package/dist/client/assets/{pendingSendStore-BsAQrtOv.js → pendingSendStore-C5UcT8R0.js} +2 -2
  170. package/dist/client/assets/{phoneViewer-D64KFma1.js → phoneViewer-fmWF20qy.js} +2 -2
  171. package/dist/client/assets/{pierre-icons-CtTUePAY.js → pierre-icons-DlYshDSm.js} +2 -2
  172. package/dist/client/assets/{popover-Cr0R7gdF.js → popover-CtJuJW_f.js} +2 -2
  173. package/dist/client/assets/{preview-C1PD_g9k.js → preview-D-Cm6hTR.js} +2 -2
  174. package/dist/client/assets/{preview-BuuE-gMP.js → preview-DtLn0r5X.js} +2 -2
  175. package/dist/client/assets/{previewMiniPlayerStore-v5xBLM6_.js → previewMiniPlayerStore-BQgCK2RM.js} +2 -2
  176. package/dist/client/assets/primary-CuSE-Dwp.js +2 -0
  177. package/dist/client/assets/primaryCloudLinkState-BsKyx6nh.js +2 -0
  178. package/dist/client/assets/projectFilesQueryState-FiXJc2AO.js +2 -0
  179. package/dist/client/assets/projectScriptEditor-CwMYFrgO.js +2 -0
  180. package/dist/client/assets/{providerSkills-CK0_chtE.js → providerSkills-DRtgduYo.js} +2 -2
  181. package/dist/client/assets/{pullRequestDetail.logic-BmPSn0PA.js → pullRequestDetail.logic-CqcRjGbR.js} +4 -4
  182. package/dist/client/assets/{pullRequestIcons-CfKXhDuO.js → pullRequestIcons-Bk_-BZhA.js} +2 -2
  183. package/dist/client/assets/{pullRequestReviewStore-CrDUhUKX.js → pullRequestReviewStore-Br0qNCn2.js} +2 -2
  184. package/dist/client/assets/pullRequests-C9YbqDXl.js +2 -0
  185. package/dist/client/assets/queries-DMkaYL1H.js +2 -0
  186. package/dist/client/assets/query-B1dBedyO.js +2 -0
  187. package/dist/client/assets/{radio-group-CkR7fabD.js → radio-group-CQTaM9n2.js} +2 -2
  188. package/dist/client/assets/{renderScheduler-BJowI8SS.js → renderScheduler-fJB2sQwM.js} +2 -2
  189. package/dist/client/assets/{rightPanelStore-DUtuG_mq.js → rightPanelStore-C5nnGDev.js} +2 -2
  190. package/dist/client/assets/runtime-B6yGAVz4.js +6 -0
  191. package/dist/client/assets/runtime-BhGr1QCf.js +3 -0
  192. package/dist/client/assets/{runtimeModeConfig-CZ3ZrCmY.js → runtimeModeConfig-Htoh7tJb.js} +2 -2
  193. package/dist/client/assets/{scheduledTasksSettings.logic-YVexB6ub.js → scheduledTasksSettings.logic-DRYrMw8R.js} +3 -3
  194. package/dist/client/assets/{scroll-area-D1ITiKsD.js → scroll-area-DJaTwtcr.js} +2 -2
  195. package/dist/client/assets/{select-CT4O76xq.js → select-BFALokxW.js} +2 -2
  196. package/dist/client/assets/{selfImproveFindings-wLxnhAIe.js → selfImproveFindings-H2XgphDi.js} +2 -2
  197. package/dist/client/assets/server-Dc9414wM.js +2 -0
  198. package/dist/client/assets/session-B6T_Arzf.js +2 -0
  199. package/dist/client/assets/session-logic-BaSoFnqy.js +26 -0
  200. package/dist/client/assets/settings-BkLvGwfm.js +2 -0
  201. package/dist/client/assets/{settings.appearance-CJCZI-Xj.js → settings.appearance-OuApP6hX.js} +2 -2
  202. package/dist/client/assets/settings.archived-DLycLGH2.js +2 -0
  203. package/dist/client/assets/{settings.computer-use-CijjzsIQ.js → settings.computer-use-DbtSE70m.js} +2 -2
  204. package/dist/client/assets/settings.connections-D8EmrGJK.js +2 -0
  205. package/dist/client/assets/{settings.data-controls-DkLkW74X.js → settings.data-controls-DqM0dqdr.js} +2 -2
  206. package/dist/client/assets/settings.decisions-BNBjCRqL.js +2 -0
  207. package/dist/client/assets/{settings.designs-DS1WBGjv.js → settings.designs-BIB7y5ry.js} +2 -2
  208. package/dist/client/assets/settings.diagnostics-CZPZhIn-.js +2 -0
  209. package/dist/client/assets/{settings.general-BWHDfXfO.js → settings.general-D73jxwiz.js} +2 -2
  210. package/dist/client/assets/settings.integrations-Vq3IT0_R.js +2 -0
  211. package/dist/client/assets/{settings.keybindings-tc_MLaPn.js → settings.keybindings-DMI2SOqT.js} +2 -2
  212. package/dist/client/assets/{settings.open-source-licenses-ucPvq0ML.js → settings.open-source-licenses-QRv0v3-V.js} +2 -2
  213. package/dist/client/assets/{settings.plugins-M2Rc23zw.js → settings.plugins-Ddb8m4nE.js} +4 -4
  214. package/dist/client/assets/settings.projects-r-irj-Zr.js +4 -0
  215. package/dist/client/assets/settings.providers-Ce4kHZsP.js +3 -0
  216. package/dist/client/assets/{settings.scheduled-tasks-BTioGx2i.js → settings.scheduled-tasks-RWniN8Lw.js} +2 -2
  217. package/dist/client/assets/settings.snap-shot-D6hiK4XK.js +2 -0
  218. package/dist/client/assets/settings.source-control-GPOjx565.js +2 -0
  219. package/dist/client/assets/settings.storage-CZsmFyZ8.js +2 -0
  220. package/dist/client/assets/settingsLayout-CthOqZyP.js +3 -0
  221. package/dist/client/assets/{sidebar-DRWJdn3r.js → sidebar-BDFu5cf2.js} +2 -2
  222. package/dist/client/assets/{sidebarProjectGrouping-BRZt_Xqk.js → sidebarProjectGrouping-CURnoavN.js} +2 -2
  223. package/dist/client/assets/{skeleton-DOfA4sjN.js → skeleton-CIpn5ufH.js} +2 -2
  224. package/dist/client/assets/{sourceControl-CKZL-8Mu.js → sourceControl-DjMIOzv1.js} +2 -2
  225. package/dist/client/assets/{sourceControlClients-D-frc1l_.js → sourceControlClients-C2uvUFSM.js} +2 -2
  226. package/dist/client/assets/{spinner-DMCmqCAh.js → spinner-t32AzjJr.js} +2 -2
  227. package/dist/client/assets/{terminal-links-Cdw7HYhQ.js → terminal-links-D6dqW3h9.js} +2 -2
  228. package/dist/client/assets/{terminalSessions-DGp0Zt7-.js → terminalSessions-DoRkjVz9.js} +2 -2
  229. package/dist/client/assets/{textarea-B2ogIlGU.js → textarea-EVmRNBWL.js} +2 -2
  230. package/dist/client/assets/{themePalette-CiLEjm0l.js → themePalette-01TQqdkx.js} +3 -3
  231. package/dist/client/assets/toast-UFTwkJWj.js +2 -0
  232. package/dist/client/assets/{toggle-BrZqohX5.js → toggle-Dqrwe7LT.js} +2 -2
  233. package/dist/client/assets/{toggle-group-DpO88ac2.js → toggle-group-DS75Gx6B.js} +2 -2
  234. package/dist/client/assets/{tooltip-QdplMyeY.js → tooltip-B1rLXiVx.js} +2 -2
  235. package/dist/client/assets/{uiStateStore-vt_JyvTj.js → uiStateStore-_K2mvZYL.js} +2 -2
  236. package/dist/client/assets/{usage-CHD3cyvN.js → usage-DwGF-B0Q.js} +2 -2
  237. package/dist/client/assets/{usageAccess-DVnjHuB7.js → usageAccess-YanE4PaX.js} +2 -2
  238. package/dist/client/assets/{usageFormat-tjRl8Hbq.js → usageFormat-Bgm6YXnR.js} +2 -2
  239. package/dist/client/assets/{usageShortcuts-DMKWst47.js → usageShortcuts-D6H92HUx.js} +2 -2
  240. package/dist/client/assets/{use-atom-command-BfhNaUIU.js → use-atom-command-BT7sz8Lx.js} +2 -2
  241. package/dist/client/assets/{useAriaLabelledBy-BlIdXeWO.js → useAriaLabelledBy-CCDZPAYX.js} +2 -2
  242. package/dist/client/assets/{useHandleNewThread-Bv9hl6Vv.js → useHandleNewThread-nNF3Xnbt.js} +2 -2
  243. package/dist/client/assets/{useLocation-jsSq4KCV.js → useLocation-CDlqpnf6.js} +2 -2
  244. package/dist/client/assets/{useNavigate-ut7tie8O.js → useNavigate-mNhNGdvJ.js} +2 -2
  245. package/dist/client/assets/{useNavigateBack-DQAO81KK.js → useNavigateBack-zj9tpAPV.js} +2 -2
  246. package/dist/client/assets/{useP4ConnectAuthPrompt-IuajGXvV.js → useP4ConnectAuthPrompt-CkJyw_jV.js} +2 -2
  247. package/dist/client/assets/{useParams-2ErCyxxB.js → useParams-CZ_VOC6E.js} +2 -2
  248. package/dist/client/assets/{usePermissionStatus-BlueIAuh.js → usePermissionStatus-DFE8UnJC.js} +2 -2
  249. package/dist/client/assets/{usePullRequestActions-VZpGy8dq.js → usePullRequestActions-CVcuaade.js} +2 -2
  250. package/dist/client/assets/{useRegisterFieldControl-BTyFUE5E.js → useRegisterFieldControl-gW7DDA6v.js} +2 -2
  251. package/dist/client/assets/{useScopedModelAvailability-CH6hfrU_.js → useScopedModelAvailability-BCNsRHrC.js} +2 -2
  252. package/dist/client/assets/useSettings-BAP_yCCK.js +3 -0
  253. package/dist/client/assets/utils-Dv1DrWoz.js +37 -0
  254. package/dist/client/assets/vcsRefInvalidation-BI3mMuIW.js +2 -0
  255. package/dist/client/assets/welcome-CfpSLEhO.js +2 -0
  256. package/dist/client/index.html +1 -1
  257. package/dist/{renderer-DKZZL6cd.mjs → renderer-B3Ia4LBS.mjs} +2 -2
  258. package/dist/{runtime-Bbjyj8bt.mjs → runtime-DvE0t3kv.mjs} +4 -38
  259. package/package.json +1 -1
  260. package/dist/client/assets/AlertDialogRoot-CW_9Mq9o.js +0 -2
  261. package/dist/client/assets/ChatGptUsageButton-hgahwAd8.js +0 -2
  262. package/dist/client/assets/ChatMarkdown-DzBQ6o2z.js +0 -48
  263. package/dist/client/assets/CodexSetupSection.logic-BBoRdk5p.js +0 -2
  264. package/dist/client/assets/DeviceSetup-C2Zve35j.js +0 -2
  265. package/dist/client/assets/DiffPanel-DhYILwt4.js +0 -2
  266. package/dist/client/assets/Input-Bple6iXe.js +0 -2
  267. package/dist/client/assets/JZOYTAAL-BMx5dMBx.js +0 -1
  268. package/dist/client/assets/PanelLayoutControls-C34I_7ba.js +0 -216
  269. package/dist/client/assets/PreviewPanel-CG-MeUjw.js +0 -2
  270. package/dist/client/assets/ProjectFavicon-DCKipqYA.js +0 -3
  271. package/dist/client/assets/ProviderModelPicker-QRPUsruj.js +0 -2
  272. package/dist/client/assets/PullRequestCodeTab-DQDQ2-AY.js +0 -6
  273. package/dist/client/assets/SettingsPanels-DxAtLrQJ.js +0 -46
  274. package/dist/client/assets/ThreadTerminalDrawer-Dscicgos.js +0 -5
  275. package/dist/client/assets/_chat-CAKiqq8Z.js +0 -45
  276. package/dist/client/assets/_chat.design-xDdLq2Pm.js +0 -2
  277. package/dist/client/assets/_chat.index-DZFF0AGm.js +0 -2
  278. package/dist/client/assets/_chat.new-UcQULkDl.js +0 -4
  279. package/dist/client/assets/_chat.pull-requests-wqTxTIsj.js +0 -2
  280. package/dist/client/assets/assets-DhuueFtK.js +0 -2
  281. package/dist/client/assets/device-CH53vde0.js +0 -2
  282. package/dist/client/assets/entities-BjGK6yEY.js +0 -2
  283. package/dist/client/assets/keybindings-CCgj9REF.js +0 -2
  284. package/dist/client/assets/main-BqFaDMNs.js +0 -37
  285. package/dist/client/assets/openFileInPreview-CLTNM-qs.js +0 -2
  286. package/dist/client/assets/primary-BMTtrcja.js +0 -2
  287. package/dist/client/assets/primaryCloudLinkState-CJaRG6QK.js +0 -2
  288. package/dist/client/assets/projectFilesQueryState-CZkTtV37.js +0 -2
  289. package/dist/client/assets/projectScriptEditor-BApTdMa4.js +0 -2
  290. package/dist/client/assets/pullRequests-D-lKKR28.js +0 -2
  291. package/dist/client/assets/queries-CEdylITb.js +0 -2
  292. package/dist/client/assets/query-DM1uxcKV.js +0 -2
  293. package/dist/client/assets/runtime-Du_4upLP.js +0 -6
  294. package/dist/client/assets/runtime-mXszmljC.js +0 -3
  295. package/dist/client/assets/server-BRIc5okw.js +0 -2
  296. package/dist/client/assets/session-logic-BiU6P8DR.js +0 -26
  297. package/dist/client/assets/session-wmJod3Hf.js +0 -2
  298. package/dist/client/assets/settings-NLDl4Bmy.js +0 -2
  299. package/dist/client/assets/settings.archived-CLWZylu3.js +0 -2
  300. package/dist/client/assets/settings.connections-Cf7-ZN_h.js +0 -2
  301. package/dist/client/assets/settings.decisions-JeevVBZt.js +0 -2
  302. package/dist/client/assets/settings.diagnostics-lQ8O62tl.js +0 -2
  303. package/dist/client/assets/settings.integrations-DEdu9gwQ.js +0 -2
  304. package/dist/client/assets/settings.projects-tykSh6-D.js +0 -4
  305. package/dist/client/assets/settings.providers--RJFEbkT.js +0 -3
  306. package/dist/client/assets/settings.snap-shot-BUehYnKo.js +0 -2
  307. package/dist/client/assets/settings.source-control-Dxm6Jir5.js +0 -2
  308. package/dist/client/assets/settings.storage-CrdP11yD.js +0 -2
  309. package/dist/client/assets/settingsLayout-7rl00kQL.js +0 -3
  310. package/dist/client/assets/toast-NSvYVPhH.js +0 -2
  311. package/dist/client/assets/useSettings-FRbaNpbg.js +0 -3
  312. package/dist/client/assets/utils-CxCThU1r.js +0 -37
  313. package/dist/client/assets/vcsRefInvalidation-CiJ0pwCz.js +0 -2
  314. package/dist/client/assets/welcome-CBJlRbzG.js +0 -2
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{$x as t,AS as n,CC as r,Dx as i,EC as a,FC as o,IC as s,K_ as c,Kx as l,LC as u,Mw as d,Mx as ee,OC as f,Ox as p,PC as m,Rx as h,SS as g,Wc as _,as as v,dE as te,fS as y,is as b,kx as x,nS as S,pC as C,ps as w,rE as ne,rT as T,rs as E,uC as D,uv as O}from"./utils-Dv1DrWoz.js";import{N as k,_t as A,k as j,qt as M}from"./runtime-B6yGAVz4.js";import{$ as N,Q as P,Y as F,et as I,rt as L,tt as R}from"./entities-Cd_YDhEa.js";import{t as z}from"./runtime-BhGr1QCf.js";import{it as B}from"./useSettings-BAP_yCCK.js";import{t as re}from"./session-B6T_Arzf.js";import{n as V}from"./query-B1dBedyO.js";var H=e(),U=`~effect/PartitionedSemaphore`,W=e=>{let i=Math.max(0,e.permits);if(!Number.isFinite(i))return{[U]:U,capacity:i,available:D(i),take:()=>a,release:()=>D(i),withPermits:()=>e=>e,withPermit:()=>e=>e,withPermitsIfAvailable:()=>e=>x(e)};let c=i,p=0,h=m(),g=h[Symbol.iterator](),_=!1,v=0,y=e=>{if(e>0&&(v+=e),!_){_=!0;try{for(;v>0&&p>0;){let e=g.next();if(e.done&&(g=h[Symbol.iterator](),e=g.next(),e.done))break;let t=e.value[1].values().next().value;t!==void 0&&(--t.permits,--p,--v,t.permits===0&&t.resume())}}finally{_=!1}}return p===0&&(c=Math.min(i,c+v),v=0),c},b=(e,t)=>t<=0?a:i<t?n:f(n=>c>=t?(c-=t,T(n,e=>{d(e)&&y(t)}),a):ee(n=>{if(c>=t){n(b(e,t));return}let r=t-c;c>0&&(c=0),p+=r;let i=ne(o(h,e),()=>{let t=new Set;return u(h,e,t),t}),l={permits:r,resume:()=>{d(),n(a)}},d=()=>{i.delete(l)&&i.size===0&&s(h,e)};return i.add(l),C(()=>{d(),p-=l.permits,y(t-l.permits)})})),S=(e,n)=>i=>{if(n<=0)return i;let a=b(e,n);return r(e=>t(e(a),()=>l(e(i),C(()=>{y(n)}))))},w=e=>e<=0?!0:i<e||c<e?!1:(c-=e,!0);return{[U]:U,capacity:i,available:C(()=>c),take:b,release:e=>C(()=>y(e)),withPermits:S,withPermit:e=>S(e,1),withPermitsIfAvailable:e=>t=>e<=0?x(t):f(n=>w(e)?(T(n,()=>{y(e)}),x(t)):D(te()))}};function G(e){if(e.sessionError!==null)return{canReadFiles:!1,isPending:!1,error:e.sessionError};if(e.session===null){let t=!e.isCatalogReady||e.connection?.phase===`connected`||e.connection?.phase===`connecting`||e.connection?.phase===`reconnecting`;return{canReadFiles:!1,isPending:t,error:t?null:e.connection?.error??`This environment is not connected.`}}return{canReadFiles:O(e.session,c),isPending:!1,error:null}}function K(e,t=``,n=!0){let r=n&&L(e,t),i=r?P(e):``;return{isBrowsing:r,directoryPath:i,filterQuery:r&&!R(e)?N(e):``,parentPath:r?I(i):null,canBrowseUp:r&&F(i)}}function q(e,t){let n=t.toLowerCase(),r=t.startsWith(`.`),i=e.filter(e=>e.name.toLowerCase().startsWith(n)&&(r||!e.name.startsWith(`.`)));return{visibleEntries:i,exactEntry:t.length>0?i.find(e=>e.name===t)??null:null}}function J(){let e=0;return{invalidate:()=>{e+=1},run:async(t,n)=>{let r=++e;return await t(),r===e&&(n(),!0)}}}function Y(e){return e===`connected`}function X(e){return{browse:k(e,{label:`environment-data:filesystem:browse`,tag:_.filesystemBrowse})}}var ie=X(z);function ae(e){let t=(0,H.c)(7),n;t[0]===e?n=t[1]:(n=e===null?null:re.sessionStateAtom(e),t[0]=e,t[1]=n);let r=V(n),i=B(e),a=i.presentation?.connection??null,o;return t[2]!==i.isReady||t[3]!==r.data||t[4]!==r.error||t[5]!==a?(o=G({isCatalogReady:i.isReady,connection:a,session:r.data,sessionError:r.error}),t[2]=i.isReady,t[3]=r.data,t[4]=r.error,t[5]=a,t[6]=o):o=t[6],o}var oe=j(),se={mode:`serial`,key:({environmentId:e,input:t})=>JSON.stringify([e,t.cwd])},ce=E(e=>v({revision:0,persistedCacheReadable:!0}).pipe(b,w(`environment-data:vcs:list-refs-state:${e}`))),Z=W({permits:1});function Q(e){return ce(e.environmentId)}function le(e,t,n){e.update(Q(t),e=>({revision:e.revision+1,persistedCacheReadable:n??e.persistedCacheReadable}))}function $(e,t){return Z.withPermit(e)(t)}var ue=S(`VcsRefsState.invalidateCached`)(function*(e,t){let n=yield*M;yield*$(t.environmentId,y(function*(){le(e,t,yield*n.clearVcsRefs(t.environmentId).pipe(p(!0),h(e=>g(`Could not remove invalidated cached Git refs.`).pipe(i({environmentId:t.environmentId,cwd:t.cwd,...A(e)}),p(!1)))))}))});export{oe as a,Y as c,K as d,se as i,J as l,Q as n,ie as o,$ as r,ae as s,ue as t,q as u};
2
+ //# sourceMappingURL=vcsRefInvalidation-BI3mMuIW.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$f as i,Cp as a,F_ as o,Fy as s,Hy as c,Jd as l,Ky as u,L_ as d,Md as f,Ms as p,Os as m,Py as h,Qs as g,Wc as _,X_ as v,Zs as y,as as b,av as x,bb as S,cd as C,dr as w,iE as T,jm as E,kd as D,l as O,ns as k,o as A,oE as j,t as M,ts as N}from"./utils-Dv1DrWoz.js";import{At as P,M as F,N as I,R as L,W as R,o as z}from"./runtime-B6yGAVz4.js";import{S as B,U as V,Z as H,u as U}from"./entities-Cd_YDhEa.js";import{t as W}from"./runtime-BhGr1QCf.js";import{t as G}from"./spinner-t32AzjJr.js";import{t as K}from"./useNavigate-mNhNGdvJ.js";import{t as q}from"./useLocation-CDlqpnf6.js";import{i as J}from"./toast-UFTwkJWj.js";import{E as ee,T as te}from"./useSettings-BAP_yCCK.js";import{f as Y}from"./server-Dc9414wM.js";import{i as ne,n as X,o as re}from"./session-B6T_Arzf.js";import{t as ie}from"./query-B1dBedyO.js";import{t as ae}from"./use-atom-command-BT7sz8Lx.js";import{a as oe}from"./timestampFormat-wac2e_Jz.js";import{a as se,n as ce,t as le}from"./tooltip-B1rLXiVx.js";import{t as ue}from"./input-D8R-9BO3.js";import{t as de}from"./scroll-area-DJaTwtcr.js";import{r as fe}from"./dist-CtnQm06p.js";import{t as pe}from"./dialog-B69qrNtB.js";import{t as me}from"./useP4ConnectAuthPrompt-CkJyw_jV.js";import{t as he}from"./CommandBlock-BUHVWYBr.js";import{t as ge}from"./checkbox-vIS3kn6A.js";import{t as _e}from"./ThreadTerminalDrawer-Bga-TMJR.js";import{i as ve}from"./terminalSessions-DoRkjVz9.js";import{n as ye}from"./useHandleNewThread-nNF3Xnbt.js";import{r as be,t as xe}from"./alert-RktpFBv6.js";import{i as Se,n as Ce}from"./ChatGptUsageButton-CXEX1qrn.js";import{t as we}from"./onboarding-eClefFKp.js";import{Ja as Te,_ as Ee,an as De,ao as Oe,co as ke,f as Ae,io as je,lo as Me,ni as Ne,on as Pe,oo as Fe,ro as Ie,so as Le,un as Re}from"./main-om7hc1qE.js";import{t as ze}from"./NoProjectsHero-BaAbresy.js";import{t as Be}from"./legalLinks-C4VP5hPh.js";import{r as Ve}from"./SettingsPanels.logic-DLPcHVw0.js";import{d as He,f as Ue,i as We,l as Ge,n as Ke,o as qe,t as Je,u as Ye}from"./CodexSetupSection.logic-D3odRubx.js";var Z=e(t(),1),Q=n(),Xe=2592e6,Ze=3;function Qe(e,t=Date.now()){let n=t-Xe;return{available:e,recent:e.filter(e=>{if(e.git===null||e.threadCount<Ze||e.lastActiveAt===null)return!1;let r=Date.parse(e.lastActiveAt);return r>=n&&r<=t})}}function $e(e,t){return e===null?t:t===null||e>t?e:t}function et(e){let t=new Map,n=[];for(let r of e){if(r.git===null){n.push(r);continue}let e=r.git??{remoteKey:null,repository:null},i=e.remoteKey===null?`path:${r.path}`:`remote:${e.remoteKey}`,a=t.get(i);a===void 0?t.set(i,{key:i,label:e.repository??r.title,repository:e.repository,candidates:[r],threadCount:r.threadCount,lastActiveAt:r.lastActiveAt}):(a.candidates.push(r),t.set(i,{...a,threadCount:a.threadCount+r.threadCount,lastActiveAt:$e(a.lastActiveAt,r.lastActiveAt)}))}return{repositories:[...t.values()].sort((e,t)=>e.lastActiveAt===t.lastActiveAt?e.label.localeCompare(t.label):e.lastActiveAt===null?1:t.lastActiveAt===null?-1:t.lastActiveAt.localeCompare(e.lastActiveAt)),other:n}}function tt(e,t,n){if(n.projectId!==void 0)return n.projectId;let r=e.filter(e=>e.environmentId===t),i=H(r,n.path);return i===void 0?null:i.id}function nt(e,t,n){for(let n of e){let e=t.get(n);if(e!==void 0)return e}for(let t of e){let e=n.get(t);if(e!==void 0)return e}}function rt(e){if(/^[A-Za-z]:[\\/]+$/.test(e)||/^[\\/]{2}[^\\/]+[\\/][^\\/]+[\\/]*$/.test(e))return{name:e,parent:``};let t=e.replace(/[\\/]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return t.length===0?{name:e,parent:``}:n<0?{name:t,parent:``}:{name:t.slice(n+1),parent:t.slice(0,n+1)}}function it(e,t){return JSON.stringify([e,t])}var at=I(W,{label:`environment-data:agent-sessions:scan`,tag:_.agentSessionsScan,staleTimeMs:3e4,idleTtlMs:3e5}),ot=F(W,{label:`environment-data:agent-sessions:import`,tag:_.agentSessionsImport});function st(e){return P(e.entry)}function ct(e,t){let n=e.filter(e=>t.has(e.environmentId)),r=e=>n.filter(t=>e(t.connection.phase)).map(e=>e.environmentId),i=r(e=>e===`connected`),a=n.some(e=>e.connection.phase===`connecting`);return{ready:i.length>0&&!a,environmentIds:i,skippedIds:r(e=>e!==`connected`&&e!==`connecting`)}}function lt(e){let t=(0,Q.c)(3),n=(0,Z.useContext)(k),r;return t[0]!==e||t[1]!==n?(r=b(t=>e.map(e=>{let r=at({environmentId:e,input:{}}),i=t(r);return{environmentId:e,data:T(m(i)),error:i._tag===`Failure`?ie(i.cause):null,isPending:i.waiting||i._tag===`Initial`,refresh:()=>n.refresh(r)}})),t[0]=e,t[1]=n,t[2]=r):r=t[2],N(r)}var $=e(r(),1),ut=[],dt=c.make(`onboarding-agent-setup`),ft=[`Connect`,`Agents`,`Projects`],pt=`Scan limit reached. Some projects or conversations may be missing.`;function mt({localAvailable:e,onDone:t,resumeEnvironmentId:n}){let r=Re(),[i,a]=(0,Z.useState)(n?`agents`:`connection`),{environments:o}=te(),[s,c]=(0,Z.useState)(null),l=(0,Z.useRef)(new Set),[u,d]=(0,Z.useState)(n?[n]:[]),[f,p]=(0,Z.useState)(!1),m=(0,Z.useRef)(null),h=(0,Z.useRef)(null),g=ee();(0,Z.useEffect)(()=>{let e=o.filter(e=>!l.current.has(e.environmentId));if(e.length===0)return;for(let t of e)l.current.add(t.environmentId);let t=e.filter(e=>e.entry.enabled);t.length!==0&&c(e=>new Set([...e??[],...t.map(e=>e.environmentId)]))},[o]);let _=s??new Set(g?[g.environmentId]:[]),v=lt(i===`import`?u:ut),y=i===`import`&&v.every(e=>e.data===null)&&v.some(e=>e.isPending),b=e=>{e.length!==0&&(d(e),a(`agents`))},x=i===`agents`?1:i===`import`?2:0,S=(0,Z.useCallback)((e,n,i=0)=>{if(m.current!==null)return m.current;h.current!==null&&(J.close(h.current),h.current=null);let a=r().then(async()=>(h.current!==null&&(J.close(h.current),h.current=null),await t(e),n?J.add({type:`warning`,title:`Some history was not imported`,description:n,timeout:0}):i>0&&J.add({type:`success`,title:`Imported ${i} ${i===1?`thread`:`threads`}`}),!0)).catch(()=>{let e={type:`error`,title:`Could not finish setup`,description:`Your settings could not be saved. Try again.`};return h.current===null?h.current=J.add(e):J.update(h.current,e),!1}).finally(()=>{m.current===a&&(m.current=null)});return m.current=a,a},[r,t]);return(0,$.jsxs)(pe,{open:!0,disablePointerDismissal:!0,onOpenChange:(e,t)=>t.cancel(),children:[(0,$.jsxs)(Oe,{size:`wide`,bottomStickOnMobile:!1,showCloseButton:!1,initialFocus:()=>document.getElementById(`onboarding-pairing-url`)??!0,children:[(0,$.jsx)(Ie,{title:`Set up P4 Code`,identity:(0,$.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,role:`img`,"aria-label":`P4 Code`,children:[(0,$.jsx)(Ne,{className:`h-4 w-auto shrink-0`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`text-2xl font-medium tracking-tight text-muted-foreground`,children:`Code`})]}),children:(0,$.jsx)(Fe,{steps:ft,currentStep:x,isStepDisabled:e=>f||e>=x,onStepChange:e=>{f||e>x||a(e===0?`connection`:`agents`)}})}),(0,$.jsx)(je,{holdHeight:y,children:i===`connection`?(0,$.jsx)(ht,{expandPairingInitially:!e&&!z(),selectedIds:_,autoSelectedComputers:l.current,onSelectionChange:c,onToggleEnvironment:(e,t)=>c(n=>{let r=new Set(n??_);return t?r.add(e):r.delete(e),r}),onContinue:()=>b(ct(o,_).environmentIds),onPaired:e=>{c(new Set([..._,e]))}}):i===`agents`?(0,$.jsx)(xt,{environmentIds:u,onContinue:()=>a(`import`)}):(0,$.jsx)(At,{scans:v,isImporting:f,setIsImporting:p,onDone:S})})]}),(0,$.jsx)(Ee,{})]})}function ht(e){let t=(0,Q.c)(44),{autoSelectedComputers:n,expandPairingInitially:r,selectedIds:o,onSelectionChange:s,onToggleEnvironment:c,onContinue:l,onPaired:u}=e,{environments:d}=te(),p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=z(),t[0]=p):p=t[0];let m=p,h;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>!m||!st(e),t[1]=h):h=t[1];let g=d.filter(h),[_,v]=(0,Z.useState)(r),[y,b]=(0,Z.useState)(!1),{ready:x,skippedIds:S}=ct(d,o),T=d.filter(e=>S.includes(e.environmentId)).map(gt),E=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{x&&(document.activeElement===document.body||document.activeElement?.getAttribute(`role`)===`dialog`)&&E.current?.focus()},[x]);let D,O;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Connect your computers`}),O=(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:`Choose one or more computers. We’ll set up agents and projects on each.`}),t[2]=D,t[3]=O):(D=t[2],O=t[3]);let k=g.length>0?(0,$.jsxs)(`fieldset`,{className:`mt-5 space-y-2`,children:[(0,$.jsx)(`legend`,{className:`sr-only`,children:`Computers to set up`}),g.map(e=>(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border border-border bg-background px-3 py-3`,children:[(0,$.jsx)(ge,{checked:o.has(e.environmentId),onCheckedChange:t=>{let n=new Set(o);t?n.add(e.environmentId):n.delete(e.environmentId),s(n)}}),(0,$.jsx)(a,{className:`size-4 shrink-0 text-muted-foreground`}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 text-sm font-medium break-words`,children:e.label}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:!e.entry.enabled&&e.connection.phase!==`unsupported`?`Off`:Pe(e.connection).buttonLabel})]}),e.displayUrl?(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs break-all text-muted-foreground`,children:e.displayUrl}):null]})]},e.environmentId))]}):null,A;t[4]!==n||t[5]!==y||t[6]!==c||t[7]!==o?(A=m?(0,$.jsx)(_t,{autoSelectedComputers:n,disabled:y,selectedIds:o,onToggleEnvironment:c}):null,t[4]=n,t[5]=y,t[6]=c,t[7]=o,t[8]=A):A=t[8];let j,N,P;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(w,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),N=(0,$.jsx)(i,{className:`size-4 text-muted-foreground`}),P=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`Add a computer`}),t[9]=j,t[10]=N,t[11]=P):(j=t[9],N=t[10],P=t[11]);let F=_&&`rotate-90`,I;t[12]===F?I=t[13]:(I=M(`size-4 text-muted-foreground`,F),t[12]=F,t[13]=I);let L;t[14]===I?L=t[15]:(L=(0,$.jsx)(f,{className:I}),t[14]=I,t[15]=L);let R;t[16]!==y||t[17]!==L?(R=(0,$.jsxs)(Me,{disabled:y,render:j,children:[N,P,L]}),t[16]=y,t[17]=L,t[18]=R):R=t[18];let B;t[19]===u?B=t[20]:(B=e=>{v(!1),u(e),requestAnimationFrame(()=>E.current?.focus())},t[19]=u,t[20]=B);let V;t[21]!==y||t[22]!==B?(V=(0,$.jsx)(ke,{children:(0,$.jsx)(`div`,{className:`px-3 pb-3`,children:(0,$.jsx)(vt,{isPairing:y,setIsPairing:b,onPaired:B})})}),t[21]=y,t[22]=B,t[23]=V):V=t[23];let H;t[24]!==_||t[25]!==R||t[26]!==V?(H=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(Le,{open:_,onOpenChange:v,children:[R,V]})}),t[24]=_,t[25]=R,t[26]=V,t[27]=H):H=t[27];let U;t[28]!==H||t[29]!==A?(U=(0,$.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[A,H]}),t[28]=H,t[29]=A,t[30]=U):U=t[30];let W=T.length>0?(0,$.jsxs)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:[`Not connected, so setup skips `,T.join(`, `),`. You can set`,` `,T.length===1?`it`:`them`,` up later from Settings.`]}):null,G;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsxs)(`p`,{className:`min-w-0 text-xs leading-relaxed text-muted-foreground`,children:[`P4 Code collects anonymous usage data to help us improve it. To read more about how your data is used and how to opt out, see our`,` `,(0,$.jsx)(`a`,{className:`underline underline-offset-2 hover:text-foreground`,href:Be,target:`_blank`,rel:`noreferrer noopener`,children:`privacy policy`}),`.`]}),t[31]=G):G=t[31];let K=!r,q=!x||y,J;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(C,{className:`size-3.5`}),t[32]=J):J=t[32];let ee;t[33]!==l||t[34]!==K||t[35]!==q?(ee=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-col-reverse gap-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6`,children:[G,(0,$.jsxs)(w,{className:`shrink-0 self-end`,ref:E,autoFocus:K,disabled:q,onClick:l,children:[`Continue`,J]})]}),t[33]=l,t[34]=K,t[35]=q,t[36]=ee):ee=t[36];let Y;return t[37]!==U||t[38]!==W||t[39]!==ee||t[40]!==D||t[41]!==O||t[42]!==k?(Y=(0,$.jsxs)($.Fragment,{children:[D,O,k,U,W,ee]}),t[37]=U,t[38]=W,t[39]=ee,t[40]=D,t[41]=O,t[42]=k,t[43]=Y):Y=t[43],Y}function gt(e){return e.label}function _t(e){let t=(0,Q.c)(36),{autoSelectedComputers:n,disabled:r,selectedIds:i,onToggleEnvironment:a}=e,{environments:o}=te(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={treatPendingAsSignedOut:!1},t[0]=s):s=t[0];let{isLoaded:c,isSignedIn:u}=fe(s),{openAuthPrompt:d}=me(),[p,m]=(0,Z.useState)(!0),[h,g]=(0,Z.useState)(!1),_;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>g(!0),t[1]=_):_=t[1];let v=_,y=p&&!!u&&h,b=r||!c,x;t[2]!==u||t[3]!==d?(x=e=>{u||(e.preventDefault(),m(!0),d())},t[2]=u,t[3]=d,t[4]=x):x=t[4];let S,C,T;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(w,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),C=(0,$.jsx)(l,{className:`size-4 text-muted-foreground`}),T=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`P4 Connect`}),t[5]=S,t[6]=C,t[7]=T):(S=t[5],C=t[6],T=t[7]);let E=c?u?h?null:`Loading computers…`:`Sign in`:`Loading sign-in…`,D;t[8]===E?D=t[9]:(D=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:E}),t[8]=E,t[9]=D);let O=p&&u&&`rotate-90`,k;t[10]===O?k=t[11]:(k=M(`size-4 text-muted-foreground`,O),t[10]=O,t[11]=k);let A;t[12]===k?A=t[13]:(A=(0,$.jsx)(f,{className:k}),t[12]=k,t[13]=A);let j;t[14]!==D||t[15]!==A||t[16]!==b||t[17]!==x?(j=(0,$.jsxs)(Me,{disabled:b,onClick:x,render:S,children:[C,T,D,A]}),t[14]=D,t[15]=A,t[16]=b,t[17]=x,t[18]=j):j=t[18];let N;t[19]!==n||t[20]!==o||t[21]!==u||t[22]!==a||t[23]!==i?(N=u?(0,$.jsx)(De,{primaryEnvironmentId:null,savedEnvironments:o,showSavedEnvironments:!0,onDiscoveryReady:v,selection:{selectedIds:i,onChange:a,autoSelectedComputers:n},refreshWhileEmpty:!0,empty:(0,$.jsx)(`p`,{className:`py-3 text-sm text-muted-foreground`,children:`No computers linked yet.`})}):null,t[19]=n,t[20]=o,t[21]=u,t[22]=a,t[23]=i,t[24]=N):N=t[24];let P;t[25]===N?P=t[26]:(P=(0,$.jsx)(`div`,{className:`mb-3 space-y-1.5`,children:N}),t[25]=N,t[26]=P);let F,I,L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Run this on each computer you want to connect.`}),I=(0,$.jsx)(he,{command:`npx @p4code/cli connect`,className:`mt-3`}),L=(0,$.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:`Keep P4 Code running. Select the computers you want to set up above.`}),t[27]=F,t[28]=I,t[29]=L):(F=t[27],I=t[28],L=t[29]);let R;t[30]===P?R=t[31]:(R=(0,$.jsx)(ke,{keepMounted:!0,children:(0,$.jsxs)(`div`,{className:`px-3 pb-3`,children:[P,F,I,L]})}),t[30]=P,t[31]=R);let z;return t[32]!==j||t[33]!==R||t[34]!==y?(z=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(Le,{open:y,onOpenChange:m,children:[j,R]})}),t[32]=j,t[33]=R,t[34]=y,t[35]=z):z=t[35],z}function vt(e){let t=(0,Q.c)(38),{isPairing:n,setIsPairing:r,onPaired:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},t[0]=a):a=t[0];let o=ae(we,a),[s,c]=(0,Z.useState)(``),[l,u]=(0,Z.useState)(``),d=(0,Z.useRef)(!0),p,m;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>(d.current=!0,()=>{d.current=!1}),m=[],t[1]=p,t[2]=m):(p=t[1],m=t[2]),(0,Z.useEffect)(p,m);let h;t[3]!==o||t[4]!==n||t[5]!==i||t[6]!==s||t[7]!==r?(h=async()=>{if(n||s.trim().length===0)return;r(!0),u(``);let e=await o({pairingUrl:s.trim()});if(!d.current)return;if(r(!1),e._tag===`Success`){i(e.value);return}if(L(e))return;let t=R(e);u(t instanceof Error?t.message:`Pairing failed.`)},t[3]=o,t[4]=n,t[5]=i,t[6]=s,t[7]=r,t[8]=h):h=t[8];let g=h,_;t[9]===g?_=t[10]:(_=e=>{e.preventDefault(),g()},t[9]=g,t[10]=_);let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(`label`,{className:`block text-sm text-muted-foreground`,htmlFor:`onboarding-pairing-url`,children:`Pairing link`}),t[11]=v):v=t[11];let y=l.length>0,b=l?`onboarding-pairing-error`:void 0,x;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>c(e.currentTarget.value),t[12]=x):x=t[12];let S;t[13]!==n||t[14]!==s||t[15]!==y||t[16]!==b?(S=(0,$.jsxs)(`div`,{children:[v,(0,$.jsx)(ue,{id:`onboarding-pairing-url`,autoFocus:!0,"aria-invalid":y,"aria-describedby":b,className:`mt-2`,size:`lg`,autoCapitalize:`none`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,nativeInput:!0,readOnly:n,placeholder:`https://your-server:5230/pair#token=…`,value:s,onChange:x,onKeyDown:yt})]}),t[13]=n,t[14]=s,t[15]=y,t[16]=b,t[17]=S):S=t[17];let C;t[18]===l?C=t[19]:(C=l?(0,$.jsx)(xe,{id:`onboarding-pairing-error`,variant:`error`,children:(0,$.jsx)(be,{children:l})}):null,t[18]=l,t[19]=C);let T;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsxs)(Me,{type:`button`,className:`group flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,$.jsx)(f,{className:`size-3.5 group-data-panel-open:rotate-90`}),`Need a pairing link?`]}),t[20]=T):T=t[20];let E;t[21]!==n||t[22]!==s?(E=n||s.trim().length===0,t[21]=n,t[22]=s,t[23]=E):E=t[23];let D=n?`Pairing...`:`Pair`,O;t[24]!==E||t[25]!==D?(O=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[T,(0,$.jsx)(w,{type:`submit`,disabled:E,children:D})]}),t[24]=E,t[25]=D,t[26]=O):O=t[26];let k,A;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(`p`,{className:`pt-3 text-sm text-muted-foreground`,children:`Run this on the computer with your code.`}),A=(0,$.jsx)(he,{command:`npx @p4code/cli pair`,className:`mt-2`}),t[27]=k,t[28]=A):(k=t[27],A=t[28]);let j;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(`code`,{className:`font-mono`,children:`npx @p4code/cli serve`}),t[29]=j):j=t[29];let M;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsxs)(ke,{children:[k,A,(0,$.jsxs)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground`,children:[`Start P4 Code first, or run `,j,`. Add `,(0,$.jsx)(`code`,{className:`font-mono`,children:`--tailscale`}),` to use your tailnet.`]})]}),t[30]=M):M=t[30];let N;t[31]===O?N=t[32]:(N=(0,$.jsxs)(Le,{children:[O,M]}),t[31]=O,t[32]=N);let P;return t[33]!==S||t[34]!==C||t[35]!==N||t[36]!==_?(P=(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`form`,{className:`space-y-3`,onSubmit:_,children:[S,C,N]})}),t[33]=S,t[34]=C,t[35]=N,t[36]=_,t[37]=P):P=t[37],P}function yt(e){e.key===`Enter`&&(e.nativeEvent.isComposing||e.keyCode===229)&&e.preventDefault()}var bt=[`codex`,`claudeAgent`];function xt(e){let t=(0,Q.c)(13),{environmentIds:n,onContinue:r}=e,{environments:i}=te(),a;if(t[0]!==n||t[1]!==i){let e;t[3]===i?e=t[4]:(e=e=>(0,$.jsx)(St,{environmentId:e,machineLabel:i.find(t=>t.environmentId===e)?.label??`Computer`},e),t[3]=i,t[4]=e),a=n.map(e),t[0]=n,t[1]=i,t[2]=a}else a=t[2];let o;t[5]===a?o=t[6]:(o=(0,$.jsx)(de,{scrollFade:!0,className:`mt-5 h-auto max-h-[min(32rem,55dvh)]`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:a})}),t[5]=a,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(C,{className:`size-3.5`}),t[7]=s):s=t[7];let c;t[8]===r?c=t[9]:(c=(0,$.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,$.jsxs)(w,{autoFocus:!0,onClick:r,children:[`Continue`,s]})}),t[8]=r,t[9]=c);let l;return t[10]!==o||t[11]!==c?(l=(0,$.jsxs)(Kt,{title:`Connect your agents`,description:`Choose an agent to start coding. You can add more later.`,children:[o,c]}),t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function St(e){let t=(0,Q.c)(57),{environmentId:n,machineLabel:r}=e,i;t[0]===n?i=t[1]:(i=Y.providersValueAtom(n),t[0]=n,t[1]=i);let a=N(i),o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o={reportFailure:!1},t[2]=o):o=t[2];let s=ae(Y.refreshProviders,o),c;t[3]===n?c=t[4]:(c=Y.configValueAtom(n),t[3]=n,t[4]=c);let l=N(c),[u,d]=(0,Z.useState)(null),[f,p]=(0,Z.useState)(!1),[m,h]=(0,Z.useState)(null),g=ne(n,x),_,v;t[5]!==n||t[6]!==s?(_=()=>{s({environmentId:n,input:{}})},v=[n,s],t[5]=n,t[6]=s,t[7]=_,t[8]=v):(_=t[7],v=t[8]),(0,Z.useEffect)(_,v);let y;t[9]===a?y=t[10]:(y=Ue(a),t[9]=a,t[10]=y);let b=y,S,C,T,E;if(t[11]!==b||t[12]!==g||t[13]!==m||t[14]!==n||t[15]!==r||t[16]!==a||t[17]!==l||t[18]!==u?.driver){let e;t[23]!==b||t[24]!==a?(e=e=>{let t=e===`codex`?a?.filter(t=>t.driver===e):void 0;return t?.length?t.map(t=>({driver:e,provider:t,instanceId:t.instanceId})):[{driver:e,provider:b.get(e),instanceId:b.get(e)?.instanceId}]},t[23]=b,t[24]=a,t[25]=e):e=t[25];let i=bt.flatMap(e);if(m){let e;t[26]===m?e=t[27]:(e=e=>e.instanceId===m.instanceId,t[26]=m,t[27]=e);let n=i.findIndex(e),[r]=n>=0?i.splice(n,1):[];i.unshift(r??{driver:`codex`,provider:void 0,instanceId:m.instanceId})}t[28]===r?E=t[29]:(E=(0,$.jsx)(`h2`,{className:`mb-2 text-sm font-medium`,children:r}),t[28]=r,t[29]=E),t[30]===g?S=t[31]:(S=g?null:(0,$.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:`This connection cannot control terminals.`}),t[30]=g,t[31]=S),C=`space-y-1.5`;let o;t[32]!==g||t[33]!==m||t[34]!==n||t[35]!==l||t[36]!==u?.driver?(o=e=>{let{driver:t,provider:r,instanceId:i}=e;return t===`codex`&&l!==null?(0,$.jsx)(Tt,{environmentId:n,provider:r,serverConfig:l,createdAccount:i===m?.instanceId?m:null,onAutoStartConsumed:()=>h(wt),terminalOpen:u?.driver===t,onOpenTerminal:()=>{r!==void 0&&X(n,`terminal:operate`)&&d({environmentId:n,driver:t,providerInstanceId:r.instanceId,cwd:l.cwd,command:r.installed?He(r,l.settings,l.environment.platform.os):Ye(t,l.environment.platform.os),keybindings:l.keybindings})}},i??t):(0,$.jsx)(Et,{driver:t,provider:r,terminalOpen:u?.driver===t,terminalAvailable:l!==null&&g,onOpenTerminal:()=>{r!==void 0&&l!==null&&X(n,`terminal:operate`)&&d({environmentId:n,driver:t,providerInstanceId:r.instanceId,cwd:l.cwd,command:r.installed?He(r,l.settings,l.environment.platform.os):Ye(t,l.environment.platform.os),keybindings:l.keybindings})}},t)},t[32]=g,t[33]=m,t[34]=n,t[35]=l,t[36]=u?.driver,t[37]=o):o=t[37],T=i.map(o),t[11]=b,t[12]=g,t[13]=m,t[14]=n,t[15]=r,t[16]=a,t[17]=l,t[18]=u?.driver,t[19]=S,t[20]=C,t[21]=T,t[22]=E}else S=t[19],C=t[20],T=t[21],E=t[22];let D;t[38]!==C||t[39]!==T?(D=(0,$.jsx)(`div`,{className:C,children:T}),t[38]=C,t[39]=T,t[40]=D):D=t[40];let O;t[41]===a?O=t[42]:(O=a?.some(Ct)?(0,$.jsx)(`div`,{className:`mt-3`,children:(0,$.jsx)(w,{size:`xs`,variant:`ghost-muted`,onClick:()=>p(!0),children:`Connect another ChatGPT account`})}):null,t[41]=a,t[42]=O);let k;t[43]!==f||t[44]!==n?(k=f?(0,$.jsx)(Ke,{environmentId:n,onClose:()=>p(!1),onAccountCreated:(e,t)=>h({instanceId:e,displayName:t,autoStart:!0})}):null,t[43]=f,t[44]=n,t[45]=k):k=t[45];let A;t[46]!==n||t[47]!==s||t[48]!==u?(A=u===null?null:(0,$.jsx)(Dt,{session:u,onClose:()=>{d(null),s({environmentId:n,input:{}})}},`${u.environmentId}:${u.providerInstanceId}:${u.driver}`),t[46]=n,t[47]=s,t[48]=u,t[49]=A):A=t[49];let j;return t[50]!==S||t[51]!==D||t[52]!==O||t[53]!==k||t[54]!==A||t[55]!==E?(j=(0,$.jsxs)(`section`,{children:[E,S,D,O,k,A]}),t[50]=S,t[51]=D,t[52]=O,t[53]=k,t[54]=A,t[55]=E,t[56]=j):j=t[56],j}function Ct(e){return e.driver===`codex`&&Ge(e)===`ready`}function wt(e){return e?{...e,autoStart:!1}:null}function Tt(e){let t=(0,Q.c)(28),{createdAccount:n,onAutoStartConsumed:r,environmentId:i,provider:a,serverConfig:s,terminalOpen:c,onOpenTerminal:l}=e,u=ne(i,x),f=ae(Y.updateSettings,`Codex setup settings`),p;t[0]!==n?.instanceId||t[1]!==a?.instanceId?(p=n?.instanceId??a?.instanceId??d(o.make(`codex`)),t[0]=n?.instanceId,t[1]=a?.instanceId,t[2]=p):p=t[2];let m=p,h=s.settings,g;t[3]!==n||t[4]!==m||t[5]!==h.providerInstances?(g=h.providerInstances[m]??{driver:o.make(`codex`),config:n?{enabled:!0,setupMode:`managed`}:{}},t[3]=n,t[4]=m,t[5]=h.providerInstances,t[6]=g):g=t[6];let _=g,v;t[7]===_.config?v=t[8]:(v=Je(_.config),t[7]=_.config,t[8]=v);let y=v,b=y===`existing`&&_.config!==null&&typeof _.config==`object`&&`setupMode`in _.config&&_.config.setupMode===`existing`,S;t[9]!==i||t[10]!==_||t[11]!==m||t[12]!==h||t[13]!==f?(S=e=>{f({environmentId:i,input:{patch:Ve({settings:h,instanceId:m,instance:{..._,enabled:!0,config:{..._.config!==null&&typeof _.config==`object`?_.config:{},enabled:!0,setupMode:e}}})}})},t[9]=i,t[10]=_,t[11]=m,t[12]=h,t[13]=f,t[14]=S):S=t[14];let C=S,w;return t[15]!==u||t[16]!==C||t[17]!==n?.autoStart||t[18]!==n?.displayName||t[19]!==i||t[20]!==b||t[21]!==m||t[22]!==y||t[23]!==r||t[24]!==l||t[25]!==a||t[26]!==c?(w=b?(0,$.jsx)(Et,{driver:`codex`,provider:a,terminalOpen:c,terminalAvailable:u,onOpenTerminal:l}):(0,$.jsx)(We,{presentation:`onboarding`,autoStart:n?.autoStart===!0,displayName:n?.displayName,onAutoStartConsumed:r,environmentId:i,instanceId:m,provider:a,mode:y,enabled:a?.enabled??!0,onModeChange:C}),t[15]=u,t[16]=C,t[17]=n?.autoStart,t[18]=n?.displayName,t[19]=i,t[20]=b,t[21]=m,t[22]=y,t[23]=r,t[24]=l,t[25]=a,t[26]=c,t[27]=w):w=t[27],w}function Et(e){let t=(0,Q.c)(29),{driver:n,provider:r,terminalOpen:i,terminalAvailable:a,onOpenTerminal:s}=e,c;t[0]===n?c=t[1]:(c=Se.get(o.make(n)),t[0]=n,t[1]=c);let l=c,u=r?.displayName||(n===`claudeAgent`?`Claude Code`:l?.label??n),d;t[2]===r?d=t[3]:(d=qe(r),t[2]=r,t[3]=d);let f=d,p;t[4]===r?p=t[5]:(p=Ge(r),t[4]=r,t[5]=p);let m=p,h;t[6]===n?h=t[7]:(h=o.make(n),t[6]=n,t[7]=h);let g;t[8]!==u||t[9]!==h?(g=(0,$.jsx)(Ce,{driverKind:h,displayName:u,iconClassName:`size-5`}),t[8]=u,t[9]=h,t[10]=g):g=t[10];let _;t[11]===u?_=t[12]:(_=(0,$.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:u}),t[11]=u,t[12]=_);let v=m===`ready`?`Ready to code.`:f.headline,y=m!==`ready`&&f.detail?` · ${f.detail}`:``,b;t[13]!==v||t[14]!==y?(b=(0,$.jsxs)(`p`,{className:`mt-0.5 text-xs leading-relaxed break-words whitespace-pre-wrap text-muted-foreground`,children:[v,y]}),t[13]=v,t[14]=y,t[15]=b):b=t[15];let x;t[16]!==_||t[17]!==b?(x=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[_,b]}),t[16]=_,t[17]=b,t[18]=x):x=t[18];let S;t[19]!==s||t[20]!==m||t[21]!==f||t[22]!==a||t[23]!==i?(S=(0,$.jsx)(`div`,{className:`shrink-0`,children:m===`ready`?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,$.jsx)(D,{className:`size-3.5`}),`Ready`]}):m===`checking`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Checking...`}):m===`disabled`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Disabled`}):m===`attention`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:f.headline}):(0,$.jsxs)(w,{size:`xs`,variant:`ghost`,onClick:s,disabled:i||!a,children:[(0,$.jsx)(E,{className:`size-3.5`}),m===`signIn`?`Sign in`:`Install`]})}),t[19]=s,t[20]=m,t[21]=f,t[22]=a,t[23]=i,t[24]=S):S=t[24];let C;return t[25]!==x||t[26]!==S||t[27]!==g?(C=(0,$.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-border bg-background px-4 py-4`,children:[g,x,S]}),t[25]=x,t[26]=S,t[27]=g,t[28]=C):C=t[28],C}function Dt(e){let t=(0,Q.c)(60),{session:n,onClose:r}=e,{command:i,cwd:a,driver:o,environmentId:s,keybindings:c,providerInstanceId:l}=n,d=ne(s,x),[f]=p(Te,!1,u),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={reportFailure:!1},t[0]=m):m=t[0];let h=ae(ve.open,m),_;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(_={reportFailure:!1},t[1]=_):_=t[1];let v=ae(ve.write,_),y;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y={reportFailure:!1},t[2]=y):y=t[2];let b=ae(ve.close,y),S;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(S=Promise.resolve(),t[3]=S):S=t[3];let C=(0,Z.useRef)(S),T=(0,Z.useRef)(0),E=(0,Z.useRef)(null),D;t[4]===o?D=t[5]:(D=()=>`onboarding-${o}-${O()}`,t[4]=o,t[5]=D);let[k]=(0,Z.useState)(D),A;t[6]===s?A=t[7]:(A=g(s,dt),t[6]=s,t[7]=A);let j=A,[M,N]=(0,Z.useState)(0),[P,F]=(0,Z.useState)(`preparing`),I=P===`ready`||P===`writeFailed`,L;t[8]!==b||t[9]!==i||t[10]!==a||t[11]!==s||t[12]!==h||t[13]!==l||t[14]!==k||t[15]!==v?(L=()=>{let e=T.current+1;return T.current=e,E.current=e,F(`preparing`),C.current=C.current.then(async()=>{if(E.current!==e)return;if(!X(s,`terminal:operate`)){F(`openFailed`);return}if((await h({environmentId:s,input:{threadId:dt,terminalId:k,cwd:a,providerInstanceId:l}}))._tag!==`Success`){E.current===e&&F(`openFailed`);return}if(E.current!==e)return;if(!X(s,`terminal:operate`)){F(`writeFailed`);return}let t=await v({environmentId:s,input:{threadId:dt,terminalId:k,data:i}});E.current===e&&F(t._tag===`Success`?`ready`:`writeFailed`)}),()=>{E.current===e&&(E.current=null),C.current=C.current.then(async()=>{X(s,`terminal:operate`)&&await b({environmentId:s,input:{threadId:dt,terminalId:k,deleteHistory:!0}})})}},t[8]=b,t[9]=i,t[10]=a,t[11]=s,t[12]=h,t[13]=l,t[14]=k,t[15]=v,t[16]=L):L=t[16];let R;t[17]!==b||t[18]!==i||t[19]!==a||t[20]!==s||t[21]!==h||t[22]!==l||t[23]!==M||t[24]!==k||t[25]!==v?(R=[b,i,a,s,h,l,M,k,v],t[17]=b,t[18]=i,t[19]=a,t[20]=s,t[21]=h,t[22]=l,t[23]=M,t[24]=k,t[25]=v,t[26]=R):R=t[26],(0,Z.useEffect)(L,R);let z;t[27]!==d||t[28]!==i||t[29]!==P?(z=d?P===`writeFailed`?(0,$.jsxs)($.Fragment,{children:[`Run `,(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 font-mono`,children:i}),` in this terminal.`]}):P===`ready`?`Review the command, then press Enter to run it.`:P===`openFailed`?`Could not open the setup terminal.`:`Preparing command...`:`This connection cannot control terminals.`,t[27]=d,t[28]=i,t[29]=P,t[30]=z):z=t[30];let B;t[31]===z?B=t[32]:(B=(0,$.jsx)(`span`,{className:`text-2xs font-medium text-muted-foreground`,children:z}),t[31]=z,t[32]=B);let V;t[33]!==d||t[34]!==s||t[35]!==P?(V=P===`openFailed`?(0,$.jsx)(w,{size:`xs`,variant:`ghost`,disabled:!d,onClick:()=>{X(s,`terminal:operate`)&&N(Ot)},children:`Retry`}):null,t[33]=d,t[34]=s,t[35]=P,t[36]=V):V=t[36];let H;t[37]===r?H=t[38]:(H=(0,$.jsx)(w,{size:`xs`,variant:`ghost-muted`,onClick:r,children:`Close`}),t[37]=r,t[38]=H);let U;t[39]!==V||t[40]!==H?(U=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[V,H]}),t[39]=V,t[40]=H,t[41]=U):U=t[41];let W;t[42]!==B||t[43]!==U?(W=(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/60 bg-background/60 px-3 py-1.5`,children:[B,U]}),t[42]=B,t[43]=U,t[44]=W):W=t[44];let G;t[45]!==f||t[46]!==a||t[47]!==o||t[48]!==c||t[49]!==r||t[50]!==l||t[51]!==k||t[52]!==I||t[53]!==j?(G=I?(0,$.jsx)(_e,{threadRef:j,threadId:dt,terminalId:k,terminalLabel:`Install ${o}`,cwd:a,providerInstanceId:l,advancedTypography:f,onSessionExited:r,focusRequestId:1,autoFocus:!0,visible:!0,resizeEpoch:0,drawerHeight:256,keybindings:c}):null,t[45]=f,t[46]=a,t[47]=o,t[48]=c,t[49]=r,t[50]=l,t[51]=k,t[52]=I,t[53]=j,t[54]=G):G=t[54];let K;t[55]===G?K=t[56]:(K=(0,$.jsx)(`div`,{className:`h-64`,children:G}),t[55]=G,t[56]=K);let q;return t[57]!==W||t[58]!==K?(q=(0,$.jsxs)(`div`,{"data-thread-terminal-drawer":!0,className:`mt-4 overflow-hidden rounded-lg border border-border/70 bg-background text-foreground`,children:[W,K]}),t[57]=W,t[58]=K,t[59]=q):q=t[59],q}function Ot(e){return e+1}var kt=`This connection cannot import projects or thread history.`;function At(e){let t=(0,Q.c)(81),{scans:n,isImporting:r,setIsImporting:i,onDone:a}=e,{environments:o}=te(),s=re(n,v),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={reportFailure:!1},t[0]=c):c=t[0];let l=ae(V.create,c),u;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(u={reportFailure:!1},t[1]=u):u=t[1];let d=ae(ot,u),f=B(),[p,m]=(0,Z.useState)(null),g=(0,Z.useRef)(``),_=(0,Z.useRef)(0),[b,x]=(0,Z.useState)(null),S;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=new Map,t[2]=S):S=t[2];let C=(0,Z.useRef)(S),T;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(T=new Map,t[3]=T):T=t[3];let E=(0,Z.useRef)(T),D;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(D=[],t[4]=D):D=t[4];let O=(0,Z.useRef)(D),k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(k=new Map,t[5]=k):k=t[5];let j=(0,Z.useRef)(k),M=(0,Z.useRef)(0),N,P;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>(M.current+=1,()=>{M.current+=1}),P=[],t[6]=N,t[7]=P):(N=t[6],P=t[7]),(0,Z.useEffect)(N,P);let F,I;t[8]!==b||t[9]!==a||t[10]!==f||t[11]!==i?(I=()=>{b!==null&&f.some(e=>e.id===b.projectId&&e.environmentId===b.environmentId)&&(x(null),a(b,g.current,_.current).then(e=>{e||i(!1)}))},F=[b,a,f,i],t[8]=b,t[9]=a,t[10]=f,t[11]=i,t[12]=F,t[13]=I):(F=t[12],I=t[13]),(0,Z.useEffect)(I,F);let R;t[14]===n?R=t[15]:(R=Qe(n.flatMap(Lt)),t[14]=n,t[15]=R);let{available:z,recent:H}=R,W;t[16]!==H||t[17]!==p?(W=p??new Set(H.map(It)),t[16]=H,t[17]=p,t[18]=W):W=t[18];let K=W,q,J;if(t[19]!==z||t[20]!==K||t[21]!==s){let e;t[24]===K?e=t[25]:(e=e=>K.has(e.key),t[24]=K,t[25]=e),q=z.filter(e);let n;t[26]===s?n=t[27]:(n=e=>s.has(e.environmentId),t[26]=s,t[27]=n),J=q.every(n),t[19]=z,t[20]=K,t[21]=s,t[22]=q,t[23]=J}else q=t[22],J=t[23];let ee=J,[Y,ne]=(0,Z.useState)(``),X=ee?Y===kt?``:Y:kt,ie;t[28]!==a||t[29]!==i?(ie=()=>{let e=nt(O.current,E.current,C.current);e===void 0?a(void 0,g.current,_.current):(i(!0),x(e))},t[28]=a,t[29]=i,t[30]=ie):ie=t[30];let oe=ie,se;t[31]!==l||t[32]!==oe||t[33]!==d||t[34]!==r||t[35]!==a||t[36]!==n||t[37]!==i?(se=async e=>{if(r)return;let t=()=>e.every(Ft),o=()=>{i(!1),ne(kt)};if(!t()){o();return}if(e.length===0){a();return}i(!0),g.current=``,_.current=0,O.current=e.map(Pt);let s=M.current,c=C.current,u=j.current,f=c.size>0?e.filter(e=>c.has(e.key)).length:0,p=0,m=0,v=new Set;for(let n of e){let{environmentId:e}=n;if(s!==M.current||c!==C.current)return;if(!t()){o();return}if(c.has(n.key))continue;let r=tt(U(),e,n);if(r===null){let t=u.get(n.key);if(t===void 0){let e=A();t={projectId:e,commandId:h.make(`onboarding:project:create:${e}`)},u.set(n.key,t)}r=t.projectId;let i=await l({environmentId:e,input:{projectId:r,commandId:t.commandId,title:n.title,workspaceRoot:n.path,createWorkspaceRootIfMissing:!1,defaultModelSelection:null}});if(s!==M.current||c!==C.current)return;if(i._tag!==`Success`){L(i)||(u.delete(n.key),v.add(e));continue}}if(!t()){o();return}let i=await d({environmentId:e,input:{projectId:r,expectedWorkspaceRoot:n.path}});if(s!==M.current||c!==C.current)return;i._tag===`Success`?(p+=i.value.importedCount,m+=i.value.skippedCount,i.value.importedCount>0&&E.current.set(n.key,y(e,r)),i.value.skippedCount===0&&(f+=1,c.set(n.key,y(e,r)))):L(i)||(u.delete(n.key),v.add(e))}for(let e of n)v.has(e.environmentId)&&e.refresh();i(!1),_.current=p,f<e.length&&(p>0&&m>0?g.current=`Imported ${p} ${p===1?`thread`:`threads`}. ${m} ${m===1?`thread`:`threads`} could not be imported.`:m>0?g.current=`${m} ${m===1?`thread could`:`threads could`} not be imported.`:p>0?g.current=`Imported ${p} ${p===1?`thread`:`threads`}. Some thread history could not be imported.`:g.current=`Could not import thread history.`),oe()},t[31]=l,t[32]=oe,t[33]=d,t[34]=r,t[35]=a,t[36]=n,t[37]=i,t[38]=se):se=t[38];let ce=se;if(n.every(Nt)&&n.some(Mt)){let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Your projects`}),t[39]=e):e=t[39];let n;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 py-6`,children:[(0,$.jsx)(G,{size:`lg`,tone:`muted`}),(0,$.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`Looking for projects from Claude Code and Codex…`})]}),t[40]=n):n=t[40];let r;return t[41]===a?r=t[42]:(r=(0,$.jsxs)(`div`,{className:`flex h-full min-h-40 flex-col`,children:[e,n,(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(w,{variant:`ghost-muted`,onClick:()=>void a(),children:`Do not import projects`})})]}),t[41]=a,t[42]=r),r}let le;t[43]!==z||t[44]!==r||t[45]!==q?(le=z.length>0?(0,$.jsxs)(`div`,{className:`mt-5 flex items-center justify-between gap-3 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{role:`status`,children:[q.length,` of `,z.length,` selected`]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(w,{variant:`ghost`,size:`xs`,disabled:r||q.length===z.length,onClick:()=>m(new Set(z.map(jt))),children:`Select all`}),(0,$.jsx)(w,{variant:`ghost`,size:`xs`,disabled:r||q.length===0,onClick:()=>m(new Set),children:`Select none`})]})]}):null,t[43]=z,t[44]=r,t[45]=q,t[46]=le):le=t[46];let ue;if(t[47]!==z||t[48]!==o||t[49]!==r||t[50]!==n||t[51]!==K){let e;t[53]!==z||t[54]!==o||t[55]!==r||t[56]!==n.length||t[57]!==K?(e=e=>{let t=z.filter(t=>t.environmentId===e.environmentId),i=o.find(t=>t.environmentId===e.environmentId)?.label??`Computer`;return(0,$.jsxs)(`fieldset`,{className:`min-w-0 space-y-0.5`,disabled:r,children:[n.length>1?(0,$.jsx)(`legend`,{className:`mb-2 text-sm font-medium`,children:i}):null,e.isPending&&e.data===null?(0,$.jsxs)(`div`,{className:`flex items-center gap-2 py-3 text-sm text-muted-foreground`,children:[(0,$.jsx)(G,{size:`md`}),`Looking for projects…`]}):e.error===null?t.length===0?(0,$.jsx)(`p`,{className:`py-2 text-sm text-muted-foreground`,children:`No existing Claude Code or Codex projects found.`}):null:(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-muted-foreground`,children:[(0,$.jsxs)(`span`,{children:[`Could not check projects. `,e.error]}),(0,$.jsx)(w,{variant:`ghost`,size:`sm`,onClick:e.refresh,children:`Retry`})]}),e.data?.truncated?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:pt}):null,(0,$.jsx)(Rt,{candidates:t,selectedKeys:K,onSelectionChange:m})]},e.environmentId)},t[53]=z,t[54]=o,t[55]=r,t[56]=n.length,t[57]=K,t[58]=e):e=t[58],ue=n.map(e),t[47]=z,t[48]=o,t[49]=r,t[50]=n,t[51]=K,t[52]=ue}else ue=t[52];let fe;t[59]===ue?fe=t[60]:(fe=(0,$.jsx)(de,{scrollFade:!0,className:`mt-2 h-auto max-h-80`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:ue})}),t[59]=ue,t[60]=fe);let pe;t[61]===X?pe=t[62]:(pe=X?(0,$.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,children:X}):null,t[61]=X,t[62]=pe);let me;t[63]!==oe||t[64]!==r?(me=(0,$.jsx)(w,{variant:`ghost-muted`,disabled:r,onClick:oe,children:`Do not import projects`}),t[63]=oe,t[64]=r,t[65]=me):me=t[65];let he=!ee||r||q.length===0,ge;t[66]!==ce||t[67]!==q?(ge=()=>void ce(q),t[66]=ce,t[67]=q,t[68]=ge):ge=t[68];let _e=r?`Importing…`:`Import ${q.length} ${q.length===1?`project`:`projects`}`,ve;t[69]!==he||t[70]!==ge||t[71]!==_e?(ve=(0,$.jsx)(w,{autoFocus:!0,disabled:he,onClick:ge,children:_e}),t[69]=he,t[70]=ge,t[71]=_e,t[72]=ve):ve=t[72];let ye;t[73]!==me||t[74]!==ve?(ye=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-end gap-3`,children:[me,ve]}),t[73]=me,t[74]=ve,t[75]=ye):ye=t[75];let be;return t[76]!==le||t[77]!==fe||t[78]!==pe||t[79]!==ye?(be=(0,$.jsxs)(Kt,{title:`Import your projects`,description:`Import projects and conversations from Claude Code and Codex on your selected computers.`,children:[le,fe,pe,ye]}),t[76]=le,t[77]=fe,t[78]=pe,t[79]=ye,t[80]=be):be=t[80],be}function jt(e){return e.key}function Mt(e){return e.isPending}function Nt(e){return e.data===null}function Pt(e){return e.key}function Ft(e){return X(e.environmentId,v)}function It(e){return e.key}function Lt(e){return(e.data?.candidates??[]).map(t=>({...t,environmentId:e.environmentId,key:it(e.environmentId,t.path)}))}function Rt(e){let t=(0,Q.c)(25),{candidates:n,selectedKeys:r,onSelectionChange:i}=e,a;t[0]===n?a=t[1]:(a=et(n),t[0]=n,t[1]=a);let{repositories:o,other:s}=a,c;t[2]!==i||t[3]!==r?(c=(e,t)=>{let n=new Set(r);for(let r of e)t?n.add(r):n.delete(r);i(n)},t[2]=i,t[3]=r,t[4]=c):c=t[4];let l=c,u;if(t[5]!==s||t[6]!==r){let e;t[8]===r?e=t[9]:(e=e=>r.has(e.key),t[8]=r,t[9]=e),u=s.filter(e),t[5]=s,t[6]=r,t[7]=u}else u=t[7];let d=u.length,p;if(t[10]!==o||t[11]!==r||t[12]!==l){let e;t[14]!==r||t[15]!==l?(e=e=>(0,$.jsx)(Bt,{group:e,selectedKeys:r,onToggle:l},e.key),t[14]=r,t[15]=l,t[16]=e):e=t[16],p=o.map(e),t[10]=o,t[11]=r,t[12]=l,t[13]=p}else p=t[13];let m;t[17]!==s||t[18]!==d||t[19]!==r||t[20]!==l?(m=s.length>0?(0,$.jsxs)(Le,{children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[(0,$.jsx)(ge,{checked:d===s.length,indeterminate:d>0&&d<s.length,onCheckedChange:e=>l(s.map(zt),e===!0)}),(0,$.jsxs)(Me,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[(0,$.jsx)(f,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),(0,$.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,children:`Other folders`}),(0,$.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground tabular-nums`,children:[s.length,` `,s.length===1?`folder`:`folders`]})]})]}),(0,$.jsx)(ke,{children:s.map(e=>(0,$.jsx)(Wt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>l([e.key],t)},e.key))})]}):null,t[17]=s,t[18]=d,t[19]=r,t[20]=l,t[21]=m):m=t[21];let h;return t[22]!==p||t[23]!==m?(h=(0,$.jsxs)($.Fragment,{children:[p,m]}),t[22]=p,t[23]=m,t[24]=h):h=t[24],h}function zt(e){return e.key}function Bt(e){let t=(0,Q.c)(53),{group:n,selectedKeys:r,onToggle:i}=e,a,o;if(t[0]!==n.candidates||t[1]!==r){a=n.candidates.map(Ht);let e;t[4]===r?e=t[5]:(e=e=>r.has(e),t[4]=r,t[5]=e),o=a.filter(e),t[0]=n.candidates,t[1]=r,t[2]=a,t[3]=o}else a=t[2],o=t[3];let s=o.length,c=n.candidates.length===1,l=n.candidates[0];if(c&&l!==void 0){let e=n.label,a=l.path,o;t[6]!==l.key||t[7]!==r?(o=r.has(l.key),t[6]=l.key,t[7]=r,t[8]=o):o=t[8];let s;t[9]!==i||t[10]!==l.key?(s=e=>i([l.key],e),t[9]=i,t[10]=l.key,t[11]=s):s=t[11];let c;return t[12]!==n.label||t[13]!==l||t[14]!==o||t[15]!==s?(c=(0,$.jsx)(Wt,{candidate:l,label:e,path:a,checked:o,onCheckedChange:s}),t[12]=n.label,t[13]=l,t[14]=o,t[15]=s,t[16]=c):c=t[16],c}let u=s===a.length,d=s>0&&s<a.length,p;t[17]!==a||t[18]!==i?(p=e=>i(a,e===!0),t[17]=a,t[18]=i,t[19]=p):p=t[19];let m;t[20]!==u||t[21]!==d||t[22]!==p?(m=(0,$.jsx)(ge,{checked:u,indeterminate:d,onCheckedChange:p}),t[20]=u,t[21]=d,t[22]=p,t[23]=m):m=t[23];let h;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(f,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),t[24]=h):h=t[24];let g;t[25]===n.label?g=t[26]:(g=(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:n.label}),t[25]=n.label,t[26]=g);let _;t[27]===n.candidates?_=t[28]:(_=new Set(n.candidates.flatMap(Vt)),t[27]=n.candidates,t[28]=_);let v;t[29]===_?v=t[30]:(v=[..._],t[29]=_,t[30]=v);let y;t[31]!==n.lastActiveAt||t[32]!==n.threadCount||t[33]!==v?(y=(0,$.jsx)(Gt,{sources:v,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[31]=n.lastActiveAt,t[32]=n.threadCount,t[33]=v,t[34]=y):y=t[34];let b;t[35]!==y||t[36]!==g?(b=(0,$.jsxs)(Me,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[h,g,y]}),t[35]=y,t[36]=g,t[37]=b):b=t[37];let x;t[38]!==b||t[39]!==m?(x=(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[m,b]}),t[38]=b,t[39]=m,t[40]=x):x=t[40];let S;if(t[41]!==n.candidates||t[42]!==i||t[43]!==r){let e;t[45]!==i||t[46]!==r?(e=e=>(0,$.jsx)(Wt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>i([e.key],t)},e.key),t[45]=i,t[46]=r,t[47]=e):e=t[47],S=n.candidates.map(e),t[41]=n.candidates,t[42]=i,t[43]=r,t[44]=S}else S=t[44];let C;t[48]===S?C=t[49]:(C=(0,$.jsx)(ke,{children:S}),t[48]=S,t[49]=C);let w;return t[50]!==x||t[51]!==C?(w=(0,$.jsxs)(Le,{defaultOpen:!0,children:[x,C]}),t[50]=x,t[51]=C,t[52]=w):w=t[52],w}function Vt(e){return e.sources}function Ht(e){return e.key}function Ut(e){let t=(0,Q.c)(12),{path:n,className:r}=e,i;t[0]===n?i=t[1]:(i=rt(n),t[0]=n,t[1]=i);let{name:a,parent:o}=i,s;t[2]===r?s=t[3]:(s=M(`flex min-w-0 items-baseline font-mono`,r),t[2]=r,t[3]=s);let c;t[4]===o?c=t[5]:(c=o.length>0?(0,$.jsx)(`span`,{className:`truncate`,children:o}):null,t[4]=o,t[5]=c);let l;t[6]===a?l=t[7]:(l=(0,$.jsx)(`span`,{className:`max-w-full shrink-0 truncate`,children:a}),t[6]=a,t[7]=l);let u;return t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,$.jsxs)(`span`,{className:s,children:[c,l]}),t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function Wt(e){let t=(0,Q.c)(30),{candidate:n,label:r,path:i,nested:a,checked:o,onCheckedChange:s}=e,c=a!==void 0&&a,l=c&&`pl-8`,u;t[0]===l?u=t[1]:(u=M(`flex cursor-pointer items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40 has-disabled:cursor-default`,l),t[0]=l,t[1]=u);let d;t[2]===s?d=t[3]:(d=e=>s(e===!0),t[2]=s,t[3]=d);let f;t[4]!==o||t[5]!==d?(f=(0,$.jsx)(ge,{checked:o,onCheckedChange:d}),t[4]=o,t[5]=d,t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-2 truncate`}),t[7]=p):p=t[7];let m;t[8]===r?m=t[9]:(m=r===void 0?null:(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:r}),t[8]=r,t[9]=m);let h;t[10]!==r||t[11]!==i?(h=i===void 0?null:(0,$.jsx)(Ut,{path:i,className:r===void 0?`text-xs`:`text-2xs text-muted-foreground`}),t[10]=r,t[11]=i,t[12]=h):h=t[12];let g;t[13]!==m||t[14]!==h?(g=(0,$.jsxs)(se,{render:p,children:[m,h]}),t[13]=m,t[14]=h,t[15]=g):g=t[15];let _;t[16]===n.path?_=t[17]:(_=(0,$.jsx)(ce,{variant:`code`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==_||t[19]!==g?(v=(0,$.jsxs)(le,{children:[g,_]}),t[18]=_,t[19]=g,t[20]=v):v=t[20];let y=c?null:n.sources,b;t[21]!==n.lastActiveAt||t[22]!==n.threadCount||t[23]!==y?(b=(0,$.jsx)(Gt,{sources:y,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[21]=n.lastActiveAt,t[22]=n.threadCount,t[23]=y,t[24]=b):b=t[24];let x;return t[25]!==v||t[26]!==b||t[27]!==u||t[28]!==f?(x=(0,$.jsxs)(`label`,{className:u,children:[f,v,b]}),t[25]=v,t[26]=b,t[27]=u,t[28]=f,t[29]=x):x=t[29],x}function Gt(e){let t=(0,Q.c)(19),{sources:n,threadCount:r,lastActiveAt:i}=e,a;t[0]===i?a=t[1]:(a=i===null?null:oe(i),t[0]=i,t[1]=a);let s=a,c=s===null?``:s.suffix===null?`now`:s.value,l;t[2]===n?l=t[3]:(l=n?.includes(`claudeAgent`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Claude Code`,children:(0,$.jsx)(Ce,{driverKind:o.make(`claudeAgent`),displayName:`Claude Code`,iconClassName:`size-3`})}):null,t[2]=n,t[3]=l);let u;t[4]===l?u=t[5]:(u=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:l}),t[4]=l,t[5]=u);let d;t[6]===n?d=t[7]:(d=n?.includes(`codex`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Codex`,children:(0,$.jsx)(Ce,{driverKind:o.make(`codex`),displayName:`Codex`,iconClassName:`size-3`})}):null,t[6]=n,t[7]=d);let f;t[8]===d?f=t[9]:(f=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:d}),t[8]=d,t[9]=f);let p;t[10]===r?p=t[11]:(p=(0,$.jsx)(`span`,{className:`text-right`,children:r}),t[10]=r,t[11]=p);let m;t[12]===c?m=t[13]:(m=(0,$.jsx)(`span`,{className:`text-right whitespace-nowrap`,children:c}),t[12]=c,t[13]=m);let h;return t[14]!==u||t[15]!==f||t[16]!==p||t[17]!==m?(h=(0,$.jsxs)(`span`,{className:`ml-auto grid shrink-0 grid-cols-[1rem_1rem_2.5rem_2.25rem] items-center gap-x-1 text-xs text-muted-foreground tabular-nums`,children:[u,f,p,m]}),t[14]=u,t[15]=f,t[16]=p,t[17]=m,t[18]=h):h=t[18],h}function Kt(e){let t=(0,Q.c)(8),{title:n,description:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=r?(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:r}):null,t[2]=r,t[3]=o);let s;return t[4]!==i||t[5]!==a||t[6]!==o?(s=(0,$.jsxs)($.Fragment,{children:[a,o,i]}),t[4]=i,t[5]=a,t[6]=o,t[7]=s):s=t[7],s}var qt=S(s);function Jt(){let e=(0,Q.c)(14),{authGateState:t}=Ae.useRouteContext(),n=K(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:Xt},e[0]=r):r=e[0];let i=q(r),a;e[1]===i?a=e[2]:(a=i.startsWith(`agents:`)?j(qt(i.slice(7))):void 0,e[1]=i,e[2]=a);let o=a,s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s={select:Yt},e[3]=s):s=e[3];let c=q(s),[l,u]=(0,Z.useState)(!1),d=ye(),f=t.status===`authenticated`,p;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(ze,{}),e[4]=p):p=e[4];let m;e[5]!==l||e[6]!==c||e[7]!==f||e[8]!==n||e[9]!==d||e[10]!==o?(m=c&&!l?(0,$.jsx)(mt,{localAvailable:f,resumeEnvironmentId:o,onDone:async e=>{u(!0),e===void 0?await n({to:`/`,replace:!0}):await d(e,{replace:!0}).catch(()=>n({to:`/`,replace:!0}))}}):null,e[5]=l,e[6]=c,e[7]=f,e[8]=n,e[9]=d,e[10]=o,e[11]=m):m=e[11];let h;return e[12]===m?h=e[13]:(h=(0,$.jsxs)($.Fragment,{children:[p,m]}),e[12]=m,e[13]=h),h}function Yt(e){return e.pathname===`/welcome`}function Xt(e){return e.hash}export{Jt as component};
2
+ //# sourceMappingURL=welcome-CfpSLEhO.js.map
@@ -384,7 +384,7 @@
384
384
  </script>
385
385
  <style>html,body,#root{width:100%;height:100%;margin:0}body{color:#262626;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif}html.dark body{color:#f5f5f5;background:#0a0a0a}#boot-shell{background:inherit;min-height:100%;color:inherit;justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}html[data-theme-selected=true] #boot-shell{background:var(--boot-background);color:var(--boot-foreground)}#boot-shell-card{z-index:1;justify-content:center;align-items:center;width:96px;height:96px;display:flex;position:relative}#boot-shell-logo{object-fit:contain;width:64px;height:64px}#boot-error{text-align:center;justify-items:center;gap:16px;max-width:600px;padding:24px;display:grid}#boot-error p{overflow-wrap:anywhere;margin:0}#boot-error button{color:inherit;font:inherit;cursor:pointer;background:0 0;border:1px solid;border-radius:4px;padding:8px 16px}</style>
386
386
  <title>P4 Code</title>
387
- <script type="module" crossorigin src="/assets/index-DFvDwgHR.js"></script>
387
+ <script type="module" crossorigin src="/assets/index-CZlF3wQ9.js"></script>
388
388
  </head>
389
389
  <body>
390
390
  <div id="root">
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { f as selectLayoutItems, r as computeLayout, u as resolveValue } from "./runtime-Bbjyj8bt.mjs";
3
+ import { f as selectLayoutItems, r as computeLayout, u as resolveValue } from "./runtime-DvE0t3kv.mjs";
4
4
  import * as NodeModule from "node:module";
5
5
  // ../../node_modules/.pnpm/konva@10.7.1_skia-canvas@3.0.8/node_modules/konva/lib/Global.js
6
6
  /*
@@ -17641,4 +17641,4 @@ function createRenderer(width, height) {
17641
17641
  }
17642
17642
  export { createRenderer, rasterizeSvg, renderDesignExport, renderDesignPng };
17643
17643
 
17644
- //# sourceMappingURL=renderer-DKZZL6cd.mjs.map
17644
+ //# sourceMappingURL=renderer-B3Ia4LBS.mjs.map
@@ -11545,8 +11545,6 @@ const ProjectScript = Struct({
11545
11545
  command: TrimmedNonEmptyString,
11546
11546
  icon: ProjectScriptIcon,
11547
11547
  runOnWorktreeCreate: Boolean,
11548
- /** Run in the thread's worktree each time the thread settles. */
11549
- runOnSettle: optional(Boolean),
11550
11548
  /** Start the agent while setup runs unless explicitly disabled. */
11551
11549
  async: optional(Boolean),
11552
11550
  previewUrl: optional(TrimmedNonEmptyString),
@@ -19350,7 +19348,6 @@ const THREAD_KEYBINDING_COMMANDS = [
19350
19348
  "thread.previous",
19351
19349
  "thread.next",
19352
19350
  "thread.copyReference",
19353
- "thread.settle",
19354
19351
  "thread.pin",
19355
19352
  "thread.sideChat",
19356
19353
  "thread.undo",
@@ -19943,11 +19940,6 @@ const SidebarThreadPreviewCount = Int.check(isBetween({
19943
19940
  maximum: 15
19944
19941
  }));
19945
19942
  const DEFAULT_SIDEBAR_THREAD_PREVIEW_COUNT = 6;
19946
- const SidebarAutoSettleAfterDays = Number$1.check(isBetween({
19947
- minimum: 1,
19948
- maximum: 90
19949
- }));
19950
- const DEFAULT_SIDEBAR_AUTO_SETTLE_AFTER_DAYS = 3;
19951
19943
  const GlassOpacity = Int.check(isBetween({
19952
19944
  minimum: 40,
19953
19945
  maximum: 100
@@ -20495,10 +20487,6 @@ const StorageRetentionDays = NullOr(Int.check(isBetween({
20495
20487
  minimum: 1,
20496
20488
  maximum: 3650
20497
20489
  })));
20498
- const SettledWorktreeRetentionDays = NullOr(Int.check(isBetween({
20499
- minimum: 0,
20500
- maximum: 3650
20501
- })));
20502
20490
  const WorktreeKeepWhen = Literals([
20503
20491
  "any-local-files",
20504
20492
  "uncommitted-changes",
@@ -20507,7 +20495,6 @@ const WorktreeKeepWhen = Literals([
20507
20495
  const WorktreeCleanupRules = Struct({
20508
20496
  worktreeKeepWhen: WorktreeKeepWhen.pipe(withDecodingDefault(succeed("uncommitted-changes"))),
20509
20497
  worktreeAfterDays: StorageRetentionDays,
20510
- worktreeSettledAfterDays: SettledWorktreeRetentionDays.pipe(withDecodingDefault(succeed(null))),
20511
20498
  worktreeOnMerge: Boolean,
20512
20499
  worktreeOnDelete: Boolean,
20513
20500
  worktreeUnchanged: Boolean
@@ -20537,9 +20524,6 @@ const PROJECT_SCOPED_SERVER_SETTING_KEYS = [
20537
20524
  "branchNamePrefix",
20538
20525
  "branchNameInstructions",
20539
20526
  "pullRequestMergeMethod",
20540
- "sidebarAutoSettleOnMerge",
20541
- "sidebarAutoSettleAfterDays",
20542
- "sidebarAutoSettleKeepPullRequests",
20543
20527
  "continueThreadsAfterServerUpdate",
20544
20528
  "responseStreamingMode"
20545
20529
  ];
@@ -20547,7 +20531,7 @@ const ProjectProviderInstanceOverride = Struct({ enabled: optionalKey(Boolean) }
20547
20531
  /**
20548
20532
  * One project's overrides. An absent key inherits the environment value;
20549
20533
  * `null` is a real value where the environment type is nullable (no default
20550
- * model, no dedicated writer model, never auto-settle).
20534
+ * model, no dedicated writer model).
20551
20535
  *
20552
20536
  * `providerInstances` sits outside `PROJECT_SCOPED_SERVER_SETTING_KEYS`:
20553
20537
  * every other key replaces its `ServerSettings` field whole, while this one
@@ -20585,9 +20569,6 @@ const ProjectSettingsOverrides = Struct({
20585
20569
  branchNamePrefix: optionalKey(TrimmedString),
20586
20570
  branchNameInstructions: optionalKey(TrimmedString),
20587
20571
  pullRequestMergeMethod: optionalKey(NullOr(PullRequestMergeMethod)),
20588
- sidebarAutoSettleOnMerge: optionalKey(Boolean),
20589
- sidebarAutoSettleAfterDays: optionalKey(NullOr(SidebarAutoSettleAfterDays)),
20590
- sidebarAutoSettleKeepPullRequests: optionalKey(Boolean),
20591
20572
  continueThreadsAfterServerUpdate: optionalKey(Boolean),
20592
20573
  responseStreamingMode: optionalKey(ResponseStreamingMode),
20593
20574
  providerInstances: optionalKey(Record(ProviderInstanceId, ProjectProviderInstanceOverride))
@@ -20638,7 +20619,6 @@ const StorageCleanupReport = Struct({
20638
20619
  const StorageCleanupSettings = Struct({
20639
20620
  worktreeKeepWhen: WorktreeKeepWhen.pipe(withDecodingDefault(succeed("uncommitted-changes"))),
20640
20621
  worktreeAfterDays: StorageRetentionDays.pipe(withDecodingDefault(succeed(null))),
20641
- worktreeSettledAfterDays: SettledWorktreeRetentionDays.pipe(withDecodingDefault(succeed(null))),
20642
20622
  worktreeOnMerge: Boolean.pipe(withDecodingDefault(succeed(false))),
20643
20623
  worktreeOnDelete: Boolean.pipe(withDecodingDefault(succeed(false))),
20644
20624
  worktreeUnchanged: Boolean.pipe(withDecodingDefault(succeed(false))),
@@ -20721,13 +20701,10 @@ const ServerSettings = Struct({
20721
20701
  deviceOnboardingCompleted: Boolean.pipe(withDecodingDefault(succeed(false))),
20722
20702
  deviceHosts: SshDeviceHostConfigs.pipe(withDecodingDefault(succeed([]))),
20723
20703
  easDeviceHosts: EasDeviceHostConfigs.pipe(withDecodingDefault(succeed([]))),
20724
- sidebarAutoSettleAfterDays: NullOr(SidebarAutoSettleAfterDays).pipe(withDecodingDefault(succeed(DEFAULT_SIDEBAR_AUTO_SETTLE_AFTER_DAYS))),
20725
20704
  compactIdleThreads: LegacyCompactIdleThreads.pipe(withDecodingDefault(succeed(false))),
20726
20705
  idleCompaction: optionalKey(IdleCompactionMode),
20727
20706
  snoozeLimitedThreads: Boolean.pipe(withDecodingDefault(succeed(false))),
20728
20707
  autoResumeLimitedThreads: Boolean.pipe(withDecodingDefault(succeed(false))),
20729
- sidebarAutoSettleKeepPullRequests: Boolean.pipe(withDecodingDefault(succeed(false))),
20730
- sidebarAutoSettleOnMerge: Boolean.pipe(withDecodingDefault(succeed(true))),
20731
20708
  backgroundActivity: BackgroundActivitySettings,
20732
20709
  automaticGitFetchInterval: DurationFromMillis.pipe(withDecodingDefault(succeed(toMillis(DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL)))),
20733
20710
  providerHealthRefreshInterval: DurationFromMillis.pipe(withDecodingDefault(succeed(toMillis(DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL)))),
@@ -20963,7 +20940,6 @@ const ServerSettingsPatch = Struct({
20963
20940
  rules: Struct({
20964
20941
  worktreeKeepWhen: optionalKey(WorktreeKeepWhen),
20965
20942
  worktreeAfterDays: optionalKey(StorageRetentionDays),
20966
- worktreeSettledAfterDays: optionalKey(SettledWorktreeRetentionDays),
20967
20943
  worktreeOnMerge: optionalKey(Boolean),
20968
20944
  worktreeOnDelete: optionalKey(Boolean),
20969
20945
  worktreeUnchanged: optionalKey(Boolean)
@@ -20972,7 +20948,6 @@ const ServerSettingsPatch = Struct({
20972
20948
  storageCleanup: optionalKey(Struct({
20973
20949
  worktreeKeepWhen: optionalKey(WorktreeKeepWhen),
20974
20950
  worktreeAfterDays: optionalKey(StorageRetentionDays),
20975
- worktreeSettledAfterDays: optionalKey(SettledWorktreeRetentionDays),
20976
20951
  worktreeOnMerge: optionalKey(Boolean),
20977
20952
  worktreeOnDelete: optionalKey(Boolean),
20978
20953
  worktreeUnchanged: optionalKey(Boolean),
@@ -21010,11 +20985,8 @@ const ServerSettingsPatch = Struct({
21010
20985
  deviceOnboardingCompleted: optionalKey(Boolean),
21011
20986
  deviceHosts: optionalKey(SshDeviceHostConfigs),
21012
20987
  easDeviceHosts: optionalKey(EasDeviceHostConfigs),
21013
- sidebarAutoSettleAfterDays: optionalKey(NullOr(SidebarAutoSettleAfterDays)),
21014
20988
  compactIdleThreads: optionalKey(LegacyCompactIdleThreads),
21015
20989
  idleCompaction: optionalKey(IdleCompactionMode),
21016
- sidebarAutoSettleKeepPullRequests: optionalKey(Boolean),
21017
- sidebarAutoSettleOnMerge: optionalKey(Boolean),
21018
20990
  autoResumeLimitedThreads: optionalKey(Boolean),
21019
20991
  snoozeLimitedThreads: optionalKey(Boolean),
21020
20992
  backgroundActivity: optionalKey(Struct({
@@ -21080,8 +21052,8 @@ function requiredScopesForServerSettingsPatch(patch) {
21080
21052
  return [...changesSettings || !changesProviders ? [AuthSettingsWriteScope] : [], ...changesProviders ? [AuthProvidersManageScope] : []];
21081
21053
  }
21082
21054
  /**
21083
- * Project scripts run on the host when a worktree is created or a thread
21084
- * settles, so a project mutation that carries them needs the same grant as
21055
+ * Project scripts run on the host when a worktree is created,
21056
+ * so a project mutation that carries them needs the same grant as
21085
21057
  * saving project scripts through settings, on top of `orchestration:operate`.
21086
21058
  */
21087
21059
  function requiredScopesForProjectMutation(mutation) {
@@ -24295,7 +24267,6 @@ const OrchestratorMcpThreadListInput = Struct({
24295
24267
  projectId: OrchestratorMcpProjectTarget,
24296
24268
  statuses: optional(ArraySchema(OrchestratorMcpThreadStatus).check(isMaxLength(10))),
24297
24269
  titleContains: optional(TrimmedNonEmptyString.check(isMaxLength(256))),
24298
- settled: optional(Boolean),
24299
24270
  snoozed: optional(Boolean),
24300
24271
  includeSubagents: optional(Boolean),
24301
24272
  cursor: optional(NonNegativeInt),
@@ -24313,8 +24284,6 @@ const OrchestratorMcpThreadListItem = Struct({
24313
24284
  runtimeMode: RuntimeMode,
24314
24285
  interactionMode: ProviderInteractionMode,
24315
24286
  linkedPullRequest: NullOr(ThreadLinkedPullRequest),
24316
- settled: Boolean,
24317
- settledAt: NullOr(IsoDateTime),
24318
24287
  snoozed: Boolean,
24319
24288
  /** When a snoozed thread wakes; null when it is not snoozed. */
24320
24289
  snoozedUntil: NullOr(IsoDateTime),
@@ -24369,8 +24338,6 @@ const OrchestratorMcpThreadDetail = Struct({
24369
24338
  itemCount: NonNegativeInt,
24370
24339
  pendingRequestCount: NonNegativeInt,
24371
24340
  archived: Boolean,
24372
- settled: Boolean,
24373
- settledAt: NullOr(IsoDateTime),
24374
24341
  snoozed: Boolean,
24375
24342
  /** When a snoozed thread wakes; null when it is not snoozed. */
24376
24343
  snoozedUntil: NullOr(IsoDateTime),
@@ -24736,7 +24703,6 @@ const P4ProjectFileScript = Struct({
24736
24703
  command: trimmedNonEmpty({ description: "Shell command executed in a P4 Code terminal at the project root." }),
24737
24704
  icon: optionalKey(ProjectScriptIcon.annotate({ description: "Icon shown next to the script in the scripts menu. Defaults to \"play\"." })),
24738
24705
  runOnWorktreeCreate: optionalKey(Boolean.annotate({ description: "When true, the script runs automatically after a worktree is created for a new thread." })),
24739
- runOnSettle: optionalKey(Boolean.annotate({ description: "When true, the script runs in the thread's worktree each time the thread settles, for example to delete build output. Threads without their own worktree skip it." })),
24740
24706
  async: optionalKey(Boolean.annotate({ description: "Only for runOnWorktreeCreate scripts. When true (the default), the agent starts while the script is still running. Set false to hold the agent until the script exits." })),
24741
24707
  previewUrl: optionalKey(trimmedNonEmpty({ description: "URL opened in the in-app browser preview when this script runs. Only honored on the desktop build." })),
24742
24708
  autoOpenPreview: optionalKey(Boolean.annotate({ description: "When true, automatically open the preview panel at `previewUrl` the moment the script starts." }))
@@ -32062,4 +32028,4 @@ function semanticDiff(before, after) {
32062
32028
  }
32063
32029
  export { WsSelfImproveSubscribeSettingsRpc as $, PreviewStreamHostSetup as $a, DEFAULT_RUNTIME_MODE as $c, prependUrl as $d, AuthGrantScope as $f, ProviderSetupError as $i, PROVIDER_SEND_TURN_MAX_IMAGE_BYTES as $l, TurnItemId as $m, ReviewDiffFileStat as $n, EnvironmentAuthenticatedPrincipal as $o, DEFAULT_TEXT_GENERATION_MODEL as $p, OrchestratorMcpDeleteScheduledTaskResult as $r, OrchestrationV2GetThreadProjectionError as $s, getStreamSchemas as $t, toPersisted as $u, ComputerUseBrowserChatRequest as A, UsageLimitSourceConfig as Aa, isKnownOrchestrationV2EventType as Ac, urlParams as Ad, FileTypeId as Af, GitCommandError as Ai, VcsProcessStdinWriteError as Al, EnvironmentId as Am, PreviewAutomationRecordingDesktopUpdateRequiredError as An, LOCAL_DEVICE_HOST_LABEL as Ao, isStreamSchema$1 as Ap, PROJECT_FILE_BACKED_SETTINGS as Ar, toRouterPath as As, DesignHandoffRequest as At, make$6 as Au, clientRpcRequiredScopes as B, resolveProviderInstanceEnabled as Ba, Project as Bc, appendUrlParams as Bd, ORCHESTRATION_PROTOCOL_HEADER as Bf, ServerProviderUpdateError as Bi, PluginId as Bl, ProviderSessionId as Bm, PreviewAutomationSetColorSchemeInput as Bn, DEFAULT_BROWSER_PROFILE_ID as Bo, encoder$2 as Bp, AgentAssetKind as Br, OrchestrationV2ContextHandoffJson as Bs, DesignSelection as Bt, toHeaders as Bu, clean as C, GitHubHost as Ca, OrchestrationV2ThreadLaunchError as Cc, setBody as Cd, jsonUnsafe$1 as Cf, ScheduledTaskWebhookDeliveryId as Ci, SourceControlRepositoryError as Cl, ClientOs as Cm, PreviewAutomationInvalidSelectorError as Cn, DeviceToolOpenResult as Co, getPayloadEncoding as Cp, AgentSessionImportProjectNotFoundError as Cr, RelayManagedEndpointRecoveryResponse as Cs, DesignServiceError as Ct, middleware as Cu, COMPUTER_USE_DEFAULT_TIMEOUT_MS as D, ServerSettings as Da, OrchestrationV2TurnItemJson as Dc, stream as Dd, uint8Array$1 as Df, PullRequestReviewGuide as Di, VcsProcessOutputLimitError as Dl, ContextHandoffId as Dm, PreviewAutomationOpenInput as Dn, DeviceToolVersions as Do, getStatusSuccessSchema as Dp, FilesystemBrowseError as Dr, annotations as Ds, DesignGuideReceipt as Dt, use as Du, toBytes as E, ResponseStreamingMode as Ea, OrchestrationV2TurnItem as Ec, setStatus as Ed, text$1 as Ef, OrchestrationDispatchCommandError as Ei, VcsProcessMissingExitCodeError as El, CommandId as Em, PreviewAutomationNoAvailableHostError as En, DeviceToolUnavailableError as Eo, getStatusErrorSchema as Ep, AgentSessionSource as Er, RelayProtectedError as Es, DesignApplyRequest as Et, serve as Eu, ComputerUseHostResponse as F, providerInstanceConfigEnabledFlag as Fa, parseGoalCommand as Fc, MaxBodySize as Fd, badArgument as Ff, VcsListRefsResult as Fi, McpRegistryRpcError as Fl, NonNegativeInt as Fm, PreviewAutomationRequestQueueClosedError as Fn, DecisionResult as Fo, allShort as Fp, AGENT_ASSET_FILE_MAX_CHARS as Fr, OrchestrationGetWorkflowScriptError as Fs, DesignLibraryManifest as Ft, addHeaderAttributes as Fu, WsMcpRegistryProviderSignInStartRpc as G, PREVIEW_STREAM_HOST_SETUP_CLOSE_CODE as Ga, ProjectReadFileError as Gc, bodyJsonUnsafe as Gd, AuthAccessTokenType as Gf, isProviderWorkspaceSnapshotCurrent as Gi, OrchestrationGetFullThreadDiffError as Gl, RunAttemptId as Gm, PreviewAutomationTabTargetInput as Gn, DesktopAppActivationResponse as Go, AcpRegistryOperationErrorReason as Gp, ThreadMetadataMcpUpdateInput as Gr, OrchestrationV2DispatchCommandError as Gs, DesignValidateReceipt as Gt, schemaHeaders as Gu, WS_METHODS as H, secretSettingsFields as Ha, ProjectListEntriesError as Hc, bearerToken as Hd, ThreadEnvMode as Hf, environmentThemeFileHasColors as Hi, mcpProviderSupport as Hl, ProviderTurnId as Hm, PreviewAutomationSnapshot as Hn, findBrowserProfile as Ho, AcpRegistryListProvidersResult as Hp, AgentAssetName as Hr, OrchestrationV2ContextTransferJson as Hs, DesignStatusRequest as Ht, ParsedSearchParams as Hu, ComputerUseJsInput as I, requiredScopesForProjectMutation as Ia, ToolActivityIcon as Ic, TypeId$14 as Id, isPlatformError as If, EnvironmentThemeFile as Ii, McpServerId as Il, PlanId as Im, PreviewAutomationResizeInput as In, ThreadDecision as Io, hasBody as Ip, AGENT_ASSET_TOTAL_MAX_BYTES as Ir, OrchestrationV2AppThread as Is, DesignProposeReceipt as It, addUrlAttributes as Iu, WsMcpRegistryProviderSignOutRpc as J, PreviewClearProfileError as Ja, ProjectSearchEntriesError as Jc, bodyUrlParams as Jd, AuthDiagnosticsReadScope as Jf, ExternalLauncherCommandNotFoundError as Ji, ChatAttachment as Jl, ScheduledTaskId as Jm, PreviewAutomationUnavailableError as Jn, DESKTOP_UPDATE_RESTART_MARKER_FILE as Jo, resolveOfficialAcpRegistryIconUrl as Jp, OrchestratorMcpCreateThreadsInput as Jr, OrchestrationV2DomainEvent as Js, ServerClient as Jt, MultipartError as Ju, WsMcpRegistryProviderSignInStateRpc as K, PREVIEW_URL_MAX_LENGTH as Ka, ProjectScript as Kc, bodyStream as Kd, AuthAccessWriteScope as Kf, EDITORS as Ki, OrchestrationGetTurnDiffError as Kl, RunId as Km, PreviewAutomationTargetNotEditableError as Kn, DesktopBrowserCommand as Ko, AcpRegistryProbeResult as Kp, ThreadMetadataMcpUpdateResult as Kr, OrchestrationV2DispatchCommandResult as Ks, DesignValidateRequest as Kt, schemaSearchParams as Ku, ComputerUseOutput as L, requiredScopesForServerSettingsPatch as La, ToolActivityNativeAppReference as Lc, inspect as Ld, systemError as Lf, EnvironmentThemeId as Li, McpServerName as Ll, PortSchema as Lm, PreviewAutomationResizeResult as Ln, ThreadDecisionsReadError as Lo, Retry as Lp, AgentAsset as Lr, OrchestrationV2AppThreadJson as Ls, DesignProposeRequest as Lt, appendPreResponseHandlerUnsafe as Lu, ComputerUseHost as M, isUnconfiguredDefaultInstanceEnabled as Ma, isProviderNativeSubagentThread as Mc, filterStatusOk as Md, make$16 as Mf, GitPullRequestMaterializationError as Mi, VcsRepositoryDetectionError as Ml, IsoDateTime as Mm, PreviewAutomationRecordingTooLargeError as Mn, DECISION_MODELS as Mo, isWithHeaders as Mp, OrchestrationSearchThreadsInput as Mr, AUTO_WORKSPACE_UNDECIDED_REASON as Ms, DesignImportTokensRequest as Mt, compression as Mu, ComputerUseHostRegistration as N, makeBinaryPathSetting as Na, latestProviderTurnForAttempt as Nc, fromWeb as Nd, BadArgument as Nf, TextGenerationError as Ni, VcsUnsupportedOperationError as Nl, MessageId as Nm, PreviewAutomationRecordingTransferError as Nn, DecisionError as No, isWithHeadersValue as Np, OrchestrationSearchThreadsResult as Nr, ORCHESTRATION_V2_WORKSPACE_PREPARATION_FAILURE_CODE as Ns, DesignInspectReceipt as Nt, isTracerDisabledUnsafe as Nu, COMPUTER_USE_JEV_TAKE_CODE as O, ServerSettingsError as Oa, OrchestrationWorkflowFileError as Oc, text as Od, urlParams$1 as Of, PullRequestReviewGuideRun as Oi, VcsProcessOutputReadError as Ol, ContextTransferId as Om, PreviewAutomationRecordingArtifact as On, EasDeviceHostConfig as Oo, getWithHeadersAnnotation as Op, P4ProjectFile as Or, fromApi as Os, DesignGuideRequest as Ot, HttpServer as Ou, ComputerUseHostReport as P, makeProviderSettingsSchema as Pa, orchestrationV2RunWorkStartedAt as Pc, matchStatus as Pd, PlatformError as Pf, VcsListRefsInput as Pi, ModelSelection as Pl, NodeId as Pm, PreviewAutomationRemoteUnavailableError as Pn, DecisionInput as Po, withHeaders as Pp, OrchestrationThreadSearchSource as Pr, ORCHESTRATION_V2_WS_METHODS as Ps, DesignInspectRequest as Pt, tracer as Pu, WsSelfImproveSetMemoryMirrorRpc as Q, PreviewSessionLookupError as Qa, DEFAULT_PROVIDER_INTERACTION_MODE as Qc, post$1 as Qd, AuthFilesystemWriteScope as Qf, ExternalLauncherUnsupportedTargetError as Qi, PROVIDER_SEND_TURN_MAX_FILE_BYTES as Ql, TrimmedString as Qm, McpAppRequestError as Qn, EnvironmentAuthenticatedAuth as Qo, DEFAULT_MODEL_BY_PROVIDER as Qp, OrchestratorMcpDeleteScheduledTaskInput as Qr, OrchestrationV2GetShellSnapshotError as Qs, ClientAbort as Qt, makeConfig as Qu, computerUseJevStepCode as R, resolveIdleCompaction as Ra, UsageLimitSourceError as Rc, schemaBodyJson as Rd, make$17 as Rf, ServerProvider as Ri, McpServerRuntimeState as Rl, PositiveInt as Rm, PreviewAutomationResultTooLargeError as Rn, resolveDecisionBackend as Ro, decode as Rp, AgentAssetFiles as Rr, OrchestrationV2CheckpointJson as Rs, DesignRenderReceipt as Rt, requestPreResponseHandlers as Ru, anumber as S, DEFAULT_SERVER_SETTINGS as Sa, OrchestrationV2ThreadForkSourcePoint as Sc, removeHeader as Sd, isHttpBody as Sf, ScheduledTaskError as Si, SourceControlProviderKind as Sl, ClientDeviceType as Sm, PreviewAutomationExecutionError as Sn, DeviceToolOpenInput as So, asUint8Array as Sp, AgentSessionImportProjectChangedError as Sr, RelayManagedEndpointRecoveryRegistrationResponse as Ss, DesignRpcGroup as St, cors as Su, randomBytes as T, ProjectSettingsOverrides as Ta, OrchestrationV2ThreadShell as Tc, setHeaders as Td, stream$1 as Tf, ApplicationProjectEvent as Ti, VcsProcessExitError as Tl, ClientWebDeployment as Tm, PreviewAutomationNavigateInput as Tn, DeviceToolTargetInput as To, getResponseEncodingSchema as Tp, AgentSessionScanError as Tr, RelayOkResponse as Ts, DesignApplyReceipt as Tt, route as Tu, WsMcpRegistryProviderSignInCancelRpc as U, withIdleCompaction as Ua, ProjectMutation as Uc, bodyFormData as Ud, AuthAccessReadScope as Uf, isProviderAvailable as Ui, resolveRegistryEntryEnabled as Ul, RawEventId as Um, PreviewAutomationStatus as Un, resolveBrowserProfiles as Uo, AcpRegistryListSessionsResult as Up, AgentAssetWriteInput as Ur, OrchestrationV2ConversationMessage as Us, DesignStylesReceipt as Ut, TypeId$8 as Uu, RpcScopeAuthorization as V, secretSetting as Va, ProjectCreatePayload as Vc, basicAuth as Vd, ORCHESTRATION_PROTOCOL_QUERY_PARAM as Vf, ServerSelfUpdateError as Vi, RESERVED_MCP_SERVER_NAME as Vl, ProviderThreadId as Vm, PreviewAutomationSetColorSchemeResult as Vn, INCOGNITO_BROWSER_PROFILE_ID as Vo, makeParser as Vp, AgentAssetListFilter as Vr, OrchestrationV2ContextTransfer as Vs, DesignStatusReceipt as Vt, HttpServerRequest as Vu, WsMcpRegistryProviderSignInCompleteRpc as W, FILL_PREVIEW_VIEWPORT as Wa, ProjectMutationError as Wc, bodyJson as Wd, AuthAccessStreamError as Wf, isProviderTextGenerationCapable as Wi, supportsProviderMcpSignIn as Wl, RpcClientId as Wm, PreviewAutomationTabNotFoundError as Wn, DesktopAppActivationErrorCode as Wo, AcpRegistryOperationError as Wp, agentAssetTotalBytes as Wr, OrchestrationV2ConversationMessageJson as Ws, DesignStylesRequest as Wt, schemaCookies as Wu, WsSelfImproveDismissFindingsRpc as X, PreviewInvalidUrlError as Xa, ProjectWriteFileError as Xc, get$1 as Xd, AuthEnvironmentScopes as Xf, ExternalLauncherUnknownEditorError as Xi, ChatFileAttachment as Xl, ThreadId as Xm, PreviewAutomationWaitForInput as Xn, RelayClientInstallFailedError as Xo, CustomModelSetting as Xp, OrchestratorMcpDelegateTaskInput as Xr, OrchestrationV2ExecutionNode as Xs, isWrapper as Xt, isPersistedFile as Xu, WsRpcGroup as Y, PreviewControlRequiredError as Ya, ProjectUpdatePayload as Yc, del$1 as Yd, AuthEnvironmentMaintainScope as Yf, ExternalLauncherEditorSpawnError as Yi, ChatAttachmentId as Yl, SecretRef as Ym, PreviewAutomationUnsupportedClientError as Yn, DesktopBackendBootstrap as Yo, ANTIGRAVITY_DEFAULT_MODEL as Yp, OrchestratorMcpCreateThreadsResult as Yr, OrchestrationV2DomainEventJson as Ys, exitSchema as Yt, TypeId$9 as Yu, WsSelfImproveSaveFindingsRpc as Z, PreviewListResult as Za, StoredProjectIcon as Zc, make$14 as Zd, AuthFilesystemReadScope as Zf, ExternalLauncherUnsupportedEditorError as Zi, ChatImageAttachment as Zl, TrimmedNonEmptyString as Zm, SERVER_BROWSER_AUTOMATION_CLIENT_ID as Zn, EnvironmentAuthInvalidError as Zo, DEFAULT_MODEL as Zp, OrchestratorMcpDelegateTaskResult as Zr, OrchestrationV2ExecutionNodeJson as Zs, make$1 as Zt, limitsServices as Zu, sha512 as _, CompressMode as _a, OrchestrationV2StopWorkflowError as _c, isHttpServerResponse as _d, isIgnored as _f, OrchestratorMcpThreadSendResult as _i, pullRequestProviderRequirement as _l, AuthSessionId as _m, PreviewAutomationControlInterruptedError as _n, DevicePlatformAvailability as _o, ServerAuthSessionMethod as _p, AssetWorkspaceRootNormalizationError as _r, RelayCloudMintCredentialProofPayload as _s, SelfImproveSaveFindingsResult as _t, put as _u, documentContentDigest as a, TerminalHistoryError as aa, OrchestrationV2ProviderSessionJson as ac, HttpServerError as ad, setUrlParams as af, merge as ah, OrchestratorMcpSaveScheduledTaskInput as ai, RuntimeMode as al, PROVIDER_DISPLAY_NAMES as am, UsageReadError as an, KeybindingsConfig as ao, AuthOrchestrationReadScope as ap, AssetGitHubMediaUrlValidationError as ar, EnvironmentHttpForbiddenError as as, WORKTREE_SETUP_ERROR_MAX_LENGTH as at, isSecurity as au, aexists as b, DEFAULT_BACKGROUND_ACTIVITY_PROFILE as ba, OrchestrationV2Subagent as bc, raw as bd, layer$2 as bf, MIN_SCHEDULED_TASK_INTERVAL_MS as bi, SourceControlCloneRepositoryResult as bl, CheckpointScopeId as bm, PreviewAutomationError as bn, DeviceToolError as bo, NoContent as bp, AttachmentDeleteInput as br, RelayHookDeliveryProofPayload as bs, DesignListReceipt as bt, RouteContext as bu, parseDesign as c, TerminalProviderInstanceNotFoundError as ca, OrchestrationV2ProviderTurn as cc, ServeError as cd, HttpClientError as cf, bytes as ch, OrchestratorMcpTaskCancelResult as ci, ThreadPullRequestLink as cl, ProviderInstanceMutation as cm, ResourceMonitorCommand as cn, ResolvedKeybindingRule as co, AuthRelayReadScope as cp, AssetProjectFaviconNotFoundError as cr, EnvironmentInternalError as cs, SelfImproveDecision as ct, make$3 as cu, reviewState as d, TerminalWriteError as da, OrchestrationV2RunJson as dc, toResponse as dd, StatusCodeError as df, OrchestratorMcpThreadInterruptResult as di, PullRequestOperationError as dl, ComposerContextRecord as dm, PREVIEW_AUTOMATION_SERVER_OPERATIONS as dn, DeviceActionUnavailableError as do, AuthSourceControlWriteScope as dp, AssetWorkspaceAssetInspectionError as dr, EnvironmentResourceNotFoundError as ds, SelfImproveFindings as dt, get as du, ProviderUploadFeedbackError as ea, OrchestrationV2PlanArtifact as ec, decodeField as ed, put$1 as ef, CurrentRedactedNames as eh, OrchestratorMcpFailure as ei, ProviderApprovalDecision as el, DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER as em, isStreamSchema as en, PreviewTabId as eo, AuthMcpApprovalError as ep, ReviewDiffPreviewSource as er, EnvironmentCloudEndpointUnavailableError as es, WsSelfImproveSubscribeThreadFindingsRpc as et, PROVIDER_SEND_TURN_MAX_INPUT_CHARS as eu, selectLayoutItems as f, AntigravitySettings as fa, OrchestrationV2RunStatus as fc, HttpPlatform as fd, TransportError as ff, OrchestratorMcpThreadListInput as fi, PullRequestStack as fl, OrchestrationMessageContext as fm, PREVIEW_AUTOMATION_V1_OPERATIONS as fn, DeviceBootError as fo, AuthStandardClientScopes as fp, AssetWorkspaceAssetNotFoundError as fr, EnvironmentScopeRequiredError as fs, SelfImproveLabel as ft, getErrorSchemas as fu, sha384 as g, CodexSettings as ga, OrchestrationV2SearchThreadInput as gc, html as gd, ignore as gf, OrchestratorMcpThreadSendInput as gi, pullRequestHostOf as gl, AssistantCitation as gm, PreviewAutomationClientDisconnectedError as gn, DeviceOperationError as go, EnvironmentAuthorizationError as gp, AssetWorkspaceResolutionError as gr, RelayCloudEnvironmentHealthProofPayload as gs, SelfImproveReviewers as gt, post as gu, sha256$1 as h, ClaudeSettings as ha, OrchestrationV2SearchThreadError as hc, file as hd, TypeId$17 as hf, OrchestratorMcpThreadReadResult as hi, PullRequestUnavailableError as hl, ASSISTANT_CITATION_MAX_TEXT_LENGTH as hm, PreviewAutomationActInputs as hn, DeviceNotFoundError as ho, AuthWebSocketTicketUse as hp, AssetWorkspacePathValidationError as hr, RelayApi as hs, SelfImproveReview as ht, patch as hu, diagnostic as i, TerminalCwdStatError as ia, OrchestrationV2ProviderSession as ic, ClientAbort$1 as id, setUrl as if, isHeaders as ih, OrchestratorMcpRequestSecretResult as ii, ProviderUserInputAnswers as il, PREFERRED_DEFAULT_CODEX_MODELS as im, WorktreeMcpStatusResult as in, KeybindingRule as io, AuthOrchestrationOperateScope as ip, AssetCreateUrlInput as ir, EnvironmentHttpConflictError as is, SecretRequestError as it, Service$1 as iu, ComputerUseError as j, globalIdleCompaction as ja, isOrchestrationV2WorkActive as jc, TypeId$13 as jd, WatchBackend as jf, GitManagerError as ji, VcsProcessTimeoutError as jl, EventId as jm, PreviewAutomationRecordingStatus as jn, deviceToolInstallMessage as jo, isStreamUint8Array as jp, OrchestrationSearchThreadsError as jr, AUTO_WORKSPACE_NOTICE_TITLE as js, DesignImportTokensReceipt as jt, TracerDisabledWhen as ju, COMPUTER_USE_MAX_OUTPUT_CHARS as k, ServerSettingsPatch as ka, autoWorkspaceNoticeMessage as kc, uint8Array as kd, FileSystem as kf, PROJECT_CLONE_ERROR_MAX_LENGTH as ki, VcsProcessSpawnError as kl, DpopFailureReason as km, PreviewAutomationRecordingDeadlineExpiredError as kn, LOCAL_DEVICE_HOST_ID as ko, isNoContent as kp, P4_PROJECT_FILE_NAME as kr, getParamNames as ks, DesignHandoffReceipt as kt, addressFormattedWith as ku, patchNode as l, TerminalResizeError as la, OrchestrationV2ProviderTurnJson as lc, causeResponse as ld, HttpClientErrorSchema as lf, fromInputUnsafe as lh, OrchestratorMcpTaskStatusInput as li, ThreadPullRequestLinkSource as ll, defaultInstanceIdForDriver as lm, ResourceMonitorEvent as ln, SCRIPT_RUN_COMMAND_PATTERN as lo, AuthRelayWriteScope as lp, AssetProjectFaviconResolutionError as lr, EnvironmentOperationForbiddenError as ls, SelfImproveError as lt, reflect as lu, validateDesign as m, BackgroundActivityProfileSelection as ma, OrchestrationV2RuntimeRequestJson as mc, empty as md, CurrentErrorReporters as mf, OrchestratorMcpThreadReadInput as mi, PullRequestSummary as ml, ASSISTANT_CITATION_MAX_COMMENT_LENGTH as mm, PreviewAutomationActInput as mn, DeviceHostUnavailableError as mo, AuthTerminalReadScope as mp, AssetWorkspaceContextResolutionError as mr, formatConnectReachable as ms, SelfImproveResult as mt, getSuccessSchemas as mu, canonicalSerialize as n, TerminalCwdNotDirectoryError as na, OrchestrationV2ProviderGoal as nc, Path as nd, setHeader$1 as nf, fromInput as nh, OrchestratorMcpListScheduledTasksResult as ni, ProviderInteractionMode as nl, MUSE_DEFAULT_MODEL as nm, WorktreeMcpHandoffInput as nn, symbol as no, AuthMcpRegistrationError as np, ATTACHMENT_UPLOAD_URL_TTL_MS as nr, EnvironmentHttpBadRequestError as ns, WsSelfImproveUpdateSettingsRpc as nt, getProviderAttachmentLimitError as nu, fileHash as o, TerminalNotRunningError as oa, OrchestrationV2ProviderThread as oc, RequestParseError as od, make$15 as of, remove as oh, OrchestratorMcpScheduleTaskResult as oi, ThreadLinkedPullRequest as ol, ProviderDriverKind as om, DesktopHostTelemetryMessage as on, KeybindingsConfigError as oo, AuthPreviewOperateScope as op, AssetPreviewTypeValidationError as or, EnvironmentHttpInternalServerError as os, WORKTREE_SETUP_STAGE_ORDER as ot, make$2 as ou, semanticDiff as p, BackgroundActivityProfile as pa, OrchestrationV2RuntimeRequest as pc, make$12 as pd, isHttpClientError as pf, OrchestratorMcpThreadListResult as pi, PullRequestState as pl, ReviewCommentContextRecord as pm, PREVIEW_RECORDING_STOP_TIMEOUT_MS as pn, DeviceEasAccountError as po, AuthTerminalOperateScope as pp, AssetWorkspaceContextNotFoundError as pr, connectReachabilityHelpUrl as ps, SelfImproveRequest as pt, getPayloadSchemas as pu, WsMcpRegistryProviderSignInWaitRpc as q, PREVIEW_VIEWPORT_PRESET_IDS as qa, ProjectSearchContentsError as qc, bodyText as qd, AuthClientMetadataDeviceType as qf, ExternalLauncherBrowserSpawnError as qi, OrchestrationGetTurnDiffResult as ql, RuntimeRequestId as qm, PreviewAutomationTimeoutError as qn, DesktopBrowserEvent as qo, officialAcpRegistryIconUrlForAgentId as qp, OrchestratorMcpCapabilitiesResult as qr, OrchestrationV2DispatchRejectionReason as qs, make as qt, toURL as qu, computeLayout as r, TerminalCwdNotFoundError as ra, OrchestrationV2ProviderRetry as rc, TypeId$10 as rd, setHeaders$1 as rf, fromRecordUnsafe as rh, OrchestratorMcpRequestSecretInput as ri, ProviderRequestKind as rl, ModelCapabilities as rm, WorktreeMcpHandoffResult as rn, value as ro, AuthMcpTokenError as rp, AssetAttachmentNotFoundError as rr, EnvironmentHttpCommonError as rs, WsSubscribeThreadDecisionsRpc as rt, isProviderSendTurnSupportedImageMimeType as ru, isConfinedRelativePath as s, TerminalProviderEnvironmentError as sa, OrchestrationV2ProviderThreadJson as sc, ResponseError as sd, DecodeError as sf, set as sh, OrchestratorMcpTaskCancelInput as si, ThreadPullRequestKey as sl, ProviderInstanceId as sm, DesktopTelemetryControlMessage as sn, MODEL_PICKER_JUMP_KEYBINDING_COMMANDS as so, AuthProvidersManageScope as sp, AssetProjectFaviconInspectionError as sr, EnvironmentHttpUnauthorizedError as ss, Service as st, getSlotParseOptions as su, buildIndexes as t, DEFAULT_TERMINAL_ID as ta, OrchestrationV2ProviderFailure as tc, make$8 as td, setBody$1 as tf, empty$3 as th, OrchestratorMcpListScheduledTasksInput as ti, ProviderApprovalOption as tl, MODEL_SLUG_ALIASES_BY_PROVIDER as tm, WorktreeMcpFailure as tn, PreviewViewportSetting as to, AuthMcpClientAccess as tp, ReviewDiffPreviewSourceKind as tr, EnvironmentHttpApi as ts, WsSelfImproveUndoSaveRpc as tt, PersistChatAttachmentsError as tu, resolveValue as u, TerminalSessionLookupError as ua, OrchestrationV2RunAttemptJson as uc, symbol$1 as ud, InvalidUrlError as uf, OrchestratorMcpThreadInterruptInput as ui, PullRequestLinkedThreadsResult as ul, isProviderDriverKind as um, McpCapabilityUnavailableError as un, THREAD_JUMP_KEYBINDING_COMMANDS as uo, AuthSettingsWriteScope as up, AssetSigningKeyLoadError as ur, EnvironmentRequestInvalidError as us, SelfImproveEvidence as ut, del as uu, Hash as v, DATABASE_COMPACTION_RECOMMENDED_BYTES as va, OrchestrationV2StopWorkflowInput as vc, jsonUnsafe as vd, layer$1 as vf, OrchestratorMcpThreadWaitInput as vi, resolvePullRequestAuthorFilter as vl, CheckpointId as vm, PreviewAutomationControlReason as vn, DevicePlatformUnavailableError as vo, authScopeRequiredResponse as vp, AttachmentCreateUploadUrlInput as vr, RelayEnvironmentLinkChallengeResponse as vs, UserInputRankError as vt, normalize as vu, concatBytes as w, PROJECT_SCOPED_SERVER_SETTING_KEYS as wa, OrchestrationV2ThreadLaunchRequestWorkspaceStrategy as wc, setHeader as wd, raw$1 as wf, ApplicationEventMetadata as wi, VcsDriverKind as wl, ClientSurface as wm, PreviewAutomationMalformedResponseError as wn, DeviceToolScreenshotResult as wo, getResponseEncoding as wp, AgentSessionImportSource as wr, RelayManagedEndpointRuntimeConfig as ws, DesignSubscribeRequest as wt, params as wu, ahash as x, DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL as xa, OrchestrationV2SubagentJson as xc, redirect as xd, layerWeak as xf, ScheduledTask as xi, SourceControlProviderError as xl, ClientConnectionMethod as xm, PreviewAutomationEvaluateInput as xn, DeviceToolListResult as xo, StreamSse as xp, AttachmentUploadSigningKeyError as xr, RelayManagedEndpointOrigin as xs, DesignListRequest as xt, add$1 as xu, abytes as y, DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL as ya, OrchestrationV2StoredEvent as yc, mergeCookies as yd, report as yf, OrchestratorMcpThreadWaitResult as yi, SourceControlCloneRepositoryInput as yl, CheckpointRef as ym, PreviewAutomationDialogInput as yn, DeviceToolCloseInput as yo, authScopeResponse as yp, AttachmentCreateUploadUrlResult as yr, RelayEnvironmentLinkResponse as ys, DesignHumanApplyRequest as yt, HttpRouter as yu, CLIENT_GUARDED_RPC_SCOPES as z, resolveProjectProviderInstanceEnabled as za, OrchestrationProjectShell as zc, acceptJson as zd, ExecutionEnvironmentDescriptor as zf, ServerProviderCompatibilityStatus as zi, McpServerTransport as zl, ProjectId as zm, PreviewAutomationSelectResult as zn, BUILT_IN_BROWSER_PROFILES as zo, decodeSchema as zp, AgentAssetId as zr, OrchestrationV2CheckpointScopeJson as zs, DesignRenderRequest as zt, fromHeaders as zu };
32064
32030
 
32065
- //# sourceMappingURL=runtime-Bbjyj8bt.mjs.map
32031
+ //# sourceMappingURL=runtime-DvE0t3kv.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@p4code/cli",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "description": "P4 Code coding agent server and command-line client",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,2 +0,0 @@
1
- import{i as e}from"./DialogTitle-9BKGozK3.js";function t(t){return e(t,`alert-dialog`)}export{t};
2
- //# sourceMappingURL=AlertDialogRoot-CW_9Mq9o.js.map
@@ -1,2 +0,0 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Gb as i,Gy as a,Hh as o,Hu as s,I_ as c,Ky as l,Rb as u,Tl as d,Uh as f,Uu as p,Xt as m,_h as h,cb as g,dC as _,d_ as v,dr as y,eb as b,fh as x,hx as S,qy as C,sf as ee,t as w,vb as T,vx as te,yh as ne}from"./utils-CxCThU1r.js";import{K as re}from"./useSettings-FRbaNpbg.js";import{r as ie,s as ae,t as oe,x as se}from"./Icons-CQY6Z_tn.js";var E=e(t(),1),D=n(),O=e(r(),1),k=6e4,A=60*k,j=24*A,M=`https://chatgpt.com/#settings/Usage`;function ce(e){return e?.auth.status===`authenticated`&&e.auth.subscriptionSharing===!0}var N=[{id:`totalPercentUsed`,label:`Overall`,description:`Combined usage across both allowances, not a third quota.`},{id:`autoPercentUsed`,label:`Cursor Models`,description:`Grok and Composer use this first. Auto can use either pool.`},{id:`apiPercentUsed`,label:`Other Models`,description:`Claude, GPT, and Gemini use this pool. Grok and Composer fall back here.`}];function le(e){return N.find(t=>t.id===e)}function P(e){let t=N.findIndex(t=>t.id===e);return t<0?N.length:t}function F(e){return e.filter(e=>e.enabled&&e.installed&&d(e)&&e.usageLimits!==void 0)}function ue(e){let t=new Map;for(let n of e.values())for(let e of F(n.serverConfig?.providers??[])){let r=e.usageLimits?.externalUsage;if(r&&e.auth.status===`authenticated`){let i=`${e.displayName??e.instanceId} on ${n.entry.target.label}`;t.set(r.url,{...r,message:e.usageLimits?.unavailable?.message,accounts:[...new Set([...t.get(r.url)?.accounts??[],i])]})}}return[...t.values()]}function I(e,t,n){let r=t?.trim().toLowerCase();return r?`${e}:${r}`:n?.credentialFingerprint?`${e}:credential:${n.credentialFingerprint}`:null}var L=e=>({driver:e.driver,email:e.auth.email,workspaceId:e.auth.workspaceId,usageLimits:e.usageLimits});function R(e){let t=new Map,n=new Map;for(let r of e){let e=I(r.driver,r.email,r.usageLimits);if(e&&r.workspaceId){t.set(e,(t.get(e)??new Set).add(r.workspaceId));let i=`${r.driver}:${r.workspaceId}`;n.set(i,(n.get(i)??new Set).add(e))}}return e=>{let r=I(e.driver,e.email,e.usageLimits);if(!r){if(!e.workspaceId)return null;let t=n.get(`${e.driver}:${e.workspaceId}`);return t?.size===1?`${[...t][0]}:${e.workspaceId}`:null}if(e.workspaceId)return`${r}:${e.workspaceId}`;let i=t.get(r);return i?i.size===1?`${r}:${[...i][0]}`:null:r}}function de(e){let t=new Map,n=new Map,r=new Map,i=(e,i)=>{let a=r.get(e);i.redeem&&`sourceId`in i.redeem.input&&(!a||Date.parse(i.limits.checkedAt)>Date.parse(a.limits.checkedAt))&&r.set(e,i);let o=n.get(e);i.limits.resetCredits&&(!o||Date.parse(i.limits.checkedAt)>Date.parse(o.limits.checkedAt))&&n.set(e,i);let s=t.get(e);if(!s){t.set(e,i);return}let c=Date.parse(i.limits.checkedAt)>Date.parse(s.limits.checkedAt),l=[...s.environments,...i.environments.filter(e=>!s.environments.some(t=>t.environmentId===e.environmentId))],u=c?i:s,d=n.get(e);t.set(e,{...s,displayName:s.displayName??i.displayName,email:s.email??i.email,plan:s.plan??i.plan,accentColor:s.accentColor??i.accentColor,environments:l,sourceLabel:l.length>0?null:s.sourceLabel??i.sourceLabel,redeem:r.get(e)?.redeem??(d?d.redeem:u.redeem??s.redeem??i.redeem),limits:{...u.limits,...d?.limits.resetCredits?{resetCredits:d.limits.resetCredits}:{resetCredits:void 0}}})},a=R([...e.values()].flatMap(e=>[...(e.serverConfig?.providers??[]).filter(e=>e.enabled).map(L),...(e.serverConfig?.usageLimitSources??[]).flatMap(e=>e.accounts)]));for(let[t,n]of e){let e=n.entry.target.label;for(let r of F(n.serverConfig?.providers??[]))r.usageLimits&&H(r.usageLimits)===null&&i(a(L(r))??`${t}:${r.instanceId}`,{key:`${t}:${r.instanceId}`,driver:r.driver,displayName:r.displayName?.trim()||null,email:r.auth.email,plan:r.auth.label,accentColor:r.accentColor,environments:[{environmentId:t,label:e}],sourceLabel:null,redeem:{environmentId:t,input:{instanceId:r.instanceId}},limits:r.usageLimits})}let o=e.size>1;for(let[t,n]of e)for(let e of n.serverConfig?.usageLimitSources??[]){let r=o?`${n.entry.target.label} · ${e.label}`:e.label;for(let n of e.accounts){if(H(n.usageLimits)!==null)continue;let o=`${e.id}:${n.id}${n.workspaceId?`:${n.workspaceId}`:``}`;i(a(n)??o,{key:o,driver:n.driver,displayName:n.email?null:n.id.replace(/\.json$/i,``),email:n.email,plan:n.plan,accentColor:void 0,environments:[],sourceLabel:r,redeem:n.usageLimits.resetCredits?.nextCreditId?{environmentId:t,input:{sourceId:e.id,accountId:n.id,creditId:n.usageLimits.resetCredits.nextCreditId}}:null,limits:n.usageLimits})}}return[...t.values()]}function fe(e){let t=(t,n)=>e.size>1?`${t} · ${n}`:n,n=[];for(let r of e.values()){let e=r.entry.target.label;for(let i of F(r.serverConfig?.providers??[])){if(i.usageLimits?.unavailable?.reason===`unsupported`)continue;let r=i.usageLimits?H(i.usageLimits):null,a=i.displayName?.trim()||String(i.driver);r&&n.push(`${t(e,a)}: ${r}`)}for(let i of r.serverConfig?.usageLimitSources??[])i.error?n.push(`${t(e,i.label)}: ${i.error}`):i.accounts.length===0&&n.push(`${t(e,i.label)}: No accounts reported.`)}return n}function pe(e){if(e.driver===`antigravity`)return[...e.windows].sort((e,t)=>Number(!e.id.startsWith(`gemini-`))-Number(!t.id.startsWith(`gemini-`))||e.id.replace(/-(5h|weekly|quota)$/,``).localeCompare(t.id.replace(/-(5h|weekly|quota)$/,``))||z[e.kind]-z[t.kind]);if(e.driver!==`cursor`)return e.windows;let t=e.windows.some(e=>e.id===`autoPercentUsed`),n=e.windows.some(e=>e.id===`apiPercentUsed`),r=t&&n;return e.windows.filter(e=>!r||e.id!==`totalPercentUsed`).sort((e,t)=>P(e.id)-P(t.id))}var z={session:0,weekly:1,monthly:2,other:3};function me(e,t){let n=new Map;for(let t of e){let e=n.get(t.driver);e?e.push(t):n.set(t.driver,[t])}return[...n].map(([e,n])=>{let r=n.flatMap(e=>e.limits.windows).sort((e,t)=>z[e.kind]-z[t.kind])[0],i=t=>{let n=t.limits.windows.find(t=>r&&V(e,t)===V(e,r));return(n?U(n):null)??1/0},a=[...n].sort((e,t)=>i(e)-i(t)||B(e).localeCompare(B(t))||e.key.localeCompare(t.key));return{driver:e,accounts:a,windows:he(a,t)}})}function B(e){return(e.displayName??e.email??e.key).toLowerCase()}function V(e,t){return e===`codex`?t.kind:`${t.kind}:${t.id}`}function he(e,t){let n=new Map;for(let t of e)for(let e of t.limits.windows){let r=V(t.driver,e),i=n.get(r)?.some(e=>e.account===t)?`${e.kind}:${e.id}`:r,a=n.get(i);a?a.push({account:t,window:e}):n.set(i,[{account:t,window:e}])}return[...n].map(([n,r])=>{let i=new Map(r.map(e=>[e.account.key,e])),a=r[0].window,o=r[0].account.driver===`codex`?n:a.id,s=r.reduce((e,t)=>e+t.window.usedPercent,0)/r.length,c=r.flatMap(e=>{let n=W(e.window,t);return n===null?[]:[{used:e.window.usedPercent,elapsed:n}]}),l=c.reduce((e,t)=>e+t.used,0)/c.length,u=c.length>0?c.reduce((e,t)=>e+t.elapsed,0)/c.length:null,d=r.flatMap(e=>{let t=U(e.window);return t===null?[]:[{member:e,at:t,restoresPercent:Math.round(e.window.usedPercent/r.length)}]}).sort((e,t)=>e.at-t.at);return{id:o,kind:a.kind,label:a.label,members:r,columns:e.map(e=>i.get(e.key)??{account:e,window:null}),usedPercent:Math.round(s),remainingPercent:Math.round(100-s),pace:u===null?null:G(l,u),resets:d}}).sort((e,t)=>z[e.kind]-z[t.kind])}function H(e){return e.unavailable?.reason===`unsupported`?e.unavailable.message??`This account has no subscription limits.`:e.unavailable?.reason===`probeFailed`?e.unavailable.message??`Could not read limits.`:e.windows.length===0?`No limits reported.`:null}function ge(e){return Math.round(100-Math.max(0,Math.min(100,e.usedPercent)))}function U(e){if(e.resetsAt===void 0)return null;let t=Date.parse(e.resetsAt);return Number.isFinite(t)?t:null}function W(e,t){let n=U(e);if(n===null||e.windowDurationMins===void 0)return null;let r=e.windowDurationMins*k;return r<=0?null:Math.max(0,Math.min(1,(r-(n-t))/r))}function _e(e,t){let n=W(e,t);return n===null?null:Math.round((1-n)*100)}function ve(e,t){let n=W(e,t);return n===null?null:G(e.usedPercent,n)}function G(e,t){let n=e-t*100;return n>5?`ahead`:n<-5?`under`:`on`}function K(e){let t=Math.max(0,e),n=Math.floor(t/j),r=Math.floor(t%j/A),i=Math.floor(t%A/k);return n>0?`${n}d ${r}h`:r>0?`${r}h ${i}m`:`${i}m`}function ye(e,t){let n=U(e);return n===null?null:n<=t?`resets now`:n-t<k?`Resets momentarily`:`resets in ${K(n-t)}`}var be={name:`usage-limits`,description:`Show this provider's usage limits`};function xe(e){return e.trim().toLowerCase()===`/usage-limits`}function q(e,t,n){return F(t).some(t=>t.driver===e)||n.some(t=>t.accounts.some(t=>t.driver===e)||t.error!==void 0&&t.accounts.length===0)}function Se(e,t,n,r){let i=t.find(t=>t.instanceId===e);if(!i||!q(i.driver,t,n))return null;let a=F(t).filter(e=>e.driver===i.driver),o=R([...t.filter(e=>e.enabled).map(L),...n.flatMap(e=>e.accounts)]),s=new Set(a.flatMap(e=>{let t=o(L(e));return t&&e.usageLimits?.windows.length&&!e.usageLimits.unavailable?[t]:[]})),c=[],l=[];for(let e of a){if(!e.usageLimits)continue;let t=o(L(e)),r=n.flatMap(e=>e.accounts.map(t=>({source:e,account:t}))).filter(({account:e})=>t!==null&&o(e)===t&&e.usageLimits.resetCredits&&!H(e.usageLimits)).sort((e,t)=>Date.parse(t.account.usageLimits.checkedAt)-Date.parse(e.account.usageLimits.checkedAt))[0],i=r?.account.usageLimits.resetCredits?.nextCreditId,a=r&&(!e.usageLimits.resetCredits||Date.parse(r.account.usageLimits.checkedAt)>Date.parse(e.usageLimits.checkedAt));c.push({id:e.instanceId,driver:e.driver,label:`${e.displayName?.trim()||String(e.driver)} [${e.instanceId}]`,...e.auth.label?{plan:e.auth.label}:{},instanceId:e.instanceId,resetCreditInput:i&&r?{sourceId:r.source.id,accountId:r.account.id,creditId:i}:{instanceId:e.instanceId},...e.displayName?{displayName:e.displayName}:{},...e.accentColor?{accentColor:e.accentColor}:{},...e.auth.email?{email:e.auth.email}:{},limits:a?{...e.usageLimits,resetCredits:r.account.usageLimits.resetCredits}:e.usageLimits})}for(let e of n){let t=e.accounts.filter(e=>e.driver===i.driver);for(let n of t){let t=o(n);t&&s.has(t)||c.push({id:`${e.id}:${n.id}`,driver:n.driver,label:`${e.label} · ${n.id}`,sourceLabel:`CLI Proxy`,...n.usageLimits.resetCredits?.nextCreditId?{resetCreditInput:{sourceId:e.id,accountId:n.id,creditId:n.usageLimits.resetCredits.nextCreditId}}:{},...n.plan?{plan:n.plan}:{},...n.email?{email:n.email}:{},limits:n.usageLimits})}e.error&&(t.length>0||e.accounts.length===0)&&l.push(`${e.label}: ${e.error}`)}return{createdAt:S(te(r)),accounts:c,notices:l}}function J(e){return e}function Ce(e){let t=new Map;for(let n of e){if(t.has(n.driverKind))throw Error(`Provider driver '${n.driverKind}' is defined more than once.`);t.set(n.driverKind,n)}return{definitions:e,get:e=>e===void 0?void 0:t.get(e)}}var we=b([`auto`,`binary`,`npx`,`uvx`]),Te=f({source:b([`registry`,`local`]).pipe(i(_(`registry`)),T({title:`ACP source`,providerSettingsForm:{control:`select`,options:[{value:`registry`,label:`ACP Registry`},{value:`local`,label:`Local command`}]}})),enabled:C.pipe(i(_(!0)),T({providerSettingsForm:{hidden:!0}})),agentId:a.pipe(i(_(``)),T({title:`Registry agent ID`,description:`Agent identifier from the official ACP Registry, for example 'devin'.`,providerSettingsForm:{placeholder:`devin`,clearWhenEmpty:`persist`}})),commandPath:a.pipe(i(_(``)),T({title:`Executable override`,description:`Executable on this environment. For registry agents, this overrides the distribution executable while keeping its arguments and environment.`,providerSettingsForm:{placeholder:`Registry default`,clearWhenEmpty:`omit`}})),commandArgs:l(g).pipe(i(_([])),T({providerSettingsForm:{hidden:!0}})),authMethodId:a.pipe(i(_(``)),T({title:`Authentication method`,description:`Optional ACP authentication method ID. By default, the first agent-managed method is selected.`,providerSettingsForm:{placeholder:`auto`,clearWhenEmpty:`omit`}})),distribution:we.pipe(i(_(`auto`)),T({providerSettingsForm:{hidden:!0}})),customModels:l(g).pipe(i(_([])),T({providerSettingsForm:{hidden:!0}}))},{order:[`source`,`agentId`,`commandPath`,`authMethodId`]}),Ee=J({driverKind:c.make(`acpRegistry`),label:`ACP Registry`,settingsSchema:Te,hasDefaultInstance:!1,icon:{viewBox:`0 0 576 220`,fill:{light:`#000000`,dark:`#FFFFFF`},paths:[{d:`M568.003 115.821L517.278 27.9661C507.183 10.4816 489.084 0.0227367 468.894 0.0227367C448.727 0.0227367 430.674 10.4361 420.556 27.8752L343.251 161.749H242.755C236.23 161.749 230.386 158.384 227.135 152.745C223.861 147.106 223.861 140.376 227.135 134.715L277.861 46.8603C281.112 41.2216 286.955 37.8338 293.481 37.8338C300.006 37.8338 305.827 41.1988 309.101 46.8603L312.125 52.0897C313.353 54.2042 315.604 55.5002 318.036 55.5002C320.469 55.5002 322.743 54.1815 323.948 52.067L337.385 28.5118C338.795 26.0335 338.522 22.9413 336.703 20.7586C325.699 7.57131 309.874 0 293.322 0C292.662 0 292.003 0 291.321 0.0454733C272.04 0.75031 254.76 11.1864 245.074 27.9434L200.215 105.657L155.81 29.1484C145.465 11.2092 126.594 0.0227367 106.608 0.0227367C105.949 0.0227367 105.289 0.0227367 104.607 0.06821C85.3265 0.773047 68.0467 11.2092 58.3608 27.9661L7.65806 115.821C-6.25678 139.899 -0.868187 168.82 21.05 187.759C29.8945 195.422 41.6039 199.628 54.0181 199.628H148.648C151.081 199.628 153.332 198.332 154.56 196.217L168.52 172.026C169.748 169.911 169.748 167.319 168.52 165.205C167.292 163.09 165.041 161.794 162.608 161.794H56.0417C49.5163 161.794 43.6729 158.429 40.4216 152.79C37.1475 147.152 37.1475 140.422 40.4216 134.76L91.1471 46.9057C94.3985 41.2671 100.242 37.8793 106.767 37.8793C113.293 37.8793 119.113 41.2443 122.387 46.9057L194.826 172.526C195.031 172.89 195.258 173.208 195.531 173.526C198.76 178.665 202.83 183.485 207.786 187.782C216.631 195.444 228.34 199.651 240.754 199.651H321.424L315.581 209.769C314.353 211.883 314.353 214.475 315.581 216.59C316.809 218.704 319.059 220 321.492 220H349.436C351.868 220 354.119 218.704 355.347 216.59L364.396 200.901L367.17 196.468C367.17 196.468 367.261 196.331 367.284 196.263L453.274 46.9285C456.525 41.2898 462.369 37.902 468.894 37.902C475.42 37.902 481.263 41.2671 484.514 46.9285L535.24 134.783C538.491 140.422 538.514 147.174 535.24 152.813C531.988 158.452 526.145 161.84 519.62 161.84H418.669C416.236 161.84 413.985 163.136 412.757 165.25L398.774 189.442C397.546 191.556 397.546 194.148 398.774 196.263C400.002 198.377 402.253 199.673 404.686 199.673H518.21C539.81 199.673 559.295 188.237 569.026 169.843C578.053 152.79 577.666 132.623 567.981 115.843L568.003 115.821Z`}]}}),De=f({enabled:C.pipe(i(_(!1)),T({providerSettingsForm:{hidden:!0}})),binaryPath:u(a).pipe(T({providerSettingsForm:{hidden:!0}})),apiEndpoint:u(a).pipe(T({providerSettingsForm:{hidden:!0}})),customModels:l(v).pipe(i(_([])),T({providerSettingsForm:{hidden:!0}}))},{order:[]}),Oe=J({driverKind:c.make(`cursor`),label:`Cursor`,settingsSchema:De,environmentFields:[{name:`CURSOR_API_KEY`,label:`Cursor API key`,description:`Optional. Overrides browser sign-in for this provider.`,placeholder:`Paste API key`,sensitive:!0}],icon:{viewBox:`0 0 466.73 532.09`,fill:{light:`#26251E`,dark:`#EDECEC`},paths:[{d:`M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z`}]}}),ke=f({enabled:C.pipe(i(_(!1)),T({providerSettingsForm:{hidden:!0}})),binaryPath:o(`fx`).pipe(T({title:`Binary path`,description:`Path to the fx binary. All fx instances on this machine share its fx login.`,providerSettingsForm:{placeholder:`fx`,clearWhenEmpty:`omit`}})),customModels:l(v).pipe(i(_([])),T({providerSettingsForm:{hidden:!0}}))},{order:[`binaryPath`]}),Ae=J({driverKind:c.make(`fx`),label:`fx`,settingsSchema:ke,icon:{viewBox:`166.241 0 155.861 156`,fill:{light:`#0F0F0F`,dark:`#F5F5F5`},paths:[{d:`M237.89 0C243.18 0 249.38 1.42 253.03 3.07L255.09 4.01L250.08 18.63L247.68 17.75C244.9 16.72 241.94 15.8 238.49 15.8C234.98 15.8 232.79 16.56 231.08 18.32C229.23 20.23 227.63 23.64 226.23 29.76L226.23 29.76L226.23 29.76L225.14 34.85H241.67L260.43 34.95L260.69 34.95L260.84 35.17L278.85 61.63L296.74 34.95H320.87L291.68 76.74L322.1 119.75H299.33L299.18 119.55L241.14 40.48L239.35 49.4H222.07L205.69 127.21C203.93 135.71 201.19 142.84 196.78 147.87C192.27 153.01 186.2 155.75 178.34 155.75C174.18 155.75 170.75 155.11 167.91 154.11L166.24 153.52V137.18L166.9 137.4L169.53 138.28C172.18 139.16 174.41 139.8 177.14 139.8C178.53 139.8 179.7 139.53 180.73 138.98C181.76 138.43 182.68 137.6 183.52 136.44C185.3 133.99 186.72 130.13 187.9 124.67L203.76 49.4H189.87L191.76 39.44L192.04 39.35L206.82 34.47L208.15 28.64C210.52 18.21 213.77 10.94 218.71 6.32C223.74 1.61 230.13 0 237.89 0ZM273.99 99.08L260.07 120.25H234.54L261 82.02L273.99 99.08Z`}]}}),je=f({enabled:C.pipe(i(_(!1)),T({providerSettingsForm:{hidden:!0}})),binaryPath:o(`grok`).pipe(T({title:`Binary path`,description:`Path to the Grok CLI binary.`,providerSettingsForm:{placeholder:`grok`,clearWhenEmpty:`omit`}})),customModels:l(v).pipe(i(_([])),T({providerSettingsForm:{hidden:!0}}))},{order:[`binaryPath`]}),Me=J({driverKind:c.make(`grok`),label:`Grok`,settingsSchema:je,icon:{viewBox:`0 0 24 24`,fill:{light:`#0F0F0F`,dark:`#F5F5F5`},paths:[{d:`M9.26905 15.284L17.2479 9.36086C17.6391 9.07047 18.1981 9.18374 18.3845 9.63478C19.3655 12.0135 18.9272 14.8721 16.9755 16.8349C15.0238 18.7976 12.3082 19.228 9.8261 18.2477L7.1146 19.5102C11.0037 22.1834 15.7263 21.5223 18.6774 18.5525C21.0182 16.1985 21.7432 12.9897 21.0653 10.0961L21.0714 10.1023C20.0884 5.85143 21.3131 4.15233 23.8218 0.677913C23.8812 0.595532 23.9406 0.513151 24 0.428711L20.6987 3.74866V3.73836L9.267 15.2861`},{d:`M7.62249 16.7237C4.83113 14.0422 5.3124 9.89222 7.69417 7.49905C9.45541 5.72786 12.341 5.00497 14.86 6.06768L17.5653 4.81138C17.0779 4.45714 16.4533 4.07613 15.7365 3.80839C12.4966 2.46764 8.6178 3.13492 5.98413 5.78141C3.45081 8.32904 2.65415 12.2463 4.02219 15.5889C5.04412 18.0871 3.36889 19.8541 1.68137 21.6377C1.08337 22.2699 0.483318 22.9022 0 23.5716L7.62045 16.7257`}]}}),Ne=f({enabled:C.pipe(i(_(!1)),T({providerSettingsForm:{hidden:!0}})),binaryPath:o(`muse`).pipe(T({title:`Binary path`,description:`Path to the Muse Code binary on this environment. Sign in with muse login on that host.`,providerSettingsForm:{placeholder:`muse`,clearWhenEmpty:`omit`}})),customModels:l(v).pipe(i(_([])),T({providerSettingsForm:{hidden:!0}}))},{order:[`binaryPath`]}),Pe=J({driverKind:c.make(`muse`),label:`Muse Code`,settingsSchema:Ne,badgeLabel:`Beta`,icon:{viewBox:`0 0 287.56 191`,fill:{light:`#0081fb`,dark:`#0081fb`},paths:[{d:`m31.06,125.96c0,10.98 2.41,19.41 5.56,24.51 4.13,6.68 10.29,9.51 16.57,9.51 8.1,0 15.51-2.01 29.79-21.76 11.44-15.83 24.92-38.05 33.99-51.98l15.36-23.6c10.67-16.39 23.02-34.61 37.18-46.96 11.56-10.08 24.03-15.68 36.58-15.68 21.07,0 41.14,12.21 56.5,35.11 16.81,25.08 24.97,56.67 24.97,89.27 0,19.38-3.82,33.62-10.32,44.87-6.28,10.88-18.52,21.75-39.11,21.75l0-31.02c17.63,0 22.03-16.2 22.03-34.74 0-26.42-6.16-55.74-19.73-76.69-9.63-14.86-22.11-23.94-35.84-23.94-14.85,0-26.8,11.2-40.23,31.17-7.14,10.61-14.47,23.54-22.7,38.13l-9.06,16.05c-18.2,32.27-22.81,39.62-31.91,51.75-15.95,21.24-29.57,29.29-47.5,29.29-21.27,0-34.72-9.21-43.05-23.09-6.8-11.31-10.14-26.15-10.14-43.06z`},{d:`m24.49,37.3c14.24-21.95 34.79-37.3 58.36-37.3 13.65,0 27.22,4.04 41.39,15.61 15.5,12.65 32.02,33.48 52.63,67.81l7.39,12.32c17.84,29.72 27.99,45.01 33.93,52.22 7.64,9.26 12.99,12.02 19.94,12.02 17.63,0 22.03-16.2 22.03-34.74l27.4-.86c0,19.38-3.82,33.62-10.32,44.87-6.28,10.88-18.52,21.75-39.11,21.75-12.8,0-24.14-2.78-36.68-14.61-9.64-9.08-20.91-25.21-29.58-39.71l-25.79-43.08c-12.94-21.62-24.81-37.74-31.68-45.04-7.39-7.85-16.89-17.33-32.05-17.33-12.27,0-22.69,8.61-31.41,21.78z`,gradient:{x1:61,y1:117,x2:259,y2:127,stops:[{offset:0,color:`#0064e1`},{offset:.4,color:`#0064e1`},{offset:.83,color:`#0073ee`},{offset:1,color:`#0082fb`}]}},{d:`m82.35,31.23c-12.27,0-22.69,8.61-31.41,21.78-12.33,18.61-19.88,46.33-19.88,72.95 0,10.98 2.41,19.41 5.56,24.51l-26.48,17.44c-6.8-11.31-10.14-26.15-10.14-43.06 0-30.75 8.44-62.8 24.49-87.55 14.24-21.95 34.79-37.3 58.36-37.3z`,gradient:{x1:45,y1:139,x2:45,y2:66,stops:[{offset:0,color:`#0082fb`},{offset:1,color:`#0064e0`}]}}]}}),Fe=f({enabled:C.pipe(i(_(!1)),T({providerSettingsForm:{hidden:!0}})),binaryPath:o(`opencode`).pipe(T({title:`Binary path`,description:`Path to the OpenCode binary.`,providerSettingsForm:{placeholder:`opencode`,clearWhenEmpty:`omit`}})),serverUrl:a.pipe(i(_(``)),T({title:`Server URL`,description:`Leave blank to let P4 Code spawn the server when needed.`,providerSettingsForm:{placeholder:`http://127.0.0.1:4096`,clearWhenEmpty:`omit`}})),serverPassword:a.pipe(i(_(``)),T({title:`Server password`,description:`Stored in plain text on disk.`,providerSettingsForm:{control:`password`,placeholder:`Optional`,clearWhenEmpty:`omit`}})),customModels:l(v).pipe(i(_([])),T({providerSettingsForm:{hidden:!0}}))},{order:[`binaryPath`,`serverUrl`,`serverPassword`]}),Ie=J({driverKind:c.make(`opencode`),label:`OpenCode`,settingsSchema:Fe,icon:{viewBox:`0 0 32 40`,fill:{light:`#211E1E`,dark:`#F1ECEC`},paths:[{d:`M24 32H8V16H24V32Z`,fill:{light:`#CFCECD`,dark:`#4B4646`}},{d:`M24 8H8V32H24V8ZM32 40H0V0H32V40Z`}]}}),Le=f({enabled:C.pipe(i(_(!1)),T({providerSettingsForm:{hidden:!0}})),binaryPath:o(`pi`).pipe(T({title:`Binary path`,description:`Path to the Pi coding agent binary.`,providerSettingsForm:{placeholder:`pi`,clearWhenEmpty:`omit`}})),launchArgs:a.pipe(i(_(``)),T({title:`Launch arguments`,description:`Additional CLI arguments passed to pi --mode rpc on session start.`,providerSettingsForm:{clearWhenEmpty:`omit`}})),customModels:l(v).pipe(i(_([])),T({providerSettingsForm:{hidden:!0}}))},{order:[`binaryPath`,`launchArgs`]}),Re=J({driverKind:c.make(`pi`),label:`Pi`,settingsSchema:Le,icon:{viewBox:`165.29 165.29 469.43 469.43`,fill:{light:`#0F0F0F`,dark:`#F5F5F5`},paths:[{d:`M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z`,fillRule:`evenodd`},{d:`M517.36 400H634.72V634.72H517.36Z`}]}}),Y=Ce([{driverKind:c.make(`codex`),label:`Codex`,settingsSchema:ne},{driverKind:c.make(`claudeAgent`),label:`Claude`,settingsSchema:h},Oe,Ae,Me,Ie,{driverKind:c.make(`antigravity`),label:`Antigravity`,settingsSchema:x},Pe,Re,Ee]);function ze(e){let t=(0,D.c)(24),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({icon:r,className:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(0,E.useId)(),o=r.viewBox,s;t[4]===n?s=t[5]:(s=w(`fill-(--icon-light) dark:fill-(--icon-dark)`,n),t[4]=n,t[5]=s);let c;t[6]!==r.fill.dark||t[7]!==r.fill.light?(c={"--icon-light":r.fill.light,"--icon-dark":r.fill.dark},t[6]=r.fill.dark,t[7]=r.fill.light,t[8]=c):c=t[8];let l=c,u;t[9]!==a||t[10]!==r.paths?(u=r.paths.some(Ve)?(0,O.jsx)(`defs`,{children:r.paths.map((e,t)=>e.gradient?(0,O.jsx)(`linearGradient`,{id:`${a}-${t}`,x1:e.gradient.x1,y1:e.gradient.y1,x2:e.gradient.x2,y2:e.gradient.y2,gradientUnits:`userSpaceOnUse`,children:e.gradient.stops.map(Be)},e.d):null)}):null,t[9]=a,t[10]=r.paths,t[11]=u):u=t[11];let d;if(t[12]!==a||t[13]!==r.paths){let e;t[15]===a?e=t[16]:(e=(e,t)=>(0,O.jsx)(`path`,{d:e.d,fillRule:e.fillRule,fill:e.gradient?`url(#${a}-${t})`:void 0,"data-icon-detail":e.fill?!0:void 0,className:e.fill?`fill-(--path-light) dark:fill-(--path-dark)`:void 0,style:e.fill?{"--path-light":e.fill.light,"--path-dark":e.fill.dark}:void 0},e.d),t[15]=a,t[16]=e),d=r.paths.map(e),t[12]=a,t[13]=r.paths,t[14]=d}else d=t[14];let f;return t[17]!==r.viewBox||t[18]!==i||t[19]!==s||t[20]!==l||t[21]!==u||t[22]!==d?(f=(0,O.jsxs)(`svg`,{...i,viewBox:o,fill:`none`,"data-provider-package-icon":!0,className:s,style:l,children:[u,d]}),t[17]=r.viewBox,t[18]=i,t[19]=s,t[20]=l,t[21]=u,t[22]=d,t[23]=f):f=t[23],f}function Be(e){return(0,O.jsx)(`stop`,{offset:e.offset,stopColor:e.color},e.offset)}function Ve(e){return e.gradient}var He=`p4-acp-registry-icons-v1`,X=524288,Z=new Map;async function Q(e){if(!e.ok||e.redirected)throw Error(`ACP registry icon request failed.`);let t=e.headers.get(`content-type`)?.split(`;`,1)[0]?.trim()??``;if(!t.startsWith(`image/`))throw Error(`ACP registry icon was not an image.`);let n=Number(e.headers.get(`content-length`));if(Number.isFinite(n)&&n>X)throw Error(`ACP registry icon was too large.`);let r=await e.arrayBuffer();if(r.byteLength>X)throw Error(`ACP registry icon was too large.`);return new Blob([r],{type:t})}function Ue(e){if(p(e)!==e)return Promise.reject(Error(`ACP registry icon URL was not allowed.`));let t=Z.get(e);if(t)return t;let n=(async()=>{let t=null;if(typeof caches<`u`)try{t=await caches.open(He)}catch{}if(t!==null)try{let n=await t.match(e);if(n)return await Q(n)}catch{}let n=await fetch(e,{credentials:`omit`,redirect:`error`,referrerPolicy:`no-referrer`}),r=n.clone(),i=await Q(n);return await t?.put(e,r).catch(()=>void 0),i})();return Z.set(e,n),n.then(()=>Z.delete(e),()=>Z.delete(e)),n}function We(e){let t=(0,D.c)(24),{icon:n,className:r,fallbackClassName:i}=e,a=(0,E.useId)(),o;t[0]===n?o=t[1]:(o=p(n),t[0]=n,t[1]=o);let s=o,[c,l]=(0,E.useState)(null),u=c?.iconUrl===s?c:null,d=u?.source??null,f=u?.status??`loading`,m,h;t[2]===s?(m=t[3],h=t[4]):(m=()=>{if(s===null)return;let e=!0,t=null;return Ue(s).then(n=>{e&&(t=URL.createObjectURL(n),l({iconUrl:s,source:t,status:`loading`}))}).catch(()=>{e&&l(e=>e?.iconUrl===s?e:{iconUrl:s,source:s,status:`loading`})}),()=>{e=!1,t!==null&&URL.revokeObjectURL(t)}},h=[s],t[2]=s,t[3]=m,t[4]=h),(0,E.useEffect)(m,h);let g;t[5]===r?g=t[6]:(g=w(`relative flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-muted-foreground`,r),t[5]=r,t[6]=g);let _,v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,O.jsx)(`feFlood`,{floodColor:`currentColor`}),v=(0,O.jsx)(`feComposite`,{in2:`SourceAlpha`,operator:`in`}),t[7]=_,t[8]=v):(_=t[7],v=t[8]);let y;t[9]===a?y=t[10]:(y=(0,O.jsx)(`svg`,{"aria-hidden":!0,className:`pointer-events-none absolute size-0`,focusable:`false`,children:(0,O.jsx)(`defs`,{children:(0,O.jsxs)(`filter`,{id:a,colorInterpolationFilters:`sRGB`,children:[_,v]})})}),t[9]=a,t[10]=y);let b;t[11]!==i||t[12]!==f?(b=f===`loaded`?null:(0,O.jsx)(oe,{className:w(`size-4`,i),"data-slot":`acp-icon-fallback`}),t[11]=i,t[12]=f,t[13]=b):b=t[13];let x;t[14]!==a||t[15]!==s||t[16]!==d||t[17]!==f?(x=d!==null&&f!==`failed`?(0,O.jsx)(`img`,{alt:``,className:w(`size-full object-contain`,f!==`loaded`&&`invisible absolute inset-0`),style:{filter:`url(#${a})`},decoding:`async`,referrerPolicy:`no-referrer`,src:d,onError:()=>{s!==null&&l(e=>e?.iconUrl===s&&e.source!==d?e:{iconUrl:s,source:d,status:`failed`})},onLoad:()=>{s!==null&&l({iconUrl:s,source:d,status:`loaded`})}}):null,t[14]=a,t[15]=s,t[16]=d,t[17]=f,t[18]=x):x=t[18];let S;return t[19]!==g||t[20]!==y||t[21]!==b||t[22]!==x?(S=(0,O.jsxs)(`span`,{"aria-hidden":!0,className:g,children:[y,b,x]}),t[19]=g,t[20]=y,t[21]=b,t[22]=x,t[23]=S):S=t[23],S}var $={[c.make(`codex`)]:se,[c.make(`claudeAgent`)]:ae,[c.make(`antigravity`)]:ie},Ge={[c.make(`codex`)]:`text-black dark:text-white`,[c.make(`claudeAgent`)]:`text-[#d97757]`,[c.make(`antigravity`)]:`text-[#5b87bf]`};function Ke(e){let t=Y.get(e)?.icon;if(t)return{className:`text-(--icon-light) dark:text-(--icon-dark)`,style:{"--icon-light":t.fill.light,"--icon-dark":t.fill.dark}};let n=Ge[e];return n?{className:n}:{}}function qe(e){return e.driverKind===`acpRegistry`?p(e.iconUrl??null)??s(e.agentId?.trim()||null):null}var Je=(0,E.memo)(function(e){let t=(0,D.c)(32),n=$[e.driverKind]??null,r=Y.get(e.driverKind)?.icon,i=e.indicatorBackground??`var(--card)`,a;t[0]===e.accentColor?a=t[1]:(a=e.accentColor?{"--provider-accent":e.accentColor}:void 0,t[0]=e.accentColor,t[1]=a);let o=a,s=e.badgeContent??`initials`,c=e.driverKind===`acpRegistry`,l;t[2]!==e.acpRegistryAgentId||t[3]!==e.acpRegistryIconUrl||t[4]!==e.driverKind?(l=qe({driverKind:e.driverKind,agentId:e.acpRegistryAgentId,iconUrl:e.acpRegistryIconUrl}),t[2]=e.acpRegistryAgentId,t[3]=e.acpRegistryIconUrl,t[4]=e.driverKind,t[5]=l):l=t[5];let u=l,d;t[6]===e.className?d=t[7]:(d=w(`relative isolate z-30 inline-flex shrink-0 items-center justify-center overflow-visible`,e.className),t[6]=e.className,t[7]=d);let f;t[8]!==n||t[9]!==u||t[10]!==c||t[11]!==r||t[12]!==e.displayName||t[13]!==e.iconClassName?(f=c?(0,O.jsx)(We,{className:w(`size-5 rounded-none bg-transparent`,e.iconClassName),fallbackClassName:`size-full`,icon:u}):r?(0,O.jsx)(ze,{icon:r,className:w(`size-5 shrink-0`,e.iconClassName),"aria-hidden":!0}):n?(0,O.jsx)(n,{className:w(`size-5 shrink-0`,e.iconClassName),"aria-hidden":!0}):(0,O.jsx)(`span`,{className:w(`text-3xs font-semibold leading-none`,e.iconClassName),children:m(e.displayName)}),t[8]=n,t[9]=u,t[10]=c,t[11]=r,t[12]=e.displayName,t[13]=e.iconClassName,t[14]=f):f=t[14];let p;t[15]!==i||t[16]!==e.statusDotClassName?(p=e.statusDotClassName?(0,O.jsx)(`span`,{className:w(`pointer-events-none absolute -left-0.5 -top-0.5 z-10 size-2 rounded-full`,e.statusDotClassName),style:{boxShadow:`0 0 0 2px ${i}`},"aria-hidden":!0}):null,t[15]=i,t[16]=e.statusDotClassName,t[17]=p):p=t[17];let h;t[18]!==s||t[19]!==i||t[20]!==e.accentColor||t[21]!==e.badgeClassName||t[22]!==e.displayName||t[23]!==e.showBadge?(h=e.showBadge?(0,O.jsx)(`span`,{className:w(`pointer-events-none absolute right-0 bottom-0 z-10 flex h-3.5 min-w-3.5 items-center justify-center rounded-full border px-0.5 text-4xs font-semibold leading-none shadow-sm`,e.accentColor?`bg-(--provider-accent) text-white`:`bg-card text-muted-foreground`,e.badgeClassName),style:{borderColor:i},"aria-hidden":!0,children:s===`initials`?m(e.displayName):null}):null,t[18]=s,t[19]=i,t[20]=e.accentColor,t[21]=e.badgeClassName,t[22]=e.displayName,t[23]=e.showBadge,t[24]=h):h=t[24];let g;return t[25]!==o||t[26]!==e.accentColor||t[27]!==d||t[28]!==f||t[29]!==p||t[30]!==h?(g=(0,O.jsxs)(`span`,{className:d,style:o,"data-provider-accent-color":e.accentColor,children:[f,p,h]}),t[25]=o,t[26]=e.accentColor,t[27]=d,t[28]=f,t[29]=p,t[30]=h,t[31]=g):g=t[31],g});function Ye(e){let t=(0,D.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,O.jsx)(ee,{className:`size-3.5`,"aria-hidden":`true`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,O.jsxs)(y,{variant:`ghost-muted`,size:`sm`,...e,onClick:Xe,children:[`Manage usage`,n]}),t[1]=e,t[2]=r),r}function Xe(){re().shell.openExternal(M)}export{ce as S,xe as _,M as a,_e as b,de as c,Se as d,le as f,q as g,ye as h,Y as i,fe as l,K as m,Je as n,be as o,pe as p,Ke as r,ue as s,Ye as t,me as u,H as v,ge as x,ve as y};
2
- //# sourceMappingURL=ChatGptUsageButton-hgahwAd8.js.map