@bryanhu/codexly 0.20.0 → 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 (307) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cli.js +1 -1
  3. package/dist/web/.vite/manifest.json +223 -223
  4. package/dist/web/.vite/manifest.json.br +0 -0
  5. package/dist/web/.vite/manifest.json.gz +0 -0
  6. package/dist/web/assets/{agent-settings-panel-B3hoqvYI.js → agent-settings-panel-C7uNXeGy.js} +1 -1
  7. package/dist/web/assets/agent-settings-panel-C7uNXeGy.js.br +0 -0
  8. package/dist/web/assets/agent-settings-panel-C7uNXeGy.js.gz +0 -0
  9. package/dist/web/assets/background-image-picker-DtuAcWzD.js +1 -0
  10. package/dist/web/assets/background-image-picker-DtuAcWzD.js.br +0 -0
  11. package/dist/web/assets/background-image-picker-DtuAcWzD.js.gz +0 -0
  12. package/dist/web/assets/{bing-wallpaper-queries-CybCDdtr.js → bing-wallpaper-queries-BQDBcor6.js} +1 -1
  13. package/dist/web/assets/bing-wallpaper-queries-BQDBcor6.js.br +0 -0
  14. package/dist/web/assets/bing-wallpaper-queries-BQDBcor6.js.gz +0 -0
  15. package/dist/web/assets/bot-DYpQGfoo.js +1 -0
  16. package/dist/web/assets/bot-DYpQGfoo.js.br +0 -0
  17. package/dist/web/assets/bot-DYpQGfoo.js.gz +0 -0
  18. package/dist/web/assets/{button-group-DLm5MGrs.js → button-group-CnJgFd3H.js} +1 -1
  19. package/dist/web/assets/button-group-CnJgFd3H.js.br +0 -0
  20. package/dist/web/assets/button-group-CnJgFd3H.js.gz +0 -0
  21. package/dist/web/assets/{chunk-BO2N2NFS-CiutqNGv.js → chunk-BO2N2NFS-DauaBPLH.js} +4 -4
  22. package/dist/web/assets/chunk-BO2N2NFS-DauaBPLH.js.br +0 -0
  23. package/dist/web/assets/chunk-BO2N2NFS-DauaBPLH.js.gz +0 -0
  24. package/dist/web/assets/{commit-settings-panel-RS1ax2vB.js → commit-settings-panel-CsqSHXMY.js} +1 -1
  25. package/dist/web/assets/commit-settings-panel-CsqSHXMY.js.br +0 -0
  26. package/dist/web/assets/commit-settings-panel-CsqSHXMY.js.gz +0 -0
  27. package/dist/web/assets/{context-menu-DP6ii80r.js → context-menu-DA8sXAc3.js} +1 -1
  28. package/dist/web/assets/context-menu-DA8sXAc3.js.br +0 -0
  29. package/dist/web/assets/context-menu-DA8sXAc3.js.gz +0 -0
  30. package/dist/web/assets/{dist-ClwyqJQu.js → dist-B4No2uWB.js} +1 -1
  31. package/dist/web/assets/dist-B4No2uWB.js.br +0 -0
  32. package/dist/web/assets/dist-B4No2uWB.js.gz +0 -0
  33. package/dist/web/assets/download-B__AuyX_.js +1 -0
  34. package/dist/web/assets/download-B__AuyX_.js.br +0 -0
  35. package/dist/web/assets/download-B__AuyX_.js.gz +0 -0
  36. package/dist/web/assets/external-link-BHe2GLz2.js +1 -0
  37. package/dist/web/assets/external-link-BHe2GLz2.js.br +0 -0
  38. package/dist/web/assets/external-link-BHe2GLz2.js.gz +0 -0
  39. package/dist/web/assets/file-code-corner-DCQQ8xoR.js +1 -0
  40. package/dist/web/assets/file-code-corner-DCQQ8xoR.js.br +0 -0
  41. package/dist/web/assets/file-code-corner-DCQQ8xoR.js.gz +0 -0
  42. package/dist/web/assets/file-navigation-view-preference-ePb5OplI.js +1 -0
  43. package/dist/web/assets/file-navigation-view-preference-ePb5OplI.js.br +0 -0
  44. package/dist/web/assets/file-navigation-view-preference-ePb5OplI.js.gz +0 -0
  45. package/dist/web/assets/file-pen-line-Ct-6viiE.js +1 -0
  46. package/dist/web/assets/file-pen-line-Ct-6viiE.js.br +0 -0
  47. package/dist/web/assets/file-pen-line-Ct-6viiE.js.gz +0 -0
  48. package/dist/web/assets/file-review-dialog-CE5KTB4O.js +2 -0
  49. package/dist/web/assets/file-review-dialog-CE5KTB4O.js.br +0 -0
  50. package/dist/web/assets/file-review-dialog-CE5KTB4O.js.gz +0 -0
  51. package/dist/web/assets/git-fork-CqXNwC6z.js +1 -0
  52. package/dist/web/assets/git-fork-CqXNwC6z.js.br +2 -0
  53. package/dist/web/assets/git-fork-CqXNwC6z.js.gz +0 -0
  54. package/dist/web/assets/{git-history-panel-D2OdQ1Pg.js → git-history-panel-C4f1X26C.js} +1 -1
  55. package/dist/web/assets/git-history-panel-C4f1X26C.js.br +0 -0
  56. package/dist/web/assets/git-history-panel-C4f1X26C.js.gz +0 -0
  57. package/dist/web/assets/global-settings-about-DEM2NPhz.js +1 -0
  58. package/dist/web/assets/global-settings-about-DEM2NPhz.js.br +0 -0
  59. package/dist/web/assets/global-settings-about-DEM2NPhz.js.gz +0 -0
  60. package/dist/web/assets/global-settings-fields-Bi-Jx6d5.js +1 -0
  61. package/dist/web/assets/global-settings-fields-Bi-Jx6d5.js.br +0 -0
  62. package/dist/web/assets/global-settings-fields-Bi-Jx6d5.js.gz +0 -0
  63. package/dist/web/assets/{global-settings-model-dAGHIcU5.js → global-settings-model-DwpWNpvi.js} +1 -1
  64. package/dist/web/assets/global-settings-model-DwpWNpvi.js.br +0 -0
  65. package/dist/web/assets/global-settings-model-DwpWNpvi.js.gz +0 -0
  66. package/dist/web/assets/global-settings-page-CsEk6ST2.js +2 -0
  67. package/dist/web/assets/global-settings-page-CsEk6ST2.js.br +0 -0
  68. package/dist/web/assets/global-settings-page-CsEk6ST2.js.gz +0 -0
  69. package/dist/web/assets/{global-settings-pets-B6HRYnYq.js → global-settings-pets-QZlIeo6Z.js} +1 -1
  70. package/dist/web/assets/global-settings-pets-QZlIeo6Z.js.br +0 -0
  71. package/dist/web/assets/global-settings-pets-QZlIeo6Z.js.gz +0 -0
  72. package/dist/web/assets/{highlighted-body-OFNGDK62-jfqTT7Zz.js → highlighted-body-OFNGDK62-BxPDtlWp.js} +1 -1
  73. package/dist/web/assets/highlighted-body-OFNGDK62-BxPDtlWp.js.br +0 -0
  74. package/dist/web/assets/highlighted-body-OFNGDK62-BxPDtlWp.js.gz +0 -0
  75. package/dist/web/assets/index-Bqye0xU0.css +2 -0
  76. package/dist/web/assets/index-Bqye0xU0.css.br +0 -0
  77. package/dist/web/assets/index-Bqye0xU0.css.gz +0 -0
  78. package/dist/web/assets/index-v4sEBOkU.js +4 -0
  79. package/dist/web/assets/index-v4sEBOkU.js.br +0 -0
  80. package/dist/web/assets/index-v4sEBOkU.js.gz +0 -0
  81. package/dist/web/assets/info-BSMz7uRW.js +1 -0
  82. package/dist/web/assets/info-BSMz7uRW.js.br +0 -0
  83. package/dist/web/assets/info-BSMz7uRW.js.gz +0 -0
  84. package/dist/web/assets/{initial-deps-DeVnmDFC.js → initial-deps-CA0YnOrW.js} +1 -1
  85. package/dist/web/assets/initial-deps-CA0YnOrW.js.br +0 -0
  86. package/dist/web/assets/initial-deps-CA0YnOrW.js.gz +0 -0
  87. package/dist/web/assets/{initial-deps-DqJTHr9A.js → initial-deps-DKh4Kqow.js} +11 -11
  88. package/dist/web/assets/initial-deps-DKh4Kqow.js.br +0 -0
  89. package/dist/web/assets/{initial-deps-DqJTHr9A.js.gz → initial-deps-DKh4Kqow.js.gz} +0 -0
  90. package/dist/web/assets/{installed-skills-pane-Gzaol8-B.js → installed-skills-pane-BIymfpjl.js} +1 -1
  91. package/dist/web/assets/installed-skills-pane-BIymfpjl.js.br +0 -0
  92. package/dist/web/assets/installed-skills-pane-BIymfpjl.js.gz +0 -0
  93. package/dist/web/assets/{lazy-message-response-CZT51-go.js → lazy-message-response-CkQTXmyE.js} +2 -2
  94. package/dist/web/assets/lazy-message-response-CkQTXmyE.js.br +0 -0
  95. package/dist/web/assets/lazy-message-response-CkQTXmyE.js.gz +0 -0
  96. package/dist/web/assets/{mcp-management-pane-C0g0wk8t.js → mcp-management-pane-CTAt5eCP.js} +1 -1
  97. package/dist/web/assets/mcp-management-pane-CTAt5eCP.js.br +0 -0
  98. package/dist/web/assets/mcp-management-pane-CTAt5eCP.js.gz +0 -0
  99. package/dist/web/assets/mermaid-GHXKKRXX-CYui0uZI.js +1 -0
  100. package/dist/web/assets/mermaid-GHXKKRXX-CYui0uZI.js.br +0 -0
  101. package/dist/web/assets/mermaid-GHXKKRXX-CYui0uZI.js.gz +0 -0
  102. package/dist/web/assets/{message-response-CA2hanqw.js → message-response-BmWeJe7f.js} +2 -2
  103. package/dist/web/assets/message-response-BmWeJe7f.js.br +0 -0
  104. package/dist/web/assets/message-response-BmWeJe7f.js.gz +0 -0
  105. package/dist/web/assets/official-plugins-pane-vm-wO5X8.js +1 -0
  106. package/dist/web/assets/official-plugins-pane-vm-wO5X8.js.br +0 -0
  107. package/dist/web/assets/official-plugins-pane-vm-wO5X8.js.gz +0 -0
  108. package/dist/web/assets/paw-print-dDU9UzMl.js +1 -0
  109. package/dist/web/assets/paw-print-dDU9UzMl.js.br +0 -0
  110. package/dist/web/assets/paw-print-dDU9UzMl.js.gz +0 -0
  111. package/dist/web/assets/{personalization-settings-panel-DnWZEv6V.js → personalization-settings-panel-Cdt-GJKo.js} +1 -1
  112. package/dist/web/assets/personalization-settings-panel-Cdt-GJKo.js.br +0 -0
  113. package/dist/web/assets/personalization-settings-panel-Cdt-GJKo.js.gz +0 -0
  114. package/dist/web/assets/{project-file-popup-page-C8zcwgkf.js → project-file-popup-page-BLp3bOha.js} +1 -1
  115. package/dist/web/assets/project-file-popup-page-BLp3bOha.js.br +0 -0
  116. package/dist/web/assets/project-file-popup-page-BLp3bOha.js.gz +0 -0
  117. package/dist/web/assets/project-source-panel-CxH_R69O.js +3 -0
  118. package/dist/web/assets/project-source-panel-CxH_R69O.js.br +0 -0
  119. package/dist/web/assets/project-source-panel-CxH_R69O.js.gz +0 -0
  120. package/dist/web/assets/{prompt-input-CcovKFMj.js → prompt-input-CFPRtHQa.js} +1 -1
  121. package/dist/web/assets/prompt-input-CFPRtHQa.js.br +0 -0
  122. package/dist/web/assets/prompt-input-CFPRtHQa.js.gz +0 -0
  123. package/dist/web/assets/prompt-input-controls-qBjai56L.js +1 -0
  124. package/dist/web/assets/prompt-input-controls-qBjai56L.js.br +0 -0
  125. package/dist/web/assets/prompt-input-controls-qBjai56L.js.gz +0 -0
  126. package/dist/web/assets/scheduled-task-date-time-picker-ChB1QMq4.js +1 -0
  127. package/dist/web/assets/scheduled-task-date-time-picker-ChB1QMq4.js.br +0 -0
  128. package/dist/web/assets/scheduled-task-date-time-picker-ChB1QMq4.js.gz +0 -0
  129. package/dist/web/assets/{scheduled-task-schedule-f0nylWUa.js → scheduled-task-schedule-C1OLCa3o.js} +1 -1
  130. package/dist/web/assets/scheduled-task-schedule-C1OLCa3o.js.br +0 -0
  131. package/dist/web/assets/scheduled-task-schedule-C1OLCa3o.js.gz +0 -0
  132. package/dist/web/assets/{scheduled-tasks-container-DxM30EEY.js → scheduled-tasks-container-CoiL1t1E.js} +2 -2
  133. package/dist/web/assets/scheduled-tasks-container-CoiL1t1E.js.br +0 -0
  134. package/dist/web/assets/scheduled-tasks-container-CoiL1t1E.js.gz +0 -0
  135. package/dist/web/assets/{settings-personalization-CPFvvwt7.js → settings-personalization-C02xFFt3.js} +1 -1
  136. package/dist/web/assets/settings-personalization-C02xFFt3.js.br +0 -0
  137. package/dist/web/assets/settings-personalization-C02xFFt3.js.gz +0 -0
  138. package/dist/web/assets/{sheet-Co357cup.js → sheet-7wHRYO_r.js} +1 -1
  139. package/dist/web/assets/sheet-7wHRYO_r.js.br +0 -0
  140. package/dist/web/assets/sheet-7wHRYO_r.js.gz +0 -0
  141. package/dist/web/assets/skills-market-container-DV3Z3dho.js +2 -0
  142. package/dist/web/assets/skills-market-container-DV3Z3dho.js.br +0 -0
  143. package/dist/web/assets/skills-market-container-DV3Z3dho.js.gz +0 -0
  144. package/dist/web/assets/sliders-horizontal-9U3YhJ-G.js +1 -0
  145. package/dist/web/assets/sliders-horizontal-9U3YhJ-G.js.br +0 -0
  146. package/dist/web/assets/sliders-horizontal-9U3YhJ-G.js.gz +0 -0
  147. package/dist/web/assets/sparkles-R_aBU9Dh.js +1 -0
  148. package/dist/web/assets/sparkles-R_aBU9Dh.js.br +2 -0
  149. package/dist/web/assets/sparkles-R_aBU9Dh.js.gz +0 -0
  150. package/dist/web/assets/third-party-marketplace-pane-DgdNcV-f.js +1 -0
  151. package/dist/web/assets/third-party-marketplace-pane-DgdNcV-f.js.br +0 -0
  152. package/dist/web/assets/third-party-marketplace-pane-DgdNcV-f.js.gz +0 -0
  153. package/dist/web/assets/upload-B6cPQ82X.js +1 -0
  154. package/dist/web/assets/upload-B6cPQ82X.js.br +0 -0
  155. package/dist/web/assets/upload-B6cPQ82X.js.gz +0 -0
  156. package/dist/web/assets/workbench-composer-BuHnGjEu.js +8 -0
  157. package/dist/web/assets/workbench-composer-BuHnGjEu.js.br +0 -0
  158. package/dist/web/assets/workbench-composer-BuHnGjEu.js.gz +0 -0
  159. package/dist/web/assets/workbench-inspector-changes-DAUq5vRm.js +2 -0
  160. package/dist/web/assets/workbench-inspector-changes-DAUq5vRm.js.br +0 -0
  161. package/dist/web/assets/workbench-inspector-changes-DAUq5vRm.js.gz +0 -0
  162. package/dist/web/assets/{workbench-pet-canvas-C5NL9nOc.js → workbench-pet-canvas-Bf6038yN.js} +1 -1
  163. package/dist/web/assets/workbench-pet-canvas-Bf6038yN.js.br +0 -0
  164. package/dist/web/assets/workbench-pet-canvas-Bf6038yN.js.gz +0 -0
  165. package/dist/web/assets/workbench-shell-C1Vo7pWC.js +8 -0
  166. package/dist/web/assets/workbench-shell-C1Vo7pWC.js.br +0 -0
  167. package/dist/web/assets/workbench-shell-C1Vo7pWC.js.gz +0 -0
  168. package/dist/web/index.html +4 -4
  169. package/dist/web/index.html.br +0 -0
  170. package/dist/web/index.html.gz +0 -0
  171. package/package.json +1 -1
  172. package/dist/web/assets/agent-settings-panel-B3hoqvYI.js.br +0 -0
  173. package/dist/web/assets/agent-settings-panel-B3hoqvYI.js.gz +0 -0
  174. package/dist/web/assets/background-image-picker-DV18Olkx.js +0 -1
  175. package/dist/web/assets/background-image-picker-DV18Olkx.js.br +0 -0
  176. package/dist/web/assets/background-image-picker-DV18Olkx.js.gz +0 -0
  177. package/dist/web/assets/bing-wallpaper-queries-CybCDdtr.js.br +0 -0
  178. package/dist/web/assets/bing-wallpaper-queries-CybCDdtr.js.gz +0 -0
  179. package/dist/web/assets/bot-nsMcDaYk.js +0 -1
  180. package/dist/web/assets/bot-nsMcDaYk.js.br +0 -0
  181. package/dist/web/assets/bot-nsMcDaYk.js.gz +0 -0
  182. package/dist/web/assets/button-group-DLm5MGrs.js.br +0 -0
  183. package/dist/web/assets/button-group-DLm5MGrs.js.gz +0 -0
  184. package/dist/web/assets/chunk-BO2N2NFS-CiutqNGv.js.br +0 -0
  185. package/dist/web/assets/chunk-BO2N2NFS-CiutqNGv.js.gz +0 -0
  186. package/dist/web/assets/commit-settings-panel-RS1ax2vB.js.br +0 -0
  187. package/dist/web/assets/commit-settings-panel-RS1ax2vB.js.gz +0 -0
  188. package/dist/web/assets/context-menu-DP6ii80r.js.br +0 -0
  189. package/dist/web/assets/context-menu-DP6ii80r.js.gz +0 -0
  190. package/dist/web/assets/dist-ClwyqJQu.js.br +0 -0
  191. package/dist/web/assets/dist-ClwyqJQu.js.gz +0 -0
  192. package/dist/web/assets/download-iHkzQYEd.js +0 -1
  193. package/dist/web/assets/download-iHkzQYEd.js.br +0 -0
  194. package/dist/web/assets/download-iHkzQYEd.js.gz +0 -0
  195. package/dist/web/assets/external-link-xbPJFZkP.js +0 -1
  196. package/dist/web/assets/external-link-xbPJFZkP.js.br +0 -0
  197. package/dist/web/assets/external-link-xbPJFZkP.js.gz +0 -0
  198. package/dist/web/assets/file-code-corner-CYF-BidF.js +0 -1
  199. package/dist/web/assets/file-code-corner-CYF-BidF.js.br +0 -0
  200. package/dist/web/assets/file-code-corner-CYF-BidF.js.gz +0 -0
  201. package/dist/web/assets/file-navigation-view-preference-BRWa_l_a.js +0 -1
  202. package/dist/web/assets/file-navigation-view-preference-BRWa_l_a.js.br +0 -0
  203. package/dist/web/assets/file-navigation-view-preference-BRWa_l_a.js.gz +0 -0
  204. package/dist/web/assets/file-pen-line-B05lVjWh.js +0 -1
  205. package/dist/web/assets/file-pen-line-B05lVjWh.js.br +0 -0
  206. package/dist/web/assets/file-pen-line-B05lVjWh.js.gz +0 -0
  207. package/dist/web/assets/file-review-dialog-C3to4N_J.js +0 -2
  208. package/dist/web/assets/file-review-dialog-C3to4N_J.js.br +0 -0
  209. package/dist/web/assets/file-review-dialog-C3to4N_J.js.gz +0 -0
  210. package/dist/web/assets/git-fork-D0BPqh18.js +0 -1
  211. package/dist/web/assets/git-fork-D0BPqh18.js.br +0 -2
  212. package/dist/web/assets/git-fork-D0BPqh18.js.gz +0 -0
  213. package/dist/web/assets/git-history-panel-D2OdQ1Pg.js.br +0 -0
  214. package/dist/web/assets/git-history-panel-D2OdQ1Pg.js.gz +0 -0
  215. package/dist/web/assets/global-settings-about-DYd77AOa.js +0 -1
  216. package/dist/web/assets/global-settings-about-DYd77AOa.js.br +0 -0
  217. package/dist/web/assets/global-settings-about-DYd77AOa.js.gz +0 -0
  218. package/dist/web/assets/global-settings-fields-C0IfL3RQ.js +0 -1
  219. package/dist/web/assets/global-settings-fields-C0IfL3RQ.js.br +0 -0
  220. package/dist/web/assets/global-settings-fields-C0IfL3RQ.js.gz +0 -0
  221. package/dist/web/assets/global-settings-model-dAGHIcU5.js.br +0 -0
  222. package/dist/web/assets/global-settings-model-dAGHIcU5.js.gz +0 -0
  223. package/dist/web/assets/global-settings-page-746-HK5D.js +0 -2
  224. package/dist/web/assets/global-settings-page-746-HK5D.js.br +0 -0
  225. package/dist/web/assets/global-settings-page-746-HK5D.js.gz +0 -0
  226. package/dist/web/assets/global-settings-pets-B6HRYnYq.js.br +0 -0
  227. package/dist/web/assets/global-settings-pets-B6HRYnYq.js.gz +0 -0
  228. package/dist/web/assets/highlighted-body-OFNGDK62-jfqTT7Zz.js.br +0 -0
  229. package/dist/web/assets/highlighted-body-OFNGDK62-jfqTT7Zz.js.gz +0 -0
  230. package/dist/web/assets/index-DGp-a5pq.css +0 -2
  231. package/dist/web/assets/index-DGp-a5pq.css.br +0 -0
  232. package/dist/web/assets/index-DGp-a5pq.css.gz +0 -0
  233. package/dist/web/assets/index-DwEl9mCY.js +0 -4
  234. package/dist/web/assets/index-DwEl9mCY.js.br +0 -0
  235. package/dist/web/assets/index-DwEl9mCY.js.gz +0 -0
  236. package/dist/web/assets/info-whxTXvIJ.js +0 -1
  237. package/dist/web/assets/info-whxTXvIJ.js.br +0 -0
  238. package/dist/web/assets/info-whxTXvIJ.js.gz +0 -0
  239. package/dist/web/assets/initial-deps-DeVnmDFC.js.br +0 -0
  240. package/dist/web/assets/initial-deps-DeVnmDFC.js.gz +0 -0
  241. package/dist/web/assets/initial-deps-DqJTHr9A.js.br +0 -0
  242. package/dist/web/assets/installed-skills-pane-Gzaol8-B.js.br +0 -0
  243. package/dist/web/assets/installed-skills-pane-Gzaol8-B.js.gz +0 -0
  244. package/dist/web/assets/lazy-message-response-CZT51-go.js.br +0 -0
  245. package/dist/web/assets/lazy-message-response-CZT51-go.js.gz +0 -0
  246. package/dist/web/assets/mcp-management-pane-C0g0wk8t.js.br +0 -0
  247. package/dist/web/assets/mcp-management-pane-C0g0wk8t.js.gz +0 -0
  248. package/dist/web/assets/mermaid-GHXKKRXX-BNLLThfI.js +0 -1
  249. package/dist/web/assets/mermaid-GHXKKRXX-BNLLThfI.js.br +0 -0
  250. package/dist/web/assets/mermaid-GHXKKRXX-BNLLThfI.js.gz +0 -0
  251. package/dist/web/assets/message-response-CA2hanqw.js.br +0 -0
  252. package/dist/web/assets/message-response-CA2hanqw.js.gz +0 -0
  253. package/dist/web/assets/official-plugins-pane-D6kbUBEm.js +0 -1
  254. package/dist/web/assets/official-plugins-pane-D6kbUBEm.js.br +0 -0
  255. package/dist/web/assets/official-plugins-pane-D6kbUBEm.js.gz +0 -0
  256. package/dist/web/assets/paw-print-9SfXKttW.js +0 -1
  257. package/dist/web/assets/paw-print-9SfXKttW.js.br +0 -0
  258. package/dist/web/assets/paw-print-9SfXKttW.js.gz +0 -0
  259. package/dist/web/assets/personalization-settings-panel-DnWZEv6V.js.br +0 -0
  260. package/dist/web/assets/personalization-settings-panel-DnWZEv6V.js.gz +0 -0
  261. package/dist/web/assets/project-file-popup-page-C8zcwgkf.js.br +0 -0
  262. package/dist/web/assets/project-file-popup-page-C8zcwgkf.js.gz +0 -0
  263. package/dist/web/assets/project-source-panel-ChVlP72p.js +0 -3
  264. package/dist/web/assets/project-source-panel-ChVlP72p.js.br +0 -0
  265. package/dist/web/assets/project-source-panel-ChVlP72p.js.gz +0 -0
  266. package/dist/web/assets/prompt-input-CcovKFMj.js.br +0 -0
  267. package/dist/web/assets/prompt-input-CcovKFMj.js.gz +0 -0
  268. package/dist/web/assets/prompt-input-controls-j_r9SnuL.js +0 -1
  269. package/dist/web/assets/prompt-input-controls-j_r9SnuL.js.br +0 -0
  270. package/dist/web/assets/prompt-input-controls-j_r9SnuL.js.gz +0 -0
  271. package/dist/web/assets/scheduled-task-date-time-picker-CkLwYwGu.js +0 -1
  272. package/dist/web/assets/scheduled-task-date-time-picker-CkLwYwGu.js.br +0 -0
  273. package/dist/web/assets/scheduled-task-date-time-picker-CkLwYwGu.js.gz +0 -0
  274. package/dist/web/assets/scheduled-task-schedule-f0nylWUa.js.br +0 -0
  275. package/dist/web/assets/scheduled-task-schedule-f0nylWUa.js.gz +0 -0
  276. package/dist/web/assets/scheduled-tasks-container-DxM30EEY.js.br +0 -0
  277. package/dist/web/assets/scheduled-tasks-container-DxM30EEY.js.gz +0 -0
  278. package/dist/web/assets/settings-personalization-CPFvvwt7.js.br +0 -0
  279. package/dist/web/assets/settings-personalization-CPFvvwt7.js.gz +0 -0
  280. package/dist/web/assets/sheet-Co357cup.js.br +0 -0
  281. package/dist/web/assets/sheet-Co357cup.js.gz +0 -0
  282. package/dist/web/assets/skills-market-container-CJ8k5fIO.js +0 -2
  283. package/dist/web/assets/skills-market-container-CJ8k5fIO.js.br +0 -0
  284. package/dist/web/assets/skills-market-container-CJ8k5fIO.js.gz +0 -0
  285. package/dist/web/assets/sliders-horizontal-DfoeSLtp.js +0 -1
  286. package/dist/web/assets/sliders-horizontal-DfoeSLtp.js.br +0 -0
  287. package/dist/web/assets/sliders-horizontal-DfoeSLtp.js.gz +0 -0
  288. package/dist/web/assets/sparkles-BLY9rqMO.js +0 -1
  289. package/dist/web/assets/sparkles-BLY9rqMO.js.br +0 -0
  290. package/dist/web/assets/sparkles-BLY9rqMO.js.gz +0 -0
  291. package/dist/web/assets/third-party-marketplace-pane-BrosEBTn.js +0 -1
  292. package/dist/web/assets/third-party-marketplace-pane-BrosEBTn.js.br +0 -0
  293. package/dist/web/assets/third-party-marketplace-pane-BrosEBTn.js.gz +0 -0
  294. package/dist/web/assets/upload-D_8Uk8f-.js +0 -1
  295. package/dist/web/assets/upload-D_8Uk8f-.js.br +0 -0
  296. package/dist/web/assets/upload-D_8Uk8f-.js.gz +0 -0
  297. package/dist/web/assets/workbench-composer-CxDyu4IJ.js +0 -8
  298. package/dist/web/assets/workbench-composer-CxDyu4IJ.js.br +0 -0
  299. package/dist/web/assets/workbench-composer-CxDyu4IJ.js.gz +0 -0
  300. package/dist/web/assets/workbench-inspector-changes-DXrYXxmV.js +0 -2
  301. package/dist/web/assets/workbench-inspector-changes-DXrYXxmV.js.br +0 -0
  302. package/dist/web/assets/workbench-inspector-changes-DXrYXxmV.js.gz +0 -0
  303. package/dist/web/assets/workbench-pet-canvas-C5NL9nOc.js.br +0 -0
  304. package/dist/web/assets/workbench-pet-canvas-C5NL9nOc.js.gz +0 -0
  305. package/dist/web/assets/workbench-shell-C3Zu4F9x.js +0 -8
  306. package/dist/web/assets/workbench-shell-C3Zu4F9x.js.br +0 -0
  307. package/dist/web/assets/workbench-shell-C3Zu4F9x.js.gz +0 -0
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r,o as i,r as a}from"./initial-deps-CTprc_pY.js";import{A as o,K as s,_ as c,nt as l}from"./initial-deps-DqJTHr9A.js";import{n as u,t as d}from"./dist-ClwyqJQu.js";import{It as f,_t as p}from"./index-DwEl9mCY.js";var m=e(t(),1),h=n();function g({onOpen:e,onToggle:t,pending:n,skill:r}){let{t:i}=l(`workbench`);return(0,h.jsxs)(`li`,{className:`skills-installed-row`,children:[(0,h.jsxs)(`button`,{"aria-label":i(`skillsMarket.openSkill`,{name:r.displayName}),className:`skills-installed-row__open`,onClick:()=>{e(r)},type:`button`,children:[(0,h.jsx)(`span`,{"aria-hidden":`true`,className:`skills-market-glyph`,"data-tone":`skills`,children:(0,h.jsx)(s,{})}),(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`strong`,{className:`block truncate text-body-small`,children:r.displayName}),(0,h.jsx)(`span`,{className:`block truncate text-label text-muted-foreground`,title:r.path,children:r.description||r.path})]}),(0,h.jsx)(o,{"aria-hidden":`true`,className:`skills-installed-row__folder`})]}),(0,h.jsx)(d,{"aria-label":i(`skillsMarket.toggle`,{name:r.displayName}),checked:r.enabled,className:`skills-switch`,disabled:n,onCheckedChange:()=>{t(r)},children:(0,h.jsx)(u,{className:`skills-switch__thumb`})})]})}function _(){let{t:e}=l(`workbench`),{client:t,projects:n}=f(),o=r(),s=i({queryFn:()=>t.listInstalledSkills(),queryKey:[`extensions`,`skills`]}),u=a({mutationFn:e=>t.setSkillEnabled(e.path,!e.enabled),onSuccess:e=>o.setQueryData([`extensions`,`skills`],e.installedSkills)}),d=a({meta:{actionNotification:{successMessage:!1}},mutationFn:e=>t.openSkillDirectory(e)}),_=(0,m.useMemo)(()=>{let t=new Map;t.set(`system`,{id:`system`,skills:[],title:e(`skillsMarket.scope.system`)}),t.set(`user`,{id:`user`,skills:[],title:e(`skillsMarket.scope.user`)});for(let e of n)t.set(e.id,{id:e.id,skills:[],title:e.name});t.set(`repo`,{id:`repo`,skills:[],title:e(`skillsMarket.scope.repo`)});for(let e of s.data?.data??[])e.scope===`system`||e.scope===`admin`?t.get(`system`)?.skills.push(e):e.scope===`user`?t.get(`user`)?.skills.push(e):t.get(e.projectId??`repo`)?.skills.push(e);return[...t.values()].filter(e=>e.skills.length>0)},[s.data,n,e]);return(0,h.jsxs)(`div`,{className:`skills-market-pane`,role:`tabpanel`,children:[(0,h.jsxs)(`div`,{className:`skills-market-toolbar`,children:[(0,h.jsx)(`span`,{className:`text-body-small text-muted-foreground`,children:e(`skillsMarket.installedCount`,{count:s.data?.data.length??0})}),(0,h.jsx)(p,{"aria-label":e(`skillsMarket.refresh`),disabled:s.isFetching,onClick:()=>void s.refetch(),size:`icon-sm`,title:e(`skillsMarket.refresh`),type:`button`,variant:`ghost`,children:(0,h.jsx)(c,{"aria-hidden":`true`,className:s.isFetching?`animate-spin`:``})})]}),s.isPending?(0,h.jsx)(`div`,{className:`skills-market-state`,role:`status`,children:e(`skillsMarket.loading`)}):s.error===null?_.length===0?(0,h.jsx)(`div`,{className:`skills-market-state`,children:e(`skillsMarket.emptyInstalled`)}):(0,h.jsx)(`div`,{className:`skills-installed-groups`,children:_.map(e=>(0,h.jsxs)(`section`,{className:`skills-installed-group`,children:[(0,h.jsxs)(`header`,{children:[(0,h.jsx)(`h3`,{children:e.title}),(0,h.jsx)(`span`,{children:e.skills.length})]}),(0,h.jsx)(`ul`,{children:e.skills.map(e=>(0,h.jsx)(g,{onOpen:e=>{d.mutate(e.path)},onToggle:e=>{u.mutate(e)},pending:u.isPending&&u.variables.id===e.id,skill:e},e.id))})]},e.id))}):(0,h.jsx)(`div`,{className:`skills-market-state`,role:`alert`,children:e(`skillsMarket.loadError`)})]})}export{_ as InstalledSkillsPane};
1
+ import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r,o as i,r as a}from"./initial-deps-CTprc_pY.js";import{A as o,J as s,_ as c,it as l}from"./initial-deps-DKh4Kqow.js";import{n as u,t as d}from"./dist-B4No2uWB.js";import{It as f,_t as p}from"./index-v4sEBOkU.js";var m=e(t(),1),h=n();function g({onOpen:e,onToggle:t,pending:n,skill:r}){let{t:i}=l(`workbench`);return(0,h.jsxs)(`li`,{className:`skills-installed-row`,children:[(0,h.jsxs)(`button`,{"aria-label":i(`skillsMarket.openSkill`,{name:r.displayName}),className:`skills-installed-row__open`,onClick:()=>{e(r)},type:`button`,children:[(0,h.jsx)(`span`,{"aria-hidden":`true`,className:`skills-market-glyph`,"data-tone":`skills`,children:(0,h.jsx)(s,{})}),(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`strong`,{className:`block truncate text-body-small`,children:r.displayName}),(0,h.jsx)(`span`,{className:`block truncate text-label text-muted-foreground`,title:r.path,children:r.description||r.path})]}),(0,h.jsx)(o,{"aria-hidden":`true`,className:`skills-installed-row__folder`})]}),(0,h.jsx)(d,{"aria-label":i(`skillsMarket.toggle`,{name:r.displayName}),checked:r.enabled,className:`skills-switch`,disabled:n,onCheckedChange:()=>{t(r)},children:(0,h.jsx)(u,{className:`skills-switch__thumb`})})]})}function _(){let{t:e}=l(`workbench`),{client:t,projects:n}=f(),o=r(),s=i({queryFn:()=>t.listInstalledSkills(),queryKey:[`extensions`,`skills`]}),u=a({mutationFn:e=>t.setSkillEnabled(e.path,!e.enabled),onSuccess:e=>o.setQueryData([`extensions`,`skills`],e.installedSkills)}),d=a({meta:{actionNotification:{successMessage:!1}},mutationFn:e=>t.openSkillDirectory(e)}),_=(0,m.useMemo)(()=>{let t=new Map;t.set(`system`,{id:`system`,skills:[],title:e(`skillsMarket.scope.system`)}),t.set(`user`,{id:`user`,skills:[],title:e(`skillsMarket.scope.user`)});for(let e of n)t.set(e.id,{id:e.id,skills:[],title:e.name});t.set(`repo`,{id:`repo`,skills:[],title:e(`skillsMarket.scope.repo`)});for(let e of s.data?.data??[])e.scope===`system`||e.scope===`admin`?t.get(`system`)?.skills.push(e):e.scope===`user`?t.get(`user`)?.skills.push(e):t.get(e.projectId??`repo`)?.skills.push(e);return[...t.values()].filter(e=>e.skills.length>0)},[s.data,n,e]);return(0,h.jsxs)(`div`,{className:`skills-market-pane`,role:`tabpanel`,children:[(0,h.jsxs)(`div`,{className:`skills-market-toolbar`,children:[(0,h.jsx)(`span`,{className:`text-body-small text-muted-foreground`,children:e(`skillsMarket.installedCount`,{count:s.data?.data.length??0})}),(0,h.jsx)(p,{"aria-label":e(`skillsMarket.refresh`),disabled:s.isFetching,onClick:()=>void s.refetch(),size:`icon-sm`,title:e(`skillsMarket.refresh`),type:`button`,variant:`ghost`,children:(0,h.jsx)(c,{"aria-hidden":`true`,className:s.isFetching?`animate-spin`:``})})]}),s.isPending?(0,h.jsx)(`div`,{className:`skills-market-state`,role:`status`,children:e(`skillsMarket.loading`)}):s.error===null?_.length===0?(0,h.jsx)(`div`,{className:`skills-market-state`,children:e(`skillsMarket.emptyInstalled`)}):(0,h.jsx)(`div`,{className:`skills-installed-groups`,children:_.map(e=>(0,h.jsxs)(`section`,{className:`skills-installed-group`,children:[(0,h.jsxs)(`header`,{children:[(0,h.jsx)(`h3`,{children:e.title}),(0,h.jsx)(`span`,{children:e.skills.length})]}),(0,h.jsx)(`ul`,{children:e.skills.map(e=>(0,h.jsx)(g,{onOpen:e=>{d.mutate(e.path)},onToggle:e=>{u.mutate(e)},pending:u.isPending&&u.variables.id===e.id,skill:e},e.id))})]},e.id))}):(0,h.jsx)(`div`,{className:`skills-market-state`,role:`alert`,children:e(`skillsMarket.loadError`)})]})}export{_ as InstalledSkillsPane};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/message-response-CA2hanqw.js","assets/rolldown-runtime-CNC7AqOf.js","assets/react-runtime-DaCTDC27.js","assets/initial-deps-DqJTHr9A.js","assets/initial-deps-BsEyuMB0.js","assets/external-link-xbPJFZkP.js","assets/context-menu-DP6ii80r.js","assets/initial-deps-DeVnmDFC.js","assets/scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~project-file-p~egzauog4-DAfditVv.js","assets/index-DwEl9mCY.js","assets/initial-deps-Bx4af_YG.js","assets/initial-deps-CTprc_pY.js","assets/initial-deps-CNK9MBOP.js","assets/initial-deps-Cq4pSOi-.js","assets/initial-deps-Bk3GSWTk.js","assets/index-DGp-a5pq.css","assets/chunk-BO2N2NFS-CiutqNGv.js","assets/lib-DE0ZEvGM.js","assets/prompt-reference-token-Cxx6C-IR.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{t}from"./initial-deps-Bx4af_YG.js";import{i as n,t as r}from"./react-runtime-DaCTDC27.js";var i=e(n(),1),a=r();function o(){return t(()=>import(`./message-response-CA2hanqw.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))}var s=(0,i.lazy)(o);function c({children:e=``,className:t=``,...n}){return(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(`div`,{className:`size-full whitespace-pre-wrap break-words ${t}`,children:(0,a.jsx)(`p`,{children:e})}),children:(0,a.jsx)(s,{className:t,...n,children:e})})}export{c as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/message-response-BmWeJe7f.js","assets/rolldown-runtime-CNC7AqOf.js","assets/react-runtime-DaCTDC27.js","assets/initial-deps-DKh4Kqow.js","assets/initial-deps-BsEyuMB0.js","assets/external-link-BHe2GLz2.js","assets/context-menu-DA8sXAc3.js","assets/initial-deps-CA0YnOrW.js","assets/scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~project-file-p~egzauog4-DAfditVv.js","assets/index-v4sEBOkU.js","assets/initial-deps-Bx4af_YG.js","assets/initial-deps-CTprc_pY.js","assets/initial-deps-CNK9MBOP.js","assets/initial-deps-Cq4pSOi-.js","assets/initial-deps-Bk3GSWTk.js","assets/index-Bqye0xU0.css","assets/chunk-BO2N2NFS-DauaBPLH.js","assets/lib-DE0ZEvGM.js","assets/prompt-reference-token-Cxx6C-IR.js"])))=>i.map(i=>d[i]);
2
+ import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{t}from"./initial-deps-Bx4af_YG.js";import{i as n,t as r}from"./react-runtime-DaCTDC27.js";var i=e(n(),1),a=r();function o(){return t(()=>import(`./message-response-BmWeJe7f.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))}var s=(0,i.lazy)(o);function c({children:e=``,className:t=``,...n}){return(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(`div`,{className:`size-full whitespace-pre-wrap break-words ${t}`,children:(0,a.jsx)(`p`,{children:e})}),children:(0,a.jsx)(s,{className:t,...n,children:e})})}export{c as t};
@@ -1 +1 @@
1
- import{t as e}from"./react-runtime-DaCTDC27.js";import{l as t,o as n,r}from"./initial-deps-CTprc_pY.js";import{_ as i,f as a,nt as o}from"./initial-deps-DqJTHr9A.js";import{n as s,t as c}from"./dist-ClwyqJQu.js";import{It as l,_t as u}from"./index-DwEl9mCY.js";var d=e();function f(){let{t:e}=o(`workbench`),{client:f}=l(),p=t(),m=n({queryFn:()=>f.listConfiguredMcpServers(),queryKey:[`extensions`,`mcp`]}),h=r({mutationFn:e=>f.setMcpServerEnabled(e.name,!e.enabled),onSuccess:e=>p.setQueryData([`extensions`,`mcp`],e.servers)});return(0,d.jsxs)(`div`,{className:`skills-market-pane`,role:`tabpanel`,children:[(0,d.jsxs)(`div`,{className:`skills-market-toolbar`,children:[(0,d.jsx)(`span`,{className:`text-body-small text-muted-foreground`,children:e(`skillsMarket.mcpCount`,{count:m.data?.data.length??0})}),(0,d.jsx)(u,{"aria-label":e(`skillsMarket.refreshMcp`),disabled:m.isFetching,onClick:()=>void m.refetch(),size:`icon-sm`,title:e(`skillsMarket.refreshMcp`),type:`button`,variant:`ghost`,children:(0,d.jsx)(i,{"aria-hidden":`true`,className:m.isFetching?`animate-spin`:``})})]}),m.isPending?(0,d.jsx)(`div`,{className:`skills-market-state`,role:`status`,children:e(`skillsMarket.loadingMcp`)}):m.error===null?m.data.data.length===0?(0,d.jsx)(`div`,{className:`skills-market-state`,children:e(`skillsMarket.emptyMcp`)}):(0,d.jsxs)(`section`,{className:`skills-installed-group`,children:[(0,d.jsxs)(`header`,{children:[(0,d.jsx)(`h3`,{children:`MCP`}),(0,d.jsx)(`span`,{children:m.data.data.length})]}),(0,d.jsx)(`ul`,{children:m.data.data.map(t=>(0,d.jsxs)(`li`,{className:`skills-installed-row`,children:[(0,d.jsxs)(`span`,{className:`skills-mcp-row__content`,children:[(0,d.jsx)(`span`,{"aria-hidden":`true`,className:`skills-market-glyph`,"data-tone":`mcp`,children:(0,d.jsx)(a,{})}),(0,d.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,d.jsx)(`strong`,{className:`block truncate text-body-small`,children:t.name}),(0,d.jsx)(`span`,{className:`skills-mcp-status`,"data-enabled":t.enabled,children:e(t.enabled?`skillsMarket.mcpEnabled`:`skillsMarket.mcpStopped`)})]})]}),(0,d.jsx)(c,{"aria-label":e(`skillsMarket.toggleMcp`,{name:t.name}),checked:t.enabled,className:`skills-switch`,disabled:h.isPending&&h.variables.name===t.name,onCheckedChange:()=>{h.mutate(t)},children:(0,d.jsx)(s,{className:`skills-switch__thumb`})})]},t.name))})]}):(0,d.jsx)(`div`,{className:`skills-market-state`,role:`alert`,children:e(`skillsMarket.mcpError`)})]})}export{f as McpManagementPane};
1
+ import{t as e}from"./react-runtime-DaCTDC27.js";import{l as t,o as n,r}from"./initial-deps-CTprc_pY.js";import{_ as i,f as a,it as o}from"./initial-deps-DKh4Kqow.js";import{n as s,t as c}from"./dist-B4No2uWB.js";import{It as l,_t as u}from"./index-v4sEBOkU.js";var d=e();function f(){let{t:e}=o(`workbench`),{client:f}=l(),p=t(),m=n({queryFn:()=>f.listConfiguredMcpServers(),queryKey:[`extensions`,`mcp`]}),h=r({mutationFn:e=>f.setMcpServerEnabled(e.name,!e.enabled),onSuccess:e=>p.setQueryData([`extensions`,`mcp`],e.servers)});return(0,d.jsxs)(`div`,{className:`skills-market-pane`,role:`tabpanel`,children:[(0,d.jsxs)(`div`,{className:`skills-market-toolbar`,children:[(0,d.jsx)(`span`,{className:`text-body-small text-muted-foreground`,children:e(`skillsMarket.mcpCount`,{count:m.data?.data.length??0})}),(0,d.jsx)(u,{"aria-label":e(`skillsMarket.refreshMcp`),disabled:m.isFetching,onClick:()=>void m.refetch(),size:`icon-sm`,title:e(`skillsMarket.refreshMcp`),type:`button`,variant:`ghost`,children:(0,d.jsx)(i,{"aria-hidden":`true`,className:m.isFetching?`animate-spin`:``})})]}),m.isPending?(0,d.jsx)(`div`,{className:`skills-market-state`,role:`status`,children:e(`skillsMarket.loadingMcp`)}):m.error===null?m.data.data.length===0?(0,d.jsx)(`div`,{className:`skills-market-state`,children:e(`skillsMarket.emptyMcp`)}):(0,d.jsxs)(`section`,{className:`skills-installed-group`,children:[(0,d.jsxs)(`header`,{children:[(0,d.jsx)(`h3`,{children:`MCP`}),(0,d.jsx)(`span`,{children:m.data.data.length})]}),(0,d.jsx)(`ul`,{children:m.data.data.map(t=>(0,d.jsxs)(`li`,{className:`skills-installed-row`,children:[(0,d.jsxs)(`span`,{className:`skills-mcp-row__content`,children:[(0,d.jsx)(`span`,{"aria-hidden":`true`,className:`skills-market-glyph`,"data-tone":`mcp`,children:(0,d.jsx)(a,{})}),(0,d.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,d.jsx)(`strong`,{className:`block truncate text-body-small`,children:t.name}),(0,d.jsx)(`span`,{className:`skills-mcp-status`,"data-enabled":t.enabled,children:e(t.enabled?`skillsMarket.mcpEnabled`:`skillsMarket.mcpStopped`)})]})]}),(0,d.jsx)(c,{"aria-label":e(`skillsMarket.toggleMcp`,{name:t.name}),checked:t.enabled,className:`skills-switch`,disabled:h.isPending&&h.variables.name===t.name,onCheckedChange:()=>{h.mutate(t)},children:(0,d.jsx)(s,{className:`skills-switch__thumb`})})]},t.name))})]}):(0,d.jsx)(`div`,{className:`skills-market-state`,role:`alert`,children:e(`skillsMarket.mcpError`)})]})}export{f as McpManagementPane};
@@ -0,0 +1 @@
1
+ import{c as e}from"./chunk-BO2N2NFS-DauaBPLH.js";export{e as Mermaid};
@@ -1,7 +1,7 @@
1
- import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,r as n,t as r}from"./react-runtime-DaCTDC27.js";import{C as i,j as a,nt as o}from"./initial-deps-DqJTHr9A.js";import{t as s}from"./external-link-xbPJFZkP.js";import{c,n as l,r as u,t as d}from"./context-menu-DP6ii80r.js";import{_t as f}from"./index-DwEl9mCY.js";import{a as p,i as m,n as h,o as g,s as _}from"./chunk-BO2N2NFS-CiutqNGv.js";import{t as ee}from"./prompt-reference-token-Cxx6C-IR.js";var v=e(t(),1),te=e(n(),1),y=r(),b=/^::code-comment\{(.*)\}\s*$/,x=/([a-z]+)=(?:"((?:\\.|[^"\\])*)"|(\d+))/g,S=[`/apps/`,`/packages/`,`/src/`,`/tests/`,`/.superwork/`],C=8,w=12;function ne(e){try{return JSON.parse(`"${e}"`)}catch{return e}}function T(e){let t=new Map;for(let n of e.matchAll(x)){let e=n[1],r=n[2],i=n[3];e!==void 0&&t.set(e,r===void 0?i??``:ne(r))}let n=t.get(`body`),r=t.get(`file`),i=t.get(`title`);if(n===void 0||r===void 0||i===void 0)return null;let a=e=>{let n=t.get(e);return n===void 0?null:Number.parseInt(n,10)};return{body:n,end:a(`end`),file:r,priority:a(`priority`),start:a(`start`),title:i}}function E(e){let t=b.exec(e)?.[1];return t===void 0?null:T(t)}function D(e){for(let t of S){let n=e.indexOf(t);if(n>=0)return e.slice(n+1)}return e.split(/[\\/]/).at(-1)??e}function O(e){let t=D(e.file);return e.start===null?t:`${t}:${e.end===null||e.end===e.start?String(e.start):`${String(e.start)}-${String(e.end)}`}`}function k(e){return e.replace(/^\[P\d+\]\s*/,``)}function A({comment:e,commentIndex:t}){let n=(0,v.useRef)(null),r=(0,v.useRef)(null),i=(0,v.useId)(),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(),l=k(e.title),u=O(e),d=(0,v.useCallback)(()=>{let e=n.current,t=r.current;if(e===null||t===null)return;let i=e.getBoundingClientRect(),a=t.getBoundingClientRect(),o=Math.max(w,window.innerWidth-a.width-w),s=Math.min(Math.max(i.left,w),o),l=i.bottom+C+a.height<=window.innerHeight-w?i.bottom+C:i.top-a.height-C,u=Math.max(w,window.innerHeight-a.height-w);c({left:s,top:Math.min(Math.max(l,w),u)})},[]);return(0,v.useLayoutEffect)(()=>{if(!a){c(void 0);return}return d(),window.addEventListener(`resize`,d),window.addEventListener(`scroll`,d,!0),()=>{window.removeEventListener(`resize`,d),window.removeEventListener(`scroll`,d,!0)}},[a,d]),(0,y.jsxs)(`li`,{"aria-describedby":a?i:void 0,className:`flex min-w-0 cursor-pointer items-center gap-3 rounded-control px-1 py-2 text-body-small transition-colors hover:bg-control-hover focus-visible:bg-control-hover`,onBlur:()=>{o(!1)},onFocus:()=>{o(!0)},onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{o(!1)},ref:n,tabIndex:0,children:[(0,y.jsx)(`span`,{className:`shrink-0 rounded-control border border-separator-strong px-1.5 py-0.5 text-label text-muted-foreground`,children:e.priority===null?`--`:`P${String(e.priority)}`}),(0,y.jsx)(`span`,{className:`min-w-0 shrink font-semibold text-foreground`,children:l}),(0,y.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:u}),a&&typeof document<`u`?(0,te.createPortal)((0,y.jsxs)(`div`,{className:`pointer-events-none fixed z-50 w-[min(28rem,calc(100vw-1.5rem))] rounded-surface border border-separator-strong bg-raised p-3 text-left shadow-floating`,"data-floating-surface":!0,id:i,ref:r,role:`tooltip`,style:s===void 0?{left:0,top:0,visibility:`hidden`}:{left:s.left,top:s.top},children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`rounded-control border border-separator-strong px-1.5 py-0.5 text-label text-muted-foreground`,children:e.priority===null?`--`:`P${String(e.priority)}`}),(0,y.jsx)(`p`,{className:`font-semibold text-foreground`,children:l})]}),(0,y.jsx)(`p`,{className:`mt-2 break-all font-mono text-meta text-muted-foreground`,children:u}),(0,y.jsx)(m,{className:`mt-2 text-body-small leading-5 text-foreground [&_a]:text-brand [&_a]:underline [&_a]:underline-offset-2 [&_code]:font-mono [&_code]:text-body-small [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,controls:!1,children:e.body})]}),document.body):null]},`${e.file}:${String(e.start)}:${String(t)}`)}function j({comments:e}){let{t}=o(`conversation`);return e.length===0?null:(0,y.jsxs)(`section`,{"aria-label":t(`agentComponents.codeComments`,{count:e.length}),className:`my-4 overflow-hidden rounded-surface border border-separator-strong bg-raised`,"data-code-comments":`true`,children:[(0,y.jsxs)(`header`,{className:`flex min-h-12 items-center gap-3 border-b border-separator px-4 text-body font-semibold`,children:[(0,y.jsx)(`span`,{className:`grid size-8 place-items-center rounded-control bg-control`,children:(0,y.jsx)(i,{className:`size-4 text-muted-foreground`,"aria-hidden":`true`})}),(0,y.jsx)(`span`,{children:t(`agentComponents.codeComments`,{count:e.length})})]}),(0,y.jsx)(`ol`,{className:`divide-y divide-separator px-4 py-1`,children:e.map((e,t)=>(0,y.jsx)(A,{comment:e,commentIndex:t},`${e.file}:${String(e.start)}:${String(t)}`))})]})}var M=/(?<=\]\()(?:[a-z]:[\\/]|\\\\)[^)\r\n]+?\.[a-z0-9]+(?::\d+(?::\d+)?)?(?=\))/gi,N=/(?<=\]\()(?![a-z][a-z0-9+.-]*:|\/|#)[^)\r\n]+?\.[a-z0-9]+(?::\d+(?::\d+)?)?(?=\))/gi,P=/(?<=\]\()\/(?!\/)[^)\r\n]+?\.[a-z0-9]+(?::\d+(?::\d+)?)?(?=\))/gi,F=/\s+|\S+/gu,I=/^\s+$/u,L=/\n{3,}/g,R=/\[\^[\w-]{1,200}\](?!:)/,z=/\[\^[\w-]{1,200}\]:/,B=`/__codexly_unc__/`,V=`/__codexly_relative__/`;function H(e){return e.replace(M,e=>{let t=e.replaceAll(`\\`,`/`);return/^[a-z]:/i.test(t)?`/${t}`:`${B}${t.slice(2)}`}).replace(N,e=>`${V}${e}`).replace(P,e=>e.replaceAll(` `,`%20`).replaceAll(` `,`%09`))}var U=class e{output;trailingWhitespace;constructor(e=``,t=``){this.output=e,this.trailingWhitespace=t}append(e){let t=[],n=this.output.length>0;for(let r of e.matchAll(F)){let e=r[0];if(I.test(e)){this.trailingWhitespace+=e;continue}n&&this.trailingWhitespace.length>0&&t.push(this.trailingWhitespace.replace(L,`
1
+ import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,r as n,t as r}from"./react-runtime-DaCTDC27.js";import{C as i,it as a,j as o}from"./initial-deps-DKh4Kqow.js";import{t as s}from"./external-link-BHe2GLz2.js";import{c,n as l,r as u,t as d}from"./context-menu-DA8sXAc3.js";import{_t as f}from"./index-v4sEBOkU.js";import{a as p,i as m,n as h,o as g,s as _}from"./chunk-BO2N2NFS-DauaBPLH.js";import{t as ee}from"./prompt-reference-token-Cxx6C-IR.js";var v=e(t(),1),te=e(n(),1),y=r(),b=/^::code-comment\{(.*)\}\s*$/,x=/([a-z]+)=(?:"((?:\\.|[^"\\])*)"|(\d+))/g,S=[`/apps/`,`/packages/`,`/src/`,`/tests/`,`/.superwork/`],C=8,w=12;function ne(e){try{return JSON.parse(`"${e}"`)}catch{return e}}function T(e){let t=new Map;for(let n of e.matchAll(x)){let e=n[1],r=n[2],i=n[3];e!==void 0&&t.set(e,r===void 0?i??``:ne(r))}let n=t.get(`body`),r=t.get(`file`),i=t.get(`title`);if(n===void 0||r===void 0||i===void 0)return null;let a=e=>{let n=t.get(e);return n===void 0?null:Number.parseInt(n,10)};return{body:n,end:a(`end`),file:r,priority:a(`priority`),start:a(`start`),title:i}}function E(e){let t=b.exec(e)?.[1];return t===void 0?null:T(t)}function D(e){for(let t of S){let n=e.indexOf(t);if(n>=0)return e.slice(n+1)}return e.split(/[\\/]/).at(-1)??e}function O(e){let t=D(e.file);return e.start===null?t:`${t}:${e.end===null||e.end===e.start?String(e.start):`${String(e.start)}-${String(e.end)}`}`}function k(e){return e.replace(/^\[P\d+\]\s*/,``)}function A({comment:e,commentIndex:t}){let n=(0,v.useRef)(null),r=(0,v.useRef)(null),i=(0,v.useId)(),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(),l=k(e.title),u=O(e),d=(0,v.useCallback)(()=>{let e=n.current,t=r.current;if(e===null||t===null)return;let i=e.getBoundingClientRect(),a=t.getBoundingClientRect(),o=Math.max(w,window.innerWidth-a.width-w),s=Math.min(Math.max(i.left,w),o),l=i.bottom+C+a.height<=window.innerHeight-w?i.bottom+C:i.top-a.height-C,u=Math.max(w,window.innerHeight-a.height-w);c({left:s,top:Math.min(Math.max(l,w),u)})},[]);return(0,v.useLayoutEffect)(()=>{if(!a){c(void 0);return}return d(),window.addEventListener(`resize`,d),window.addEventListener(`scroll`,d,!0),()=>{window.removeEventListener(`resize`,d),window.removeEventListener(`scroll`,d,!0)}},[a,d]),(0,y.jsxs)(`li`,{"aria-describedby":a?i:void 0,className:`flex min-w-0 cursor-pointer items-center gap-3 rounded-control px-1 py-2 text-body-small transition-colors hover:bg-control-hover focus-visible:bg-control-hover`,onBlur:()=>{o(!1)},onFocus:()=>{o(!0)},onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{o(!1)},ref:n,tabIndex:0,children:[(0,y.jsx)(`span`,{className:`shrink-0 rounded-control border border-separator-strong px-1.5 py-0.5 text-label text-muted-foreground`,children:e.priority===null?`--`:`P${String(e.priority)}`}),(0,y.jsx)(`span`,{className:`min-w-0 shrink font-semibold text-foreground`,children:l}),(0,y.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:u}),a&&typeof document<`u`?(0,te.createPortal)((0,y.jsxs)(`div`,{className:`pointer-events-none fixed z-50 w-[min(28rem,calc(100vw-1.5rem))] rounded-surface border border-separator-strong bg-raised p-3 text-left shadow-floating`,"data-floating-surface":!0,id:i,ref:r,role:`tooltip`,style:s===void 0?{left:0,top:0,visibility:`hidden`}:{left:s.left,top:s.top},children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`rounded-control border border-separator-strong px-1.5 py-0.5 text-label text-muted-foreground`,children:e.priority===null?`--`:`P${String(e.priority)}`}),(0,y.jsx)(`p`,{className:`font-semibold text-foreground`,children:l})]}),(0,y.jsx)(`p`,{className:`mt-2 break-all font-mono text-meta text-muted-foreground`,children:u}),(0,y.jsx)(m,{className:`mt-2 text-body-small leading-5 text-foreground [&_a]:text-brand [&_a]:underline [&_a]:underline-offset-2 [&_code]:font-mono [&_code]:text-body-small [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,controls:!1,children:e.body})]}),document.body):null]},`${e.file}:${String(e.start)}:${String(t)}`)}function j({comments:e}){let{t}=a(`conversation`);return e.length===0?null:(0,y.jsxs)(`section`,{"aria-label":t(`agentComponents.codeComments`,{count:e.length}),className:`my-4 overflow-hidden rounded-surface border border-separator-strong bg-raised`,"data-code-comments":`true`,children:[(0,y.jsxs)(`header`,{className:`flex min-h-12 items-center gap-3 border-b border-separator px-4 text-body font-semibold`,children:[(0,y.jsx)(`span`,{className:`grid size-8 place-items-center rounded-control bg-control`,children:(0,y.jsx)(i,{className:`size-4 text-muted-foreground`,"aria-hidden":`true`})}),(0,y.jsx)(`span`,{children:t(`agentComponents.codeComments`,{count:e.length})})]}),(0,y.jsx)(`ol`,{className:`divide-y divide-separator px-4 py-1`,children:e.map((e,t)=>(0,y.jsx)(A,{comment:e,commentIndex:t},`${e.file}:${String(e.start)}:${String(t)}`))})]})}var M=/(?<=\]\()(?:[a-z]:[\\/]|\\\\)[^)\r\n]+?\.[a-z0-9]+(?::\d+(?::\d+)?)?(?=\))/gi,N=/(?<=\]\()(?![a-z][a-z0-9+.-]*:|\/|#)[^)\r\n]+?\.[a-z0-9]+(?::\d+(?::\d+)?)?(?=\))/gi,P=/(?<=\]\()\/(?!\/)[^)\r\n]+?\.[a-z0-9]+(?::\d+(?::\d+)?)?(?=\))/gi,F=/\s+|\S+/gu,I=/^\s+$/u,L=/\n{3,}/g,R=/\[\^[\w-]{1,200}\](?!:)/,z=/\[\^[\w-]{1,200}\]:/,B=`/__codexly_unc__/`,V=`/__codexly_relative__/`;function H(e){return e.replace(M,e=>{let t=e.replaceAll(`\\`,`/`);return/^[a-z]:/i.test(t)?`/${t}`:`${B}${t.slice(2)}`}).replace(N,e=>`${V}${e}`).replace(P,e=>e.replaceAll(` `,`%20`).replaceAll(` `,`%09`))}var U=class e{output;trailingWhitespace;constructor(e=``,t=``){this.output=e,this.trailingWhitespace=t}append(e){let t=[],n=this.output.length>0;for(let r of e.matchAll(F)){let e=r[0];if(I.test(e)){this.trailingWhitespace+=e;continue}n&&this.trailingWhitespace.length>0&&t.push(this.trailingWhitespace.replace(L,`
2
2
 
3
3
  `)),this.trailingWhitespace=``,t.push(e),n=!0}t.length>0&&(this.output+=t.join(``))}clone(){return new e(this.output,this.trailingWhitespace)}materialize(){return this.output}};function W(e,t,n){let r=E(e);return r===null?n.discardBlankLines&&e.trim().length===0?!0:(n.whitespace.append(`${H(e)}${t?`
4
4
  `:``}`),!1):(n.comments.push(r),t&&n.whitespace.append(`
5
5
  `),!0)}var G=class{cachedResult={comments:[],markdown:``};committedComments=[];discardBlankLines=!1;pendingLine=``;previousSource=``;whitespace=new U;process(e){if(e===this.previousSource)return this.cachedResult;e.startsWith(this.previousSource)||this.reset(),this.pendingLine+=e.slice(this.previousSource.length),this.previousSource=e;let t=this.pendingLine.indexOf(`
6
6
  `);for(;t>=0;){let e=this.pendingLine.slice(0,t);this.pendingLine=this.pendingLine.slice(t+1),this.discardBlankLines=W(e,!0,{comments:this.committedComments,discardBlankLines:this.discardBlankLines,whitespace:this.whitespace}),t=this.pendingLine.indexOf(`
7
- `)}let n=[...this.committedComments],r=this.whitespace.clone();return this.pendingLine.length>0&&W(this.pendingLine,!1,{comments:n,discardBlankLines:this.discardBlankLines,whitespace:r}),this.cachedResult={comments:n,markdown:r.materialize()},this.cachedResult}reset(){this.cachedResult={comments:[],markdown:``},this.committedComments=[],this.discardBlankLines=!1,this.pendingLine=``,this.previousSource=``,this.whitespace=new U}};function K(e=_){let t=[],n=``;return r=>{if(r===n)return t;let i=0,a=Math.min(n.length,r.length);for(;i<a&&n.charCodeAt(i)===r.charCodeAt(i);)i+=1;let o=0,s=0;for(;o<t.length&&s+(t[o]?.length??0)<=i;)s+=t[o]?.length??0,o+=1;o>0&&(--o,s-=t[o]?.length??0);let c=r.slice(s);return t=R.test(c)||z.test(c)?[r]:[...t.slice(0,o),...e(c)],n=r,t}}var q=(0,v.createContext)(null);function J({children:e,onOpen:t,reference:n}){let{t:r}=o(`workbench`);return(0,y.jsxs)(d,{modal:!1,children:[(0,y.jsx)(c,{asChild:!0,children:e}),(0,y.jsx)(l,{"aria-label":r(`openMenu.targetLabel`,{path:n.path}),children:(0,y.jsxs)(u,{onSelect:()=>{t(n,`popup`)},children:[(0,y.jsx)(s,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),(0,y.jsx)(`span`,{children:r(`openMenu.openInNewWindow`)})]})})]})}var Y=/^(?<path>(?:\/|[a-z]:[\\/]|\\\\).+?\.[a-z0-9]+?)(?::(?<line>\d+)(?::\d+)?)?$/i,X=`/__codexly_prompt_reference__/`,Z=/(^|\s)@(?<path>[^\s,!?;:,。!?;:、()[\]{}"'`]+)(?=$|\s|[,!?;:,。!?;:、()[\]{}"'`])/gu,re={code:{copy:!0,download:!1},mermaid:!1,table:!1};function ie(e){try{return decodeURIComponent(e)}catch{return e}}function ae(e){if(e===void 0)return null;let t=ie(e);if(t.startsWith(X))return{lineNumber:null,path:t.slice(30),prompt:!0};let n=Y.exec(t)?.groups;if(n===void 0)return null;let r=n.path,i=r?.startsWith(`/__codexly_unc__/`)?`//${r.slice(B.length)}`:r?.startsWith(`/__codexly_relative__/`)?r.slice(V.length):r?.match(/^\/[a-z]:[\\/]/i)?r.slice(1):r;return i===void 0?null:{lineNumber:n.line??null,path:i,prompt:!1}}function oe(e){let t=[],n=0;for(let r of e.matchAll(Z)){let i=r.groups?.path;if(i===void 0)continue;let a=r.index+(r[1]?.length??0);a>n&&t.push({type:`text`,value:e.slice(n,a)}),t.push({children:[{type:`text`,value:i.split(`/`).at(-1)??i}],type:`link`,url:`${X}${encodeURIComponent(i)}`}),n=a+i.length+1}return n<e.length&&t.push({type:`text`,value:e.slice(n)}),t}function se(){return e=>{let t=e=>{e.type===`link`||e.type===`linkReference`||e.children===void 0||(e.children=e.children.flatMap(e=>e.type===`text`&&e.value!==void 0?oe(e.value):(t(e),e)))};t(e)}}function Q(){return e=>{let t=(e,n)=>{if(e.type===`html`){e.type=n===`paragraph`?`inlineCode`:`code`,e.type===`code`&&(e.lang=`xml`);return}for(let n of e.children??[])t(n,e.type)};t(e)}}function ce({children:e,className:t=``,href:n,node:r,...i}){let o=ae(n),s=(0,v.useContext)(q);if(o!==null){if(o.prompt){let n=`${ee} relative top-0.5 select-none ${t}`,r=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(a,{"aria-hidden":`true`,className:`size-4 shrink-0`}),(0,y.jsx)(`span`,{className:`truncate`,children:e})]});if(s!==null){let e={lineNumber:null,path:o.path};return(0,y.jsx)(J,{onOpen:s,reference:e,children:(0,y.jsx)(f,{variant:`embedded`,"aria-label":`@${o.path}`,className:`${n} cursor-pointer hover:bg-control-hover`,"data-prompt-file-reference":o.path,onClick:()=>{s(e)},size:`embedded`,title:o.path,type:`button`,children:r})})}return(0,y.jsx)(`span`,{className:n,"data-prompt-file-reference":o.path,title:o.path,children:r})}let n=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`span`,{children:e}),o.lineNumber===null?null:(0,y.jsx)(`span`,{className:`markdown-file-reference__line`,children:`(line ${o.lineNumber})`})]});if(s!==null){let e={lineNumber:o.lineNumber===null?null:Number(o.lineNumber),path:o.path};return(0,y.jsx)(J,{onOpen:s,reference:e,children:(0,y.jsx)(f,{variant:`ghost`,className:`markdown-file-reference cursor-pointer text-brand underline decoration-transparent underline-offset-2 transition-colors hover:text-brand-strong hover:decoration-current ${t}`,"data-file-reference":`true`,onClick:()=>{s(e)},title:o.path,type:`button`,children:n})})}return(0,y.jsx)(`span`,{className:`markdown-file-reference text-brand ${t}`,"data-file-reference":`true`,title:o.path,children:n})}return(0,y.jsx)(`a`,{className:`font-medium text-brand underline decoration-current/35 underline-offset-2 transition-colors hover:text-brand-strong ${t}`,href:n,rel:`noopener noreferrer`,target:`_blank`,...i,children:e})}function le(e){let t=(0,v.useContext)(p),n=(0,v.useMemo)(()=>({...t,isAnimating:!1}),[t]);return(0,y.jsx)(p.Provider,{value:n,children:(0,y.jsx)(g,{...e})})}function ue({children:e,className:t=``,components:n,onOpenFileReference:r,parseMarkdownIntoBlocksFn:i,promptFileReferences:a=!1,remarkPlugins:o,...s}){let c=(0,v.useMemo)(()=>new G,[]),l=(0,v.useMemo)(()=>K(),[]),u=c.process(e??``),d=(0,v.useMemo)(()=>({...n,a:ce}),[n]),f=(0,v.useMemo)(()=>[...Object.values(h),Q,...a?[se]:[],...o??[]],[a,o]);return(0,y.jsxs)(q.Provider,{value:r??null,children:[(0,y.jsx)(m,{className:`size-full break-words [&_blockquote]:border-l-2 [&_blockquote]:border-separator [&_blockquote]:pl-3 [&_code]:font-mono [&_code]:text-body-small [&_h1]:text-xl [&_h1]:font-semibold [&_h2]:text-lg [&_h2]:font-semibold [&_h3]:font-semibold [&_img]:block [&_img]:h-auto [&_img]:max-w-full [&_img]:object-contain [&_pre]:overflow-x-auto [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 ${t}`,controls:re,...s,BlockComponent:le,components:d,parseMarkdownIntoBlocksFn:i??l,remarkPlugins:f,children:u.markdown}),(0,y.jsx)(j,{comments:u.comments})]})}var $=(0,v.memo)(ue,(e,t)=>e.children===t.children&&e.isAnimating===t.isAnimating&&e.mode===t.mode&&e.onOpenFileReference===t.onOpenFileReference&&e.promptFileReferences===t.promptFileReferences);$.displayName=`MessageResponse`;export{$ as MessageResponse,$ as default};
7
+ `)}let n=[...this.committedComments],r=this.whitespace.clone();return this.pendingLine.length>0&&W(this.pendingLine,!1,{comments:n,discardBlankLines:this.discardBlankLines,whitespace:r}),this.cachedResult={comments:n,markdown:r.materialize()},this.cachedResult}reset(){this.cachedResult={comments:[],markdown:``},this.committedComments=[],this.discardBlankLines=!1,this.pendingLine=``,this.previousSource=``,this.whitespace=new U}};function K(e=_){let t=[],n=``;return r=>{if(r===n)return t;let i=0,a=Math.min(n.length,r.length);for(;i<a&&n.charCodeAt(i)===r.charCodeAt(i);)i+=1;let o=0,s=0;for(;o<t.length&&s+(t[o]?.length??0)<=i;)s+=t[o]?.length??0,o+=1;o>0&&(--o,s-=t[o]?.length??0);let c=r.slice(s);return t=R.test(c)||z.test(c)?[r]:[...t.slice(0,o),...e(c)],n=r,t}}var q=(0,v.createContext)(null);function J({children:e,onOpen:t,reference:n}){let{t:r}=a(`workbench`);return(0,y.jsxs)(d,{modal:!1,children:[(0,y.jsx)(c,{asChild:!0,children:e}),(0,y.jsx)(l,{"aria-label":r(`openMenu.targetLabel`,{path:n.path}),children:(0,y.jsxs)(u,{onSelect:()=>{t(n,`popup`)},children:[(0,y.jsx)(s,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),(0,y.jsx)(`span`,{children:r(`openMenu.openInNewWindow`)})]})})]})}var Y=/^(?<path>(?:\/|[a-z]:[\\/]|\\\\).+?\.[a-z0-9]+?)(?::(?<line>\d+)(?::\d+)?)?$/i,X=`/__codexly_prompt_reference__/`,Z=/(^|\s)@(?<path>[^\s,!?;:,。!?;:、()[\]{}"'`]+)(?=$|\s|[,!?;:,。!?;:、()[\]{}"'`])/gu,re={code:{copy:!0,download:!1},mermaid:!1,table:!1};function ie(e){try{return decodeURIComponent(e)}catch{return e}}function ae(e){if(e===void 0)return null;let t=ie(e);if(t.startsWith(X))return{lineNumber:null,path:t.slice(30),prompt:!0};let n=Y.exec(t)?.groups;if(n===void 0)return null;let r=n.path,i=r?.startsWith(`/__codexly_unc__/`)?`//${r.slice(B.length)}`:r?.startsWith(`/__codexly_relative__/`)?r.slice(V.length):r?.match(/^\/[a-z]:[\\/]/i)?r.slice(1):r;return i===void 0?null:{lineNumber:n.line??null,path:i,prompt:!1}}function oe(e){let t=[],n=0;for(let r of e.matchAll(Z)){let i=r.groups?.path;if(i===void 0)continue;let a=r.index+(r[1]?.length??0);a>n&&t.push({type:`text`,value:e.slice(n,a)}),t.push({children:[{type:`text`,value:i.split(`/`).at(-1)??i}],type:`link`,url:`${X}${encodeURIComponent(i)}`}),n=a+i.length+1}return n<e.length&&t.push({type:`text`,value:e.slice(n)}),t}function se(){return e=>{let t=e=>{e.type===`link`||e.type===`linkReference`||e.children===void 0||(e.children=e.children.flatMap(e=>e.type===`text`&&e.value!==void 0?oe(e.value):(t(e),e)))};t(e)}}function Q(){return e=>{let t=(e,n)=>{if(e.type===`html`){e.type=n===`paragraph`?`inlineCode`:`code`,e.type===`code`&&(e.lang=`xml`);return}for(let n of e.children??[])t(n,e.type)};t(e)}}function ce({children:e,className:t=``,href:n,node:r,...i}){let a=ae(n),s=(0,v.useContext)(q);if(a!==null){if(a.prompt){let n=`${ee} relative top-0.5 select-none ${t}`,r=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(o,{"aria-hidden":`true`,className:`size-4 shrink-0`}),(0,y.jsx)(`span`,{className:`truncate`,children:e})]});if(s!==null){let e={lineNumber:null,path:a.path};return(0,y.jsx)(J,{onOpen:s,reference:e,children:(0,y.jsx)(f,{variant:`embedded`,"aria-label":`@${a.path}`,className:`${n} cursor-pointer hover:bg-control-hover`,"data-prompt-file-reference":a.path,onClick:()=>{s(e)},size:`embedded`,title:a.path,type:`button`,children:r})})}return(0,y.jsx)(`span`,{className:n,"data-prompt-file-reference":a.path,title:a.path,children:r})}let n=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`span`,{children:e}),a.lineNumber===null?null:(0,y.jsx)(`span`,{className:`markdown-file-reference__line`,children:`(line ${a.lineNumber})`})]});if(s!==null){let e={lineNumber:a.lineNumber===null?null:Number(a.lineNumber),path:a.path};return(0,y.jsx)(J,{onOpen:s,reference:e,children:(0,y.jsx)(f,{variant:`ghost`,className:`markdown-file-reference cursor-pointer text-brand underline decoration-transparent underline-offset-2 transition-colors hover:text-brand-strong hover:decoration-current ${t}`,"data-file-reference":`true`,onClick:()=>{s(e)},title:a.path,type:`button`,children:n})})}return(0,y.jsx)(`span`,{className:`markdown-file-reference text-brand ${t}`,"data-file-reference":`true`,title:a.path,children:n})}return(0,y.jsx)(`a`,{className:`font-medium text-brand underline decoration-current/35 underline-offset-2 transition-colors hover:text-brand-strong ${t}`,href:n,rel:`noopener noreferrer`,target:`_blank`,...i,children:e})}function le(e){let t=(0,v.useContext)(p),n=(0,v.useMemo)(()=>({...t,isAnimating:!1}),[t]);return(0,y.jsx)(p.Provider,{value:n,children:(0,y.jsx)(g,{...e})})}function ue({children:e,className:t=``,components:n,onOpenFileReference:r,parseMarkdownIntoBlocksFn:i,promptFileReferences:a=!1,remarkPlugins:o,...s}){let c=(0,v.useMemo)(()=>new G,[]),l=(0,v.useMemo)(()=>K(),[]),u=c.process(e??``),d=(0,v.useMemo)(()=>({...n,a:ce}),[n]),f=(0,v.useMemo)(()=>[...Object.values(h),Q,...a?[se]:[],...o??[]],[a,o]);return(0,y.jsxs)(q.Provider,{value:r??null,children:[(0,y.jsx)(m,{className:`size-full break-words [&_blockquote]:border-l-2 [&_blockquote]:border-separator [&_blockquote]:pl-3 [&_code]:font-mono [&_code]:text-body-small [&_h1]:text-xl [&_h1]:font-semibold [&_h2]:text-lg [&_h2]:font-semibold [&_h3]:font-semibold [&_img]:block [&_img]:h-auto [&_img]:max-w-full [&_img]:object-contain [&_pre]:overflow-x-auto [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 ${t}`,controls:re,...s,BlockComponent:le,components:d,parseMarkdownIntoBlocksFn:i??l,remarkPlugins:f,children:u.markdown}),(0,y.jsx)(j,{comments:u.comments})]})}var $=(0,v.memo)(ue,(e,t)=>e.children===t.children&&e.isAnimating===t.isAnimating&&e.mode===t.mode&&e.onOpenFileReference===t.onOpenFileReference&&e.promptFileReferences===t.promptFileReferences);$.displayName=`MessageResponse`;export{$ as MessageResponse,$ as default};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r,o as i,r as a}from"./initial-deps-CTprc_pY.js";import{E as o,_ as s,et as c,it as l,m as u,z as d}from"./initial-deps-DKh4Kqow.js";import{t as f}from"./external-link-BHe2GLz2.js";import{t as p}from"./info-BSMz7uRW.js";import{It as m,Z as h,_t as g}from"./index-v4sEBOkU.js";import{a as _,i as v,n as y,o as b,r as x,t as S}from"./sheet-7wHRYO_r.js";var C=c(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),w=c(`package-check`,[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]),T=c(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),E=c(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),D=e(t(),1),O=n();function k(e){try{let t=new URL(e);t.protocol===`https:`&&window.open(t.href,`_blank`,`noopener,noreferrer`)}catch{}}function A({client:e,installResult:t,installing:n,onInstall:r,onOpenChange:a,onUninstall:s,plugin:c,uninstalling:u}){let{t:d}=l(`workbench`),m=i({queryFn:()=>e.getOfficialPlugin(c.marketplaceName,c.marketplacePath,c.pluginName),queryKey:[`extensions`,`plugins`,`detail`,c.marketplaceName,c.marketplacePath,c.pluginName],staleTime:5*6e4}),h=m.data,D=t?.appsNeedingAuth??h?.apps??[];return(0,O.jsx)(S,{onOpenChange:a,open:!0,children:(0,O.jsxs)(y,{className:`official-plugin-sheet`,closeLabel:d(`skillsMarket.closeDetails`),children:[(0,O.jsxs)(_,{className:`official-plugin-sheet__header`,children:[(0,O.jsx)(`div`,{className:`skills-market-glyph`,"data-tone":`plugins`,"aria-hidden":`true`,children:(0,O.jsx)(w,{})}),(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsx)(b,{children:c.displayName}),(0,O.jsx)(x,{children:c.developerName??d(`skillsMarket.officialPublisher`)})]})]}),(0,O.jsx)(`div`,{className:`official-plugin-sheet__body`,children:m.isPending?(0,O.jsx)(`div`,{className:`skills-market-state`,role:`status`,children:d(`skillsMarket.loadingDetail`)}):m.error===null?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`text-body-small leading-6 text-muted-foreground`,children:h?.description??c.description}),t===null?null:(0,O.jsxs)(`p`,{className:`official-plugin-session-note`,role:`status`,children:[(0,O.jsx)(p,{"aria-hidden":`true`}),d(`skillsMarket.newSessionRequired`)]}),(0,O.jsxs)(`div`,{className:`official-plugin-assets`,children:[(0,O.jsxs)(`section`,{children:[(0,O.jsxs)(`h4`,{children:[(0,O.jsx)(C,{"aria-hidden":`true`}),`Skills `,(0,O.jsx)(`span`,{children:h?.skills.length??0})]}),h?.skills.map(e=>(0,O.jsxs)(`div`,{className:`official-plugin-asset`,children:[(0,O.jsx)(`strong`,{children:e.name}),(0,O.jsx)(`p`,{children:e.description})]},e.name))]}),(0,O.jsxs)(`section`,{children:[(0,O.jsxs)(`h4`,{children:[(0,O.jsx)(T,{"aria-hidden":`true`}),`MCP `,(0,O.jsx)(`span`,{children:h?.mcpServers.length??0})]}),h?.mcpServers.map(e=>(0,O.jsx)(`div`,{className:`official-plugin-asset`,children:(0,O.jsx)(`strong`,{children:e})},e))]}),(0,O.jsxs)(`section`,{children:[(0,O.jsxs)(`h4`,{children:[(0,O.jsx)(E,{"aria-hidden":`true`}),`Apps `,(0,O.jsx)(`span`,{children:D.length})]}),D.map(e=>(0,O.jsxs)(`div`,{className:`official-plugin-asset`,children:[(0,O.jsx)(`strong`,{children:e.name}),(0,O.jsx)(`p`,{children:e.description}),e.installUrl===null?null:(0,O.jsxs)(g,{onClick:()=>{k(e.installUrl??``)},size:`compact`,type:`button`,variant:`outline`,children:[(0,O.jsx)(f,{"aria-hidden":`true`}),d(`skillsMarket.authorize`)]})]},e.id))]}),h?.hooks.length===0?null:(0,O.jsxs)(`section`,{children:[(0,O.jsxs)(`h4`,{children:[(0,O.jsx)(E,{"aria-hidden":`true`}),`Hooks `,(0,O.jsx)(`span`,{children:h?.hooks.length??0})]}),h?.hooks.map(e=>(0,O.jsx)(`div`,{className:`official-plugin-asset`,children:(0,O.jsx)(`strong`,{children:e})},e))]})]})]}):(0,O.jsx)(`div`,{className:`skills-market-state`,role:`alert`,children:d(`skillsMarket.pluginError`)})}),(0,O.jsx)(v,{className:`official-plugin-sheet__footer`,children:c.installed?(0,O.jsxs)(g,{disabled:u,onClick:s,type:`button`,variant:`destructive`,children:[u?(0,O.jsx)(o,{"aria-hidden":`true`,className:`animate-spin`}):null,d(`skillsMarket.uninstallPlugin`)]}):(0,O.jsxs)(g,{disabled:n||c.installPolicy===`NOT_AVAILABLE`||c.availability!==`AVAILABLE`,onClick:r,type:`button`,children:[n?(0,O.jsx)(o,{"aria-hidden":`true`,className:`animate-spin`,"data-icon":`loading`}):null,d(`skillsMarket.installPlugin`)]})})]})})}var j=[`extensions`,`plugins`];function M({onOpen:e,plugin:t}){let{t:n}=l(`workbench`);return(0,O.jsxs)(`button`,{className:`skills-market-card official-plugin-card`,onClick:()=>{e(t)},type:`button`,children:[(0,O.jsxs)(`span`,{className:`skills-market-card__topline`,children:[t.logoUrl===null?(0,O.jsx)(`span`,{className:`skills-market-glyph`,"data-tone":`plugins`,"aria-hidden":`true`,children:(0,O.jsx)(T,{})}):(0,O.jsx)(`img`,{className:`official-plugin-card__logo`,src:t.logoUrl,alt:``}),(0,O.jsxs)(`span`,{className:`min-w-0 flex-1 text-left`,children:[(0,O.jsx)(`strong`,{className:`block truncate text-body-small`,children:t.displayName}),(0,O.jsx)(`span`,{className:`block truncate text-label text-muted-foreground`,children:t.developerName??n(`skillsMarket.officialPublisher`)})]}),t.installed?(0,O.jsxs)(`span`,{className:`official-plugin-card__installed`,children:[(0,O.jsx)(d,{"aria-hidden":`true`}),n(`skillsMarket.installed`)]}):null]}),(0,O.jsx)(`span`,{className:`skills-market-card__summary`,children:t.description}),(0,O.jsx)(`span`,{className:`skills-market-card__footer`,children:(0,O.jsx)(`span`,{children:t.version===null?t.name:`v${t.version}`})})]})}function N({emptyLabel:e,onOpen:t,plugins:n,title:r}){return(0,O.jsxs)(`section`,{className:`official-plugin-group`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`h3`,{children:r}),(0,O.jsx)(`span`,{children:n.length})]}),n.length===0?(0,O.jsx)(`p`,{className:`official-plugin-group__empty`,children:e}):(0,O.jsx)(`div`,{className:`skills-market-grid official-plugin-grid`,children:n.map(e=>(0,O.jsx)(M,{onOpen:t,plugin:e},e.id))})]})}function P(){let{t:e}=l(`workbench`),{client:t}=m(),n=r(),[o,c]=(0,D.useState)(``),[d,f]=(0,D.useState)(null),[p,_]=(0,D.useState)(null),v=i({queryFn:()=>t.listOfficialPlugins(!1),queryKey:j,staleTime:6e4}),y=(0,D.useMemo)(()=>{let e=[],t=[],n=o.trim().toLocaleLowerCase();for(let r of v.data?.data??[]){let i=[r.displayName,r.name,r.description,r.developerName].filter(Boolean).join(` `).toLocaleLowerCase();n!==``&&!i.includes(n)||(r.installed?e:t).push(r)}return{available:t,installed:e}},[v.data?.data,o]),b=a({mutationFn:e=>t.installOfficialPlugin(e.marketplaceName,e.marketplacePath,e.pluginName,globalThis.crypto.randomUUID()),onSuccess:e=>{_(e),n.setQueryData(j,e.plugins)}}),x=a({mutationFn:e=>t.uninstallOfficialPlugin(e.marketplaceName,e.pluginName,e.id),onSuccess:e=>{_(null),n.setQueryData(j,e.plugins),f(null)}}),S=v.data?.data.find(e=>e.id===d)??null,C=()=>n.fetchQuery({queryFn:()=>t.listOfficialPlugins(!0),queryKey:j,staleTime:0}),w=e=>{_(null),f(e.id)};return(0,O.jsxs)(`div`,{className:`skills-market-pane`,role:`tabpanel`,children:[(0,O.jsxs)(`div`,{className:`skills-market-toolbar`,children:[(0,O.jsxs)(`div`,{className:`skills-market-search`,children:[(0,O.jsx)(u,{"aria-hidden":`true`}),(0,O.jsx)(h,{"aria-label":e(`skillsMarket.searchPlugins`),onChange:e=>{c(e.currentTarget.value)},placeholder:e(`skillsMarket.searchPlugins`),value:o})]}),(0,O.jsxs)(g,{disabled:v.isFetching,onClick:()=>void C(),type:`button`,variant:`outline`,children:[(0,O.jsx)(s,{"aria-hidden":`true`,className:v.isFetching?`animate-spin`:``}),e(`skillsMarket.refreshPlugins`)]})]}),v.isPending?(0,O.jsx)(`div`,{className:`skills-market-state`,role:`status`,children:e(`skillsMarket.loadingPlugins`)}):v.error===null?(0,O.jsxs)(`div`,{className:`official-plugin-groups`,children:[(0,O.jsx)(N,{emptyLabel:e(`skillsMarket.emptyInstalledPlugins`),onOpen:w,plugins:y.installed,title:e(`skillsMarket.installedPlugins`)}),(0,O.jsx)(N,{emptyLabel:e(`skillsMarket.emptyAvailablePlugins`),onOpen:w,plugins:y.available,title:e(`skillsMarket.availablePlugins`)})]}):(0,O.jsx)(`div`,{className:`skills-market-state`,role:`alert`,children:e(`skillsMarket.pluginError`)}),S===null?null:(0,O.jsx)(A,{client:t,installResult:p,installing:b.isPending,onInstall:()=>{b.mutate(S)},onOpenChange:e=>{e||f(null)},onUninstall:()=>{x.mutate(S)},plugin:S,uninstalling:x.isPending})]})}export{P as OfficialPluginsPane};
@@ -0,0 +1 @@
1
+ import{et as e}from"./initial-deps-DKh4Kqow.js";var t=e(`paw-print`,[[`circle`,{cx:`11`,cy:`4`,r:`2`,key:`vol9p0`}],[`circle`,{cx:`18`,cy:`8`,r:`2`,key:`17gozi`}],[`circle`,{cx:`20`,cy:`16`,r:`2`,key:`1v9bxh`}],[`path`,{d:`M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z`,key:`1ydw1z`}]]);export{t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r,o as i,r as a}from"./initial-deps-CTprc_pY.js";import{nt as o}from"./initial-deps-DqJTHr9A.js";import{a as s,i as c}from"./global-settings-fields-C0IfL3RQ.js";import{$ as l,Q as u,_t as d,et as f,rt as p,tt as m,wt as h}from"./index-DwEl9mCY.js";import"./settings-personalization-CPFvvwt7.js";var g=e(t(),1),_=n(),v=[`personalization`,`memories`],y={id:`personalization-memories`};function b({field:e,client:t,settings:n}){let{t:i}=o(`settings`),s=r(),l=a({scope:y,mutationFn:n=>t.updateMemorySettings({[e]:n}),onSuccess:e=>s.setQueryData(v,e),meta:{actionNotification:{successMessage:!1}}}),u=i(e===`enabled`?`personalization.enabled`:`personalization.external`),f=(l.isPending?l.variables:n?.[e])??!1;return(0,_.jsx)(c,{label:u,description:i(e===`enabled`?`personalization.enabledDescription`:`personalization.externalDescription`),children:(0,_.jsx)(d,{role:`switch`,"aria-label":u,"aria-checked":f,disabled:!n||l.isPending,className:`h-6 w-10 rounded-pill p-0.5 ${f?`bg-brand hover:bg-brand`:`bg-control-hover`}`,variant:`ghost`,type:`button`,onClick:()=>{l.mutate(!f)},children:(0,_.jsx)(`span`,{className:`block size-5 rounded-full bg-white transition-transform motion-reduce:transition-none ${f?`translate-x-2`:`-translate-x-2`}`})})})}var x=[`personalization`,`instructions`];function S({client:e,commitSettings:t}){let{t:n}=o(`settings`),S=r(),[C,w]=(0,g.useState)(null),[T,E]=(0,g.useState)(!1),D=i({queryKey:x,queryFn:()=>e.getGlobalInstructions(),refetchOnWindowFocus:!1}),O=i({queryKey:v,queryFn:()=>e.getMemorySettings()}),k=a({mutationFn:({content:t,expectedContent:n})=>e.saveGlobalInstructions(t,n),onSuccess:e=>{S.setQueryData(x,e),w(null),h(n(`personalization.saved`))},meta:{actionNotification:!1}}),A=a({scope:y,mutationFn:()=>e.resetMemories(),onSuccess:()=>{E(!1),h(n(`personalization.deleted`))},meta:{actionNotification:!1}}),j=C??D.data?.content??``,M=k.error!==null&&`code`in k.error&&k.error.code===`GLOBAL_INSTRUCTIONS_CHANGED`;return(0,_.jsxs)(`section`,{id:`settings-panel-personalization`,className:`space-y-8`,children:[(0,_.jsx)(`h1`,{className:`text-xl font-semibold`,children:n(`sections.personalization`)}),(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,_.jsxs)(`div`,{className:`min-w-0`,children:[(0,_.jsx)(`label`,{className:`text-body font-semibold`,htmlFor:`codex-global-instructions`,children:n(`personalization.instructions`)}),(0,_.jsxs)(`p`,{className:`mt-1 text-body-small text-muted-foreground`,children:[n(`personalization.description`),D.data?(0,_.jsx)(`span`,{className:`block break-all`,children:n(`personalization.fileLocation`,{path:D.data.path})}):null]})]}),(0,_.jsx)(d,{type:`button`,variant:`secondary`,className:`shrink-0`,disabled:D.data===void 0||D.isFetching||k.isPending||j===D.data.content,onClick:()=>{D.data&&k.mutate({content:j,expectedContent:D.data.content})},children:n(k.isPending?`personalization.saving`:`personalization.save`)})]}),D.isError?(0,_.jsx)(`p`,{role:`alert`,className:`text-body-small text-danger`,children:n(`personalization.loadError`)}):null,D.isPending?(0,_.jsx)(`p`,{role:`status`,children:n(`loading`)}):null,(0,_.jsx)(`textarea`,{id:`codex-global-instructions`,className:`min-h-56 w-full resize-y rounded-control border border-separator bg-panel p-3 text-body-small focus:shadow-focus focus:outline-none`,spellCheck:!1,disabled:D.data===void 0||k.isPending||D.isFetching,value:j,onChange:e=>{w(e.currentTarget.value),k.reset()}}),D.data?.overrideActive?(0,_.jsx)(`p`,{className:`text-body-small text-muted-foreground`,children:n(`personalization.override`)}):null,k.isError?(0,_.jsx)(`p`,{role:`alert`,className:`text-body-small text-danger`,children:n(M?`personalization.conflict`:`personalization.saveError`)}):null,D.isError||M?(0,_.jsx)(d,{type:`button`,variant:`ghost`,disabled:D.isFetching,onClick:()=>{D.refetch().then(e=>{e.isSuccess&&(w(null),k.reset())})},children:n(`personalization.reload`)}):null]}),t,(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(s,{title:n(`personalization.memories`),description:n(`personalization.memoryDescription`),children:[[`enabled`,`allowExternalContext`].map(t=>(0,_.jsx)(b,{field:t,client:e,settings:O.data},t)),(0,_.jsx)(c,{label:n(`personalization.remove`),description:n(`personalization.removeDescription`),children:(0,_.jsx)(d,{"aria-label":n(`personalization.remove`),className:`text-danger`,type:`button`,variant:`ghost`,disabled:A.isPending||!O.data,onClick:()=>{A.reset(),E(!0)},children:n(`personalization.remove`)})})]}),O.isError?(0,_.jsxs)(`div`,{role:`alert`,children:[(0,_.jsx)(`p`,{children:n(`personalization.loadError`)}),(0,_.jsx)(d,{variant:`ghost`,onClick:()=>void O.refetch(),children:n(`common:actions.retry`)})]}):null]}),(0,_.jsx)(u,{open:T,onOpenChange:e=>{A.isPending||E(e)},children:(0,_.jsxs)(l,{children:[(0,_.jsx)(p,{children:n(`personalization.remove`)}),(0,_.jsx)(f,{children:n(`personalization.confirmDescription`)}),A.isError?(0,_.jsx)(`p`,{role:`alert`,className:`text-danger`,children:n(`personalization.memoryError`)}):null,(0,_.jsxs)(m,{children:[(0,_.jsx)(d,{variant:`ghost`,disabled:A.isPending,onClick:()=>{E(!1)},children:n(`personalization.cancel`)}),(0,_.jsx)(d,{className:`text-danger`,variant:`secondary`,disabled:A.isPending,onClick:()=>{A.mutate()},children:n(A.isPending?`personalization.deleting`:`personalization.confirm`)})]})]})})]})}export{S as PersonalizationSettingsPanel};
1
+ import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r,o as i,r as a}from"./initial-deps-CTprc_pY.js";import{it as o}from"./initial-deps-DKh4Kqow.js";import{a as s,i as c}from"./global-settings-fields-Bi-Jx6d5.js";import{$ as l,Q as u,_t as d,et as f,rt as p,tt as m,wt as h}from"./index-v4sEBOkU.js";import"./settings-personalization-C02xFFt3.js";var g=e(t(),1),_=n(),v=[`personalization`,`memories`],y={id:`personalization-memories`};function b({field:e,client:t,settings:n}){let{t:i}=o(`settings`),s=r(),l=a({scope:y,mutationFn:n=>t.updateMemorySettings({[e]:n}),onSuccess:e=>s.setQueryData(v,e),meta:{actionNotification:{successMessage:!1}}}),u=i(e===`enabled`?`personalization.enabled`:`personalization.external`),f=(l.isPending?l.variables:n?.[e])??!1;return(0,_.jsx)(c,{label:u,description:i(e===`enabled`?`personalization.enabledDescription`:`personalization.externalDescription`),children:(0,_.jsx)(d,{role:`switch`,"aria-label":u,"aria-checked":f,disabled:!n||l.isPending,className:`h-6 w-10 rounded-pill p-0.5 ${f?`bg-brand hover:bg-brand`:`bg-control-hover`}`,variant:`ghost`,type:`button`,onClick:()=>{l.mutate(!f)},children:(0,_.jsx)(`span`,{className:`block size-5 rounded-full bg-white transition-transform motion-reduce:transition-none ${f?`translate-x-2`:`-translate-x-2`}`})})})}var x=[`personalization`,`instructions`];function S({client:e,commitSettings:t}){let{t:n}=o(`settings`),S=r(),[C,w]=(0,g.useState)(null),[T,E]=(0,g.useState)(!1),D=i({queryKey:x,queryFn:()=>e.getGlobalInstructions(),refetchOnWindowFocus:!1}),O=i({queryKey:v,queryFn:()=>e.getMemorySettings()}),k=a({mutationFn:({content:t,expectedContent:n})=>e.saveGlobalInstructions(t,n),onSuccess:e=>{S.setQueryData(x,e),w(null),h(n(`personalization.saved`))},meta:{actionNotification:!1}}),A=a({scope:y,mutationFn:()=>e.resetMemories(),onSuccess:()=>{E(!1),h(n(`personalization.deleted`))},meta:{actionNotification:!1}}),j=C??D.data?.content??``,M=k.error!==null&&`code`in k.error&&k.error.code===`GLOBAL_INSTRUCTIONS_CHANGED`;return(0,_.jsxs)(`section`,{id:`settings-panel-personalization`,className:`space-y-8`,children:[(0,_.jsx)(`h1`,{className:`text-xl font-semibold`,children:n(`sections.personalization`)}),(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,_.jsxs)(`div`,{className:`min-w-0`,children:[(0,_.jsx)(`label`,{className:`text-body font-semibold`,htmlFor:`codex-global-instructions`,children:n(`personalization.instructions`)}),(0,_.jsxs)(`p`,{className:`mt-1 text-body-small text-muted-foreground`,children:[n(`personalization.description`),D.data?(0,_.jsx)(`span`,{className:`block break-all`,children:n(`personalization.fileLocation`,{path:D.data.path})}):null]})]}),(0,_.jsx)(d,{type:`button`,variant:`secondary`,className:`shrink-0`,disabled:D.data===void 0||D.isFetching||k.isPending||j===D.data.content,onClick:()=>{D.data&&k.mutate({content:j,expectedContent:D.data.content})},children:n(k.isPending?`personalization.saving`:`personalization.save`)})]}),D.isError?(0,_.jsx)(`p`,{role:`alert`,className:`text-body-small text-danger`,children:n(`personalization.loadError`)}):null,D.isPending?(0,_.jsx)(`p`,{role:`status`,children:n(`loading`)}):null,(0,_.jsx)(`textarea`,{id:`codex-global-instructions`,className:`min-h-56 w-full resize-y rounded-control border border-separator bg-panel p-3 text-body-small focus:shadow-focus focus:outline-none`,spellCheck:!1,disabled:D.data===void 0||k.isPending||D.isFetching,value:j,onChange:e=>{w(e.currentTarget.value),k.reset()}}),D.data?.overrideActive?(0,_.jsx)(`p`,{className:`text-body-small text-muted-foreground`,children:n(`personalization.override`)}):null,k.isError?(0,_.jsx)(`p`,{role:`alert`,className:`text-body-small text-danger`,children:n(M?`personalization.conflict`:`personalization.saveError`)}):null,D.isError||M?(0,_.jsx)(d,{type:`button`,variant:`ghost`,disabled:D.isFetching,onClick:()=>{D.refetch().then(e=>{e.isSuccess&&(w(null),k.reset())})},children:n(`personalization.reload`)}):null]}),t,(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(s,{title:n(`personalization.memories`),description:n(`personalization.memoryDescription`),children:[[`enabled`,`allowExternalContext`].map(t=>(0,_.jsx)(b,{field:t,client:e,settings:O.data},t)),(0,_.jsx)(c,{label:n(`personalization.remove`),description:n(`personalization.removeDescription`),children:(0,_.jsx)(d,{"aria-label":n(`personalization.remove`),className:`text-danger`,type:`button`,variant:`ghost`,disabled:A.isPending||!O.data,onClick:()=>{A.reset(),E(!0)},children:n(`personalization.remove`)})})]}),O.isError?(0,_.jsxs)(`div`,{role:`alert`,children:[(0,_.jsx)(`p`,{children:n(`personalization.loadError`)}),(0,_.jsx)(d,{variant:`ghost`,onClick:()=>void O.refetch(),children:n(`common:actions.retry`)})]}):null]}),(0,_.jsx)(u,{open:T,onOpenChange:e=>{A.isPending||E(e)},children:(0,_.jsxs)(l,{children:[(0,_.jsx)(p,{children:n(`personalization.remove`)}),(0,_.jsx)(f,{children:n(`personalization.confirmDescription`)}),A.isError?(0,_.jsx)(`p`,{role:`alert`,className:`text-danger`,children:n(`personalization.memoryError`)}):null,(0,_.jsxs)(m,{children:[(0,_.jsx)(d,{variant:`ghost`,disabled:A.isPending,onClick:()=>{E(!1)},children:n(`personalization.cancel`)}),(0,_.jsx)(d,{className:`text-danger`,variant:`secondary`,disabled:A.isPending,onClick:()=>{A.mutate()},children:n(A.isPending?`personalization.deleting`:`personalization.confirm`)})]})]})})]})}export{S as PersonalizationSettingsPanel};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{t as r}from"./project-source-panel-ChVlP72p.js";import{It as i}from"./index-DwEl9mCY.js";var a=e(t(),1),o=n();function s({projectId:e,search:t}){let{client:n}=i(),s=t.path.split(/[\\/]/u).at(-1)??t.path;return(0,a.useEffect)(()=>{document.title=s},[s]),(0,o.jsx)(`main`,{className:`h-full min-h-0 bg-raised`,children:(0,o.jsx)(r,{client:n,onClose:()=>{window.close()},previewKind:t.previewKind,projectId:e,reference:{lineNumber:t.lineNumber,path:t.path},...t.rootPath===void 0?{}:{rootPath:t.rootPath}})})}export{s as ProjectFilePopupPage};
1
+ import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{t as r}from"./project-source-panel-CxH_R69O.js";import{It as i}from"./index-v4sEBOkU.js";var a=e(t(),1),o=n();function s({projectId:e,search:t}){let{client:n}=i(),s=t.path.split(/[\\/]/u).at(-1)??t.path;return(0,a.useEffect)(()=>{document.title=s},[s]),(0,o.jsx)(`main`,{className:`h-full min-h-0 bg-raised`,children:(0,o.jsx)(r,{client:n,onClose:()=>{window.close()},previewKind:t.previewKind,projectId:e,reference:{lineNumber:t.lineNumber,path:t.path},...t.rootPath===void 0?{}:{rootPath:t.rootPath}})})}export{s as ProjectFilePopupPage};
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-highlighter-Bp23lvQ1.js","assets/engine-compile-DcaAFSGO.js","assets/lib-DE0ZEvGM.js","assets/rolldown-runtime-CNC7AqOf.js","assets/code-languages-DVcuYjhn.js","assets/initial-deps-Bx4af_YG.js","assets/github-dark-C-LZuMrd.js","assets/github-light-EUqPIrTm.js"])))=>i.map(i=>d[i]);
2
+ import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{t}from"./initial-deps-Bx4af_YG.js";import{i as n,t as r}from"./react-runtime-DaCTDC27.js";import{t as i}from"./initial-deps-CTprc_pY.js";import{r as a}from"./initial-deps-Bk3GSWTk.js";import{K as o,M as s,et as c,it as l,s as u}from"./initial-deps-DKh4Kqow.js";import{n as d,t as f}from"./file-code-corner-DCQQ8xoR.js";import{Dt as p,Et as m,H as h,Ot as g,U as _,W as v,_t as y}from"./index-v4sEBOkU.js";import{t as b}from"./code-languages-DVcuYjhn.js";import{t as x}from"./lazy-message-response-CkQTXmyE.js";var S=c(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),C=c(`git-compare-arrows`,[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]),w=c(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),T=e(n(),1),E=`codexly:workbench:markdown-preview:v1`;function D(){try{return typeof window>`u`?void 0:window.localStorage}catch{return}}function O(e){if(e===void 0)return!1;try{let t=JSON.parse(e.getItem(E)??`null`);return A(t)?t.preview:!1}catch{return!1}}function k(e,t){if(t===void 0)return;let n={preview:e,version:1};try{t.setItem(E,JSON.stringify(n))}catch{}}function A(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.version===1&&typeof t.preview==`boolean`}var j=24*1024*1024,M=512*1024;function N(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function P(e,t){return`${e}:${String(t.length)}:${N(t)}`}var F=class{maxSourceBytes;#e;constructor(e=j,t=128,n=M){this.maxSourceBytes=n,this.#e=new m({getRetainedBytes:(e,t)=>g(e)+p(t),maxBytes:e,maxEntries:t})}get retainedBytes(){return this.#e.retainedBytes}get size(){return this.#e.size}get(e,t){let n=this.#e.get(P(e,t));return n?.source===t?n.tokenized:void 0}set(e,t,n){return g(t)>this.maxSourceBytes?!1:this.#e.set(P(e,t),{source:t,tokenized:n})}},I=r(),L=(0,T.createContext)(null),R=new F;function z(){let e=(0,T.useContext)(L);if(e===null)throw Error(`CodeBlock components must be rendered inside CodeBlock`);return e}function B(e){return{background:`transparent`,foreground:`inherit`,lines:e.split(`
3
+ `).map(e=>e===``?[]:[{content:e,offset:0}])}}function V(e){let t=e.htmlStyle,n=e.color??t?.color,r=t?.[`--shiki-dark`],i=e.bgColor??t?.backgroundColor,a=t?.[`--shiki-dark-bg`];return{...t,backgroundColor:i===void 0||a===void 0?i:`light-dark(${i}, ${a})`,color:n===void 0||r===void 0?n:`light-dark(${n}, ${r})`}}async function H(e,n){if(n===`text`)return B(e);let r=R.get(n,e);if(r!==void 0)return r;let{highlightCode:i}=await t(async()=>{let{highlightCode:e}=await import(`./code-highlighter-Bp23lvQ1.js`);return{highlightCode:e}},__vite__mapDeps([0,1,2,3,4,5,6,7])),a=await i(e,n);return R.set(n,e,a),a}function U({className:e=``,code:t,highlightedLine:n=null,language:r,showLineNumbers:i=!1,...a}){let o=(0,T.useMemo)(()=>B(t),[t]),[s,c]=(0,T.useState)(o);return(0,T.useEffect)(()=>{let e=!0;return c(o),H(t,r).then(t=>{e&&c(t)}).catch(()=>{}),()=>{e=!1}},[t,r,o]),(0,I.jsx)(`div`,{className:`relative min-h-0 overflow-auto ${e}`,...a,children:(0,I.jsx)(`pre`,{className:`m-0 min-w-max bg-transparent py-3 font-mono text-body-small leading-6 text-foreground`,style:{backgroundColor:s.background,color:s.foreground},children:(0,I.jsx)(`code`,{children:s.lines.map((e,t)=>{let r=t+1,a=r===n;return(0,I.jsxs)(`span`,{className:`block min-h-6 px-3 ${i?`grid grid-cols-[4rem_minmax(0,1fr)]`:``} ${a?`bg-brand-soft text-brand-strong`:``}`,"data-code-line":r,"data-highlighted":a?`true`:void 0,children:[i?(0,I.jsx)(`span`,{"aria-hidden":`true`,className:`select-none pr-4 text-right ${a?`text-brand`:`text-muted-foreground`}`,children:r}):null,(0,I.jsx)(`span`,{className:`whitespace-pre`,children:e.length===0?` `:e.map((e,t)=>(0,I.jsx)(`span`,{style:V(e),children:e.content},`${String(r)}-${String(t)}`))})]},r)})})})})}function W({children:e,className:t=``,code:n,highlightedLine:r=null,language:i,showLineNumbers:a=!1,style:o,...s}){let c=(0,T.useMemo)(()=>({code:n}),[n]);return(0,I.jsx)(L.Provider,{value:c,children:(0,I.jsxs)(`div`,{className:`relative w-full overflow-hidden rounded-surface bg-raised text-foreground shadow-sm ${t}`,"data-language":i,style:{containIntrinsicSize:`auto 200px`,contentVisibility:`auto`,...o},...s,children:[e,(0,I.jsx)(U,{code:n,highlightedLine:r,language:i,showLineNumbers:a})]})})}function G({className:e=``,...t}){return(0,I.jsx)(`div`,{className:`flex min-h-8 items-center justify-between border-b border-separator bg-control px-3 text-label text-muted-foreground ${e}`,...t})}function K({className:e=``,...t}){return(0,I.jsx)(`div`,{className:`flex min-w-0 items-center gap-2 ${e}`,...t})}function q({className:e=``,...t}){return(0,I.jsx)(`span`,{className:`truncate font-mono ${e}`,...t})}function J({className:e=``,...t}){return(0,I.jsx)(`div`,{className:`ml-auto flex items-center gap-1 ${e}`,...t})}function Y({children:e,className:t=``,onClick:n,onCopy:r,onError:i,timeout:a=2e3,...s}){let{code:c}=z(),[u,f]=(0,T.useState)(!1),{t:p}=l(`conversation`),m=(0,T.useRef)(null);(0,T.useEffect)(()=>()=>{m.current!==null&&clearTimeout(m.current)},[]);let h=async()=>{try{await navigator.clipboard.writeText(c),f(!0),r?.(),m.current!==null&&clearTimeout(m.current),m.current=setTimeout(()=>{f(!1)},a)}catch(e){i?.(e instanceof Error?e:Error(`Unable to copy code`))}};return(0,I.jsx)(y,{variant:`ghost`,"aria-label":p(u?`agentComponents.copiedCode`:`agentComponents.copyCode`),className:`grid size-7 shrink-0 place-items-center rounded-control text-muted-foreground transition-colors hover:bg-control-hover hover:text-foreground ${t}`,onClick:e=>{n?.(e),e.defaultPrevented||h()},type:`button`,...s,children:e??(u?(0,I.jsx)(o,{className:`size-3.5`,"aria-hidden":`true`}):(0,I.jsx)(d,{className:`size-3.5`,"aria-hidden":`true`}))})}function X(e){return e.split(/[\\/]/u).at(-1)??e}function Z({actions:e,lineNumber:t,onClose:n,onOpenDiff:r,previewKind:i,sourcePath:a,sourceStatus:o}){let{t:s}=l(`workbench`);return(0,I.jsxs)(G,{className:`min-h-toolbar gap-3 overflow-hidden bg-raised px-3 shadow-toolbar sm:px-4`,children:[(0,I.jsxs)(K,{className:`w-0 flex-1 overflow-hidden`,children:[i===`image`?(0,I.jsx)(w,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}):(0,I.jsx)(f,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,I.jsxs)(h,{children:[(0,I.jsx)(v,{asChild:!0,children:(0,I.jsxs)(`div`,{className:`w-0 flex-1 overflow-hidden`,children:[(0,I.jsx)(`h2`,{className:`truncate text-body-small font-semibold`,children:(0,I.jsxs)(q,{children:[X(a),t===null?null:` (line ${String(t)})`]})}),(0,I.jsx)(`p`,{className:`truncate text-caption text-muted-foreground`,children:a})]})}),(0,I.jsx)(_,{className:`break-all`,children:a})]})]}),o===null?null:(0,I.jsx)(`span`,{className:`shrink-0 text-label ${o===`error`?`text-danger`:`text-warning`}`,role:o===`error`?`alert`:`status`,children:s(o===`loading`?`projectDialog.loadingMoreSource`:o===`error`?`projectDialog.loadMoreSourceError`:`projectDialog.sourcePartial`)}),(0,I.jsxs)(J,{children:[r===void 0?null:(0,I.jsxs)(h,{children:[(0,I.jsx)(v,{asChild:!0,children:(0,I.jsx)(y,{"aria-label":s(`projectDialog.showDiff`),onClick:r,size:`icon-sm`,type:`button`,variant:`ghost`,children:(0,I.jsx)(C,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,I.jsx)(_,{children:s(`projectDialog.showDiff`)})]}),e,n===void 0?null:(0,I.jsxs)(h,{children:[(0,I.jsx)(v,{asChild:!0,children:(0,I.jsx)(y,{"aria-label":s(i===`image`?`projectDialog.closeImagePreview`:`projectDialog.closeSource`),onClick:n,size:`icon-sm`,type:`button`,variant:`ghost`,children:(0,I.jsx)(u,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,I.jsx)(_,{children:s(i===`image`?`projectDialog.closeImagePreview`:`projectDialog.closeSource`)})]})]})]})}var Q=400;function $(e){return e.scrollHeight-e.scrollTop-e.clientHeight<=Q}function ee(e,t){return e.nextCursor===null||e.nextCursor===t?void 0:e.nextCursor}function te(e){let t=e[0],n=e.at(-1);if(!(t===void 0||n===void 0))return{content:e.map(e=>e.content).join(``),nextCursor:n.nextCursor,path:t.path}}function ne({client:e,onClose:t,onOpenDiff:n,previewKind:r,projectId:o,reference:c,rootPath:u}){let{t:d}=l(`workbench`),f=(0,T.useRef)(null),[p,m]=(0,T.useState)(()=>O(D())),[g,C]=(0,T.useState)(!1),w=i({enabled:r===`source`,getNextPageParam:(e,t,n)=>ee(e,n),initialPageParam:void 0,queryFn:async({pageParam:t,signal:n})=>e.readProjectSourceFile(o,u,c.path,t,{signal:n}),queryKey:[`projects`,o,u??null,`source-file`,c.path],staleTime:3e4}),E=w.data?.pages,A=w.fetchNextPage,j=w.hasNextPage,M=w.isFetchingNextPage,N=(0,T.useMemo)(()=>E===void 0?void 0:te(E),[E]),P=N?.path??c.path,F=N?.content??``,L=X(P),R=a(``,o,c.path,u),z=b(P),B=(z===`markdown`||z===`mdx`)&&N?.nextCursor===null,V=B&&p;(0,T.useEffect)(()=>{C(!1)},[r,c.path]),(0,T.useEffect)(()=>{let e=c.lineNumber;if(N===void 0||e===null||V)return;let t=f.current?.querySelector(`[data-code-line="${String(e)}"]`);if(t!=null){t.scrollIntoView({block:`center`});return}j&&!M&&A()},[A,j,M,c.lineNumber,N,V]);let H=N===void 0?null:M?`loading`:w.isFetchNextPageError?`error`:j?`partial`:null,U={lineNumber:c.lineNumber,...t===void 0?{}:{onClose:t},...n===void 0?{}:{onOpenDiff:n},previewKind:r,sourcePath:P,sourceStatus:H},G=e=>{if(r!==`source`||!j||M)return;let t=e.target;!(t instanceof HTMLElement)||!$(t)||A()},K=e=>{m(e),k(e,D())};return(0,I.jsx)(`section`,{"aria-label":P,className:`h-full min-h-0 bg-raised`,onScrollCapture:G,ref:f,children:r===`image`?(0,I.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] bg-content`,children:[(0,I.jsx)(Z,{...U}),(0,I.jsx)(`div`,{className:`grid min-h-0 place-items-center overflow-hidden p-4 sm:p-6`,children:g?(0,I.jsx)(`div`,{className:`text-body-small text-danger`,role:`alert`,children:d(`projectDialog.loadImageError`)}):(0,I.jsx)(`img`,{alt:L,className:`block size-full object-contain`,decoding:`async`,onError:()=>{C(!0)},src:R})})]}):N===void 0&&w.isPending?(0,I.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)]`,children:[(0,I.jsx)(Z,{...U}),(0,I.jsx)(`div`,{className:`grid min-h-48 place-items-center text-body-small text-muted-foreground`,role:`status`,children:d(`projectDialog.loadingSource`)})]}):N===void 0&&w.error!==null?(0,I.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)]`,children:[(0,I.jsx)(Z,{...U}),(0,I.jsx)(`div`,{className:`grid min-h-48 place-items-center text-body-small text-danger`,role:`alert`,children:d(`projectDialog.loadSourceError`)})]}):V?(0,I.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] bg-content`,children:[(0,I.jsx)(Z,{...U,actions:(0,I.jsxs)(h,{children:[(0,I.jsx)(v,{asChild:!0,children:(0,I.jsx)(y,{"aria-label":d(`projectDialog.showRawContent`),onClick:()=>{K(!1)},size:`icon-sm`,type:`button`,variant:`ghost`,children:(0,I.jsx)(S,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,I.jsx)(_,{children:d(`projectDialog.showRawContent`)})]})}),(0,I.jsx)(`div`,{className:`min-h-0 overflow-auto px-5 py-4 sm:px-8 sm:py-6`,children:(0,I.jsx)(x,{className:`mx-auto max-w-4xl`,children:F})})]}):(0,I.jsx)(W,{className:`grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] rounded-none bg-content shadow-none`,code:F,highlightedLine:c.lineNumber,language:z,showLineNumbers:!0,children:(0,I.jsx)(Z,{...U,actions:(0,I.jsxs)(I.Fragment,{children:[B?(0,I.jsxs)(h,{children:[(0,I.jsx)(v,{asChild:!0,children:(0,I.jsx)(y,{"aria-label":d(`projectDialog.previewMarkdown`),onClick:()=>{K(!0)},size:`icon-sm`,type:`button`,variant:`ghost`,children:(0,I.jsx)(s,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,I.jsx)(_,{children:d(`projectDialog.previewMarkdown`)})]}):null,(0,I.jsx)(Y,{})]})})})})}export{q as a,S as c,Y as i,W as n,G as o,J as r,K as s,ne as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r}from"./initial-deps-BsEyuMB0.js";import{nt as i}from"./initial-deps-DqJTHr9A.js";import{m as a}from"./prompt-input-controls-j_r9SnuL.js";import"./index-DwEl9mCY.js";var o=e(t(),1),s=n();function c(e,t,n){let r=0;for(let i=0;i<e.length;){let a=e.codePointAt(i);if(a===void 0)break;if(i+=a>65535?2:1,r+=1,r>t)return new File([e],n,{type:`text/plain`})}}function l(e,t){return t===void 0||t.trim()===``||t.split(`,`).some(t=>{let n=t.trim();return n.startsWith(`.`)?e.name.toLowerCase().endsWith(n.toLowerCase()):n.endsWith(`/*`)?e.type.startsWith(n.slice(0,-1)):e.type===n})}function u(e){e.previewUrl.startsWith(`blob:`)&&URL.revokeObjectURL(e.previewUrl)}function d({attachments:e,children:t,className:n=``,disabled:d=!1,fileAccept:f,globalDrop:p=!1,imageAccept:m,largePasteCharacterThreshold:h=1/0,maxFileTotalSize:g=1/0,maxFileSize:_=1/0,maxImageSize:v=1/0,maxImages:y=1/0,maxImageTotalSize:b=1/0,multiple:x=!1,onAttachmentsChange:S,onError:C,onPaste:w,onPasteCapture:T,onSubmit:E,pastedTextFileName:D=`Pasted text.txt`,resetKey:O,...k}){let{t:A}=i(`conversation`),[j,M]=(0,o.useState)([]),N=e??j,P=(0,o.useRef)(N),F=(0,o.useRef)(null),I=(0,o.useRef)(null),L=(0,o.useRef)(e!==void 0),R=(0,o.useRef)(O);P.current=N,L.current=e!==void 0;let z=(0,o.useCallback)(t=>{if(e!==void 0){S?.(t(e));return}M(e=>[...t(e)])},[e,S]),B=(0,o.useCallback)((e,t=!1)=>{z(n=>{if(d)return n;let i=[],a=n.filter(e=>e.kind===`image`).length,o=n.reduce((e,t)=>e+(t.kind===`image`?t.size:0),0),s=n.reduce((e,t)=>e+(t.kind===`image`?0:t.size),0);for(let n of e){let e=t?`text`:l(n,m)?`image`:`file`;if(!(e===`text`||(e===`image`?l(n,m):l(n,f)))){C?.({code:`invalid_file_type`,message:A(`agentComponents.invalidFileType`,{name:n.name})});continue}if(e!==`image`&&n.size>_){C?.({code:`file_too_large`,message:A(`agentComponents.fileTooLarge`,{name:n.name})});continue}if(e===`image`&&n.size>v){C?.({code:`file_too_large`,message:A(`agentComponents.fileTooLarge`,{name:n.name})});continue}if(e===`image`&&a>=y){C?.({code:`too_many_images`,message:A(`agentComponents.tooManyImages`,{count:y})});continue}if(e===`image`&&o+n.size>b){C?.({code:`total_size_exceeded`,message:A(`agentComponents.totalImageSizeExceeded`)});continue}if(e!==`image`&&s+n.size>g){C?.({code:`total_size_exceeded`,message:A(`agentComponents.totalAttachmentSizeExceeded`)});continue}if(i.push({file:n,id:r(),kind:e,mediaType:n.type,name:n.name,previewUrl:URL.createObjectURL(n),size:n.size,source:`browser`}),e===`image`?(a+=1,o+=n.size):s+=n.size,!x)break}return[...n,...i]})},[d,f,m,_,g,v,y,b,x,C,A,z]),V=(0,o.useCallback)(()=>{z(e=>(e.forEach(u),[]))},[z]),H=(0,o.useCallback)(e=>{(e===`image`?I:F).current?.click()},[]);(0,o.useLayoutEffect)(()=>{R.current!==O&&(R.current=O,e===void 0&&V())},[e,V,O]);let U=(0,o.useCallback)(e=>{z(t=>{let n=t.find(t=>t.id===e);return n!==void 0&&u(n),t.filter(t=>t.id!==e)})},[z]);(0,o.useEffect)(()=>()=>{L.current||P.current.forEach(u)},[]),(0,o.useEffect)(()=>{e===void 0&&S?.(j)},[e,j,S]),(0,o.useEffect)(()=>{if(!p||d)return;let e=e=>{e.dataTransfer?.types.includes(`Files`)===!0&&e.preventDefault()},t=e=>{e.dataTransfer?.files.length&&(e.preventDefault(),B([...e.dataTransfer.files]))};return document.addEventListener(`dragover`,e),document.addEventListener(`drop`,t),()=>{document.removeEventListener(`dragover`,e),document.removeEventListener(`drop`,t)}},[B,d,p]);let W=(0,o.useMemo)(()=>({clear:V,disabled:d,files:N,openFilePicker:H,remove:U}),[V,d,N,H,U]),G=e=>{let t=e.files;t!==null&&t.length>0&&B([...t]),e.value=``};return(0,s.jsx)(a.Provider,{value:W,children:(0,s.jsxs)(`form`,{...k,className:`overflow-visible rounded-surface border border-transparent bg-raised shadow-floating transition-[border-color,box-shadow] focus-within:border-brand focus-within:shadow-focus ${n}`,"data-prompt-input":``,onPasteCapture:e=>{if(T?.(e),d||e.defaultPrevented||e.clipboardData.files.length>0)return;let t=c(e.clipboardData.getData(`text/plain`),h,D);t!==void 0&&(e.preventDefault(),B([t],!0))},onPaste:e=>{if(w?.(e),d||e.defaultPrevented)return;let t=[...e.clipboardData.files];t.length>0&&(e.preventDefault(),B(t))},onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`message`);E?.({files:N,text:typeof t==`string`?t:``},e)},children:[(0,s.jsx)(`input`,{...f===void 0?{}:{accept:f},"data-prompt-input-picker":`file`,disabled:d,hidden:!0,multiple:x,onChange:e=>{G(e.currentTarget)},ref:F,type:`file`}),(0,s.jsx)(`input`,{...m===void 0?{}:{accept:m},"data-prompt-input-picker":`image`,disabled:d,hidden:!0,multiple:x,onChange:e=>{G(e.currentTarget)},ref:I,type:`file`}),t]})})}export{d as t};
1
+ import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r}from"./initial-deps-BsEyuMB0.js";import{it as i}from"./initial-deps-DKh4Kqow.js";import{m as a}from"./prompt-input-controls-qBjai56L.js";import"./index-v4sEBOkU.js";var o=e(t(),1),s=n();function c(e,t,n){let r=0;for(let i=0;i<e.length;){let a=e.codePointAt(i);if(a===void 0)break;if(i+=a>65535?2:1,r+=1,r>t)return new File([e],n,{type:`text/plain`})}}function l(e,t){return t===void 0||t.trim()===``||t.split(`,`).some(t=>{let n=t.trim();return n.startsWith(`.`)?e.name.toLowerCase().endsWith(n.toLowerCase()):n.endsWith(`/*`)?e.type.startsWith(n.slice(0,-1)):e.type===n})}function u(e){e.previewUrl.startsWith(`blob:`)&&URL.revokeObjectURL(e.previewUrl)}function d({attachments:e,children:t,className:n=``,disabled:d=!1,fileAccept:f,globalDrop:p=!1,imageAccept:m,largePasteCharacterThreshold:h=1/0,maxFileTotalSize:g=1/0,maxFileSize:_=1/0,maxImageSize:v=1/0,maxImages:y=1/0,maxImageTotalSize:b=1/0,multiple:x=!1,onAttachmentsChange:S,onError:C,onPaste:w,onPasteCapture:T,onSubmit:E,pastedTextFileName:D=`Pasted text.txt`,resetKey:O,...k}){let{t:A}=i(`conversation`),[j,M]=(0,o.useState)([]),N=e??j,P=(0,o.useRef)(N),F=(0,o.useRef)(null),I=(0,o.useRef)(null),L=(0,o.useRef)(e!==void 0),R=(0,o.useRef)(O);P.current=N,L.current=e!==void 0;let z=(0,o.useCallback)(t=>{if(e!==void 0){S?.(t(e));return}M(e=>[...t(e)])},[e,S]),B=(0,o.useCallback)((e,t=!1)=>{z(n=>{if(d)return n;let i=[],a=n.filter(e=>e.kind===`image`).length,o=n.reduce((e,t)=>e+(t.kind===`image`?t.size:0),0),s=n.reduce((e,t)=>e+(t.kind===`image`?0:t.size),0);for(let n of e){let e=t?`text`:l(n,m)?`image`:`file`;if(!(e===`text`||(e===`image`?l(n,m):l(n,f)))){C?.({code:`invalid_file_type`,message:A(`agentComponents.invalidFileType`,{name:n.name})});continue}if(e!==`image`&&n.size>_){C?.({code:`file_too_large`,message:A(`agentComponents.fileTooLarge`,{name:n.name})});continue}if(e===`image`&&n.size>v){C?.({code:`file_too_large`,message:A(`agentComponents.fileTooLarge`,{name:n.name})});continue}if(e===`image`&&a>=y){C?.({code:`too_many_images`,message:A(`agentComponents.tooManyImages`,{count:y})});continue}if(e===`image`&&o+n.size>b){C?.({code:`total_size_exceeded`,message:A(`agentComponents.totalImageSizeExceeded`)});continue}if(e!==`image`&&s+n.size>g){C?.({code:`total_size_exceeded`,message:A(`agentComponents.totalAttachmentSizeExceeded`)});continue}if(i.push({file:n,id:r(),kind:e,mediaType:n.type,name:n.name,previewUrl:URL.createObjectURL(n),size:n.size,source:`browser`}),e===`image`?(a+=1,o+=n.size):s+=n.size,!x)break}return[...n,...i]})},[d,f,m,_,g,v,y,b,x,C,A,z]),V=(0,o.useCallback)(()=>{z(e=>(e.forEach(u),[]))},[z]),H=(0,o.useCallback)(e=>{(e===`image`?I:F).current?.click()},[]);(0,o.useLayoutEffect)(()=>{R.current!==O&&(R.current=O,e===void 0&&V())},[e,V,O]);let U=(0,o.useCallback)(e=>{z(t=>{let n=t.find(t=>t.id===e);return n!==void 0&&u(n),t.filter(t=>t.id!==e)})},[z]);(0,o.useEffect)(()=>()=>{L.current||P.current.forEach(u)},[]),(0,o.useEffect)(()=>{e===void 0&&S?.(j)},[e,j,S]),(0,o.useEffect)(()=>{if(!p||d)return;let e=e=>{e.dataTransfer?.types.includes(`Files`)===!0&&e.preventDefault()},t=e=>{e.dataTransfer?.files.length&&(e.preventDefault(),B([...e.dataTransfer.files]))};return document.addEventListener(`dragover`,e),document.addEventListener(`drop`,t),()=>{document.removeEventListener(`dragover`,e),document.removeEventListener(`drop`,t)}},[B,d,p]);let W=(0,o.useMemo)(()=>({clear:V,disabled:d,files:N,openFilePicker:H,remove:U}),[V,d,N,H,U]),G=e=>{let t=e.files;t!==null&&t.length>0&&B([...t]),e.value=``};return(0,s.jsx)(a.Provider,{value:W,children:(0,s.jsxs)(`form`,{...k,className:`overflow-visible rounded-surface border border-transparent bg-raised shadow-floating transition-[border-color,box-shadow] focus-within:border-brand focus-within:shadow-focus ${n}`,"data-prompt-input":``,onPasteCapture:e=>{if(T?.(e),d||e.defaultPrevented||e.clipboardData.files.length>0)return;let t=c(e.clipboardData.getData(`text/plain`),h,D);t!==void 0&&(e.preventDefault(),B([t],!0))},onPaste:e=>{if(w?.(e),d||e.defaultPrevented)return;let t=[...e.clipboardData.files];t.length>0&&(e.preventDefault(),B(t))},onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`message`);E?.({files:N,text:typeof t==`string`?t:``},e)},children:[(0,s.jsx)(`input`,{...f===void 0?{}:{accept:f},"data-prompt-input-picker":`file`,disabled:d,hidden:!0,multiple:x,onChange:e=>{G(e.currentTarget)},ref:F,type:`file`}),(0,s.jsx)(`input`,{...m===void 0?{}:{accept:m},"data-prompt-input-picker":`image`,disabled:d,hidden:!0,multiple:x,onChange:e=>{G(e.currentTarget)},ref:I,type:`file`}),t]})})}export{d as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{E as r,Y as i,et as a,it as o,v as s}from"./initial-deps-DKh4Kqow.js";import{_t as c}from"./index-v4sEBOkU.js";var l=a(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),u=a(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),d=a(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),f=a(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),p=e(t(),1);function m(e){return e.isComposing||e.keyCode===229}function h(e){return e.key===`Enter`&&(e.shiftKey||e.metaKey||e.ctrlKey)}var g=(0,p.createContext)(void 0);function _(){let e=(0,p.useContext)(g);if(e===void 0)throw Error(`usePromptInputAttachments must be used inside PromptInput`);return e}var v=n();function y({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`overflow-hidden rounded-surface border border-separator-strong bg-raised shadow-floating ${e}`,"data-prompt-input-command":``,role:`listbox`,...t})}function b({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`max-h-96 overflow-y-auto p-1 ${e}`,"data-prompt-input-command-list":``,...t})}function x({children:e,className:t=``,label:n,...r}){return(0,v.jsxs)(`div`,{"aria-label":n,className:t,role:`group`,...r,children:[(0,v.jsx)(`div`,{className:`px-2 py-1.5 text-caption font-medium text-muted-foreground`,children:n}),e]})}function S({active:e=!1,className:t=``,onMouseDown:n,selected:r=!1,type:i=`button`,...a}){let o=(0,p.useRef)(null);return(0,p.useEffect)(()=>{e&&o.current?.scrollIntoView({block:`nearest`})},[e]),(0,v.jsx)(c,{variant:`ghost`,"aria-selected":r,className:`flex h-auto min-h-8 w-full items-center gap-2 whitespace-normal rounded-control px-2 py-2 text-left text-body-small text-foreground transition-colors hover:bg-control-hover disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent ${e?`bg-control-active`:``} ${t}`,"data-active":e||void 0,onMouseDown:e=>{e.preventDefault(),n?.(e)},ref:o,role:`option`,type:i,...a})}function C({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`px-3 py-5 text-center text-body-small text-muted-foreground ${e}`,role:`status`,...t})}function w({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`px-3 pt-2 ${e}`,...t})}function T({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`px-3 pt-2 ${e}`,...t})}function E({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`flex min-h-10 items-center justify-between gap-2 px-2 pb-2 ${e}`,...t})}function D({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`flex min-w-0 items-center gap-1 ${e}`,...t})}(0,p.forwardRef)(function({className:e=``,name:t=`message`,onKeyDown:n,rows:r=2,...i},a){return(0,v.jsx)(`textarea`,{className:`max-h-40 min-h-12 w-full resize-none bg-transparent px-1 py-1 text-sm leading-5 text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed ${e}`,name:t,onKeyDown:e=>{n?.(e),!e.defaultPrevented&&e.key===`Enter`&&!h(e)&&!m(e.nativeEvent)&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())},ref:a,rows:r,...i})});function O({label:e,onSelect:t,separated:n=!1,showHeading:r=!0}){let{t:i}=o(`conversation`);return(0,v.jsxs)(`div`,{"aria-label":e,className:n?`mt-1 border-t border-separator pt-1`:void 0,role:`group`,children:[r?(0,v.jsx)(`p`,{className:`px-2 pb-1 pt-1 text-caption text-muted-foreground`,children:e}):null,(0,v.jsxs)(c,{variant:`ghost`,className:`flex h-8 w-full items-center gap-2 rounded-control px-2 text-label text-foreground hover:bg-control-hover`,contentAlign:`start`,onClick:()=>{t(`image`)},role:`menuitem`,type:`button`,children:[(0,v.jsx)(u,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),i(`agentComponents.addImage`)]}),(0,v.jsxs)(c,{variant:`ghost`,className:`flex h-8 w-full items-center gap-2 rounded-control px-2 text-label text-foreground hover:bg-control-hover`,contentAlign:`start`,onClick:()=>{t(`file`)},role:`menuitem`,type:`button`,children:[(0,v.jsx)(l,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),i(`agentComponents.addFile`)]})]})}function k({children:e,label:t,onClick:n,onSelectKind:r,showDeploymentHost:i=!1,...a}){let s=_(),{t:c}=o(`conversation`),[l,u]=(0,p.useState)(!1),f=(0,p.useRef)(null),m=a.disabled===!0||s.disabled,h=t??c(`agentComponents.addImageOrFile`);return(0,p.useEffect)(()=>{if(!l)return;let e=e=>{f.current?.contains(e.target)||u(!1)},t=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[l]),(0,v.jsxs)(`div`,{className:`relative`,ref:f,children:[(0,v.jsx)(A,{...a,"aria-expanded":l,"aria-haspopup":`menu`,"aria-label":h,disabled:m,onClick:e=>{n?.(e),e.defaultPrevented||u(e=>!e)},title:h,children:e??(0,v.jsx)(d,{"aria-hidden":`true`,className:`size-3.5`})}),(0,v.jsxs)(`div`,{className:`absolute bottom-9 left-0 z-50 min-w-40 rounded-control border border-separator-strong bg-raised p-1 shadow-floating`,"data-floating-surface":!0,hidden:!l,role:`menu`,children:[(0,v.jsx)(O,{label:c(`agentComponents.currentDevice`),onSelect:e=>{u(!1),s.openFilePicker(e)},showHeading:i}),i?(0,v.jsx)(O,{label:c(`agentComponents.deploymentHost`),onSelect:e=>{u(!1),r(e)},separated:!0}):null]})]})}function A({children:e,className:t=``,type:n=`button`,...r}){return(0,v.jsx)(c,{className:`max-workbench:min-w-11 ${t}`,size:`sm`,type:n,variant:`ghost`,...r,children:e??(0,v.jsx)(s,{className:`size-3.5`,"aria-hidden":`true`})})}function j({className:e=``,...t}){return(0,v.jsx)(`select`,{className:`h-7 w-auto max-w-40 appearance-none rounded-control border-0 bg-transparent px-1.5 text-label text-muted-foreground outline-none [field-sizing:content] hover:bg-control-hover disabled:cursor-not-allowed disabled:opacity-45 max-workbench:h-11 ${e}`,...t})}function M({children:e,className:t=``,status:n,type:a=`submit`,...o}){let s=n===`reconnecting`||n===`submitting`;return(0,v.jsx)(c,{className:t,size:`icon-compact`,type:a,variant:`inverse`,...o,children:e??(n===`running`?(0,v.jsx)(f,{className:`size-3.5 fill-current`,"aria-hidden":`true`}):s?(0,v.jsx)(r,{className:`size-4 animate-spin`,"aria-hidden":`true`}):(0,v.jsx)(i,{className:`size-4`,"aria-hidden":`true`}))})}export{_,C as a,u as b,b as c,j as d,M as f,h as g,m as h,y as i,E as l,g as m,w as n,x as o,D as p,A as r,S as s,k as t,T as u,f as v,l as x,d as y};