@zythum02/fello-server 0.1.53 → 0.1.55

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 (443) hide show
  1. package/out/renderer/assets/{_baseUniq-CJr3HkLS.js → _baseUniq-BdLqGxOi.js} +1 -1
  2. package/out/renderer/assets/_baseUniq-BdLqGxOi.js.br +0 -0
  3. package/out/renderer/assets/_baseUniq-BdLqGxOi.js.gz +0 -0
  4. package/out/renderer/assets/{arc-POsBroTF.js → arc-UpL8po5R.js} +1 -1
  5. package/out/renderer/assets/arc-UpL8po5R.js.br +0 -0
  6. package/out/renderer/assets/arc-UpL8po5R.js.gz +0 -0
  7. package/out/renderer/assets/{architectureDiagram-Q4EWVU46-CmToUhDb.js → architectureDiagram-Q4EWVU46-ManEkEbl.js} +6 -6
  8. package/out/renderer/assets/architectureDiagram-Q4EWVU46-ManEkEbl.js.br +0 -0
  9. package/out/renderer/assets/architectureDiagram-Q4EWVU46-ManEkEbl.js.gz +0 -0
  10. package/out/renderer/assets/arrow-left-BnuWerui.js +14 -0
  11. package/out/renderer/assets/arrow-up-quD46bYg.js +36 -0
  12. package/out/renderer/assets/{automation-Cyz3eLWp.js → automation-cVl19jbl.js} +22 -9
  13. package/out/renderer/assets/automation-cVl19jbl.js.br +0 -0
  14. package/out/renderer/assets/automation-cVl19jbl.js.gz +0 -0
  15. package/out/renderer/assets/{blockDiagram-DXYQGD6D-M2nnTg9f.js → blockDiagram-DXYQGD6D-B7n8X8F6.js} +7 -7
  16. package/out/renderer/assets/blockDiagram-DXYQGD6D-B7n8X8F6.js.br +0 -0
  17. package/out/renderer/assets/blockDiagram-DXYQGD6D-B7n8X8F6.js.gz +0 -0
  18. package/out/renderer/assets/{c4Diagram-AHTNJAMY-CwLtsy_0.js → c4Diagram-AHTNJAMY-BoP_JNY0.js} +3 -3
  19. package/out/renderer/assets/c4Diagram-AHTNJAMY-BoP_JNY0.js.br +0 -0
  20. package/out/renderer/assets/c4Diagram-AHTNJAMY-BoP_JNY0.js.gz +0 -0
  21. package/out/renderer/assets/{channel-BUNDMqpH.js → channel-BTAU8ahK.js} +1 -1
  22. package/out/renderer/assets/{chunk-4BX2VUAB-B2qXmkDT.js → chunk-4BX2VUAB-BCKz1EgZ.js} +1 -1
  23. package/out/renderer/assets/{chunk-4TB4RGXK-DXLZpPY5.js → chunk-4TB4RGXK-B2HhnMqB.js} +5 -5
  24. package/out/renderer/assets/chunk-4TB4RGXK-B2HhnMqB.js.br +0 -0
  25. package/out/renderer/assets/chunk-4TB4RGXK-B2HhnMqB.js.gz +0 -0
  26. package/out/renderer/assets/{chunk-55IACEB6-CJeyefxI.js → chunk-55IACEB6-Drurz_4k.js} +1 -1
  27. package/out/renderer/assets/{chunk-EDXVE4YY-CNjJEQfY.js → chunk-EDXVE4YY-Xfghcg7b.js} +1 -1
  28. package/out/renderer/assets/chunk-EDXVE4YY-Xfghcg7b.js.br +0 -0
  29. package/out/renderer/assets/chunk-EDXVE4YY-Xfghcg7b.js.gz +0 -0
  30. package/out/renderer/assets/{chunk-FMBD7UC4-DOAOsjRu.js → chunk-FMBD7UC4-Birgz8kz.js} +1 -1
  31. package/out/renderer/assets/{chunk-OYMX7WX6-BG4B1VQ7.js → chunk-OYMX7WX6-Cv4jgShd.js} +3 -3
  32. package/out/renderer/assets/chunk-OYMX7WX6-Cv4jgShd.js.br +0 -0
  33. package/out/renderer/assets/chunk-OYMX7WX6-Cv4jgShd.js.gz +0 -0
  34. package/out/renderer/assets/{chunk-QZHKN3VN-B9zfXYIQ.js → chunk-QZHKN3VN-DkqKjktH.js} +1 -1
  35. package/out/renderer/assets/{chunk-YZCP3GAM-jeoI2tsD.js → chunk-YZCP3GAM-CJK_tBTq.js} +1 -1
  36. package/out/renderer/assets/chunk-YZCP3GAM-CJK_tBTq.js.br +0 -0
  37. package/out/renderer/assets/chunk-YZCP3GAM-CJK_tBTq.js.gz +0 -0
  38. package/out/renderer/assets/circle-x-C9_Yp0Tg.js +16 -0
  39. package/out/renderer/assets/{classDiagram-v2-HSJHXN6E-DWPFF3Yt.js → classDiagram-6PBFFD2Q-Bf4To0VI.js} +7 -7
  40. package/out/renderer/assets/{classDiagram-6PBFFD2Q-DWPFF3Yt.js → classDiagram-v2-HSJHXN6E-Bf4To0VI.js} +7 -7
  41. package/out/renderer/assets/{clone-Dcvr9oKv.js → clone-Ci5J50Pn.js} +1 -1
  42. package/out/renderer/assets/{code-editor-CEXlC4aV.js → code-editor-BwPwET3m.js} +2 -2
  43. package/out/renderer/assets/code-editor-BwPwET3m.js.br +0 -0
  44. package/out/renderer/assets/code-editor-BwPwET3m.js.gz +0 -0
  45. package/out/renderer/assets/{collapsible-CMuCJUWG.js → collapsible-CMQ8h8ID.js} +43 -53
  46. package/out/renderer/assets/collapsible-CMQ8h8ID.js.br +0 -0
  47. package/out/renderer/assets/collapsible-CMQ8h8ID.js.gz +0 -0
  48. package/out/renderer/assets/command-nKlwdb6i.js +19 -0
  49. package/out/renderer/assets/comment-ui-runtime-BsK8pmUT-C8f5Wrup.js +53 -0
  50. package/out/renderer/assets/comment-ui-runtime-BsK8pmUT-C8f5Wrup.js.br +0 -0
  51. package/out/renderer/assets/comment-ui-runtime-BsK8pmUT-C8f5Wrup.js.gz +0 -0
  52. package/out/renderer/assets/{cose-bilkent-S5V4N54A-B3bgImVS.js → cose-bilkent-S5V4N54A-BZpcn2q9.js} +2 -2
  53. package/out/renderer/assets/cose-bilkent-S5V4N54A-BZpcn2q9.js.br +0 -0
  54. package/out/renderer/assets/cose-bilkent-S5V4N54A-BZpcn2q9.js.gz +0 -0
  55. package/out/renderer/assets/{dagre-KV5264BT-DTbumBA_.js → dagre-KV5264BT-onHZodsn.js} +7 -7
  56. package/out/renderer/assets/dagre-KV5264BT-onHZodsn.js.br +0 -0
  57. package/out/renderer/assets/dagre-KV5264BT-onHZodsn.js.gz +0 -0
  58. package/out/renderer/assets/delimited-text-worker-host-BVY-Ecni-D1eBZLWW.js +25 -0
  59. package/out/renderer/assets/delimited-text-worker-host-BVY-Ecni-D1eBZLWW.js.br +0 -0
  60. package/out/renderer/assets/delimited-text-worker-host-BVY-Ecni-D1eBZLWW.js.gz +0 -0
  61. package/out/renderer/assets/{diagram-5BDNPKRD-B34Y6e8q.js → diagram-5BDNPKRD-y3QVYwp7.js} +7 -7
  62. package/out/renderer/assets/diagram-5BDNPKRD-y3QVYwp7.js.br +0 -0
  63. package/out/renderer/assets/diagram-5BDNPKRD-y3QVYwp7.js.gz +0 -0
  64. package/out/renderer/assets/{diagram-G4DWMVQ6-BBiBmFR4.js → diagram-G4DWMVQ6-LB3RUjrJ.js} +7 -7
  65. package/out/renderer/assets/diagram-G4DWMVQ6-LB3RUjrJ.js.br +0 -0
  66. package/out/renderer/assets/diagram-G4DWMVQ6-LB3RUjrJ.js.gz +0 -0
  67. package/out/renderer/assets/{diagram-MMDJMWI5-P-YslDjG.js → diagram-MMDJMWI5-7NpY26IL.js} +6 -6
  68. package/out/renderer/assets/diagram-MMDJMWI5-7NpY26IL.js.br +0 -0
  69. package/out/renderer/assets/diagram-MMDJMWI5-7NpY26IL.js.gz +0 -0
  70. package/out/renderer/assets/{diagram-TYMM5635-D_cLard_.js → diagram-TYMM5635-DRM1RRr4.js} +6 -6
  71. package/out/renderer/assets/diagram-TYMM5635-DRM1RRr4.js.br +0 -0
  72. package/out/renderer/assets/diagram-TYMM5635-DRM1RRr4.js.gz +0 -0
  73. package/out/renderer/assets/docx_parser_bg-C1Wf3n7F.wasm +0 -0
  74. package/out/renderer/assets/ellipsis-D_eCkauJ.js +16 -0
  75. package/out/renderer/assets/{erDiagram-SMLLAGMA-C1MHqKvC.js → erDiagram-SMLLAGMA-DNIZ639C.js} +5 -5
  76. package/out/renderer/assets/erDiagram-SMLLAGMA-DNIZ639C.js.br +0 -0
  77. package/out/renderer/assets/erDiagram-SMLLAGMA-DNIZ639C.js.gz +0 -0
  78. package/out/renderer/assets/{field-DR3J0r9e.js → field-YZTi9Jxc.js} +1 -1
  79. package/out/renderer/assets/field-YZTi9Jxc.js.br +0 -0
  80. package/out/renderer/assets/field-YZTi9Jxc.js.gz +0 -0
  81. package/out/renderer/assets/file-text-DDtS1g4Q.js +23 -0
  82. package/out/renderer/assets/{flowDiagram-DWJPFMVM-DprlEc3Z.js → flowDiagram-DWJPFMVM-C0ghMibN.js} +7 -7
  83. package/out/renderer/assets/flowDiagram-DWJPFMVM-C0ghMibN.js.br +0 -0
  84. package/out/renderer/assets/flowDiagram-DWJPFMVM-C0ghMibN.js.gz +0 -0
  85. package/out/renderer/assets/{ganttDiagram-T4ZO3ILL-CbTdumBm.js → ganttDiagram-T4ZO3ILL-tqeHqMu4.js} +3 -3
  86. package/out/renderer/assets/ganttDiagram-T4ZO3ILL-tqeHqMu4.js.br +0 -0
  87. package/out/renderer/assets/ganttDiagram-T4ZO3ILL-tqeHqMu4.js.gz +0 -0
  88. package/out/renderer/assets/{gitGraphDiagram-UUTBAWPF-06bme-w8.js → gitGraphDiagram-UUTBAWPF-D6acFhfE.js} +7 -7
  89. package/out/renderer/assets/gitGraphDiagram-UUTBAWPF-D6acFhfE.js.br +0 -0
  90. package/out/renderer/assets/gitGraphDiagram-UUTBAWPF-D6acFhfE.js.gz +0 -0
  91. package/out/renderer/assets/{graph-BZhxluo9.js → graph-DqFGMaSz.js} +2 -2
  92. package/out/renderer/assets/graph-DqFGMaSz.js.br +0 -0
  93. package/out/renderer/assets/graph-DqFGMaSz.js.gz +0 -0
  94. package/out/renderer/assets/highlighted-body-KPVGNVTW-D2IZ7Enb.js +18 -0
  95. package/out/renderer/assets/index-BZTYKZe8.css +382 -0
  96. package/out/renderer/assets/index-BZTYKZe8.css.br +0 -0
  97. package/out/renderer/assets/index-BZTYKZe8.css.gz +0 -0
  98. package/out/renderer/assets/{index-LmYTNvdF.js → index-BeEZXfJZ.js} +6397 -3000
  99. package/out/renderer/assets/index-BeEZXfJZ.js.br +0 -0
  100. package/out/renderer/assets/index-BeEZXfJZ.js.gz +0 -0
  101. package/out/renderer/assets/{infoDiagram-42DDH7IO-DqivEzWL.js → infoDiagram-42DDH7IO-BJeydI3V.js} +5 -5
  102. package/out/renderer/assets/infoDiagram-42DDH7IO-BJeydI3V.js.br +0 -0
  103. package/out/renderer/assets/infoDiagram-42DDH7IO-BJeydI3V.js.gz +0 -0
  104. package/out/renderer/assets/{ishikawaDiagram-UXIWVN3A-BKcg_z4w.js → ishikawaDiagram-UXIWVN3A-DPgToD8D.js} +2 -2
  105. package/out/renderer/assets/ishikawaDiagram-UXIWVN3A-DPgToD8D.js.br +0 -0
  106. package/out/renderer/assets/ishikawaDiagram-UXIWVN3A-DPgToD8D.js.gz +0 -0
  107. package/out/renderer/assets/{item-BHEUMM9H.js → item-SQsw2AyN.js} +20 -2
  108. package/out/renderer/assets/item-SQsw2AyN.js.br +0 -0
  109. package/out/renderer/assets/item-SQsw2AyN.js.gz +0 -0
  110. package/out/renderer/assets/{journeyDiagram-VCZTEJTY-Bvv8xuxQ.js → journeyDiagram-VCZTEJTY-CAnZXd__.js} +5 -5
  111. package/out/renderer/assets/journeyDiagram-VCZTEJTY-CAnZXd__.js.br +0 -0
  112. package/out/renderer/assets/journeyDiagram-VCZTEJTY-CAnZXd__.js.gz +0 -0
  113. package/out/renderer/assets/{kanban-definition-6JOO6SKY-C-gRMpeM.js → kanban-definition-6JOO6SKY-VCfgwCTi.js} +3 -3
  114. package/out/renderer/assets/kanban-definition-6JOO6SKY-VCfgwCTi.js.br +0 -0
  115. package/out/renderer/assets/kanban-definition-6JOO6SKY-VCfgwCTi.js.gz +0 -0
  116. package/out/renderer/assets/{layout-B4dSyItA.js → layout-lw2KhCMB.js} +4 -4
  117. package/out/renderer/assets/layout-lw2KhCMB.js.br +0 -0
  118. package/out/renderer/assets/layout-lw2KhCMB.js.gz +0 -0
  119. package/out/renderer/assets/{linear-CoVhuer7.js → linear-DmbMR7a-.js} +1 -1
  120. package/out/renderer/assets/linear-DmbMR7a-.js.br +0 -0
  121. package/out/renderer/assets/linear-DmbMR7a-.js.gz +0 -0
  122. package/out/renderer/assets/link-2-CWpGKoWR.js +40 -0
  123. package/out/renderer/assets/link-2-CWpGKoWR.js.br +0 -0
  124. package/out/renderer/assets/link-2-CWpGKoWR.js.gz +0 -0
  125. package/out/renderer/assets/{mermaid-GHXKKRXX-CZqkhGx7.js → mermaid-HWGCJPDP-BufLuIVq.js} +2175 -1421
  126. package/out/renderer/assets/mermaid-HWGCJPDP-BufLuIVq.js.br +0 -0
  127. package/out/renderer/assets/mermaid-HWGCJPDP-BufLuIVq.js.gz +0 -0
  128. package/out/renderer/assets/mic-UZHvCQhw.js +32 -0
  129. package/out/renderer/assets/{min-emzuJjmk.js → min-BCqStlR1.js} +2 -2
  130. package/out/renderer/assets/min-BCqStlR1.js.br +0 -0
  131. package/out/renderer/assets/min-BCqStlR1.js.gz +0 -0
  132. package/out/renderer/assets/{mindmap-definition-QFDTVHPH-DQ4JNECm.js → mindmap-definition-QFDTVHPH-C0dBO3f9.js} +4 -4
  133. package/out/renderer/assets/mindmap-definition-QFDTVHPH-C0dBO3f9.js.br +0 -0
  134. package/out/renderer/assets/mindmap-definition-QFDTVHPH-C0dBO3f9.js.gz +0 -0
  135. package/out/renderer/assets/open-guide-CWoE2W97.js +25 -0
  136. package/out/renderer/assets/package-search-SZPcR_1L.js +24 -0
  137. package/out/renderer/assets/{pdf-worker-wrapper-D6dv_dnM.js → pdf-worker-wrapper-BhxTGpd_.js} +4272 -4031
  138. package/out/renderer/assets/pdf-worker-wrapper-BhxTGpd_.js.br +0 -0
  139. package/out/renderer/assets/pdf-worker-wrapper-BhxTGpd_.js.gz +0 -0
  140. package/out/renderer/assets/{pieDiagram-DEJITSTG-0H6CGQQt.js → pieDiagram-DEJITSTG-Dv_tH6Z_.js} +7 -7
  141. package/out/renderer/assets/pieDiagram-DEJITSTG-Dv_tH6Z_.js.br +0 -0
  142. package/out/renderer/assets/pieDiagram-DEJITSTG-Dv_tH6Z_.js.gz +0 -0
  143. package/out/renderer/assets/plus-BZ0wwKkh.js +14 -0
  144. package/out/renderer/assets/pptx_parser_bg-DWVXsmNT.wasm +0 -0
  145. package/out/renderer/assets/{quadrantDiagram-34T5L4WZ-D0aPKp5z.js → quadrantDiagram-34T5L4WZ-Cvsj5cyu.js} +3 -3
  146. package/out/renderer/assets/quadrantDiagram-34T5L4WZ-Cvsj5cyu.js.br +0 -0
  147. package/out/renderer/assets/quadrantDiagram-34T5L4WZ-Cvsj5cyu.js.gz +0 -0
  148. package/out/renderer/assets/render-worker-CeK_iqK3-CEdVqR_f.js +10 -0
  149. package/out/renderer/assets/render-worker-CeK_iqK3-CEdVqR_f.js.br +0 -0
  150. package/out/renderer/assets/render-worker-CeK_iqK3-CEdVqR_f.js.gz +0 -0
  151. package/out/renderer/assets/render-worker-DusrDhPk-5_1DCyiC.js +11 -0
  152. package/out/renderer/assets/render-worker-DusrDhPk-5_1DCyiC.js.br +0 -0
  153. package/out/renderer/assets/render-worker-DusrDhPk-5_1DCyiC.js.gz +0 -0
  154. package/out/renderer/assets/render-worker-host-BfbnEChF-eMcx2LD6.js +7 -0
  155. package/out/renderer/assets/render-worker-host-DNL9dWRh-0PvDWYen.js +7 -0
  156. package/out/renderer/assets/render-worker-host-IkHrYOci-Bq59hMNS.js +7 -0
  157. package/out/renderer/assets/render-worker-n2ZG0lrQ-wiQeYL70.js +31 -0
  158. package/out/renderer/assets/render-worker-n2ZG0lrQ-wiQeYL70.js.br +0 -0
  159. package/out/renderer/assets/render-worker-n2ZG0lrQ-wiQeYL70.js.gz +0 -0
  160. package/out/renderer/assets/{requirementDiagram-MS252O5E-BkzwapW_.js → requirementDiagram-MS252O5E-CxM7H308.js} +4 -4
  161. package/out/renderer/assets/requirementDiagram-MS252O5E-CxM7H308.js.br +0 -0
  162. package/out/renderer/assets/requirementDiagram-MS252O5E-CxM7H308.js.gz +0 -0
  163. package/out/renderer/assets/{resizable-cStzNJ8V.js → resizable-DD8ADhVy.js} +216 -207
  164. package/out/renderer/assets/resizable-DD8ADhVy.js.br +0 -0
  165. package/out/renderer/assets/resizable-DD8ADhVy.js.gz +0 -0
  166. package/out/renderer/assets/{sankeyDiagram-XADWPNL6-Dbde7usj.js → sankeyDiagram-XADWPNL6-BGTOA6ee.js} +2 -2
  167. package/out/renderer/assets/sankeyDiagram-XADWPNL6-BGTOA6ee.js.br +0 -0
  168. package/out/renderer/assets/sankeyDiagram-XADWPNL6-BGTOA6ee.js.gz +0 -0
  169. package/out/renderer/assets/{schedule-DNMCsk-G.js → schedule-DMyyz9A1.js} +24 -13
  170. package/out/renderer/assets/schedule-DMyyz9A1.js.br +0 -0
  171. package/out/renderer/assets/schedule-DMyyz9A1.js.gz +0 -0
  172. package/out/renderer/assets/{schemas-c0X-G5_P.js → schemas-BL-_QQNp.js} +2248 -1112
  173. package/out/renderer/assets/schemas-BL-_QQNp.js.br +0 -0
  174. package/out/renderer/assets/schemas-BL-_QQNp.js.gz +0 -0
  175. package/out/renderer/assets/search-XexOgLud.js +26 -0
  176. package/out/renderer/assets/{sequenceDiagram-FGHM5R23-DI8l1pSL.js → sequenceDiagram-FGHM5R23-DezlXo1X.js} +4 -4
  177. package/out/renderer/assets/sequenceDiagram-FGHM5R23-DezlXo1X.js.br +0 -0
  178. package/out/renderer/assets/sequenceDiagram-FGHM5R23-DezlXo1X.js.gz +0 -0
  179. package/out/renderer/assets/{session-Bn5k9ScR.js → session-DQEqHTKb.js} +1238 -451
  180. package/out/renderer/assets/session-DQEqHTKb.js.br +0 -0
  181. package/out/renderer/assets/session-DQEqHTKb.js.gz +0 -0
  182. package/out/renderer/assets/{setting-dialog-sqfPfGsy.js → setting-dialog-BdiZbd8J.js} +79 -25
  183. package/out/renderer/assets/setting-dialog-BdiZbd8J.js.br +0 -0
  184. package/out/renderer/assets/setting-dialog-BdiZbd8J.js.gz +0 -0
  185. package/out/renderer/assets/settings-2-q22Cv4G7.js +16 -0
  186. package/out/renderer/assets/{settings-agents-Bntc31Nn.js → settings-agents-f3HkdiTw.js} +28 -16
  187. package/out/renderer/assets/settings-agents-f3HkdiTw.js.br +0 -0
  188. package/out/renderer/assets/settings-agents-f3HkdiTw.js.gz +0 -0
  189. package/out/renderer/assets/{settings-general-DhbLb9cP.js → settings-general-BcCOVmx3.js} +75 -41
  190. package/out/renderer/assets/settings-general-BcCOVmx3.js.br +0 -0
  191. package/out/renderer/assets/settings-general-BcCOVmx3.js.gz +0 -0
  192. package/out/renderer/assets/{settings-ilink-C7nGGjwT.js → settings-ilink-Da336Koc.js} +15 -10
  193. package/out/renderer/assets/settings-ilink-Da336Koc.js.br +0 -0
  194. package/out/renderer/assets/settings-ilink-Da336Koc.js.gz +0 -0
  195. package/out/renderer/assets/{settings-image-generation-H2dgqG7Y.js → settings-image-generation-RmWs73ZG.js} +8 -8
  196. package/out/renderer/assets/settings-image-generation-RmWs73ZG.js.br +0 -0
  197. package/out/renderer/assets/settings-image-generation-RmWs73ZG.js.gz +0 -0
  198. package/out/renderer/assets/{settings-layout-ATto1xpJ.js → settings-layout-DL6ZEzgP.js} +27 -15
  199. package/out/renderer/assets/settings-layout-DL6ZEzgP.js.br +0 -0
  200. package/out/renderer/assets/settings-layout-DL6ZEzgP.js.gz +0 -0
  201. package/out/renderer/assets/{settings-mcp-DUdMuoJ-.js → settings-mcp-BKW8JKtO.js} +26 -21
  202. package/out/renderer/assets/settings-mcp-BKW8JKtO.js.br +0 -0
  203. package/out/renderer/assets/settings-mcp-BKW8JKtO.js.gz +0 -0
  204. package/out/renderer/assets/{settings-memory-CJLG4aHW.js → settings-memory-o4r-_vob.js} +13 -9
  205. package/out/renderer/assets/settings-memory-o4r-_vob.js.br +0 -0
  206. package/out/renderer/assets/settings-memory-o4r-_vob.js.gz +0 -0
  207. package/out/renderer/assets/settings-shortcuts-BmUGS1q_.js +280 -0
  208. package/out/renderer/assets/settings-shortcuts-BmUGS1q_.js.br +0 -0
  209. package/out/renderer/assets/settings-shortcuts-BmUGS1q_.js.gz +0 -0
  210. package/out/renderer/assets/{settings-snippets-B4VcnD5Z.js → settings-snippets-CpAOJmDF.js} +9 -9
  211. package/out/renderer/assets/settings-snippets-CpAOJmDF.js.br +0 -0
  212. package/out/renderer/assets/settings-snippets-CpAOJmDF.js.gz +0 -0
  213. package/out/renderer/assets/{settings-speech-to-text-DQ7lfkTu.js → settings-speech-to-text-C8KHNGE4.js} +7 -7
  214. package/out/renderer/assets/settings-speech-to-text-C8KHNGE4.js.br +0 -0
  215. package/out/renderer/assets/settings-speech-to-text-C8KHNGE4.js.gz +0 -0
  216. package/out/renderer/assets/{settings-webui-DZf9O-6j.js → settings-webui-DIEKvTrI.js} +2 -2
  217. package/out/renderer/assets/settings-webui-DIEKvTrI.js.br +0 -0
  218. package/out/renderer/assets/settings-webui-DIEKvTrI.js.gz +0 -0
  219. package/out/renderer/assets/{skills-installed-Dp0r_4I-.js → skills-installed-BuWBDk6r.js} +5 -5
  220. package/out/renderer/assets/skills-installed-BuWBDk6r.js.br +0 -0
  221. package/out/renderer/assets/skills-installed-BuWBDk6r.js.gz +0 -0
  222. package/out/renderer/assets/{skills-layout-D-5rlY38.js → skills-layout-ByPhfHG6.js} +2 -2
  223. package/out/renderer/assets/skills-layout-ByPhfHG6.js.br +0 -0
  224. package/out/renderer/assets/skills-layout-ByPhfHG6.js.gz +0 -0
  225. package/out/renderer/assets/{skills-skills-sh-CcLoIrSw.js → skills-skills-sh-wR7YNmAJ.js} +4 -4
  226. package/out/renderer/assets/skills-skills-sh-wR7YNmAJ.js.br +0 -0
  227. package/out/renderer/assets/skills-skills-sh-wR7YNmAJ.js.gz +0 -0
  228. package/out/renderer/assets/{sortable.esm-knFxDx0Y.js → sortable.esm-BWvT9HIK.js} +15 -10
  229. package/out/renderer/assets/sortable.esm-BWvT9HIK.js.br +0 -0
  230. package/out/renderer/assets/sortable.esm-BWvT9HIK.js.gz +0 -0
  231. package/out/renderer/assets/{standard-schema-dKXoCekr.js → standard-schema-BkTVIf7N.js} +376 -170
  232. package/out/renderer/assets/standard-schema-BkTVIf7N.js.br +0 -0
  233. package/out/renderer/assets/standard-schema-BkTVIf7N.js.gz +0 -0
  234. package/out/renderer/assets/{stateDiagram-FHFEXIEX-DWWz4PMv.js → stateDiagram-FHFEXIEX-xdKKCs-p.js} +9 -9
  235. package/out/renderer/assets/stateDiagram-FHFEXIEX-xdKKCs-p.js.br +0 -0
  236. package/out/renderer/assets/stateDiagram-FHFEXIEX-xdKKCs-p.js.gz +0 -0
  237. package/out/renderer/assets/{stateDiagram-v2-QKLJ7IA2-Dm2qD5bg.js → stateDiagram-v2-QKLJ7IA2-BaaiQ6Kr.js} +5 -5
  238. package/out/renderer/assets/{task-C5dyYbfn.js → task-PHAOSE-W.js} +12 -12
  239. package/out/renderer/assets/task-PHAOSE-W.js.br +0 -0
  240. package/out/renderer/assets/task-PHAOSE-W.js.gz +0 -0
  241. package/out/renderer/assets/{textarea-DTqKlQbL.js → textarea-1ZWl3C-x.js} +2 -2
  242. package/out/renderer/assets/{timeline-definition-GMOUNBTQ-A1tEoL9d.js → timeline-definition-GMOUNBTQ-DFLeLybV.js} +3 -3
  243. package/out/renderer/assets/timeline-definition-GMOUNBTQ-DFLeLybV.js.br +0 -0
  244. package/out/renderer/assets/timeline-definition-GMOUNBTQ-DFLeLybV.js.gz +0 -0
  245. package/out/renderer/assets/{vennDiagram-DHZGUBPP-tNdYrJi_.js → vennDiagram-DHZGUBPP-PKmZLY7H.js} +2 -2
  246. package/out/renderer/assets/vennDiagram-DHZGUBPP-PKmZLY7H.js.br +0 -0
  247. package/out/renderer/assets/vennDiagram-DHZGUBPP-PKmZLY7H.js.gz +0 -0
  248. package/out/renderer/assets/{wardley-RL74JXVD-BxN5_Sp6.js → wardley-RL74JXVD-BCH2vKnv.js} +4 -4
  249. package/out/renderer/assets/wardley-RL74JXVD-BCH2vKnv.js.br +0 -0
  250. package/out/renderer/assets/wardley-RL74JXVD-BCH2vKnv.js.gz +0 -0
  251. package/out/renderer/assets/{wardleyDiagram-NUSXRM2D-B_3jA8zU.js → wardleyDiagram-NUSXRM2D-Bkd3xMno.js} +6 -6
  252. package/out/renderer/assets/wardleyDiagram-NUSXRM2D-Bkd3xMno.js.br +0 -0
  253. package/out/renderer/assets/wardleyDiagram-NUSXRM2D-Bkd3xMno.js.gz +0 -0
  254. package/out/renderer/assets/wrench-8H0LZ83G.js +48 -0
  255. package/out/renderer/assets/wrench-8H0LZ83G.js.br +0 -0
  256. package/out/renderer/assets/wrench-8H0LZ83G.js.gz +0 -0
  257. package/out/renderer/assets/{xlsx-view-Bv0YhA5m.js → xlsx-view-BYx5Ha2P.js} +49972 -32651
  258. package/out/renderer/assets/xlsx-view-BYx5Ha2P.js.br +0 -0
  259. package/out/renderer/assets/xlsx-view-BYx5Ha2P.js.gz +0 -0
  260. package/out/renderer/assets/{xlsx-view-Chm2gOCI.css → xlsx-view-CylPXjk8.css} +592 -530
  261. package/out/renderer/assets/xlsx-view-CylPXjk8.css.br +0 -0
  262. package/out/renderer/assets/xlsx-view-CylPXjk8.css.gz +0 -0
  263. package/out/renderer/assets/xlsx_parser_bg-B1AkeRhV.wasm +0 -0
  264. package/out/renderer/assets/{xychartDiagram-5P7HB3ND-NNVuzC4j.js → xychartDiagram-5P7HB3ND-DCOm4uPr.js} +3 -3
  265. package/out/renderer/assets/xychartDiagram-5P7HB3ND-DCOm4uPr.js.br +0 -0
  266. package/out/renderer/assets/xychartDiagram-5P7HB3ND-DCOm4uPr.js.gz +0 -0
  267. package/out/renderer/index.html +2 -2
  268. package/out/renderer/index.html.br +0 -0
  269. package/out/renderer/index.html.gz +0 -0
  270. package/out/scripts/mcp-skills/server.mjs +1 -1
  271. package/out/server/main.js +87 -5
  272. package/package.json +16 -16
  273. package/out/renderer/assets/_baseUniq-CJr3HkLS.js.br +0 -0
  274. package/out/renderer/assets/_baseUniq-CJr3HkLS.js.gz +0 -0
  275. package/out/renderer/assets/arc-POsBroTF.js.br +0 -0
  276. package/out/renderer/assets/arc-POsBroTF.js.gz +0 -0
  277. package/out/renderer/assets/architectureDiagram-Q4EWVU46-CmToUhDb.js.br +0 -0
  278. package/out/renderer/assets/architectureDiagram-Q4EWVU46-CmToUhDb.js.gz +0 -0
  279. package/out/renderer/assets/arrow-left-CxS1t3f7.js +0 -9
  280. package/out/renderer/assets/automation-Cyz3eLWp.js.br +0 -0
  281. package/out/renderer/assets/automation-Cyz3eLWp.js.gz +0 -0
  282. package/out/renderer/assets/blockDiagram-DXYQGD6D-M2nnTg9f.js.br +0 -0
  283. package/out/renderer/assets/blockDiagram-DXYQGD6D-M2nnTg9f.js.gz +0 -0
  284. package/out/renderer/assets/c4Diagram-AHTNJAMY-CwLtsy_0.js.br +0 -0
  285. package/out/renderer/assets/c4Diagram-AHTNJAMY-CwLtsy_0.js.gz +0 -0
  286. package/out/renderer/assets/chunk-4TB4RGXK-DXLZpPY5.js.br +0 -0
  287. package/out/renderer/assets/chunk-4TB4RGXK-DXLZpPY5.js.gz +0 -0
  288. package/out/renderer/assets/chunk-EDXVE4YY-CNjJEQfY.js.br +0 -0
  289. package/out/renderer/assets/chunk-EDXVE4YY-CNjJEQfY.js.gz +0 -0
  290. package/out/renderer/assets/chunk-OYMX7WX6-BG4B1VQ7.js.br +0 -0
  291. package/out/renderer/assets/chunk-OYMX7WX6-BG4B1VQ7.js.gz +0 -0
  292. package/out/renderer/assets/chunk-YZCP3GAM-jeoI2tsD.js.br +0 -0
  293. package/out/renderer/assets/chunk-YZCP3GAM-jeoI2tsD.js.gz +0 -0
  294. package/out/renderer/assets/circle-x-B1kBsMlS.js +0 -10
  295. package/out/renderer/assets/code-editor-CEXlC4aV.js.br +0 -0
  296. package/out/renderer/assets/code-editor-CEXlC4aV.js.gz +0 -0
  297. package/out/renderer/assets/collapsible-CMuCJUWG.js.br +0 -0
  298. package/out/renderer/assets/collapsible-CMuCJUWG.js.gz +0 -0
  299. package/out/renderer/assets/cose-bilkent-S5V4N54A-B3bgImVS.js.br +0 -0
  300. package/out/renderer/assets/cose-bilkent-S5V4N54A-B3bgImVS.js.gz +0 -0
  301. package/out/renderer/assets/dagre-KV5264BT-DTbumBA_.js.br +0 -0
  302. package/out/renderer/assets/dagre-KV5264BT-DTbumBA_.js.gz +0 -0
  303. package/out/renderer/assets/diagram-5BDNPKRD-B34Y6e8q.js.br +0 -0
  304. package/out/renderer/assets/diagram-5BDNPKRD-B34Y6e8q.js.gz +0 -0
  305. package/out/renderer/assets/diagram-G4DWMVQ6-BBiBmFR4.js.br +0 -0
  306. package/out/renderer/assets/diagram-G4DWMVQ6-BBiBmFR4.js.gz +0 -0
  307. package/out/renderer/assets/diagram-MMDJMWI5-P-YslDjG.js.br +0 -0
  308. package/out/renderer/assets/diagram-MMDJMWI5-P-YslDjG.js.gz +0 -0
  309. package/out/renderer/assets/diagram-TYMM5635-D_cLard_.js.br +0 -0
  310. package/out/renderer/assets/diagram-TYMM5635-D_cLard_.js.gz +0 -0
  311. package/out/renderer/assets/docx_parser_bg-CIRepKGp.wasm +0 -0
  312. package/out/renderer/assets/ellipsis-D1agTYu1.js +0 -10
  313. package/out/renderer/assets/erDiagram-SMLLAGMA-C1MHqKvC.js.br +0 -0
  314. package/out/renderer/assets/erDiagram-SMLLAGMA-C1MHqKvC.js.gz +0 -0
  315. package/out/renderer/assets/field-DR3J0r9e.js.br +0 -0
  316. package/out/renderer/assets/field-DR3J0r9e.js.gz +0 -0
  317. package/out/renderer/assets/file-text-nGCW6zu1.js +0 -18
  318. package/out/renderer/assets/flowDiagram-DWJPFMVM-DprlEc3Z.js.br +0 -0
  319. package/out/renderer/assets/flowDiagram-DWJPFMVM-DprlEc3Z.js.gz +0 -0
  320. package/out/renderer/assets/ganttDiagram-T4ZO3ILL-CbTdumBm.js.br +0 -0
  321. package/out/renderer/assets/ganttDiagram-T4ZO3ILL-CbTdumBm.js.gz +0 -0
  322. package/out/renderer/assets/gitGraphDiagram-UUTBAWPF-06bme-w8.js.br +0 -0
  323. package/out/renderer/assets/gitGraphDiagram-UUTBAWPF-06bme-w8.js.gz +0 -0
  324. package/out/renderer/assets/graph-BZhxluo9.js.br +0 -0
  325. package/out/renderer/assets/graph-BZhxluo9.js.gz +0 -0
  326. package/out/renderer/assets/highlighted-body-OFNGDK62-CvDMJtXf.js +0 -18
  327. package/out/renderer/assets/index-LmYTNvdF.js.br +0 -0
  328. package/out/renderer/assets/index-LmYTNvdF.js.gz +0 -0
  329. package/out/renderer/assets/index-aGJ_yZib.css +0 -382
  330. package/out/renderer/assets/index-aGJ_yZib.css.br +0 -0
  331. package/out/renderer/assets/index-aGJ_yZib.css.gz +0 -0
  332. package/out/renderer/assets/infoDiagram-42DDH7IO-DqivEzWL.js.br +0 -0
  333. package/out/renderer/assets/infoDiagram-42DDH7IO-DqivEzWL.js.gz +0 -0
  334. package/out/renderer/assets/ishikawaDiagram-UXIWVN3A-BKcg_z4w.js.br +0 -0
  335. package/out/renderer/assets/ishikawaDiagram-UXIWVN3A-BKcg_z4w.js.gz +0 -0
  336. package/out/renderer/assets/item-BHEUMM9H.js.br +0 -0
  337. package/out/renderer/assets/item-BHEUMM9H.js.gz +0 -0
  338. package/out/renderer/assets/journeyDiagram-VCZTEJTY-Bvv8xuxQ.js.br +0 -0
  339. package/out/renderer/assets/journeyDiagram-VCZTEJTY-Bvv8xuxQ.js.gz +0 -0
  340. package/out/renderer/assets/kanban-definition-6JOO6SKY-C-gRMpeM.js.br +0 -0
  341. package/out/renderer/assets/kanban-definition-6JOO6SKY-C-gRMpeM.js.gz +0 -0
  342. package/out/renderer/assets/layout-B4dSyItA.js.br +0 -0
  343. package/out/renderer/assets/layout-B4dSyItA.js.gz +0 -0
  344. package/out/renderer/assets/linear-CoVhuer7.js.br +0 -0
  345. package/out/renderer/assets/linear-CoVhuer7.js.gz +0 -0
  346. package/out/renderer/assets/link-2-DHUPzNSt.js +0 -24
  347. package/out/renderer/assets/mermaid-GHXKKRXX-CZqkhGx7.js.br +0 -0
  348. package/out/renderer/assets/mermaid-GHXKKRXX-CZqkhGx7.js.gz +0 -0
  349. package/out/renderer/assets/mic-BgSvicCB.js +0 -22
  350. package/out/renderer/assets/min-emzuJjmk.js.br +0 -0
  351. package/out/renderer/assets/min-emzuJjmk.js.gz +0 -0
  352. package/out/renderer/assets/mindmap-definition-QFDTVHPH-DQ4JNECm.js.br +0 -0
  353. package/out/renderer/assets/mindmap-definition-QFDTVHPH-DQ4JNECm.js.gz +0 -0
  354. package/out/renderer/assets/open-guide-CfLO-Sdk.js +0 -20
  355. package/out/renderer/assets/package-search-CrF2Iegl.js +0 -19
  356. package/out/renderer/assets/pdf-worker-wrapper-D6dv_dnM.js.br +0 -0
  357. package/out/renderer/assets/pdf-worker-wrapper-D6dv_dnM.js.gz +0 -0
  358. package/out/renderer/assets/pieDiagram-DEJITSTG-0H6CGQQt.js.br +0 -0
  359. package/out/renderer/assets/pieDiagram-DEJITSTG-0H6CGQQt.js.gz +0 -0
  360. package/out/renderer/assets/plus-YNCXW-GD.js +0 -9
  361. package/out/renderer/assets/pptx_parser_bg-Dnsy0qwf.wasm +0 -0
  362. package/out/renderer/assets/quadrantDiagram-34T5L4WZ-D0aPKp5z.js.br +0 -0
  363. package/out/renderer/assets/quadrantDiagram-34T5L4WZ-D0aPKp5z.js.gz +0 -0
  364. package/out/renderer/assets/refresh-cw-Bvm578nW.js +0 -11
  365. package/out/renderer/assets/render-worker-host-BG3a7brz-Q7Y2znhP.js +0 -25
  366. package/out/renderer/assets/render-worker-host-BG3a7brz-Q7Y2znhP.js.br +0 -0
  367. package/out/renderer/assets/render-worker-host-BG3a7brz-Q7Y2znhP.js.gz +0 -0
  368. package/out/renderer/assets/render-worker-host-CsB-dPJv-gJhIrzf_.js +0 -25
  369. package/out/renderer/assets/render-worker-host-CsB-dPJv-gJhIrzf_.js.br +0 -0
  370. package/out/renderer/assets/render-worker-host-CsB-dPJv-gJhIrzf_.js.gz +0 -0
  371. package/out/renderer/assets/render-worker-host-Cyv5Hkbh-BAiWfcv_.js +0 -25
  372. package/out/renderer/assets/render-worker-host-Cyv5Hkbh-BAiWfcv_.js.br +0 -0
  373. package/out/renderer/assets/render-worker-host-Cyv5Hkbh-BAiWfcv_.js.gz +0 -0
  374. package/out/renderer/assets/requirementDiagram-MS252O5E-BkzwapW_.js.br +0 -0
  375. package/out/renderer/assets/requirementDiagram-MS252O5E-BkzwapW_.js.gz +0 -0
  376. package/out/renderer/assets/resizable-cStzNJ8V.js.br +0 -0
  377. package/out/renderer/assets/resizable-cStzNJ8V.js.gz +0 -0
  378. package/out/renderer/assets/sankeyDiagram-XADWPNL6-Dbde7usj.js.br +0 -0
  379. package/out/renderer/assets/sankeyDiagram-XADWPNL6-Dbde7usj.js.gz +0 -0
  380. package/out/renderer/assets/schedule-DNMCsk-G.js.br +0 -0
  381. package/out/renderer/assets/schedule-DNMCsk-G.js.gz +0 -0
  382. package/out/renderer/assets/schemas-c0X-G5_P.js.br +0 -0
  383. package/out/renderer/assets/schemas-c0X-G5_P.js.gz +0 -0
  384. package/out/renderer/assets/search-BEY9yGF_.js +0 -16
  385. package/out/renderer/assets/sequenceDiagram-FGHM5R23-DI8l1pSL.js.br +0 -0
  386. package/out/renderer/assets/sequenceDiagram-FGHM5R23-DI8l1pSL.js.gz +0 -0
  387. package/out/renderer/assets/session-Bn5k9ScR.js.br +0 -0
  388. package/out/renderer/assets/session-Bn5k9ScR.js.gz +0 -0
  389. package/out/renderer/assets/setting-dialog-sqfPfGsy.js.br +0 -0
  390. package/out/renderer/assets/setting-dialog-sqfPfGsy.js.gz +0 -0
  391. package/out/renderer/assets/settings-2-DRhoXOO8.js +0 -11
  392. package/out/renderer/assets/settings-agents-Bntc31Nn.js.br +0 -0
  393. package/out/renderer/assets/settings-agents-Bntc31Nn.js.gz +0 -0
  394. package/out/renderer/assets/settings-general-DhbLb9cP.js.br +0 -0
  395. package/out/renderer/assets/settings-general-DhbLb9cP.js.gz +0 -0
  396. package/out/renderer/assets/settings-ilink-C7nGGjwT.js.br +0 -0
  397. package/out/renderer/assets/settings-ilink-C7nGGjwT.js.gz +0 -0
  398. package/out/renderer/assets/settings-image-generation-H2dgqG7Y.js.br +0 -0
  399. package/out/renderer/assets/settings-image-generation-H2dgqG7Y.js.gz +0 -0
  400. package/out/renderer/assets/settings-layout-ATto1xpJ.js.br +0 -0
  401. package/out/renderer/assets/settings-layout-ATto1xpJ.js.gz +0 -0
  402. package/out/renderer/assets/settings-mcp-DUdMuoJ-.js.br +0 -0
  403. package/out/renderer/assets/settings-mcp-DUdMuoJ-.js.gz +0 -0
  404. package/out/renderer/assets/settings-memory-CJLG4aHW.js.br +0 -0
  405. package/out/renderer/assets/settings-memory-CJLG4aHW.js.gz +0 -0
  406. package/out/renderer/assets/settings-snippets-B4VcnD5Z.js.br +0 -0
  407. package/out/renderer/assets/settings-snippets-B4VcnD5Z.js.gz +0 -0
  408. package/out/renderer/assets/settings-speech-to-text-DQ7lfkTu.js.br +0 -0
  409. package/out/renderer/assets/settings-speech-to-text-DQ7lfkTu.js.gz +0 -0
  410. package/out/renderer/assets/settings-webui-DZf9O-6j.js.br +0 -0
  411. package/out/renderer/assets/settings-webui-DZf9O-6j.js.gz +0 -0
  412. package/out/renderer/assets/skills-installed-Dp0r_4I-.js.br +0 -0
  413. package/out/renderer/assets/skills-installed-Dp0r_4I-.js.gz +0 -0
  414. package/out/renderer/assets/skills-layout-D-5rlY38.js.br +0 -0
  415. package/out/renderer/assets/skills-layout-D-5rlY38.js.gz +0 -0
  416. package/out/renderer/assets/skills-skills-sh-CcLoIrSw.js.br +0 -0
  417. package/out/renderer/assets/skills-skills-sh-CcLoIrSw.js.gz +0 -0
  418. package/out/renderer/assets/sortable.esm-knFxDx0Y.js.br +0 -0
  419. package/out/renderer/assets/sortable.esm-knFxDx0Y.js.gz +0 -0
  420. package/out/renderer/assets/standard-schema-dKXoCekr.js.br +0 -0
  421. package/out/renderer/assets/standard-schema-dKXoCekr.js.gz +0 -0
  422. package/out/renderer/assets/stateDiagram-FHFEXIEX-DWWz4PMv.js.br +0 -0
  423. package/out/renderer/assets/stateDiagram-FHFEXIEX-DWWz4PMv.js.gz +0 -0
  424. package/out/renderer/assets/task-C5dyYbfn.js.br +0 -0
  425. package/out/renderer/assets/task-C5dyYbfn.js.gz +0 -0
  426. package/out/renderer/assets/timeline-definition-GMOUNBTQ-A1tEoL9d.js.br +0 -0
  427. package/out/renderer/assets/timeline-definition-GMOUNBTQ-A1tEoL9d.js.gz +0 -0
  428. package/out/renderer/assets/vennDiagram-DHZGUBPP-tNdYrJi_.js.br +0 -0
  429. package/out/renderer/assets/vennDiagram-DHZGUBPP-tNdYrJi_.js.gz +0 -0
  430. package/out/renderer/assets/wardley-RL74JXVD-BxN5_Sp6.js.br +0 -0
  431. package/out/renderer/assets/wardley-RL74JXVD-BxN5_Sp6.js.gz +0 -0
  432. package/out/renderer/assets/wardleyDiagram-NUSXRM2D-B_3jA8zU.js.br +0 -0
  433. package/out/renderer/assets/wardleyDiagram-NUSXRM2D-B_3jA8zU.js.gz +0 -0
  434. package/out/renderer/assets/wrench-7r-g9MUq.js +0 -33
  435. package/out/renderer/assets/wrench-7r-g9MUq.js.br +0 -0
  436. package/out/renderer/assets/wrench-7r-g9MUq.js.gz +0 -0
  437. package/out/renderer/assets/xlsx-view-Bv0YhA5m.js.br +0 -0
  438. package/out/renderer/assets/xlsx-view-Bv0YhA5m.js.gz +0 -0
  439. package/out/renderer/assets/xlsx-view-Chm2gOCI.css.br +0 -0
  440. package/out/renderer/assets/xlsx-view-Chm2gOCI.css.gz +0 -0
  441. package/out/renderer/assets/xlsx_parser_bg-BM7cLtfq.wasm +0 -0
  442. package/out/renderer/assets/xychartDiagram-5P7HB3ND-NNVuzC4j.js.br +0 -0
  443. package/out/renderer/assets/xychartDiagram-5P7HB3ND-NNVuzC4j.js.gz +0 -0
@@ -1,205 +1,282 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./code-editor-CEXlC4aV.js","./index-LmYTNvdF.js","./index-aGJ_yZib.css","./mermaid-GHXKKRXX-CZqkhGx7.js","./code-editor-BwxubRqT.css"])))=>i.map(i=>d[i]);
2
- import { h as createLucideIcon, r as reactExports, am as formatErrorMessage, bq as ReactStore, br as popupStoreSelectors, bs as triggerHover, al as triggerPress, bt as escapeKey, bu as attachPreventUnmountOnClose, bv as closePress, bw as PATIENT_CLICK_THRESHOLD, ae as reactDomExports, bx as focusOut, by as setPopupOpenState, bz as createInitialPopupStoreState, bA as createPopupFloatingRootContext, bB as Timeout, bC as PopupTriggerMap, j as jsxRuntimeExports, bD as FloatingTree, bE as usePopupRootSync, bF as useImplicitActiveTrigger, bG as useOpenStateTransitions, ak as createChangeEventDetails, bH as imperativeAction, bI as PopupHandleAttachment, bJ as usePopupRootStore, bK as useDismiss, bL as usePopupInteractionProps, bM as usePopupHandleStore, ai as useBaseUiId, bN as useTriggerDataForwarding, bO as useHoverReferenceInteraction, bP as safePolygon, bQ as useClick, bR as useOpenMethodTriggerProps, aq as useButton, bS as useTriggerFocusGuards, ap as useRenderElement, bT as CLICK_TRIGGER_IDENTIFIER, bU as FocusGuard, bV as pressableTriggerOpenStateMapping, bW as triggerOpenStateMapping, bX as FloatingPortal, bY as POPUP_COLLISION_AVOIDANCE, bZ as useFloatingNodeId, at as useAnimationsFinished, b_ as useAnchorPositioning, au as useIsoLayoutEffect, b$ as useAnchoredPopupScrollLock, c0 as usePositioner, c1 as InternalBackdrop, c2 as inertValue, c3 as FloatingNode, aj as useStableCallback, c4 as useToolbarRootContext, av as useOpenChangeComplete, c5 as useHoverFloatingInteraction, c6 as createDefaultInitialFocus, c7 as FOCUSABLE_POPUP_PROPS, ba as COMPOSITE_KEYS, c8 as getDisabledMountTransitionStyles, c9 as FloatingFocusManager, ca as isHTMLElement, cb as popupTransitionStateMapping, u as useTranslation, b as useMessage, X as useNavigate, a as useAppStore, _ as Badge, cc as formatUpdatedTime, e as request, V as electron, ab as ALL_FEATURES, ac as FEATURE_I18N_KEYS, M as cn$1, c as Switch, B as Button, R as LoaderCircle, cd as buttonVariants, i as isWebUI, U as FolderOpen, C as Check, d as Copy, f as extractErrorMessage, aG as reduceFlushStreaming, aF as reduceSessionNotification, g as copyText, ad as React, ce as Tooltip, cf as TooltipTrigger, cg as TooltipContent, S as ScrollArea, a5 as Bot, ch as formatDuration, af as getDefaultExportFromCjs, ci as ReactDOM, Y as subscribe, cj as clientId, A as DropdownMenu, E as DropdownMenuTrigger, ck as ChevronDown, F as DropdownMenuContent, G as DropdownMenuItem, cl as v$2, J as generateUUID, cm as HoverCard, cn as HoverCardTrigger, co as HoverCardContent, cp as X$1, aI as Folder, L as Library, cq as DropdownMenuSub, cr as DropdownMenuSubTrigger, cs as DropdownMenuSubContent, ct as CircleQuestionMark, cu as ChevronUp, aH as Clock, aB as Tabs, aC as TabsList, aD as TabsTrigger, cv as z$1, a0 as CircleCheck, cw as __vitePreload, I as Input, m as ContextMenuContent, n as ContextMenuItem, o as ContextMenuSeparator, cx as Code, bk as EDITOR_LABELS, k as ContextMenu, l as ContextMenuTrigger, aE as webUIBaseUrl, aa as ChevronRight, cy as MessageSquare, cz as FolderPlus, P as Pencil, T as Trash2, cA as useProjectState, cB as TabsContent } from "./index-LmYTNvdF.js";
3
- import { S as Settings2 } from "./settings-2-DRhoXOO8.js";
4
- import { i as isValidMessageToDisplay, M as MessageBubble, A as ArrowUpToLine, S as Square, j as jsonToPrettyYamlExports, p as parseFileReference, c as CodeCompareView, r as resolveFileUrl, I as ImageView, P as PdfView, D as DocxView, a as PptxView, X as XlsxView, R as RotateCcw, F as Folders } from "./xlsx-view-Bv0YhA5m.js";
5
- import { M as Mic, C as Clipboard } from "./mic-BgSvicCB.js";
6
- import { I as Image, W as Wrench } from "./wrench-7r-g9MUq.js";
7
- import { F as FileText } from "./file-text-nGCW6zu1.js";
8
- import { A as ArrowLeft } from "./arrow-left-CxS1t3f7.js";
9
- import { aQ as CodeView, S as StreamMarkdown, aR as FileIcon } from "./mermaid-GHXKKRXX-CZqkhGx7.js";
10
- import { S as Search } from "./search-BEY9yGF_.js";
11
- import { E as ExternalLink } from "./link-2-DHUPzNSt.js";
12
- import { R as RefreshCw } from "./refresh-cw-Bvm578nW.js";
13
- import { P as Plus } from "./plus-YNCXW-GD.js";
14
- import { R as ResizablePanelGroup, a as ResizablePanel, b as ResizableHandle } from "./resizable-cStzNJ8V.js";
15
- import "./collapsible-CMuCJUWG.js";
16
- import "./item-BHEUMM9H.js";
17
- import "./schemas-c0X-G5_P.js";
18
- import "./ellipsis-D1agTYu1.js";
19
- const __iconNode$k = [
20
- ["path", { d: "M12 5v14", key: "s699le" }],
21
- ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
22
- ];
23
- const ArrowDown = createLucideIcon("arrow-down", __iconNode$k);
24
- const __iconNode$j = [
25
- ["path", { d: "M5 12h14", key: "1ays0h" }],
26
- ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
27
- ];
28
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$j);
29
- const __iconNode$i = [
30
- ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
31
- ["path", { d: "M12 19V5", key: "x0mq9r" }]
32
- ];
33
- const ArrowUp = createLucideIcon("arrow-up", __iconNode$i);
34
- const __iconNode$h = [
35
- [
36
- "path",
37
- {
38
- d: "M12.983 21.186a1 1 0 0 1-1.966 0 10 10 0 0 0-8.203-8.203 1 1 0 0 1 0-1.966 10 10 0 0 0 8.203-8.203 1 1 0 0 1 1.966 0 10 10 0 0 0 8.203 8.203 1 1 0 0 1 0 1.966 10 10 0 0 0-8.203 8.203",
39
- key: "1tipus"
40
- }
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./code-editor-BwPwET3m.js","./index-BeEZXfJZ.js","./index-BZTYKZe8.css","./mermaid-HWGCJPDP-BufLuIVq.js","./code-editor-BwxubRqT.css"])))=>i.map(i=>d[i]);
2
+ import { c as createLucideIcon, r as reactExports, ay as formatErrorMessage, bz as ReactStore, bA as popupStoreSelectors, bB as triggerHover, ax as triggerPress, bC as escapeKey, bD as attachPreventUnmountOnClose, bE as closePress, bF as PATIENT_CLICK_THRESHOLD, aq as reactDomExports, bG as focusOut, bH as createPopupOpenState, bI as createInitialPopupStoreState, bJ as Timeout, bK as PopupTriggerMap, j as jsxRuntimeExports, bL as FloatingTree, bM as fastComponent, bN as usePopupRootSync, bO as useImplicitActiveTrigger, bP as useOpenStateTransitions, aw as createChangeEventDetails, bQ as imperativeAction, bR as PopupHandleAttachment, bS as usePopupRootStore, bT as useDismiss, bU as usePopupInteractionProps, bV as fastComponentRef, bW as usePopupHandleStore, au as useBaseUiId, bX as useTriggerDataForwarding, bY as useHoverReferenceInteraction, bZ as safePolygon, b_ as useClick, b$ as useOpenMethodTriggerProps, aC as useButton, c0 as useTriggerFocusGuards, aB as useRenderElement, c1 as CLICK_TRIGGER_IDENTIFIER, c2 as FocusGuard, c3 as pressableTriggerOpenStateMapping, c4 as triggerOpenStateMapping, c5 as FloatingPortal, c6 as POPUP_COLLISION_AVOIDANCE, c7 as useFloatingNodeId, aF as useAnimationsFinished, c8 as useAnchorPositioning, aG as useIsoLayoutEffect, c9 as useAnchoredPopupScrollLock, ca as usePositioner, cb as InternalBackdrop, cc as inertValue, cd as FloatingNode, av as useStableCallback, ce as useToolbarRootContext, aH as useOpenChangeComplete, cf as useHoverFloatingInteraction, cg as createDefaultInitialFocus, ch as FOCUSABLE_POPUP_PROPS, bj as COMPOSITE_KEYS, ci as getDisabledMountTransitionStyles, cj as FloatingFocusManager, ck as isHTMLElement, cl as popupTransitionStateMapping, u as useTranslation, b as useMessage, X as useNavigate, a as useAppStore, f as request, g as extractErrorMessage, _ as Badge, cm as formatUpdatedTime, V as electron, ah as Tabs, ai as TabsList, aj as TabsTrigger, af as ALL_FEATURES, ag as FEATURE_I18N_KEYS, M as cn$1, d as Switch, B as Button, R as LoaderCircle, cn as buttonVariants, C as Check, e as Copy, i as isWebUI, U as FolderOpen, co as restartSession, cp as SessionLifecycleBusyError, cq as closeSession, h as copyText, cr as RestartSessionError, ap as React, cs as Tooltip, ct as TooltipTrigger, cu as TooltipContent, cv as useFocusTarget, S as ScrollArea, a1 as Bot, cw as formatDuration, ar as getDefaultExportFromCjs, cx as ReactDOM, Y as subscribe, cy as clientId, A as DropdownMenu, E as DropdownMenuTrigger, cz as ChevronDown, F as DropdownMenuContent, G as DropdownMenuItem, cA as v$2, J as generateUUID, aP as reduceFlushStreaming, cB as HoverCard, cC as HoverCardTrigger, cD as HoverCardContent, cE as X$1, aR as Folder, L as Library, cF as DropdownMenuSub, cG as DropdownMenuSubTrigger, cH as DropdownMenuSubContent, cI as CircleQuestionMark, cJ as ChevronUp, aQ as Clock, cK as z$1, a0 as CircleCheck, cL as __vitePreload, I as Input, m as ContextMenuContent, n as ContextMenuItem, o as ContextMenuSeparator, cM as Code, bt as EDITOR_LABELS, k as ContextMenu, l as ContextMenuTrigger, aN as webUIBaseUrl, a6 as RefreshCw, a7 as ChevronRight, cN as MessageSquare, cO as FolderPlus, cP as Eye, P as Pencil, T as Trash, cQ as useProjectState, cR as useFocusTargetRegistry, cS as TabsContent, cT as loadSession } from "./index-BeEZXfJZ.js";
3
+ import { S as Settings2 } from "./settings-2-q22Cv4G7.js";
4
+ import { i as isValidMessageToDisplay, M as MessageBubble, A as ArrowUpToLine, S as Square, j as jsonToPrettyYamlExports, p as parseFileReference, c as CodeCompareView, r as resolveFileUrl, I as ImageView, P as PdfView, D as DocxView, a as PptxView, X as XlsxView, R as RotateCcw, F as Folders } from "./xlsx-view-BYx5Ha2P.js";
5
+ import { a as ArrowDown, A as ArrowUp, b as ArrowRight } from "./arrow-up-quD46bYg.js";
6
+ import { M as Mic, C as Clipboard } from "./mic-UZHvCQhw.js";
7
+ import { I as Image, W as Wrench } from "./wrench-8H0LZ83G.js";
8
+ import { F as FileText } from "./file-text-DDtS1g4Q.js";
9
+ import { A as ArrowLeft } from "./arrow-left-BnuWerui.js";
10
+ import { aQ as CodeView, S as StreamMarkdown, aR as FileIcon } from "./mermaid-HWGCJPDP-BufLuIVq.js";
11
+ import { S as Search } from "./search-XexOgLud.js";
12
+ import { E as ExternalLink } from "./link-2-CWpGKoWR.js";
13
+ import { P as Plus } from "./plus-BZ0wwKkh.js";
14
+ import { R as ResizablePanelGroup, a as ResizablePanel, b as ResizableHandle } from "./resizable-DD8ADhVy.js";
15
+ import "./collapsible-CMQ8h8ID.js";
16
+ import "./item-SQsw2AyN.js";
17
+ import "./schemas-BL-_QQNp.js";
18
+ import "./ellipsis-D_eCkauJ.js";
19
+ const __iconData$h = {
20
+ name: "astroid",
21
+ size: 24,
22
+ node: [
23
+ [
24
+ "path",
25
+ {
26
+ d: "M12.983 21.186a1 1 0 0 1-1.966 0 10 10 0 0 0-8.203-8.203 1 1 0 0 1 0-1.966 10 10 0 0 0 8.203-8.203 1 1 0 0 1 1.966 0 10 10 0 0 0 8.203 8.203 1 1 0 0 1 0 1.966 10 10 0 0 0-8.203 8.203",
27
+ key: "1tipus"
28
+ }
29
+ ]
41
30
  ]
42
- ];
43
- const Astroid = createLucideIcon("astroid", __iconNode$h);
44
- const __iconNode$g = [
45
- ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
46
- ["path", { d: "M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8", key: "7n84p3" }]
47
- ];
48
- const AtSign = createLucideIcon("at-sign", __iconNode$g);
49
- const __iconNode$f = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
50
- const Circle = createLucideIcon("circle", __iconNode$f);
51
- const __iconNode$e = [
52
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
53
- ["path", { d: "M12 2a7 7 0 1 0 10 10", key: "1yuj32" }]
54
- ];
55
- const Eclipse = createLucideIcon("eclipse", __iconNode$e);
56
- const __iconNode$d = [
57
- [
58
- "path",
59
- {
60
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
61
- key: "1oefj6"
62
- }
63
- ],
64
- ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
65
- ["path", { d: "M9 15h6", key: "cctwl0" }],
66
- ["path", { d: "M12 18v-6", key: "17g6i2" }]
67
- ];
68
- const FilePlus = createLucideIcon("file-plus", __iconNode$d);
69
- const __iconNode$c = [
70
- ["path", { d: "m12 14 4-4", key: "9kzdfg" }],
71
- ["path", { d: "M3.34 19a10 10 0 1 1 17.32 0", key: "19p75a" }]
72
- ];
73
- const Gauge = createLucideIcon("gauge", __iconNode$c);
74
- const __iconNode$b = [
75
- ["path", { d: "M15 6a9 9 0 0 0-9 9V3", key: "1cii5b" }],
76
- ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
77
- ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }]
78
- ];
79
- const GitBranch = createLucideIcon("git-branch", __iconNode$b);
80
- const __iconNode$a = [
81
- ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
82
- ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
83
- ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
84
- ["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }]
85
- ];
86
- const Hash = createLucideIcon("hash", __iconNode$a);
87
- const __iconNode$9 = [
88
- [
89
- "path",
90
- {
91
- d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",
92
- key: "zw3jo"
93
- }
94
- ],
95
- [
96
- "path",
97
- {
98
- d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",
99
- key: "1wduqc"
100
- }
101
- ],
102
- [
103
- "path",
104
- {
105
- d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",
106
- key: "kqbvx6"
107
- }
31
+ };
32
+ __iconData$h.node;
33
+ const Astroid = createLucideIcon(__iconData$h);
34
+ const __iconData$g = {
35
+ name: "at-sign",
36
+ size: 24,
37
+ node: [
38
+ ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
39
+ ["path", { d: "M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8", key: "7n84p3" }]
108
40
  ]
109
- ];
110
- const Layers = createLucideIcon("layers", __iconNode$9);
111
- const __iconNode$8 = [
112
- ["path", { d: "M3 5h8", key: "18g2rq" }],
113
- ["path", { d: "M3 12h8", key: "1xfjp6" }],
114
- ["path", { d: "M3 19h8", key: "fpbke4" }],
115
- ["path", { d: "m15 5 3 3 3-3", key: "1t4thf" }],
116
- ["path", { d: "m15 19 3-3 3 3", key: "y4ckd2" }]
117
- ];
118
- const ListChevronsDownUp = createLucideIcon("list-chevrons-down-up", __iconNode$8);
119
- const __iconNode$7 = [
120
- [
121
- "path",
122
- {
123
- d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
124
- key: "18887p"
125
- }
126
- ],
127
- ["path", { d: "M12 8v6", key: "1ib9pf" }],
128
- ["path", { d: "M9 11h6", key: "1fldmi" }]
129
- ];
130
- const MessageSquarePlus = createLucideIcon("message-square-plus", __iconNode$7);
131
- const __iconNode$6 = [
132
- [
133
- "path",
134
- {
135
- d: "M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",
136
- key: "1n2ejm"
137
- }
41
+ };
42
+ __iconData$g.node;
43
+ const AtSign = createLucideIcon(__iconData$g);
44
+ const __iconData$f = {
45
+ name: "circle",
46
+ size: 24,
47
+ node: [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]]
48
+ };
49
+ __iconData$f.node;
50
+ const Circle = createLucideIcon(__iconData$f);
51
+ const __iconData$e = {
52
+ name: "eclipse",
53
+ size: 24,
54
+ node: [
55
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
56
+ ["path", { d: "M12 2a7 7 0 1 0 10 10", key: "1yuj32" }]
57
+ ]
58
+ };
59
+ __iconData$e.node;
60
+ const Eclipse = createLucideIcon(__iconData$e);
61
+ const __iconData$d = {
62
+ name: "file-plus",
63
+ size: 24,
64
+ node: [
65
+ [
66
+ "path",
67
+ {
68
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
69
+ key: "1oefj6"
70
+ }
71
+ ],
72
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
73
+ ["path", { d: "M9 15h6", key: "cctwl0" }],
74
+ ["path", { d: "M12 18v-6", key: "17g6i2" }]
75
+ ]
76
+ };
77
+ __iconData$d.node;
78
+ const FilePlus = createLucideIcon(__iconData$d);
79
+ const __iconData$c = {
80
+ name: "gauge",
81
+ size: 24,
82
+ node: [
83
+ ["path", { d: "m12 14 4-4", key: "9kzdfg" }],
84
+ ["path", { d: "M3.34 19a10 10 0 1 1 17.32 0", key: "19p75a" }]
85
+ ]
86
+ };
87
+ __iconData$c.node;
88
+ const Gauge = createLucideIcon(__iconData$c);
89
+ const __iconData$b = {
90
+ name: "git-branch",
91
+ size: 24,
92
+ node: [
93
+ ["path", { d: "M15 6a9 9 0 0 0-9 9V3", key: "1cii5b" }],
94
+ ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
95
+ ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }]
96
+ ]
97
+ };
98
+ __iconData$b.node;
99
+ const GitBranch = createLucideIcon(__iconData$b);
100
+ const __iconData$a = {
101
+ name: "hash",
102
+ size: 24,
103
+ node: [
104
+ ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
105
+ ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
106
+ ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
107
+ ["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }]
108
+ ]
109
+ };
110
+ __iconData$a.node;
111
+ const Hash = createLucideIcon(__iconData$a);
112
+ const __iconData$9 = {
113
+ name: "layers",
114
+ size: 24,
115
+ node: [
116
+ [
117
+ "path",
118
+ {
119
+ d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",
120
+ key: "zw3jo"
121
+ }
122
+ ],
123
+ [
124
+ "path",
125
+ {
126
+ d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",
127
+ key: "1wduqc"
128
+ }
129
+ ],
130
+ [
131
+ "path",
132
+ {
133
+ d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",
134
+ key: "kqbvx6"
135
+ }
136
+ ]
138
137
  ],
139
- [
140
- "path",
141
- {
142
- d: "M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",
143
- key: "1qfcsi"
144
- }
138
+ aliases: ["layers-3"]
139
+ };
140
+ __iconData$9.node;
141
+ const Layers = createLucideIcon(__iconData$9);
142
+ const __iconData$8 = {
143
+ name: "list-chevrons-down-up",
144
+ size: 24,
145
+ node: [
146
+ ["path", { d: "M3 5h8", key: "18g2rq" }],
147
+ ["path", { d: "M3 12h8", key: "1xfjp6" }],
148
+ ["path", { d: "M3 19h8", key: "fpbke4" }],
149
+ ["path", { d: "m15 5 3 3 3-3", key: "1t4thf" }],
150
+ ["path", { d: "m15 19 3-3 3 3", key: "y4ckd2" }]
145
151
  ]
146
- ];
147
- const MessagesSquare = createLucideIcon("messages-square", __iconNode$6);
148
- const __iconNode$5 = [
149
- [
150
- "path",
151
- {
152
- d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",
153
- key: "1miecu"
154
- }
152
+ };
153
+ __iconData$8.node;
154
+ const ListChevronsDownUp = createLucideIcon(__iconData$8);
155
+ const __iconData$7 = {
156
+ name: "message-square-plus",
157
+ size: 24,
158
+ node: [
159
+ [
160
+ "path",
161
+ {
162
+ d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
163
+ key: "18887p"
164
+ }
165
+ ],
166
+ ["path", { d: "M12 8v6", key: "1ib9pf" }],
167
+ ["path", { d: "M9 11h6", key: "1fldmi" }]
155
168
  ]
156
- ];
157
- const Paperclip = createLucideIcon("paperclip", __iconNode$5);
158
- const __iconNode$4 = [
159
- ["path", { d: "M10 7v10a5 5 0 0 0 5-5", key: "1blmz7" }],
160
- ["path", { d: "m14 8-6 3", key: "2tb98i" }],
161
- [
162
- "path",
163
- {
164
- d: "M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",
165
- key: "ycz6yz"
166
- }
169
+ };
170
+ __iconData$7.node;
171
+ const MessageSquarePlus = createLucideIcon(__iconData$7);
172
+ const __iconData$6 = {
173
+ name: "messages-square",
174
+ size: 24,
175
+ node: [
176
+ [
177
+ "path",
178
+ {
179
+ d: "M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",
180
+ key: "1n2ejm"
181
+ }
182
+ ],
183
+ [
184
+ "path",
185
+ {
186
+ d: "M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",
187
+ key: "1qfcsi"
188
+ }
189
+ ]
167
190
  ]
168
- ];
169
- const ReceiptTurkishLira = createLucideIcon("receipt-turkish-lira", __iconNode$4);
170
- const __iconNode$3 = [
171
- ["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
172
- ["path", { d: "M21 3v5h-5", key: "1q7to0" }]
173
- ];
174
- const RotateCw = createLucideIcon("rotate-cw", __iconNode$3);
175
- const __iconNode$2 = [
176
- [
177
- "path",
178
- {
179
- d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
180
- key: "1c8476"
181
- }
191
+ };
192
+ __iconData$6.node;
193
+ const MessagesSquare = createLucideIcon(__iconData$6);
194
+ const __iconData$5 = {
195
+ name: "paperclip",
196
+ size: 24,
197
+ node: [
198
+ [
199
+ "path",
200
+ {
201
+ d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",
202
+ key: "1miecu"
203
+ }
204
+ ]
205
+ ]
206
+ };
207
+ __iconData$5.node;
208
+ const Paperclip = createLucideIcon(__iconData$5);
209
+ const __iconData$4 = {
210
+ name: "receipt-turkish-lira",
211
+ size: 24,
212
+ node: [
213
+ ["path", { d: "M10 7v10a5 5 0 0 0 5-5", key: "1blmz7" }],
214
+ ["path", { d: "m14 8-6 3", key: "2tb98i" }],
215
+ [
216
+ "path",
217
+ {
218
+ d: "M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",
219
+ key: "ycz6yz"
220
+ }
221
+ ]
222
+ ]
223
+ };
224
+ __iconData$4.node;
225
+ const ReceiptTurkishLira = createLucideIcon(__iconData$4);
226
+ const __iconData$3 = {
227
+ name: "rotate-cw",
228
+ size: 24,
229
+ node: [
230
+ ["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
231
+ ["path", { d: "M21 3v5h-5", key: "1q7to0" }]
232
+ ]
233
+ };
234
+ __iconData$3.node;
235
+ const RotateCw = createLucideIcon(__iconData$3);
236
+ const __iconData$2 = {
237
+ name: "save",
238
+ size: 24,
239
+ node: [
240
+ [
241
+ "path",
242
+ {
243
+ d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
244
+ key: "1c8476"
245
+ }
246
+ ],
247
+ ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
248
+ ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
249
+ ]
250
+ };
251
+ __iconData$2.node;
252
+ const Save = createLucideIcon(__iconData$2);
253
+ const __iconData$1 = {
254
+ name: "square-terminal",
255
+ size: 24,
256
+ node: [
257
+ ["path", { d: "m7 11 2-2-2-2", key: "1lz0vl" }],
258
+ ["path", { d: "M11 13h4", key: "1p7l4v" }],
259
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }]
182
260
  ],
183
- ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
184
- ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
185
- ];
186
- const Save = createLucideIcon("save", __iconNode$2);
187
- const __iconNode$1 = [
188
- ["path", { d: "m7 11 2-2-2-2", key: "1lz0vl" }],
189
- ["path", { d: "M11 13h4", key: "1p7l4v" }],
190
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }]
191
- ];
192
- const SquareTerminal = createLucideIcon("square-terminal", __iconNode$1);
193
- const __iconNode = [
194
- [
195
- "path",
196
- {
197
- d: "M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",
198
- key: "1v7up4"
199
- }
261
+ aliases: ["terminal-square"]
262
+ };
263
+ __iconData$1.node;
264
+ const SquareTerminal = createLucideIcon(__iconData$1);
265
+ const __iconData = {
266
+ name: "zap",
267
+ size: 24,
268
+ node: [
269
+ [
270
+ "path",
271
+ {
272
+ d: "M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",
273
+ key: "1v7up4"
274
+ }
275
+ ]
200
276
  ]
201
- ];
202
- const Zap = createLucideIcon("zap", __iconNode);
277
+ };
278
+ __iconData.node;
279
+ const Zap = createLucideIcon(__iconData);
203
280
  const PopoverRootContext = /* @__PURE__ */ reactExports.createContext(void 0);
204
281
  function usePopoverRootContext(optional) {
205
282
  const context = reactExports.useContext(PopoverRootContext);
@@ -243,12 +320,9 @@ class PopoverStore extends ReactStore {
243
320
  }
244
321
  this.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
245
322
  const changeState = () => {
246
- const updatedState = {
247
- open: nextOpen,
248
- openChangeReason: eventDetails.reason
249
- };
250
- setPopupOpenState(updatedState, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
251
- this.update(updatedState);
323
+ const popupOpenState = createPopupOpenState(this.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
324
+ popupOpenState.openChangeReason = eventDetails.reason;
325
+ this.update(popupOpenState);
252
326
  };
253
327
  if (isHover) {
254
328
  this.set("stickIfOpen", true);
@@ -272,7 +346,7 @@ class PopoverStore extends ReactStore {
272
346
  }
273
347
  function createInitialState(initialState, triggerElements, floatingId, nested = false) {
274
348
  const state = {
275
- ...createInitialPopupStoreState(),
349
+ ...createInitialPopupStoreState(triggerElements, floatingId, nested),
276
350
  disabled: false,
277
351
  modal: false,
278
352
  focusManagerModal: false,
@@ -290,7 +364,6 @@ function createInitialState(initialState, triggerElements, floatingId, nested =
290
364
  if (state.open && initialState?.mounted === void 0) {
291
365
  state.mounted = true;
292
366
  }
293
- state.floatingRootContext = createPopupFloatingRootContext(triggerElements, floatingId, nested);
294
367
  return state;
295
368
  }
296
369
  function createInitialContext(triggerElements) {
@@ -304,7 +377,7 @@ function createInitialContext(triggerElements) {
304
377
  triggerElements
305
378
  };
306
379
  }
307
- function PopoverRootComponent({
380
+ const PopoverRootComponent = fastComponent(function PopoverRootComponent2({
308
381
  props
309
382
  }) {
310
383
  const {
@@ -367,7 +440,7 @@ function PopoverRootComponent({
367
440
  payload
368
441
  }) : children]
369
442
  });
370
- }
443
+ });
371
444
  function PopoverRoot(props) {
372
445
  if (usePopoverRootContext(true)) {
373
446
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverRootComponent, {
@@ -408,7 +481,7 @@ function PopoverInteractions({
408
481
  return null;
409
482
  }
410
483
  const OPEN_DELAY = 300;
411
- const PopoverTrigger = /* @__PURE__ */ reactExports.forwardRef(function PopoverTrigger2(componentProps, forwardedRef) {
484
+ const PopoverTrigger = fastComponentRef(function PopoverTrigger2(componentProps, forwardedRef) {
412
485
  const {
413
486
  render,
414
487
  className,
@@ -815,76 +888,71 @@ function ChatHeader({ session }) {
815
888
  const currentProjectInfo = projects.find((project) => project.id === currentProjectId);
816
889
  const [localMcpServers, setLocalMcpServers] = reactExports.useState([]);
817
890
  const [localFeatures, setLocalFeatures] = reactExports.useState([]);
891
+ const [isRestarting, setIsRestarting] = reactExports.useState(false);
818
892
  const [isClosing, setIsClosing] = reactExports.useState(false);
819
893
  const handleToggle = reactExports.useCallback((mcpId) => {
820
894
  setLocalMcpServers(
821
895
  (prev) => prev.includes(mcpId) ? prev.filter((id) => id !== mcpId) : [...prev, mcpId]
822
896
  );
823
897
  }, []);
898
+ const handlePermissionChange = reactExports.useCallback(
899
+ async (permissionMode) => {
900
+ try {
901
+ await request.updateSession({ sessionId: session.id, permissionMode });
902
+ } catch (err) {
903
+ console.error("Failed to update session permission:", err);
904
+ toast.error(
905
+ extractErrorMessage(err) || t("chatHeader.failedToUpdatePermission", "Failed to update permission.")
906
+ );
907
+ }
908
+ },
909
+ [session.id, t, toast]
910
+ );
824
911
  const handleSyncAndRefresh = async () => {
825
- if (!session) return;
912
+ if (!session || isClosing || isRestarting) return;
913
+ setIsRestarting(true);
826
914
  try {
827
- await request.updateSession({
828
- sessionId: session.id,
915
+ await restartSession({
916
+ session,
829
917
  mcpServers: localMcpServers,
830
918
  features: localFeatures
831
919
  });
832
920
  } catch (err) {
833
- console.error("Failed to update MCP servers:", err);
834
- toast.error(
835
- extractErrorMessage(err) || t("chat.failedToUpdateMcpServers", "Failed to update MCP servers")
836
- );
837
- return;
838
- }
839
- const { resetSessionState, updateSessionState, updateSession } = useAppStore.getState();
840
- try {
841
- updateSession({ ...session, isStreaming: false });
842
- updateSessionState(session.id, (prev) => reduceFlushStreaming(prev));
843
- resetSessionState(session.id);
844
- updateSessionState(session.id, () => ({ isLoading: true }));
845
- const result = await request.getSessionHistory({ sessionId: session.id });
846
- if (!result) return;
847
- let state = useAppStore.getState().getSessionState(session.id);
848
- state = { ...state, messages: [], activeToolCalls: /* @__PURE__ */ new Map(), activeSubagents: /* @__PURE__ */ new Map() };
849
- for (const notification of result.messages) {
850
- state = reduceSessionNotification(session.id, state, notification);
851
- }
852
- const displayIds = new Set(
853
- result.messages.map((m) => m?.update?._meta?.fello?.displayId).filter(Boolean)
854
- );
855
- for (const notification of state.pendingNotifications) {
856
- const did = notification.update._meta?.fello?.displayId;
857
- if (did && displayIds.has(did)) continue;
858
- state = reduceSessionNotification(session.id, state, notification);
859
- }
860
- state = {
861
- ...state,
862
- pendingNotifications: [],
863
- isLoading: false
864
- };
865
- updateSessionState(session.id, () => state);
866
- request.loadSession({ sessionId: session.id, force: true }).catch((err) => {
867
- console.error("Failed to load session:", err);
921
+ console.error("Failed to restart session:", err);
922
+ if (err instanceof SessionLifecycleBusyError) {
868
923
  toast.error(
869
- extractErrorMessage(err) || t("chat.failedToLoadSession", "Failed to load session.")
924
+ t(
925
+ "chatHeader.sessionOperationInProgress",
926
+ "Another session operation is already in progress."
927
+ )
870
928
  );
871
- });
872
- } catch (err) {
873
- console.error("Failed to load session:", err);
874
- const message = extractErrorMessage(err) || t("chat.failedToLoadSession", "Failed to load session.");
875
- toast.error(message);
929
+ return;
930
+ }
931
+ const lifecycleError = err instanceof RestartSessionError ? err : null;
932
+ const cause = lifecycleError?.cause ?? err;
933
+ const fallback = lifecycleError?.stage === "update" ? t("chat.failedToUpdateMcpServers", "Failed to update MCP servers") : t("chat.failedToLoadSession", "Failed to load session.");
934
+ toast.error(extractErrorMessage(cause) || fallback);
876
935
  } finally {
877
- useAppStore.getState().updateSessionState(session.id, () => ({ isLoading: false }));
936
+ setIsRestarting(false);
878
937
  }
879
938
  };
880
939
  const handleCloseSession = async () => {
881
- if (isClosing) return;
940
+ if (isClosing || isRestarting) return;
882
941
  setIsClosing(true);
883
942
  try {
884
- await request.closeSession({ sessionId: session.id });
943
+ await closeSession(session.id);
885
944
  navigate("/");
886
945
  } catch (err) {
887
946
  console.error("Failed to close session:", err);
947
+ if (err instanceof SessionLifecycleBusyError) {
948
+ toast.error(
949
+ t(
950
+ "chatHeader.sessionOperationInProgress",
951
+ "Another session operation is already in progress."
952
+ )
953
+ );
954
+ return;
955
+ }
888
956
  toast.error(
889
957
  extractErrorMessage(err) || t("chatHeader.failedToCloseSession", "Failed to close session.")
890
958
  );
@@ -903,7 +971,7 @@ function ChatHeader({ session }) {
903
971
  children: [
904
972
  /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { variant: "outline", className: "px-1 text-[10px] uppercase select-none", children: session.agentId }),
905
973
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-1 min-w-0 items-baseline gap-2", children: [
906
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate text-[13px] font-normal text-sidebar-foreground/85", children: session.title || t("sidebar.newChat", "New Chat") }),
974
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate text-[13px] font-normal text-sidebar-foreground/85", children: session.title || t("sidebar.newSession", "New Session") }),
907
975
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 text-[10px] text-muted-foreground truncate", children: currentProjectInfo?.cwd }),
908
976
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "shrink-0 text-xs text-sidebar-foreground/70 whitespace-nowrap", children: formatUpdatedTime(session.updatedAt) })
909
977
  ] }),
@@ -920,8 +988,8 @@ function ChatHeader({ session }) {
920
988
  },
921
989
  children: [
922
990
  /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverTrigger, { className: "flex size-7 items-center justify-center rounded-md text-sidebar-foreground/45 hover:bg-sidebar-accent/30 hover:text-sidebar-foreground/70 outline-none transition-colors data-pressed:bg-sidebar-accent/40", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings2, { className: "size-4" }) }),
923
- /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverPortal, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverPositioner, { side: "bottom", align: "end", sideOffset: 4, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(PopoverPopup, { className: "z-10 min-w-96 rounded-lg border border-border bg-popover text-popover-foreground shadow-lg outline-none p-1.5 origin-(--transform-origin) data-ending-style:scale-90 data-starting-style:scale-90 data-ending-style:opacity-0 data-starting-style:opacity-0 transition-[transform,opacity] duration-100", children: [
924
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1 py-1", children: [
991
+ /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverPortal, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverPositioner, { side: "bottom", align: "end", sideOffset: 4, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(PopoverPopup, { className: "z-10 w-110 rounded-lg border border-border bg-popover text-popover-foreground shadow-lg outline-none p-1.5 origin-(--transform-origin) data-ending-style:scale-90 data-starting-style:scale-90 data-ending-style:opacity-0 data-starting-style:opacity-0 transition-[transform,opacity] duration-100", children: [
992
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-px py-1", children: [
925
993
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
926
994
  CopyableRow,
927
995
  {
@@ -950,6 +1018,24 @@ function ChatHeader({ session }) {
950
1018
  ) })
951
1019
  ] }),
952
1020
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border/50 my-1" }),
1021
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-2 py-1 text-xs font-semibold text-foreground/80", children: t("sidebar.newSessionDialog.permission", "Permission") }),
1022
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1023
+ Tabs,
1024
+ {
1025
+ value: session.permissionMode,
1026
+ onValueChange: (value) => {
1027
+ if (value === "ask" || value === "allow-all") {
1028
+ void handlePermissionChange(value);
1029
+ }
1030
+ },
1031
+ className: "w-full px-2 my-2",
1032
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TabsList, { className: "w-full", children: [
1033
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "ask", className: "text-xs", children: t("sidebar.newSessionDialog.permissionAsk", "Ask") }),
1034
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "allow-all", className: "text-xs", children: t("sidebar.newSessionDialog.permissionAllowAll", "Allow all") })
1035
+ ] })
1036
+ }
1037
+ ),
1038
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border/50 my-1" }),
953
1039
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-2 py-1 text-xs font-semibold text-foreground/80", children: t("constant.feature.title", "Features") }),
954
1040
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: ALL_FEATURES.length >= 2 ? "grid grid-cols-2 gap-0.5" : "", children: ALL_FEATURES.map((feature) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
955
1041
  "div",
@@ -1024,14 +1110,17 @@ function ChatHeader({ session }) {
1024
1110
  )
1025
1111
  ] }),
1026
1112
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-1 flex gap-1", children: [
1027
- /* @__PURE__ */ jsxRuntimeExports.jsx(
1113
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
1028
1114
  Button,
1029
1115
  {
1030
1116
  size: "xs",
1031
1117
  className: "flex flex-3 items-center gap-2 h-7 text-xs font-normal",
1032
1118
  onClick: handleSyncAndRefresh,
1033
- disabled: isClosing,
1034
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t("chatHeader.refresh", "Restart Session") })
1119
+ disabled: isClosing || isRestarting,
1120
+ children: [
1121
+ isRestarting && /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3 animate-spin" }),
1122
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t("chatHeader.refresh", "Restart Session") })
1123
+ ]
1035
1124
  }
1036
1125
  ),
1037
1126
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -1041,7 +1130,7 @@ function ChatHeader({ session }) {
1041
1130
  variant: "destructive",
1042
1131
  className: "flex flex-1 items-center gap-1.5 h-7 text-xs font-normal",
1043
1132
  onClick: handleCloseSession,
1044
- disabled: isClosing,
1133
+ disabled: isClosing || isRestarting,
1045
1134
  children: [
1046
1135
  isClosing && /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3 animate-spin" }),
1047
1136
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: isClosing ? t("chatHeader.closingSession", "Closing…") : t("chatHeader.closeSession", "Close Session") })
@@ -1175,23 +1264,23 @@ function CopyableRow({
1175
1264
  ":"
1176
1265
  ] }),
1177
1266
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 min-w-0 truncate font-mono text-muted-foreground/70 select-all", children: value }),
1178
- !isWebUI && onOpenFolder && /* @__PURE__ */ jsxRuntimeExports.jsx(
1267
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1179
1268
  "button",
1180
1269
  {
1181
1270
  type: "button",
1182
1271
  className: "shrink-0 flex items-center justify-center size-5 rounded hover:bg-accent/50 text-muted-foreground/50 hover:text-muted-foreground transition-colors -mr-1",
1183
- onClick: onOpenFolder,
1184
- title: openFolderTitle,
1185
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { className: "size-3" })
1272
+ onClick: handleCopy,
1273
+ children: copied ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "size-3" })
1186
1274
  }
1187
1275
  ),
1188
- /* @__PURE__ */ jsxRuntimeExports.jsx(
1276
+ !isWebUI && onOpenFolder && /* @__PURE__ */ jsxRuntimeExports.jsx(
1189
1277
  "button",
1190
1278
  {
1191
1279
  type: "button",
1192
1280
  className: "shrink-0 flex items-center justify-center size-5 rounded hover:bg-accent/50 text-muted-foreground/50 hover:text-muted-foreground transition-colors -mr-1",
1193
- onClick: handleCopy,
1194
- children: copied ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "size-3" })
1281
+ onClick: onOpenFolder,
1282
+ title: openFolderTitle,
1283
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { className: "size-3" })
1195
1284
  }
1196
1285
  )
1197
1286
  ] });
@@ -1372,14 +1461,14 @@ function ChatTimeline({ items, activeDisplayId, onSelect: onSelect2 }) {
1372
1461
  {
1373
1462
  type: "button",
1374
1463
  onClick: () => handleSelect(item.displayId),
1375
- className: "p-1 group pointer-events-auto",
1464
+ className: "p-1 group/timeline pointer-events-auto outline-0",
1376
1465
  "aria-label": ariaLabel,
1377
1466
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1378
1467
  "div",
1379
1468
  {
1380
1469
  className: cn$1(
1381
- "size-2 rounded-full transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50",
1382
- isActive ? "bg-foreground/40" : "bg-muted-foreground/15 group-hover:bg-muted-foreground/40"
1470
+ "size-2 rounded-full transition-colors outline-none group-focus-visible/timeline:ring-1 group-focus-visible/timeline:ring-ring",
1471
+ isActive ? "bg-foreground/40" : "bg-muted-foreground/15 group-hover/timeline:bg-muted-foreground/40"
1383
1472
  )
1384
1473
  }
1385
1474
  )
@@ -1438,6 +1527,12 @@ function ChatArea({ session }) {
1438
1527
  const getViewport = reactExports.useCallback(() => {
1439
1528
  return scrollAreaRef.current?.querySelector('[data-slot="scroll-area-viewport"]');
1440
1529
  }, []);
1530
+ const focusChatArea = reactExports.useCallback(() => {
1531
+ const viewport = getViewport();
1532
+ if (!viewport) return;
1533
+ viewport.focus({ preventScroll: true });
1534
+ }, [getViewport]);
1535
+ useFocusTarget("chat-area", focusChatArea);
1441
1536
  const scrollToBottom = reactExports.useCallback((behavior) => {
1442
1537
  if (scrollTimeoutRef.current) {
1443
1538
  clearTimeout(scrollTimeoutRef.current);
@@ -1639,7 +1734,9 @@ function ChatArea({ session }) {
1639
1734
  const last = timelineDisplayIds[timelineDisplayIds.length - 1] ?? "";
1640
1735
  return `${timelineDisplayIds.length}:${last}`;
1641
1736
  }, [timelineDisplayIds]);
1642
- userMessageIdsRef.current = timelineDisplayIds;
1737
+ reactExports.useEffect(() => {
1738
+ userMessageIdsRef.current = timelineDisplayIds;
1739
+ }, [timelineDisplayIds]);
1643
1740
  reactExports.useEffect(() => {
1644
1741
  setActiveUserMessageId((prev) => prev ?? firstTimelineDisplayId);
1645
1742
  const viewport = getViewport();
@@ -1708,7 +1805,7 @@ function ChatArea({ session }) {
1708
1805
  const copyText$1 = reactExports.useCallback(async (text) => {
1709
1806
  return copyText(text);
1710
1807
  }, []);
1711
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full relative min-h-0 flex flex-1 overflow-hidden", children: [
1808
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full relative min-h-0 flex flex-1 group/chat-area", children: [
1712
1809
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0 w-6 -mr-6 relative z-1 pointer-events-none", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1713
1810
  ChatTimeline,
1714
1811
  {
@@ -1722,7 +1819,7 @@ function ChatArea({ session }) {
1722
1819
  {
1723
1820
  ref: scrollAreaRef,
1724
1821
  className: "flex-1 w-full transform-gpu",
1725
- viewportClassName: "animate-in fade-in",
1822
+ viewportClassName: "animate-in fade-in chat-area",
1726
1823
  children: [
1727
1824
  hasMore && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 px-10 py-3 max-w-5xl mx-auto", children: [
1728
1825
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 border-b border-dashed border-muted-foreground/30" }),
@@ -1892,7 +1989,8 @@ function ChatArea({ session }) {
1892
1989
  "aria-label": t("chatArea.scrollToBottom", "Scroll to bottom"),
1893
1990
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowDown, { className: "size-4" })
1894
1991
  }
1895
- )
1992
+ ),
1993
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pointer-events-none absolute -top-px left-0 right-0 h-px bg-linear-to-r from-ring/30 from-10% via-ring/80 via-30% to-ring/30 animate-out fill-mode-both fade-out ease-out duration-1500 hidden group-has-[.chat-area:focus-visible]/chat-area:block" })
1896
1994
  ] });
1897
1995
  }
1898
1996
  function _arrayWithoutHoles$1(arr) {
@@ -4327,6 +4425,11 @@ function nodesToMentionText(nodes) {
4327
4425
  return `@[${prefix}${n.name}](${n.id})`;
4328
4426
  }).join(" ");
4329
4427
  }
4428
+ function insertNewlineAtCaret(textarea) {
4429
+ if (!textarea) return;
4430
+ textarea.focus();
4431
+ document.execCommand("insertText", false, "\n");
4432
+ }
4330
4433
  const TARGET_SAMPLE_RATE = 16e3;
4331
4434
  const FRAME_SAMPLES = 320;
4332
4435
  const workletSource = `
@@ -4586,7 +4689,10 @@ function useRealtimeAsr(options) {
4586
4689
  }
4587
4690
  const ASR_WAVEFORM_BARS = [0.35, 0.65, 0.95, 0.55, 0.8, 0.45, 0.9, 0.6, 0.38];
4588
4691
  const DEFAULT_MAX_DURATION = 5 * 60 * 1e3;
4692
+ const ALT_DOUBLE_PRESS_WINDOW = 350;
4589
4693
  const VOICE_INPUT_DEVICE_STORAGE_KEY = "fello.voice-input.device-id";
4694
+ let activeVoiceRecording = null;
4695
+ let voiceRecordingStartChain = Promise.resolve();
4590
4696
  function getInputCursor(input) {
4591
4697
  return input.selectionStart ?? input.value.length;
4592
4698
  }
@@ -4599,11 +4705,16 @@ function VoiceInputButton({
4599
4705
  }) {
4600
4706
  const { t } = useTranslation();
4601
4707
  const { toast } = useMessage();
4708
+ const altDoublePressEnabled = useAppStore((state) => state.voiceInput.altDoublePress);
4709
+ const [instanceId] = reactExports.useState(() => /* @__PURE__ */ Symbol("VoiceInputButton"));
4710
+ const stopAsrRef = reactExports.useRef(() => Promise.resolve());
4602
4711
  const asrApplyingRef = reactExports.useRef(false);
4603
4712
  const asrSegmentsRef = reactExports.useRef(/* @__PURE__ */ new Map());
4604
4713
  const asrTailRef = reactExports.useRef(0);
4605
4714
  const asrCurrentKeyRef = reactExports.useRef(null);
4606
4715
  const asrSequenceRef = reactExports.useRef(0);
4716
+ const lastAltTapAtRef = reactExports.useRef(null);
4717
+ const suppressAltUntilRef = reactExports.useRef(0);
4607
4718
  const freezeAsrSegments = reactExports.useCallback(() => {
4608
4719
  asrSegmentsRef.current.clear();
4609
4720
  asrCurrentKeyRef.current = null;
@@ -4639,17 +4750,34 @@ function VoiceInputButton({
4639
4750
  },
4640
4751
  [inputRef]
4641
4752
  );
4753
+ const handleRecordingChange = reactExports.useCallback(
4754
+ (recording) => {
4755
+ if (recording) {
4756
+ activeVoiceRecording = {
4757
+ owner: instanceId,
4758
+ stop: () => stopAsrRef.current()
4759
+ };
4760
+ } else {
4761
+ freezeAsrSegments();
4762
+ if (activeVoiceRecording?.owner === instanceId) {
4763
+ activeVoiceRecording = null;
4764
+ }
4765
+ }
4766
+ },
4767
+ [freezeAsrSegments, instanceId]
4768
+ );
4642
4769
  const asr = useRealtimeAsr({
4643
4770
  onTranscript: applyAsrTranscript,
4644
4771
  onError: (message) => toast.error(message),
4645
- onRecordingChange: (recording) => {
4646
- if (!recording) freezeAsrSegments();
4647
- }
4772
+ onRecordingChange: handleRecordingChange
4648
4773
  });
4649
4774
  const { start: startAsr, stop: stopAsr, refreshInputDevices } = asr;
4650
4775
  const handleStop = reactExports.useCallback(async () => {
4651
4776
  await stopAsr();
4652
4777
  }, [stopAsr]);
4778
+ reactExports.useEffect(() => {
4779
+ stopAsrRef.current = handleStop;
4780
+ });
4653
4781
  reactExports.useImperativeHandle(
4654
4782
  ref,
4655
4783
  () => ({
@@ -4659,23 +4787,28 @@ function VoiceInputButton({
4659
4787
  );
4660
4788
  const handleStart = reactExports.useCallback(
4661
4789
  async (deviceId) => {
4662
- const textarea = inputRef.current;
4663
- if (!textarea) return;
4664
- textarea.focus();
4665
- const cursorPosition = getInputCursor(textarea);
4666
- const before = textarea.value.slice(0, cursorPosition);
4667
- if (before.length > 0 && !/\s$/.test(before)) {
4668
- asrApplyingRef.current = true;
4669
- try {
4670
- document.execCommand("insertText", false, " ");
4671
- } finally {
4672
- asrApplyingRef.current = false;
4790
+ const startOperation = voiceRecordingStartChain.then(async () => {
4791
+ await activeVoiceRecording?.stop();
4792
+ const textarea = inputRef.current;
4793
+ if (!textarea) return;
4794
+ textarea.focus();
4795
+ const cursorPosition = getInputCursor(textarea);
4796
+ const before = textarea.value.slice(0, cursorPosition);
4797
+ if (before.length > 0 && !/\s$/.test(before)) {
4798
+ asrApplyingRef.current = true;
4799
+ try {
4800
+ document.execCommand("insertText", false, " ");
4801
+ } finally {
4802
+ asrApplyingRef.current = false;
4803
+ }
4673
4804
  }
4674
- }
4675
- asrSegmentsRef.current.clear();
4676
- asrCurrentKeyRef.current = null;
4677
- asrTailRef.current = getInputCursor(textarea);
4678
- await startAsr(deviceId);
4805
+ asrSegmentsRef.current.clear();
4806
+ asrCurrentKeyRef.current = null;
4807
+ asrTailRef.current = getInputCursor(textarea);
4808
+ await startAsr(deviceId);
4809
+ });
4810
+ voiceRecordingStartChain = startOperation.catch(() => void 0);
4811
+ await startOperation;
4679
4812
  },
4680
4813
  [startAsr, inputRef]
4681
4814
  );
@@ -4687,6 +4820,7 @@ function VoiceInputButton({
4687
4820
  }
4688
4821
  });
4689
4822
  const [deviceMenuOpen, setDeviceMenuOpen] = reactExports.useState(false);
4823
+ const [starting, setStarting] = reactExports.useState(false);
4690
4824
  const rememberDevice = reactExports.useCallback((deviceId) => {
4691
4825
  setSavedDeviceId(deviceId);
4692
4826
  try {
@@ -4702,14 +4836,44 @@ function VoiceInputButton({
4702
4836
  [rememberDevice]
4703
4837
  );
4704
4838
  const handleMicClick = reactExports.useCallback(async () => {
4705
- const devices = await refreshInputDevices();
4706
- const hasSavedDevice = savedDeviceId != null && devices.some((device) => device.deviceId === savedDeviceId);
4707
- if (hasSavedDevice) {
4708
- await handleStart(savedDeviceId);
4709
- } else {
4710
- setDeviceMenuOpen(true);
4839
+ if (disabled || !asr.configured || starting) return;
4840
+ setStarting(true);
4841
+ try {
4842
+ const devices = await refreshInputDevices();
4843
+ const hasSavedDevice = savedDeviceId != null && devices.some((device) => device.deviceId === savedDeviceId);
4844
+ if (hasSavedDevice) {
4845
+ await handleStart(savedDeviceId);
4846
+ } else {
4847
+ setDeviceMenuOpen(true);
4848
+ }
4849
+ } finally {
4850
+ setStarting(false);
4851
+ }
4852
+ }, [asr.configured, disabled, handleStart, refreshInputDevices, savedDeviceId, starting]);
4853
+ const handleShortcutToggle = reactExports.useCallback(async () => {
4854
+ if (disabled || !asr.configured || starting) return;
4855
+ if (asr.recording) {
4856
+ await handleStop();
4857
+ return;
4711
4858
  }
4712
- }, [refreshInputDevices, handleStart, savedDeviceId]);
4859
+ setStarting(true);
4860
+ try {
4861
+ const devices = await refreshInputDevices();
4862
+ const hasSavedDevice = savedDeviceId != null && devices.some((device) => device.deviceId === savedDeviceId);
4863
+ await handleStart(hasSavedDevice ? savedDeviceId : void 0);
4864
+ } finally {
4865
+ setStarting(false);
4866
+ }
4867
+ }, [
4868
+ asr.configured,
4869
+ asr.recording,
4870
+ disabled,
4871
+ handleStart,
4872
+ handleStop,
4873
+ refreshInputDevices,
4874
+ savedDeviceId,
4875
+ starting
4876
+ ]);
4713
4877
  const handleDeviceMenuChange = reactExports.useCallback(
4714
4878
  (open) => {
4715
4879
  setDeviceMenuOpen(open);
@@ -4717,6 +4881,76 @@ function VoiceInputButton({
4717
4881
  },
4718
4882
  [refreshInputDevices]
4719
4883
  );
4884
+ reactExports.useEffect(() => {
4885
+ lastAltTapAtRef.current = null;
4886
+ const handleKeyDown = (event) => {
4887
+ const input = inputRef.current;
4888
+ if (!input || document.activeElement !== input) {
4889
+ lastAltTapAtRef.current = null;
4890
+ return;
4891
+ }
4892
+ if (event.key === "Escape") {
4893
+ lastAltTapAtRef.current = null;
4894
+ suppressAltUntilRef.current = 0;
4895
+ if (!event.repeat && !event.ctrlKey && !event.metaKey && !event.shiftKey && asr.recording) {
4896
+ event.preventDefault();
4897
+ void handleStop();
4898
+ }
4899
+ return;
4900
+ }
4901
+ if (event.key !== "Alt") {
4902
+ lastAltTapAtRef.current = null;
4903
+ return;
4904
+ }
4905
+ if (!altDoublePressEnabled || event.repeat || event.ctrlKey || event.metaKey || event.shiftKey) {
4906
+ lastAltTapAtRef.current = null;
4907
+ return;
4908
+ }
4909
+ const now = Date.now();
4910
+ if (now < suppressAltUntilRef.current) {
4911
+ lastAltTapAtRef.current = null;
4912
+ return;
4913
+ }
4914
+ if (asr.recording) {
4915
+ lastAltTapAtRef.current = null;
4916
+ suppressAltUntilRef.current = now + ALT_DOUBLE_PRESS_WINDOW;
4917
+ event.preventDefault();
4918
+ void handleStop();
4919
+ return;
4920
+ }
4921
+ const lastTapAt = lastAltTapAtRef.current;
4922
+ if (lastTapAt !== null && now - lastTapAt <= ALT_DOUBLE_PRESS_WINDOW) {
4923
+ lastAltTapAtRef.current = null;
4924
+ event.preventDefault();
4925
+ void handleShortcutToggle();
4926
+ }
4927
+ };
4928
+ const handleKeyUp = (event) => {
4929
+ if (event.key !== "Alt") return;
4930
+ const input = inputRef.current;
4931
+ if (!input || document.activeElement !== input) {
4932
+ lastAltTapAtRef.current = null;
4933
+ return;
4934
+ }
4935
+ if (Date.now() < suppressAltUntilRef.current) {
4936
+ lastAltTapAtRef.current = null;
4937
+ return;
4938
+ }
4939
+ lastAltTapAtRef.current = Date.now();
4940
+ };
4941
+ const resetAltTap = () => {
4942
+ lastAltTapAtRef.current = null;
4943
+ suppressAltUntilRef.current = 0;
4944
+ };
4945
+ window.addEventListener("keydown", handleKeyDown);
4946
+ window.addEventListener("keyup", handleKeyUp);
4947
+ window.addEventListener("blur", resetAltTap);
4948
+ return () => {
4949
+ window.removeEventListener("keydown", handleKeyDown);
4950
+ window.removeEventListener("keyup", handleKeyUp);
4951
+ window.removeEventListener("blur", resetAltTap);
4952
+ };
4953
+ }, [altDoublePressEnabled, asr.recording, handleShortcutToggle, handleStop, inputRef]);
4720
4954
  reactExports.useEffect(() => {
4721
4955
  const textarea = inputRef.current;
4722
4956
  if (!textarea) return;
@@ -4739,7 +4973,7 @@ function VoiceInputButton({
4739
4973
  "div",
4740
4974
  {
4741
4975
  className: cn$1(
4742
- "relative inline-flex h-7 transition-[width] duration-300 ease-out",
4976
+ "relative inline-flex h-7 transition-[width] duration-300 ease-out flex-none",
4743
4977
  asr.recording ? "w-18" : "w-12.5",
4744
4978
  className
4745
4979
  ),
@@ -4802,10 +5036,11 @@ function VoiceInputButton({
4802
5036
  size: "sm",
4803
5037
  className: "h-full w-8 rounded-r-none border-r-0 bg-muted hover:bg-input border border-input text-amber-300/50 hover:text-amber-200",
4804
5038
  onClick: () => void handleMicClick(),
4805
- disabled: disabled || !asr.configured,
4806
- "aria-label": t("chatInput.voiceInput", "Voice input"),
4807
- title: asr.configured ? t("chatInput.voiceInput", "Voice input") : t("chatInput.voiceInputNotConfigured", "Configure voice input in Settings"),
4808
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Mic, { className: "size-3.5" })
5039
+ disabled: disabled || !asr.configured || starting,
5040
+ "aria-busy": starting,
5041
+ "aria-label": starting ? t("chatInput.startingVoiceInput", "Starting voice input") : t("chatInput.voiceInput", "Voice input"),
5042
+ title: starting ? t("chatInput.startingVoiceInput", "Starting voice input") : asr.configured ? t("chatInput.voiceInput", "Voice input") : t("chatInput.voiceInputNotConfigured", "Configure voice input in Settings"),
5043
+ children: starting ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Mic, { className: "size-3.5" })
4809
5044
  }
4810
5045
  ),
4811
5046
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -4816,7 +5051,7 @@ function VoiceInputButton({
4816
5051
  {
4817
5052
  size: "icon",
4818
5053
  className: "h-full w-4.5 rounded-l-none bg-muted hover:bg-input border border-input border-l-0 px-0 text-amber-300/50 hover:text-amber-200",
4819
- disabled: disabled || !asr.configured,
5054
+ disabled: disabled || !asr.configured || starting,
4820
5055
  "aria-label": t("chatInput.selectVoiceInputDevice", "Select microphone"),
4821
5056
  title: t("chatInput.selectVoiceInputDevice", "Select microphone")
4822
5057
  }
@@ -4996,6 +5231,13 @@ function ChatInput({ session }) {
4996
5231
  const textareaRef = reactExports.useRef(null);
4997
5232
  const voiceInputRef = reactExports.useRef(null);
4998
5233
  const getTextarea = reactExports.useCallback(() => textareaRef.current, []);
5234
+ const focusInput = reactExports.useCallback(() => {
5235
+ const textarea = getTextarea();
5236
+ if (!textarea || textarea.disabled) return false;
5237
+ textarea.focus({ preventScroll: true });
5238
+ return document.activeElement === textarea;
5239
+ }, [getTextarea]);
5240
+ useFocusTarget("chat-input", focusInput);
4999
5241
  const insertTriggerChar = reactExports.useCallback(
5000
5242
  (char) => {
5001
5243
  const textarea = getTextarea();
@@ -5022,6 +5264,7 @@ function ChatInput({ session }) {
5022
5264
  },
5023
5265
  [getTextarea, session.projectId, session.cwd]
5024
5266
  );
5267
+ const [localInput, setLocalInput] = reactExports.useState(draftInput);
5025
5268
  const appendMentionsToInput = reactExports.useCallback(
5026
5269
  (mentions) => {
5027
5270
  setLocalInput((prev) => prev ? `${prev} ${mentions} ` : `${mentions} `);
@@ -5029,7 +5272,6 @@ function ChatInput({ session }) {
5029
5272
  },
5030
5273
  [getTextarea]
5031
5274
  );
5032
- const [localInput, setLocalInput] = reactExports.useState(draftInput);
5033
5275
  const localInputRef = reactExports.useRef(localInput);
5034
5276
  localInputRef.current = localInput;
5035
5277
  const prevSessionIdRef = reactExports.useRef(session.id);
@@ -5246,9 +5488,15 @@ function ChatInput({ session }) {
5246
5488
  }, [session, isStreaming, addMessage, localInput, updateSessionState, t, toast, updateSession]);
5247
5489
  const handleKeyDown = (e) => {
5248
5490
  if (e.nativeEvent.isComposing) return;
5249
- if (e.key === "Enter" && !e.shiftKey) {
5491
+ if (e.key !== "Enter") return;
5492
+ if (!e.shiftKey && !e.ctrlKey && !e.metaKey) {
5250
5493
  e.preventDefault();
5251
5494
  handleSubmit();
5495
+ return;
5496
+ }
5497
+ if (e.ctrlKey || e.metaKey) {
5498
+ e.preventDefault();
5499
+ insertNewlineAtCaret(getTextarea());
5252
5500
  }
5253
5501
  };
5254
5502
  const handleDrop = reactExports.useCallback(
@@ -5554,14 +5802,14 @@ function ChatInput({ session }) {
5554
5802
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
5555
5803
  "div",
5556
5804
  {
5557
- className: "flex cursor-text items-center justify-between gap-2 px-2 pb-2 overflow-hidden",
5805
+ className: "flex cursor-text items-center justify-between gap-2 -mt-3 overflow-hidden",
5558
5806
  onClick: (e) => {
5559
5807
  const target = e.target;
5560
5808
  if (target.closest("button, select, [role='combobox']")) return;
5561
5809
  getTextarea()?.focus();
5562
5810
  },
5563
5811
  children: [
5564
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 overflow-hidden", children: [
5812
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 p-2 overflow-hidden -mr-4", children: [
5565
5813
  availableModes.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { children: [
5566
5814
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
5567
5815
  DropdownMenuTrigger,
@@ -5571,7 +5819,7 @@ function ChatInput({ session }) {
5571
5819
  {
5572
5820
  variant: "outline",
5573
5821
  size: "sm",
5574
- className: "h-7 text-xs text-muted-foreground hover:text-foreground gap-2 max-w-48 shrink overflow-hidden"
5822
+ className: "h-7 min-w-16 text-xs text-muted-foreground hover:text-foreground gap-2 max-w-48 shrink overflow-hidden"
5575
5823
  }
5576
5824
  ),
5577
5825
  children: [
@@ -5693,7 +5941,7 @@ function ChatInput({ session }) {
5693
5941
  ] })
5694
5942
  ] })
5695
5943
  ] }),
5696
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 overflow-hidden", children: [
5944
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 p-2 overflow-hidden", children: [
5697
5945
  availableModels.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { children: [
5698
5946
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
5699
5947
  DropdownMenuTrigger,
@@ -5703,7 +5951,7 @@ function ChatInput({ session }) {
5703
5951
  {
5704
5952
  variant: "outline",
5705
5953
  size: "sm",
5706
- className: "h-7 text-xs text-muted-foreground hover:text-foreground gap-2 max-w-48 shrink overflow-hidden"
5954
+ className: "h-7 min-w-16 text-xs text-muted-foreground hover:text-foreground gap-2 max-w-48 shrink overflow-hidden"
5707
5955
  }
5708
5956
  ),
5709
5957
  children: [
@@ -5839,14 +6087,7 @@ function ChatInput({ session }) {
5839
6087
  }
5840
6088
  )
5841
6089
  ] }),
5842
- /* @__PURE__ */ jsxRuntimeExports.jsx(
5843
- VoiceInputButton,
5844
- {
5845
- ref: voiceInputRef,
5846
- inputRef: textareaRef,
5847
- disabled
5848
- }
5849
- ),
6090
+ /* @__PURE__ */ jsxRuntimeExports.jsx(VoiceInputButton, { ref: voiceInputRef, inputRef: textareaRef, disabled }),
5850
6091
  isStreaming ? /* @__PURE__ */ jsxRuntimeExports.jsx(
5851
6092
  Button,
5852
6093
  {
@@ -5890,14 +6131,14 @@ const mentionsInputStyle = {
5890
6131
  highlighter: {
5891
6132
  padding: "12px 16px 8px",
5892
6133
  border: "none",
5893
- maxHeight: 200
6134
+ maxHeight: "80vh"
5894
6135
  },
5895
6136
  input: {
5896
6137
  padding: "12px 16px 8px",
5897
6138
  border: "none",
5898
6139
  outline: "none",
5899
6140
  overflow: "auto",
5900
- maxHeight: 200,
6141
+ maxHeight: "80vh",
5901
6142
  color: "var(--foreground)",
5902
6143
  fontSize: 13,
5903
6144
  lineHeight: "1.5",
@@ -5990,12 +6231,15 @@ function AskUserDialog({ sessionId }) {
5990
6231
  "div",
5991
6232
  {
5992
6233
  ref: cardRef,
6234
+ role: "dialog",
6235
+ "aria-labelledby": "ask-user-dialog-title",
6236
+ "aria-describedby": currentRequest.description ? "ask-user-dialog-description" : void 0,
5993
6237
  onClick: () => setCollapsed(false),
5994
6238
  className: "grid grid-rows-[auto_1fr_auto] rounded-xl border border-border bg-card p-4 shadow-lg shadow-primary/5 max-h-[90vh]",
5995
6239
  children: [
5996
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-3 min-h-0", children: [
6240
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-3 min-h-0 overflow-hidden", children: [
5997
6241
  /* @__PURE__ */ jsxRuntimeExports.jsx(CircleQuestionMark, { className: "size-4.5 shrink-0 text-sky-500" }),
5998
- /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-sm font-medium leading-snug truncate", children: currentRequest.title || t("askUser.title", "Request") }),
6242
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { id: "ask-user-dialog-title", className: "text-sm font-medium leading-snug truncate", children: currentRequest.title || t("askUser.title", "Request") }),
5999
6243
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center ml-auto gap-1", children: [
6000
6244
  currentRequest.timeoutAt != null && /* @__PURE__ */ jsxRuntimeExports.jsx(AskUserCountdown, { timeoutAt: currentRequest.timeoutAt }),
6001
6245
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -6009,13 +6253,14 @@ function AskUserDialog({ sessionId }) {
6009
6253
  setCollapsed((c) => !c);
6010
6254
  },
6011
6255
  "aria-label": collapsed ? t("askUser.expand", "Expand") : t("askUser.collapse", "Collapse"),
6256
+ "aria-expanded": !collapsed,
6012
6257
  title: collapsed ? t("askUser.expand", "Expand") : t("askUser.collapse", "Collapse"),
6013
6258
  children: collapsed ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronUp, { className: "size-4" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "size-4" })
6014
6259
  }
6015
6260
  )
6016
6261
  ] })
6017
6262
  ] }),
6018
- currentRequest.description && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "h-full rounded-md bg-muted/40", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-3 px-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "text-xs text-muted-foreground leading-relaxed whitespace-pre-wrap", children: /* @__PURE__ */ jsxRuntimeExports.jsx("code", { children: formatDescription(currentRequest.description) }) }) }) }) }),
6263
+ currentRequest.description && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "ask-user-dialog-description", className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "h-full rounded-md bg-muted/40", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-3 px-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "text-xs text-muted-foreground leading-relaxed whitespace-pre-wrap", children: /* @__PURE__ */ jsxRuntimeExports.jsx("code", { children: formatDescription(currentRequest.description) }) }) }) }) }),
6019
6264
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn$1("pt-3 min-h-0", collapsed ? "pointer-events-none" : ""), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
6020
6265
  AskUserOptions,
6021
6266
  {
@@ -6079,12 +6324,21 @@ function AskUserOptions({
6079
6324
  const [highlightedIndex, setHighlightedIndex] = reactExports.useState(null);
6080
6325
  const [isDragOver, setIsDragOver] = reactExports.useState(false);
6081
6326
  const inputContainerRef = reactExports.useRef(null);
6327
+ const optionRefs = reactExports.useRef([]);
6328
+ const otherButtonRef = reactExports.useRef(null);
6082
6329
  const textareaRef = reactExports.useRef(null);
6083
6330
  const voiceInputRef = reactExports.useRef(null);
6084
6331
  const navigate = useNavigate();
6085
6332
  const snippets = useAppStore((s15) => s15.snippets);
6086
6333
  const fileInputRef = reactExports.useRef(null);
6087
6334
  const getTextarea = reactExports.useCallback(() => textareaRef.current, []);
6335
+ const focusAskUser = reactExports.useCallback(() => {
6336
+ const target = mode === "input" ? textareaRef.current : optionRefs.current[0];
6337
+ if (!target || target.disabled) return false;
6338
+ target.focus({ preventScroll: true });
6339
+ return document.activeElement === target;
6340
+ }, [mode]);
6341
+ useFocusTarget("ask-user-dialog", focusAskUser);
6088
6342
  const insertTriggerChar = reactExports.useCallback(
6089
6343
  (char) => {
6090
6344
  const textarea = getTextarea();
@@ -6248,37 +6502,65 @@ function AskUserOptions({
6248
6502
  };
6249
6503
  const handleKeyDown = (e) => {
6250
6504
  if (e.nativeEvent.isComposing) return;
6251
- if (e.key === "Enter" && !e.shiftKey) {
6505
+ if (e.key !== "Enter") return;
6506
+ if (!e.shiftKey && !e.ctrlKey && !e.metaKey) {
6252
6507
  e.preventDefault();
6253
6508
  void handleSubmitInput();
6509
+ return;
6510
+ }
6511
+ if (e.ctrlKey || e.metaKey) {
6512
+ e.preventDefault();
6513
+ insertNewlineAtCaret(getTextarea());
6254
6514
  }
6255
6515
  };
6256
6516
  reactExports.useEffect(() => {
6257
- if (mode === "input") {
6258
- textareaRef.current?.focus();
6259
- }
6517
+ if (mode !== "input") return;
6518
+ textareaRef.current?.focus();
6260
6519
  }, [mode]);
6520
+ reactExports.useEffect(() => {
6521
+ if (mode !== "options" || !hasOptions) return;
6522
+ const frame = window.requestAnimationFrame(() => optionRefs.current[0]?.focus());
6523
+ return () => window.cancelAnimationFrame(frame);
6524
+ }, [hasOptions, mode]);
6525
+ const handleOptionKeyDown = (event, index) => {
6526
+ const { key } = event;
6527
+ if (key === "ArrowDown" || key === "ArrowUp" || key === "Home" || key === "End") {
6528
+ event.preventDefault();
6529
+ event.stopPropagation();
6530
+ if (key === "Home") {
6531
+ optionRefs.current[0]?.focus();
6532
+ } else if (key === "End") {
6533
+ if (showOther) otherButtonRef.current?.focus();
6534
+ else optionRefs.current[request$1.options.length - 1]?.focus();
6535
+ } else if (key === "ArrowDown") {
6536
+ if (index < request$1.options.length - 1) {
6537
+ optionRefs.current[index + 1]?.focus();
6538
+ } else if (showOther) {
6539
+ otherButtonRef.current?.focus();
6540
+ }
6541
+ } else if (index > 0) {
6542
+ optionRefs.current[index - 1]?.focus();
6543
+ }
6544
+ }
6545
+ };
6261
6546
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
6262
6547
  mode === "options" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
6263
6548
  request$1.options.map((option, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
6264
- "div",
6549
+ "button",
6265
6550
  {
6266
- role: "button",
6267
- tabIndex: 0,
6268
- className: `relative flex w-full min-h-8 py-2 px-2 text-xs text-left rounded-lg border transition-all select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px ${highlightedIndex === index ? "ring-1 ring-sky-500 bg-sky-500/10 border-sky-500/30" : option.danger ? "bg-destructive/10 text-destructive hover:bg-destructive/20 border-destructive/20" : "bg-secondary/50 hover:bg-secondary hover:text-foreground"}`,
6269
- onClick: () => handleSelectOption(option.value),
6270
- onKeyDown: (e) => {
6271
- if (e.key === "Enter" || e.key === " ") {
6272
- e.preventDefault();
6273
- handleSelectOption(option.value);
6274
- }
6551
+ ref: (element) => {
6552
+ optionRefs.current[index] = element;
6275
6553
  },
6554
+ type: "button",
6555
+ className: `relative flex w-full min-h-8 py-2 px-2 text-xs text-left rounded-lg border transition-all select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 active:translate-y-px ${highlightedIndex === index ? "ring-1 ring-sky-500 bg-sky-500/10 border-sky-500/30" : option.danger ? "bg-destructive/10 text-destructive hover:bg-destructive/20 border-destructive/20" : "bg-secondary/50 hover:bg-secondary hover:text-foreground"}`,
6556
+ onClick: () => handleSelectOption(option.value),
6557
+ onKeyDown: (event) => handleOptionKeyDown(event, index),
6276
6558
  children: [
6277
6559
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex items-start gap-1.5 w-full", children: [
6278
6560
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "inline-flex size-5 items-center justify-center rounded bg-muted-foreground/10 text-[10px] font-mono shrink-0 self-start mt-0.5", children: index + 1 }),
6279
6561
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "min-w-0 flex-1 whitespace-normal self-start py-1", children: option.label })
6280
6562
  ] }),
6281
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-0.5 right-1 text-[9px] leading-none text-muted-foreground/30 shrink-0 self-start font-mono", children: option.priority })
6563
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "absolute top-0.5 right-1 text-[9px] leading-none text-muted-foreground/30 shrink-0 self-start font-mono", children: option.priority })
6282
6564
  ]
6283
6565
  },
6284
6566
  option.value
@@ -6286,10 +6568,22 @@ function AskUserOptions({
6286
6568
  showOther && /* @__PURE__ */ jsxRuntimeExports.jsxs(
6287
6569
  Button,
6288
6570
  {
6571
+ ref: otherButtonRef,
6289
6572
  variant: "ghost",
6290
6573
  size: "sm",
6291
6574
  className: "justify-start h-8 px-2 text-xs text-muted-foreground",
6292
6575
  onClick: () => setMode("input"),
6576
+ onKeyDown: (event) => {
6577
+ if (event.key === "ArrowUp") {
6578
+ event.preventDefault();
6579
+ event.stopPropagation();
6580
+ optionRefs.current[request$1.options.length - 1]?.focus();
6581
+ } else if (event.key === "Home") {
6582
+ event.preventDefault();
6583
+ event.stopPropagation();
6584
+ optionRefs.current[0]?.focus();
6585
+ }
6586
+ },
6293
6587
  children: [
6294
6588
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t("askUser.other", "Custom reply") }),
6295
6589
  /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "size-3" })
@@ -6689,7 +6983,7 @@ function useFile(projectId, file, options = {}) {
6689
6983
  };
6690
6984
  }
6691
6985
  const CodeEditor = reactExports.lazy(
6692
- () => __vitePreload(() => import("./code-editor-CEXlC4aV.js"), true ? __vite__mapDeps([0,1,2,3,4]) : void 0, import.meta.url).then((m) => ({ default: m.CodeEditor }))
6986
+ () => __vitePreload(() => import("./code-editor-BwPwET3m.js"), true ? __vite__mapDeps([0,1,2,3,4]) : void 0, import.meta.url).then((m) => ({ default: m.CodeEditor }))
6693
6987
  );
6694
6988
  const MAX_EDIT_SIZE = 1024 * 1024;
6695
6989
  const EditPanel = reactExports.forwardRef(function EditPanel2({ projectId, filePath, content, loading = false, onCancel, onSaved }, ref) {
@@ -6795,8 +7089,6 @@ function useSearchHighlight(containerEl) {
6795
7089
  const [matchCount, setMatchCount] = reactExports.useState(0);
6796
7090
  const [currentMatch, setCurrentMatch] = reactExports.useState(0);
6797
7091
  const rangesRef = reactExports.useRef([]);
6798
- const currentMatchRef = reactExports.useRef(0);
6799
- currentMatchRef.current = currentMatch;
6800
7092
  const clearHighlights = reactExports.useCallback(() => {
6801
7093
  CSS.highlights.delete(HIGHLIGHT_ALL);
6802
7094
  CSS.highlights.delete(HIGHLIGHT_CURRENT);
@@ -17260,6 +17552,9 @@ const GIT_SUMMARY_BADGES = [
17260
17552
  { key: "C", color: "text-yellow-500" },
17261
17553
  { key: "D", color: "text-red-500" }
17262
17554
  ];
17555
+ function fileNavigationItemKey(item) {
17556
+ return item.type === "action" ? `action:${item.action}` : `tree:${item.id}`;
17557
+ }
17263
17558
  function TreeItem({
17264
17559
  node,
17265
17560
  depth,
@@ -17273,7 +17568,10 @@ function TreeItem({
17273
17568
  onEditChange,
17274
17569
  onEditSubmit,
17275
17570
  onEditCancel,
17276
- actions
17571
+ actions,
17572
+ onKeyDown: onKeyDown2,
17573
+ registerRef,
17574
+ onFocus
17277
17575
  }) {
17278
17576
  const { t } = useTranslation();
17279
17577
  const isOpen = openFolders.has(node.id);
@@ -17284,6 +17582,15 @@ function TreeItem({
17284
17582
  reactExports.useEffect(() => {
17285
17583
  if (isEditing) setTimeout(() => inputRef.current?.focus(), 0);
17286
17584
  }, [isEditing]);
17585
+ const handleView = (e) => {
17586
+ if (node.isFolder) {
17587
+ actions.toggle(node);
17588
+ actions.select(node.id, e);
17589
+ } else {
17590
+ actions.previewFile(node.id);
17591
+ actions.select(node.id, e);
17592
+ }
17593
+ };
17287
17594
  const childProps = {
17288
17595
  selectedIds,
17289
17596
  openFolders,
@@ -17294,7 +17601,10 @@ function TreeItem({
17294
17601
  onEditChange,
17295
17602
  onEditSubmit,
17296
17603
  onEditCancel,
17297
- actions
17604
+ actions,
17605
+ onKeyDown: onKeyDown2,
17606
+ registerRef,
17607
+ onFocus
17298
17608
  };
17299
17609
  const status = gitStatusMap.get(node.id);
17300
17610
  let statusText = "";
@@ -17331,7 +17641,22 @@ function TreeItem({
17331
17641
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
17332
17642
  ContextMenuTrigger,
17333
17643
  {
17334
- render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
17644
+ render: /* @__PURE__ */ jsxRuntimeExports.jsx(
17645
+ "div",
17646
+ {
17647
+ ref: (element) => registerRef(node.id, element),
17648
+ tabIndex: -1,
17649
+ role: "treeitem",
17650
+ "aria-level": depth + 1,
17651
+ "aria-expanded": node.isFolder ? isOpen : void 0,
17652
+ "aria-selected": isSelected,
17653
+ className: "outline-0 focus-visible:inset-ring-1 focus-visible:inset-ring-ring/80 rounded-md",
17654
+ onKeyDown: (e) => {
17655
+ if (e.target === e.currentTarget) onKeyDown2(e, node);
17656
+ },
17657
+ onFocus: () => onFocus(node.id)
17658
+ }
17659
+ ),
17335
17660
  draggable: !isEditing,
17336
17661
  onDragStart: (e) => {
17337
17662
  e.stopPropagation();
@@ -17349,10 +17674,9 @@ function TreeItem({
17349
17674
  },
17350
17675
  className: cn$1(
17351
17676
  "flex h-6 cursor-default select-none items-center gap-1.5 px-1.5 text-sx leading-none text-foreground/60",
17352
- node.ignored && "opacity-50",
17353
17677
  node.id === previewId ? "bg-primary/8 hover:bg-primary/10" : "hover:bg-primary/5 hover:text-foreground",
17354
17678
  isSelected ? "text-foreground bg-primary/6" : "",
17355
- isDragOver && "relative ring-1 ring-primary bg-primary/5"
17679
+ isDragOver && "relative inset-ring-1 inset-ring-primary bg-primary/5"
17356
17680
  ),
17357
17681
  style: { paddingLeft: `${depth * 16 + 6}px` },
17358
17682
  onClick: (e) => {
@@ -17361,13 +17685,7 @@ function TreeItem({
17361
17685
  actions.select(node.id, e);
17362
17686
  return;
17363
17687
  }
17364
- if (node.isFolder) {
17365
- actions.toggle(node);
17366
- actions.select(node.id, e);
17367
- } else {
17368
- actions.previewFile(node.id);
17369
- actions.select(node.id, e);
17370
- }
17688
+ handleView(e);
17371
17689
  },
17372
17690
  children: [
17373
17691
  node.isFolder ? /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -17375,10 +17693,20 @@ function TreeItem({
17375
17693
  {
17376
17694
  className: cn$1(
17377
17695
  "size-3.5 shrink-0 text-muted-foreground scale-110 transition-transform",
17378
- isOpen && "rotate-90"
17696
+ isOpen && "rotate-90",
17697
+ node.ignored && "opacity-50"
17379
17698
  )
17380
17699
  }
17381
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { name: node.name, className: "size-3.5 shrink-0 text-muted-foreground/90" }),
17700
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
17701
+ FileIcon,
17702
+ {
17703
+ name: node.name,
17704
+ className: cn$1(
17705
+ "size-3.5 shrink-0 text-muted-foreground/90",
17706
+ node.ignored && "opacity-50"
17707
+ )
17708
+ }
17709
+ ),
17382
17710
  isEditing ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17383
17711
  "input",
17384
17712
  {
@@ -17399,7 +17727,8 @@ function TreeItem({
17399
17727
  {
17400
17728
  className: cn$1(
17401
17729
  "flex-1 truncate leading-normal",
17402
- statusText && !node.isFolder && statusColor
17730
+ statusText && !node.isFolder && statusColor,
17731
+ node.ignored && "opacity-50"
17403
17732
  ),
17404
17733
  children: node.name
17405
17734
  }
@@ -17419,6 +17748,11 @@ function TreeItem({
17419
17748
  }
17420
17749
  ),
17421
17750
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
17751
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: handleView, children: [
17752
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Eye, {}),
17753
+ t("filePanel.view")
17754
+ ] }),
17755
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
17422
17756
  node.isFolder ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
17423
17757
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => actions.createIn(node.id, false), children: [
17424
17758
  /* @__PURE__ */ jsxRuntimeExports.jsx(FilePlus, {}),
@@ -17533,7 +17867,7 @@ function TreeItem({
17533
17867
  actions.deleteNode(ids);
17534
17868
  },
17535
17869
  children: [
17536
- /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, {}),
17870
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Trash, {}),
17537
17871
  t("filePanel.delete")
17538
17872
  ]
17539
17873
  }
@@ -17558,7 +17892,13 @@ const FilePanel = reactExports.memo(function FilePanel2({
17558
17892
  onPreviewFile
17559
17893
  }) {
17560
17894
  const { t } = useTranslation();
17561
- const containerRef = reactExports.useRef(null);
17895
+ const treeRef = reactExports.useRef(null);
17896
+ const treeItemRefs = reactExports.useRef(/* @__PURE__ */ new Map());
17897
+ const navigationActionRefs = reactExports.useRef(/* @__PURE__ */ new Map());
17898
+ const lastFocusedActionRef = reactExports.useRef(null);
17899
+ const focusedTreeItemIdRef = reactExports.useRef(null);
17900
+ const pendingFocusIdRef = reactExports.useRef(null);
17901
+ const pendingFocusRestoreRef = reactExports.useRef(false);
17562
17902
  const [data, setData] = reactExports.useState([]);
17563
17903
  const [loading, setLoading] = reactExports.useState(false);
17564
17904
  const [showLoading, setShowLoading] = reactExports.useState(false);
@@ -17769,6 +18109,137 @@ const FilePanel = reactExports.memo(function FilePanel2({
17769
18109
  },
17770
18110
  [openFolders]
17771
18111
  );
18112
+ const registerTreeItemRef = reactExports.useCallback((id, element) => {
18113
+ if (element) {
18114
+ treeItemRefs.current.set(id, element);
18115
+ } else {
18116
+ treeItemRefs.current.delete(id);
18117
+ }
18118
+ }, []);
18119
+ const registerNavigationActionRef = reactExports.useCallback(
18120
+ (action, element) => {
18121
+ if (element) {
18122
+ navigationActionRefs.current.set(action, element);
18123
+ } else {
18124
+ navigationActionRefs.current.delete(action);
18125
+ }
18126
+ },
18127
+ []
18128
+ );
18129
+ const handleTreeItemFocus = reactExports.useCallback((id) => {
18130
+ focusedTreeItemIdRef.current = id;
18131
+ }, []);
18132
+ const focusTreeItem = reactExports.useCallback(
18133
+ (id) => {
18134
+ let element = treeItemRefs.current.get(id);
18135
+ if (!element) {
18136
+ const visibleIds = flattenTree(data);
18137
+ const itemIndex = visibleIds.indexOf(id);
18138
+ if (itemIndex !== -1) {
18139
+ element = treeRef.current?.querySelectorAll('[role="treeitem"]')[itemIndex];
18140
+ }
18141
+ }
18142
+ if (!element) return;
18143
+ element.focus({ preventScroll: true });
18144
+ element.scrollIntoView({ block: "nearest" });
18145
+ },
18146
+ [data, flattenTree]
18147
+ );
18148
+ const fileNavigationItems = reactExports.useMemo(() => {
18149
+ const items = [];
18150
+ if (!isWebUI && cwd) {
18151
+ items.push({ type: "action", action: "reveal" });
18152
+ items.push({ type: "action", action: "editor" });
18153
+ }
18154
+ if (!loading) {
18155
+ items.push(
18156
+ { type: "action", action: "new-file" },
18157
+ { type: "action", action: "new-folder" },
18158
+ { type: "action", action: "refresh" },
18159
+ { type: "action", action: "collapse" }
18160
+ );
18161
+ }
18162
+ items.push(...flattenTree(data).map((id) => ({ type: "tree", id })));
18163
+ return items;
18164
+ }, [cwd, data, flattenTree, loading]);
18165
+ const fileActionItems = reactExports.useMemo(
18166
+ () => fileNavigationItems.filter(
18167
+ (item) => item.type === "action"
18168
+ ),
18169
+ [fileNavigationItems]
18170
+ );
18171
+ const treeNavigationItems = reactExports.useMemo(
18172
+ () => fileNavigationItems.filter(
18173
+ (item) => item.type === "tree"
18174
+ ),
18175
+ [fileNavigationItems]
18176
+ );
18177
+ const focusFileNavigationItem = reactExports.useCallback(
18178
+ (item) => {
18179
+ if (item.type === "action") {
18180
+ const element = navigationActionRefs.current.get(item.action);
18181
+ if (!element) return;
18182
+ element.focus({ preventScroll: true });
18183
+ return;
18184
+ }
18185
+ focusTreeItem(item.id);
18186
+ },
18187
+ [focusTreeItem]
18188
+ );
18189
+ const handleFileNavigationKeyDown = reactExports.useCallback(
18190
+ (event, items, item) => {
18191
+ event.preventDefault();
18192
+ event.stopPropagation();
18193
+ if (items.length === 0) return;
18194
+ const currentIndex = items.findIndex(
18195
+ (navigationItem) => fileNavigationItemKey(navigationItem) === fileNavigationItemKey(item)
18196
+ );
18197
+ const nextIndex = event.key === "Home" ? 0 : event.key === "End" ? items.length - 1 : Math.max(
18198
+ 0,
18199
+ Math.min(
18200
+ items.length - 1,
18201
+ currentIndex + (event.key === "ArrowRight" || event.key === "ArrowDown" ? 1 : -1)
18202
+ )
18203
+ );
18204
+ const nextItem = items[nextIndex];
18205
+ if (nextItem) focusFileNavigationItem(nextItem);
18206
+ },
18207
+ [focusFileNavigationItem]
18208
+ );
18209
+ const focusFileTree = reactExports.useCallback(() => {
18210
+ const visibleIds = flattenTree(data);
18211
+ const targetId = lastSelectedId && visibleIds.includes(lastSelectedId) && lastSelectedId || visibleIds.find((id) => selectedIds.has(id)) || visibleIds[0];
18212
+ if (targetId) {
18213
+ focusTreeItem(targetId);
18214
+ } else if (fileActionItems[0]) {
18215
+ focusFileNavigationItem(fileActionItems[0]);
18216
+ }
18217
+ }, [
18218
+ data,
18219
+ fileActionItems,
18220
+ flattenTree,
18221
+ focusFileNavigationItem,
18222
+ focusTreeItem,
18223
+ lastSelectedId,
18224
+ selectedIds
18225
+ ]);
18226
+ useFocusTarget("file-tree-content", focusFileTree);
18227
+ reactExports.useEffect(() => {
18228
+ if (!pendingFocusRestoreRef.current || loading) return;
18229
+ const visibleIds = flattenTree(data);
18230
+ const pendingId = pendingFocusIdRef.current;
18231
+ const targetId = pendingId && visibleIds.includes(pendingId) ? pendingId : visibleIds[0];
18232
+ const fallbackAction = fileActionItems[0];
18233
+ pendingFocusRestoreRef.current = false;
18234
+ pendingFocusIdRef.current = null;
18235
+ window.requestAnimationFrame(() => {
18236
+ if (targetId) {
18237
+ focusTreeItem(targetId);
18238
+ } else if (fallbackAction) {
18239
+ focusFileNavigationItem(fallbackAction);
18240
+ }
18241
+ });
18242
+ }, [data, fileActionItems, flattenTree, focusFileNavigationItem, focusTreeItem, loading]);
17772
18243
  reactExports.useEffect(() => {
17773
18244
  useAppStore.getState().updateProjectState(projectId, () => ({
17774
18245
  openFolders: Array.from(openFolders)
@@ -17820,6 +18291,86 @@ const FilePanel = reactExports.memo(function FilePanel2({
17820
18291
  },
17821
18292
  [activeProjectId]
17822
18293
  );
18294
+ const handleTreeKeyDown = reactExports.useCallback(
18295
+ (event, node) => {
18296
+ const { key } = event;
18297
+ const isVerticalNavigationKey = key === "ArrowUp" || key === "ArrowDown" || key === "Home" || key === "End";
18298
+ if (isVerticalNavigationKey) {
18299
+ const treeItem = { type: "tree", id: node.id };
18300
+ const currentIndex = treeNavigationItems.findIndex((item) => item.id === node.id);
18301
+ if (key === "ArrowUp" && currentIndex === 0) {
18302
+ const actionItem = fileActionItems.find((item) => item.action === lastFocusedActionRef.current) ?? fileActionItems[0];
18303
+ if (actionItem) {
18304
+ event.preventDefault();
18305
+ event.stopPropagation();
18306
+ focusFileNavigationItem(actionItem);
18307
+ return;
18308
+ }
18309
+ }
18310
+ handleFileNavigationKeyDown(event, treeNavigationItems, treeItem);
18311
+ return;
18312
+ }
18313
+ if (key === "/") {
18314
+ event.preventDefault();
18315
+ event.stopPropagation();
18316
+ const target = event.currentTarget;
18317
+ const rect = target.getBoundingClientRect();
18318
+ target.dispatchEvent(
18319
+ new MouseEvent("contextmenu", {
18320
+ bubbles: true,
18321
+ cancelable: true,
18322
+ view: window,
18323
+ button: 2,
18324
+ buttons: 2,
18325
+ clientX: rect.left + rect.width / 2,
18326
+ clientY: rect.top + rect.height / 2
18327
+ })
18328
+ );
18329
+ return;
18330
+ }
18331
+ if (key === "ArrowLeft" || key === "ArrowRight") {
18332
+ event.preventDefault();
18333
+ event.stopPropagation();
18334
+ if (key === "ArrowRight" && node.isFolder) {
18335
+ if (!openFolders.has(node.id)) {
18336
+ toggle(node);
18337
+ } else {
18338
+ const firstChild = node.children?.[0];
18339
+ if (firstChild) focusTreeItem(firstChild.id);
18340
+ }
18341
+ } else if (key === "ArrowLeft") {
18342
+ if (node.isFolder && openFolders.has(node.id)) {
18343
+ toggle(node);
18344
+ } else {
18345
+ const parentId = node.id.slice(0, node.id.lastIndexOf("/"));
18346
+ if (parentId) focusTreeItem(parentId);
18347
+ }
18348
+ }
18349
+ return;
18350
+ }
18351
+ if (key === "Enter" || key === " " || key === "Spacebar") {
18352
+ event.preventDefault();
18353
+ event.stopPropagation();
18354
+ setSelectedIds(/* @__PURE__ */ new Set([node.id]));
18355
+ setLastSelectedId(node.id);
18356
+ if (node.isFolder) {
18357
+ toggle(node);
18358
+ } else {
18359
+ onPreviewFile(node.id);
18360
+ }
18361
+ }
18362
+ },
18363
+ [
18364
+ fileActionItems,
18365
+ focusFileNavigationItem,
18366
+ focusTreeItem,
18367
+ handleFileNavigationKeyDown,
18368
+ onPreviewFile,
18369
+ openFolders,
18370
+ toggle,
18371
+ treeNavigationItems
18372
+ ]
18373
+ );
17823
18374
  const collapseAll = reactExports.useCallback(() => {
17824
18375
  setOpenFolders(/* @__PURE__ */ new Set());
17825
18376
  openFoldersRef.current = /* @__PURE__ */ new Set();
@@ -17958,6 +18509,16 @@ const FilePanel = reactExports.memo(function FilePanel2({
17958
18509
  request.getPlatform().then((p) => setOsPlatform(p));
17959
18510
  }, []);
17960
18511
  const trashLabel = osPlatform === "darwin" ? t("filePanel.moveToTrash") : osPlatform === "win32" ? t("filePanel.moveToRecycleBin") : t("filePanel.moveToTrash");
18512
+ const prepareFocusAfterDelete = (ids) => {
18513
+ const isDeletedId = (id) => ids.some((deletedId) => id === deletedId || id.startsWith(`${deletedId}/`));
18514
+ const referenceId = (focusedTreeItemIdRef.current && isDeletedId(focusedTreeItemIdRef.current) ? focusedTreeItemIdRef.current : null) ?? (lastSelectedId && isDeletedId(lastSelectedId) ? lastSelectedId : null) ?? ids.find(isDeletedId);
18515
+ if (!referenceId) return;
18516
+ const visibleIds = flattenTree(data);
18517
+ const referenceIndex = visibleIds.indexOf(referenceId);
18518
+ const targetId = (referenceIndex !== -1 ? visibleIds.slice(referenceIndex + 1).find((id) => !isDeletedId(id)) : void 0) ?? (referenceIndex !== -1 ? [...visibleIds.slice(0, referenceIndex)].reverse().find((id) => !isDeletedId(id)) : void 0) ?? visibleIds.find((id) => !isDeletedId(id));
18519
+ pendingFocusIdRef.current = targetId ?? null;
18520
+ pendingFocusRestoreRef.current = true;
18521
+ };
17961
18522
  const deleteNode = async (ids) => {
17962
18523
  if (ids.length === 0 || !activeProjectId) return;
17963
18524
  await confirm2({
@@ -17986,7 +18547,9 @@ const FilePanel = reactExports.memo(function FilePanel2({
17986
18547
  } catch (err) {
17987
18548
  console.error("Delete failed:", extractErrorMessage(err));
17988
18549
  }
18550
+ prepareFocusAfterDelete(ids);
17989
18551
  setSelectedIds(/* @__PURE__ */ new Set());
18552
+ setLastSelectedId(null);
17990
18553
  refresh();
17991
18554
  return "trashed";
17992
18555
  }
@@ -18004,7 +18567,9 @@ const FilePanel = reactExports.memo(function FilePanel2({
18004
18567
  } catch (err) {
18005
18568
  console.error("Delete failed:", extractErrorMessage(err));
18006
18569
  }
18570
+ prepareFocusAfterDelete(ids);
18007
18571
  setSelectedIds(/* @__PURE__ */ new Set());
18572
+ setLastSelectedId(null);
18008
18573
  refresh();
18009
18574
  return "deleted";
18010
18575
  }
@@ -18445,6 +19010,47 @@ const FilePanel = reactExports.memo(function FilePanel2({
18445
19010
  }
18446
19011
  return null;
18447
19012
  };
19013
+ const handleFileActionKeyDown = (event, action) => {
19014
+ if (event.key === "ArrowLeft" || event.key === "ArrowRight" || event.key === "Home" || event.key === "End") {
19015
+ handleFileNavigationKeyDown(event, fileActionItems, { type: "action", action });
19016
+ return;
19017
+ }
19018
+ if (event.key === "ArrowDown") {
19019
+ event.preventDefault();
19020
+ event.stopPropagation();
19021
+ const firstTreeItem = treeNavigationItems[0];
19022
+ if (firstTreeItem) focusFileNavigationItem(firstTreeItem);
19023
+ return;
19024
+ }
19025
+ if (event.key !== "Enter" && event.key !== " " && event.key !== "Spacebar") return;
19026
+ event.preventDefault();
19027
+ event.stopPropagation();
19028
+ switch (action) {
19029
+ case "reveal":
19030
+ if (cwd) void revealInFinder(cwd);
19031
+ break;
19032
+ case "editor":
19033
+ if (cwd) {
19034
+ const editorName = useAppStore.getState().editor.name;
19035
+ void electron.openInEditor(cwd, editorName).catch((err) => {
19036
+ console.error("openInEditor failed:", extractErrorMessage(err));
19037
+ });
19038
+ }
19039
+ break;
19040
+ case "new-file":
19041
+ createIn(getSelectedFolder(), false);
19042
+ break;
19043
+ case "new-folder":
19044
+ createIn(getSelectedFolder(), true);
19045
+ break;
19046
+ case "refresh":
19047
+ refresh();
19048
+ break;
19049
+ case "collapse":
19050
+ collapseAll();
19051
+ break;
19052
+ }
19053
+ };
18448
19054
  if (!projectId) {
18449
19055
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-full items-center justify-center text-xs text-muted-foreground", children: t("filePanel.noProject", "No project selected") });
18450
19056
  }
@@ -18464,9 +19070,12 @@ const FilePanel = reactExports.memo(function FilePanel2({
18464
19070
  onEditChange: setEditingValue,
18465
19071
  onEditSubmit: submitEdit,
18466
19072
  onEditCancel: () => setEditingId(null),
18467
- actions
19073
+ actions,
19074
+ onKeyDown: handleTreeKeyDown,
19075
+ registerRef: registerTreeItemRef,
19076
+ onFocus: handleTreeItemFocus
18468
19077
  };
18469
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "flex h-full min-h-0 flex-col text-xs w-full", children: [
19078
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full min-h-0 flex-col text-xs w-full", children: [
18470
19079
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-0.5 border-b border-border", children: [
18471
19080
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex text-muted-foreground items-center gap-1 px-3", children: [
18472
19081
  /* @__PURE__ */ jsxRuntimeExports.jsx(Folders, { className: "size-3.5" }),
@@ -18477,10 +19086,16 @@ const FilePanel = reactExports.memo(function FilePanel2({
18477
19086
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18478
19087
  Button,
18479
19088
  {
19089
+ ref: (element) => registerNavigationActionRef("reveal", element),
18480
19090
  variant: "ghost",
18481
19091
  size: "icon",
19092
+ tabIndex: -1,
18482
19093
  className: "size-6 text-muted-foreground hover:text-foreground",
18483
19094
  disabled: !cwd,
19095
+ onKeyDown: (event) => handleFileActionKeyDown(event, "reveal"),
19096
+ onFocus: () => {
19097
+ lastFocusedActionRef.current = "reveal";
19098
+ },
18484
19099
  onClick: () => revealInFinder(cwd),
18485
19100
  title: t("filePanel.revealInFinder"),
18486
19101
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { className: "size-3.5" })
@@ -18489,10 +19104,16 @@ const FilePanel = reactExports.memo(function FilePanel2({
18489
19104
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18490
19105
  Button,
18491
19106
  {
19107
+ ref: (element) => registerNavigationActionRef("editor", element),
18492
19108
  variant: "ghost",
18493
19109
  size: "icon",
19110
+ tabIndex: -1,
18494
19111
  className: "size-6 text-muted-foreground hover:text-foreground",
18495
19112
  disabled: !cwd,
19113
+ onKeyDown: (event) => handleFileActionKeyDown(event, "editor"),
19114
+ onFocus: () => {
19115
+ lastFocusedActionRef.current = "editor";
19116
+ },
18496
19117
  onClick: () => {
18497
19118
  if (!cwd) return;
18498
19119
  const editorName = useAppStore.getState().editor.name;
@@ -18510,10 +19131,16 @@ const FilePanel = reactExports.memo(function FilePanel2({
18510
19131
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18511
19132
  Button,
18512
19133
  {
19134
+ ref: (element) => registerNavigationActionRef("new-file", element),
18513
19135
  variant: "ghost",
18514
19136
  size: "icon",
19137
+ tabIndex: -1,
18515
19138
  className: "size-6 text-muted-foreground hover:text-foreground",
18516
19139
  disabled: loading,
19140
+ onKeyDown: (event) => handleFileActionKeyDown(event, "new-file"),
19141
+ onFocus: () => {
19142
+ lastFocusedActionRef.current = "new-file";
19143
+ },
18517
19144
  onClick: () => createIn(getSelectedFolder(), false),
18518
19145
  title: t("filePanel.newFile"),
18519
19146
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(FilePlus, { className: "size-3.5" })
@@ -18522,10 +19149,16 @@ const FilePanel = reactExports.memo(function FilePanel2({
18522
19149
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18523
19150
  Button,
18524
19151
  {
19152
+ ref: (element) => registerNavigationActionRef("new-folder", element),
18525
19153
  variant: "ghost",
18526
19154
  size: "icon",
19155
+ tabIndex: -1,
18527
19156
  className: "size-6 text-muted-foreground hover:text-foreground",
18528
19157
  disabled: loading,
19158
+ onKeyDown: (event) => handleFileActionKeyDown(event, "new-folder"),
19159
+ onFocus: () => {
19160
+ lastFocusedActionRef.current = "new-folder";
19161
+ },
18529
19162
  onClick: () => createIn(getSelectedFolder(), true),
18530
19163
  title: t("filePanel.newFolder"),
18531
19164
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(FolderPlus, { className: "size-3.5" })
@@ -18534,10 +19167,16 @@ const FilePanel = reactExports.memo(function FilePanel2({
18534
19167
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18535
19168
  Button,
18536
19169
  {
19170
+ ref: (element) => registerNavigationActionRef("refresh", element),
18537
19171
  variant: "ghost",
18538
19172
  size: "icon",
19173
+ tabIndex: -1,
18539
19174
  className: "size-6 text-muted-foreground hover:text-foreground",
18540
19175
  disabled: loading,
19176
+ onKeyDown: (event) => handleFileActionKeyDown(event, "refresh"),
19177
+ onFocus: () => {
19178
+ lastFocusedActionRef.current = "refresh";
19179
+ },
18541
19180
  onClick: refresh,
18542
19181
  title: t("filePanel.refresh", "Refresh"),
18543
19182
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "size-3.5" })
@@ -18546,10 +19185,16 @@ const FilePanel = reactExports.memo(function FilePanel2({
18546
19185
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18547
19186
  Button,
18548
19187
  {
19188
+ ref: (element) => registerNavigationActionRef("collapse", element),
18549
19189
  variant: "ghost",
18550
19190
  size: "icon",
19191
+ tabIndex: -1,
18551
19192
  className: "size-6 text-muted-foreground hover:text-foreground",
18552
19193
  disabled: loading,
19194
+ onKeyDown: (event) => handleFileActionKeyDown(event, "collapse"),
19195
+ onFocus: () => {
19196
+ lastFocusedActionRef.current = "collapse";
19197
+ },
18553
19198
  onClick: collapseAll,
18554
19199
  title: t("filePanel.collapseFolders"),
18555
19200
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ListChevronsDownUp, { className: "size-3.5" })
@@ -18571,11 +19216,11 @@ const FilePanel = reactExports.memo(function FilePanel2({
18571
19216
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground/70", children: t("filePanel.emptyDirectory") })
18572
19217
  ]
18573
19218
  }
18574
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1 pl-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
19219
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1 px-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
18575
19220
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18576
19221
  ContextMenuTrigger,
18577
19222
  {
18578
- render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
19223
+ render: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: treeRef, role: "tree", "aria-label": t("filePanel.title", "Files") }),
18579
19224
  className: "min-h-full py-1",
18580
19225
  onClick: (e) => {
18581
19226
  if (e.target === e.currentTarget) clearSelection();
@@ -18703,6 +19348,10 @@ function findNode(node, id) {
18703
19348
  }
18704
19349
  return null;
18705
19350
  }
19351
+ const ADD_TERMINAL_NAVIGATION_ID = "__add_terminal__";
19352
+ function terminalNavigationItemKey(item) {
19353
+ return item.type === "add" ? ADD_TERMINAL_NAVIGATION_ID : item.id;
19354
+ }
18706
19355
  function TerminalPanel({
18707
19356
  projectId,
18708
19357
  activeTerminalId,
@@ -18712,7 +19361,52 @@ function TerminalPanel({
18712
19361
  const projectState = useProjectState(projectId);
18713
19362
  const terminals = projectState.terminals;
18714
19363
  const updateProjectState = useAppStore((s15) => s15.updateProjectState);
18715
- async function createTerminal() {
19364
+ const navigationItemRefs = reactExports.useRef(/* @__PURE__ */ new Map());
19365
+ const focusedNavigationItemIdRef = reactExports.useRef(null);
19366
+ const navigationItems = reactExports.useMemo(() => {
19367
+ const items = [{ type: "add" }];
19368
+ items.push(
19369
+ ...terminals.map((terminal) => ({
19370
+ type: "terminal",
19371
+ id: terminal.id
19372
+ }))
19373
+ );
19374
+ return items;
19375
+ }, [terminals]);
19376
+ const terminalItems = reactExports.useMemo(
19377
+ () => navigationItems.filter(
19378
+ (item) => item.type === "terminal"
19379
+ ),
19380
+ [navigationItems]
19381
+ );
19382
+ const registerNavigationItemRef = reactExports.useCallback((id, element) => {
19383
+ if (element) {
19384
+ navigationItemRefs.current.set(id, element);
19385
+ } else {
19386
+ navigationItemRefs.current.delete(id);
19387
+ }
19388
+ }, []);
19389
+ const focusNavigationItem = reactExports.useCallback((item) => {
19390
+ const element = navigationItemRefs.current.get(terminalNavigationItemKey(item));
19391
+ if (!element) return;
19392
+ element.focus({ preventScroll: true });
19393
+ element.scrollIntoView({ block: "nearest" });
19394
+ }, []);
19395
+ const focusTerminalList = reactExports.useCallback(() => {
19396
+ const activeItem = activeTerminalId ? navigationItems.find(
19397
+ (item) => item.type === "terminal" && item.id === activeTerminalId
19398
+ ) : void 0;
19399
+ focusNavigationItem(activeItem ?? navigationItems[0]);
19400
+ }, [activeTerminalId, focusNavigationItem, navigationItems]);
19401
+ useFocusTarget("terminal-list-content", focusTerminalList);
19402
+ const selectTerminal = reactExports.useCallback(
19403
+ (terminalId) => {
19404
+ updateProjectState(projectId, () => ({ activeTerminalId: terminalId }));
19405
+ onSelectTerminal(terminalId);
19406
+ },
19407
+ [onSelectTerminal, projectId, updateProjectState]
19408
+ );
19409
+ const createTerminal = reactExports.useCallback(async () => {
18716
19410
  if (!projectId) return;
18717
19411
  const { terminalId } = await request.createTerminal({ projectId, cwd: "", clientId });
18718
19412
  updateProjectState(projectId, (prev) => ({
@@ -18720,9 +19414,14 @@ function TerminalPanel({
18720
19414
  activeTerminalId: terminalId
18721
19415
  }));
18722
19416
  onSelectTerminal(terminalId);
18723
- }
19417
+ }, [onSelectTerminal, projectId, updateProjectState]);
18724
19418
  async function deleteTerminal(terminalId, e) {
18725
- e.stopPropagation();
19419
+ e?.stopPropagation();
19420
+ const shouldRestoreFocus = focusedNavigationItemIdRef.current === terminalId;
19421
+ const deletedIndex = navigationItems.findIndex(
19422
+ (item) => item.type === "terminal" && item.id === terminalId
19423
+ );
19424
+ const focusTarget = deletedIndex === -1 ? void 0 : navigationItems[deletedIndex + 1] ?? navigationItems[deletedIndex - 1] ?? navigationItems[0];
18726
19425
  destroyTerminalInstance(terminalId);
18727
19426
  await request.killTerminal({ terminalId });
18728
19427
  updateProjectState(projectId, (prev) => {
@@ -18732,7 +19431,78 @@ function TerminalPanel({
18732
19431
  activeTerminalId: prev.activeTerminalId === terminalId ? nextList[nextList.length - 1]?.id ?? null : prev.activeTerminalId
18733
19432
  };
18734
19433
  });
19434
+ if (shouldRestoreFocus && focusTarget) {
19435
+ window.requestAnimationFrame(() => focusNavigationItem(focusTarget));
19436
+ }
18735
19437
  }
19438
+ const handleNavigationKeyDown = reactExports.useCallback(
19439
+ (event, item) => {
19440
+ const { key } = event;
19441
+ if (item.type === "add") {
19442
+ if (key === "ArrowLeft" || key === "ArrowRight" || key === "Home" || key === "End") {
19443
+ event.preventDefault();
19444
+ event.stopPropagation();
19445
+ focusNavigationItem(item);
19446
+ return;
19447
+ }
19448
+ if (key === "ArrowDown") {
19449
+ event.preventDefault();
19450
+ event.stopPropagation();
19451
+ const firstTerminal = terminalItems[0];
19452
+ if (firstTerminal) focusNavigationItem(firstTerminal);
19453
+ return;
19454
+ }
19455
+ if (key === "Enter" || key === " " || key === "Spacebar") {
19456
+ event.preventDefault();
19457
+ event.stopPropagation();
19458
+ void createTerminal();
19459
+ }
19460
+ return;
19461
+ }
19462
+ const isVerticalNavigationKey = key === "ArrowUp" || key === "ArrowDown" || key === "Home" || key === "End";
19463
+ if (isVerticalNavigationKey) {
19464
+ event.preventDefault();
19465
+ event.stopPropagation();
19466
+ const currentIndex = terminalItems.findIndex((terminal) => terminal.id === item.id);
19467
+ if (key === "ArrowUp" && currentIndex === 0) {
19468
+ focusNavigationItem({ type: "add" });
19469
+ return;
19470
+ }
19471
+ if (terminalItems.length === 0) return;
19472
+ const nextIndex = key === "Home" ? 0 : key === "End" ? terminalItems.length - 1 : Math.max(
19473
+ 0,
19474
+ Math.min(terminalItems.length - 1, currentIndex + (key === "ArrowDown" ? 1 : -1))
19475
+ );
19476
+ const nextTerminal = terminalItems[nextIndex];
19477
+ if (nextTerminal) focusNavigationItem(nextTerminal);
19478
+ return;
19479
+ }
19480
+ if (key === "/") {
19481
+ event.preventDefault();
19482
+ event.stopPropagation();
19483
+ const target = event.currentTarget;
19484
+ const rect = target.getBoundingClientRect();
19485
+ target.dispatchEvent(
19486
+ new MouseEvent("contextmenu", {
19487
+ bubbles: true,
19488
+ cancelable: true,
19489
+ view: window,
19490
+ button: 2,
19491
+ buttons: 2,
19492
+ clientX: rect.left + rect.width / 2,
19493
+ clientY: rect.top + rect.height / 2
19494
+ })
19495
+ );
19496
+ return;
19497
+ }
19498
+ if (key === "Enter" || key === " " || key === "Spacebar") {
19499
+ event.preventDefault();
19500
+ event.stopPropagation();
19501
+ selectTerminal(item.id);
19502
+ }
19503
+ },
19504
+ [createTerminal, focusNavigationItem, selectTerminal, terminalItems]
19505
+ );
18736
19506
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col", children: [
18737
19507
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-0.5 border-b border-border", children: [
18738
19508
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex text-muted-foreground items-center gap-1 px-3", children: [
@@ -18742,10 +19512,16 @@ function TerminalPanel({
18742
19512
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-auto mr-2 flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18743
19513
  Button,
18744
19514
  {
19515
+ ref: (element) => registerNavigationItemRef(ADD_TERMINAL_NAVIGATION_ID, element),
18745
19516
  variant: "ghost",
18746
19517
  size: "icon",
19518
+ tabIndex: -1,
18747
19519
  className: "size-6 text-muted-foreground hover:text-foreground",
18748
19520
  onClick: () => void createTerminal(),
19521
+ onKeyDown: (event) => handleNavigationKeyDown(event, { type: "add" }),
19522
+ onFocus: () => {
19523
+ focusedNavigationItemIdRef.current = ADD_TERMINAL_NAVIGATION_ID;
19524
+ },
18749
19525
  "aria-label": t("terminalPanel.addTerminal", "Add terminal"),
18750
19526
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-3.5" })
18751
19527
  }
@@ -18754,41 +19530,70 @@ function TerminalPanel({
18754
19530
  terminals.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col items-center justify-center text-muted-foreground", children: [
18755
19531
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-10 rounded-full bg-muted flex items-center justify-center mb-3 -mt-10", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SquareTerminal, { className: "size-5 text-muted-foreground/60" }) }),
18756
19532
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground/70", children: t("terminalPanel.noTerminalSelected", "No terminals") })
18757
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-0.5 py-1 px-1", children: terminals.map((terminal) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
18758
- "button",
18759
- {
18760
- type: "button",
18761
- onClick: () => {
18762
- updateProjectState(projectId, () => ({ activeTerminalId: terminal.id }));
18763
- onSelectTerminal(terminal.id);
18764
- },
18765
- className: cn$1(
18766
- "flex h-8 items-center gap-2 rounded-md pl-2 pr-1.5 text-xs w-full transition-colors",
18767
- terminal.id === activeTerminalId ? "bg-accent text-accent-foreground" : "text-foreground/70 hover:bg-accent/50 hover:text-foreground"
18768
- ),
18769
- children: [
18770
- /* @__PURE__ */ jsxRuntimeExports.jsx(
18771
- Circle,
19533
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-0.5 py-1 px-1", children: terminals.map((terminal) => /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
19534
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
19535
+ ContextMenuTrigger,
19536
+ {
19537
+ render: /* @__PURE__ */ jsxRuntimeExports.jsx(
19538
+ "button",
18772
19539
  {
18773
- className: cn$1(
18774
- "size-2 shrink-0",
18775
- terminal.running ? "fill-emerald-400 text-emerald-400" : "text-muted-foreground"
18776
- )
19540
+ ref: (element) => registerNavigationItemRef(terminal.id, element),
19541
+ type: "button",
19542
+ tabIndex: -1,
19543
+ className: "outline-0 focus-visible:inset-ring-1 focus-visible:inset-ring-ring/80 rounded-md",
19544
+ "aria-current": terminal.id === activeTerminalId ? "true" : void 0,
19545
+ onKeyDown: (event) => handleNavigationKeyDown(event, { type: "terminal", id: terminal.id }),
19546
+ onFocus: () => {
19547
+ focusedNavigationItemIdRef.current = terminal.id;
19548
+ }
18777
19549
  }
18778
19550
  ),
18779
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 truncate text-left", children: terminal.id.slice(0, 8) }),
18780
- /* @__PURE__ */ jsxRuntimeExports.jsx(
18781
- "span",
18782
- {
18783
- className: "flex size-5 shrink-0 items-center justify-center rounded hover:bg-background/70",
18784
- onClick: (e) => void deleteTerminal(terminal.id, e),
18785
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(X$1, { className: "size-3 text-muted-foreground" })
18786
- }
18787
- )
18788
- ]
18789
- },
18790
- terminal.id
18791
- )) }) })
19551
+ onClick: () => selectTerminal(terminal.id),
19552
+ className: cn$1(
19553
+ "flex h-8 items-center gap-2 rounded-md pl-2 pr-1.5 text-xs w-full transition-colors",
19554
+ terminal.id === activeTerminalId ? "bg-accent text-accent-foreground" : "text-foreground/70 hover:bg-accent/50 hover:text-foreground"
19555
+ ),
19556
+ children: [
19557
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
19558
+ Circle,
19559
+ {
19560
+ className: cn$1(
19561
+ "size-2 shrink-0",
19562
+ terminal.running ? "fill-emerald-400 text-emerald-400" : "text-muted-foreground"
19563
+ )
19564
+ }
19565
+ ),
19566
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 truncate text-left", children: terminal.id.slice(0, 8) }),
19567
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
19568
+ "span",
19569
+ {
19570
+ className: "flex size-5 shrink-0 items-center justify-center rounded hover:bg-background/70",
19571
+ onClick: (e) => void deleteTerminal(terminal.id, e),
19572
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(X$1, { className: "size-3 text-muted-foreground" })
19573
+ }
19574
+ )
19575
+ ]
19576
+ }
19577
+ ),
19578
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
19579
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => selectTerminal(terminal.id), children: [
19580
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Eye, {}),
19581
+ t("terminalPanel.view", "View")
19582
+ ] }),
19583
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
19584
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
19585
+ ContextMenuItem,
19586
+ {
19587
+ variant: "destructive",
19588
+ onClick: () => void deleteTerminal(terminal.id),
19589
+ children: [
19590
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Trash, {}),
19591
+ t("terminalPanel.delete", "Delete")
19592
+ ]
19593
+ }
19594
+ )
19595
+ ] })
19596
+ ] }, terminal.id)) }) })
18792
19597
  ] });
18793
19598
  }
18794
19599
  function Panel({
@@ -18801,6 +19606,27 @@ function Panel({
18801
19606
  onSelectTerminal
18802
19607
  }) {
18803
19608
  const { t } = useTranslation();
19609
+ const { focus } = useFocusTargetRegistry();
19610
+ const focusFileTree = reactExports.useCallback(() => {
19611
+ const focusFileTreeContent = () => focus("file-tree-content");
19612
+ if (tab === "files") {
19613
+ focusFileTreeContent();
19614
+ return;
19615
+ }
19616
+ onTabChange("files");
19617
+ window.requestAnimationFrame(focusFileTreeContent);
19618
+ }, [focus, onTabChange, tab]);
19619
+ useFocusTarget("file-tree", focusFileTree, Boolean(projectId));
19620
+ const focusTerminalList = reactExports.useCallback(() => {
19621
+ const focusTerminalListContent = () => focus("terminal-list-content");
19622
+ if (tab === "terminal") {
19623
+ focusTerminalListContent();
19624
+ return;
19625
+ }
19626
+ onTabChange("terminal");
19627
+ window.requestAnimationFrame(focusTerminalListContent);
19628
+ }, [focus, onTabChange, tab]);
19629
+ useFocusTarget("terminal-list", focusTerminalList, Boolean(projectId));
18804
19630
  if (!projectId) {
18805
19631
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-full items-center justify-center text-xs text-muted-foreground border-l border-border bg-background", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t("panel.noProjectSelected", "No project selected") }) });
18806
19632
  }
@@ -18821,7 +19647,7 @@ function Panel({
18821
19647
  t("panel.terminal", "Terminal")
18822
19648
  ] })
18823
19649
  ] }) }),
18824
- /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "files", className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
19650
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "files", keepMounted: true, className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18825
19651
  FilePanel,
18826
19652
  {
18827
19653
  projectId,
@@ -18829,7 +19655,7 @@ function Panel({
18829
19655
  onPreviewFile
18830
19656
  }
18831
19657
  ) }),
18832
- /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "terminal", className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
19658
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "terminal", keepMounted: true, className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18833
19659
  TerminalPanel,
18834
19660
  {
18835
19661
  projectId,
@@ -18911,61 +19737,21 @@ function Session({ session }) {
18911
19737
  const [connectionError, setConnectionError] = reactExports.useState(false);
18912
19738
  reactExports.useEffect(() => {
18913
19739
  setConnectionError(false);
18914
- request.loadSession({ sessionId }).catch((err) => {
19740
+ const sessionState = useAppStore.getState().getSessionState(sessionId);
19741
+ const shouldLoadHistory = sessionState.messages.length === 0 && !isCreatingSession && sessionState.loadedAt === null;
19742
+ if (shouldLoadHistory && fetchingRef.current === sessionId) return;
19743
+ if (shouldLoadHistory) fetchingRef.current = sessionId;
19744
+ void loadSession(sessionId, { loadHistory: shouldLoadHistory }).catch((err) => {
19745
+ if (err instanceof SessionLifecycleBusyError) return;
18915
19746
  setConnectionError(true);
18916
19747
  toast.error(err instanceof Error ? err.message : String(err));
19748
+ }).finally(() => {
19749
+ if (fetchingRef.current === sessionId) fetchingRef.current = null;
18917
19750
  });
18918
- const sessionState = useAppStore.getState().getSessionState(sessionId);
18919
- if (sessionState.messages.length > 0 || isCreatingSession || sessionState.loadedAt !== null) {
18920
- return;
18921
- }
18922
- if (fetchingRef.current === sessionId) return;
18923
- fetchingRef.current = sessionId;
18924
- async function fetchHistory() {
18925
- useAppStore.getState().updateSessionState(sessionId, (prev) => ({
18926
- ...reduceFlushStreaming(prev),
18927
- isLoading: true
18928
- }));
18929
- try {
18930
- const result = await request.getSessionHistory({ sessionId });
18931
- let state = useAppStore.getState().getSessionState(sessionId);
18932
- state = { ...state, messages: [], activeToolCalls: /* @__PURE__ */ new Map(), activeSubagents: /* @__PURE__ */ new Map() };
18933
- const displayIds = /* @__PURE__ */ new Set();
18934
- for (const notification of result.messages) {
18935
- const displayId = notification?.update?._meta?.fello?.displayId;
18936
- if (displayId) {
18937
- displayIds.add(displayId);
18938
- }
18939
- if (!notification?.update) continue;
18940
- state = reduceSessionNotification(sessionId, state, notification);
18941
- }
18942
- for (const notification of state.pendingNotifications) {
18943
- const did = notification.update._meta?.fello?.displayId;
18944
- if (did && displayIds.has(did)) {
18945
- continue;
18946
- }
18947
- state = reduceSessionNotification(sessionId, state, notification);
18948
- }
18949
- state = reduceFlushStreaming(state);
18950
- state = {
18951
- ...state,
18952
- isLoading: false,
18953
- pendingNotifications: [],
18954
- loadedAt: Date.now()
18955
- };
18956
- useAppStore.getState().updateSessionState(sessionId, () => state);
18957
- } catch (err) {
18958
- console.error("Failed to fetch session history", err);
18959
- useAppStore.getState().updateSessionState(sessionId, (prev) => ({ ...prev, isLoading: false }));
18960
- } finally {
18961
- fetchingRef.current = null;
18962
- }
18963
- }
18964
- void fetchHistory();
18965
19751
  }, [sessionId, isCreatingSession, toast]);
18966
19752
  return /* @__PURE__ */ jsxRuntimeExports.jsx("main", { ref: setMainEl, className: "flex min-w-0 flex-1 flex-col relative overflow-hidden", children: isLoading || sessionConnected !== "connected" || isCreatingSession ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-1 flex-col items-center justify-center gap-4 relative", children: [
18967
19753
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-0 right-0 h-12", style: { WebkitAppRegion: "drag" } }),
18968
- connectionError && sessionConnected !== "connected" && !isCreatingSession ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
19754
+ connectionError && !isCreatingSession ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
18969
19755
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-normal text-muted-foreground", children: t("session.connectionFailed") }),
18970
19756
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
18971
19757
  Button,
@@ -18974,7 +19760,8 @@ function Session({ session }) {
18974
19760
  size: "sm",
18975
19761
  onClick: () => {
18976
19762
  setConnectionError(false);
18977
- request.loadSession({ sessionId, force: true }).catch((err) => {
19763
+ void loadSession(sessionId, { force: true, loadHistory: true }).catch((err) => {
19764
+ if (err instanceof SessionLifecycleBusyError) return;
18978
19765
  setConnectionError(true);
18979
19766
  toast.error(err instanceof Error ? err.message : String(err));
18980
19767
  });