@p4code/cli 0.8.6 → 0.8.7

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 (277) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/{binCli-BFaqyrJo.mjs → binCli-D_84b0CF.mjs} +151 -47
  3. package/dist/client/.vite/manifest.json +2069 -2069
  4. package/dist/client/assets/{AnimatedHeight-4Jo1qKaP.js → AnimatedHeight-DewGDSmN.js} +2 -2
  5. package/dist/client/assets/{AuthSurfaceShell-BgwhQCPc.js → AuthSurfaceShell-D29U36jB.js} +2 -2
  6. package/dist/client/assets/{CSPContext-BuROUwKB.js → CSPContext-CB4Jj3Uk.js} +2 -2
  7. package/dist/client/assets/{ChatGptUsageButton-CG-YKS6A.js → ChatGptUsageButton-CFN6c9Ue.js} +2 -2
  8. package/dist/client/assets/{ChatMarkdown-CNhzmB5x.js → ChatMarkdown-DTSMYNs8.js} +4 -4
  9. package/dist/client/assets/{CodexSetupSection.logic-C0ptwwry.js → CodexSetupSection.logic-DQMTTenV.js} +2 -2
  10. package/dist/client/assets/{ComboboxClear-CB7SvrMN.js → ComboboxClear-D8WYxa7i.js} +2 -2
  11. package/dist/client/assets/{CommandBlock-D5btlz0n.js → CommandBlock-VzUG411k.js} +2 -2
  12. package/dist/client/assets/{ComposerPromptEditor-DMONEQeI.js → ComposerPromptEditor-lIFv0Iko.js} +4 -4
  13. package/dist/client/assets/{CompositeRoot-NCPzVvXO.js → CompositeRoot-CLSWLNTl.js} +2 -2
  14. package/dist/client/assets/{ConnectionStatusDot-vBtwC3Vj.js → ConnectionStatusDot-B0ZKI-zI.js} +2 -2
  15. package/dist/client/assets/{DevicePanel-B07cF6Kr.js → DevicePanel-BQ6aWeSD.js} +2 -2
  16. package/dist/client/assets/{DeviceSetup-BEH97y5X.js → DeviceSetup-Bg5OpWbo.js} +2 -2
  17. package/dist/client/assets/{DialogTitle-DrhNhCSD.js → DialogTitle-BVkBTuS9.js} +2 -2
  18. package/dist/client/assets/{DiffCommentAnnotation-DRify9qt.js → DiffCommentAnnotation-BsI9yTe1.js} +2 -2
  19. package/dist/client/assets/{DiffFileTree-wSWCfkHQ.js → DiffFileTree-Bg8GHn2r.js} +2 -2
  20. package/dist/client/assets/{DiffPanel-DuYnpEdL.js → DiffPanel-D2TxWIFd.js} +2 -2
  21. package/dist/client/assets/{DiffWorkerPoolProvider-C7kCyuBf.js → DiffWorkerPoolProvider-B9BXoLYM.js} +2 -2
  22. package/dist/client/assets/{EnvironmentMachineIcon-pSS7qKfw.js → EnvironmentMachineIcon-DX1wHHgS.js} +2 -2
  23. package/dist/client/assets/{ExpandableText-BMD3qugZ.js → ExpandableText-DfTvwfDp.js} +2 -2
  24. package/dist/client/assets/{FieldControl-BTrrbQ3K.js → FieldControl-CrNWnPN_.js} +2 -2
  25. package/dist/client/assets/{FileDiff-DHS_UG0K.js → FileDiff-Ds-DSHzC.js} +2 -2
  26. package/dist/client/assets/{FilePreviewPanel-CYb5xyMm.js → FilePreviewPanel-CyR5pXUr.js} +2 -2
  27. package/dist/client/assets/{FoldedSettingsSection-CyRBKQ16.js → FoldedSettingsSection-DQesC0Ch.js} +2 -2
  28. package/dist/client/assets/{FormContext-CBGeQN77.js → FormContext-CUf-dYwe.js} +2 -2
  29. package/dist/client/assets/{Icons-AkySFIEx.js → Icons-DMu3kCVA.js} +2 -2
  30. package/dist/client/assets/{KeybindingsSettings.logic-CkDiTn0M.js → KeybindingsSettings.logic-BB1oFV_W.js} +2 -2
  31. package/dist/client/assets/{NoProjectsHero-DyNL-MrS.js → NoProjectsHero-D0SwrjYG.js} +2 -2
  32. package/dist/client/assets/{PanelLayoutControls-NUeu7nMQ.js → PanelLayoutControls-Bfgdx7QX.js} +4 -4
  33. package/dist/client/assets/{PierreEntryIcon-IuSWNqlA.js → PierreEntryIcon-BUl5qtCE.js} +2 -2
  34. package/dist/client/assets/{PreviewPanel-CxJz5hUK.js → PreviewPanel-CbotCgGz.js} +2 -2
  35. package/dist/client/assets/{ProjectDefaultsSettings-bQ5ORxlD.js → ProjectDefaultsSettings-GpUKCz2U.js} +2 -2
  36. package/dist/client/assets/{ProjectFavicon-ClxI7OY3.js → ProjectFavicon-BKEw0TrD.js} +3 -3
  37. package/dist/client/assets/{ProjectIconPickerDialog-BTsAZWr2.js → ProjectIconPickerDialog-C-KFxEg0.js} +2 -2
  38. package/dist/client/assets/{ProjectMonogram-DCxOyCyM.js → ProjectMonogram-B2dsNF6-.js} +2 -2
  39. package/dist/client/assets/{ProviderAuthTerminal-KAhmp-D6.js → ProviderAuthTerminal-Cwr8Z1Ly.js} +2 -2
  40. package/dist/client/assets/{ProviderModelPicker-DQG8_Hn8.js → ProviderModelPicker-CIxbqWeL.js} +2 -2
  41. package/dist/client/assets/{ProviderSettingsForm-BRBhNcWm.js → ProviderSettingsForm-DpmAB_Jq.js} +2 -2
  42. package/dist/client/assets/{PullRequestCodeTab-sN76VbmK.js → PullRequestCodeTab-qEGBl5Kn.js} +2 -2
  43. package/dist/client/assets/{ReadOnlySourcePreview-BiWn5R0O.js → ReadOnlySourcePreview-C5y6ELAP.js} +2 -2
  44. package/dist/client/assets/{RenderErrorBoundary-CwR9l2vj.js → RenderErrorBoundary-CyH8UwmD.js} +2 -2
  45. package/dist/client/assets/{ScheduledTasksSettings-iPAhYreZ.js → ScheduledTasksSettings-deUjWQ39.js} +2 -2
  46. package/dist/client/assets/{ScopedSwitch-DrThVUz_.js → ScopedSwitch-pdvWIJp5.js} +2 -2
  47. package/dist/client/assets/{SecretInput-C8iO0LWS.js → SecretInput-C11F3Wuh.js} +2 -2
  48. package/dist/client/assets/{SettingsPanels-BtdHxcNW.js → SettingsPanels-DExy67bz.js} +2 -2
  49. package/dist/client/assets/{SettingsPanels.logic-yZixYwld.js → SettingsPanels.logic-zUA6f3HT.js} +2 -2
  50. package/dist/client/assets/{SettingsScopeNotice-f82KPnDY.js → SettingsScopeNotice-N6bcXfto.js} +2 -2
  51. package/dist/client/assets/{T3ConnectAccountPages-m_7RF9L_.js → T3ConnectAccountPages-uVnu-v4W.js} +2 -2
  52. package/dist/client/assets/{T3ConnectSidebarSignIn-DJTcBcGh.js → T3ConnectSidebarSignIn-CZCWzt6C.js} +2 -2
  53. package/dist/client/assets/{ThemeEditorPanel-olXdAmEu.js → ThemeEditorPanel-CjUB7HmU.js} +2 -2
  54. package/dist/client/assets/{ThreadTerminalDrawer-BQDs5eem.js → ThreadTerminalDrawer-CAh-h3eK.js} +2 -2
  55. package/dist/client/assets/{Virtualizer-DqZNglST.js → Virtualizer-CB4f0UTD.js} +2 -2
  56. package/dist/client/assets/{WorkspaceBreadcrumb-B6kfrQ73.js → WorkspaceBreadcrumb-3VgFkWcC.js} +2 -2
  57. package/dist/client/assets/{WorkspacePageContainer-DSbQuXwt.js → WorkspacePageContainer-8jksqZGW.js} +2 -2
  58. package/dist/client/assets/{WorkspacePageHeader-GK8yx2Yo.js → WorkspacePageHeader-IRvZnA0X.js} +2 -2
  59. package/dist/client/assets/{_chat-DsJhLPIV.js → _chat-BfQTKc_9.js} +5 -5
  60. package/dist/client/assets/{_chat.index-BPJ4rR-G.js → _chat.index-DnYerwxz.js} +2 -2
  61. package/dist/client/assets/{_chat.new-CfqCt0Fk.js → _chat.new-XtBIcyRw.js} +2 -2
  62. package/dist/client/assets/{_chat.pull-requests-BfTP6YhJ.js → _chat.pull-requests-Dz-eLkAP.js} +2 -2
  63. package/dist/client/assets/{abnfDiagram-VCTEODGH-Cg5QSgHP.js → abnfDiagram-VCTEODGH-DUPWAarL.js} +2 -2
  64. package/dist/client/assets/{alert-DwFQdL_W.js → alert-DzxRsWWi.js} +2 -2
  65. package/dist/client/assets/architecture-7GRP2DOG-DTyqnvkZ.js +1 -0
  66. package/dist/client/assets/{architectureDiagram-5GKGNRK7-Dk3aYsC1.js → architectureDiagram-5GKGNRK7-ipdl5Chl.js} +2 -2
  67. package/dist/client/assets/{assets-1IiF113B.js → assets-B7aY-rQd.js} +2 -2
  68. package/dist/client/assets/{blockDiagram-I7D4REHJ-C3znhuKn.js → blockDiagram-I7D4REHJ-CCqcBoEP.js} +2 -2
  69. package/dist/client/assets/{browserHistoryStore-DNPsjLW4.js → browserHistoryStore-TLJ0k3I1.js} +2 -2
  70. package/dist/client/assets/{browserLinkTarget-1GMN2suO.js → browserLinkTarget-Du_qPFvd.js} +2 -2
  71. package/dist/client/assets/{c4Diagram-7LVT6UL2-D-Q_GaXJ.js → c4Diagram-7LVT6UL2-D0uMteR1.js} +2 -2
  72. package/dist/client/assets/channel-BO8pVrSI.js +2 -0
  73. package/dist/client/assets/{checkbox-CzKUo-R1.js → checkbox-Gd1YCUIl.js} +2 -2
  74. package/dist/client/assets/{chunk-4HAMMTFA-CY7q81OM.js → chunk-4HAMMTFA-B3SWgtem.js} +2 -2
  75. package/dist/client/assets/{chunk-75Z2AOVW-14_TWBCK.js → chunk-75Z2AOVW-CXAakYxI.js} +2 -2
  76. package/dist/client/assets/{chunk-DU6HZSFF-BWG3N9au.js → chunk-DU6HZSFF-B4qcstD9.js} +2 -2
  77. package/dist/client/assets/{chunk-F27PBJKO-vnlzbF2j.js → chunk-F27PBJKO-DimzPDjs.js} +2 -2
  78. package/dist/client/assets/{chunk-GMAD6QVW-CL48mY_-.js → chunk-GMAD6QVW-BHA-Os4E.js} +2 -2
  79. package/dist/client/assets/{chunk-GVQU2GXP-Dzgc6o98.js → chunk-GVQU2GXP-P9nMI_GJ.js} +2 -2
  80. package/dist/client/assets/{chunk-IMKFNOWR-BP3CZAoc.js → chunk-IMKFNOWR-RgWCceFN.js} +2 -2
  81. package/dist/client/assets/{chunk-L3NEJ4N5-DJr6VoYO.js → chunk-L3NEJ4N5-9p7zIkHC.js} +2 -2
  82. package/dist/client/assets/{chunk-OSK3NFVY-B7dCia9b.js → chunk-OSK3NFVY-C9IokqLY.js} +2 -2
  83. package/dist/client/assets/{chunk-P2QGCYS3-C39wNHCE.js → chunk-P2QGCYS3-Dwk8ORW_.js} +2 -2
  84. package/dist/client/assets/{chunk-POPQ4Y6H-lHPfawSy.js → chunk-POPQ4Y6H-BwYKYQwt.js} +2 -2
  85. package/dist/client/assets/{chunk-PWAF6VOD-B-onoF1f.js → chunk-PWAF6VOD-BMw0rklB.js} +2 -2
  86. package/dist/client/assets/{chunk-SHT3W25Y-Df8OXB-a.js → chunk-SHT3W25Y-D3ovSAoa.js} +2 -2
  87. package/dist/client/assets/{chunk-SVP7TREG-B5Jq9B5Y.js → chunk-SVP7TREG-CpaRTznV.js} +2 -2
  88. package/dist/client/assets/{chunk-TICWLB2K-B5SLi6aM.js → chunk-TICWLB2K-CAtIccZJ.js} +2 -2
  89. package/dist/client/assets/classDiagram-ZZMXUADV-Scmt9e5N.js +2 -0
  90. package/dist/client/assets/classDiagram-v2-VYDZK3BY-Scmt9e5N.js +2 -0
  91. package/dist/client/assets/{color-picker-CkJLA9Jr.js → color-picker-DYoHU1P8.js} +2 -2
  92. package/dist/client/assets/{combobox-B6mdMhHV.js → combobox-Ddag8Jom.js} +2 -2
  93. package/dist/client/assets/{command-DJuCVIR5.js → command-B35zAYVN.js} +2 -2
  94. package/dist/client/assets/{connect-rtC5Yxq-.js → connect-XgeleCz9.js} +2 -2
  95. package/dist/client/assets/{connect-agent-CPPwjVyn.js → connect-agent-BRIcxQbo.js} +2 -2
  96. package/dist/client/assets/{cynefin-OW5HDTMX-CARsjMgW.js → cynefin-OW5HDTMX-Br0UWz2p.js} +1 -1
  97. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-CHY9mnu2.js → cynefinDiagram-5FMLGOSQ-Bz8AWXlE.js} +2 -2
  98. package/dist/client/assets/{dagre-GXQ25YYZ-C0FrjxaN.js → dagre-GXQ25YYZ-Kk1kLU-A.js} +2 -2
  99. package/dist/client/assets/{device-CR5lpfef.js → device-CJH4ixRH.js} +2 -2
  100. package/dist/client/assets/{diagram-S7CK7UJ4-PtPpZAI6.js → diagram-S7CK7UJ4-Dogw5edZ.js} +2 -2
  101. package/dist/client/assets/{diagram-UQ7AKVKN-DUgq-dTJ.js → diagram-UQ7AKVKN-kg5DSfbZ.js} +2 -2
  102. package/dist/client/assets/{diagram-VSXAHHWV-Gh5HsUIP.js → diagram-VSXAHHWV-DXdyRkdD.js} +2 -2
  103. package/dist/client/assets/{diagram-VX7I27RA-D5FMJiCf.js → diagram-VX7I27RA-CNO5Z04I.js} +2 -2
  104. package/dist/client/assets/{diagram-Z3DM3KII-CmAYyvaL.js → diagram-Z3DM3KII-7Pw0HXMg.js} +2 -2
  105. package/dist/client/assets/{dialog-DF47CrNT.js → dialog-C9_Ef3sx.js} +2 -2
  106. package/dist/client/assets/{diffRendering-zhNPdu0X.js → diffRendering-CAxImuLd.js} +2 -2
  107. package/dist/client/assets/{discovery-list-BHQKwt20.js → discovery-list-DXE1P9pq.js} +2 -2
  108. package/dist/client/assets/{dist-xJXPIdFu.js → dist-DOyHkZUI.js} +3 -3
  109. package/dist/client/assets/{draft-input-Dj2IHuwL.js → draft-input-6dynCiw_.js} +2 -2
  110. package/dist/client/assets/{duoViewer-uYgErMSw.js → duoViewer-BFeSS1Av.js} +2 -2
  111. package/dist/client/assets/{dynamic-CM5x0VU9.js → dynamic-BxCDxZLw.js} +2 -2
  112. package/dist/client/assets/{ebnfDiagram-PWID7BFC-C2bi_JaD.js → ebnfDiagram-PWID7BFC-DD9UVmrJ.js} +2 -2
  113. package/dist/client/assets/{embeddedScripts-CrApSF9h.js → embeddedScripts-CIC2AYGL.js} +2 -2
  114. package/dist/client/assets/{empty-DqTsGaFf.js → empty-BvJSXK20.js} +2 -2
  115. package/dist/client/assets/{entities-BJX4eZyc.js → entities-Dzl1j2jY.js} +2 -2
  116. package/dist/client/assets/{erDiagram-RLTQ6QDP-BNnOWsqy.js → erDiagram-RLTQ6QDP-BJ--ph2e.js} +2 -2
  117. package/dist/client/assets/eventmodeling-NTZA5JFV-DrPNirV-.js +1 -0
  118. package/dist/client/assets/{fileLinks-DO5hZpK2.js → fileLinks-BZV-xG7Q.js} +2 -2
  119. package/dist/client/assets/{fileTreeExpansion-CIOHZWsx.js → fileTreeExpansion-SSkII8h0.js} +2 -2
  120. package/dist/client/assets/flowDiagram-HODETNUW-D4bD8hue.js +1 -0
  121. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-Bnkb2Ngr.js → ganttDiagram-EL5Y4UJY-CAMkT1YN.js} +2 -2
  122. package/dist/client/assets/{getDiffFileInput-DQz1O4Oa.js → getDiffFileInput-BbRHVLd8.js} +2 -2
  123. package/dist/client/assets/{gitGraph-4MIJSDKK-D-LR6ljt.js → gitGraph-4MIJSDKK-DsGem99u.js} +1 -1
  124. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-Dxeh7Ifh.js → gitGraphDiagram-WWUBYQGX-BkbTIyDI.js} +2 -2
  125. package/dist/client/assets/{guideRunStore-BDwUrwVG.js → guideRunStore-CRgghh5M.js} +2 -2
  126. package/dist/client/assets/{htmlRender-u6aukaIS.js → htmlRender-DhaCAG_8.js} +2 -2
  127. package/dist/client/assets/{index-CX66rK96.js → index-CyuShNwE.js} +3 -3
  128. package/dist/client/assets/{info-A6RAGUB7-UNUNy-u6.js → info-A6RAGUB7-BBQkQpY8.js} +1 -1
  129. package/dist/client/assets/{infoDiagram-27XIBGKW-CGvleawa.js → infoDiagram-27XIBGKW-B-aRfZJ5.js} +2 -2
  130. package/dist/client/assets/{input-Co98bOaa.js → input-BZEAWLAC.js} +2 -2
  131. package/dist/client/assets/{input-group-C65K0cEy.js → input-group-DQ0hiSJt.js} +2 -2
  132. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-D-QGLluZ.js → ishikawaDiagram-5VMMS53U-BuQT0JFA.js} +2 -2
  133. package/dist/client/assets/{journeyDiagram-3NMN7TZE-Cc9GB3QS.js → journeyDiagram-3NMN7TZE-DvMkIp6_.js} +2 -2
  134. package/dist/client/assets/{kanban-definition-UXKFOSKX-BgUV6FhS.js → kanban-definition-UXKFOSKX-BH-BleQp.js} +2 -2
  135. package/dist/client/assets/{kbd-CwLhv_1P.js → kbd-B5U1dWuw.js} +2 -2
  136. package/dist/client/assets/{keybindings-DcZTzIOk.js → keybindings-BOV97yVS.js} +2 -2
  137. package/dist/client/assets/{lazyRouteComponent-OwDgZa6d.js → lazyRouteComponent-Cz9CWj20.js} +2 -2
  138. package/dist/client/assets/{line-sNp2Ita4.js → line-ldmXyAfR.js} +2 -2
  139. package/dist/client/assets/{link-Djjm-r3O.js → link-GWWfOiYJ.js} +2 -2
  140. package/dist/client/assets/{linkedPrompt-jLrYuA9Q.js → linkedPrompt-CUOURNo0.js} +2 -2
  141. package/dist/client/assets/{main-BD763ru4.js → main-DJbmaTSv.js} +7 -7
  142. package/dist/client/assets/{mediaReference-DWr_Q7C6.js → mediaReference-CHMrPLS_.js} +2 -2
  143. package/dist/client/assets/{mediaSource-N7mIMF8c.js → mediaSource-C2DVrhoI.js} +2 -2
  144. package/dist/client/assets/{mermaid-parser.core-BlZknfsy.js → mermaid-parser.core-CLu3jfMo.js} +4 -4
  145. package/dist/client/assets/{mermaid.core--V3R0CM0.js → mermaid.core-CcbjUEO9.js} +5 -5
  146. package/dist/client/assets/{mindmap-definition-YA3MSWOX-Dcl1V19a.js → mindmap-definition-YA3MSWOX-BgA-mHTZ.js} +2 -2
  147. package/dist/client/assets/{number-field-Dl9-pPML.js → number-field-BuLW4JjE.js} +2 -2
  148. package/dist/client/assets/{observeResize-Cu9WOk75.js → observeResize-DRhwSBbU.js} +2 -2
  149. package/dist/client/assets/{onboarding-D28jAqhK.js → onboarding-JdAo8zsA.js} +2 -2
  150. package/dist/client/assets/{openFileInPreview-D8k3bAuB.js → openFileInPreview-fPqhkMo9.js} +2 -2
  151. package/dist/client/assets/{p4ProjectFile-CA-XB2mx.js → p4ProjectFile-CvON4UbU.js} +2 -2
  152. package/dist/client/assets/{packet-AYTQ26CC-Cq8cyogA.js → packet-AYTQ26CC-DApn8qRX.js} +1 -1
  153. package/dist/client/assets/{pair-DTdVCqrt.js → pair-BZFzlFlB.js} +2 -2
  154. package/dist/client/assets/{pegDiagram-XKGWAZYB-CIlCIsuG.js → pegDiagram-XKGWAZYB-CXEiF-e_.js} +2 -2
  155. package/dist/client/assets/{phoneViewer-Cq9_4rg4.js → phoneViewer-B2PYzUOK.js} +2 -2
  156. package/dist/client/assets/{pie-WAS4IAKB-C1UwrJ5y.js → pie-WAS4IAKB-CYqWZV05.js} +1 -1
  157. package/dist/client/assets/{pieDiagram-E7YTZNPT-DE2DXJ6n.js → pieDiagram-E7YTZNPT-DI-IJXNl.js} +2 -2
  158. package/dist/client/assets/{pierre-icons-CTwu60OQ.js → pierre-icons-bBNX7pHG.js} +2 -2
  159. package/dist/client/assets/{popover-C_CynHVT.js → popover-O8JaXWO5.js} +2 -2
  160. package/dist/client/assets/{preview-BQQJkcGO.js → preview-BVbvXV-T.js} +2 -2
  161. package/dist/client/assets/{preview-BhxAapOU.js → preview-CBNZZm4k.js} +2 -2
  162. package/dist/client/assets/{previewMiniPlayerStore-DFZVAQQT.js → previewMiniPlayerStore-C_DZeWb5.js} +2 -2
  163. package/dist/client/assets/{primary-DSRxd6M2.js → primary-fvERVyIG.js} +2 -2
  164. package/dist/client/assets/{primaryCloudLinkState-CFpdks4W.js → primaryCloudLinkState-CT9FDATw.js} +2 -2
  165. package/dist/client/assets/{projectFilesQueryState-C-ocQLMP.js → projectFilesQueryState-D-fWLsA3.js} +2 -2
  166. package/dist/client/assets/{projectScriptEditor-B8vMmwB8.js → projectScriptEditor-BqddH5Lr.js} +2 -2
  167. package/dist/client/assets/{providerSkills-CcHRwAN-.js → providerSkills-JMYzRM2N.js} +2 -2
  168. package/dist/client/assets/{pullRequestDetail.logic-BtIgsnU5.js → pullRequestDetail.logic-BVBxawC1.js} +2 -2
  169. package/dist/client/assets/{pullRequestIcons-DIZr6jl2.js → pullRequestIcons-CuqlEFYV.js} +2 -2
  170. package/dist/client/assets/{pullRequestReviewStore-amd6o4Qz.js → pullRequestReviewStore-DmxuV1dp.js} +2 -2
  171. package/dist/client/assets/{pullRequests-DYydEt0i.js → pullRequests-CEpTVk5m.js} +2 -2
  172. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-B71DEG2g.js → quadrantDiagram-AXDQQJYC-Os8jPhhw.js} +2 -2
  173. package/dist/client/assets/{queries-CL96nG-6.js → queries-BBd2XSpN.js} +2 -2
  174. package/dist/client/assets/{query-BUdsNuE-.js → query-fboCqXXy.js} +2 -2
  175. package/dist/client/assets/{radar-RG4KPBEZ-DXixQtmq.js → radar-RG4KPBEZ-BwFp-k4W.js} +1 -1
  176. package/dist/client/assets/{radio-group-A1S0ujjv.js → radio-group-B2ziR973.js} +2 -2
  177. package/dist/client/assets/{railroad-74A4TZTK-Dc3k62gE.js → railroad-74A4TZTK-BhaeCUUR.js} +1 -1
  178. package/dist/client/assets/railroad-abnf-HS5TGJTU-D_PV710-.js +1 -0
  179. package/dist/client/assets/railroad-ebnf-LZEXJU2U-CmXdS8HA.js +1 -0
  180. package/dist/client/assets/railroad-peg-WCYAUIDC-BpmFZ4-g.js +1 -0
  181. package/dist/client/assets/{railroadDiagram-O6MQD6OU-CI6QRate.js → railroadDiagram-O6MQD6OU-BwEd4kBJ.js} +2 -2
  182. package/dist/client/assets/{renderScheduler-5H6UPjvu.js → renderScheduler-C031Kal5.js} +2 -2
  183. package/dist/client/assets/{requirementDiagram-BXWQKSXE-B0Buh6ge.js → requirementDiagram-BXWQKSXE-B3cJlOEK.js} +2 -2
  184. package/dist/client/assets/{rightPanelStore-DqykKcOU.js → rightPanelStore-JWjHC9l1.js} +2 -2
  185. package/dist/client/assets/{runtime-CKyYqaHd.js → runtime-B-UcwNuZ.js} +2 -2
  186. package/dist/client/assets/{runtime-CUfZ5Phy.js → runtime-BVzm9sLS.js} +3 -3
  187. package/dist/client/assets/{runtimeModeConfig-UzS-MhY2.js → runtimeModeConfig-Ce0Dnm2_.js} +2 -2
  188. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-Deq_JVb6.js → sankeyDiagram-P5KCCOFB-C8CBmy9t.js} +2 -2
  189. package/dist/client/assets/{scheduledTasksSettings.logic-C4ccNgNW.js → scheduledTasksSettings.logic-CJBRz5bk.js} +2 -2
  190. package/dist/client/assets/{scroll-area-Cv4W51s4.js → scroll-area-D4H8QGpd.js} +2 -2
  191. package/dist/client/assets/{select-DzlDEkfd.js → select-D0wmEFXx.js} +2 -2
  192. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-1qHr7xDW.js → sequenceDiagram-WJ2MYXX4-IbrowOt4.js} +2 -2
  193. package/dist/client/assets/{server-wAR-1-oq.js → server-97u7Iupv.js} +2 -2
  194. package/dist/client/assets/{session-kQcn2Ab9.js → session-CPQQ27HG.js} +2 -2
  195. package/dist/client/assets/{session-logic-0uuqchi0.js → session-logic-CiMoVF-V.js} +2 -2
  196. package/dist/client/assets/{settings-CJRxKrr5.js → settings-mAdVdtYz.js} +2 -2
  197. package/dist/client/assets/{settings.appearance-CdYf34t-.js → settings.appearance-SUyLnEit.js} +2 -2
  198. package/dist/client/assets/settings.archived-C-clMQMK.js +2 -0
  199. package/dist/client/assets/{settings.computer-use-BBwkrRF0.js → settings.computer-use-IGLZXOs8.js} +2 -2
  200. package/dist/client/assets/{settings.connections-C0ScdFUO.js → settings.connections-DhpKQ7ay.js} +2 -2
  201. package/dist/client/assets/{settings.data-controls-CqmbYgtL.js → settings.data-controls-FiLy_ddv.js} +2 -2
  202. package/dist/client/assets/{settings.decisions-Bze1TWCV.js → settings.decisions-DZO8QWHd.js} +2 -2
  203. package/dist/client/assets/{settings.diagnostics-DljjNhZd.js → settings.diagnostics-CG2kVUBD.js} +2 -2
  204. package/dist/client/assets/{settings.general-DbmtxjMV.js → settings.general-jsS1Ydzs.js} +2 -2
  205. package/dist/client/assets/{settings.integrations-o3KHIBuO.js → settings.integrations-DDlR7Et9.js} +2 -2
  206. package/dist/client/assets/{settings.keybindings-DKWMv6nZ.js → settings.keybindings-BYwCM_iI.js} +2 -2
  207. package/dist/client/assets/{settings.open-source-licenses-BRMYfP3x.js → settings.open-source-licenses-CZcWXiGu.js} +2 -2
  208. package/dist/client/assets/{settings.plugins-CxGm36pf.js → settings.plugins-P_B4taFp.js} +2 -2
  209. package/dist/client/assets/{settings.projects-B_Zp3Z9z.js → settings.projects-DqNHL2Mx.js} +3 -3
  210. package/dist/client/assets/{settings.providers-DLodyAaO.js → settings.providers-olNQXPOc.js} +3 -3
  211. package/dist/client/assets/{settings.scheduled-tasks-me1XYuBY.js → settings.scheduled-tasks-Dwr1Iiu5.js} +2 -2
  212. package/dist/client/assets/{settings.snap-shot-rYPhb3ty.js → settings.snap-shot-uj9CX5J6.js} +2 -2
  213. package/dist/client/assets/{settings.source-control-CEp3bQpF.js → settings.source-control-H60mYM0m.js} +2 -2
  214. package/dist/client/assets/{settings.storage-Bt3UPsm5.js → settings.storage--Ghi4ySm.js} +2 -2
  215. package/dist/client/assets/{settingsLayout-B-2za2g9.js → settingsLayout-BdqCokK9.js} +2 -2
  216. package/dist/client/assets/{sidebar-DmtBLMTN.js → sidebar-7a8hvtAS.js} +2 -2
  217. package/dist/client/assets/{sidebarProjectGrouping-CnKGrI1j.js → sidebarProjectGrouping-BGgp_M_h.js} +2 -2
  218. package/dist/client/assets/{skeleton-B4ai8OyH.js → skeleton-7wGNlCET.js} +2 -2
  219. package/dist/client/assets/{sortable.esm-wPMp_PEb.js → sortable.esm-CG0AZByT.js} +2 -2
  220. package/dist/client/assets/{sourceControl-CrWHksgJ.js → sourceControl-B8VqenU-.js} +2 -2
  221. package/dist/client/assets/{spinner-CqTy7FSl.js → spinner-YUJ6Pwvq.js} +2 -2
  222. package/dist/client/assets/{standalone-page-DjPR_lp1.js → standalone-page-BxErOfZy.js} +2 -2
  223. package/dist/client/assets/{stateDiagram-D77RDMKH-DBZk-pTE.js → stateDiagram-D77RDMKH-C0i1_7JQ.js} +2 -2
  224. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-nFt0QPRs.js +2 -0
  225. package/dist/client/assets/{swimlanes-42K2YHIH-ByvgaAKf.js → swimlanes-42K2YHIH-DlWorw-a.js} +2 -2
  226. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-Byr1T2AB.js +9 -0
  227. package/dist/client/assets/{terminal-links-BleTJXkt.js → terminal-links-DnuUiEnP.js} +2 -2
  228. package/dist/client/assets/{terminalSessions-dTMJKZUr.js → terminalSessions-B89lkZlG.js} +2 -2
  229. package/dist/client/assets/{textarea-DIyHbcIw.js → textarea-Br1ny3dw.js} +2 -2
  230. package/dist/client/assets/{themePalette-ELqAvm4C.js → themePalette-B4vIs8Bi.js} +2 -2
  231. package/dist/client/assets/{threadSort-C6bJOgqf.js → threadSort-BN7fK5qZ.js} +2 -2
  232. package/dist/client/assets/{timeline-definition-24CTP7MA-Q0Al5L2-.js → timeline-definition-24CTP7MA-f1puoyJY.js} +2 -2
  233. package/dist/client/assets/{toast-MGWD1Vlb.js → toast-Bkc7xsho.js} +2 -2
  234. package/dist/client/assets/{toggle-BAcxn8F-.js → toggle-DNxTFG4o.js} +2 -2
  235. package/dist/client/assets/{toggle-group-XAlRECP9.js → toggle-group-CQtXH1ph.js} +2 -2
  236. package/dist/client/assets/{tooltip-BTZmEp2R.js → tooltip-DH7_Fmka.js} +2 -2
  237. package/dist/client/assets/{treeView-Q6P3EWNA-CA5VrBlD.js → treeView-Q6P3EWNA-cachkR0K.js} +1 -1
  238. package/dist/client/assets/{treemap-WGGIJYW6-VkJwMEUW.js → treemap-WGGIJYW6-5vI1Z8yq.js} +1 -1
  239. package/dist/client/assets/{usage-BAr-_U4h.js → usage-Cuwnw3mn.js} +2 -2
  240. package/dist/client/assets/{usageAccess-DHG-PXT1.js → usageAccess-BRuBlcgN.js} +2 -2
  241. package/dist/client/assets/{usageFormat-B7-dLMvL.js → usageFormat-B0V5dWS3.js} +2 -2
  242. package/dist/client/assets/{usageShortcuts-BffpH2Am.js → usageShortcuts-CK0JjnNA.js} +2 -2
  243. package/dist/client/assets/{use-atom-command-CwLq1NLm.js → use-atom-command-JNR1Jqwn.js} +2 -2
  244. package/dist/client/assets/{useAriaLabelledBy-DuZF33ag.js → useAriaLabelledBy-BNA1QLXP.js} +2 -2
  245. package/dist/client/assets/{useHandleNewThread-Dz0hXG9T.js → useHandleNewThread-vYbjmg4i.js} +2 -2
  246. package/dist/client/assets/{useLocation-Ck2WxARJ.js → useLocation-D91_HRP0.js} +2 -2
  247. package/dist/client/assets/useNavigate-NmIi-1RV.js +2 -0
  248. package/dist/client/assets/{useNavigateBack-DkhnvN2P.js → useNavigateBack-DnwpvjrN.js} +2 -2
  249. package/dist/client/assets/{useParams-ZpfAkQ5u.js → useParams-CYkWvywV.js} +2 -2
  250. package/dist/client/assets/{usePermissionStatus-BXGMw-SX.js → usePermissionStatus-CuzpUXth.js} +2 -2
  251. package/dist/client/assets/{usePullRequestActions-CtlawWSo.js → usePullRequestActions-DqgBdoH5.js} +2 -2
  252. package/dist/client/assets/{useRegisterFieldControl-Bnfq4Sq_.js → useRegisterFieldControl-C127nghN.js} +2 -2
  253. package/dist/client/assets/{useScopedModelAvailability-BH0nl2bK.js → useScopedModelAvailability-BsIJUZbS.js} +2 -2
  254. package/dist/client/assets/{useSettings-B_UiwKX2.js → useSettings-DYKTOdxY.js} +2 -2
  255. package/dist/client/assets/{useT3ConnectAuthPrompt-CgOEppM6.js → useT3ConnectAuthPrompt-DlW3HUgA.js} +2 -2
  256. package/dist/client/assets/{utils-BSj_I6H5.js → utils-vKlT_s3D.js} +2 -2
  257. package/dist/client/assets/{vcsRefInvalidation-CagWw7RC.js → vcsRefInvalidation-CC_2_Ufo.js} +2 -2
  258. package/dist/client/assets/{vennDiagram-4TSXK5OY-CYfZGFGR.js → vennDiagram-4TSXK5OY-HkY_FANS.js} +2 -2
  259. package/dist/client/assets/{wardley-WFR3VGLG-CTushXoY.js → wardley-WFR3VGLG-B9HKXiPi.js} +1 -1
  260. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-YUv9rcpO.js → wardleyDiagram-VM6X3IG4-CJL7EyS8.js} +2 -2
  261. package/dist/client/assets/{welcome-CF1pFivU.js → welcome-BOXDf4R_.js} +2 -2
  262. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-DSqIxe9e.js → xychartDiagram-S5SC5T6Z-Bsll1-pV.js} +2 -2
  263. package/dist/client/index.html +1 -1
  264. package/package.json +1 -1
  265. package/dist/client/assets/architecture-7GRP2DOG-BYbXaKhk.js +0 -1
  266. package/dist/client/assets/channel-B0viw1HQ.js +0 -2
  267. package/dist/client/assets/classDiagram-ZZMXUADV-CaSHZ6o_.js +0 -2
  268. package/dist/client/assets/classDiagram-v2-VYDZK3BY-CaSHZ6o_.js +0 -2
  269. package/dist/client/assets/eventmodeling-NTZA5JFV-b-UZANga.js +0 -1
  270. package/dist/client/assets/flowDiagram-HODETNUW-CZR0K3VV.js +0 -1
  271. package/dist/client/assets/railroad-abnf-HS5TGJTU-KGox1mtk.js +0 -1
  272. package/dist/client/assets/railroad-ebnf-LZEXJU2U-B3MJWEk4.js +0 -1
  273. package/dist/client/assets/railroad-peg-WCYAUIDC-Dvcg1m8U.js +0 -1
  274. package/dist/client/assets/settings.archived-CBKnSA9g.js +0 -2
  275. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-01P-rV-b.js +0 -2
  276. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-0fZWpnCF.js +0 -9
  277. package/dist/client/assets/useNavigate-gpe7yDrs.js +0 -2
@@ -1,4 +1,4 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$u as n,Gn as r,HT as i,Ht as a,Jt as o,Kc as s,Lg as c,Nt as l,Sd as u,Vo as d,Vt as f,Wn as p,Yn as m,Zd as h,Zn as g,_p as _,dE as v,lp as y,md as b,mf as x,mp as S,ol as C,om as w,or as T,qf as E,sr as ee,t as D,tr as te}from"./utils-BSj_I6H5.js";import{L as ne,Pt as O,U as re}from"./runtime-CUfZ5Phy.js";import{C as k}from"./entities-BJX4eZyc.js";import{a as A,n as j,t as M}from"./tooltip-BTZmEp2R.js";import{a as N,c as P,o as F,s as I,t as L}from"./select-DzlDEkfd.js";import{t as R}from"./link-Djjm-r3O.js";import{i as z,p as B}from"./toast-MGWD1Vlb.js";import{C as ie,S as V,et as H,f as U}from"./useSettings-B_UiwKX2.js";import{f as W,t as ae}from"./server-wAR-1-oq.js";import{n as oe}from"./session-kQcn2Ab9.js";import{n as G}from"./query-BUdsNuE-.js";import{t as se}from"./use-atom-command-CwLq1NLm.js";import{n as K}from"./toastHelpers-Dsph6LwL.js";import{h as ce,i as q,m as J,u as Y}from"./queries-CL96nG-6.js";import{a as X}from"./timestampFormat-wac2e_Jz.js";import{t as le}from"./textarea-DIyHbcIw.js";import{n as ue,t as de}from"./toggle-group-XAlRECP9.js";import{a as fe,c as Z,l as pe,n as me,o as he,r as ge,s as _e,t as ve}from"./combobox-B6mdMhHV.js";import{t as ye}from"./input-Co98bOaa.js";import{n as be}from"./scroll-area-Cv4W51s4.js";import{a as xe,c as Se,i as Ce,n as we,o as Te,r as Ee,s as De,t as Oe}from"./dialog-DF47CrNT.js";import{a as ke,i as Ae,o as je,r as Me,t as Ne}from"./empty-DqTsGaFf.js";import{n as Pe}from"./EnvironmentMachineIcon-pSS7qKfw.js";import{B as Fe,_ as Ie,a as Le,i as Re,n as ze,s as Be,u as Ve}from"./settingsLayout-B-2za2g9.js";import{n as He}from"./primaryCloudLinkState-CFpdks4W.js";import{a as Ue,i as We,n as Ge,r as Ke,s as qe,t as Je}from"./scheduledTasksSettings.logic-C4ccNgNW.js";import{La as Ye,Ni as Xe,cn as Ze,qa as Qe,xn as $e}from"./main-BD763ru4.js";import{t as et}from"./ProviderModelPicker-DQG8_Hn8.js";var tt=v(),Q=e(t(),1),$=e(i(),1);function nt(e){let t=(0,tt.c)(69),{items:n,filteredItems:r,value:i,query:a,resultsQuery:o,onQueryChange:s,open:c,onOpenChange:l,onSelectItem:u,hasNextPage:d,isFetchingNextPage:f,onLoadNext:p,statusText:m,originControl:h,popupProps:g,renderItem:_,getItemType:v,children:y}=e,b=(0,Q.useRef)(null),x=(0,Q.useId)(),S=(0,Q.useRef)(null),C=(0,Q.useRef)(null),w;t[0]===l?w=t[1]:(w=e=>{C.current=null,e||(b.current=null),l(e)},t[0]=l,t[1]=w);let T=w,[E,ee]=(0,Q.useState)(!1),[te,ne]=(0,Q.useState)(!1),O;t[2]!==d||t[3]!==f||t[4]!==p?(O=()=>{d&&!f&&p()},t[2]=d,t[3]=f,t[4]=p,t[5]=O):O=t[5];let re=O,k;t[6]!==re||t[7]!==d||t[8]!==f||t[9]!==c?(k=()=>{let e=S.current;if(!e)return;let t=C.current;C.current=e.scrollTop,c&&d&&!f&&ce({previousScrollTop:t,scrollTop:e.scrollTop,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight})&&re()},t[6]=re,t[7]=d,t[8]=f,t[9]=c,t[10]=k):k=t[10];let N=k,P=(0,Q.useRef)(null),F;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>{let e=P.current?.getScrollableNode?.();if(!(e instanceof HTMLElement))return;S.current=e;let t=Math.max(0,e.scrollHeight-e.clientHeight);ee(e.scrollTop>1),ne(t-e.scrollTop>1)},t[11]=F):F=t[11];let I=F,L,R;t[12]===c?(L=t[13],R=t[14]):(L=()=>{if(!c)return;let e=0,t=requestAnimationFrame(()=>{I(),e=requestAnimationFrame(I)});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},R=[c,I],t[12]=c,t[13]=L,t[14]=R),(0,Q.useLayoutEffect)(L,R);let z=(0,Q.useRef)(null),B,ie;t[15]!==c||t[16]!==o?(B=()=>{if(!c){z.current=null;return}z.current!==o&&(z.current=o,P.current?.scrollToOffset?.({offset:0,animated:!1}))},ie=[o,c],t[15]=c,t[16]=o,t[17]=B,t[18]=ie):(B=t[17],ie=t[18]),(0,Q.useEffect)(B,ie);let V;t[19]===c?V=t[20]:(V=(e,t)=>{b.current=typeof e==`string`?e:null,!(!c||t.index<0||t.reason!==`keyboard`)&&P.current?.scrollIndexIntoView?.({index:t.index,animated:!1})},t[19]=c,t[20]=V);let H;t[21]===s?H=t[22]:(H=e=>s(e.target.value),t[21]=s,t[22]=H);let U;t[23]!==r||t[24]!==u?(U=e=>{if(e.key!==`Enter`||e.nativeEvent.isComposing||e.keyCode===229)return;let t=b.current;t!==null&&r.includes(t)&&(e.preventBaseUIHandler?.(),e.preventDefault(),e.stopPropagation(),b.current=null,u(t))},t[23]=r,t[24]=u,t[25]=U):U=t[25];let W;t[26]!==a||t[27]!==H||t[28]!==U?(W=(0,$.jsx)(_e,{placeholder:`Search refs...`,value:a,onChange:H,onKeyDown:U}),t[26]=a,t[27]=H,t[28]=U,t[29]=W):W=t[29];let ae;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(me,{children:`No refs found.`}),t[30]=ae):ae=t[30];let oe;t[31]===v?oe=t[32]:(oe=v?{getItemType:v}:{},t[31]=v,t[32]=oe);let G;t[33]===_?G=t[34]:(G=e=>{let{item:t,index:n}=e;return _(t,n)},t[33]=_,t[34]=G);let se;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(se=()=>{I(),C.current=S.current?.scrollTop??null},t[35]=se):se=t[35];let K;t[36]===N?K=t[37]:(K=()=>{I(),N()},t[36]=N,t[37]=K);let q;t[38]!==te||t[39]!==E?(q=D(`max-h-56 scrollbar-gutter-stable overflow-x-hidden overscroll-y-contain ps-1 pe-0 pt-2 pb-1`,be({top:E,bottom:te})),t[38]=te,t[39]=E,t[40]=q):q=t[40];let J;t[41]!==r||t[42]!==oe||t[43]!==G||t[44]!==K||t[45]!==q?(J=(0,$.jsx)(`div`,{className:`relative min-h-0 w-full max-h-56 flex-1 overflow-hidden`,children:(0,$.jsx)(fe,{className:`size-full min-w-0`,children:(0,$.jsx)($e,{ref:P,data:r,keyExtractor:rt,...oe,renderItem:G,estimatedItemSize:28,drawDistance:336,onLayout:se,onScroll:K,className:q})})}),t[41]=r,t[42]=oe,t[43]=G,t[44]=K,t[45]=q,t[46]=J):J=t[46];let Y;t[47]!==h||t[48]!==x?(Y=h?(0,$.jsxs)(M,{children:[(0,$.jsx)(A,{render:(0,$.jsxs)(`label`,{htmlFor:x,className:`flex cursor-pointer items-center justify-between gap-3 border-t border-border/60 px-3 py-2 text-xs`,children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 font-medium text-muted-foreground`,children:[(0,$.jsx)(Qe,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,$.jsx)(`span`,{className:`truncate`,children:`Start from origin`})]}),(0,$.jsx)(Ye,{id:x,checked:h.checked,size:`sm`,"aria-label":`Start worktree from origin`,onCheckedChange:e=>h.onCheckedChange(!!e)})]})}),(0,$.jsx)(j,{side:`top`,className:`max-w-72 whitespace-normal`,children:`Creates the worktree from the latest matching branch on origin instead of your local branch.`})]}):null,t[47]=h,t[48]=x,t[49]=Y):Y=t[49];let X;t[50]===m?X=t[51]:(X=m?(0,$.jsx)(Z,{children:m}):null,t[50]=m,t[51]=X);let le;t[52]!==J||t[53]!==Y||t[54]!==X?(le=(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[ae,J,Y,X]}),t[52]=J,t[53]=Y,t[54]=X,t[55]=le):le=t[55];let ue;t[56]!==g||t[57]!==W||t[58]!==le?(ue=(0,$.jsxs)(he,{...g,children:[W,le]}),t[56]=g,t[57]=W,t[58]=le,t[59]=ue):ue=t[59];let de;return t[60]!==y||t[61]!==r||t[62]!==T||t[63]!==n||t[64]!==c||t[65]!==ue||t[66]!==V||t[67]!==i?(de=(0,$.jsxs)(ve,{items:n,filteredItems:r,autoHighlight:!0,virtualized:!0,onItemHighlighted:V,onOpenChange:T,open:c,value:i,children:[y,ue]}),t[60]=y,t[61]=r,t[62]=T,t[63]=n,t[64]=c,t[65]=ue,t[66]=V,t[67]=i,t[68]=de):de=t[68],de}function rt(e){return e}function it(e){let t=(0,tt.c)(15),{branch:n,projectCwd:r,index:i,value:a,disabled:o,onClick:s,onContextMenu:c}=e,l=n.name,u=n.worktreePath&&r&&n.worktreePath!==r,d=n.current?`current`:u?`worktree`:n.isRemote?`remote`:n.isDefault?`default`:null,f=a??l,p;t[0]===l?p=t[1]:(p=(0,$.jsx)(Ze,{value:l,className:`flex-1`}),t[0]=l,t[1]=p);let m;t[2]===d?m=t[3]:(m=d&&(0,$.jsx)(`span`,{className:`shrink-0 text-3xs text-muted-foreground/45`,children:d}),t[2]=d,t[3]=m);let h;t[4]!==p||t[5]!==m?(h=(0,$.jsxs)(`div`,{className:`flex w-full min-w-0 items-center justify-between gap-2`,children:[p,m]}),t[4]=p,t[5]=m,t[6]=h):h=t[6];let g;return t[7]!==o||t[8]!==i||t[9]!==l||t[10]!==s||t[11]!==c||t[12]!==f||t[13]!==h?(g=(0,$.jsx)(ge,{disabled:o,hideIndicator:!0,index:i,value:f,onClick:s,onContextMenu:c,children:h},l),t[7]=o,t[8]=i,t[9]=l,t[10]=s,t[11]=c,t[12]=f,t[13]=h,t[14]=g):g=t[14],g}function at(e,t){if(e.url!==null)return{address:e.url,copyable:!0,note:null};if(t===null)return{address:e.path,copyable:!1,note:`Link this environment to P4 Connect for a public URL.`};let n=new URL(e.path,t);return{address:n.href,copyable:!0,note:O(n.hostname)?`Only this computer can call this address. Link P4 Connect for a public URL.`:`Works wherever this environment's address is reachable, for example over Tailscale or your own proxy. Link P4 Connect for a public URL.`}}function ot(e){let t=(0,tt.c)(58),{environmentId:r,cwd:i,value:a,onValueChange:o,startFromOrigin:s,onStartFromOriginChange:c,disabled:l,id:u}=e,d=l!==void 0&&l,[f,p]=(0,Q.useState)(!1),[m,g]=(0,Q.useState)(``),_;t[0]===m?_=t[1]:(_=m.trim(),t[0]=m,t[1]=_);let v=(0,Q.useDeferredValue)(_),y;t[2]===v?y=t[3]:(y=J(v),t[2]=v,t[3]=y);let b;t[4]!==i||t[5]!==r||t[6]!==y?(b={environmentId:r,cwd:i,query:y},t[4]=i,t[5]=r,t[6]=y,t[7]=b):b=t[7];let x=q(b),S;t[8]!==i||t[9]!==r||t[10]!==a?(S=i&&a?Y.listRefs({environmentId:r,input:{cwd:i,query:a,limit:10}}):null,t[8]=i,t[9]=r,t[10]=a,t[11]=S):S=t[11];let C=G(S),w;t[12]!==x.refs||t[13]!==C||t[14]!==a?(w=x.refs.find(e=>e.name===a)??C.data?.refs.find(e=>e.name===a),t[12]=x.refs,t[13]=C,t[14]=a,t[15]=w):w=t[15];let T=w,E=a||null,D=T?T.isRemote===!0:null,te;t[16]!==s||t[17]!==E||t[18]!==D?(te=Ie({activeWorktreePath:null,effectiveEnvMode:`worktree`,resolvedActiveBranch:E,resolvedActiveBranchIsRemote:D,startFromOrigin:s}),t[16]=s,t[17]=E,t[18]=D,t[19]=te):te=t[19];let ne=te,O;t[20]===x.refs?O=t[21]:(O=new Map(x.refs.map(st)),t[20]=x.refs,t[21]=O);let re=O,k;t[22]===re?k=t[23]:(k=[...re.keys()],t[22]=re,t[23]=k);let A=k,j=x.data?.nextCursor!=null,M=x.error??(x.isPending&&x.data===null?`Loading refs...`:x.isFetchingNextPage?`Loading more refs...`:j?`Showing ${x.refs.length} of ${x.data?.totalCount} refs`:null),N;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>{p(e),e||g(``)},t[24]=N):N=t[24];let P=N,F=a||null,I=f&&!d,L;t[25]===o?L=t[26]:(L=e=>{o(e),P(!1)},t[25]=o,t[26]=L);let R;t[27]!==c||t[28]!==s?(R={checked:s,onCheckedChange:c},t[27]=c,t[28]=s,t[29]=R):R=t[29];let z;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(z={align:`start`,side:`bottom`,className:`flex w-80 flex-col`},t[30]=z):z=t[30];let B;t[31]!==re||t[32]!==i||t[33]!==o?(B=(e,t)=>{let n=re.get(e);return n?(0,$.jsx)(it,{branch:n,projectCwd:i,index:t,onClick:()=>{o(n.name),P(!1)}}):null},t[31]=re,t[32]=i,t[33]=o,t[34]=B):B=t[34];let ie=d||!i,V;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(ee,{variant:`outline`,size:`sm`}),t[35]=V):V=t[35];let H;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(h,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[36]=H):H=t[36];let U;t[37]===ne?U=t[38]:(U=(0,$.jsx)(Ze,{value:ne,className:`flex-1 text-left`}),t[37]=ne,t[38]=U);let W;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsx)(n,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[39]=W):W=t[39];let ae;t[40]!==u||t[41]!==ie||t[42]!==U?(ae=(0,$.jsxs)(pe,{id:u,disabled:ie,render:V,className:`w-full justify-between `,children:[H,U,W]}),t[40]=u,t[41]=ie,t[42]=U,t[43]=ae):ae=t[43];let oe;return t[44]!==x.isFetchingNextPage||t[45]!==x.loadNext||t[46]!==v||t[47]!==j||t[48]!==A||t[49]!==m||t[50]!==M||t[51]!==F||t[52]!==I||t[53]!==L||t[54]!==R||t[55]!==B||t[56]!==ae?(oe=(0,$.jsx)(nt,{items:A,filteredItems:A,value:F,query:m,resultsQuery:v,onQueryChange:g,open:I,onOpenChange:P,onSelectItem:L,hasNextPage:j,isFetchingNextPage:x.isFetchingNextPage,onLoadNext:x.loadNext,statusText:M,originControl:R,popupProps:z,renderItem:B,children:ae}),t[44]=x.isFetchingNextPage,t[45]=x.loadNext,t[46]=v,t[47]=j,t[48]=A,t[49]=m,t[50]=M,t[51]=F,t[52]=I,t[53]=L,t[54]=R,t[55]=B,t[56]=ae,t[57]=oe):oe=t[57],oe}function st(e){return[e.name,e]}var ct=[1,2,3,4,5,6,0],lt=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],ut=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],dt={auto:`Choose automatically`,worktree:`Create a new worktree`,root:`Use the project checkout`,existing_worktree:`Use a specific checkout`},ft={editingId:null,title:``,prompt:``,enabled:!0,scheduleMode:`fixed`,intervalMinutes:`15`,timeOfDay:`09:00`,weekdays:new Set([1,2,3,4,5]),projectId:``,threadId:``,workspaceMode:`worktree`,baseRef:`main`,startFromOrigin:!0,existingWorktreePath:``,modelKey:``,runtimeMode:`full-access`,interactionMode:`default`,baseModelSelection:null,signatureEnabled:!1,...Je,signatureSecret:``,maxDeliveryAgeMinutes:``};function pt(e){let t=(0,tt.c)(11),{label:n,hint:r,htmlFor:i,children:a}=e,o;t[0]===n?o=t[1]:(o=(0,$.jsx)(`span`,{children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=r?(0,$.jsx)(`span`,{className:`font-normal text-2xs text-muted-foreground/80`,children:r}):null,t[2]=r,t[3]=s);let c;t[4]!==i||t[5]!==o||t[6]!==s?(c=(0,$.jsxs)(Xe,{className:`flex items-baseline justify-between`,htmlFor:i,children:[o,s]}),t[4]=i,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==a||t[9]!==c?(l=(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[c,a]}),t[8]=a,t[9]=c,t[10]=l):l=t[10],l}function mt(e){let t=e.indexOf(`:`);return t<=0||t===e.length-1?null:{instanceId:c.make(e.slice(0,t)),model:e.slice(t+1)}}function ht(e){if(e.type===`webhook`)return`On webhook`;if(e.type===`interval`){let t=e.everyMs/6e4;return Number.isInteger(t)?`Every ${t} min`:`Every ${Math.round(e.everyMs/1e3)} sec`}let t=e.weekdays??[];return`${t.length===0?`Daily`:t.length===5&&t.every(e=>e>=1&&e<=5)?`Weekdays`:t.map(e=>lt[e]).join(`, `)} at ${e.timeOfDay}`}function gt(e){if(!e)return`Not scheduled`;let t=new Date(e).getTime()-Date.now();if(t<=0){let t=X(e);return t?t.suffix?`${t.value} ${t.suffix}`:t.value:`Not scheduled`}let n=Math.ceil(t/6e4);if(n<2)return`in under a minute`;if(n<60)return`in ${n}m`;let r=Math.round(n/60);return r<24?`in ${r}h`:`in ${Math.round(r/24)}d`}var _t={accepted:`Ran`,dispatch_failed:`Run failed`,rejected_signature:`Bad signature`,disabled:`Task paused`,rate_limited:`Rate limited`,expired:`Too old`};function vt(e){return e===`accepted`?`success`:e===`disabled`||e===`rate_limited`||e===`expired`?`warning`:`error`}function yt(e){return e===`failed`?`error`:e===`succeeded`?`success`:e===`running`?`info`:`outline`}function bt(e){let t=(0,tt.c)(29),{scope:n,environments:r,connectedEnvironments:i,environment:a}=Fe(),o;t[0]!==e.environmentId||t[1]!==e.threadId?(o=()=>e.threadId&&e.environmentId?{environmentId:e.environmentId,task:null}:null,t[0]=e.environmentId,t[1]=e.threadId,t[2]=o):o=t[2];let[s,c]=(0,Q.useState)(o),l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(e,t)=>{c({environmentId:e,task:t})},t[3]=l):l=t[3];let u=l,f=a??i[0],p;t[4]===f?.environmentId?p=t[5]:(p=W.upsertScheduledTask.permissionAtom(f?.environmentId??null),t[4]=f?.environmentId,t[5]=p);let m=d(p),h=!f||!m,g;t[6]===f?g=t[7]:(g=()=>f&&c({environmentId:f.environmentId,task:null}),t[6]=f,t[7]=g);let v;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(_,{className:`size-3`}),t[8]=v):v=t[8];let y;t[9]!==h||t[10]!==g?(y=(0,$.jsxs)(ee,{size:`xs`,variant:`ghost-muted`,disabled:h,onClick:g,children:[v,`New task`]}),t[9]=h,t[10]=g,t[11]=y):y=t[11];let x;t[12]!==f?.environmentId||t[13]!==r||t[14]!==n.kind||t[15]!==n.message||t[16]!==e.environmentId||t[17]!==e.taskId?(x=n.kind===`unavailable`?(0,$.jsx)(Be,{title:`Unavailable selection`,children:(0,$.jsx)(Le,{title:n.message})}):r.length===0?(0,$.jsx)(Ne,{children:(0,$.jsxs)(Ae,{children:[(0,$.jsx)(ke,{variant:`icon`,children:(0,$.jsx)(b,{})}),(0,$.jsx)(je,{children:`No environments available`}),(0,$.jsx)(Me,{children:`Connect an environment to manage scheduled tasks.`})]})}):(0,$.jsx)(`div`,{className:`space-y-8`,children:r.map(t=>(0,$.jsx)(xt,{environment:t,showEnvironmentHeading:r.length>1,taskId:(e.environmentId??f?.environmentId)===t.environmentId?e.taskId:void 0,onEdit:u},`${t.environmentId}:${e.taskId??``}`))}),t[12]=f?.environmentId,t[13]=r,t[14]=n.kind,t[15]=n.message,t[16]=e.environmentId,t[17]=e.taskId,t[18]=x):x=t[18];let S;t[19]!==y||t[20]!==x?(S=(0,$.jsx)(Be,{title:`Scheduled tasks`,variant:`plain`,headerAction:y,children:x}),t[19]=y,t[20]=x,t[21]=S):S=t[21];let C;t[22]!==s||t[23]!==e.projectId||t[24]!==e.threadId?(C=s?(0,$.jsx)(kt,{initialThreadId:e.threadId,initialProjectId:e.projectId,initialEnvironmentId:s.environmentId,task:s.task,onClose:()=>c(null)},`${s.environmentId}:${s.task?.id??`new`}`):null,t[22]=s,t[23]=e.projectId,t[24]=e.threadId,t[25]=C):C=t[25];let w;return t[26]!==S||t[27]!==C?(w=(0,$.jsxs)(Re,{children:[S,C]}),t[26]=S,t[27]=C,t[28]=w):w=t[28],w}function xt(e){let t=(0,tt.c)(13),{environment:n,showEnvironmentHeading:r,taskId:i,onEdit:a}=e,{scope:o}=Fe(),s=n.connection.phase===`connected`&&n.serverConfig!==null,c;t[0]!==s||t[1]!==n.environmentId?(c=s?W.scheduledTasksLive({environmentId:n.environmentId,input:{}}):null,t[0]=s,t[1]=n.environmentId,t[2]=c):c=t[2];let l=G(c),u=l.data?.tasks.filter(e=>Ge(o,n.environmentId,e.projectId)),d=u?.find(e=>e.id===i),f=(0,Q.useRef)(!1);(0,Q.useEffect)(()=>{!f.current&&d&&(f.current=!0,a(n.environmentId,d))},[n.environmentId,d,a]),Ve(6e4);let p=Be,m=n.label,h=!r,g;t[3]===n.serverConfig?g=t[4]:(g=C(n.serverConfig),t[3]=n.serverConfig,t[4]=g);let _;t[5]===g?_=t[6]:(_=(0,$.jsx)(Pe,{kind:g,className:`size-3.5`}),t[5]=g,t[6]=_);let v=s?l.error?(0,$.jsx)(Le,{title:`Could not load scheduled tasks`,description:l.error}):u?(0,$.jsxs)($.Fragment,{children:[i&&!d?(0,$.jsx)(Le,{title:`Task unavailable`,description:`This task no longer exists or is outside the selected project scope.`,role:`status`}):null,u.length===0?(0,$.jsx)(Le,{title:`No scheduled tasks`,description:`No tasks match this environment and project selection.`}):u.map(e=>(0,$.jsx)(St,{environmentId:n.environmentId,task:e,onEdit:()=>a(n.environmentId,e)},e.id))]}):(0,$.jsx)(Le,{title:`Loading scheduled tasks…`,role:`status`}):(0,$.jsx)(Le,{title:`Environment disconnected`,description:`Reconnect ${n.label} to view its scheduled tasks.`}),y;return t[7]!==p||t[8]!==n.label||t[9]!==h||t[10]!==_||t[11]!==v?(y=(0,$.jsx)(p,{title:m,hideTitle:h,icon:_,children:v}),t[7]=p,t[8]=n.label,t[9]=h,t[10]=_,t[11]=v,t[12]=y):y=t[12],y}function St(e){let t=(0,tt.c)(77),{environmentId:n,task:i,onEdit:a}=e,o;t[0]===n?o=t[1]:(o=W.upsertScheduledTask.permissionAtom(n),t[0]=n,t[1]=o);let s=d(o),[c,l]=(0,Q.useState)(!1),[u,f]=(0,Q.useState)(!1),h=i.schedule.type===`webhook`,_;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_={label:`scheduled task enabled`},t[2]=_):_=t[2];let v=se(W.setScheduledTaskEnabled,_),b;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(b={label:`scheduled task run now`},t[3]=b):b=t[3];let C=se(W.runScheduledTaskNow,b),D;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(D={label:`scheduled task delete`},t[4]=D):D=t[4];let O=se(W.deleteScheduledTask,D),k;t[5]!==c||t[6]!==n||t[7]!==O||t[8]!==C||t[9]!==i.enabled||t[10]!==i.id||t[11]!==v?(k=async e=>{if(c||!oe(n,`orchestration:operate`))return;l(!0);let t=e===`toggle`?await v({environmentId:n,input:{id:i.id,enabled:!i.enabled}}):e===`run`?await C({environmentId:n,input:{id:i.id}}):await O({environmentId:n,input:{id:i.id}});l(!1),t._tag===`Failure`&&!ne(t)&&z.add(K({type:`error`,title:`Could not update scheduled task`,description:String(re(t))}))},t[5]=c,t[6]=n,t[7]=O,t[8]=C,t[9]=i.enabled,t[10]=i.id,t[11]=v,t[12]=k):k=t[12];let A=k,j=i.title,M;t[13]===i.prompt?M=t[14]:(M=(0,$.jsx)(`span`,{className:`line-clamp-2`,children:i.prompt}),t[13]=i.prompt,t[14]=M);let N;t[15]===i.schedule?N=t[16]:(N=ht(i.schedule),t[15]=i.schedule,t[16]=N);let P;t[17]!==h||t[18]!==i.enabled||t[19]!==i.nextRunAt?(P=i.enabled?h?`Listening`:i.nextRunAt?`Next run ${gt(i.nextRunAt)}`:`Not scheduled`:`Paused`,t[17]=h,t[18]=i.enabled,t[19]=i.nextRunAt,t[20]=P):P=t[20];let F;t[21]!==N||t[22]!==P?(F=(0,$.jsxs)(`span`,{children:[N,` ·`,` `,P]}),t[21]=N,t[22]=P,t[23]=F):F=t[23];let I;t[24]===i.lastRunStatus?I=t[25]:(I=i.lastRunStatus===`never`?null:(0,$.jsx)(p,{variant:yt(i.lastRunStatus),children:i.lastRunStatus}),t[24]=i.lastRunStatus,t[25]=I);let L;t[26]===i.lastRunError?L=t[27]:(L=i.lastRunError?(0,$.jsx)(`span`,{className:`text-destructive`,children:i.lastRunError}):null,t[26]=i.lastRunError,t[27]=L);let R;t[28]!==F||t[29]!==I||t[30]!==L?(R=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[F,I,L]}),t[28]=F,t[29]=I,t[30]=L,t[31]=R):R=t[31];let B=c||!s,ie=`Enable ${i.title}`,V;t[32]===A?V=t[33]:(V=()=>void A(`toggle`),t[32]=A,t[33]=V);let H;t[34]!==B||t[35]!==ie||t[36]!==V||t[37]!==i.enabled?(H=(0,$.jsx)(Ye,{checked:i.enabled,disabled:B,"aria-label":ie,onCheckedChange:V}),t[34]=B,t[35]=ie,t[36]=V,t[37]=i.enabled,t[38]=H):H=t[38];let U=c||!s,ae=`Actions for ${i.title}`,G;t[39]!==U||t[40]!==ae?(G=(0,$.jsx)(ee,{size:`icon-sm`,variant:`ghost`,disabled:U,"aria-label":ae}),t[39]=U,t[40]=ae,t[41]=G):G=t[41];let ce;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,$.jsx)(E,{className:`size-4`}),t[42]=ce):ce=t[42];let q;t[43]===G?q=t[44]:(q=(0,$.jsx)(T,{render:G,children:ce}),t[43]=G,t[44]=q);let J;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(y,{}),t[45]=J):J=t[45];let Y;t[46]===a?Y=t[47]:(Y=(0,$.jsxs)(m,{onClick:a,children:[J,`Edit`]}),t[46]=a,t[47]=Y);let X;t[48]!==A||t[49]!==h?(X=h?(0,$.jsxs)(m,{onClick:()=>f(!0),children:[(0,$.jsx)(x,{}),`Deliveries`]}):(0,$.jsxs)(m,{onClick:()=>void A(`run`),children:[(0,$.jsx)(S,{}),`Run now`]}),t[48]=A,t[49]=h,t[50]=X):X=t[50];let le;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,$.jsx)(te,{}),t[51]=le):le=t[51];let ue;t[52]===A?ue=t[53]:(ue=()=>void A(`delete`),t[52]=A,t[53]=ue);let de;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,$.jsx)(w,{}),t[54]=de):de=t[54];let fe;t[55]===ue?fe=t[56]:(fe=(0,$.jsxs)(m,{onClick:ue,children:[de,`Delete`]}),t[55]=ue,t[56]=fe);let Z;t[57]!==Y||t[58]!==X||t[59]!==fe?(Z=(0,$.jsxs)(g,{align:`end`,children:[Y,X,le,fe]}),t[57]=Y,t[58]=X,t[59]=fe,t[60]=Z):Z=t[60];let pe;t[61]!==q||t[62]!==Z?(pe=(0,$.jsxs)(r,{children:[q,Z]}),t[61]=q,t[62]=Z,t[63]=pe):pe=t[63];let me;t[64]!==u||t[65]!==n||t[66]!==i?(me=u?(0,$.jsx)(Ct,{environmentId:n,task:i,onClose:()=>f(!1)}):null,t[64]=u,t[65]=n,t[66]=i,t[67]=me):me=t[67];let he;t[68]!==H||t[69]!==pe||t[70]!==me?(he=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[H,pe,me]}),t[68]=H,t[69]=pe,t[70]=me,t[71]=he):he=t[71];let ge;return t[72]!==R||t[73]!==he||t[74]!==M||t[75]!==i.title?(ge=(0,$.jsx)(Le,{title:j,description:M,status:R,control:he}),t[72]=R,t[73]=he,t[74]=M,t[75]=i.title,t[76]=ge):ge=t[76],ge}function Ct(e){let t=(0,tt.c)(38),{environmentId:n,task:r,onClose:i}=e,a;t[0]!==n||t[1]!==r.id?(a=W.scheduledTaskWebhookDeliveries({environmentId:n,input:{id:r.id}}),t[0]=n,t[1]=r.id,t[2]=a):a=t[2];let o=G(a),[s,c]=(0,Q.useState)(null),l;t[3]!==n||t[4]!==s||t[5]!==r.id?(l=s===null?null:W.scheduledTaskWebhookDelivery({environmentId:n,input:{id:r.id,deliveryId:s}}),t[3]=n,t[4]=s,t[5]=r.id,t[6]=l):l=t[6];let u=G(l),d=o.data?.deliveries??null,f=u.data?.delivery??null,m=s===null?o.error:u.error,h;t[7]===i?h=t[8]:(h=e=>{e||i()},t[7]=i,t[8]=h);let g;t[9]===r.title?g=t[10]:(g=(0,$.jsxs)(Se,{children:[`Deliveries · `,r.title]}),t[9]=r.title,t[10]=g);let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(Ee,{children:`Recent requests to this task's webhook URL.`}),t[11]=_):_=t[11];let v;t[12]===g?v=t[13]:(v=(0,$.jsxs)(xe,{children:[g,_]}),t[12]=g,t[13]=v);let y;t[14]===m?y=t[15]:(y=m?(0,$.jsx)(`p`,{className:`text-sm text-destructive`,children:m}):null,t[14]=m,t[15]=y);let b;t[16]!==d||t[17]!==f||t[18]!==s||t[19]!==u.error?(b=s!==null&&f===null&&u.error===null?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,role:`status`,children:`Loading delivery…`}):f?(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,$.jsx)(p,{variant:vt(f.outcome),children:_t[f.outcome]}),(0,$.jsxs)(`span`,{children:[f.method,` · `,gt(f.receivedAt)]}),f.signatureVerified?(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:`Signature verified`}):null]}),f.error?(0,$.jsx)(`p`,{className:`text-sm text-destructive`,children:f.error}):null,(0,$.jsx)(Tt,{title:`Prompt sent to the agent`,children:f.renderedPrompt??`No run was started for this request.`}),f.missingFields.length>0?(0,$.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Empty placeholders: `,f.missingFields.join(`, `)]}):null,(0,$.jsx)(Tt,{title:`Headers`,children:Object.entries(f.headers).map(wt).join(`
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$u as n,Gn as r,HT as i,Ht as a,Jt as o,Kc as s,Lg as c,Nt as l,Sd as u,Vo as d,Vt as f,Wn as p,Yn as m,Zd as h,Zn as g,_p as _,dE as v,lp as y,md as b,mf as x,mp as S,ol as C,om as w,or as T,qf as E,sr as ee,t as D,tr as te}from"./utils-vKlT_s3D.js";import{L as ne,Pt as O,U as re}from"./runtime-BVzm9sLS.js";import{C as k}from"./entities-Dzl1j2jY.js";import{a as A,n as j,t as M}from"./tooltip-DH7_Fmka.js";import{a as N,c as P,o as F,s as I,t as L}from"./select-D0wmEFXx.js";import{t as R}from"./link-GWWfOiYJ.js";import{i as z,p as B}from"./toast-Bkc7xsho.js";import{C as ie,S as V,et as H,f as U}from"./useSettings-DYKTOdxY.js";import{f as W,t as ae}from"./server-97u7Iupv.js";import{n as oe}from"./session-CPQQ27HG.js";import{n as G}from"./query-fboCqXXy.js";import{t as se}from"./use-atom-command-JNR1Jqwn.js";import{n as K}from"./toastHelpers-Dsph6LwL.js";import{h as ce,i as q,m as J,u as Y}from"./queries-BBd2XSpN.js";import{a as X}from"./timestampFormat-wac2e_Jz.js";import{t as le}from"./textarea-Br1ny3dw.js";import{n as ue,t as de}from"./toggle-group-CQtXH1ph.js";import{a as fe,c as Z,l as pe,n as me,o as he,r as ge,s as _e,t as ve}from"./combobox-Ddag8Jom.js";import{t as ye}from"./input-BZEAWLAC.js";import{n as be}from"./scroll-area-D4H8QGpd.js";import{a as xe,c as Se,i as Ce,n as we,o as Te,r as Ee,s as De,t as Oe}from"./dialog-C9_Ef3sx.js";import{a as ke,i as Ae,o as je,r as Me,t as Ne}from"./empty-BvJSXK20.js";import{n as Pe}from"./EnvironmentMachineIcon-DX1wHHgS.js";import{B as Fe,_ as Ie,a as Le,i as Re,n as ze,s as Be,u as Ve}from"./settingsLayout-BdqCokK9.js";import{n as He}from"./primaryCloudLinkState-CT9FDATw.js";import{a as Ue,i as We,n as Ge,r as Ke,s as qe,t as Je}from"./scheduledTasksSettings.logic-CJBRz5bk.js";import{La as Ye,Ni as Xe,cn as Ze,qa as Qe,xn as $e}from"./main-DJbmaTSv.js";import{t as et}from"./ProviderModelPicker-CIxbqWeL.js";var tt=v(),Q=e(t(),1),$=e(i(),1);function nt(e){let t=(0,tt.c)(69),{items:n,filteredItems:r,value:i,query:a,resultsQuery:o,onQueryChange:s,open:c,onOpenChange:l,onSelectItem:u,hasNextPage:d,isFetchingNextPage:f,onLoadNext:p,statusText:m,originControl:h,popupProps:g,renderItem:_,getItemType:v,children:y}=e,b=(0,Q.useRef)(null),x=(0,Q.useId)(),S=(0,Q.useRef)(null),C=(0,Q.useRef)(null),w;t[0]===l?w=t[1]:(w=e=>{C.current=null,e||(b.current=null),l(e)},t[0]=l,t[1]=w);let T=w,[E,ee]=(0,Q.useState)(!1),[te,ne]=(0,Q.useState)(!1),O;t[2]!==d||t[3]!==f||t[4]!==p?(O=()=>{d&&!f&&p()},t[2]=d,t[3]=f,t[4]=p,t[5]=O):O=t[5];let re=O,k;t[6]!==re||t[7]!==d||t[8]!==f||t[9]!==c?(k=()=>{let e=S.current;if(!e)return;let t=C.current;C.current=e.scrollTop,c&&d&&!f&&ce({previousScrollTop:t,scrollTop:e.scrollTop,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight})&&re()},t[6]=re,t[7]=d,t[8]=f,t[9]=c,t[10]=k):k=t[10];let N=k,P=(0,Q.useRef)(null),F;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>{let e=P.current?.getScrollableNode?.();if(!(e instanceof HTMLElement))return;S.current=e;let t=Math.max(0,e.scrollHeight-e.clientHeight);ee(e.scrollTop>1),ne(t-e.scrollTop>1)},t[11]=F):F=t[11];let I=F,L,R;t[12]===c?(L=t[13],R=t[14]):(L=()=>{if(!c)return;let e=0,t=requestAnimationFrame(()=>{I(),e=requestAnimationFrame(I)});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},R=[c,I],t[12]=c,t[13]=L,t[14]=R),(0,Q.useLayoutEffect)(L,R);let z=(0,Q.useRef)(null),B,ie;t[15]!==c||t[16]!==o?(B=()=>{if(!c){z.current=null;return}z.current!==o&&(z.current=o,P.current?.scrollToOffset?.({offset:0,animated:!1}))},ie=[o,c],t[15]=c,t[16]=o,t[17]=B,t[18]=ie):(B=t[17],ie=t[18]),(0,Q.useEffect)(B,ie);let V;t[19]===c?V=t[20]:(V=(e,t)=>{b.current=typeof e==`string`?e:null,!(!c||t.index<0||t.reason!==`keyboard`)&&P.current?.scrollIndexIntoView?.({index:t.index,animated:!1})},t[19]=c,t[20]=V);let H;t[21]===s?H=t[22]:(H=e=>s(e.target.value),t[21]=s,t[22]=H);let U;t[23]!==r||t[24]!==u?(U=e=>{if(e.key!==`Enter`||e.nativeEvent.isComposing||e.keyCode===229)return;let t=b.current;t!==null&&r.includes(t)&&(e.preventBaseUIHandler?.(),e.preventDefault(),e.stopPropagation(),b.current=null,u(t))},t[23]=r,t[24]=u,t[25]=U):U=t[25];let W;t[26]!==a||t[27]!==H||t[28]!==U?(W=(0,$.jsx)(_e,{placeholder:`Search refs...`,value:a,onChange:H,onKeyDown:U}),t[26]=a,t[27]=H,t[28]=U,t[29]=W):W=t[29];let ae;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(me,{children:`No refs found.`}),t[30]=ae):ae=t[30];let oe;t[31]===v?oe=t[32]:(oe=v?{getItemType:v}:{},t[31]=v,t[32]=oe);let G;t[33]===_?G=t[34]:(G=e=>{let{item:t,index:n}=e;return _(t,n)},t[33]=_,t[34]=G);let se;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(se=()=>{I(),C.current=S.current?.scrollTop??null},t[35]=se):se=t[35];let K;t[36]===N?K=t[37]:(K=()=>{I(),N()},t[36]=N,t[37]=K);let q;t[38]!==te||t[39]!==E?(q=D(`max-h-56 scrollbar-gutter-stable overflow-x-hidden overscroll-y-contain ps-1 pe-0 pt-2 pb-1`,be({top:E,bottom:te})),t[38]=te,t[39]=E,t[40]=q):q=t[40];let J;t[41]!==r||t[42]!==oe||t[43]!==G||t[44]!==K||t[45]!==q?(J=(0,$.jsx)(`div`,{className:`relative min-h-0 w-full max-h-56 flex-1 overflow-hidden`,children:(0,$.jsx)(fe,{className:`size-full min-w-0`,children:(0,$.jsx)($e,{ref:P,data:r,keyExtractor:rt,...oe,renderItem:G,estimatedItemSize:28,drawDistance:336,onLayout:se,onScroll:K,className:q})})}),t[41]=r,t[42]=oe,t[43]=G,t[44]=K,t[45]=q,t[46]=J):J=t[46];let Y;t[47]!==h||t[48]!==x?(Y=h?(0,$.jsxs)(M,{children:[(0,$.jsx)(A,{render:(0,$.jsxs)(`label`,{htmlFor:x,className:`flex cursor-pointer items-center justify-between gap-3 border-t border-border/60 px-3 py-2 text-xs`,children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 font-medium text-muted-foreground`,children:[(0,$.jsx)(Qe,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,$.jsx)(`span`,{className:`truncate`,children:`Start from origin`})]}),(0,$.jsx)(Ye,{id:x,checked:h.checked,size:`sm`,"aria-label":`Start worktree from origin`,onCheckedChange:e=>h.onCheckedChange(!!e)})]})}),(0,$.jsx)(j,{side:`top`,className:`max-w-72 whitespace-normal`,children:`Creates the worktree from the latest matching branch on origin instead of your local branch.`})]}):null,t[47]=h,t[48]=x,t[49]=Y):Y=t[49];let X;t[50]===m?X=t[51]:(X=m?(0,$.jsx)(Z,{children:m}):null,t[50]=m,t[51]=X);let le;t[52]!==J||t[53]!==Y||t[54]!==X?(le=(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[ae,J,Y,X]}),t[52]=J,t[53]=Y,t[54]=X,t[55]=le):le=t[55];let ue;t[56]!==g||t[57]!==W||t[58]!==le?(ue=(0,$.jsxs)(he,{...g,children:[W,le]}),t[56]=g,t[57]=W,t[58]=le,t[59]=ue):ue=t[59];let de;return t[60]!==y||t[61]!==r||t[62]!==T||t[63]!==n||t[64]!==c||t[65]!==ue||t[66]!==V||t[67]!==i?(de=(0,$.jsxs)(ve,{items:n,filteredItems:r,autoHighlight:!0,virtualized:!0,onItemHighlighted:V,onOpenChange:T,open:c,value:i,children:[y,ue]}),t[60]=y,t[61]=r,t[62]=T,t[63]=n,t[64]=c,t[65]=ue,t[66]=V,t[67]=i,t[68]=de):de=t[68],de}function rt(e){return e}function it(e){let t=(0,tt.c)(15),{branch:n,projectCwd:r,index:i,value:a,disabled:o,onClick:s,onContextMenu:c}=e,l=n.name,u=n.worktreePath&&r&&n.worktreePath!==r,d=n.current?`current`:u?`worktree`:n.isRemote?`remote`:n.isDefault?`default`:null,f=a??l,p;t[0]===l?p=t[1]:(p=(0,$.jsx)(Ze,{value:l,className:`flex-1`}),t[0]=l,t[1]=p);let m;t[2]===d?m=t[3]:(m=d&&(0,$.jsx)(`span`,{className:`shrink-0 text-3xs text-muted-foreground/45`,children:d}),t[2]=d,t[3]=m);let h;t[4]!==p||t[5]!==m?(h=(0,$.jsxs)(`div`,{className:`flex w-full min-w-0 items-center justify-between gap-2`,children:[p,m]}),t[4]=p,t[5]=m,t[6]=h):h=t[6];let g;return t[7]!==o||t[8]!==i||t[9]!==l||t[10]!==s||t[11]!==c||t[12]!==f||t[13]!==h?(g=(0,$.jsx)(ge,{disabled:o,hideIndicator:!0,index:i,value:f,onClick:s,onContextMenu:c,children:h},l),t[7]=o,t[8]=i,t[9]=l,t[10]=s,t[11]=c,t[12]=f,t[13]=h,t[14]=g):g=t[14],g}function at(e,t){if(e.url!==null)return{address:e.url,copyable:!0,note:null};if(t===null)return{address:e.path,copyable:!1,note:`Link this environment to P4 Connect for a public URL.`};let n=new URL(e.path,t);return{address:n.href,copyable:!0,note:O(n.hostname)?`Only this computer can call this address. Link P4 Connect for a public URL.`:`Works wherever this environment's address is reachable, for example over Tailscale or your own proxy. Link P4 Connect for a public URL.`}}function ot(e){let t=(0,tt.c)(58),{environmentId:r,cwd:i,value:a,onValueChange:o,startFromOrigin:s,onStartFromOriginChange:c,disabled:l,id:u}=e,d=l!==void 0&&l,[f,p]=(0,Q.useState)(!1),[m,g]=(0,Q.useState)(``),_;t[0]===m?_=t[1]:(_=m.trim(),t[0]=m,t[1]=_);let v=(0,Q.useDeferredValue)(_),y;t[2]===v?y=t[3]:(y=J(v),t[2]=v,t[3]=y);let b;t[4]!==i||t[5]!==r||t[6]!==y?(b={environmentId:r,cwd:i,query:y},t[4]=i,t[5]=r,t[6]=y,t[7]=b):b=t[7];let x=q(b),S;t[8]!==i||t[9]!==r||t[10]!==a?(S=i&&a?Y.listRefs({environmentId:r,input:{cwd:i,query:a,limit:10}}):null,t[8]=i,t[9]=r,t[10]=a,t[11]=S):S=t[11];let C=G(S),w;t[12]!==x.refs||t[13]!==C||t[14]!==a?(w=x.refs.find(e=>e.name===a)??C.data?.refs.find(e=>e.name===a),t[12]=x.refs,t[13]=C,t[14]=a,t[15]=w):w=t[15];let T=w,E=a||null,D=T?T.isRemote===!0:null,te;t[16]!==s||t[17]!==E||t[18]!==D?(te=Ie({activeWorktreePath:null,effectiveEnvMode:`worktree`,resolvedActiveBranch:E,resolvedActiveBranchIsRemote:D,startFromOrigin:s}),t[16]=s,t[17]=E,t[18]=D,t[19]=te):te=t[19];let ne=te,O;t[20]===x.refs?O=t[21]:(O=new Map(x.refs.map(st)),t[20]=x.refs,t[21]=O);let re=O,k;t[22]===re?k=t[23]:(k=[...re.keys()],t[22]=re,t[23]=k);let A=k,j=x.data?.nextCursor!=null,M=x.error??(x.isPending&&x.data===null?`Loading refs...`:x.isFetchingNextPage?`Loading more refs...`:j?`Showing ${x.refs.length} of ${x.data?.totalCount} refs`:null),N;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>{p(e),e||g(``)},t[24]=N):N=t[24];let P=N,F=a||null,I=f&&!d,L;t[25]===o?L=t[26]:(L=e=>{o(e),P(!1)},t[25]=o,t[26]=L);let R;t[27]!==c||t[28]!==s?(R={checked:s,onCheckedChange:c},t[27]=c,t[28]=s,t[29]=R):R=t[29];let z;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(z={align:`start`,side:`bottom`,className:`flex w-80 flex-col`},t[30]=z):z=t[30];let B;t[31]!==re||t[32]!==i||t[33]!==o?(B=(e,t)=>{let n=re.get(e);return n?(0,$.jsx)(it,{branch:n,projectCwd:i,index:t,onClick:()=>{o(n.name),P(!1)}}):null},t[31]=re,t[32]=i,t[33]=o,t[34]=B):B=t[34];let ie=d||!i,V;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(ee,{variant:`outline`,size:`sm`}),t[35]=V):V=t[35];let H;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(h,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[36]=H):H=t[36];let U;t[37]===ne?U=t[38]:(U=(0,$.jsx)(Ze,{value:ne,className:`flex-1 text-left`}),t[37]=ne,t[38]=U);let W;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsx)(n,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[39]=W):W=t[39];let ae;t[40]!==u||t[41]!==ie||t[42]!==U?(ae=(0,$.jsxs)(pe,{id:u,disabled:ie,render:V,className:`w-full justify-between `,children:[H,U,W]}),t[40]=u,t[41]=ie,t[42]=U,t[43]=ae):ae=t[43];let oe;return t[44]!==x.isFetchingNextPage||t[45]!==x.loadNext||t[46]!==v||t[47]!==j||t[48]!==A||t[49]!==m||t[50]!==M||t[51]!==F||t[52]!==I||t[53]!==L||t[54]!==R||t[55]!==B||t[56]!==ae?(oe=(0,$.jsx)(nt,{items:A,filteredItems:A,value:F,query:m,resultsQuery:v,onQueryChange:g,open:I,onOpenChange:P,onSelectItem:L,hasNextPage:j,isFetchingNextPage:x.isFetchingNextPage,onLoadNext:x.loadNext,statusText:M,originControl:R,popupProps:z,renderItem:B,children:ae}),t[44]=x.isFetchingNextPage,t[45]=x.loadNext,t[46]=v,t[47]=j,t[48]=A,t[49]=m,t[50]=M,t[51]=F,t[52]=I,t[53]=L,t[54]=R,t[55]=B,t[56]=ae,t[57]=oe):oe=t[57],oe}function st(e){return[e.name,e]}var ct=[1,2,3,4,5,6,0],lt=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],ut=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],dt={auto:`Choose automatically`,worktree:`Create a new worktree`,root:`Use the project checkout`,existing_worktree:`Use a specific checkout`},ft={editingId:null,title:``,prompt:``,enabled:!0,scheduleMode:`fixed`,intervalMinutes:`15`,timeOfDay:`09:00`,weekdays:new Set([1,2,3,4,5]),projectId:``,threadId:``,workspaceMode:`worktree`,baseRef:`main`,startFromOrigin:!0,existingWorktreePath:``,modelKey:``,runtimeMode:`full-access`,interactionMode:`default`,baseModelSelection:null,signatureEnabled:!1,...Je,signatureSecret:``,maxDeliveryAgeMinutes:``};function pt(e){let t=(0,tt.c)(11),{label:n,hint:r,htmlFor:i,children:a}=e,o;t[0]===n?o=t[1]:(o=(0,$.jsx)(`span`,{children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=r?(0,$.jsx)(`span`,{className:`font-normal text-2xs text-muted-foreground/80`,children:r}):null,t[2]=r,t[3]=s);let c;t[4]!==i||t[5]!==o||t[6]!==s?(c=(0,$.jsxs)(Xe,{className:`flex items-baseline justify-between`,htmlFor:i,children:[o,s]}),t[4]=i,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==a||t[9]!==c?(l=(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[c,a]}),t[8]=a,t[9]=c,t[10]=l):l=t[10],l}function mt(e){let t=e.indexOf(`:`);return t<=0||t===e.length-1?null:{instanceId:c.make(e.slice(0,t)),model:e.slice(t+1)}}function ht(e){if(e.type===`webhook`)return`On webhook`;if(e.type===`interval`){let t=e.everyMs/6e4;return Number.isInteger(t)?`Every ${t} min`:`Every ${Math.round(e.everyMs/1e3)} sec`}let t=e.weekdays??[];return`${t.length===0?`Daily`:t.length===5&&t.every(e=>e>=1&&e<=5)?`Weekdays`:t.map(e=>lt[e]).join(`, `)} at ${e.timeOfDay}`}function gt(e){if(!e)return`Not scheduled`;let t=new Date(e).getTime()-Date.now();if(t<=0){let t=X(e);return t?t.suffix?`${t.value} ${t.suffix}`:t.value:`Not scheduled`}let n=Math.ceil(t/6e4);if(n<2)return`in under a minute`;if(n<60)return`in ${n}m`;let r=Math.round(n/60);return r<24?`in ${r}h`:`in ${Math.round(r/24)}d`}var _t={accepted:`Ran`,dispatch_failed:`Run failed`,rejected_signature:`Bad signature`,disabled:`Task paused`,rate_limited:`Rate limited`,expired:`Too old`};function vt(e){return e===`accepted`?`success`:e===`disabled`||e===`rate_limited`||e===`expired`?`warning`:`error`}function yt(e){return e===`failed`?`error`:e===`succeeded`?`success`:e===`running`?`info`:`outline`}function bt(e){let t=(0,tt.c)(29),{scope:n,environments:r,connectedEnvironments:i,environment:a}=Fe(),o;t[0]!==e.environmentId||t[1]!==e.threadId?(o=()=>e.threadId&&e.environmentId?{environmentId:e.environmentId,task:null}:null,t[0]=e.environmentId,t[1]=e.threadId,t[2]=o):o=t[2];let[s,c]=(0,Q.useState)(o),l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(e,t)=>{c({environmentId:e,task:t})},t[3]=l):l=t[3];let u=l,f=a??i[0],p;t[4]===f?.environmentId?p=t[5]:(p=W.upsertScheduledTask.permissionAtom(f?.environmentId??null),t[4]=f?.environmentId,t[5]=p);let m=d(p),h=!f||!m,g;t[6]===f?g=t[7]:(g=()=>f&&c({environmentId:f.environmentId,task:null}),t[6]=f,t[7]=g);let v;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(_,{className:`size-3`}),t[8]=v):v=t[8];let y;t[9]!==h||t[10]!==g?(y=(0,$.jsxs)(ee,{size:`xs`,variant:`ghost-muted`,disabled:h,onClick:g,children:[v,`New task`]}),t[9]=h,t[10]=g,t[11]=y):y=t[11];let x;t[12]!==f?.environmentId||t[13]!==r||t[14]!==n.kind||t[15]!==n.message||t[16]!==e.environmentId||t[17]!==e.taskId?(x=n.kind===`unavailable`?(0,$.jsx)(Be,{title:`Unavailable selection`,children:(0,$.jsx)(Le,{title:n.message})}):r.length===0?(0,$.jsx)(Ne,{children:(0,$.jsxs)(Ae,{children:[(0,$.jsx)(ke,{variant:`icon`,children:(0,$.jsx)(b,{})}),(0,$.jsx)(je,{children:`No environments available`}),(0,$.jsx)(Me,{children:`Connect an environment to manage scheduled tasks.`})]})}):(0,$.jsx)(`div`,{className:`space-y-8`,children:r.map(t=>(0,$.jsx)(xt,{environment:t,showEnvironmentHeading:r.length>1,taskId:(e.environmentId??f?.environmentId)===t.environmentId?e.taskId:void 0,onEdit:u},`${t.environmentId}:${e.taskId??``}`))}),t[12]=f?.environmentId,t[13]=r,t[14]=n.kind,t[15]=n.message,t[16]=e.environmentId,t[17]=e.taskId,t[18]=x):x=t[18];let S;t[19]!==y||t[20]!==x?(S=(0,$.jsx)(Be,{title:`Scheduled tasks`,variant:`plain`,headerAction:y,children:x}),t[19]=y,t[20]=x,t[21]=S):S=t[21];let C;t[22]!==s||t[23]!==e.projectId||t[24]!==e.threadId?(C=s?(0,$.jsx)(kt,{initialThreadId:e.threadId,initialProjectId:e.projectId,initialEnvironmentId:s.environmentId,task:s.task,onClose:()=>c(null)},`${s.environmentId}:${s.task?.id??`new`}`):null,t[22]=s,t[23]=e.projectId,t[24]=e.threadId,t[25]=C):C=t[25];let w;return t[26]!==S||t[27]!==C?(w=(0,$.jsxs)(Re,{children:[S,C]}),t[26]=S,t[27]=C,t[28]=w):w=t[28],w}function xt(e){let t=(0,tt.c)(13),{environment:n,showEnvironmentHeading:r,taskId:i,onEdit:a}=e,{scope:o}=Fe(),s=n.connection.phase===`connected`&&n.serverConfig!==null,c;t[0]!==s||t[1]!==n.environmentId?(c=s?W.scheduledTasksLive({environmentId:n.environmentId,input:{}}):null,t[0]=s,t[1]=n.environmentId,t[2]=c):c=t[2];let l=G(c),u=l.data?.tasks.filter(e=>Ge(o,n.environmentId,e.projectId)),d=u?.find(e=>e.id===i),f=(0,Q.useRef)(!1);(0,Q.useEffect)(()=>{!f.current&&d&&(f.current=!0,a(n.environmentId,d))},[n.environmentId,d,a]),Ve(6e4);let p=Be,m=n.label,h=!r,g;t[3]===n.serverConfig?g=t[4]:(g=C(n.serverConfig),t[3]=n.serverConfig,t[4]=g);let _;t[5]===g?_=t[6]:(_=(0,$.jsx)(Pe,{kind:g,className:`size-3.5`}),t[5]=g,t[6]=_);let v=s?l.error?(0,$.jsx)(Le,{title:`Could not load scheduled tasks`,description:l.error}):u?(0,$.jsxs)($.Fragment,{children:[i&&!d?(0,$.jsx)(Le,{title:`Task unavailable`,description:`This task no longer exists or is outside the selected project scope.`,role:`status`}):null,u.length===0?(0,$.jsx)(Le,{title:`No scheduled tasks`,description:`No tasks match this environment and project selection.`}):u.map(e=>(0,$.jsx)(St,{environmentId:n.environmentId,task:e,onEdit:()=>a(n.environmentId,e)},e.id))]}):(0,$.jsx)(Le,{title:`Loading scheduled tasks…`,role:`status`}):(0,$.jsx)(Le,{title:`Environment disconnected`,description:`Reconnect ${n.label} to view its scheduled tasks.`}),y;return t[7]!==p||t[8]!==n.label||t[9]!==h||t[10]!==_||t[11]!==v?(y=(0,$.jsx)(p,{title:m,hideTitle:h,icon:_,children:v}),t[7]=p,t[8]=n.label,t[9]=h,t[10]=_,t[11]=v,t[12]=y):y=t[12],y}function St(e){let t=(0,tt.c)(77),{environmentId:n,task:i,onEdit:a}=e,o;t[0]===n?o=t[1]:(o=W.upsertScheduledTask.permissionAtom(n),t[0]=n,t[1]=o);let s=d(o),[c,l]=(0,Q.useState)(!1),[u,f]=(0,Q.useState)(!1),h=i.schedule.type===`webhook`,_;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_={label:`scheduled task enabled`},t[2]=_):_=t[2];let v=se(W.setScheduledTaskEnabled,_),b;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(b={label:`scheduled task run now`},t[3]=b):b=t[3];let C=se(W.runScheduledTaskNow,b),D;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(D={label:`scheduled task delete`},t[4]=D):D=t[4];let O=se(W.deleteScheduledTask,D),k;t[5]!==c||t[6]!==n||t[7]!==O||t[8]!==C||t[9]!==i.enabled||t[10]!==i.id||t[11]!==v?(k=async e=>{if(c||!oe(n,`orchestration:operate`))return;l(!0);let t=e===`toggle`?await v({environmentId:n,input:{id:i.id,enabled:!i.enabled}}):e===`run`?await C({environmentId:n,input:{id:i.id}}):await O({environmentId:n,input:{id:i.id}});l(!1),t._tag===`Failure`&&!ne(t)&&z.add(K({type:`error`,title:`Could not update scheduled task`,description:String(re(t))}))},t[5]=c,t[6]=n,t[7]=O,t[8]=C,t[9]=i.enabled,t[10]=i.id,t[11]=v,t[12]=k):k=t[12];let A=k,j=i.title,M;t[13]===i.prompt?M=t[14]:(M=(0,$.jsx)(`span`,{className:`line-clamp-2`,children:i.prompt}),t[13]=i.prompt,t[14]=M);let N;t[15]===i.schedule?N=t[16]:(N=ht(i.schedule),t[15]=i.schedule,t[16]=N);let P;t[17]!==h||t[18]!==i.enabled||t[19]!==i.nextRunAt?(P=i.enabled?h?`Listening`:i.nextRunAt?`Next run ${gt(i.nextRunAt)}`:`Not scheduled`:`Paused`,t[17]=h,t[18]=i.enabled,t[19]=i.nextRunAt,t[20]=P):P=t[20];let F;t[21]!==N||t[22]!==P?(F=(0,$.jsxs)(`span`,{children:[N,` ·`,` `,P]}),t[21]=N,t[22]=P,t[23]=F):F=t[23];let I;t[24]===i.lastRunStatus?I=t[25]:(I=i.lastRunStatus===`never`?null:(0,$.jsx)(p,{variant:yt(i.lastRunStatus),children:i.lastRunStatus}),t[24]=i.lastRunStatus,t[25]=I);let L;t[26]===i.lastRunError?L=t[27]:(L=i.lastRunError?(0,$.jsx)(`span`,{className:`text-destructive`,children:i.lastRunError}):null,t[26]=i.lastRunError,t[27]=L);let R;t[28]!==F||t[29]!==I||t[30]!==L?(R=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[F,I,L]}),t[28]=F,t[29]=I,t[30]=L,t[31]=R):R=t[31];let B=c||!s,ie=`Enable ${i.title}`,V;t[32]===A?V=t[33]:(V=()=>void A(`toggle`),t[32]=A,t[33]=V);let H;t[34]!==B||t[35]!==ie||t[36]!==V||t[37]!==i.enabled?(H=(0,$.jsx)(Ye,{checked:i.enabled,disabled:B,"aria-label":ie,onCheckedChange:V}),t[34]=B,t[35]=ie,t[36]=V,t[37]=i.enabled,t[38]=H):H=t[38];let U=c||!s,ae=`Actions for ${i.title}`,G;t[39]!==U||t[40]!==ae?(G=(0,$.jsx)(ee,{size:`icon-sm`,variant:`ghost`,disabled:U,"aria-label":ae}),t[39]=U,t[40]=ae,t[41]=G):G=t[41];let ce;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,$.jsx)(E,{className:`size-4`}),t[42]=ce):ce=t[42];let q;t[43]===G?q=t[44]:(q=(0,$.jsx)(T,{render:G,children:ce}),t[43]=G,t[44]=q);let J;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(y,{}),t[45]=J):J=t[45];let Y;t[46]===a?Y=t[47]:(Y=(0,$.jsxs)(m,{onClick:a,children:[J,`Edit`]}),t[46]=a,t[47]=Y);let X;t[48]!==A||t[49]!==h?(X=h?(0,$.jsxs)(m,{onClick:()=>f(!0),children:[(0,$.jsx)(x,{}),`Deliveries`]}):(0,$.jsxs)(m,{onClick:()=>void A(`run`),children:[(0,$.jsx)(S,{}),`Run now`]}),t[48]=A,t[49]=h,t[50]=X):X=t[50];let le;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,$.jsx)(te,{}),t[51]=le):le=t[51];let ue;t[52]===A?ue=t[53]:(ue=()=>void A(`delete`),t[52]=A,t[53]=ue);let de;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,$.jsx)(w,{}),t[54]=de):de=t[54];let fe;t[55]===ue?fe=t[56]:(fe=(0,$.jsxs)(m,{onClick:ue,children:[de,`Delete`]}),t[55]=ue,t[56]=fe);let Z;t[57]!==Y||t[58]!==X||t[59]!==fe?(Z=(0,$.jsxs)(g,{align:`end`,children:[Y,X,le,fe]}),t[57]=Y,t[58]=X,t[59]=fe,t[60]=Z):Z=t[60];let pe;t[61]!==q||t[62]!==Z?(pe=(0,$.jsxs)(r,{children:[q,Z]}),t[61]=q,t[62]=Z,t[63]=pe):pe=t[63];let me;t[64]!==u||t[65]!==n||t[66]!==i?(me=u?(0,$.jsx)(Ct,{environmentId:n,task:i,onClose:()=>f(!1)}):null,t[64]=u,t[65]=n,t[66]=i,t[67]=me):me=t[67];let he;t[68]!==H||t[69]!==pe||t[70]!==me?(he=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[H,pe,me]}),t[68]=H,t[69]=pe,t[70]=me,t[71]=he):he=t[71];let ge;return t[72]!==R||t[73]!==he||t[74]!==M||t[75]!==i.title?(ge=(0,$.jsx)(Le,{title:j,description:M,status:R,control:he}),t[72]=R,t[73]=he,t[74]=M,t[75]=i.title,t[76]=ge):ge=t[76],ge}function Ct(e){let t=(0,tt.c)(38),{environmentId:n,task:r,onClose:i}=e,a;t[0]!==n||t[1]!==r.id?(a=W.scheduledTaskWebhookDeliveries({environmentId:n,input:{id:r.id}}),t[0]=n,t[1]=r.id,t[2]=a):a=t[2];let o=G(a),[s,c]=(0,Q.useState)(null),l;t[3]!==n||t[4]!==s||t[5]!==r.id?(l=s===null?null:W.scheduledTaskWebhookDelivery({environmentId:n,input:{id:r.id,deliveryId:s}}),t[3]=n,t[4]=s,t[5]=r.id,t[6]=l):l=t[6];let u=G(l),d=o.data?.deliveries??null,f=u.data?.delivery??null,m=s===null?o.error:u.error,h;t[7]===i?h=t[8]:(h=e=>{e||i()},t[7]=i,t[8]=h);let g;t[9]===r.title?g=t[10]:(g=(0,$.jsxs)(Se,{children:[`Deliveries · `,r.title]}),t[9]=r.title,t[10]=g);let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(Ee,{children:`Recent requests to this task's webhook URL.`}),t[11]=_):_=t[11];let v;t[12]===g?v=t[13]:(v=(0,$.jsxs)(xe,{children:[g,_]}),t[12]=g,t[13]=v);let y;t[14]===m?y=t[15]:(y=m?(0,$.jsx)(`p`,{className:`text-sm text-destructive`,children:m}):null,t[14]=m,t[15]=y);let b;t[16]!==d||t[17]!==f||t[18]!==s||t[19]!==u.error?(b=s!==null&&f===null&&u.error===null?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,role:`status`,children:`Loading delivery…`}):f?(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,$.jsx)(p,{variant:vt(f.outcome),children:_t[f.outcome]}),(0,$.jsxs)(`span`,{children:[f.method,` · `,gt(f.receivedAt)]}),f.signatureVerified?(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:`Signature verified`}):null]}),f.error?(0,$.jsx)(`p`,{className:`text-sm text-destructive`,children:f.error}):null,(0,$.jsx)(Tt,{title:`Prompt sent to the agent`,children:f.renderedPrompt??`No run was started for this request.`}),f.missingFields.length>0?(0,$.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Empty placeholders: `,f.missingFields.join(`, `)]}):null,(0,$.jsx)(Tt,{title:`Headers`,children:Object.entries(f.headers).map(wt).join(`
2
2
  `)}),f.query?(0,$.jsx)(Tt,{title:`Query`,children:f.query}):null,(0,$.jsx)(Tt,{title:f.bodyTruncated?`Body (truncated)`:`Body`,children:f.body||`(empty)`})]}):s===null?d===null?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,role:`status`,children:`Loading deliveries…`}):d.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No requests yet.`}):(0,$.jsx)(`ul`,{className:`divide-y divide-border`,children:d.map(e=>(0,$.jsx)(`li`,{children:(0,$.jsxs)(`button`,{type:`button`,className:`flex w-full flex-wrap items-center gap-2 py-2 text-left text-sm hover:bg-accent/40`,onClick:()=>c(e.id),children:[(0,$.jsx)(p,{variant:vt(e.outcome),children:_t[e.outcome]}),(0,$.jsx)(`span`,{children:e.method}),(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:gt(e.receivedAt)}),e.missingFields.length>0?(0,$.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.missingFields.length,` empty placeholder`,e.missingFields.length===1?``:`s`]}):null]})},e.id))}):null,t[16]=d,t[17]=f,t[18]=s,t[19]=u.error,t[20]=b):b=t[20];let x;t[21]!==y||t[22]!==b?(x=(0,$.jsxs)(Te,{children:[y,b]}),t[21]=y,t[22]=b,t[23]=x):x=t[23];let S;t[24]!==o.isPending||t[25]!==o.refresh||t[26]!==s?(S=s===null?(0,$.jsx)(ee,{variant:`outline`,size:`sm`,disabled:o.isPending,onClick:o.refresh,children:`Refresh`}):(0,$.jsx)(ee,{variant:`outline`,size:`sm`,onClick:()=>c(null),children:`Back`}),t[24]=o.isPending,t[25]=o.refresh,t[26]=s,t[27]=S):S=t[27];let C;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(we,{render:(0,$.jsx)(ee,{size:`sm`}),children:`Done`}),t[28]=C):C=t[28];let w;t[29]===S?w=t[30]:(w=(0,$.jsxs)(Ce,{children:[S,C]}),t[29]=S,t[30]=w);let T;t[31]!==w||t[32]!==v||t[33]!==x?(T=(0,$.jsxs)(De,{className:`max-w-2xl`,children:[v,x,w]}),t[31]=w,t[32]=v,t[33]=x,t[34]=T):T=t[34];let E;return t[35]!==T||t[36]!==h?(E=(0,$.jsx)(Oe,{open:!0,onOpenChange:h,children:T}),t[35]=T,t[36]=h,t[37]=E):E=t[37],E}function wt(e){let[t,n]=e;return`${t}: ${n}`}function Tt(e){let t=(0,tt.c)(7),{title:n,children:r}=e,i;t[0]===n?i=t[1]:(i=(0,$.jsx)(Xe,{children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,$.jsx)(`pre`,{className:`max-h-64 overflow-auto rounded-md bg-muted p-2 text-xs whitespace-pre-wrap break-all`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Et(e){let t=(0,tt.c)(40),{environmentId:n,task:r}=e,i;t[0]===n?i=t[1]:(i=W.rotateScheduledTaskWebhookToken.permissionAtom(n),t[0]=n,t[1]=i);let a=d(i),o=ie(n),s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s={target:`webhook URL`},t[2]=s):s=t[2];let{copyToClipboard:c,isCopied:l}=B(s),f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f={label:`scheduled task rotate webhook token`},t[3]=f):f=t[3];let p=se(W.rotateScheduledTaskWebhookToken,f),[m,h]=(0,Q.useState)(!1),g=r?.webhook;if(!r||!g){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The URL appears after you save.`}),t[4]=e):e=t[4],e}let _;t[5]!==g||t[6]!==o?(_=at(g,o),t[5]=g,t[6]=o,t[7]=_):_=t[7];let{address:v,copyable:y,note:b}=_,x;t[8]!==n||t[9]!==p||t[10]!==r?(x=async()=>{if(!(await H(`Rotate this webhook URL?
3
3
  The current URL stops working.`,{variant:`destructive`})??window.confirm(`Rotate this webhook URL? The current URL stops working.`)))return;h(!0);let e=await p({environmentId:n,input:{id:r.id}});h(!1),e._tag===`Failure`&&!ne(e)&&z.add(K({type:`error`,title:`Could not rotate webhook URL`,description:String(re(e))}))},t[8]=n,t[9]=p,t[10]=r,t[11]=x):x=t[11];let S=x,C;t[12]===v?C=t[13]:(C=(0,$.jsx)(ye,{readOnly:!0,"aria-label":`Webhook URL`,value:v,onFocus:Dt}),t[12]=v,t[13]=C);let w=!y,T;t[14]!==c||t[15]!==v?(T=()=>c(v,void 0),t[14]=c,t[15]=v,t[16]=T):T=t[16];let E;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(u,{}),t[17]=E):E=t[17];let D=l?`Copied`:`Copy`,te;t[18]!==D||t[19]!==w||t[20]!==T?(te=(0,$.jsxs)(ee,{size:`sm`,variant:`outline`,type:`button`,disabled:w,onClick:T,children:[E,D]}),t[18]=D,t[19]=w,t[20]=T,t[21]=te):te=t[21];let O=m||!a,k;t[22]===S?k=t[23]:(k=()=>void S(),t[22]=S,t[23]=k);let A;t[24]!==O||t[25]!==k?(A=(0,$.jsx)(ee,{size:`sm`,variant:`outline`,type:`button`,disabled:O,onClick:k,children:`Rotate`}),t[24]=O,t[25]=k,t[26]=A):A=t[26];let j;t[27]!==te||t[28]!==A||t[29]!==C?(j=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[C,te,A]}),t[27]=te,t[28]=A,t[29]=C,t[30]=j):j=t[30];let M;t[31]===b?M=t[32]:(M=b===null?null:(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:b}),t[31]=b,t[32]=M);let N;t[33]!==g.url||t[34]!==n?(N=g.url===null?null:(0,$.jsx)(Ot,{environmentId:n}),t[33]=g.url,t[34]=n,t[35]=N):N=t[35];let P;return t[36]!==j||t[37]!==M||t[38]!==N?(P=(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[j,M,N]}),t[36]=j,t[37]=M,t[38]=N,t[39]=P):P=t[39],P}function Dt(e){return e.currentTarget.select()}function Ot(e){let t=(0,tt.c)(3),{environmentId:n}=e,r=He();if(r.target?.environmentId!==n||r.data===null)return null;let i=r.data.holdWebhooksWhileOffline?`Held for up to 24 hours while this environment is offline. `:`Forwarded live. Requests fail while this environment is offline. `,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(R,{to:`/settings/connections`,className:`underline underline-offset-2`,children:`Change in Connections`}),t[0]=a):a=t[0];let o;return t[1]===i?o=t[2]:(o=(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[i,a]}),t[1]=i,t[2]=o),o}function kt(e){let t=(0,tt.c)(203),{initialEnvironmentId:n,initialThreadId:r,initialProjectId:i,task:c,onClose:u}=e,{scope:p,connectedEnvironments:m}=Fe(),[h,g]=(0,Q.useState)(n),_=V(h),v=_?.connection.phase===`connected`&&_.serverConfig!==null,y;t[0]!==v||t[1]!==h?(y=v?W.scheduledTasksLive({environmentId:h,input:{}}):null,t[0]=v,t[1]=h,t[2]=y):y=t[2];let b=G(y),x=k(),S;if(t[3]!==x||t[4]!==h||t[5]!==p){let e;t[7]!==h||t[8]!==p?(e=e=>e.environmentId===h&&Ge(p,h,e.id),t[7]=h,t[8]=p,t[9]=e):e=t[9],S=x.filter(e),t[3]=x,t[4]=h,t[5]=p,t[6]=S}else S=t[6];let w=S,T=U(h),E=d(W.providersValueAtom(h))??ae,D;t[10]===h?D=t[11]:(D=W.upsertScheduledTask.permissionAtom(h),t[10]=h,t[11]=D);let te=d(D),O;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(O={label:`scheduled task upsert`},t[12]=O):O=t[12];let A=se(W.upsertScheduledTask,O),j;t[13]!==i||t[14]!==r||t[15]!==w[0]?.id||t[16]!==c?(j=()=>c?Ue(c):{...ft,projectId:i??w[0]?.id??``,threadId:r??``},t[13]=i,t[14]=r,t[15]=w[0]?.id,t[16]=c,t[17]=j):j=t[17];let[M,R]=(0,Q.useState)(j),[z,B]=(0,Q.useState)(!1),ie=(0,Q.useRef)(!1),H;t[18]!==M.editingId||t[19]!==b.data?(H=M.editingId!==null&&b.data!==null&&!b.data.tasks.some(e=>e.id===M.editingId),t[18]=M.editingId,t[19]=b.data,t[20]=H):H=t[20];let K=H,ce;t[21]!==M.editingId||t[22]!==c||t[23]!==b.data?(ce=b.data?b.data.tasks.find(e=>e.id===M.editingId)??null:c,t[21]=M.editingId,t[22]=c,t[23]=b.data,t[24]=ce):ce=t[24];let q=ce,J=M.projectId||w[0]?.id||``,Y;if(t[25]!==w||t[26]!==J){let e;t[28]===J?e=t[29]:(e=e=>e.id===J,t[28]=J,t[29]=e),Y=w.find(e),t[25]=w,t[26]=J,t[27]=Y}else Y=t[27];let X=Y;X?.id;let fe;t[30]!==E||t[31]!==X?.id||t[32]!==T?(fe=o(f(a(E),T,X?.id??null)),t[30]=E,t[31]=X?.id,t[32]=T,t[33]=fe):fe=t[33];let Z=fe,pe=Z[0],me;t[34]===M.modelKey?me=t[35]:(me=M.modelKey?mt(M.modelKey):null,t[34]=M.modelKey,t[35]=me);let he=me,ge;t[36]!==he||t[37]!==Z||t[38]!==X||t[39]!==T?(ge=he&&Z.some(e=>e.instanceId===he.instanceId&&e.enabled)?he:We(T,X??null,Z),t[36]=he,t[37]=Z,t[38]=X,t[39]=T,t[40]=ge):ge=t[40];let _e=ge,ve=_e?.instanceId??pe?.instanceId??``,be=_e?.model??``,ke;t[41]!==ve||t[42]!==be||t[43]!==E||t[44]!==T?(ke=l(T,E,ve,be),t[41]=ve,t[42]=be,t[43]=E,t[44]=T,t[45]=ke):ke=t[45];let Ae=ke,je=Pt,Me;t[46]!==_e||t[47]!==v||t[48]!==M||t[49]!==K||t[50]!==h||t[51]!==q||t[52]!==u||t[53]!==w||t[54]!==z||t[55]!==J||t[56]!==b.data||t[57]!==A?(Me=async()=>{if(!oe(h,`orchestration:operate`)||ie.current||z||K||!v||b.data===null)return;let e=_e;if(!M.title.trim()||!M.prompt.trim()||!w.some(e=>e.id===J)||e===null){je(`Scheduled task is incomplete`,`Add a title, prompt, project, and model.`);return}let t=Ke(M);if(t===null){je(`Invalid age limit`,`Enter whole minutes from 1 to ${s}, or leave it blank.`);return}if(t.type===`webhook`&&t.signature&&(!t.signature.header||!t.signature.secret&&!(q?.schedule.type===`webhook`&&q.webhook?.hasSecret))){je(`Signing secret is required`,`Enter the signature header and secret.`);return}if(t.type===`interval`&&(!Number.isSafeInteger(t.everyMs)||t.everyMs<6e4)){je(`Invalid interval`,`Enter an interval of at least one minute.`);return}if(M.workspaceMode===`existing_worktree`&&!M.existingWorktreePath.trim()){je(`Checkout path is required`,`Enter the path of the checkout to run in.`);return}let n=M.baseModelSelection!==null&&M.baseModelSelection.instanceId===e.instanceId&&M.baseModelSelection.model===e.model?M.baseModelSelection:e,r=M.workspaceMode===`root`?{type:`root`}:M.workspaceMode===`existing_worktree`?{type:`existing_worktree`,worktreePath:M.existingWorktreePath.trim()}:{type:M.workspaceMode,baseRef:M.baseRef.trim()||`main`,startFromOrigin:M.startFromOrigin},i={...M.editingId?{id:M.editingId,requireExisting:!0}:{},title:M.title.trim(),prompt:M.prompt.trim(),enabled:M.enabled,schedule:t,projectId:J,threadId:M.threadId?M.threadId:null,workspaceStrategy:r,modelSelection:n,runtimeMode:M.runtimeMode,interactionMode:M.interactionMode,creationSource:`web`};ie.current=!0,B(!0);let a=await A({environmentId:h,input:i});if(B(!1),a._tag===`Failure`){ie.current=!1,ne(a)||je(`Could not save scheduled task`,re(a));return}u()},t[46]=_e,t[47]=v,t[48]=M,t[49]=K,t[50]=h,t[51]=q,t[52]=u,t[53]=w,t[54]=z,t[55]=J,t[56]=b.data,t[57]=A,t[58]=Me):Me=t[58];let Ne=Me,Ie;t[59]!==u||t[60]!==z?(Ie=e=>{!e&&!z&&u()},t[59]=u,t[60]=z,t[61]=Ie):Ie=t[61];let Le=M.editingId?`Edit task`:`New task`,Re;t[62]===Le?Re=t[63]:(Re=(0,$.jsx)(Se,{children:Le}),t[62]=Le,t[63]=Re);let Be;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,$.jsx)(Ee,{children:`Run a prompt automatically — on an interval, at a fixed time, or when a webhook is called.`}),t[64]=Be):Be=t[64];let Ve;t[65]===Re?Ve=t[66]:(Ve=(0,$.jsxs)(xe,{children:[Re,Be]}),t[65]=Re,t[66]=Ve);let He;t[67]===v?He=t[68]:(He=v?null:(0,$.jsx)(`p`,{className:`text-sm text-destructive`,children:`Reconnect this environment before saving.`}),t[67]=v,t[68]=He);let Je=c!==null||z,Ze;t[69]===m?Ze=t[70]:(Ze=e=>{let t=m.find(t=>t.environmentId===e);t&&(g(t.environmentId),R(Nt))},t[69]=m,t[70]=Ze);let Qe=_?.serverConfig??null,$e;t[71]===Qe?$e=t[72]:($e=C(Qe),t[71]=Qe,t[72]=$e);let nt;t[73]===$e?nt=t[74]:(nt=(0,$.jsx)(Pe,{kind:$e,className:`size-4`}),t[73]=$e,t[74]=nt);let rt=_?.label??`Unavailable environment`,it;t[75]!==nt||t[76]!==rt?(it=(0,$.jsx)(I,{id:`scheduled-task-environment`,size:`sm`,children:(0,$.jsx)(P,{children:(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[nt,rt]})})}),t[75]=nt,t[76]=rt,t[77]=it):it=t[77];let at;t[78]===m?at=t[79]:(at=m.map(Mt),t[78]=m,t[79]=at);let st;t[80]===at?st=t[81]:(st=(0,$.jsx)(F,{children:at}),t[80]=at,t[81]=st);let lt;t[82]!==h||t[83]!==Je||t[84]!==Ze||t[85]!==it||t[86]!==st?(lt=(0,$.jsx)(pt,{label:`Runs on`,htmlFor:`scheduled-task-environment`,children:(0,$.jsxs)(L,{value:h,disabled:Je,onValueChange:Ze,children:[it,st]})}),t[82]=h,t[83]=Je,t[84]=Ze,t[85]=it,t[86]=st,t[87]=lt):lt=t[87];let ut;t[88]===b.error?ut=t[89]:(ut=b.error?(0,$.jsx)(`p`,{className:`text-sm text-destructive`,role:`status`,children:b.error}):null,t[88]=b.error,t[89]=ut);let ht;t[90]===K?ht=t[91]:(ht=K?(0,$.jsx)(`p`,{className:`text-xs text-destructive`,role:`status`,children:`This scheduled task no longer exists.`}):null,t[90]=K,t[91]=ht);let gt;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(gt=e=>R(t=>({...t,title:e.target.value})),t[92]=gt):gt=t[92];let _t;t[93]===M.title?_t=t[94]:(_t=(0,$.jsx)(pt,{label:`Name`,htmlFor:`scheduled-task-title`,children:(0,$.jsx)(ye,{id:`scheduled-task-title`,placeholder:`e.g. Check for Sentry issues`,value:M.title,onChange:gt})}),t[93]=M.title,t[94]=_t);let vt;t[95]===Symbol.for(`react.memo_cache_sentinel`)?(vt=e=>R(t=>({...t,projectId:e??``})),t[95]=vt):vt=t[95];let yt=X?.title,bt;t[96]===yt?bt=t[97]:(bt=(0,$.jsx)(I,{size:`sm`,id:`scheduled-task-project`,children:(0,$.jsx)(P,{placeholder:`Select a project`,children:yt})}),t[96]=yt,t[97]=bt);let xt;t[98]===w?xt=t[99]:(xt=w.map(jt),t[98]=w,t[99]=xt);let St;t[100]===xt?St=t[101]:(St=(0,$.jsx)(F,{children:xt}),t[100]=xt,t[101]=St);let Ct;t[102]!==J||t[103]!==bt||t[104]!==St?(Ct=(0,$.jsx)(pt,{label:`Project`,htmlFor:`scheduled-task-project`,children:(0,$.jsxs)(L,{value:J,onValueChange:vt,children:[bt,St]})}),t[102]=J,t[103]=bt,t[104]=St,t[105]=Ct):Ct=t[105];let wt;t[106]===Symbol.for(`react.memo_cache_sentinel`)?(wt=e=>R(t=>({...t,workspaceMode:e})),t[106]=wt):wt=t[106];let Tt=dt[M.workspaceMode],Dt;t[107]===Tt?Dt=t[108]:(Dt=(0,$.jsx)(I,{size:`sm`,id:`scheduled-task-workspace`,children:(0,$.jsx)(P,{children:Tt})}),t[107]=Tt,t[108]=Dt);let Ot;t[109]===Symbol.for(`react.memo_cache_sentinel`)?(Ot=(0,$.jsxs)(F,{children:[(0,$.jsx)(N,{value:`auto`,children:`Choose automatically`}),(0,$.jsx)(N,{value:`worktree`,children:`Create a new worktree`}),(0,$.jsx)(N,{value:`root`,children:`Use the project checkout`}),(0,$.jsx)(N,{value:`existing_worktree`,children:`Use a specific checkout`})]}),t[109]=Ot):Ot=t[109];let kt;t[110]!==M.workspaceMode||t[111]!==Dt?(kt=(0,$.jsx)(pt,{label:`Workspace`,htmlFor:`scheduled-task-workspace`,children:(0,$.jsxs)(L,{value:M.workspaceMode,onValueChange:wt,children:[Dt,Ot]})}),t[110]=M.workspaceMode,t[111]=Dt,t[112]=kt):kt=t[112];let Ft;t[113]!==Ct||t[114]!==kt?(Ft=(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[Ct,kt]}),t[113]=Ct,t[114]=kt,t[115]=Ft):Ft=t[115];let It;t[116]!==v||t[117]!==M.baseRef||t[118]!==M.startFromOrigin||t[119]!==M.workspaceMode||t[120]!==h||t[121]!==z||t[122]!==X?.workspaceRoot||t[123]!==J?(It=M.workspaceMode===`worktree`||M.workspaceMode===`auto`?(0,$.jsx)(pt,{label:`Base branch`,htmlFor:`scheduled-task-base-ref`,children:(0,$.jsx)(ot,{id:`scheduled-task-base-ref`,environmentId:h,cwd:X?.workspaceRoot??null,value:M.baseRef,onValueChange:e=>R(t=>({...t,baseRef:e})),startFromOrigin:M.startFromOrigin,onStartFromOriginChange:e=>R(t=>({...t,startFromOrigin:e})),disabled:z||!v},`${h}:${J}`)}):null,t[116]=v,t[117]=M.baseRef,t[118]=M.startFromOrigin,t[119]=M.workspaceMode,t[120]=h,t[121]=z,t[122]=X?.workspaceRoot,t[123]=J,t[124]=It):It=t[124];let Lt;t[125]!==M.existingWorktreePath||t[126]!==M.workspaceMode?(Lt=M.workspaceMode===`existing_worktree`?(0,$.jsx)(pt,{label:`Checkout path`,htmlFor:`scheduled-task-checkout`,children:(0,$.jsx)(ye,{id:`scheduled-task-checkout`,value:M.existingWorktreePath,placeholder:`/path/to/checkout`,onChange:e=>R(t=>({...t,existingWorktreePath:e.target.value}))})}):null,t[125]=M.existingWorktreePath,t[126]=M.workspaceMode,t[127]=Lt):Lt=t[127];let Rt;t[128]===Symbol.for(`react.memo_cache_sentinel`)?(Rt=e=>R(t=>({...t,prompt:e.target.value})),t[128]=Rt):Rt=t[128];let zt;t[129]===M.prompt?zt=t[130]:(zt=(0,$.jsx)(pt,{label:`Prompt`,htmlFor:`scheduled-task-prompt`,children:(0,$.jsx)(le,{id:`scheduled-task-prompt`,className:`max-h-64 overflow-y-auto`,placeholder:`What should the agent do each time this runs?`,value:M.prompt,onChange:Rt})}),t[129]=M.prompt,t[130]=zt);let Bt=z||!v,Vt;t[131]===Symbol.for(`react.memo_cache_sentinel`)?(Vt=(e,t)=>R(n=>({...n,modelKey:`${e}:${t}`})),t[131]=Vt):Vt=t[131];let Ht;t[132]!==ve||t[133]!==be||t[134]!==h||t[135]!==Z||t[136]!==Ae||t[137]!==Bt?(Ht=(0,$.jsx)(pt,{label:`Model`,children:(0,$.jsx)(`div`,{children:(0,$.jsx)(et,{environmentId:h,disabled:Bt,activeInstanceId:ve,model:be,lockedProvider:null,instanceEntries:Z,modelOptionsByInstance:Ae,isComposerOwned:!1,triggerClassName:ze,onInstanceModelChange:Vt})})}),t[132]=ve,t[133]=be,t[134]=h,t[135]=Z,t[136]=Ae,t[137]=Bt,t[138]=Ht):Ht=t[138];let Ut;t[139]===c?Ut=t[140]:(Ut=c?.schedule.type===`interval`&&c.schedule.everyMs<6e4?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,role:`status`,children:`This task uses a legacy interval below one minute. Saving updates it to at least one minute.`}):null,t[139]=c,t[140]=Ut);let Wt;t[141]===Symbol.for(`react.memo_cache_sentinel`)?(Wt=(0,$.jsx)(Xe,{children:`Schedule`}),t[141]=Wt):Wt=t[141];let Gt;t[142]===M.scheduleMode?Gt=t[143]:(Gt=[M.scheduleMode],t[142]=M.scheduleMode,t[143]=Gt);let Kt,qt,Jt,Yt;t[144]===Symbol.for(`react.memo_cache_sentinel`)?(Kt=e=>{let t=e[0];(t===`fixed`||t===`interval`||t===`webhook`)&&R(e=>({...e,scheduleMode:t,prompt:t===`webhook`&&!e.prompt.trim()?qe:e.prompt}))},qt=(0,$.jsx)(de,{value:`fixed`,children:`At a time`}),Jt=(0,$.jsx)(de,{value:`interval`,children:`Every interval`}),Yt=(0,$.jsx)(de,{value:`webhook`,children:`On webhook`}),t[144]=Kt,t[145]=qt,t[146]=Jt,t[147]=Yt):(Kt=t[144],qt=t[145],Jt=t[146],Yt=t[147]);let Xt;t[148]===Gt?Xt=t[149]:(Xt=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[Wt,(0,$.jsxs)(ue,{"aria-label":`Schedule type`,value:Gt,onValueChange:Kt,children:[qt,Jt,Yt]})]}),t[148]=Gt,t[149]=Xt);let Zt;t[150]!==M.intervalMinutes||t[151]!==M.maxDeliveryAgeMinutes||t[152]!==M.scheduleMode||t[153]!==M.signatureEnabled||t[154]!==M.signatureEncoding||t[155]!==M.signatureHeader||t[156]!==M.signaturePrefix||t[157]!==M.signatureSecret||t[158]!==M.timeOfDay||t[159]!==M.weekdays||t[160]!==h||t[161]!==q?(Zt=M.scheduleMode===`webhook`?(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsx)(Et,{environmentId:h,task:q}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Each request runs the prompt. Use {{body.path}}, {{headers.name}}, {{query.name}}, {{body}} or {{request}} in the prompt; only what it names reaches the agent.`}),(0,$.jsx)(pt,{label:`Skip requests older than`,hint:`minutes, optional`,htmlFor:`scheduled-task-max-age`,children:(0,$.jsx)(ye,{id:`scheduled-task-max-age`,type:`number`,nativeInput:!0,min:1,max:s,placeholder:`Run every request`,value:M.maxDeliveryAgeMinutes,onChange:e=>R(t=>({...t,maxDeliveryAgeMinutes:e.target.value}))})}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(Xe,{htmlFor:`scheduled-task-signature`,children:`Require signature`}),(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Reject requests without a valid HMAC-SHA256 signature of the body.`})]}),(0,$.jsx)(Ye,{id:`scheduled-task-signature`,checked:M.signatureEnabled,onCheckedChange:e=>R(t=>({...t,signatureEnabled:e}))})]}),M.signatureEnabled?(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,$.jsx)(pt,{label:`Header`,htmlFor:`scheduled-task-signature-header`,children:(0,$.jsx)(ye,{id:`scheduled-task-signature-header`,value:M.signatureHeader,onChange:e=>R(t=>({...t,signatureHeader:e.target.value}))})}),(0,$.jsx)(pt,{label:`Prefix`,htmlFor:`scheduled-task-signature-prefix`,children:(0,$.jsx)(ye,{id:`scheduled-task-signature-prefix`,value:M.signaturePrefix,placeholder:`None`,onChange:e=>R(t=>({...t,signaturePrefix:e.target.value}))})}),(0,$.jsx)(pt,{label:`Encoding`,htmlFor:`scheduled-task-signature-encoding`,children:(0,$.jsxs)(L,{value:M.signatureEncoding,onValueChange:e=>R(t=>({...t,signatureEncoding:e===`base64`?`base64`:`hex`})),children:[(0,$.jsx)(I,{size:`sm`,id:`scheduled-task-signature-encoding`,children:(0,$.jsx)(P,{children:M.signatureEncoding})}),(0,$.jsxs)(F,{children:[(0,$.jsx)(N,{value:`hex`,children:`hex`}),(0,$.jsx)(N,{value:`base64`,children:`base64`})]})]})}),(0,$.jsx)(pt,{label:`Secret`,htmlFor:`scheduled-task-signature-secret`,children:(0,$.jsx)(ye,{id:`scheduled-task-signature-secret`,type:`password`,autoComplete:`off`,value:M.signatureSecret,placeholder:q?.schedule.type===`webhook`&&q.webhook?.hasSecret?`Unchanged`:`Shared secret`,onChange:e=>R(t=>({...t,signatureSecret:e.target.value}))})})]}):null]}):M.scheduleMode===`fixed`?(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Xe,{htmlFor:`scheduled-task-time`,children:`Run at`}),(0,$.jsx)(ye,{type:`time`,id:`scheduled-task-time`,nativeInput:!0,className:`w-32`,value:M.timeOfDay,onChange:e=>R(t=>({...t,timeOfDay:e.target.value}))}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`on`})]}),(0,$.jsx)(ue,{multiple:!0,variant:`outline`,size:`sm`,"aria-label":`Days to run`,value:[...M.weekdays].map(String),onValueChange:e=>{e.length!==0&&R(t=>({...t,weekdays:new Set(e.map(Number))}))},children:ct.map(At)})]}):(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Xe,{htmlFor:`scheduled-task-interval`,children:`Run every`}),(0,$.jsx)(ye,{type:`number`,id:`scheduled-task-interval`,nativeInput:!0,min:1,step:`any`,className:`w-24`,value:M.intervalMinutes,onChange:e=>R(t=>({...t,intervalMinutes:e.target.value}))}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`minutes`})]}),t[150]=M.intervalMinutes,t[151]=M.maxDeliveryAgeMinutes,t[152]=M.scheduleMode,t[153]=M.signatureEnabled,t[154]=M.signatureEncoding,t[155]=M.signatureHeader,t[156]=M.signaturePrefix,t[157]=M.signatureSecret,t[158]=M.timeOfDay,t[159]=M.weekdays,t[160]=h,t[161]=q,t[162]=Zt):Zt=t[162];let Qt;t[163]!==Ut||t[164]!==Xt||t[165]!==Zt?(Qt=(0,$.jsxs)(`div`,{className:`space-y-3`,children:[Ut,Xt,Zt]}),t[163]=Ut,t[164]=Xt,t[165]=Zt,t[166]=Qt):Qt=t[166];let $t;t[167]===Symbol.for(`react.memo_cache_sentinel`)?($t=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(Xe,{htmlFor:`scheduled-task-enabled`,children:`Enabled`}),(0,$.jsx)(`p`,{id:`scheduled-task-enabled-description`,className:`text-sm text-muted-foreground`,children:`Disabled tasks stay saved but do not run.`})]}),t[167]=$t):$t=t[167];let en;t[168]===Symbol.for(`react.memo_cache_sentinel`)?(en=e=>R(t=>({...t,enabled:e})),t[168]=en):en=t[168];let tn;t[169]===M.enabled?tn=t[170]:(tn=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[$t,(0,$.jsx)(Ye,{id:`scheduled-task-enabled`,"aria-describedby":`scheduled-task-enabled-description`,checked:M.enabled,onCheckedChange:en})]}),t[169]=M.enabled,t[170]=tn);let nn;t[171]!==z||t[172]!==He||t[173]!==lt||t[174]!==ut||t[175]!==ht||t[176]!==_t||t[177]!==Ft||t[178]!==It||t[179]!==Lt||t[180]!==zt||t[181]!==Ht||t[182]!==Qt||t[183]!==tn?(nn=(0,$.jsx)(Te,{children:(0,$.jsxs)(`fieldset`,{disabled:z,className:`space-y-5`,children:[He,lt,ut,ht,_t,Ft,It,Lt,zt,Ht,Qt,tn]})}),t[171]=z,t[172]=He,t[173]=lt,t[174]=ut,t[175]=ht,t[176]=_t,t[177]=Ft,t[178]=It,t[179]=Lt,t[180]=zt,t[181]=Ht,t[182]=Qt,t[183]=tn,t[184]=nn):nn=t[184];let rn;t[185]===z?rn=t[186]:(rn=(0,$.jsx)(we,{render:(0,$.jsx)(ee,{variant:`outline`,size:`sm`,disabled:z}),children:`Cancel`}),t[185]=z,t[186]=rn);let an=!te||z||K||!v||!b.data,on;t[187]===Ne?on=t[188]:(on=()=>void Ne(),t[187]=Ne,t[188]=on);let sn=M.editingId?`Save task`:`Create task`,cn;t[189]!==an||t[190]!==on||t[191]!==sn?(cn=(0,$.jsx)(ee,{size:`sm`,disabled:an,onClick:on,children:sn}),t[189]=an,t[190]=on,t[191]=sn,t[192]=cn):cn=t[192];let ln;t[193]!==rn||t[194]!==cn?(ln=(0,$.jsxs)(Ce,{children:[rn,cn]}),t[193]=rn,t[194]=cn,t[195]=ln):ln=t[195];let un;t[196]!==Ve||t[197]!==nn||t[198]!==ln?(un=(0,$.jsxs)(De,{className:`max-w-xl`,children:[Ve,nn,ln]}),t[196]=Ve,t[197]=nn,t[198]=ln,t[199]=un):un=t[199];let dn;return t[200]!==Ie||t[201]!==un?(dn=(0,$.jsx)(Oe,{open:!0,onOpenChange:Ie,children:un}),t[200]=Ie,t[201]=un,t[202]=dn):dn=t[202],dn}function At(e){return(0,$.jsx)(de,{value:String(e),"aria-label":lt[e],children:ut[e]},e)}function jt(e){return(0,$.jsx)(N,{value:e.id,children:e.title},e.id)}function Mt(e){return(0,$.jsxs)(N,{value:e.environmentId,children:[(0,$.jsx)(Pe,{kind:C(e.serverConfig),className:`size-4`}),e.label]},e.environmentId)}function Nt(e){return{...e,projectId:``,modelKey:``,baseModelSelection:null,baseRef:`main`,startFromOrigin:!0,existingWorktreePath:``}}function Pt(e,t){z.add(K({type:`error`,title:e,description:t instanceof Error?t.message:String(t)}))}export{it as a,nt as i,gt as n,ht as r,bt as t};
4
- //# sourceMappingURL=ScheduledTasksSettings-iPAhYreZ.js.map
4
+ //# sourceMappingURL=ScheduledTasksSettings-deUjWQ39.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{HT as t,dE as n}from"./utils-BSj_I6H5.js";import{F as r}from"./settingsLayout-B-2za2g9.js";import{La as i}from"./main-BD763ru4.js";var a=n(),o=e(t(),1);function s(e){let t=(0,a.c)(8),n,s,c;t[0]===e?(n=t[1],s=t[2],c=t[3]):({settingKeys:c,checked:n,...s}=e,t[0]=e,t[1]=n,t[2]=s,t[3]=c);let l=r(c),u=!l&&n,d;return t[4]!==l||t[5]!==s||t[6]!==u?(d=(0,o.jsx)(i,{...s,mixed:l,checked:u}),t[4]=l,t[5]=s,t[6]=u,t[7]=d):d=t[7],d}export{s as t};
2
- //# sourceMappingURL=ScopedSwitch-DrThVUz_.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{HT as t,dE as n}from"./utils-vKlT_s3D.js";import{F as r}from"./settingsLayout-BdqCokK9.js";import{La as i}from"./main-DJbmaTSv.js";var a=n(),o=e(t(),1);function s(e){let t=(0,a.c)(8),n,s,c;t[0]===e?(n=t[1],s=t[2],c=t[3]):({settingKeys:c,checked:n,...s}=e,t[0]=e,t[1]=n,t[2]=s,t[3]=c);let l=r(c),u=!l&&n,d;return t[4]!==l||t[5]!==s||t[6]!==u?(d=(0,o.jsx)(i,{...s,mixed:l,checked:u}),t[4]=l,t[5]=s,t[6]=u,t[7]=d):d=t[7],d}export{s as t};
2
+ //# sourceMappingURL=ScopedSwitch-pdvWIJp5.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{HT as t,dE as n}from"./utils-BSj_I6H5.js";import{t as r}from"./input-Co98bOaa.js";import{t as i}from"./draft-input-Dj2IHuwL.js";var a=n(),o=e(t(),1);function s(e){let t=(0,a.c)(16),n,s,c,l;t[0]===e?(n=t[1],s=t[2],c=t[3],l=t[4]):({configured:l,placeholder:s,onCommit:n,...c}=e,t[0]=e,t[1]=n,t[2]=s,t[3]=c,t[4]=l);let u=l!==void 0&&l,d=u?`Stored secret, enter a new value to replace`:s??`Not set`,f;t[5]!==c||t[6]!==d?(f={...c,type:`password`,autoComplete:`off`,spellCheck:!1,placeholder:d},t[5]=c,t[6]=d,t[7]=f):f=t[7];let p=f;if(n){let e;t[8]!==u||t[9]!==n?(e=e=>{u&&e===``||n(e)},t[8]=u,t[9]=n,t[10]=e):e=t[10];let r;return t[11]!==p||t[12]!==e?(r=(0,o.jsx)(i,{...p,onCommit:e}),t[11]=p,t[12]=e,t[13]=r):r=t[13],r}let m;return t[14]===p?m=t[15]:(m=(0,o.jsx)(r,{...p}),t[14]=p,t[15]=m),m}export{s as t};
2
- //# sourceMappingURL=SecretInput-C8iO0LWS.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{HT as t,dE as n}from"./utils-vKlT_s3D.js";import{t as r}from"./input-BZEAWLAC.js";import{t as i}from"./draft-input-6dynCiw_.js";var a=n(),o=e(t(),1);function s(e){let t=(0,a.c)(16),n,s,c,l;t[0]===e?(n=t[1],s=t[2],c=t[3],l=t[4]):({configured:l,placeholder:s,onCommit:n,...c}=e,t[0]=e,t[1]=n,t[2]=s,t[3]=c,t[4]=l);let u=l!==void 0&&l,d=u?`Stored secret, enter a new value to replace`:s??`Not set`,f;t[5]!==c||t[6]!==d?(f={...c,type:`password`,autoComplete:`off`,spellCheck:!1,placeholder:d},t[5]=c,t[6]=d,t[7]=f):f=t[7];let p=f;if(n){let e;t[8]!==u||t[9]!==n?(e=e=>{u&&e===``||n(e)},t[8]=u,t[9]=n,t[10]=e):e=t[10];let r;return t[11]!==p||t[12]!==e?(r=(0,o.jsx)(i,{...p,onCommit:e}),t[11]=p,t[12]=e,t[13]=r):r=t[13],r}let m;return t[14]===p?m=t[15]:(m=(0,o.jsx)(r,{...p}),t[14]=p,t[15]=m),m}export{s as t};
2
+ //# sourceMappingURL=SecretInput-C11F3Wuh.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,r as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";import{r}from"./Icon-l19w4AjM.js";import{Aw as i,Dd as a,Fp as o,Ft as s,Gm as c,HT as l,Ht as u,Ig as d,It as f,Jm as p,Jt as m,Kf as h,Nt as g,Qm as _,Qu as v,Rs as y,Ry as b,Sd as x,Vt as S,Zg as C,Zp as w,_p as T,cp as E,dE as D,ep as O,jp as k,kT as A,kd as j,mm as M,nn as N,np as P,om as F,sr as I,t as L,td as R,tp as z,ty as B,vc as V,vs as H,xs as U}from"./utils-BSj_I6H5.js";import{U as W,g as ee}from"./runtime-CUfZ5Phy.js";import{F as G,I as te,L as K,Pt as ne,x as re}from"./runtime-CKyYqaHd.js";import{a as ie,n as ae,r as oe,t as se}from"./tooltip-BTZmEp2R.js";import{a as ce,i as le,n as ue,r as de,t as fe}from"./number-field-Dl9-pPML.js";import{a as q,c as pe,n as me,o as he,s as ge,t as _e}from"./select-DzlDEkfd.js";import{t as ve}from"./spinner-CqTy7FSl.js";import{t as ye}from"./link-Djjm-r3O.js";import{t as be}from"./useNavigate-gpe7yDrs.js";import{i as xe}from"./toast-MGWD1Vlb.js";import{H as Se,J as Ce,K as we,U as Te,V as Ee,W as De,q as Oe,z as ke}from"./useSettings-B_UiwKX2.js";import{t as Ae}from"./server-wAR-1-oq.js";import{o as je}from"./session-kQcn2Ab9.js";import{n as Me}from"./toastHelpers-Dsph6LwL.js";import{r as Ne}from"./queries-CL96nG-6.js";import{A as Pe,H as Fe,I as Ie,J as Le,M as Re,O as ze,R as Be,S as Ve,T as He,U as Ue,W as We,X as Ge,Y as Ke,Z as qe,d as Je,h as Ye,j as Xe,m as Ze,q as Qe,u as $e,v as et,y as tt}from"./themePalette-ELqAvm4C.js";import{$ as nt,D as rt,G as it,f as at,l as ot,vt as st,yt as ct}from"./diffRendering-zhNPdu0X.js";import{A as lt,C as ut,D as dt,E as ft,T as pt,lt as mt,n as ht,st as gt,t as _t}from"./getDiffFileInput-DQz1O4Oa.js";import{t as vt}from"./env-wK1YYxA8.js";import{a as yt,l as bt,n as xt,o as St,r as Ct,s as wt,t as Tt}from"./combobox-B6mdMhHV.js";import{t as Et}from"./input-Co98bOaa.js";import{a as Dt,c as Ot,i as kt,o as At,r as jt,s as Mt,t as Nt}from"./dialog-DF47CrNT.js";import{m as Pt,r as Ft,t as It}from"./ComposerPromptEditor-DMONEQeI.js";import{h as Lt,p as Rt}from"./Icons-AkySFIEx.js";import{t as zt}from"./ProjectFavicon-ClxI7OY3.js";import{n as Bt,r as Vt,t as Ht}from"./input-group-C65K0cEy.js";import{c as Ut,r as Wt}from"./ThreadTerminalDrawer-BQDs5eem.js";import{r as Gt,t as Kt}from"./alert-DwFQdL_W.js";import{B as qt,F as Jt,I as Yt,L as Xt,P as Zt,U as Qt,a as J,d as $t,f as en,i as tn,n as nn,r as Y,s as rn,t as an}from"./settingsLayout-B-2za2g9.js";import{$r as on,An as sn,Ar as cn,C as ln,Ca as un,Da as dn,Dn as fn,Ea as pn,En as mn,Fa as hn,Fr as gn,Gr as _n,Ia as vn,Ir as yn,La as bn,Mr as xn,Nr as Sn,Oa as Cn,On as wn,Pa as Tn,Pr as En,Qr as Dn,Ra as On,S as kn,Ta as An,Tn as jn,Ur as Mn,Xr as Nn,Zr as Pn,_i as Fn,b as In,ei as Ln,ir as X,ji as Rn,jr as zn,kn as Bn,ln as Vn,qa as Hn,ti as Un,w as Wn,wa as Gn,wn as Kn,x as qn,xa as Jn,xn as Yn,y as Xn}from"./main-BD763ru4.js";import{t as Zn}from"./ProviderModelPicker-DQG8_Hn8.js";import{t as Qn}from"./legalLinks-C4VP5hPh.js";import{t as $n}from"./useScopedModelAvailability-BH0nl2bK.js";import{t as er}from"./ProjectDefaultsSettings-bQ5ORxlD.js";import{t as tr}from"./draft-input-Dj2IHuwL.js";import{t as nr}from"./ScopedSwitch-DrThVUz_.js";import{a as rr,c as ir,d as ar,f as or,i as sr,l as cr,n as lr,o as ur,p as dr,s as fr,t as pr,u as mr}from"./SettingsPanels.logic-yZixYwld.js";function hr(e,t=!1){return gt({tagName:`style`,children:[mt(t?pt(e):dt(e))],properties:{[nt]:t?``:void 0,[ct]:t?void 0:``}})}function gr(e){return gt({tagName:`style`,children:[mt(e)],properties:{[st]:``}})}var Z=D(),Q=e(r(),1),$=e(l(),1);function _r(){let e=Zt(e=>e.notificationMode),t=Xt(),[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1);return(0,$.jsx)(J,{...X(`thread-notifications`),description:n??`System alerts when a thread finishes, fails, or needs input or approval. Applies to this device while P4 Code is open.`,control:(0,$.jsxs)(_e,{value:e,disabled:i,onValueChange:async e=>{if(e===`off`||e===`notifications`||e===`sound`||e===`notifications-and-sound`){if(r(null),qn(e)&&kn(),In(e)){if(typeof Notification>`u`||!window.isSecureContext){r(`Notifications need a supported browser over HTTPS, or the desktop app. Sound only is still available.`);return}a(!0);try{if(await Notification.requestPermission()!==`granted`){r(`Allow notifications in your browser or system settings, then choose this option again. Sound only is still available.`);return}}catch{r(`Notifications are unavailable in this browser. Sound only is still available.`);return}finally{a(!1)}}t({notificationMode:e})}},children:[(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Thread notifications`,children:(0,$.jsx)(pe,{children:Xn[e]})}),(0,$.jsx)(he,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(Xn).map(([e,t])=>(0,$.jsx)(q,{hideIndicator:!0,value:e,children:t},e))})]})})}function vr(){let e=(0,Z.c)(15),t=typeof window>`u`?void 0:window.desktopBridge?.cliCommand,[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1),o,s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{if(!t)return;let e=!1;return t.getState().then(t=>{e||r(t)}).catch(yr),()=>{e=!0}},s=[t],e[0]=o,e[1]=s):(o=e[0],s=e[1]),(0,Q.useEffect)(o,s);let c;e[2]===i?c=e[3]:(c=e=>{t&&!i&&(a(!0),t[e]().then(r).catch(t=>{xe.add(Me({type:`error`,title:e===`install`?`Could not install p4c`:`Could not remove p4c`,description:t instanceof Error?t.message:`Something went wrong.`}))}).finally(()=>a(!1)))},e[2]=i,e[3]=c);let l=c;if(!t||!n?.supported)return null;let u=n.installedPath!==null,d=n.shadowedBy?`Another p4c at ${n.shadowedBy} runs first in a new terminal. Remove it to use P4 Code's.`:u?n.onPath?`Installed at ${n.installedPath}. Open a new terminal to use it.`:`Installed at ${n.installedPath}, which is not on your PATH yet. Add its folder to your PATH to run \`p4c\`.`:"Run P4 Code's CLI as `p4c` from any terminal.",f;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=X(`cli-command`),e[4]=f):f=e[4];let p;e[5]!==l||e[6]!==u?(p=()=>l(u?`uninstall`:`install`),e[5]=l,e[6]=u,e[7]=p):p=e[7];let m=u?`Remove`:`Install`,h;e[8]!==i||e[9]!==p||e[10]!==m?(h=(0,$.jsx)(I,{size:`sm`,variant:`outline`,disabled:i,onClick:p,children:m}),e[8]=i,e[9]=p,e[10]=m,e[11]=h):h=e[11];let g;return e[12]!==d||e[13]!==h?(g=(0,$.jsx)(J,{...f,description:d,control:h}),e[12]=d,e[13]=h,e[14]=g):g=e[14],g}function yr(){}function br(e){return`${lt}${rt(e)}`}async function xr({fileDiff:e,oldFile:t,newFile:n,options:r,annotations:i}){let a=_t({oldFile:t,newFile:n},`preloadDiffHTML`);if(e==null&&a!=null&&(e=at(a.oldFile,a.newFile,r?.parseDiffOptions)),e==null)throw Error(`preloadFileDiff: You must pass at least a fileDiff, oldFile, or newFile prop`);let o=new ht(wr(r));return i!=null&&i.length>0&&o.setLineAnnotations(i),br(Cr(await o.asyncRender(e),o,r?.unsafeCSS,r?.themeType??`system`))}async function Sr({fileDiff:e,options:t,annotations:n}){return{fileDiff:e,options:t,annotations:n,prerenderedHTML:await xr({fileDiff:e,options:t,annotations:n})}}function Cr(e,t,n,r){let i=[hr(e.css,!0)];i.push(gr(ft(e.themeStyles,e.baseThemeType??r))),n!=null&&i.push(hr(n)),e.headerElement!=null&&i.push(e.headerElement);let a=t.renderFullAST(e);return a.properties[`data-dehydrated`]=``,i.push(a),i}function wr(e){return{...e,useTokenTransformer:ut(e),headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators}}async function Tr({patch:e,options:t}){let n=[],r=it(e);for(let e of r)for(let r of e.files)n.push(Sr({fileDiff:r,options:t}));return await Promise.all(n)}var Er=[],Dr=`Use $frontend-design to fix the flaky test in [surface.test.ts](apps/web/src/terminal/ghostty/surface.test.ts) and align the header with [SettingsPanels.tsx](apps/web/src/components/settings/SettingsPanels.tsx) before shipping.`;function Or(){}function kr(){let e=(0,Z.c)(4),t=(0,Q.useRef)(null),[n,r]=(0,Q.useState)(Dr),[i,a]=(0,Q.useState)(227),o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(e,t)=>{r(e),a(t)},e[0]=o):o=e[0];let s=o,c;return e[1]!==i||e[2]!==n?(c=(0,$.jsx)(`div`,{className:`mt-1 mb-2 rounded-lg border border-border bg-background px-3 py-2`,children:(0,$.jsx)(It,{ariaLabel:`Prompt font preview`,editorRef:t,value:n,cursor:i,contextRecords:Ft,skills:Er,disabled:!1,placeholder:Pt,className:`max-h-42 min-h-14`,onChange:s,onPaste:Or})}),e[1]=i,e[2]=n,e[3]=c):c=e[3],c}var Ar=[`diff --git a/src/formatUser.ts b/src/formatUser.ts`,`--- a/src/formatUser.ts`,`+++ b/src/formatUser.ts`,`@@ -1,3 +1,3 @@`,` export function formatUser(user: User) {`,`- return user.name.toUpperCase();`,"+ return `${user.name} <${user.email}>`; // 0O 1lI",` }`,``].join(`
1
+ import{i as e,r as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";import{r}from"./Icon-l19w4AjM.js";import{Aw as i,Dd as a,Fp as o,Ft as s,Gm as c,HT as l,Ht as u,Ig as d,It as f,Jm as p,Jt as m,Kf as h,Nt as g,Qm as _,Qu as v,Rs as y,Ry as b,Sd as x,Vt as S,Zg as C,Zp as w,_p as T,cp as E,dE as D,ep as O,jp as k,kT as A,kd as j,mm as M,nn as N,np as P,om as F,sr as I,t as L,td as R,tp as z,ty as B,vc as V,vs as H,xs as U}from"./utils-vKlT_s3D.js";import{U as W,g as ee}from"./runtime-BVzm9sLS.js";import{F as G,I as te,L as K,Pt as ne,x as re}from"./runtime-B-UcwNuZ.js";import{a as ie,n as ae,r as oe,t as se}from"./tooltip-DH7_Fmka.js";import{a as ce,i as le,n as ue,r as de,t as fe}from"./number-field-BuLW4JjE.js";import{a as q,c as pe,n as me,o as he,s as ge,t as _e}from"./select-D0wmEFXx.js";import{t as ve}from"./spinner-YUJ6Pwvq.js";import{t as ye}from"./link-GWWfOiYJ.js";import{t as be}from"./useNavigate-NmIi-1RV.js";import{i as xe}from"./toast-Bkc7xsho.js";import{H as Se,J as Ce,K as we,U as Te,V as Ee,W as De,q as Oe,z as ke}from"./useSettings-DYKTOdxY.js";import{t as Ae}from"./server-97u7Iupv.js";import{o as je}from"./session-CPQQ27HG.js";import{n as Me}from"./toastHelpers-Dsph6LwL.js";import{r as Ne}from"./queries-BBd2XSpN.js";import{A as Pe,H as Fe,I as Ie,J as Le,M as Re,O as ze,R as Be,S as Ve,T as He,U as Ue,W as We,X as Ge,Y as Ke,Z as qe,d as Je,h as Ye,j as Xe,m as Ze,q as Qe,u as $e,v as et,y as tt}from"./themePalette-B4vIs8Bi.js";import{$ as nt,D as rt,G as it,f as at,l as ot,vt as st,yt as ct}from"./diffRendering-CAxImuLd.js";import{A as lt,C as ut,D as dt,E as ft,T as pt,lt as mt,n as ht,st as gt,t as _t}from"./getDiffFileInput-BbRHVLd8.js";import{t as vt}from"./env-wK1YYxA8.js";import{a as yt,l as bt,n as xt,o as St,r as Ct,s as wt,t as Tt}from"./combobox-Ddag8Jom.js";import{t as Et}from"./input-BZEAWLAC.js";import{a as Dt,c as Ot,i as kt,o as At,r as jt,s as Mt,t as Nt}from"./dialog-C9_Ef3sx.js";import{m as Pt,r as Ft,t as It}from"./ComposerPromptEditor-lIFv0Iko.js";import{h as Lt,p as Rt}from"./Icons-DMu3kCVA.js";import{t as zt}from"./ProjectFavicon-BKEw0TrD.js";import{n as Bt,r as Vt,t as Ht}from"./input-group-DQ0hiSJt.js";import{c as Ut,r as Wt}from"./ThreadTerminalDrawer-CAh-h3eK.js";import{r as Gt,t as Kt}from"./alert-DzxRsWWi.js";import{B as qt,F as Jt,I as Yt,L as Xt,P as Zt,U as Qt,a as J,d as $t,f as en,i as tn,n as nn,r as Y,s as rn,t as an}from"./settingsLayout-BdqCokK9.js";import{$r as on,An as sn,Ar as cn,C as ln,Ca as un,Da as dn,Dn as fn,Ea as pn,En as mn,Fa as hn,Fr as gn,Gr as _n,Ia as vn,Ir as yn,La as bn,Mr as xn,Nr as Sn,Oa as Cn,On as wn,Pa as Tn,Pr as En,Qr as Dn,Ra as On,S as kn,Ta as An,Tn as jn,Ur as Mn,Xr as Nn,Zr as Pn,_i as Fn,b as In,ei as Ln,ir as X,ji as Rn,jr as zn,kn as Bn,ln as Vn,qa as Hn,ti as Un,w as Wn,wa as Gn,wn as Kn,x as qn,xa as Jn,xn as Yn,y as Xn}from"./main-DJbmaTSv.js";import{t as Zn}from"./ProviderModelPicker-CIxbqWeL.js";import{t as Qn}from"./legalLinks-C4VP5hPh.js";import{t as $n}from"./useScopedModelAvailability-BsIJUZbS.js";import{t as er}from"./ProjectDefaultsSettings-GpUKCz2U.js";import{t as tr}from"./draft-input-6dynCiw_.js";import{t as nr}from"./ScopedSwitch-pdvWIJp5.js";import{a as rr,c as ir,d as ar,f as or,i as sr,l as cr,n as lr,o as ur,p as dr,s as fr,t as pr,u as mr}from"./SettingsPanels.logic-zUA6f3HT.js";function hr(e,t=!1){return gt({tagName:`style`,children:[mt(t?pt(e):dt(e))],properties:{[nt]:t?``:void 0,[ct]:t?void 0:``}})}function gr(e){return gt({tagName:`style`,children:[mt(e)],properties:{[st]:``}})}var Z=D(),Q=e(r(),1),$=e(l(),1);function _r(){let e=Zt(e=>e.notificationMode),t=Xt(),[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1);return(0,$.jsx)(J,{...X(`thread-notifications`),description:n??`System alerts when a thread finishes, fails, or needs input or approval. Applies to this device while P4 Code is open.`,control:(0,$.jsxs)(_e,{value:e,disabled:i,onValueChange:async e=>{if(e===`off`||e===`notifications`||e===`sound`||e===`notifications-and-sound`){if(r(null),qn(e)&&kn(),In(e)){if(typeof Notification>`u`||!window.isSecureContext){r(`Notifications need a supported browser over HTTPS, or the desktop app. Sound only is still available.`);return}a(!0);try{if(await Notification.requestPermission()!==`granted`){r(`Allow notifications in your browser or system settings, then choose this option again. Sound only is still available.`);return}}catch{r(`Notifications are unavailable in this browser. Sound only is still available.`);return}finally{a(!1)}}t({notificationMode:e})}},children:[(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Thread notifications`,children:(0,$.jsx)(pe,{children:Xn[e]})}),(0,$.jsx)(he,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(Xn).map(([e,t])=>(0,$.jsx)(q,{hideIndicator:!0,value:e,children:t},e))})]})})}function vr(){let e=(0,Z.c)(15),t=typeof window>`u`?void 0:window.desktopBridge?.cliCommand,[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1),o,s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{if(!t)return;let e=!1;return t.getState().then(t=>{e||r(t)}).catch(yr),()=>{e=!0}},s=[t],e[0]=o,e[1]=s):(o=e[0],s=e[1]),(0,Q.useEffect)(o,s);let c;e[2]===i?c=e[3]:(c=e=>{t&&!i&&(a(!0),t[e]().then(r).catch(t=>{xe.add(Me({type:`error`,title:e===`install`?`Could not install p4c`:`Could not remove p4c`,description:t instanceof Error?t.message:`Something went wrong.`}))}).finally(()=>a(!1)))},e[2]=i,e[3]=c);let l=c;if(!t||!n?.supported)return null;let u=n.installedPath!==null,d=n.shadowedBy?`Another p4c at ${n.shadowedBy} runs first in a new terminal. Remove it to use P4 Code's.`:u?n.onPath?`Installed at ${n.installedPath}. Open a new terminal to use it.`:`Installed at ${n.installedPath}, which is not on your PATH yet. Add its folder to your PATH to run \`p4c\`.`:"Run P4 Code's CLI as `p4c` from any terminal.",f;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=X(`cli-command`),e[4]=f):f=e[4];let p;e[5]!==l||e[6]!==u?(p=()=>l(u?`uninstall`:`install`),e[5]=l,e[6]=u,e[7]=p):p=e[7];let m=u?`Remove`:`Install`,h;e[8]!==i||e[9]!==p||e[10]!==m?(h=(0,$.jsx)(I,{size:`sm`,variant:`outline`,disabled:i,onClick:p,children:m}),e[8]=i,e[9]=p,e[10]=m,e[11]=h):h=e[11];let g;return e[12]!==d||e[13]!==h?(g=(0,$.jsx)(J,{...f,description:d,control:h}),e[12]=d,e[13]=h,e[14]=g):g=e[14],g}function yr(){}function br(e){return`${lt}${rt(e)}`}async function xr({fileDiff:e,oldFile:t,newFile:n,options:r,annotations:i}){let a=_t({oldFile:t,newFile:n},`preloadDiffHTML`);if(e==null&&a!=null&&(e=at(a.oldFile,a.newFile,r?.parseDiffOptions)),e==null)throw Error(`preloadFileDiff: You must pass at least a fileDiff, oldFile, or newFile prop`);let o=new ht(wr(r));return i!=null&&i.length>0&&o.setLineAnnotations(i),br(Cr(await o.asyncRender(e),o,r?.unsafeCSS,r?.themeType??`system`))}async function Sr({fileDiff:e,options:t,annotations:n}){return{fileDiff:e,options:t,annotations:n,prerenderedHTML:await xr({fileDiff:e,options:t,annotations:n})}}function Cr(e,t,n,r){let i=[hr(e.css,!0)];i.push(gr(ft(e.themeStyles,e.baseThemeType??r))),n!=null&&i.push(hr(n)),e.headerElement!=null&&i.push(e.headerElement);let a=t.renderFullAST(e);return a.properties[`data-dehydrated`]=``,i.push(a),i}function wr(e){return{...e,useTokenTransformer:ut(e),headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators}}async function Tr({patch:e,options:t}){let n=[],r=it(e);for(let e of r)for(let r of e.files)n.push(Sr({fileDiff:r,options:t}));return await Promise.all(n)}var Er=[],Dr=`Use $frontend-design to fix the flaky test in [surface.test.ts](apps/web/src/terminal/ghostty/surface.test.ts) and align the header with [SettingsPanels.tsx](apps/web/src/components/settings/SettingsPanels.tsx) before shipping.`;function Or(){}function kr(){let e=(0,Z.c)(4),t=(0,Q.useRef)(null),[n,r]=(0,Q.useState)(Dr),[i,a]=(0,Q.useState)(227),o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(e,t)=>{r(e),a(t)},e[0]=o):o=e[0];let s=o,c;return e[1]!==i||e[2]!==n?(c=(0,$.jsx)(`div`,{className:`mt-1 mb-2 rounded-lg border border-border bg-background px-3 py-2`,children:(0,$.jsx)(It,{ariaLabel:`Prompt font preview`,editorRef:t,value:n,cursor:i,contextRecords:Ft,skills:Er,disabled:!1,placeholder:Pt,className:`max-h-42 min-h-14`,onChange:s,onPaste:Or})}),e[1]=i,e[2]=n,e[3]=c):c=e[3],c}var Ar=[`diff --git a/src/formatUser.ts b/src/formatUser.ts`,`--- a/src/formatUser.ts`,`+++ b/src/formatUser.ts`,`@@ -1,3 +1,3 @@`,` export function formatUser(user: User) {`,`- return user.name.toUpperCase();`,"+ return `${user.name} <${user.email}>`; // 0O 1lI",` }`,``].join(`
2
2
  `),jr=new Map;function Mr(e){let t=jr.get(e);return t===void 0&&(t=Tr({patch:Ar,options:{diffStyle:`unified`,theme:e,preferredHighlighter:On}}).then(e=>e.map(e=>e.prerenderedHTML)),jr.set(e,t)),t}var Nr=`
3
3
  :host {
4
4
  color: var(--code-foreground);
@@ -36,4 +36,4 @@ import{i as e,r as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";import{r}from".
36
36
  "colors": { ... }
37
37
  }`,spellCheck:!1,value:r}),t[10]=n,t[11]=p,t[12]=m,t[13]=r,t[14]=h):h=t[14];let g;return t[15]!==d||t[16]!==h?(g=(0,$.jsxs)(`div`,{className:`relative overflow-hidden rounded-xl border border-input bg-background shadow-xs/5 focus-within:border-ring focus-within:ring-3 focus-within:ring-inset focus-within:ring-ring/24`,children:[d,h]}),t[15]=d,t[16]=h,t[17]=g):g=t[17],g}function Na({open:e,onOpenChange:t,onImported:n,onImportedMany:r}){let i=(0,Q.useRef)(null),[o,s]=(0,Q.useState)(``),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(null),v=(0,Q.useRef)(0);(0,Q.useEffect)(()=>{v.current+=1,h(!1),e&&(s(``),l(null),d(null),p(!1),_(null))},[e]);let y=(0,Q.useCallback)(async e=>{let t=ka(e.size);if(t){d(t);return}let n=++v.current;p(!0);try{let t=await e.text();if(n!==v.current)return;s(t),l(e.name),d(null)}catch{if(n!==v.current)return;d(`Could not read that file. Paste the JSON below instead.`)}finally{n===v.current&&p(!1)}},[]),b=(0,Q.useCallback)(async e=>{let n=++v.current;p(!0);let i=[],a=[];try{for(let t of e){if(ka(t.size)){i.push(`${t.name}: too large`);continue}try{let e=JSON.parse(await t.text());a.push({sourceName:t.name,theme:fi(e)?gi(e):ze(e)})}catch(e){i.push(`${t.name}: ${e instanceof Error?e.message:`not a theme file`}`)}}if(n!==v.current)return;let o=[],s=[];for(let e of _i(vi(a))){if(Je().some(t=>t.id===e.id)){s.push(e);continue}try{o.push(Ve(e))}catch(t){i.push(`${e.label}: ${t instanceof Error?t.message:`could not install`}`)}}o.length>0&&r(o,{updated:!1}),i.length>0?d(i.join(` — `)):s.length>0?_(s):o.length>0&&t(!1)}finally{n===v.current&&p(!1)}},[r,t]),x=(0,Q.useCallback)(e=>{e.length!==0&&(e.length===1?y(e[0]):b(e))},[b,y]),S=(0,Q.useCallback)(()=>{let e=window.desktopBridge;if(e?.pickThemeFiles){e.pickThemeFiles().then(e=>{e&&e.length!==0&&x(e.map(e=>({name:e.name,size:e.size,text:()=>Promise.resolve(e.text)})))});return}i.current?.click()},[x]),C=(0,Q.useCallback)(e=>{let t=[...e.currentTarget.files??[]];e.currentTarget.value=``,x(t)},[x]),w=(0,Q.useCallback)(e=>{e.preventDefault(),h(!1),x([...e.dataTransfer.files])},[x]),E=(e,t)=>{if(t&&t.toLowerCase()!==e.label.toLowerCase()){let n=ze({version:1,name:t.slice(0,48),appearance:e.appearance,colors:e.colors,...e.variants?{variants:e.variants}:{},...e.managed?{managed:!0}:{}});if(!Je().some(e=>e.id===n.id))return n}for(let t=1;t<100;t+=1){let n=ze({version:1,name:`${e.label.slice(0,48-` (${t})`.length)} (${t})`,appearance:e.appearance,colors:e.colors,...e.variants?{variants:e.variants}:{},...e.managed?{managed:!0}:{}});if(!Je().some(e=>e.id===n.id))return n}throw Error(`Too many copies of "${e.label}".`)},D=(0,Q.useCallback)(e=>{if(!g)return;let n=[],i=[],a=g.length===1&&c?mi(c.replace(/\.[^.]+$/,``)):null;for(let t of g)try{let r=e===`update`?Je().find(e=>e.id===t.id):void 0,i=r?.collection?{...t,collection:r.collection}:t;n.push(e===`update`?We(i):Ve(E(t,a)))}catch(e){i.push(`${t.label}: ${e instanceof Error?e.message:`failed`}`)}n.length>0&&r(n,{updated:e===`update`}),_(null),i.length>0?d(i.join(` — `)):t(!1)},[g,c,r,t]),O=(0,Q.useCallback)(()=>{let e=ka(o.length);if(e){d(e);return}try{let e=JSON.parse(o),r=fi(e)?gi(e):ze(e);if(Je().some(e=>e.id===r.id)){d(null),_([r]);return}let i=Ve(r);if(!n(i)){try{Pe(i.id)}catch{}d(`Theme added, but it could not be selected. Try again.`);return}t(!1)}catch(e){d(e instanceof Error?e.message:`That theme file is invalid.`)}},[o,n,t]);return(0,$.jsx)(Nt,{open:e,onOpenChange:e=>{e||d(null),t(e)},children:(0,$.jsxs)(Mt,{className:`max-w-3xl overflow-hidden`,children:[(0,$.jsx)(Dt,{children:(0,$.jsx)(Ot,{children:`Add a theme`})}),(0,$.jsxs)(At,{children:[(0,$.jsx)(wa,{onInstalled:(e,n)=>{r(e,n),t(!1)},open:e}),(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,"aria-hidden":!0,children:[(0,$.jsx)(`div`,{className:`h-px flex-1 bg-border`}),(0,$.jsx)(`span`,{className:`text-muted-foreground text-2xs uppercase tracking-wider`,children:`or import a file`}),(0,$.jsx)(`div`,{className:`h-px flex-1 bg-border`})]}),(()=>{let e={onDragEnter:e=>{e.preventDefault(),h(!0)},onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||h(!1)},onDrop:w},n=(0,$.jsx)(`input`,{ref:i,accept:`.json,application/json`,className:`sr-only`,onChange:C,multiple:!0,type:`file`}),r=(e=`Choose files`)=>(0,$.jsxs)(I,{disabled:f,size:`sm`,variant:`outline`,onClick:S,children:[(0,$.jsx)(a,{}),f?`Reading…`:e]}),l=()=>(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(`div`,{className:`flex items-baseline justify-between gap-3`,children:(0,$.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:`theme-json-editor`,children:`Theme JSON`})}),(0,$.jsx)(Ma,{id:`theme-json-editor`,onChange:s,value:o})]});return g?(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-muted/20 p-3`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:`Already installed`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:g.map(e=>e.label).join(`, `)})]}),(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(I,{size:`sm`,onClick:()=>D(`update`),children:`Update existing`}),(0,$.jsx)(I,{size:`sm`,variant:`outline`,onClick:()=>D(`copy`),children:`Keep both`}),(0,$.jsx)(I,{size:`sm`,variant:`ghost`,onClick:()=>_(null),children:`Back`}),(0,$.jsx)(I,{size:`sm`,variant:`ghost`,onClick:()=>t(!1),children:`Cancel`})]})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:L(`flex flex-wrap items-center justify-between gap-3 rounded-xl border border-dashed px-3 py-3 transition-colors`,m?`border-ring bg-accent/20`:`border-border/80 bg-muted/20`),...e,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:`Theme file`}),(0,$.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:c??`Drop P4 Code or VS Code .json files`})]}),r(),n]}),l(),(0,$.jsxs)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,children:[(0,$.jsx)(I,{variant:`ghost`,onClick:()=>t(!1),children:`Cancel`}),(0,$.jsxs)(I,{disabled:!o.trim()||f,onClick:O,children:[(0,$.jsx)(T,{}),`Add theme`]})]})]})})(),u?(0,$.jsx)(Kt,{"aria-live":`polite`,variant:`error`,children:u}):null]})]})})}function Pa(e){let t=(0,Z.c)(45),{colors:n,clip:r}=e,i;t[0]===r?i=t[1]:(i=r===void 0?void 0:{clipPath:r===`left`?`polygon(0 0, calc(50% - 1px) 0, calc(50% - 1px) 100%, 0 100%)`:`polygon(calc(50% + 1px) 0, 100% 0, 100% 100%, calc(50% + 1px) 100%)`},t[0]=r,t[1]=i);let a;t[2]===n.canvas?a=t[3]:(a=(0,$.jsx)(`span`,{className:`absolute inset-0`,style:{backgroundColor:n.canvas}}),t[2]=n.canvas,t[3]=a);let o;t[4]===n.sidebar?o=t[5]:(o=(0,$.jsx)(`span`,{className:`absolute inset-y-0 left-0 w-[22%]`,style:{backgroundColor:n.sidebar,boxShadow:`inset -1px 0 0 rgb(127 127 127 / 0.25)`}}),t[4]=n.sidebar,t[5]=o);let s;t[6]===n.surface?s=t[7]:(s=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[8%] h-[8%] w-[16%] rounded-md`,style:{backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25)`}}),t[6]=n.surface,t[7]=s);let c;t[8]===n.accentSurface?c=t[9]:(c=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[22%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.accentSurface}}),t[8]=n.accentSurface,t[9]=c);let l;t[10]===n.messageSurface?l=t[11]:(l=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[32%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.messageSurface,opacity:.7}}),t[10]=n.messageSurface,t[11]=l);let u;t[12]===n.messageSurface?u=t[13]:(u=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[42%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.messageSurface,opacity:.5}}),t[12]=n.messageSurface,t[13]=u);let d;t[14]===n.messageSurface?d=t[15]:(d=(0,$.jsx)(`span`,{className:`absolute right-[28%] top-[11%] h-[9%] w-[24%] rounded-lg`,style:{backgroundColor:n.messageSurface}}),t[14]=n.messageSurface,t[15]=d);let f;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(`span`,{className:`absolute left-[27%] top-[28%] h-[5%] w-[34%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}}),t[16]=f):f=t[16];let p;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`absolute left-[27%] top-[38%] h-[5%] w-[26%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}}),t[17]=p):p=t[17];let m;t[18]===n.surface?m=t[19]:(m={backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25)`},t[18]=n.surface,t[19]=m);let h;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`span`,{className:`block h-[26%] w-[34%] rounded-full`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`,opacity:.7}}),t[20]=h):h=t[20];let g;t[21]===n.messageAction?g=t[22]:(g=(0,$.jsx)(`span`,{className:`block aspect-square h-[58%] rounded-full`,style:{backgroundColor:n.messageAction}}),t[21]=n.messageAction,t[22]=g);let _;t[23]!==m||t[24]!==g?(_=(0,$.jsxs)(`span`,{className:`absolute bottom-[8%] left-[26%] right-[6%] flex h-[15%] items-center justify-between rounded-md px-1`,style:m,children:[h,g]}),t[23]=m,t[24]=g,t[25]=_):_=t[25];let v;t[26]===n.surface?v=t[27]:(v={backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25), 0 2px 5px rgb(0 0 0 / 0.14)`},t[26]=n.surface,t[27]=v);let y;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(y=[0,1,2],t[28]=y):y=t[28];let b;t[29]===n.messageAction?b=t[30]:(b=y.map(e=>(0,$.jsxs)(`span`,{className:`absolute left-[11%] right-[11%] flex items-center gap-1`,style:{top:`${10+e*30}%`,height:`20%`},children:[(0,$.jsx)(`span`,{className:`block aspect-square h-[26%] rounded-full`,style:{backgroundColor:e===0?`#34d399`:e===1?n.messageAction:`#fbbf24`,opacity:.55}}),(0,$.jsx)(`span`,{className:`block h-[30%] w-[52%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}})]},e)),t[29]=n.messageAction,t[30]=b);let x;t[31]!==v||t[32]!==b?(x=(0,$.jsx)(`span`,{className:`absolute right-[5%] top-[8%] h-[46%] w-[20%] rounded-lg`,style:v,children:b}),t[31]=v,t[32]=b,t[33]=x):x=t[33];let S;return t[34]!==i||t[35]!==_||t[36]!==x||t[37]!==a||t[38]!==o||t[39]!==s||t[40]!==c||t[41]!==l||t[42]!==u||t[43]!==d?(S=(0,$.jsxs)(`span`,{className:`absolute inset-0`,style:i,children:[a,o,s,c,l,u,d,f,p,_,x]}),t[34]=i,t[35]=_,t[36]=x,t[37]=a,t[38]=o,t[39]=s,t[40]=c,t[41]=l,t[42]=u,t[43]=d,t[44]=S):S=t[44],S}function Fa(e){let t=(0,Z.c)(7),{className:n,panes:r}=e,i;t[0]===n?i=t[1]:(i=L(`relative block w-full overflow-hidden rounded-lg border border-border/60`,n),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r.map(Ia),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsx)(`span`,{"aria-hidden":!0,className:i,children:a}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Ia(e){return(0,$.jsx)(Pa,{clip:e.clip,colors:e.colors},e.clip??`pane`)}var La=[qe,Le,Ge,Qe,Ke];function Ra(e){if(e.length===0)return[];let t=e.map(e=>e.label.trim().split(/\s+/)),n=t[0],r=n.findIndex((e,n)=>t.some(t=>t[n]?.toLocaleLowerCase()!==e.toLocaleLowerCase())),i=r===-1?n.length-1:r;return e.map((e,n)=>t[n]?.slice(Math.max(0,i)).join(` `).trim()||e.label)}function za(e,t){let n=URL.createObjectURL(new Blob([t],{type:`application/json`})),r=document.createElement(`a`);r.href=n,r.download=e,r.click(),setTimeout(()=>URL.revokeObjectURL(n),3e4)}function Ba(e){let t=(0,Z.c)(7),{label:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,$.jsx)(ie,{render:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,$.jsx)(ae,{children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsxs)(se,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Va(e){let t=(0,Z.c)(59),{theme:n,isActive:r,onUse:i,onUseMode:a,activeModes:o,onEdit:s,onDuplicate:c,onDownload:l,onRemove:u,variantNavigation:d}=e,f;t[0]===n.previews?f=t[1]:(f=n.previews.map(Ha),t[0]=n.previews,t[1]=f);let p=f,[m,g]=(0,Q.useState)(null),_,v,y,b,S,C,T,D;if(t[2]!==o||t[3]!==r||t[4]!==i||t[5]!==a||t[6]!==m||t[7]!==n.id||t[8]!==n.label||t[9]!==n.previews||t[10]!==d){let e=[`light`,`dark`].map(e=>{let t=d?.options.flatMap(t=>{let n=t.preview;return n.mode===e?[{option:t,preview:n}]:[]})??[];return{mode:e,options:t,selected:t.find(t=>{let{option:n}=t;return n.activeModes.includes(e)})??t[0]}});v=se,_=ie;let s=r&&`bg-accent/30`;t[19]===s?S=t[20]:(S=L(`cursor-pointer overflow-hidden rounded-xl border border-border/70 bg-card/60 transition-colors hover:bg-accent/10`,s),t[19]=s,t[20]=S),C=n.id,T=i,t[21]===r?D=t[22]:(D=r?{boxShadow:`inset 0 0 0 1px var(--ring)`}:void 0,t[21]=r,t[22]=D),y=`relative`,b=d?(0,$.jsx)(`div`,{"aria-label":`Light and dark theme variants`,className:`relative h-20`,role:`group`,onBlurCapture:e=>{let t=e.relatedTarget;(!(t instanceof Node)||!e.currentTarget.contains(t))&&g(null)},onKeyDown:e=>{e.key===`Escape`&&g(null)},onMouseLeave:()=>g(null),children:e.map(e=>{let{mode:t,options:n,selected:r}=e;if(!r)return null;let i=t===`light`?-52:52,a=m===t,o=r.option.activeModes.includes(t);return(0,$.jsxs)(`div`,{className:`contents`,children:[(0,$.jsx)(Ba,{label:`${t===`light`?`Light`:`Dark`}: ${r.option.label}`,children:(0,$.jsxs)(`button`,{"aria-label":n.length>1?`Choose ${t} variant, ${n.length} options, currently ${r.option.label}`:`Use ${t} variant, currently ${r.option.label}`,"aria-pressed":o,className:`absolute left-1/2 top-2 z-20 flex size-14 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring`,style:{transform:`translateX(calc(-50% + ${i}px))`},type:`button`,onClick:e=>{e.stopPropagation(),d.onSelectAndUse(r.option.themeIndex,t)},onFocus:()=>g(t),onMouseEnter:()=>g(t),children:[(0,$.jsx)(jn,{colors:r.preview.colors,mode:r.preview.mode}),o?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0 rounded-full ring-2 ring-inset ring-ring`}):null,o?(0,$.jsx)(`span`,{className:`pointer-events-none absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full border border-border/70 bg-background text-foreground shadow-sm`,children:t===`light`?(0,$.jsx)(w,{className:`size-2.5`}):(0,$.jsx)(h,{className:`size-2.5`})}):null]})}),(0,$.jsxs)(`span`,{className:`pointer-events-none absolute bottom-0 left-1/2 inline-flex max-w-24 -translate-x-1/2 items-center gap-1 text-2xs font-medium text-foreground`,style:{marginLeft:i},children:[(0,$.jsx)(`span`,{className:`truncate`,children:r.option.label}),n.length>1?(0,$.jsxs)(`span`,{className:`shrink-0 rounded-full bg-muted px-1 text-3xs text-muted-foreground`,children:[`+`,n.length-1]}):null]}),n.length>1?n.map((e,r)=>{let{option:o,preview:s}=e,c=r/(n.length-1)-.5,l=i+c*68,u=Math.abs(c)*10,f=o.activeModes.includes(t);return(0,$.jsx)(Ba,{label:`Use ${o.label} for ${t} mode`,children:(0,$.jsx)(`button`,{"aria-label":`Use ${o.label} for ${t} mode${f?`, currently active`:``}`,"aria-pressed":f,className:L(`absolute left-1/2 top-1 z-30 flex size-7 items-center justify-center rounded-full bg-background shadow-sm outline-none transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,f?`ring-2 ring-inset ring-ring`:`ring-1 ring-border/70`),style:{opacity:+!!a,pointerEvents:a?`auto`:`none`,transform:`translate(calc(-50% + ${a?l:i}px), ${a?u:28}px) scale(${a?1:.55})`,transitionDelay:a?`${r*35}ms`:`0ms`},type:`button`,onClick:e=>{e.stopPropagation(),d.onSelectAndUse(o.themeIndex,t)},onFocus:()=>g(t),onMouseEnter:()=>g(t),children:(0,$.jsx)(`span`,{className:`pointer-events-none scale-[0.43]`,children:(0,$.jsx)(jn,{colors:s.colors,mode:s.mode})})})},o.label)}):null]},t)})}):(0,$.jsx)(mn,{label:n.label,activeModes:o,onSelectMode:a,previews:n.previews}),t[2]=o,t[3]=r,t[4]=i,t[5]=a,t[6]=m,t[7]=n.id,t[8]=n.label,t[9]=n.previews,t[10]=d,t[11]=_,t[12]=v,t[13]=y,t[14]=b,t[15]=S,t[16]=C,t[17]=T,t[18]=D}else _=t[11],v=t[12],y=t[13],b=t[14],S=t[15],C=t[16],T=t[17],D=t[18];let O;t[23]!==y||t[24]!==b?(O=(0,$.jsx)(`div`,{className:y,children:b}),t[23]=y,t[24]=b,t[25]=O):O=t[25];let k=`Use ${d?`${d.collectionLabel}, ${n.label} variant`:`${n.label} theme`}${r?`, currently active`:``}`,A;t[26]===i?A=t[27]:(A=e=>{e.stopPropagation(),i()},t[26]=i,t[27]=A);let j=d?.collectionLabel??n.label,N;t[28]!==r||t[29]!==A||t[30]!==j||t[31]!==k?(N=(0,$.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,$.jsx)(`div`,{className:`flex items-center gap-1.5`,children:(0,$.jsx)(`button`,{"aria-label":k,"aria-pressed":r,className:`min-w-0 cursor-pointer truncate rounded-sm text-left text-sm font-medium text-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card`,type:`button`,onClick:A,children:j})})}),t[28]=r,t[29]=A,t[30]=j,t[31]=k,t[32]=N):N=t[32];let P;t[33]!==l||t[34]!==c||t[35]!==s||t[36]!==u||t[37]!==n.label||t[38]!==d?(P=s||c||l||u?(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[c?(0,$.jsxs)(se,{children:[(0,$.jsx)(ie,{render:(0,$.jsx)(I,{"aria-label":`Duplicate ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),c()},children:(0,$.jsx)(x,{})})}),(0,$.jsx)(ae,{children:`Duplicate theme`})]}):null,s?(0,$.jsxs)(se,{children:[(0,$.jsx)(ie,{render:(0,$.jsx)(I,{"aria-label":`Edit ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),s()},children:(0,$.jsx)(E,{})})}),(0,$.jsx)(ae,{children:`Edit theme`})]}):null,l?(0,$.jsxs)(se,{children:[(0,$.jsx)(ie,{render:(0,$.jsx)(I,{"aria-label":`Export ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),l()},children:(0,$.jsx)(M,{})})}),(0,$.jsx)(ae,{children:`Export theme file`})]}):null,u?(0,$.jsxs)(se,{children:[(0,$.jsx)(ie,{render:(0,$.jsx)(I,{"aria-label":d?`Remove themes from ${d.collectionLabel}`:`Remove ${n.label}`,size:`icon-xs`,variant:`ghost-destructive`,onClick:e=>{e.stopPropagation(),u()},children:(0,$.jsx)(F,{})})}),(0,$.jsx)(ae,{children:d?`Remove themes`:`Remove theme`})]}):null]}):null,t[33]=l,t[34]=c,t[35]=s,t[36]=u,t[37]=n.label,t[38]=d,t[39]=P):P=t[39];let R;t[40]!==N||t[41]!==P?(R=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pb-3 pt-2`,children:[N,P]}),t[40]=N,t[41]=P,t[42]=R):R=t[42];let z;t[43]!==R||t[44]!==S||t[45]!==C||t[46]!==T||t[47]!==D||t[48]!==O?(z=(0,$.jsxs)(`div`,{className:S,"data-theme-library-card":C,onClick:T,style:D,children:[O,R]}),t[43]=R,t[44]=S,t[45]=C,t[46]=T,t[47]=D,t[48]=O,t[49]=z):z=t[49];let B;t[50]!==_||t[51]!==z?(B=(0,$.jsx)(_,{render:z}),t[50]=_,t[51]=z,t[52]=B):B=t[52];let V=d?`Use the first variants for light and dark`:p.length>1?`Use for both light and dark`:`Use for ${p[0]} mode only`,H;t[53]===V?H=t[54]:(H=(0,$.jsx)(ae,{children:V}),t[53]=V,t[54]=H);let U;return t[55]!==v||t[56]!==B||t[57]!==H?(U=(0,$.jsxs)(v,{children:[B,H]}),t[55]=v,t[56]=B,t[57]=H,t[58]=U):U=t[58],U}function Ha(e){return e.mode}function Ua(e){let t=(0,Z.c)(49),{themes:n,activeModesFor:r,onUse:i,onUseMode:a,onDuplicate:o,onEdit:s,onDownload:c,onRemove:l}=e,u;t[0]!==r||t[1]!==n?(u=()=>{let e=n.findIndex(e=>r(e.id).length>0);return e<0?0:e},t[0]=r,t[1]=n,t[2]=u):u=t[2];let[d,f]=(0,Q.useState)(u),p=Math.min(d,n.length-1),m=n[p],h,g;if(t[3]!==p||t[4]!==d?(h=()=>{d!==p&&f(p)},g=[p,d],t[3]=p,t[4]=d,t[5]=h,t[6]=g):(h=t[5],g=t[6]),(0,Q.useEffect)(h,g),!m)return null;let _=m.collection?.label??m.label,v;if(t[7]!==r||t[8]!==_||t[9]!==c||t[10]!==o||t[11]!==s||t[12]!==l||t[13]!==i||t[14]!==a||t[15]!==m||t[16]!==n){let e=Ra(n),u;t[18]===n?u=t[19]:(u=n.find(Ga),t[18]=n,t[19]=u);let d=u,p;t[20]===n?p=t[21]:(p=n.find(Wa),t[20]=n,t[21]=p);let h=p,g;t[22]!==h||t[23]!==d||t[24]!==i||t[25]!==a||t[26]!==m||t[27]!==n.length?(g=()=>{if(n.length===1){i(m);return}d&&a(d,`light`),h&&a(h,`dark`),f(0)},t[22]=h,t[23]=d,t[24]=i,t[25]=a,t[26]=m,t[27]=n.length,t[28]=g):g=t[28];let y=g,b;t[29]!==r||t[30]!==m.id?(b=r(m.id),t[29]=r,t[30]=m.id,t[31]=b):b=t[31];let x;t[32]!==c||t[33]!==m?(x=()=>c(m),t[32]=c,t[33]=m,t[34]=x):x=t[34];let S;t[35]!==o||t[36]!==m?(S=()=>o(m),t[35]=o,t[36]=m,t[37]=S):S=t[37];let C;t[38]!==s||t[39]!==m?(C=()=>s(m),t[38]=s,t[39]=m,t[40]=C):C=t[40];let w;t[41]!==l||t[42]!==m?(w=()=>l(m),t[41]=l,t[42]=m,t[43]=w):w=t[43];let T;t[44]!==a||t[45]!==m?(T=e=>a(m,e),t[44]=a,t[45]=m,t[46]=T):T=t[46];let E;t[47]===m?E=t[48]:(E=fn(m),t[47]=m,t[48]=E),v=(0,$.jsx)(Va,{activeModes:b,isActive:!1,onDownload:x,onDuplicate:S,onEdit:C,onRemove:w,onUse:y,onUseMode:T,theme:E,...n.length>1?{variantNavigation:{collectionLabel:_,options:n.flatMap((t,n)=>fn(t).previews.map(i=>({themeIndex:n,label:e[n]??t.label,activeModes:r(t.id),preview:i}))),onSelectAndUse:(e,t)=>{let r=n[e];r&&(f(e),a(r,t))}}}:{}}),t[7]=r,t[8]=_,t[9]=c,t[10]=o,t[11]=s,t[12]=l,t[13]=i,t[14]=a,t[15]=m,t[16]=n,t[17]=v}else v=t[17];return v}function Wa(e){return tt(e).includes(`dark`)}function Ga(e){return tt(e).includes(`light`)}function Ka(e){let t=(0,Z.c)(118),{theme:n,setTheme:r,appearanceMode:i,setAppearanceMode:a,customThemes:o,initialAppearance:s,refreshTheme:c,isImportOpen:l,onImportOpenChange:u,themeHalves:d,setThemeHalf:f}=e,p=Vn(eo),m=Bn(),[h,g]=(0,Q.useState)(null),[_,y]=(0,Q.useState)(!1),b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[0]=b):b=t[0];let[x,S]=(0,Q.useState)(b),C;t[1]===x?C=t[2]:(C=new Set(x),t[1]=x,t[2]=C);let w=C,E=h?.theme,D;t[3]===h?.collectionThemes?D=t[4]:(D=h?.collectionThemes??[],t[3]=h?.collectionThemes,t[4]=D);let O=D,k=O.length>1,A=E?.collection?.label??E?.label,j=$a,M=Qa,N;t[5]===r?N=t[6]:(N=e=>{let t=r(e);return t||j(),t},t[5]=r,t[6]=N);let P=N,F;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(F=(e,t)=>{g({theme:e,collectionThemes:t}),S(t.length>1?[]:[e.id]),y(!0)},t[7]=F):F=t[7];let R=F,B;t[8]!==i||t[9]!==P||t[10]!==f||t[11]!==n||t[12]!==x||t[13]!==h?(B=()=>{if(!h)return;let e=new Set(x);if(e.size===0)return;let t=e.has(et(n)?.id??``),r=Te();if(!t||P(i===`system`?`system`:i)){for(let n of[`light`,`dark`]){let i=r[n];if(i===void 0)continue;let a=i&&e.has(i)?null:t?i:void 0;if(a!==void 0&&!f(n,a)){M();return}}try{Xe([...e])}catch{M();return}y(!1)}},t[8]=i,t[9]=P,t[10]=f,t[11]=n,t[12]=x,t[13]=h,t[14]=B):B=t[14];let V=B,H=et(n)?.id??null,U=d?.light??H,W=d?.dark??H,ee;t[15]!==i||t[16]!==H||t[17]!==P||t[18]!==r||t[19]!==f||t[20]!==n?(ee=(e,t)=>{let a=e===`light`?`dark`:`light`;if(t===null&&H!==null){let e=Te()[a]??H;if(!P(i===`system`?`system`:i))return;f(a,e)||(r(n),j());return}f(e,t)||j()},t[15]=i,t[16]=H,t[17]=P,t[18]=r,t[19]=f,t[20]=n,t[21]=ee):ee=t[21];let G=ee,te;t[22]!==W||t[23]!==s||t[24]!==U?(te=et((s===`light`?U:W)??``)??null,t[22]=W,t[23]=s,t[24]=U,t[25]=te):te=t[25];let K=te,ne=Za,re;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(re=(e,t)=>{let n=ne(e);return wn(n,t)??n.previews[0].colors},t[26]=re):re=t[26];let ie=re,ae;t[27]===a?ae=t[28]:(ae=e=>{a(e)||j()},t[27]=a,t[28]=ae);let se=ae,ce;t[29]===G?ce=t[30]:(ce=e=>t=>{t!==`system`&&G(t,e)},t[29]=G,t[30]=ce);let le=ce,ue;t[31]!==W||t[32]!==U?(ue=e=>{let t=[];return U===e&&t.push(`light`),W===e&&t.push(`dark`),t},t[31]=W,t[32]=U,t[33]=ue):ue=t[33];let de=ue,fe;if(t[34]!==W||t[35]!==U){let e=e=>ie(e===`light`?U:W,e);fe=t=>(0,$.jsx)(Fa,{className:`h-[8.75rem]`,panes:t===`system`?[{clip:`left`,colors:e(`light`)},{clip:`right`,colors:e(`dark`)}]:[{colors:e(t===`dark`?`dark`:`light`)}]}),t[34]=W,t[35]=U,t[36]=fe}else fe=t[36];let q=fe,pe;t[37]!==i||t[38]!==q||t[39]!==se?(pe=()=>(0,$.jsx)(`div`,{"aria-label":`Appearance mode`,className:`grid w-full grid-cols-3 gap-3`,role:`group`,children:[`system`,`light`,`dark`].map(e=>{let t=i===e;return(0,$.jsxs)(`button`,{"aria-label":e===`system`?`Follow the system appearance`:`Use ${e} mode`,"aria-pressed":t,className:L(`flex cursor-pointer flex-col items-stretch gap-1.5 rounded-xl border p-2 outline-none transition-colors focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring`,t?`border-transparent bg-accent/30`:`border-border/70 bg-card/60 hover:bg-accent/10`),style:t?{boxShadow:`inset 0 0 0 1px var(--ring)`}:void 0,onClick:()=>se(e),type:`button`,children:[q(e),(0,$.jsx)(`span`,{className:L(`flex items-center justify-center text-xs font-medium`,t?`text-foreground`:`text-muted-foreground`),children:e===`system`?`System`:e===`light`?`Light`:`Dark`})]},e)})}),t[37]=i,t[38]=q,t[39]=se,t[40]=pe):pe=t[40];let me=pe,he,ge,_e,ve,ye;if(t[41]!==K?.id||t[42]!==i||t[43]!==G||t[44]!==o||t[45]!==m||t[46]!==le||t[47]!==s||t[48]!==u||t[49]!==p||t[50]!==P||t[51]!==de||t[52]!==me){let e=[...o.reduce(Xa,new Map).entries()],n=()=>(0,$.jsx)(oe,{children:(0,$.jsxs)(`div`,{className:`grid w-full gap-2`,style:{gridTemplateColumns:`repeat(auto-fit, minmax(min(100%, 16rem), 1fr))`},children:[Kn.map(e=>(0,$.jsx)(Va,{activeModes:de(null),isActive:!1,onDuplicate:()=>p({editingThemeId:null,seedThemeId:null,seedName:`${e.label} copy`,initialAppearance:s}),onUse:()=>P(i===`system`?`system`:i),onUseMode:le(null),theme:e},e.id)),La.map(e=>{let t=fn(e);return(0,$.jsx)(Va,{activeModes:de(e.id),isActive:!1,onDuplicate:()=>p({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:s}),onUse:()=>P(e.id),onUseMode:le(e.id),theme:t},e.id)}),m.filter(e=>!o.some(t=>t.id===e.id)).map(e=>(0,$.jsx)(Va,{activeModes:de(e.id),isActive:!1,onDuplicate:()=>p({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:s}),onUse:()=>{let t=Be(e);t===null?P(e.id):G(t,e.id)},onUseMode:le(e.id),theme:fn(e)},e.id)),e.map(e=>{let[t,n]=e;return(0,$.jsx)(Ua,{activeModesFor:de,onDownload:Ya,onDuplicate:e=>p({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:s}),onEdit:e=>p({editingThemeId:e.id,seedThemeId:null,seedName:null,initialAppearance:s}),onRemove:e=>R(e,n),onUse:e=>{let t=tt(e);t.length===1?G(t[0],e.id):P(e.id)},onUseMode:(e,t)=>le(e.id)(t),themes:n},t)})]})});he=`space-y-3`,t[58]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,$.jsx)(`h3`,{className:`px-3 text-sm font-normal text-foreground/70 sm:px-4`,children:X(`color-scheme`).title}),t[58]=ge):ge=t[58],t[59]===me?_e=t[60]:(_e=me(),t[59]=me,t[60]=_e);let r;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`h3`,{className:`text-sm font-normal text-foreground/70`,children:X(`theme`).title}),t[61]=r):r=t[61];let a;t[62]!==K?.id||t[63]!==s||t[64]!==p?(a=()=>p({editingThemeId:null,seedThemeId:K?.id??null,seedName:null,initialAppearance:s}),t[62]=K?.id,t[63]=s,t[64]=p,t[65]=a):a=t[65];let c;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(z,{}),t[66]=c):c=t[66];let l;t[67]===a?l=t[68]:(l=(0,$.jsxs)(I,{size:`xs`,variant:`outline`,onClick:a,children:[c,`Create theme`]}),t[67]=a,t[68]=l);let d;t[69]===u?d=t[70]:(d=()=>u(!0),t[69]=u,t[70]=d);let f;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(T,{}),t[71]=f):f=t[71];let h;t[72]===d?h=t[73]:(h=(0,$.jsxs)(I,{size:`xs`,variant:`outline`,onClick:d,children:[f,`Add theme`]}),t[72]=d,t[73]=h),t[74]!==l||t[75]!==h?(ve=(0,$.jsxs)(`div`,{className:`flex min-h-8 flex-wrap items-center justify-between gap-3 px-3 pt-2 sm:px-4`,children:[r,(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[l,h]})]}),t[74]=l,t[75]=h,t[76]=ve):ve=t[76],ye=n(),t[41]=K?.id,t[42]=i,t[43]=G,t[44]=o,t[45]=m,t[46]=le,t[47]=s,t[48]=u,t[49]=p,t[50]=P,t[51]=de,t[52]=me,t[53]=he,t[54]=ge,t[55]=_e,t[56]=ve,t[57]=ye}else he=t[53],ge=t[54],_e=t[55],ve=t[56],ye=t[57];let be;t[77]===c?be=t[78]:(be=(e,t)=>{let{updated:n}=t;n&&c();let r=n?`updated`:`added`;xe.add(Me({type:`success`,title:e.length===1?`${e[0].label} ${r}`:`${e.length} themes ${r}`,description:e.map(Ja).join(`, `)}))},t[77]=c,t[78]=be);let Se;t[79]!==G||t[80]!==P?(Se=e=>{let t=tt(e);return t.length===1?(G(t[0],e.id),xe.add(Me({type:`success`,title:`${e.label} added`,description:`It’s now your ${t[0]} theme.`})),!0):P(e.id)?(xe.add(Me({type:`success`,title:`${e.label} added`,description:`It’s now active.`})),!0):!1},t[79]=G,t[80]=P,t[81]=Se):Se=t[81];let Ce;t[82]!==l||t[83]!==u||t[84]!==be||t[85]!==Se?(Ce=(0,$.jsx)(Na,{onImportedMany:be,onImported:Se,onOpenChange:u,open:l}),t[82]=l,t[83]=u,t[84]=be,t[85]=Se,t[86]=Ce):Ce=t[86];let we=k?`Remove themes from “${A}”?`:`Remove “${E?.label}”?`,Ee;t[87]===we?Ee=t[88]:(Ee=(0,$.jsx)(yn,{children:we}),t[87]=we,t[88]=Ee);let De=k?`Select the variants you want to remove. You can restore them by importing the extension again.`:`You can bring it back anytime by importing its JSON file.`,Oe;t[89]===De?Oe=t[90]:(Oe=(0,$.jsx)(xn,{children:De}),t[89]=De,t[90]=Oe);let ke;t[91]!==Ee||t[92]!==Oe?(ke=(0,$.jsxs)(En,{children:[Ee,Oe]}),t[91]=Ee,t[92]=Oe,t[93]=ke):ke=t[93];let Ae;t[94]!==k||t[95]!==O||t[96]!==w?(Ae=k?(0,$.jsx)(`div`,{className:`grid max-h-72 grid-cols-1 gap-2 overflow-y-auto px-6 pb-6 sm:grid-cols-2`,children:O.map(e=>{let t=w.has(e.id),n=fn(e),r=`remove-theme-${e.id}`;return(0,$.jsxs)(`label`,{className:`group relative flex min-h-28 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border border-border/70 bg-muted/25 p-3 has-checked:border-ring has-checked:bg-accent/20 hover:bg-muted/40`,htmlFor:r,children:[(0,$.jsxs)(`span`,{className:`absolute right-2 top-2 inline-grid size-5 grid-cols-1 sm:size-4`,children:[(0,$.jsx)(`input`,{checked:t,className:`col-start-1 row-start-1 size-full appearance-none rounded-sm border border-input bg-background outline-none checked:border-primary checked:bg-primary focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring checked:focus-visible:inset-ring-3 checked:focus-visible:inset-ring-background dark:not-checked:bg-input/32 forced-colors:appearance-auto`,id:r,name:`themes-to-remove`,type:`checkbox`,onChange:t=>{let n=t.currentTarget.checked;S(t=>n?[...t,e.id]:t.filter(t=>t!==e.id))}}),(0,$.jsx)(v,{className:`pointer-events-none col-start-1 row-start-1 size-3.5 shrink-0 self-center justify-self-center stroke-primary-foreground opacity-0 group-has-checked:opacity-100 sm:size-3`})]}),(0,$.jsx)(`span`,{className:`flex min-h-12 items-center justify-center gap-1`,children:n.previews.map(qa)}),(0,$.jsx)(`p`,{className:`max-w-full truncate text-center text-base font-medium text-foreground sm:text-sm`,children:e.label})]},e.id)})}):null,t[94]=k,t[95]=O,t[96]=w,t[97]=Ae):Ae=t[97];let je;t[98]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,$.jsx)(zn,{render:(0,$.jsx)(I,{variant:`outline`}),children:`Cancel`}),t[98]=je):je=t[98];let Ne=x.length===0,Pe=k?`Remove selected${x.length>0?` (${x.length})`:``}`:`Remove theme`,Fe;t[99]!==V||t[100]!==Ne||t[101]!==Pe?(Fe=(0,$.jsxs)(Sn,{children:[je,(0,$.jsx)(I,{disabled:Ne,variant:`destructive`,onClick:V,children:Pe})]}),t[99]=V,t[100]=Ne,t[101]=Pe,t[102]=Fe):Fe=t[102];let Ie;t[103]!==ke||t[104]!==Ae||t[105]!==Fe?(Ie=(0,$.jsxs)(gn,{children:[ke,Ae,Fe]}),t[103]=ke,t[104]=Ae,t[105]=Fe,t[106]=Ie):Ie=t[106];let Le;t[107]!==_||t[108]!==Ie?(Le=(0,$.jsx)(cn,{open:_,onOpenChange:y,children:Ie}),t[107]=_,t[108]=Ie,t[109]=Le):Le=t[109];let Re;return t[110]!==he||t[111]!==ge||t[112]!==_e||t[113]!==ve||t[114]!==ye||t[115]!==Ce||t[116]!==Le?(Re=(0,$.jsxs)(`div`,{className:he,children:[ge,_e,ve,ye,Ce,Le]}),t[110]=he,t[111]=ge,t[112]=_e,t[113]=ve,t[114]=ye,t[115]=Ce,t[116]=Le,t[117]=Re):Re=t[117],Re}function qa(e){return(0,$.jsx)(`span`,{className:`flex size-11 shrink-0 items-center justify-center`,children:(0,$.jsx)(`span`,{className:`flex scale-75`,children:(0,$.jsx)(jn,{colors:e.colors,mode:e.mode})})},e.mode)}function Ja(e){return e.label}function Ya(e){return za(`${e.id}.json`,Ie(e))}function Xa(e,t){let n=t.collection?`collection:${t.collection.id}`:`theme:${t.id}`,r=e.get(n);return r?r.push(t):e.set(n,[t]),e}function Za(e){if(e===null)return Kn[0];let t=et(e);return t?fn(t):Kn[0]}function Qa(){xe.add(Me({type:`error`,title:`Couldn’t remove theme`,description:`Try again.`}))}function $a(){xe.add(Me({type:`error`,title:`Couldn’t save theme selection`,description:`Try again.`}))}function eo(e){return e.openThemeEditor}function to(e){let t=(0,Z.c)(22),{durationMs:n}=e,[r,i]=(0,Q.useState)(!0),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>i(no),t[0]=a):a=t[0];let o=`${n}ms`,s;t[1]===o?s=t[2]:(s={"--preview-duration":o},t[1]=o,t[2]=s);let c=s,l=r?`w-4`:`w-0`,u;t[3]===l?u=t[4]:(u=L(`h-full shrink-0 overflow-hidden rounded-md bg-sidebar`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,l),t[3]=l,t[4]=u);let d;t[5]===u?d=t[6]:(d=(0,$.jsx)(`span`,{"aria-hidden":!0,className:u}),t[5]=u,t[6]=d);let f;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsxs)(`span`,{className:`flex min-h-0 flex-1 flex-col gap-1 pt-1`,children:[(0,$.jsx)(`span`,{className:`h-0.5 w-full rounded-full bg-muted-foreground/25`}),(0,$.jsx)(`span`,{className:`h-0.5 w-4/5 rounded-full bg-muted-foreground/20`}),(0,$.jsx)(`span`,{className:`h-0.5 w-3/5 rounded-full bg-muted-foreground/15`})]}),t[7]=f):f=t[7];let p=r?`h-2 border-t border-border/70`:`h-0 border-t-0`,m;t[8]===p?m=t[9]:(m=L(`flex shrink-0 items-center overflow-hidden bg-foreground/5 px-2`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,p),t[8]=p,t[9]=m);let h;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`span`,{className:`h-px w-2/3 rounded-full bg-muted-foreground/25`}),t[10]=h):h=t[10];let g;t[11]===m?g=t[12]:(g=(0,$.jsxs)(`span`,{"aria-hidden":!0,className:`flex min-w-0 flex-1 flex-col px-1`,children:[f,(0,$.jsx)(`span`,{className:m,children:h})]}),t[11]=m,t[12]=g);let _=r?`w-5`:`w-0`,v;t[13]===_?v=t[14]:(v=L(`h-full shrink-0 overflow-hidden rounded-md bg-muted`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,_),t[13]=_,t[14]=v);let y;t[15]===v?y=t[16]:(y=(0,$.jsx)(`span`,{"aria-hidden":!0,className:v}),t[15]=v,t[16]=y);let b;return t[17]!==g||t[18]!==y||t[19]!==c||t[20]!==d?(b=(0,$.jsxs)(`button`,{type:`button`,"aria-label":`Replay panel animation preview`,className:`flex h-10 w-full cursor-pointer overflow-hidden rounded-lg border border-border bg-background p-1 shadow-xs/5 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`,onClick:a,style:c,children:[d,g,y]}),t[17]=g,t[18]=y,t[19]=c,t[20]=d,t[21]=b):b=t[21],b}function no(e){return!e}function ro(){let{scope:e,connectedEnvironments:t}=qt(),n=Fn(),{snapshots:r,error:i,isLoading:a,refresh:o}=Rn(e.environmentIds),s=je(t,C),[c,l]=(0,Q.useState)(``),[u,d]=(0,Q.useState)(`all`),[f,p]=(0,Q.useState)(`newest`),[m,h]=(0,Q.useState)(!1),g=(0,Q.useRef)(!1),[_,v]=(0,Q.useState)(null),b=(0,Q.useMemo)(()=>{let t=e.kind===`project`||e.kind===`checkout`?new Set(e.members.map(e=>`${e.environmentId}:${e.id}`)):null;return r.flatMap(({environmentId:e,snapshot:n})=>n.projects.flatMap(r=>{let i=`${e}:${r.id}`;if(t!==null&&!t.has(i))return[];let a=n.threads.filter(e=>e.projectId===r.id).map(t=>ne(e,t));return a.length?[{key:i,project:{...r,environmentId:e},threads:a}]:[]}))},[r,e]),x=b.flatMap(e=>e.threads),S=b.some(e=>e.key===u)?u:`all`,w=b.flatMap(e=>{if(S!==`all`&&e.key!==S)return[];let t=e.threads.filter(e=>e.title.toLocaleLowerCase().includes(c.trim().toLocaleLowerCase())).toSorted((e,t)=>{if(f===`title`)return e.title.localeCompare(t.title);let n=(t.archivedAt??t.createdAt).localeCompare(e.archivedAt??e.createdAt);return f===`oldest`?-n:n});return t.length?[{...e,threads:t}]:[]}),T=!a&&!i&&e.environmentIds.every(e=>t.some(t=>t.environmentId===e)&&r.some(t=>t.environmentId===e)),E=async(t,r,i=!1)=>{if(!g.current){g.current=!0,h(!0),v(null);try{if(i&&!await Oe().dialogs.confirm(`Permanently delete all ${t.length} archived chats in ${e.label}? Search and project filters do not limit this action. This cannot be undone.`,{variant:`destructive`}))return;for(let e of t){let t=r===`unarchive`?await n.unarchiveThread(e):i?await n.deleteThread(e):await n.confirmAndDeleteThread(e);if(t._tag===`Failure`)throw W(t)}}catch(e){v(e instanceof Error?e.message:`The action could not be completed. Try again.`)}finally{o(),g.current=!1,h(!1)}}};return(0,$.jsxs)(tn,{width:`wide`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,$.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Archived chats`}),(0,$.jsxs)(I,{variant:`destructive-outline`,size:`sm`,disabled:m||!T||!x.length||x.some(e=>!s.has(e.environmentId)),onClick:()=>void E(x.map(e=>y(e.environmentId,e.id)),`delete`,!0),children:[(0,$.jsx)(F,{"aria-hidden":!0}),` Delete all`]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-[minmax(0,1fr)_9rem_10rem]`,children:[(0,$.jsx)(`div`,{className:`col-span-2 min-w-0 sm:col-span-1`,children:(0,$.jsxs)(Ht,{children:[(0,$.jsx)(Bt,{children:(0,$.jsx)(k,{"aria-hidden":!0})}),(0,$.jsx)(Vt,{type:`search`,"aria-label":`Search archived chats`,placeholder:`Search archived chats`,value:c,onChange:e=>l(e.currentTarget.value)})]})}),(0,$.jsxs)(_e,{value:f,onValueChange:e=>e&&p(e),children:[(0,$.jsx)(ge,{"aria-label":`Sort archived chats`,children:(0,$.jsx)(pe,{children:f===`newest`?`Newest first`:f===`oldest`?`Oldest first`:`By title`})}),(0,$.jsxs)(he,{children:[(0,$.jsx)(q,{value:`newest`,children:`Newest first`}),(0,$.jsx)(q,{value:`oldest`,children:`Oldest first`}),(0,$.jsx)(q,{value:`title`,children:`By title`})]})]}),(0,$.jsxs)(_e,{value:S,onValueChange:e=>e&&d(e),children:[(0,$.jsx)(ge,{"aria-label":`Filter by project`,children:(0,$.jsx)(pe,{children:S===`all`?`All projects`:b.find(e=>e.key===u)?.project.title??`All projects`})}),(0,$.jsxs)(he,{children:[(0,$.jsx)(q,{value:`all`,children:`All projects`}),b.map(e=>(0,$.jsx)(q,{value:e.key,children:e.project.title},e.key))]})]})]}),_||i?(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-destructive-foreground`,children:[(0,$.jsx)(`p`,{children:_??i}),(0,$.jsx)(I,{variant:`outline`,size:`sm`,onClick:o,children:`Retry`})]}):null,w.map(({key:e,project:t,threads:n},r)=>(0,$.jsx)(rn,{id:r===0?`archive`:void 0,title:t.title,icon:(0,$.jsx)(zt,{project:t}),headerAction:(0,$.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[n.length,` `,n.length===1?`chat`:`chats`]}),children:n.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-4`,onContextMenu:t=>{t.preventDefault(),!m&&s.has(e.environmentId)&&Oe().contextMenu.show([{id:`unarchive`,label:`Unarchive`},{id:`delete`,label:`Delete`,destructive:!0}],{x:t.clientX,y:t.clientY}).then(t=>{if(t===`delete`||t===`unarchive`)return E([y(e.environmentId,e.id)],t)}).catch(e=>v(e instanceof Error?e.message:`Could not open chat actions.`))},children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`p`,{className:`break-words text-sm font-medium`,children:e.title||`Untitled chat`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:new Date(e.archivedAt??e.createdAt).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})})]}),(0,$.jsxs)(se,{children:[(0,$.jsx)(ie,{render:(0,$.jsx)(I,{variant:`ghost-destructive`,size:`icon-sm`,"aria-label":`Delete ${e.title}`,disabled:m||!s.has(e.environmentId),onClick:()=>void E([y(e.environmentId,e.id)],`delete`),children:(0,$.jsx)(F,{"aria-hidden":!0})})}),(0,$.jsx)(ae,{children:`Delete chat`})]}),(0,$.jsx)(I,{variant:`soft`,size:`sm`,disabled:m||!s.has(e.environmentId),onClick:()=>void E([y(e.environmentId,e.id)],`unarchive`),children:`Unarchive`})]},e.id))},e)),w.length?null:(0,$.jsx)(`p`,{id:`archive`,role:`status`,className:`py-8 text-center text-sm text-muted-foreground`,children:a?`Loading archived chats…`:i?`Archived chats could not be loaded.`:x.length?`No chats match your filters.`:`No archived chats.`})]})}var io={artwork:`Artwork`,pill:`Version pill`,none:`None`},ao={turn:`Wait for the full response`,paragraph:`Show finished paragraphs`},oo={turn:`Text appears once the agent finishes its turn.`,paragraph:`Each paragraph or code block appears as soon as it is complete.`},so={updated_at:`Last user message`,created_at:`Created at`,manual:`Manual`},co=b(_),lo={locale:`System default`,"12-hour":`12-hour`,"24-hour":`24-hour`},uo={comfortable:`Comfortable`,wide:`Wide`,full:`Full`},fo={p4:`P4`,lucide:`Lucide`},po={stacked:`Stacked`,split:`Split`},mo={direct:`Direct`,hold:`Hold`,"double-click":`Double press`},ho={balanced:`Balanced`,performance:`Performance`,"battery-saver":`Battery saver`},go={...ho,advanced:`Advanced`},_o={balanced:`Pauses probes for idle clients, locked hosts, or low power mode.`,performance:`Allows scoped background probes while any subscribed client remains connected.`,"battery-saver":`Also pauses background probes when the host or client is on battery.`},vo=`Uses custom intervals.`,yo=d.make(`codex`),bo=[{key:`pauseWhenHostLocked`,label:`Pause when host is locked`},{key:`pauseWhenHostLowPower`,label:`Pause on host low power`},{key:`pauseWhenClientLowPower`,label:`Pause on client low power`},{key:`pauseWhenOnBattery`,label:`Pause on battery`}];function xo(){return{backgroundActivity:p.backgroundActivity}}function So(e){return{backgroundActivity:{schemaVersion:1,profile:e,overrides:{}}}}function Co(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`span`,{className:`inline-flex items-baseline gap-2`,children:[(0,$.jsx)(`span`,{children:`Version`}),(0,$.jsx)(`code`,{className:`text-2xs font-medium text-muted-foreground`,children:G})]}),e[0]=t):t=e[0],t}function wo(){let e=Un(),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(!1),a=typeof window<`u`&&!!window.desktopBridge,o=e?.channel??`latest`,s=a?null:te,c=ln||a&&o===`nightly`,l=(0,Q.useCallback)(e=>{let t=window.desktopBridge;t&&typeof t.setUpdateChannel==`function`&&e!==o&&(n(!0),t.setUpdateChannel(e).catch(e=>{xe.add(Me({type:`error`,title:`Could not change update track`,description:e instanceof Error?e.message:`Update track change failed.`}))}).finally(()=>{n(!1)}))},[o]),u=(0,Q.useCallback)(async()=>{let t=window.desktopBridge;if(!t)return;let n=e?Ln(e):`none`;if(n===`download`){t.downloadUpdate().catch(e=>{xe.add(Me({type:`error`,title:`Could not download update`,description:e instanceof Error?e.message:`Download failed.`}))});return}if(n===`install`){if(r)return;i(!0);let n=!1;try{n=await Oe().dialogs.confirm(Dn(e??{availableVersion:null,downloadedVersion:null}))}catch(e){i(!1),xe.add(Me({type:`error`,title:`Could not confirm update`,description:e instanceof Error?e.message:`Update confirmation failed.`}));return}if(!n){i(!1);return}t.installUpdate().catch(e=>{xe.add(Me({type:`error`,title:`Could not install update`,description:e instanceof Error?e.message:`Install failed.`}))}).finally(()=>i(!1));return}typeof t.checkForUpdate==`function`&&t.checkForUpdate().then(e=>{e.checked||xe.add(Me({type:`error`,title:`Could not check for updates`,description:e.state.message??`Automatic updates are not available in this build.`}))}).catch(e=>{xe.add(Me({type:`error`,title:`Could not check for updates`,description:e instanceof Error?e.message:`Update check failed.`}))})},[r,e]),d=e?Ln(e):`none`,f=e?Pn(e):null,p=d===`none`?!Nn(e):on(e),m={download:`Download`,install:`Install`}[d]??{checking:`Checking…`,downloading:`Downloading…`,"up-to-date":`Up to Date`}[e?.status??``]??`Check for Updates`,h=d===`download`||d===`install`?`Update available.`:`Current version of the application.`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{id:X(`app-version`).id,title:(0,$.jsx)(Co,{}),description:h,control:(0,$.jsxs)(se,{children:[(0,$.jsx)(ie,{render:(0,$.jsx)(I,{size:`sm`,variant:`outline`,disabled:p||r,onClick:u,children:m})}),f?(0,$.jsx)(ae,{children:f}):null]})}),a?(0,$.jsx)(J,{...X(`update-track`),description:`Use stable releases or nightly builds. Switch back anytime.`,control:(0,$.jsxs)(_e,{value:o,onValueChange:e=>{l(e)},children:[(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Update track`,disabled:t,children:(0,$.jsx)(pe,{children:o===`nightly`?`Nightly`:`Stable`})}),(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`latest`,children:`Stable`}),(0,$.jsx)(q,{hideIndicator:!0,value:`nightly`,children:`Nightly`})]})]})}):s?(0,$.jsx)(J,{...X(`update-track`),description:`Switches the hosted app release channel.`,control:(0,$.jsxs)(_e,{value:s,onValueChange:e=>{e!==s&&window.location.assign(re({channel:e}))},children:[(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Update track`,children:(0,$.jsx)(pe,{children:K})}),(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`latest`,children:`Latest`}),(0,$.jsx)(q,{hideIndicator:!0,value:`nightly`,children:`Nightly`})]})]})}):null,c?(0,$.jsx)(Wn,{}):null,a?(0,$.jsx)(vr,{}):null]})}function To(e){let{theme:t,setTheme:n,followSystem:r,setFollowSystem:i,setThemeHalf:a,clearThemeHalves:o,themeHalves:s}=we(),c=Zt(),l=Xt(),u=!A(c.textGenerationModelSelection??null,p.textGenerationModelSelection??null),d=fr(c),f=(0,Q.useMemo)(()=>[...t===`system`?[]:[`Theme`],...r?[]:[`Follow system`],...s===null?[]:[`Theme mix`],...c.appearanceContrast===p.appearanceContrast?[]:[`Contrast`],...c.glassOpacity===p.glassOpacity?[]:[`Glass opacity`],...c.diffColorScheme===p.diffColorScheme?[]:[`Diff colors`],...c.chatWidth===p.chatWidth?[]:[`Chat width`],...c.iconSet===p.iconSet?[]:[`Icon set`],...c.panelAnimationDurationMs===p.panelAnimationDurationMs?[]:[`Panel animations`],...c.environmentIdentificationMode===p.environmentIdentificationMode?[]:[`Environment identification`],...c.timestampFormat===p.timestampFormat?[]:[`Time format`],...c.notificationMode===p.notificationMode?[]:[`Thread notifications`],...c.inAppNotificationsEnabled===p.inAppNotificationsEnabled?[]:[`In-app notifications`],...c.sidebarThreadPreviewCount===p.sidebarThreadPreviewCount?[]:[`Visible threads`],...c.sidebarProjectGroupingMode===p.sidebarProjectGroupingMode?[]:[`Project Grouping`],...c.sidebarProjectSortOrder===p.sidebarProjectSortOrder?[]:[`Project order`],...c.sidebarWorkingShelfEnabled===p.sidebarWorkingShelfEnabled?[]:[`Working section`],...c.sidebarAutoSettleAfterDays===p.sidebarAutoSettleAfterDays?[]:[`Auto-settle inactive threads`],...c.sidebarAutoSettleKeepPullRequests===p.sidebarAutoSettleKeepPullRequests?[]:[`Keep threads with a PR`],...c.sidebarAutoSettleOnMerge===p.sidebarAutoSettleOnMerge?[]:[`Auto-settle merged threads`],...c.autoResumeLimitedThreads===p.autoResumeLimitedThreads?[]:[`Auto-resume limited threads`],...c.snoozeLimitedThreads===p.snoozeLimitedThreads?[]:[`Snooze limited threads`],...c.wordWrap===p.wordWrap?[]:[`Word wrap`],...c.persistComposerContextStrip===p.persistComposerContextStrip?[]:[`Composer context`],...ur(c),...c.diffFilesCollapsed===p.diffFilesCollapsed?[]:[`Default diff file state`],...c.diffIgnoreWhitespace===p.diffIgnoreWhitespace?[]:[`Diff whitespace changes`],...c.diffLayout===p.diffLayout?[]:[`Diff layout`],...c.proactivePanelsEnabled===p.proactivePanelsEnabled?[]:[`Proactive panels`],...c.showSkillsInSlashMenu===p.showSkillsInSlashMenu?[]:[`Show skills in slash menu`],...c.composerCollapseOnScroll===p.composerCollapseOnScroll?[]:[`Collapse composer on scroll`],...c.composerRichTextEnabled===p.composerRichTextEnabled?[]:[`Rich text composer`],...c.sendShortcut===p.sendShortcut?[]:[`Send shortcut`],...c.followUpBehavior===p.followUpBehavior?[]:[`Follow-up behavior`],...c.contextWindowMeterEnabled===p.contextWindowMeterEnabled?[]:[`Context window indicator`],...c.responseStreamingMode===p.responseStreamingMode?[]:[`Response streaming`],...c.enableProviderUpdateChecks===p.enableProviderUpdateChecks?[]:[`Provider update checks`],...c.continueThreadsAfterServerUpdate===p.continueThreadsAfterServerUpdate?[]:[`Continue threads after restarts`],...d?[`Background activity`]:[],...c.defaultThreadEnvMode===p.defaultThreadEnvMode?[]:[`New thread mode`],...c.newWorktreesStartFromOrigin===p.newWorktreesStartFromOrigin?[]:[`New worktrees start from origin`],...c.addProjectBaseDirectory===p.addProjectBaseDirectory?[]:[`Add project base directory`],...c.confirmThreadUnpin===p.confirmThreadUnpin?[]:[`Unpin confirmation`],...c.confirmThreadArchive===p.confirmThreadArchive?[]:[`Archive confirmation`],...c.confirmThreadDelete===p.confirmThreadDelete?[]:[`Delete confirmation`],...c.confirmQuit===p.confirmQuit?[]:[`Quit shortcut`],...u?[`Text generation model`]:[],...rr(c),...c.enableAgentBrowserAccess===p.enableAgentBrowserAccess?[]:[`Agent browser access`]],[u,d,c.browserDefaultViewport,c.browserDefaultZoomFactor,c.browserDefaultAppearance,c.browserRecordingFrameRate,c.browserRecordingShowKeyPresses,c.browserRecordingShowMousePresses,c.browserLinkTarget,c.browserAutoShowFloatingPreview,c.appearanceContrast,c.diffColorScheme,c.chatWidth,c.iconSet,c.enableAgentBrowserAccess,c.confirmQuit,c.confirmThreadArchive,c.confirmThreadDelete,c.confirmThreadUnpin,c.composerCollapseOnScroll,c.composerRichTextEnabled,c.sendShortcut,c.followUpBehavior,c.addProjectBaseDirectory,c.defaultThreadEnvMode,c.newWorktreesStartFromOrigin,c.diffFilesCollapsed,c.diffIgnoreWhitespace,c.diffLayout,c.proactivePanelsEnabled,c.environmentIdentificationMode,c.contextWindowMeterEnabled,c.fontFamilyCode,c.fontFamilyComposer,c.fontFamilySans,c.fontFamilyTerminal,c.fontSizeCode,c.fontSizeInterface,c.fontSizePrompt,c.fontSizeTerminal,c.glassOpacity,c.panelAnimationDurationMs,c.responseStreamingMode,c.persistComposerContextStrip,c.enableProviderUpdateChecks,c.continueThreadsAfterServerUpdate,c.sidebarAutoSettleAfterDays,c.sidebarAutoSettleKeepPullRequests,c.sidebarAutoSettleOnMerge,c.autoResumeLimitedThreads,c.snoozeLimitedThreads,c.sidebarProjectGroupingMode,c.sidebarProjectSortOrder,c.sidebarWorkingShelfEnabled,c.sidebarThreadPreviewCount,c.showSkillsInSlashMenu,c.timestampFormat,c.notificationMode,c.inAppNotificationsEnabled,c.wordWrap,r,t,s]);return{changedSettingLabels:f,restoreDefaults:(0,Q.useCallback)(async()=>{if(f.length===0||!await(Ce()??Oe()).dialogs.confirm([`Restore default settings?`,`This will reset: ${f.join(`, `)}.`].join(`
38
38
  `),{variant:`destructive`}))return;let r=t;try{r=De()}catch{}let s=Se(),c=r!==`system`,u=s!==null,d=Ee(r)!==`system`,m=()=>{xe.add(Me({type:`error`,title:`Couldn’t restore theme settings`,description:`Try again.`}))},h=s,g=()=>{c&&n(r),h?.light&&a(`light`,h.light),h?.dark&&a(`dark`,h.dark)};if(c&&!n(`system`)){m();return}if(u&&!o()){g(),m();return}if(d&&!i(!0)){g(),m();return}l({appearanceContrast:p.appearanceContrast,diffColorScheme:p.diffColorScheme,chatWidth:p.chatWidth,iconSet:p.iconSet,timestampFormat:p.timestampFormat,notificationMode:p.notificationMode,inAppNotificationsEnabled:p.inAppNotificationsEnabled,wordWrap:p.wordWrap,persistComposerContextStrip:p.persistComposerContextStrip,diffFilesCollapsed:p.diffFilesCollapsed,diffIgnoreWhitespace:p.diffIgnoreWhitespace,diffLayout:p.diffLayout,proactivePanelsEnabled:p.proactivePanelsEnabled,showSkillsInSlashMenu:p.showSkillsInSlashMenu,composerCollapseOnScroll:p.composerCollapseOnScroll,composerRichTextEnabled:p.composerRichTextEnabled,sendShortcut:p.sendShortcut,followUpBehavior:p.followUpBehavior,contextWindowMeterEnabled:p.contextWindowMeterEnabled,environmentIdentificationMode:p.environmentIdentificationMode,glassOpacity:p.glassOpacity,panelAnimationDurationMs:p.panelAnimationDurationMs,sidebarThreadPreviewCount:p.sidebarThreadPreviewCount,sidebarProjectGroupingMode:p.sidebarProjectGroupingMode,sidebarProjectSortOrder:p.sidebarProjectSortOrder,sidebarWorkingShelfEnabled:p.sidebarWorkingShelfEnabled,sidebarAutoSettleAfterDays:p.sidebarAutoSettleAfterDays,sidebarAutoSettleKeepPullRequests:p.sidebarAutoSettleKeepPullRequests,sidebarAutoSettleOnMerge:p.sidebarAutoSettleOnMerge,autoResumeLimitedThreads:p.autoResumeLimitedThreads,snoozeLimitedThreads:p.snoozeLimitedThreads,responseStreamingMode:p.responseStreamingMode,enableProviderUpdateChecks:p.enableProviderUpdateChecks,continueThreadsAfterServerUpdate:p.continueThreadsAfterServerUpdate,backgroundActivity:p.backgroundActivity,backgroundActivityProfile:p.backgroundActivityProfile,automaticGitFetchInterval:p.automaticGitFetchInterval,providerHealthRefreshInterval:p.providerHealthRefreshInterval,defaultThreadEnvMode:p.defaultThreadEnvMode,newWorktreesStartFromOrigin:p.newWorktreesStartFromOrigin,addProjectBaseDirectory:p.addProjectBaseDirectory,confirmThreadArchive:p.confirmThreadArchive,confirmThreadDelete:p.confirmThreadDelete,confirmThreadUnpin:p.confirmThreadUnpin,confirmQuit:p.confirmQuit,textGenerationModelSelection:p.textGenerationModelSelection,fontFamilySans:p.fontFamilySans,fontFamilyComposer:p.fontFamilyComposer,fontFamilyCode:p.fontFamilyCode,fontFamilyTerminal:p.fontFamilyTerminal,fontSizeInterface:p.fontSizeInterface,fontSizePrompt:p.fontSizePrompt,fontSizeCode:p.fontSizeCode,fontSizeTerminal:p.fontSizeTerminal,browserDefaultViewport:p.browserDefaultViewport,browserDefaultZoomFactor:p.browserDefaultZoomFactor,browserDefaultAppearance:p.browserDefaultAppearance,browserRecordingFrameRate:p.browserRecordingFrameRate,browserRecordingShowKeyPresses:p.browserRecordingShowKeyPresses,browserRecordingShowMousePresses:p.browserRecordingShowMousePresses,browserLinkTarget:p.browserLinkTarget,browserAutoShowFloatingPreview:p.browserAutoShowFloatingPreview,enableAgentBrowserAccess:p.enableAgentBrowserAccess}),e?.()},[f,o,e,i,n,a,t,s,l])}}function Eo(e){let t=(0,Z.c)(98),{open:n,onOpenChange:r}=e,a=Yt(),o=Zt(),s=Xt(),c,l,u,d,f,p;t[0]===o?(c=t[1],l=t[2],u=t[3],d=t[4],f=t[5],p=t[6]):(f=ke(o),c=f.profile,l=sr(f.automaticGitFetchInterval),d=sr(f.providerHealthRefreshInterval),u=sr(f.hostPowerMonitorActiveInterval),p=sr(f.hostPowerMonitorIdleInterval),t[0]=o,t[1]=c,t[2]=l,t[3]=u,t[4]=d,t[5]=f,t[6]=p);let m=p,h=n&&a,g;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsxs)(Dt,{children:[(0,$.jsx)(Ot,{children:`Background Activity`}),(0,$.jsx)(jt,{children:`Tune the shared power policy and the background intervals that feed it.`})]}),t[7]=g):g=t[7];let _=!a,v;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Shared policy`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Controls whether background work may run after a subscribed interval fires.`})]}),t[8]=v):v=t[8];let y;t[9]!==o||t[10]!==s?(y=e=>{(e===`balanced`||e===`performance`||e===`battery-saver`)&&s({backgroundActivity:lr(o,e)})},t[9]=o,t[10]=s,t[11]=y):y=t[11];let b=ho[c],x;t[12]===b?x=t[13]:(x=(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Shared background policy`,children:(0,$.jsx)(pe,{children:b})}),t[12]=b,t[13]=x);let S;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`balanced`,children:ho.balanced}),(0,$.jsx)(q,{hideIndicator:!0,value:`performance`,children:ho.performance}),(0,$.jsx)(q,{hideIndicator:!0,value:`battery-saver`,children:ho[`battery-saver`]})]}),t[14]=S):S=t[14];let C;t[15]!==c||t[16]!==y||t[17]!==x?(C=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-b px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[v,(0,$.jsxs)(_e,{value:c,onValueChange:y,children:[x,S]})]}),t[15]=c,t[16]=y,t[17]=x,t[18]=C):C=t[18];let w;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:X(`git-fetch-interval`).title}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Refresh remote branch status in the background.`})]}),t[19]=w):w=t[19];let T;t[20]!==f||t[21]!==o.backgroundActivity||t[22]!==s?(T=e=>s(pr(o.backgroundActivity,f,{automaticGitFetchInterval:i(cr(e))})),t[20]=f,t[21]=o.backgroundActivity,t[22]=s,t[23]=T):T=t[23];let E;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsxs)(de,{children:[(0,$.jsx)(ue,{"aria-label":`Decrease Git fetch interval`}),(0,$.jsx)(ce,{"aria-label":`Git fetch interval in seconds`}),(0,$.jsx)(le,{"aria-label":`Increase Git fetch interval`})]}),t[24]=E):E=t[24];let D;t[25]!==l||t[26]!==T?(D=(0,$.jsx)(fe,{value:l,min:0,step:5,size:`sm`,className:`w-32`,onValueChange:T,children:E}),t[25]=l,t[26]=T,t[27]=D):D=t[27];let O;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[28]=O):O=t[28];let k;t[29]===D?k=t[30]:(k=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-b px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[w,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[D,O]})]}),t[29]=D,t[30]=k);let A;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Provider health interval`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Refresh provider availability, versions, and auth state. Model catalog updates follow Provider update checks.`})]}),t[31]=A):A=t[31];let j;t[32]!==f||t[33]!==o.backgroundActivity||t[34]!==s?(j=e=>s(pr(o.backgroundActivity,f,{providerHealthRefreshInterval:i(cr(e))})),t[32]=f,t[33]=o.backgroundActivity,t[34]=s,t[35]=j):j=t[35];let M;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsxs)(de,{children:[(0,$.jsx)(ue,{"aria-label":`Decrease provider health interval`}),(0,$.jsx)(ce,{"aria-label":`Provider health interval in seconds`}),(0,$.jsx)(le,{"aria-label":`Increase provider health interval`})]}),t[36]=M):M=t[36];let N;t[37]!==d||t[38]!==j?(N=(0,$.jsx)(fe,{value:d,min:0,step:30,size:`sm`,className:`w-32`,onValueChange:j,children:M}),t[37]=d,t[38]=j,t[39]=N):N=t[39];let P;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[40]=P):P=t[40];let F;t[41]===N?F=t[42]:(F=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[A,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[N,P]})]}),t[41]=N,t[42]=F);let L;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Host power monitor`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Poll host power state while clients are active.`})]}),t[43]=L):L=t[43];let R;t[44]!==f||t[45]!==o.backgroundActivity||t[46]!==s?(R=e=>s(pr(o.backgroundActivity,f,{hostPowerMonitorActiveInterval:i(cr(e,5))})),t[44]=f,t[45]=o.backgroundActivity,t[46]=s,t[47]=R):R=t[47];let z;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsxs)(de,{children:[(0,$.jsx)(ue,{"aria-label":`Decrease active host power interval`}),(0,$.jsx)(ce,{"aria-label":`Active host power interval in seconds`}),(0,$.jsx)(le,{"aria-label":`Increase active host power interval`})]}),t[48]=z):z=t[48];let B;t[49]!==u||t[50]!==R?(B=(0,$.jsx)(fe,{value:u,min:5,step:5,size:`sm`,className:`w-32`,onValueChange:R,children:z}),t[49]=u,t[50]=R,t[51]=B):B=t[51];let V;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[52]=V):V=t[52];let H;t[53]===B?H=t[54]:(H=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-t px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[L,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[B,V]})]}),t[53]=B,t[54]=H);let U;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Idle host monitor`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Poll host power state when no foreground client is active.`})]}),t[55]=U):U=t[55];let W;t[56]!==f||t[57]!==o.backgroundActivity||t[58]!==s?(W=e=>s(pr(o.backgroundActivity,f,{hostPowerMonitorIdleInterval:i(cr(e,5))})),t[56]=f,t[57]=o.backgroundActivity,t[58]=s,t[59]=W):W=t[59];let ee;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsxs)(de,{children:[(0,$.jsx)(ue,{"aria-label":`Decrease idle host power interval`}),(0,$.jsx)(ce,{"aria-label":`Idle host power interval in seconds`}),(0,$.jsx)(le,{"aria-label":`Increase idle host power interval`})]}),t[60]=ee):ee=t[60];let G;t[61]!==m||t[62]!==W?(G=(0,$.jsx)(fe,{value:m,min:5,step:30,size:`sm`,className:`w-32`,onValueChange:W,children:ee}),t[61]=m,t[62]=W,t[63]=G):G=t[63];let te;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[64]=te):te=t[64];let K;t[65]===G?K=t[66]:(K=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-t px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[U,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[G,te]})]}),t[65]=G,t[66]=K);let ne;t[67]!==f||t[68]!==o.backgroundActivity||t[69]!==s?(ne=bo.map(e=>{let{key:t,label:n}=e;return(0,$.jsxs)(`label`,{className:`flex items-center justify-between gap-3 border-b px-4 py-3 last:border-b-0 sm:border-r sm:even:border-r-0`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium`,children:n}),(0,$.jsx)(bn,{checked:f[t],onCheckedChange:e=>s(pr(o.backgroundActivity,f,{[t]:!!e})),"aria-label":n})]},t)}),t[67]=f,t[68]=o.backgroundActivity,t[69]=s,t[70]=ne):ne=t[70];let re;t[71]===ne?re=t[72]:(re=(0,$.jsx)(`div`,{className:`grid gap-0 border-t sm:grid-cols-2`,children:ne}),t[71]=ne,t[72]=re);let ie;t[73]!==C||t[74]!==k||t[75]!==F||t[76]!==H||t[77]!==K||t[78]!==re||t[79]!==_?(ie=(0,$.jsx)(At,{children:(0,$.jsxs)(`fieldset`,{disabled:_,className:`min-w-0 overflow-hidden rounded-xl border bg-card text-card-foreground`,children:[C,k,F,H,K,re]})}),t[73]=C,t[74]=k,t[75]=F,t[76]=H,t[77]=K,t[78]=re,t[79]=_,t[80]=ie):ie=t[80];let ae=!a,oe;t[81]===s?oe=t[82]:(oe=()=>s(xo()),t[81]=s,t[82]=oe);let se;t[83]!==ae||t[84]!==oe?(se=(0,$.jsx)(I,{variant:`outline`,disabled:ae,onClick:oe,children:`Reset all`}),t[83]=ae,t[84]=oe,t[85]=se):se=t[85];let me;t[86]===r?me=t[87]:(me=(0,$.jsx)(I,{onClick:()=>r(!1),children:`Done`}),t[86]=r,t[87]=me);let ve;t[88]!==se||t[89]!==me?(ve=(0,$.jsxs)(kt,{children:[se,me]}),t[88]=se,t[89]=me,t[90]=ve):ve=t[90];let ye;t[91]!==ie||t[92]!==ve?(ye=(0,$.jsxs)(Mt,{className:`max-w-xl`,children:[g,ie,ve]}),t[91]=ie,t[92]=ve,t[93]=ye):ye=t[93];let be;return t[94]!==r||t[95]!==h||t[96]!==ye?(be=(0,$.jsx)(Nt,{open:h,onOpenChange:r,children:ye}),t[94]=r,t[95]=h,t[96]=ye,t[97]=be):be=t[97],be}function Do(){let e=(0,Z.c)(166),{appearanceMode:t,refreshTheme:n,resolvedTheme:r,setAppearanceMode:i,setTheme:a,setThemeHalf:o,theme:s,themeHalves:l}=we(),u=sn(),[d,f]=(0,Q.useState)(!1),m=Zt(),h=Xt(),g=_n(),_;e[0]===g?_=e[1]:(_=Mn(g),e[0]=g,e[1]=_);let v=_!==null,y=(m.glassOpacity-40)/60,b=`${y*100}%`,x=`${.5-y}rem`,S;e[2]!==b||e[3]!==x?(S={"--settings-slider-progress":b,"--settings-slider-fill-offset":x},e[2]=b,e[3]=x,e[4]=S):S=e[4];let C=S,w=(m.appearanceContrast-50)/150,T=`${w*100}%`,E=`${.5-w}rem`,D;e[5]!==T||e[6]!==E?(D={"--settings-slider-progress":T,"--settings-slider-fill-offset":E},e[5]=T,e[6]=E,e[7]=D):D=e[7];let O=D,k=(m.panelAnimationDurationMs-0)/400,A=`${k*100}%`,j=`${.5-k}rem`,M;e[8]!==A||e[9]!==j?(M={"--settings-slider-progress":A,"--settings-slider-fill-offset":j},e[8]=A,e[9]=j,e[10]=M):M=e[10];let N=M,P;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(P=X(`theme`),e[11]=P):P=e[11];let F;e[12]!==t||e[13]!==u||e[14]!==d||e[15]!==n||e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==o||e[20]!==s||e[21]!==l?(F=(0,$.jsx)(rn,{id:`appearance`,title:`Colors & themes`,variant:`plain`,hideTitle:!0,children:(0,$.jsx)(`div`,{id:P.id,children:(0,$.jsx)(Ka,{appearanceMode:t,customThemes:u,initialAppearance:r,refreshTheme:n,isImportOpen:d,setAppearanceMode:i,setTheme:a,setThemeHalf:o,theme:s,themeHalves:l,onImportOpenChange:f})})}),e[12]=t,e[13]=u,e[14]=d,e[15]=n,e[16]=r,e[17]=i,e[18]=a,e[19]=o,e[20]=s,e[21]=l,e[22]=F):F=e[22];let I;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(I=X(`setting-appearance-contrast`),e[23]=I):I=e[23];let L;e[24]!==m.appearanceContrast||e[25]!==h?(L=m.appearanceContrast===p.appearanceContrast?null:(0,$.jsx)(Y,{label:`contrast`,onClick:()=>h({appearanceContrast:p.appearanceContrast})}),e[24]=m.appearanceContrast,e[25]=h,e[26]=L):L=e[26];let R;e[27]===m.appearanceContrast?R=e[28]:(R=(0,$.jsxs)(`output`,{className:`min-w-12 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`appearance-contrast`,children:[m.appearanceContrast,`%`]}),e[27]=m.appearanceContrast,e[28]=R);let z;e[29]===h?z=e[30]:(z=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=50&&t<=200&&h({appearanceContrast:t})},e[29]=h,e[30]=z);let B;e[31]!==O||e[32]!==m.appearanceContrast||e[33]!==z?(B=(0,$.jsx)(`input`,{"aria-label":`Contrast`,className:`settings-slider min-w-0 flex-1`,id:`appearance-contrast`,max:200,min:50,onChange:z,step:5,style:O,type:`range`,value:m.appearanceContrast}),e[31]=O,e[32]=m.appearanceContrast,e[33]=z,e[34]=B):B=e[34];let V;e[35]!==R||e[36]!==B?(V=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3 sm:w-52`,children:[R,B]}),e[35]=R,e[36]=B,e[37]=V):V=e[37];let H;e[38]!==L||e[39]!==V?(H=(0,$.jsx)(J,{...I,description:`Adjust the contrast of colors and borders across the interface.`,resetAction:L,control:V}),e[38]=L,e[39]=V,e[40]=H):H=e[40];let U;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(U=X(`setting-glass-opacity`),e[41]=U):U=e[41];let W;e[42]!==m.glassOpacity||e[43]!==h?(W=m.glassOpacity===p.glassOpacity?null:(0,$.jsx)(Y,{label:`glass opacity`,onClick:()=>h({glassOpacity:p.glassOpacity})}),e[42]=m.glassOpacity,e[43]=h,e[44]=W):W=e[44];let ee;e[45]===m.glassOpacity?ee=e[46]:(ee=(0,$.jsxs)(`output`,{className:`min-w-12 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`glass-opacity`,children:[m.glassOpacity,`%`]}),e[45]=m.glassOpacity,e[46]=ee);let G;e[47]===h?G=e[48]:(G=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=40&&t<=100&&h({glassOpacity:t})},e[47]=h,e[48]=G);let te;e[49]!==C||e[50]!==m.glassOpacity||e[51]!==G?(te=(0,$.jsx)(`input`,{"aria-label":`Glass opacity`,className:`settings-slider min-w-0 flex-1`,id:`glass-opacity`,max:100,min:40,onChange:G,step:5,style:C,type:`range`,value:m.glassOpacity}),e[49]=C,e[50]=m.glassOpacity,e[51]=G,e[52]=te):te=e[52];let K;e[53]!==ee||e[54]!==te?(K=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3 sm:w-52`,children:[ee,te]}),e[53]=ee,e[54]=te,e[55]=K):K=e[55];let ne;e[56]!==W||e[57]!==K?(ne=(0,$.jsx)(J,{...U,description:`Higher values make menus, dialogs, and the composer more solid.`,resetAction:W,control:K}),e[56]=W,e[57]=K,e[58]=ne):ne=e[58];let re;e[59]!==m.environmentIdentificationMode||e[60]!==v||e[61]!==h?(re=v?(0,$.jsx)(J,{...X(`environment-identification`),description:`Choose how Dev and Nightly environments are identified.`,resetAction:m.environmentIdentificationMode===`artwork`?null:(0,$.jsx)(Y,{label:`environment identification`,onClick:()=>h({environmentIdentificationMode:c})}),control:(0,$.jsxs)(_e,{value:m.environmentIdentificationMode,onValueChange:e=>{(e===`artwork`||e===`pill`||e===`none`)&&h({environmentIdentificationMode:e})},children:[(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Environment identification`,children:(0,$.jsx)(pe,{children:io[m.environmentIdentificationMode]})}),(0,$.jsx)(he,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(io).map(Oo)})]})}):null,e[59]=m.environmentIdentificationMode,e[60]=v,e[61]=h,e[62]=re):re=e[62];let ie;e[63]===Symbol.for(`react.memo_cache_sentinel`)?(ie=X(`diff-color-scheme`),e[63]=ie):ie=e[63];let ae;e[64]!==m.diffColorScheme||e[65]!==h?(ae=m.diffColorScheme===p.diffColorScheme?null:(0,$.jsx)(Y,{label:`diff colors`,onClick:()=>h({diffColorScheme:p.diffColorScheme})}),e[64]=m.diffColorScheme,e[65]=h,e[66]=ae):ae=e[66];let oe;e[67]===h?oe=e[68]:(oe=e=>{(e===`red-green`||e===`blue-orange`)&&h({diffColorScheme:e})},e[67]=h,e[68]=oe);let se=m.diffColorScheme===`blue-orange`?`flex shrink-0 flex-row-reverse gap-1`:`flex shrink-0 gap-1`,ce,le;e[69]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,$.jsx)(`span`,{className:`size-2 rounded-full bg-diff-deletion`}),le=(0,$.jsx)(`span`,{className:`size-2 rounded-full bg-diff-addition`}),e[69]=ce,e[70]=le):(ce=e[69],le=e[70]);let ue;e[71]===se?ue=e[72]:(ue=(0,$.jsxs)(`span`,{"aria-hidden":`true`,className:se,children:[ce,le]}),e[71]=se,e[72]=ue);let de=m.diffColorScheme===`blue-orange`?`Blue & orange`:`Red & green`,fe;e[73]===de?fe=e[74]:(fe=(0,$.jsx)(pe,{children:de}),e[73]=de,e[74]=fe);let me;e[75]!==ue||e[76]!==fe?(me=(0,$.jsxs)(ge,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Diff colors`,children:[ue,fe]}),e[75]=ue,e[76]=fe,e[77]=me):me=e[77];let ve;e[78]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{value:`red-green`,children:`Red & green (default)`}),(0,$.jsx)(q,{value:`blue-orange`,children:`Blue & orange`})]}),e[78]=ve):ve=e[78];let ye;e[79]!==m.diffColorScheme||e[80]!==oe||e[81]!==me?(ye=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(_e,{value:m.diffColorScheme,onValueChange:oe,children:[me,ve]})}),e[79]=m.diffColorScheme,e[80]=oe,e[81]=me,e[82]=ye):ye=e[82];let be;e[83]!==ae||e[84]!==ye?(be=(0,$.jsx)(J,{...ie,description:`Choose colors for additions and deletions, including change counts.`,resetAction:ae,control:ye}),e[83]=ae,e[84]=ye,e[85]=be):be=e[85];let xe;e[86]===Symbol.for(`react.memo_cache_sentinel`)?(xe=X(`composer-context`),e[86]=xe):xe=e[86];let Se;e[87]!==m.persistComposerContextStrip||e[88]!==h?(Se=m.persistComposerContextStrip===p.persistComposerContextStrip?null:(0,$.jsx)(Y,{label:`composer context`,onClick:()=>h({persistComposerContextStrip:p.persistComposerContextStrip})}),e[87]=m.persistComposerContextStrip,e[88]=h,e[89]=Se):Se=e[89];let Ce;e[90]===h?Ce=e[91]:(Ce=e=>h({persistComposerContextStrip:!!e}),e[90]=h,e[91]=Ce);let Te;e[92]!==m.persistComposerContextStrip||e[93]!==Ce?(Te=(0,$.jsx)(bn,{checked:m.persistComposerContextStrip,onCheckedChange:Ce,"aria-label":`Keep composer context visible in active threads`}),e[92]=m.persistComposerContextStrip,e[93]=Ce,e[94]=Te):Te=e[94];let Ee;e[95]!==Se||e[96]!==Te?(Ee=(0,$.jsx)(J,{...xe,description:`Keep branch and worktree controls below the composer after a thread starts.`,resetAction:Se,control:Te}),e[95]=Se,e[96]=Te,e[97]=Ee):Ee=e[97];let De;e[98]===Symbol.for(`react.memo_cache_sentinel`)?(De=X(`chat-width`),e[98]=De):De=e[98];let Oe;e[99]!==m.chatWidth||e[100]!==h?(Oe=m.chatWidth===p.chatWidth?null:(0,$.jsx)(Y,{label:`chat width`,onClick:()=>h({chatWidth:p.chatWidth})}),e[99]=m.chatWidth,e[100]=h,e[101]=Oe):Oe=e[101];let ke;e[102]===h?ke=e[103]:(ke=e=>{(e===`comfortable`||e===`wide`||e===`full`)&&h({chatWidth:e})},e[102]=h,e[103]=ke);let Ae=uo[m.chatWidth],je;e[104]===Ae?je=e[105]:(je=(0,$.jsx)(ge,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Chat width`,children:(0,$.jsx)(pe,{children:Ae})}),e[104]=Ae,e[105]=je);let Me;e[106]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{value:`comfortable`,children:`Comfortable (default)`}),(0,$.jsx)(q,{value:`wide`,children:`Wide`}),(0,$.jsx)(q,{value:`full`,children:`Full`})]}),e[106]=Me):Me=e[106];let Ne;e[107]!==m.chatWidth||e[108]!==ke||e[109]!==je?(Ne=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(_e,{value:m.chatWidth,onValueChange:ke,children:[je,Me]})}),e[107]=m.chatWidth,e[108]=ke,e[109]=je,e[110]=Ne):Ne=e[110];let Pe;e[111]!==Oe||e[112]!==Ne?(Pe=(0,$.jsx)(J,{...De,description:`Set how wide messages and the composer can grow on large screens.`,resetAction:Oe,control:Ne}),e[111]=Oe,e[112]=Ne,e[113]=Pe):Pe=e[113];let Fe;e[114]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=X(`icon-set`),e[114]=Fe):Fe=e[114];let Ie;e[115]!==m.iconSet||e[116]!==h?(Ie=m.iconSet===p.iconSet?null:(0,$.jsx)(Y,{label:`icon set`,onClick:()=>h({iconSet:p.iconSet})}),e[115]=m.iconSet,e[116]=h,e[117]=Ie):Ie=e[117];let Le;e[118]===h?Le=e[119]:(Le=e=>{(e===`p4`||e===`lucide`)&&h({iconSet:e})},e[118]=h,e[119]=Le);let Re=fo[m.iconSet],ze;e[120]===Re?ze=e[121]:(ze=(0,$.jsx)(ge,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Icon set`,children:(0,$.jsx)(pe,{children:Re})}),e[120]=Re,e[121]=ze);let Be;e[122]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{value:`p4`,children:`P4 (default)`}),(0,$.jsx)(q,{value:`lucide`,children:`Lucide`})]}),e[122]=Be):Be=e[122];let Ve;e[123]!==m.iconSet||e[124]!==Le||e[125]!==ze?(Ve=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(_e,{value:m.iconSet,onValueChange:Le,children:[ze,Be]})}),e[123]=m.iconSet,e[124]=Le,e[125]=ze,e[126]=Ve):Ve=e[126];let He;e[127]!==Ie||e[128]!==Ve?(He=(0,$.jsx)(J,{...Fe,description:`Choose which icon drawings the app uses. An icon missing from one set shows the other set's drawing.`,resetAction:Ie,control:Ve}),e[127]=Ie,e[128]=Ve,e[129]=He):He=e[129];let Ue;e[130]!==H||e[131]!==ne||e[132]!==re||e[133]!==be||e[134]!==Ee||e[135]!==Pe||e[136]!==He?(Ue=(0,$.jsxs)(rn,{id:`appearance-interface`,title:`Interface`,children:[H,ne,re,be,Ee,Pe,He]}),e[130]=H,e[131]=ne,e[132]=re,e[133]=be,e[134]=Ee,e[135]=Pe,e[136]=He,e[137]=Ue):Ue=e[137];let We;e[138]===Symbol.for(`react.memo_cache_sentinel`)?(We=X(`panel-animations`),e[138]=We):We=e[138];let Ge;e[139]===m.panelAnimationDurationMs?Ge=e[140]:(Ge=(0,$.jsx)(to,{durationMs:m.panelAnimationDurationMs}),e[139]=m.panelAnimationDurationMs,e[140]=Ge);let Ke;e[141]===m.panelAnimationDurationMs?Ke=e[142]:(Ke=(0,$.jsxs)(`output`,{className:`min-w-16 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`panel-animation-duration`,children:[m.panelAnimationDurationMs,` ms`]}),e[141]=m.panelAnimationDurationMs,e[142]=Ke);let qe;e[143]===h?qe=e[144]:(qe=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=0&&t<=400&&h({panelAnimationDurationMs:t})},e[143]=h,e[144]=qe);let Je;e[145]!==N||e[146]!==m.panelAnimationDurationMs||e[147]!==qe?(Je=(0,$.jsx)(`input`,{"aria-label":`Panel animation duration`,className:`settings-slider min-w-0 flex-1`,id:`panel-animation-duration`,max:400,min:0,onChange:qe,step:25,style:N,type:`range`,value:m.panelAnimationDurationMs}),e[145]=N,e[146]=m.panelAnimationDurationMs,e[147]=qe,e[148]=Je):Je=e[148];let Ye;e[149]!==Ke||e[150]!==Je?(Ye=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3`,children:[Ke,Je]}),e[149]=Ke,e[150]=Je,e[151]=Ye):Ye=e[151];let Xe;e[152]!==Ge||e[153]!==Ye?(Xe=(0,$.jsxs)(`div`,{className:`grid w-full grid-cols-[5rem_minmax(0,1fr)] items-center gap-3 sm:w-auto sm:grid-cols-[7rem_13rem] sm:gap-4`,children:[Ge,Ye]}),e[152]=Ge,e[153]=Ye,e[154]=Xe):Xe=e[154];let Ze;e[155]!==m.panelAnimationDurationMs||e[156]!==h?(Ze=m.panelAnimationDurationMs===p.panelAnimationDurationMs?null:(0,$.jsx)(Y,{label:`panel animations`,onClick:()=>h({panelAnimationDurationMs:p.panelAnimationDurationMs})}),e[155]=m.panelAnimationDurationMs,e[156]=h,e[157]=Ze):Ze=e[157];let Qe;e[158]!==Xe||e[159]!==Ze?(Qe=(0,$.jsx)(rn,{id:`motion`,title:`Motion`,children:(0,$.jsx)(J,{...We,description:`Set how fast panels open and close.`,control:Xe,resetAction:Ze})}),e[158]=Xe,e[159]=Ze,e[160]=Qe):Qe=e[160];let $e;e[161]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,$.jsx)(zo,{}),e[161]=$e):$e=e[161];let et;return e[162]!==F||e[163]!==Ue||e[164]!==Qe?(et=(0,$.jsxs)(tn,{children:[F,Ue,Qe,$e]}),e[162]=F,e[163]=Ue,e[164]=Qe,e[165]=et):et=e[165],et}function Oo(e){let[t,n]=e;return(0,$.jsx)(q,{hideIndicator:!0,value:t,children:n},t)}function ko(){let e=(0,Z.c)(5),t=Zt(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={sans:pn(`-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif`)??`System default`,code:pn(`"SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace`)??`System monospace`},e[0]=n):n=e[0];let r=n,i;e[1]===t.fontFamilySans?i=e[2]:(i=t.fontFamilySans.trim()||r.sans,e[1]=t.fontFamilySans,e[2]=i);let a;return e[3]===i?a=e[4]:(a={sans:r.sans,code:r.code,interfaceFamily:i},e[3]=i,e[4]=a),a}function Ao(e){let t=(0,Z.c)(18),{preview:n}=e,r=Zt(),i=Xt(),a=ko(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=X(`interface-font`),t[0]=o):o=t[0];let s,c;t[1]===i?(s=t[2],c=t[3]):(s=e=>i({fontFamilySans:e}),c=()=>i({fontFamilySans:p.fontFamilySans,fontSizeInterface:p.fontSizeInterface}),t[1]=i,t[2]=s,t[3]=c);let l;t[4]===i?l=t[5]:(l=e=>i({fontSizeInterface:e}),t[4]=i,t[5]=l);let u;t[6]!==r.fontSizeInterface||t[7]!==l?(u={label:`Interface font size`,min:12,max:20,value:r.fontSizeInterface,defaultValue:p.fontSizeInterface,onChange:l},t[6]=r.fontSizeInterface,t[7]=l,t[8]=u):u=t[8];let d;t[9]===n?d=t[10]:(d=n===void 0?{}:{preview:n},t[9]=n,t[10]=d);let f;return t[11]!==a.sans||t[12]!==r.fontFamilySans||t[13]!==s||t[14]!==c||t[15]!==u||t[16]!==d?(f=(0,$.jsx)(Bo,{...o,description:`Everything outside code blocks and the terminal.`,defaultFamily:a.sans,defaultValue:p.fontFamilySans,value:r.fontFamilySans,onValueChange:s,onReset:c,size:u,...d}),t[11]=a.sans,t[12]=r.fontFamilySans,t[13]=s,t[14]=c,t[15]=u,t[16]=d,t[17]=f):f=t[17],f}function jo(){let e=(0,Z.c)(16),t=Zt(),n=Xt(),r=ko(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=X(`prompt-font`),e[0]=i):i=e[0];let a,o;e[1]===n?(a=e[2],o=e[3]):(a=e=>n({fontFamilyComposer:e}),o=()=>n({fontFamilyComposer:p.fontFamilyComposer,fontSizePrompt:p.fontSizePrompt}),e[1]=n,e[2]=a,e[3]=o);let s;e[4]===n?s=e[5]:(s=e=>n({fontSizePrompt:e}),e[4]=n,e[5]=s);let c;e[6]!==t.fontSizePrompt||e[7]!==s?(c={label:`Prompt font size`,min:12,max:20,value:t.fontSizePrompt,defaultValue:p.fontSizePrompt,onChange:s},e[6]=t.fontSizePrompt,e[7]=s,e[8]=c):c=e[8];let l;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(kr,{}),e[9]=l):l=e[9];let u;return e[10]!==r.interfaceFamily||e[11]!==t.fontFamilyComposer||e[12]!==a||e[13]!==o||e[14]!==c?(u=(0,$.jsx)(Bo,{...i,description:`Only the box you write prompts in. Mono works well here.`,defaultFamily:r.interfaceFamily,defaultValue:p.fontFamilyComposer,value:t.fontFamilyComposer,onValueChange:a,onReset:o,size:c,preview:l}),e[10]=r.interfaceFamily,e[11]=t.fontFamilyComposer,e[12]=a,e[13]=o,e[14]=c,e[15]=u):u=e[15],u}function Mo(e){let t=(0,Z.c)(22),{title:n,description:r,preview:i}=e,a=r===void 0?`Code blocks, diffs, and file previews.`:r,o=Zt(),s=Xt(),c=ko(),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=X(`code-font`),t[0]=l):l=t[0];let u;t[1]===n?u=t[2]:(u=n===void 0?{}:{title:n},t[1]=n,t[2]=u);let d,f;t[3]===s?(d=t[4],f=t[5]):(d=e=>s({fontFamilyCode:e}),f=()=>s({fontFamilyCode:p.fontFamilyCode,fontSizeCode:p.fontSizeCode}),t[3]=s,t[4]=d,t[5]=f);let m;t[6]===s?m=t[7]:(m=e=>s({fontSizeCode:e}),t[6]=s,t[7]=m);let h;t[8]!==o.fontSizeCode||t[9]!==m?(h={label:`Code font size`,min:10,max:18,value:o.fontSizeCode,defaultValue:p.fontSizeCode,onChange:m},t[8]=o.fontSizeCode,t[9]=m,t[10]=h):h=t[10];let g;t[11]===i?g=t[12]:(g=i??(0,$.jsx)(Fr,{}),t[11]=i,t[12]=g);let _;return t[13]!==c.code||t[14]!==a||t[15]!==o.fontFamilyCode||t[16]!==u||t[17]!==d||t[18]!==f||t[19]!==h||t[20]!==g?(_=(0,$.jsx)(Bo,{...l,...u,description:a,defaultFamily:c.code,defaultValue:p.fontFamilyCode,value:o.fontFamilyCode,onValueChange:d,onReset:f,requireMonospace:!0,size:h,preview:g}),t[13]=c.code,t[14]=a,t[15]=o.fontFamilyCode,t[16]=u,t[17]=d,t[18]=f,t[19]=h,t[20]=g,t[21]=_):_=t[21],_}function No(){let e=(0,Z.c)(22),t=Zt(),n=Xt(),r=ko(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=X(`terminal-font`),e[0]=i):i=e[0];let a=r.code,o=t.fontFamilyTerminal,s,c;e[1]===n?(s=e[2],c=e[3]):(s=e=>n({fontFamilyTerminal:e}),c=()=>n({fontFamilyTerminal:p.fontFamilyTerminal,fontSizeTerminal:p.fontSizeTerminal}),e[1]=n,e[2]=s,e[3]=c);let l;e[4]===n?l=e[5]:(l=e=>n({fontSizeTerminal:e}),e[4]=n,e[5]=l);let u;e[6]!==t.fontSizeTerminal||e[7]!==l?(u={label:`Terminal font size`,min:8,max:20,value:t.fontSizeTerminal,defaultValue:p.fontSizeTerminal,onChange:l},e[6]=t.fontSizeTerminal,e[7]=l,e[8]=u):u=e[8];let d;e[9]!==t.fontFamilyCode||e[10]!==t.fontFamilyTerminal?(d=dn({advanced:!0,code:t.fontFamilyCode,terminal:t.fontFamilyTerminal}),e[9]=t.fontFamilyCode,e[10]=t.fontFamilyTerminal,e[11]=d):d=e[11];let f;e[12]!==t.fontSizeTerminal||e[13]!==d?(f=(0,$.jsx)(Br,{family:d,size:t.fontSizeTerminal}),e[12]=t.fontSizeTerminal,e[13]=d,e[14]=f):f=e[14];let m;return e[15]!==r.code||e[16]!==t.fontFamilyTerminal||e[17]!==s||e[18]!==c||e[19]!==u||e[20]!==f?(m=(0,$.jsx)(Bo,{...i,description:`Terminal output, independent from code blocks and diffs.`,defaultFamily:a,defaultValue:p.fontFamilyTerminal,value:o,onValueChange:s,onReset:c,requireMonospace:!0,size:u,preview:f}),e[15]=r.code,e[16]=t.fontFamilyTerminal,e[17]=s,e[18]=c,e[19]=u,e[20]=f,e[21]=m):m=e[21],m}function Po(){let e=(0,Z.c)(12),t=Zt(),n=Xt();if(!V(navigator.platform))return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=X(`font-smoothing`),e[0]=r):r=e[0];let i;e[1]!==t.fontSmoothing||e[2]!==n?(i=t.fontSmoothing===p.fontSmoothing?null:(0,$.jsx)(Y,{label:`font smoothing`,onClick:()=>n({fontSmoothing:p.fontSmoothing})}),e[1]=t.fontSmoothing,e[2]=n,e[3]=i):i=e[3];let a;e[4]===n?a=e[5]:(a=e=>n({fontSmoothing:!!e}),e[4]=n,e[5]=a);let o;e[6]!==t.fontSmoothing||e[7]!==a?(o=(0,$.jsx)(bn,{checked:t.fontSmoothing,onCheckedChange:a,"aria-label":`Font smoothing`}),e[6]=t.fontSmoothing,e[7]=a,e[8]=o):o=e[8];let s;return e[9]!==i||e[10]!==o?(s=(0,$.jsx)(J,{...r,description:`Use thinner grayscale text smoothing instead of the macOS default.`,resetAction:i,control:o}),e[9]=i,e[10]=o,e[11]=s):s=e[11],s}function Fo(){let e=(0,Z.c)(12),t=Zt(),n=Xt(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=X(`word-wrap`),e[0]=r):r=e[0];let i;e[1]!==t.wordWrap||e[2]!==n?(i=t.wordWrap===p.wordWrap?null:(0,$.jsx)(Y,{label:`word wrapping`,onClick:()=>n({wordWrap:p.wordWrap})}),e[1]=t.wordWrap,e[2]=n,e[3]=i):i=e[3];let a;e[4]===n?a=e[5]:(a=e=>n({wordWrap:!!e}),e[4]=n,e[5]=a);let o;e[6]!==t.wordWrap||e[7]!==a?(o=(0,$.jsx)(bn,{checked:t.wordWrap,onCheckedChange:a,"aria-label":`Wrap code, tables, diffs, and file previews by default`}),e[6]=t.wordWrap,e[7]=a,e[8]=o):o=e[8];let s;return e[9]!==i||e[10]!==o?(s=(0,$.jsx)(J,{...r,description:`Wrap long lines in code blocks, tables, diffs, and file previews by default.`,resetAction:i,control:o}),e[9]=i,e[10]=o,e[11]=s):s=e[11],s}function Io(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Ao,{}),(0,$.jsx)(jo,{}),(0,$.jsx)(Mo,{}),(0,$.jsx)(No,{}),(0,$.jsx)(Po,{})]}),e[0]=t):t=e[0],t}function Lo(){let e=(0,Z.c)(11),t=Zt(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(Ao,{preview:(0,$.jsx)(kr,{})}),e[0]=n):n=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(Fr,{}),e[1]=r):r=e[1];let i;e[2]!==t.fontFamilyCode||e[3]!==t.fontFamilyTerminal?(i=dn({advanced:!1,code:t.fontFamilyCode,terminal:t.fontFamilyTerminal}),e[2]=t.fontFamilyCode,e[3]=t.fontFamilyTerminal,e[4]=i):i=e[4];let a;e[5]!==t.fontSizeCode||e[6]!==t.fontSizeTerminal?(a=Cn({advanced:!1,code:t.fontSizeCode,terminal:t.fontSizeTerminal}),e[5]=t.fontSizeCode,e[6]=t.fontSizeTerminal,e[7]=a):a=e[7];let o;return e[8]!==i||e[9]!==a?(o=(0,$.jsxs)($.Fragment,{children:[n,(0,$.jsx)(Mo,{title:`Monospace font`,description:`Code blocks, diffs, file previews, and the terminal.`,preview:(0,$.jsxs)($.Fragment,{children:[r,(0,$.jsx)(Br,{family:i,size:a})]})})]}),e[8]=i,e[9]=a,e[10]=o):o=e[10],o}var Ro=new Set([`prompt-font`,`terminal-font`,...typeof navigator<`u`&&V(navigator.platform)?[`font-smoothing`]:[]]);function zo(){let e=(0,Z.c)(15),[t,n]=H(Jn,!1,B),r=en(),i=(0,Q.useRef)(null),a,o;e[0]!==r||e[1]!==n?(a=()=>{r!==null&&Ro.has(r)&&i.current!==r&&(i.current=r,n(!0))},o=[r,n],e[0]=r,e[1]=n,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,Q.useEffect)(a,o);let s;e[4]===n?s=e[5]:(s=e=>n(!!e),e[4]=n,e[5]=s);let c;e[6]!==t||e[7]!==s?(c=(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 text-xs font-medium text-muted-foreground`,children:[`Advanced`,(0,$.jsx)(bn,{checked:t,onCheckedChange:s,"aria-label":`Show advanced typography settings`})]}),e[6]=t,e[7]=s,e[8]=c):c=e[8];let l;e[9]===t?l=e[10]:(l=t?(0,$.jsx)(Io,{}):(0,$.jsx)(Lo,{}),e[9]=t,e[10]=l);let u;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(Fo,{}),e[11]=u):u=e[11];let d;return e[12]!==c||e[13]!==l?(d=(0,$.jsxs)(rn,{id:`typography`,title:`Typography`,headerAction:c,children:[l,u]}),e[12]=c,e[13]=l,e[14]=d):d=e[14],d}function Bo({id:e,title:t,description:n,defaultFamily:r,defaultValue:i,preview:a,value:o,onValueChange:s,onReset:c,requireMonospace:l=!1,size:u}){let d=o.trim(),[f,p]=(0,Q.useState)(o),[m,h]=(0,Q.useState)(!0),g=(0,Q.useRef)(null),_=(0,Q.useRef)(o);_.current!==o&&(_.current=o,g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(o),h(!0)),(0,Q.useEffect)(()=>()=>{g.current!==null&&window.clearTimeout(g.current)},[]);let v=e=>un(e)&&(!l||Gn(e)),y=e=>{h(!0),(e.trim().length===0||v(e))&&s(e)},b=()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null,y(f))},x=f.trim(),S=m&&x.length>0&&x!==d,C=o!==i||u.value!==u.defaultValue?(0,$.jsx)(Y,{label:t.toLowerCase(),onClick:()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(i),h(!0),c()}}):null,w=$r(),T=(0,Q.useRef)(!1),E=w.status===`granted`?(0,$.jsx)(ei,{ariaLabel:`${t} family`,defaultFamily:r,selectedFamily:d,requireMonospace:l,initialOpen:T.current,onSelect:s}):(0,$.jsx)(Et,{size:`sm`,"aria-label":`${t} family`,"aria-invalid":S||void 0,autoCapitalize:`off`,autoComplete:`off`,className:`min-w-0 flex-1`,maxLength:200,onFocus:()=>{T.current=!0,Xr()},onBlur:()=>{T.current=!1,b()},onChange:e=>{let t=e.currentTarget.value;p(t),h(!1),g.current!==null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,y(t)},400)},onKeyDown:e=>{e.key===`Enter`&&b(),e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(o),h(!0))},placeholder:r,spellCheck:!1,value:f}),D=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-2 sm:w-auto`,children:[(0,$.jsx)(`div`,{className:`min-w-0 flex-1 sm:w-44 sm:flex-none`,children:E}),(0,$.jsxs)(_e,{value:String(u.value),onValueChange:e=>{if(typeof e!=`string`)return;let t=Number(e);Number.isInteger(t)&&t>=u.min&&t<=u.max&&u.onChange(t)},children:[(0,$.jsx)(ge,{size:`sm`,className:`w-22 shrink-0`,"aria-label":u.label,children:(0,$.jsxs)(pe,{children:[u.value,` px`]})}),(0,$.jsx)(he,{align:`end`,alignItemWithTrigger:!1,children:Array.from({length:u.max-u.min+1},(e,t)=>u.min+t).map(e=>(0,$.jsxs)(q,{hideIndicator:!0,value:String(e),children:[e,` px`]},e))})]})]});return(0,$.jsx)(J,{...e===void 0?{}:{id:e},title:t,description:n,resetAction:C,control:D,children:a})}var Vo=p.sidebarAutoSettleAfterDays??3;function Ho(e){let t=(0,Z.c)(11),{value:n,onCommit:r}=e,[i,a]=(0,Q.useState)(String(n)),o,s;t[0]===n?(o=t[1],s=t[2]):(o=()=>{a(String(n))},s=[n],t[0]=n,t[1]=o,t[2]=s),(0,Q.useEffect)(o,s);let c;t[3]===r?c=t[4]:(c=e=>{a(e.target.value);let t=Number(e.target.value);Number.isInteger(t)&&t>=1&&t<=90&&r(t)},t[3]=r,t[4]=c);let l;t[5]===n?l=t[6]:(l=()=>a(String(n)),t[5]=n,t[6]=l);let u;return t[7]!==i||t[8]!==c||t[9]!==l?(u=(0,$.jsx)(Et,{size:`sm`,type:`number`,min:1,max:90,className:`w-full sm:w-24`,value:i,onChange:c,onBlur:l,"aria-label":`Days of inactivity before auto-settle`}),t[7]=i,t[8]=c,t[9]=l,t[10]=u):u=t[10],u}var Uo=new Set([`legacy-plan-mode`,`legacy-context-window-indicator`]);function Wo(){let e=(0,Z.c)(25),t=Zt(),n=Xt(),[r,i]=(0,Q.useState)(!1),a=en(),o=$t(`legacy-features`),s=(0,Q.useRef)(null),c,l;e[0]===a?(c=e[1],l=e[2]):(c=()=>{if(a===null){s.current=null;return}Uo.has(a)&&s.current!==a&&(s.current=a,i(!0))},l=[a],e[0]=a,e[1]=c,e[2]=l),(0,Q.useEffect)(c,l);let u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsxs)(vn,{className:`group flex min-h-8 w-full items-center gap-2 px-3 sm:px-4`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-normal text-foreground/70 transition-colors group-hover:text-foreground`,children:`Legacy features`}),(0,$.jsx)(R,{className:`size-4 text-muted-foreground transition-transform duration-200 group-data-panel-open:rotate-90`})]}),e[3]=u):u=e[3];let d;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=X(`legacy-plan-mode`),e[4]=d):d=e[4];let f;e[5]===n?f=e[6]:(f=e=>{n({planModeEnabled:!!e})},e[5]=n,e[6]=f);let p;e[7]!==t.planModeEnabled||e[8]!==f?(p=(0,$.jsx)(J,{...d,description:`Restore Build/Plan, /plan, /default, and Shift+Tab. Off uses build mode.`,control:(0,$.jsx)(bn,{checked:t.planModeEnabled,onCheckedChange:f,"aria-label":`Plan mode (legacy)`})}),e[7]=t.planModeEnabled,e[8]=f,e[9]=p):p=e[9];let m;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=X(`legacy-context-window-indicator`),e[10]=m):m=e[10];let h;e[11]===n?h=e[12]:(h=e=>n({contextWindowMeterEnabled:!!e}),e[11]=n,e[12]=h);let g;e[13]!==t.contextWindowMeterEnabled||e[14]!==h?(g=(0,$.jsx)(J,{...m,description:`Shows context window usage as a circular indicator in the composer.`,control:(0,$.jsx)(bn,{checked:t.contextWindowMeterEnabled,onCheckedChange:h,"aria-label":`Context window indicator (legacy)`})}),e[13]=t.contextWindowMeterEnabled,e[14]=h,e[15]=g):g=e[15];let _;e[16]!==p||e[17]!==g?(_=(0,$.jsx)(hn,{children:(0,$.jsxs)(Qt,{children:[p,g]})}),e[16]=p,e[17]=g,e[18]=_):_=e[18];let v;e[19]!==r||e[20]!==_?(v=(0,$.jsxs)(Tn,{open:r,onOpenChange:i,children:[u,_]}),e[19]=r,e[20]=_,e[21]=v):v=e[21];let y;return e[22]!==v||e[23]!==o?(y=(0,$.jsx)(`section`,{id:`legacy-features`,ref:o,tabIndex:-1,className:`space-y-2.5`,children:v}),e[22]=v,e[23]=o,e[24]=y):y=e[24],y}function Go(){let e=(0,Z.c)(452),t=V(navigator.platform)?`⌘`:`Ctrl`,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[{value:`enter`,label:`Enter`},{value:`mod-enter-multiline`,label:`${t} + Enter for multiline prompts`},{value:`mod-enter`,label:`${t} + Enter always`}],e[0]=n):n=e[0];let r=n,i=Zt(),a=Xt(),c=be(),{scope:l,environment:d,connectedEnvironments:h,target:y}=qt(),b=d?.environmentId??null,x=l.environmentIds.length===1&&b!==null,C=h.length>0,[w,T]=(0,Q.useState)(!1),E;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(E=[`responseStreamingMode`],e[1]=E):E=e[1];let D=Jt(E),O;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(O=ar(),e[2]=O):O=e[2];let k=(0,Q.useRef)(O),j=d?.serverConfig?.providers??Ae,M;e[3]===h?M=e[4]:(M=h.length>0&&h.every(ts),e[3]=h,e[4]=M);let P=M,F;e[5]===h?F=e[6]:(F=h.every(es),e[5]=h,e[6]=F);let L=F,R;e[7]===h?R=e[8]:(R=h.length>0&&h.every($o),e[7]=h,e[8]=R);let z=R,B=j.filter(Qo),H=s(i,B),W=H.instanceId,ee=H.model,G=H.options,K=m(S(u(B),i,y?.projectId??null)),ne=K.some(Zo),re=K.find(e=>e.instanceId===W),oe=re?.driverKind??yo,ce=g(i,B,W,ee),le;e[9]===i.textGenerationModelSelection?le=e[10]:(le=A(i.textGenerationModelSelection??null,p.textGenerationModelSelection??null),e[9]=i.textGenerationModelSelection,e[10]=le);let ue=!le,de=$n(i,K),fe=ke(i),me=fe.profile,ve;e[11]===i?ve=e[12]:(ve=dr(i),e[11]=i,e[12]=ve);let Se=ve,Ce;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=[`backgroundActivity`],e[13]=Ce):Ce=e[13];let we=Jt(Ce),Te;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(Te=[`addProjectBaseDirectory`],e[14]=Te):Te=e[14];let Ee=Jt(Te),De;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(De=[`textGenerationModelSelection`],e[15]=De):De=e[15];let Oe=Jt(De),je=Se===`advanced`?`${vo} Shared policy: ${ho[me]}.`:_o[fe.profile],Me;e[16]===i.backgroundActivity?Me=e[17]:(Me=A(i.backgroundActivity,p.backgroundActivity),e[16]=i.backgroundActivity,e[17]=Me);let Ne=!Me,Pe=tn,Fe;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,$.jsx)(er,{category:`general`}),e[18]=Fe):Fe=e[18];let Ie;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=X(`project-grouping`),e[19]=Ie):Ie=e[19];let Le;e[20]!==i.sidebarProjectGroupingMode||e[21]!==a?(Le=i.sidebarProjectGroupingMode===p.sidebarProjectGroupingMode?null:(0,$.jsx)(Y,{label:`project grouping`,onClick:()=>a({sidebarProjectGroupingMode:p.sidebarProjectGroupingMode})}),e[20]=i.sidebarProjectGroupingMode,e[21]=a,e[22]=Le):Le=e[22];let Re;e[23]===i.sidebarProjectGroupingMode?Re=e[24]:(Re=ir(i.sidebarProjectGroupingMode),e[23]=i.sidebarProjectGroupingMode,e[24]=Re);let ze;e[25]!==i.sidebarProjectGroupingMode||e[26]!==a?(ze=e=>{!e&&i.sidebarProjectGroupingMode!==`separate`&&(k.current=i.sidebarProjectGroupingMode,or(i.sidebarProjectGroupingMode)),a({sidebarProjectGroupingMode:mr(e,k.current)})},e[25]=i.sidebarProjectGroupingMode,e[26]=a,e[27]=ze):ze=e[27];let Be;e[28]!==Re||e[29]!==ze?(Be=(0,$.jsx)(bn,{checked:Re,onCheckedChange:ze,"aria-label":`Project grouping`}),e[28]=Re,e[29]=ze,e[30]=Be):Be=e[30];let Ve;e[31]!==Le||e[32]!==Be?(Ve=(0,$.jsx)(J,{...Ie,description:`Combine matching repositories across environments.`,resetAction:Le,control:Be}),e[31]=Le,e[32]=Be,e[33]=Ve):Ve=e[33];let He;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(He=X(`project-order`),e[34]=He):He=e[34];let Ue;e[35]!==i.sidebarProjectSortOrder||e[36]!==a?(Ue=i.sidebarProjectSortOrder===p.sidebarProjectSortOrder?null:(0,$.jsx)(Y,{label:`project order`,onClick:()=>a({sidebarProjectSortOrder:p.sidebarProjectSortOrder})}),e[35]=i.sidebarProjectSortOrder,e[36]=a,e[37]=Ue):Ue=e[37];let We;e[38]===a?We=e[39]:(We=e=>{co(e)&&a({sidebarProjectSortOrder:e})},e[38]=a,e[39]=We);let Ge=so[i.sidebarProjectSortOrder],Ke;e[40]===Ge?Ke=e[41]:(Ke=(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-44`,"aria-label":`Project order`,children:(0,$.jsx)(pe,{children:Ge})}),e[40]=Ge,e[41]=Ke);let qe;e[42]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,$.jsx)(he,{align:`end`,alignItemWithTrigger:!1,children:_.literals.map(Xo)}),e[42]=qe):qe=e[42];let Je;e[43]!==i.sidebarProjectSortOrder||e[44]!==We||e[45]!==Ke?(Je=(0,$.jsxs)(_e,{value:i.sidebarProjectSortOrder,onValueChange:We,children:[Ke,qe]}),e[43]=i.sidebarProjectSortOrder,e[44]=We,e[45]=Ke,e[46]=Je):Je=e[46];let Ye;e[47]!==Ue||e[48]!==Je?(Ye=(0,$.jsx)(J,{...He,description:`Order of projects in the sidebar project picker and command palette.`,resetAction:Ue,control:Je}),e[47]=Ue,e[48]=Je,e[49]=Ye):Ye=e[49];let Xe;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=X(`auto-resume-limited-threads`),e[50]=Xe):Xe=e[50];let Ze;e[51]===Symbol.for(`react.memo_cache_sentinel`)?(Ze=[`autoResumeLimitedThreads`],e[51]=Ze):Ze=e[51];let Qe;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=[`autoResumeLimitedThreads`],e[52]=Qe):Qe=e[52];let $e;e[53]===a?$e=e[54]:($e=e=>a({autoResumeLimitedThreads:!!e}),e[53]=a,e[54]=$e);let et;e[55]!==i.autoResumeLimitedThreads||e[56]!==$e?(et=(0,$.jsx)(J,{serverScoped:!0,...Xe,description:`Resume usage-limit stops at the reported reset time. Each thread can cancel its scheduled continuation.`,settingKeys:Ze,control:(0,$.jsx)(nr,{settingKeys:Qe,checked:i.autoResumeLimitedThreads,onCheckedChange:$e,"aria-label":`Auto-resume limited threads`})}),e[55]=i.autoResumeLimitedThreads,e[56]=$e,e[57]=et):et=e[57];let tt;e[58]===Symbol.for(`react.memo_cache_sentinel`)?(tt=X(`snooze-limited-threads`),e[58]=tt):tt=e[58];let nt;e[59]===Symbol.for(`react.memo_cache_sentinel`)?(nt=[`snoozeLimitedThreads`],e[59]=nt):nt=e[59];let rt;e[60]===Symbol.for(`react.memo_cache_sentinel`)?(rt=[`snoozeLimitedThreads`],e[60]=rt):rt=e[60];let it;e[61]===a?it=e[62]:(it=e=>a({snoozeLimitedThreads:!!e}),e[61]=a,e[62]=it);let at;e[63]!==i.snoozeLimitedThreads||e[64]!==it?(at=(0,$.jsx)(J,{serverScoped:!0,...tt,description:`Snooze usage-limit stops until the reported reset time. Combine with auto-resume to continue when they wake.`,settingKeys:nt,control:(0,$.jsx)(nr,{settingKeys:rt,checked:i.snoozeLimitedThreads,onCheckedChange:it,"aria-label":`Snooze limited threads`})}),e[63]=i.snoozeLimitedThreads,e[64]=it,e[65]=at):at=e[65];let ot;e[66]===Symbol.for(`react.memo_cache_sentinel`)?(ot=X(`working-shelf`),e[66]=ot):ot=e[66];let st;e[67]!==i.sidebarWorkingShelfEnabled||e[68]!==a?(st=i.sidebarWorkingShelfEnabled===p.sidebarWorkingShelfEnabled?null:(0,$.jsx)(Y,{label:`working section`,onClick:()=>a({sidebarWorkingShelfEnabled:p.sidebarWorkingShelfEnabled})}),e[67]=i.sidebarWorkingShelfEnabled,e[68]=a,e[69]=st):st=e[69];let ct;e[70]===a?ct=e[71]:(ct=e=>a({sidebarWorkingShelfEnabled:!!e}),e[70]=a,e[71]=ct);let lt;e[72]!==i.sidebarWorkingShelfEnabled||e[73]!==ct?(lt=(0,$.jsx)(bn,{checked:i.sidebarWorkingShelfEnabled,onCheckedChange:ct,"aria-label":`Working section (beta)`}),e[72]=i.sidebarWorkingShelfEnabled,e[73]=ct,e[74]=lt):lt=e[74];let ut;e[75]!==st||e[76]!==lt?(ut=(0,$.jsx)(J,{...ot,description:`Fold working and monitoring threads into a Working section. They return to the top of the inbox when they need you.`,resetAction:st,control:lt}),e[75]=st,e[76]=lt,e[77]=ut):ut=e[77];let dt;e[78]!==i.sidebarAutoSettleAfterDays||e[79]!==i.sidebarAutoSettleKeepPullRequests||e[80]!==i.sidebarAutoSettleOnMerge||e[81]!==P||e[82]!==L||e[83]!==a?(dt=P?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleOnMerge`],...X(`auto-settle-merged-threads`),description:`Settle a thread when its pull request merges. Closed pull requests still settle automatically.`,resetAction:i.sidebarAutoSettleOnMerge===p.sidebarAutoSettleOnMerge?null:(0,$.jsx)(Y,{label:`auto-settle on merge`,onClick:()=>a({sidebarAutoSettleOnMerge:p.sidebarAutoSettleOnMerge})}),control:(0,$.jsx)(nr,{settingKeys:[`sidebarAutoSettleOnMerge`],checked:i.sidebarAutoSettleOnMerge,onCheckedChange:e=>a({sidebarAutoSettleOnMerge:!!e}),"aria-label":`Auto-settle merged threads`})}),(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleAfterDays`],...X(`auto-settle-inactive-threads`),description:`Sidebar threads with no activity for this long settle automatically.`,resetAction:i.sidebarAutoSettleAfterDays===p.sidebarAutoSettleAfterDays?null:(0,$.jsx)(Y,{label:`auto-settle`,onClick:()=>a({sidebarAutoSettleAfterDays:p.sidebarAutoSettleAfterDays})}),control:(0,$.jsx)(nr,{settingKeys:[`sidebarAutoSettleAfterDays`],checked:i.sidebarAutoSettleAfterDays!==null,onCheckedChange:e=>a({sidebarAutoSettleAfterDays:e?Vo:null}),"aria-label":`Auto-settle inactive threads`})}),i.sidebarAutoSettleAfterDays===null?null:(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleAfterDays`],title:X(`days-before-auto-settle`).title,description:`Any new activity un-settles a thread automatically.`,control:(0,$.jsx)(Ho,{value:i.sidebarAutoSettleAfterDays,onCommit:e=>a({sidebarAutoSettleAfterDays:e})})}),i.sidebarAutoSettleAfterDays!==null&&L?(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleKeepPullRequests`],title:`Keep threads with a PR`,description:`Inactivity does not settle threads with a pull request. Merge and close still do.`,control:(0,$.jsx)(nr,{settingKeys:[`sidebarAutoSettleKeepPullRequests`],checked:i.sidebarAutoSettleKeepPullRequests,onCheckedChange:e=>a({sidebarAutoSettleKeepPullRequests:e}),"aria-label":`Keep threads with a PR`})}):null]}):null,e[78]=i.sidebarAutoSettleAfterDays,e[79]=i.sidebarAutoSettleKeepPullRequests,e[80]=i.sidebarAutoSettleOnMerge,e[81]=P,e[82]=L,e[83]=a,e[84]=dt):dt=e[84];let ft;e[85]!==Ve||e[86]!==Ye||e[87]!==et||e[88]!==at||e[89]!==ut||e[90]!==dt?(ft=(0,$.jsxs)(rn,{id:`organization`,title:`Organization`,children:[Ve,Ye,et,at,ut,dt]}),e[85]=Ve,e[86]=Ye,e[87]=et,e[88]=at,e[89]=ut,e[90]=dt,e[91]=ft):ft=e[91];let pt;e[92]===Symbol.for(`react.memo_cache_sentinel`)?(pt=(0,$.jsx)(_r,{}),e[92]=pt):pt=e[92];let mt;e[93]===Symbol.for(`react.memo_cache_sentinel`)?(mt=X(`in-app-notifications`),e[93]=mt):mt=e[93];let ht;e[94]===a?ht=e[95]:(ht=e=>a({inAppNotificationsEnabled:e}),e[94]=a,e[95]=ht);let gt;e[96]!==i.inAppNotificationsEnabled||e[97]!==ht?(gt=(0,$.jsx)(J,{...mt,description:`Show a toast when another thread finishes, fails, or needs input or approval while this app has focus.`,control:(0,$.jsx)(bn,{checked:i.inAppNotificationsEnabled,onCheckedChange:ht,"aria-label":`In-app notifications`})}),e[96]=i.inAppNotificationsEnabled,e[97]=ht,e[98]=gt):gt=e[98];let _t;e[99]===Symbol.for(`react.memo_cache_sentinel`)?(_t=X(`time-format`),e[99]=_t):_t=e[99];let yt;e[100]!==i.timestampFormat||e[101]!==a?(yt=i.timestampFormat===p.timestampFormat?null:(0,$.jsx)(Y,{label:`time format`,onClick:()=>a({timestampFormat:p.timestampFormat})}),e[100]=i.timestampFormat,e[101]=a,e[102]=yt):yt=e[102];let bt;e[103]===a?bt=e[104]:(bt=e=>{(e===`locale`||e===`12-hour`||e===`24-hour`)&&a({timestampFormat:e})},e[103]=a,e[104]=bt);let xt=lo[i.timestampFormat],St;e[105]===xt?St=e[106]:(St=(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Timestamp format`,children:(0,$.jsx)(pe,{children:xt})}),e[105]=xt,e[106]=St);let Ct;e[107]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`locale`,children:lo.locale}),(0,$.jsx)(q,{hideIndicator:!0,value:`12-hour`,children:lo[`12-hour`]}),(0,$.jsx)(q,{hideIndicator:!0,value:`24-hour`,children:lo[`24-hour`]})]}),e[107]=Ct):Ct=e[107];let wt;e[108]!==i.timestampFormat||e[109]!==bt||e[110]!==St?(wt=(0,$.jsxs)(_e,{value:i.timestampFormat,onValueChange:bt,children:[St,Ct]}),e[108]=i.timestampFormat,e[109]=bt,e[110]=St,e[111]=wt):wt=e[111];let Tt;e[112]!==yt||e[113]!==wt?(Tt=(0,$.jsx)(J,{..._t,description:`System default follows your browser or OS clock preference.`,resetAction:yt,control:wt}),e[112]=yt,e[113]=wt,e[114]=Tt):Tt=e[114];let Et,Dt;e[115]===Symbol.for(`react.memo_cache_sentinel`)?(Et=[`responseStreamingMode`],Dt=X(`response-streaming`),e[115]=Et,e[116]=Dt):(Et=e[115],Dt=e[116]);let Ot=D?`The selected targets use different streaming modes.`:oo[i.responseStreamingMode],kt;e[117]!==i.responseStreamingMode||e[118]!==a?(kt=i.responseStreamingMode===p.responseStreamingMode?null:(0,$.jsx)(Y,{label:`response streaming`,onClick:()=>a({responseStreamingMode:p.responseStreamingMode})}),e[117]=i.responseStreamingMode,e[118]=a,e[119]=kt):kt=e[119];let At=D?null:i.responseStreamingMode,jt;e[120]===a?jt=e[121]:(jt=e=>{(e===`turn`||e===`paragraph`)&&a({responseStreamingMode:e})},e[120]=a,e[121]=jt);let Mt;e[122]===Symbol.for(`react.memo_cache_sentinel`)?(Mt=(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Response streaming`,children:(0,$.jsx)(pe,{children:Yo})}),e[122]=Mt):Mt=e[122];let Nt;e[123]===Symbol.for(`react.memo_cache_sentinel`)?(Nt=(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`turn`,children:ao.turn}),(0,$.jsx)(q,{hideIndicator:!0,value:`paragraph`,children:ao.paragraph})]}),e[123]=Nt):Nt=e[123];let Pt;e[124]!==At||e[125]!==jt?(Pt=(0,$.jsxs)(_e,{value:At,onValueChange:jt,children:[Mt,Nt]}),e[124]=At,e[125]=jt,e[126]=Pt):Pt=e[126];let Ft;e[127]!==Ot||e[128]!==kt||e[129]!==Pt?(Ft=(0,$.jsx)(J,{serverScoped:!0,settingKeys:Et,...Dt,description:Ot,resetAction:kt,control:Pt}),e[127]=Ot,e[128]=kt,e[129]=Pt,e[130]=Ft):Ft=e[130];let It;e[131]===Symbol.for(`react.memo_cache_sentinel`)?(It=X(`hide-whitespace-changes`),e[131]=It):It=e[131];let Lt;e[132]!==i.diffIgnoreWhitespace||e[133]!==a?(Lt=i.diffIgnoreWhitespace===p.diffIgnoreWhitespace?null:(0,$.jsx)(Y,{label:`diff whitespace changes`,onClick:()=>a({diffIgnoreWhitespace:p.diffIgnoreWhitespace})}),e[132]=i.diffIgnoreWhitespace,e[133]=a,e[134]=Lt):Lt=e[134];let Rt;e[135]===a?Rt=e[136]:(Rt=e=>a({diffIgnoreWhitespace:!!e}),e[135]=a,e[136]=Rt);let zt;e[137]!==i.diffIgnoreWhitespace||e[138]!==Rt?(zt=(0,$.jsx)(bn,{checked:i.diffIgnoreWhitespace,onCheckedChange:Rt,"aria-label":`Hide whitespace changes by default`}),e[137]=i.diffIgnoreWhitespace,e[138]=Rt,e[139]=zt):zt=e[139];let Bt;e[140]!==Lt||e[141]!==zt?(Bt=(0,$.jsx)(J,{...It,description:`Set whether the diff panel ignores whitespace-only edits by default.`,resetAction:Lt,control:zt}),e[140]=Lt,e[141]=zt,e[142]=Bt):Bt=e[142];let Vt;e[143]===Symbol.for(`react.memo_cache_sentinel`)?(Vt=X(`default-diff-file-state`),e[143]=Vt):Vt=e[143];let Ht;e[144]!==i.diffFilesCollapsed||e[145]!==a?(Ht=i.diffFilesCollapsed===p.diffFilesCollapsed?null:(0,$.jsx)(Y,{label:`default diff file state`,onClick:()=>a({diffFilesCollapsed:p.diffFilesCollapsed})}),e[144]=i.diffFilesCollapsed,e[145]=a,e[146]=Ht):Ht=e[146];let Ut=i.diffFilesCollapsed?`collapsed`:`expanded`,Wt;e[147]===a?Wt=e[148]:(Wt=e=>{(e===`expanded`||e===`collapsed`)&&a({diffFilesCollapsed:e===`collapsed`})},e[147]=a,e[148]=Wt);let Gt=i.diffFilesCollapsed?`Collapsed`:`Expanded`,Kt;e[149]===Gt?Kt=e[150]:(Kt=(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Default diff file state`,children:(0,$.jsx)(pe,{children:Gt})}),e[149]=Gt,e[150]=Kt);let Yt;e[151]===Symbol.for(`react.memo_cache_sentinel`)?(Yt=(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`expanded`,children:`Expanded`}),(0,$.jsx)(q,{hideIndicator:!0,value:`collapsed`,children:`Collapsed`})]}),e[151]=Yt):Yt=e[151];let Qt;e[152]!==Ut||e[153]!==Wt||e[154]!==Kt?(Qt=(0,$.jsxs)(_e,{value:Ut,onValueChange:Wt,children:[Kt,Yt]}),e[152]=Ut,e[153]=Wt,e[154]=Kt,e[155]=Qt):Qt=e[155];let $t;e[156]!==Ht||e[157]!==Qt?($t=(0,$.jsx)(J,{...Vt,description:`Start with files expanded or collapsed when opening diffs or a pull request's Code tab.`,resetAction:Ht,control:Qt}),e[156]=Ht,e[157]=Qt,e[158]=$t):$t=e[158];let en;e[159]===Symbol.for(`react.memo_cache_sentinel`)?(en=X(`diff-layout`),e[159]=en):en=e[159];let on;e[160]!==i.diffLayout||e[161]!==a?(on=i.diffLayout===p.diffLayout?null:(0,$.jsx)(Y,{label:`diff layout`,onClick:()=>a({diffLayout:p.diffLayout})}),e[160]=i.diffLayout,e[161]=a,e[162]=on):on=e[162];let sn;e[163]===a?sn=e[164]:(sn=e=>{(e===`stacked`||e===`split`)&&a({diffLayout:e})},e[163]=a,e[164]=sn);let cn=po[i.diffLayout],un;e[165]===cn?un=e[166]:(un=(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Diff layout`,children:(0,$.jsx)(pe,{children:cn})}),e[165]=cn,e[166]=un);let dn;e[167]===Symbol.for(`react.memo_cache_sentinel`)?(dn=(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{hideIndicator:!0,value:`stacked`,children:po.stacked}),(0,$.jsx)(q,{hideIndicator:!0,value:`split`,children:po.split})]}),e[167]=dn):dn=e[167];let fn;e[168]!==i.diffLayout||e[169]!==sn||e[170]!==un?(fn=(0,$.jsxs)(_e,{value:i.diffLayout,onValueChange:sn,children:[un,dn]}),e[168]=i.diffLayout,e[169]=sn,e[170]=un,e[171]=fn):fn=e[171];let pn;e[172]!==on||e[173]!==fn?(pn=(0,$.jsx)(J,{...en,description:`Show diffs stacked or side by side. The toggle in the diff toolbar changes this too.`,resetAction:on,control:fn}),e[172]=on,e[173]=fn,e[174]=pn):pn=e[174];let mn;e[175]===Symbol.for(`react.memo_cache_sentinel`)?(mn=X(`proactive-panels`),e[175]=mn):mn=e[175];let hn;e[176]!==i.proactivePanelsEnabled||e[177]!==a?(hn=i.proactivePanelsEnabled===p.proactivePanelsEnabled?null:(0,$.jsx)(Y,{label:`proactive panels`,onClick:()=>a({proactivePanelsEnabled:p.proactivePanelsEnabled})}),e[176]=i.proactivePanelsEnabled,e[177]=a,e[178]=hn):hn=e[178];let gn;e[179]===a?gn=e[180]:(gn=e=>a({proactivePanelsEnabled:!!e}),e[179]=a,e[180]=gn);let _n;e[181]!==i.proactivePanelsEnabled||e[182]!==gn?(_n=(0,$.jsx)(bn,{checked:i.proactivePanelsEnabled,onCheckedChange:gn,"aria-label":`Proactive panels`}),e[181]=i.proactivePanelsEnabled,e[182]=gn,e[183]=_n):_n=e[183];let vn;e[184]!==hn||e[185]!==_n?(vn=(0,$.jsx)(J,{...mn,description:`Open linked pull requests first. Otherwise, open Changes for edits to at least 3 files or 50 lines.`,resetAction:hn,control:_n}),e[184]=hn,e[185]=_n,e[186]=vn):vn=e[186];let yn;e[187]===Symbol.for(`react.memo_cache_sentinel`)?(yn=X(`skills-in-slash-menu`),e[187]=yn):yn=e[187];let xn;e[188]!==i.showSkillsInSlashMenu||e[189]!==a?(xn=i.showSkillsInSlashMenu===p.showSkillsInSlashMenu?null:(0,$.jsx)(Y,{label:`skills in slash menu`,onClick:()=>a({showSkillsInSlashMenu:p.showSkillsInSlashMenu})}),e[188]=i.showSkillsInSlashMenu,e[189]=a,e[190]=xn):xn=e[190];let Sn;e[191]===a?Sn=e[192]:(Sn=e=>a({showSkillsInSlashMenu:!!e}),e[191]=a,e[192]=Sn);let Cn;e[193]!==i.showSkillsInSlashMenu||e[194]!==Sn?(Cn=(0,$.jsx)(bn,{checked:i.showSkillsInSlashMenu,onCheckedChange:Sn,"aria-label":`Show skills in slash menu`}),e[193]=i.showSkillsInSlashMenu,e[194]=Sn,e[195]=Cn):Cn=e[195];let wn;e[196]!==xn||e[197]!==Cn?(wn=(0,$.jsx)(J,{...yn,description:`Also include skills in the / command menu. Skills always appear when you type $.`,resetAction:xn,control:Cn}),e[196]=xn,e[197]=Cn,e[198]=wn):wn=e[198];let Tn;e[199]===Symbol.for(`react.memo_cache_sentinel`)?(Tn=X(`composer-rich-text`),e[199]=Tn):Tn=e[199];let En;e[200]!==i.composerRichTextEnabled||e[201]!==a?(En=i.composerRichTextEnabled===p.composerRichTextEnabled?null:(0,$.jsx)(Y,{label:`rich text composer`,onClick:()=>a({composerRichTextEnabled:p.composerRichTextEnabled})}),e[200]=i.composerRichTextEnabled,e[201]=a,e[202]=En):En=e[202];let Dn;e[203]===a?Dn=e[204]:(Dn=e=>a({composerRichTextEnabled:!!e}),e[203]=a,e[204]=Dn);let On;e[205]!==i.composerRichTextEnabled||e[206]!==Dn?(On=(0,$.jsx)(bn,{checked:i.composerRichTextEnabled,onCheckedChange:Dn,"aria-label":`Rich text composer`}),e[205]=i.composerRichTextEnabled,e[206]=Dn,e[207]=On):On=e[207];let kn;e[208]!==On||e[209]!==En?(kn=(0,$.jsx)(J,{...Tn,description:`Show formatted Markdown as you type.`,resetAction:En,control:On}),e[208]=On,e[209]=En,e[210]=kn):kn=e[210];let An;e[211]===Symbol.for(`react.memo_cache_sentinel`)?(An=X(`composer-collapse`),e[211]=An):An=e[211];let jn;e[212]!==i.composerCollapseOnScroll||e[213]!==a?(jn=i.composerCollapseOnScroll===p.composerCollapseOnScroll?null:(0,$.jsx)(Y,{label:`collapse composer on scroll`,onClick:()=>a({composerCollapseOnScroll:p.composerCollapseOnScroll})}),e[212]=i.composerCollapseOnScroll,e[213]=a,e[214]=jn):jn=e[214];let Mn;e[215]===a?Mn=e[216]:(Mn=e=>a({composerCollapseOnScroll:!!e}),e[215]=a,e[216]=Mn);let Nn;e[217]!==i.composerCollapseOnScroll||e[218]!==Mn?(Nn=(0,$.jsx)(bn,{checked:i.composerCollapseOnScroll,onCheckedChange:Mn,"aria-label":`Collapse composer on scroll`}),e[217]=i.composerCollapseOnScroll,e[218]=Mn,e[219]=Nn):Nn=e[219];let Pn;e[220]!==jn||e[221]!==Nn?(Pn=(0,$.jsx)(J,{...An,description:`Rest the composer of an existing thread into a single line when you scroll the conversation. Focus the composer or start typing to expand it again.`,resetAction:jn,control:Nn}),e[220]=jn,e[221]=Nn,e[222]=Pn):Pn=e[222];let Fn;e[223]===Symbol.for(`react.memo_cache_sentinel`)?(Fn=X(`send-shortcut`),e[223]=Fn):Fn=e[223];let In;e[224]!==i.sendShortcut||e[225]!==a?(In=i.sendShortcut===p.sendShortcut?null:(0,$.jsx)(Y,{label:`send shortcut`,onClick:()=>a({sendShortcut:p.sendShortcut})}),e[224]=i.sendShortcut,e[225]=a,e[226]=In):In=e[226];let Ln;e[227]===a?Ln=e[228]:(Ln=e=>{let t=r.find(t=>t.value===e);t&&a({sendShortcut:t.value})},e[227]=a,e[228]=Ln);let Rn=r.find(e=>e.value===i.sendShortcut)?.label,zn;e[229]===Rn?zn=e[230]:(zn=(0,$.jsx)(ge,{size:`sm`,className:`w-auto min-w-0 max-w-full`,"aria-label":`Send shortcut`,children:(0,$.jsx)(pe,{children:Rn})}),e[229]=Rn,e[230]=zn);let Bn;e[231]===i.sendShortcut?Bn=e[232]:(Bn=(0,$.jsx)(he,{align:`end`,alignItemWithTrigger:!1,children:r.map(e=>(0,$.jsx)(q,{value:e.value,children:(0,$.jsxs)(`span`,{className:`flex items-center justify-between gap-4`,children:[e.label,i.sendShortcut===e.value&&(0,$.jsx)(v,{"aria-hidden":`true`})]})},e.value))}),e[231]=i.sendShortcut,e[232]=Bn);let Vn;e[233]!==i.sendShortcut||e[234]!==Ln||e[235]!==zn||e[236]!==Bn?(Vn=(0,$.jsxs)(_e,{value:i.sendShortcut,onValueChange:Ln,children:[zn,Bn]}),e[233]=i.sendShortcut,e[234]=Ln,e[235]=zn,e[236]=Bn,e[237]=Vn):Vn=e[237];let Hn;e[238]!==In||e[239]!==Vn?(Hn=(0,$.jsx)(J,{...Fn,description:`Choose when Enter sends a prompt or inserts a new line`,resetAction:In,control:Vn}),e[238]=In,e[239]=Vn,e[240]=Hn):Hn=e[240];let Un;e[241]===Symbol.for(`react.memo_cache_sentinel`)?(Un=X(`follow-up-behavior`),e[241]=Un):Un=e[241];let Gn=`Queue follow-ups while the agent runs or steer the current run. `+(i.sendShortcut===`mod-enter-multiline`?`Press ${t} + Enter for single-line prompts or ${t} + Shift + Enter for multiline prompts to do the opposite for one message.`:`Press ${t}${i.sendShortcut===`mod-enter`?` + Shift`:``} + Enter to do the opposite for one message.`),Kn;e[242]!==i.followUpBehavior||e[243]!==a?(Kn=i.followUpBehavior===p.followUpBehavior?null:(0,$.jsx)(Y,{label:`follow-up behavior`,onClick:()=>a({followUpBehavior:p.followUpBehavior})}),e[242]=i.followUpBehavior,e[243]=a,e[244]=Kn):Kn=e[244];let qn;e[245]===a?qn=e[246]:(qn=e=>{(e===`queue`||e===`steer`)&&a({followUpBehavior:e})},e[245]=a,e[246]=qn);let Jn=i.followUpBehavior===`queue`?`Queue`:`Steer`,Yn;e[247]===Jn?Yn=e[248]:(Yn=(0,$.jsx)(ge,{size:`sm`,className:`w-auto min-w-0`,"aria-label":`Follow-up behavior`,children:(0,$.jsx)(pe,{children:Jn})}),e[247]=Jn,e[248]=Yn);let Xn;e[249]===Symbol.for(`react.memo_cache_sentinel`)?(Xn=(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(q,{value:`queue`,children:`Queue`}),(0,$.jsx)(q,{value:`steer`,children:`Steer`})]}),e[249]=Xn):Xn=e[249];let rr;e[250]!==i.followUpBehavior||e[251]!==qn||e[252]!==Yn?(rr=(0,$.jsxs)(_e,{value:i.followUpBehavior,onValueChange:qn,children:[Yn,Xn]}),e[250]=i.followUpBehavior,e[251]=qn,e[252]=Yn,e[253]=rr):rr=e[253];let sr;e[254]!==Gn||e[255]!==Kn||e[256]!==rr?(sr=(0,$.jsx)(J,{...Un,description:Gn,resetAction:Kn,control:rr}),e[254]=Gn,e[255]=Kn,e[256]=rr,e[257]=sr):sr=e[257];let cr,lr;e[258]===Symbol.for(`react.memo_cache_sentinel`)?(cr=[`enableProviderUpdateChecks`],lr=X(`provider-update-checks`),e[258]=cr,e[259]=lr):(cr=e[258],lr=e[259]);let ur;e[260]!==i.enableProviderUpdateChecks||e[261]!==a?(ur=i.enableProviderUpdateChecks===p.enableProviderUpdateChecks?null:(0,$.jsx)(Y,{label:`provider update checks`,onClick:()=>a({enableProviderUpdateChecks:p.enableProviderUpdateChecks})}),e[260]=i.enableProviderUpdateChecks,e[261]=a,e[262]=ur):ur=e[262];let fr;e[263]===Symbol.for(`react.memo_cache_sentinel`)?(fr=[`enableProviderUpdateChecks`],e[263]=fr):fr=e[263];let pr;e[264]===a?pr=e[265]:(pr=e=>a({enableProviderUpdateChecks:!!e}),e[264]=a,e[265]=pr);let hr;e[266]!==i.enableProviderUpdateChecks||e[267]!==pr?(hr=(0,$.jsx)(nr,{settingKeys:fr,checked:i.enableProviderUpdateChecks,onCheckedChange:pr,"aria-label":`Check provider versions`}),e[266]=i.enableProviderUpdateChecks,e[267]=pr,e[268]=hr):hr=e[268];let gr;e[269]!==ur||e[270]!==hr?(gr=(0,$.jsx)(J,{serverScoped:!0,settingKeys:cr,...lr,description:`Check installed provider CLIs for newer available versions and fetch model catalog updates. When off, new models may not appear.`,resetAction:ur,control:hr}),e[269]=ur,e[270]=hr,e[271]=gr):gr=e[271];let vr;e[272]===Symbol.for(`react.memo_cache_sentinel`)?(vr=X(`continue-threads-after-server-update`),e[272]=vr):vr=e[272];let yr;e[273]===Symbol.for(`react.memo_cache_sentinel`)?(yr=[`continueThreadsAfterServerUpdate`],e[273]=yr):yr=e[273];let br=z?void 0:`All selected connected environments must support restart continuation.`,xr;e[274]!==i.continueThreadsAfterServerUpdate||e[275]!==z||e[276]!==a?(xr=z&&i.continueThreadsAfterServerUpdate!==p.continueThreadsAfterServerUpdate?(0,$.jsx)(Y,{label:`continue threads after restarts`,onClick:()=>a({continueThreadsAfterServerUpdate:p.continueThreadsAfterServerUpdate})}):null,e[274]=i.continueThreadsAfterServerUpdate,e[275]=z,e[276]=a,e[277]=xr):xr=e[277];let Sr;e[278]===Symbol.for(`react.memo_cache_sentinel`)?(Sr=[`continueThreadsAfterServerUpdate`],e[278]=Sr):Sr=e[278];let Cr=!z,wr;e[279]===a?wr=e[280]:(wr=e=>a({continueThreadsAfterServerUpdate:!!e}),e[279]=a,e[280]=wr);let Tr;e[281]!==i.continueThreadsAfterServerUpdate||e[282]!==Cr||e[283]!==wr?(Tr=(0,$.jsx)(nr,{settingKeys:Sr,checked:i.continueThreadsAfterServerUpdate,disabled:Cr,onCheckedChange:wr,"aria-label":`Continue threads after restarts`}),e[281]=i.continueThreadsAfterServerUpdate,e[282]=Cr,e[283]=wr,e[284]=Tr):Tr=e[284];let Er;e[285]!==br||e[286]!==xr||e[287]!==Tr?(Er=(0,$.jsx)(J,{...vr,serverScoped:!0,settingKeys:yr,description:`Automatically resume interrupted threads after an update, crash, or machine restart on the selected environments.`,status:br,resetAction:xr,control:Tr}),e[285]=br,e[286]=xr,e[287]=Tr,e[288]=Er):Er=e[288];let Dr,Or;e[289]===Symbol.for(`react.memo_cache_sentinel`)?(Dr=[`backgroundActivity`],Or=X(`background-activity`),e[289]=Dr,e[290]=Or):(Dr=e[289],Or=e[290]);let kr=Or.id,Ar;e[291]===Symbol.for(`react.memo_cache_sentinel`)?(Ar=X(`background-activity`),e[291]=Ar):Ar=e[291];let jr;e[292]===Symbol.for(`react.memo_cache_sentinel`)?(jr=(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[Ar.title,(0,$.jsx)(an,{children:`This shared policy gates background work such as Git refreshes and provider health probes after their individual intervals elapse.`})]}),e[292]=jr):jr=e[292];let Mr;e[293]!==Ne||e[294]!==a?(Mr=Ne?(0,$.jsx)(Y,{label:`background activity`,onClick:()=>a(xo())}):null,e[293]=Ne,e[294]=a,e[295]=Mr):Mr=e[295];let Nr=we?null:Se,Pr;e[296]!==x||e[297]!==a?(Pr=e=>{if(e===`advanced`){x&&T(!0);return}(e===`balanced`||e===`performance`||e===`battery-saver`)&&a(So(e))},e[296]=x,e[297]=a,e[298]=Pr):Pr=e[298];let Fr;e[299]===Symbol.for(`react.memo_cache_sentinel`)?(Fr=(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Background activity profile`,children:(0,$.jsx)(pe,{children:Jo})}),e[299]=Fr):Fr=e[299];let Ir,Lr,Rr;e[300]===Symbol.for(`react.memo_cache_sentinel`)?(Ir=(0,$.jsx)(q,{hideIndicator:!0,value:`balanced`,children:ho.balanced}),Lr=(0,$.jsx)(q,{hideIndicator:!0,value:`performance`,children:ho.performance}),Rr=(0,$.jsx)(q,{hideIndicator:!0,value:`battery-saver`,children:ho[`battery-saver`]}),e[300]=Ir,e[301]=Lr,e[302]=Rr):(Ir=e[300],Lr=e[301],Rr=e[302]);let zr=!x,Br=x?go.advanced:`${go.advanced} (one environment)`,Vr;e[303]!==zr||e[304]!==Br?(Vr=(0,$.jsxs)(he,{align:`end`,alignItemWithTrigger:!1,children:[Ir,Lr,Rr,(0,$.jsx)(q,{hideIndicator:!0,value:`advanced`,disabled:zr,children:Br})]}),e[303]=zr,e[304]=Br,e[305]=Vr):Vr=e[305];let Hr;e[306]!==Nr||e[307]!==Pr||e[308]!==Vr?(Hr=(0,$.jsxs)(_e,{value:Nr,onValueChange:Pr,children:[Fr,Vr]}),e[306]=Nr,e[307]=Pr,e[308]=Vr,e[309]=Hr):Hr=e[309];let Ur;e[310]!==Se||e[311]!==x?(Ur=Se===`advanced`&&x?(0,$.jsxs)(se,{children:[(0,$.jsx)(ie,{render:(0,$.jsx)(I,{size:`icon-sm`,variant:`outline`,"aria-label":`Configure advanced background activity`,onClick:()=>T(!0),children:(0,$.jsx)(o,{className:`size-4`})})}),(0,$.jsx)(ae,{side:`top`,children:`Configure background activity`})]}):null,e[310]=Se,e[311]=x,e[312]=Ur):Ur=e[312];let Wr=w&&x,Gr;e[313]===Wr?Gr=e[314]:(Gr=(0,$.jsx)(Eo,{open:Wr,onOpenChange:T}),e[313]=Wr,e[314]=Gr);let Kr;e[315]!==Hr||e[316]!==Ur||e[317]!==Gr?(Kr=(0,$.jsxs)($.Fragment,{children:[Hr,Ur,Gr]}),e[315]=Hr,e[316]=Ur,e[317]=Gr,e[318]=Kr):Kr=e[318];let qr;e[319]!==je||e[320]!==Mr||e[321]!==Kr?(qr=(0,$.jsx)(J,{serverScoped:!0,settingKeys:Dr,id:kr,title:jr,description:je,resetAction:Mr,control:Kr}),e[319]=je,e[320]=Mr,e[321]=Kr,e[322]=qr):qr=e[322];let Jr;e[323]!==kn||e[324]!==Pn||e[325]!==Hn||e[326]!==sr||e[327]!==gr||e[328]!==Er||e[329]!==qr||e[330]!==gt||e[331]!==Tt||e[332]!==Ft||e[333]!==Bt||e[334]!==$t||e[335]!==pn||e[336]!==vn||e[337]!==wn?(Jr=(0,$.jsxs)(rn,{id:`behavior`,title:`Behavior`,children:[pt,gt,Tt,Ft,Bt,$t,pn,vn,wn,kn,Pn,Hn,sr,gr,Er,qr]}),e[323]=kn,e[324]=Pn,e[325]=Hn,e[326]=sr,e[327]=gr,e[328]=Er,e[329]=qr,e[330]=gt,e[331]=Tt,e[332]=Ft,e[333]=Bt,e[334]=$t,e[335]=pn,e[336]=vn,e[337]=wn,e[338]=Jr):Jr=e[338];let Yr,Xr;e[339]===Symbol.for(`react.memo_cache_sentinel`)?(Yr=[`newWorktreesStartFromOrigin`],Xr=X(`start-from-origin`),e[339]=Yr,e[340]=Xr):(Yr=e[339],Xr=e[340]);let Zr;e[341]!==i.newWorktreesStartFromOrigin||e[342]!==a?(Zr=i.newWorktreesStartFromOrigin===p.newWorktreesStartFromOrigin?null:(0,$.jsx)(Y,{label:`new worktrees start from origin`,onClick:()=>a({newWorktreesStartFromOrigin:p.newWorktreesStartFromOrigin})}),e[341]=i.newWorktreesStartFromOrigin,e[342]=a,e[343]=Zr):Zr=e[343];let Qr;e[344]===Symbol.for(`react.memo_cache_sentinel`)?(Qr=[`newWorktreesStartFromOrigin`],e[344]=Qr):Qr=e[344];let $r;e[345]===a?$r=e[346]:($r=e=>a({newWorktreesStartFromOrigin:!!e}),e[345]=a,e[346]=$r);let ei;e[347]!==i.newWorktreesStartFromOrigin||e[348]!==$r?(ei=(0,$.jsx)(nr,{settingKeys:Qr,checked:i.newWorktreesStartFromOrigin,onCheckedChange:$r,"aria-label":`Start new worktrees from origin by default`}),e[347]=i.newWorktreesStartFromOrigin,e[348]=$r,e[349]=ei):ei=e[349];let ti;e[350]!==Zr||e[351]!==ei?(ti=(0,$.jsx)(J,{serverScoped:!0,settingKeys:Yr,...Xr,description:`Creates the worktree from the latest matching branch on origin instead of your local branch.`,resetAction:Zr,control:ei}),e[350]=Zr,e[351]=ei,e[352]=ti):ti=e[352];let ni,ri;e[353]===Symbol.for(`react.memo_cache_sentinel`)?(ni=[`addProjectBaseDirectory`],ri=X(`add-project-starts-in`),e[353]=ni,e[354]=ri):(ni=e[353],ri=e[354]);let ii;e[355]!==i.addProjectBaseDirectory||e[356]!==a?(ii=i.addProjectBaseDirectory===p.addProjectBaseDirectory?null:(0,$.jsx)(Y,{label:`add project base directory`,onClick:()=>a({addProjectBaseDirectory:p.addProjectBaseDirectory})}),e[355]=i.addProjectBaseDirectory,e[356]=a,e[357]=ii):ii=e[357];let ai=Ee?``:i.addProjectBaseDirectory,oi;e[358]===a?oi=e[359]:(oi=e=>a({addProjectBaseDirectory:e}),e[358]=a,e[359]=oi);let si=Ee?`Mixed`:`~/`,ci;e[360]!==ai||e[361]!==oi||e[362]!==si?(ci=(0,$.jsx)(tr,{size:`sm`,className:`w-full sm:w-72`,value:ai,onCommit:oi,placeholder:si,spellCheck:!1,"aria-label":`Add project base directory`}),e[360]=ai,e[361]=oi,e[362]=si,e[363]=ci):ci=e[363];let li;e[364]!==ii||e[365]!==ci?(li=(0,$.jsx)(J,{serverScoped:!0,settingKeys:ni,...ri,description:`Leave empty to use "~/" when the Add Project browser opens.`,resetAction:ii,control:ci}),e[364]=ii,e[365]=ci,e[366]=li):li=e[366];let ui;e[367]!==ti||e[368]!==li?(ui=(0,$.jsxs)(rn,{id:`projects-and-threads`,title:`Projects & threads`,children:[ti,li]}),e[367]=ti,e[368]=li,e[369]=ui):ui=e[369];let di;e[370]===Symbol.for(`react.memo_cache_sentinel`)?(di=X(`unpin-confirmation`),e[370]=di):di=e[370];let fi;e[371]!==i.confirmThreadUnpin||e[372]!==a?(fi=i.confirmThreadUnpin===p.confirmThreadUnpin?null:(0,$.jsx)(Y,{label:`unpin confirmation`,onClick:()=>a({confirmThreadUnpin:p.confirmThreadUnpin})}),e[371]=i.confirmThreadUnpin,e[372]=a,e[373]=fi):fi=e[373];let pi;e[374]===a?pi=e[375]:(pi=e=>a({confirmThreadUnpin:!!e}),e[374]=a,e[375]=pi);let mi;e[376]!==i.confirmThreadUnpin||e[377]!==pi?(mi=(0,$.jsx)(bn,{checked:i.confirmThreadUnpin,onCheckedChange:pi,"aria-label":`Confirm thread unpinning`}),e[376]=i.confirmThreadUnpin,e[377]=pi,e[378]=mi):mi=e[378];let hi;e[379]!==fi||e[380]!==mi?(hi=(0,$.jsx)(J,{...di,description:`Ask before unpinning a thread from the pinned section.`,resetAction:fi,control:mi}),e[379]=fi,e[380]=mi,e[381]=hi):hi=e[381];let gi;e[382]===Symbol.for(`react.memo_cache_sentinel`)?(gi=X(`archive-confirmation`),e[382]=gi):gi=e[382];let _i;e[383]!==i.confirmThreadArchive||e[384]!==a?(_i=i.confirmThreadArchive===p.confirmThreadArchive?null:(0,$.jsx)(Y,{label:`archive confirmation`,onClick:()=>a({confirmThreadArchive:p.confirmThreadArchive})}),e[383]=i.confirmThreadArchive,e[384]=a,e[385]=_i):_i=e[385];let vi;e[386]===a?vi=e[387]:(vi=e=>a({confirmThreadArchive:!!e}),e[386]=a,e[387]=vi);let yi;e[388]!==i.confirmThreadArchive||e[389]!==vi?(yi=(0,$.jsx)(bn,{checked:i.confirmThreadArchive,onCheckedChange:vi,"aria-label":`Confirm thread archiving`}),e[388]=i.confirmThreadArchive,e[389]=vi,e[390]=yi):yi=e[390];let bi;e[391]!==_i||e[392]!==yi?(bi=(0,$.jsx)(J,{...gi,description:`Require a second click on the inline archive action before a thread is archived.`,resetAction:_i,control:yi}),e[391]=_i,e[392]=yi,e[393]=bi):bi=e[393];let xi;e[394]===Symbol.for(`react.memo_cache_sentinel`)?(xi=X(`delete-confirmation`),e[394]=xi):xi=e[394];let Si;e[395]!==i.confirmThreadDelete||e[396]!==a?(Si=i.confirmThreadDelete===p.confirmThreadDelete?null:(0,$.jsx)(Y,{label:`delete confirmation`,onClick:()=>a({confirmThreadDelete:p.confirmThreadDelete})}),e[395]=i.confirmThreadDelete,e[396]=a,e[397]=Si):Si=e[397];let Ci;e[398]===a?Ci=e[399]:(Ci=e=>a({confirmThreadDelete:!!e}),e[398]=a,e[399]=Ci);let wi;e[400]!==i.confirmThreadDelete||e[401]!==Ci?(wi=(0,$.jsx)(bn,{checked:i.confirmThreadDelete,onCheckedChange:Ci,"aria-label":`Confirm thread deletion`}),e[400]=i.confirmThreadDelete,e[401]=Ci,e[402]=wi):wi=e[402];let Ti;e[403]!==Si||e[404]!==wi?(Ti=(0,$.jsx)(J,{...xi,description:`Ask before deleting a thread and its chat history.`,resetAction:Si,control:wi}),e[403]=Si,e[404]=wi,e[405]=Ti):Ti=e[405];let Ei;e[406]!==i.confirmQuit||e[407]!==a?(Ei=vt?(0,$.jsx)(J,{...X(`quit-confirmation`),description:`Hold mode also quits on two quick presses.`,resetAction:i.confirmQuit===p.confirmQuit?null:(0,$.jsx)(Y,{label:`quit shortcut behavior`,onClick:()=>a({confirmQuit:p.confirmQuit})}),control:(0,$.jsxs)(_e,{value:i.confirmQuit,onValueChange:e=>{(e===`direct`||e===`hold`||e===`double-click`)&&a({confirmQuit:e})},children:[(0,$.jsx)(ge,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Quit shortcut behavior`,children:(0,$.jsx)(pe,{children:mo[i.confirmQuit]})}),(0,$.jsx)(he,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(mo).map(qo)})]})}):null,e[406]=i.confirmQuit,e[407]=a,e[408]=Ei):Ei=e[408];let Di;e[409]!==hi||e[410]!==bi||e[411]!==Ti||e[412]!==Ei?(Di=(0,$.jsxs)(rn,{id:`confirmations`,title:`Confirmations`,children:[hi,bi,Ti,Ei]}),e[409]=hi,e[410]=bi,e[411]=Ti,e[412]=Ei,e[413]=Di):Di=e[413];let Oi=rn,ki=J,Ai,ji;e[414]===Symbol.for(`react.memo_cache_sentinel`)?(Ai=[`textGenerationModelSelection`],ji=X(`text-generation-model`),e[414]=Ai,e[415]=ji):(Ai=e[414],ji=e[415]);let Mi;e[416]!==C||e[417]!==ue||e[418]!==a?(Mi=C&&ue?(0,$.jsx)(Y,{label:`text generation model`,onClick:()=>a({textGenerationModelSelection:p.textGenerationModelSelection})}):null,e[416]=C,e[417]=ue,e[418]=a,e[419]=Mi):Mi=e[419];let Ni=C?ne?(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1.5`,children:[(0,$.jsx)(Zn,{environmentId:b,activeInstanceId:W,model:ee,lockedProvider:null,instanceEntries:K,modelOptionsByInstance:ce,triggerClassName:nn,...Oe?{triggerLabel:`Mixed`}:{},getModelDisabledReason:de,...b?{onOpenProviderSetup:e=>{c({to:`/settings/providers`,search:{environmentId:b,instanceId:e}})}}:{},onInstanceModelChange:(e,t)=>{let n=de(e,t);if(n){xe.add({type:`error`,title:`Text generation model not saved`,description:n});return}a({textGenerationModelSelection:s({...i,textGenerationModelSelection:U(e,t)},B)})}}),re?(0,$.jsx)(N,{provider:oe,models:re?.models??[],model:ee,prompt:``,onPromptChange:Ko,modelOptions:G,allowPromptInjectedEffort:!1,planModeEnabled:i.planModeEnabled||f(G),triggerClassName:nn,onModelOptionsChange:e=>{a({textGenerationModelSelection:s({...i,textGenerationModelSelection:U(W,ee,e)},B)})}}):null]}):(0,$.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`No text generation providers available.`}):(0,$.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Connect an environment to choose its text generation model.`}),Pi;e[420]!==ki||e[421]!==Ai||e[422]!==ji||e[423]!==Mi||e[424]!==Ni?(Pi=(0,$.jsx)(ki,{serverScoped:!0,settingKeys:Ai,...ji,description:`Used for thread titles and other generated text on connected devices with this provider. Source control can override it.`,resetAction:Mi,control:Ni}),e[420]=ki,e[421]=Ai,e[422]=ji,e[423]=Mi,e[424]=Ni,e[425]=Pi):Pi=e[425];let Fi;e[426]!==Oi||e[427]!==Pi?(Fi=(0,$.jsx)(Oi,{id:`text-generation`,title:`Text generation`,children:Pi}),e[426]=Oi,e[427]=Pi,e[428]=Fi):Fi=e[428];let Ii;e[429]===Symbol.for(`react.memo_cache_sentinel`)?(Ii=vt||te?(0,$.jsx)(wo,{}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{id:X(`app-version`).id,title:(0,$.jsx)(Co,{}),description:`Current version of the application.`}),ln?(0,$.jsx)(Wn,{}):null]}),e[429]=Ii):Ii=e[429];let Li;e[430]===Symbol.for(`react.memo_cache_sentinel`)?(Li=X(`privacy-policy`),e[430]=Li):Li=e[430];let Ri;e[431]===Symbol.for(`react.memo_cache_sentinel`)?(Ri=(0,$.jsxs)(rn,{id:`about`,title:`About`,children:[Ii,(0,$.jsx)(J,{...Li,description:`How we handle your data, including the anonymous usage data P4 Code collects.`,control:(0,$.jsx)(I,{render:(0,$.jsx)(`a`,{href:Qn,target:`_blank`,rel:`noreferrer noopener`}),size:`sm`,variant:`outline`,children:`View policy`})})]}),e[431]=Ri):Ri=e[431];let zi;e[432]===Symbol.for(`react.memo_cache_sentinel`)?(zi=X(`diagnostics`),e[432]=zi):zi=e[432];let Bi=x?`Inspect processes, resource use, and logs on this environment.`:`Inspect processes, resource use, and logs on one environment at a time.`,Vi=b??void 0,Hi;e[433]===Vi?Hi=e[434]:(Hi=(0,$.jsx)(I,{render:(0,$.jsx)(ye,{to:`/settings/diagnostics`,search:{machine:Vi}}),size:`sm`,variant:`outline`,children:`View diagnostics`}),e[433]=Vi,e[434]=Hi);let Ui;e[435]!==Bi||e[436]!==Hi?(Ui=(0,$.jsx)(J,{...zi,description:Bi,control:Hi}),e[435]=Bi,e[436]=Hi,e[437]=Ui):Ui=e[437];let Wi;e[438]===Symbol.for(`react.memo_cache_sentinel`)?(Wi=X(`open-source-licenses`),e[438]=Wi):Wi=e[438];let Gi;e[439]===Symbol.for(`react.memo_cache_sentinel`)?(Gi=(0,$.jsx)(J,{...Wi,description:`Notices for dependencies, assets, and optional tools used by P4 Code.`,control:(0,$.jsx)(I,{render:(0,$.jsx)(ye,{to:`/settings/open-source-licenses`}),size:`sm`,variant:`outline`,children:`View licenses`})}),e[439]=Gi):Gi=e[439];let Ki;e[440]===Ui?Ki=e[441]:(Ki=(0,$.jsxs)(rn,{title:`Diagnostics`,children:[Ui,Gi]}),e[440]=Ui,e[441]=Ki);let qi;e[442]===Symbol.for(`react.memo_cache_sentinel`)?(qi=(0,$.jsx)(Wo,{}),e[442]=qi):qi=e[442];let Ji;return e[443]!==Pe||e[444]!==Fe||e[445]!==Jr||e[446]!==ui||e[447]!==Di||e[448]!==Fi||e[449]!==Ki||e[450]!==ft?(Ji=(0,$.jsxs)(Pe,{children:[Fe,ft,Jr,ui,Di,Fi,Ri,Ki,qi]}),e[443]=Pe,e[444]=Fe,e[445]=Jr,e[446]=ui,e[447]=Di,e[448]=Fi,e[449]=Ki,e[450]=ft,e[451]=Ji):Ji=e[451],Ji}function Ko(){}function qo(e){let[t,n]=e;return(0,$.jsx)(q,{hideIndicator:!0,value:t,children:n},t)}function Jo(e){return e===null?`Mixed`:go[e]}function Yo(e){return e===null?`Mixed`:ao[e]}function Xo(e){return(0,$.jsx)(q,{hideIndicator:!0,value:e,children:so[e]},e)}function Zo(e){return e.enabled&&e.isAvailable}function Qo(e){return e.supportsTextGeneration!==!1}function $o(e){return e.serverConfig?.environment.capabilities.threadRestartContinuation===!0}function es(e){return e.serverConfig?.environment.capabilities.threadAutoSettlementScope===!0}function ts(e){return e.serverConfig?.environment.capabilities.threadAutoSettlement===!0}export{ro as i,Go as n,To as r,Do as t};
39
- //# sourceMappingURL=SettingsPanels-BtdHxcNW.js.map
39
+ //# sourceMappingURL=SettingsPanels-DExy67bz.js.map
@@ -1,2 +1,2 @@
1
- import{Jm as e,Mw as t,kT as n}from"./utils-BSj_I6H5.js";import{F as r,L as i,R as a,z as o}from"./useSettings-B_UiwKX2.js";function s(e){return e!==`separate`}function c(e,t=`repository`){return e?t===`repository_path`?`repository_path`:`repository`:`separate`}var l=`t3code:last-enabled-project-grouping-mode`;function u(){try{return localStorage.getItem(l)===`repository_path`?`repository_path`:`repository`}catch{return`repository`}}function d(e){if(e!==`separate`)try{localStorage.setItem(l,e)}catch{}}function f(t){return!n(t.backgroundActivity,e.backgroundActivity)||t.backgroundActivityProfile!==e.backgroundActivityProfile||!n(t.automaticGitFetchInterval,e.automaticGitFetchInterval)||!n(t.providerHealthRefreshInterval,e.providerHealthRefreshInterval)}function p(t){return[...t.fontFamilySans!==e.fontFamilySans||t.fontSizeInterface!==e.fontSizeInterface?[`Interface font`]:[],...t.fontFamilyComposer!==e.fontFamilyComposer||t.fontSizePrompt!==e.fontSizePrompt?[`Prompt font`]:[],...t.fontFamilyCode!==e.fontFamilyCode||t.fontSizeCode!==e.fontSizeCode?[`Code font`]:[],...t.fontFamilyTerminal!==e.fontFamilyTerminal||t.fontSizeTerminal!==e.fontSizeTerminal?[`Terminal font`]:[]]}function m(e,t){return e._tag===t._tag?e._tag===`fill`||t._tag===`fill`?!0:e.width!==t.width||e.height!==t.height?!1:e._tag===`preset`&&t._tag===`preset`?e.presetId===t.presetId:!0:!1}function h(t){return[...m(t.browserDefaultViewport,e.browserDefaultViewport)?[]:[`Browser viewport`],...t.browserDefaultZoomFactor===e.browserDefaultZoomFactor?[]:[`Browser zoom`],...t.browserDefaultAppearance===e.browserDefaultAppearance?[]:[`Browser appearance`],...t.browserRecordingFrameRate===e.browserRecordingFrameRate?[]:[`Recording frame rate`],...t.browserRecordingShowKeyPresses?[`Recording key presses`]:[],...t.browserRecordingShowMousePresses?[`Recording mouse presses`]:[],...t.browserLinkTarget===e.browserLinkTarget?[]:[`Open links in`],...t.browserAutoShowFloatingPreview===e.browserAutoShowFloatingPreview?[]:[`Floating preview`]]}function g(e){let t=o(e),n=i({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}});return n.profile===`custom`?`advanced`:n.profile}function _(e,t){let n=a(e);return{schemaVersion:1,profile:`custom`,baseProfile:t,overrides:n.profile===`custom`?n.overrides:{}}}function v(e){return{providerInstances:{...e.settings.providerInstances,[e.instanceId]:e.instance},...e.textGenerationModelSelection===void 0?{}:{textGenerationModelSelection:e.textGenerationModelSelection}}}function y(e){return Math.round(t(e)/1e3)}function b(e,t=0){return e===null||!Number.isFinite(e)?t:Math.max(t,Math.round(e))}function x(e,t,n){let i={automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery,...n};for(let[e,t]of Object.entries(i))t===void 0&&delete i[e];return{backgroundActivity:{schemaVersion:1,profile:`custom`,baseProfile:r(e),overrides:i}}}export{h as a,s as c,u as d,d as f,y as i,b as l,_ as n,p as o,g as p,v as r,f as s,x as t,c as u};
2
- //# sourceMappingURL=SettingsPanels.logic-yZixYwld.js.map
1
+ import{Jm as e,Mw as t,kT as n}from"./utils-vKlT_s3D.js";import{F as r,L as i,R as a,z as o}from"./useSettings-DYKTOdxY.js";function s(e){return e!==`separate`}function c(e,t=`repository`){return e?t===`repository_path`?`repository_path`:`repository`:`separate`}var l=`t3code:last-enabled-project-grouping-mode`;function u(){try{return localStorage.getItem(l)===`repository_path`?`repository_path`:`repository`}catch{return`repository`}}function d(e){if(e!==`separate`)try{localStorage.setItem(l,e)}catch{}}function f(t){return!n(t.backgroundActivity,e.backgroundActivity)||t.backgroundActivityProfile!==e.backgroundActivityProfile||!n(t.automaticGitFetchInterval,e.automaticGitFetchInterval)||!n(t.providerHealthRefreshInterval,e.providerHealthRefreshInterval)}function p(t){return[...t.fontFamilySans!==e.fontFamilySans||t.fontSizeInterface!==e.fontSizeInterface?[`Interface font`]:[],...t.fontFamilyComposer!==e.fontFamilyComposer||t.fontSizePrompt!==e.fontSizePrompt?[`Prompt font`]:[],...t.fontFamilyCode!==e.fontFamilyCode||t.fontSizeCode!==e.fontSizeCode?[`Code font`]:[],...t.fontFamilyTerminal!==e.fontFamilyTerminal||t.fontSizeTerminal!==e.fontSizeTerminal?[`Terminal font`]:[]]}function m(e,t){return e._tag===t._tag?e._tag===`fill`||t._tag===`fill`?!0:e.width!==t.width||e.height!==t.height?!1:e._tag===`preset`&&t._tag===`preset`?e.presetId===t.presetId:!0:!1}function h(t){return[...m(t.browserDefaultViewport,e.browserDefaultViewport)?[]:[`Browser viewport`],...t.browserDefaultZoomFactor===e.browserDefaultZoomFactor?[]:[`Browser zoom`],...t.browserDefaultAppearance===e.browserDefaultAppearance?[]:[`Browser appearance`],...t.browserRecordingFrameRate===e.browserRecordingFrameRate?[]:[`Recording frame rate`],...t.browserRecordingShowKeyPresses?[`Recording key presses`]:[],...t.browserRecordingShowMousePresses?[`Recording mouse presses`]:[],...t.browserLinkTarget===e.browserLinkTarget?[]:[`Open links in`],...t.browserAutoShowFloatingPreview===e.browserAutoShowFloatingPreview?[]:[`Floating preview`]]}function g(e){let t=o(e),n=i({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}});return n.profile===`custom`?`advanced`:n.profile}function _(e,t){let n=a(e);return{schemaVersion:1,profile:`custom`,baseProfile:t,overrides:n.profile===`custom`?n.overrides:{}}}function v(e){return{providerInstances:{...e.settings.providerInstances,[e.instanceId]:e.instance},...e.textGenerationModelSelection===void 0?{}:{textGenerationModelSelection:e.textGenerationModelSelection}}}function y(e){return Math.round(t(e)/1e3)}function b(e,t=0){return e===null||!Number.isFinite(e)?t:Math.max(t,Math.round(e))}function x(e,t,n){let i={automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery,...n};for(let[e,t]of Object.entries(i))t===void 0&&delete i[e];return{backgroundActivity:{schemaVersion:1,profile:`custom`,baseProfile:r(e),overrides:i}}}export{h as a,s as c,u as d,d as f,y as i,b as l,_ as n,p as o,g as p,v as r,f as s,x as t,c as u};
2
+ //# sourceMappingURL=SettingsPanels.logic-zUA6f3HT.js.map