@halcyonlabs/app 0.47.0-halcyon.604 → 0.47.0-halcyon.607

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 (782) hide show
  1. package/app/dist/assets/{AddMachineDialog-BHF-GkBG.js → AddMachineDialog-CG2ZZhp-.js} +1 -1
  2. package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.br +0 -0
  3. package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.gz +0 -0
  4. package/app/dist/assets/{AppCommandShortcutHint-7JPI7Au-.js → AppCommandShortcutHint-CCVkbqD1.js} +1 -1
  5. package/app/dist/assets/{AppFileExternalNavigationDispatcher-BNbJsP1g.js → AppFileExternalNavigationDispatcher-DETVZfBW.js} +1 -1
  6. package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.br +0 -0
  7. package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.gz +0 -0
  8. package/app/dist/assets/{AppToasterView-DP33gZcS.js → AppToasterView-BpJaGVQ1.js} +1 -1
  9. package/app/dist/assets/{BrowserTabDeck-BlOoU-vR.js → BrowserTabDeck-c6VRKA-g.js} +1 -1
  10. package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.br +0 -0
  11. package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.gz +0 -0
  12. package/app/dist/assets/{CommandPaletteBody-CBbTgLrW.js → CommandPaletteBody-BeiWvSTK.js} +1 -1
  13. package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.br +0 -0
  14. package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.gz +0 -0
  15. package/app/dist/assets/{DiffHost-DYBSO1_c.js → DiffHost-xesYsZUt.js} +1 -1
  16. package/app/dist/assets/DiffHost-xesYsZUt.js.br +0 -0
  17. package/app/dist/assets/DiffHost-xesYsZUt.js.gz +0 -0
  18. package/app/dist/assets/{ExperimentalFileLinkMenu-DO2lGQoK.js → ExperimentalFileLinkMenu-CDVoETHe.js} +1 -1
  19. package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.br +0 -0
  20. package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.gz +0 -0
  21. package/app/dist/assets/{FilePreview-ORcgsTax.js → FilePreview-CzacGZ35.js} +1 -1
  22. package/app/dist/assets/FilePreview-CzacGZ35.js.br +0 -0
  23. package/app/dist/assets/FilePreview-CzacGZ35.js.gz +0 -0
  24. package/app/dist/assets/{GitDiffCardHeader-i4vt7tT5.js → GitDiffCardHeader-CJtFaq1K.js} +1 -1
  25. package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.br +0 -0
  26. package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.gz +0 -0
  27. package/app/dist/assets/{InlineMessageEditorFrame-y089xCLP.js → InlineMessageEditorFrame-C0rqOlNn.js} +1 -1
  28. package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.br +0 -0
  29. package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.gz +0 -0
  30. package/app/dist/assets/{MachineLabel-D07WUIMh.js → MachineLabel-vUI5j8ve.js} +1 -1
  31. package/app/dist/assets/MachineLabel-vUI5j8ve.js.br +0 -0
  32. package/app/dist/assets/MachineLabel-vUI5j8ve.js.gz +0 -0
  33. package/app/dist/assets/{MachineRenameDialog-RyrwvNas.js → MachineRenameDialog-CrnZuppe.js} +1 -1
  34. package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.br +0 -0
  35. package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.gz +0 -0
  36. package/app/dist/assets/{MachineSettingsView-Bg6Op62W.js → MachineSettingsView-BR6qseai.js} +1 -1
  37. package/app/dist/assets/MachineSettingsView-BR6qseai.js.br +0 -0
  38. package/app/dist/assets/MachineSettingsView-BR6qseai.js.gz +0 -0
  39. package/app/dist/assets/{MicrophonePreferences-DwsTYfON.js → MicrophonePreferences-wMQ36e_Q.js} +1 -1
  40. package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.br +0 -0
  41. package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.gz +0 -0
  42. package/app/dist/assets/{ModelReasoningMenu-Dth3XXm8.js → ModelReasoningMenu-Do0jyo5Q.js} +1 -1
  43. package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.br +0 -0
  44. package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.gz +0 -0
  45. package/app/dist/assets/{MoonletDiff-Da65ABAI.js → MoonletDiff-CCvaiEEC.js} +1 -1
  46. package/app/dist/assets/MoonletDiff-CCvaiEEC.js.br +0 -0
  47. package/app/dist/assets/MoonletDiff-CCvaiEEC.js.gz +0 -0
  48. package/app/dist/assets/{MoonletDiffSplit-Phl7m23w.js → MoonletDiffSplit-3xEwFpfu.js} +2 -2
  49. package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.br +0 -0
  50. package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.gz +0 -0
  51. package/app/dist/assets/{MoonletSourceCode-C5aa88dK.js → MoonletSourceCode-BgaVW-e6.js} +1 -1
  52. package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.br +0 -0
  53. package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.gz +0 -0
  54. package/app/dist/assets/{NewTabPage-BKkv1maV.js → NewTabPage-BOqCqqLe.js} +1 -1
  55. package/app/dist/assets/NewTabPage-BOqCqqLe.js.br +0 -0
  56. package/app/dist/assets/NewTabPage-BOqCqqLe.js.gz +0 -0
  57. package/app/dist/assets/{NewThreadComposer-00DY4i8k.js → NewThreadComposer-DyB52pmS.js} +1 -1
  58. package/app/dist/assets/NewThreadComposer-DyB52pmS.js.br +0 -0
  59. package/app/dist/assets/NewThreadComposer-DyB52pmS.js.gz +0 -0
  60. package/app/dist/assets/{OnboardingFlow-GwpuTTqu.js → OnboardingFlow-DTPixZrb.js} +1 -1
  61. package/app/dist/assets/OnboardingFlow-DTPixZrb.js.br +0 -0
  62. package/app/dist/assets/OnboardingFlow-DTPixZrb.js.gz +0 -0
  63. package/app/dist/assets/{OptionPicker-Cy_W5NWS.js → OptionPicker-CxOGHDd8.js} +1 -1
  64. package/app/dist/assets/OptionPicker-CxOGHDd8.js.br +0 -0
  65. package/app/dist/assets/OptionPicker-CxOGHDd8.js.gz +0 -0
  66. package/app/dist/assets/{PaletteShell-CRwrb4lb.js → PaletteShell-BMkwhUdz.js} +1 -1
  67. package/app/dist/assets/PaletteShell-BMkwhUdz.js.br +0 -0
  68. package/app/dist/assets/PaletteShell-BMkwhUdz.js.gz +0 -0
  69. package/app/dist/assets/{PaneMaximizeButton-CMp4cCoZ.js → PaneMaximizeButton-DgXn2p5T.js} +1 -1
  70. package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.br +0 -0
  71. package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.gz +0 -0
  72. package/app/dist/assets/{PierreLineSelectionActions-BXbCJV8P.js → PierreLineSelectionActions-V_GPrVau.js} +1 -1
  73. package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.br +0 -0
  74. package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.gz +0 -0
  75. package/app/dist/assets/{PluginPanelRightPanelHost-CuKRaAaL.js → PluginPanelRightPanelHost-CRDSntoM.js} +1 -1
  76. package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.br +0 -0
  77. package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.gz +0 -0
  78. package/app/dist/assets/{PluginSettingsSections-DJo5h7Qh.js → PluginSettingsSections-ZnUNrvlJ.js} +1 -1
  79. package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.br +0 -0
  80. package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.gz +0 -0
  81. package/app/dist/assets/{PluginThreadChat-BV6OMCzu.js → PluginThreadChat-DtIyKaqq.js} +1 -1
  82. package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.br +0 -0
  83. package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.gz +0 -0
  84. package/app/dist/assets/{ProjectDetailSettingsView-DdF6YsSg.js → ProjectDetailSettingsView-B3apTKMj.js} +1 -1
  85. package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.br +0 -0
  86. package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.gz +0 -0
  87. package/app/dist/assets/{ProjectMachineSetupDialog-CtbI4XxM.js → ProjectMachineSetupDialog-C43S09Ex.js} +1 -1
  88. package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.br +0 -0
  89. package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.gz +0 -0
  90. package/app/dist/assets/{ProjectsSettingsSection-BT1kXbPn.js → ProjectsSettingsSection-CIshX8Xc.js} +1 -1
  91. package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.br +0 -0
  92. package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.gz +0 -0
  93. package/app/dist/assets/{QueuedMessagesList-D1aAchqp.js → QueuedMessagesList-Dh5dxmNK.js} +1 -1
  94. package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.br +0 -0
  95. package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.gz +0 -0
  96. package/app/dist/assets/{RemotePathBrowser-vPIL8lVm.js → RemotePathBrowser-1A5-qAxD.js} +1 -1
  97. package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.br +0 -0
  98. package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.gz +0 -0
  99. package/app/dist/assets/{RootComposeView-DV6JGFlA.js → RootComposeView-BIZpqYG3.js} +1 -1
  100. package/app/dist/assets/RootComposeView-BIZpqYG3.js.br +0 -0
  101. package/app/dist/assets/RootComposeView-BIZpqYG3.js.gz +0 -0
  102. package/app/dist/assets/{SecondaryPanelLayout-BpHDgFJ_.js → SecondaryPanelLayout-BIQDxJLi.js} +1 -1
  103. package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.br +0 -0
  104. package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.gz +0 -0
  105. package/app/dist/assets/{ServerMoveOverlayView-CGkGzv8t.js → ServerMoveOverlayView-BSJahQeB.js} +1 -1
  106. package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.br +0 -0
  107. package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.gz +0 -0
  108. package/app/dist/assets/{SettingsSidebar-1XC0Uxwo.js → SettingsSidebar-DY_kbv4v.js} +1 -1
  109. package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.br +0 -0
  110. package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.gz +0 -0
  111. package/app/dist/assets/SettingsView-CR1GzBCl.js +7 -0
  112. package/app/dist/assets/SettingsView-CR1GzBCl.js.br +0 -0
  113. package/app/dist/assets/SettingsView-CR1GzBCl.js.gz +0 -0
  114. package/app/dist/assets/{SidebarFooterCustomize-D7sLYPwD.js → SidebarFooterCustomize-pIj856Zr.js} +1 -1
  115. package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.br +0 -0
  116. package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.gz +0 -0
  117. package/app/dist/assets/{SidebarVisibilityCustomize-DpTzFoGl.js → SidebarVisibilityCustomize-CR7hQOIF.js} +1 -1
  118. package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.br +0 -0
  119. package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.gz +0 -0
  120. package/app/dist/assets/{SourceCodeHost-DVEXLJK1.js → SourceCodeHost-DkoXO-RM.js} +2 -2
  121. package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.br +0 -0
  122. package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.gz +0 -0
  123. package/app/dist/assets/{SplitWorkspaceRoute-BfxQQdOx.js → SplitWorkspaceRoute-DN3j-Nio.js} +2 -2
  124. package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.br +0 -0
  125. package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.gz +0 -0
  126. package/app/dist/assets/{TerminalOutputBlock-COQNamKR.js → TerminalOutputBlock-DKsNjK8s.js} +1 -1
  127. package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.br +0 -0
  128. package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.gz +0 -0
  129. package/app/dist/assets/{ThreadActionsMenu-064Gcy7T.js → ThreadActionsMenu-BulopjpY.js} +1 -1
  130. package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.br +0 -0
  131. package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.gz +0 -0
  132. package/app/dist/assets/{ThreadDetailView-CjoXzweq.js → ThreadDetailView-C6cu9JmT.js} +3 -3
  133. package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.br +0 -0
  134. package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.gz +0 -0
  135. package/app/dist/assets/{ThreadSearchPaletteMode-CwdePsHK.js → ThreadSearchPaletteMode-D0MKJ8PL.js} +1 -1
  136. package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.br +0 -0
  137. package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.gz +0 -0
  138. package/app/dist/assets/{ThreadSecondaryPanel-CtYtgTla.js → ThreadSecondaryPanel-CzjhigwP.js} +1 -1
  139. package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.br +0 -0
  140. package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.gz +0 -0
  141. package/app/dist/assets/{ThreadSecondaryPanelTabContent-BNQi8b2n.js → ThreadSecondaryPanelTabContent-BX5A98YK.js} +1 -1
  142. package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.br +0 -0
  143. package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.gz +0 -0
  144. package/app/dist/assets/{ThreadStatusGlyph-DxxHDn0P.js → ThreadStatusGlyph-BYavMHiP.js} +1 -1
  145. package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.br +0 -0
  146. package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.gz +0 -0
  147. package/app/dist/assets/{ThreadTerminalPanel-fb5Kk0KG.js → ThreadTerminalPanel-Cfe76daj.js} +1 -1
  148. package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.br +0 -0
  149. package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.gz +0 -0
  150. package/app/dist/assets/{ThreadTerminalView-BiGdt3Fd.js → ThreadTerminalView-CgMKh6rk.js} +1 -1
  151. package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.br +0 -0
  152. package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.gz +0 -0
  153. package/app/dist/assets/{ThreadTimelineNavigationContext-epkIpS1J.js → ThreadTimelineNavigationContext-2--wIUmU.js} +2 -2
  154. package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.br +0 -0
  155. package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.gz +0 -0
  156. package/app/dist/assets/{ThreadUnarchiveButton-CExEP4wZ.js → ThreadUnarchiveButton-CiDbuPzJ.js} +1 -1
  157. package/app/dist/assets/{TimelineDetailScroll-D8gge5Y9.js → TimelineDetailScroll-DnMC8nYC.js} +1 -1
  158. package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.br +0 -0
  159. package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.gz +0 -0
  160. package/app/dist/assets/{TimelineFileDiffBlock-BJt7kifl.js → TimelineFileDiffBlock-D8pKEcE0.js} +1 -1
  161. package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.br +0 -0
  162. package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.gz +0 -0
  163. package/app/dist/assets/{TimelineSelectionMenu-DrK39LAT.js → TimelineSelectionMenu-DDYrgVgK.js} +1 -1
  164. package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.br +0 -0
  165. package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.gz +0 -0
  166. package/app/dist/assets/{ToolsView-4tUvUv2U.js → ToolsView-CXmmNmMz.js} +1 -1
  167. package/app/dist/assets/ToolsView-CXmmNmMz.js.br +0 -0
  168. package/app/dist/assets/ToolsView-CXmmNmMz.js.gz +0 -0
  169. package/app/dist/assets/{ToolsViewSplits-BWOxgNc1.js → ToolsViewSplits-VIMb0WxO.js} +2 -2
  170. package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.br +0 -0
  171. package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.gz +0 -0
  172. package/app/dist/assets/{WaveformVisualizer-C1SzIkiu.js → WaveformVisualizer-CyOfIcDU.js} +1 -1
  173. package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.br +0 -0
  174. package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.gz +0 -0
  175. package/app/dist/assets/{absolute-file-path-CbI5cppS.js → absolute-file-path-BxWHDkiV.js} +1 -1
  176. package/app/dist/assets/{app-fixed-tab-navigation-Cv4Tj7xZ.js → app-fixed-tab-navigation-nG5duhr6.js} +1 -1
  177. package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.br +0 -0
  178. package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.gz +0 -0
  179. package/app/dist/assets/{audio-input-device-preference-D8tr0bqw.js → audio-input-device-preference-Civxk2e_.js} +1 -1
  180. package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.br +0 -0
  181. package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.gz +0 -0
  182. package/app/dist/assets/{bottom-anchored-scroll-body-VYrnz8Hl.js → bottom-anchored-scroll-body-izL_2xQo.js} +1 -1
  183. package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.br +0 -0
  184. package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.gz +0 -0
  185. package/app/dist/assets/{browser-url-jhAVtSw2.js → browser-url-DQsPFWqd.js} +1 -1
  186. package/app/dist/assets/browser-url-DQsPFWqd.js.br +0 -0
  187. package/app/dist/assets/browser-url-DQsPFWqd.js.gz +0 -0
  188. package/app/dist/assets/{checkbox-qaQbU8-H.js → checkbox-Dxs9oAMl.js} +1 -1
  189. package/app/dist/assets/checkbox-Dxs9oAMl.js.br +0 -0
  190. package/app/dist/assets/checkbox-Dxs9oAMl.js.gz +0 -0
  191. package/app/dist/assets/{code-loading-skeletons-pfQDO26Y.js → code-loading-skeletons-CkiXPS0M.js} +1 -1
  192. package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.br +0 -0
  193. package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.gz +0 -0
  194. package/app/dist/assets/{code-rendering-CuFk1qJ1.js → code-rendering-DjLdb6cB.js} +1 -1
  195. package/app/dist/assets/{code-theme-registration-wCS4GRn4.js → code-theme-registration-DWaGQiqG.js} +1 -1
  196. package/app/dist/assets/{detail-card-C3OH86kJ.js → detail-card-BFm1NEQz.js} +1 -1
  197. package/app/dist/assets/detail-card-BFm1NEQz.js.br +0 -0
  198. package/app/dist/assets/detail-card-BFm1NEQz.js.gz +0 -0
  199. package/app/dist/assets/{diff-stats-tally-DkIHmiEl.js → diff-stats-tally-DQHS3tHN.js} +1 -1
  200. package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.br +0 -0
  201. package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.gz +0 -0
  202. package/app/dist/assets/{dist-CWXlD45B.js → dist-DCULoGTS.js} +1 -1
  203. package/app/dist/assets/dist-DCULoGTS.js.br +0 -0
  204. package/app/dist/assets/dist-DCULoGTS.js.gz +0 -0
  205. package/app/dist/assets/{environment-mutations-BrA6u8Ev.js → environment-mutations-Zes88JN-.js} +1 -1
  206. package/app/dist/assets/environment-mutations-Zes88JN-.js.br +0 -0
  207. package/app/dist/assets/environment-mutations-Zes88JN-.js.gz +0 -0
  208. package/app/dist/assets/{environment-workspace-display-0oqBMXMB.js → environment-workspace-display-Blt7U9Mn.js} +3 -3
  209. package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.br +0 -0
  210. package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.gz +0 -0
  211. package/app/dist/assets/{event-code-block-BfPSBXNn.js → event-code-block-QXnzoFqm.js} +1 -1
  212. package/app/dist/assets/event-code-block-QXnzoFqm.js.br +0 -0
  213. package/app/dist/assets/event-code-block-QXnzoFqm.js.gz +0 -0
  214. package/app/dist/assets/{expandable-text-01SvfXRm.js → expandable-text-DkUA9RQT.js} +1 -1
  215. package/app/dist/assets/expandable-text-DkUA9RQT.js.br +0 -0
  216. package/app/dist/assets/expandable-text-DkUA9RQT.js.gz +0 -0
  217. package/app/dist/assets/{file-opener-preference-C5_P-Zfr.js → file-opener-preference-CXZHmESv.js} +1 -1
  218. package/app/dist/assets/{file-path-link-Ddg7Fzor.js → file-path-link-D7DFjBWZ.js} +1 -1
  219. package/app/dist/assets/file-path-link-D7DFjBWZ.js.br +0 -0
  220. package/app/dist/assets/file-path-link-D7DFjBWZ.js.gz +0 -0
  221. package/app/dist/assets/{host-mutations-CAtir6jv.js → host-mutations-Fl0RjER0.js} +1 -1
  222. package/app/dist/assets/host-mutations-Fl0RjER0.js.br +0 -0
  223. package/app/dist/assets/host-mutations-Fl0RjER0.js.gz +0 -0
  224. package/app/dist/assets/{icon-extended-D2fR2GTF.js → icon-extended-C0LTNXfN.js} +1 -1
  225. package/app/dist/assets/icon-extended-C0LTNXfN.js.br +0 -0
  226. package/app/dist/assets/icon-extended-C0LTNXfN.js.gz +0 -0
  227. package/app/dist/assets/{image-lightbox-Dhmri6WK.js → image-lightbox-DhNslR-8.js} +1 -1
  228. package/app/dist/assets/image-lightbox-DhNslR-8.js.br +0 -0
  229. package/app/dist/assets/image-lightbox-DhNslR-8.js.gz +0 -0
  230. package/app/dist/assets/index-C2K528W0.css +2 -0
  231. package/app/dist/assets/index-C2K528W0.css.br +0 -0
  232. package/app/dist/assets/index-C2K528W0.css.gz +0 -0
  233. package/app/dist/assets/{index-CfvM6UcU.js → index-DCps_qBD.js} +8 -8
  234. package/app/dist/assets/index-DCps_qBD.js.br +0 -0
  235. package/app/dist/assets/index-DCps_qBD.js.gz +0 -0
  236. package/app/dist/assets/{inline-rename-editor-Bg8SXoZ3.js → inline-rename-editor-nrH2d_Gy.js} +1 -1
  237. package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.br +0 -0
  238. package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.gz +0 -0
  239. package/app/dist/assets/{launcherRow-CqPaUYWn.js → launcherRow-CVYGyeOl.js} +1 -1
  240. package/app/dist/assets/launcherRow-CVYGyeOl.js.br +0 -0
  241. package/app/dist/assets/launcherRow-CVYGyeOl.js.gz +0 -0
  242. package/app/dist/assets/{localhost-link-rewrite-description-DP-bXSL8.js → localhost-link-rewrite-description-C0FphFZq.js} +1 -1
  243. package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.br +0 -0
  244. package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.gz +0 -0
  245. package/app/dist/assets/{machine-provider-queries-CoghZyj9.js → machine-provider-queries-BTz8Sz3J.js} +1 -1
  246. package/app/dist/assets/{machine-server-access-Drk0mdHH.js → machine-server-access-CGfd5e1r.js} +1 -1
  247. package/app/dist/assets/{markdown-file-image-routing-BJjI1Te3.js → markdown-file-image-routing-BhGjphhz.js} +1 -1
  248. package/app/dist/assets/{markdown-html-BU8qsXmq.js → markdown-html-CLi3FhDR.js} +1 -1
  249. package/app/dist/assets/markdown-html-CLi3FhDR.js.br +0 -0
  250. package/app/dist/assets/markdown-html-CLi3FhDR.js.gz +0 -0
  251. package/app/dist/assets/{markdown-local-file-link-D-MSnVWD.js → markdown-local-file-link-BROpdQPF.js} +1 -1
  252. package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.br +0 -0
  253. package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.gz +0 -0
  254. package/app/dist/assets/{markdown-preview-BLL1QuNp.js → markdown-preview-CGXXNhJo.js} +3 -3
  255. package/app/dist/assets/markdown-preview-CGXXNhJo.js.br +0 -0
  256. package/app/dist/assets/markdown-preview-CGXXNhJo.js.gz +0 -0
  257. package/app/dist/assets/{markdown-prompt-mentions-B5LVmCbO.js → markdown-prompt-mentions-CPWKCtMa.js} +1 -1
  258. package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.br +0 -0
  259. package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.gz +0 -0
  260. package/app/dist/assets/{model-load-error-message-Dmp1hUNg.js → model-load-error-message-CH_k4E7q.js} +1 -1
  261. package/app/dist/assets/model-load-error-message-CH_k4E7q.js.br +0 -0
  262. package/app/dist/assets/model-load-error-message-CH_k4E7q.js.gz +0 -0
  263. package/app/dist/assets/onboarding-telemetry-BXIyQ5F4.js +1 -0
  264. package/app/dist/assets/{open-in-editor-button-D0wnpT6x.js → open-in-editor-button-tA10Nkqn.js} +1 -1
  265. package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.br +0 -0
  266. package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.gz +0 -0
  267. package/app/dist/assets/{page-shell-CgSxnF9m.js → page-shell-CNCVT3Uj.js} +1 -1
  268. package/app/dist/assets/page-shell-CNCVT3Uj.js.br +0 -0
  269. package/app/dist/assets/page-shell-CNCVT3Uj.js.gz +0 -0
  270. package/app/dist/assets/{pierre-worker-pool-CHGWu76e.js → pierre-worker-pool-pXJFsMd7.js} +1 -1
  271. package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.br +0 -0
  272. package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.gz +0 -0
  273. package/app/dist/assets/{plugin-detail-navigation-DuR8_JCx.js → plugin-detail-navigation-SAqiVR3K.js} +1 -1
  274. package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.br +0 -0
  275. package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.gz +0 -0
  276. package/app/dist/assets/{plugin-frontend-D5ijLuKC.js → plugin-frontend-DoWZV45B.js} +3 -3
  277. package/app/dist/assets/plugin-frontend-DoWZV45B.js.br +0 -0
  278. package/app/dist/assets/plugin-frontend-DoWZV45B.js.gz +0 -0
  279. package/app/dist/assets/{plugin-ui-Dpa8hcuk.js → plugin-ui-Cu8MrXLJ.js} +1 -1
  280. package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.br +0 -0
  281. package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.gz +0 -0
  282. package/app/dist/assets/{project-default-execution-options-query-DfOIRKKL.js → project-default-execution-options-query-gaQEWNK0.js} +1 -1
  283. package/app/dist/assets/{queued-editor-typeahead-layout-Czaq8Cl9.js → queued-editor-typeahead-layout-DTUSPVuA.js} +1 -1
  284. package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.br +0 -0
  285. package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.gz +0 -0
  286. package/app/dist/assets/{queued-messages-layout-B5xwiued.js → queued-messages-layout-Bj1foecI.js} +1 -1
  287. package/app/dist/assets/queued-messages-layout-Bj1foecI.js.br +0 -0
  288. package/app/dist/assets/queued-messages-layout-Bj1foecI.js.gz +0 -0
  289. package/app/dist/assets/{resource-list-BKpxiO2e.js → resource-list-DLZLjUCf.js} +1 -1
  290. package/app/dist/assets/resource-list-DLZLjUCf.js.br +0 -0
  291. package/app/dist/assets/resource-list-DLZLjUCf.js.gz +0 -0
  292. package/app/dist/assets/root-compose-create-preference-Bv_dFEsH.js +1 -0
  293. package/app/dist/assets/{save-file-CNFl2iiR.js → save-file-B8sl9wgP.js} +1 -1
  294. package/app/dist/assets/{settings-nav-C9-jh_HN.js → settings-nav-D5tWYG52.js} +1 -1
  295. package/app/dist/assets/settings-nav-D5tWYG52.js.br +0 -0
  296. package/app/dist/assets/settings-nav-D5tWYG52.js.gz +0 -0
  297. package/app/dist/assets/{settings-sections-BMr_XU5l.js → settings-sections-Dfo35J2q.js} +1 -1
  298. package/app/dist/assets/settings-sections-Dfo35J2q.js.br +0 -0
  299. package/app/dist/assets/settings-sections-Dfo35J2q.js.gz +0 -0
  300. package/app/dist/assets/{shortcut-pill-_XSUZHxZ.js → shortcut-pill-BMlNncTw.js} +1 -1
  301. package/app/dist/assets/{sidebarTouchSensor-DG_A1RmT.js → sidebarTouchSensor-Da_E8eSx.js} +1 -1
  302. package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.br +0 -0
  303. package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.gz +0 -0
  304. package/app/dist/assets/{switch-BjJ8825r.js → switch-BRYzbFH-.js} +1 -1
  305. package/app/dist/assets/switch-BRYzbFH-.js.br +0 -0
  306. package/app/dist/assets/switch-BRYzbFH-.js.gz +0 -0
  307. package/app/dist/assets/{textarea-DY_k-BJR.js → textarea-DpRLVuDl.js} +1 -1
  308. package/app/dist/assets/{thread-event-parser-ma5CGP66.js → thread-event-parser-BrLyjs4v.js} +1 -1
  309. package/app/dist/assets/thread-event-parser-BrLyjs4v.js.br +0 -0
  310. package/app/dist/assets/thread-event-parser-BrLyjs4v.js.gz +0 -0
  311. package/app/dist/assets/{thread-panel-queries-BXeOzk_6.js → thread-panel-queries-s8vzntf7.js} +1 -1
  312. package/app/dist/assets/thread-panel-queries-s8vzntf7.js.br +0 -0
  313. package/app/dist/assets/thread-panel-queries-s8vzntf7.js.gz +0 -0
  314. package/app/dist/assets/{thread-runtime-mutations-DmKkyel0.js → thread-runtime-mutations-BOdkZ-H-.js} +1 -1
  315. package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.br +0 -0
  316. package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.gz +0 -0
  317. package/app/dist/assets/{thread-terminal-queries-AFVZ5K6p.js → thread-terminal-queries-Blou76c_.js} +1 -1
  318. package/app/dist/assets/thread-terminal-queries-Blou76c_.js.br +0 -0
  319. package/app/dist/assets/thread-terminal-queries-Blou76c_.js.gz +0 -0
  320. package/app/dist/assets/{threadRecentItems-DXsdcpBk.js → threadRecentItems-BiCe3SkL.js} +1 -1
  321. package/app/dist/assets/threadRecentItems-BiCe3SkL.js.br +0 -0
  322. package/app/dist/assets/threadRecentItems-BiCe3SkL.js.gz +0 -0
  323. package/app/dist/assets/{threadWorkspaceOpenPath-DwKd-s_5.js → threadWorkspaceOpenPath-C9eC_XGN.js} +1 -1
  324. package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.br +0 -0
  325. package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.gz +0 -0
  326. package/app/dist/assets/{title-bar-scroll-fade-Dw_BPLyx.js → title-bar-scroll-fade-OrK4M84v.js} +1 -1
  327. package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.br +0 -0
  328. package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.gz +0 -0
  329. package/app/dist/assets/{truncate-start-CGyRoGtG.js → truncate-start-Ck1IPV62.js} +1 -1
  330. package/app/dist/assets/{use-hover-popover-DzrAfLzd.js → use-hover-popover-uokpMJ80.js} +1 -1
  331. package/app/dist/assets/use-hover-popover-uokpMJ80.js.br +0 -0
  332. package/app/dist/assets/use-hover-popover-uokpMJ80.js.gz +0 -0
  333. package/app/dist/assets/{useElementWidth-Kv5FX-9C.js → useElementWidth-EbzKQ0bg.js} +1 -1
  334. package/app/dist/assets/useElementWidth-EbzKQ0bg.js.br +0 -0
  335. package/app/dist/assets/useElementWidth-EbzKQ0bg.js.gz +0 -0
  336. package/app/dist/assets/{useLocalOpenTargets-B7rqz64L.js → useLocalOpenTargets-CtvcdlZg.js} +1 -1
  337. package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.br +0 -0
  338. package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.gz +0 -0
  339. package/app/dist/assets/{usePanelResizeSnap-Dizp45Ab.js → usePanelResizeSnap-CuwA4rg3.js} +1 -1
  340. package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.br +0 -0
  341. package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.gz +0 -0
  342. package/app/dist/assets/{usePanelTerminals-ByzphxXd.js → usePanelTerminals-BZhTVWNX.js} +1 -1
  343. package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.br +0 -0
  344. package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.gz +0 -0
  345. package/app/dist/assets/{usePathSuggestions-Bd5UhdCh.js → usePathSuggestions-DZ1XPM_t.js} +1 -1
  346. package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.br +0 -0
  347. package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.gz +0 -0
  348. package/app/dist/assets/{useResolvedLiveFileTarget-x5Gd-Gzx.js → useResolvedLiveFileTarget-DlZUgf7A.js} +1 -1
  349. package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.br +0 -0
  350. package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.gz +0 -0
  351. package/app/dist/assets/{useThreadTerminalController-CUnfO0Da.js → useThreadTerminalController-D4Cr2aY0.js} +1 -1
  352. package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.br +0 -0
  353. package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.gz +0 -0
  354. package/app/dist/assets/{workspace-change-summary-CLNpSq_E.js → workspace-change-summary-C1EKX0Np.js} +1 -1
  355. package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.br +0 -0
  356. package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.gz +0 -0
  357. package/app/dist/assets/{workspace-checkout-display-Aad1Wxi4.js → workspace-checkout-display-DRAc3j4u.js} +4 -4
  358. package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.br +0 -0
  359. package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.gz +0 -0
  360. package/app/dist/index.html +17 -17
  361. package/app/dist/index.html.br +0 -0
  362. package/app/dist/index.html.gz +0 -0
  363. package/dist/bb-app.js +1 -1
  364. package/dist/index.d.ts +64 -64
  365. package/dist/index.js +39 -34
  366. package/host-daemon/dist/bb +2 -2
  367. package/host-daemon/dist/daemon-bundle.mjs +9 -9
  368. package/host-daemon/dist/moonlet +2 -2
  369. package/host-daemon/dist/moonlet-chunks/{browser-LWDG5PCA.js → browser-3YADF5CZ.js} +1 -1
  370. package/host-daemon/dist/moonlet-chunks/{chunk-4BNITW7L.js → chunk-CJVCV7LA.js} +1 -1
  371. package/host-daemon/dist/moonlet-chunks/{chunk-5AOUW4I4.js → chunk-DYWN65E6.js} +1 -1
  372. package/host-daemon/dist/moonlet-chunks/{chunk-GUMXNH56.js → chunk-GJNT53PW.js} +1 -1
  373. package/host-daemon/dist/moonlet-chunks/chunk-MNJOOMMT.js +2 -0
  374. package/host-daemon/dist/moonlet-chunks/{chunk-2QTAZF4P.js → chunk-OZFHGPH4.js} +2 -2
  375. package/host-daemon/dist/moonlet-chunks/{chunk-OW2VWWPF.js → chunk-UASCWFYV.js} +1 -1
  376. package/host-daemon/dist/moonlet-chunks/{chunk-3GDA5QRC.js → chunk-UBCGVKZ2.js} +1 -1
  377. package/host-daemon/dist/moonlet-chunks/{chunk-ZJ3M74CR.js → chunk-UZIJUXRX.js} +1 -1
  378. package/host-daemon/dist/moonlet-chunks/{chunk-I2TDLRZL.js → chunk-VRIDG567.js} +80 -80
  379. package/host-daemon/dist/moonlet-chunks/{chunk-LQ55GYT2.js → chunk-Z7UFAOBI.js} +1 -1
  380. package/host-daemon/dist/moonlet-chunks/{chunk-IRGDLZXQ.js → chunk-ZY4JRPPT.js} +1 -1
  381. package/host-daemon/dist/moonlet-chunks/{client-LVL2RUQ5.js → client-HJ57QVLD.js} +1 -1
  382. package/host-daemon/dist/moonlet-chunks/{commander-errors-RQKAT5HQ.js → commander-errors-VI7J6RNT.js} +1 -1
  383. package/host-daemon/dist/moonlet-chunks/{context-env-74PECPQU.js → context-env-C4YEBBVX.js} +1 -1
  384. package/host-daemon/dist/moonlet-chunks/{context-hints-GQMM7IUB.js → context-hints-FZ224BCX.js} +1 -1
  385. package/host-daemon/dist/moonlet-chunks/{diagnostics-GZNLDKFH.js → diagnostics-OU2KW3CN.js} +1 -1
  386. package/host-daemon/dist/moonlet-chunks/{environment-2OF5OYK6.js → environment-45XH2PJT.js} +1 -1
  387. package/host-daemon/dist/moonlet-chunks/{file-ICBUEP7H.js → file-OHC2H5AH.js} +1 -1
  388. package/host-daemon/dist/moonlet-chunks/{guide-I3LO3KWD.js → guide-T2HEZTCZ.js} +1 -1
  389. package/host-daemon/dist/moonlet-chunks/{machine-ZH4VN36Y.js → machine-7DB7FE7G.js} +1 -1
  390. package/host-daemon/dist/moonlet-chunks/{marketplace-72G2CIZT.js → marketplace-GSP2IPGS.js} +1 -1
  391. package/host-daemon/dist/moonlet-chunks/{permissions-ZKMW6XVA.js → permissions-SOZPETLR.js} +1 -1
  392. package/host-daemon/dist/moonlet-chunks/{plugin-J33MYYP6.js → plugin-672NQWPG.js} +26 -26
  393. package/host-daemon/dist/moonlet-chunks/{plugin-cli-proxy-KK4YO745.js → plugin-cli-proxy-YK6LMDCS.js} +1 -1
  394. package/host-daemon/dist/moonlet-chunks/{project-CAOBT6PT.js → project-KMNJH6RG.js} +1 -1
  395. package/host-daemon/dist/moonlet-chunks/{prompt-history-3CTG22DW.js → prompt-history-H3Y2IHDY.js} +1 -1
  396. package/host-daemon/dist/moonlet-chunks/{provider-T7SNTFH5.js → provider-EKKSYF2D.js} +1 -1
  397. package/host-daemon/dist/moonlet-chunks/{schedule-2G2I4DCW.js → schedule-KVSISSIR.js} +1 -1
  398. package/host-daemon/dist/moonlet-chunks/{server-R3LHIEJF.js → server-53I6IGAP.js} +2 -2
  399. package/host-daemon/dist/moonlet-chunks/{settings-WR7UCFPE.js → settings-MKGSGNIO.js} +1 -1
  400. package/host-daemon/dist/moonlet-chunks/{skill-GHMBJF4G.js → skill-DXINIPQ3.js} +1 -1
  401. package/host-daemon/dist/moonlet-chunks/{status-ES5SEMUE.js → status-BSMUYEAO.js} +1 -1
  402. package/host-daemon/dist/moonlet-chunks/{terminal-45KOGD2U.js → terminal-VKBGZFLN.js} +1 -1
  403. package/host-daemon/dist/moonlet-chunks/{theme-DEIR5VHK.js → theme-3YCCZBGC.js} +1 -1
  404. package/host-daemon/dist/moonlet-chunks/{thread-NNUIM6R7.js → thread-PFBPLD4F.js} +1 -1
  405. package/host-daemon/dist/moonlet-chunks/{updates-23J52P44.js → updates-OO7GE7UB.js} +1 -1
  406. package/host-daemon/dist/moonlet-chunks/{voice-CSQR656B.js → voice-ZJOSAJW7.js} +1 -1
  407. package/package.json +3 -3
  408. package/server/dist/builtin-plugins/account-pool/dist/app.js +9 -9
  409. package/server/dist/builtin-plugins/account-pool/skills/account-pool/SKILL.md +1 -1
  410. package/server/dist/builtin-plugins/agent-annotations/dist/app.js +2 -2
  411. package/server/dist/builtin-plugins/agent-board/dist/THIRD_PARTY_NOTICES.md +3 -3
  412. package/server/dist/builtin-plugins/agent-board/dist/app.js +6 -6
  413. package/server/dist/builtin-plugins/agent-board/dist/server.js +1 -1
  414. package/server/dist/builtin-plugins/ask-user-question/dist/app.js +6 -6
  415. package/server/dist/builtin-plugins/automations/dist/app.js +1 -1
  416. package/server/dist/builtin-plugins/automations/skills/automations/SKILL.md +1 -1
  417. package/server/dist/builtin-plugins/bb-account/dist/app.js +1 -1
  418. package/server/dist/builtin-plugins/bb-account/skills/bb-account/SKILL.md +1 -1
  419. package/server/dist/builtin-plugins/bb-ai/dist/server.js +2 -2
  420. package/server/dist/builtin-plugins/bb-ai/skills/bb-cloud-ai/SKILL.md +1 -1
  421. package/server/dist/builtin-plugins/bb-guide/dist/app.js +1 -1
  422. package/server/dist/builtin-plugins/bb-guide/dist/server.js +2 -2
  423. package/server/dist/builtin-plugins/bb-guide/package.json +2 -2
  424. package/server/dist/builtin-plugins/bb-guide/skills/bb-cli/SKILL.md +3 -3
  425. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/SKILL.md +4 -4
  426. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-cli-agents.md +6 -6
  427. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-events.md +2 -2
  428. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
  429. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-sdk.md +1 -1
  430. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/distribution.md +2 -2
  431. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-components.md +4 -4
  432. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-core-slots.md +15 -15
  433. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-hooks-and-ui.md +9 -9
  434. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/providers.md +3 -3
  435. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/quickstart.md +10 -10
  436. package/server/dist/builtin-plugins/bb-guide/skills/skill-creator/SKILL.md +2 -2
  437. package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/SKILL.md +3 -3
  438. package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/references/marketplace-entry.md +8 -8
  439. package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/references/plugin-release.md +1 -1
  440. package/server/dist/builtin-plugins/browser-automation/dist/app.js +1 -1
  441. package/server/dist/builtin-plugins/browser-automation/dist/server.js +2 -2
  442. package/server/dist/builtin-plugins/browser-automation/skills/browser-automation/SKILL.md +3 -3
  443. package/server/dist/builtin-plugins/composer/dist/app.js +4 -4
  444. package/server/dist/builtin-plugins/concurrency-limit/dist/app.js +1 -1
  445. package/server/dist/builtin-plugins/concurrency-limit/skills/concurrency-limit/SKILL.md +1 -1
  446. package/server/dist/builtin-plugins/connect/dist/app.js +2 -2
  447. package/server/dist/builtin-plugins/connect/skills/share-server-links/SKILL.md +1 -1
  448. package/server/dist/builtin-plugins/connect-next/dist/app.js +2 -2
  449. package/server/dist/builtin-plugins/connect-next/dist/server.js +1 -1
  450. package/server/dist/builtin-plugins/connect-next/skills/connect-next/SKILL.md +1 -1
  451. package/server/dist/builtin-plugins/custom-instructions/dist/app.js +1 -1
  452. package/server/dist/builtin-plugins/docs/dist/app.js +3 -3
  453. package/server/dist/builtin-plugins/docs/skills/docs/SKILL.md +1 -1
  454. package/server/dist/builtin-plugins/drafts/dist/app.js +1 -1
  455. package/server/dist/builtin-plugins/environment-git-worktree/dist/app.js +1 -1
  456. package/server/dist/builtin-plugins/environment-modal-sandbox/dist/app.js +1 -1
  457. package/server/dist/builtin-plugins/environment-modal-sandbox/dist/server.js +1 -1
  458. package/server/dist/builtin-plugins/environment-modal-sandbox/skills/modal-sandboxes/SKILL.md +5 -5
  459. package/server/dist/builtin-plugins/environment-project-checkout/dist/app.js +1 -1
  460. package/server/dist/builtin-plugins/github/dist/app.js +2 -2
  461. package/server/dist/builtin-plugins/github/dist/server.js +7 -7
  462. package/server/dist/builtin-plugins/github/package.json +2 -2
  463. package/server/dist/builtin-plugins/github/skills/github-change/SKILL.md +2 -2
  464. package/server/dist/builtin-plugins/github/skills/github-change/references/merging.md +8 -8
  465. package/server/dist/builtin-plugins/github-pr-status/dist/app.js +6 -6
  466. package/server/dist/builtin-plugins/inline-vis/dist/app.js +2 -2
  467. package/server/dist/builtin-plugins/inline-vis/skills/inline-vis/SKILL.md +2 -2
  468. package/server/dist/builtin-plugins/keep-awake/dist/app.js +1 -1
  469. package/server/dist/builtin-plugins/keep-awake/dist/server.js +1 -1
  470. package/server/dist/builtin-plugins/library/dist/app.js +2 -2
  471. package/server/dist/builtin-plugins/mail/skills/mail/SKILL.md +1 -1
  472. package/server/dist/builtin-plugins/marketplace.json +10 -10
  473. package/server/dist/builtin-plugins/mcp/dist/server.js +8 -8
  474. package/server/dist/builtin-plugins/mcp/skills/mcp/SKILL.md +1 -1
  475. package/server/dist/builtin-plugins/memory/dist/app.js +1 -1
  476. package/server/dist/builtin-plugins/memory/dist/server.js +4 -4
  477. package/server/dist/builtin-plugins/memory/skills/memory/SKILL.md +5 -5
  478. package/server/dist/builtin-plugins/monaco-editor/dist/app.js +1 -1
  479. package/server/dist/builtin-plugins/navigation/dist/app.js +1 -1
  480. package/server/dist/builtin-plugins/notify-feed/dist/app.js +3 -3
  481. package/server/dist/builtin-plugins/notify-feed/dist/server.js +2 -2
  482. package/server/dist/builtin-plugins/orbit/dist/app.js +2 -2
  483. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/docs/handoff-to-new-conversation.md +1 -1
  484. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/fixed-runner/linux-x64/manifest.json +4 -4
  485. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/revision +1 -1
  486. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/source.json +1 -1
  487. package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/back/CLAUDE.md +5 -5
  488. package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/front/CLAUDE.md +15 -15
  489. package/server/dist/builtin-plugins/orbit/dist/host.js +49 -49
  490. package/server/dist/builtin-plugins/orbit/dist/host.meta.json +1 -1
  491. package/server/dist/builtin-plugins/orbit/dist/server.js +148 -148
  492. package/server/dist/builtin-plugins/pdf-preview/dist/app.js +1 -1
  493. package/server/dist/builtin-plugins/plugin-api-docs/dist/app.js +2 -2
  494. package/server/dist/builtin-plugins/plugin-api-tester/dist/app.js +1 -1
  495. package/server/dist/builtin-plugins/prompt-library/dist/app.js +2 -2
  496. package/server/dist/builtin-plugins/prompt-library/skills/prompt-library/SKILL.md +1 -1
  497. package/server/dist/builtin-plugins/provider-acp/dist/app.js +1 -1
  498. package/server/dist/builtin-plugins/provider-acp/dist/host.js +5 -5
  499. package/server/dist/builtin-plugins/provider-acp/dist/host.meta.json +1 -1
  500. package/server/dist/builtin-plugins/provider-acp/dist/server.js +97 -97
  501. package/server/dist/builtin-plugins/provider-acp/skills/acp-provider/SKILL.md +9 -9
  502. package/server/dist/builtin-plugins/provider-claude-code/dist/app.js +1 -1
  503. package/server/dist/builtin-plugins/provider-claude-code/dist/host.js +3 -3
  504. package/server/dist/builtin-plugins/provider-claude-code/dist/host.meta.json +1 -1
  505. package/server/dist/builtin-plugins/provider-claude-code/dist/server.js +1 -1
  506. package/server/dist/builtin-plugins/provider-codex/dist/app.js +2 -2
  507. package/server/dist/builtin-plugins/provider-codex/dist/host.js +45 -45
  508. package/server/dist/builtin-plugins/provider-codex/dist/host.meta.json +1 -1
  509. package/server/dist/builtin-plugins/provider-codex/dist/server.js +1 -1
  510. package/server/dist/builtin-plugins/provider-pi/dist/app.js +1 -1
  511. package/server/dist/builtin-plugins/provider-pi/skills/pi-provider/SKILL.md +1 -1
  512. package/server/dist/builtin-plugins/provider-retry/dist/app.js +1 -1
  513. package/server/dist/builtin-plugins/provider-retry/skills/provider-retry/SKILL.md +1 -1
  514. package/server/dist/builtin-plugins/provider-usage/dist/app.js +12 -12
  515. package/server/dist/builtin-plugins/push-notifications/dist/app.js +2 -2
  516. package/server/dist/builtin-plugins/push-notifications/skills/push-notifications/SKILL.md +1 -1
  517. package/server/dist/builtin-plugins/scheduled-send/dist/app.js +1 -1
  518. package/server/dist/builtin-plugins/secrets/dist/app.js +1 -1
  519. package/server/dist/builtin-plugins/side-chat/dist/app.js +1 -1
  520. package/server/dist/builtin-plugins/storage-retention/dist/app.js +1 -1
  521. package/server/dist/builtin-plugins/storage-retention/dist/server.js +2 -2
  522. package/server/dist/builtin-plugins/storage-retention/skills/storage-retention/SKILL.md +5 -5
  523. package/server/dist/builtin-plugins/tasks/dist/app.js +4 -4
  524. package/server/dist/builtin-plugins/tasks/skills/tasks/SKILL.md +1 -1
  525. package/server/dist/builtin-plugins/theme-preview/dist/app.js +2 -2
  526. package/server/dist/builtin-plugins/theme-preview/skills/bb-theme-authoring/SKILL.md +1 -1
  527. package/server/dist/builtin-plugins/thread-list/dist/app.js +2 -2
  528. package/server/dist/builtin-plugins/thread-list/dist/server.js +2 -2
  529. package/server/dist/builtin-plugins/workflows/dist/app.js +1 -1
  530. package/server/dist/builtin-plugins/workflows/dist/server.js +4 -4
  531. package/server/dist/builtin-plugins/workflows/skills/workflows/SKILL.md +4 -4
  532. package/server/dist/builtin-plugins/workflows/skills/workflows/references/authoring.md +7 -7
  533. package/server/dist/builtin-skills/bb-cli/SKILL.md +3 -3
  534. package/server/dist/builtin-skills/bb-plugin-authoring/SKILL.md +4 -4
  535. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-cli-agents.md +6 -6
  536. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-events.md +2 -2
  537. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
  538. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-sdk.md +1 -1
  539. package/server/dist/builtin-skills/bb-plugin-authoring/references/distribution.md +2 -2
  540. package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-components.md +4 -4
  541. package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-core-slots.md +15 -15
  542. package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-hooks-and-ui.md +9 -9
  543. package/server/dist/builtin-skills/bb-plugin-authoring/references/providers.md +3 -3
  544. package/server/dist/builtin-skills/bb-plugin-authoring/references/quickstart.md +10 -10
  545. package/server/dist/builtin-skills/skill-creator/SKILL.md +2 -2
  546. package/server/dist/builtin-skills/submit-a-plugin/SKILL.md +3 -3
  547. package/server/dist/builtin-skills/submit-a-plugin/references/marketplace-entry.md +8 -8
  548. package/server/dist/builtin-skills/submit-a-plugin/references/plugin-release.md +1 -1
  549. package/server/dist/start-server.js +75 -70
  550. package/app/dist/assets/AddMachineDialog-BHF-GkBG.js.br +0 -0
  551. package/app/dist/assets/AddMachineDialog-BHF-GkBG.js.gz +0 -0
  552. package/app/dist/assets/AppFileExternalNavigationDispatcher-BNbJsP1g.js.br +0 -0
  553. package/app/dist/assets/AppFileExternalNavigationDispatcher-BNbJsP1g.js.gz +0 -0
  554. package/app/dist/assets/BrowserTabDeck-BlOoU-vR.js.br +0 -0
  555. package/app/dist/assets/BrowserTabDeck-BlOoU-vR.js.gz +0 -0
  556. package/app/dist/assets/CommandPaletteBody-CBbTgLrW.js.br +0 -0
  557. package/app/dist/assets/CommandPaletteBody-CBbTgLrW.js.gz +0 -0
  558. package/app/dist/assets/DiffHost-DYBSO1_c.js.br +0 -0
  559. package/app/dist/assets/DiffHost-DYBSO1_c.js.gz +0 -0
  560. package/app/dist/assets/ExperimentalFileLinkMenu-DO2lGQoK.js.br +0 -0
  561. package/app/dist/assets/ExperimentalFileLinkMenu-DO2lGQoK.js.gz +0 -0
  562. package/app/dist/assets/FilePreview-ORcgsTax.js.br +0 -0
  563. package/app/dist/assets/FilePreview-ORcgsTax.js.gz +0 -0
  564. package/app/dist/assets/GitDiffCardHeader-i4vt7tT5.js.br +0 -0
  565. package/app/dist/assets/GitDiffCardHeader-i4vt7tT5.js.gz +0 -0
  566. package/app/dist/assets/InlineMessageEditorFrame-y089xCLP.js.br +0 -0
  567. package/app/dist/assets/InlineMessageEditorFrame-y089xCLP.js.gz +0 -0
  568. package/app/dist/assets/MachineLabel-D07WUIMh.js.br +0 -0
  569. package/app/dist/assets/MachineLabel-D07WUIMh.js.gz +0 -0
  570. package/app/dist/assets/MachineRenameDialog-RyrwvNas.js.br +0 -0
  571. package/app/dist/assets/MachineRenameDialog-RyrwvNas.js.gz +0 -0
  572. package/app/dist/assets/MachineSettingsView-Bg6Op62W.js.br +0 -0
  573. package/app/dist/assets/MachineSettingsView-Bg6Op62W.js.gz +0 -0
  574. package/app/dist/assets/MicrophonePreferences-DwsTYfON.js.br +0 -0
  575. package/app/dist/assets/MicrophonePreferences-DwsTYfON.js.gz +0 -0
  576. package/app/dist/assets/ModelReasoningMenu-Dth3XXm8.js.br +0 -0
  577. package/app/dist/assets/ModelReasoningMenu-Dth3XXm8.js.gz +0 -0
  578. package/app/dist/assets/MoonletDiff-Da65ABAI.js.br +0 -0
  579. package/app/dist/assets/MoonletDiff-Da65ABAI.js.gz +0 -0
  580. package/app/dist/assets/MoonletDiffSplit-Phl7m23w.js.br +0 -0
  581. package/app/dist/assets/MoonletDiffSplit-Phl7m23w.js.gz +0 -0
  582. package/app/dist/assets/MoonletSourceCode-C5aa88dK.js.br +0 -0
  583. package/app/dist/assets/MoonletSourceCode-C5aa88dK.js.gz +0 -0
  584. package/app/dist/assets/NewTabPage-BKkv1maV.js.br +0 -0
  585. package/app/dist/assets/NewTabPage-BKkv1maV.js.gz +0 -0
  586. package/app/dist/assets/NewThreadComposer-00DY4i8k.js.br +0 -0
  587. package/app/dist/assets/NewThreadComposer-00DY4i8k.js.gz +0 -0
  588. package/app/dist/assets/OnboardingFlow-GwpuTTqu.js.br +0 -0
  589. package/app/dist/assets/OnboardingFlow-GwpuTTqu.js.gz +0 -0
  590. package/app/dist/assets/OptionPicker-Cy_W5NWS.js.br +0 -0
  591. package/app/dist/assets/OptionPicker-Cy_W5NWS.js.gz +0 -0
  592. package/app/dist/assets/PaletteShell-CRwrb4lb.js.br +0 -0
  593. package/app/dist/assets/PaletteShell-CRwrb4lb.js.gz +0 -0
  594. package/app/dist/assets/PaneMaximizeButton-CMp4cCoZ.js.br +0 -0
  595. package/app/dist/assets/PaneMaximizeButton-CMp4cCoZ.js.gz +0 -0
  596. package/app/dist/assets/PierreLineSelectionActions-BXbCJV8P.js.br +0 -0
  597. package/app/dist/assets/PierreLineSelectionActions-BXbCJV8P.js.gz +0 -0
  598. package/app/dist/assets/PluginPanelRightPanelHost-CuKRaAaL.js.br +0 -0
  599. package/app/dist/assets/PluginPanelRightPanelHost-CuKRaAaL.js.gz +0 -0
  600. package/app/dist/assets/PluginSettingsSections-DJo5h7Qh.js.br +0 -0
  601. package/app/dist/assets/PluginSettingsSections-DJo5h7Qh.js.gz +0 -0
  602. package/app/dist/assets/PluginThreadChat-BV6OMCzu.js.br +0 -0
  603. package/app/dist/assets/PluginThreadChat-BV6OMCzu.js.gz +0 -0
  604. package/app/dist/assets/ProjectDetailSettingsView-DdF6YsSg.js.br +0 -0
  605. package/app/dist/assets/ProjectDetailSettingsView-DdF6YsSg.js.gz +0 -0
  606. package/app/dist/assets/ProjectMachineSetupDialog-CtbI4XxM.js.br +0 -0
  607. package/app/dist/assets/ProjectMachineSetupDialog-CtbI4XxM.js.gz +0 -0
  608. package/app/dist/assets/ProjectsSettingsSection-BT1kXbPn.js.br +0 -0
  609. package/app/dist/assets/ProjectsSettingsSection-BT1kXbPn.js.gz +0 -0
  610. package/app/dist/assets/QueuedMessagesList-D1aAchqp.js.br +0 -0
  611. package/app/dist/assets/QueuedMessagesList-D1aAchqp.js.gz +0 -0
  612. package/app/dist/assets/RemotePathBrowser-vPIL8lVm.js.br +0 -0
  613. package/app/dist/assets/RemotePathBrowser-vPIL8lVm.js.gz +0 -0
  614. package/app/dist/assets/RootComposeView-DV6JGFlA.js.br +0 -0
  615. package/app/dist/assets/RootComposeView-DV6JGFlA.js.gz +0 -0
  616. package/app/dist/assets/SecondaryPanelLayout-BpHDgFJ_.js.br +0 -0
  617. package/app/dist/assets/SecondaryPanelLayout-BpHDgFJ_.js.gz +0 -0
  618. package/app/dist/assets/ServerMoveOverlayView-CGkGzv8t.js.br +0 -0
  619. package/app/dist/assets/ServerMoveOverlayView-CGkGzv8t.js.gz +0 -0
  620. package/app/dist/assets/SettingsSidebar-1XC0Uxwo.js.br +0 -0
  621. package/app/dist/assets/SettingsSidebar-1XC0Uxwo.js.gz +0 -0
  622. package/app/dist/assets/SettingsView-BUobmesT.js +0 -7
  623. package/app/dist/assets/SettingsView-BUobmesT.js.br +0 -0
  624. package/app/dist/assets/SettingsView-BUobmesT.js.gz +0 -0
  625. package/app/dist/assets/SidebarFooterCustomize-D7sLYPwD.js.br +0 -0
  626. package/app/dist/assets/SidebarFooterCustomize-D7sLYPwD.js.gz +0 -0
  627. package/app/dist/assets/SidebarVisibilityCustomize-DpTzFoGl.js.br +0 -0
  628. package/app/dist/assets/SidebarVisibilityCustomize-DpTzFoGl.js.gz +0 -0
  629. package/app/dist/assets/SourceCodeHost-DVEXLJK1.js.br +0 -0
  630. package/app/dist/assets/SourceCodeHost-DVEXLJK1.js.gz +0 -0
  631. package/app/dist/assets/SplitWorkspaceRoute-BfxQQdOx.js.br +0 -0
  632. package/app/dist/assets/SplitWorkspaceRoute-BfxQQdOx.js.gz +0 -0
  633. package/app/dist/assets/TerminalOutputBlock-COQNamKR.js.br +0 -0
  634. package/app/dist/assets/TerminalOutputBlock-COQNamKR.js.gz +0 -0
  635. package/app/dist/assets/ThreadActionsMenu-064Gcy7T.js.br +0 -0
  636. package/app/dist/assets/ThreadActionsMenu-064Gcy7T.js.gz +0 -0
  637. package/app/dist/assets/ThreadDetailView-CjoXzweq.js.br +0 -0
  638. package/app/dist/assets/ThreadDetailView-CjoXzweq.js.gz +0 -0
  639. package/app/dist/assets/ThreadSearchPaletteMode-CwdePsHK.js.br +0 -0
  640. package/app/dist/assets/ThreadSearchPaletteMode-CwdePsHK.js.gz +0 -0
  641. package/app/dist/assets/ThreadSecondaryPanel-CtYtgTla.js.br +0 -0
  642. package/app/dist/assets/ThreadSecondaryPanel-CtYtgTla.js.gz +0 -0
  643. package/app/dist/assets/ThreadSecondaryPanelTabContent-BNQi8b2n.js.br +0 -0
  644. package/app/dist/assets/ThreadSecondaryPanelTabContent-BNQi8b2n.js.gz +0 -0
  645. package/app/dist/assets/ThreadStatusGlyph-DxxHDn0P.js.br +0 -0
  646. package/app/dist/assets/ThreadStatusGlyph-DxxHDn0P.js.gz +0 -0
  647. package/app/dist/assets/ThreadTerminalPanel-fb5Kk0KG.js.br +0 -0
  648. package/app/dist/assets/ThreadTerminalPanel-fb5Kk0KG.js.gz +0 -0
  649. package/app/dist/assets/ThreadTerminalView-BiGdt3Fd.js.br +0 -0
  650. package/app/dist/assets/ThreadTerminalView-BiGdt3Fd.js.gz +0 -0
  651. package/app/dist/assets/ThreadTimelineNavigationContext-epkIpS1J.js.br +0 -0
  652. package/app/dist/assets/ThreadTimelineNavigationContext-epkIpS1J.js.gz +0 -0
  653. package/app/dist/assets/TimelineDetailScroll-D8gge5Y9.js.br +0 -0
  654. package/app/dist/assets/TimelineDetailScroll-D8gge5Y9.js.gz +0 -0
  655. package/app/dist/assets/TimelineFileDiffBlock-BJt7kifl.js.br +0 -0
  656. package/app/dist/assets/TimelineFileDiffBlock-BJt7kifl.js.gz +0 -0
  657. package/app/dist/assets/TimelineSelectionMenu-DrK39LAT.js.br +0 -0
  658. package/app/dist/assets/TimelineSelectionMenu-DrK39LAT.js.gz +0 -0
  659. package/app/dist/assets/ToolsView-4tUvUv2U.js.br +0 -0
  660. package/app/dist/assets/ToolsView-4tUvUv2U.js.gz +0 -0
  661. package/app/dist/assets/ToolsViewSplits-BWOxgNc1.js.br +0 -0
  662. package/app/dist/assets/ToolsViewSplits-BWOxgNc1.js.gz +0 -0
  663. package/app/dist/assets/WaveformVisualizer-C1SzIkiu.js.br +0 -0
  664. package/app/dist/assets/WaveformVisualizer-C1SzIkiu.js.gz +0 -0
  665. package/app/dist/assets/app-fixed-tab-navigation-Cv4Tj7xZ.js.br +0 -0
  666. package/app/dist/assets/app-fixed-tab-navigation-Cv4Tj7xZ.js.gz +0 -0
  667. package/app/dist/assets/audio-input-device-preference-D8tr0bqw.js.br +0 -0
  668. package/app/dist/assets/audio-input-device-preference-D8tr0bqw.js.gz +0 -0
  669. package/app/dist/assets/bottom-anchored-scroll-body-VYrnz8Hl.js.br +0 -0
  670. package/app/dist/assets/bottom-anchored-scroll-body-VYrnz8Hl.js.gz +0 -0
  671. package/app/dist/assets/browser-url-jhAVtSw2.js.br +0 -0
  672. package/app/dist/assets/browser-url-jhAVtSw2.js.gz +0 -0
  673. package/app/dist/assets/checkbox-qaQbU8-H.js.br +0 -0
  674. package/app/dist/assets/checkbox-qaQbU8-H.js.gz +0 -0
  675. package/app/dist/assets/code-loading-skeletons-pfQDO26Y.js.br +0 -0
  676. package/app/dist/assets/code-loading-skeletons-pfQDO26Y.js.gz +0 -0
  677. package/app/dist/assets/detail-card-C3OH86kJ.js.br +0 -0
  678. package/app/dist/assets/detail-card-C3OH86kJ.js.gz +0 -0
  679. package/app/dist/assets/diff-stats-tally-DkIHmiEl.js.br +0 -0
  680. package/app/dist/assets/diff-stats-tally-DkIHmiEl.js.gz +0 -0
  681. package/app/dist/assets/dist-CWXlD45B.js.br +0 -0
  682. package/app/dist/assets/dist-CWXlD45B.js.gz +0 -0
  683. package/app/dist/assets/environment-mutations-BrA6u8Ev.js.br +0 -0
  684. package/app/dist/assets/environment-mutations-BrA6u8Ev.js.gz +0 -0
  685. package/app/dist/assets/environment-workspace-display-0oqBMXMB.js.br +0 -0
  686. package/app/dist/assets/environment-workspace-display-0oqBMXMB.js.gz +0 -0
  687. package/app/dist/assets/event-code-block-BfPSBXNn.js.br +0 -0
  688. package/app/dist/assets/event-code-block-BfPSBXNn.js.gz +0 -0
  689. package/app/dist/assets/expandable-text-01SvfXRm.js.br +0 -0
  690. package/app/dist/assets/expandable-text-01SvfXRm.js.gz +0 -0
  691. package/app/dist/assets/file-path-link-Ddg7Fzor.js.br +0 -0
  692. package/app/dist/assets/file-path-link-Ddg7Fzor.js.gz +0 -0
  693. package/app/dist/assets/host-mutations-CAtir6jv.js.br +0 -0
  694. package/app/dist/assets/host-mutations-CAtir6jv.js.gz +0 -0
  695. package/app/dist/assets/icon-extended-D2fR2GTF.js.br +0 -0
  696. package/app/dist/assets/icon-extended-D2fR2GTF.js.gz +0 -0
  697. package/app/dist/assets/image-lightbox-Dhmri6WK.js.br +0 -0
  698. package/app/dist/assets/image-lightbox-Dhmri6WK.js.gz +0 -0
  699. package/app/dist/assets/index-5EQKiTkW.css +0 -2
  700. package/app/dist/assets/index-5EQKiTkW.css.br +0 -0
  701. package/app/dist/assets/index-5EQKiTkW.css.gz +0 -0
  702. package/app/dist/assets/index-CfvM6UcU.js.br +0 -0
  703. package/app/dist/assets/index-CfvM6UcU.js.gz +0 -0
  704. package/app/dist/assets/inline-rename-editor-Bg8SXoZ3.js.br +0 -0
  705. package/app/dist/assets/inline-rename-editor-Bg8SXoZ3.js.gz +0 -0
  706. package/app/dist/assets/launcherRow-CqPaUYWn.js.br +0 -0
  707. package/app/dist/assets/launcherRow-CqPaUYWn.js.gz +0 -0
  708. package/app/dist/assets/localhost-link-rewrite-description-DP-bXSL8.js.br +0 -0
  709. package/app/dist/assets/localhost-link-rewrite-description-DP-bXSL8.js.gz +0 -0
  710. package/app/dist/assets/markdown-html-BU8qsXmq.js.br +0 -0
  711. package/app/dist/assets/markdown-html-BU8qsXmq.js.gz +0 -0
  712. package/app/dist/assets/markdown-local-file-link-D-MSnVWD.js.br +0 -0
  713. package/app/dist/assets/markdown-local-file-link-D-MSnVWD.js.gz +0 -0
  714. package/app/dist/assets/markdown-preview-BLL1QuNp.js.br +0 -0
  715. package/app/dist/assets/markdown-preview-BLL1QuNp.js.gz +0 -0
  716. package/app/dist/assets/markdown-prompt-mentions-B5LVmCbO.js.br +0 -0
  717. package/app/dist/assets/markdown-prompt-mentions-B5LVmCbO.js.gz +0 -0
  718. package/app/dist/assets/model-load-error-message-Dmp1hUNg.js.br +0 -0
  719. package/app/dist/assets/model-load-error-message-Dmp1hUNg.js.gz +0 -0
  720. package/app/dist/assets/onboarding-telemetry-BSt5c7Sg.js +0 -1
  721. package/app/dist/assets/open-in-editor-button-D0wnpT6x.js.br +0 -0
  722. package/app/dist/assets/open-in-editor-button-D0wnpT6x.js.gz +0 -0
  723. package/app/dist/assets/page-shell-CgSxnF9m.js.br +0 -0
  724. package/app/dist/assets/page-shell-CgSxnF9m.js.gz +0 -0
  725. package/app/dist/assets/pierre-worker-pool-CHGWu76e.js.br +0 -0
  726. package/app/dist/assets/pierre-worker-pool-CHGWu76e.js.gz +0 -0
  727. package/app/dist/assets/plugin-detail-navigation-DuR8_JCx.js.br +0 -0
  728. package/app/dist/assets/plugin-detail-navigation-DuR8_JCx.js.gz +0 -0
  729. package/app/dist/assets/plugin-frontend-D5ijLuKC.js.br +0 -0
  730. package/app/dist/assets/plugin-frontend-D5ijLuKC.js.gz +0 -0
  731. package/app/dist/assets/plugin-ui-Dpa8hcuk.js.br +0 -0
  732. package/app/dist/assets/plugin-ui-Dpa8hcuk.js.gz +0 -0
  733. package/app/dist/assets/queued-editor-typeahead-layout-Czaq8Cl9.js.br +0 -0
  734. package/app/dist/assets/queued-editor-typeahead-layout-Czaq8Cl9.js.gz +0 -0
  735. package/app/dist/assets/queued-messages-layout-B5xwiued.js.br +0 -0
  736. package/app/dist/assets/queued-messages-layout-B5xwiued.js.gz +0 -0
  737. package/app/dist/assets/resource-list-BKpxiO2e.js.br +0 -0
  738. package/app/dist/assets/resource-list-BKpxiO2e.js.gz +0 -0
  739. package/app/dist/assets/root-compose-create-preference-BeAvwSHy.js +0 -1
  740. package/app/dist/assets/settings-nav-C9-jh_HN.js.br +0 -0
  741. package/app/dist/assets/settings-nav-C9-jh_HN.js.gz +0 -0
  742. package/app/dist/assets/settings-sections-BMr_XU5l.js.br +0 -0
  743. package/app/dist/assets/settings-sections-BMr_XU5l.js.gz +0 -0
  744. package/app/dist/assets/sidebarTouchSensor-DG_A1RmT.js.br +0 -0
  745. package/app/dist/assets/sidebarTouchSensor-DG_A1RmT.js.gz +0 -0
  746. package/app/dist/assets/switch-BjJ8825r.js.br +0 -0
  747. package/app/dist/assets/switch-BjJ8825r.js.gz +0 -0
  748. package/app/dist/assets/thread-event-parser-ma5CGP66.js.br +0 -0
  749. package/app/dist/assets/thread-event-parser-ma5CGP66.js.gz +0 -0
  750. package/app/dist/assets/thread-panel-queries-BXeOzk_6.js.br +0 -0
  751. package/app/dist/assets/thread-panel-queries-BXeOzk_6.js.gz +0 -0
  752. package/app/dist/assets/thread-runtime-mutations-DmKkyel0.js.br +0 -0
  753. package/app/dist/assets/thread-runtime-mutations-DmKkyel0.js.gz +0 -0
  754. package/app/dist/assets/thread-terminal-queries-AFVZ5K6p.js.br +0 -0
  755. package/app/dist/assets/thread-terminal-queries-AFVZ5K6p.js.gz +0 -0
  756. package/app/dist/assets/threadRecentItems-DXsdcpBk.js.br +0 -0
  757. package/app/dist/assets/threadRecentItems-DXsdcpBk.js.gz +0 -0
  758. package/app/dist/assets/threadWorkspaceOpenPath-DwKd-s_5.js.br +0 -0
  759. package/app/dist/assets/threadWorkspaceOpenPath-DwKd-s_5.js.gz +0 -0
  760. package/app/dist/assets/title-bar-scroll-fade-Dw_BPLyx.js.br +0 -0
  761. package/app/dist/assets/title-bar-scroll-fade-Dw_BPLyx.js.gz +0 -0
  762. package/app/dist/assets/use-hover-popover-DzrAfLzd.js.br +0 -0
  763. package/app/dist/assets/use-hover-popover-DzrAfLzd.js.gz +0 -0
  764. package/app/dist/assets/useElementWidth-Kv5FX-9C.js.br +0 -0
  765. package/app/dist/assets/useElementWidth-Kv5FX-9C.js.gz +0 -0
  766. package/app/dist/assets/useLocalOpenTargets-B7rqz64L.js.br +0 -0
  767. package/app/dist/assets/useLocalOpenTargets-B7rqz64L.js.gz +0 -0
  768. package/app/dist/assets/usePanelResizeSnap-Dizp45Ab.js.br +0 -0
  769. package/app/dist/assets/usePanelResizeSnap-Dizp45Ab.js.gz +0 -0
  770. package/app/dist/assets/usePanelTerminals-ByzphxXd.js.br +0 -0
  771. package/app/dist/assets/usePanelTerminals-ByzphxXd.js.gz +0 -0
  772. package/app/dist/assets/usePathSuggestions-Bd5UhdCh.js.br +0 -0
  773. package/app/dist/assets/usePathSuggestions-Bd5UhdCh.js.gz +0 -0
  774. package/app/dist/assets/useResolvedLiveFileTarget-x5Gd-Gzx.js.br +0 -0
  775. package/app/dist/assets/useResolvedLiveFileTarget-x5Gd-Gzx.js.gz +0 -0
  776. package/app/dist/assets/useThreadTerminalController-CUnfO0Da.js.br +0 -0
  777. package/app/dist/assets/useThreadTerminalController-CUnfO0Da.js.gz +0 -0
  778. package/app/dist/assets/workspace-change-summary-CLNpSq_E.js.br +0 -0
  779. package/app/dist/assets/workspace-change-summary-CLNpSq_E.js.gz +0 -0
  780. package/app/dist/assets/workspace-checkout-display-Aad1Wxi4.js.br +0 -0
  781. package/app/dist/assets/workspace-checkout-display-Aad1Wxi4.js.gz +0 -0
  782. package/host-daemon/dist/moonlet-chunks/chunk-4XWRV5U3.js +0 -2
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{Dh as r,Fh as i,tn as a}from"./index-CfvM6UcU.js";var o=t(),s=e(n(),1);function c(e){let t=(0,o.c)(3),{provider:n,className:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,s.jsx)(a,{providerKind:`machine`,provider:n,fallback:`Zap`,className:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function l(e,t){return e.type!==`ephemeral`||e.machineProviderId===null?null:t?.id===e.machineProviderId?t:{id:e.machineProviderId,displayName:e.machineProviderId,icon:`ComputerCloud`,logoUrl:null}}function u(e){let t=(0,o.c)(12),{host:n,machineProvider:a,className:u}=e,d;t[0]!==n||t[1]!==a?(d=l(n,a),t[0]=n,t[1]=a,t[2]=d):d=t[2];let f=d;if(f===null){let e;t[3]===u?e=t[4]:(e=i(`size-3.5 shrink-0`,u),t[3]=u,t[4]=e);let n;return t[5]===e?n=t[6]:(n=(0,s.jsx)(r,{name:`Laptop`,className:e,"aria-hidden":!0}),t[5]=e,t[6]=n),n}let p;t[7]===u?p=t[8]:(p=i(`size-3.5 shrink-0`,u),t[7]=u,t[8]=p);let m;return t[9]!==f||t[10]!==p?(m=(0,s.jsx)(c,{provider:f,className:p}),t[9]=f,t[10]=p,t[11]=m):m=t[11],m}function d(e){let t=(0,o.c)(15),{host:n,machineProvider:r,className:a,iconClassName:c,nameClassName:l}=e,d;t[0]===a?d=t[1]:(d=i(`inline-flex min-w-0 items-center gap-1.5`,a),t[0]=a,t[1]=d);let f;t[2]!==n||t[3]!==c||t[4]!==r?(f=(0,s.jsx)(u,{host:n,machineProvider:r,className:c}),t[2]=n,t[3]=c,t[4]=r,t[5]=f):f=t[5];let p;t[6]===l?p=t[7]:(p=i(`min-w-0 truncate`,l),t[6]=l,t[7]=p);let m;t[8]!==n.name||t[9]!==p?(m=(0,s.jsx)(`span`,{className:p,children:n.name}),t[8]=n.name,t[9]=p,t[10]=m):m=t[10];let h;return t[11]!==d||t[12]!==f||t[13]!==m?(h=(0,s.jsxs)(`span`,{className:d,children:[f,m]}),t[11]=d,t[12]=f,t[13]=m,t[14]=h):h=t[14],h}export{d as n,u as t};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{Dh as r,Fh as i,tn as a}from"./index-DCps_qBD.js";var o=t(),s=e(n(),1);function c(e){let t=(0,o.c)(3),{provider:n,className:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,s.jsx)(a,{providerKind:`machine`,provider:n,fallback:`Zap`,className:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function l(e,t){return e.type!==`ephemeral`||e.machineProviderId===null?null:t?.id===e.machineProviderId?t:{id:e.machineProviderId,displayName:e.machineProviderId,icon:`ComputerCloud`,logoUrl:null}}function u(e){let t=(0,o.c)(12),{host:n,machineProvider:a,className:u}=e,d;t[0]!==n||t[1]!==a?(d=l(n,a),t[0]=n,t[1]=a,t[2]=d):d=t[2];let f=d;if(f===null){let e;t[3]===u?e=t[4]:(e=i(`size-3.5 shrink-0`,u),t[3]=u,t[4]=e);let n;return t[5]===e?n=t[6]:(n=(0,s.jsx)(r,{name:`Laptop`,className:e,"aria-hidden":!0}),t[5]=e,t[6]=n),n}let p;t[7]===u?p=t[8]:(p=i(`size-3.5 shrink-0`,u),t[7]=u,t[8]=p);let m;return t[9]!==f||t[10]!==p?(m=(0,s.jsx)(c,{provider:f,className:p}),t[9]=f,t[10]=p,t[11]=m):m=t[11],m}function d(e){let t=(0,o.c)(15),{host:n,machineProvider:r,className:a,iconClassName:c,nameClassName:l}=e,d;t[0]===a?d=t[1]:(d=i(`inline-flex min-w-0 items-center gap-1.5`,a),t[0]=a,t[1]=d);let f;t[2]!==n||t[3]!==c||t[4]!==r?(f=(0,s.jsx)(u,{host:n,machineProvider:r,className:c}),t[2]=n,t[3]=c,t[4]=r,t[5]=f):f=t[5];let p;t[6]===l?p=t[7]:(p=i(`min-w-0 truncate`,l),t[6]=l,t[7]=p);let m;t[8]!==n.name||t[9]!==p?(m=(0,s.jsx)(`span`,{className:p,children:n.name}),t[8]=n.name,t[9]=p,t[10]=m):m=t[10];let h;return t[11]!==d||t[12]!==f||t[13]!==m?(h=(0,s.jsxs)(`span`,{className:d,children:[f,m]}),t[11]=d,t[12]=f,t[13]=m,t[14]=h):h=t[14],h}export{d as n,u as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Qr as t,hi as n,kr as r,ni as i,qr as a,ri as o}from"./boot-vendor-CKEhulXz.js";import{Co as s,Ct as c,Dh as l,Do as u,E as d,Eo as f,Fh as p,Gd as m,Jr as h,Kr as g,Na as _,O as v,Qi as y,S as b,So as x,To as S,Zo as C,__ as w,b as T,dc as E,ea as D,ia as O,jh as k,nc as A,v as j,wo as M,x as N}from"./index-CfvM6UcU.js";import{o as P}from"./dist-CWXlD45B.js";import{n as F}from"./AddMachineDialog-BHF-GkBG.js";import{t as I}from"./checkbox-qaQbU8-H.js";import{t as L}from"./update-state-CuYJKY13.js";import{n as R,t as z}from"./host-mutations-CAtir6jv.js";var B=r(),V=()=>[`machine-inventory`];function H({queryClient:e}){return e.invalidateQueries({queryKey:V()})}var U=e(o(),1),ee=[{role:`workloads`,title:`Workloads`,description:`Default place for new work.`},{role:`request`,title:`On request`,description:`Only work you ask for, in a folder listed under Access.`},{role:`none`,title:`None`,description:`Your moonlet starts nothing here.`}];function te(e){let n=(0,B.c)(32),{hostId:r}=e,o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={includeCreating:!0},n[0]=o):o=n[0];let s=y(o),c=i(),l;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(l={queryKey:V(),queryFn:re,refetchInterval:5e3},n[1]=l):l=n[1];let u=t(l),d;n[2]===c?d=n[3]:(d={mutationFn:ne,onSuccess:async()=>{await H({queryClient:c})}},n[2]=c,n[3]=d);let f=a(d);if(u.isError){let e;return n[4]===u.error.message?e=n[5]:(e=(0,U.jsxs)(`p`,{role:`alert`,children:[`Could not load machine roles: `,u.error.message]}),n[4]=u.error.message,n[5]=e),e}if(!u.data){let e;return n[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(`p`,{children:`Loading roles…`}),n[6]=e):e=n[6],e}let p;if(n[7]!==r||n[8]!==s||n[9]!==u.data.roles||n[10]!==f){let e;n[12]===r?e=n[13]:(e=e=>r===void 0||e.hostId===r,n[12]=r,n[13]=e);let t;n[14]!==s||n[15]!==f?(t=e=>(0,U.jsxs)(`fieldset`,{className:`space-y-2`,children:[(0,U.jsx)(`legend`,{className:`text-sm font-medium`,children:s.data?.find(t=>t.id===e.hostId)?.name??e.hostId}),ee.map(t=>(0,U.jsxs)(`label`,{className:`flex items-start gap-3 rounded-md border border-border p-3 text-sm`,children:[(0,U.jsx)(`input`,{type:`radio`,name:`role-${e.hostId}`,checked:e.role===t.role,disabled:f.isPending||e.isServer&&t.role!==`none`||t.role===`workloads`&&!e.supportsWorkloads,onChange:()=>f.mutate({hostId:e.hostId,role:t.role})}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`span`,{className:`block font-medium`,children:t.title}),(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t.description})]})]},t.role)),!e.isServer&&!e.supportsWorkloads?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Workloads needs a machine already prepared for isolated work.`}):null,e.isServer?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This machine runs the server, so it can only be None. Your moonlet and the server never share a machine.`}):null]},e.hostId),n[14]=s,n[15]=f,n[16]=t):t=n[16],p=u.data.roles.filter(e).map(t),n[7]=r,n[8]=s,n[9]=u.data.roles,n[10]=f,n[11]=p}else p=n[11];let m;n[17]!==f.error||n[18]!==f.isError?(m=f.isError?(0,U.jsx)(`p`,{role:`alert`,children:f.error.message}):null,n[17]=f.error,n[18]=f.isError,n[19]=m):m=n[19];let h;if(n[20]!==r||n[21]!==s||n[22]!==u.data.records){let e;n[24]===r?e=n[25]:(e=e=>r===void 0||e.hostId===r,n[24]=r,n[25]=e);let t;n[26]===s?t=n[27]:(t=e=>(0,U.jsx)(ie,{record:e,machineName:e=>s.data?.find(t=>t.id===e)?.name??e},`${e.kind}:${e.name}`),n[26]=s,n[27]=t),h=u.data.records.filter(e).map(t),n[20]=r,n[21]=s,n[22]=u.data.records,n[23]=h}else h=n[23];let g;return n[28]!==p||n[29]!==m||n[30]!==h?(g=(0,U.jsx)(P,{title:`Role`,description:`What your moonlet may start on each machine.`,children:(0,U.jsxs)(`div`,{className:`space-y-6 p-4`,children:[p,m,h]})}),n[28]=p,n[29]=m,n[30]=h,n[31]=g):g=n[31],g}function ne(e){let{hostId:t,role:n}=e;return m.hosts.experimental_setRole({hostId:t,role:n})}function re(){return m.hosts.experimental_inventory()}function ie(e){let t=(0,B.c)(13),{record:n,machineName:r}=e,i;if(t[0]!==r||t[1]!==n.hostId||t[2]!==n.managedFrom||t[3]!==n.name||t[4]!==n.record){let e=[{title:`Connection`,fields:[[`gate`,`Gate`],[`tunnel`,`Tunnel`]]},{title:`Hardware and accounts`,fields:[[`os`,`System`],[`driver`,`Virtual machine`],[`admin_user`,`Administrator`],[`desktop_user`,`Desktop user`],[`cpus`,`CPU cores`],[`memory_gb`,`Memory (GB)`],[`disk_gb`,`Disk (GB)`],[`hypervisor`,`Host`],[`server`,`Host record`],[`region`,`Region`],[`profile`,`Cloud profile`],[`instance_type`,`Instance type`]]},{title:`Installed`,fields:Object.entries(n.record).filter(q).sort(K).map(W)},{title:`Other saved settings`,fields:[[`orbit_thread`,`Conversation machine`],[`mail`,`Mail`],[`events`,`Event rules`]]}],a=ae,o;t[6]===n.name?o=t[7]:(o=(0,U.jsx)(`h3`,{className:`text-sm font-medium`,children:n.name}),t[6]=n.name,t[7]=o);let s;t[8]===n.hostId?s=t[9]:(s=n.hostId===null?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Offline or not enrolled. Its saved settings stay here.`}):null,t[8]=n.hostId,t[9]=s);let c;t[10]!==r||t[11]!==n.managedFrom?(c=n.managedFrom?(0,U.jsxs)(`div`,{className:`text-sm`,children:[(0,U.jsx)(`h4`,{className:`font-medium`,children:`Managed from`}),(0,U.jsx)(`p`,{children:r(n.managedFrom)})]}):null,t[10]=r,t[11]=n.managedFrom,t[12]=c):c=t[12],i=(0,U.jsxs)(`section`,{className:`space-y-4 border-t border-border pt-4`,children:[o,s,c,e.map(e=>{let t=e.fields.filter(e=>{let[t]=e;return n.record[t]!==void 0});return t.length>0?(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`text-sm font-medium`,children:e.title}),(0,U.jsx)(`dl`,{className:`divide-y divide-border text-sm`,children:t.map(e=>{let[t,r]=e;return(0,U.jsxs)(`div`,{className:`flex flex-wrap justify-between gap-2 py-2`,children:[(0,U.jsx)(`dt`,{children:r}),(0,U.jsx)(`dd`,{className:`break-all text-xs`,children:a(n.record[t])})]},t)})})]},e.title):null})]}),t[0]=r,t[1]=n.hostId,t[2]=n.managedFrom,t[3]=n.name,t[4]=n.record,t[5]=i}else i=t[5];return i}function ae(e){return typeof e==`boolean`?e?`On`:`Off`:typeof e==`string`?e===`macos`?`macOS`:e===`linux`?`Linux`:e:JSON.stringify(e)}function W(e){let[t]=e;return[t,t===`vms`?`Virtual machines`:t.replace(/_/g,` `).replace(/^./,G)]}function G(e){return e.toUpperCase()}function K(e,t){let[n]=e,[r]=t;return n.localeCompare(r)}function q(e){let[t,n]=e;return typeof n==`boolean`&&![`orbit_thread`,`mail`].includes(t)}function J(e){return e.phase===`removing`&&e.teardown?.status===`failed`?`Cleanup failed`:e.phase===`suspending`?`Pausing`:e.phase===`suspended`?`Paused`:e.phase===`resuming`?`Resuming`:e.phase===`removing`?`Removing`:null}function oe(e){return J(e.lifecycle)===`Cleanup failed`?`failed`:e.lifecycle.phase===`removing`||e.lifecycle.phase===`suspending`||e.lifecycle.phase===`resuming`||e.status===`connected`&&e.delivery?.state===`stalled`?`attention`:e.status===`connected`?`online`:`offline`}function se({host:e,now:t}){let n=[],r=J(e.lifecycle);return n.push(r??(e.status===`connected`?e.delivery?.state===`stalled`?`Delivery stalled`:`Online`:`Offline`)),e.lifecycle.message===null?e.status!==`connected`&&e.lastSeenAt!==null&&n.push(`last seen ${_({timestamp:e.lastSeenAt,now:t})}`):n.push(e.lifecycle.message),n.join(` · `)}function ce(e){return e.status!==`connected`&&e.lifecycle.phase===`active`}function le(e){return e.status!==`connected`&&e.lifecycle.phase===`removing`&&e.lifecycle.teardown?.status===`failed`}var ue=5;function Y(e){return e?`The server machine can't be removed. Move the server to another machine first.`:`The server machine can't be removed.`}function X(e){return e.type===`ephemeral`?`The compute and its saved snapshots are deleted. Its environments remain as read-only history.`:e.machineProviderId===null?`Project checkouts stay on its disk, but its environments become read-only history and it cannot run new work until paired again.`:`The provider cleans up resources it owns. Its environments remain as read-only history.`}function de(e){let t=(0,B.c)(14),{hostId:n}=e,r;t[0]===n?r=t[1]:(r={hostId:n,limit:ue},t[0]=n,t[1]=r);let i=E(r);if(i.data===void 0||i.data.total===0)return null;let{threads:a,total:o}=i.data,s=o-a.length,c=o===1?`1 unarchived thread on this machine:`:`${o} unarchived threads on this machine:`,l;t[2]===c?l=t[3]:(l=(0,U.jsx)(`p`,{children:c}),t[2]=c,t[3]=l);let u;t[4]===a?u=t[5]:(u=a.map(fe),t[4]=a,t[5]=u);let d;t[6]===u?d=t[7]:(d=(0,U.jsx)(`ul`,{className:`list-disc space-y-0.5 pl-5 text-foreground marker:text-subtle-foreground`,children:u}),t[6]=u,t[7]=d);let f;t[8]===s?f=t[9]:(f=s>0?(0,U.jsxs)(`p`,{children:[`and `,s,` more`]}):null,t[8]=s,t[9]=f);let p;return t[10]!==l||t[11]!==d||t[12]!==f?(p=(0,U.jsxs)(`div`,{className:`space-y-1 text-sm text-muted-foreground`,children:[l,d,f]}),t[10]=l,t[11]=d,t[12]=f,t[13]=p):p=t[13],p}function fe(e){return(0,U.jsx)(`li`,{children:(0,U.jsx)(`span`,{className:`block truncate`,children:A(e)})},e.id)}function pe(e){let t=(0,B.c)(15),{target:n,onOpenChange:r,onRemoved:i}=e,a=R(),o;t[0]===n?o=t[1]:(o=n!==null&&le(n),t[0]=n,t[1]=o);let s=o,c=n!==null,l;t[2]!==r||t[3]!==a?(l=e=>{!e&&!a.isPending&&(a.reset(),r(!1))},t[2]=r,t[3]=a,t[4]=l):l=t[4];let d;t[5]!==s||t[6]!==r||t[7]!==i||t[8]!==a||t[9]!==n?(d=n===null?null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(f,{children:[(0,U.jsxs)(u,{children:[`Remove `,n.name,`?`]}),(0,U.jsx)(M,{children:s?(0,U.jsxs)(U.Fragment,{children:[`Cleanup failed and `,n.name,` is not connected. Removing it now skips environment cleanup on the machine: files and worktrees left on its disk are not deleted, and its environments become read-only history. The machine provider's removal still runs. Use this only if the machine is gone or will not come back.`]}):(0,U.jsxs)(U.Fragment,{children:[`This revokes `,n.name,`'s access to this server.`,` `,X(n)]})})]}),(0,U.jsx)(de,{hostId:n.id}),a.isError?(0,U.jsx)(`p`,{className:`text-sm text-destructive`,role:`alert`,children:C({error:a.error,fallbackMessage:`Couldn't remove ${n.name}.`})}):null,(0,U.jsx)(S,{children:(0,U.jsx)(k,{type:`button`,variant:`destructive`,disabled:a.isPending,onClick:()=>a.mutate({hostId:n.id,force:s},{onSuccess:()=>{r(!1),i?.(n)}}),children:s?`Remove anyway`:`Remove machine`})})]}),t[5]=s,t[6]=r,t[7]=i,t[8]=a,t[9]=n,t[10]=d):d=t[10];let p;return t[11]!==c||t[12]!==l||t[13]!==d?(p=(0,U.jsx)(h,{open:c,onOpenChange:l,children:d}),t[11]=c,t[12]=l,t[13]=d,t[14]=p):p=t[14],p}function Z(e,t){return t?.supportsSuspend&&e.lifecycle.phase===`active`?{icon:`Pause`,label:`Suspend`,kind:`suspend`}:t?.supportsSuspend&&e.lifecycle.phase===`suspended`?{icon:`Play`,label:`Resume`,kind:`resume`}:e.lifecycle.phase===`removing`&&e.lifecycle.teardown?.status===`failed`?{icon:`RotateCcw`,label:`Retry cleanup`,kind:`retry-cleanup`}:null}function me(e){let t=(0,B.c)(10),{host:n,machineProvider:r,pending:i,onSuspend:a,onResume:o,onRetryCleanup:s}=e,c;t[0]!==n||t[1]!==r?(c=Z(n,r),t[0]=n,t[1]=r,t[2]=c):c=t[2];let u=c;if(u===null)return null;let d=u.kind===`suspend`?a:u.kind===`resume`?o:s,f;t[3]===u.icon?f=t[4]:(f=(0,U.jsx)(l,{name:u.icon,className:`size-3.5`,"aria-hidden":!0}),t[3]=u.icon,t[4]=f);let p;return t[5]!==u.label||t[6]!==d||t[7]!==i||t[8]!==f?(p=(0,U.jsxs)(k,{type:`button`,variant:`outline`,size:`sm`,disabled:i,onClick:d,children:[f,u.label]}),t[5]=u.label,t[6]=d,t[7]=i,t[8]=f,t[9]=p):p=t[9],p}function he(e){let t=[{id:`rename`,label:`Rename`,icon:`Edit`,onSelect:e.onRename}];ce(e.host)&&t.push({id:`reconnect`,label:`Reconnect`,icon:`RotateCcw`,onSelect:e.onReconnect});let n=e.onRetryUpdate;n!==void 0&&c(e.host)&&t.push({id:`retry-update`,label:e.retryUpdatePending??!1?`Retrying update…`:`Retry update`,icon:L,disabled:e.retryUpdatePending??!1,onSelect:n});let r=Z(e.host,e.machineProvider),i=r===null?void 0:r.kind===`suspend`?e.onSuspend:r.kind===`resume`?e.onResume:e.onRetryCleanup;r!==null&&i!==void 0&&t.push({id:`lifecycle`,label:r.label,icon:r.icon,disabled:e.lifecycleActionPending??!1,onSelect:i}),e.canMoveServerHere&&t.push({id:`move-server`,label:`Move server here`,icon:`MoveTo`,onSelect:e.onMoveServerHere});let a=e.onRemove;return a!==void 0&&t.push({id:`remove`,label:`Remove machine`,icon:`Trash2`,tone:`destructive`,...e.isPrimary?{disabled:!0,disabledReason:Y(e.serverMoveEnabled??!1)}:{},onSelect:a}),t}var Q=e(n(),1);function ge(e){let t=(0,B.c)(35),{target:n,onOpenChange:r}=e,i=z(),a=n?.id??null,{mutate:o,reset:c}=i,d,p;t[0]!==a||t[1]!==o||t[2]!==c?(d=()=>{if(a===null){c();return}o(a)},p=[a,o,c],t[0]=a,t[1]=o,t[2]=c,t[3]=d,t[4]=p):(d=t[3],p=t[4]),(0,Q.useEffect)(d,p);let m=i.data??null,h=n!==null&&n.status===`connected`,g;t[5]!==i.error||t[6]!==i.isError?(g=i.isError?C({error:i.error,fallbackMessage:`Couldn't prepare a reconnect command.`}):null,t[5]=i.error,t[6]=i.isError,t[7]=g):g=t[7];let _=g,v=n!==null,y;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,U.jsx)(u,{children:`Reconnect machine`}),t[8]=y):y=t[8];let b=_===null?void 0:`text-destructive-text`,S=_??`Run this command on ${n?.name??`the machine`} to bring it back online. It keeps the machine's projects, environments and history.`,w;t[9]!==b||t[10]!==S?(w=(0,U.jsxs)(f,{children:[y,(0,U.jsx)(M,{className:b,children:S})]}),t[9]=b,t[10]=S,t[11]=w):w=t[11];let T;t[12]!==_||t[13]!==a||t[14]!==o?(T=_===null?null:(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsx)(k,{variant:`outline`,size:`sm`,onClick:()=>{a!==null&&o(a)},children:`Try again`})}),t[12]=_,t[13]=a,t[14]=o,t[15]=T):T=t[15];let E;t[16]!==a||t[17]!==o||t[18]!==m?(E=m===null?null:(0,U.jsx)(F,{command:m.command,windowsCommand:m.windowsCommand,expiresAt:m.expiresAt,onRegenerate:()=>{a!==null&&o(a)}},m.command),t[16]=a,t[17]=o,t[18]=m,t[19]=E):E=t[19];let O;t[20]!==_||t[21]!==r||t[22]!==m||t[23]!==h||t[24]!==n?.name?(O=_===null?(0,U.jsx)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:h?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(D,{connected:!0}),(0,U.jsxs)(`span`,{role:`status`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:[n?.name,` reconnected`]}),(0,U.jsx)(k,{size:`sm`,variant:`ghost`,className:`h-7 shrink-0 px-2 text-xs`,onClick:()=>r(!1),children:`Done`})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(l,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,U.jsx)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:m===null?`Preparing a reconnect command…`:`Waiting for the machine to reconnect…`})]})}):null,t[20]=_,t[21]=r,t[22]=m,t[23]=h,t[24]=n?.name,t[25]=O):O=t[25];let A;t[26]!==E||t[27]!==O||t[28]!==w||t[29]!==T?(A=(0,U.jsxs)(s,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,onInteractOutside:_e,children:[w,T,E,O]}),t[26]=E,t[27]=O,t[28]=w,t[29]=T,t[30]=A):A=t[30];let j;return t[31]!==r||t[32]!==A||t[33]!==v?(j=(0,U.jsx)(x,{open:v,onOpenChange:r,children:A}),t[31]=r,t[32]=A,t[33]=v,t[34]=j):j=t[34],j}function _e(e){return e.preventDefault()}var ve={blocker:{heading:`Fix before moving`,icon:`AlertCircle`,iconClassName:`text-destructive-text`},warning:{heading:`Before you move`,icon:`AlertTriangle`,iconClassName:`text-warning-text`},info:{heading:`Good to know`,icon:`Info`,iconClassName:`text-muted-foreground`}};function ye(e){let t=(0,B.c)(17),{target:n,onOpenChange:r}=e,i=v(),a;t[0]!==r||t[1]!==i?(a=()=>{i.isPending||(i.reset(),r(!1))},t[0]=r,t[1]=i,t[2]=a):a=t[2];let o=a,c=n!==null,l;t[3]===o?l=t[4]:(l=e=>{e||o()},t[3]=o,t[4]=l);let u;t[5]!==o||t[6]!==r||t[7]!==i||t[8]!==n?(u=n===null?null:(0,U.jsx)(be,{target:n,startMove:i,onCancel:o,onStarted:()=>r(!1)},n.id),t[5]=o,t[6]=r,t[7]=i,t[8]=n,t[9]=u):u=t[9];let d;t[10]!==i.isPending||t[11]!==u?(d=(0,U.jsx)(s,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,hideCloseButton:i.isPending,children:u}),t[10]=i.isPending,t[11]=u,t[12]=d):d=t[12];let f;return t[13]!==c||t[14]!==l||t[15]!==d?(f=(0,U.jsx)(x,{open:c,onOpenChange:l,children:d}),t[13]=c,t[14]=l,t[15]=d,t[16]=f):f=t[16],f}function be(e){let t=(0,B.c)(48),{target:n,startMove:r,onCancel:i,onStarted:a}=e,o=d(),[s,c]=(0,Q.useState)(null),[l,u]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(!1),g=o.mutate,_=n.id,v,y;t[0]!==g||t[1]!==_?(v=()=>{g({targetHostId:_,serverUrl:null},{onSuccess:e=>{c(e),u(null),e.requiresServerUrl&&e.serverUrl!==null&&p(e.serverUrl)}})},y=[g,_],t[0]=g,t[1]=_,t[2]=v,t[3]=y):(v=t[2],y=t[3]),(0,Q.useEffect)(v,y);let x=s?.requiresServerUrl===!0||l!==null,S;t[4]!==f||t[5]!==o||t[6]!==s?.existingTargetServerData?.path||t[7]!==x||t[8]!==r||t[9]!==_?(S=()=>{let e=f.trim(),t=x&&e.length>0?e:null;r.reset(),o.mutate({targetHostId:_,serverUrl:t},{onSuccess:e=>{e.existingTargetServerData?.path!==s?.existingTargetServerData?.path&&h(!1),c(e),u(t)}})},t[4]=f,t[5]=o,t[6]=s?.existingTargetServerData?.path,t[7]=x,t[8]=r,t[9]=_,t[10]=S):S=t[10];let w=S,T;t[11]!==f||t[12]!==m||t[13]!==o.isPending||t[14]!==l||t[15]!==s||t[16]!==x||t[17]!==r.isPending?(T=b({result:s,checking:o.isPending,starting:r.isPending,showAddress:x,addressDraft:f,checkedServerUrl:l,archiveConfirmed:m}),t[11]=f,t[12]=m,t[13]=o.isPending,t[14]=l,t[15]=s,t[16]=x,t[17]=r.isPending,t[18]=T):T=t[18];let E=T,D;t[19]!==m||t[20]!==l||t[21]!==a||t[22]!==s||t[23]!==E||t[24]!==r||t[25]!==_?(D=()=>{s===null||!E||r.mutate({targetHostId:_,serverUrl:l,stopRunningWork:!0,archiveExistingTargetServerData:s.existingTargetServerData!==null&&m},{onSuccess:a,onError:e=>{let t=N(e);t!==null&&c({...s,items:t,canMove:!1})}})},t[19]=m,t[20]=l,t[21]=a,t[22]=s,t[23]=E,t[24]=r,t[25]=_,t[26]=D):D=t[26];let O=D,k;t[27]!==o.error||t[28]!==o.isError||t[29]!==n.name?(k=o.isError?C({error:o.error,fallbackMessage:`Couldn't check ${n.name}.`}):null,t[27]=o.error,t[28]=o.isError,t[29]=n.name,t[30]=k):k=t[30];let A;t[31]!==r.error||t[32]!==r.isError?(A=r.isError?C({error:r.error,fallbackMessage:`Couldn't start the move.`}):null,t[31]=r.error,t[32]=r.isError,t[33]=A):A=t[33];let j;return t[34]!==f||t[35]!==m||t[36]!==w||t[37]!==o.isPending||t[38]!==i||t[39]!==s||t[40]!==x||t[41]!==O||t[42]!==E||t[43]!==r.isPending||t[44]!==k||t[45]!==A||t[46]!==n.name?(j=(0,U.jsx)($,{targetName:n.name,result:s,checking:o.isPending,checkError:k,showAddress:x,addressDraft:f,archiveConfirmed:m,startAllowed:E,starting:r.isPending,startError:A,onAddressDraftChange:p,onCheck:w,onArchiveConfirmedChange:h,onStart:O,onCancel:i}),t[34]=f,t[35]=m,t[36]=w,t[37]=o.isPending,t[38]=i,t[39]=s,t[40]=x,t[41]=O,t[42]=E,t[43]=r.isPending,t[44]=k,t[45]=A,t[46]=n.name,t[47]=j):j=t[47],j}function $(e){let t=(0,B.c)(53),{targetName:n,result:r,checking:i,checkError:a,showAddress:o,addressDraft:s,archiveConfirmed:c,startAllowed:d,starting:p,startError:m,onAddressDraftChange:h,onCheck:g,onArchiveConfirmedChange:_,onStart:v,onCancel:y}=e,b;t[0]===r?.items?b=t[1]:(b=r?.items.some(xe)??!1,t[0]=r?.items,t[1]=b);let x=!i&&(a!==null||b)&&!o,C;t[2]===n?C=t[3]:(C=(0,U.jsxs)(f,{children:[(0,U.jsxs)(u,{children:[`Move the server to `,n]}),(0,U.jsxs)(M,{children:[`Your threads, settings and plugin data move to `,n,`. Every machine and app switches over when it's done, and the current server machine keeps running as a regular machine.`]})]}),t[2]=n,t[3]=C);let w;t[4]!==a||t[5]!==r||t[6]!==n?(w=r===null&&a===null?(0,U.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:[(0,U.jsx)(l,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,U.jsxs)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:[`Checking `,n,`…`]})]}):null,t[4]=a,t[5]=r,t[6]=n,t[7]=w):w=t[7];let T;t[8]!==s||t[9]!==i||t[10]!==h||t[11]!==g||t[12]!==o||t[13]!==p||t[14]!==n?(T=o?(0,U.jsx)(Se,{targetName:n,value:s,checking:i,disabled:p,onChange:h,onCheck:g}):null,t[8]=s,t[9]=i,t[10]=h,t[11]=g,t[12]=o,t[13]=p,t[14]=n,t[15]=T):T=t[15];let E;t[16]===a?E=t[17]:(E=a===null?null:(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive-text`,children:a}),t[16]=a,t[17]=E);let D;t[18]!==i||t[19]!==r?(D=r===null?null:(0,U.jsx)(Ce,{items:r.items,dimmed:i}),t[18]=i,t[19]=r,t[20]=D):D=t[20];let O;t[21]!==c||t[22]!==_||t[23]!==r||t[24]!==p?(O=r?.existingTargetServerData?(0,U.jsx)(we,{path:r.existingTargetServerData.path,sizeBytes:r.existingTargetServerData.sizeBytes,checked:c,disabled:p,onCheckedChange:_}):null,t[21]=c,t[22]=_,t[23]=r,t[24]=p,t[25]=O):O=t[25];let A;t[26]===m?A=t[27]:(A=m===null?null:(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive-text`,children:m}),t[26]=m,t[27]=A);let j;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,U.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`Moving stops every running turn and pauses scheduled automations.`}),t[28]=j):j=t[28];let N;t[29]!==y||t[30]!==p?(N=(0,U.jsx)(k,{type:`button`,variant:`outline`,disabled:p,onClick:y,children:`Cancel`}),t[29]=y,t[30]=p,t[31]=N):N=t[31];let P;t[32]!==g||t[33]!==x||t[34]!==p?(P=x?(0,U.jsx)(k,{type:`button`,variant:`outline`,disabled:p,onClick:g,children:`Check again`}):null,t[32]=g,t[33]=x,t[34]=p,t[35]=P):P=t[35];let F=!d,I=p?`Starting…`:`Stop all and move`,L;t[36]!==v||t[37]!==F||t[38]!==I?(L=(0,U.jsx)(k,{type:`button`,disabled:F,onClick:v,children:I}),t[36]=v,t[37]=F,t[38]=I,t[39]=L):L=t[39];let R;t[40]!==N||t[41]!==P||t[42]!==L?(R=(0,U.jsxs)(S,{children:[N,P,L]}),t[40]=N,t[41]=P,t[42]=L,t[43]=R):R=t[43];let z;return t[44]!==R||t[45]!==C||t[46]!==w||t[47]!==T||t[48]!==E||t[49]!==D||t[50]!==O||t[51]!==A?(z=(0,U.jsxs)(U.Fragment,{children:[C,w,T,E,D,O,A,j,R]}),t[44]=R,t[45]=C,t[46]=w,t[47]=T,t[48]=E,t[49]=D,t[50]=O,t[51]=A,t[52]=z):z=t[52],z}function xe(e){return e.severity===`blocker`}function Se(e){let t=(0,B.c)(32),{targetName:n,value:r,checking:i,disabled:a,onChange:o,onCheck:s}=e,c=(0,Q.useId)(),l=(0,Q.useId)(),u;t[0]!==i||t[1]!==a||t[2]!==r?(u=!i&&!a&&r.trim().length>0,t[0]=i,t[1]=a,t[2]=r,t[3]=u):u=t[3];let d=u,f;t[4]===c?f=t[5]:(f=(0,U.jsx)(`label`,{htmlFor:c,className:`block text-sm font-medium text-foreground`,children:`New server address`}),t[4]=c,t[5]=f);let p;t[6]!==l||t[7]!==n?(p=(0,U.jsxs)(`p`,{id:l,className:`text-xs text-subtle-foreground`,children:[`Machines and apps use this address to reach the server on `,n,` `,`after the move.`]}),t[6]=l,t[7]=n,t[8]=p):p=t[8];let m;t[9]===o?m=t[10]:(m=e=>o(e.target.value),t[9]=o,t[10]=m);let h;t[11]!==d||t[12]!==s?(h=e=>{e.key===`Enter`&&(e.preventDefault(),d&&s())},t[11]=d,t[12]=s,t[13]=h):h=t[13];let g;t[14]!==a||t[15]!==l||t[16]!==c||t[17]!==m||t[18]!==h||t[19]!==r?(g=(0,U.jsx)(O,{id:c,"aria-describedby":l,className:`min-w-0 flex-1`,value:r,placeholder:`https://Moonlet.example.com`,inputMode:`url`,autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,disabled:a,onChange:m,onKeyDown:h}),t[14]=a,t[15]=l,t[16]=c,t[17]=m,t[18]=h,t[19]=r,t[20]=g):g=t[20];let _=!d,v=i?`Checking…`:`Check address`,y;t[21]!==s||t[22]!==_||t[23]!==v?(y=(0,U.jsx)(k,{type:`button`,variant:`outline`,disabled:_,onClick:s,children:v}),t[21]=s,t[22]=_,t[23]=v,t[24]=y):y=t[24];let b;t[25]!==g||t[26]!==y?(b=(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[g,y]}),t[25]=g,t[26]=y,t[27]=b):b=t[27];let x;return t[28]!==b||t[29]!==f||t[30]!==p?(x=(0,U.jsxs)(`div`,{className:`space-y-2`,children:[f,p,b]}),t[28]=b,t[29]=f,t[30]=p,t[31]=x):x=t[31],x}function Ce(e){let t=(0,B.c)(11),{items:n,dimmed:r}=e,i,a,o;if(t[0]!==r||t[1]!==n){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e=T(n);if(n.length===0){let e;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing needs attention before the move.`}),t[5]=e):e=t[5],o=e;break bb0}let s=r&&`opacity-60`;t[6]===s?i=t[7]:(i=p(`space-y-3 transition-opacity`,s),t[6]=s,t[7]=i),a=j.map(t=>{let n=e[t];if(n.length===0)return null;let r=ve[t];return(0,U.jsxs)(`section`,{"aria-label":r.heading,className:`space-y-1.5`,children:[(0,U.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:r.heading}),(0,U.jsx)(`ul`,{className:`space-y-2`,children:n.map(e=>(0,U.jsxs)(`li`,{"data-severity":t,className:`flex items-start gap-2.5`,children:[(0,U.jsx)(l,{name:r.icon,"aria-hidden":!0,className:p(`mt-0.5 size-4 shrink-0`,r.iconClassName)}),(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`p`,{className:`text-sm break-words text-foreground`,children:e.title}),e.detail===null?null:(0,U.jsx)(`p`,{className:`text-xs break-words text-subtle-foreground`,children:e.detail})]})]},e.id))})]},t)})}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o}else i=t[2],a=t[3],o=t[4];if(o!==Symbol.for(`react.early_return_sentinel`))return o;let s;return t[8]!==i||t[9]!==a?(s=(0,U.jsx)(`div`,{className:i,children:a}),t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function we(e){let t=(0,B.c)(18),{path:n,sizeBytes:r,checked:i,disabled:a,onCheckedChange:o}=e,s;t[0]===o?s=t[1]:(s=e=>o(e===!0),t[0]=o,t[1]=s);let c;t[2]!==i||t[3]!==a||t[4]!==s?(c=(0,U.jsx)(I,{className:`mt-0.5`,checked:i,disabled:a,onCheckedChange:s}),t[2]=i,t[3]=a,t[4]=s,t[5]=c):c=t[5];let l;t[6]===n?l=t[7]:(l=(0,U.jsxs)(`span`,{className:`block text-sm break-words text-foreground`,children:[`Archive the existing Moonlet data at `,n]}),t[6]=n,t[7]=l);let u;t[8]===r?u=t[9]:(u=w(r),t[8]=r,t[9]=u);let d;t[10]===u?d=t[11]:(d=(0,U.jsxs)(`span`,{className:`block text-xs text-subtle-foreground`,children:[u,`. Moonlet renames it to a backup folder next to it and never merges it.`]}),t[10]=u,t[11]=d);let f;t[12]!==l||t[13]!==d?(f=(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[l,d]}),t[12]=l,t[13]=d,t[14]=f):f=t[14];let p;return t[15]!==c||t[16]!==f?(p=(0,U.jsxs)(`label`,{className:`flex items-start gap-2.5 rounded-md border border-border px-3 py-2.5`,children:[c,f]}),t[15]=c,t[16]=f,t[17]=p):p=t[17],p}var Te=100;function Ee(e){let t=(0,B.c)(9),{target:n,pending:r,errorMessage:i,onOpenChange:a,onRename:o}=e,s=n!==null,c;t[0]!==i||t[1]!==o||t[2]!==r||t[3]!==n?(c=e=>n?(0,U.jsx)(De,{target:n,pending:r,errorMessage:i,onRename:o,inputRef:e},n.id):null,t[0]=i,t[1]=o,t[2]=r,t[3]=n,t[4]=c):c=t[4];let l;return t[5]!==a||t[6]!==s||t[7]!==c?(l=(0,U.jsx)(g,{open:s,onOpenChange:a,children:c}),t[5]=a,t[6]=s,t[7]=c,t[8]=l):l=t[8],l}function De(e){let t=(0,B.c)(30),{target:n,pending:r,errorMessage:i,onRename:a,inputRef:o}=e,[s,c]=(0,Q.useState)(n.name),l;t[0]!==s||t[1]!==a||t[2]!==r||t[3]!==n?(l=e=>{if(e.preventDefault(),r)return;let t=s.trim();t.length!==0&&a(n,t)},t[0]=s,t[1]=a,t[2]=r,t[3]=n,t[4]=l):l=t[4];let d=l,p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,U.jsx)(u,{children:`Rename machine`}),t[5]=p):p=t[5];let m;t[6]===n.name?m=t[7]:(m=(0,U.jsxs)(f,{children:[p,(0,U.jsxs)(M,{children:[`Choose a new name for `,n.name,`.`]})]}),t[6]=n.name,t[7]=m);let h;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>c(e.target.value),t[8]=h):h=t[8];let g;t[9]!==o||t[10]!==s||t[11]!==r?(g=(0,U.jsx)(O,{ref:o,"aria-label":`Machine name`,value:s,maxLength:Te,autoCorrect:`off`,spellCheck:!1,disabled:r,onChange:h}),t[9]=o,t[10]=s,t[11]=r,t[12]=g):g=t[12];let _;t[13]===i?_=t[14]:(_=i===null?null:(0,U.jsx)(`p`,{className:`text-sm text-destructive`,children:i}),t[13]=i,t[14]=_);let v;t[15]!==g||t[16]!==_?(v=(0,U.jsxs)(`div`,{className:`space-y-2`,children:[g,_]}),t[15]=g,t[16]=_,t[17]=v):v=t[17];let y;t[18]!==s||t[19]!==r?(y=r||s.trim().length===0,t[18]=s,t[19]=r,t[20]=y):y=t[20];let b;t[21]===y?b=t[22]:(b=(0,U.jsx)(S,{children:(0,U.jsx)(k,{type:`submit`,disabled:y,children:`Rename machine`})}),t[21]=y,t[22]=b);let x;t[23]!==d||t[24]!==v||t[25]!==b?(x=(0,U.jsxs)(`form`,{className:`space-y-4`,onSubmit:d,children:[v,b]}),t[23]=d,t[24]=v,t[25]=b,t[26]=x):x=t[26];let C;return t[27]!==x||t[28]!==m?(C=(0,U.jsxs)(U.Fragment,{children:[m,x]}),t[27]=x,t[28]=m,t[29]=C):C=t[29],C}export{me as a,Y as c,te as d,he as i,se as l,ye as n,pe as o,ge as r,X as s,Ee as t,oe as u};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Qr as t,hi as n,kr as r,ni as i,qr as a,ri as o}from"./boot-vendor-CKEhulXz.js";import{Co as s,Ct as c,Dh as l,Do as u,E as d,Eo as f,Fh as p,Gd as m,Jr as h,Kr as g,Na as _,O as v,Qi as y,S as b,So as x,To as S,Zo as C,__ as w,b as T,dc as E,ea as D,ia as O,jh as k,nc as A,v as j,wo as M,x as N}from"./index-DCps_qBD.js";import{o as P}from"./dist-DCULoGTS.js";import{n as F}from"./AddMachineDialog-CG2ZZhp-.js";import{t as I}from"./checkbox-Dxs9oAMl.js";import{t as L}from"./update-state-CuYJKY13.js";import{n as R,t as z}from"./host-mutations-Fl0RjER0.js";var B=r(),V=()=>[`machine-inventory`];function H({queryClient:e}){return e.invalidateQueries({queryKey:V()})}var U=e(o(),1),ee=[{role:`workloads`,title:`Workloads`,description:`Default place for new work.`},{role:`request`,title:`On request`,description:`Only work you ask for, in a folder listed under Access.`},{role:`none`,title:`None`,description:`Your moonlet starts nothing here.`}];function te(e){let n=(0,B.c)(32),{hostId:r}=e,o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={includeCreating:!0},n[0]=o):o=n[0];let s=y(o),c=i(),l;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(l={queryKey:V(),queryFn:re,refetchInterval:5e3},n[1]=l):l=n[1];let u=t(l),d;n[2]===c?d=n[3]:(d={mutationFn:ne,onSuccess:async()=>{await H({queryClient:c})}},n[2]=c,n[3]=d);let f=a(d);if(u.isError){let e;return n[4]===u.error.message?e=n[5]:(e=(0,U.jsxs)(`p`,{role:`alert`,children:[`Could not load machine roles: `,u.error.message]}),n[4]=u.error.message,n[5]=e),e}if(!u.data){let e;return n[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(`p`,{children:`Loading roles…`}),n[6]=e):e=n[6],e}let p;if(n[7]!==r||n[8]!==s||n[9]!==u.data.roles||n[10]!==f){let e;n[12]===r?e=n[13]:(e=e=>r===void 0||e.hostId===r,n[12]=r,n[13]=e);let t;n[14]!==s||n[15]!==f?(t=e=>(0,U.jsxs)(`fieldset`,{className:`space-y-2`,children:[(0,U.jsx)(`legend`,{className:`text-sm font-medium`,children:s.data?.find(t=>t.id===e.hostId)?.name??e.hostId}),ee.map(t=>(0,U.jsxs)(`label`,{className:`flex items-start gap-3 rounded-md border border-border p-3 text-sm`,children:[(0,U.jsx)(`input`,{type:`radio`,name:`role-${e.hostId}`,checked:e.role===t.role,disabled:f.isPending||e.isServer&&t.role!==`none`||t.role===`workloads`&&!e.supportsWorkloads,onChange:()=>f.mutate({hostId:e.hostId,role:t.role})}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`span`,{className:`block font-medium`,children:t.title}),(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t.description})]})]},t.role)),!e.isServer&&!e.supportsWorkloads?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Workloads needs a machine already prepared for isolated work.`}):null,e.isServer?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This machine runs the server, so it can only be None. Your moonlet and the server never share a machine.`}):null]},e.hostId),n[14]=s,n[15]=f,n[16]=t):t=n[16],p=u.data.roles.filter(e).map(t),n[7]=r,n[8]=s,n[9]=u.data.roles,n[10]=f,n[11]=p}else p=n[11];let m;n[17]!==f.error||n[18]!==f.isError?(m=f.isError?(0,U.jsx)(`p`,{role:`alert`,children:f.error.message}):null,n[17]=f.error,n[18]=f.isError,n[19]=m):m=n[19];let h;if(n[20]!==r||n[21]!==s||n[22]!==u.data.records){let e;n[24]===r?e=n[25]:(e=e=>r===void 0||e.hostId===r,n[24]=r,n[25]=e);let t;n[26]===s?t=n[27]:(t=e=>(0,U.jsx)(ie,{record:e,machineName:e=>s.data?.find(t=>t.id===e)?.name??e},`${e.kind}:${e.name}`),n[26]=s,n[27]=t),h=u.data.records.filter(e).map(t),n[20]=r,n[21]=s,n[22]=u.data.records,n[23]=h}else h=n[23];let g;return n[28]!==p||n[29]!==m||n[30]!==h?(g=(0,U.jsx)(P,{title:`Role`,description:`What your moonlet may start on each machine.`,children:(0,U.jsxs)(`div`,{className:`space-y-6 p-4`,children:[p,m,h]})}),n[28]=p,n[29]=m,n[30]=h,n[31]=g):g=n[31],g}function ne(e){let{hostId:t,role:n}=e;return m.hosts.experimental_setRole({hostId:t,role:n})}function re(){return m.hosts.experimental_inventory()}function ie(e){let t=(0,B.c)(13),{record:n,machineName:r}=e,i;if(t[0]!==r||t[1]!==n.hostId||t[2]!==n.managedFrom||t[3]!==n.name||t[4]!==n.record){let e=[{title:`Connection`,fields:[[`gate`,`Gate`],[`tunnel`,`Tunnel`]]},{title:`Hardware and accounts`,fields:[[`os`,`System`],[`driver`,`Virtual machine`],[`admin_user`,`Administrator`],[`desktop_user`,`Desktop user`],[`cpus`,`CPU cores`],[`memory_gb`,`Memory (GB)`],[`disk_gb`,`Disk (GB)`],[`hypervisor`,`Host`],[`server`,`Host record`],[`region`,`Region`],[`profile`,`Cloud profile`],[`instance_type`,`Instance type`]]},{title:`Installed`,fields:Object.entries(n.record).filter(q).sort(K).map(W)},{title:`Other saved settings`,fields:[[`orbit_thread`,`Conversation machine`],[`mail`,`Mail`],[`events`,`Event rules`]]}],a=ae,o;t[6]===n.name?o=t[7]:(o=(0,U.jsx)(`h3`,{className:`text-sm font-medium`,children:n.name}),t[6]=n.name,t[7]=o);let s;t[8]===n.hostId?s=t[9]:(s=n.hostId===null?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Offline or not enrolled. Its saved settings stay here.`}):null,t[8]=n.hostId,t[9]=s);let c;t[10]!==r||t[11]!==n.managedFrom?(c=n.managedFrom?(0,U.jsxs)(`div`,{className:`text-sm`,children:[(0,U.jsx)(`h4`,{className:`font-medium`,children:`Managed from`}),(0,U.jsx)(`p`,{children:r(n.managedFrom)})]}):null,t[10]=r,t[11]=n.managedFrom,t[12]=c):c=t[12],i=(0,U.jsxs)(`section`,{className:`space-y-4 border-t border-border pt-4`,children:[o,s,c,e.map(e=>{let t=e.fields.filter(e=>{let[t]=e;return n.record[t]!==void 0});return t.length>0?(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`text-sm font-medium`,children:e.title}),(0,U.jsx)(`dl`,{className:`divide-y divide-border text-sm`,children:t.map(e=>{let[t,r]=e;return(0,U.jsxs)(`div`,{className:`flex flex-wrap justify-between gap-2 py-2`,children:[(0,U.jsx)(`dt`,{children:r}),(0,U.jsx)(`dd`,{className:`break-all text-xs`,children:a(n.record[t])})]},t)})})]},e.title):null})]}),t[0]=r,t[1]=n.hostId,t[2]=n.managedFrom,t[3]=n.name,t[4]=n.record,t[5]=i}else i=t[5];return i}function ae(e){return typeof e==`boolean`?e?`On`:`Off`:typeof e==`string`?e===`macos`?`macOS`:e===`linux`?`Linux`:e:JSON.stringify(e)}function W(e){let[t]=e;return[t,t===`vms`?`Virtual machines`:t.replace(/_/g,` `).replace(/^./,G)]}function G(e){return e.toUpperCase()}function K(e,t){let[n]=e,[r]=t;return n.localeCompare(r)}function q(e){let[t,n]=e;return typeof n==`boolean`&&![`orbit_thread`,`mail`].includes(t)}function J(e){return e.phase===`removing`&&e.teardown?.status===`failed`?`Cleanup failed`:e.phase===`suspending`?`Pausing`:e.phase===`suspended`?`Paused`:e.phase===`resuming`?`Resuming`:e.phase===`removing`?`Removing`:null}function oe(e){return J(e.lifecycle)===`Cleanup failed`?`failed`:e.lifecycle.phase===`removing`||e.lifecycle.phase===`suspending`||e.lifecycle.phase===`resuming`||e.status===`connected`&&e.delivery?.state===`stalled`?`attention`:e.status===`connected`?`online`:`offline`}function se({host:e,now:t}){let n=[],r=J(e.lifecycle);return n.push(r??(e.status===`connected`?e.delivery?.state===`stalled`?`Delivery stalled`:`Online`:`Offline`)),e.lifecycle.message===null?e.status!==`connected`&&e.lastSeenAt!==null&&n.push(`last seen ${_({timestamp:e.lastSeenAt,now:t})}`):n.push(e.lifecycle.message),n.join(` · `)}function ce(e){return e.status!==`connected`&&e.lifecycle.phase===`active`}function le(e){return e.status!==`connected`&&e.lifecycle.phase===`removing`&&e.lifecycle.teardown?.status===`failed`}var ue=5;function Y(e){return e?`The server machine can't be removed. Move the server to another machine first.`:`The server machine can't be removed.`}function X(e){return e.type===`ephemeral`?`The compute and its saved snapshots are deleted. Its environments remain as read-only history.`:e.machineProviderId===null?`Project checkouts stay on its disk, but its environments become read-only history and it cannot run new work until paired again.`:`The provider cleans up resources it owns. Its environments remain as read-only history.`}function de(e){let t=(0,B.c)(14),{hostId:n}=e,r;t[0]===n?r=t[1]:(r={hostId:n,limit:ue},t[0]=n,t[1]=r);let i=E(r);if(i.data===void 0||i.data.total===0)return null;let{threads:a,total:o}=i.data,s=o-a.length,c=o===1?`1 unarchived thread on this machine:`:`${o} unarchived threads on this machine:`,l;t[2]===c?l=t[3]:(l=(0,U.jsx)(`p`,{children:c}),t[2]=c,t[3]=l);let u;t[4]===a?u=t[5]:(u=a.map(fe),t[4]=a,t[5]=u);let d;t[6]===u?d=t[7]:(d=(0,U.jsx)(`ul`,{className:`list-disc space-y-0.5 pl-5 text-foreground marker:text-subtle-foreground`,children:u}),t[6]=u,t[7]=d);let f;t[8]===s?f=t[9]:(f=s>0?(0,U.jsxs)(`p`,{children:[`and `,s,` more`]}):null,t[8]=s,t[9]=f);let p;return t[10]!==l||t[11]!==d||t[12]!==f?(p=(0,U.jsxs)(`div`,{className:`space-y-1 text-sm text-muted-foreground`,children:[l,d,f]}),t[10]=l,t[11]=d,t[12]=f,t[13]=p):p=t[13],p}function fe(e){return(0,U.jsx)(`li`,{children:(0,U.jsx)(`span`,{className:`block truncate`,children:A(e)})},e.id)}function pe(e){let t=(0,B.c)(15),{target:n,onOpenChange:r,onRemoved:i}=e,a=R(),o;t[0]===n?o=t[1]:(o=n!==null&&le(n),t[0]=n,t[1]=o);let s=o,c=n!==null,l;t[2]!==r||t[3]!==a?(l=e=>{!e&&!a.isPending&&(a.reset(),r(!1))},t[2]=r,t[3]=a,t[4]=l):l=t[4];let d;t[5]!==s||t[6]!==r||t[7]!==i||t[8]!==a||t[9]!==n?(d=n===null?null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(f,{children:[(0,U.jsxs)(u,{children:[`Remove `,n.name,`?`]}),(0,U.jsx)(M,{children:s?(0,U.jsxs)(U.Fragment,{children:[`Cleanup failed and `,n.name,` is not connected. Removing it now skips environment cleanup on the machine: files and worktrees left on its disk are not deleted, and its environments become read-only history. The machine provider's removal still runs. Use this only if the machine is gone or will not come back.`]}):(0,U.jsxs)(U.Fragment,{children:[`This revokes `,n.name,`'s access to this server.`,` `,X(n)]})})]}),(0,U.jsx)(de,{hostId:n.id}),a.isError?(0,U.jsx)(`p`,{className:`text-sm text-destructive`,role:`alert`,children:C({error:a.error,fallbackMessage:`Couldn't remove ${n.name}.`})}):null,(0,U.jsx)(S,{children:(0,U.jsx)(k,{type:`button`,variant:`destructive`,disabled:a.isPending,onClick:()=>a.mutate({hostId:n.id,force:s},{onSuccess:()=>{r(!1),i?.(n)}}),children:s?`Remove anyway`:`Remove machine`})})]}),t[5]=s,t[6]=r,t[7]=i,t[8]=a,t[9]=n,t[10]=d):d=t[10];let p;return t[11]!==c||t[12]!==l||t[13]!==d?(p=(0,U.jsx)(h,{open:c,onOpenChange:l,children:d}),t[11]=c,t[12]=l,t[13]=d,t[14]=p):p=t[14],p}function Z(e,t){return t?.supportsSuspend&&e.lifecycle.phase===`active`?{icon:`Pause`,label:`Suspend`,kind:`suspend`}:t?.supportsSuspend&&e.lifecycle.phase===`suspended`?{icon:`Play`,label:`Resume`,kind:`resume`}:e.lifecycle.phase===`removing`&&e.lifecycle.teardown?.status===`failed`?{icon:`RotateCcw`,label:`Retry cleanup`,kind:`retry-cleanup`}:null}function me(e){let t=(0,B.c)(10),{host:n,machineProvider:r,pending:i,onSuspend:a,onResume:o,onRetryCleanup:s}=e,c;t[0]!==n||t[1]!==r?(c=Z(n,r),t[0]=n,t[1]=r,t[2]=c):c=t[2];let u=c;if(u===null)return null;let d=u.kind===`suspend`?a:u.kind===`resume`?o:s,f;t[3]===u.icon?f=t[4]:(f=(0,U.jsx)(l,{name:u.icon,className:`size-3.5`,"aria-hidden":!0}),t[3]=u.icon,t[4]=f);let p;return t[5]!==u.label||t[6]!==d||t[7]!==i||t[8]!==f?(p=(0,U.jsxs)(k,{type:`button`,variant:`outline`,size:`sm`,disabled:i,onClick:d,children:[f,u.label]}),t[5]=u.label,t[6]=d,t[7]=i,t[8]=f,t[9]=p):p=t[9],p}function he(e){let t=[{id:`rename`,label:`Rename`,icon:`Edit`,onSelect:e.onRename}];ce(e.host)&&t.push({id:`reconnect`,label:`Reconnect`,icon:`RotateCcw`,onSelect:e.onReconnect});let n=e.onRetryUpdate;n!==void 0&&c(e.host)&&t.push({id:`retry-update`,label:e.retryUpdatePending??!1?`Retrying update…`:`Retry update`,icon:L,disabled:e.retryUpdatePending??!1,onSelect:n});let r=Z(e.host,e.machineProvider),i=r===null?void 0:r.kind===`suspend`?e.onSuspend:r.kind===`resume`?e.onResume:e.onRetryCleanup;r!==null&&i!==void 0&&t.push({id:`lifecycle`,label:r.label,icon:r.icon,disabled:e.lifecycleActionPending??!1,onSelect:i}),e.canMoveServerHere&&t.push({id:`move-server`,label:`Move server here`,icon:`MoveTo`,onSelect:e.onMoveServerHere});let a=e.onRemove;return a!==void 0&&t.push({id:`remove`,label:`Remove machine`,icon:`Trash2`,tone:`destructive`,...e.isPrimary?{disabled:!0,disabledReason:Y(e.serverMoveEnabled??!1)}:{},onSelect:a}),t}var Q=e(n(),1);function ge(e){let t=(0,B.c)(35),{target:n,onOpenChange:r}=e,i=z(),a=n?.id??null,{mutate:o,reset:c}=i,d,p;t[0]!==a||t[1]!==o||t[2]!==c?(d=()=>{if(a===null){c();return}o(a)},p=[a,o,c],t[0]=a,t[1]=o,t[2]=c,t[3]=d,t[4]=p):(d=t[3],p=t[4]),(0,Q.useEffect)(d,p);let m=i.data??null,h=n!==null&&n.status===`connected`,g;t[5]!==i.error||t[6]!==i.isError?(g=i.isError?C({error:i.error,fallbackMessage:`Couldn't prepare a reconnect command.`}):null,t[5]=i.error,t[6]=i.isError,t[7]=g):g=t[7];let _=g,v=n!==null,y;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,U.jsx)(u,{children:`Reconnect machine`}),t[8]=y):y=t[8];let b=_===null?void 0:`text-destructive-text`,S=_??`Run this command on ${n?.name??`the machine`} to bring it back online. It keeps the machine's projects, environments and history.`,w;t[9]!==b||t[10]!==S?(w=(0,U.jsxs)(f,{children:[y,(0,U.jsx)(M,{className:b,children:S})]}),t[9]=b,t[10]=S,t[11]=w):w=t[11];let T;t[12]!==_||t[13]!==a||t[14]!==o?(T=_===null?null:(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsx)(k,{variant:`outline`,size:`sm`,onClick:()=>{a!==null&&o(a)},children:`Try again`})}),t[12]=_,t[13]=a,t[14]=o,t[15]=T):T=t[15];let E;t[16]!==a||t[17]!==o||t[18]!==m?(E=m===null?null:(0,U.jsx)(F,{command:m.command,windowsCommand:m.windowsCommand,expiresAt:m.expiresAt,onRegenerate:()=>{a!==null&&o(a)}},m.command),t[16]=a,t[17]=o,t[18]=m,t[19]=E):E=t[19];let O;t[20]!==_||t[21]!==r||t[22]!==m||t[23]!==h||t[24]!==n?.name?(O=_===null?(0,U.jsx)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:h?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(D,{connected:!0}),(0,U.jsxs)(`span`,{role:`status`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:[n?.name,` reconnected`]}),(0,U.jsx)(k,{size:`sm`,variant:`ghost`,className:`h-7 shrink-0 px-2 text-xs`,onClick:()=>r(!1),children:`Done`})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(l,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,U.jsx)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:m===null?`Preparing a reconnect command…`:`Waiting for the machine to reconnect…`})]})}):null,t[20]=_,t[21]=r,t[22]=m,t[23]=h,t[24]=n?.name,t[25]=O):O=t[25];let A;t[26]!==E||t[27]!==O||t[28]!==w||t[29]!==T?(A=(0,U.jsxs)(s,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,onInteractOutside:_e,children:[w,T,E,O]}),t[26]=E,t[27]=O,t[28]=w,t[29]=T,t[30]=A):A=t[30];let j;return t[31]!==r||t[32]!==A||t[33]!==v?(j=(0,U.jsx)(x,{open:v,onOpenChange:r,children:A}),t[31]=r,t[32]=A,t[33]=v,t[34]=j):j=t[34],j}function _e(e){return e.preventDefault()}var ve={blocker:{heading:`Fix before moving`,icon:`AlertCircle`,iconClassName:`text-destructive-text`},warning:{heading:`Before you move`,icon:`AlertTriangle`,iconClassName:`text-warning-text`},info:{heading:`Good to know`,icon:`Info`,iconClassName:`text-muted-foreground`}};function ye(e){let t=(0,B.c)(17),{target:n,onOpenChange:r}=e,i=v(),a;t[0]!==r||t[1]!==i?(a=()=>{i.isPending||(i.reset(),r(!1))},t[0]=r,t[1]=i,t[2]=a):a=t[2];let o=a,c=n!==null,l;t[3]===o?l=t[4]:(l=e=>{e||o()},t[3]=o,t[4]=l);let u;t[5]!==o||t[6]!==r||t[7]!==i||t[8]!==n?(u=n===null?null:(0,U.jsx)(be,{target:n,startMove:i,onCancel:o,onStarted:()=>r(!1)},n.id),t[5]=o,t[6]=r,t[7]=i,t[8]=n,t[9]=u):u=t[9];let d;t[10]!==i.isPending||t[11]!==u?(d=(0,U.jsx)(s,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,hideCloseButton:i.isPending,children:u}),t[10]=i.isPending,t[11]=u,t[12]=d):d=t[12];let f;return t[13]!==c||t[14]!==l||t[15]!==d?(f=(0,U.jsx)(x,{open:c,onOpenChange:l,children:d}),t[13]=c,t[14]=l,t[15]=d,t[16]=f):f=t[16],f}function be(e){let t=(0,B.c)(48),{target:n,startMove:r,onCancel:i,onStarted:a}=e,o=d(),[s,c]=(0,Q.useState)(null),[l,u]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(!1),g=o.mutate,_=n.id,v,y;t[0]!==g||t[1]!==_?(v=()=>{g({targetHostId:_,serverUrl:null},{onSuccess:e=>{c(e),u(null),e.requiresServerUrl&&e.serverUrl!==null&&p(e.serverUrl)}})},y=[g,_],t[0]=g,t[1]=_,t[2]=v,t[3]=y):(v=t[2],y=t[3]),(0,Q.useEffect)(v,y);let x=s?.requiresServerUrl===!0||l!==null,S;t[4]!==f||t[5]!==o||t[6]!==s?.existingTargetServerData?.path||t[7]!==x||t[8]!==r||t[9]!==_?(S=()=>{let e=f.trim(),t=x&&e.length>0?e:null;r.reset(),o.mutate({targetHostId:_,serverUrl:t},{onSuccess:e=>{e.existingTargetServerData?.path!==s?.existingTargetServerData?.path&&h(!1),c(e),u(t)}})},t[4]=f,t[5]=o,t[6]=s?.existingTargetServerData?.path,t[7]=x,t[8]=r,t[9]=_,t[10]=S):S=t[10];let w=S,T;t[11]!==f||t[12]!==m||t[13]!==o.isPending||t[14]!==l||t[15]!==s||t[16]!==x||t[17]!==r.isPending?(T=b({result:s,checking:o.isPending,starting:r.isPending,showAddress:x,addressDraft:f,checkedServerUrl:l,archiveConfirmed:m}),t[11]=f,t[12]=m,t[13]=o.isPending,t[14]=l,t[15]=s,t[16]=x,t[17]=r.isPending,t[18]=T):T=t[18];let E=T,D;t[19]!==m||t[20]!==l||t[21]!==a||t[22]!==s||t[23]!==E||t[24]!==r||t[25]!==_?(D=()=>{s===null||!E||r.mutate({targetHostId:_,serverUrl:l,stopRunningWork:!0,archiveExistingTargetServerData:s.existingTargetServerData!==null&&m},{onSuccess:a,onError:e=>{let t=N(e);t!==null&&c({...s,items:t,canMove:!1})}})},t[19]=m,t[20]=l,t[21]=a,t[22]=s,t[23]=E,t[24]=r,t[25]=_,t[26]=D):D=t[26];let O=D,k;t[27]!==o.error||t[28]!==o.isError||t[29]!==n.name?(k=o.isError?C({error:o.error,fallbackMessage:`Couldn't check ${n.name}.`}):null,t[27]=o.error,t[28]=o.isError,t[29]=n.name,t[30]=k):k=t[30];let A;t[31]!==r.error||t[32]!==r.isError?(A=r.isError?C({error:r.error,fallbackMessage:`Couldn't start the move.`}):null,t[31]=r.error,t[32]=r.isError,t[33]=A):A=t[33];let j;return t[34]!==f||t[35]!==m||t[36]!==w||t[37]!==o.isPending||t[38]!==i||t[39]!==s||t[40]!==x||t[41]!==O||t[42]!==E||t[43]!==r.isPending||t[44]!==k||t[45]!==A||t[46]!==n.name?(j=(0,U.jsx)($,{targetName:n.name,result:s,checking:o.isPending,checkError:k,showAddress:x,addressDraft:f,archiveConfirmed:m,startAllowed:E,starting:r.isPending,startError:A,onAddressDraftChange:p,onCheck:w,onArchiveConfirmedChange:h,onStart:O,onCancel:i}),t[34]=f,t[35]=m,t[36]=w,t[37]=o.isPending,t[38]=i,t[39]=s,t[40]=x,t[41]=O,t[42]=E,t[43]=r.isPending,t[44]=k,t[45]=A,t[46]=n.name,t[47]=j):j=t[47],j}function $(e){let t=(0,B.c)(53),{targetName:n,result:r,checking:i,checkError:a,showAddress:o,addressDraft:s,archiveConfirmed:c,startAllowed:d,starting:p,startError:m,onAddressDraftChange:h,onCheck:g,onArchiveConfirmedChange:_,onStart:v,onCancel:y}=e,b;t[0]===r?.items?b=t[1]:(b=r?.items.some(xe)??!1,t[0]=r?.items,t[1]=b);let x=!i&&(a!==null||b)&&!o,C;t[2]===n?C=t[3]:(C=(0,U.jsxs)(f,{children:[(0,U.jsxs)(u,{children:[`Move the server to `,n]}),(0,U.jsxs)(M,{children:[`Your threads, settings and plugin data move to `,n,`. Every machine and app switches over when it's done, and the current server machine keeps running as a regular machine.`]})]}),t[2]=n,t[3]=C);let w;t[4]!==a||t[5]!==r||t[6]!==n?(w=r===null&&a===null?(0,U.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:[(0,U.jsx)(l,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,U.jsxs)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:[`Checking `,n,`…`]})]}):null,t[4]=a,t[5]=r,t[6]=n,t[7]=w):w=t[7];let T;t[8]!==s||t[9]!==i||t[10]!==h||t[11]!==g||t[12]!==o||t[13]!==p||t[14]!==n?(T=o?(0,U.jsx)(Se,{targetName:n,value:s,checking:i,disabled:p,onChange:h,onCheck:g}):null,t[8]=s,t[9]=i,t[10]=h,t[11]=g,t[12]=o,t[13]=p,t[14]=n,t[15]=T):T=t[15];let E;t[16]===a?E=t[17]:(E=a===null?null:(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive-text`,children:a}),t[16]=a,t[17]=E);let D;t[18]!==i||t[19]!==r?(D=r===null?null:(0,U.jsx)(Ce,{items:r.items,dimmed:i}),t[18]=i,t[19]=r,t[20]=D):D=t[20];let O;t[21]!==c||t[22]!==_||t[23]!==r||t[24]!==p?(O=r?.existingTargetServerData?(0,U.jsx)(we,{path:r.existingTargetServerData.path,sizeBytes:r.existingTargetServerData.sizeBytes,checked:c,disabled:p,onCheckedChange:_}):null,t[21]=c,t[22]=_,t[23]=r,t[24]=p,t[25]=O):O=t[25];let A;t[26]===m?A=t[27]:(A=m===null?null:(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive-text`,children:m}),t[26]=m,t[27]=A);let j;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,U.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`Moving stops every running turn and pauses scheduled automations.`}),t[28]=j):j=t[28];let N;t[29]!==y||t[30]!==p?(N=(0,U.jsx)(k,{type:`button`,variant:`outline`,disabled:p,onClick:y,children:`Cancel`}),t[29]=y,t[30]=p,t[31]=N):N=t[31];let P;t[32]!==g||t[33]!==x||t[34]!==p?(P=x?(0,U.jsx)(k,{type:`button`,variant:`outline`,disabled:p,onClick:g,children:`Check again`}):null,t[32]=g,t[33]=x,t[34]=p,t[35]=P):P=t[35];let F=!d,I=p?`Starting…`:`Stop all and move`,L;t[36]!==v||t[37]!==F||t[38]!==I?(L=(0,U.jsx)(k,{type:`button`,disabled:F,onClick:v,children:I}),t[36]=v,t[37]=F,t[38]=I,t[39]=L):L=t[39];let R;t[40]!==N||t[41]!==P||t[42]!==L?(R=(0,U.jsxs)(S,{children:[N,P,L]}),t[40]=N,t[41]=P,t[42]=L,t[43]=R):R=t[43];let z;return t[44]!==R||t[45]!==C||t[46]!==w||t[47]!==T||t[48]!==E||t[49]!==D||t[50]!==O||t[51]!==A?(z=(0,U.jsxs)(U.Fragment,{children:[C,w,T,E,D,O,A,j,R]}),t[44]=R,t[45]=C,t[46]=w,t[47]=T,t[48]=E,t[49]=D,t[50]=O,t[51]=A,t[52]=z):z=t[52],z}function xe(e){return e.severity===`blocker`}function Se(e){let t=(0,B.c)(32),{targetName:n,value:r,checking:i,disabled:a,onChange:o,onCheck:s}=e,c=(0,Q.useId)(),l=(0,Q.useId)(),u;t[0]!==i||t[1]!==a||t[2]!==r?(u=!i&&!a&&r.trim().length>0,t[0]=i,t[1]=a,t[2]=r,t[3]=u):u=t[3];let d=u,f;t[4]===c?f=t[5]:(f=(0,U.jsx)(`label`,{htmlFor:c,className:`block text-sm font-medium text-foreground`,children:`New server address`}),t[4]=c,t[5]=f);let p;t[6]!==l||t[7]!==n?(p=(0,U.jsxs)(`p`,{id:l,className:`text-xs text-subtle-foreground`,children:[`Machines and apps use this address to reach the server on `,n,` `,`after the move.`]}),t[6]=l,t[7]=n,t[8]=p):p=t[8];let m;t[9]===o?m=t[10]:(m=e=>o(e.target.value),t[9]=o,t[10]=m);let h;t[11]!==d||t[12]!==s?(h=e=>{e.key===`Enter`&&(e.preventDefault(),d&&s())},t[11]=d,t[12]=s,t[13]=h):h=t[13];let g;t[14]!==a||t[15]!==l||t[16]!==c||t[17]!==m||t[18]!==h||t[19]!==r?(g=(0,U.jsx)(O,{id:c,"aria-describedby":l,className:`min-w-0 flex-1`,value:r,placeholder:`https://Moonlet.example.com`,inputMode:`url`,autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,disabled:a,onChange:m,onKeyDown:h}),t[14]=a,t[15]=l,t[16]=c,t[17]=m,t[18]=h,t[19]=r,t[20]=g):g=t[20];let _=!d,v=i?`Checking…`:`Check address`,y;t[21]!==s||t[22]!==_||t[23]!==v?(y=(0,U.jsx)(k,{type:`button`,variant:`outline`,disabled:_,onClick:s,children:v}),t[21]=s,t[22]=_,t[23]=v,t[24]=y):y=t[24];let b;t[25]!==g||t[26]!==y?(b=(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[g,y]}),t[25]=g,t[26]=y,t[27]=b):b=t[27];let x;return t[28]!==b||t[29]!==f||t[30]!==p?(x=(0,U.jsxs)(`div`,{className:`space-y-2`,children:[f,p,b]}),t[28]=b,t[29]=f,t[30]=p,t[31]=x):x=t[31],x}function Ce(e){let t=(0,B.c)(11),{items:n,dimmed:r}=e,i,a,o;if(t[0]!==r||t[1]!==n){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e=T(n);if(n.length===0){let e;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing needs attention before the move.`}),t[5]=e):e=t[5],o=e;break bb0}let s=r&&`opacity-60`;t[6]===s?i=t[7]:(i=p(`space-y-3 transition-opacity`,s),t[6]=s,t[7]=i),a=j.map(t=>{let n=e[t];if(n.length===0)return null;let r=ve[t];return(0,U.jsxs)(`section`,{"aria-label":r.heading,className:`space-y-1.5`,children:[(0,U.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:r.heading}),(0,U.jsx)(`ul`,{className:`space-y-2`,children:n.map(e=>(0,U.jsxs)(`li`,{"data-severity":t,className:`flex items-start gap-2.5`,children:[(0,U.jsx)(l,{name:r.icon,"aria-hidden":!0,className:p(`mt-0.5 size-4 shrink-0`,r.iconClassName)}),(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`p`,{className:`text-sm break-words text-foreground`,children:e.title}),e.detail===null?null:(0,U.jsx)(`p`,{className:`text-xs break-words text-subtle-foreground`,children:e.detail})]})]},e.id))})]},t)})}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o}else i=t[2],a=t[3],o=t[4];if(o!==Symbol.for(`react.early_return_sentinel`))return o;let s;return t[8]!==i||t[9]!==a?(s=(0,U.jsx)(`div`,{className:i,children:a}),t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function we(e){let t=(0,B.c)(18),{path:n,sizeBytes:r,checked:i,disabled:a,onCheckedChange:o}=e,s;t[0]===o?s=t[1]:(s=e=>o(e===!0),t[0]=o,t[1]=s);let c;t[2]!==i||t[3]!==a||t[4]!==s?(c=(0,U.jsx)(I,{className:`mt-0.5`,checked:i,disabled:a,onCheckedChange:s}),t[2]=i,t[3]=a,t[4]=s,t[5]=c):c=t[5];let l;t[6]===n?l=t[7]:(l=(0,U.jsxs)(`span`,{className:`block text-sm break-words text-foreground`,children:[`Archive the existing Moonlet data at `,n]}),t[6]=n,t[7]=l);let u;t[8]===r?u=t[9]:(u=w(r),t[8]=r,t[9]=u);let d;t[10]===u?d=t[11]:(d=(0,U.jsxs)(`span`,{className:`block text-xs text-subtle-foreground`,children:[u,`. Moonlet renames it to a backup folder next to it and never merges it.`]}),t[10]=u,t[11]=d);let f;t[12]!==l||t[13]!==d?(f=(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[l,d]}),t[12]=l,t[13]=d,t[14]=f):f=t[14];let p;return t[15]!==c||t[16]!==f?(p=(0,U.jsxs)(`label`,{className:`flex items-start gap-2.5 rounded-md border border-border px-3 py-2.5`,children:[c,f]}),t[15]=c,t[16]=f,t[17]=p):p=t[17],p}var Te=100;function Ee(e){let t=(0,B.c)(9),{target:n,pending:r,errorMessage:i,onOpenChange:a,onRename:o}=e,s=n!==null,c;t[0]!==i||t[1]!==o||t[2]!==r||t[3]!==n?(c=e=>n?(0,U.jsx)(De,{target:n,pending:r,errorMessage:i,onRename:o,inputRef:e},n.id):null,t[0]=i,t[1]=o,t[2]=r,t[3]=n,t[4]=c):c=t[4];let l;return t[5]!==a||t[6]!==s||t[7]!==c?(l=(0,U.jsx)(g,{open:s,onOpenChange:a,children:c}),t[5]=a,t[6]=s,t[7]=c,t[8]=l):l=t[8],l}function De(e){let t=(0,B.c)(30),{target:n,pending:r,errorMessage:i,onRename:a,inputRef:o}=e,[s,c]=(0,Q.useState)(n.name),l;t[0]!==s||t[1]!==a||t[2]!==r||t[3]!==n?(l=e=>{if(e.preventDefault(),r)return;let t=s.trim();t.length!==0&&a(n,t)},t[0]=s,t[1]=a,t[2]=r,t[3]=n,t[4]=l):l=t[4];let d=l,p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,U.jsx)(u,{children:`Rename machine`}),t[5]=p):p=t[5];let m;t[6]===n.name?m=t[7]:(m=(0,U.jsxs)(f,{children:[p,(0,U.jsxs)(M,{children:[`Choose a new name for `,n.name,`.`]})]}),t[6]=n.name,t[7]=m);let h;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>c(e.target.value),t[8]=h):h=t[8];let g;t[9]!==o||t[10]!==s||t[11]!==r?(g=(0,U.jsx)(O,{ref:o,"aria-label":`Machine name`,value:s,maxLength:Te,autoCorrect:`off`,spellCheck:!1,disabled:r,onChange:h}),t[9]=o,t[10]=s,t[11]=r,t[12]=g):g=t[12];let _;t[13]===i?_=t[14]:(_=i===null?null:(0,U.jsx)(`p`,{className:`text-sm text-destructive`,children:i}),t[13]=i,t[14]=_);let v;t[15]!==g||t[16]!==_?(v=(0,U.jsxs)(`div`,{className:`space-y-2`,children:[g,_]}),t[15]=g,t[16]=_,t[17]=v):v=t[17];let y;t[18]!==s||t[19]!==r?(y=r||s.trim().length===0,t[18]=s,t[19]=r,t[20]=y):y=t[20];let b;t[21]===y?b=t[22]:(b=(0,U.jsx)(S,{children:(0,U.jsx)(k,{type:`submit`,disabled:y,children:`Rename machine`})}),t[21]=y,t[22]=b);let x;t[23]!==d||t[24]!==v||t[25]!==b?(x=(0,U.jsxs)(`form`,{className:`space-y-4`,onSubmit:d,children:[v,b]}),t[23]=d,t[24]=v,t[25]=b,t[26]=x):x=t[26];let C;return t[27]!==x||t[28]!==m?(C=(0,U.jsxs)(U.Fragment,{children:[m,x]}),t[27]=x,t[28]=m,t[29]=C):C=t[29],C}export{me as a,Y as c,te as d,he as i,se as l,ye as n,pe as o,ge as r,X as s,Ee as t,oe as u};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Br as t,Hr as n,hi as r,jr as i,kr as a,ri as o}from"./boot-vendor-CKEhulXz.js";import{t as s}from"./permission-mode-options-BrNWKCMS.js";import{$o as c,$t as l,Am as u,Ci as d,Ct as f,D as p,Dh as m,Do as h,Eo as g,Fh as _,Go as v,Jr as y,Lc as b,Lt as x,Na as S,Qi as C,Rr as w,St as T,T as E,To as D,Xo as O,Zo as k,ea as ee,en as A,jh as j,jm as te,wh as M,wo as N,xt as ne,y as P}from"./index-CfvM6UcU.js";import{a as F,i as I,n as re,o as L,r as ie}from"./dist-CWXlD45B.js";import{b as ae}from"./resource-list-BKpxiO2e.js";import{t as oe}from"./machine-provider-queries-CoghZyj9.js";import{n as se}from"./MachineLabel-D07WUIMh.js";import{t as ce}from"./page-shell-CgSxnF9m.js";import{a as le,c as ue,d as de,i as fe,l as pe,n as me,o as he,r as ge,s as _e,t as ve,u as ye}from"./MachineRenameDialog-RyrwvNas.js";import{a as be,c as xe,i as Se,o as Ce,r as we,s as Te}from"./host-mutations-CAtir6jv.js";var R=a(),z=e(o(),1);function Ee(e){let t=(0,R.c)(5),{notice:n}=e;if(n===null||n.message===null)return null;let r=n.phase===`suspending`||n.phase===`resuming`?`text-subtle-foreground`:`text-destructive-text`,i;t[0]===r?i=t[1]:(i=_(`min-w-0 text-xs`,r),t[0]=r,t[1]=i);let a;return t[2]!==n.message||t[3]!==i?(a=(0,z.jsx)(`p`,{role:`status`,"aria-label":`Machine maintenance`,className:i,children:n.message}),t[2]=n.message,t[3]=i,t[4]=a):a=t[4],a}var De=e(r(),1);function Oe(e,t){return t!==null&&t.fromHostId===e.id&&t.oldCopyDeletedAt===null}function ke(e,t){let n=`The server moved from ${e.name} to ${t.toHostName}. The old server data is still on ${e.name}, locked so Moonlet won't start a server from it. Keep it as a backup, or delete it once the new server works.`;return e.status===`connected`?n:`${n} ${e.name} has to be online to delete it.`}function Ae(e){let t=(0,R.c)(33),{host:n,lastMove:r}=e,i=p(),[a,o]=(0,De.useState)(!1),s;t[0]===i?s=t[1]:(s=()=>{i.reset(),o(!0)},t[0]=i,t[1]=s);let c;t[2]!==n||t[3]!==r||t[4]!==s?(c=(0,z.jsx)(B,{host:n,lastMove:r,onDelete:s}),t[2]=n,t[3]=r,t[4]=s,t[5]=c):c=t[5];let l;t[6]===i?l=t[7]:(l=e=>{!e&&!i.isPending&&(i.reset(),o(!1))},t[6]=i,t[7]=l);let u;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,z.jsx)(h,{children:`Delete the old server copy?`}),t[8]=u):u=t[8];let d;t[9]!==n.name||t[10]!==r.toHostName?(d=(0,z.jsxs)(g,{children:[u,(0,z.jsxs)(N,{children:[`This permanently deletes the database, settings and plugin data`,` `,n.name,` kept when the server moved to `,r.toHostName,`. The server on `,r.toHostName,` is not affected.`]})]}),t[9]=n.name,t[10]=r.toHostName,t[11]=d):d=t[11];let f;t[12]!==i.error||t[13]!==i.isError||t[14]!==n.name?(f=i.isError?(0,z.jsx)(`p`,{className:`text-sm text-destructive-text`,role:`alert`,children:k({error:i.error,fallbackMessage:`Couldn't delete the old server copy on ${n.name}.`})}):null,t[12]=i.error,t[13]=i.isError,t[14]=n.name,t[15]=f):f=t[15];let m;t[16]!==i||t[17]!==n.id||t[18]!==n.name?(m=()=>i.mutate(n.id,{onSuccess:e=>{o(!1),M.success(e.deleted?`Deleted the old server copy on ${n.name}`:`No old server copy was left on ${n.name}`)}}),t[16]=i,t[17]=n.id,t[18]=n.name,t[19]=m):m=t[19];let _=i.isPending?`Deleting…`:`Delete old copy`,v;t[20]!==i.isPending||t[21]!==m||t[22]!==_?(v=(0,z.jsx)(D,{children:(0,z.jsx)(j,{type:`button`,variant:`destructive`,disabled:i.isPending,onClick:m,children:_})}),t[20]=i.isPending,t[21]=m,t[22]=_,t[23]=v):v=t[23];let b;t[24]!==a||t[25]!==l||t[26]!==d||t[27]!==f||t[28]!==v?(b=(0,z.jsxs)(y,{modal:!1,open:a,onOpenChange:l,children:[d,f,v]}),t[24]=a,t[25]=l,t[26]=d,t[27]=f,t[28]=v,t[29]=b):b=t[29];let x;return t[30]!==b||t[31]!==c?(x=(0,z.jsxs)(z.Fragment,{children:[c,b]}),t[30]=b,t[31]=c,t[32]=x):x=t[32],x}function B(e){let t=(0,R.c)(9),{host:n,lastMove:r,onDelete:i}=e,a;t[0]!==n||t[1]!==r?(a=ke(n,r),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=n.status!==`connected`,s;t[3]!==i||t[4]!==o?(s=(0,z.jsx)(F,{children:(0,z.jsx)(I,{children:(0,z.jsx)(j,{type:`button`,variant:`destructive`,size:`sm`,disabled:o,onClick:i,children:`Delete old copy`})})}),t[3]=i,t[4]=o,t[5]=s):s=t[5];let c;return t[6]!==a||t[7]!==s?(c=(0,z.jsx)(L,{title:`Old server copy`,description:a,children:s}),t[6]=a,t[7]=s,t[8]=c):c=t[8],c}var je=`Highest permission mode any thread on the selected machine may run with. Threads that ask for more resolve down to it, and a provider that supports nothing this low can't run here.`,Me={darwin:`macOS`,linux:`Linux`,wsl:`WSL`,win32:`Windows`,unknown:null};function V({host:e,platformLabel:t,now:n}){let r=[pe({host:e,now:n})];return t!==null&&r.push(t),r.push(`paired ${S({timestamp:e.createdAt,now:n})}`),r.join(` · `)}function Ne(e){let t=(0,R.c)(6),{disabled:n,onSelect:r,value:i}=e,a;t[0]!==n||t[1]!==r||t[2]!==i?(a=s.map(e=>{let t=e.value===i;return(0,z.jsx)(I,{className:`items-start`,children:(0,z.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,disabled:n,onClick:()=>{t||r(e.value)},className:_(`flex w-full items-start gap-3 rounded-md text-left outline-none focus-visible:ring-2 focus-visible:ring-ring`,n&&`opacity-70`),children:[(0,z.jsx)(`span`,{className:_(`mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border`,t?`border-foreground`:`border-input`),children:t?(0,z.jsx)(`span`,{className:`size-2 rounded-full bg-foreground`}):null}),(0,z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`span`,{className:`block text-sm text-foreground`,children:e.label}),e.description?(0,z.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-subtle-foreground/75`,children:e.description}):null]})]})},e.value)}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):a=t[3];let o;return t[4]===a?o=t[5]:(o=(0,z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Permission limit`,children:(0,z.jsx)(F,{children:a})}),t[4]=a,t[5]=o),o}function Pe(e){let t=(0,R.c)(57),{host:n,machineProvider:r,platformLabel:a,now:o,isPrimary:s,isThisMachine:c,showServerBadge:l,lifecycleNotice:u,lifecycleActionPending:d,onSuspend:f,onResume:p,onRetryCleanup:h,onRename:g,onReconnect:_,canMoveServerHere:v,onMoveServerHere:y}=e,b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=te(`machines`),t[0]=b):b=t[0];let x;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,z.jsxs)(i,{to:b,className:`inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,z.jsx)(m,{name:`ChevronLeft`,className:`size-3.5`}),`Machines`]}),t[1]=x):x=t[1];let S;t[2]!==n||t[3]!==r?(S=(0,z.jsx)(`h1`,{className:`min-w-0 text-sm font-semibold text-foreground`,children:(0,z.jsx)(se,{host:n,machineProvider:r})}),t[2]=n,t[3]=r,t[4]=S):S=t[4];let C;t[5]===c?C=t[6]:(C=c?(0,z.jsx)(re,{children:`This machine`}):null,t[5]=c,t[6]=C);let w;t[7]===l?w=t[8]:(w=l?(0,z.jsx)(re,{children:`Server`}):null,t[7]=l,t[8]=w);let T;t[9]!==S||t[10]!==C||t[11]!==w?(T=(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[S,C,w]}),t[9]=S,t[10]=C,t[11]=w,t[12]=T):T=t[12];let E;t[13]===n?E=t[14]:(E=ye(n),t[13]=n,t[14]=E);let D;t[15]===E?D=t[16]:(D=(0,z.jsx)(ee,{tone:E}),t[15]=E,t[16]=D);let O;t[17]!==n||t[18]!==o||t[19]!==a?(O=V({host:n,platformLabel:a,now:o}),t[17]=n,t[18]=o,t[19]=a,t[20]=O):O=t[20];let k;t[21]===O?k=t[22]:(k=(0,z.jsx)(`p`,{className:`min-w-0 text-xs text-subtle-foreground/75`,children:O}),t[21]=O,t[22]=k);let A;t[23]!==k||t[24]!==D?(A=(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[D,k]}),t[23]=k,t[24]=D,t[25]=A):A=t[25];let j;t[26]===u?j=t[27]:(j=(0,z.jsx)(Ee,{notice:u}),t[26]=u,t[27]=j);let M;t[28]!==A||t[29]!==j||t[30]!==T?(M=(0,z.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[T,A,j]}),t[28]=A,t[29]=j,t[30]=T,t[31]=M):M=t[31];let N;t[32]!==n||t[33]!==d||t[34]!==r||t[35]!==p||t[36]!==h||t[37]!==f?(N=(0,z.jsx)(le,{host:n,machineProvider:r,pending:d,onSuspend:f,onResume:p,onRetryCleanup:h}),t[32]=n,t[33]=d,t[34]=r,t[35]=p,t[36]=h,t[37]=f,t[38]=N):N=t[38];let ne=`${n.name} actions`,P;t[39]!==v||t[40]!==n||t[41]!==s||t[42]!==d||t[43]!==r||t[44]!==y||t[45]!==_||t[46]!==g?(P=fe({host:n,machineProvider:r,isPrimary:s,canMoveServerHere:v,lifecycleActionPending:d,onRename:g,onReconnect:_,onMoveServerHere:y}),t[39]=v,t[40]=n,t[41]=s,t[42]=d,t[43]=r,t[44]=y,t[45]=_,t[46]=g,t[47]=P):P=t[47];let F;t[48]!==ne||t[49]!==P?(F=(0,z.jsx)(ae,{label:ne,items:P}),t[48]=ne,t[49]=P,t[50]=F):F=t[50];let I;t[51]!==N||t[52]!==F?(I=(0,z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[N,F]}),t[51]=N,t[52]=F,t[53]=I):I=t[53];let L;return t[54]!==M||t[55]!==I?(L=(0,z.jsxs)(`div`,{className:`space-y-3`,children:[x,(0,z.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[M,I]})]}),t[54]=M,t[55]=I,t[56]=L):L=t[56],L}function Fe(){let e=(0,R.c)(120),{hostId:r}=n(),a=t(),o=C(),{providers:s}=oe(),l=v(),{localDaemonHostId:u,platform:p}=d(),h=b(),g=ne(),_=we(),y=Ce(),S=Te(),D=Se(),ee=be(),N=xe(),re=E(),[ae,se]=(0,De.useState)(!1),[le,fe]=(0,De.useState)(!1),[pe,ye]=(0,De.useState)(!1),[Ee,ke]=(0,De.useState)(!1),B=o.data,V=B?.find(e=>e.id===r)??null,Fe=V?.lifecycle.message??null,Be=V===null?null:{phase:V.lifecycle.phase,message:Fe},Ve=l.data?.primaryHostId??null,H=l.data?.experiments.serverMove??!1,U=V!==null&&V.id===Ve,He;e[0]===B?He=e[1]:(He=B?.filter(ze).length??0,e[0]=B,e[1]=He);let Ue=He>1&&V!==null&&V.id===u,We=V?.machineProviderId===null||V?.machineProviderId===void 0?null:s?.find(e=>e.id===V.machineProviderId)??null,Ge;if(e[2]!==r||e[3]!==h.data?.projects){let t=h.data?.projects??[],n;e[5]===r?n=e[6]:(n=e=>e.sources.some(e=>e.hostId===r),e[5]=r,e[6]=n),Ge=t.filter(n).map(Re),e[2]=r,e[3]=h.data?.projects,e[4]=Ge}else Ge=e[4];let Ke=Ge,W,qe;if(e[7]!==r||e[8]!==g.machines){let t;e[11]===r?t=e[12]:(t=e=>e.host.id===r,e[11]=r,e[12]=t),W=g.machines.find(t),qe=(W?.issues??[]).filter(x),e[7]=r,e[8]=g.machines,e[9]=W,e[10]=qe}else W=e[9],qe=e[10];let Je=qe.length,Ye=O().data;W?.providerStatus;let Xe;bb0:{let t=W?.providerStatus;if(!t){let t;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[13]=t):t=e[13],Xe=t;break bb0}let n;e[14]!==Ye||e[15]!==t?(n=Object.entries(t).flatMap(e=>{let[t,n]=e;if(!n.installed)return[];let r=Ye?.find(e=>e.id===t);return[{...n,providerId:t,provider:r,ProviderIcon:A(`agent`,t,r??null)?.icon}]}),e[14]=Ye,e[15]=t,e[16]=n):n=e[16],Xe=n}let Ze=Xe,Qe;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=Date.now(),e[17]=Qe):Qe=e[17];let $e=Qe,et=V!==null&&V.id===u&&p!==null?Me[p]:U&&l.data?.primaryHostPlatform?Me[l.data.primaryHostPlatform]:null;if(B===void 0){let t;return e[18]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,z.jsx)(ce,{contentClassName:`pt-4 md:pt-5`,children:(0,z.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`})})}),e[18]=t):t=e[18],t}if(V===null){let t;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(t=te(`machines`),e[19]=t):t=e[19];let n;return e[20]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,z.jsx)(ce,{contentClassName:`pt-4 md:pt-5`,children:(0,z.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-3`,children:[(0,z.jsxs)(i,{to:t,className:`inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,z.jsx)(m,{name:`ChevronLeft`,className:`size-3.5`}),`Machines`]}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Machine is no longer paired.`})]})}),e[20]=n):n=e[20],n}let tt=T(V),nt=re.data?.lastMove??null,rt=ce,it=Pe,at=S.isPending||D.isPending||ee.isPending,ot=()=>S.mutate(V.id),st=()=>D.mutate(V.id),ct=()=>ee.mutate(V.id),G;e[21]===_?G=e[22]:(G=()=>{_.reset(),se(!0)},e[21]=_,e[22]=G);let lt=l.data!==void 0&&P({host:V,primaryHostId:Ve,move:re.data?.move??null,serverMoveEnabled:H}),ut,dt;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(ut=()=>ke(!0),dt=()=>ye(!0),e[23]=ut,e[24]=dt):(ut=e[23],dt=e[24]);let ft;e[25]!==it||e[26]!==V||e[27]!==U||e[28]!==Ue||e[29]!==Be||e[30]!==We||e[31]!==$e||e[32]!==et||e[33]!==ct||e[34]!==G||e[35]!==lt||e[36]!==at||e[37]!==ot||e[38]!==st?(ft=(0,z.jsx)(it,{host:V,machineProvider:We,platformLabel:et,now:$e,isPrimary:U,isThisMachine:Ue,showServerBadge:U,lifecycleNotice:Be,lifecycleActionPending:at,onSuspend:ot,onResume:st,onRetryCleanup:ct,onRename:G,canMoveServerHere:lt,onReconnect:ut,onMoveServerHere:dt}),e[25]=it,e[26]=V,e[27]=U,e[28]=Ue,e[29]=Be,e[30]=We,e[31]=$e,e[32]=et,e[33]=ct,e[34]=G,e[35]=lt,e[36]=at,e[37]=ot,e[38]=st,e[39]=ft):ft=e[39];let K;e[40]!==V.id||e[41]!==V.name||e[42]!==N?(K=e=>N.mutate({hostId:V.id,maxPermissionMode:e},{onError:e=>{c({error:e,fallbackMessage:`Couldn't change the permission limit for ${V.name}.`})}}),e[40]=V.id,e[41]=V.name,e[42]=N,e[43]=K):K=e[43];let q;e[44]!==V.maxPermissionMode||e[45]!==K||e[46]!==N.isPending?(q=(0,z.jsx)(L,{title:`Permission limit`,description:je,children:(0,z.jsx)(Ne,{value:V.maxPermissionMode,disabled:N.isPending,onSelect:K})}),e[44]=V.maxPermissionMode,e[45]=K,e[46]=N.isPending,e[47]=q):q=e[47];let J;e[48]!==V.status||e[49]!==Ze||e[50]!==W?.statusError||e[51]!==W?.statusPending||e[52]!==Je?(J=(0,z.jsx)(L,{title:`Provider CLIs`,children:(0,z.jsx)(F,{children:(0,z.jsx)(ie,{label:`Installed`,children:V.status===`connected`?W?.statusPending?(0,z.jsx)(`span`,{children:`Checking…`}):W?.statusError?(0,z.jsx)(`span`,{children:`Status unavailable`}):(0,z.jsxs)(z.Fragment,{children:[Ze.length>0?(0,z.jsx)(`span`,{className:`flex min-w-0 flex-wrap items-center justify-start gap-x-3 gap-y-1 @min-[36rem]/settings:justify-end`,children:Ze.map(Le)}):(0,z.jsx)(`span`,{children:`None installed`}),Je>0?(0,z.jsx)(i,{to:te(`updates`),className:`shrink-0 rounded outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,children:(0,z.jsxs)(w,{variant:`outline`,size:`sm`,className:`border-attention/50 bg-surface-attention text-warning-text transition-colors hover:border-attention hover:text-foreground`,children:[Je,` to fix`]})}):null]}):(0,z.jsx)(`span`,{children:`Unavailable while offline`})})})}),e[48]=V.status,e[49]=Ze,e[50]=W?.statusError,e[51]=W?.statusPending,e[52]=Je,e[53]=J):J=e[53];let Y;e[54]===V.id?Y=e[55]:(Y=(0,z.jsx)(de,{hostId:V.id}),e[54]=V.id,e[55]=Y);let X;e[56]===Ke?X=e[57]:(X=(0,z.jsx)(ie,{label:`Projects`,children:Ke.length===0?(0,z.jsx)(`span`,{children:`None`}):(0,z.jsx)(`span`,{className:`min-w-0 truncate`,children:Ke.map(Ie)})}),e[56]=Ke,e[57]=X);let pt=tt??`Up to date`,Z;e[58]===pt?Z=e[59]:(Z=(0,z.jsx)(`span`,{children:pt}),e[58]=pt,e[59]=Z);let mt;e[60]!==V||e[61]!==y?(mt=f(V)?(0,z.jsx)(j,{type:`button`,variant:`outline`,size:`sm`,className:`h-6 px-2 text-xs`,disabled:y.isPending,onClick:()=>y.mutate(V.id,{onSuccess:()=>{M.success(`Update retry requested for ${V.name}`)}}),children:y.isPending?`Retrying…`:`Retry update`}):null,e[60]=V,e[61]=y,e[62]=mt):mt=e[62];let ht;e[63]!==Z||e[64]!==mt?(ht=(0,z.jsxs)(ie,{label:`Updates`,children:[Z,mt]}),e[63]=Z,e[64]=mt,e[65]=ht):ht=e[65];let gt;e[66]!==X||e[67]!==ht?(gt=(0,z.jsx)(L,{title:`Machine information`,children:(0,z.jsxs)(F,{children:[X,ht]})}),e[66]=X,e[67]=ht,e[68]=gt):gt=e[68];let _t;e[69]!==V||e[70]!==nt||e[71]!==H?(_t=H&&Oe(V,nt)?(0,z.jsx)(Ae,{host:V,lastMove:nt}):null,e[69]=V,e[70]=nt,e[71]=H,e[72]=_t):_t=e[72];let vt;e[73]!==V||e[74]!==U||e[75]!==H?(vt=U?ue(H):`Revokes ${V.name}'s access to this server. ${_e(V)}`,e[73]=V,e[74]=U,e[75]=H,e[76]=vt):vt=e[76];let yt;e[77]===Symbol.for(`react.memo_cache_sentinel`)?(yt=()=>fe(!0),e[77]=yt):yt=e[77];let bt;e[78]===U?bt=e[79]:(bt=(0,z.jsx)(F,{children:(0,z.jsx)(I,{children:(0,z.jsx)(j,{type:`button`,variant:`destructive`,size:`sm`,disabled:U,onClick:yt,children:`Remove machine`})})}),e[78]=U,e[79]=bt);let Q;e[80]!==vt||e[81]!==bt?(Q=(0,z.jsx)(L,{title:`Danger zone`,description:vt,children:bt}),e[80]=vt,e[81]=bt,e[82]=Q):Q=e[82];let xt;e[83]!==ft||e[84]!==q||e[85]!==J||e[86]!==Y||e[87]!==gt||e[88]!==_t||e[89]!==Q?(xt=(0,z.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-6 pb-10`,children:[ft,q,J,Y,gt,_t,Q]}),e[83]=ft,e[84]=q,e[85]=J,e[86]=Y,e[87]=gt,e[88]=_t,e[89]=Q,e[90]=xt):xt=e[90];let St=ae?V:null,Ct;e[91]!==_.error||e[92]!==_.isError?(Ct=_.isError?k({error:_.error,fallbackMessage:`Couldn't rename the machine.`}):null,e[91]=_.error,e[92]=_.isError,e[93]=Ct):Ct=e[93];let wt;e[94]===_.isPending?wt=e[95]:(wt=e=>{!e&&!_.isPending&&se(!1)},e[94]=_.isPending,e[95]=wt);let Tt;e[96]===_?Tt=e[97]:(Tt=(e,t)=>_.mutate({hostId:e.id,name:t},{onSuccess:()=>se(!1)}),e[96]=_,e[97]=Tt);let Et;e[98]!==_.isPending||e[99]!==St||e[100]!==Ct||e[101]!==wt||e[102]!==Tt?(Et=(0,z.jsx)(ve,{target:St,pending:_.isPending,errorMessage:Ct,onOpenChange:wt,onRename:Tt}),e[98]=_.isPending,e[99]=St,e[100]=Ct,e[101]=wt,e[102]=Tt,e[103]=Et):Et=e[103];let Dt=le?V:null,Ot;e[104]===a?Ot=e[105]:(Ot=()=>a(te(`machines`)),e[104]=a,e[105]=Ot);let kt;e[106]!==Dt||e[107]!==Ot?(kt=(0,z.jsx)(he,{target:Dt,onOpenChange:fe,onRemoved:Ot}),e[106]=Dt,e[107]=Ot,e[108]=kt):kt=e[108];let At=Ee?V:null,jt;e[109]===At?jt=e[110]:(jt=(0,z.jsx)(ge,{target:At,onOpenChange:ke}),e[109]=At,e[110]=jt);let Mt=pe?V:null,$;e[111]===Mt?$=e[112]:($=(0,z.jsx)(me,{target:Mt,onOpenChange:ye}),e[111]=Mt,e[112]=$);let Nt;return e[113]!==rt||e[114]!==xt||e[115]!==Et||e[116]!==kt||e[117]!==jt||e[118]!==$?(Nt=(0,z.jsxs)(rt,{contentClassName:`pt-4 md:pt-5`,children:[xt,Et,kt,jt,$]}),e[113]=rt,e[114]=xt,e[115]=Et,e[116]=kt,e[117]=jt,e[118]=$,e[119]=Nt):Nt=e[119],Nt}function Ie(e,t){return(0,z.jsxs)(`span`,{children:[t>0?` · `:``,(0,z.jsx)(i,{to:u(e.id),className:`hover:text-foreground`,children:e.name})]},e.id)}function Le(e){return(0,z.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[e.ProviderIcon?(0,z.jsx)(`span`,{"data-provider-icon":e.providerId,"aria-hidden":!0,className:`flex size-3.5 shrink-0 items-center justify-center`,children:e.provider===void 0?(0,z.jsx)(e.ProviderIcon,{className:`size-3.5`}):(0,z.jsx)(l,{provider:e.provider,icon:e.ProviderIcon,className:`size-3.5`})}):null,(0,z.jsx)(`span`,{children:e.displayName}),e.currentVersion?(0,z.jsx)(`span`,{children:e.currentVersion}):null]},e.providerId)}function Re(e){return{id:e.id,name:e.name}}function ze(e){return e.type===`persistent`}export{Fe as MachineSettingsView};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Br as t,Hr as n,hi as r,jr as i,kr as a,ri as o}from"./boot-vendor-CKEhulXz.js";import{t as s}from"./permission-mode-options-BrNWKCMS.js";import{$o as c,$t as l,Am as u,Ci as d,Ct as f,D as p,Dh as m,Do as h,Eo as g,Fh as _,Go as v,Jr as y,Lc as b,Lt as x,Na as S,Qi as C,Rr as w,St as T,T as E,To as D,Xo as O,Zo as k,ea as ee,en as A,jh as j,jm as te,wh as M,wo as N,xt as ne,y as P}from"./index-DCps_qBD.js";import{a as F,i as I,n as re,o as L,r as ie}from"./dist-DCULoGTS.js";import{b as ae}from"./resource-list-DLZLjUCf.js";import{t as oe}from"./machine-provider-queries-BTz8Sz3J.js";import{n as se}from"./MachineLabel-vUI5j8ve.js";import{t as ce}from"./page-shell-CNCVT3Uj.js";import{a as le,c as ue,d as de,i as fe,l as pe,n as me,o as he,r as ge,s as _e,t as ve,u as ye}from"./MachineRenameDialog-CrnZuppe.js";import{a as be,c as xe,i as Se,o as Ce,r as we,s as Te}from"./host-mutations-Fl0RjER0.js";var R=a(),z=e(o(),1);function Ee(e){let t=(0,R.c)(5),{notice:n}=e;if(n===null||n.message===null)return null;let r=n.phase===`suspending`||n.phase===`resuming`?`text-subtle-foreground`:`text-destructive-text`,i;t[0]===r?i=t[1]:(i=_(`min-w-0 text-xs`,r),t[0]=r,t[1]=i);let a;return t[2]!==n.message||t[3]!==i?(a=(0,z.jsx)(`p`,{role:`status`,"aria-label":`Machine maintenance`,className:i,children:n.message}),t[2]=n.message,t[3]=i,t[4]=a):a=t[4],a}var De=e(r(),1);function Oe(e,t){return t!==null&&t.fromHostId===e.id&&t.oldCopyDeletedAt===null}function ke(e,t){let n=`The server moved from ${e.name} to ${t.toHostName}. The old server data is still on ${e.name}, locked so Moonlet won't start a server from it. Keep it as a backup, or delete it once the new server works.`;return e.status===`connected`?n:`${n} ${e.name} has to be online to delete it.`}function Ae(e){let t=(0,R.c)(33),{host:n,lastMove:r}=e,i=p(),[a,o]=(0,De.useState)(!1),s;t[0]===i?s=t[1]:(s=()=>{i.reset(),o(!0)},t[0]=i,t[1]=s);let c;t[2]!==n||t[3]!==r||t[4]!==s?(c=(0,z.jsx)(B,{host:n,lastMove:r,onDelete:s}),t[2]=n,t[3]=r,t[4]=s,t[5]=c):c=t[5];let l;t[6]===i?l=t[7]:(l=e=>{!e&&!i.isPending&&(i.reset(),o(!1))},t[6]=i,t[7]=l);let u;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,z.jsx)(h,{children:`Delete the old server copy?`}),t[8]=u):u=t[8];let d;t[9]!==n.name||t[10]!==r.toHostName?(d=(0,z.jsxs)(g,{children:[u,(0,z.jsxs)(N,{children:[`This permanently deletes the database, settings and plugin data`,` `,n.name,` kept when the server moved to `,r.toHostName,`. The server on `,r.toHostName,` is not affected.`]})]}),t[9]=n.name,t[10]=r.toHostName,t[11]=d):d=t[11];let f;t[12]!==i.error||t[13]!==i.isError||t[14]!==n.name?(f=i.isError?(0,z.jsx)(`p`,{className:`text-sm text-destructive-text`,role:`alert`,children:k({error:i.error,fallbackMessage:`Couldn't delete the old server copy on ${n.name}.`})}):null,t[12]=i.error,t[13]=i.isError,t[14]=n.name,t[15]=f):f=t[15];let m;t[16]!==i||t[17]!==n.id||t[18]!==n.name?(m=()=>i.mutate(n.id,{onSuccess:e=>{o(!1),M.success(e.deleted?`Deleted the old server copy on ${n.name}`:`No old server copy was left on ${n.name}`)}}),t[16]=i,t[17]=n.id,t[18]=n.name,t[19]=m):m=t[19];let _=i.isPending?`Deleting…`:`Delete old copy`,v;t[20]!==i.isPending||t[21]!==m||t[22]!==_?(v=(0,z.jsx)(D,{children:(0,z.jsx)(j,{type:`button`,variant:`destructive`,disabled:i.isPending,onClick:m,children:_})}),t[20]=i.isPending,t[21]=m,t[22]=_,t[23]=v):v=t[23];let b;t[24]!==a||t[25]!==l||t[26]!==d||t[27]!==f||t[28]!==v?(b=(0,z.jsxs)(y,{modal:!1,open:a,onOpenChange:l,children:[d,f,v]}),t[24]=a,t[25]=l,t[26]=d,t[27]=f,t[28]=v,t[29]=b):b=t[29];let x;return t[30]!==b||t[31]!==c?(x=(0,z.jsxs)(z.Fragment,{children:[c,b]}),t[30]=b,t[31]=c,t[32]=x):x=t[32],x}function B(e){let t=(0,R.c)(9),{host:n,lastMove:r,onDelete:i}=e,a;t[0]!==n||t[1]!==r?(a=ke(n,r),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=n.status!==`connected`,s;t[3]!==i||t[4]!==o?(s=(0,z.jsx)(F,{children:(0,z.jsx)(I,{children:(0,z.jsx)(j,{type:`button`,variant:`destructive`,size:`sm`,disabled:o,onClick:i,children:`Delete old copy`})})}),t[3]=i,t[4]=o,t[5]=s):s=t[5];let c;return t[6]!==a||t[7]!==s?(c=(0,z.jsx)(L,{title:`Old server copy`,description:a,children:s}),t[6]=a,t[7]=s,t[8]=c):c=t[8],c}var je=`Highest permission mode any thread on the selected machine may run with. Threads that ask for more resolve down to it, and a provider that supports nothing this low can't run here.`,Me={darwin:`macOS`,linux:`Linux`,wsl:`WSL`,win32:`Windows`,unknown:null};function V({host:e,platformLabel:t,now:n}){let r=[pe({host:e,now:n})];return t!==null&&r.push(t),r.push(`paired ${S({timestamp:e.createdAt,now:n})}`),r.join(` · `)}function Ne(e){let t=(0,R.c)(6),{disabled:n,onSelect:r,value:i}=e,a;t[0]!==n||t[1]!==r||t[2]!==i?(a=s.map(e=>{let t=e.value===i;return(0,z.jsx)(I,{className:`items-start`,children:(0,z.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,disabled:n,onClick:()=>{t||r(e.value)},className:_(`flex w-full items-start gap-3 rounded-md text-left outline-none focus-visible:ring-2 focus-visible:ring-ring`,n&&`opacity-70`),children:[(0,z.jsx)(`span`,{className:_(`mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border`,t?`border-foreground`:`border-input`),children:t?(0,z.jsx)(`span`,{className:`size-2 rounded-full bg-foreground`}):null}),(0,z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`span`,{className:`block text-sm text-foreground`,children:e.label}),e.description?(0,z.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-subtle-foreground/75`,children:e.description}):null]})]})},e.value)}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):a=t[3];let o;return t[4]===a?o=t[5]:(o=(0,z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Permission limit`,children:(0,z.jsx)(F,{children:a})}),t[4]=a,t[5]=o),o}function Pe(e){let t=(0,R.c)(57),{host:n,machineProvider:r,platformLabel:a,now:o,isPrimary:s,isThisMachine:c,showServerBadge:l,lifecycleNotice:u,lifecycleActionPending:d,onSuspend:f,onResume:p,onRetryCleanup:h,onRename:g,onReconnect:_,canMoveServerHere:v,onMoveServerHere:y}=e,b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=te(`machines`),t[0]=b):b=t[0];let x;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,z.jsxs)(i,{to:b,className:`inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,z.jsx)(m,{name:`ChevronLeft`,className:`size-3.5`}),`Machines`]}),t[1]=x):x=t[1];let S;t[2]!==n||t[3]!==r?(S=(0,z.jsx)(`h1`,{className:`min-w-0 text-sm font-semibold text-foreground`,children:(0,z.jsx)(se,{host:n,machineProvider:r})}),t[2]=n,t[3]=r,t[4]=S):S=t[4];let C;t[5]===c?C=t[6]:(C=c?(0,z.jsx)(re,{children:`This machine`}):null,t[5]=c,t[6]=C);let w;t[7]===l?w=t[8]:(w=l?(0,z.jsx)(re,{children:`Server`}):null,t[7]=l,t[8]=w);let T;t[9]!==S||t[10]!==C||t[11]!==w?(T=(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[S,C,w]}),t[9]=S,t[10]=C,t[11]=w,t[12]=T):T=t[12];let E;t[13]===n?E=t[14]:(E=ye(n),t[13]=n,t[14]=E);let D;t[15]===E?D=t[16]:(D=(0,z.jsx)(ee,{tone:E}),t[15]=E,t[16]=D);let O;t[17]!==n||t[18]!==o||t[19]!==a?(O=V({host:n,platformLabel:a,now:o}),t[17]=n,t[18]=o,t[19]=a,t[20]=O):O=t[20];let k;t[21]===O?k=t[22]:(k=(0,z.jsx)(`p`,{className:`min-w-0 text-xs text-subtle-foreground/75`,children:O}),t[21]=O,t[22]=k);let A;t[23]!==k||t[24]!==D?(A=(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[D,k]}),t[23]=k,t[24]=D,t[25]=A):A=t[25];let j;t[26]===u?j=t[27]:(j=(0,z.jsx)(Ee,{notice:u}),t[26]=u,t[27]=j);let M;t[28]!==A||t[29]!==j||t[30]!==T?(M=(0,z.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[T,A,j]}),t[28]=A,t[29]=j,t[30]=T,t[31]=M):M=t[31];let N;t[32]!==n||t[33]!==d||t[34]!==r||t[35]!==p||t[36]!==h||t[37]!==f?(N=(0,z.jsx)(le,{host:n,machineProvider:r,pending:d,onSuspend:f,onResume:p,onRetryCleanup:h}),t[32]=n,t[33]=d,t[34]=r,t[35]=p,t[36]=h,t[37]=f,t[38]=N):N=t[38];let ne=`${n.name} actions`,P;t[39]!==v||t[40]!==n||t[41]!==s||t[42]!==d||t[43]!==r||t[44]!==y||t[45]!==_||t[46]!==g?(P=fe({host:n,machineProvider:r,isPrimary:s,canMoveServerHere:v,lifecycleActionPending:d,onRename:g,onReconnect:_,onMoveServerHere:y}),t[39]=v,t[40]=n,t[41]=s,t[42]=d,t[43]=r,t[44]=y,t[45]=_,t[46]=g,t[47]=P):P=t[47];let F;t[48]!==ne||t[49]!==P?(F=(0,z.jsx)(ae,{label:ne,items:P}),t[48]=ne,t[49]=P,t[50]=F):F=t[50];let I;t[51]!==N||t[52]!==F?(I=(0,z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[N,F]}),t[51]=N,t[52]=F,t[53]=I):I=t[53];let L;return t[54]!==M||t[55]!==I?(L=(0,z.jsxs)(`div`,{className:`space-y-3`,children:[x,(0,z.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[M,I]})]}),t[54]=M,t[55]=I,t[56]=L):L=t[56],L}function Fe(){let e=(0,R.c)(120),{hostId:r}=n(),a=t(),o=C(),{providers:s}=oe(),l=v(),{localDaemonHostId:u,platform:p}=d(),h=b(),g=ne(),_=we(),y=Ce(),S=Te(),D=Se(),ee=be(),N=xe(),re=E(),[ae,se]=(0,De.useState)(!1),[le,fe]=(0,De.useState)(!1),[pe,ye]=(0,De.useState)(!1),[Ee,ke]=(0,De.useState)(!1),B=o.data,V=B?.find(e=>e.id===r)??null,Fe=V?.lifecycle.message??null,Be=V===null?null:{phase:V.lifecycle.phase,message:Fe},Ve=l.data?.primaryHostId??null,H=l.data?.experiments.serverMove??!1,U=V!==null&&V.id===Ve,He;e[0]===B?He=e[1]:(He=B?.filter(ze).length??0,e[0]=B,e[1]=He);let Ue=He>1&&V!==null&&V.id===u,We=V?.machineProviderId===null||V?.machineProviderId===void 0?null:s?.find(e=>e.id===V.machineProviderId)??null,Ge;if(e[2]!==r||e[3]!==h.data?.projects){let t=h.data?.projects??[],n;e[5]===r?n=e[6]:(n=e=>e.sources.some(e=>e.hostId===r),e[5]=r,e[6]=n),Ge=t.filter(n).map(Re),e[2]=r,e[3]=h.data?.projects,e[4]=Ge}else Ge=e[4];let Ke=Ge,W,qe;if(e[7]!==r||e[8]!==g.machines){let t;e[11]===r?t=e[12]:(t=e=>e.host.id===r,e[11]=r,e[12]=t),W=g.machines.find(t),qe=(W?.issues??[]).filter(x),e[7]=r,e[8]=g.machines,e[9]=W,e[10]=qe}else W=e[9],qe=e[10];let Je=qe.length,Ye=O().data;W?.providerStatus;let Xe;bb0:{let t=W?.providerStatus;if(!t){let t;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[13]=t):t=e[13],Xe=t;break bb0}let n;e[14]!==Ye||e[15]!==t?(n=Object.entries(t).flatMap(e=>{let[t,n]=e;if(!n.installed)return[];let r=Ye?.find(e=>e.id===t);return[{...n,providerId:t,provider:r,ProviderIcon:A(`agent`,t,r??null)?.icon}]}),e[14]=Ye,e[15]=t,e[16]=n):n=e[16],Xe=n}let Ze=Xe,Qe;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=Date.now(),e[17]=Qe):Qe=e[17];let $e=Qe,et=V!==null&&V.id===u&&p!==null?Me[p]:U&&l.data?.primaryHostPlatform?Me[l.data.primaryHostPlatform]:null;if(B===void 0){let t;return e[18]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,z.jsx)(ce,{contentClassName:`pt-4 md:pt-5`,children:(0,z.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`})})}),e[18]=t):t=e[18],t}if(V===null){let t;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(t=te(`machines`),e[19]=t):t=e[19];let n;return e[20]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,z.jsx)(ce,{contentClassName:`pt-4 md:pt-5`,children:(0,z.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-3`,children:[(0,z.jsxs)(i,{to:t,className:`inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,z.jsx)(m,{name:`ChevronLeft`,className:`size-3.5`}),`Machines`]}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Machine is no longer paired.`})]})}),e[20]=n):n=e[20],n}let tt=T(V),nt=re.data?.lastMove??null,rt=ce,it=Pe,at=S.isPending||D.isPending||ee.isPending,ot=()=>S.mutate(V.id),st=()=>D.mutate(V.id),ct=()=>ee.mutate(V.id),G;e[21]===_?G=e[22]:(G=()=>{_.reset(),se(!0)},e[21]=_,e[22]=G);let lt=l.data!==void 0&&P({host:V,primaryHostId:Ve,move:re.data?.move??null,serverMoveEnabled:H}),ut,dt;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(ut=()=>ke(!0),dt=()=>ye(!0),e[23]=ut,e[24]=dt):(ut=e[23],dt=e[24]);let ft;e[25]!==it||e[26]!==V||e[27]!==U||e[28]!==Ue||e[29]!==Be||e[30]!==We||e[31]!==$e||e[32]!==et||e[33]!==ct||e[34]!==G||e[35]!==lt||e[36]!==at||e[37]!==ot||e[38]!==st?(ft=(0,z.jsx)(it,{host:V,machineProvider:We,platformLabel:et,now:$e,isPrimary:U,isThisMachine:Ue,showServerBadge:U,lifecycleNotice:Be,lifecycleActionPending:at,onSuspend:ot,onResume:st,onRetryCleanup:ct,onRename:G,canMoveServerHere:lt,onReconnect:ut,onMoveServerHere:dt}),e[25]=it,e[26]=V,e[27]=U,e[28]=Ue,e[29]=Be,e[30]=We,e[31]=$e,e[32]=et,e[33]=ct,e[34]=G,e[35]=lt,e[36]=at,e[37]=ot,e[38]=st,e[39]=ft):ft=e[39];let K;e[40]!==V.id||e[41]!==V.name||e[42]!==N?(K=e=>N.mutate({hostId:V.id,maxPermissionMode:e},{onError:e=>{c({error:e,fallbackMessage:`Couldn't change the permission limit for ${V.name}.`})}}),e[40]=V.id,e[41]=V.name,e[42]=N,e[43]=K):K=e[43];let q;e[44]!==V.maxPermissionMode||e[45]!==K||e[46]!==N.isPending?(q=(0,z.jsx)(L,{title:`Permission limit`,description:je,children:(0,z.jsx)(Ne,{value:V.maxPermissionMode,disabled:N.isPending,onSelect:K})}),e[44]=V.maxPermissionMode,e[45]=K,e[46]=N.isPending,e[47]=q):q=e[47];let J;e[48]!==V.status||e[49]!==Ze||e[50]!==W?.statusError||e[51]!==W?.statusPending||e[52]!==Je?(J=(0,z.jsx)(L,{title:`Provider CLIs`,children:(0,z.jsx)(F,{children:(0,z.jsx)(ie,{label:`Installed`,children:V.status===`connected`?W?.statusPending?(0,z.jsx)(`span`,{children:`Checking…`}):W?.statusError?(0,z.jsx)(`span`,{children:`Status unavailable`}):(0,z.jsxs)(z.Fragment,{children:[Ze.length>0?(0,z.jsx)(`span`,{className:`flex min-w-0 flex-wrap items-center justify-start gap-x-3 gap-y-1 @min-[36rem]/settings:justify-end`,children:Ze.map(Le)}):(0,z.jsx)(`span`,{children:`None installed`}),Je>0?(0,z.jsx)(i,{to:te(`updates`),className:`shrink-0 rounded outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,children:(0,z.jsxs)(w,{variant:`outline`,size:`sm`,className:`border-attention/50 bg-surface-attention text-warning-text transition-colors hover:border-attention hover:text-foreground`,children:[Je,` to fix`]})}):null]}):(0,z.jsx)(`span`,{children:`Unavailable while offline`})})})}),e[48]=V.status,e[49]=Ze,e[50]=W?.statusError,e[51]=W?.statusPending,e[52]=Je,e[53]=J):J=e[53];let Y;e[54]===V.id?Y=e[55]:(Y=(0,z.jsx)(de,{hostId:V.id}),e[54]=V.id,e[55]=Y);let X;e[56]===Ke?X=e[57]:(X=(0,z.jsx)(ie,{label:`Projects`,children:Ke.length===0?(0,z.jsx)(`span`,{children:`None`}):(0,z.jsx)(`span`,{className:`min-w-0 truncate`,children:Ke.map(Ie)})}),e[56]=Ke,e[57]=X);let pt=tt??`Up to date`,Z;e[58]===pt?Z=e[59]:(Z=(0,z.jsx)(`span`,{children:pt}),e[58]=pt,e[59]=Z);let mt;e[60]!==V||e[61]!==y?(mt=f(V)?(0,z.jsx)(j,{type:`button`,variant:`outline`,size:`sm`,className:`h-6 px-2 text-xs`,disabled:y.isPending,onClick:()=>y.mutate(V.id,{onSuccess:()=>{M.success(`Update retry requested for ${V.name}`)}}),children:y.isPending?`Retrying…`:`Retry update`}):null,e[60]=V,e[61]=y,e[62]=mt):mt=e[62];let ht;e[63]!==Z||e[64]!==mt?(ht=(0,z.jsxs)(ie,{label:`Updates`,children:[Z,mt]}),e[63]=Z,e[64]=mt,e[65]=ht):ht=e[65];let gt;e[66]!==X||e[67]!==ht?(gt=(0,z.jsx)(L,{title:`Machine information`,children:(0,z.jsxs)(F,{children:[X,ht]})}),e[66]=X,e[67]=ht,e[68]=gt):gt=e[68];let _t;e[69]!==V||e[70]!==nt||e[71]!==H?(_t=H&&Oe(V,nt)?(0,z.jsx)(Ae,{host:V,lastMove:nt}):null,e[69]=V,e[70]=nt,e[71]=H,e[72]=_t):_t=e[72];let vt;e[73]!==V||e[74]!==U||e[75]!==H?(vt=U?ue(H):`Revokes ${V.name}'s access to this server. ${_e(V)}`,e[73]=V,e[74]=U,e[75]=H,e[76]=vt):vt=e[76];let yt;e[77]===Symbol.for(`react.memo_cache_sentinel`)?(yt=()=>fe(!0),e[77]=yt):yt=e[77];let bt;e[78]===U?bt=e[79]:(bt=(0,z.jsx)(F,{children:(0,z.jsx)(I,{children:(0,z.jsx)(j,{type:`button`,variant:`destructive`,size:`sm`,disabled:U,onClick:yt,children:`Remove machine`})})}),e[78]=U,e[79]=bt);let Q;e[80]!==vt||e[81]!==bt?(Q=(0,z.jsx)(L,{title:`Danger zone`,description:vt,children:bt}),e[80]=vt,e[81]=bt,e[82]=Q):Q=e[82];let xt;e[83]!==ft||e[84]!==q||e[85]!==J||e[86]!==Y||e[87]!==gt||e[88]!==_t||e[89]!==Q?(xt=(0,z.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-6 pb-10`,children:[ft,q,J,Y,gt,_t,Q]}),e[83]=ft,e[84]=q,e[85]=J,e[86]=Y,e[87]=gt,e[88]=_t,e[89]=Q,e[90]=xt):xt=e[90];let St=ae?V:null,Ct;e[91]!==_.error||e[92]!==_.isError?(Ct=_.isError?k({error:_.error,fallbackMessage:`Couldn't rename the machine.`}):null,e[91]=_.error,e[92]=_.isError,e[93]=Ct):Ct=e[93];let wt;e[94]===_.isPending?wt=e[95]:(wt=e=>{!e&&!_.isPending&&se(!1)},e[94]=_.isPending,e[95]=wt);let Tt;e[96]===_?Tt=e[97]:(Tt=(e,t)=>_.mutate({hostId:e.id,name:t},{onSuccess:()=>se(!1)}),e[96]=_,e[97]=Tt);let Et;e[98]!==_.isPending||e[99]!==St||e[100]!==Ct||e[101]!==wt||e[102]!==Tt?(Et=(0,z.jsx)(ve,{target:St,pending:_.isPending,errorMessage:Ct,onOpenChange:wt,onRename:Tt}),e[98]=_.isPending,e[99]=St,e[100]=Ct,e[101]=wt,e[102]=Tt,e[103]=Et):Et=e[103];let Dt=le?V:null,Ot;e[104]===a?Ot=e[105]:(Ot=()=>a(te(`machines`)),e[104]=a,e[105]=Ot);let kt;e[106]!==Dt||e[107]!==Ot?(kt=(0,z.jsx)(he,{target:Dt,onOpenChange:fe,onRemoved:Ot}),e[106]=Dt,e[107]=Ot,e[108]=kt):kt=e[108];let At=Ee?V:null,jt;e[109]===At?jt=e[110]:(jt=(0,z.jsx)(ge,{target:At,onOpenChange:ke}),e[109]=At,e[110]=jt);let Mt=pe?V:null,$;e[111]===Mt?$=e[112]:($=(0,z.jsx)(me,{target:Mt,onOpenChange:ye}),e[111]=Mt,e[112]=$);let Nt;return e[113]!==rt||e[114]!==xt||e[115]!==Et||e[116]!==kt||e[117]!==jt||e[118]!==$?(Nt=(0,z.jsxs)(rt,{contentClassName:`pt-4 md:pt-5`,children:[xt,Et,kt,jt,$]}),e[113]=rt,e[114]=xt,e[115]=Et,e[116]=kt,e[117]=jt,e[118]=$,e[119]=Nt):Nt=e[119],Nt}function Ie(e,t){return(0,z.jsxs)(`span`,{children:[t>0?` · `:``,(0,z.jsx)(i,{to:u(e.id),className:`hover:text-foreground`,children:e.name})]},e.id)}function Le(e){return(0,z.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[e.ProviderIcon?(0,z.jsx)(`span`,{"data-provider-icon":e.providerId,"aria-hidden":!0,className:`flex size-3.5 shrink-0 items-center justify-center`,children:e.provider===void 0?(0,z.jsx)(e.ProviderIcon,{className:`size-3.5`}):(0,z.jsx)(l,{provider:e.provider,icon:e.ProviderIcon,className:`size-3.5`})}):null,(0,z.jsx)(`span`,{children:e.displayName}),e.currentVersion?(0,z.jsx)(`span`,{children:e.currentVersion}):null]},e.providerId)}function Re(e){return{id:e.id,name:e.name}}function ze(e){return e.type===`persistent`}export{Fe as MachineSettingsView};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Dh as i,Fh as a}from"./index-CfvM6UcU.js";import{a as o,i as s,n as c,t as l}from"./audio-input-device-preference-D8tr0bqw.js";import{t as u}from"./WaveformVisualizer-C1SzIkiu.js";var d=n(),f=e(t(),1),p=e(r(),1);function m(e){let t=(0,d.c)(43),{open:n,onCaptureReady:r}=e,[m,_]=c(),{devices:v,refresh:y,isSupported:b,hasDeviceAccess:x}=s(),[S,C]=(0,f.useState)(null),[w,T]=(0,f.useState)(null),E,D;t[0]!==b||t[1]!==n||t[2]!==m||t[3]!==y?(E=()=>{if(!n||!b)return;let e=!1,t=null;return T(null),C(null),l(navigator.mediaDevices,m).then(n=>{if(e){n.getTracks().forEach(g);return}t=n,C(n),y()}).catch(t=>{e||T(t instanceof DOMException&&t.name===`NotAllowedError`?`Allow mic access in your settings.`:`Can't open this mic. Choose another.`)}),()=>{e=!0,t?.getTracks().forEach(h),C(null)}},D=[n,m,y,b],t[0]=b,t[1]=n,t[2]=m,t[3]=y,t[4]=E,t[5]=D):(E=t[4],D=t[5]),(0,f.useEffect)(E,D);let O,k;t[6]!==r||t[7]!==n||t[8]!==S?(O=()=>{n&&S&&r?.()},k=[n,S,r],t[6]=r,t[7]=n,t[8]=S,t[9]=O,t[10]=k):(O=t[9],k=t[10]),(0,f.useEffect)(O,k);let A=n?S:null,{silent:j}=o(A,!1),M;t[11]===A?M=t[12]:(M=A?.getAudioTracks()[0]?.label,t[11]=A,t[12]=M);let N=M,P;t[13]!==v||t[14]!==x||t[15]!==m?(P=x&&m!==null&&v.length>0&&!v.some(e=>e.deviceId===m),t[13]=v,t[14]=x,t[15]=m,t[16]=P):P=t[16];let F=P,I;t[17]!==N||t[18]!==w||t[19]!==b||t[20]!==n||t[21]!==j||t[22]!==A?(I=n?(0,p.jsxs)(`div`,{className:`space-y-2 rounded-lg border bg-muted/30 p-3`,"aria-label":`Live microphone preview`,children:[(0,p.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs text-muted-foreground`,children:[(0,p.jsx)(`span`,{className:`shrink-0 font-medium`,children:`Live preview`}),(0,p.jsx)(`span`,{className:`min-w-0 truncate`,title:N,children:w||!b?`Unavailable`:A?N||`Listening`:`Connecting…`})]}),(0,p.jsx)(u,{stream:A,active:n&&A!==null,className:`h-9 w-full`}),(0,p.jsx)(`p`,{role:`status`,className:`min-h-5 text-sm text-muted-foreground`,children:w??(b?A?j?`No audio detected. Try another mic.`:`Speak to check your microphone.`:`Connecting to microphone…`:`This browser can't use a mic.`)})]}):null,t[17]=N,t[18]=w,t[19]=b,t[20]=n,t[21]=j,t[22]=A,t[23]=I):I=t[23];let L;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,p.jsx)(`p`,{className:`px-1 text-xs font-medium text-muted-foreground`,children:`Input device`}),t[24]=L):L=t[24];let R;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(R={deviceId:null,label:`System default`},t[25]=R):R=t[25];let z;t[26]!==m||t[27]!==F?(z=F?[{deviceId:m,label:`Preferred microphone (unavailable)`}]:[],t[26]=m,t[27]=F,t[28]=z):z=t[28];let B;t[29]!==v||t[30]!==z?(B=[R,...z,...v],t[29]=v,t[30]=z,t[31]=B):B=t[31];let V;t[32]!==m||t[33]!==F||t[34]!==_||t[35]!==B?(V=(0,p.jsxs)(`div`,{className:`space-y-2`,children:[L,(0,p.jsx)(`div`,{role:`group`,"aria-label":`Microphone`,className:`max-h-64 space-y-1 overflow-y-auto rounded-lg border p-1`,children:B.map(e=>(0,p.jsxs)(`button`,{type:`button`,"aria-pressed":m===e.deviceId,disabled:F&&e.deviceId===m,onClick:()=>_(e.deviceId),className:a(`flex min-h-11 w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm transition-colors hover:bg-state-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:opacity-50`,m===e.deviceId&&`bg-state-active`),children:[(0,p.jsx)(i,{name:e.deviceId===null?`Laptop`:`Mic`,className:`size-4 shrink-0 text-muted-foreground`}),(0,p.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:e.label}),(0,p.jsx)(`span`,{className:`size-4 shrink-0`,"aria-hidden":`true`,children:m===e.deviceId?(0,p.jsx)(i,{name:`Check`,className:`size-4`}):null})]},e.deviceId??`system`))})]}),t[32]=m,t[33]=F,t[34]=_,t[35]=B,t[36]=V):V=t[36];let H;t[37]===F?H=t[38]:(H=F?(0,p.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Preferred microphone unavailable. Using another input until it returns.`}):null,t[37]=F,t[38]=H);let U;return t[39]!==V||t[40]!==H||t[41]!==I?(U=(0,p.jsxs)(`div`,{className:`space-y-4`,children:[I,V,H]}),t[39]=V,t[40]=H,t[41]=I,t[42]=U):U=t[42],U}function h(e){return e.stop()}function g(e){return e.stop()}export{m as MicrophonePreferences};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Dh as i,Fh as a}from"./index-DCps_qBD.js";import{a as o,i as s,n as c,t as l}from"./audio-input-device-preference-Civxk2e_.js";import{t as u}from"./WaveformVisualizer-CyOfIcDU.js";var d=n(),f=e(t(),1),p=e(r(),1);function m(e){let t=(0,d.c)(43),{open:n,onCaptureReady:r}=e,[m,_]=c(),{devices:v,refresh:y,isSupported:b,hasDeviceAccess:x}=s(),[S,C]=(0,f.useState)(null),[w,T]=(0,f.useState)(null),E,D;t[0]!==b||t[1]!==n||t[2]!==m||t[3]!==y?(E=()=>{if(!n||!b)return;let e=!1,t=null;return T(null),C(null),l(navigator.mediaDevices,m).then(n=>{if(e){n.getTracks().forEach(g);return}t=n,C(n),y()}).catch(t=>{e||T(t instanceof DOMException&&t.name===`NotAllowedError`?`Allow mic access in your settings.`:`Can't open this mic. Choose another.`)}),()=>{e=!0,t?.getTracks().forEach(h),C(null)}},D=[n,m,y,b],t[0]=b,t[1]=n,t[2]=m,t[3]=y,t[4]=E,t[5]=D):(E=t[4],D=t[5]),(0,f.useEffect)(E,D);let O,k;t[6]!==r||t[7]!==n||t[8]!==S?(O=()=>{n&&S&&r?.()},k=[n,S,r],t[6]=r,t[7]=n,t[8]=S,t[9]=O,t[10]=k):(O=t[9],k=t[10]),(0,f.useEffect)(O,k);let A=n?S:null,{silent:j}=o(A,!1),M;t[11]===A?M=t[12]:(M=A?.getAudioTracks()[0]?.label,t[11]=A,t[12]=M);let N=M,P;t[13]!==v||t[14]!==x||t[15]!==m?(P=x&&m!==null&&v.length>0&&!v.some(e=>e.deviceId===m),t[13]=v,t[14]=x,t[15]=m,t[16]=P):P=t[16];let F=P,I;t[17]!==N||t[18]!==w||t[19]!==b||t[20]!==n||t[21]!==j||t[22]!==A?(I=n?(0,p.jsxs)(`div`,{className:`space-y-2 rounded-lg border bg-muted/30 p-3`,"aria-label":`Live microphone preview`,children:[(0,p.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs text-muted-foreground`,children:[(0,p.jsx)(`span`,{className:`shrink-0 font-medium`,children:`Live preview`}),(0,p.jsx)(`span`,{className:`min-w-0 truncate`,title:N,children:w||!b?`Unavailable`:A?N||`Listening`:`Connecting…`})]}),(0,p.jsx)(u,{stream:A,active:n&&A!==null,className:`h-9 w-full`}),(0,p.jsx)(`p`,{role:`status`,className:`min-h-5 text-sm text-muted-foreground`,children:w??(b?A?j?`No audio detected. Try another mic.`:`Speak to check your microphone.`:`Connecting to microphone…`:`This browser can't use a mic.`)})]}):null,t[17]=N,t[18]=w,t[19]=b,t[20]=n,t[21]=j,t[22]=A,t[23]=I):I=t[23];let L;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,p.jsx)(`p`,{className:`px-1 text-xs font-medium text-muted-foreground`,children:`Input device`}),t[24]=L):L=t[24];let R;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(R={deviceId:null,label:`System default`},t[25]=R):R=t[25];let z;t[26]!==m||t[27]!==F?(z=F?[{deviceId:m,label:`Preferred microphone (unavailable)`}]:[],t[26]=m,t[27]=F,t[28]=z):z=t[28];let B;t[29]!==v||t[30]!==z?(B=[R,...z,...v],t[29]=v,t[30]=z,t[31]=B):B=t[31];let V;t[32]!==m||t[33]!==F||t[34]!==_||t[35]!==B?(V=(0,p.jsxs)(`div`,{className:`space-y-2`,children:[L,(0,p.jsx)(`div`,{role:`group`,"aria-label":`Microphone`,className:`max-h-64 space-y-1 overflow-y-auto rounded-lg border p-1`,children:B.map(e=>(0,p.jsxs)(`button`,{type:`button`,"aria-pressed":m===e.deviceId,disabled:F&&e.deviceId===m,onClick:()=>_(e.deviceId),className:a(`flex min-h-11 w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm transition-colors hover:bg-state-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:opacity-50`,m===e.deviceId&&`bg-state-active`),children:[(0,p.jsx)(i,{name:e.deviceId===null?`Laptop`:`Mic`,className:`size-4 shrink-0 text-muted-foreground`}),(0,p.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:e.label}),(0,p.jsx)(`span`,{className:`size-4 shrink-0`,"aria-hidden":`true`,children:m===e.deviceId?(0,p.jsx)(i,{name:`Check`,className:`size-4`}):null})]},e.deviceId??`system`))})]}),t[32]=m,t[33]=F,t[34]=_,t[35]=B,t[36]=V):V=t[36];let H;t[37]===F?H=t[38]:(H=F?(0,p.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Preferred microphone unavailable. Using another input until it returns.`}):null,t[37]=F,t[38]=H);let U;return t[39]!==V||t[40]!==H||t[41]!==I?(U=(0,p.jsxs)(`div`,{className:`space-y-4`,children:[I,V,H]}),t[39]=V,t[40]=H,t[41]=I,t[42]=U):U=t[42],U}function h(e){return e.stop()}function g(e){return e.stop()}export{m as MicrophonePreferences};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{It as t,J as n,Qt as r,X as i,Xn as a,Y as o,Yt as s,Z as c,Zt as l,hi as u,kr as d,ri as f}from"./boot-vendor-CKEhulXz.js";import{Dh as p,Dp as m,Fh as h,Ha as g,Ov as _,Ph as v,Ua as y,Va as b,_a as ee,ga as x,gp as te,va as S}from"./index-CfvM6UcU.js";import{t as C}from"./switch-BjJ8825r.js";import{a as w,i as T,o as E,r as D,s as O,t as k}from"./model-load-error-message-Dmp1hUNg.js";var A=d(),j=e(u(),1),M=e(f(),1),N=`Toggle`,P=j.forwardRef((e,n)=>{let{pressed:i,defaultPressed:a,onPressedChange:o,...c}=e,[l,u]=t({prop:i,onChange:o,defaultProp:a??!1,caller:N});return(0,M.jsx)(s.button,{type:`button`,"aria-pressed":l,"data-state":l?`on`:`off`,"data-disabled":e.disabled?``:void 0,...c,ref:n,onClick:r(e.onClick,()=>{e.disabled||u(!l)})})});P.displayName=N;var F=P,I=`ToggleGroup`,[L,R]=l(I,[i]),z=i(),B=j.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,M.jsx)(ne,{role:`radiogroup`,...r,ref:t});if(n===`multiple`)return(0,M.jsx)(re,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${I}\``)});B.displayName=I;var[V,H]=L(I),ne=j.forwardRef((e,n)=>{let{value:r,defaultValue:i,onValueChange:a=()=>{},...o}=e,[s,c]=t({prop:r,defaultProp:i??``,onChange:a,caller:I});return(0,M.jsx)(V,{scope:e.__scopeToggleGroup,type:`single`,value:j.useMemo(()=>s?[s]:[],[s]),onItemActivate:c,onItemDeactivate:j.useCallback(()=>c(``),[c]),children:(0,M.jsx)(W,{...o,ref:n})})}),re=j.forwardRef((e,n)=>{let{value:r,defaultValue:i,onValueChange:a=()=>{},...o}=e,[s,c]=t({prop:r,defaultProp:i??[],onChange:a,caller:I}),l=j.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=j.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,M.jsx)(V,{scope:e.__scopeToggleGroup,type:`multiple`,value:s,onItemActivate:l,onItemDeactivate:u,children:(0,M.jsx)(W,{...o,ref:n})})});B.displayName=I;var[U,ie]=L(I),W=j.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:l,loop:u=!0,...d}=e,f=z(n),p=c(l),m={dir:p,...d};return(0,M.jsx)(U,{scope:n,rovingFocus:i,disabled:r,children:i?(0,M.jsx)(o,{asChild:!0,...f,orientation:a,dir:p,loop:u,children:(0,M.jsx)(s.div,{...m,ref:t})}):(0,M.jsx)(s.div,{...m,ref:t})})}),G=`ToggleGroupItem`,K=j.forwardRef((e,t)=>{let r=H(G,e.__scopeToggleGroup),i=ie(G,e.__scopeToggleGroup),a=z(e.__scopeToggleGroup),o=r.value.includes(e.value),s=i.disabled||e.disabled,c={...e,pressed:o,disabled:s},l=j.useRef(null);return i.rovingFocus?(0,M.jsx)(n,{asChild:!0,...a,focusable:!s,active:o,ref:l,children:(0,M.jsx)(q,{...c,ref:t})}):(0,M.jsx)(q,{...c,ref:t})});K.displayName=G;var q=j.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=H(G,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,M.jsx)(P,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),J=a(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 px-2 min-w-9`,sm:`h-8 px-1.5 min-w-8`,lg:`h-10 px-2.5 min-w-10`}},defaultVariants:{variant:`default`,size:`default`}}),ae=j.forwardRef((e,t)=>{let n=(0,A.c)(13),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:r,variant:o,size:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s;n[5]!==r||n[6]!==a||n[7]!==o?(s=h(J({variant:o,size:a,className:r})),n[5]=r,n[6]=a,n[7]=o,n[8]=s):s=n[8];let c;return n[9]!==i||n[10]!==t||n[11]!==s?(c=(0,M.jsx)(F,{ref:t,className:s,...i}),n[9]=i,n[10]=t,n[11]=s,n[12]=c):c=n[12],c});ae.displayName=F.displayName;var oe=j.createContext({size:`default`,variant:`default`}),se=j.forwardRef((e,t)=>{let n=(0,A.c)(19),r,i,a,o,s;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5]):({className:i,variant:s,size:o,children:r,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s);let c;n[6]===i?c=n[7]:(c=h(`flex items-center justify-center gap-1`,i),n[6]=i,n[7]=c);let l;n[8]!==o||n[9]!==s?(l={variant:s,size:o},n[8]=o,n[9]=s,n[10]=l):l=n[10];let u;n[11]!==r||n[12]!==l?(u=(0,M.jsx)(oe.Provider,{value:l,children:r}),n[11]=r,n[12]=l,n[13]=u):u=n[13];let d;return n[14]!==a||n[15]!==t||n[16]!==c||n[17]!==u?(d=(0,M.jsx)(B,{ref:t,className:c,...a,children:u}),n[14]=a,n[15]=t,n[16]=c,n[17]=u,n[18]=d):d=n[18],d});se.displayName=B.displayName;var Y=j.forwardRef((e,t)=>{let n=(0,A.c)(17),r,i,a,o,s;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5]):({className:i,children:r,variant:s,size:o,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s);let c=j.useContext(oe),l;n[6]!==i||n[7]!==c.size||n[8]!==c.variant||n[9]!==o||n[10]!==s?(l=h(J({variant:c.variant||s,size:c.size||o}),i),n[6]=i,n[7]=c.size,n[8]=c.variant,n[9]=o,n[10]=s,n[11]=l):l=n[11];let u;return n[12]!==r||n[13]!==a||n[14]!==t||n[15]!==l?(u=(0,M.jsx)(K,{ref:t,className:l,...a,children:r}),n[12]=r,n[13]=a,n[14]=t,n[15]=l,n[16]=u):u=n[16],u});Y.displayName=K.displayName;function ce(e){let t=(0,A.c)(64),{listRef:n,providerId:r,provider:i,providerLabel:a,listboxId:o,optionId:s,modelIsLoading:c,isShowingModelError:l,hasModelOptions:u,modelLoadError:d,modelLoadFailed:f,navRows:g,highlightedIndex:y,isSearching:b,showMoreModels:x,onToggleMoreModels:te,moreModelOptions:S,moreModelsOpen:w,onMoreModelsOpenChange:T,isPreviewing:N,modelValue:P,selectionBlocked:F,onModelSelect:I,showReasoningSection:L,reasoningValue:R,reasoningOptions:z,onReasoningSelect:B,serviceTierOptions:V,serviceTierValue:H,onServiceTierChange:ne,agentSections:re,onAgentOptionChange:U,onStartHandoff:ie}=e,W=m(),G=i?.brandPrefix,K=V.length===1?V[0]:void 0,q=K?`${K.label} mode`:``,J=V.some(e=>e.id===H)?H:_,ae;t[0]===T?ae=t[1]:(ae=()=>{T(!0)},t[0]=T,t[1]=ae);let oe=ae,Y=r||`no-provider`,ce=o?`listbox`:void 0,ye=o?`Models`:void 0,be=!W&&`max-h-64`,X;t[2]===be?X=t[3]:(X=h(`min-h-0 flex-1 overflow-y-auto overscroll-contain px-1 pb-1 pt-0`,be),t[2]=be,t[3]=X);let Z;t[4]===l?Z=t[5]:(Z=l?null:(0,M.jsx)(me,{children:`Model`}),t[4]=l,t[5]=Z);let Q;t[6]!==G||t[7]!==u||t[8]!==y||t[9]!==W||t[10]!==N||t[11]!==b||t[12]!==o||t[13]!==c||t[14]!==d||t[15]!==f||t[16]!==P||t[17]!==S||t[18]!==w||t[19]!==g||t[20]!==I||t[21]!==T||t[22]!==te||t[23]!==oe||t[24]!==s||t[25]!==i||t[26]!==a||t[27]!==F||t[28]!==x?(Q=c?(0,M.jsx)(E,{label:`Loading models`,rowDataAttribute:`data-model-loading-row`}):u?(0,M.jsxs)(M.Fragment,{children:[g.map((e,t)=>{let n=y===t,r=s(t);if(e.kind===`more-toggle`)return(0,M.jsx)(he,{id:r,isActive:n,expanded:x,onToggle:te},`more-toggle`);let i=e.option;return(0,M.jsx)(_e,{id:r,role:o?`option`:void 0,isActive:n,label:O(i.label,G),qualifier:i.routeProviderId,selected:!N&&i.value===P,disabled:F||i.disabled===!0,disabledReason:i.disabledReason,onClick:()=>I(i.value)},i.value)}),!W&&!b&&S.length>0?(0,M.jsx)(ge,{open:w,onOpenChange:T,openSub:oe,activeBrandPrefix:G,isPreviewing:N,modelValue:P,options:S,onSelect:I}):null,b&&g.length===0?(0,M.jsx)(`div`,{className:h(`px-2 text-xs text-muted-foreground`,`py-[0.3125rem] max-md:pointer-coarse:py-2`),children:`No models match your search`}):null]}):(0,M.jsx)(`div`,{className:h(`px-2 text-xs leading-relaxed text-muted-foreground`,`pb-2 pt-1.5 max-md:pointer-coarse:pb-3 max-md:pointer-coarse:pt-2`),title:d?D({error:d,providerLabel:a}):void 0,children:d?(0,M.jsx)(k,{error:d,providerLabel:a,...i?.installUrl===void 0?{}:{installUrl:i.installUrl}}):f?`Could not load models.`:`No models available`}),t[6]=G,t[7]=u,t[8]=y,t[9]=W,t[10]=N,t[11]=b,t[12]=o,t[13]=c,t[14]=d,t[15]=f,t[16]=P,t[17]=S,t[18]=w,t[19]=g,t[20]=I,t[21]=T,t[22]=te,t[23]=oe,t[24]=s,t[25]=i,t[26]=a,t[27]=F,t[28]=x,t[29]=Q):Q=t[29];let $;t[30]!==n||t[31]!==o||t[32]!==Y||t[33]!==ce||t[34]!==ye||t[35]!==X||t[36]!==Z||t[37]!==Q?($=(0,M.jsxs)(`div`,{ref:n,role:ce,id:o,"aria-label":ye,className:X,children:[Z,Q]},Y),t[30]=n,t[31]=o,t[32]=Y,t[33]=ce,t[34]=ye,t[35]=X,t[36]=Z,t[37]=Q,t[38]=$):$=t[38];let xe;t[39]!==B||t[40]!==z||t[41]!==R||t[42]!==F||t[43]!==L?(xe=L?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsxs)(`div`,{className:`shrink-0 px-2 py-2.5`,children:[(0,M.jsx)(me,{className:`mb-2 px-1 py-0`,children:`Reasoning`}),(0,M.jsx)(se,{type:`single`,"aria-label":`Reasoning`,value:R,onValueChange:e=>{let t=z.find(t=>t.value===e);t&&B(t.value)},disabled:F,className:`flex gap-1`,children:z.map(pe)})]})]}):null,t[39]=B,t[40]=z,t[41]=R,t[42]=F,t[43]=L,t[44]=xe):xe=t[44];let Se;t[45]!==ne||t[46]!==J||t[47]!==V||t[48]!==K||t[49]!==q?(Se=K?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsx)(`div`,{className:`shrink-0 p-1`,children:(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-sm px-2 py-[0.3125rem] text-xs`,title:K.description,children:[(0,M.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(p,{name:`Zap`,className:`size-4 fill-current text-muted-foreground`}),(0,M.jsx)(`span`,{children:q})]}),(0,M.jsx)(C,{checked:J===K.id,onCheckedChange:e=>ne(e?K.id:_),"aria-label":q,className:h(v,`[&>span]:size-3.5`)})]})})]}):V.length>1?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsxs)(`div`,{className:`shrink-0 px-2 py-2.5`,children:[(0,M.jsx)(me,{className:`mb-2 px-1 py-0`,children:`Speed`}),(0,M.jsx)(se,{type:`single`,"aria-label":`Speed`,value:J,onValueChange:e=>{(e===`default`||V.some(t=>t.id===e))&&ne(e)},className:`flex flex-wrap gap-1`,children:[{id:_,label:`Default`},...V].map(fe)})]})]}):null,t[45]=ne,t[46]=J,t[47]=V,t[48]=K,t[49]=q,t[50]=Se):Se=t[50];let Ce;if(t[51]!==re||t[52]!==U){let e;t[54]===U?e=t[55]:(e=e=>{let t=e.appliesOnNextTurn?(0,M.jsx)(`span`,{className:`ml-1.5 font-normal text-subtle-foreground`,children:`from the next turn`}):null,n=e.items.find(de);return n===void 0?(0,M.jsxs)(j.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsxs)(`div`,{className:`shrink-0 px-2 py-2.5`,children:[(0,M.jsxs)(me,{className:`mb-2 px-1 py-0`,children:[e.label,t]}),(0,M.jsx)(se,{type:`single`,"aria-label":e.label,value:e.items.find(ue)?.key??``,onValueChange:t=>{let n=e.items.find(e=>e.key===t);n!==void 0&&U(e.id,n.value)},className:`flex flex-wrap gap-1`,children:e.items.map(le)})]})]},e.id):(0,M.jsxs)(j.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsx)(`div`,{className:`shrink-0 p-1`,children:(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-sm px-2 py-[0.3125rem] text-xs`,title:e.description??void 0,children:[(0,M.jsxs)(`span`,{className:`min-w-0 truncate`,children:[e.label,t]}),(0,M.jsx)(C,{checked:n.selected,onCheckedChange:t=>U(e.id,t),"aria-label":e.label,className:h(v,`[&>span]:size-3.5`)})]})})]},e.id)},t[54]=U,t[55]=e),Ce=re.map(e),t[51]=re,t[52]=U,t[53]=Ce}else Ce=t[53];let we;t[56]===ie?we=t[57]:(we=ie?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsx)(`div`,{className:`shrink-0 p-1`,children:(0,M.jsx)(ve,{label:`Handoff to new thread`,iconName:`MessageSquarePlus`,onClick:ie})})]}):null,t[56]=ie,t[57]=we);let Te;return t[58]!==xe||t[59]!==Se||t[60]!==Ce||t[61]!==we||t[62]!==$?(Te=(0,M.jsx)(ee,{children:(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[$,xe,Se,Ce,we]})}),t[58]=xe,t[59]=Se,t[60]=Ce,t[61]=we,t[62]=$,t[63]=Te):Te=t[63],Te}function le(e){return(0,M.jsx)(Y,{value:e.key,title:e.description??void 0,className:h(`h-6 min-w-0 flex-auto shrink-0 whitespace-nowrap rounded-sm px-1 text-xs font-normal shadow-none hover:bg-state-hover hover:text-foreground data-[state=on]:bg-state-active data-[state=on]:text-foreground data-[state=on]:hover:bg-state-active`,`max-md:pointer-coarse:h-9 max-md:pointer-coarse:text-sm`,v),children:e.label},e.key)}function ue(e){return e.selected}function de(e){return e.value===!0}function fe(e){return(0,M.jsx)(Y,{value:e.id,title:e.description,className:h(`h-6 min-w-0 flex-auto shrink-0 whitespace-nowrap rounded-sm px-1 text-xs font-normal shadow-none hover:bg-state-hover hover:text-foreground data-[state=on]:bg-state-active data-[state=on]:text-foreground data-[state=on]:hover:bg-state-active`,`max-md:pointer-coarse:h-9 max-md:pointer-coarse:text-sm`,v),children:e.label},e.id)}function pe(e){return(0,M.jsx)(Y,{value:e.value,"aria-label":e.label,className:h(`h-6 min-w-0 flex-auto shrink-0 whitespace-nowrap rounded-sm px-1 text-xs font-normal shadow-none hover:bg-state-hover hover:text-foreground data-[state=on]:bg-state-active data-[state=on]:text-foreground data-[state=on]:hover:bg-state-active`,`max-md:pointer-coarse:h-9 max-md:pointer-coarse:text-sm`,v),children:e.label===`Medium`||e.label===`Extra High`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`max-[360px]:hidden`,children:e.label}),(0,M.jsx)(`span`,{className:`hidden max-[360px]:inline`,children:e.label===`Medium`?`Med`:`XHigh`})]}):e.label},e.value)}function me(e){let t=(0,A.c)(5),{children:n,className:r}=e,i;t[0]===r?i=t[1]:(i=h(`sticky top-0 z-10 bg-background px-2 text-xs font-medium text-muted-foreground`,`pb-[0.3125rem] pt-2 max-md:pointer-coarse:pb-1.5`,r),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,M.jsx)(`div`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function he(e){let t=(0,A.c)(14),{expanded:n,onToggle:r,isActive:i,id:a}=e,{hoverProps:o}=S(),s=i&&`bg-state-active`,c;t[0]===s?c=t[1]:(c=h(`relative flex w-full cursor-default select-none items-center gap-1 rounded-sm px-2 text-xs text-muted-foreground outline-none hover:bg-state-hover hover:text-foreground`,v,x,s,`py-[0.3125rem] max-md:pointer-coarse:py-2`),t[0]=s,t[1]=c);let l=n?`Fewer models`:`More models`,u;t[2]===l?u=t[3]:(u=(0,M.jsx)(`span`,{children:l}),t[2]=l,t[3]=u);let d=n?`ChevronUp`:`ChevronDown`,f;t[4]===d?f=t[5]:(f=(0,M.jsx)(p,{name:d,className:`size-3.5 shrink-0`}),t[4]=d,t[5]=f);let m;return t[6]!==n||t[7]!==o||t[8]!==a||t[9]!==r||t[10]!==c||t[11]!==u||t[12]!==f?(m=(0,M.jsxs)(`button`,{type:`button`,id:a,onClick:r,"aria-expanded":n,className:c,...o,children:[u,f]}),t[6]=n,t[7]=o,t[8]=a,t[9]=r,t[10]=c,t[11]=u,t[12]=f,t[13]=m):m=t[13],m}function ge(e){let t=(0,A.c)(46),{open:n,onOpenChange:r,openSub:i,activeBrandPrefix:a,isPreviewing:o,modelValue:s,options:c,onSelect:l}=e,{isLastHovered:u,hoverProps:d}=S(),f=(0,j.useRef)(null),m=(0,j.useRef)(null),_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>{window.setTimeout(()=>{m.current?.querySelector(`button`)?.focus()},0)},t[0]=_):_=t[0];let te=_,C,w;t[1]!==u||t[2]!==r||t[3]!==n?(C=()=>{n&&!u&&r(!1)},w=[n,u,r],t[1]=u,t[2]=r,t[3]=n,t[4]=C,t[5]=w):(C=t[4],w=t[5]),(0,j.useEffect)(C,w);let E;t[6]!==d||t[7]!==i?(E=e=>{d.onPointerEnter(e),i()},t[6]=d,t[7]=i,t[8]=E):E=t[8];let D;t[9]!==d||t[10]!==r||t[11]!==i?(D=e=>{if(d.onKeyDown(e),e.key===`Enter`||e.key===` `||e.key===`Spacebar`||e.key===`ArrowRight`){e.preventDefault(),i(),te();return}(e.key===`Escape`||e.key===`ArrowLeft`)&&(e.preventDefault(),r(!1))},t[9]=d,t[10]=r,t[11]=i,t[12]=D):D=t[12];let k;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(k=h(`relative flex w-full cursor-default select-none items-center gap-1 rounded-sm px-2 py-[0.3125rem] text-xs text-muted-foreground outline-none hover:bg-state-hover hover:text-foreground`,v,x),t[13]=k):k=t[13];let N=d[`data-last-hovered`],P,F;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,M.jsx)(`span`,{children:`More models`}),F=(0,M.jsx)(p,{name:`ChevronRight`,className:`size-3.5 shrink-0`}),t[14]=P,t[15]=F):(P=t[14],F=t[15]);let I;t[16]!==n||t[17]!==i||t[18]!==E||t[19]!==D||t[20]!==N?(I=(0,M.jsx)(g,{asChild:!0,children:(0,M.jsxs)(`button`,{ref:f,type:`button`,"aria-haspopup":`menu`,"aria-expanded":n,onClick:i,onPointerEnter:E,onKeyDown:D,className:k,"data-last-hovered":N,children:[P,F]})}),t[16]=n,t[17]=i,t[18]=E,t[19]=D,t[20]=N,t[21]=I):I=t[21];let L;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(L=h(`max-h-[min(20rem,var(--radix-popover-content-available-height),calc(100dvh-0.5rem))] overflow-y-auto overscroll-contain p-1 data-[state=closed]:animate-none`,T),t[22]=L):L=t[22];let R;t[23]===r?R=t[24]:(R=e=>{(e.key===`Escape`||e.key===`ArrowLeft`)&&(e.preventDefault(),r(!1),f.current?.focus())},t[23]=r,t[24]=R);let z;if(t[25]!==a||t[26]!==o||t[27]!==s||t[28]!==l||t[29]!==c){let e;t[31]!==a||t[32]!==o||t[33]!==s||t[34]!==l?(e=e=>(0,M.jsx)(_e,{label:O(e.label,a),qualifier:e.routeProviderId,selected:!o&&e.value===s,onClick:()=>l(e.value)},e.value),t[31]=a,t[32]=o,t[33]=s,t[34]=l,t[35]=e):e=t[35],z=c.map(e),t[25]=a,t[26]=o,t[27]=s,t[28]=l,t[29]=c,t[30]=z}else z=t[30];let B;t[36]===z?B=t[37]:(B=(0,M.jsx)(ee,{children:z}),t[36]=z,t[37]=B);let V;t[38]!==R||t[39]!==B?(V=(0,M.jsx)(y,{ref:m,side:`right`,align:`start`,sideOffset:6,className:L,onKeyDown:R,children:B}),t[38]=R,t[39]=B,t[40]=V):V=t[40];let H;return t[41]!==r||t[42]!==n||t[43]!==I||t[44]!==V?(H=(0,M.jsxs)(b,{open:n,onOpenChange:r,children:[I,V]}),t[41]=r,t[42]=n,t[43]=I,t[44]=V,t[45]=H):H=t[45],H}function _e(e){let t=(0,A.c)(28),{label:n,qualifier:r,selected:i,disabled:a,disabledReason:o,onClick:s,isActive:c,id:l,role:u}=e,d=a===void 0?!1:a,{hoverProps:f}=S(),m;t[0]===n?m=t[1]:(m=w(n),t[0]=n,t[1]=m);let{base:g,tag:_}=m,y=u===`option`?!!c:void 0,b=c&&`bg-state-active`,ee=d&&`cursor-not-allowed opacity-60`,C;t[2]!==b||t[3]!==ee?(C=h(`relative flex w-full cursor-default select-none items-center justify-between gap-3 rounded-sm px-2 text-xs outline-none hover:bg-state-hover hover:text-foreground`,v,x,b,ee,`py-[0.3125rem] max-md:pointer-coarse:py-2`),t[2]=b,t[3]=ee,t[4]=C):C=t[4];let T=o??(r?`${n} · ${r}`:n),E;t[5]===_?E=t[6]:(E=_?(0,M.jsx)(`span`,{className:`ml-1.5 text-subtle-foreground`,children:_}):null,t[5]=_,t[6]=E);let D;t[7]===r?D=t[8]:(D=r?(0,M.jsx)(`span`,{className:`ml-1.5 text-subtle-foreground`,children:r}):null,t[7]=r,t[8]=D);let O;t[9]!==g||t[10]!==T||t[11]!==E||t[12]!==D?(O=(0,M.jsxs)(`span`,{className:`truncate`,title:T,children:[g,E,D]}),t[9]=g,t[10]=T,t[11]=E,t[12]=D,t[13]=O):O=t[13];let k=i?`opacity-100`:`opacity-0`,j;t[14]===k?j=t[15]:(j=h(te,`text-subtle-foreground`,k),t[14]=k,t[15]=j);let N;t[16]===j?N=t[17]:(N=(0,M.jsx)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:(0,M.jsx)(p,{name:`Check`,className:j})}),t[16]=j,t[17]=N);let P;return t[18]!==d||t[19]!==f||t[20]!==l||t[21]!==s||t[22]!==u||t[23]!==O||t[24]!==N||t[25]!==y||t[26]!==C?(P=(0,M.jsxs)(`button`,{type:`button`,id:l,role:u,disabled:d,"aria-selected":y,onClick:s,className:C,...f,children:[O,N]}),t[18]=d,t[19]=f,t[20]=l,t[21]=s,t[22]=u,t[23]=O,t[24]=N,t[25]=y,t[26]=C,t[27]=P):P=t[27],P}function ve(e){let t=(0,A.c)(10),{label:n,iconName:r,onClick:i}=e,{hoverProps:a}=S(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=h(`relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 text-xs outline-none hover:bg-state-hover hover:text-foreground`,v,x,`py-[0.3125rem] max-md:pointer-coarse:py-2`),t[0]=o):o=t[0];let s;t[1]===r?s=t[2]:(s=(0,M.jsx)(p,{name:r,className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[1]=r,t[2]=s);let c;t[3]===n?c=t[4]:(c=(0,M.jsx)(`span`,{className:`min-w-0 truncate`,children:n}),t[3]=n,t[4]=c);let l;return t[5]!==a||t[6]!==i||t[7]!==s||t[8]!==c?(l=(0,M.jsxs)(`button`,{type:`button`,onClick:i,className:o,...a,children:[s,c]}),t[5]=a,t[6]=i,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}export{ce as ModelReasoningMenu};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{It as t,J as n,Qt as r,X as i,Xn as a,Y as o,Yt as s,Z as c,Zt as l,hi as u,kr as d,ri as f}from"./boot-vendor-CKEhulXz.js";import{Dh as p,Dp as m,Fh as h,Ha as g,Ov as _,Ph as v,Ua as y,Va as b,_a as ee,ga as x,gp as te,va as S}from"./index-DCps_qBD.js";import{t as C}from"./switch-BRYzbFH-.js";import{a as w,i as T,o as E,r as D,s as O,t as k}from"./model-load-error-message-CH_k4E7q.js";var A=d(),j=e(u(),1),M=e(f(),1),N=`Toggle`,P=j.forwardRef((e,n)=>{let{pressed:i,defaultPressed:a,onPressedChange:o,...c}=e,[l,u]=t({prop:i,onChange:o,defaultProp:a??!1,caller:N});return(0,M.jsx)(s.button,{type:`button`,"aria-pressed":l,"data-state":l?`on`:`off`,"data-disabled":e.disabled?``:void 0,...c,ref:n,onClick:r(e.onClick,()=>{e.disabled||u(!l)})})});P.displayName=N;var F=P,I=`ToggleGroup`,[L,R]=l(I,[i]),z=i(),B=j.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,M.jsx)(ne,{role:`radiogroup`,...r,ref:t});if(n===`multiple`)return(0,M.jsx)(re,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${I}\``)});B.displayName=I;var[V,H]=L(I),ne=j.forwardRef((e,n)=>{let{value:r,defaultValue:i,onValueChange:a=()=>{},...o}=e,[s,c]=t({prop:r,defaultProp:i??``,onChange:a,caller:I});return(0,M.jsx)(V,{scope:e.__scopeToggleGroup,type:`single`,value:j.useMemo(()=>s?[s]:[],[s]),onItemActivate:c,onItemDeactivate:j.useCallback(()=>c(``),[c]),children:(0,M.jsx)(W,{...o,ref:n})})}),re=j.forwardRef((e,n)=>{let{value:r,defaultValue:i,onValueChange:a=()=>{},...o}=e,[s,c]=t({prop:r,defaultProp:i??[],onChange:a,caller:I}),l=j.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=j.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,M.jsx)(V,{scope:e.__scopeToggleGroup,type:`multiple`,value:s,onItemActivate:l,onItemDeactivate:u,children:(0,M.jsx)(W,{...o,ref:n})})});B.displayName=I;var[U,ie]=L(I),W=j.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:l,loop:u=!0,...d}=e,f=z(n),p=c(l),m={dir:p,...d};return(0,M.jsx)(U,{scope:n,rovingFocus:i,disabled:r,children:i?(0,M.jsx)(o,{asChild:!0,...f,orientation:a,dir:p,loop:u,children:(0,M.jsx)(s.div,{...m,ref:t})}):(0,M.jsx)(s.div,{...m,ref:t})})}),G=`ToggleGroupItem`,K=j.forwardRef((e,t)=>{let r=H(G,e.__scopeToggleGroup),i=ie(G,e.__scopeToggleGroup),a=z(e.__scopeToggleGroup),o=r.value.includes(e.value),s=i.disabled||e.disabled,c={...e,pressed:o,disabled:s},l=j.useRef(null);return i.rovingFocus?(0,M.jsx)(n,{asChild:!0,...a,focusable:!s,active:o,ref:l,children:(0,M.jsx)(q,{...c,ref:t})}):(0,M.jsx)(q,{...c,ref:t})});K.displayName=G;var q=j.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=H(G,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,M.jsx)(P,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),J=a(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 px-2 min-w-9`,sm:`h-8 px-1.5 min-w-8`,lg:`h-10 px-2.5 min-w-10`}},defaultVariants:{variant:`default`,size:`default`}}),ae=j.forwardRef((e,t)=>{let n=(0,A.c)(13),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:r,variant:o,size:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s;n[5]!==r||n[6]!==a||n[7]!==o?(s=h(J({variant:o,size:a,className:r})),n[5]=r,n[6]=a,n[7]=o,n[8]=s):s=n[8];let c;return n[9]!==i||n[10]!==t||n[11]!==s?(c=(0,M.jsx)(F,{ref:t,className:s,...i}),n[9]=i,n[10]=t,n[11]=s,n[12]=c):c=n[12],c});ae.displayName=F.displayName;var oe=j.createContext({size:`default`,variant:`default`}),se=j.forwardRef((e,t)=>{let n=(0,A.c)(19),r,i,a,o,s;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5]):({className:i,variant:s,size:o,children:r,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s);let c;n[6]===i?c=n[7]:(c=h(`flex items-center justify-center gap-1`,i),n[6]=i,n[7]=c);let l;n[8]!==o||n[9]!==s?(l={variant:s,size:o},n[8]=o,n[9]=s,n[10]=l):l=n[10];let u;n[11]!==r||n[12]!==l?(u=(0,M.jsx)(oe.Provider,{value:l,children:r}),n[11]=r,n[12]=l,n[13]=u):u=n[13];let d;return n[14]!==a||n[15]!==t||n[16]!==c||n[17]!==u?(d=(0,M.jsx)(B,{ref:t,className:c,...a,children:u}),n[14]=a,n[15]=t,n[16]=c,n[17]=u,n[18]=d):d=n[18],d});se.displayName=B.displayName;var Y=j.forwardRef((e,t)=>{let n=(0,A.c)(17),r,i,a,o,s;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5]):({className:i,children:r,variant:s,size:o,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s);let c=j.useContext(oe),l;n[6]!==i||n[7]!==c.size||n[8]!==c.variant||n[9]!==o||n[10]!==s?(l=h(J({variant:c.variant||s,size:c.size||o}),i),n[6]=i,n[7]=c.size,n[8]=c.variant,n[9]=o,n[10]=s,n[11]=l):l=n[11];let u;return n[12]!==r||n[13]!==a||n[14]!==t||n[15]!==l?(u=(0,M.jsx)(K,{ref:t,className:l,...a,children:r}),n[12]=r,n[13]=a,n[14]=t,n[15]=l,n[16]=u):u=n[16],u});Y.displayName=K.displayName;function ce(e){let t=(0,A.c)(64),{listRef:n,providerId:r,provider:i,providerLabel:a,listboxId:o,optionId:s,modelIsLoading:c,isShowingModelError:l,hasModelOptions:u,modelLoadError:d,modelLoadFailed:f,navRows:g,highlightedIndex:y,isSearching:b,showMoreModels:x,onToggleMoreModels:te,moreModelOptions:S,moreModelsOpen:w,onMoreModelsOpenChange:T,isPreviewing:N,modelValue:P,selectionBlocked:F,onModelSelect:I,showReasoningSection:L,reasoningValue:R,reasoningOptions:z,onReasoningSelect:B,serviceTierOptions:V,serviceTierValue:H,onServiceTierChange:ne,agentSections:re,onAgentOptionChange:U,onStartHandoff:ie}=e,W=m(),G=i?.brandPrefix,K=V.length===1?V[0]:void 0,q=K?`${K.label} mode`:``,J=V.some(e=>e.id===H)?H:_,ae;t[0]===T?ae=t[1]:(ae=()=>{T(!0)},t[0]=T,t[1]=ae);let oe=ae,Y=r||`no-provider`,ce=o?`listbox`:void 0,ye=o?`Models`:void 0,be=!W&&`max-h-64`,X;t[2]===be?X=t[3]:(X=h(`min-h-0 flex-1 overflow-y-auto overscroll-contain px-1 pb-1 pt-0`,be),t[2]=be,t[3]=X);let Z;t[4]===l?Z=t[5]:(Z=l?null:(0,M.jsx)(me,{children:`Model`}),t[4]=l,t[5]=Z);let Q;t[6]!==G||t[7]!==u||t[8]!==y||t[9]!==W||t[10]!==N||t[11]!==b||t[12]!==o||t[13]!==c||t[14]!==d||t[15]!==f||t[16]!==P||t[17]!==S||t[18]!==w||t[19]!==g||t[20]!==I||t[21]!==T||t[22]!==te||t[23]!==oe||t[24]!==s||t[25]!==i||t[26]!==a||t[27]!==F||t[28]!==x?(Q=c?(0,M.jsx)(E,{label:`Loading models`,rowDataAttribute:`data-model-loading-row`}):u?(0,M.jsxs)(M.Fragment,{children:[g.map((e,t)=>{let n=y===t,r=s(t);if(e.kind===`more-toggle`)return(0,M.jsx)(he,{id:r,isActive:n,expanded:x,onToggle:te},`more-toggle`);let i=e.option;return(0,M.jsx)(_e,{id:r,role:o?`option`:void 0,isActive:n,label:O(i.label,G),qualifier:i.routeProviderId,selected:!N&&i.value===P,disabled:F||i.disabled===!0,disabledReason:i.disabledReason,onClick:()=>I(i.value)},i.value)}),!W&&!b&&S.length>0?(0,M.jsx)(ge,{open:w,onOpenChange:T,openSub:oe,activeBrandPrefix:G,isPreviewing:N,modelValue:P,options:S,onSelect:I}):null,b&&g.length===0?(0,M.jsx)(`div`,{className:h(`px-2 text-xs text-muted-foreground`,`py-[0.3125rem] max-md:pointer-coarse:py-2`),children:`No models match your search`}):null]}):(0,M.jsx)(`div`,{className:h(`px-2 text-xs leading-relaxed text-muted-foreground`,`pb-2 pt-1.5 max-md:pointer-coarse:pb-3 max-md:pointer-coarse:pt-2`),title:d?D({error:d,providerLabel:a}):void 0,children:d?(0,M.jsx)(k,{error:d,providerLabel:a,...i?.installUrl===void 0?{}:{installUrl:i.installUrl}}):f?`Could not load models.`:`No models available`}),t[6]=G,t[7]=u,t[8]=y,t[9]=W,t[10]=N,t[11]=b,t[12]=o,t[13]=c,t[14]=d,t[15]=f,t[16]=P,t[17]=S,t[18]=w,t[19]=g,t[20]=I,t[21]=T,t[22]=te,t[23]=oe,t[24]=s,t[25]=i,t[26]=a,t[27]=F,t[28]=x,t[29]=Q):Q=t[29];let $;t[30]!==n||t[31]!==o||t[32]!==Y||t[33]!==ce||t[34]!==ye||t[35]!==X||t[36]!==Z||t[37]!==Q?($=(0,M.jsxs)(`div`,{ref:n,role:ce,id:o,"aria-label":ye,className:X,children:[Z,Q]},Y),t[30]=n,t[31]=o,t[32]=Y,t[33]=ce,t[34]=ye,t[35]=X,t[36]=Z,t[37]=Q,t[38]=$):$=t[38];let xe;t[39]!==B||t[40]!==z||t[41]!==R||t[42]!==F||t[43]!==L?(xe=L?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsxs)(`div`,{className:`shrink-0 px-2 py-2.5`,children:[(0,M.jsx)(me,{className:`mb-2 px-1 py-0`,children:`Reasoning`}),(0,M.jsx)(se,{type:`single`,"aria-label":`Reasoning`,value:R,onValueChange:e=>{let t=z.find(t=>t.value===e);t&&B(t.value)},disabled:F,className:`flex gap-1`,children:z.map(pe)})]})]}):null,t[39]=B,t[40]=z,t[41]=R,t[42]=F,t[43]=L,t[44]=xe):xe=t[44];let Se;t[45]!==ne||t[46]!==J||t[47]!==V||t[48]!==K||t[49]!==q?(Se=K?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsx)(`div`,{className:`shrink-0 p-1`,children:(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-sm px-2 py-[0.3125rem] text-xs`,title:K.description,children:[(0,M.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(p,{name:`Zap`,className:`size-4 fill-current text-muted-foreground`}),(0,M.jsx)(`span`,{children:q})]}),(0,M.jsx)(C,{checked:J===K.id,onCheckedChange:e=>ne(e?K.id:_),"aria-label":q,className:h(v,`[&>span]:size-3.5`)})]})})]}):V.length>1?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsxs)(`div`,{className:`shrink-0 px-2 py-2.5`,children:[(0,M.jsx)(me,{className:`mb-2 px-1 py-0`,children:`Speed`}),(0,M.jsx)(se,{type:`single`,"aria-label":`Speed`,value:J,onValueChange:e=>{(e===`default`||V.some(t=>t.id===e))&&ne(e)},className:`flex flex-wrap gap-1`,children:[{id:_,label:`Default`},...V].map(fe)})]})]}):null,t[45]=ne,t[46]=J,t[47]=V,t[48]=K,t[49]=q,t[50]=Se):Se=t[50];let Ce;if(t[51]!==re||t[52]!==U){let e;t[54]===U?e=t[55]:(e=e=>{let t=e.appliesOnNextTurn?(0,M.jsx)(`span`,{className:`ml-1.5 font-normal text-subtle-foreground`,children:`from the next turn`}):null,n=e.items.find(de);return n===void 0?(0,M.jsxs)(j.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsxs)(`div`,{className:`shrink-0 px-2 py-2.5`,children:[(0,M.jsxs)(me,{className:`mb-2 px-1 py-0`,children:[e.label,t]}),(0,M.jsx)(se,{type:`single`,"aria-label":e.label,value:e.items.find(ue)?.key??``,onValueChange:t=>{let n=e.items.find(e=>e.key===t);n!==void 0&&U(e.id,n.value)},className:`flex flex-wrap gap-1`,children:e.items.map(le)})]})]},e.id):(0,M.jsxs)(j.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsx)(`div`,{className:`shrink-0 p-1`,children:(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-sm px-2 py-[0.3125rem] text-xs`,title:e.description??void 0,children:[(0,M.jsxs)(`span`,{className:`min-w-0 truncate`,children:[e.label,t]}),(0,M.jsx)(C,{checked:n.selected,onCheckedChange:t=>U(e.id,t),"aria-label":e.label,className:h(v,`[&>span]:size-3.5`)})]})})]},e.id)},t[54]=U,t[55]=e),Ce=re.map(e),t[51]=re,t[52]=U,t[53]=Ce}else Ce=t[53];let we;t[56]===ie?we=t[57]:(we=ie?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,M.jsx)(`div`,{className:`shrink-0 p-1`,children:(0,M.jsx)(ve,{label:`Handoff to new thread`,iconName:`MessageSquarePlus`,onClick:ie})})]}):null,t[56]=ie,t[57]=we);let Te;return t[58]!==xe||t[59]!==Se||t[60]!==Ce||t[61]!==we||t[62]!==$?(Te=(0,M.jsx)(ee,{children:(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[$,xe,Se,Ce,we]})}),t[58]=xe,t[59]=Se,t[60]=Ce,t[61]=we,t[62]=$,t[63]=Te):Te=t[63],Te}function le(e){return(0,M.jsx)(Y,{value:e.key,title:e.description??void 0,className:h(`h-6 min-w-0 flex-auto shrink-0 whitespace-nowrap rounded-sm px-1 text-xs font-normal shadow-none hover:bg-state-hover hover:text-foreground data-[state=on]:bg-state-active data-[state=on]:text-foreground data-[state=on]:hover:bg-state-active`,`max-md:pointer-coarse:h-9 max-md:pointer-coarse:text-sm`,v),children:e.label},e.key)}function ue(e){return e.selected}function de(e){return e.value===!0}function fe(e){return(0,M.jsx)(Y,{value:e.id,title:e.description,className:h(`h-6 min-w-0 flex-auto shrink-0 whitespace-nowrap rounded-sm px-1 text-xs font-normal shadow-none hover:bg-state-hover hover:text-foreground data-[state=on]:bg-state-active data-[state=on]:text-foreground data-[state=on]:hover:bg-state-active`,`max-md:pointer-coarse:h-9 max-md:pointer-coarse:text-sm`,v),children:e.label},e.id)}function pe(e){return(0,M.jsx)(Y,{value:e.value,"aria-label":e.label,className:h(`h-6 min-w-0 flex-auto shrink-0 whitespace-nowrap rounded-sm px-1 text-xs font-normal shadow-none hover:bg-state-hover hover:text-foreground data-[state=on]:bg-state-active data-[state=on]:text-foreground data-[state=on]:hover:bg-state-active`,`max-md:pointer-coarse:h-9 max-md:pointer-coarse:text-sm`,v),children:e.label===`Medium`||e.label===`Extra High`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`max-[360px]:hidden`,children:e.label}),(0,M.jsx)(`span`,{className:`hidden max-[360px]:inline`,children:e.label===`Medium`?`Med`:`XHigh`})]}):e.label},e.value)}function me(e){let t=(0,A.c)(5),{children:n,className:r}=e,i;t[0]===r?i=t[1]:(i=h(`sticky top-0 z-10 bg-background px-2 text-xs font-medium text-muted-foreground`,`pb-[0.3125rem] pt-2 max-md:pointer-coarse:pb-1.5`,r),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,M.jsx)(`div`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function he(e){let t=(0,A.c)(14),{expanded:n,onToggle:r,isActive:i,id:a}=e,{hoverProps:o}=S(),s=i&&`bg-state-active`,c;t[0]===s?c=t[1]:(c=h(`relative flex w-full cursor-default select-none items-center gap-1 rounded-sm px-2 text-xs text-muted-foreground outline-none hover:bg-state-hover hover:text-foreground`,v,x,s,`py-[0.3125rem] max-md:pointer-coarse:py-2`),t[0]=s,t[1]=c);let l=n?`Fewer models`:`More models`,u;t[2]===l?u=t[3]:(u=(0,M.jsx)(`span`,{children:l}),t[2]=l,t[3]=u);let d=n?`ChevronUp`:`ChevronDown`,f;t[4]===d?f=t[5]:(f=(0,M.jsx)(p,{name:d,className:`size-3.5 shrink-0`}),t[4]=d,t[5]=f);let m;return t[6]!==n||t[7]!==o||t[8]!==a||t[9]!==r||t[10]!==c||t[11]!==u||t[12]!==f?(m=(0,M.jsxs)(`button`,{type:`button`,id:a,onClick:r,"aria-expanded":n,className:c,...o,children:[u,f]}),t[6]=n,t[7]=o,t[8]=a,t[9]=r,t[10]=c,t[11]=u,t[12]=f,t[13]=m):m=t[13],m}function ge(e){let t=(0,A.c)(46),{open:n,onOpenChange:r,openSub:i,activeBrandPrefix:a,isPreviewing:o,modelValue:s,options:c,onSelect:l}=e,{isLastHovered:u,hoverProps:d}=S(),f=(0,j.useRef)(null),m=(0,j.useRef)(null),_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>{window.setTimeout(()=>{m.current?.querySelector(`button`)?.focus()},0)},t[0]=_):_=t[0];let te=_,C,w;t[1]!==u||t[2]!==r||t[3]!==n?(C=()=>{n&&!u&&r(!1)},w=[n,u,r],t[1]=u,t[2]=r,t[3]=n,t[4]=C,t[5]=w):(C=t[4],w=t[5]),(0,j.useEffect)(C,w);let E;t[6]!==d||t[7]!==i?(E=e=>{d.onPointerEnter(e),i()},t[6]=d,t[7]=i,t[8]=E):E=t[8];let D;t[9]!==d||t[10]!==r||t[11]!==i?(D=e=>{if(d.onKeyDown(e),e.key===`Enter`||e.key===` `||e.key===`Spacebar`||e.key===`ArrowRight`){e.preventDefault(),i(),te();return}(e.key===`Escape`||e.key===`ArrowLeft`)&&(e.preventDefault(),r(!1))},t[9]=d,t[10]=r,t[11]=i,t[12]=D):D=t[12];let k;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(k=h(`relative flex w-full cursor-default select-none items-center gap-1 rounded-sm px-2 py-[0.3125rem] text-xs text-muted-foreground outline-none hover:bg-state-hover hover:text-foreground`,v,x),t[13]=k):k=t[13];let N=d[`data-last-hovered`],P,F;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,M.jsx)(`span`,{children:`More models`}),F=(0,M.jsx)(p,{name:`ChevronRight`,className:`size-3.5 shrink-0`}),t[14]=P,t[15]=F):(P=t[14],F=t[15]);let I;t[16]!==n||t[17]!==i||t[18]!==E||t[19]!==D||t[20]!==N?(I=(0,M.jsx)(g,{asChild:!0,children:(0,M.jsxs)(`button`,{ref:f,type:`button`,"aria-haspopup":`menu`,"aria-expanded":n,onClick:i,onPointerEnter:E,onKeyDown:D,className:k,"data-last-hovered":N,children:[P,F]})}),t[16]=n,t[17]=i,t[18]=E,t[19]=D,t[20]=N,t[21]=I):I=t[21];let L;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(L=h(`max-h-[min(20rem,var(--radix-popover-content-available-height),calc(100dvh-0.5rem))] overflow-y-auto overscroll-contain p-1 data-[state=closed]:animate-none`,T),t[22]=L):L=t[22];let R;t[23]===r?R=t[24]:(R=e=>{(e.key===`Escape`||e.key===`ArrowLeft`)&&(e.preventDefault(),r(!1),f.current?.focus())},t[23]=r,t[24]=R);let z;if(t[25]!==a||t[26]!==o||t[27]!==s||t[28]!==l||t[29]!==c){let e;t[31]!==a||t[32]!==o||t[33]!==s||t[34]!==l?(e=e=>(0,M.jsx)(_e,{label:O(e.label,a),qualifier:e.routeProviderId,selected:!o&&e.value===s,onClick:()=>l(e.value)},e.value),t[31]=a,t[32]=o,t[33]=s,t[34]=l,t[35]=e):e=t[35],z=c.map(e),t[25]=a,t[26]=o,t[27]=s,t[28]=l,t[29]=c,t[30]=z}else z=t[30];let B;t[36]===z?B=t[37]:(B=(0,M.jsx)(ee,{children:z}),t[36]=z,t[37]=B);let V;t[38]!==R||t[39]!==B?(V=(0,M.jsx)(y,{ref:m,side:`right`,align:`start`,sideOffset:6,className:L,onKeyDown:R,children:B}),t[38]=R,t[39]=B,t[40]=V):V=t[40];let H;return t[41]!==r||t[42]!==n||t[43]!==I||t[44]!==V?(H=(0,M.jsxs)(b,{open:n,onOpenChange:r,children:[I,V]}),t[41]=r,t[42]=n,t[43]=I,t[44]=V,t[45]=H):H=t[45],H}function _e(e){let t=(0,A.c)(28),{label:n,qualifier:r,selected:i,disabled:a,disabledReason:o,onClick:s,isActive:c,id:l,role:u}=e,d=a===void 0?!1:a,{hoverProps:f}=S(),m;t[0]===n?m=t[1]:(m=w(n),t[0]=n,t[1]=m);let{base:g,tag:_}=m,y=u===`option`?!!c:void 0,b=c&&`bg-state-active`,ee=d&&`cursor-not-allowed opacity-60`,C;t[2]!==b||t[3]!==ee?(C=h(`relative flex w-full cursor-default select-none items-center justify-between gap-3 rounded-sm px-2 text-xs outline-none hover:bg-state-hover hover:text-foreground`,v,x,b,ee,`py-[0.3125rem] max-md:pointer-coarse:py-2`),t[2]=b,t[3]=ee,t[4]=C):C=t[4];let T=o??(r?`${n} · ${r}`:n),E;t[5]===_?E=t[6]:(E=_?(0,M.jsx)(`span`,{className:`ml-1.5 text-subtle-foreground`,children:_}):null,t[5]=_,t[6]=E);let D;t[7]===r?D=t[8]:(D=r?(0,M.jsx)(`span`,{className:`ml-1.5 text-subtle-foreground`,children:r}):null,t[7]=r,t[8]=D);let O;t[9]!==g||t[10]!==T||t[11]!==E||t[12]!==D?(O=(0,M.jsxs)(`span`,{className:`truncate`,title:T,children:[g,E,D]}),t[9]=g,t[10]=T,t[11]=E,t[12]=D,t[13]=O):O=t[13];let k=i?`opacity-100`:`opacity-0`,j;t[14]===k?j=t[15]:(j=h(te,`text-subtle-foreground`,k),t[14]=k,t[15]=j);let N;t[16]===j?N=t[17]:(N=(0,M.jsx)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:(0,M.jsx)(p,{name:`Check`,className:j})}),t[16]=j,t[17]=N);let P;return t[18]!==d||t[19]!==f||t[20]!==l||t[21]!==s||t[22]!==u||t[23]!==O||t[24]!==N||t[25]!==y||t[26]!==C?(P=(0,M.jsxs)(`button`,{type:`button`,id:l,role:u,disabled:d,"aria-selected":y,onClick:s,className:C,...f,children:[O,N]}),t[18]=d,t[19]=f,t[20]=l,t[21]=s,t[22]=u,t[23]=O,t[24]=N,t[25]=y,t[26]=C,t[27]=P):P=t[27],P}function ve(e){let t=(0,A.c)(10),{label:n,iconName:r,onClick:i}=e,{hoverProps:a}=S(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=h(`relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 text-xs outline-none hover:bg-state-hover hover:text-foreground`,v,x,`py-[0.3125rem] max-md:pointer-coarse:py-2`),t[0]=o):o=t[0];let s;t[1]===r?s=t[2]:(s=(0,M.jsx)(p,{name:r,className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[1]=r,t[2]=s);let c;t[3]===n?c=t[4]:(c=(0,M.jsx)(`span`,{className:`min-w-0 truncate`,children:n}),t[3]=n,t[4]=c);let l;return t[5]!==a||t[6]!==i||t[7]!==s||t[8]!==c?(l=(0,M.jsxs)(`button`,{type:`button`,onClick:i,className:o,...a,children:[s,c]}),t[5]=a,t[6]=i,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}export{ce as ModelReasoningMenu};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Fh as i,R as a,V as ee}from"./index-CfvM6UcU.js";import{t as o}from"./code-loading-skeletons-pfQDO26Y.js";import{n as s,t as c}from"./pierre-strict-mode-recovery-CogG8fEr.js";import{t as l}from"./FileDiff-BRQrZnWt.js";import{a as u,n as te,r as d,t as f}from"./git-diff-patch-text-SHpUxhZL.js";import{t as p}from"./PierreLineSelectionActions-BXbCJV8P.js";import{i as m}from"./pierre-worker-pool-gate-B91n9XZl.js";var h=n(),g=e(t(),1),_=e(r(),1),v={"--diffs-font-size":`12px`,"--diffs-line-height":`18px`},y=30;function b(e){let t=(0,h.c)(47),{file:n,patchText:r,fullFileContents:b,view:x,overflow:S,showLineNumbers:C,className:w,onSelectionAddToChat:T}=e,E=b?.old.path,D=b?.old.content,O=b?.new.path,k=b?.new.content,A;bb0:{if(E===void 0||D===void 0||O===void 0||k===void 0){A=n;break bb0}let e;t[0]!==n||t[1]!==k||t[2]!==O||t[3]!==D||t[4]!==E||t[5]!==r?(e=u({fileDiff:n,oldFile:{name:E,contents:D},newFile:{name:O,contents:k},patchText:r??d(n)}),t[0]=n,t[1]=k,t[2]=O,t[3]=D,t[4]=E,t[5]=r,t[6]=e):e=t[6],A=e}let j=A,M=j!==n&&j.isPartial===!1?y:void 0,N=(0,g.useRef)(null),P=a(),F=ee(),I;t[7]!==j||t[8]!==x?(I=e=>te({displayStyle:x,fileDiff:j,range:e}),t[7]=j,t[8]=x,t[9]=I):I=t[9];let L=I,R;t[10]===j?R=t[11]:(R=e=>{let{containerElement:t}=e;return f({containerElement:t,fileDiff:j})},t[10]=j,t[11]=R);let z=R,B=T!==void 0,V;t[12]!==z||t[13]!==L||t[14]!==T||t[15]!==B?(V={buildFallbackSelectionText:z,buildSelectionText:L,containerRef:N,enabled:B,onSelectionAddToChat:T},t[12]=z,t[13]=L,t[14]=T,t[15]=B,t[16]=V):V=t[16];let H=p(V),U=!C,W;t[17]===M?W=t[18]:(W=M===void 0?{}:{expansionLineCount:M},t[17]=M,t[18]=W);let G=T!==void 0,K=T!==void 0,q=T===void 0?`disabled`:`number`,J=T===void 0?void 0:H.onGutterUtilityClick,Y;t[19]!==P||t[20]!==H.onLineSelectionChange||t[21]!==H.onLineSelectionEnd||t[22]!==H.onLineSelectionStart||t[23]!==S||t[24]!==q||t[25]!==J||t[26]!==U||t[27]!==W||t[28]!==G||t[29]!==K||t[30]!==F||t[31]!==x?(Y={diffStyle:x,overflow:S,disableLineNumbers:U,disableFileHeader:!0,...W,themeType:F,theme:P,enableGutterUtility:G,enableLineSelection:K,lineHoverHighlight:q,onGutterUtilityClick:J,onLineSelectionChange:H.onLineSelectionChange,onLineSelectionEnd:H.onLineSelectionEnd,onLineSelectionStart:H.onLineSelectionStart},t[19]=P,t[20]=H.onLineSelectionChange,t[21]=H.onLineSelectionEnd,t[22]=H.onLineSelectionStart,t[23]=S,t[24]=q,t[25]=J,t[26]=U,t[27]=W,t[28]=G,t[29]=K,t[30]=F,t[31]=x,t[32]=Y):Y=t[32];let X=c(Y);if(!m()){let e;return t[33]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(o,{}),t[33]=e):e=t[33],e}let Z;t[34]===w?Z=t[35]:(Z=i(`overflow-x-auto`,w),t[34]=w,t[35]=Z);let Q;t[36]!==H.selectedRange||t[37]!==X||t[38]!==j?(Q=(0,_.jsx)(`div`,{className:`w-full max-w-full`,style:v,children:(0,_.jsx)(s,{children:(0,_.jsx)(l,{fileDiff:j,options:X,selectedLines:H.selectedRange})})}),t[36]=H.selectedRange,t[37]=X,t[38]=j,t[39]=Q):Q=t[39];let $;return t[40]!==H.menu||t[41]!==H.onPointerDownCapture||t[42]!==H.onPointerMoveCapture||t[43]!==H.onPointerUpCapture||t[44]!==Z||t[45]!==Q?($=(0,_.jsxs)(`div`,{ref:N,className:Z,onPointerDownCapture:H.onPointerDownCapture,onPointerMoveCapture:H.onPointerMoveCapture,onPointerUpCapture:H.onPointerUpCapture,children:[Q,H.menu]}),t[40]=H.menu,t[41]=H.onPointerDownCapture,t[42]=H.onPointerMoveCapture,t[43]=H.onPointerUpCapture,t[44]=Z,t[45]=Q,t[46]=$):$=t[46],$}export{b as default};
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Fh as i,R as a,V as ee}from"./index-DCps_qBD.js";import{t as o}from"./code-loading-skeletons-CkiXPS0M.js";import{n as s,t as c}from"./pierre-strict-mode-recovery-CogG8fEr.js";import{t as l}from"./FileDiff-BRQrZnWt.js";import{a as u,n as te,r as d,t as f}from"./git-diff-patch-text-SHpUxhZL.js";import{t as p}from"./PierreLineSelectionActions-V_GPrVau.js";import{i as m}from"./pierre-worker-pool-gate-B91n9XZl.js";var h=n(),g=e(t(),1),_=e(r(),1),v={"--diffs-font-size":`12px`,"--diffs-line-height":`18px`},y=30;function b(e){let t=(0,h.c)(47),{file:n,patchText:r,fullFileContents:b,view:x,overflow:S,showLineNumbers:C,className:w,onSelectionAddToChat:T}=e,E=b?.old.path,D=b?.old.content,O=b?.new.path,k=b?.new.content,A;bb0:{if(E===void 0||D===void 0||O===void 0||k===void 0){A=n;break bb0}let e;t[0]!==n||t[1]!==k||t[2]!==O||t[3]!==D||t[4]!==E||t[5]!==r?(e=u({fileDiff:n,oldFile:{name:E,contents:D},newFile:{name:O,contents:k},patchText:r??d(n)}),t[0]=n,t[1]=k,t[2]=O,t[3]=D,t[4]=E,t[5]=r,t[6]=e):e=t[6],A=e}let j=A,M=j!==n&&j.isPartial===!1?y:void 0,N=(0,g.useRef)(null),P=a(),F=ee(),I;t[7]!==j||t[8]!==x?(I=e=>te({displayStyle:x,fileDiff:j,range:e}),t[7]=j,t[8]=x,t[9]=I):I=t[9];let L=I,R;t[10]===j?R=t[11]:(R=e=>{let{containerElement:t}=e;return f({containerElement:t,fileDiff:j})},t[10]=j,t[11]=R);let z=R,B=T!==void 0,V;t[12]!==z||t[13]!==L||t[14]!==T||t[15]!==B?(V={buildFallbackSelectionText:z,buildSelectionText:L,containerRef:N,enabled:B,onSelectionAddToChat:T},t[12]=z,t[13]=L,t[14]=T,t[15]=B,t[16]=V):V=t[16];let H=p(V),U=!C,W;t[17]===M?W=t[18]:(W=M===void 0?{}:{expansionLineCount:M},t[17]=M,t[18]=W);let G=T!==void 0,K=T!==void 0,q=T===void 0?`disabled`:`number`,J=T===void 0?void 0:H.onGutterUtilityClick,Y;t[19]!==P||t[20]!==H.onLineSelectionChange||t[21]!==H.onLineSelectionEnd||t[22]!==H.onLineSelectionStart||t[23]!==S||t[24]!==q||t[25]!==J||t[26]!==U||t[27]!==W||t[28]!==G||t[29]!==K||t[30]!==F||t[31]!==x?(Y={diffStyle:x,overflow:S,disableLineNumbers:U,disableFileHeader:!0,...W,themeType:F,theme:P,enableGutterUtility:G,enableLineSelection:K,lineHoverHighlight:q,onGutterUtilityClick:J,onLineSelectionChange:H.onLineSelectionChange,onLineSelectionEnd:H.onLineSelectionEnd,onLineSelectionStart:H.onLineSelectionStart},t[19]=P,t[20]=H.onLineSelectionChange,t[21]=H.onLineSelectionEnd,t[22]=H.onLineSelectionStart,t[23]=S,t[24]=q,t[25]=J,t[26]=U,t[27]=W,t[28]=G,t[29]=K,t[30]=F,t[31]=x,t[32]=Y):Y=t[32];let X=c(Y);if(!m()){let e;return t[33]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(o,{}),t[33]=e):e=t[33],e}let Z;t[34]===w?Z=t[35]:(Z=i(`overflow-x-auto`,w),t[34]=w,t[35]=Z);let Q;t[36]!==H.selectedRange||t[37]!==X||t[38]!==j?(Q=(0,_.jsx)(`div`,{className:`w-full max-w-full`,style:v,children:(0,_.jsx)(s,{children:(0,_.jsx)(l,{fileDiff:j,options:X,selectedLines:H.selectedRange})})}),t[36]=H.selectedRange,t[37]=X,t[38]=j,t[39]=Q):Q=t[39];let $;return t[40]!==H.menu||t[41]!==H.onPointerDownCapture||t[42]!==H.onPointerMoveCapture||t[43]!==H.onPointerUpCapture||t[44]!==Z||t[45]!==Q?($=(0,_.jsxs)(`div`,{ref:N,className:Z,onPointerDownCapture:H.onPointerDownCapture,onPointerMoveCapture:H.onPointerMoveCapture,onPointerUpCapture:H.onPointerUpCapture,children:[Q,H.menu]}),t[40]=H.menu,t[41]=H.onPointerDownCapture,t[42]=H.onPointerMoveCapture,t[43]=H.onPointerUpCapture,t[44]=Z,t[45]=Q,t[46]=$):$=t[46],$}export{b as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MoonletDiff-Da65ABAI.js","assets/rolldown-runtime-BM3Ffeng.js","assets/index-CfvM6UcU.js","assets/boot-vendor-CKEhulXz.js","assets/index-5EQKiTkW.css","assets/code-loading-skeletons-pfQDO26Y.js","assets/PierreLineSelectionActions-BXbCJV8P.js","assets/git-diff-patch-text-SHpUxhZL.js","assets/dist-Cnn0QS5H.js","assets/ccount-DeutX-gO.js","assets/lib-BlhQaCll.js","assets/space-separated-tokens-yqTL2Lfu.js","assets/lib-BvD6d5X8.js","assets/zwitch-D6h6J3PA.js","assets/TimelineSelectionMenu-DrK39LAT.js","assets/pierre-strict-mode-recovery-CogG8fEr.js","assets/pierre-worker-pool-gate-B91n9XZl.js","assets/FileDiff-BRQrZnWt.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Wr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{Np as r}from"./index-CfvM6UcU.js";import{t as i}from"./code-loading-skeletons-pfQDO26Y.js";var a=e(n(),1),o=r({id:`bb-diff`,load:()=>t(()=>import(`./MoonletDiff-Da65ABAI.js`).then(e=>e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])),loading:()=>(0,a.jsx)(i,{}),tier:`intent`});export{o as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MoonletDiff-CCvaiEEC.js","assets/rolldown-runtime-BM3Ffeng.js","assets/index-DCps_qBD.js","assets/boot-vendor-CKEhulXz.js","assets/index-C2K528W0.css","assets/code-loading-skeletons-CkiXPS0M.js","assets/PierreLineSelectionActions-V_GPrVau.js","assets/git-diff-patch-text-SHpUxhZL.js","assets/dist-Cnn0QS5H.js","assets/ccount-DeutX-gO.js","assets/lib-BlhQaCll.js","assets/space-separated-tokens-yqTL2Lfu.js","assets/lib-BvD6d5X8.js","assets/zwitch-D6h6J3PA.js","assets/TimelineSelectionMenu-DDYrgVgK.js","assets/pierre-strict-mode-recovery-CogG8fEr.js","assets/pierre-worker-pool-gate-B91n9XZl.js","assets/FileDiff-BRQrZnWt.js"])))=>i.map(i=>d[i]);
2
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Wr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{Np as r}from"./index-DCps_qBD.js";import{t as i}from"./code-loading-skeletons-CkiXPS0M.js";var a=e(n(),1),o=r({id:`bb-diff`,load:()=>t(()=>import(`./MoonletDiff-CCvaiEEC.js`).then(e=>e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])),loading:()=>(0,a.jsx)(i,{}),tier:`intent`});export{o as t};
@@ -1,2 +1,2 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Fh as i,R as a,V as o,jh as s}from"./index-CfvM6UcU.js";import{n as c}from"./code-loading-skeletons-pfQDO26Y.js";import{i as l,n as ee,t as te}from"./pierre-strict-mode-recovery-CogG8fEr.js";import{a as u}from"./dist-Cnn0QS5H.js";import{t as ne}from"./File-BVsvNxhh.js";import{i as d}from"./git-diff-patch-text-SHpUxhZL.js";import{t as re}from"./PierreLineSelectionActions-BXbCJV8P.js";import{i as ie,n as ae}from"./pierre-worker-pool-gate-B91n9XZl.js";import{n as oe}from"./source-code-budget-8FZFTU2T.js";var se=n(),f=e(t(),1),p=e(r(),1),m=18,h=16,ce={"--diffs-font-size":`12px`,"--diffs-line-height":`${m}px`,"--diffs-gap-block":`${h}px`},le={hunkLineCount:50,lineHeight:m,diffHeaderHeight:0,spacing:h};function g(e){return[e,...d(e)]}function ue(e){for(let t of g(e)){let e=t.querySelectorAll(`[data-bb-source-code-target-line]`);for(let t of e)t.removeAttribute(`data-bb-source-code-target-line`),t.removeAttribute(`data-selected-line`)}}function de(e,t){let n=g(e);for(let e of n){let n=e.querySelectorAll(`[data-line="${t}"]`);for(let e of n)if(e instanceof HTMLElement&&e.dataset.lineIndex!==void 0)return e}for(let e of n){let n=e.querySelectorAll(`[data-line="${t}"]`);for(let e of n)if(e instanceof HTMLElement)return e}return null}function _(e){return e.querySelector(`[data-bb-source-code-viewport]`)}function fe(e,t){let n=_(e);if(n===null)return;let r=n.getBoundingClientRect(),i=r.height/2,a=v(e);if(a===null){let e=h+(t-1)*m;n.scrollTop=Math.max(0,e-i);return}let{firstLineNumber:o,firstTop:s,lastLineNumber:c,lastBottom:l}=a;if(t>c){let e=l-r.top+(t-c-1)*m;n.scrollTop+=Math.max(0,e-i)}else if(t<o){let e=r.top-s+(o-t)*m;n.scrollTop=Math.max(0,n.scrollTop-e-i)}}function v(e){let t=null;for(let n of g(e))for(let e of n.querySelectorAll(`[data-line][data-line-index]`)){let n=Number(e.dataset.line);if(!Number.isFinite(n))continue;let r=e.getBoundingClientRect();if(t===null){t={firstLineNumber:n,firstTop:r.top,lastLineNumber:n,lastBottom:r.bottom};continue}n<t.firstLineNumber&&(t.firstLineNumber=n,t.firstTop=r.top),n>t.lastLineNumber&&(t.lastLineNumber=n,t.lastBottom=r.bottom)}return t}function pe(e,t){let n=_(e);if(n===null)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=r.top+r.height/2,o=i.top+i.height/2;n.scrollTop+=a-o}function y(e,t){return e===t?String(e):`${e}-${t}`}function me({contents:e,path:t,range:n}){let r=Math.max(1,Math.min(n.start,n.end)),i=Math.max(r,Math.max(n.start,n.end)),a=e.split(/\r\n|\n|\r/).slice(r-1,i);if(a.length===0)return null;let o=a.join(`
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Fh as i,R as a,V as o,jh as s}from"./index-DCps_qBD.js";import{n as c}from"./code-loading-skeletons-CkiXPS0M.js";import{i as l,n as ee,t as te}from"./pierre-strict-mode-recovery-CogG8fEr.js";import{a as u}from"./dist-Cnn0QS5H.js";import{t as ne}from"./File-BVsvNxhh.js";import{i as d}from"./git-diff-patch-text-SHpUxhZL.js";import{t as re}from"./PierreLineSelectionActions-V_GPrVau.js";import{i as ie,n as ae}from"./pierre-worker-pool-gate-B91n9XZl.js";import{n as oe}from"./source-code-budget-8FZFTU2T.js";var se=n(),f=e(t(),1),p=e(r(),1),m=18,h=16,ce={"--diffs-font-size":`12px`,"--diffs-line-height":`${m}px`,"--diffs-gap-block":`${h}px`},le={hunkLineCount:50,lineHeight:m,diffHeaderHeight:0,spacing:h};function g(e){return[e,...d(e)]}function ue(e){for(let t of g(e)){let e=t.querySelectorAll(`[data-bb-source-code-target-line]`);for(let t of e)t.removeAttribute(`data-bb-source-code-target-line`),t.removeAttribute(`data-selected-line`)}}function de(e,t){let n=g(e);for(let e of n){let n=e.querySelectorAll(`[data-line="${t}"]`);for(let e of n)if(e instanceof HTMLElement&&e.dataset.lineIndex!==void 0)return e}for(let e of n){let n=e.querySelectorAll(`[data-line="${t}"]`);for(let e of n)if(e instanceof HTMLElement)return e}return null}function _(e){return e.querySelector(`[data-bb-source-code-viewport]`)}function fe(e,t){let n=_(e);if(n===null)return;let r=n.getBoundingClientRect(),i=r.height/2,a=v(e);if(a===null){let e=h+(t-1)*m;n.scrollTop=Math.max(0,e-i);return}let{firstLineNumber:o,firstTop:s,lastLineNumber:c,lastBottom:l}=a;if(t>c){let e=l-r.top+(t-c-1)*m;n.scrollTop+=Math.max(0,e-i)}else if(t<o){let e=r.top-s+(o-t)*m;n.scrollTop=Math.max(0,n.scrollTop-e-i)}}function v(e){let t=null;for(let n of g(e))for(let e of n.querySelectorAll(`[data-line][data-line-index]`)){let n=Number(e.dataset.line);if(!Number.isFinite(n))continue;let r=e.getBoundingClientRect();if(t===null){t={firstLineNumber:n,firstTop:r.top,lastLineNumber:n,lastBottom:r.bottom};continue}n<t.firstLineNumber&&(t.firstLineNumber=n,t.firstTop=r.top),n>t.lastLineNumber&&(t.lastLineNumber=n,t.lastBottom=r.bottom)}return t}function pe(e,t){let n=_(e);if(n===null)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=r.top+r.height/2,o=i.top+i.height/2;n.scrollTop+=a-o}function y(e,t){return e===t?String(e):`${e}-${t}`}function me({contents:e,path:t,range:n}){let r=Math.max(1,Math.min(n.start,n.end)),i=Math.max(r,Math.max(n.start,n.end)),a=e.split(/\r\n|\n|\r/).slice(r-1,i);if(a.length===0)return null;let o=a.join(`
2
2
  `).trimEnd();return o.trim().length===0?null:`${t}:${y(r,i)}\n${o}`}function b(e){let t=(0,se.c)(74),{content:n,path:r,cacheKey:s,overflow:l,highlightedLines:u,className:d,scrollToHighlightedLines:m,onSelectionAddToChat:h}=e,g=m===void 0?!1:m,v=s??r,y;t[0]!==n||t[1]!==v||t[2]!==r?(y={name:r,contents:n,cacheKey:v},t[0]=n,t[1]=v,t[2]=r,t[3]=y):y=t[3];let b=y,x=o(),ye=a(),S=(0,f.useRef)(null),be=ie(),C=ae(),xe=(0,f.useRef)(null),[Se,Ce]=(0,f.useState)(null),[,w]=(0,f.useState)(0),T=v,E;t[4]===n?E=t[5]:(E=oe(n),t[4]=n,t[5]=E);let D=E,[we,Te]=(0,f.useState)(null),O;t[6]!==n||t[7]!==r?(O=e=>me({contents:n,path:r,range:e}),t[6]=n,t[7]=r,t[8]=O):O=t[8];let k=O,A=h!==void 0,j;t[9]!==k||t[10]!==h||t[11]!==A?(j={buildSelectionText:k,containerRef:S,enabled:A,onSelectionAddToChat:h},t[9]=k,t[10]=h,t[11]=A,t[12]=j):j=t[12];let M=re(j),N=h!==void 0,P=u!==null||h!==void 0,Ee=h===void 0?`disabled`:`number`,De=h===void 0?void 0:M.onGutterUtilityClick,F;t[13]!==ye||t[14]!==M.onLineSelectionChange||t[15]!==M.onLineSelectionEnd||t[16]!==M.onLineSelectionStart||t[17]!==l||t[18]!==x||t[19]!==De||t[20]!==N||t[21]!==P||t[22]!==Ee?(F={themeType:x,theme:ye,overflow:l,disableFileHeader:!0,enableGutterUtility:N,enableLineSelection:P,lineHoverHighlight:Ee,onGutterUtilityClick:De,onLineSelectionChange:M.onLineSelectionChange,onLineSelectionEnd:M.onLineSelectionEnd,onLineSelectionStart:M.onLineSelectionStart},t[13]=ye,t[14]=M.onLineSelectionChange,t[15]=M.onLineSelectionEnd,t[16]=M.onLineSelectionStart,t[17]=l,t[18]=x,t[19]=De,t[20]=N,t[21]=P,t[22]=Ee,t[23]=F):F=t[23];let Oe=te(F),ke;bb0:{if(M.selectedRange!==null){ke=M.selectedRange;break bb0}let e;t[24]===u?e=t[25]:(e=u===null?null:{start:u.start,end:u.end},t[24]=u,t[25]=e),ke=e}let I=ke,L=g?I?.start??null:null,R=D===null||we===T||L!==null&&L>D.renderedLineCount,Ae;bb1:{if(R||D===null){Ae=b;break bb1}let e=`${v}:head`,n;t[26]!==b||t[27]!==e||t[28]!==D.contents?(n={...b,cacheKey:e,contents:D.contents},t[26]=b,t[27]=e,t[28]=D.contents,t[29]=n):n=t[29],Ae=n}let z=Ae,B=R||D===null?v:`${v}:head`,je=(0,f.useRef)(null),V;t[30]===T?V=t[31]:(V=()=>{je.current=(S.current===null?null:_(S.current))?.scrollTop??null,Te(T)},t[30]=T,t[31]=V);let Me=V,H;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(H=()=>{let e=je.current;if(e===null)return;je.current=null;let t=S.current===null?null:_(S.current);if(t===null)return;t.scrollTop=e;let n=window.requestAnimationFrame(()=>{t.scrollTop=e});return()=>window.cancelAnimationFrame(n)},t[32]=H):H=t[32];let U;t[33]===B?U=t[34]:(U=[B],t[33]=B,t[34]=U),(0,f.useLayoutEffect)(H,U);let W;t[35]!==w||t[36]!==C?(W=()=>{if(!C){Ce(null);return}return xe.current=null,C.subscribeToStatChanges(e=>{Ce(e);let t=[e.managerState,e.workersFailed,e.busyWorkers,e.queuedTasks,e.activeTasks,e.fileCacheSize].join(`:`);xe.current!==t&&(xe.current=t,w(he))})},t[35]=w,t[36]=C,t[37]=W):W=t[37];let G;t[38]!==b.contents||t[39]!==b.name||t[40]!==C?(G=[b.contents,b.name,C],t[38]=b.contents,t[39]=b.name,t[40]=C,t[41]=G):G=t[41],(0,f.useEffect)(W,G);let K=C!==void 0&&Se?.managerState!==`initialized`&&Se?.workersFailed!==!0,Ne=C?.getFileResultCache(z)===void 0?`plain`:`highlighted`,q;t[42]===L?q=t[43]:(q=()=>{let e=S.current,t=null,n=0,r=function(){t=window.requestAnimationFrame(i)};function i(){let e=S.current;if(!e||(ue(e),L===null))return;let t=de(e,L);if(t){t.setAttribute(`data-bb-source-code-target-line`,``),t.setAttribute(`data-selected-line`,`single`),pe(e,t);return}fe(e,L),n+=1,n<ge&&r()}return i(),()=>{e&&ue(e),t!==null&&window.cancelAnimationFrame(t)}},t[42]=L,t[43]=q);let J;if(t[44]!==z.contents||t[45]!==z.name||t[46]!==K||t[47]!==L||t[48]!==Ne?(J=[z.contents,z.name,K,L,Ne],t[44]=z.contents,t[45]=z.name,t[46]=K,t[47]=L,t[48]=Ne,t[49]=J):J=t[49],(0,f.useEffect)(q,J),K||!be){let e;return t[50]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,p.jsx)(c,{}),t[50]=e):e=t[50],e}let Y;t[51]===d?Y=t[52]:(Y=i(`flex min-h-0 flex-1 flex-col`,d),t[51]=d,t[52]=Y);let Pe=L??void 0,Fe=Se?.workersFailed===!0,X;t[53]!==Oe||t[54]!==z||t[55]!==B||t[56]!==I||t[57]!==Fe?(X=(0,p.jsx)(ne,{disableWorkerPool:Fe,file:z,metrics:le,options:Oe,selectedLines:I},B),t[53]=Oe,t[54]=z,t[55]=B,t[56]=I,t[57]=Fe,t[58]=X):X=t[58];let Z;t[59]!==Me||t[60]!==R||t[61]!==D?(Z=D!==null&&!R?(0,p.jsx)(ve,{truncation:D,onLoadFullFile:Me}):null,t[59]=Me,t[60]=R,t[61]=D,t[62]=Z):Z=t[62];let Q;t[63]!==X||t[64]!==Z?(Q=(0,p.jsx)(ee,{children:(0,p.jsxs)(_e,{children:[X,Z]})}),t[63]=X,t[64]=Z,t[65]=Q):Q=t[65];let $;return t[66]!==M.menu||t[67]!==M.onPointerDownCapture||t[68]!==M.onPointerMoveCapture||t[69]!==M.onPointerUpCapture||t[70]!==Y||t[71]!==Pe||t[72]!==Q?($=(0,p.jsxs)(`div`,{ref:S,className:Y,style:ce,"data-bb-source-code-line-number":Pe,onPointerDownCapture:M.onPointerDownCapture,onPointerMoveCapture:M.onPointerMoveCapture,onPointerUpCapture:M.onPointerUpCapture,children:[Q,M.menu]}),t[66]=M.menu,t[67]=M.onPointerDownCapture,t[68]=M.onPointerMoveCapture,t[69]=M.onPointerUpCapture,t[70]=Y,t[71]=Pe,t[72]=Q,t[73]=$):$=t[73],$}function he(e){return e+1}var ge=40;function _e(e){let t=(0,se.c)(10),{children:n}=e,[r]=(0,f.useState)(x),i;t[0]===r?i=t[1]:(i=e=>{e===null?r?.cleanUp():r?.setup(e)},t[0]=r,t[1]=i);let a=i,o;t[2]===n?o=t[3]:(o=(0,p.jsx)(`div`,{children:n}),t[2]=n,t[3]=o);let s;t[4]!==o||t[5]!==a?(s=(0,p.jsx)(`div`,{ref:a,className:`min-h-0 flex-1 overflow-y-auto`,"data-bb-source-code-viewport":!0,children:o}),t[4]=o,t[5]=a,t[6]=s):s=t[6];let c;return t[7]!==s||t[8]!==r?(c=(0,p.jsx)(l.Provider,{value:r,children:s}),t[7]=s,t[8]=r,t[9]=c):c=t[9],c}function x(){return typeof window>`u`?void 0:new u}function ve(e){let t=(0,se.c)(12),{truncation:n,onLoadFullFile:r}=e,i;t[0]===n.renderedLineCount?i=t[1]:(i=n.renderedLineCount.toLocaleString(),t[0]=n.renderedLineCount,t[1]=i);let a;t[2]===n.totalLineCount?a=t[3]:(a=n.totalLineCount.toLocaleString(),t[2]=n.totalLineCount,t[3]=a);let o;t[4]!==i||t[5]!==a?(o=(0,p.jsxs)(`span`,{children:[`Showing the first `,i,` of`,` `,a,` lines.`]}),t[4]=i,t[5]=a,t[6]=o):o=t[6];let c;t[7]===r?c=t[8]:(c=(0,p.jsx)(s,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:r,children:`Load full file`}),t[7]=r,t[8]=c);let l;return t[9]!==o||t[10]!==c?(l=(0,p.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 px-4 py-3 text-xs text-muted-foreground`,children:[o,c]}),t[9]=o,t[10]=c,t[11]=l):l=t[11],l}export{b as default};
@@ -1,2 +1,2 @@
1
- import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ct as t,St as n,bt as r,hi as i,kr as a,ri as o}from"./boot-vendor-CKEhulXz.js";import{t as s}from"./timeline-path-display-DZ8kKRyF.js";import{Dh as c,Fh as l,Na as u,Ph as d,Sc as f,Uf as p,bn as m,dp as h,hp as g,ia as _,ld as v,ra as y,uo as b,up as x,vn as S,wp as C,xu as w}from"./index-CfvM6UcU.js";import{t as T}from"./truncate-start-CGyRoGtG.js";import{n as E}from"./threadRecentItems-DXsdcpBk.js";import{t as D}from"./usePathSuggestions-Bd5UhdCh.js";import{t as O}from"./AppCommandShortcutHint-7JPI7Au-.js";import{o as k,s as ee,t as A}from"./sortable.esm-Bb-mbyoc.js";import{a as j,i as M,n as te,r as N,t as ne}from"./launcherRow-CqPaUYWn.js";import{n as P,t as re}from"./use-reorder-dnd-Dj_SzaWx.js";import{n as F,t as I}from"./rightPanelFileVisuals-C4nCB0tw.js";var L=a(),ie=`bb.newTab.actionOrder`;function ae(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}var oe=r(ie,[],v(ae),{getOnInit:!0}),R=e(o(),1),se=`Actions`,ce=`relative cursor-grab touch-none opacity-0 transition-opacity focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring active:cursor-grabbing group-hover:opacity-100 [@media(hover:none)]:opacity-100`,z=`file-search-result-open-browser`,le=`file-search-result-start-terminal`;function ue(e){return(0,R.jsx)(c,{name:e,className:x,"aria-hidden":!0})}function de(e){let n=(0,L.c)(15),{onOpenBrowser:r,onStartTerminal:i,pluginActions:a,startTerminalDisabled:o,startTerminalTrailing:s}=e,c=o===void 0?!1:o,l=t(oe),u=b(`terminal.open`),d;n[0]===r?d=n[1]:(d=r!==void 0&&p(),n[0]=r,n[1]=d);let f=d,m;if(n[2]!==r||n[3]!==i||n[4]!==a||n[5]!==f||n[6]!==c||n[7]!==s||n[8]!==l||n[9]!==u){let e=[];if(f){let t;n[11]===r?t=n[12]:(t=()=>r?.(),n[11]=r,n[12]=t),e.push({id:z,icon:ue(`Globe`),label:`Open browser`,disabled:!1,shortcut:null,trailing:null,onSelect:t})}if(i!==void 0){let t;n[13]===i?t=n[14]:(t=()=>i(),n[13]=i,n[14]=t),e.push({id:le,icon:ue(`Terminal`),label:`Start terminal`,disabled:c,shortcut:u,trailing:s??null,onSelect:t})}for(let t of a??[])e.push({id:t.id,icon:(0,R.jsx)(w,{pluginId:t.pluginId,icon:t.icon,className:x}),label:t.title,tooltip:t.tooltip,disabled:!1,shortcut:null,trailing:null,onSelect:t.onSelect});m=S({items:e,getId:fe,storedOrder:l}),n[2]=r,n[3]=i,n[4]=a,n[5]=f,n[6]=c,n[7]=s,n[8]=l,n[9]=u,n[10]=m}else m=n[10];return m.ordered}function fe(e){return e.id}function B(e){return e.toLowerCase().split(/[^\p{L}\p{N}]+/u).filter(e=>e.length>0)}function pe(e,t){let n=B(t);return n.length===0?[]:e.filter(e=>{let t=B(e.label);return n.every(e=>t.some(t=>t.startsWith(e)))})}function me(e){let t=(0,L.c)(3),{actions:n}=e;if(n.length===0)return null;let r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,R.jsx)(j,{label:se,className:`pb-1`}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,R.jsx)(`div`,{"data-testid":`new-tab-actions`,className:`flex min-w-0 flex-col`,children:(0,R.jsxs)(`section`,{children:[r,(0,R.jsx)(he,{actions:n})]})}),t[1]=n,t[2]=i),i}function he(e){let t=(0,L.c)(11),{actions:r}=e,[i,a]=n(oe),o;t[0]!==r||t[1]!==i?(o=S({items:r,getId:_e,storedOrder:i}),t[0]=r,t[1]=i,t[2]=o):o=t[2];let{normalizedOrder:s}=o;if(r.length<2){let e;t[3]===r?e=t[4]:(e=r.map(ge),t[3]=r,t[4]=e);let n;return t[5]===e?n=t[6]:(n=(0,R.jsx)(`div`,{className:`flex flex-col gap-px`,children:e}),t[5]=e,t[6]=n),n}let c;return t[7]!==r||t[8]!==s||t[9]!==a?(c=(0,R.jsx)(ve,{actions:r,normalizedOrder:s,onOrderChange:a}),t[7]=r,t[8]=s,t[9]=a,t[10]=c):c=t[10],c}function ge(e){return(0,R.jsx)(U,{action:e},e.id)}function _e(e){return e.id}function ve(e){let t=(0,L.c)(19),{actions:n,normalizedOrder:r,onOrderChange:i}=e,a;t[0]===n?a=t[1]:(a=n.map(ye),t[0]=n,t[1]=a);let o=a,s;t[2]!==r||t[3]!==i||t[4]!==o?(s=e=>{if(!e.over||typeof e.active.id!=`string`||typeof e.over.id!=`string`)return;let t=m({activeId:e.active.id,overId:e.over.id,order:r,visibleIds:o});t&&i(t)},t[2]=r,t[3]=i,t[4]=o,t[5]=s):s=t[5];let c=s,l;t[6]===c?l=t[7]:(l={onDragEnd:c},t[6]=c,t[7]=l);let{dndContextProps:u,onClickCapture:d}=re(l),f;t[8]===n?f=t[9]:(f=n.map(V),t[8]=n,t[9]=f);let p;t[10]!==d||t[11]!==f?(p=(0,R.jsx)(`div`,{className:`flex flex-col gap-px`,onClickCapture:d,children:f}),t[10]=d,t[11]=f,t[12]=p):p=t[12];let h;t[13]!==o||t[14]!==p?(h=(0,R.jsx)(A,{items:o,strategy:k,children:p}),t[13]=o,t[14]=p,t[15]=h):h=t[15];let g;return t[16]!==u||t[17]!==h?(g=(0,R.jsx)(ee,{...u,children:h}),t[16]=u,t[17]=h,t[18]=g):g=t[18],g}function V(e){return(0,R.jsx)(H,{action:e},e.id)}function ye(e){return e.id}function H(e){let t=(0,L.c)(16),{action:n}=e,r;t[0]===n.id?r=t[1]:(r={id:n.id,disabled:!1},t[0]=n.id,t[1]=r);let{dragBindings:i,setNodeRef:a,style:o}=P(r),{attributes:s,listeners:u,setActivatorNodeRef:d}=i,f=`Reorder ${n.label}`,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=l(N,ce),t[2]=p):p=t[2];let m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,R.jsx)(c,{name:`DragDropVertical`,className:x,"aria-hidden":!0}),t[3]=m):m=t[3];let h;t[4]!==s||t[5]!==u||t[6]!==d||t[7]!==f?(h=(0,R.jsx)(`button`,{type:`button`,ref:d,"aria-label":f,className:p,...s,...u,children:m}),t[4]=s,t[5]=u,t[6]=d,t[7]=f,t[8]=h):h=t[8];let g;t[9]!==n||t[10]!==h?(g=(0,R.jsx)(U,{action:n,dragHandle:h}),t[9]=n,t[10]=h,t[11]=g):g=t[11];let _;return t[12]!==a||t[13]!==o||t[14]!==g?(_=(0,R.jsx)(`div`,{ref:a,style:o,children:g}),t[12]=a,t[13]=o,t[14]=g,t[15]=_):_=t[15],_}function U(e){let t=(0,L.c)(24),{action:n,dragHandle:r}=e,i=!n.disabled&&`hover:bg-state-hover`,a;t[0]===i?a=t[1]:(a=l(ne,`relative scroll-mt-7 select-none focus-within:bg-state-hover focus-within:text-foreground`,i),t[0]=i,t[1]=a);let o=n.tooltip??n.label,s=n.shortcut?.ariaKeyshortcuts,c;t[2]===n.icon?c=t[3]:(c=(0,R.jsx)(`span`,{className:N,children:n.icon}),t[2]=n.icon,t[3]=c);let u;t[4]===n.label?u=t[5]:(u=(0,R.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-foreground`,children:n.label}),t[4]=n.label,t[5]=u);let d;t[6]!==n.disabled||t[7]!==n.id||t[8]!==n.onSelect||t[9]!==o||t[10]!==s||t[11]!==c||t[12]!==u?(d=(0,R.jsxs)(`button`,{type:`button`,id:n.id,title:o,"data-panel-new-tab-item":``,"aria-keyshortcuts":s,disabled:n.disabled,onClick:n.onSelect,className:`flex min-w-0 flex-1 items-center gap-1.5 text-left after:absolute after:inset-0 after:rounded after:content-[''] focus-visible:outline-none disabled:cursor-default`,children:[c,u]}),t[6]=n.disabled,t[7]=n.id,t[8]=n.onSelect,t[9]=o,t[10]=s,t[11]=c,t[12]=u,t[13]=d):d=t[13];let f;t[14]===n.shortcut?f=t[15]:(f=(0,R.jsx)(O,{shortcut:n.shortcut}),t[14]=n.shortcut,t[15]=f);let p;t[16]===n.trailing?p=t[17]:(p=n.trailing===null?null:(0,R.jsx)(`div`,{className:`relative flex min-w-0 shrink-0 items-center`,children:n.trailing}),t[16]=n.trailing,t[17]=p);let m;return t[18]!==r||t[19]!==a||t[20]!==d||t[21]!==f||t[22]!==p?(m=(0,R.jsxs)(`div`,{className:a,children:[d,f,r,p]}),t[18]=r,t[19]=a,t[20]=d,t[21]=f,t[22]=p,t[23]=m):m=t[23],m}var W=e(i(),1);function G(e){return e.entryKind===`file`}function K(e){return{source:e.source,entryKind:`file`,path:e.path,name:e.name,score:e.score,positions:e.positions}}function be(e){let t=(0,L.c)(15),n;t[0]!==e.currentThreadId||t[1]!==e.environmentId||t[2]!==e.hostId||t[3]!==e.limit||t[4]!==e.projectId||t[5]!==e.query?(n={projectId:e.projectId,query:e.query,limit:e.limit,environmentId:e.environmentId,hostId:e.hostId,currentThreadId:e.currentThreadId,includeDirectories:!1},t[0]=e.currentThreadId,t[1]=e.environmentId,t[2]=e.hostId,t[3]=e.limit,t[4]=e.projectId,t[5]=e.query,t[6]=n):n=t[6];let r=D(n),i;t[7]===r.suggestions?i=t[8]:(i=r.suggestions.filter(G).map(K),t[7]=r.suggestions,t[8]=i);let a=i,o=!!e.projectId,s=!!e.currentThreadId,c=a.length===0&&r.isLoading,l=!o&&!s,u;return t[9]!==r.isDebouncing||t[10]!==r.isError||t[11]!==a||t[12]!==c||t[13]!==l?(u={suggestions:a,isLoading:c,fileSearchError:r.isError,isDebouncing:r.isDebouncing,isUnavailable:l},t[9]=r.isDebouncing,t[10]=r.isError,t[11]=a,t[12]=c,t[13]=l,t[14]=u):u=t[14],u}var xe=20,Se=[`actions`,`files`,`recent`],q={actions:`Actions`,files:`Files`,recent:`Recent`},Ce={workspace:`Workspace`,"thread-storage":`Thread storage`},we=`file-search-result-recent`;function Te(e){return`file-search-result-${e.source}-${encodeURIComponent(e.path)}`}function Ee(e){return e.kind===`action`?e.action.id:e.kind===`recent`?`${we}-${e.item.source}-${encodeURIComponent(e.item.path)}`:Te(e.suggestion)}function De(e){return`${Ce[e.source]}: ${e.path}`}function Oe(e){return e.kind!==`action`||!e.action.disabled}function ke({actions:e,recentEntries:t,suggestions:n}){let r=new Map,i=e=>{let t=r.get(e);if(t)return t;let n={kind:e,items:[]};return r.set(e,n),n};for(let t of e)i(`actions`).items.push({entry:{kind:`action`,action:t},index:0});for(let e of n)i(`files`).items.push({entry:{kind:`suggestion`,suggestion:e},index:0});for(let e of t)i(`recent`).items.push({entry:e,index:0});let a=0;return Se.flatMap(e=>{let t=r.get(e);return t?[{...t,items:t.items.map(({entry:e})=>{if(!Oe(e))return{entry:e,index:-1};let t=a;return a+=1,{entry:e,index:t}})}]:[]})}function Ae(e){let t=(0,L.c)(10),{iconName:n,iconClassName:r,message:i}=e,a;t[0]===r?a=t[1]:(a=l(g,`shrink-0`,r),t[0]=r,t[1]=a);let o;t[2]!==n||t[3]!==a?(o=(0,R.jsx)(c,{name:n,className:a}),t[2]=n,t[3]=a,t[4]=o):o=t[4];let s;t[5]===i?s=t[6]:(s=(0,R.jsx)(`p`,{className:C,children:i}),t[5]=i,t[6]=s);let u;return t[7]!==o||t[8]!==s?(u=(0,R.jsx)(y,{className:`flex min-h-24 items-center justify-center`,children:(0,R.jsxs)(`div`,{className:`flex max-w-64 items-center justify-center gap-1.5`,children:[o,s]})}),t[7]=o,t[8]=s,t[9]=u):u=t[9],u}function J(e){let t=(0,L.c)(13),{id:n,isActive:r,onActivate:i,onSelect:a,title:o,disabled:s,children:c}=e,u=s===void 0?!1:s,d=u||void 0,f=r&&`bg-state-active`,p=!r&&!u&&`hover:bg-state-hover`,m;t[0]!==f||t[1]!==p?(m=l(te,`relative scroll-mt-7 disabled:cursor-default`,f,p),t[0]=f,t[1]=p,t[2]=m):m=t[2];let h;return t[3]!==c||t[4]!==u||t[5]!==n||t[6]!==r||t[7]!==i||t[8]!==a||t[9]!==d||t[10]!==m||t[11]!==o?(h=(0,R.jsx)(`button`,{type:`button`,id:n,"data-panel-new-tab-item":``,role:`option`,"aria-selected":r,"aria-disabled":d,disabled:u,onClick:a,onMouseEnter:i,onFocus:i,title:o,className:m,children:c}),t[3]=c,t[4]=u,t[5]=n,t[6]=r,t[7]=i,t[8]=a,t[9]=d,t[10]=m,t[11]=o,t[12]=h):h=t[12],h}function je(e){let t=(0,L.c)(30),{id:n,suggestion:r,isActive:i,onActivate:a,onSelect:o}=e,u;t[0]!==o||t[1]!==r?(u=()=>{o(r)},t[0]=o,t[1]=r,t[2]=u):u=t[2];let f=u,p;t[3]===r.path?p=t[4]:(p=s(r.path),t[3]=r.path,t[4]=p);let m=p||null,g;t[5]===r.path?g=t[6]:(g=F(r.path),t[5]=r.path,t[6]=g);let _=g,v;t[7]===r?v=t[8]:(v=De(r),t[7]=r,t[8]=v);let y=i?`bg-state-active`:`hover:bg-state-hover`,b;t[9]===y?b=t[10]:(b=l(`w-full scroll-mt-7 rounded px-2 py-1.5 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,d,C,y),t[9]=y,t[10]=b);let x;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(x=l(h,`text-muted-foreground`),t[11]=x):x=t[11];let S;t[12]===_?S=t[13]:(S=(0,R.jsx)(c,{name:_,className:x,"aria-hidden":!0}),t[12]=_,t[13]=S);let w;t[14]===r.name?w=t[15]:(w=(0,R.jsx)(`span`,{className:`truncate`,children:r.name}),t[14]=r.name,t[15]=w);let E;t[16]===m?E=t[17]:(E=m===null?null:(0,R.jsx)(T,{className:`text-muted-foreground [flex-shrink:9999]`,children:m}),t[16]=m,t[17]=E);let D;t[18]!==E||t[19]!==S||t[20]!==w?(D=(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[S,w,E]}),t[18]=E,t[19]=S,t[20]=w,t[21]=D):D=t[21];let O;return t[22]!==f||t[23]!==n||t[24]!==i||t[25]!==a||t[26]!==D||t[27]!==v||t[28]!==b?(O=(0,R.jsx)(`button`,{type:`button`,id:n,"data-panel-new-tab-item":``,role:`option`,"aria-selected":i,onClick:f,onMouseEnter:a,onFocus:a,title:v,className:b,children:D}),t[22]=f,t[23]=n,t[24]=i,t[25]=a,t[26]=D,t[27]=v,t[28]=b,t[29]=O):O=t[29],O}function Y(e){let t=(0,L.c)(15),{action:n,isActive:r,onActivate:i}=e,a;t[0]===n.icon?a=t[1]:(a=(0,R.jsx)(`span`,{className:N,children:n.icon}),t[0]=n.icon,t[1]=a);let o;t[2]===n.label?o=t[3]:(o=(0,R.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-foreground`,children:n.label}),t[2]=n.label,t[3]=o);let s;t[4]===n.shortcut?s=t[5]:(s=(0,R.jsx)(O,{shortcut:n.shortcut}),t[4]=n.shortcut,t[5]=s);let c;return t[6]!==n.disabled||t[7]!==n.id||t[8]!==n.onSelect||t[9]!==r||t[10]!==i||t[11]!==a||t[12]!==o||t[13]!==s?(c=(0,R.jsxs)(J,{id:n.id,isActive:r,onActivate:i,onSelect:n.onSelect,disabled:n.disabled,children:[a,o,s]}),t[6]=n.disabled,t[7]=n.id,t[8]=n.onSelect,t[9]=r,t[10]=i,t[11]=a,t[12]=o,t[13]=s,t[14]=c):c=t[14],c}function Me(e){let t=(0,L.c)(33),{id:n,item:r,isActive:i,nowMs:a,onActivate:o,onSelect:l}=e,d;t[0]!==r||t[1]!==l?(d=()=>{l(r)},t[0]=r,t[1]=l,t[2]=d):d=t[2];let f=d,p;t[3]===r.path?p=t[4]:(p=F(r.path),t[3]=r.path,t[4]=p);let m=p,h;t[5]===r.path?h=t[6]:(h=I({path:r.path}),t[5]=r.path,t[6]=h);let g=h,_;t[7]===r.path?_=t[8]:(_=s(r.path),t[7]=r.path,t[8]=_);let v=_,y;t[9]!==r.openedAt||t[10]!==a?(y=u({timestamp:r.openedAt,now:a}),t[9]=r.openedAt,t[10]=a,t[11]=y):y=t[11];let b=y,S;t[12]===m?S=t[13]:(S=(0,R.jsx)(`span`,{className:N,children:(0,R.jsx)(c,{name:m,className:x,"aria-hidden":!0})}),t[12]=m,t[13]=S);let C;t[14]===g?C=t[15]:(C=(0,R.jsx)(`span`,{className:`truncate text-foreground`,children:g}),t[14]=g,t[15]=C);let w;t[16]===v?w=t[17]:(w=v?(0,R.jsx)(T,{className:`text-muted-foreground [flex-shrink:9999]`,children:v}):null,t[16]=v,t[17]=w);let E;t[18]!==C||t[19]!==w?(E=(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[C,w]}),t[18]=C,t[19]=w,t[20]=E):E=t[20];let D;t[21]!==i||t[22]!==b?(D=(0,R.jsx)(M,{idle:b,isActive:i}),t[21]=i,t[22]=b,t[23]=D):D=t[23];let O;return t[24]!==f||t[25]!==n||t[26]!==i||t[27]!==r.path||t[28]!==o||t[29]!==D||t[30]!==S||t[31]!==E?(O=(0,R.jsxs)(J,{id:n,isActive:i,onActivate:o,onSelect:f,title:r.path,children:[S,E,D]}),t[24]=f,t[25]=n,t[26]=i,t[27]=r.path,t[28]=o,t[29]=D,t[30]=S,t[31]=E,t[32]=O):O=t[32],O}function Ne(e){let t=(0,L.c)(12),{isExpanded:n,onToggle:r,showMoreCount:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=l(`ml-1.5 mt-0.5 inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground`,C),t[0]=a):a=t[0];let o=n&&`rotate-180`,s;t[1]===o?s=t[2]:(s=l(x,`transition-transform`,o),t[1]=o,t[2]=s);let u;t[3]===s?u=t[4]:(u=(0,R.jsx)(c,{name:`ChevronDown`,className:s,"aria-hidden":!0}),t[3]=s,t[4]=u);let d=n?`Show less`:`Show ${i} more`,f;t[5]===d?f=t[6]:(f=(0,R.jsx)(`span`,{children:d}),t[5]=d,t[6]=f);let p;return t[7]!==n||t[8]!==r||t[9]!==u||t[10]!==f?(p=(0,R.jsxs)(`button`,{type:`button`,"data-panel-new-tab-item":``,"aria-expanded":n,onClick:r,className:a,children:[u,f]}),t[7]=n,t[8]=r,t[9]=u,t[10]=f,t[11]=p):p=t[11],p}function Pe(e){let t=(0,L.c)(90),{projectId:n,environmentId:r,hostId:i,currentThreadId:a,autoFocus:o,actions:s,initialQuery:u,onAutoFocusHandled:d,onSelect:p,recentItemsThreadId:m,showFileSearch:h}=e,v=u===void 0?``:u,y=h===void 0?!0:h,S=b(`file.quickOpen`),w=(0,W.useRef)(null),T=(0,W.useRef)(null),D=(0,W.useId)(),O=f(),[k,ee]=(0,W.useState)(v),[A,j]=(0,W.useState)(-1),[M,te]=(0,W.useState)(!1),[N]=(0,W.useState)(ze),ne=a.length>0?a:null,P=E(m===void 0?ne:m),re;t[0]===k?re=t[1]:(re=k.trim(),t[0]=k,t[1]=re);let F=re,I=F.length>0,ie;t[2]!==a||t[3]!==r||t[4]!==i||t[5]!==n||t[6]!==k?(ie={projectId:n,query:k,limit:xe,environmentId:r,hostId:i,currentThreadId:a},t[2]=a,t[3]=r,t[4]=i,t[5]=n,t[6]=k,t[7]=ie):ie=t[7];let{suggestions:ae,isLoading:oe,fileSearchError:se,isDebouncing:ce,isUnavailable:z}=be(ie),le;t[8]!==s||t[9]!==F?(le=pe(s,F),t[8]=s,t[9]=F,t[10]=le):le=t[10];let ue=le,de;t[11]!==I||t[12]!==ae?(de=I?ae:[],t[11]=I,t[12]=ae,t[13]=de):de=t[13];let fe=de,B;t[14]!==M||t[15]!==P?(B=M?P:P.slice(0,6),t[14]=M,t[15]=P,t[16]=B):B=t[16];let he=B,ge;t[17]!==I||t[18]!==he?(ge=I?[]:he.map(Re),t[17]=I,t[18]=he,t[19]=ge):ge=t[19];let _e=ge,ve;t[20]!==ue||t[21]!==_e||t[22]!==fe?(ve=ke({actions:ue,recentEntries:_e,suggestions:fe}),t[20]=ue,t[21]=_e,t[22]=fe,t[23]=ve):ve=t[23];let V=ve,ye;t[24]===V?ye=t[25]:(ye=V.flatMap(Ie),t[24]=V,t[25]=ye);let H=ye,U;t[26]===H?U=t[27]:(U=H.map(Ee).join(`
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Ct as t,St as n,bt as r,hi as i,kr as a,ri as o}from"./boot-vendor-CKEhulXz.js";import{t as s}from"./timeline-path-display-DZ8kKRyF.js";import{Dh as c,Fh as l,Na as u,Ph as d,Sc as f,Uf as p,bn as m,dp as h,hp as g,ia as _,ld as v,ra as y,uo as b,up as x,vn as S,wp as C,xu as w}from"./index-DCps_qBD.js";import{t as T}from"./truncate-start-Ck1IPV62.js";import{n as E}from"./threadRecentItems-BiCe3SkL.js";import{t as D}from"./usePathSuggestions-DZ1XPM_t.js";import{t as O}from"./AppCommandShortcutHint-CCVkbqD1.js";import{o as k,s as ee,t as A}from"./sortable.esm-Bb-mbyoc.js";import{a as j,i as M,n as te,r as N,t as ne}from"./launcherRow-CVYGyeOl.js";import{n as P,t as re}from"./use-reorder-dnd-Dj_SzaWx.js";import{n as F,t as I}from"./rightPanelFileVisuals-C4nCB0tw.js";var L=a(),ie=`bb.newTab.actionOrder`;function ae(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}var oe=r(ie,[],v(ae),{getOnInit:!0}),R=e(o(),1),se=`Actions`,ce=`relative cursor-grab touch-none opacity-0 transition-opacity focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring active:cursor-grabbing group-hover:opacity-100 [@media(hover:none)]:opacity-100`,z=`file-search-result-open-browser`,le=`file-search-result-start-terminal`;function ue(e){return(0,R.jsx)(c,{name:e,className:x,"aria-hidden":!0})}function de(e){let n=(0,L.c)(15),{onOpenBrowser:r,onStartTerminal:i,pluginActions:a,startTerminalDisabled:o,startTerminalTrailing:s}=e,c=o===void 0?!1:o,l=t(oe),u=b(`terminal.open`),d;n[0]===r?d=n[1]:(d=r!==void 0&&p(),n[0]=r,n[1]=d);let f=d,m;if(n[2]!==r||n[3]!==i||n[4]!==a||n[5]!==f||n[6]!==c||n[7]!==s||n[8]!==l||n[9]!==u){let e=[];if(f){let t;n[11]===r?t=n[12]:(t=()=>r?.(),n[11]=r,n[12]=t),e.push({id:z,icon:ue(`Globe`),label:`Open browser`,disabled:!1,shortcut:null,trailing:null,onSelect:t})}if(i!==void 0){let t;n[13]===i?t=n[14]:(t=()=>i(),n[13]=i,n[14]=t),e.push({id:le,icon:ue(`Terminal`),label:`Start terminal`,disabled:c,shortcut:u,trailing:s??null,onSelect:t})}for(let t of a??[])e.push({id:t.id,icon:(0,R.jsx)(w,{pluginId:t.pluginId,icon:t.icon,className:x}),label:t.title,tooltip:t.tooltip,disabled:!1,shortcut:null,trailing:null,onSelect:t.onSelect});m=S({items:e,getId:fe,storedOrder:l}),n[2]=r,n[3]=i,n[4]=a,n[5]=f,n[6]=c,n[7]=s,n[8]=l,n[9]=u,n[10]=m}else m=n[10];return m.ordered}function fe(e){return e.id}function B(e){return e.toLowerCase().split(/[^\p{L}\p{N}]+/u).filter(e=>e.length>0)}function pe(e,t){let n=B(t);return n.length===0?[]:e.filter(e=>{let t=B(e.label);return n.every(e=>t.some(t=>t.startsWith(e)))})}function me(e){let t=(0,L.c)(3),{actions:n}=e;if(n.length===0)return null;let r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,R.jsx)(j,{label:se,className:`pb-1`}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,R.jsx)(`div`,{"data-testid":`new-tab-actions`,className:`flex min-w-0 flex-col`,children:(0,R.jsxs)(`section`,{children:[r,(0,R.jsx)(he,{actions:n})]})}),t[1]=n,t[2]=i),i}function he(e){let t=(0,L.c)(11),{actions:r}=e,[i,a]=n(oe),o;t[0]!==r||t[1]!==i?(o=S({items:r,getId:_e,storedOrder:i}),t[0]=r,t[1]=i,t[2]=o):o=t[2];let{normalizedOrder:s}=o;if(r.length<2){let e;t[3]===r?e=t[4]:(e=r.map(ge),t[3]=r,t[4]=e);let n;return t[5]===e?n=t[6]:(n=(0,R.jsx)(`div`,{className:`flex flex-col gap-px`,children:e}),t[5]=e,t[6]=n),n}let c;return t[7]!==r||t[8]!==s||t[9]!==a?(c=(0,R.jsx)(ve,{actions:r,normalizedOrder:s,onOrderChange:a}),t[7]=r,t[8]=s,t[9]=a,t[10]=c):c=t[10],c}function ge(e){return(0,R.jsx)(U,{action:e},e.id)}function _e(e){return e.id}function ve(e){let t=(0,L.c)(19),{actions:n,normalizedOrder:r,onOrderChange:i}=e,a;t[0]===n?a=t[1]:(a=n.map(ye),t[0]=n,t[1]=a);let o=a,s;t[2]!==r||t[3]!==i||t[4]!==o?(s=e=>{if(!e.over||typeof e.active.id!=`string`||typeof e.over.id!=`string`)return;let t=m({activeId:e.active.id,overId:e.over.id,order:r,visibleIds:o});t&&i(t)},t[2]=r,t[3]=i,t[4]=o,t[5]=s):s=t[5];let c=s,l;t[6]===c?l=t[7]:(l={onDragEnd:c},t[6]=c,t[7]=l);let{dndContextProps:u,onClickCapture:d}=re(l),f;t[8]===n?f=t[9]:(f=n.map(V),t[8]=n,t[9]=f);let p;t[10]!==d||t[11]!==f?(p=(0,R.jsx)(`div`,{className:`flex flex-col gap-px`,onClickCapture:d,children:f}),t[10]=d,t[11]=f,t[12]=p):p=t[12];let h;t[13]!==o||t[14]!==p?(h=(0,R.jsx)(A,{items:o,strategy:k,children:p}),t[13]=o,t[14]=p,t[15]=h):h=t[15];let g;return t[16]!==u||t[17]!==h?(g=(0,R.jsx)(ee,{...u,children:h}),t[16]=u,t[17]=h,t[18]=g):g=t[18],g}function V(e){return(0,R.jsx)(H,{action:e},e.id)}function ye(e){return e.id}function H(e){let t=(0,L.c)(16),{action:n}=e,r;t[0]===n.id?r=t[1]:(r={id:n.id,disabled:!1},t[0]=n.id,t[1]=r);let{dragBindings:i,setNodeRef:a,style:o}=P(r),{attributes:s,listeners:u,setActivatorNodeRef:d}=i,f=`Reorder ${n.label}`,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=l(N,ce),t[2]=p):p=t[2];let m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,R.jsx)(c,{name:`DragDropVertical`,className:x,"aria-hidden":!0}),t[3]=m):m=t[3];let h;t[4]!==s||t[5]!==u||t[6]!==d||t[7]!==f?(h=(0,R.jsx)(`button`,{type:`button`,ref:d,"aria-label":f,className:p,...s,...u,children:m}),t[4]=s,t[5]=u,t[6]=d,t[7]=f,t[8]=h):h=t[8];let g;t[9]!==n||t[10]!==h?(g=(0,R.jsx)(U,{action:n,dragHandle:h}),t[9]=n,t[10]=h,t[11]=g):g=t[11];let _;return t[12]!==a||t[13]!==o||t[14]!==g?(_=(0,R.jsx)(`div`,{ref:a,style:o,children:g}),t[12]=a,t[13]=o,t[14]=g,t[15]=_):_=t[15],_}function U(e){let t=(0,L.c)(24),{action:n,dragHandle:r}=e,i=!n.disabled&&`hover:bg-state-hover`,a;t[0]===i?a=t[1]:(a=l(ne,`relative scroll-mt-7 select-none focus-within:bg-state-hover focus-within:text-foreground`,i),t[0]=i,t[1]=a);let o=n.tooltip??n.label,s=n.shortcut?.ariaKeyshortcuts,c;t[2]===n.icon?c=t[3]:(c=(0,R.jsx)(`span`,{className:N,children:n.icon}),t[2]=n.icon,t[3]=c);let u;t[4]===n.label?u=t[5]:(u=(0,R.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-foreground`,children:n.label}),t[4]=n.label,t[5]=u);let d;t[6]!==n.disabled||t[7]!==n.id||t[8]!==n.onSelect||t[9]!==o||t[10]!==s||t[11]!==c||t[12]!==u?(d=(0,R.jsxs)(`button`,{type:`button`,id:n.id,title:o,"data-panel-new-tab-item":``,"aria-keyshortcuts":s,disabled:n.disabled,onClick:n.onSelect,className:`flex min-w-0 flex-1 items-center gap-1.5 text-left after:absolute after:inset-0 after:rounded after:content-[''] focus-visible:outline-none disabled:cursor-default`,children:[c,u]}),t[6]=n.disabled,t[7]=n.id,t[8]=n.onSelect,t[9]=o,t[10]=s,t[11]=c,t[12]=u,t[13]=d):d=t[13];let f;t[14]===n.shortcut?f=t[15]:(f=(0,R.jsx)(O,{shortcut:n.shortcut}),t[14]=n.shortcut,t[15]=f);let p;t[16]===n.trailing?p=t[17]:(p=n.trailing===null?null:(0,R.jsx)(`div`,{className:`relative flex min-w-0 shrink-0 items-center`,children:n.trailing}),t[16]=n.trailing,t[17]=p);let m;return t[18]!==r||t[19]!==a||t[20]!==d||t[21]!==f||t[22]!==p?(m=(0,R.jsxs)(`div`,{className:a,children:[d,f,r,p]}),t[18]=r,t[19]=a,t[20]=d,t[21]=f,t[22]=p,t[23]=m):m=t[23],m}var W=e(i(),1);function G(e){return e.entryKind===`file`}function K(e){return{source:e.source,entryKind:`file`,path:e.path,name:e.name,score:e.score,positions:e.positions}}function be(e){let t=(0,L.c)(15),n;t[0]!==e.currentThreadId||t[1]!==e.environmentId||t[2]!==e.hostId||t[3]!==e.limit||t[4]!==e.projectId||t[5]!==e.query?(n={projectId:e.projectId,query:e.query,limit:e.limit,environmentId:e.environmentId,hostId:e.hostId,currentThreadId:e.currentThreadId,includeDirectories:!1},t[0]=e.currentThreadId,t[1]=e.environmentId,t[2]=e.hostId,t[3]=e.limit,t[4]=e.projectId,t[5]=e.query,t[6]=n):n=t[6];let r=D(n),i;t[7]===r.suggestions?i=t[8]:(i=r.suggestions.filter(G).map(K),t[7]=r.suggestions,t[8]=i);let a=i,o=!!e.projectId,s=!!e.currentThreadId,c=a.length===0&&r.isLoading,l=!o&&!s,u;return t[9]!==r.isDebouncing||t[10]!==r.isError||t[11]!==a||t[12]!==c||t[13]!==l?(u={suggestions:a,isLoading:c,fileSearchError:r.isError,isDebouncing:r.isDebouncing,isUnavailable:l},t[9]=r.isDebouncing,t[10]=r.isError,t[11]=a,t[12]=c,t[13]=l,t[14]=u):u=t[14],u}var xe=20,Se=[`actions`,`files`,`recent`],q={actions:`Actions`,files:`Files`,recent:`Recent`},Ce={workspace:`Workspace`,"thread-storage":`Thread storage`},we=`file-search-result-recent`;function Te(e){return`file-search-result-${e.source}-${encodeURIComponent(e.path)}`}function Ee(e){return e.kind===`action`?e.action.id:e.kind===`recent`?`${we}-${e.item.source}-${encodeURIComponent(e.item.path)}`:Te(e.suggestion)}function De(e){return`${Ce[e.source]}: ${e.path}`}function Oe(e){return e.kind!==`action`||!e.action.disabled}function ke({actions:e,recentEntries:t,suggestions:n}){let r=new Map,i=e=>{let t=r.get(e);if(t)return t;let n={kind:e,items:[]};return r.set(e,n),n};for(let t of e)i(`actions`).items.push({entry:{kind:`action`,action:t},index:0});for(let e of n)i(`files`).items.push({entry:{kind:`suggestion`,suggestion:e},index:0});for(let e of t)i(`recent`).items.push({entry:e,index:0});let a=0;return Se.flatMap(e=>{let t=r.get(e);return t?[{...t,items:t.items.map(({entry:e})=>{if(!Oe(e))return{entry:e,index:-1};let t=a;return a+=1,{entry:e,index:t}})}]:[]})}function Ae(e){let t=(0,L.c)(10),{iconName:n,iconClassName:r,message:i}=e,a;t[0]===r?a=t[1]:(a=l(g,`shrink-0`,r),t[0]=r,t[1]=a);let o;t[2]!==n||t[3]!==a?(o=(0,R.jsx)(c,{name:n,className:a}),t[2]=n,t[3]=a,t[4]=o):o=t[4];let s;t[5]===i?s=t[6]:(s=(0,R.jsx)(`p`,{className:C,children:i}),t[5]=i,t[6]=s);let u;return t[7]!==o||t[8]!==s?(u=(0,R.jsx)(y,{className:`flex min-h-24 items-center justify-center`,children:(0,R.jsxs)(`div`,{className:`flex max-w-64 items-center justify-center gap-1.5`,children:[o,s]})}),t[7]=o,t[8]=s,t[9]=u):u=t[9],u}function J(e){let t=(0,L.c)(13),{id:n,isActive:r,onActivate:i,onSelect:a,title:o,disabled:s,children:c}=e,u=s===void 0?!1:s,d=u||void 0,f=r&&`bg-state-active`,p=!r&&!u&&`hover:bg-state-hover`,m;t[0]!==f||t[1]!==p?(m=l(te,`relative scroll-mt-7 disabled:cursor-default`,f,p),t[0]=f,t[1]=p,t[2]=m):m=t[2];let h;return t[3]!==c||t[4]!==u||t[5]!==n||t[6]!==r||t[7]!==i||t[8]!==a||t[9]!==d||t[10]!==m||t[11]!==o?(h=(0,R.jsx)(`button`,{type:`button`,id:n,"data-panel-new-tab-item":``,role:`option`,"aria-selected":r,"aria-disabled":d,disabled:u,onClick:a,onMouseEnter:i,onFocus:i,title:o,className:m,children:c}),t[3]=c,t[4]=u,t[5]=n,t[6]=r,t[7]=i,t[8]=a,t[9]=d,t[10]=m,t[11]=o,t[12]=h):h=t[12],h}function je(e){let t=(0,L.c)(30),{id:n,suggestion:r,isActive:i,onActivate:a,onSelect:o}=e,u;t[0]!==o||t[1]!==r?(u=()=>{o(r)},t[0]=o,t[1]=r,t[2]=u):u=t[2];let f=u,p;t[3]===r.path?p=t[4]:(p=s(r.path),t[3]=r.path,t[4]=p);let m=p||null,g;t[5]===r.path?g=t[6]:(g=F(r.path),t[5]=r.path,t[6]=g);let _=g,v;t[7]===r?v=t[8]:(v=De(r),t[7]=r,t[8]=v);let y=i?`bg-state-active`:`hover:bg-state-hover`,b;t[9]===y?b=t[10]:(b=l(`w-full scroll-mt-7 rounded px-2 py-1.5 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,d,C,y),t[9]=y,t[10]=b);let x;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(x=l(h,`text-muted-foreground`),t[11]=x):x=t[11];let S;t[12]===_?S=t[13]:(S=(0,R.jsx)(c,{name:_,className:x,"aria-hidden":!0}),t[12]=_,t[13]=S);let w;t[14]===r.name?w=t[15]:(w=(0,R.jsx)(`span`,{className:`truncate`,children:r.name}),t[14]=r.name,t[15]=w);let E;t[16]===m?E=t[17]:(E=m===null?null:(0,R.jsx)(T,{className:`text-muted-foreground [flex-shrink:9999]`,children:m}),t[16]=m,t[17]=E);let D;t[18]!==E||t[19]!==S||t[20]!==w?(D=(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[S,w,E]}),t[18]=E,t[19]=S,t[20]=w,t[21]=D):D=t[21];let O;return t[22]!==f||t[23]!==n||t[24]!==i||t[25]!==a||t[26]!==D||t[27]!==v||t[28]!==b?(O=(0,R.jsx)(`button`,{type:`button`,id:n,"data-panel-new-tab-item":``,role:`option`,"aria-selected":i,onClick:f,onMouseEnter:a,onFocus:a,title:v,className:b,children:D}),t[22]=f,t[23]=n,t[24]=i,t[25]=a,t[26]=D,t[27]=v,t[28]=b,t[29]=O):O=t[29],O}function Y(e){let t=(0,L.c)(15),{action:n,isActive:r,onActivate:i}=e,a;t[0]===n.icon?a=t[1]:(a=(0,R.jsx)(`span`,{className:N,children:n.icon}),t[0]=n.icon,t[1]=a);let o;t[2]===n.label?o=t[3]:(o=(0,R.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-foreground`,children:n.label}),t[2]=n.label,t[3]=o);let s;t[4]===n.shortcut?s=t[5]:(s=(0,R.jsx)(O,{shortcut:n.shortcut}),t[4]=n.shortcut,t[5]=s);let c;return t[6]!==n.disabled||t[7]!==n.id||t[8]!==n.onSelect||t[9]!==r||t[10]!==i||t[11]!==a||t[12]!==o||t[13]!==s?(c=(0,R.jsxs)(J,{id:n.id,isActive:r,onActivate:i,onSelect:n.onSelect,disabled:n.disabled,children:[a,o,s]}),t[6]=n.disabled,t[7]=n.id,t[8]=n.onSelect,t[9]=r,t[10]=i,t[11]=a,t[12]=o,t[13]=s,t[14]=c):c=t[14],c}function Me(e){let t=(0,L.c)(33),{id:n,item:r,isActive:i,nowMs:a,onActivate:o,onSelect:l}=e,d;t[0]!==r||t[1]!==l?(d=()=>{l(r)},t[0]=r,t[1]=l,t[2]=d):d=t[2];let f=d,p;t[3]===r.path?p=t[4]:(p=F(r.path),t[3]=r.path,t[4]=p);let m=p,h;t[5]===r.path?h=t[6]:(h=I({path:r.path}),t[5]=r.path,t[6]=h);let g=h,_;t[7]===r.path?_=t[8]:(_=s(r.path),t[7]=r.path,t[8]=_);let v=_,y;t[9]!==r.openedAt||t[10]!==a?(y=u({timestamp:r.openedAt,now:a}),t[9]=r.openedAt,t[10]=a,t[11]=y):y=t[11];let b=y,S;t[12]===m?S=t[13]:(S=(0,R.jsx)(`span`,{className:N,children:(0,R.jsx)(c,{name:m,className:x,"aria-hidden":!0})}),t[12]=m,t[13]=S);let C;t[14]===g?C=t[15]:(C=(0,R.jsx)(`span`,{className:`truncate text-foreground`,children:g}),t[14]=g,t[15]=C);let w;t[16]===v?w=t[17]:(w=v?(0,R.jsx)(T,{className:`text-muted-foreground [flex-shrink:9999]`,children:v}):null,t[16]=v,t[17]=w);let E;t[18]!==C||t[19]!==w?(E=(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[C,w]}),t[18]=C,t[19]=w,t[20]=E):E=t[20];let D;t[21]!==i||t[22]!==b?(D=(0,R.jsx)(M,{idle:b,isActive:i}),t[21]=i,t[22]=b,t[23]=D):D=t[23];let O;return t[24]!==f||t[25]!==n||t[26]!==i||t[27]!==r.path||t[28]!==o||t[29]!==D||t[30]!==S||t[31]!==E?(O=(0,R.jsxs)(J,{id:n,isActive:i,onActivate:o,onSelect:f,title:r.path,children:[S,E,D]}),t[24]=f,t[25]=n,t[26]=i,t[27]=r.path,t[28]=o,t[29]=D,t[30]=S,t[31]=E,t[32]=O):O=t[32],O}function Ne(e){let t=(0,L.c)(12),{isExpanded:n,onToggle:r,showMoreCount:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=l(`ml-1.5 mt-0.5 inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground`,C),t[0]=a):a=t[0];let o=n&&`rotate-180`,s;t[1]===o?s=t[2]:(s=l(x,`transition-transform`,o),t[1]=o,t[2]=s);let u;t[3]===s?u=t[4]:(u=(0,R.jsx)(c,{name:`ChevronDown`,className:s,"aria-hidden":!0}),t[3]=s,t[4]=u);let d=n?`Show less`:`Show ${i} more`,f;t[5]===d?f=t[6]:(f=(0,R.jsx)(`span`,{children:d}),t[5]=d,t[6]=f);let p;return t[7]!==n||t[8]!==r||t[9]!==u||t[10]!==f?(p=(0,R.jsxs)(`button`,{type:`button`,"data-panel-new-tab-item":``,"aria-expanded":n,onClick:r,className:a,children:[u,f]}),t[7]=n,t[8]=r,t[9]=u,t[10]=f,t[11]=p):p=t[11],p}function Pe(e){let t=(0,L.c)(90),{projectId:n,environmentId:r,hostId:i,currentThreadId:a,autoFocus:o,actions:s,initialQuery:u,onAutoFocusHandled:d,onSelect:p,recentItemsThreadId:m,showFileSearch:h}=e,v=u===void 0?``:u,y=h===void 0?!0:h,S=b(`file.quickOpen`),w=(0,W.useRef)(null),T=(0,W.useRef)(null),D=(0,W.useId)(),O=f(),[k,ee]=(0,W.useState)(v),[A,j]=(0,W.useState)(-1),[M,te]=(0,W.useState)(!1),[N]=(0,W.useState)(ze),ne=a.length>0?a:null,P=E(m===void 0?ne:m),re;t[0]===k?re=t[1]:(re=k.trim(),t[0]=k,t[1]=re);let F=re,I=F.length>0,ie;t[2]!==a||t[3]!==r||t[4]!==i||t[5]!==n||t[6]!==k?(ie={projectId:n,query:k,limit:xe,environmentId:r,hostId:i,currentThreadId:a},t[2]=a,t[3]=r,t[4]=i,t[5]=n,t[6]=k,t[7]=ie):ie=t[7];let{suggestions:ae,isLoading:oe,fileSearchError:se,isDebouncing:ce,isUnavailable:z}=be(ie),le;t[8]!==s||t[9]!==F?(le=pe(s,F),t[8]=s,t[9]=F,t[10]=le):le=t[10];let ue=le,de;t[11]!==I||t[12]!==ae?(de=I?ae:[],t[11]=I,t[12]=ae,t[13]=de):de=t[13];let fe=de,B;t[14]!==M||t[15]!==P?(B=M?P:P.slice(0,6),t[14]=M,t[15]=P,t[16]=B):B=t[16];let he=B,ge;t[17]!==I||t[18]!==he?(ge=I?[]:he.map(Re),t[17]=I,t[18]=he,t[19]=ge):ge=t[19];let _e=ge,ve;t[20]!==ue||t[21]!==_e||t[22]!==fe?(ve=ke({actions:ue,recentEntries:_e,suggestions:fe}),t[20]=ue,t[21]=_e,t[22]=fe,t[23]=ve):ve=t[23];let V=ve,ye;t[24]===V?ye=t[25]:(ye=V.flatMap(Ie),t[24]=V,t[25]=ye);let H=ye,U;t[26]===H?U=t[27]:(U=H.map(Ee).join(`
2
2
  `),t[26]=H,t[27]=U);let G=U,K=A>=0&&A<H.length?H[A]??null:null,Se,q;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(Se=()=>()=>{T.current!==null&&cancelAnimationFrame(T.current)},q=[],t[28]=Se,t[29]=q):(Se=t[28],q=t[29]),(0,W.useEffect)(Se,q);let Ce,we;t[30]!==o||t[31]!==O||t[32]!==d?(Ce=()=>{if(o){if(T.current!==null&&(cancelAnimationFrame(T.current),T.current=null),O){d();return}w.current?.focus({preventScroll:!0}),T.current=requestAnimationFrame(()=>{T.current=null,w.current?.focus({preventScroll:!0})}),d()}},we=[o,O,d],t[30]=o,t[31]=O,t[32]=d,t[33]=Ce,t[34]=we):(Ce=t[33],we=t[34]),(0,W.useEffect)(Ce,we);let Te;t[35]===G.length?Te=t[36]:(Te=()=>{j(G.length>0?0:-1)},t[35]=G.length,t[36]=Te);let De;t[37]===G?De=t[38]:(De=[G],t[37]=G,t[38]=De),(0,W.useEffect)(Te,De);let Oe;t[39]===p?Oe=t[40]:(Oe=e=>{p({source:e.source,path:e.path})},t[39]=p,t[40]=Oe);let J=Oe,je;t[41]===p?je=t[42]:(je=e=>{p({source:e.source,path:e.path})},t[41]=p,t[42]=je);let Y=je,Me;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(Me=()=>{te(Fe)},t[43]=Me):Me=t[43];let Ne=Me,Pe;t[44]!==K||t[45]!==J||t[46]!==Y||t[47]!==H.length?(Pe=e=>{if(H.length!==0){if(e.key===`ArrowDown`){e.preventDefault(),j(e=>(e+1)%H.length);return}if(e.key===`ArrowUp`){e.preventDefault(),j(e=>e<=0?H.length-1:e-1);return}if(e.key===`Enter`&&K){if(e.preventDefault(),K.kind===`action`){K.action.onSelect();return}if(K.kind===`recent`){Y(K.item);return}K.kind===`suggestion`&&J(K.suggestion)}}},t[44]=K,t[45]=J,t[46]=Y,t[47]=H.length,t[48]=Pe):Pe=t[48];let Le=Pe,Ve;t[49]===K?Ve=t[50]:(Ve=K?Ee(K):void 0,t[49]=K,t[50]=Ve);let He=Ve,Ue=!z&&H.length>0,We=s.length>0?`Search files and actions`:`Search files`,Ge;t[51]===s?Ge=t[52]:(Ge=(0,R.jsx)(me,{actions:s}),t[51]=s,t[52]=Ge);let Ke=Ge;if(!y){let e;return t[53]===Ke?e=t[54]:(e=(0,R.jsx)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:Ke}),t[53]=Ke,t[54]=e),e}let qe;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,R.jsx)(c,{name:`Search`,className:l(`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`,g)}),t[55]=qe):qe=t[55];let Je;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(Je=e=>ee(e.target.value),t[56]=Je):Je=t[56];let Ye=S?`${We} (${S.label})`:We,Xe=S?.ariaKeyshortcuts,Ze=Ue?D:void 0,Qe=Ue?He:void 0,$e=z?`No searchable source`:We,et;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(et=l(`h-8 pl-8 pr-8 focus-visible:ring-0 max-md:pointer-coarse:h-10`,C),t[57]=et):et=t[57];let X;t[58]!==Le||t[59]!==Ue||t[60]!==z||t[61]!==k||t[62]!==Ye||t[63]!==Xe||t[64]!==Ze||t[65]!==Qe||t[66]!==$e?(X=(0,R.jsx)(_,{ref:w,"data-panel-new-tab-item":``,value:k,onChange:Je,onKeyDown:Le,disabled:z,role:`combobox`,"aria-label":Ye,"aria-keyshortcuts":Xe,"aria-autocomplete":`list`,"aria-expanded":Ue,"aria-controls":Ze,"aria-activedescendant":Qe,placeholder:$e,className:et}),t[58]=Le,t[59]=Ue,t[60]=z,t[61]=k,t[62]=Ye,t[63]=Xe,t[64]=Ze,t[65]=Qe,t[66]=$e,t[67]=X):X=t[67];let Z;t[68]===ce?Z=t[69]:(Z=ce?(0,R.jsx)(c,{name:`Spinner`,className:l(`pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 animate-spin text-muted-foreground`,x)}):null,t[68]=ce,t[69]=Z);let Q;t[70]!==X||t[71]!==Z?(Q=(0,R.jsxs)(`div`,{className:`relative min-w-0`,children:[qe,X,Z]}),t[70]=X,t[71]=Z,t[72]=Q):Q=t[72];let tt=I?null:Ke,$;t[73]!==A||t[74]!==se||t[75]!==J||t[76]!==Y||t[77]!==I||t[78]!==oe||t[79]!==M||t[80]!==z||t[81]!==D||t[82]!==N||t[83]!==P||t[84]!==V?($=z?(0,R.jsx)(Ae,{iconName:`FileQuestion`,message:`No searchable source is available.`}):(0,R.jsx)(Be,{activeIndex:A,hasQuery:I,searchError:se,isLoading:oe,listboxId:D,nowMs:N,onActivateIndex:j,onSuggestionSelect:J,onRecentSelect:Y,recent:{count:P.length,showMoreCount:Math.max(0,P.length-6),isExpanded:M,toggleVisible:!I&&P.length>6,emptyHintVisible:!I&&P.length===0,onToggleExpanded:Ne},sections:V}),t[73]=A,t[74]=se,t[75]=J,t[76]=Y,t[77]=I,t[78]=oe,t[79]=M,t[80]=z,t[81]=D,t[82]=N,t[83]=P,t[84]=V,t[85]=$):$=t[85];let nt;return t[86]!==Q||t[87]!==tt||t[88]!==$?(nt=(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[Q,tt,$]}),t[86]=Q,t[87]=tt,t[88]=$,t[89]=nt):nt=t[89],nt}function Fe(e){return!e}function Ie(e){return e.items.flatMap(Le)}function Le(e){let{entry:t,index:n}=e;return n>=0?[t]:[]}function Re(e){return{kind:`recent`,item:e}}function ze(){return Date.now()}function Be(e){let t=(0,L.c)(37),{activeIndex:n,hasQuery:r,searchError:i,isLoading:a,listboxId:o,nowMs:s,onActivateIndex:c,onSuggestionSelect:u,onRecentSelect:d,recent:f,sections:p}=e,m;t[0]===p?m=t[1]:(m=p.some(Ve),t[0]=p,t[1]=m);let h=m,g=a&&!h,_=i&&!h&&!g,v=g||_||r&&!h&&!g&&!_,b=!r&&v;if(p.length===0&&!f.emptyHintVisible&&!g&&!_){let e=r?`FileQuestion`:`File`,n=r?`No results match your search.`:`Type to search files.`,i;return t[2]!==e||t[3]!==n?(i=(0,R.jsx)(Ae,{iconName:e,message:n}),t[2]=e,t[3]=n,t[4]=i):i=t[4],i}let x;t[5]!==_||t[6]!==g||t[7]!==v?(x=v?(0,R.jsx)(Ae,{iconName:_?`AlertCircle`:g?`Spinner`:`FileQuestion`,iconClassName:g?`animate-spin`:void 0,message:_?`Search failed.`:g?`Searching files...`:`No files match your search.`}):null,t[5]=_,t[6]=g,t[7]=v,t[8]=x):x=t[8];let S=x,w=r?null:S,T;t[9]!==n||t[10]!==b||t[11]!==o||t[12]!==s||t[13]!==c||t[14]!==d||t[15]!==u||t[16]!==f.count||t[17]!==p?(T=p.length>0?(0,R.jsx)(`div`,{id:o,role:`listbox`,"aria-label":`Search results`,children:p.map((e,t)=>{let r=t>0||b;return(0,R.jsxs)(`section`,{role:`group`,"aria-label":q[e.kind],className:l(r&&`mt-3`),children:[(0,R.jsx)(j,{label:q[e.kind],count:e.kind===`recent`&&f.count>0?f.count:void 0,sticky:!0,className:r?`pt-2`:void 0}),(0,R.jsx)(`div`,{className:`flex flex-col gap-px`,children:e.items.map(e=>{let{entry:t,index:r}=e,i=Ee(t),a=r>=0&&r===n,o=()=>c(r);return t.kind===`action`?(0,R.jsx)(Y,{action:t.action,isActive:a,onActivate:o},i):t.kind===`suggestion`?(0,R.jsx)(je,{id:i,suggestion:t.suggestion,isActive:a,onActivate:o,onSelect:u},i):(0,R.jsx)(Me,{id:i,item:t.item,isActive:a,nowMs:s,onActivate:o,onSelect:d},i)})})]},e.kind)})}):null,t[9]=n,t[10]=b,t[11]=o,t[12]=s,t[13]=c,t[14]=d,t[15]=u,t[16]=f.count,t[17]=p,t[18]=T):T=t[18];let E;t[19]!==r||t[20]!==S||t[21]!==p.length?(E=r&&S?(0,R.jsx)(`div`,{className:l(p.length>0&&`mt-3`),children:S}):null,t[19]=r,t[20]=S,t[21]=p.length,t[22]=E):E=t[22];let D;t[23]!==b||t[24]!==f.emptyHintVisible?(D=f.emptyHintVisible?(0,R.jsxs)(`section`,{className:l(b&&`mt-3`),children:[(0,R.jsx)(j,{label:q.recent,sticky:!0,className:b?`pt-2`:void 0}),(0,R.jsx)(y,{className:l(`py-4`,C),children:`Plans, mockups, and files you open will show up here.`})]}):null,t[23]=b,t[24]=f.emptyHintVisible,t[25]=D):D=t[25];let O;t[26]!==f.isExpanded||t[27]!==f.onToggleExpanded||t[28]!==f.showMoreCount||t[29]!==f.toggleVisible?(O=f.toggleVisible?(0,R.jsx)(Ne,{isExpanded:f.isExpanded,onToggle:f.onToggleExpanded,showMoreCount:f.showMoreCount}):null,t[26]=f.isExpanded,t[27]=f.onToggleExpanded,t[28]=f.showMoreCount,t[29]=f.toggleVisible,t[30]=O):O=t[30];let k;return t[31]!==w||t[32]!==T||t[33]!==E||t[34]!==D||t[35]!==O?(k=(0,R.jsxs)(`div`,{className:`pb-1`,children:[w,T,E,D,O]}),t[31]=w,t[32]=T,t[33]=E,t[34]=D,t[35]=O,t[36]=k):k=t[36],k}function Ve(e){return e.kind===`files`}function He(e){let t=(0,L.c)(18),{autoFocus:n,currentThreadId:r,environmentId:i,hostId:a,initialQuery:o,onAutoFocusHandled:s,onOpenBrowser:c,onSelect:l,onStartTerminal:u,pluginActions:d,projectId:f,recentItemsThreadId:p,showFileSearch:m,startTerminalDisabled:h,startTerminalTrailing:g}=e,_;t[0]!==c||t[1]!==u||t[2]!==d||t[3]!==h||t[4]!==g?(_={onOpenBrowser:c,onStartTerminal:u,pluginActions:d,startTerminalDisabled:h,startTerminalTrailing:g},t[0]=c,t[1]=u,t[2]=d,t[3]=h,t[4]=g,t[5]=_):_=t[5];let v=de(_),y;return t[6]!==v||t[7]!==n||t[8]!==r||t[9]!==i||t[10]!==a||t[11]!==o||t[12]!==s||t[13]!==l||t[14]!==f||t[15]!==p||t[16]!==m?(y=(0,R.jsx)(`div`,{"data-panel-new-tab-page":``,className:`flex min-h-full flex-col gap-3 bg-sidebar px-4 pb-3 pt-1`,children:(0,R.jsx)(Pe,{projectId:f,environmentId:i,hostId:a,currentThreadId:r,autoFocus:n,actions:v,initialQuery:o,onAutoFocusHandled:s,onSelect:l,recentItemsThreadId:p,showFileSearch:m})}),t[6]=v,t[7]=n,t[8]=r,t[9]=i,t[10]=a,t[11]=o,t[12]=s,t[13]=l,t[14]=f,t[15]=p,t[16]=m,t[17]=y):y=t[17],y}export{He as NewTabPage};