@band-app/server 0.20.2 → 0.21.1

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 (159) hide show
  1. package/dist/client/assets/DockviewBrowserContainer-DzbC1Mt8.js +5 -0
  2. package/dist/client/assets/DockviewTerminalContainer-CIr-N0ci.js +2 -0
  3. package/dist/client/assets/TerminalPanel-DSjCJfRV.js +5 -0
  4. package/dist/client/assets/{_basePickBy-K7I344em.js → _basePickBy-DafwSyTH.js} +1 -1
  5. package/dist/client/assets/{_baseUniq-840KfAAa.js → _baseUniq-BTf1vKsV.js} +1 -1
  6. package/dist/client/assets/{arc-CyZzBxl3.js → arc-t7jPB3j2.js} +1 -1
  7. package/dist/client/assets/{architectureDiagram-VXUJARFQ-CmR2ldp9.js → architectureDiagram-VXUJARFQ-HZ_0v8ps.js} +1 -1
  8. package/dist/client/assets/{blockDiagram-VD42YOAC-DrrwS0qA.js → blockDiagram-VD42YOAC-DR_bU1nI.js} +1 -1
  9. package/dist/client/assets/{c4Diagram-YG6GDRKO-DaK5OX1L.js → c4Diagram-YG6GDRKO-D_Gybysd.js} +1 -1
  10. package/dist/client/assets/channel-DhpHVfC-.js +1 -0
  11. package/dist/client/assets/{chunk-4BX2VUAB-CsnsxsVp.js → chunk-4BX2VUAB-CkLKUGFs.js} +1 -1
  12. package/dist/client/assets/{chunk-55IACEB6-BwSrHj7M.js → chunk-55IACEB6-DD5joSGW.js} +1 -1
  13. package/dist/client/assets/{chunk-B4BG7PRW-BufiBtiI.js → chunk-B4BG7PRW-DbcDvN95.js} +1 -1
  14. package/dist/client/assets/{chunk-DI55MBZ5-Yk6m5bd6.js → chunk-DI55MBZ5-D7NtzYbv.js} +1 -1
  15. package/dist/client/assets/{chunk-FMBD7UC4-DjItmPEo.js → chunk-FMBD7UC4-BcNswQs0.js} +1 -1
  16. package/dist/client/assets/{chunk-QN33PNHL-B7fPTsQD.js → chunk-QN33PNHL-DmBX24F0.js} +1 -1
  17. package/dist/client/assets/{chunk-QZHKN3VN-TVQc71ZW.js → chunk-QZHKN3VN-KyUXOWGI.js} +1 -1
  18. package/dist/client/assets/{chunk-TZMSLE5B-2idj0WVp.js → chunk-TZMSLE5B-3_MTPooQ.js} +1 -1
  19. package/dist/client/assets/classDiagram-2ON5EDUG-Dm-2ttX_.js +1 -0
  20. package/dist/client/assets/classDiagram-v2-WZHVMYZB-Dm-2ttX_.js +1 -0
  21. package/dist/client/assets/clone-BHQ3Yw6J.js +1 -0
  22. package/dist/client/assets/{cose-bilkent-S5V4N54A-BhM4dIed.js → cose-bilkent-S5V4N54A-ByN5eQeA.js} +1 -1
  23. package/dist/client/assets/{dagre-6UL2VRFP-BW7B-2Wf.js → dagre-6UL2VRFP-BFZ14GjZ.js} +1 -1
  24. package/dist/client/assets/{diagram-PSM6KHXK-D_bAy1sr.js → diagram-PSM6KHXK-Scd140Xl.js} +1 -1
  25. package/dist/client/assets/{diagram-QEK2KX5R-D8JQR6S5.js → diagram-QEK2KX5R-DqhKBtSh.js} +1 -1
  26. package/dist/client/assets/{diagram-S2PKOQOG-CfcIDV7e.js → diagram-S2PKOQOG-CQINlirF.js} +1 -1
  27. package/dist/client/assets/{erDiagram-Q2GNP2WA-CH496Ckq.js → erDiagram-Q2GNP2WA-DkDQNNPC.js} +1 -1
  28. package/dist/client/assets/{flowDiagram-NV44I4VS-DnG8llmE.js → flowDiagram-NV44I4VS-CQueazw-.js} +1 -1
  29. package/dist/client/assets/{ganttDiagram-JELNMOA3--itEi_t7.js → ganttDiagram-JELNMOA3-BoocCscm.js} +1 -1
  30. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-TMvOD2Hw.js → gitGraphDiagram-V2S2FVAM-CslyESbd.js} +1 -1
  31. package/dist/client/assets/{graph-c_E6O25w.js → graph-Dwc0TYWS.js} +1 -1
  32. package/dist/client/assets/{highlighted-body-B3W2YXNL-BQQGrbuP.js → highlighted-body-B3W2YXNL-D1NcORBv.js} +1 -1
  33. package/dist/client/assets/{index-B7YwKzXu.js → index-0T3OIZel.js} +1 -1
  34. package/dist/client/assets/{index-DWRgJu21.js → index-5MVxNnyO.js} +1 -1
  35. package/dist/client/assets/{index-CKuNUVLa.js → index-96su48Th.js} +1 -1
  36. package/dist/client/assets/{index-A07Yw0tn.js → index-B-XFygGO.js} +1 -1
  37. package/dist/client/assets/{index-D8IXa_66.js → index-BGeVMQ-5.js} +1 -1
  38. package/dist/client/assets/{index-DfuA-PNG.js → index-BN5d2SAU.js} +1 -1
  39. package/dist/client/assets/{index-Cu2JEhny.js → index-C9STKbES.js} +1 -1
  40. package/dist/client/assets/{index-CZ26DWy1.js → index-CvTgLN0b.js} +1 -1
  41. package/dist/client/assets/{index-By0qQdHl.js → index-D3UB8uPq.js} +1 -1
  42. package/dist/client/assets/{index-vbYm59ME.js → index-DsVgH_r6.js} +1 -1
  43. package/dist/client/assets/{index-m8_Ch1aa.js → index-DzTJ3LiE.js} +1 -1
  44. package/dist/client/assets/{index-C_O1BBs4.js → index-U8DwLRsF.js} +1 -1
  45. package/dist/client/assets/{index-Ds5Q3ErL.js → index-Z6azf1Sz.js} +1 -1
  46. package/dist/client/assets/{index-BDr61s69.js → index-cgWsIlxk.js} +1 -1
  47. package/dist/client/assets/{index-CPgwx8nF.js → index-vNkFH7CI.js} +1 -1
  48. package/dist/client/assets/{index-iGcckmiU.js → index-vj3FMJ85.js} +1 -1
  49. package/dist/client/assets/{index-B5eB60aU.js → index-yE4BQbMZ.js} +1 -1
  50. package/dist/client/assets/{index-DOS5ytTy.js → index-zc6xiNyn.js} +1 -1
  51. package/dist/client/assets/{infoDiagram-HS3SLOUP--m1No2DR.js → infoDiagram-HS3SLOUP-Cv7jIGhe.js} +1 -1
  52. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-BDutHWrQ.js → journeyDiagram-XKPGCS4Q-BhAKULNd.js} +1 -1
  53. package/dist/client/assets/{kanban-definition-3W4ZIXB7-C7PkU-98.js → kanban-definition-3W4ZIXB7-B0XkC-vg.js} +1 -1
  54. package/dist/client/assets/{layout-TzPz9qDe.js → layout-Bfr8bXLK.js} +1 -1
  55. package/dist/client/assets/{main-Dg3qcN-n.js → main-BlnV6QZf.js} +230 -230
  56. package/dist/client/assets/{mindmap-definition-VGOIOE7T-CSiVydvY.js → mindmap-definition-VGOIOE7T-D5OYhCsu.js} +1 -1
  57. package/dist/client/assets/{pieDiagram-ADFJNKIX-Dc6SkC1V.js → pieDiagram-ADFJNKIX-7K0Tdlq6.js} +1 -1
  58. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-BhNEAthj.js → quadrantDiagram-AYHSOK5B-pJUjscyl.js} +1 -1
  59. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-C1P5R6lO.js → requirementDiagram-UZGBJVZJ-DKf8Shq_.js} +1 -1
  60. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-Bk4NapW-.js → sankeyDiagram-TZEHDZUN-B5MIvrte.js} +1 -1
  61. package/dist/client/assets/{sequenceDiagram-WL72ISMW-CZkAOyvQ.js → sequenceDiagram-WL72ISMW-_g2o1nWx.js} +1 -1
  62. package/dist/client/assets/{square-terminal-GppBzFTB.js → square-terminal-CpaVnWZI.js} +1 -1
  63. package/dist/client/assets/{stateDiagram-FKZM4ZOC-BHVMEify.js → stateDiagram-FKZM4ZOC-XRcP-869.js} +1 -1
  64. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-7jPvKV-L.js +1 -0
  65. package/dist/client/assets/{timeline-definition-IT6M3QCI-BddSUTvN.js → timeline-definition-IT6M3QCI-DAj7fIjN.js} +1 -1
  66. package/dist/client/assets/{treemap-GDKQZRPO-C1EZTZwZ.js → treemap-GDKQZRPO-COeKauiP.js} +1 -1
  67. package/dist/client/assets/{workspace._workspaceId-DlSNI5Oq.js → workspace._workspaceId-CbzvY_UQ.js} +1 -1
  68. package/dist/client/assets/{workspace._workspaceId-BWohejgu.js → workspace._workspaceId-Dx_x5wRO.js} +2 -2
  69. package/dist/client/assets/{xychartDiagram-PRI3JC2R-DpUCBrE-.js → xychartDiagram-PRI3JC2R-C4fnE7uB.js} +1 -1
  70. package/dist/openapi.json +85 -25
  71. package/dist/server/assets/{DockviewBrowserContainer-DLO8DHQ8.js → DockviewBrowserContainer-CqDANKB4.js} +62 -44
  72. package/dist/server/assets/{DockviewTerminalContainer-CyrT6RMc.js → DockviewTerminalContainer-DbD2CvFz.js} +65 -46
  73. package/dist/server/assets/{TerminalPanel-EgMwvOQl.js → TerminalPanel-DmZ4CBdM.js} +70 -11
  74. package/dist/server/assets/{_basePickBy-DffNdyLl.js → _basePickBy-3wIPceeI.js} +2 -2
  75. package/dist/server/assets/{_baseUniq-Bfpn2XXj.js → _baseUniq-m9JhNSig.js} +1 -1
  76. package/dist/server/assets/{_tanstack-start-manifest_v-Bz2MwyQC.js → _tanstack-start-manifest_v-CtVENsS-.js} +1 -1
  77. package/dist/server/assets/{arc-D-2lE2nY.js → arc-CN-vyvUj.js} +1 -1
  78. package/dist/server/assets/{architecture-7HQA4BMR-Dl_dn3FS.js → architecture-7HQA4BMR-BNv0yNka.js} +6 -6
  79. package/dist/server/assets/{architectureDiagram-VXUJARFQ-CUeN4CLM.js → architectureDiagram-VXUJARFQ-CxI1sFRU.js} +6 -6
  80. package/dist/server/assets/{blockDiagram-VD42YOAC-CoHm7pVm.js → blockDiagram-VD42YOAC-BPuqqD38.js} +6 -6
  81. package/dist/server/assets/{c4Diagram-YG6GDRKO-ixN9bfNO.js → c4Diagram-YG6GDRKO-t3K9Gv7l.js} +2 -2
  82. package/dist/server/assets/{channel-C2x8ka5l.js → channel-wf57PI9V.js} +1 -1
  83. package/dist/server/assets/{chunk-4BX2VUAB-ty5ENgn-.js → chunk-4BX2VUAB-Hg_VjrJT.js} +1 -1
  84. package/dist/server/assets/{chunk-55IACEB6-CdhYl0WD.js → chunk-55IACEB6-CeYefPsA.js} +1 -1
  85. package/dist/server/assets/{chunk-B4BG7PRW-BskXevag.js → chunk-B4BG7PRW-BxMgdayn.js} +4 -4
  86. package/dist/server/assets/{chunk-DI55MBZ5-BjfW2WAW.js → chunk-DI55MBZ5-4Yy6M4GO.js} +3 -3
  87. package/dist/server/assets/{chunk-FMBD7UC4-Cuj-_YqX.js → chunk-FMBD7UC4-Cwd78rUv.js} +1 -1
  88. package/dist/server/assets/{chunk-QN33PNHL-N-a0mOYh.js → chunk-QN33PNHL-wzqaO6CO.js} +1 -1
  89. package/dist/server/assets/{chunk-QZHKN3VN-G3i4r4Cx.js → chunk-QZHKN3VN-C43eiH0R.js} +1 -1
  90. package/dist/server/assets/{chunk-TZMSLE5B-B3g6EfmG.js → chunk-TZMSLE5B-4CxMH9Q-.js} +1 -1
  91. package/dist/server/assets/{classDiagram-v2-WZHVMYZB-BHvCGARt.js → classDiagram-2ON5EDUG-CzKcVZJc.js} +5 -5
  92. package/dist/server/assets/{classDiagram-2ON5EDUG-BHvCGARt.js → classDiagram-v2-WZHVMYZB-CzKcVZJc.js} +5 -5
  93. package/dist/server/assets/{clone-Dvf-f1rO.js → clone-Co9W0CCe.js} +1 -1
  94. package/dist/server/assets/{cose-bilkent-S5V4N54A-DQur-dSk.js → cose-bilkent-S5V4N54A-CemnHiuy.js} +1 -1
  95. package/dist/server/assets/{dagre-6UL2VRFP-BqY_BEAB.js → dagre-6UL2VRFP-D-BLVjoL.js} +6 -6
  96. package/dist/server/assets/{diagram-PSM6KHXK-Ci3qYhO1.js → diagram-PSM6KHXK-k6pYzUY5.js} +7 -7
  97. package/dist/server/assets/{diagram-QEK2KX5R-Cetw62MH.js → diagram-QEK2KX5R-CscZyCx4.js} +6 -6
  98. package/dist/server/assets/{diagram-S2PKOQOG-C9ZAbCH3.js → diagram-S2PKOQOG-EPfaInlF.js} +6 -6
  99. package/dist/server/assets/{erDiagram-Q2GNP2WA-CXWd7XfZ.js → erDiagram-Q2GNP2WA-CxKqSr3v.js} +4 -4
  100. package/dist/server/assets/{flowDiagram-NV44I4VS-BYT0MDKu.js → flowDiagram-NV44I4VS-CmRcqums.js} +5 -5
  101. package/dist/server/assets/{ganttDiagram-JELNMOA3-DRqUEh77.js → ganttDiagram-JELNMOA3-YaNWnEH7.js} +1 -1
  102. package/dist/server/assets/{gitGraph-G5XIXVHT-BCxnYqav.js → gitGraph-G5XIXVHT-B8qpYmFU.js} +6 -6
  103. package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-iXeYaqRc.js → gitGraphDiagram-V2S2FVAM-Cyxw_T7Z.js} +7 -7
  104. package/dist/server/assets/{graph-CsW8oeuR.js → graph-6l2y48Sb.js} +2 -2
  105. package/dist/server/assets/{highlighted-body-B3W2YXNL-DFADuqgv.js → highlighted-body-B3W2YXNL-BaoNsTjY.js} +1 -1
  106. package/dist/server/assets/{index-CqA-krzP.js → index--Ibvlxfb.js} +2 -2
  107. package/dist/server/assets/{index-RNkDnge6.js → index-BA9bc05g.js} +2 -2
  108. package/dist/server/assets/{index-DlE6TTwo.js → index-BDNTG33i.js} +5 -5
  109. package/dist/server/assets/{index-IuIWAovp.js → index-BRQW2GDV.js} +5 -5
  110. package/dist/server/assets/{index-C5QUMB__.js → index-BbPBh6H3.js} +2 -2
  111. package/dist/server/assets/{index-Bk2rEXd9.js → index-Bveos8k-.js} +2 -2
  112. package/dist/server/assets/{index-CW8ZK5DO.js → index-ByjS99eX.js} +2 -2
  113. package/dist/server/assets/{index-BY32AoKU.js → index-CjxzboN7.js} +4 -4
  114. package/dist/server/assets/{index-BGD-OYit.js → index-CvjKE7Ta.js} +2 -2
  115. package/dist/server/assets/{index-BFTJZ14_.js → index-D2tc61J7.js} +2 -2
  116. package/dist/server/assets/{index-u8w_jl1U.js → index-D9p_mZDJ.js} +2 -2
  117. package/dist/server/assets/{index-4I0NKW9A.js → index-DFn6sCXI.js} +2 -2
  118. package/dist/server/assets/{index-Dh-QOcLi.js → index-DOVCz7M5.js} +3 -3
  119. package/dist/server/assets/{index-CsRze8_V.js → index-DPjPbgde.js} +1 -1
  120. package/dist/server/assets/{index-CaI_IFFh.js → index-DgJkTCJ8.js} +3 -3
  121. package/dist/server/assets/{index-24i7qhhh.js → index-Dwrj_nBm.js} +1 -1
  122. package/dist/server/assets/{index-O9RnegqI.js → index-Oxi8joDg.js} +2 -2
  123. package/dist/server/assets/{index-Xzkl582b.js → index-q4_fEkML.js} +2 -2
  124. package/dist/server/assets/{info-VBDWY6EO-CE3Djkbi.js → info-VBDWY6EO-_ifiEvcG.js} +6 -6
  125. package/dist/server/assets/{infoDiagram-HS3SLOUP-CcvjlamO.js → infoDiagram-HS3SLOUP-BzEF0J3M.js} +5 -5
  126. package/dist/server/assets/{journeyDiagram-XKPGCS4Q-D1o9zBGm.js → journeyDiagram-XKPGCS4Q-D03SsiQq.js} +4 -4
  127. package/dist/server/assets/{kanban-definition-3W4ZIXB7-CbYt-CCT.js → kanban-definition-3W4ZIXB7-BeOJMgU2.js} +2 -2
  128. package/dist/server/assets/{layout-hg_ZN_X1.js → layout-D6q-OdoG.js} +4 -4
  129. package/dist/server/assets/{mermaid-3ZIDBTTL-B1numrTC.js → mermaid-3ZIDBTTL-B2g4ZyRb.js} +1 -1
  130. package/dist/server/assets/{mermaid-parser.core-BjIxT260.js → mermaid-parser.core-CHdH9gLY.js} +11 -11
  131. package/dist/server/assets/{mindmap-definition-VGOIOE7T-s5IHcHtD.js → mindmap-definition-VGOIOE7T-CBCJSqB-.js} +3 -3
  132. package/dist/server/assets/{packet-DYOGHKS2-CghPtnD0.js → packet-DYOGHKS2-DOlmItCg.js} +6 -6
  133. package/dist/server/assets/{pie-VRWISCQL-4ycWjPDl.js → pie-VRWISCQL-IJ6xSr-v.js} +6 -6
  134. package/dist/server/assets/{pieDiagram-ADFJNKIX-Xc0hpyln.js → pieDiagram-ADFJNKIX-BIeXI33r.js} +7 -7
  135. package/dist/server/assets/{quadrantDiagram-AYHSOK5B-CTCsgLnq.js → quadrantDiagram-AYHSOK5B-BpezLOWq.js} +1 -1
  136. package/dist/server/assets/{radar-ZZBFDIW7-CnRv1HeP.js → radar-ZZBFDIW7-DbXuafW3.js} +6 -6
  137. package/dist/server/assets/{requirementDiagram-UZGBJVZJ-6L85o8SZ.js → requirementDiagram-UZGBJVZJ-ChbE328t.js} +3 -3
  138. package/dist/server/assets/{router-DbWGQ17k.js → router-D0RjRa7t.js} +769 -383
  139. package/dist/server/assets/{sankeyDiagram-TZEHDZUN-Dtxaeifp.js → sankeyDiagram-TZEHDZUN-CXtOdCUH.js} +1 -1
  140. package/dist/server/assets/{sequenceDiagram-WL72ISMW-37UL27_4.js → sequenceDiagram-WL72ISMW-CSNNYC4e.js} +3 -3
  141. package/dist/server/assets/{square-terminal-D4RjbVtI.js → square-terminal-BxqNxeMz.js} +1 -1
  142. package/dist/server/assets/{stateDiagram-FKZM4ZOC-Bs7b06Ra.js → stateDiagram-FKZM4ZOC-DvfH1oWR.js} +8 -8
  143. package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-DUdtQcpy.js → stateDiagram-v2-4FDKWEC3-CgJsyTfA.js} +4 -4
  144. package/dist/server/assets/{timeline-definition-IT6M3QCI-C2u2MfVa.js → timeline-definition-IT6M3QCI-CYIrja4N.js} +2 -2
  145. package/dist/server/assets/{treemap-GDKQZRPO-CF8Y_9gD.js → treemap-GDKQZRPO-BSJm6_BX.js} +6 -6
  146. package/dist/server/assets/{workspace._workspaceId-DbDNrvi3.js → workspace._workspaceId-Bie30-IB.js} +1 -1
  147. package/dist/server/assets/{workspace._workspaceId-C9ajqro8.js → workspace._workspaceId-DSIpOEcg.js} +3 -3
  148. package/dist/server/assets/{xychartDiagram-PRI3JC2R-C1IkvLoX.js → xychartDiagram-PRI3JC2R-C1JcOjo8.js} +1 -1
  149. package/dist/server/server.js +2 -2
  150. package/dist/start-server.mjs +477 -220
  151. package/package.json +4 -4
  152. package/dist/client/assets/DockviewBrowserContainer-DuxWaqHN.js +0 -5
  153. package/dist/client/assets/DockviewTerminalContainer-BXoPda0X.js +0 -2
  154. package/dist/client/assets/TerminalPanel-CulmEPyX.js +0 -5
  155. package/dist/client/assets/channel-Dr0vMA-3.js +0 -1
  156. package/dist/client/assets/classDiagram-2ON5EDUG-DazWWFRK.js +0 -1
  157. package/dist/client/assets/classDiagram-v2-WZHVMYZB-DazWWFRK.js +0 -1
  158. package/dist/client/assets/clone-DLEN27Sv.js +0 -1
  159. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-DvHwGtBf.js +0 -1
@@ -1226,7 +1226,7 @@ const createLucideIcon = (iconName, iconNode) => {
1226
1226
  Component.displayName = toPascalCase(iconName);
1227
1227
  return Component;
1228
1228
  };
1229
- const __iconNode$1r = [
1229
+ const __iconNode$1s = [
1230
1230
  [
1231
1231
  "path",
1232
1232
  {
@@ -1235,45 +1235,45 @@ const __iconNode$1r = [
1235
1235
  }
1236
1236
  ]
1237
1237
  ];
1238
- const Activity = createLucideIcon("activity", __iconNode$1r);
1239
- const __iconNode$1q = [
1238
+ const Activity = createLucideIcon("activity", __iconNode$1s);
1239
+ const __iconNode$1r = [
1240
1240
  ["path", { d: "M12 17V3", key: "1cwfxf" }],
1241
1241
  ["path", { d: "m6 11 6 6 6-6", key: "12ii2o" }],
1242
1242
  ["path", { d: "M19 21H5", key: "150jfl" }]
1243
1243
  ];
1244
- const ArrowDownToLine = createLucideIcon("arrow-down-to-line", __iconNode$1q);
1245
- const __iconNode$1p = [
1244
+ const ArrowDownToLine = createLucideIcon("arrow-down-to-line", __iconNode$1r);
1245
+ const __iconNode$1q = [
1246
1246
  ["path", { d: "M12 5v14", key: "s699le" }],
1247
1247
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
1248
1248
  ];
1249
- const ArrowDown = createLucideIcon("arrow-down", __iconNode$1p);
1250
- const __iconNode$1o = [
1249
+ const ArrowDown = createLucideIcon("arrow-down", __iconNode$1q);
1250
+ const __iconNode$1p = [
1251
1251
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
1252
1252
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
1253
1253
  ];
1254
- const ArrowLeft = createLucideIcon("arrow-left", __iconNode$1o);
1255
- const __iconNode$1n = [
1254
+ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$1p);
1255
+ const __iconNode$1o = [
1256
1256
  ["path", { d: "M5 12h14", key: "1ays0h" }],
1257
1257
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
1258
1258
  ];
1259
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$1n);
1260
- const __iconNode$1m = [
1259
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$1o);
1260
+ const __iconNode$1n = [
1261
1261
  ["path", { d: "m18 9-6-6-6 6", key: "kcunyi" }],
1262
1262
  ["path", { d: "M12 3v14", key: "7cf3v8" }],
1263
1263
  ["path", { d: "M5 21h14", key: "11awu3" }]
1264
1264
  ];
1265
- const ArrowUpFromLine = createLucideIcon("arrow-up-from-line", __iconNode$1m);
1266
- const __iconNode$1l = [
1265
+ const ArrowUpFromLine = createLucideIcon("arrow-up-from-line", __iconNode$1n);
1266
+ const __iconNode$1m = [
1267
1267
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
1268
1268
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
1269
1269
  ];
1270
- const ArrowUp = createLucideIcon("arrow-up", __iconNode$1l);
1271
- const __iconNode$1k = [
1270
+ const ArrowUp = createLucideIcon("arrow-up", __iconNode$1m);
1271
+ const __iconNode$1l = [
1272
1272
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1273
1273
  ["path", { d: "M4.929 4.929 19.07 19.071", key: "196cmz" }]
1274
1274
  ];
1275
- const Ban = createLucideIcon("ban", __iconNode$1k);
1276
- const __iconNode$1j = [
1275
+ const Ban = createLucideIcon("ban", __iconNode$1l);
1276
+ const __iconNode$1k = [
1277
1277
  ["path", { d: "M12 8V4H8", key: "hb8ula" }],
1278
1278
  ["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
1279
1279
  ["path", { d: "M2 14h2", key: "vft8re" }],
@@ -1281,60 +1281,68 @@ const __iconNode$1j = [
1281
1281
  ["path", { d: "M15 13v2", key: "1xurst" }],
1282
1282
  ["path", { d: "M9 13v2", key: "rq6x2g" }]
1283
1283
  ];
1284
- const Bot = createLucideIcon("bot", __iconNode$1j);
1285
- const __iconNode$1i = [
1284
+ const Bot = createLucideIcon("bot", __iconNode$1k);
1285
+ const __iconNode$1j = [
1286
1286
  ["path", { d: "m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16", key: "d5nyq2" }],
1287
1287
  ["path", { d: "M22 9v7", key: "pvm9v3" }],
1288
1288
  ["path", { d: "M3.304 13h6.392", key: "1q3zxz" }],
1289
1289
  ["circle", { cx: "18.5", cy: "12.5", r: "3.5", key: "z97x68" }]
1290
1290
  ];
1291
- const CaseSensitive = createLucideIcon("case-sensitive", __iconNode$1i);
1292
- const __iconNode$1h = [
1291
+ const CaseSensitive = createLucideIcon("case-sensitive", __iconNode$1j);
1292
+ const __iconNode$1i = [
1293
1293
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
1294
1294
  ["path", { d: "M18 17V9", key: "2bz60n" }],
1295
1295
  ["path", { d: "M13 17V5", key: "1frdt8" }],
1296
1296
  ["path", { d: "M8 17v-3", key: "17ska0" }]
1297
1297
  ];
1298
- const ChartColumn = createLucideIcon("chart-column", __iconNode$1h);
1299
- const __iconNode$1g = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
1300
- const Check = createLucideIcon("check", __iconNode$1g);
1301
- const __iconNode$1f = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
1302
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$1f);
1303
- const __iconNode$1e = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
1304
- const ChevronLeft = createLucideIcon("chevron-left", __iconNode$1e);
1305
- const __iconNode$1d = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
1306
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$1d);
1307
- const __iconNode$1c = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
1308
- const ChevronUp = createLucideIcon("chevron-up", __iconNode$1c);
1309
- const __iconNode$1b = [
1298
+ const ChartColumn = createLucideIcon("chart-column", __iconNode$1i);
1299
+ const __iconNode$1h = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
1300
+ const Check = createLucideIcon("check", __iconNode$1h);
1301
+ const __iconNode$1g = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
1302
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$1g);
1303
+ const __iconNode$1f = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
1304
+ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$1f);
1305
+ const __iconNode$1e = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
1306
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$1e);
1307
+ const __iconNode$1d = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
1308
+ const ChevronUp = createLucideIcon("chevron-up", __iconNode$1d);
1309
+ const __iconNode$1c = [
1310
1310
  ["path", { d: "m7 20 5-5 5 5", key: "13a0gw" }],
1311
1311
  ["path", { d: "m7 4 5 5 5-5", key: "1kwcof" }]
1312
1312
  ];
1313
- const ChevronsDownUp = createLucideIcon("chevrons-down-up", __iconNode$1b);
1314
- const __iconNode$1a = [
1313
+ const ChevronsDownUp = createLucideIcon("chevrons-down-up", __iconNode$1c);
1314
+ const __iconNode$1b = [
1315
1315
  ["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
1316
1316
  ["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
1317
1317
  ];
1318
- const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$1a);
1319
- const __iconNode$19 = [
1318
+ const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$1b);
1319
+ const __iconNode$1a = [
1320
1320
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1321
1321
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
1322
1322
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
1323
1323
  ];
1324
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$19);
1325
- const __iconNode$18 = [
1324
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$1a);
1325
+ const __iconNode$19 = [
1326
1326
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1327
1327
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
1328
1328
  ];
1329
- const CircleCheck = createLucideIcon("circle-check", __iconNode$18);
1330
- const __iconNode$17 = [
1329
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$19);
1330
+ const __iconNode$18 = [
1331
1331
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1332
1332
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
1333
1333
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
1334
1334
  ];
1335
- const CircleX = createLucideIcon("circle-x", __iconNode$17);
1336
- const __iconNode$16 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
1337
- const Circle = createLucideIcon("circle", __iconNode$16);
1335
+ const CircleX = createLucideIcon("circle-x", __iconNode$18);
1336
+ const __iconNode$17 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
1337
+ const Circle = createLucideIcon("circle", __iconNode$17);
1338
+ const __iconNode$16 = [
1339
+ ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
1340
+ ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2", key: "4jdomd" }],
1341
+ ["path", { d: "M16 4h2a2 2 0 0 1 2 2v4", key: "3hqy98" }],
1342
+ ["path", { d: "M21 14H11", key: "1bme5i" }],
1343
+ ["path", { d: "m15 10-4 4 4 4", key: "5dvupr" }]
1344
+ ];
1345
+ const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$16);
1338
1346
  const __iconNode$15 = [
1339
1347
  ["path", { d: "M11 14h10", key: "1w8e9d" }],
1340
1348
  ["path", { d: "M16 4h2a2 2 0 0 1 2 2v1.344", key: "1e62lh" }],
@@ -40668,53 +40676,53 @@ async function loadLanguage(lang) {
40668
40676
  try {
40669
40677
  switch (lang) {
40670
40678
  case "javascript":
40671
- return import("./index-O9RnegqI.js").then((m2) => m2.javascript());
40679
+ return import("./index-Oxi8joDg.js").then((m2) => m2.javascript());
40672
40680
  case "jsx":
40673
- return import("./index-O9RnegqI.js").then((m2) => m2.javascript({ jsx: true }));
40681
+ return import("./index-Oxi8joDg.js").then((m2) => m2.javascript({ jsx: true }));
40674
40682
  case "typescript":
40675
- return import("./index-O9RnegqI.js").then(
40683
+ return import("./index-Oxi8joDg.js").then(
40676
40684
  (m2) => m2.javascript({ typescript: true })
40677
40685
  );
40678
40686
  case "tsx":
40679
- return import("./index-O9RnegqI.js").then(
40687
+ return import("./index-Oxi8joDg.js").then(
40680
40688
  (m2) => m2.javascript({ jsx: true, typescript: true })
40681
40689
  );
40682
40690
  case "python":
40683
- return import("./index-u8w_jl1U.js").then((m2) => m2.python());
40691
+ return import("./index-D9p_mZDJ.js").then((m2) => m2.python());
40684
40692
  case "html":
40685
- return import("./index-BY32AoKU.js").then((m2) => m2.html());
40693
+ return import("./index-CjxzboN7.js").then((m2) => m2.html());
40686
40694
  case "css":
40687
- return import("./index-CqA-krzP.js").then((m2) => m2.css());
40695
+ return import("./index--Ibvlxfb.js").then((m2) => m2.css());
40688
40696
  case "scss":
40689
40697
  case "sass":
40690
- return import("./index-CaI_IFFh.js").then((m2) => m2.sass());
40698
+ return import("./index-DgJkTCJ8.js").then((m2) => m2.sass());
40691
40699
  case "less":
40692
- return import("./index-Dh-QOcLi.js").then((m2) => m2.less());
40700
+ return import("./index-DOVCz7M5.js").then((m2) => m2.less());
40693
40701
  case "json":
40694
40702
  case "jsonc":
40695
- return import("./index-BGD-OYit.js").then((m2) => m2.json());
40703
+ return import("./index-CvjKE7Ta.js").then((m2) => m2.json());
40696
40704
  case "markdown":
40697
40705
  case "mdx":
40698
- return import("./index-DlE6TTwo.js").then((m2) => m2.markdown());
40706
+ return import("./index-BDNTG33i.js").then((m2) => m2.markdown());
40699
40707
  case "xml":
40700
- return import("./index-C5QUMB__.js").then((m2) => m2.xml());
40708
+ return import("./index-BbPBh6H3.js").then((m2) => m2.xml());
40701
40709
  case "yaml":
40702
- return import("./index-RNkDnge6.js").then((m2) => m2.yaml());
40710
+ return import("./index-BA9bc05g.js").then((m2) => m2.yaml());
40703
40711
  case "sql":
40704
- return import("./index-Xzkl582b.js").then((m2) => m2.sql());
40712
+ return import("./index-q4_fEkML.js").then((m2) => m2.sql());
40705
40713
  case "rust":
40706
- return import("./index-CW8ZK5DO.js").then((m2) => m2.rust());
40714
+ return import("./index-ByjS99eX.js").then((m2) => m2.rust());
40707
40715
  case "go":
40708
- return import("./index-BFTJZ14_.js").then((m2) => m2.go());
40716
+ return import("./index-D2tc61J7.js").then((m2) => m2.go());
40709
40717
  case "java":
40710
- return import("./index-Bk2rEXd9.js").then((m2) => m2.java());
40718
+ return import("./index-Bveos8k-.js").then((m2) => m2.java());
40711
40719
  case "kotlin":
40712
- return import("./index-Bk2rEXd9.js").then((m2) => m2.java());
40720
+ return import("./index-Bveos8k-.js").then((m2) => m2.java());
40713
40721
  case "c":
40714
40722
  case "cpp":
40715
- return import("./index-4I0NKW9A.js").then((m2) => m2.cpp());
40723
+ return import("./index-DFn6sCXI.js").then((m2) => m2.cpp());
40716
40724
  case "php":
40717
- return import("./index-IuIWAovp.js").then((m2) => m2.php());
40725
+ return import("./index-BRQW2GDV.js").then((m2) => m2.php());
40718
40726
  // Legacy modes via StreamLanguage
40719
40727
  case "bash":
40720
40728
  case "fish":
@@ -41127,9 +41135,102 @@ function serializeEditorState(view) {
41127
41135
  scrollTop: view.scrollDOM.scrollTop
41128
41136
  };
41129
41137
  }
41138
+ async function writeClipboardText(text2) {
41139
+ if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
41140
+ try {
41141
+ await navigator.clipboard.writeText(text2);
41142
+ return true;
41143
+ } catch {
41144
+ }
41145
+ }
41146
+ return legacyCopy(text2);
41147
+ }
41148
+ function legacyCopy(text2) {
41149
+ if (typeof document === "undefined") return false;
41150
+ const textarea = document.createElement("textarea");
41151
+ textarea.value = text2;
41152
+ textarea.setAttribute("readonly", "");
41153
+ textarea.style.position = "fixed";
41154
+ textarea.style.top = "0";
41155
+ textarea.style.left = "0";
41156
+ textarea.style.width = "1px";
41157
+ textarea.style.height = "1px";
41158
+ textarea.style.padding = "0";
41159
+ textarea.style.border = "0";
41160
+ textarea.style.opacity = "0";
41161
+ textarea.style.pointerEvents = "none";
41162
+ document.body.appendChild(textarea);
41163
+ const previouslyFocused = document.activeElement;
41164
+ try {
41165
+ textarea.focus();
41166
+ textarea.select();
41167
+ textarea.setSelectionRange(0, text2.length);
41168
+ return document.execCommand("copy");
41169
+ } catch {
41170
+ return false;
41171
+ } finally {
41172
+ document.body.removeChild(textarea);
41173
+ previouslyFocused?.focus?.();
41174
+ }
41175
+ }
41176
+ async function readClipboardText() {
41177
+ if (typeof navigator === "undefined" || !navigator.clipboard?.readText) {
41178
+ return "";
41179
+ }
41180
+ try {
41181
+ return await navigator.clipboard.readText();
41182
+ } catch {
41183
+ return "";
41184
+ }
41185
+ }
41186
+ function buildLineReference(filePath, startLine, endLine) {
41187
+ return startLine === endLine ? `${filePath}:${startLine}` : `${filePath}:${startLine}-${endLine}`;
41188
+ }
41130
41189
  const MIN_SELECTION_LENGTH = 1;
41131
41190
  const SHOW_DELAY_MS = 500;
41132
41191
  const setSelectionTooltip = StateEffect.define();
41192
+ const SVG_NS = "http://www.w3.org/2000/svg";
41193
+ function makeIcon(children2) {
41194
+ const svg2 = document.createElementNS(SVG_NS, "svg");
41195
+ svg2.setAttribute("width", "14");
41196
+ svg2.setAttribute("height", "14");
41197
+ svg2.setAttribute("viewBox", "0 0 24 24");
41198
+ svg2.setAttribute("fill", "none");
41199
+ svg2.setAttribute("stroke", "currentColor");
41200
+ svg2.setAttribute("stroke-width", "2");
41201
+ svg2.setAttribute("stroke-linecap", "round");
41202
+ svg2.setAttribute("stroke-linejoin", "round");
41203
+ for (const child of children2) {
41204
+ const el = document.createElementNS(SVG_NS, child.tag);
41205
+ if (child.tag === "path") el.setAttribute("d", child.d);
41206
+ else if (child.tag === "polyline") el.setAttribute("points", child.points);
41207
+ else if (child.tag === "line") {
41208
+ el.setAttribute("x1", child.x1);
41209
+ el.setAttribute("y1", child.y1);
41210
+ el.setAttribute("x2", child.x2);
41211
+ el.setAttribute("y2", child.y2);
41212
+ } else {
41213
+ el.setAttribute("x", child.x);
41214
+ el.setAttribute("y", child.y);
41215
+ el.setAttribute("width", child.width);
41216
+ el.setAttribute("height", child.height);
41217
+ el.setAttribute("rx", child.rx);
41218
+ }
41219
+ svg2.appendChild(el);
41220
+ }
41221
+ return svg2;
41222
+ }
41223
+ const ICON_CHAT = [
41224
+ { tag: "path", d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }
41225
+ ];
41226
+ const ICON_TERMINAL = [
41227
+ { tag: "polyline", points: "4 17 10 11 4 5" },
41228
+ { tag: "line", x1: "12", y1: "19", x2: "20", y2: "19" }
41229
+ ];
41230
+ const ICON_COPY = [
41231
+ { tag: "rect", x: "8", y: "8", width: "14", height: "14", rx: "2" },
41232
+ { tag: "path", d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }
41233
+ ];
41133
41234
  function selectionToChatExtension(filePath, lineNumberMap) {
41134
41235
  const tooltipField = StateField.define({
41135
41236
  create() {
@@ -41151,59 +41252,88 @@ function selectionToChatExtension(filePath, lineNumberMap) {
41151
41252
  timer2 = null;
41152
41253
  }
41153
41254
  }
41255
+ function readSelection() {
41256
+ const { from: from2, to: to2 } = view.state.selection.main;
41257
+ if (from2 === to2) return null;
41258
+ const selectedText = view.state.sliceDoc(from2, to2);
41259
+ const docStartLine = view.state.doc.lineAt(from2).number;
41260
+ const docEndLine = view.state.doc.lineAt(to2).number;
41261
+ const startLine = lineNumberMap && docStartLine >= 1 && docStartLine <= lineNumberMap.length ? lineNumberMap[docStartLine - 1] : docStartLine;
41262
+ const endLine = lineNumberMap && docEndLine >= 1 && docEndLine <= lineNumberMap.length ? lineNumberMap[docEndLine - 1] : docEndLine;
41263
+ return { filePath, selectedText, startLine, endLine };
41264
+ }
41154
41265
  function buildTooltip() {
41155
41266
  const sel = view.state.selection.main;
41156
41267
  if (sel.empty || sel.to - sel.from < MIN_SELECTION_LENGTH) return null;
41157
41268
  return {
41158
41269
  pos: sel.head,
41159
- above: true,
41160
- strictSide: true,
41270
+ // Prefer rendering below the selection so the buttons don't cover the
41271
+ // selected text. `strictSide: false` lets CodeMirror flip back above
41272
+ // when there isn't enough room below (e.g. a selection near the bottom
41273
+ // edge of the editor) instead of clipping the tooltip.
41274
+ above: false,
41275
+ strictSide: false,
41161
41276
  arrow: false,
41162
- create(view2) {
41277
+ // Named `tooltipView` to avoid shadowing the outer `view` that
41278
+ // `readSelection` closes over (same instance, but the distinct name
41279
+ // keeps the data flow clear).
41280
+ create(tooltipView) {
41163
41281
  const dom = document.createElement("div");
41164
41282
  dom.className = "cm-add-to-chat-tooltip";
41165
- const btn = document.createElement("button");
41166
- btn.className = "cm-add-to-chat-btn";
41167
- btn.setAttribute("type", "button");
41168
- const svg2 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
41169
- svg2.setAttribute("width", "14");
41170
- svg2.setAttribute("height", "14");
41171
- svg2.setAttribute("viewBox", "0 0 24 24");
41172
- svg2.setAttribute("fill", "none");
41173
- svg2.setAttribute("stroke", "currentColor");
41174
- svg2.setAttribute("stroke-width", "2");
41175
- svg2.setAttribute("stroke-linecap", "round");
41176
- svg2.setAttribute("stroke-linejoin", "round");
41177
- const path2 = document.createElementNS("http://www.w3.org/2000/svg", "path");
41178
- path2.setAttribute("d", "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z");
41179
- svg2.appendChild(path2);
41180
- btn.appendChild(svg2);
41181
- const label = document.createElement("span");
41182
- label.textContent = "Add to Chat";
41183
- btn.appendChild(label);
41184
- btn.addEventListener("mousedown", (e3) => {
41185
- e3.preventDefault();
41186
- e3.stopPropagation();
41187
- const { from: from2, to: to2 } = view2.state.selection.main;
41188
- if (from2 === to2) return;
41189
- const selectedText = view2.state.sliceDoc(from2, to2);
41190
- const docStartLine = view2.state.doc.lineAt(from2).number;
41191
- const docEndLine = view2.state.doc.lineAt(to2).number;
41192
- const startLine = lineNumberMap && docStartLine >= 1 && docStartLine <= lineNumberMap.length ? lineNumberMap[docStartLine - 1] : docStartLine;
41193
- const endLine = lineNumberMap && docEndLine >= 1 && docEndLine <= lineNumberMap.length ? lineNumberMap[docEndLine - 1] : docEndLine;
41194
- const detail = {
41195
- filePath,
41196
- selectedText,
41197
- startLine,
41198
- endLine
41199
- };
41200
- window.dispatchEvent(new CustomEvent("band:add-to-chat", { detail }));
41201
- view2.dispatch({
41202
- selection: { anchor: from2 },
41203
- effects: setSelectionTooltip.of(null)
41283
+ function makeButton(label, icon2, testId, onActivate) {
41284
+ const btn = document.createElement("button");
41285
+ btn.className = "cm-add-to-chat-btn";
41286
+ btn.setAttribute("type", "button");
41287
+ btn.setAttribute("data-testid", testId);
41288
+ btn.appendChild(makeIcon(icon2));
41289
+ const span = document.createElement("span");
41290
+ span.textContent = label;
41291
+ btn.appendChild(span);
41292
+ btn.addEventListener("mousedown", (e3) => {
41293
+ e3.preventDefault();
41294
+ e3.stopPropagation();
41295
+ const detail = readSelection();
41296
+ if (!detail) return;
41297
+ onActivate(detail);
41298
+ tooltipView.dispatch({
41299
+ selection: { anchor: tooltipView.state.selection.main.from },
41300
+ effects: setSelectionTooltip.of(null)
41301
+ });
41204
41302
  });
41205
- });
41206
- dom.appendChild(btn);
41303
+ return btn;
41304
+ }
41305
+ dom.appendChild(
41306
+ makeButton("Add to Chat", ICON_CHAT, "selection-tooltip__add-to-chat", (detail) => {
41307
+ window.dispatchEvent(new CustomEvent("band:add-to-chat", { detail }));
41308
+ })
41309
+ );
41310
+ dom.appendChild(
41311
+ makeButton(
41312
+ "Add to Terminal",
41313
+ ICON_TERMINAL,
41314
+ "selection-tooltip__add-to-terminal",
41315
+ (detail) => {
41316
+ const reference = `${buildLineReference(detail.filePath, detail.startLine, detail.endLine)} `;
41317
+ window.dispatchEvent(
41318
+ new CustomEvent("band:add-to-terminal", {
41319
+ detail: { reference }
41320
+ })
41321
+ );
41322
+ }
41323
+ )
41324
+ );
41325
+ dom.appendChild(
41326
+ makeButton(
41327
+ "Copy reference",
41328
+ ICON_COPY,
41329
+ "selection-tooltip__copy-reference",
41330
+ (detail) => {
41331
+ void writeClipboardText(
41332
+ buildLineReference(detail.filePath, detail.startLine, detail.endLine)
41333
+ );
41334
+ }
41335
+ )
41336
+ );
41207
41337
  return { dom };
41208
41338
  }
41209
41339
  };
@@ -41234,7 +41364,9 @@ function selectionToChatExtension(filePath, lineNumberMap) {
41234
41364
  ".cm-tooltip.cm-add-to-chat-tooltip": {
41235
41365
  backgroundColor: "transparent",
41236
41366
  border: "none",
41237
- zIndex: "100"
41367
+ zIndex: "100",
41368
+ display: "flex",
41369
+ gap: "4px"
41238
41370
  },
41239
41371
  ".cm-add-to-chat-btn": {
41240
41372
  display: "inline-flex",
@@ -50863,6 +50995,19 @@ function useSearch({
50863
50995
  dispatchToViews
50864
50996
  };
50865
50997
  }
50998
+ function useWorkspacePath(workspaceId) {
50999
+ const { projects } = useProjects();
51000
+ return reactExports.useMemo(() => {
51001
+ for (const proj of projects) {
51002
+ for (const wt2 of proj.worktrees) {
51003
+ if (toWorkspaceId(proj.name, wt2.branch) === workspaceId) {
51004
+ return wt2.path;
51005
+ }
51006
+ }
51007
+ }
51008
+ return void 0;
51009
+ }, [projects, workspaceId]);
51010
+ }
50866
51011
  function buildFileTree(fileStatuses) {
50867
51012
  const root2 = { children: /* @__PURE__ */ new Map() };
50868
51013
  for (const [filePath, status] of Object.entries(fileStatuses)) {
@@ -53849,6 +53994,11 @@ function getFileIcon(filename) {
53849
53994
  function getFolderIcon(name2, expanded = false) {
53850
53995
  return getOrCreate(resolveFolderIconName(name2, expanded), "FolderIcon");
53851
53996
  }
53997
+ function joinWorkspacePath(workspaceRoot, relativePath) {
53998
+ const root2 = workspaceRoot.replace(/\/+$/, "");
53999
+ const rel2 = relativePath.replace(/^\/+/, "");
54000
+ return rel2 ? `${root2}/${rel2}` : root2;
54001
+ }
53852
54002
  const statusColors = {
53853
54003
  A: "text-green-600 dark:text-green-400",
53854
54004
  M: "text-blue-600 dark:text-blue-400",
@@ -53886,6 +54036,7 @@ function ChangesTreeNode({
53886
54036
  onSelectFile,
53887
54037
  onRequestReset,
53888
54038
  canReset,
54039
+ workspacePath,
53889
54040
  activeFile
53890
54041
  }) {
53891
54042
  const isDir = node2.children !== void 0;
@@ -53911,6 +54062,7 @@ function ChangesTreeNode({
53911
54062
  ref: isActive ? btnRef : void 0,
53912
54063
  type: "button",
53913
54064
  "data-band-active": isActive ? "true" : void 0,
54065
+ "data-testid": `changes-tree__row--${node2.path}`,
53914
54066
  onClick: handleClick,
53915
54067
  className: `flex h-[28px] w-full select-none items-center gap-1 pr-3 text-left text-[13px] hover:bg-accent/50 [-webkit-touch-callout:none] ${isActive ? "bg-blue-500/30 text-foreground outline outline-1 -outline-offset-1 outline-blue-400/60 hover:bg-blue-500/30 dark:bg-blue-500/40 dark:outline-blue-400/70 dark:hover:bg-blue-500/40" : ""}`,
53916
54068
  style: { paddingLeft: `${depth * 12 + 4}px` },
@@ -53931,20 +54083,49 @@ function ChangesTreeNode({
53931
54083
  }
53932
54084
  );
53933
54085
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
53934
- canReset ? /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
54086
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
53935
54087
  /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { asChild: true, children: button }),
53936
- /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuContent, { onCloseAutoFocus: menu.flush, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
53937
- ContextMenuItem,
53938
- {
53939
- variant: "destructive",
53940
- onSelect: () => menu.queue(() => onRequestReset(node2)),
53941
- children: [
53942
- /* @__PURE__ */ jsxRuntimeExports.jsx(RotateCcw, { className: "size-4" }),
53943
- "Reset changes"
53944
- ]
53945
- }
53946
- ) })
53947
- ] }) : button,
54088
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { onCloseAutoFocus: menu.flush, children: [
54089
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
54090
+ ContextMenuItem,
54091
+ {
54092
+ "data-testid": "changes-tree__copy-relative-path",
54093
+ onSelect: () => menu.queue(() => void writeClipboardText(node2.path)),
54094
+ children: [
54095
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ClipboardCopy, { className: "size-4" }),
54096
+ "Copy relative path"
54097
+ ]
54098
+ }
54099
+ ),
54100
+ workspacePath && /* @__PURE__ */ jsxRuntimeExports.jsxs(
54101
+ ContextMenuItem,
54102
+ {
54103
+ "data-testid": "changes-tree__copy-absolute-path",
54104
+ onSelect: () => menu.queue(
54105
+ () => void writeClipboardText(joinWorkspacePath(workspacePath, node2.path))
54106
+ ),
54107
+ children: [
54108
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ClipboardCopy, { className: "size-4" }),
54109
+ "Copy absolute path"
54110
+ ]
54111
+ }
54112
+ ),
54113
+ canReset && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
54114
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
54115
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
54116
+ ContextMenuItem,
54117
+ {
54118
+ variant: "destructive",
54119
+ onSelect: () => menu.queue(() => onRequestReset(node2)),
54120
+ children: [
54121
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RotateCcw, { className: "size-4" }),
54122
+ "Reset changes"
54123
+ ]
54124
+ }
54125
+ )
54126
+ ] })
54127
+ ] })
54128
+ ] }),
53948
54129
  isExpanded && node2.children?.map((child) => /* @__PURE__ */ jsxRuntimeExports.jsx(
53949
54130
  ChangesTreeNode,
53950
54131
  {
@@ -53955,6 +54136,7 @@ function ChangesTreeNode({
53955
54136
  onSelectFile,
53956
54137
  onRequestReset,
53957
54138
  canReset,
54139
+ workspacePath,
53958
54140
  activeFile
53959
54141
  },
53960
54142
  child.path
@@ -53975,7 +54157,8 @@ function ChangesFileTree({
53975
54157
  fileStatuses,
53976
54158
  onSelectFile,
53977
54159
  activeFile,
53978
- onRevertPaths
54160
+ onRevertPaths,
54161
+ workspacePath
53979
54162
  }) {
53980
54163
  const tree = reactExports.useMemo(() => buildFileTree(fileStatuses), [fileStatuses]);
53981
54164
  const seenDirPathsRef = reactExports.useRef(new Set(collectDirPaths(tree)));
@@ -54050,6 +54233,7 @@ function ChangesFileTree({
54050
54233
  onSelectFile,
54051
54234
  onRequestReset: handleRequestReset,
54052
54235
  canReset,
54236
+ workspacePath,
54053
54237
  activeFile
54054
54238
  },
54055
54239
  node2.path
@@ -54991,6 +55175,7 @@ function DiffView({
54991
55175
  const adapter2 = useAdapter();
54992
55176
  const projectKind = useProjectKindForWorkspace(workspaceId);
54993
55177
  const isPlain = projectKind === "plain";
55178
+ const workspacePath = useWorkspacePath(workspaceId);
54994
55179
  const [summary, setSummary] = reactExports.useState(null);
54995
55180
  const summaryRef = reactExports.useRef(null);
54996
55181
  const [error, setError] = reactExports.useState(null);
@@ -55780,7 +55965,8 @@ function DiffView({
55780
55965
  fileStatuses,
55781
55966
  onSelectFile: handleScrollToFile,
55782
55967
  activeFile,
55783
- onRevertPaths: adapter2.revertFile ? handleRevertPaths : void 0
55968
+ onRevertPaths: adapter2.revertFile ? handleRevertPaths : void 0,
55969
+ workspacePath
55784
55970
  },
55785
55971
  workspaceId
55786
55972
  ) })
@@ -56261,6 +56447,7 @@ function TreeNode2({
56261
56447
  canCut,
56262
56448
  canCopy,
56263
56449
  canPaste,
56450
+ workspacePath,
56264
56451
  compact,
56265
56452
  treeSelection,
56266
56453
  clipboard,
@@ -56302,6 +56489,7 @@ function TreeNode2({
56302
56489
  ref: isSelected ? selectedRef : void 0,
56303
56490
  type: "button",
56304
56491
  "data-band-active": isSelected ? "true" : void 0,
56492
+ "data-testid": `file-tree__row--${entryPath}`,
56305
56493
  onClick: handleClick,
56306
56494
  onDoubleClick: handleDoubleClick,
56307
56495
  onContextMenu: (e3) => e3.stopPropagation(),
@@ -56409,7 +56597,30 @@ function TreeNode2({
56409
56597
  /* @__PURE__ */ jsxRuntimeExports.jsx(ClipboardPaste, { className: "size-4" }),
56410
56598
  "Paste"
56411
56599
  ] }),
56412
- (canCut || canCopy || isDir && canPaste) && (canRename || canDelete) && /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
56600
+ (canCut || canCopy || isDir && canPaste) && /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
56601
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
56602
+ ContextMenuItem,
56603
+ {
56604
+ "data-testid": "file-tree__copy-relative-path",
56605
+ onSelect: () => menu.queue(() => void writeClipboardText(entryPath)),
56606
+ children: [
56607
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ClipboardCopy, { className: "size-4" }),
56608
+ "Copy relative path"
56609
+ ]
56610
+ }
56611
+ ),
56612
+ workspacePath && /* @__PURE__ */ jsxRuntimeExports.jsxs(
56613
+ ContextMenuItem,
56614
+ {
56615
+ "data-testid": "file-tree__copy-absolute-path",
56616
+ onSelect: () => menu.queue(() => void writeClipboardText(joinWorkspacePath(workspacePath, entryPath))),
56617
+ children: [
56618
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ClipboardCopy, { className: "size-4" }),
56619
+ "Copy absolute path"
56620
+ ]
56621
+ }
56622
+ ),
56623
+ (canRename || canDelete) && /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuSeparator, {}),
56413
56624
  canRename && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onSelect: () => menu.queue(() => onRequestRename(entryPath)), children: [
56414
56625
  /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, { className: "size-4" }),
56415
56626
  "Rename"
@@ -56460,6 +56671,7 @@ function TreeNode2({
56460
56671
  canCut,
56461
56672
  canCopy,
56462
56673
  canPaste,
56674
+ workspacePath,
56463
56675
  compact,
56464
56676
  treeSelection,
56465
56677
  clipboard,
@@ -56518,6 +56730,7 @@ function TreeNode2({
56518
56730
  }
56519
56731
  const FileBrowser = reactExports.forwardRef(function FileBrowser2({
56520
56732
  workspaceId,
56733
+ workspacePath,
56521
56734
  onOpenFile,
56522
56735
  onOpenFilePinned,
56523
56736
  compact,
@@ -57017,6 +57230,7 @@ const FileBrowser = reactExports.forwardRef(function FileBrowser2({
57017
57230
  canCut: canCutCopy,
57018
57231
  canCopy: canCopyOp,
57019
57232
  canPaste,
57233
+ workspacePath,
57020
57234
  compact,
57021
57235
  treeSelection,
57022
57236
  clipboard,
@@ -65484,6 +65698,7 @@ function DesktopTitleBar({
65484
65698
  workspaceName,
65485
65699
  workspacePath,
65486
65700
  onCopyPath,
65701
+ onWorkspaceNameClick,
65487
65702
  panelItems,
65488
65703
  hiddenPanels,
65489
65704
  onTogglePanelVisibility,
@@ -65570,7 +65785,35 @@ function DesktopTitleBar({
65570
65785
  ]
65571
65786
  }
65572
65787
  ),
65573
- workspaceName ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-semibold text-foreground select-none pointer-events-none truncate max-w-[50%]", children: workspaceName }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-muted-foreground select-none pointer-events-none", children: appTitle }),
65788
+ workspaceName ? onWorkspaceNameClick ? (
65789
+ // Interactive: clicking opens the workspace picker (mirrors the
65790
+ // mobile header). Lives inside the drag region, so it must reapply
65791
+ // NO_DRAG_STYLE and keep pointer events enabled, like the other
65792
+ // interactive title-bar children (back/forward, dropdown triggers).
65793
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { children: [
65794
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
65795
+ "button",
65796
+ {
65797
+ type: "button",
65798
+ onClick: onWorkspaceNameClick,
65799
+ "aria-haspopup": "dialog",
65800
+ "aria-label": "Switch workspace",
65801
+ "data-testid": "desktop-title-bar__workspace-name",
65802
+ className: "flex items-center gap-1.5 rounded-md px-2 py-1 max-w-[50%] text-sm font-semibold text-foreground hover:bg-accent/50 transition-colors pointer-events-auto",
65803
+ style: NO_DRAG_STYLE,
65804
+ children: [
65805
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: workspaceName }),
65806
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronsUpDown, { className: "size-3.5 shrink-0 text-muted-foreground" })
65807
+ ]
65808
+ }
65809
+ ) }),
65810
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(TooltipContent, { side: "bottom", className: "text-xs", children: [
65811
+ "Switch Workspace",
65812
+ " ",
65813
+ /* @__PURE__ */ jsxRuntimeExports.jsx("kbd", { className: "ml-1.5 rounded border border-popover-foreground/25 bg-popover-foreground/10 px-1 py-0.5 font-mono text-[14px]", children: "⌘K / Ctrl+K" })
65814
+ ] })
65815
+ ] })
65816
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-semibold text-foreground select-none pointer-events-none truncate max-w-[50%]", children: workspaceName }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-muted-foreground select-none pointer-events-none", children: appTitle }),
65574
65817
  (hasEditorPicker || hasPanels) && /* @__PURE__ */ jsxRuntimeExports.jsxs(
65575
65818
  "div",
65576
65819
  {
@@ -108983,7 +109226,7 @@ var tn = f$5("block", "before:content-[counter(line)]", "before:inline-block", "
108983
109226
  var et$1 = ({ className: e3, language: t2, style: o3, isIncomplete: n2, ...s2 }) => jsxRuntimeExports.jsx("div", { className: f$5("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e3), "data-incomplete": n2 || void 0, "data-language": t2, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o3 }, ...s2 });
108984
109227
  var Se$1 = reactExports.createContext({ code: "" }), de$2 = () => reactExports.useContext(Se$1);
108985
109228
  var ot$1 = ({ language: e3 }) => jsxRuntimeExports.jsx("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e3, "data-streamdown": "code-block-header", children: jsxRuntimeExports.jsx("span", { className: "ml-1 font-mono lowercase", children: e3 }) });
108986
- var cn = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-DFADuqgv.js").then((e3) => ({ default: e3.HighlightedCodeBlockBody }))), rt = ({ code: e3, language: t2, className: o3, children: n2, isIncomplete: s2 = false, ...r2 }) => {
109229
+ var cn = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-BaoNsTjY.js").then((e3) => ({ default: e3.HighlightedCodeBlockBody }))), rt = ({ code: e3, language: t2, className: o3, children: n2, isIncomplete: s2 = false, ...r2 }) => {
108987
109230
  let i2 = reactExports.useMemo(() => e3.replace(cn, ""), [e3]), c2 = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i2.split(`
108988
109231
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i2]);
108989
109232
  return jsxRuntimeExports.jsx(Se$1.Provider, { value: { code: e3 }, children: jsxRuntimeExports.jsxs(et$1, { isIncomplete: s2, language: t2, children: [jsxRuntimeExports.jsx(ot$1, { language: t2 }), n2 ? jsxRuntimeExports.jsx("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: n2 }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(Qe$1, { className: o3, language: t2, result: c2, ...r2 }), children: jsxRuntimeExports.jsx(dn, { className: o3, code: i2, language: t2, raw: c2, ...r2 }) })] }) });
@@ -109305,7 +109548,7 @@ var Dt = ({ children: e3, className: t2, onDownload: o3, onError: n2 }) => {
109305
109548
  }, []), jsxRuntimeExports.jsxs("div", { className: "relative", ref: i2, children: [jsxRuntimeExports.jsx("button", { className: f$5("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", t2), disabled: c2, onClick: () => r2(!s2), title: "Download table", type: "button", children: e3 != null ? e3 : jsxRuntimeExports.jsx(Z$2, { size: 14 }) }), s2 ? jsxRuntimeExports.jsxs("div", { className: "absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg", children: [jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("csv"), title: "Download table as CSV", type: "button", children: "CSV" }), jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("markdown"), title: "Download table as Markdown", type: "button", children: "Markdown" })] }) : null] });
109306
109549
  };
109307
109550
  var Vt = ({ children: e3, className: t2, showControls: o3, ...n2 }) => jsxRuntimeExports.jsxs("div", { className: "my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2", "data-streamdown": "table-wrapper", children: [o3 ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-1", children: [jsxRuntimeExports.jsx(Ht, {}), jsxRuntimeExports.jsx(Dt, {})] }) : null, jsxRuntimeExports.jsx("div", { className: "border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background", children: jsxRuntimeExports.jsx("table", { className: f$5("w-full divide-y divide-border", t2), "data-streamdown": "table", ...n2, children: e3 }) })] });
109308
- var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-B1numrTC.js").then((e3) => ({ default: e3.Mermaid }))), Kn = /language-([^\s]+)/;
109551
+ var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-B2g4ZyRb.js").then((e3) => ({ default: e3.Mermaid }))), Kn = /language-([^\s]+)/;
109309
109552
  function ke$1(e3, t2) {
109310
109553
  if (!(e3 != null && e3.position || t2 != null && t2.position)) return true;
109311
109554
  if (!(e3 != null && e3.position && (t2 != null && t2.position))) return false;
@@ -161476,12 +161719,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
161476
161719
  registerLayoutLoaders([
161477
161720
  {
161478
161721
  name: "dagre",
161479
- loader: /* @__PURE__ */ __name(async () => await import("./dagre-6UL2VRFP-BqY_BEAB.js"), "loader")
161722
+ loader: /* @__PURE__ */ __name(async () => await import("./dagre-6UL2VRFP-D-BLVjoL.js"), "loader")
161480
161723
  },
161481
161724
  ...[
161482
161725
  {
161483
161726
  name: "cose-bilkent",
161484
- loader: /* @__PURE__ */ __name(async () => await import("./cose-bilkent-S5V4N54A-DQur-dSk.js"), "loader")
161727
+ loader: /* @__PURE__ */ __name(async () => await import("./cose-bilkent-S5V4N54A-CemnHiuy.js"), "loader")
161485
161728
  }
161486
161729
  ]
161487
161730
  ]);
@@ -161920,7 +162163,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
161920
162163
  return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt);
161921
162164
  }, "detector");
161922
162165
  var loader = /* @__PURE__ */ __name(async () => {
161923
- const { diagram: diagram2 } = await import("./c4Diagram-YG6GDRKO-ixN9bfNO.js");
162166
+ const { diagram: diagram2 } = await import("./c4Diagram-YG6GDRKO-t3K9Gv7l.js");
161924
162167
  return { id, diagram: diagram2 };
161925
162168
  }, "loader");
161926
162169
  var plugin = {
@@ -161937,7 +162180,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
161937
162180
  return /^\s*graph/.test(txt);
161938
162181
  }, "detector");
161939
162182
  var loader2 = /* @__PURE__ */ __name(async () => {
161940
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-BYT0MDKu.js");
162183
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-CmRcqums.js");
161941
162184
  return { id: id2, diagram: diagram2 };
161942
162185
  }, "loader");
161943
162186
  var plugin2 = {
@@ -161960,7 +162203,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
161960
162203
  return /^\s*flowchart/.test(txt);
161961
162204
  }, "detector");
161962
162205
  var loader3 = /* @__PURE__ */ __name(async () => {
161963
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-BYT0MDKu.js");
162206
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-CmRcqums.js");
161964
162207
  return { id: id3, diagram: diagram2 };
161965
162208
  }, "loader");
161966
162209
  var plugin3 = {
@@ -161974,7 +162217,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
161974
162217
  return /^\s*erDiagram/.test(txt);
161975
162218
  }, "detector");
161976
162219
  var loader4 = /* @__PURE__ */ __name(async () => {
161977
- const { diagram: diagram2 } = await import("./erDiagram-Q2GNP2WA-CXWd7XfZ.js");
162220
+ const { diagram: diagram2 } = await import("./erDiagram-Q2GNP2WA-CxKqSr3v.js");
161978
162221
  return { id: id4, diagram: diagram2 };
161979
162222
  }, "loader");
161980
162223
  var plugin4 = {
@@ -161988,7 +162231,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
161988
162231
  return /^\s*gitGraph/.test(txt);
161989
162232
  }, "detector");
161990
162233
  var loader5 = /* @__PURE__ */ __name(async () => {
161991
- const { diagram: diagram2 } = await import("./gitGraphDiagram-V2S2FVAM-iXeYaqRc.js");
162234
+ const { diagram: diagram2 } = await import("./gitGraphDiagram-V2S2FVAM-Cyxw_T7Z.js");
161992
162235
  return { id: id5, diagram: diagram2 };
161993
162236
  }, "loader");
161994
162237
  var plugin5 = {
@@ -162002,7 +162245,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
162002
162245
  return /^\s*gantt/.test(txt);
162003
162246
  }, "detector");
162004
162247
  var loader6 = /* @__PURE__ */ __name(async () => {
162005
- const { diagram: diagram2 } = await import("./ganttDiagram-JELNMOA3-DRqUEh77.js");
162248
+ const { diagram: diagram2 } = await import("./ganttDiagram-JELNMOA3-YaNWnEH7.js");
162006
162249
  return { id: id6, diagram: diagram2 };
162007
162250
  }, "loader");
162008
162251
  var plugin6 = {
@@ -162016,7 +162259,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
162016
162259
  return /^\s*info/.test(txt);
162017
162260
  }, "detector");
162018
162261
  var loader7 = /* @__PURE__ */ __name(async () => {
162019
- const { diagram: diagram2 } = await import("./infoDiagram-HS3SLOUP-CcvjlamO.js");
162262
+ const { diagram: diagram2 } = await import("./infoDiagram-HS3SLOUP-BzEF0J3M.js");
162020
162263
  return { id: id7, diagram: diagram2 };
162021
162264
  }, "loader");
162022
162265
  var info = {
@@ -162029,7 +162272,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
162029
162272
  return /^\s*pie/.test(txt);
162030
162273
  }, "detector");
162031
162274
  var loader8 = /* @__PURE__ */ __name(async () => {
162032
- const { diagram: diagram2 } = await import("./pieDiagram-ADFJNKIX-Xc0hpyln.js");
162275
+ const { diagram: diagram2 } = await import("./pieDiagram-ADFJNKIX-BIeXI33r.js");
162033
162276
  return { id: id8, diagram: diagram2 };
162034
162277
  }, "loader");
162035
162278
  var pie = {
@@ -162042,7 +162285,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
162042
162285
  return /^\s*quadrantChart/.test(txt);
162043
162286
  }, "detector");
162044
162287
  var loader9 = /* @__PURE__ */ __name(async () => {
162045
- const { diagram: diagram2 } = await import("./quadrantDiagram-AYHSOK5B-CTCsgLnq.js");
162288
+ const { diagram: diagram2 } = await import("./quadrantDiagram-AYHSOK5B-BpezLOWq.js");
162046
162289
  return { id: id9, diagram: diagram2 };
162047
162290
  }, "loader");
162048
162291
  var plugin7 = {
@@ -162056,7 +162299,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
162056
162299
  return /^\s*xychart(-beta)?/.test(txt);
162057
162300
  }, "detector");
162058
162301
  var loader10 = /* @__PURE__ */ __name(async () => {
162059
- const { diagram: diagram2 } = await import("./xychartDiagram-PRI3JC2R-C1IkvLoX.js");
162302
+ const { diagram: diagram2 } = await import("./xychartDiagram-PRI3JC2R-C1JcOjo8.js");
162060
162303
  return { id: id10, diagram: diagram2 };
162061
162304
  }, "loader");
162062
162305
  var plugin8 = {
@@ -162070,7 +162313,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
162070
162313
  return /^\s*requirement(Diagram)?/.test(txt);
162071
162314
  }, "detector");
162072
162315
  var loader11 = /* @__PURE__ */ __name(async () => {
162073
- const { diagram: diagram2 } = await import("./requirementDiagram-UZGBJVZJ-6L85o8SZ.js");
162316
+ const { diagram: diagram2 } = await import("./requirementDiagram-UZGBJVZJ-ChbE328t.js");
162074
162317
  return { id: id11, diagram: diagram2 };
162075
162318
  }, "loader");
162076
162319
  var plugin9 = {
@@ -162084,7 +162327,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
162084
162327
  return /^\s*sequenceDiagram/.test(txt);
162085
162328
  }, "detector");
162086
162329
  var loader12 = /* @__PURE__ */ __name(async () => {
162087
- const { diagram: diagram2 } = await import("./sequenceDiagram-WL72ISMW-37UL27_4.js");
162330
+ const { diagram: diagram2 } = await import("./sequenceDiagram-WL72ISMW-CSNNYC4e.js");
162088
162331
  return { id: id12, diagram: diagram2 };
162089
162332
  }, "loader");
162090
162333
  var plugin10 = {
@@ -162101,7 +162344,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
162101
162344
  return /^\s*classDiagram/.test(txt);
162102
162345
  }, "detector");
162103
162346
  var loader13 = /* @__PURE__ */ __name(async () => {
162104
- const { diagram: diagram2 } = await import("./classDiagram-2ON5EDUG-BHvCGARt.js");
162347
+ const { diagram: diagram2 } = await import("./classDiagram-2ON5EDUG-CzKcVZJc.js");
162105
162348
  return { id: id13, diagram: diagram2 };
162106
162349
  }, "loader");
162107
162350
  var plugin11 = {
@@ -162118,7 +162361,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
162118
162361
  return /^\s*classDiagram-v2/.test(txt);
162119
162362
  }, "detector");
162120
162363
  var loader14 = /* @__PURE__ */ __name(async () => {
162121
- const { diagram: diagram2 } = await import("./classDiagram-v2-WZHVMYZB-BHvCGARt.js");
162364
+ const { diagram: diagram2 } = await import("./classDiagram-v2-WZHVMYZB-CzKcVZJc.js");
162122
162365
  return { id: id14, diagram: diagram2 };
162123
162366
  }, "loader");
162124
162367
  var plugin12 = {
@@ -162135,7 +162378,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
162135
162378
  return /^\s*stateDiagram/.test(txt);
162136
162379
  }, "detector");
162137
162380
  var loader15 = /* @__PURE__ */ __name(async () => {
162138
- const { diagram: diagram2 } = await import("./stateDiagram-FKZM4ZOC-Bs7b06Ra.js");
162381
+ const { diagram: diagram2 } = await import("./stateDiagram-FKZM4ZOC-DvfH1oWR.js");
162139
162382
  return { id: id15, diagram: diagram2 };
162140
162383
  }, "loader");
162141
162384
  var plugin13 = {
@@ -162155,7 +162398,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
162155
162398
  return false;
162156
162399
  }, "detector");
162157
162400
  var loader16 = /* @__PURE__ */ __name(async () => {
162158
- const { diagram: diagram2 } = await import("./stateDiagram-v2-4FDKWEC3-DUdtQcpy.js");
162401
+ const { diagram: diagram2 } = await import("./stateDiagram-v2-4FDKWEC3-CgJsyTfA.js");
162159
162402
  return { id: id16, diagram: diagram2 };
162160
162403
  }, "loader");
162161
162404
  var plugin14 = {
@@ -162169,7 +162412,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
162169
162412
  return /^\s*journey/.test(txt);
162170
162413
  }, "detector");
162171
162414
  var loader17 = /* @__PURE__ */ __name(async () => {
162172
- const { diagram: diagram2 } = await import("./journeyDiagram-XKPGCS4Q-D1o9zBGm.js");
162415
+ const { diagram: diagram2 } = await import("./journeyDiagram-XKPGCS4Q-D03SsiQq.js");
162173
162416
  return { id: id17, diagram: diagram2 };
162174
162417
  }, "loader");
162175
162418
  var plugin15 = {
@@ -162236,7 +162479,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
162236
162479
  return false;
162237
162480
  }, "detector");
162238
162481
  var loader18 = /* @__PURE__ */ __name(async () => {
162239
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-BYT0MDKu.js");
162482
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-CmRcqums.js");
162240
162483
  return { id: id18, diagram: diagram2 };
162241
162484
  }, "loader");
162242
162485
  var plugin16 = {
@@ -162250,7 +162493,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
162250
162493
  return /^\s*timeline/.test(txt);
162251
162494
  }, "detector");
162252
162495
  var loader19 = /* @__PURE__ */ __name(async () => {
162253
- const { diagram: diagram2 } = await import("./timeline-definition-IT6M3QCI-C2u2MfVa.js");
162496
+ const { diagram: diagram2 } = await import("./timeline-definition-IT6M3QCI-CYIrja4N.js");
162254
162497
  return { id: id19, diagram: diagram2 };
162255
162498
  }, "loader");
162256
162499
  var plugin17 = {
@@ -162264,7 +162507,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
162264
162507
  return /^\s*mindmap/.test(txt);
162265
162508
  }, "detector");
162266
162509
  var loader20 = /* @__PURE__ */ __name(async () => {
162267
- const { diagram: diagram2 } = await import("./mindmap-definition-VGOIOE7T-s5IHcHtD.js");
162510
+ const { diagram: diagram2 } = await import("./mindmap-definition-VGOIOE7T-CBCJSqB-.js");
162268
162511
  return { id: id20, diagram: diagram2 };
162269
162512
  }, "loader");
162270
162513
  var plugin18 = {
@@ -162278,7 +162521,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
162278
162521
  return /^\s*kanban/.test(txt);
162279
162522
  }, "detector");
162280
162523
  var loader21 = /* @__PURE__ */ __name(async () => {
162281
- const { diagram: diagram2 } = await import("./kanban-definition-3W4ZIXB7-CbYt-CCT.js");
162524
+ const { diagram: diagram2 } = await import("./kanban-definition-3W4ZIXB7-BeOJMgU2.js");
162282
162525
  return { id: id21, diagram: diagram2 };
162283
162526
  }, "loader");
162284
162527
  var plugin19 = {
@@ -162292,7 +162535,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
162292
162535
  return /^\s*sankey(-beta)?/.test(txt);
162293
162536
  }, "detector");
162294
162537
  var loader22 = /* @__PURE__ */ __name(async () => {
162295
- const { diagram: diagram2 } = await import("./sankeyDiagram-TZEHDZUN-Dtxaeifp.js");
162538
+ const { diagram: diagram2 } = await import("./sankeyDiagram-TZEHDZUN-CXtOdCUH.js");
162296
162539
  return { id: id22, diagram: diagram2 };
162297
162540
  }, "loader");
162298
162541
  var plugin20 = {
@@ -162306,7 +162549,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
162306
162549
  return /^\s*packet(-beta)?/.test(txt);
162307
162550
  }, "detector");
162308
162551
  var loader23 = /* @__PURE__ */ __name(async () => {
162309
- const { diagram: diagram2 } = await import("./diagram-S2PKOQOG-C9ZAbCH3.js");
162552
+ const { diagram: diagram2 } = await import("./diagram-S2PKOQOG-EPfaInlF.js");
162310
162553
  return { id: id23, diagram: diagram2 };
162311
162554
  }, "loader");
162312
162555
  var packet = {
@@ -162319,7 +162562,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
162319
162562
  return /^\s*radar-beta/.test(txt);
162320
162563
  }, "detector");
162321
162564
  var loader24 = /* @__PURE__ */ __name(async () => {
162322
- const { diagram: diagram2 } = await import("./diagram-QEK2KX5R-Cetw62MH.js");
162565
+ const { diagram: diagram2 } = await import("./diagram-QEK2KX5R-CscZyCx4.js");
162323
162566
  return { id: id24, diagram: diagram2 };
162324
162567
  }, "loader");
162325
162568
  var radar = {
@@ -162332,7 +162575,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
162332
162575
  return /^\s*block(-beta)?/.test(txt);
162333
162576
  }, "detector");
162334
162577
  var loader25 = /* @__PURE__ */ __name(async () => {
162335
- const { diagram: diagram2 } = await import("./blockDiagram-VD42YOAC-CoHm7pVm.js");
162578
+ const { diagram: diagram2 } = await import("./blockDiagram-VD42YOAC-BPuqqD38.js");
162336
162579
  return { id: id25, diagram: diagram2 };
162337
162580
  }, "loader");
162338
162581
  var plugin21 = {
@@ -162346,7 +162589,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
162346
162589
  return /^\s*architecture/.test(txt);
162347
162590
  }, "detector");
162348
162591
  var loader26 = /* @__PURE__ */ __name(async () => {
162349
- const { diagram: diagram2 } = await import("./architectureDiagram-VXUJARFQ-CUeN4CLM.js");
162592
+ const { diagram: diagram2 } = await import("./architectureDiagram-VXUJARFQ-CxI1sFRU.js");
162350
162593
  return { id: id26, diagram: diagram2 };
162351
162594
  }, "loader");
162352
162595
  var architecture = {
@@ -162360,7 +162603,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
162360
162603
  return /^\s*treemap/.test(txt);
162361
162604
  }, "detector");
162362
162605
  var loader27 = /* @__PURE__ */ __name(async () => {
162363
- const { diagram: diagram2 } = await import("./diagram-PSM6KHXK-Ci3qYhO1.js");
162606
+ const { diagram: diagram2 } = await import("./diagram-PSM6KHXK-k6pYzUY5.js");
162364
162607
  return { id: id27, diagram: diagram2 };
162365
162608
  }, "loader");
162366
162609
  var treemap = {
@@ -163599,17 +163842,7 @@ function CodeBrowserView({
163599
163842
  const removeFileRef = reactExports.useRef(tabState.removeFile);
163600
163843
  removeFileRef.current = tabState.removeFile;
163601
163844
  const { settings } = useSettingsQuery();
163602
- const { projects } = useProjects();
163603
- const workspacePath = (() => {
163604
- for (const proj of projects) {
163605
- for (const wt2 of proj.worktrees) {
163606
- if (toWorkspaceId(proj.name, wt2.branch) === workspaceId) {
163607
- return wt2.path;
163608
- }
163609
- }
163610
- }
163611
- return void 0;
163612
- })();
163845
+ const workspacePath = useWorkspacePath(workspaceId);
163613
163846
  const [viewFilePath, setViewFilePath] = reactExports.useState(() => {
163614
163847
  if (file2) return parseFileLocation(file2).filePath;
163615
163848
  return fileTabs.activeTabPath ?? "";
@@ -164507,6 +164740,7 @@ function CodeBrowserView({
164507
164740
  {
164508
164741
  ref: fileBrowserRef,
164509
164742
  workspaceId,
164743
+ workspacePath,
164510
164744
  onOpenFile: handleSelectFile,
164511
164745
  onOpenFilePinned: handleSelectFilePinned,
164512
164746
  selectedFile: viewFilePath,
@@ -164555,6 +164789,7 @@ function CodeBrowserView({
164555
164789
  {
164556
164790
  ref: fileBrowserRef,
164557
164791
  workspaceId,
164792
+ workspacePath,
164558
164793
  onOpenFile: handleSelectFile,
164559
164794
  onOpenFilePinned: handleSelectFilePinned,
164560
164795
  compact: true,
@@ -164675,54 +164910,6 @@ function CodeBrowserView({
164675
164910
  ) })
164676
164911
  );
164677
164912
  }
164678
- async function writeClipboardText(text2) {
164679
- if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
164680
- try {
164681
- await navigator.clipboard.writeText(text2);
164682
- return true;
164683
- } catch {
164684
- }
164685
- }
164686
- return legacyCopy(text2);
164687
- }
164688
- function legacyCopy(text2) {
164689
- if (typeof document === "undefined") return false;
164690
- const textarea = document.createElement("textarea");
164691
- textarea.value = text2;
164692
- textarea.setAttribute("readonly", "");
164693
- textarea.style.position = "fixed";
164694
- textarea.style.top = "0";
164695
- textarea.style.left = "0";
164696
- textarea.style.width = "1px";
164697
- textarea.style.height = "1px";
164698
- textarea.style.padding = "0";
164699
- textarea.style.border = "0";
164700
- textarea.style.opacity = "0";
164701
- textarea.style.pointerEvents = "none";
164702
- document.body.appendChild(textarea);
164703
- const previouslyFocused = document.activeElement;
164704
- try {
164705
- textarea.focus();
164706
- textarea.select();
164707
- textarea.setSelectionRange(0, text2.length);
164708
- return document.execCommand("copy");
164709
- } catch {
164710
- return false;
164711
- } finally {
164712
- document.body.removeChild(textarea);
164713
- previouslyFocused?.focus?.();
164714
- }
164715
- }
164716
- async function readClipboardText() {
164717
- if (typeof navigator === "undefined" || !navigator.clipboard?.readText) {
164718
- return "";
164719
- }
164720
- try {
164721
- return await navigator.clipboard.readText();
164722
- } catch {
164723
- return "";
164724
- }
164725
- }
164726
164913
  function cycleTabsInActiveGroup(api, direction, refocus) {
164727
164914
  const group = api?.activeGroup;
164728
164915
  if (!api || !group) return;
@@ -172324,8 +172511,7 @@ const PromptInput = ({
172324
172511
  const handler = (e3) => {
172325
172512
  if (wsActiveRef.current === false) return;
172326
172513
  const { filePath, startLine, endLine } = e3.detail;
172327
- const lineRef = startLine === endLine ? `${filePath}:${startLine}` : `${filePath}:${startLine}-${endLine}`;
172328
- const reference = `\`${lineRef}\` `;
172514
+ const reference = `\`${buildLineReference(filePath, startLine, endLine)}\` `;
172329
172515
  const textarea = textareaRef.current;
172330
172516
  const current2 = textarea?.value ?? "";
172331
172517
  const combined = current2 + reference;
@@ -173549,6 +173735,7 @@ function ToolCall({ item }) {
173549
173735
  markdown && /* @__PURE__ */ jsxRuntimeExports.jsx(MessageResponse, { children: markdown })
173550
173736
  ] });
173551
173737
  }
173738
+ const HISTORY_PAGE_SIZE = 50;
173552
173739
  const CHAT_EVENT_TYPES = [
173553
173740
  "user-message",
173554
173741
  "task-started",
@@ -173565,7 +173752,8 @@ const CHAT_EVENT_TYPES = [
173565
173752
  "error",
173566
173753
  "file",
173567
173754
  "queue-updated",
173568
- "subscription-opened"
173755
+ "subscription-opened",
173756
+ "history-meta"
173569
173757
  ];
173570
173758
  const INITIAL_STATE = {
173571
173759
  messages: [],
@@ -173578,6 +173766,9 @@ const INITIAL_STATE = {
173578
173766
  taskErrorMessage: void 0,
173579
173767
  currentAssistantId: void 0,
173580
173768
  messageIdCounter: 0,
173769
+ hasOlder: false,
173770
+ oldestOffset: void 0,
173771
+ pendingToolOutputs: {},
173581
173772
  pendingOptimisticTask: false
173582
173773
  };
173583
173774
  function appendPart(messages, assistantId, part) {
@@ -173666,7 +173857,53 @@ function makeToolOutputPart(prev2, evt) {
173666
173857
  approval: prev2?.approval
173667
173858
  };
173668
173859
  }
173669
- function chatEventReducer(state2, event) {
173860
+ function drainPendingToolOutputs(messages, pending2) {
173861
+ const ids2 = Object.keys(pending2);
173862
+ if (ids2.length === 0) return { messages, pending: pending2 };
173863
+ let nextMessages = messages;
173864
+ let nextPending;
173865
+ for (const toolCallId of ids2) {
173866
+ let ownerId;
173867
+ let prevPart;
173868
+ for (let i2 = nextMessages.length - 1; i2 >= 0; i2--) {
173869
+ const msg = nextMessages[i2];
173870
+ if (msg.role !== "assistant") continue;
173871
+ const part = msg.parts.find((p2) => {
173872
+ const pp = p2;
173873
+ return pp.toolCallId === toolCallId;
173874
+ });
173875
+ if (part) {
173876
+ ownerId = msg.id;
173877
+ prevPart = part;
173878
+ break;
173879
+ }
173880
+ }
173881
+ if (!ownerId) continue;
173882
+ nextMessages = replaceToolPart(
173883
+ nextMessages,
173884
+ ownerId,
173885
+ toolCallId,
173886
+ makeToolOutputPart(prevPart, pending2[toolCallId])
173887
+ );
173888
+ if (!nextPending) nextPending = { ...pending2 };
173889
+ delete nextPending[toolCallId];
173890
+ }
173891
+ return { messages: nextMessages, pending: nextPending ?? pending2 };
173892
+ }
173893
+ function chatEventReducer(state2, action) {
173894
+ if (action.type === "prepend-messages") {
173895
+ const merged = [...action.messages, ...state2.messages];
173896
+ const mergedPending = action.pendingToolOutputs ? { ...state2.pendingToolOutputs, ...action.pendingToolOutputs } : state2.pendingToolOutputs;
173897
+ const drained = drainPendingToolOutputs(merged, mergedPending);
173898
+ return {
173899
+ ...state2,
173900
+ messages: drained.messages,
173901
+ pendingToolOutputs: drained.pending,
173902
+ hasOlder: action.hasOlder,
173903
+ oldestOffset: action.oldestOffset
173904
+ };
173905
+ }
173906
+ const event = action;
173670
173907
  const lastEventId = Math.max(state2.lastEventId ?? 0, event.eventId);
173671
173908
  switch (event.type) {
173672
173909
  case "subscription-opened": {
@@ -173822,6 +174059,7 @@ function chatEventReducer(state2, event) {
173822
174059
  messages = [...messages, { id: assistantId, role: "assistant", parts: [] }];
173823
174060
  }
173824
174061
  messages = appendPart(messages, assistantId, makeToolInputPart(event));
174062
+ const drained = drainPendingToolOutputs(messages, state2.pendingToolOutputs);
173825
174063
  return {
173826
174064
  ...state2,
173827
174065
  lastEventId,
@@ -173831,7 +174069,8 @@ function chatEventReducer(state2, event) {
173831
174069
  status: state2.taskRunning ? "streaming" : state2.status,
173832
174070
  currentAssistantId: assistantId,
173833
174071
  messageIdCounter: nextCounter,
173834
- messages
174072
+ messages: drained.messages,
174073
+ pendingToolOutputs: drained.pending
173835
174074
  };
173836
174075
  }
173837
174076
  case "tool-output-available": {
@@ -173851,11 +174090,11 @@ function chatEventReducer(state2, event) {
173851
174090
  }
173852
174091
  }
173853
174092
  if (!ownerId) {
173854
- console.warn(
173855
- "[chat] tool-output-available for unknown toolCallId — dropping",
173856
- event.toolCallId
173857
- );
173858
- return { ...state2, lastEventId };
174093
+ return {
174094
+ ...state2,
174095
+ lastEventId,
174096
+ pendingToolOutputs: { ...state2.pendingToolOutputs, [event.toolCallId]: event }
174097
+ };
173859
174098
  }
173860
174099
  const messages = replaceToolPart(
173861
174100
  state2.messages,
@@ -173925,11 +174164,24 @@ _Error: ${event.message}_`
173925
174164
  }
173926
174165
  case "queue-updated":
173927
174166
  return { ...state2, lastEventId, queuedMessages: event.messages };
174167
+ case "history-meta":
174168
+ return {
174169
+ ...state2,
174170
+ lastEventId,
174171
+ hasOlder: event.hasOlder,
174172
+ oldestOffset: event.oldestOffset
174173
+ };
173928
174174
  default: {
173929
174175
  return { ...state2, lastEventId };
173930
174176
  }
173931
174177
  }
173932
174178
  }
174179
+ function applyEvents(state2, events2) {
174180
+ let next2 = state2;
174181
+ for (const evt of events2) next2 = chatEventReducer(next2, evt);
174182
+ return next2;
174183
+ }
174184
+ const OLDER_PAGE_LIMIT = HISTORY_PAGE_SIZE;
173933
174185
  const MAX_BACKOFF_MS = 1e4;
173934
174186
  const INITIAL_BACKOFF_MS = 500;
173935
174187
  async function fileToWirePart(file2) {
@@ -174113,6 +174365,51 @@ function useChatSubscription(opts) {
174113
174365
  } catch {
174114
174366
  }
174115
174367
  }, [workspaceId, chatId]);
174368
+ const [loadingOlder, setLoadingOlder] = reactExports.useState(false);
174369
+ const loadingOlderRef = reactExports.useRef(false);
174370
+ const paginationRef = reactExports.useRef({
174371
+ hasOlder: state2.hasOlder,
174372
+ oldestOffset: state2.oldestOffset,
174373
+ sessionId: state2.sessionId
174374
+ });
174375
+ paginationRef.current.hasOlder = state2.hasOlder;
174376
+ paginationRef.current.oldestOffset = state2.oldestOffset;
174377
+ paginationRef.current.sessionId = state2.sessionId;
174378
+ const loadOlder = reactExports.useCallback(async () => {
174379
+ if (loadingOlderRef.current) return;
174380
+ const { hasOlder, oldestOffset, sessionId } = paginationRef.current;
174381
+ const before = oldestOffset;
174382
+ if (!hasOlder || before == null || before <= 0 || !sessionId) return;
174383
+ loadingOlderRef.current = true;
174384
+ setLoadingOlder(true);
174385
+ try {
174386
+ const params = new URLSearchParams();
174387
+ params.set("before", String(before));
174388
+ params.set("limit", String(OLDER_PAGE_LIMIT));
174389
+ const res = await fetch(
174390
+ `/api/chats/${encodeURIComponent(chatId)}/history?${params.toString()}`,
174391
+ { credentials: "include" }
174392
+ );
174393
+ if (!res.ok) throw new Error(`history fetch failed: HTTP ${res.status}`);
174394
+ const data = await res.json();
174395
+ const folded = applyEvents(INITIAL_STATE, data.events);
174396
+ const namespaced = folded.messages.map((m2) => ({ ...m2, id: `o${before}-${m2.id}` }));
174397
+ dispatch2({
174398
+ type: "prepend-messages",
174399
+ messages: namespaced,
174400
+ hasOlder: data.hasOlder,
174401
+ oldestOffset: data.oldestOffset,
174402
+ // Carry forward any outputs the page couldn't resolve internally (their
174403
+ // tool_use is in an even-older page) so a later load resolves them.
174404
+ pendingToolOutputs: folded.pendingToolOutputs
174405
+ });
174406
+ } catch (err) {
174407
+ console.error("[chat-sub] loadOlder failed", err);
174408
+ } finally {
174409
+ loadingOlderRef.current = false;
174410
+ setLoadingOlder(false);
174411
+ }
174412
+ }, [chatId]);
174116
174413
  return {
174117
174414
  messages: state2.messages,
174118
174415
  status: state2.status,
@@ -174121,9 +174418,12 @@ function useChatSubscription(opts) {
174121
174418
  usage: state2.usage,
174122
174419
  taskRunning: state2.taskRunning,
174123
174420
  taskErrorMessage: state2.taskErrorMessage,
174421
+ hasOlder: state2.hasOlder,
174124
174422
  isConnected,
174125
174423
  send,
174126
- cancel
174424
+ cancel,
174425
+ loadOlder,
174426
+ loadingOlder
174127
174427
  };
174128
174428
  }
174129
174429
  function createLazyMeasurementsView(count2, flat, getItemKey) {
@@ -175556,6 +175856,17 @@ function VirtualizedMessageList({
175556
175856
  // when items shift (e.g. a new message pushes earlier ones up).
175557
175857
  getItemKey: getItemKeyFn
175558
175858
  });
175859
+ const prevFirstKeyRef = reactExports.useRef(null);
175860
+ reactExports.useLayoutEffect(() => {
175861
+ const firstKey = items.length > 0 ? getKey(items[0], 0) : null;
175862
+ const prevFirstKey = prevFirstKeyRef.current;
175863
+ prevFirstKeyRef.current = firstKey;
175864
+ if (prevFirstKey == null || firstKey === prevFirstKey) return;
175865
+ const newIndex = items.findIndex((item, i2) => getKey(item, i2) === prevFirstKey);
175866
+ if (newIndex > 0) {
175867
+ virtualizer.scrollToIndex(newIndex, { align: "start" });
175868
+ }
175869
+ }, [items]);
175559
175870
  const virtualItems = virtualizer.getVirtualItems();
175560
175871
  const totalSize = virtualizer.getTotalSize();
175561
175872
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -175715,9 +176026,10 @@ function ChatView({
175715
176026
  }) {
175716
176027
  const [initialSessionCleared, setInitialSessionCleared] = reactExports.useState(false);
175717
176028
  const [contextMeterEnabled] = useExperimentalContextMeter();
175718
- reactExports.useRef(null);
176029
+ const sentinelRef = reactExports.useRef(null);
175719
176030
  const stickyContextRef = reactExports.useRef(null);
175720
176031
  const prevVisibleRef = reactExports.useRef(visible);
176032
+ const [scrollEl, setScrollEl] = reactExports.useState(null);
175721
176033
  reactExports.useEffect(() => {
175722
176034
  let raf = 0;
175723
176035
  let attempts = 0;
@@ -175726,6 +176038,7 @@ function ChatView({
175726
176038
  const el = stickyContextRef.current?.scrollRef?.current;
175727
176039
  if (el) {
175728
176040
  if (!el.dataset.testid) el.dataset.testid = "chat-pane__scroller";
176041
+ setScrollEl(el);
175729
176042
  return;
175730
176043
  }
175731
176044
  if (attempts >= 10) {
@@ -175840,7 +176153,7 @@ function ChatView({
175840
176153
  // factors in `document.visibilityState` internally.
175841
176154
  enabled: wsActive !== false
175842
176155
  });
175843
- const { messages, status, sessionId, queuedMessages, usage, send, cancel } = subscription;
176156
+ const { messages, status, sessionId, queuedMessages, usage, send, cancel, loadOlder } = subscription;
175844
176157
  const isStreaming = status === "submitting" || status === "streaming";
175845
176158
  const lastNotifiedSessionRef = reactExports.useRef(initialSessionId);
175846
176159
  reactExports.useEffect(() => {
@@ -175855,9 +176168,9 @@ function ChatView({
175855
176168
  }, [queuedMessages]);
175856
176169
  const queuedMessagesView = optimisticQueue ?? queuedMessages;
175857
176170
  const currentSessionId = initialSessionCleared ? void 0 : sessionId ?? initialSessionId;
175858
- const hasMore = false;
175859
- !isStreaming && messages.length === 0 && !!initialSessionId && !subscription.isConnected;
175860
- const loadingOlder = false;
176171
+ const hasMore = subscription.hasOlder;
176172
+ const loadingHistory = !isStreaming && messages.length === 0 && !!initialSessionId && !subscription.isConnected;
176173
+ const loadingOlder = subscription.loadingOlder;
175861
176174
  const handleStop = reactExports.useCallback(() => {
175862
176175
  void cancel();
175863
176176
  }, [cancel]);
@@ -175973,6 +176286,22 @@ function ChatView({
175973
176286
  const getMessageKey = reactExports.useCallback((message) => message.id, []);
175974
176287
  const messagesRef = reactExports.useRef(messages);
175975
176288
  messagesRef.current = messages;
176289
+ reactExports.useEffect(() => {
176290
+ const sentinel = sentinelRef.current;
176291
+ if (!sentinel || !scrollEl || !hasMore || loadingHistory) return;
176292
+ const io2 = new IntersectionObserver(
176293
+ (entries2) => {
176294
+ for (const entry of entries2) {
176295
+ if (entry.isIntersecting) void loadOlder();
176296
+ }
176297
+ },
176298
+ // Pre-fetch slightly before the sentinel is fully on-screen so the older
176299
+ // page is usually ready by the time the user reaches the very top.
176300
+ { root: scrollEl, rootMargin: "150px 0px 0px 0px" }
176301
+ );
176302
+ io2.observe(sentinel);
176303
+ return () => io2.disconnect();
176304
+ }, [scrollEl, hasMore, loadingHistory, loadOlder]);
175976
176305
  const renderMessageItem = reactExports.useCallback(
175977
176306
  (message, messageIndex) => {
175978
176307
  const currentMessages = messagesRef.current;
@@ -176051,9 +176380,21 @@ function ChatView({
176051
176380
  // (issue #539).
176052
176381
  /* @__PURE__ */ jsxRuntimeExports.jsx(FileLinkWorkspaceProvider, { workspaceId, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [
176053
176382
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Conversation, { className: "min-h-0 flex-1", contextRef: stickyContextRef, children: [
176383
+ loadingOlder && /* @__PURE__ */ jsxRuntimeExports.jsx(
176384
+ "output",
176385
+ {
176386
+ className: "pointer-events-none absolute inset-x-0 top-2 z-10 flex justify-center",
176387
+ "aria-busy": "true",
176388
+ "aria-label": "Loading older messages",
176389
+ "data-testid": "chat-pane__loading-older",
176390
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "flex items-center gap-2 rounded-full bg-background/90 px-3 py-1 text-xs text-muted-foreground shadow-sm", children: [
176391
+ /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3.5 animate-spin" }),
176392
+ "Loading earlier messages…"
176393
+ ] })
176394
+ }
176395
+ ),
176054
176396
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ConversationContent, { children: [
176055
- hasMore,
176056
- loadingOlder,
176397
+ hasMore && !loadingHistory && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: sentinelRef, className: "h-px w-full shrink-0", "aria-hidden": "true" }),
176057
176398
  messages.length === 0 && !subscription.isConnected && /* @__PURE__ */ jsxRuntimeExports.jsx(ConversationSkeleton, {}),
176058
176399
  messages.length === 0 && subscription.isConnected && /* @__PURE__ */ jsxRuntimeExports.jsx(
176059
176400
  ConversationEmptyState,
@@ -177083,12 +177424,13 @@ function ChatTab(props) {
177083
177424
  if (!sessionId) return;
177084
177425
  void writeClipboardText(sessionId);
177085
177426
  }, [sessionId]);
177427
+ const containerApi = props.containerApi;
177086
177428
  const handleClose2 = reactExports.useCallback(
177087
177429
  (e3) => {
177088
177430
  e3.stopPropagation();
177089
- closeTabRef.current?.(chatId);
177431
+ panelActionsByApiId.get(containerApi.id)?.current?.onClose(chatId);
177090
177432
  },
177091
- [chatId]
177433
+ [containerApi, chatId]
177092
177434
  );
177093
177435
  const showClose = panelCount > 1;
177094
177436
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -177151,52 +177493,57 @@ function ChatTab(props) {
177151
177493
  }
177152
177494
  );
177153
177495
  }
177154
- const addTabRef = {
177155
- current: { onAdd: () => {
177156
- }, onSplit: () => {
177157
- } }
177158
- };
177159
- const closeTabRef = {
177160
- current: null
177161
- };
177496
+ const panelActionsByApiId = /* @__PURE__ */ new Map();
177162
177497
  const RightHeaderActions = React$1.memo(function RightHeaderActions2(props) {
177163
177498
  const isGridGroup = (props.location?.type ?? "grid") === "grid";
177164
- const { onAdd: onAdd2, onSplit } = addTabRef.current;
177499
+ const apiId = props.containerApi.id;
177165
177500
  const groupId = props.group.id;
177166
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full w-full items-center justify-center", children: [
177167
- isGridGroup && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
177168
- /* @__PURE__ */ jsxRuntimeExports.jsx(
177169
- "button",
177170
- {
177171
- type: "button",
177172
- className: "inline-flex size-8 items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors",
177173
- onClick: () => onSplit(groupId, "right"),
177174
- title: "Split right",
177175
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Columns2, { className: "size-3.5" })
177176
- }
177177
- ),
177178
- /* @__PURE__ */ jsxRuntimeExports.jsx(
177179
- "button",
177180
- {
177181
- type: "button",
177182
- className: "inline-flex size-8 items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors",
177183
- onClick: () => onSplit(groupId, "below"),
177184
- title: "Split down",
177185
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Rows2, { className: "size-3.5" })
177186
- }
177187
- )
177188
- ] }),
177189
- /* @__PURE__ */ jsxRuntimeExports.jsx(
177190
- "button",
177501
+ return (
177502
+ // `data-testid` on grid-group toolbars only (edge groups get no testid)
177503
+ // gives integration tests a stable hook for the central action row
177504
+ // without the fragile CSS `:has(button[title=...])` workaround.
177505
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
177506
+ "div",
177191
177507
  {
177192
- type: "button",
177193
- className: "inline-flex size-8 items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors",
177194
- onClick: () => onAdd2(void 0, groupId),
177195
- title: "New chat tab",
177196
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" })
177508
+ className: "flex h-full w-full items-center justify-center",
177509
+ "data-testid": isGridGroup ? "dockview-chat__toolbar" : void 0,
177510
+ children: [
177511
+ isGridGroup && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
177512
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
177513
+ "button",
177514
+ {
177515
+ type: "button",
177516
+ className: "inline-flex size-8 items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors",
177517
+ onClick: () => panelActionsByApiId.get(apiId)?.current?.onSplit(groupId, "right"),
177518
+ title: "Split right",
177519
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Columns2, { className: "size-3.5" })
177520
+ }
177521
+ ),
177522
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
177523
+ "button",
177524
+ {
177525
+ type: "button",
177526
+ className: "inline-flex size-8 items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors",
177527
+ onClick: () => panelActionsByApiId.get(apiId)?.current?.onSplit(groupId, "below"),
177528
+ title: "Split down",
177529
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Rows2, { className: "size-3.5" })
177530
+ }
177531
+ )
177532
+ ] }),
177533
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
177534
+ "button",
177535
+ {
177536
+ type: "button",
177537
+ className: "inline-flex size-8 items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors",
177538
+ onClick: () => panelActionsByApiId.get(apiId)?.current?.onAdd(void 0, groupId),
177539
+ title: "New chat tab",
177540
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" })
177541
+ }
177542
+ )
177543
+ ]
177197
177544
  }
177198
177545
  )
177199
- ] });
177546
+ );
177200
177547
  });
177201
177548
  const chatPanelComponents = {
177202
177549
  chatTab: ChatTabPanel
@@ -177426,10 +177773,19 @@ function DockviewChatContainer({
177426
177773
  }
177427
177774
  });
177428
177775
  }, [adapter2, workspaceId]);
177429
- addTabRef.current = { onAdd: handleAddTab, onSplit: handleSplit };
177430
- closeTabRef.current = closeTab;
177776
+ const actionsRef = reactExports.useRef({
177777
+ onAdd: () => {
177778
+ },
177779
+ onSplit: () => {
177780
+ },
177781
+ onClose: () => {
177782
+ }
177783
+ });
177784
+ actionsRef.current = { onAdd: handleAddTab, onSplit: handleSplit, onClose: closeTab };
177431
177785
  reactExports.useEffect(() => {
177432
177786
  return () => {
177787
+ const api = apiRef.current;
177788
+ if (api) panelActionsByApiId.delete(api.id);
177433
177789
  edgeDragDisposerRef.current?.();
177434
177790
  edgeDragDisposerRef.current = null;
177435
177791
  innerRegisterDisposerRef.current?.();
@@ -177442,7 +177798,10 @@ function DockviewChatContainer({
177442
177798
  initialChatIdsRef.current = initialData?.chatIds ?? null;
177443
177799
  const onReady = reactExports.useCallback(
177444
177800
  (event) => {
177801
+ const prevApi = apiRef.current;
177802
+ if (prevApi && prevApi.id !== event.api.id) panelActionsByApiId.delete(prevApi.id);
177445
177803
  apiRef.current = event.api;
177804
+ panelActionsByApiId.set(event.api.id, actionsRef);
177446
177805
  const savedLayout = initialLayoutRef.current;
177447
177806
  const knownChatIds = initialChatIdsRef.current;
177448
177807
  if (savedLayout && isDockviewLayout(savedLayout)) {
@@ -201006,12 +201365,12 @@ const PANEL_SHORTCUTS = {
201006
201365
  browser: "⇧⌘B"
201007
201366
  };
201008
201367
  const DockviewTerminalContainer = reactExports.lazy(
201009
- () => import("./DockviewTerminalContainer-CyrT6RMc.js").then((m2) => ({
201368
+ () => import("./DockviewTerminalContainer-DbD2CvFz.js").then((m2) => ({
201010
201369
  default: m2.DockviewTerminalContainer
201011
201370
  }))
201012
201371
  );
201013
201372
  const DockviewBrowserContainer = reactExports.lazy(
201014
- () => import("./DockviewBrowserContainer-DLO8DHQ8.js").then((m2) => ({
201373
+ () => import("./DockviewBrowserContainer-CqDANKB4.js").then((m2) => ({
201015
201374
  default: m2.DockviewBrowserContainer
201016
201375
  }))
201017
201376
  );
@@ -201525,7 +201884,13 @@ function SharedDockviewLayout() {
201525
201884
  const handler = (e3) => {
201526
201885
  const ws = activeWorkspaceIdRef.current;
201527
201886
  const terminalFocused = document.activeElement?.closest(".xterm") != null;
201528
- if (e3.ctrlKey && !e3.metaKey && e3.key.toLowerCase() === "r" && !e3.shiftKey) {
201887
+ if (e3.metaKey && !e3.ctrlKey && !e3.shiftKey && e3.key.toLowerCase() === "k") {
201888
+ e3.preventDefault();
201889
+ e3.stopPropagation();
201890
+ setWorkspacePickerOpen(true);
201891
+ return;
201892
+ }
201893
+ if (e3.ctrlKey && !e3.metaKey && !e3.shiftKey && e3.key.toLowerCase() === "k") {
201529
201894
  if (terminalFocused) return;
201530
201895
  e3.preventDefault();
201531
201896
  e3.stopPropagation();
@@ -201680,11 +202045,14 @@ function SharedDockviewLayout() {
201680
202045
  reactExports.useEffect(() => {
201681
202046
  const openQO = () => setQuickOpenOpen(true);
201682
202047
  const openSF = () => setSearchFilesOpen(true);
202048
+ const openPicker = () => setWorkspacePickerOpen(true);
201683
202049
  window.addEventListener("band:open-quick-open", openQO);
201684
202050
  window.addEventListener("band:open-search-files", openSF);
202051
+ window.addEventListener("band:open-workspace-picker", openPicker);
201685
202052
  return () => {
201686
202053
  window.removeEventListener("band:open-quick-open", openQO);
201687
202054
  window.removeEventListener("band:open-search-files", openSF);
202055
+ window.removeEventListener("band:open-workspace-picker", openPicker);
201688
202056
  };
201689
202057
  }, []);
201690
202058
  reactExports.useEffect(() => {
@@ -201697,6 +202065,22 @@ function SharedDockviewLayout() {
201697
202065
  window.addEventListener("band:activate-panel", handler);
201698
202066
  return () => window.removeEventListener("band:activate-panel", handler);
201699
202067
  }, []);
202068
+ reactExports.useEffect(() => {
202069
+ const handler = (e3) => {
202070
+ const reference = e3.detail?.reference;
202071
+ const workspaceId = activeWorkspaceIdRef.current;
202072
+ if (!reference || !workspaceId) return;
202073
+ if (hiddenPanelsRef.current.includes("terminal")) return;
202074
+ apiRef.current?.getPanel("terminal")?.api.setActive();
202075
+ queueMicrotask(() => {
202076
+ window.dispatchEvent(
202077
+ new CustomEvent("band:terminal-insert", { detail: { reference, workspaceId } })
202078
+ );
202079
+ });
202080
+ };
202081
+ window.addEventListener("band:add-to-terminal", handler);
202082
+ return () => window.removeEventListener("band:add-to-terminal", handler);
202083
+ }, []);
201700
202084
  const addMissingPanel = reactExports.useCallback((api, panelId) => {
201701
202085
  if (!(panelId in components)) return;
201702
202086
  const anyExisting = api.getPanel("changes") ?? api.getPanel("files") ?? api.getPanel("terminal") ?? api.getPanel("chat");
@@ -202516,6 +202900,7 @@ function AppShell() {
202516
202900
  workspaceName: activeWorkspaceId ?? void 0,
202517
202901
  workspacePath: activeWorkspaceId ? workspacePath : void 0,
202518
202902
  onCopyPath: activeWorkspaceId ? handleCopyPath : void 0,
202903
+ onWorkspaceNameClick: activeWorkspaceId ? () => window.dispatchEvent(new CustomEvent("band:open-workspace-picker")) : void 0,
202519
202904
  panelItems: activeWorkspaceId ? panelItems : void 0,
202520
202905
  hiddenPanels: activeWorkspaceId ? hiddenPanels : void 0,
202521
202906
  onTogglePanelVisibility: activeWorkspaceId ? handleTogglePanelVisibility : void 0,
@@ -202550,12 +202935,12 @@ function RootLayout() {
202550
202935
  ] })
202551
202936
  ] });
202552
202937
  }
202553
- const $$splitComponentImporter$1 = () => import("./index-CsRze8_V.js");
202938
+ const $$splitComponentImporter$1 = () => import("./index-DPjPbgde.js");
202554
202939
  const Route$1 = createFileRoute("/")({
202555
202940
  component: lazyRouteComponent($$splitComponentImporter$1, "component")
202556
202941
  });
202557
- const $$splitNotFoundComponentImporter = () => import("./workspace._workspaceId-DbDNrvi3.js");
202558
- const $$splitComponentImporter = () => import("./workspace._workspaceId-C9ajqro8.js");
202942
+ const $$splitNotFoundComponentImporter = () => import("./workspace._workspaceId-Bie30-IB.js");
202943
+ const $$splitComponentImporter = () => import("./workspace._workspaceId-DSIpOEcg.js");
202559
202944
  const Route2 = createFileRoute("/workspace/$workspaceId")({
202560
202945
  component: lazyRouteComponent($$splitComponentImporter, "component"),
202561
202946
  // Bookmarks / shared links from before route unification (`/workspace/$id/changes`,
@@ -202756,7 +203141,7 @@ export {
202756
203141
  isFunction$1 as by,
202757
203142
  isEmpty as bz,
202758
203143
  continuedIndent as c,
202759
- millisecond as c$,
203144
+ second as c$,
202760
203145
  SearchFilesDialog as c0,
202761
203146
  WorkspacePickerDialog as c1,
202762
203147
  useDiffTarget as c2,
@@ -202766,105 +203151,106 @@ export {
202766
203151
  array$2 as c6,
202767
203152
  ordinal as c7,
202768
203153
  getUserDefinedConfig as c8,
202769
- getIconSVG as c9,
202770
- DropdownMenuItem as cA,
202771
- TriangleAlert as cB,
202772
- RotateCw as cC,
202773
- Rgb as cD,
202774
- rgbConvert as cE,
202775
- define as cF,
202776
- extend$2 as cG,
202777
- Color as cH,
202778
- nogamma as cI,
202779
- hue as cJ,
202780
- time$2 as cK,
202781
- min$1 as cL,
202782
- max$1 as cM,
202783
- dayjs2 as cN,
202784
- timeFormat as cO,
202785
- timeMonth as cP,
202786
- timeSunday as cQ,
202787
- timeSaturday as cR,
202788
- timeFriday as cS,
202789
- timeThursday as cT,
202790
- timeWednesday as cU,
202791
- timeTuesday as cV,
202792
- timeMonday as cW,
202793
- timeDay as cX,
202794
- timeHour as cY,
202795
- timeMinute as cZ,
202796
- second as c_,
202797
- registerIconPacks as ca,
202798
- unknownIcon as cb,
202799
- writeClipboardText as cc,
202800
- readClipboardText as cd,
202801
- ArrowUp as ce,
202802
- ArrowDown as cf,
202803
- ArrowRight as cg,
202804
- ClipboardPaste as ch,
202805
- getCurrentZoomLevel as ci,
202806
- openExternalUrl as cj,
202807
- subscribeToZoomChanges as ck,
202808
- SearchBar as cl,
202809
- ZOOM_CSS_VAR as cm,
202810
- invoke as cn,
202811
- listen as co,
202812
- reactDomExports as cp,
202813
- Globe as cq,
202814
- Popover as cr,
202815
- PopoverTrigger as cs,
202816
- PopoverContent as ct,
202817
- Search as cu,
202818
- Trash2 as cv,
202819
- DropdownMenu as cw,
202820
- DropdownMenuTrigger as cx,
202821
- ChevronDown as cy,
202822
- DropdownMenuContent as cz,
203154
+ writeClipboardText as c9,
203155
+ DropdownMenuContent as cA,
203156
+ DropdownMenuItem as cB,
203157
+ TriangleAlert as cC,
203158
+ RotateCw as cD,
203159
+ Rgb as cE,
203160
+ rgbConvert as cF,
203161
+ define as cG,
203162
+ extend$2 as cH,
203163
+ Color as cI,
203164
+ nogamma as cJ,
203165
+ hue as cK,
203166
+ time$2 as cL,
203167
+ min$1 as cM,
203168
+ max$1 as cN,
203169
+ dayjs2 as cO,
203170
+ timeFormat as cP,
203171
+ timeMonth as cQ,
203172
+ timeSunday as cR,
203173
+ timeSaturday as cS,
203174
+ timeFriday as cT,
203175
+ timeThursday as cU,
203176
+ timeWednesday as cV,
203177
+ timeTuesday as cW,
203178
+ timeMonday as cX,
203179
+ timeDay as cY,
203180
+ timeHour as cZ,
203181
+ timeMinute as c_,
203182
+ readClipboardText as ca,
203183
+ ArrowUp as cb,
203184
+ ArrowDown as cc,
203185
+ ArrowRight as cd,
203186
+ ClipboardCopy as ce,
203187
+ ClipboardPaste as cf,
203188
+ getCurrentZoomLevel as cg,
203189
+ openExternalUrl as ch,
203190
+ subscribeToZoomChanges as ci,
203191
+ SearchBar as cj,
203192
+ ZOOM_CSS_VAR as ck,
203193
+ getIconSVG as cl,
203194
+ registerIconPacks as cm,
203195
+ unknownIcon as cn,
203196
+ invoke as co,
203197
+ listen as cp,
203198
+ reactDomExports as cq,
203199
+ Globe as cr,
203200
+ Popover as cs,
203201
+ PopoverTrigger as ct,
203202
+ PopoverContent as cu,
203203
+ Search as cv,
203204
+ Trash2 as cw,
203205
+ DropdownMenu as cx,
203206
+ DropdownMenuTrigger as cy,
203207
+ ChevronDown as cz,
202823
203208
  foldInside as d,
202824
- isObject$2 as d0,
202825
- isIterateeCall$1 as d1,
202826
- keysIn as d2,
202827
- eq as d3,
202828
- isArrayLike$1 as d4,
202829
- isArray$1 as d5,
202830
- identity$1 as d6,
202831
- isIndex$1 as d7,
202832
- assignValue as d8,
202833
- format as d9,
202834
- Stack as dA,
202835
- MapCache as dB,
202836
- Uint8Array$1 as dC,
202837
- isTypedArray$1 as dD,
202838
- isLength$1 as dE,
202839
- Set$1 as dF,
202840
- createAssigner as dG,
202841
- isPrototype as dH,
202842
- router as dI,
202843
- styles2String as da,
202844
- isLabelStyle as db,
202845
- setToString as dc,
202846
- overRest as dd,
202847
- baseFor as de,
202848
- baseAssignValue as df,
202849
- baseUnary as dg,
202850
- merge$1 as dh,
202851
- isObjectLike$1 as di,
202852
- baseGetTag as dj,
202853
- Symbol$1 as dk,
202854
- arrayLikeKeys as dl,
202855
- baseKeys as dm,
202856
- memoize as dn,
202857
- isArguments$1 as dp,
202858
- copyObject as dq,
202859
- getPrototype as dr,
202860
- cloneArrayBuffer as ds,
202861
- cloneTypedArray as dt,
202862
- getTag$1 as du,
202863
- nodeUtil as dv,
202864
- copyArray as dw,
202865
- isBuffer$1 as dx,
202866
- cloneBuffer as dy,
202867
- initCloneObject as dz,
203209
+ millisecond as d0,
203210
+ isObject$2 as d1,
203211
+ isIterateeCall$1 as d2,
203212
+ keysIn as d3,
203213
+ eq as d4,
203214
+ isArrayLike$1 as d5,
203215
+ isArray$1 as d6,
203216
+ identity$1 as d7,
203217
+ isIndex$1 as d8,
203218
+ assignValue as d9,
203219
+ initCloneObject as dA,
203220
+ Stack as dB,
203221
+ MapCache as dC,
203222
+ Uint8Array$1 as dD,
203223
+ isTypedArray$1 as dE,
203224
+ isLength$1 as dF,
203225
+ Set$1 as dG,
203226
+ createAssigner as dH,
203227
+ isPrototype as dI,
203228
+ router as dJ,
203229
+ format as da,
203230
+ styles2String as db,
203231
+ isLabelStyle as dc,
203232
+ setToString as dd,
203233
+ overRest as de,
203234
+ baseFor as df,
203235
+ baseAssignValue as dg,
203236
+ baseUnary as dh,
203237
+ merge$1 as di,
203238
+ isObjectLike$1 as dj,
203239
+ baseGetTag as dk,
203240
+ Symbol$1 as dl,
203241
+ arrayLikeKeys as dm,
203242
+ baseKeys as dn,
203243
+ memoize as dp,
203244
+ isArguments$1 as dq,
203245
+ copyObject as dr,
203246
+ getPrototype as ds,
203247
+ cloneArrayBuffer as dt,
203248
+ cloneTypedArray as du,
203249
+ getTag$1 as dv,
203250
+ nodeUtil as dw,
203251
+ copyArray as dx,
203252
+ isBuffer$1 as dy,
203253
+ cloneBuffer as dz,
202868
203254
  ifNotIn as e,
202869
203255
  foldNodeProp as f,
202870
203256
  completeFromList as g,