@cardstack/boxel-cli 0.3.2-unstable.59 → 0.3.2-unstable.60

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 (921) hide show
  1. package/api.ts +3 -3
  2. package/bundled-realms/base/command.gts +73 -0
  3. package/bundled-test-harness/assets/adapter-TgpmkD23.js +2 -0
  4. package/bundled-test-harness/assets/add-field-to-card-definition-command-test-BVVD6_Wq.js +111 -0
  5. package/bundled-test-harness/assets/add-workspace-test-BvvYJ2Fk.js +71 -0
  6. package/bundled-test-harness/assets/ai-assistant-Ba_RBqf6.js +129 -0
  7. package/bundled-test-harness/assets/ai-assistant-panel-service-test-DK87n1hh.js +95 -0
  8. package/bundled-test-harness/assets/ai-assistant-test-CZATBlJS.js +2137 -0
  9. package/bundled-test-harness/assets/ai-function-generation-test-e58MHziu.js +996 -0
  10. package/bundled-test-harness/assets/ai-module-creation-test-CEieL3Fa.js +150 -0
  11. package/bundled-test-harness/assets/aibot-message-DhTbAqNk.js +1185 -0
  12. package/bundled-test-harness/assets/amd-transpile-test-CSk5COu7.js +425 -0
  13. package/bundled-test-harness/assets/app-Btfy4HWI.js +21464 -0
  14. package/bundled-test-harness/assets/apply-boxel-formatting-test-BHTP9NBp.js +134 -0
  15. package/bundled-test-harness/assets/apply-markdown-edit-test-BETCndeK.js +230 -0
  16. package/bundled-test-harness/assets/apply-search-replace-block-test-KNolar0-.js +630 -0
  17. package/bundled-test-harness/assets/arc-CA8yZ0zo.js +199 -0
  18. package/bundled-test-harness/assets/architecture-7EHR7CIX-C5JFMGdb.js +3 -0
  19. package/bundled-test-harness/assets/architectureDiagram-3BPJPVTR-CmVPjKgm.js +7400 -0
  20. package/bundled-test-harness/assets/auth-error-guard-test-D0rKESg_.js +30 -0
  21. package/bundled-test-harness/assets/auth-service-worker-test-DGg_vbKo.js +538 -0
  22. package/bundled-test-harness/assets/authed-fetch-test-CHF3eh_H.js +75 -0
  23. package/bundled-test-harness/assets/avif-image-def-test-p9tiyh4_.js +186 -0
  24. package/bundled-test-harness/assets/base-realm-Chjzrp6m.js +2 -0
  25. package/bundled-test-harness/assets/base-realm-DpSTsZxD.js +140 -0
  26. package/bundled-test-harness/assets/basic-test-D7qEz4hw.js +128 -0
  27. package/bundled-test-harness/assets/bfm-card-references-test-D-m1YnL8.js +577 -0
  28. package/bundled-test-harness/assets/binary-upload-dedupe-test-8RKK73EG.js +308 -0
  29. package/bundled-test-harness/assets/blockDiagram-GPEHLZMM-BdVFTa2C.js +4355 -0
  30. package/bundled-test-harness/assets/bot-registration-test-9zYny2wR.js +99 -0
  31. package/bundled-test-harness/assets/box-test-0T92xi3A.js +51 -0
  32. package/bundled-test-harness/assets/brand-guide-attachments-test-5ZtPn4cC.js +87 -0
  33. package/bundled-test-harness/assets/brand-guide-custom-css-test-CKKSgKyp.js +135 -0
  34. package/bundled-test-harness/assets/brand-logo-mark-field-test-nlNNQ3rw.js +87 -0
  35. package/bundled-test-harness/assets/broken-link-template-test-BGIExVof.js +345 -0
  36. package/bundled-test-harness/assets/browser-index-BaR-gTqG.js +3 -0
  37. package/bundled-test-harness/assets/browser-index-G4NKYBAj.js +8802 -0
  38. package/bundled-test-harness/assets/c4Diagram-AAUBKEIU-DyugX7zz.js +3764 -0
  39. package/bundled-test-harness/assets/cached-fetch-test-MtqvDphJ.js +93 -0
  40. package/bundled-test-harness/assets/can-read-realm-test-BZmwIOqS.js +58 -0
  41. package/bundled-test-harness/assets/cancel-indexing-job-test-BsQtQbDu.js +71 -0
  42. package/bundled-test-harness/assets/card-api-test-BxQ8f0-c.js +196 -0
  43. package/bundled-test-harness/assets/card-basics-test-B-uBZ8o4.js +4895 -0
  44. package/bundled-test-harness/assets/card-catalog-test-YmwmyIKf.js +377 -0
  45. package/bundled-test-harness/assets/card-copy-test-LoqdH1CQ.js +777 -0
  46. package/bundled-test-harness/assets/card-def-field-def-relationships-test-DvtBA1jv.js +560 -0
  47. package/bundled-test-harness/assets/card-def-menu-items-test-DHnd0LuM.js +182 -0
  48. package/bundled-test-harness/assets/card-delete-test-vKF0Jf1X.js +412 -0
  49. package/bundled-test-harness/assets/card-directory-name-test-CbCuPwSz.js +71 -0
  50. package/bundled-test-harness/assets/card-playground-test-CRIP3b5-.js +1497 -0
  51. package/bundled-test-harness/assets/card-prerender-ClYlSOBU.js +12661 -0
  52. package/bundled-test-harness/assets/card-search-adorn-test-Mggk5ZgY.js +128 -0
  53. package/bundled-test-harness/assets/card-search-query-builder-test-Cdl12s50.js +88 -0
  54. package/bundled-test-harness/assets/card-search-selection-menu-test-CtuCCLoB.js +108 -0
  55. package/bundled-test-harness/assets/channel-BKUMepxs.js +8 -0
  56. package/bundled-test-harness/assets/check-correctness-test-DBh8DT_f.js +252 -0
  57. package/bundled-test-harness/assets/chunk-2J33WTMH-ClrRoNQU.js +31 -0
  58. package/bundled-test-harness/assets/chunk-3OPIFGDE-g_0Oh8jN.js +5548 -0
  59. package/bundled-test-harness/assets/chunk-4BX2VUAB-D2LCc7Y9.js +11 -0
  60. package/bundled-test-harness/assets/chunk-4EGX6M5U-D8vRS5IG.js +44 -0
  61. package/bundled-test-harness/assets/chunk-55IACEB6-C5j4VAmb.js +10 -0
  62. package/bundled-test-harness/assets/chunk-5DO6E6H7-CPb3jsP0.js +27 -0
  63. package/bundled-test-harness/assets/chunk-5ZQYHXKU-BlVb7vgG.js +1767 -0
  64. package/bundled-test-harness/assets/chunk-727SXJPM-C_NVCDMC.js +3877 -0
  65. package/bundled-test-harness/assets/chunk-AQP2D5EJ-CpwrMix_.js +2622 -0
  66. package/bundled-test-harness/assets/chunk-BR22UD5L-AF0NWdjT.js +85 -0
  67. package/bundled-test-harness/assets/chunk-BSJP7CBP-Dgun5vYb.js +114 -0
  68. package/bundled-test-harness/assets/chunk-CSCIHK7Q-D7nFiAZ-.js +6144 -0
  69. package/bundled-test-harness/assets/chunk-FHYWG6QK-2nuXS9PL.js +27 -0
  70. package/bundled-test-harness/assets/chunk-FMBD7UC4-O-Y8VK1S.js +20 -0
  71. package/bundled-test-harness/assets/chunk-KSCS5N6A-Du5-DprU.js +871 -0
  72. package/bundled-test-harness/assets/chunk-L5ZTLDWV-C2lDtkix.js +43 -0
  73. package/bundled-test-harness/assets/chunk-LZXEDZCA-qAMsMZkF.js +65 -0
  74. package/bundled-test-harness/assets/chunk-MPE355IW-DcT_60Oq.js +27 -0
  75. package/bundled-test-harness/assets/chunk-MZUSXYTE-BsH_YmnC.js +36 -0
  76. package/bundled-test-harness/assets/chunk-N66VUXT2-DMyMHgoS.js +70 -0
  77. package/bundled-test-harness/assets/chunk-ND2GUHAM-DO1Znn8O.js +93 -0
  78. package/bundled-test-harness/assets/chunk-NZK2D7GU-B1YWBxHm.js +89 -0
  79. package/bundled-test-harness/assets/chunk-O5CBEL6O-CZVSBsRq.js +2395 -0
  80. package/bundled-test-harness/assets/chunk-PUPMXCY4-DzOK-Vbt.js +27 -0
  81. package/bundled-test-harness/assets/chunk-QZHKN3VN-DJFnRn99.js +20 -0
  82. package/bundled-test-harness/assets/chunk-UIBZB4QT-5KIxBxjk.js +27 -0
  83. package/bundled-test-harness/assets/chunk-WCWK7LTN-BsQwhliq.js +36 -0
  84. package/bundled-test-harness/assets/chunk-WU5MYG2G-DUVb5MAo.js +12 -0
  85. package/bundled-test-harness/assets/chunk-XPW4576I-DLaJYAOU.js +2341 -0
  86. package/bundled-test-harness/assets/classDiagram-4FO5ZUOK-DjP2uozG.js +31 -0
  87. package/bundled-test-harness/assets/classDiagram-v2-Q7XG4LA2-Dt6ps5uz.js +31 -0
  88. package/bundled-test-harness/assets/code-equality-assertion-BBezFT13.js +474 -0
  89. package/bundled-test-harness/assets/code-patches-test-DzoQGARM.js +1128 -0
  90. package/bundled-test-harness/assets/code-patching-test-D8r-pJ5w.js +114 -0
  91. package/bundled-test-harness/assets/code-ref-test-DU3HChNz.js +138 -0
  92. package/bundled-test-harness/assets/code-semantics-service-test-DArUotKy.js +65 -0
  93. package/bundled-test-harness/assets/code-submode-test-h5wWKsz2.js +1762 -0
  94. package/bundled-test-harness/assets/codeblocks-test-FbuwTy5v.js +492 -0
  95. package/bundled-test-harness/assets/codemirror-context-DVlC9C78.js +2 -0
  96. package/bundled-test-harness/assets/codemirror-editor-test-JDT9uwqM.js +1176 -0
  97. package/bundled-test-harness/assets/color-field-test-BssRlQAX.js +213 -0
  98. package/bundled-test-harness/assets/command-definitions-test-J21kOxBs.js +72 -0
  99. package/bundled-test-harness/assets/commands-DAo0DgCX.js +1379 -0
  100. package/bundled-test-harness/assets/commands-calling-test-C3deVvv_.js +200 -0
  101. package/bundled-test-harness/assets/commands-test--0zViqs2.js +1041 -0
  102. package/bundled-test-harness/assets/commands-test-BwNn2npL.js +1145 -0
  103. package/bundled-test-harness/assets/computed-test-BD_KrZmc.js +882 -0
  104. package/bundled-test-harness/assets/container-C8gu0I0Q.js +14605 -0
  105. package/bundled-test-harness/assets/convert-to-class-name-test-CX21VRzM.js +17 -0
  106. package/bundled-test-harness/assets/copy-and-edit-test-BUy_o8XJ.js +291 -0
  107. package/bundled-test-harness/assets/copy-card-test-LWbugEPe.js +156 -0
  108. package/bundled-test-harness/assets/copy-file-to-realm-test-BS25EUGV.js +99 -0
  109. package/bundled-test-harness/assets/copy-source-test-Dh33cqM8.js +56 -0
  110. package/bundled-test-harness/assets/cose-bilkent-S5V4N54A-CjAFDdpS.js +4275 -0
  111. package/bundled-test-harness/assets/create-file-test-DOc3YYij.js +963 -0
  112. package/bundled-test-harness/assets/create-file-test-DgUya7-i.js +397 -0
  113. package/bundled-test-harness/assets/create-listing-modal-test-DZxZBYS7.js +194 -0
  114. package/bundled-test-harness/assets/create-listing-pr-request-Aw0ms76l.js +64 -0
  115. package/bundled-test-harness/assets/create-listing-pr-request-test-CFvqkgky.js +117 -0
  116. package/bundled-test-harness/assets/create-spec-test-BTRt8oe8.js +239 -0
  117. package/bundled-test-harness/assets/csv-file-def-test-BVffg8wL.js +101 -0
  118. package/bundled-test-harness/assets/dagre-BM42HDAG-GoRrN65x.js +606 -0
  119. package/bundled-test-harness/assets/dagre-ByxOOmYM.js +4195 -0
  120. package/bundled-test-harness/assets/date-time-fields-test-BEcfCqgB.js +322 -0
  121. package/bundled-test-harness/assets/debug-message-test-CAxbe6x2.js +119 -0
  122. package/bundled-test-harness/assets/diagram-2AECGRRQ-B6-pvp9H.js +279 -0
  123. package/bundled-test-harness/assets/diagram-5GNKFQAL-C9M7hXIc.js +142 -0
  124. package/bundled-test-harness/assets/diagram-KO2AKTUF-BNJvCLGK.js +551 -0
  125. package/bundled-test-harness/assets/diagram-LMA3HP47-hlJyTtqP.js +184 -0
  126. package/bundled-test-harness/assets/diagram-OG6HWLK6-BvPoB3IH.js +857 -0
  127. package/bundled-test-harness/assets/diffing-test-De9Ev_Fr.js +210 -0
  128. package/bundled-test-harness/assets/dist-BsEojs3T.js +232 -0
  129. package/bundled-test-harness/assets/dist-CY3T64Hs.js +105 -0
  130. package/bundled-test-harness/assets/dist-q2xz8RMj.js +2 -0
  131. package/bundled-test-harness/assets/editor-test-DOI_TvWQ.js +551 -0
  132. package/bundled-test-harness/assets/editor.main-CpuM6HrX.js +43566 -0
  133. package/bundled-test-harness/assets/editor.main-DkMgS1qm.js +3 -0
  134. package/bundled-test-harness/assets/email-field-test-t-80Z94b.js +74 -0
  135. package/bundled-test-harness/assets/enum-field-test-DVp-2pip.js +909 -0
  136. package/bundled-test-harness/assets/erDiagram-TEJ5UH35-CYniRkua.js +2041 -0
  137. package/bundled-test-harness/assets/error-display-test-IuRxKyLz.js +343 -0
  138. package/bundled-test-harness/assets/evaluate-module-test-DdnfbFp-.js +66 -0
  139. package/bundled-test-harness/assets/eventmodeling-FCH6USID-BO089-Cs.js +3 -0
  140. package/bundled-test-harness/assets/execute-atomic-operations-test-CgbvrBlu.js +75 -0
  141. package/bundled-test-harness/assets/externals-5atxeNU4.js +5533 -0
  142. package/bundled-test-harness/assets/extract-css-variables-test-Cii-CYfc.js +169 -0
  143. package/bundled-test-harness/assets/fallback-banner-test-CUUd-Wuu.js +227 -0
  144. package/bundled-test-harness/assets/fallback-banner-test-D4NWyahM.js +53 -0
  145. package/bundled-test-harness/assets/fallback-models-test-2MJ1jAs8.js +163 -0
  146. package/bundled-test-harness/assets/fetch-card-json-test-Cruqsq6S.js +63 -0
  147. package/bundled-test-harness/assets/fetcher-test-CkHlbTzz.js +85 -0
  148. package/bundled-test-harness/assets/field-configuration-test-CqwsGNib.js +535 -0
  149. package/bundled-test-harness/assets/field-markdown-domain-test-DPjz8i4Y.js +615 -0
  150. package/bundled-test-harness/assets/field-markdown-primitives-test-Dw07UtT7.js +362 -0
  151. package/bundled-test-harness/assets/field-markdown-specialized-test-C-t34PAw.js +527 -0
  152. package/bundled-test-harness/assets/field-path-parser-test-BeNjacPu.js +387 -0
  153. package/bundled-test-harness/assets/field-playground-test-BILTGxqr.js +902 -0
  154. package/bundled-test-harness/assets/field-support-predicates-test-Df24w0Wa.js +170 -0
  155. package/bundled-test-harness/assets/field-test-helpers-P22hxBNz.js +45 -0
  156. package/bundled-test-harness/assets/file-attachment-test-Cjg4NBeM.js +635 -0
  157. package/bundled-test-harness/assets/file-chooser-test-Cl0XujPT.js +439 -0
  158. package/bundled-test-harness/assets/file-def-live-reload-test-D4Obzi12.js +50 -0
  159. package/bundled-test-harness/assets/file-def-manager-DUgR-gjs.js +470 -0
  160. package/bundled-test-harness/assets/file-def-manager-canonicalize-test-D_LWVsvz.js +451 -0
  161. package/bundled-test-harness/assets/file-def-menu-items-test-xvsUTOK4.js +114 -0
  162. package/bundled-test-harness/assets/file-def-navigation-test-DxPceB7E.js +109 -0
  163. package/bundled-test-harness/assets/file-def-serialization-test-CpwbDb8p.js +87 -0
  164. package/bundled-test-harness/assets/file-def-test-CEnKcvW9.js +219 -0
  165. package/bundled-test-harness/assets/file-tree-test-DE2aH6iq.js +773 -0
  166. package/bundled-test-harness/assets/flac-audio-def-test-BCg7LnR6.js +138 -0
  167. package/bundled-test-harness/assets/flowDiagram-I6XJVG4X-Xv8-LIxQ.js +4883 -0
  168. package/bundled-test-harness/assets/formatted-aibot-message-test-CsxFn62P.js +366 -0
  169. package/bundled-test-harness/assets/formatted-user-message-test-DjZc8qnA.js +43 -0
  170. package/bundled-test-harness/assets/freestyle-test-QEZaZCNJ.js +17 -0
  171. package/bundled-test-harness/assets/full-reindex-realm-test-C_c2OTTD.js +103 -0
  172. package/bundled-test-harness/assets/ganttDiagram-6RSMTGT7-DmvkzS5w.js +4060 -0
  173. package/bundled-test-harness/assets/garbage-collection-test-BVuvfidI.js +373 -0
  174. package/bundled-test-harness/assets/general-test-Ydis4jEq.js +926 -0
  175. package/bundled-test-harness/assets/generate-css-variables-test-CZCmgTAO.js +88 -0
  176. package/bundled-test-harness/assets/generate-example-cards-one-shot-test-x_szhkSN.js +67 -0
  177. package/bundled-test-harness/assets/get-available-realm-identifiers-test-DvRnwCHR.js +49 -0
  178. package/bundled-test-harness/assets/get-catalog-realm-identifiers-test-46TE-XA0.js +49 -0
  179. package/bundled-test-harness/assets/get-default-writable-realm-test-DaAkxTNh.js +56 -0
  180. package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-9XEGHVOV.js +55 -0
  181. package/bundled-test-harness/assets/get-relationship-membership-state-test-BY4gk5JZ.js +1306 -0
  182. package/bundled-test-harness/assets/get-type-refs-from-filter-test-BynlX0JE.js +136 -0
  183. package/bundled-test-harness/assets/get-user-system-card-test-D98Xxn1k.js +52 -0
  184. package/bundled-test-harness/assets/gif-image-def-test-FwKGFGWw.js +161 -0
  185. package/bundled-test-harness/assets/gitGraph-WXDBUCRP-Bmn0Z_Xi.js +3 -0
  186. package/bundled-test-harness/assets/gitGraphDiagram-PVQCEYII-BAo0G82W.js +1150 -0
  187. package/bundled-test-harness/assets/gts-file-def-test-ivEk8Muv.js +99 -0
  188. package/bundled-test-harness/assets/head-format-preview-test-CNhvk724.js +156 -0
  189. package/bundled-test-harness/assets/helpers-BH4Yfo_2.js +5 -0
  190. package/bundled-test-harness/assets/host-mode-test-BRNndb2h.js +391 -0
  191. package/bundled-test-harness/assets/host-submode-test-DHd0x-6x.js +904 -0
  192. package/bundled-test-harness/assets/index-query-engine-test-7Fzc09fG.js +2548 -0
  193. package/bundled-test-harness/assets/index-writer-test-D3cL2q2N.js +1842 -0
  194. package/bundled-test-harness/assets/indexeddb-crypto-store-C09Shau-.js +49434 -0
  195. package/bundled-test-harness/assets/info-J43DQDTF-Dz5b1Xgc.js +3 -0
  196. package/bundled-test-harness/assets/infoDiagram-5YYISTIA-Dl8XvIfi.js +23 -0
  197. package/bundled-test-harness/assets/inspector-test-CVZVQdIJ.js +1776 -0
  198. package/bundled-test-harness/assets/instance-filter-matcher-test-C-4z6qUt.js +564 -0
  199. package/bundled-test-harness/assets/instantiate-card-test-eQ22Vt_m.js +104 -0
  200. package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-hXPsRPMU.js +497 -0
  201. package/bundled-test-harness/assets/interact-submode-setup-D55IIVc5.js +558 -0
  202. package/bundled-test-harness/assets/interact-submode-test-BwrtFe2m.js +725 -0
  203. package/bundled-test-harness/assets/invalidate-realm-identifiers-test-BMk7yd-D.js +101 -0
  204. package/bundled-test-harness/assets/invite-user-to-room-test-B5B0umJQ.js +67 -0
  205. package/bundled-test-harness/assets/ishikawaDiagram-YF4QCWOH-BrO7NAng.js +1009 -0
  206. package/bundled-test-harness/assets/isolated-render-test-DX1wdHoS.js +51 -0
  207. package/bundled-test-harness/assets/item-button-QkVr-FW0.js +203 -0
  208. package/bundled-test-harness/assets/javascript-BWNQhcCY.js +75 -0
  209. package/bundled-test-harness/assets/job-priority-header-test-CuBZloLK.js +81 -0
  210. package/bundled-test-harness/assets/journeyDiagram-JHISSGLW-B7BT66v0.js +1256 -0
  211. package/bundled-test-harness/assets/jpg-image-def-test-DEx462nY.js +430 -0
  212. package/bundled-test-harness/assets/json-file-def-test-Cray6ly6.js +92 -0
  213. package/bundled-test-harness/assets/kanban-definition-UN3LZRKU-C0E5Vmr_.js +1284 -0
  214. package/bundled-test-harness/assets/last-modified-date-test-BzE25NOB.js +18 -0
  215. package/bundled-test-harness/assets/limited-set-test-NwGNoXKc.js +123 -0
  216. package/bundled-test-harness/assets/line-BbGOk93s.js +55 -0
  217. package/bundled-test-harness/assets/linear-CHTo-YQl.js +417 -0
  218. package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-CZdgRM1b.js +315 -0
  219. package/bundled-test-harness/assets/linksto-error-sentinel-test-DhsHO7Xs.js +236 -0
  220. package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-mt-RrRta.js +303 -0
  221. package/bundled-test-harness/assets/linksto-many-per-slot-access-test-CdGUXZsi.js +301 -0
  222. package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-DOJ_6Gwf.js +258 -0
  223. package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-BZC-gslF.js +194 -0
  224. package/bundled-test-harness/assets/live-prerendered-search-BSkwf5AH.js +639 -0
  225. package/bundled-test-harness/assets/live-test-DTfxZnsy.js +100 -0
  226. package/bundled-test-harness/assets/live-test-WOMYpc1I.js +2 -0
  227. package/bundled-test-harness/assets/loader-icon-error-test-F_ukQytn.js +62 -0
  228. package/bundled-test-harness/assets/loader-parallel-prefetch-test-DpNaFnhc.js +257 -0
  229. package/bundled-test-harness/assets/loader-retry-test-EQ2X0bFS.js +173 -0
  230. package/bundled-test-harness/assets/loader-test-BYkWAwc4.js +245 -0
  231. package/bundled-test-harness/assets/loading-test-jfWH_OpH.js +63 -0
  232. package/bundled-test-harness/assets/login-error-text-test-Cldr1X6h.js +51 -0
  233. package/bundled-test-harness/assets/m4a-audio-def-test-BQ1WKApD.js +185 -0
  234. package/bundled-test-harness/assets/main-ByAsLO_g.js +5 -0
  235. package/bundled-test-harness/assets/markdown-fallback-test-dtTaGP1s.js +316 -0
  236. package/bundled-test-harness/assets/markdown-file-def-test-shW9Xxd1.js +286 -0
  237. package/bundled-test-harness/assets/markdown-helpers-test-B6H7p4ay.js +183 -0
  238. package/bundled-test-harness/assets/markdown-highlighting-test-ZIrFNHRe.js +244 -0
  239. package/bundled-test-harness/assets/markdown-preview-KII3nJ2M.js +69 -0
  240. package/bundled-test-harness/assets/markdown-preview-test-De-IaUbK.js +237 -0
  241. package/bundled-test-harness/assets/marked-sync-CGSehq4u.js +2 -0
  242. package/bundled-test-harness/assets/marked-sync-DenC7QgC.js +2561 -0
  243. package/bundled-test-harness/assets/marked-sync-test-jZBr20Hq.js +146 -0
  244. package/bundled-test-harness/assets/matrix-service-sliding-sync-test-Ax4kyAMt.js +33 -0
  245. package/bundled-test-harness/assets/mermaid-parser.core-B_3tzKUl.js +114 -0
  246. package/bundled-test-harness/assets/mermaid.core-D2hqA7Hq.js +1700 -0
  247. package/bundled-test-harness/assets/message-service-subscription-test-B42KnJ91.js +113 -0
  248. package/bundled-test-harness/assets/mindmap-definition-RKZ34NQL-IZz7Qpd0.js +1347 -0
  249. package/bundled-test-harness/assets/mock-matrix-BhFWlMMr.js +14292 -0
  250. package/bundled-test-harness/assets/mock-matrix-CrtMntcN.js +2 -0
  251. package/bundled-test-harness/assets/module-transpile-cache-test-BtWN4OiM.js +66 -0
  252. package/bundled-test-harness/assets/monaco.contribution-B1hOUP3w.js +2 -0
  253. package/bundled-test-harness/assets/monaco.contribution-DhNsYtZe.js +2 -0
  254. package/bundled-test-harness/assets/monaco.contribution-DvJDImx2.js +103 -0
  255. package/bundled-test-harness/assets/monaco.contribution-yXcOyzue.js +243 -0
  256. package/bundled-test-harness/assets/mp3-audio-def-test-D365TuA7.js +129 -0
  257. package/bundled-test-harness/assets/mutex-test-DY09HLvv.js +71 -0
  258. package/bundled-test-harness/assets/number-field-test-wYaQjnzA.js +153 -0
  259. package/bundled-test-harness/assets/ogg-audio-def-test-Dl01PP31.js +191 -0
  260. package/bundled-test-harness/assets/open-create-listing-modal-test-D8C2PUFv.js +117 -0
  261. package/bundled-test-harness/assets/open-workspace-test-DN2n8IkC.js +48 -0
  262. package/bundled-test-harness/assets/operator-mode-acceptance-test-B_hzJZo4.js +1044 -0
  263. package/bundled-test-harness/assets/operator-mode-card-catalog-test-Hrrnkdt9.js +989 -0
  264. package/bundled-test-harness/assets/operator-mode-links-test-DC6sc9TZ.js +797 -0
  265. package/bundled-test-harness/assets/operator-mode-state-service-test-Aqz9_v0U.js +122 -0
  266. package/bundled-test-harness/assets/operator-mode-test-CLgpZGEM.js +617 -0
  267. package/bundled-test-harness/assets/operator-mode-ui-test-CDRrORfC.js +985 -0
  268. package/bundled-test-harness/assets/ordinal-BIRuJQBH.js +85 -0
  269. package/bundled-test-harness/assets/overlay-menu-items-test-of24KuXp.js +316 -0
  270. package/bundled-test-harness/assets/packet-YPE3B663-hs92geQG.js +3 -0
  271. package/bundled-test-harness/assets/panel-rIdTMDfK.js +3371 -0
  272. package/bundled-test-harness/assets/past-sessions-test-ZKr4ACF0.js +321 -0
  273. package/bundled-test-harness/assets/patch-code-test-BZa-Itrt.js +203 -0
  274. package/bundled-test-harness/assets/patch-fields-test-BkaHs-zo.js +992 -0
  275. package/bundled-test-harness/assets/patch-instance-test-CRMgg52p.js +287 -0
  276. package/bundled-test-harness/assets/persist-module-inspector-view-test-CqNy2RXR.js +62 -0
  277. package/bundled-test-harness/assets/phone-number-field-test-CV6gntON.js +72 -0
  278. package/bundled-test-harness/assets/pie-LRSECV5Y-DcM5pWE3.js +3 -0
  279. package/bundled-test-harness/assets/pieDiagram-4H26LBE5-CtO8RHpU.js +253 -0
  280. package/bundled-test-harness/assets/plan-install-test-lfBTuWXU.js +417 -0
  281. package/bundled-test-harness/assets/playground-VscW9KdT.js +57 -0
  282. package/bundled-test-harness/assets/png-image-def-test-CRspcIHP.js +222 -0
  283. package/bundled-test-harness/assets/prerender-file-extract-test-D3SpxfMI.js +176 -0
  284. package/bundled-test-harness/assets/prerender-html-test-WWptGXJ0.js +615 -0
  285. package/bundled-test-harness/assets/prerender-meta-test-DwQEGN6j.js +388 -0
  286. package/bundled-test-harness/assets/prerender-module-test-BM1AOwRF.js +195 -0
  287. package/bundled-test-harness/assets/prerendered-card-search-test-BVJ8IHLe.js +708 -0
  288. package/bundled-test-harness/assets/preview-format-test-DDpiXDN_.js +103 -0
  289. package/bundled-test-harness/assets/preview-test-D2UV1C5D.js +455 -0
  290. package/bundled-test-harness/assets/published-realm-url-DUIZzAJ5.js +52 -0
  291. package/bundled-test-harness/assets/published-realm-url-test-CIgSf4Ub.js +137 -0
  292. package/bundled-test-harness/assets/qs-test-Bi679H5w.js +36 -0
  293. package/bundled-test-harness/assets/quadrantDiagram-W4KKPZXB-GOTAKsCo.js +2324 -0
  294. package/bundled-test-harness/assets/query-field-barrier-test-BlOuVxdS.js +118 -0
  295. package/bundled-test-harness/assets/query-field-error-sentinel-test-BsB76iUQ.js +202 -0
  296. package/bundled-test-harness/assets/query-field-normalization-test-B2YodJCr.js +271 -0
  297. package/bundled-test-harness/assets/query-field-schema-test-CQhJASFx.js +231 -0
  298. package/bundled-test-harness/assets/query-fields-test-CaZ19leM.js +535 -0
  299. package/bundled-test-harness/assets/queue-test-DrSip6mJ.js +216 -0
  300. package/bundled-test-harness/assets/radar-GUYGQ44K-BkAe1nkp.js +3 -0
  301. package/bundled-test-harness/assets/read-card-for-ai-assistant-test-D8yB-OL9.js +91 -0
  302. package/bundled-test-harness/assets/read-file-for-ai-assistant-test-K3M0-lBD.js +45 -0
  303. package/bundled-test-harness/assets/read-source-test-CKlb0ORb.js +67 -0
  304. package/bundled-test-harness/assets/read-text-file-test-CJdasDDU.js +124 -0
  305. package/bundled-test-harness/assets/realm-DhUCLR5r.js +884 -0
  306. package/bundled-test-harness/assets/realm-field-test-kFgxphDI.js +101 -0
  307. package/bundled-test-harness/assets/realm-index-card-id-test-DAnMAqw4.js +18 -0
  308. package/bundled-test-harness/assets/realm-indexing-test-BQkX-Dat.js +4018 -0
  309. package/bundled-test-harness/assets/realm-paths-test-CmEi9rzu.js +33 -0
  310. package/bundled-test-harness/assets/realm-querying-test-eq3qSXLu.js +1062 -0
  311. package/bundled-test-harness/assets/realm-test-DLQAtdMt.js +2409 -0
  312. package/bundled-test-harness/assets/reasoning-test-CwTfyDlj.js +234 -0
  313. package/bundled-test-harness/assets/recent-files-test-MVIGLp8S.js +449 -0
  314. package/bundled-test-harness/assets/reindex-realm-test-BwLgJeB3.js +119 -0
  315. package/bundled-test-harness/assets/relationship-loading-state-test-B4Ca43yD.js +289 -0
  316. package/bundled-test-harness/assets/render-component-BKEihV4U.js +2 -0
  317. package/bundled-test-harness/assets/render-error-test-DWD6tfNe.js +22 -0
  318. package/bundled-test-harness/assets/render-service-test-BjuoVrUK.js +87 -0
  319. package/bundled-test-harness/assets/render-timer-stub-test-BgUY5u3X.js +84 -0
  320. package/bundled-test-harness/assets/rendered-markdown-DOP-s6fW.js +211 -0
  321. package/bundled-test-harness/assets/rendered-markdown-test-CD02UYwA.js +360 -0
  322. package/bundled-test-harness/assets/requirementDiagram-4Y6WPE33-DJIy7eR9.js +2550 -0
  323. package/bundled-test-harness/assets/rich-markdown-field-test-BJeQx1tL.js +806 -0
  324. package/bundled-test-harness/assets/room-message-test-CjD7FlPD.js +171 -0
  325. package/bundled-test-harness/assets/rust-crypto-GS0FFZ7H.js +16141 -0
  326. package/bundled-test-harness/assets/sanitize-module-list-test-gi0pcqSy.js +68 -0
  327. package/bundled-test-harness/assets/sankeyDiagram-5OEKKPKP-wBsbt1Mr.js +1357 -0
  328. package/bundled-test-harness/assets/schema-editor-test-BSqu8W3e.js +784 -0
  329. package/bundled-test-harness/assets/schema-generation-test-DVFuSsLl.js +28 -0
  330. package/bundled-test-harness/assets/scrolling-test-CpzkRiBS.js +292 -0
  331. package/bundled-test-harness/assets/search-and-choose-test-DVWX4XRb.js +156 -0
  332. package/bundled-test-harness/assets/search-cache-key-test-BMnYM4a5.js +79 -0
  333. package/bundled-test-harness/assets/search-command-test-kEfT0AO7.js +135 -0
  334. package/bundled-test-harness/assets/search-correlation-id-test-D08FtVUZ.js +101 -0
  335. package/bundled-test-harness/assets/search-data-test-CTrBEc1m.js +243 -0
  336. package/bundled-test-harness/assets/search-google-images-test-UnKG8qCp.js +168 -0
  337. package/bundled-test-harness/assets/search-in-flight-key-test-9Va-JXFz.js +79 -0
  338. package/bundled-test-harness/assets/search-test-COlO2lZi.js +847 -0
  339. package/bundled-test-harness/assets/send-ai-assistant-message-test-BPjOjt2R.js +52 -0
  340. package/bundled-test-harness/assets/send-bot-trigger-event-test-BB4lHbB_.js +56 -0
  341. package/bundled-test-harness/assets/send-request-via-proxy-test-U8frmHZA.js +333 -0
  342. package/bundled-test-harness/assets/sending-test-DjEzksEX.js +317 -0
  343. package/bundled-test-harness/assets/sequenceDiagram-3UESZ5HK-QAEjhoay.js +5551 -0
  344. package/bundled-test-harness/assets/serialization-test-DHdLriC8.js +8283 -0
  345. package/bundled-test-harness/assets/set-user-system-card-test-C8I1lDBh.js +59 -0
  346. package/bundled-test-harness/assets/setup-BkuybBki.js +769 -0
  347. package/bundled-test-harness/assets/setup-gxkWJKID.js +2 -0
  348. package/bundled-test-harness/assets/show-card-test-DHKQ6AI4.js +362 -0
  349. package/bundled-test-harness/assets/skills-test-DlMgZrPV.js +568 -0
  350. package/bundled-test-harness/assets/spec-test-s9Zj7x2E.js +1012 -0
  351. package/bundled-test-harness/assets/stateDiagram-AJRCARHV-nEhf3efZ.js +363 -0
  352. package/bundled-test-harness/assets/stateDiagram-v2-BHNVJYJU-tZz_3w-7.js +29 -0
  353. package/bundled-test-harness/assets/store-add-test-D44FWRl3.js +52 -0
  354. package/bundled-test-harness/assets/store-test-TTmNBs5v.js +1562 -0
  355. package/bundled-test-harness/assets/summarize-session-test-DHAuNb5K.js +169 -0
  356. package/bundled-test-harness/assets/svg-image-def-test-C2_GGzR6.js +164 -0
  357. package/bundled-test-harness/assets/switch-submode-test-CfGaoxVe.js +168 -0
  358. package/bundled-test-harness/assets/test-realm-service-worker-C21o7yvW.js +73 -0
  359. package/bundled-test-harness/assets/tests-BSt6h9iC.js +2771 -0
  360. package/bundled-test-harness/assets/text-file-def-test-CR4QO7e_.js +93 -0
  361. package/bundled-test-harness/assets/text-input-validator-test-DYS3mFj9.js +155 -0
  362. package/bundled-test-harness/assets/text-suggestion-test-GUxJ7WtF.js +339 -0
  363. package/bundled-test-harness/assets/theme-card-test-Ba2KqFB8.js +573 -0
  364. package/bundled-test-harness/assets/timeline-definition-PNZ67QCA-BQYyTIei.js +1545 -0
  365. package/bundled-test-harness/assets/transform-cards-test-DyA8eCom.js +341 -0
  366. package/bundled-test-harness/assets/treeView-BLDUP644-Z4ezSvef.js +3 -0
  367. package/bundled-test-harness/assets/treemap-LRROVOQU-Bf5rk_He.js +3 -0
  368. package/bundled-test-harness/assets/ts-file-def-test-Cxnc6H74.js +90 -0
  369. package/bundled-test-harness/assets/tsMode-oJEHe-CR.js +968 -0
  370. package/bundled-test-harness/assets/typescript-DLbb7q56.js +2 -0
  371. package/bundled-test-harness/assets/update-room-skills-test-B7VLHU3-.js +197 -0
  372. package/bundled-test-harness/assets/url-test-w-69Zycf.js +103 -0
  373. package/bundled-test-harness/assets/use-ai-assistant-test-DJkFz7_b.js +330 -0
  374. package/bundled-test-harness/assets/validate-realm-test-BioLutB8.js +53 -0
  375. package/bundled-test-harness/assets/vennDiagram-CIIHVFJN-9eLwsQET.js +2833 -0
  376. package/bundled-test-harness/assets/wardley-L42UT6IY-qNP5_917.js +3 -0
  377. package/bundled-test-harness/assets/wardleyDiagram-YWT4CUSO-DZhEm4N4.js +872 -0
  378. package/bundled-test-harness/assets/wav-audio-def-test-DqsTEBw8.js +155 -0
  379. package/bundled-test-harness/assets/webp-image-def-test-23wOLPMu.js +225 -0
  380. package/bundled-test-harness/assets/workspace-chooser-delete-test-Q6S_nGDT.js +189 -0
  381. package/bundled-test-harness/assets/workspace-chooser-test-CzsvY1v_.js +235 -0
  382. package/bundled-test-harness/assets/workspace-delete-multiple-test-BNFHkJpQ.js +213 -0
  383. package/bundled-test-harness/assets/workspace-delete-summary-test-DLzNdjvC.js +63 -0
  384. package/bundled-test-harness/assets/write-binary-file-test-PHHt9fVI.js +100 -0
  385. package/bundled-test-harness/assets/write-text-file-test-DuHe6tR5.js +172 -0
  386. package/bundled-test-harness/assets/xychartDiagram-2RQKCTM6-bflHQbEv.js +2551 -0
  387. package/bundled-test-harness/index.html +24 -23
  388. package/bundled-test-harness/tests/index.html +31 -30
  389. package/bundled-types/base/command.d.ts +48 -0
  390. package/bundled-types/host-app/components/operator-mode/publish-realm-modal.gts +17 -26
  391. package/bundled-types/host-app/lib/published-realm-url.ts +135 -0
  392. package/package.json +2 -2
  393. package/src/build-program.ts +12 -12
  394. package/src/commands/consolidate-workspaces.ts +1 -1
  395. package/src/commands/file/delete.ts +4 -4
  396. package/src/commands/file/index.ts +6 -6
  397. package/src/commands/file/lint.ts +4 -4
  398. package/src/commands/file/list.ts +3 -3
  399. package/src/commands/file/read.ts +3 -3
  400. package/src/commands/file/touch.ts +6 -6
  401. package/src/commands/file/write.ts +3 -3
  402. package/src/commands/lint.ts +6 -6
  403. package/src/commands/parse.ts +6 -6
  404. package/src/commands/profile.ts +4 -4
  405. package/src/commands/read-transpiled.ts +6 -3
  406. package/src/commands/realm/cancel-indexing.ts +3 -3
  407. package/src/commands/realm/create.ts +2 -2
  408. package/src/commands/realm/history.ts +4 -4
  409. package/src/commands/realm/index.ts +15 -15
  410. package/src/commands/realm/indexing-errors.ts +3 -3
  411. package/src/commands/realm/list.ts +2 -2
  412. package/src/commands/realm/milestone.ts +4 -4
  413. package/src/commands/realm/publish.ts +4 -4
  414. package/src/commands/realm/pull.ts +6 -6
  415. package/src/commands/realm/push.ts +7 -7
  416. package/src/commands/realm/remove.ts +3 -3
  417. package/src/commands/realm/status.ts +8 -8
  418. package/src/commands/realm/sync.ts +9 -9
  419. package/src/commands/realm/unpublish.ts +3 -3
  420. package/src/commands/realm/wait-for-ready.ts +2 -2
  421. package/src/commands/realm/watch/index.ts +2 -2
  422. package/src/commands/realm/watch/start.ts +13 -10
  423. package/src/commands/realm/watch/stop.ts +2 -2
  424. package/src/commands/run-command.ts +6 -3
  425. package/src/commands/search.ts +3 -3
  426. package/src/commands/test.ts +5 -5
  427. package/src/index.ts +2 -2
  428. package/src/lib/auth-resolver.ts +3 -3
  429. package/src/lib/boxel-cli-client.ts +18 -15
  430. package/src/lib/checkpoint-manager.ts +1 -1
  431. package/src/lib/find-checkpoint.ts +1 -1
  432. package/src/lib/profile-manager.ts +4 -4
  433. package/src/lib/realm-local-paths.ts +1 -1
  434. package/src/lib/realm-sync-base.ts +1 -1
  435. package/src/lib/seed-auth.ts +1 -1
  436. package/src/lib/sync-logic.ts +1 -1
  437. package/src/lib/watch-process-registry.ts +1 -1
  438. package/bundled-test-harness/assets/adapter-C8oDflNN.js +0 -2
  439. package/bundled-test-harness/assets/add-field-to-card-definition-command-test-Cs670972.js +0 -111
  440. package/bundled-test-harness/assets/add-workspace-test-BviDAUBK.js +0 -71
  441. package/bundled-test-harness/assets/ai-assistant-B5fp2iOz.js +0 -129
  442. package/bundled-test-harness/assets/ai-assistant-panel-service-test-NpHZzZAz.js +0 -95
  443. package/bundled-test-harness/assets/ai-assistant-test-jPV29jEw.js +0 -2137
  444. package/bundled-test-harness/assets/ai-function-generation-test-QRPcE9tQ.js +0 -996
  445. package/bundled-test-harness/assets/ai-module-creation-test-DyuyfnkY.js +0 -150
  446. package/bundled-test-harness/assets/aibot-message-Dwxp5hTW.js +0 -1185
  447. package/bundled-test-harness/assets/amd-transpile-test-CF7Lkbif.js +0 -425
  448. package/bundled-test-harness/assets/app-CgP2IpNG.js +0 -21464
  449. package/bundled-test-harness/assets/apply-boxel-formatting-test-BXyZ3z0I.js +0 -134
  450. package/bundled-test-harness/assets/apply-markdown-edit-test-C6bcaj3a.js +0 -230
  451. package/bundled-test-harness/assets/apply-search-replace-block-test-BSwC4J9g.js +0 -630
  452. package/bundled-test-harness/assets/arc-DNRb_8LA.js +0 -199
  453. package/bundled-test-harness/assets/architecture-7EHR7CIX-BtVh_LBJ.js +0 -3
  454. package/bundled-test-harness/assets/architectureDiagram-3BPJPVTR-D9UYbaKj.js +0 -7400
  455. package/bundled-test-harness/assets/auth-error-guard-test-Bvu8E7Wy.js +0 -30
  456. package/bundled-test-harness/assets/auth-service-worker-test-CC6DzdfK.js +0 -538
  457. package/bundled-test-harness/assets/authed-fetch-test-CfF-IBHI.js +0 -75
  458. package/bundled-test-harness/assets/avif-image-def-test-B9L2z0nR.js +0 -186
  459. package/bundled-test-harness/assets/base-realm-43wjttN2.js +0 -140
  460. package/bundled-test-harness/assets/base-realm-CJ5x9iyX.js +0 -2
  461. package/bundled-test-harness/assets/basic-test-B64a5zCK.js +0 -128
  462. package/bundled-test-harness/assets/bfm-card-references-test-cLQVLpth.js +0 -577
  463. package/bundled-test-harness/assets/binary-upload-dedupe-test-By7Y1iQ3.js +0 -308
  464. package/bundled-test-harness/assets/blockDiagram-GPEHLZMM-LgOorG2O.js +0 -4355
  465. package/bundled-test-harness/assets/bot-registration-test-DOjf0P1R.js +0 -99
  466. package/bundled-test-harness/assets/box-test-Cd1-RcXg.js +0 -51
  467. package/bundled-test-harness/assets/brand-guide-attachments-test-DxRqP8fo.js +0 -87
  468. package/bundled-test-harness/assets/brand-guide-custom-css-test-DBpZiHzJ.js +0 -135
  469. package/bundled-test-harness/assets/brand-logo-mark-field-test-61k4e5Om.js +0 -87
  470. package/bundled-test-harness/assets/broken-link-template-test-A1P4flQ5.js +0 -345
  471. package/bundled-test-harness/assets/browser-index-Bzhpucwe.js +0 -3
  472. package/bundled-test-harness/assets/browser-index-D0mzSWYV.js +0 -8802
  473. package/bundled-test-harness/assets/c4Diagram-AAUBKEIU-1iq94vGa.js +0 -3764
  474. package/bundled-test-harness/assets/cached-fetch-test-ByQ-5OQI.js +0 -93
  475. package/bundled-test-harness/assets/can-read-realm-test-VFLHJdEv.js +0 -58
  476. package/bundled-test-harness/assets/cancel-indexing-job-test-n3Os4ZaX.js +0 -71
  477. package/bundled-test-harness/assets/card-api-test-DvNfLv3V.js +0 -196
  478. package/bundled-test-harness/assets/card-basics-test-CKzZuFdw.js +0 -4895
  479. package/bundled-test-harness/assets/card-catalog-test-JFvkVHED.js +0 -377
  480. package/bundled-test-harness/assets/card-copy-test-iwrFA72s.js +0 -777
  481. package/bundled-test-harness/assets/card-def-field-def-relationships-test-D5s2RH5t.js +0 -560
  482. package/bundled-test-harness/assets/card-def-menu-items-test-XcmkT4NF.js +0 -182
  483. package/bundled-test-harness/assets/card-delete-test-jtAOHk1Y.js +0 -412
  484. package/bundled-test-harness/assets/card-directory-name-test-veQEp5FJ.js +0 -71
  485. package/bundled-test-harness/assets/card-playground-test-P7Ed0tO4.js +0 -1497
  486. package/bundled-test-harness/assets/card-prerender-DXG8cQEv.js +0 -12661
  487. package/bundled-test-harness/assets/card-search-adorn-test-BX0-IJHB.js +0 -128
  488. package/bundled-test-harness/assets/card-search-query-builder-test-D01uixke.js +0 -88
  489. package/bundled-test-harness/assets/card-search-selection-menu-test-DMTeZFmW.js +0 -108
  490. package/bundled-test-harness/assets/channel-BvoW_rbI.js +0 -8
  491. package/bundled-test-harness/assets/check-correctness-test-D7QB1GTo.js +0 -252
  492. package/bundled-test-harness/assets/chunk-2J33WTMH-BbxCvOlt.js +0 -31
  493. package/bundled-test-harness/assets/chunk-3OPIFGDE-DHY3s0oT.js +0 -5548
  494. package/bundled-test-harness/assets/chunk-4BX2VUAB-CRivrLQ6.js +0 -11
  495. package/bundled-test-harness/assets/chunk-4EGX6M5U-qWzlMeqd.js +0 -44
  496. package/bundled-test-harness/assets/chunk-55IACEB6-DOl6NECJ.js +0 -10
  497. package/bundled-test-harness/assets/chunk-5DO6E6H7-scwNnzDb.js +0 -27
  498. package/bundled-test-harness/assets/chunk-5ZQYHXKU-BeETnugr.js +0 -1767
  499. package/bundled-test-harness/assets/chunk-727SXJPM-BlycTxFE.js +0 -3877
  500. package/bundled-test-harness/assets/chunk-AQP2D5EJ-BE3Clw-g.js +0 -2622
  501. package/bundled-test-harness/assets/chunk-BR22UD5L-BTPKlhWA.js +0 -85
  502. package/bundled-test-harness/assets/chunk-BSJP7CBP-BIhtUfvc.js +0 -114
  503. package/bundled-test-harness/assets/chunk-CSCIHK7Q-DnRAp6Bv.js +0 -6144
  504. package/bundled-test-harness/assets/chunk-FHYWG6QK-DpIXIGDC.js +0 -27
  505. package/bundled-test-harness/assets/chunk-FMBD7UC4-B36w3LIg.js +0 -20
  506. package/bundled-test-harness/assets/chunk-KSCS5N6A-gbz9p9BU.js +0 -871
  507. package/bundled-test-harness/assets/chunk-L5ZTLDWV-HNfH9U8K.js +0 -43
  508. package/bundled-test-harness/assets/chunk-LZXEDZCA-CbKHJfzx.js +0 -65
  509. package/bundled-test-harness/assets/chunk-MPE355IW-BGVbCTZH.js +0 -27
  510. package/bundled-test-harness/assets/chunk-MZUSXYTE-DoCjuxcJ.js +0 -36
  511. package/bundled-test-harness/assets/chunk-N66VUXT2-BX17MI-i.js +0 -70
  512. package/bundled-test-harness/assets/chunk-ND2GUHAM-IpeiJZYz.js +0 -93
  513. package/bundled-test-harness/assets/chunk-NZK2D7GU-CH-Gg7qc.js +0 -89
  514. package/bundled-test-harness/assets/chunk-O5CBEL6O-D2JbLgI8.js +0 -2395
  515. package/bundled-test-harness/assets/chunk-PUPMXCY4-DS4ZxM2V.js +0 -27
  516. package/bundled-test-harness/assets/chunk-QZHKN3VN-WLHeRUJ3.js +0 -20
  517. package/bundled-test-harness/assets/chunk-UIBZB4QT-DNIJBpkq.js +0 -27
  518. package/bundled-test-harness/assets/chunk-WCWK7LTN-CqRJ3WOy.js +0 -36
  519. package/bundled-test-harness/assets/chunk-WU5MYG2G-CtItCLbE.js +0 -12
  520. package/bundled-test-harness/assets/chunk-XPW4576I-D2Q7Qo8n.js +0 -2341
  521. package/bundled-test-harness/assets/classDiagram-4FO5ZUOK-CnNFReKQ.js +0 -31
  522. package/bundled-test-harness/assets/classDiagram-v2-Q7XG4LA2-BlhpbohY.js +0 -31
  523. package/bundled-test-harness/assets/code-equality-assertion-C-2g5YGf.js +0 -474
  524. package/bundled-test-harness/assets/code-patches-test-DaV4Mon_.js +0 -1128
  525. package/bundled-test-harness/assets/code-patching-test-CcbWlImN.js +0 -114
  526. package/bundled-test-harness/assets/code-ref-test-8Yj8gbww.js +0 -138
  527. package/bundled-test-harness/assets/code-semantics-service-test-C3srTfDz.js +0 -65
  528. package/bundled-test-harness/assets/code-submode-test-BUhjvWtB.js +0 -1762
  529. package/bundled-test-harness/assets/codeblocks-test-3zAp0_GA.js +0 -492
  530. package/bundled-test-harness/assets/codemirror-context-C7KmSAyy.js +0 -2
  531. package/bundled-test-harness/assets/codemirror-editor-test-WojU4k2h.js +0 -1176
  532. package/bundled-test-harness/assets/color-field-test-yESUakoE.js +0 -213
  533. package/bundled-test-harness/assets/command-definitions-test-UsXsAhn7.js +0 -72
  534. package/bundled-test-harness/assets/commands-CBDBujm_.js +0 -1379
  535. package/bundled-test-harness/assets/commands-calling-test-DJTl0EbL.js +0 -200
  536. package/bundled-test-harness/assets/commands-test-DW2gupNS.js +0 -1041
  537. package/bundled-test-harness/assets/commands-test-DjLnuojW.js +0 -1145
  538. package/bundled-test-harness/assets/computed-test-0n5g8Ez5.js +0 -882
  539. package/bundled-test-harness/assets/container-D8y7fmir.js +0 -14602
  540. package/bundled-test-harness/assets/convert-to-class-name-test-DSIflIV2.js +0 -17
  541. package/bundled-test-harness/assets/copy-and-edit-test-BuK1ZHr-.js +0 -291
  542. package/bundled-test-harness/assets/copy-card-test-DnDC4_7J.js +0 -156
  543. package/bundled-test-harness/assets/copy-file-to-realm-test-CFd_3Iff.js +0 -99
  544. package/bundled-test-harness/assets/copy-source-test-38yUGJor.js +0 -56
  545. package/bundled-test-harness/assets/cose-bilkent-S5V4N54A-DXA1S87S.js +0 -4275
  546. package/bundled-test-harness/assets/create-file-test-B2oem0-V.js +0 -963
  547. package/bundled-test-harness/assets/create-file-test-BHk00RtD.js +0 -397
  548. package/bundled-test-harness/assets/create-listing-modal-test-L-71-Uo2.js +0 -194
  549. package/bundled-test-harness/assets/create-listing-pr-request-CZaLsHhE.js +0 -64
  550. package/bundled-test-harness/assets/create-listing-pr-request-test-OGzk4Q2E.js +0 -117
  551. package/bundled-test-harness/assets/create-spec-test-BsM7VKuH.js +0 -239
  552. package/bundled-test-harness/assets/csv-file-def-test-BhJalhE-.js +0 -101
  553. package/bundled-test-harness/assets/dagre-BIk_r1iU.js +0 -4195
  554. package/bundled-test-harness/assets/dagre-BM42HDAG-FaUWeGOj.js +0 -606
  555. package/bundled-test-harness/assets/date-time-fields-test-Cs5T6Xk1.js +0 -322
  556. package/bundled-test-harness/assets/debug-message-test-WlHe7pJF.js +0 -119
  557. package/bundled-test-harness/assets/diagram-2AECGRRQ-DLve-IVM.js +0 -279
  558. package/bundled-test-harness/assets/diagram-5GNKFQAL-CJG1RTLk.js +0 -142
  559. package/bundled-test-harness/assets/diagram-KO2AKTUF-DYGDq3dD.js +0 -551
  560. package/bundled-test-harness/assets/diagram-LMA3HP47-BNRYdpMl.js +0 -184
  561. package/bundled-test-harness/assets/diagram-OG6HWLK6-BlJH5g83.js +0 -857
  562. package/bundled-test-harness/assets/diffing-test-DO54USSm.js +0 -210
  563. package/bundled-test-harness/assets/dist-BDRmXkWl.js +0 -232
  564. package/bundled-test-harness/assets/dist-BfNSLd0O.js +0 -105
  565. package/bundled-test-harness/assets/dist-BoireClP.js +0 -2
  566. package/bundled-test-harness/assets/editor-test-DChC9LuR.js +0 -551
  567. package/bundled-test-harness/assets/editor.main-BiohyrHK.js +0 -3
  568. package/bundled-test-harness/assets/editor.main-CMU_0pR1.js +0 -43566
  569. package/bundled-test-harness/assets/email-field-test-DWIFSfZ-.js +0 -74
  570. package/bundled-test-harness/assets/enum-field-test-BUc6l4us.js +0 -909
  571. package/bundled-test-harness/assets/erDiagram-TEJ5UH35-pOJ2novh.js +0 -2041
  572. package/bundled-test-harness/assets/error-display-test-CHSE6h6Z.js +0 -343
  573. package/bundled-test-harness/assets/evaluate-module-test-Caa5n0B9.js +0 -66
  574. package/bundled-test-harness/assets/eventmodeling-FCH6USID-B6XXU7R3.js +0 -3
  575. package/bundled-test-harness/assets/execute-atomic-operations-test-CT060oDk.js +0 -75
  576. package/bundled-test-harness/assets/externals-Do1fVZ4j.js +0 -5533
  577. package/bundled-test-harness/assets/extract-css-variables-test-DzjAsMgg.js +0 -169
  578. package/bundled-test-harness/assets/fallback-banner-test-CmxysrDn.js +0 -227
  579. package/bundled-test-harness/assets/fallback-banner-test-DJ4cO8PB.js +0 -53
  580. package/bundled-test-harness/assets/fallback-models-test-r5upJFeA.js +0 -163
  581. package/bundled-test-harness/assets/fetch-card-json-test-Di1wmvy5.js +0 -63
  582. package/bundled-test-harness/assets/fetcher-test-DjzNl_7F.js +0 -85
  583. package/bundled-test-harness/assets/field-configuration-test-C3vr-HhG.js +0 -535
  584. package/bundled-test-harness/assets/field-markdown-domain-test-DG2U4qIm.js +0 -615
  585. package/bundled-test-harness/assets/field-markdown-primitives-test-Bay2v8nT.js +0 -362
  586. package/bundled-test-harness/assets/field-markdown-specialized-test-Bl0Sl4sc.js +0 -527
  587. package/bundled-test-harness/assets/field-path-parser-test-bxxwUjcm.js +0 -387
  588. package/bundled-test-harness/assets/field-playground-test-Bcjfws4m.js +0 -902
  589. package/bundled-test-harness/assets/field-support-predicates-test-DYTqOGvv.js +0 -170
  590. package/bundled-test-harness/assets/field-test-helpers-DYSfSGdh.js +0 -45
  591. package/bundled-test-harness/assets/file-attachment-test-6ypDRDS7.js +0 -635
  592. package/bundled-test-harness/assets/file-chooser-test-mtmcHTFP.js +0 -439
  593. package/bundled-test-harness/assets/file-def-live-reload-test-CX1-lOv6.js +0 -50
  594. package/bundled-test-harness/assets/file-def-manager-DNHII2oj.js +0 -470
  595. package/bundled-test-harness/assets/file-def-manager-canonicalize-test-i_7UVakF.js +0 -451
  596. package/bundled-test-harness/assets/file-def-menu-items-test-Dw458iku.js +0 -114
  597. package/bundled-test-harness/assets/file-def-navigation-test-B3Ztr1Rd.js +0 -109
  598. package/bundled-test-harness/assets/file-def-serialization-test-C_gV8AkU.js +0 -87
  599. package/bundled-test-harness/assets/file-def-test-vXXJmtxX.js +0 -219
  600. package/bundled-test-harness/assets/file-tree-test-BJCiw9jm.js +0 -773
  601. package/bundled-test-harness/assets/flac-audio-def-test-BX3SE1vW.js +0 -138
  602. package/bundled-test-harness/assets/flowDiagram-I6XJVG4X-7Q5ROn4X.js +0 -4883
  603. package/bundled-test-harness/assets/formatted-aibot-message-test-DyqUz2nt.js +0 -366
  604. package/bundled-test-harness/assets/formatted-user-message-test-aqAzqvBP.js +0 -43
  605. package/bundled-test-harness/assets/freestyle-test-CLRrZkAE.js +0 -17
  606. package/bundled-test-harness/assets/full-reindex-realm-test-ClqPVQ0c.js +0 -103
  607. package/bundled-test-harness/assets/ganttDiagram-6RSMTGT7-BkDoIAAE.js +0 -4060
  608. package/bundled-test-harness/assets/garbage-collection-test-Ba2dD3qS.js +0 -373
  609. package/bundled-test-harness/assets/general-test-D0zhs14K.js +0 -926
  610. package/bundled-test-harness/assets/generate-css-variables-test-CKrXSlHs.js +0 -88
  611. package/bundled-test-harness/assets/generate-example-cards-one-shot-test-fSAdGJeT.js +0 -67
  612. package/bundled-test-harness/assets/get-available-realm-identifiers-test-BXMUW65I.js +0 -49
  613. package/bundled-test-harness/assets/get-catalog-realm-identifiers-test-DKEq6Zcq.js +0 -49
  614. package/bundled-test-harness/assets/get-default-writable-realm-test-Dp4nBIRP.js +0 -56
  615. package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-DYNnMgD-.js +0 -55
  616. package/bundled-test-harness/assets/get-relationship-membership-state-test-k9EUNWeq.js +0 -1306
  617. package/bundled-test-harness/assets/get-type-refs-from-filter-test-BPuivF-v.js +0 -136
  618. package/bundled-test-harness/assets/get-user-system-card-test-DSHv00O7.js +0 -52
  619. package/bundled-test-harness/assets/gif-image-def-test-LuDSr5Kz.js +0 -161
  620. package/bundled-test-harness/assets/gitGraph-WXDBUCRP-BrG_LYEh.js +0 -3
  621. package/bundled-test-harness/assets/gitGraphDiagram-PVQCEYII-QJjQcX4J.js +0 -1150
  622. package/bundled-test-harness/assets/gts-file-def-test-bS3ML062.js +0 -99
  623. package/bundled-test-harness/assets/head-format-preview-test-B8IPh71E.js +0 -156
  624. package/bundled-test-harness/assets/helpers-wSIq-bau.js +0 -5
  625. package/bundled-test-harness/assets/host-mode-test-D44nXoQZ.js +0 -391
  626. package/bundled-test-harness/assets/host-submode-test-CefkXg9F.js +0 -904
  627. package/bundled-test-harness/assets/index-query-engine-test-DJnDqmfK.js +0 -2548
  628. package/bundled-test-harness/assets/index-writer-test-BcrCMj37.js +0 -1842
  629. package/bundled-test-harness/assets/indexeddb-crypto-store-RTTNdynf.js +0 -49434
  630. package/bundled-test-harness/assets/info-J43DQDTF-DhDzvz9k.js +0 -3
  631. package/bundled-test-harness/assets/infoDiagram-5YYISTIA-8TmRFIRz.js +0 -23
  632. package/bundled-test-harness/assets/inspector-test-D4iMBlbL.js +0 -1776
  633. package/bundled-test-harness/assets/instance-filter-matcher-test-CYT6N3hN.js +0 -564
  634. package/bundled-test-harness/assets/instantiate-card-test-j1JS5lDe.js +0 -104
  635. package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-B-aXzOh6.js +0 -497
  636. package/bundled-test-harness/assets/interact-submode-setup-VMwOUl3u.js +0 -558
  637. package/bundled-test-harness/assets/interact-submode-test-D5lNNXdq.js +0 -725
  638. package/bundled-test-harness/assets/invalidate-realm-identifiers-test-71Ze8eGV.js +0 -101
  639. package/bundled-test-harness/assets/invite-user-to-room-test-UfjsvwVp.js +0 -67
  640. package/bundled-test-harness/assets/ishikawaDiagram-YF4QCWOH-7UALIGwM.js +0 -1009
  641. package/bundled-test-harness/assets/isolated-render-test-C2IL-Fz3.js +0 -51
  642. package/bundled-test-harness/assets/item-button-6g7XYj56.js +0 -203
  643. package/bundled-test-harness/assets/javascript-BwLQ7_Nc.js +0 -75
  644. package/bundled-test-harness/assets/job-priority-header-test-C3FfKLPP.js +0 -81
  645. package/bundled-test-harness/assets/journeyDiagram-JHISSGLW-t4gEZYup.js +0 -1256
  646. package/bundled-test-harness/assets/jpg-image-def-test-BTBk9lk5.js +0 -430
  647. package/bundled-test-harness/assets/json-file-def-test-BpU_Eidn.js +0 -92
  648. package/bundled-test-harness/assets/kanban-definition-UN3LZRKU-C_KHB3_r.js +0 -1284
  649. package/bundled-test-harness/assets/last-modified-date-test-fE7IP0q0.js +0 -18
  650. package/bundled-test-harness/assets/limited-set-test-uu2vX1Sv.js +0 -123
  651. package/bundled-test-harness/assets/line-BiZHXOjs.js +0 -55
  652. package/bundled-test-harness/assets/linear-DUaMMmmA.js +0 -417
  653. package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-qZeqQ1gt.js +0 -315
  654. package/bundled-test-harness/assets/linksto-error-sentinel-test-BaV3I8Xx.js +0 -236
  655. package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-BvJi1vCb.js +0 -303
  656. package/bundled-test-harness/assets/linksto-many-per-slot-access-test-CK60Cugk.js +0 -301
  657. package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-BWxdEO9D.js +0 -258
  658. package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-CIsLhqR2.js +0 -194
  659. package/bundled-test-harness/assets/live-prerendered-search-jZe3I16p.js +0 -639
  660. package/bundled-test-harness/assets/live-test-CF_R5WGr.js +0 -2
  661. package/bundled-test-harness/assets/live-test-jO7lXuyB.js +0 -100
  662. package/bundled-test-harness/assets/loader-icon-error-test-N4JYZuTx.js +0 -62
  663. package/bundled-test-harness/assets/loader-parallel-prefetch-test-DteeG7mU.js +0 -257
  664. package/bundled-test-harness/assets/loader-retry-test-DYVgpS_I.js +0 -173
  665. package/bundled-test-harness/assets/loader-test-DLI8JIx-.js +0 -245
  666. package/bundled-test-harness/assets/loading-test-D4ZBtRYf.js +0 -63
  667. package/bundled-test-harness/assets/login-error-text-test-Dcq7q3EY.js +0 -51
  668. package/bundled-test-harness/assets/m4a-audio-def-test-BKqGO-CW.js +0 -185
  669. package/bundled-test-harness/assets/main-BjBdsiQT.js +0 -5
  670. package/bundled-test-harness/assets/markdown-fallback-test-BBj80dZZ.js +0 -316
  671. package/bundled-test-harness/assets/markdown-file-def-test-BnMF5rQF.js +0 -286
  672. package/bundled-test-harness/assets/markdown-helpers-test-DnuuSLfS.js +0 -183
  673. package/bundled-test-harness/assets/markdown-highlighting-test-CWRp2Rce.js +0 -244
  674. package/bundled-test-harness/assets/markdown-preview-test-Bf5OqKGf.js +0 -237
  675. package/bundled-test-harness/assets/markdown-preview-yYHtwNeI.js +0 -69
  676. package/bundled-test-harness/assets/marked-sync-2EfimW4i.js +0 -2
  677. package/bundled-test-harness/assets/marked-sync-DZOVFLjK.js +0 -2561
  678. package/bundled-test-harness/assets/marked-sync-test-BaaYbZNF.js +0 -146
  679. package/bundled-test-harness/assets/matrix-service-sliding-sync-test-CdEy3ASW.js +0 -33
  680. package/bundled-test-harness/assets/mermaid-parser.core-CKNAdXJW.js +0 -114
  681. package/bundled-test-harness/assets/mermaid.core-C0mfwy8A.js +0 -1700
  682. package/bundled-test-harness/assets/message-service-subscription-test-pGz_7rz3.js +0 -113
  683. package/bundled-test-harness/assets/mindmap-definition-RKZ34NQL-ClcHxkdY.js +0 -1347
  684. package/bundled-test-harness/assets/mock-matrix-D7JHfFtT.js +0 -2
  685. package/bundled-test-harness/assets/mock-matrix-DqDbNhEj.js +0 -14292
  686. package/bundled-test-harness/assets/module-transpile-cache-test-D0M-fPxs.js +0 -66
  687. package/bundled-test-harness/assets/monaco.contribution-BEs3qwfd.js +0 -103
  688. package/bundled-test-harness/assets/monaco.contribution-Dpx8UiPl.js +0 -2
  689. package/bundled-test-harness/assets/monaco.contribution-RF_qxJYG.js +0 -2
  690. package/bundled-test-harness/assets/monaco.contribution-jPVrF29f.js +0 -243
  691. package/bundled-test-harness/assets/mp3-audio-def-test-CxeRk1bl.js +0 -129
  692. package/bundled-test-harness/assets/mutex-test-D1xyxTj2.js +0 -71
  693. package/bundled-test-harness/assets/number-field-test-gjAGDy6P.js +0 -153
  694. package/bundled-test-harness/assets/ogg-audio-def-test-B6Ww3Ixr.js +0 -191
  695. package/bundled-test-harness/assets/open-create-listing-modal-test-uN58T3rI.js +0 -117
  696. package/bundled-test-harness/assets/open-workspace-test-DXVsvBFJ.js +0 -48
  697. package/bundled-test-harness/assets/operator-mode-acceptance-test-BxIq2xSS.js +0 -1044
  698. package/bundled-test-harness/assets/operator-mode-card-catalog-test-xFYx9_ng.js +0 -989
  699. package/bundled-test-harness/assets/operator-mode-links-test-qhXWmz-S.js +0 -797
  700. package/bundled-test-harness/assets/operator-mode-state-service-test-BdA_uvaY.js +0 -122
  701. package/bundled-test-harness/assets/operator-mode-test-D3EyTwq3.js +0 -617
  702. package/bundled-test-harness/assets/operator-mode-ui-test-CSrk6Q0A.js +0 -985
  703. package/bundled-test-harness/assets/ordinal-DO1mUmjg.js +0 -85
  704. package/bundled-test-harness/assets/overlay-menu-items-test-CuqqLsQT.js +0 -316
  705. package/bundled-test-harness/assets/packet-YPE3B663--JkMNy78.js +0 -3
  706. package/bundled-test-harness/assets/panel-C2rtbx32.js +0 -3371
  707. package/bundled-test-harness/assets/past-sessions-test-B9SCbbXz.js +0 -316
  708. package/bundled-test-harness/assets/patch-code-test-CcFr9pDb.js +0 -203
  709. package/bundled-test-harness/assets/patch-fields-test-BW1gzcJM.js +0 -992
  710. package/bundled-test-harness/assets/patch-instance-test-DKqA9gQ6.js +0 -287
  711. package/bundled-test-harness/assets/persist-module-inspector-view-test-D1eKBUkt.js +0 -62
  712. package/bundled-test-harness/assets/phone-number-field-test-D1is5RWv.js +0 -72
  713. package/bundled-test-harness/assets/pie-LRSECV5Y-BDVv8Wdy.js +0 -3
  714. package/bundled-test-harness/assets/pieDiagram-4H26LBE5-CSYI-nMz.js +0 -253
  715. package/bundled-test-harness/assets/plan-install-test-DB-PrjPR.js +0 -417
  716. package/bundled-test-harness/assets/playground-B0iQV7dU.js +0 -57
  717. package/bundled-test-harness/assets/png-image-def-test-DnOsJGs6.js +0 -222
  718. package/bundled-test-harness/assets/prerender-file-extract-test-DhOLozj2.js +0 -176
  719. package/bundled-test-harness/assets/prerender-html-test-DKVhQZA9.js +0 -615
  720. package/bundled-test-harness/assets/prerender-meta-test-CnRNyqSz.js +0 -388
  721. package/bundled-test-harness/assets/prerender-module-test-D163QcrZ.js +0 -195
  722. package/bundled-test-harness/assets/prerendered-card-search-test-DX-8yabJ.js +0 -708
  723. package/bundled-test-harness/assets/preview-format-test-H7bnpdlC.js +0 -103
  724. package/bundled-test-harness/assets/preview-test-B7u6uWJR.js +0 -455
  725. package/bundled-test-harness/assets/qs-test-COb0mre6.js +0 -36
  726. package/bundled-test-harness/assets/quadrantDiagram-W4KKPZXB-2Y2ben29.js +0 -2324
  727. package/bundled-test-harness/assets/query-field-barrier-test-Cypj-MhK.js +0 -118
  728. package/bundled-test-harness/assets/query-field-error-sentinel-test-Dnqn8TdN.js +0 -202
  729. package/bundled-test-harness/assets/query-field-normalization-test-B7D8SHBP.js +0 -271
  730. package/bundled-test-harness/assets/query-field-schema-test-DIYY3-c8.js +0 -231
  731. package/bundled-test-harness/assets/query-fields-test-k-VBF9PE.js +0 -535
  732. package/bundled-test-harness/assets/queue-test-B_74vXZE.js +0 -216
  733. package/bundled-test-harness/assets/radar-GUYGQ44K-Cn2A0VBR.js +0 -3
  734. package/bundled-test-harness/assets/read-card-for-ai-assistant-test-SyL9F_La.js +0 -91
  735. package/bundled-test-harness/assets/read-file-for-ai-assistant-test-nLPp49U2.js +0 -45
  736. package/bundled-test-harness/assets/read-source-test-DBELJkhN.js +0 -67
  737. package/bundled-test-harness/assets/read-text-file-test-CP1JuWlX.js +0 -124
  738. package/bundled-test-harness/assets/realm-Dr4iygv_.js +0 -884
  739. package/bundled-test-harness/assets/realm-field-test-Cice2mYk.js +0 -101
  740. package/bundled-test-harness/assets/realm-index-card-id-test-BzpozdWc.js +0 -18
  741. package/bundled-test-harness/assets/realm-indexing-test-C0YSXziR.js +0 -4018
  742. package/bundled-test-harness/assets/realm-paths-test-DV_g07rF.js +0 -33
  743. package/bundled-test-harness/assets/realm-querying-test-B526abM0.js +0 -1062
  744. package/bundled-test-harness/assets/realm-test-D8UN5X-w.js +0 -2409
  745. package/bundled-test-harness/assets/reasoning-test-ClIOvdkX.js +0 -234
  746. package/bundled-test-harness/assets/recent-files-test-C2J_dJUD.js +0 -449
  747. package/bundled-test-harness/assets/reindex-realm-test-DMphy1g6.js +0 -119
  748. package/bundled-test-harness/assets/relationship-loading-state-test-BWrZdLlZ.js +0 -289
  749. package/bundled-test-harness/assets/render-component-BII_KnyK.js +0 -2
  750. package/bundled-test-harness/assets/render-error-test-BUAJJlUi.js +0 -22
  751. package/bundled-test-harness/assets/render-service-test-BKkCjErY.js +0 -87
  752. package/bundled-test-harness/assets/render-timer-stub-test-TUDMWJ8v.js +0 -84
  753. package/bundled-test-harness/assets/rendered-markdown-ColekGTF.js +0 -211
  754. package/bundled-test-harness/assets/rendered-markdown-test-B4CWIo02.js +0 -360
  755. package/bundled-test-harness/assets/requirementDiagram-4Y6WPE33-CTICatxk.js +0 -2550
  756. package/bundled-test-harness/assets/rich-markdown-field-test-B5u6D3Nk.js +0 -806
  757. package/bundled-test-harness/assets/room-message-test-0eJSqQfu.js +0 -171
  758. package/bundled-test-harness/assets/rust-crypto-B0m3j_yZ.js +0 -16141
  759. package/bundled-test-harness/assets/sanitize-module-list-test-rH6OqjKh.js +0 -68
  760. package/bundled-test-harness/assets/sankeyDiagram-5OEKKPKP-hBIg6-LP.js +0 -1357
  761. package/bundled-test-harness/assets/schema-editor-test-DH4MLFCD.js +0 -784
  762. package/bundled-test-harness/assets/schema-generation-test-BZMkX7VA.js +0 -28
  763. package/bundled-test-harness/assets/scrolling-test-CFTyLG8X.js +0 -292
  764. package/bundled-test-harness/assets/search-and-choose-test-CcbVyp4c.js +0 -156
  765. package/bundled-test-harness/assets/search-cache-key-test-BYt46iNT.js +0 -79
  766. package/bundled-test-harness/assets/search-command-test-BRIJPr54.js +0 -135
  767. package/bundled-test-harness/assets/search-correlation-id-test-B298Tfux.js +0 -101
  768. package/bundled-test-harness/assets/search-data-test-DHV2Fd4S.js +0 -243
  769. package/bundled-test-harness/assets/search-google-images-test-CNrazllP.js +0 -168
  770. package/bundled-test-harness/assets/search-in-flight-key-test-Dy3bU2c1.js +0 -79
  771. package/bundled-test-harness/assets/search-test-DL1-gD-G.js +0 -847
  772. package/bundled-test-harness/assets/send-ai-assistant-message-test-CyEkQ5pD.js +0 -52
  773. package/bundled-test-harness/assets/send-bot-trigger-event-test-CAsK28m-.js +0 -56
  774. package/bundled-test-harness/assets/send-request-via-proxy-test-DpMlRvPv.js +0 -333
  775. package/bundled-test-harness/assets/sending-test-BOeGYcTU.js +0 -317
  776. package/bundled-test-harness/assets/sequenceDiagram-3UESZ5HK-DQMiI040.js +0 -5551
  777. package/bundled-test-harness/assets/serialization-test-gY2QQVxS.js +0 -8283
  778. package/bundled-test-harness/assets/set-user-system-card-test-BE3y5GNK.js +0 -59
  779. package/bundled-test-harness/assets/setup-B8O9JQKq.js +0 -769
  780. package/bundled-test-harness/assets/setup-BMqGUBDK.js +0 -2
  781. package/bundled-test-harness/assets/show-card-test-BfJNnWMy.js +0 -362
  782. package/bundled-test-harness/assets/skills-test-CqhnZxBi.js +0 -568
  783. package/bundled-test-harness/assets/spec-test-BUKNn_1q.js +0 -1012
  784. package/bundled-test-harness/assets/stateDiagram-AJRCARHV-BoOij2yt.js +0 -363
  785. package/bundled-test-harness/assets/stateDiagram-v2-BHNVJYJU-Dosil5p2.js +0 -29
  786. package/bundled-test-harness/assets/store-add-test-BR1M-IDR.js +0 -52
  787. package/bundled-test-harness/assets/store-test-DaqI-HRh.js +0 -1562
  788. package/bundled-test-harness/assets/summarize-session-test-BMg54JGF.js +0 -169
  789. package/bundled-test-harness/assets/svg-image-def-test-xNyIKRPV.js +0 -164
  790. package/bundled-test-harness/assets/switch-submode-test-BKvpODUD.js +0 -168
  791. package/bundled-test-harness/assets/test-realm-service-worker-DK4SmTM5.js +0 -73
  792. package/bundled-test-harness/assets/tests-x4_eRjiT.js +0 -2770
  793. package/bundled-test-harness/assets/text-file-def-test-CsXiyVfI.js +0 -93
  794. package/bundled-test-harness/assets/text-input-validator-test-D4s_laO7.js +0 -155
  795. package/bundled-test-harness/assets/text-suggestion-test-CkLf1xuS.js +0 -339
  796. package/bundled-test-harness/assets/theme-card-test-D-6L6OfD.js +0 -573
  797. package/bundled-test-harness/assets/timeline-definition-PNZ67QCA-DD2d81uJ.js +0 -1545
  798. package/bundled-test-harness/assets/transform-cards-test-CRZF2gqZ.js +0 -341
  799. package/bundled-test-harness/assets/treeView-BLDUP644-CUm8wuM-.js +0 -3
  800. package/bundled-test-harness/assets/treemap-LRROVOQU-lbLrY2PE.js +0 -3
  801. package/bundled-test-harness/assets/ts-file-def-test-CDo6ojCf.js +0 -90
  802. package/bundled-test-harness/assets/tsMode-BPQoRibc.js +0 -968
  803. package/bundled-test-harness/assets/typescript-BaU6yDhK.js +0 -2
  804. package/bundled-test-harness/assets/update-room-skills-test-BnSgVFwT.js +0 -197
  805. package/bundled-test-harness/assets/url-test-CK-HB0qu.js +0 -103
  806. package/bundled-test-harness/assets/use-ai-assistant-test-BuJXEP8H.js +0 -330
  807. package/bundled-test-harness/assets/validate-realm-test-Cx7MOtS8.js +0 -53
  808. package/bundled-test-harness/assets/vennDiagram-CIIHVFJN-DtXtzGwZ.js +0 -2833
  809. package/bundled-test-harness/assets/wardley-L42UT6IY-D8aCp_Ox.js +0 -3
  810. package/bundled-test-harness/assets/wardleyDiagram-YWT4CUSO-D-73g3bB.js +0 -872
  811. package/bundled-test-harness/assets/wav-audio-def-test-DIo2GzQL.js +0 -155
  812. package/bundled-test-harness/assets/webp-image-def-test-BQsV0_De.js +0 -225
  813. package/bundled-test-harness/assets/workspace-chooser-delete-test-peDXmnQf.js +0 -189
  814. package/bundled-test-harness/assets/workspace-chooser-test-DS2RtTEF.js +0 -235
  815. package/bundled-test-harness/assets/workspace-delete-multiple-test-DTbjRSzN.js +0 -213
  816. package/bundled-test-harness/assets/workspace-delete-summary-test-B--ink4m.js +0 -63
  817. package/bundled-test-harness/assets/write-binary-file-test-A3TQ5lFn.js +0 -100
  818. package/bundled-test-harness/assets/write-text-file-test-D_rjNDsT.js +0 -172
  819. package/bundled-test-harness/assets/xychartDiagram-2RQKCTM6-D1aoqDp-.js +0 -2551
  820. /package/bundled-test-harness/assets/{abap-CLdVBGqB.js → abap-FZAuBTMl.js} +0 -0
  821. /package/bundled-test-harness/assets/{apex-DV8eHjgQ.js → apex-CAO3qFTc.js} +0 -0
  822. /package/bundled-test-harness/assets/{array-DsDWWqmW.js → array-CRfHnEm4.js} +0 -0
  823. /package/bundled-test-harness/assets/{azcli-C4pZYsiJ.js → azcli-Bnu7jG0Y.js} +0 -0
  824. /package/bundled-test-harness/assets/{bat-DBoaeFpB.js → bat-DdE54Pqq.js} +0 -0
  825. /package/bundled-test-harness/assets/{bicep-VlrJhbeK.js → bicep-Dp4vFp3K.js} +0 -0
  826. /package/bundled-test-harness/assets/{cameligo-jyzrvLUm.js → cameligo-Cym4x98m.js} +0 -0
  827. /package/bundled-test-harness/assets/{chunk-NNHCCRGN-Be15HUz2.js → chunk-NNHCCRGN-PWOfDYpb.js} +0 -0
  828. /package/bundled-test-harness/assets/{clojure-bzahmEtz.js → clojure-B47IJ25u.js} +0 -0
  829. /package/bundled-test-harness/assets/{codemirror-context-BauLYUNt.js → codemirror-context-oJy03XqC.js} +0 -0
  830. /package/bundled-test-harness/assets/{coffee-CMADdzOH.js → coffee-CZlkBXT8.js} +0 -0
  831. /package/bundled-test-harness/assets/{cpp-CEJwzcLE.js → cpp-mX4KaA7p.js} +0 -0
  832. /package/bundled-test-harness/assets/{csharp-XYqm0UE0.js → csharp-C-OeDGwk.js} +0 -0
  833. /package/bundled-test-harness/assets/{csp-82fNWQc2.js → csp-AS2OEE8R.js} +0 -0
  834. /package/bundled-test-harness/assets/{css-B5b0ooFS.js → css-C-TQxhWe.js} +0 -0
  835. /package/bundled-test-harness/assets/{cssMode-DTKuqAkO.js → cssMode-C87GnEsk.js} +0 -0
  836. /package/bundled-test-harness/assets/{cypher-Df9GkdDY.js → cypher-T6F_0eIM.js} +0 -0
  837. /package/bundled-test-harness/assets/{cytoscape.esm-D0iwZ9Jj.js → cytoscape.esm-Bc2V-MhP.js} +0 -0
  838. /package/bundled-test-harness/assets/{dart-C4JY9dMc.js → dart-DzVesk0n.js} +0 -0
  839. /package/bundled-test-harness/assets/{defaultLocale-BtLxQtxy.js → defaultLocale-CAoL4lzt.js} +0 -0
  840. /package/bundled-test-harness/assets/{dist-D-PuK2H3.js → dist-BZ5MfZEJ.js} +0 -0
  841. /package/bundled-test-harness/assets/{dockerfile-Ck0tNttO.js → dockerfile-BH0_bQxC.js} +0 -0
  842. /package/bundled-test-harness/assets/{ecl-BpeXqJR_.js → ecl-KIxjxrJo.js} +0 -0
  843. /package/bundled-test-harness/assets/{elixir-HmBzrXaX.js → elixir-CPPdtCW1.js} +0 -0
  844. /package/bundled-test-harness/assets/{flow9-DhsfsDhH.js → flow9-Dxho7Ldf.js} +0 -0
  845. /package/bundled-test-harness/assets/{freemarker2-D3Yd6nGl.js → freemarker2-DP1aOr3_.js} +0 -0
  846. /package/bundled-test-harness/assets/{fsharp-D56OprHc.js → fsharp-ozN53Joe.js} +0 -0
  847. /package/bundled-test-harness/assets/{go-BITsFLfX.js → go-DPj6Rbqe.js} +0 -0
  848. /package/bundled-test-harness/assets/{graphlib-qkaQhadO.js → graphlib-DOITgaas.js} +0 -0
  849. /package/bundled-test-harness/assets/{graphql-CJJVsEX1.js → graphql-C8_-AnBG.js} +0 -0
  850. /package/bundled-test-harness/assets/{handlebars-Dvw6QbL7.js → handlebars-B2gYBZpU.js} +0 -0
  851. /package/bundled-test-harness/assets/{hcl-DSTZcJuq.js → hcl-r3d7BhXB.js} +0 -0
  852. /package/bundled-test-harness/assets/{helpers-D_JZYUOQ.js → helpers-CItTycq2.js} +0 -0
  853. /package/bundled-test-harness/assets/{html-Bik3qLmc.js → html-DhN1Nxr0.js} +0 -0
  854. /package/bundled-test-harness/assets/{htmlMode-DPCaR3Ab.js → htmlMode-BnBg5hCh.js} +0 -0
  855. /package/bundled-test-harness/assets/{ini-li-kC8ZU.js → ini-CzzRigmS.js} +0 -0
  856. /package/bundled-test-harness/assets/{init-Bq7IGMcH.js → init-Bd2YUhsG.js} +0 -0
  857. /package/bundled-test-harness/assets/{java-CETpuNN7.js → java-BgeDsIoV.js} +0 -0
  858. /package/bundled-test-harness/assets/{jsonMode-CZ3hOG-W.js → jsonMode-sRb0gsB8.js} +0 -0
  859. /package/bundled-test-harness/assets/{julia-hgihs1aN.js → julia-u3K1H5Ts.js} +0 -0
  860. /package/bundled-test-harness/assets/{katex-DqhsSYO4.js → katex-CHY7BUZt.js} +0 -0
  861. /package/bundled-test-harness/assets/{kotlin-CKfyb82K.js → kotlin-DfqmlJ10.js} +0 -0
  862. /package/bundled-test-harness/assets/{less-xB5yXbw8.js → less-CSzH7DPY.js} +0 -0
  863. /package/bundled-test-harness/assets/{lexon-BLwrXVrI.js → lexon-DwPTpxXt.js} +0 -0
  864. /package/bundled-test-harness/assets/{liquid-Bf2lpknJ.js → liquid-95J9g5Vk.js} +0 -0
  865. /package/bundled-test-harness/assets/{lua-Ch5i3IrF.js → lua-CGw6zbeh.js} +0 -0
  866. /package/bundled-test-harness/assets/{m3-D5tNlhaF.js → m3-BfgwloGF.js} +0 -0
  867. /package/bundled-test-harness/assets/{markdown-Dzc9uMky.js → markdown-RZRK7Mc9.js} +0 -0
  868. /package/bundled-test-harness/assets/{mdx-xsI4TJrf.js → mdx-BYD-W2sn.js} +0 -0
  869. /package/bundled-test-harness/assets/{mips-CmdzHkQm.js → mips-DAySN5Lp.js} +0 -0
  870. /package/bundled-test-harness/assets/{msdax-CAZvxB9E.js → msdax-Cy0COjTJ.js} +0 -0
  871. /package/bundled-test-harness/assets/{mysql-CyVS-z5H.js → mysql-CfGw9jyw.js} +0 -0
  872. /package/bundled-test-harness/assets/{objective-c-CCG8cTc_.js → objective-c-B4uU-8T-.js} +0 -0
  873. /package/bundled-test-harness/assets/{pascal-c8B45FOC.js → pascal-CGDuZzXi.js} +0 -0
  874. /package/bundled-test-harness/assets/{pascaligo-CCqwSqBv.js → pascaligo-eg02k4VJ.js} +0 -0
  875. /package/bundled-test-harness/assets/{path-CsS38UoK.js → path-Dxiz9G2t.js} +0 -0
  876. /package/bundled-test-harness/assets/{perl-JUICYbO2.js → perl-BiT-JJJw.js} +0 -0
  877. /package/bundled-test-harness/assets/{pgsql-aNRiL0Cg.js → pgsql-DAMjrVBF.js} +0 -0
  878. /package/bundled-test-harness/assets/{php-B0YZj_Vw.js → php-kOSUYQyc.js} +0 -0
  879. /package/bundled-test-harness/assets/{pla-D3Zb3KCn.js → pla-BShYV-HC.js} +0 -0
  880. /package/bundled-test-harness/assets/{postiats-ks1KABlA.js → postiats-9Xamd4W2.js} +0 -0
  881. /package/bundled-test-harness/assets/{powerquery-D35K_osc.js → powerquery-l2Nw525Q.js} +0 -0
  882. /package/bundled-test-harness/assets/{powershell-DXQo6KTk.js → powershell-B5rdEn86.js} +0 -0
  883. /package/bundled-test-harness/assets/{protobuf-CFDvn49_.js → protobuf-DjFcruCV.js} +0 -0
  884. /package/bundled-test-harness/assets/{pug-CGdWzJm1.js → pug-d79Nz4-Z.js} +0 -0
  885. /package/bundled-test-harness/assets/{python-BHLYjYlP.js → python-d8oxFZIM.js} +0 -0
  886. /package/bundled-test-harness/assets/{qsharp-BIq3i63T.js → qsharp-CeTlfxZW.js} +0 -0
  887. /package/bundled-test-harness/assets/{qunit-2hoQyeAZ.js → qunit-Cqwmt9Vl.js} +0 -0
  888. /package/bundled-test-harness/assets/{r-CBvzvDSA.js → r-BOu7JTro.js} +0 -0
  889. /package/bundled-test-harness/assets/{razor-JQ0RiIvo.js → razor-ZatoG_Is.js} +0 -0
  890. /package/bundled-test-harness/assets/{recent-files-cards-BQMviQb1.js → recent-files-cards-C3vIjaKb.js} +0 -0
  891. /package/bundled-test-harness/assets/{redis-BmSHTqTU.js → redis-DdXYPyQE.js} +0 -0
  892. /package/bundled-test-harness/assets/{redshift-B1NmQEH7.js → redshift-DswnW-YX.js} +0 -0
  893. /package/bundled-test-harness/assets/{render-component-g_fhz2dX.js → render-component-Bs21y6iv.js} +0 -0
  894. /package/bundled-test-harness/assets/{restructuredtext-Br9BtTbk.js → restructuredtext-C75vUmvX.js} +0 -0
  895. /package/bundled-test-harness/assets/{rough.esm-D8VnzNsL.js → rough.esm-B83ARgx6.js} +0 -0
  896. /package/bundled-test-harness/assets/{ruby-D9_-y1I3.js → ruby-D77950a-.js} +0 -0
  897. /package/bundled-test-harness/assets/{rust-1Jjr1EOs.js → rust-C_G4PKsG.js} +0 -0
  898. /package/bundled-test-harness/assets/{sb-X2JE4zEr.js → sb-Cz3P8_Gp.js} +0 -0
  899. /package/bundled-test-harness/assets/{scala-qFJERKkR.js → scala-DYqUg04P.js} +0 -0
  900. /package/bundled-test-harness/assets/{scheme-D-WJPStO.js → scheme-B31XEGu5.js} +0 -0
  901. /package/bundled-test-harness/assets/{scss-DysfZiXA.js → scss-CtvB8On5.js} +0 -0
  902. /package/bundled-test-harness/assets/{shell-C0Iu3NNJ.js → shell-C2QqpcPN.js} +0 -0
  903. /package/bundled-test-harness/assets/{solidity-Bato3Qrk.js → solidity-FHrhZFd-.js} +0 -0
  904. /package/bundled-test-harness/assets/{sophia-DI0cKdK8.js → sophia-Cxv5FOXb.js} +0 -0
  905. /package/bundled-test-harness/assets/{sparql-BTJMtwoD.js → sparql-CgGkGeQB.js} +0 -0
  906. /package/bundled-test-harness/assets/{sql-R6uHqFYU.js → sql-S6Dos2P0.js} +0 -0
  907. /package/bundled-test-harness/assets/{src-CdPyB7gY.js → src-CvuaVSsl.js} +0 -0
  908. /package/bundled-test-harness/assets/{st-CoyBvq37.js → st-Bfa7LAWp.js} +0 -0
  909. /package/bundled-test-harness/assets/{swift-Bj-haAlF.js → swift-BQD5Ef-A.js} +0 -0
  910. /package/bundled-test-harness/assets/{systemverilog-B-x1NEFI.js → systemverilog-DaNkPux4.js} +0 -0
  911. /package/bundled-test-harness/assets/{tcl-DAUdSQgz.js → tcl-gOPgCDyb.js} +0 -0
  912. /package/bundled-test-harness/assets/{test-support-BHjxBpDK.js → test-support-BEQX5x9U.js} +0 -0
  913. /package/bundled-test-harness/assets/{test-support-yKvYEh-u.js → test-support-BL4XKobD.js} +0 -0
  914. /package/bundled-test-harness/assets/{twig-B0sJ-GzS.js → twig-Bk4gPn5b.js} +0 -0
  915. /package/bundled-test-harness/assets/{typescript-DTMIM5Gl.js → typescript-pPYlxWzr.js} +0 -0
  916. /package/bundled-test-harness/assets/{typespec-6yo9VQxY.js → typespec-D9Zz743B.js} +0 -0
  917. /package/bundled-test-harness/assets/{vb-Bh2IfdtJ.js → vb-ziqHIsJV.js} +0 -0
  918. /package/bundled-test-harness/assets/{view-card-demo-U_AOj-RK.js → view-card-demo-CSIVYD3T.js} +0 -0
  919. /package/bundled-test-harness/assets/{wgsl-DsvJnCCt.js → wgsl-BXiwkiJL.js} +0 -0
  920. /package/bundled-test-harness/assets/{xml-CisPXcjD.js → xml-a_tUOik-.js} +0 -0
  921. /package/bundled-test-harness/assets/{yaml-DkHUoYI5.js → yaml-B3H8LDzK.js} +0 -0
@@ -1,3371 +0,0 @@
1
- import { i as __name, r as __exportAll, s as __toESM, t as __commonJSMin } from "./chunk-CGdGNDIi.js";
2
- import { n as decorateMethodV2, r as initializeDeferredDecorator, t as decorateFieldV2 } from "./runtime-CYyqkz5q-z3Y1hsJm.js";
3
- import { Ai as realmURL, Bn as DEFAULT_FALLBACK_MODELS, Di as localId, E as cardTypeIcon, It as SupportedMimeType, Ji as require_isSymbol, Mi as skillCardRef, Qt as require_isEqual, Sr as isCardInstance, T as cardTypeDisplayName, Tr as isFileDefInstance, Zt as inferContentType, aa as isCardErrorJSONAPI, ai as GetCardCollectionContextName, g as require_pluralize, gi as baseFileRef, it as resolveFileDefCodeRef, mi as baseCardRef, n as chooseCard, na as formattedError, o as internalKeyFor, oi as GetCardContextName, pi as aiBotUsername, r as chooseFile, wi as getMenuItems } from "./runtime-common-C7uLt5dN.js";
4
- import { u as require_identity, w as require_isObject } from "./index-esm-jNlTuF1a.js";
5
- import { i as v4 } from "./esm-browser-BEW1xlQc.js";
6
- import { c as formatISO, d as format, f as isSameDay, i as isSameYear } from "./esm-CCOu76Mh.js";
7
- import { t as config } from "./environment-DTzm0NP_.js";
8
- import { $n as setComponentTemplate, Mt as schedule, Nt as scheduleOnce, Ot as next, f as action, r as service, wt as cancel } from "./service-DJ87xpDt.js";
9
- import { n as registerDestructor } from "./destroyable-C10vUaMw.js";
10
- import { V as templateFactory, n as Helper, x as on } from "./index-DaCZcoCY-D2gI_aMw.js";
11
- import { d as isTextBasedContentType, m as requiredModality, p as modalityLabel } from "./file-def-manager-DNHII2oj.js";
12
- import { d as UpdateRoomSkillsCommand } from "./card-prerender-DXG8cQEv.js";
13
- import { t as isTesting } from "./runtime-BSthmflw.js";
14
- import { i as all, r as timeout, s as buildTask } from "./dist-BMY_e58l.js";
15
- import { n as tracked, t as cached } from "./tracking-Dv1Q4IKh.js";
16
- import { n as resource, r as use } from "./dist-CzRLJAqT.js";
17
- import { i as fn, o as hash, t as array } from "./helper-IC96SPCb.js";
18
- import { n as Resource } from "./dist-BoY9h0Zx.js";
19
- import { c as urlForRealmLookup } from "./utils-C7xS5xXC.js";
20
- import { i as templateOnly, o as Component, r as modifier, t as ClassBasedModifier } from "./dist-CXaz7pMY.js";
21
- import { n as Submodes } from "./submode-switcher-C7knA9zW.js";
22
- import "./template-D3TMIrc1.js";
23
- import "./template-factory-DMEv2kVd.js";
24
- import { E as RealmIcon, F as IconComponent$6, I as Velcro, M as Tooltip, S as Modal, X as IconComponent$7, a as BoxelInput, b as LoadingIndicator, c as CardContainer, f as DropdownButton, g as IconButton$1, h as Header, i as BoxelDropdown, j as Switch, l as CardHeader, n as Alert, o as BoxelSelect, r as Avatar, s as ButtonComponent, w as Pill, x as Menu } from "./components-DkyK1awC.js";
25
- import "./helper-B76ZRn-R.js";
26
- import { B as menuItem, C as and, D as cn, G as pick, H as not, I as gt, M as eq, X as toMenuItems, g as MenuItem, k as cssVar$1, w as bool } from "./helpers-3_o3xgj0.js";
27
- import { B as IconComponent$O, J as IconComponent$W, K as IconComponent$U, O as IconComponent$C, X as IconComponent$Y, d as IconComponent$17, gt as IconComponent$r, lt as IconComponent$k, st as IconComponent$i } from "./warning-CY8WOyKw-Dhp4YAnY.js";
28
- import { t as buildWaiter } from "./dist-DNuvI2rD.js";
29
- import { a as TrackedMap, i as TrackedSet, n as TrackedObject, r as TrackedArray } from "./dist-DLRXwlqz.js";
30
- import "./icons-JioR8DIh.js";
31
- import { r as isReady } from "./file-Dkzzhwoy.js";
32
- import { t as ShowCardCommand } from "./show-card-CVJLnzLa.js";
33
- import { n as CodeBlockComponent, r as AttachedFileDropdownMenu, t as FormattedAiBotMessage } from "./aibot-message-Dwxp5hTW.js";
34
- import { t as IconComponent$8 } from "./triangle-alert-DmPuInOU.js";
35
- import { t as consume } from "./dist-CRrRzAdn.js";
36
- import { n as isMatrixError } from "./matrix-utils-B4jgS_fS.js";
37
- import { t as require_debounce } from "./debounce-CwTDsmN-.js";
38
- import { r as errorJsonApiToErrorEntry, t as FileDefAttributesExtractor } from "./file-def-attributes-extractor-DGMrcc_b.js";
39
- import { t as modifier$1 } from "./on-key-DIgEQMn5.js";
40
- import { t as CardRenderer } from "./card-renderer-D1areYZe.js";
41
- import { t as perform } from "./perform-ByZ3LfhF.js";
42
- import { t as UserMessage } from "./user-message-DGU483O-.js";
43
- import { t as IconComponent$9 } from "./arrow-down-bpoOEY_Z.js";
44
- import { n as FallbackBanner } from "./fallback-banner-CDOWRgsD.js";
45
- //#region app/resources/auto-attached-card.ts
46
- var auto_attached_card_exports = /* @__PURE__ */ __exportAll({
47
- AutoAttachment: () => AutoAttachment,
48
- getAutoAttachment: () => getAutoAttachment
49
- });
50
- /**
51
- * Manages the auto-attachment of cards within our stack in consideration of user-actions of manually
52
- * removing and attaching new cards in the ai panel
53
- */
54
- var AutoAttachment = class extends Resource {
55
- constructor(..._args) {
56
- super(..._args);
57
- this.cardIds = new TrackedSet();
58
- this.#hasRegisteredDestructor = false;
59
- this.#referenceCounts = /* @__PURE__ */ new Map();
60
- this.#cardService = (initializeDeferredDecorator(this, "cardService"), void 0);
61
- this.#store = (initializeDeferredDecorator(this, "store"), void 0);
62
- this.calculateAutoAttachments = buildTask(() => ({
63
- context: this,
64
- generator: function* (submode, moduleInspectorPanel, autoAttachedFileUrls, playgroundPanelCardId, activeSpecId, topMostStackItems, attachedCardIds, removedCardIds) {
65
- this.cardIds.clear();
66
- if (submode === Submodes.Interact) for (let item of topMostStackItems) {
67
- if (!item.id) continue;
68
- if (removedCardIds?.has(item.id)) continue;
69
- if (attachedCardIds?.includes(item.id)) continue;
70
- let card = yield this.loadCard(item.id);
71
- if (!card || !isCardInstance(card)) continue;
72
- let realmURL$1 = card[realmURL];
73
- if (realmURL$1 && item.id === `${realmURL$1.href}index`) continue;
74
- this.cardIds.add(item.id);
75
- }
76
- else if (submode === Submodes.Code) {
77
- let cardFileUrl = autoAttachedFileUrls?.find((url) => url.endsWith(".json"));
78
- let cardId = cardFileUrl ? cardFileUrl.replace(/\.json$/, "") : void 0;
79
- if (cardId && !removedCardIds?.has(cardId) && !attachedCardIds?.includes(cardId)) {
80
- let card = yield this.loadCard(cardId);
81
- if (card && isCardInstance(card)) this.cardIds.add(cardId);
82
- }
83
- if (moduleInspectorPanel === "preview" && playgroundPanelCardId && !removedCardIds?.has(playgroundPanelCardId) && !attachedCardIds?.includes(playgroundPanelCardId)) this.cardIds.add(playgroundPanelCardId);
84
- if (moduleInspectorPanel === "spec" && activeSpecId && !removedCardIds?.has(activeSpecId) && !attachedCardIds?.includes(activeSpecId)) this.cardIds.add(activeSpecId);
85
- }
86
- }
87
- }), null, "calculateAutoAttachments", "restartable");
88
- }
89
- #hasRegisteredDestructor;
90
- #referenceCounts;
91
- static {
92
- decorateFieldV2(this.prototype, "cardService", [service]);
93
- }
94
- #cardService;
95
- static {
96
- decorateFieldV2(this.prototype, "store", [service]);
97
- }
98
- #store;
99
- modify(_positional, named) {
100
- const { submode, moduleInspectorPanel, autoAttachedFileUrls, playgroundPanelCardId, activeSpecId, topMostStackItems, attachedCardIds, removedCardIds } = named;
101
- this.reconcileReferences(this.getCandidateCardIds(submode, moduleInspectorPanel, autoAttachedFileUrls, playgroundPanelCardId, activeSpecId, topMostStackItems, attachedCardIds, removedCardIds));
102
- this.calculateAutoAttachments.perform(submode, moduleInspectorPanel, autoAttachedFileUrls, playgroundPanelCardId, activeSpecId, topMostStackItems, attachedCardIds, removedCardIds);
103
- if (!this.#hasRegisteredDestructor) {
104
- this.#hasRegisteredDestructor = true;
105
- registerDestructor(this, () => {
106
- for (let [id, count] of this.#referenceCounts) for (let i = 0; i < count; i++) this.store.dropReference(id);
107
- this.#referenceCounts.clear();
108
- });
109
- }
110
- }
111
- async loadCard(id) {
112
- let existing = this.store.peek(id);
113
- if (existing) return existing;
114
- return await this.store.get(id);
115
- }
116
- getCandidateCardIds(submode, moduleInspectorPanel, autoAttachedFileUrls, playgroundPanelCardId, activeSpecId, topMostStackItems, attachedCardIds, removedCardIds) {
117
- let candidateIds = [];
118
- if (submode === Submodes.Interact) {
119
- for (let item of topMostStackItems) if (item.id && !removedCardIds?.has(item.id) && !attachedCardIds?.includes(item.id)) candidateIds.push(item.id);
120
- return candidateIds;
121
- }
122
- if (submode !== Submodes.Code) return candidateIds;
123
- let cardFileUrl = autoAttachedFileUrls?.find((url) => url.endsWith(".json"));
124
- let cardId = cardFileUrl ? cardFileUrl.replace(/\.json$/, "") : void 0;
125
- if (cardId && !removedCardIds?.has(cardId) && !attachedCardIds?.includes(cardId)) candidateIds.push(cardId);
126
- if (moduleInspectorPanel === "preview" && playgroundPanelCardId && !removedCardIds?.has(playgroundPanelCardId) && !attachedCardIds?.includes(playgroundPanelCardId)) candidateIds.push(playgroundPanelCardId);
127
- if (moduleInspectorPanel === "spec" && activeSpecId && !removedCardIds?.has(activeSpecId) && !attachedCardIds?.includes(activeSpecId)) candidateIds.push(activeSpecId);
128
- return candidateIds;
129
- }
130
- reconcileReferences(targetIds) {
131
- let targetCounts = this.countReferences(targetIds);
132
- for (let [id, currentCount] of this.#referenceCounts) {
133
- let targetCount = targetCounts.get(id) ?? 0;
134
- if (currentCount > targetCount) this.dropReference(id, currentCount - targetCount);
135
- }
136
- for (let [id, targetCount] of targetCounts) {
137
- let currentCount = this.#referenceCounts.get(id) ?? 0;
138
- if (targetCount > currentCount) this.addReference(id, targetCount - currentCount);
139
- }
140
- }
141
- countReferences(ids) {
142
- let counts = /* @__PURE__ */ new Map();
143
- for (let id of ids) counts.set(id, (counts.get(id) ?? 0) + 1);
144
- return counts;
145
- }
146
- addReference(id, count = 1) {
147
- if (!id || count <= 0) return;
148
- for (let i = 0; i < count; i++) this.store.addReference(id);
149
- this.#referenceCounts.set(id, (this.#referenceCounts.get(id) ?? 0) + count);
150
- }
151
- dropReference(id, count = 1) {
152
- if (!id || count <= 0) return;
153
- let currentCount = this.#referenceCounts.get(id);
154
- if (!currentCount) return;
155
- let drops = Math.min(count, currentCount);
156
- for (let i = 0; i < drops; i++) this.store.dropReference(id);
157
- let remaining = currentCount - drops;
158
- if (remaining <= 0) this.#referenceCounts.delete(id);
159
- else this.#referenceCounts.set(id, remaining);
160
- }
161
- };
162
- function getAutoAttachment(parent, args) {
163
- return AutoAttachment.from(parent, () => ({ named: {
164
- submode: args.submode(),
165
- moduleInspectorPanel: args.moduleInspectorPanel(),
166
- autoAttachedFileUrls: args.autoAttachedFileUrls(),
167
- playgroundPanelCardId: args.playgroundPanelCardId(),
168
- activeSpecId: args.activeSpecId(),
169
- topMostStackItems: args.topMostStackItems(),
170
- attachedCardIds: args.attachedCardIds(),
171
- removedCardIds: args.removedCardIds()
172
- } }));
173
- }
174
- //#endregion
175
- //#region app/resources/card-collection.ts
176
- var card_collection_exports = /* @__PURE__ */ __exportAll({
177
- CardCollectionResource: () => CardCollectionResource,
178
- getCardCollection: () => getCardCollection
179
- });
180
- var import_isEqual = /* @__PURE__ */ __toESM(require_isEqual());
181
- var waiter = buildWaiter("card-collection-resource");
182
- var CardCollectionResource = class extends Resource {
183
- constructor(..._args) {
184
- super(..._args);
185
- this.#hasRegisteredDestructor = false;
186
- this.#referenceCounts = /* @__PURE__ */ new Map();
187
- this._cards = new TrackedArray();
188
- this._cardErrors = new TrackedArray();
189
- this.#_isLoaded = (initializeDeferredDecorator(this, "_isLoaded"), void 0);
190
- this.#store = (initializeDeferredDecorator(this, "store"), void 0);
191
- this.load = buildTask(() => ({
192
- context: this,
193
- generator: function* () {
194
- let token = waiter.beginAsync();
195
- try {
196
- yield Promise.resolve();
197
- this._isLoaded = false;
198
- if (!this.#ids || this.#ids.length === 0) {
199
- this.cards.splice(0);
200
- this.cardErrors.splice(0);
201
- }
202
- yield this.store.flush();
203
- this.cards.splice(0, this.cards.length, ...(this.#ids ?? []).map((id) => this.store.peek(id)).filter((i) => isCardInstance(i)));
204
- this.cardErrors.splice(0, this.cardErrors.length, ...(this.#ids ?? []).map((id) => this.store.peek(id)).filter((i) => i && !isCardInstance(i)));
205
- } finally {
206
- waiter.endAsync(token);
207
- this._isLoaded = true;
208
- }
209
- }
210
- }), null, "load", "restartable");
211
- }
212
- #ids;
213
- #hasRegisteredDestructor;
214
- #referenceCounts;
215
- static {
216
- decorateFieldV2(this.prototype, "_isLoaded", [tracked], function() {
217
- return false;
218
- });
219
- }
220
- #_isLoaded;
221
- static {
222
- decorateFieldV2(this.prototype, "store", [service]);
223
- }
224
- #store;
225
- modify(_positional, named) {
226
- let { ids } = named;
227
- let normalizedIds = ids ? [...ids] : void 0;
228
- if (!(0, import_isEqual.default)(normalizedIds, this.#ids)) {
229
- this.#ids = normalizedIds;
230
- this.reconcileReferences(normalizedIds);
231
- this.load.perform();
232
- }
233
- if (!this.#hasRegisteredDestructor) {
234
- this.#hasRegisteredDestructor = true;
235
- registerDestructor(this, () => {
236
- for (let [id, count] of this.#referenceCounts) for (let i = 0; i < count; i++) this.store.dropReference(id);
237
- this.#referenceCounts.clear();
238
- });
239
- }
240
- }
241
- get cards() {
242
- return this._cards;
243
- }
244
- get cardErrors() {
245
- return this._cardErrors;
246
- }
247
- get isLoaded() {
248
- return this._isLoaded;
249
- }
250
- get ids() {
251
- return this.#ids;
252
- }
253
- reconcileReferences(targetIds) {
254
- let targetCounts = this.countReferences(targetIds);
255
- for (let [id, currentCount] of this.#referenceCounts) {
256
- let targetCount = targetCounts.get(id) ?? 0;
257
- if (currentCount > targetCount) this.dropReference(id, currentCount - targetCount);
258
- }
259
- for (let [id, targetCount] of targetCounts) {
260
- let currentCount = this.#referenceCounts.get(id) ?? 0;
261
- if (targetCount > currentCount) this.addReference(id, targetCount - currentCount);
262
- }
263
- }
264
- countReferences(ids) {
265
- let counts = /* @__PURE__ */ new Map();
266
- if (!ids) return counts;
267
- for (let id of ids) counts.set(id, (counts.get(id) ?? 0) + 1);
268
- return counts;
269
- }
270
- addReference(id, count = 1) {
271
- if (!id || count <= 0) return;
272
- for (let i = 0; i < count; i++) this.store.addReference(id);
273
- this.#referenceCounts.set(id, (this.#referenceCounts.get(id) ?? 0) + count);
274
- }
275
- dropReference(id, count = 1) {
276
- if (!id || count <= 0) return;
277
- let currentCount = this.#referenceCounts.get(id);
278
- if (!currentCount) return;
279
- for (let i = 0; i < Math.min(count, currentCount); i++) this.store.dropReference(id);
280
- let remaining = currentCount - count;
281
- if (remaining <= 0) this.#referenceCounts.delete(id);
282
- else this.#referenceCounts.set(id, remaining);
283
- }
284
- };
285
- function getCardCollection(parent, ids) {
286
- return CardCollectionResource.from(parent, () => ({ named: { ids: ids() } }));
287
- }
288
- //#endregion
289
- //#region app/resources/card-resource.ts
290
- var card_resource_exports = /* @__PURE__ */ __exportAll({
291
- CardResource: () => CardResource,
292
- getCard: () => getCard
293
- });
294
- var CardResource = class extends Resource {
295
- #id;
296
- #type;
297
- #hasRegisteredDestructor = false;
298
- #hasReference = false;
299
- static {
300
- decorateFieldV2(this.prototype, "store", [service]);
301
- }
302
- #store = (initializeDeferredDecorator(this, "store"), void 0);
303
- modify(_positional, named) {
304
- let { id, type } = named;
305
- if (id !== this.#id || type !== this.#type) {
306
- this.dropReferenceIfHeld();
307
- this.#id = id;
308
- this.#type = type;
309
- if (this.#id) {
310
- this.store.addReference(this.#id, { type: this.#type });
311
- this.#hasReference = true;
312
- }
313
- }
314
- if (!this.#hasRegisteredDestructor) {
315
- this.#hasRegisteredDestructor = true;
316
- registerDestructor(this, () => {
317
- this.dropReferenceIfHeld();
318
- });
319
- }
320
- }
321
- dropReferenceIfHeld() {
322
- if (this.#id && this.#hasReference) {
323
- this.store.dropReference(this.#id);
324
- this.#hasReference = false;
325
- }
326
- }
327
- get readType() {
328
- return this.#type ?? "card";
329
- }
330
- peekForType(type) {
331
- if (!this.#id) return;
332
- return type === "file-meta" ? this.store.peek(this.#id, { type: "file-meta" }) : this.store.peek(this.#id);
333
- }
334
- peekErrorForType(type) {
335
- if (!this.#id) return;
336
- return type === "file-meta" ? this.store.peekError(this.#id, { type: "file-meta" }) : this.store.peekError(this.#id);
337
- }
338
- get card() {
339
- if (!this.#id) return;
340
- let maybeCard = this.peekForType(this.readType);
341
- return isCardInstance(maybeCard) || isFileDefInstance(maybeCard) ? maybeCard : void 0;
342
- }
343
- get cardError() {
344
- if (!this.#id) return;
345
- return this.peekErrorForType(this.readType);
346
- }
347
- get id() {
348
- return this.#id;
349
- }
350
- get isLoaded() {
351
- if (!this.#id) return false;
352
- let maybeInstanceOrError = this.peekForType(this.readType);
353
- return Boolean(maybeInstanceOrError);
354
- }
355
- get autoSaveState() {
356
- if (!this.#id) return;
357
- return this.store.getSaveState(this.#id);
358
- }
359
- };
360
- function getCard(parent, id, opts) {
361
- return CardResource.from(parent, () => ({ named: {
362
- id: id(),
363
- type: opts?.type
364
- } }));
365
- }
366
- //#endregion
367
- //#region ../boxel-icons/dist/@cardstack/boxel-icons/v1/icons/history.js
368
- var IconComponent$5 = setComponentTemplate(templateFactory({
369
- "id": "XDJM5+xM",
370
- "block": "[[[1,\"\\n \"],[11,\"svg\"],[24,\"xmlns\",\"http://www.w3.org/2000/svg\",\"http://www.w3.org/2000/xmlns/\"],[24,\"width\",\"24\"],[24,\"height\",\"24\"],[24,\"fill\",\"none\"],[24,\"stroke\",\"currentColor\"],[24,\"stroke-linecap\",\"round\"],[24,\"stroke-linejoin\",\"round\"],[24,\"stroke-width\",\"2\"],[24,0,\"lucide lucide-history\"],[24,\"viewBox\",\"0 0 24 24\"],[17,1],[12],[10,\"path\"],[14,\"d\",\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\"],[12],[13],[10,\"path\"],[14,\"d\",\"M3 3v5h5M12 7v5l4 2\"],[12],[13],[13],[1,\"\\n\"]],[\"&attrs\"],[]]",
371
- "moduleName": "/home/runner/work/boxel/boxel/packages/boxel-icons/src/icons/history.gts",
372
- "isStrictMode": true
373
- }), templateOnly());
374
- IconComponent$5.name = "history";
375
- //#endregion
376
- //#region ../boxel-icons/dist/@cardstack/boxel-icons/v1/icons/captions.js
377
- var IconComponent$4 = setComponentTemplate(templateFactory({
378
- "id": "cAklb7Ez",
379
- "block": "[[[1,\"\\n \"],[11,\"svg\"],[24,\"xmlns\",\"http://www.w3.org/2000/svg\",\"http://www.w3.org/2000/xmlns/\"],[24,\"width\",\"24\"],[24,\"height\",\"24\"],[24,\"fill\",\"none\"],[24,\"stroke\",\"currentColor\"],[24,\"stroke-linecap\",\"round\"],[24,\"stroke-linejoin\",\"round\"],[24,\"stroke-width\",\"2\"],[24,0,\"lucide lucide-captions\"],[24,\"viewBox\",\"0 0 24 24\"],[17,1],[12],[10,\"rect\"],[14,\"width\",\"18\"],[14,\"height\",\"14\"],[14,\"x\",\"3\"],[14,\"y\",\"5\"],[14,\"rx\",\"2\"],[14,\"ry\",\"2\"],[12],[13],[10,\"path\"],[14,\"d\",\"M7 15h4m4 0h2M7 11h2m4 0h4\"],[12],[13],[13],[1,\"\\n\"]],[\"&attrs\"],[]]",
380
- "moduleName": "/home/runner/work/boxel/boxel/packages/boxel-icons/src/icons/captions.gts",
381
- "isStrictMode": true
382
- }), templateOnly());
383
- IconComponent$4.name = "captions";
384
- //#endregion
385
- //#region ../boxel-icons/dist/@cardstack/boxel-icons/v1/icons/file-code.js
386
- var IconComponent$3 = setComponentTemplate(templateFactory({
387
- "id": "AJiwqHCa",
388
- "block": "[[[1,\"\\n \"],[11,\"svg\"],[24,\"xmlns\",\"http://www.w3.org/2000/svg\",\"http://www.w3.org/2000/xmlns/\"],[24,\"width\",\"24\"],[24,\"height\",\"24\"],[24,\"fill\",\"none\"],[24,\"stroke\",\"currentColor\"],[24,\"stroke-linecap\",\"round\"],[24,\"stroke-linejoin\",\"round\"],[24,\"stroke-width\",\"2\"],[24,0,\"lucide lucide-file-code\"],[24,\"viewBox\",\"0 0 24 24\"],[17,1],[12],[10,\"path\"],[14,\"d\",\"M10 12.5 8 15l2 2.5M14 12.5l2 2.5-2 2.5M14 2v4a2 2 0 0 0 2 2h4\"],[12],[13],[10,\"path\"],[14,\"d\",\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z\"],[12],[13],[13],[1,\"\\n\"]],[\"&attrs\"],[]]",
389
- "moduleName": "/home/runner/work/boxel/boxel/packages/boxel-icons/src/icons/file-code.gts",
390
- "isStrictMode": true
391
- }), templateOnly());
392
- IconComponent$3.name = "file-code";
393
- //#endregion
394
- //#region app/components/ai-assistant/attachment-picker/attach-button.gts
395
- var AttachButtonTrigger = setComponentTemplate(templateFactory({
396
- "id": "u4STmgtZ",
397
- "block": "[[[8,[32,0],[[24,0,\"attach-button__trigger-icon\"],[24,\"width\",\"22px\"],[24,\"height\",\"22px\"],[24,\"data-test-attach-button\",\"\"]],null,null]],[],[]]",
398
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/attachment-picker/attach-button.gts",
399
- "scope": () => [IconComponent$6],
400
- "isStrictMode": true
401
- }), templateOnly());
402
- var AttachButton = class extends Component {
403
- static {
404
- setComponentTemplate(templateFactory({
405
- "id": "TOp3F0sL",
406
- "block": "[[[8,[32,0],[[24,0,\"attach-button\"],[24,\"data-scopedcss-8a941144c9-8ca2f29c11\",\"\"]],[[\"@options\",\"@selected\",\"@onChange\",\"@verticalPosition\",\"@renderInPlace\",\"@placeholder\",\"@searchEnabled\",\"@matchTriggerWidth\",\"@dropdownClass\",\"@triggerComponent\"],[[30,0,[\"menuOptions\"]],[27],[30,0,[\"handleSelection\"]],\"above\",true,\"\",false,false,\"attach-button__dropdown\",[50,[32,1],0,null,null]]],[[\"default\"],[[[[1,\"\\n\"],[41,[28,[32,2],[[30,1],\"Attach a Card\"],null],[[[1,\" \"],[10,0],[14,0,\"menu-option\"],[14,\"data-test-attach-card-btn\",\"\"],[14,\"data-scopedcss-8a941144c9-8ca2f29c11\",\"\"],[12],[1,\"\\n \"],[8,[32,3],[[24,\"width\",\"16px\"],[24,\"height\",\"16px\"],[24,\"data-scopedcss-8a941144c9-8ca2f29c11\",\"\"]],null,null],[1,\"\\n \"],[10,1],[14,\"data-scopedcss-8a941144c9-8ca2f29c11\",\"\"],[12],[1,[30,1]],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[41,[28,[32,2],[[30,1],\"Attach a File (Workspace)\"],null],[[[1,\" \"],[10,0],[14,0,\"menu-option\"],[14,\"data-test-attach-workspace-file-btn\",\"\"],[14,\"data-test-attach-file-btn\",\"\"],[14,\"data-scopedcss-8a941144c9-8ca2f29c11\",\"\"],[12],[1,\"\\n \"],[8,[32,4],[[24,\"width\",\"16px\"],[24,\"height\",\"16px\"],[24,\"data-scopedcss-8a941144c9-8ca2f29c11\",\"\"]],null,null],[1,\"\\n \"],[10,1],[14,\"data-scopedcss-8a941144c9-8ca2f29c11\",\"\"],[12],[1,[30,1]],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[41,[28,[32,2],[[30,1],\"Attach a File (Your Computer)\"],null],[[[1,\" \"],[10,0],[14,0,\"menu-option\"],[14,\"data-test-attach-local-file-btn\",\"\"],[14,\"data-scopedcss-8a941144c9-8ca2f29c11\",\"\"],[12],[1,\"\\n \"],[8,[32,4],[[24,\"width\",\"16px\"],[24,\"height\",\"16px\"],[24,\"data-scopedcss-8a941144c9-8ca2f29c11\",\"\"]],null,null],[1,\"\\n \"],[10,1],[14,\"data-scopedcss-8a941144c9-8ca2f29c11\",\"\"],[12],[1,[30,1]],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[1,\" \"],[10,1],[14,\"data-scopedcss-8a941144c9-8ca2f29c11\",\"\"],[12],[1,[30,1]],[13],[1,\"\\n \"]],[]]]],[]]]],[]]]],[1]]]]],[1,\"\\n\"]],[\"option\"],[\"component\",\"if\"]]",
407
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/attachment-picker/attach-button.gts",
408
- "scope": () => [
409
- BoxelSelect,
410
- AttachButtonTrigger,
411
- eq,
412
- IconComponent$4,
413
- IconComponent$3
414
- ],
415
- "isStrictMode": true
416
- }), this);
417
- }
418
- get menuOptions() {
419
- return [
420
- "Attach a Card",
421
- "Attach a File (Workspace)",
422
- "Attach a File (Your Computer)"
423
- ];
424
- }
425
- handleSelection(option) {
426
- if (option === "Attach a Card") this.onAttachCard();
427
- else if (option === "Attach a File (Workspace)") this.onChooseFile();
428
- else if (option === "Attach a File (Your Computer)") this.onChooseLocalFile();
429
- }
430
- static {
431
- decorateMethodV2(this.prototype, "handleSelection", [action]);
432
- }
433
- onAttachCard() {
434
- this.chooseCardTask.perform();
435
- }
436
- static {
437
- decorateMethodV2(this.prototype, "onAttachCard", [action]);
438
- }
439
- onChooseFile() {
440
- this.doChooseFile.perform();
441
- }
442
- static {
443
- decorateMethodV2(this.prototype, "onChooseFile", [action]);
444
- }
445
- onChooseLocalFile() {
446
- this.doChooseLocalFile.perform();
447
- }
448
- static {
449
- decorateMethodV2(this.prototype, "onChooseLocalFile", [action]);
450
- }
451
- chooseCardTask = buildTask(() => ({
452
- context: this,
453
- generator: function* () {
454
- let cardId = yield chooseCard({ filter: { type: baseCardRef } });
455
- if (cardId) this.args.chooseCard(cardId);
456
- }
457
- }), null, "chooseCardTask", "restartable");
458
- doChooseFile = buildTask(() => ({
459
- context: this,
460
- generator: function* () {
461
- let chosenFile = yield chooseFile();
462
- if (chosenFile) yield this.args.chooseFile(chosenFile);
463
- return chosenFile;
464
- }
465
- }), null, "doChooseFile", "restartable");
466
- doChooseLocalFile = buildTask(() => ({
467
- context: this,
468
- generator: function* () {
469
- yield this.args.chooseLocalFile();
470
- }
471
- }), null, "doChooseLocalFile", "restartable");
472
- };
473
- //#endregion
474
- //#region app/components/card-pill.gts
475
- var CardPill = class extends Component {
476
- static {
477
- decorateFieldV2(this.prototype, "getCard", [consume(GetCardContextName)]);
478
- }
479
- #getCard = (initializeDeferredDecorator(this, "getCard"), void 0);
480
- static {
481
- decorateFieldV2(this.prototype, "realm", [service]);
482
- }
483
- #realm = (initializeDeferredDecorator(this, "realm"), void 0);
484
- get cardResource() {
485
- return this.getCard(this, () => this.args.cardId);
486
- }
487
- static {
488
- decorateMethodV2(this.prototype, "cardResource", [cached]);
489
- }
490
- get cardTitle() {
491
- return this.args.displayTitle || this.card?.cardTitle || this.cardError?.meta.cardTitle;
492
- }
493
- get card() {
494
- return this.cardResource?.card;
495
- }
496
- get cardError() {
497
- return this.cardResource?.cardError;
498
- }
499
- get isCreating() {
500
- return this.card && !this.card.id && !this.cardError;
501
- }
502
- handleCardClick() {
503
- if (this.args.onClick) this.args.onClick();
504
- }
505
- static {
506
- decorateMethodV2(this.prototype, "handleCardClick", [action]);
507
- }
508
- handleRemoveClick(event) {
509
- event.stopPropagation();
510
- if (this.args.onRemove) this.args.onRemove();
511
- }
512
- static {
513
- decorateMethodV2(this.prototype, "handleRemoveClick", [action]);
514
- }
515
- get pillKind() {
516
- return this.args.onClick ? "button" : "default";
517
- }
518
- get borderStyle() {
519
- return this.args.borderType === "dashed" ? "dashed" : "solid";
520
- }
521
- get borderClass() {
522
- return `border-${this.borderStyle}`;
523
- }
524
- static {
525
- setComponentTemplate(templateFactory({
526
- "id": "tDlDpZOm",
527
- "block": "[[[41,[30,0,[\"isCreating\"]],[[[1,\" \"],[8,[32,0],[[24,\"data-scopedcss-e119b76eb6-f8fc586608\",\"\"]],null,null],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,1],[[16,0,[28,[32,2],[\"card-pill\",[30,0,[\"borderClass\"]]],null]],[16,\"data-test-attached-card\",[30,1]],[17,2],[24,\"data-scopedcss-e119b76eb6-f8fc586608\",\"\"],[4,[32,3],[\"click\",[30,0,[\"handleCardClick\"]]],null]],[[\"@kind\"],[[30,0,[\"pillKind\"]]]],[[\"iconLeft\",\"default\",\"iconRight\"],[[[[1,\"\\n\"],[41,[30,3],[[[1,\" \"],[8,[32,4],[[24,0,\"fallback-card-icon\"],[24,\"width\",\"18\"],[24,\"height\",\"18\"],[24,\"aria-hidden\",\"true\"],[24,\"data-scopedcss-e119b76eb6-f8fc586608\",\"\"]],null,null],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,5],[[24,\"data-scopedcss-e119b76eb6-f8fc586608\",\"\"]],[[\"@realmInfo\"],[[28,[30,0,[\"realm\",\"info\"]],[[30,4]],null]]],null],[1,\"\\n\"]],[]]],[1,\" \"]],[]],[[[1,\"\\n \"],[10,0],[14,0,\"card-content\"],[15,\"title\",[30,0,[\"cardTitle\"]]],[14,\"data-scopedcss-e119b76eb6-f8fc586608\",\"\"],[12],[1,\"\\n \"],[1,[30,0,[\"cardTitle\"]]],[1,\"\\n \"],[13],[1,\"\\n\\n \"]],[]],[[[1,\"\\n\"],[41,[30,5],[[[1,\" \"],[8,[32,6],[[24,0,\"remove-button\"],[24,\"data-test-remove-card-btn\",\"\"],[24,\"data-scopedcss-e119b76eb6-f8fc586608\",\"\"],[4,[32,3],[\"click\",[30,0,[\"handleRemoveClick\"]]],null]],[[\"@icon\",\"@height\",\"@width\"],[[32,7],\"10\",\"10\"]],null],[1,\"\\n\"]],[]],null],[1,\"\\n\"],[41,[30,6],[[[1,\" \"],[8,[32,8],[[24,\"data-scopedcss-e119b76eb6-f8fc586608\",\"\"]],[[\"@file\",\"@isNewFile\",\"@isCardInstance\"],[[30,6],false,true]],null],[1,\"\\n\"]],[]],null],[1,\" \"]],[]]]]],[1,\"\\n\"]],[]]]],[\"@cardId\",\"&attrs\",\"@showErrorIcon\",\"@urlForRealmLookup\",\"@onRemove\",\"@file\"],[\"if\"]]",
528
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/card-pill.gts",
529
- "scope": () => [
530
- LoadingIndicator,
531
- Pill,
532
- cn,
533
- on,
534
- IconComponent$O,
535
- RealmIcon,
536
- IconButton$1,
537
- IconComponent$i,
538
- AttachedFileDropdownMenu
539
- ],
540
- "isStrictMode": true
541
- }), this);
542
- }
543
- };
544
- //#endregion
545
- //#region ../boxel-icons/dist/@cardstack/boxel-icons/v1/icons/refresh-cw.js
546
- var IconComponent$2 = setComponentTemplate(templateFactory({
547
- "id": "YzKpAqdE",
548
- "block": "[[[1,\"\\n \"],[11,\"svg\"],[24,\"xmlns\",\"http://www.w3.org/2000/svg\",\"http://www.w3.org/2000/xmlns/\"],[24,\"width\",\"24\"],[24,\"height\",\"24\"],[24,\"fill\",\"none\"],[24,\"stroke\",\"currentColor\"],[24,\"stroke-linecap\",\"round\"],[24,\"stroke-linejoin\",\"round\"],[24,\"stroke-width\",\"2\"],[24,0,\"lucide lucide-refresh-cw\"],[24,\"viewBox\",\"0 0 24 24\"],[17,1],[12],[10,\"path\"],[14,\"d\",\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\"],[12],[13],[10,\"path\"],[14,\"d\",\"M21 3v5h-5M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\"],[12],[13],[10,\"path\"],[14,\"d\",\"M8 16H3v5\"],[12],[13],[13],[1,\"\\n\"]],[\"&attrs\"],[]]",
549
- "moduleName": "/home/runner/work/boxel/boxel/packages/boxel-icons/src/icons/refresh-cw.gts",
550
- "isStrictMode": true
551
- }), templateOnly());
552
- IconComponent$2.name = "refresh-cw";
553
- //#endregion
554
- //#region app/components/file-pill.gts
555
- var FilePill = class extends Component {
556
- static {
557
- decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
558
- }
559
- #operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
560
- get displayName() {
561
- let fileName = this.args.file.name?.trim();
562
- if (fileName) return fileName;
563
- return this.args.file.sourceUrl ?? "Unnamed file";
564
- }
565
- handleFileClick() {
566
- if (this.args.onClick) this.args.onClick();
567
- }
568
- static {
569
- decorateMethodV2(this.prototype, "handleFileClick", [action]);
570
- }
571
- handleRemoveClick(event) {
572
- event.stopPropagation();
573
- if (this.args.onRemove) this.args.onRemove();
574
- }
575
- static {
576
- decorateMethodV2(this.prototype, "handleRemoveClick", [action]);
577
- }
578
- handleDownloadClick(event) {
579
- event.stopPropagation();
580
- if (this.args.onDownload) this.args.onDownload();
581
- }
582
- static {
583
- decorateMethodV2(this.prototype, "handleDownloadClick", [action]);
584
- }
585
- handleRetryClick(event) {
586
- event.stopPropagation();
587
- this.args.onRetry?.();
588
- }
589
- static {
590
- decorateMethodV2(this.prototype, "handleRetryClick", [action]);
591
- }
592
- get pillKind() {
593
- return this.args.onClick ? "button" : "default";
594
- }
595
- get borderStyle() {
596
- return this.args.borderType === "dashed" ? "dashed" : "solid";
597
- }
598
- get borderClass() {
599
- return `border-${this.borderStyle}`;
600
- }
601
- static {
602
- setComponentTemplate(templateFactory({
603
- "id": "kWjkPLfq",
604
- "block": "[[[8,[32,0],[[16,0,[28,[32,1],[\"file-pill\",[30,0,[\"borderClass\"]]],[[\"has-warning\"],[[30,1]]]]],[16,\"data-test-attached-file\",[30,2,[\"sourceUrl\"]]],[16,\"data-test-file-upload-status\",[30,3]],[16,\"data-test-file-modality-warning\",[52,[30,1],\"true\"]],[17,4],[24,\"data-scopedcss-814b411ed3-74805ca0ee\",\"\"],[4,[32,2],[\"click\",[30,0,[\"handleFileClick\"]]],null]],[[\"@kind\"],[[30,0,[\"pillKind\"]]]],[[\"iconLeft\",\"default\",\"iconRight\"],[[[[1,\"\\n\"],[41,[30,1],[[[1,\" \"],[8,[32,3],[[24,\"data-scopedcss-814b411ed3-74805ca0ee\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,4],[[24,0,\"warning-icon\"],[24,\"width\",\"18\"],[24,\"height\",\"18\"],[24,\"data-scopedcss-814b411ed3-74805ca0ee\",\"\"]],null,null],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[1,[30,1]],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,5],[[24,\"width\",\"18\"],[24,\"height\",\"18\"],[16,5,[28,[32,6],null,[[\"icon-color\"],[\"#0031ff\"]]]],[24,\"data-scopedcss-814b411ed3-74805ca0ee\",\"\"]],null,null],[1,\"\\n\"]],[]]],[1,\" \"]],[]],[[[1,\"\\n \"],[10,1],[14,0,\"file-name\"],[15,\"title\",[30,0,[\"displayName\"]]],[14,\"data-scopedcss-814b411ed3-74805ca0ee\",\"\"],[12],[1,\"\\n \"],[1,[30,0,[\"displayName\"]]],[1,\"\\n \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n\"],[41,[28,[32,7],[[30,3],\"error\"],null],[[[41,[30,5],[[[1,\" \"],[8,[32,8],[[24,0,\"retry-button\"],[24,\"data-test-file-retry-btn\",\"\"],[24,\"data-scopedcss-814b411ed3-74805ca0ee\",\"\"],[4,[32,2],[\"click\",[30,0,[\"handleRetryClick\"]]],null]],[[\"@icon\",\"@height\",\"@width\"],[[32,9],\"10\",\"10\"]],null],[1,\"\\n\"]],[]],null]],[]],null],[41,[30,6],[[[1,\" \"],[8,[32,8],[[24,0,\"remove-button\"],[24,\"data-test-remove-file-btn\",\"\"],[24,\"data-scopedcss-814b411ed3-74805ca0ee\",\"\"],[4,[32,2],[\"click\",[30,0,[\"handleRemoveClick\"]]],null]],[[\"@icon\",\"@height\",\"@width\"],[[32,10],\"10\",\"10\"]],null],[1,\"\\n\"]],[]],null],[41,[30,7],[[[1,\" \"],[8,[32,8],[[24,0,\"download-button\"],[24,\"data-test-download-file-btn\",\"\"],[24,\"data-scopedcss-814b411ed3-74805ca0ee\",\"\"],[4,[32,2],[\"click\",[30,0,[\"handleDownloadClick\"]]],null]],[[\"@icon\",\"@height\",\"@width\"],[[32,11],\"10\",\"10\"]],null],[1,\"\\n\"]],[]],null],[1,\"\\n\"],[41,[30,8],[[[1,\" \"],[8,[32,12],[[24,\"data-scopedcss-814b411ed3-74805ca0ee\",\"\"]],[[\"@file\",\"@isNewFile\"],[[30,2],false]],null],[1,\"\\n\"]],[]],null],[1,\" \"]],[]]]]],[1,\"\\n\"]],[\"@warningMessage\",\"@file\",\"@uploadStatus\",\"&attrs\",\"@onRetry\",\"@onRemove\",\"@onDownload\",\"@fileActionsEnabled\"],[\"if\"]]",
605
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/file-pill.gts",
606
- "scope": () => [
607
- Pill,
608
- cn,
609
- on,
610
- Tooltip,
611
- IconComponent$8,
612
- IconComponent$3,
613
- cssVar$1,
614
- eq,
615
- IconButton$1,
616
- IconComponent$2,
617
- IconComponent$i,
618
- IconComponent$W,
619
- AttachedFileDropdownMenu
620
- ],
621
- "isStrictMode": true
622
- }), this);
623
- }
624
- };
625
- //#endregion
626
- //#region app/components/ai-assistant/attachment-picker/attached-items.gts
627
- var MAX_ITEMS_TO_DISPLAY = 4;
628
- var AttachedItems = class extends Component {
629
- static {
630
- decorateFieldV2(this.prototype, "areAllItemsDisplayed", [tracked], function() {
631
- return false;
632
- });
633
- }
634
- #areAllItemsDisplayed = (initializeDeferredDecorator(this, "areAllItemsDisplayed"), void 0);
635
- static {
636
- decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
637
- }
638
- #operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
639
- get itemsToDisplay() {
640
- return this.areAllItemsDisplayed ? this.args.items : this.args.items.slice(0, MAX_ITEMS_TO_DISPLAY);
641
- }
642
- isCard = (item) => {
643
- return isCardInstance(item);
644
- };
645
- isAutoAttachedCard = (cardId) => {
646
- return this.args.autoAttachedCardIds?.has(cardId) ?? false;
647
- };
648
- isAutoAttachedFile = (file) => {
649
- return this.args.autoAttachedFiles?.some((autoFile) => autoFile.sourceUrl === file.sourceUrl) ?? false;
650
- };
651
- toggleViewAllAttachedCards() {
652
- this.areAllItemsDisplayed = !this.areAllItemsDisplayed;
653
- }
654
- static {
655
- decorateMethodV2(this.prototype, "toggleViewAllAttachedCards", [action]);
656
- }
657
- getCardErrorRealm(cardError) {
658
- return cardError.realm ?? this.operatorModeStateService.realmURL;
659
- }
660
- handleRemoveCard(cardId) {
661
- this.args.removeCard(cardId);
662
- }
663
- static {
664
- decorateMethodV2(this.prototype, "handleRemoveCard", [action]);
665
- }
666
- handleChooseCard(cardId) {
667
- if (this.args.chooseCard) this.args.chooseCard(cardId);
668
- }
669
- static {
670
- decorateMethodV2(this.prototype, "handleChooseCard", [action]);
671
- }
672
- handleChooseFile(file) {
673
- if (this.args.chooseFile) this.args.chooseFile(file);
674
- }
675
- static {
676
- decorateMethodV2(this.prototype, "handleChooseFile", [action]);
677
- }
678
- handleRemoveFile(file) {
679
- this.args.removeFile(file);
680
- }
681
- static {
682
- decorateMethodV2(this.prototype, "handleRemoveFile", [action]);
683
- }
684
- getUploadStatus = (file) => {
685
- let sourceUrl = file.sourceUrl;
686
- if (!sourceUrl) return;
687
- return this.args.fileUploadStates?.get(sourceUrl)?.status;
688
- };
689
- getModalityWarning = (file) => {
690
- let modality = requiredModality(file.contentType);
691
- if (modality) {
692
- let modalities = this.args.inputModalities;
693
- if (modalities && !modalities.includes(modality)) return `Model does not support ${modalityLabel(modality)}. Only metadata will be sent.`;
694
- return;
695
- }
696
- if (!isTextBasedContentType(file.contentType)) return "File type not supported. Will send file metadata only.";
697
- };
698
- static {
699
- setComponentTemplate(templateFactory({
700
- "id": "pOUQlfuS",
701
- "block": "[[[11,0],[24,0,\"attached-items\"],[17,1],[24,\"data-scopedcss-d7e22fecb0-82837c0ab7\",\"\"],[12],[1,\"\\n\"],[41,[30,2],[[[42,[28,[31,2],[[28,[31,2],[[30,0,[\"itemsToDisplay\"]]],null]],null],null,[[[41,[28,[32,0],[[30,3]],null],[[[41,[30,3,[\"id\"]],[[[41,[28,[30,0,[\"isAutoAttachedCard\"]],[[30,3,[\"id\"]]],null],[[[1,\" \"],[8,[32,1],[[24,\"data-scopedcss-d7e22fecb0-82837c0ab7\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,2],[[16,\"data-test-autoattached-card\",[30,3,[\"id\"]]],[24,\"data-scopedcss-d7e22fecb0-82837c0ab7\",\"\"]],[[\"@cardId\",\"@borderType\",\"@onClick\",\"@onRemove\",\"@urlForRealmLookup\"],[[30,3,[\"id\"]],\"dashed\",[28,[32,3],[[30,0,[\"handleChooseCard\"]],[30,3,[\"id\"]]],null],[28,[32,3],[[30,0,[\"handleRemoveCard\"]],[30,3,[\"id\"]]],null],[28,[30,0,[\"getCardErrorRealm\"]],[[30,3]],null]]],null],[1,\"\\n \"]],[]],[[[1,\"\\n\"],[41,[30,4],[[[1,\" \"],[1,[30,4]],[1,\"\\n\"]],[]],[[[41,[28,[30,0,[\"isAutoAttachedCard\"]],[[30,3,[\"id\"]]],null],[[[1,\" Topmost card is shared automatically\\n \"]],[]],null]],[]]],[1,\" \"]],[]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,2],[[24,\"data-scopedcss-d7e22fecb0-82837c0ab7\",\"\"]],[[\"@cardId\",\"@borderType\",\"@onRemove\",\"@urlForRealmLookup\"],[[30,3,[\"id\"]],\"solid\",[28,[32,3],[[30,0,[\"handleRemoveCard\"]],[30,3,[\"id\"]]],null],[28,[30,0,[\"getCardErrorRealm\"]],[[30,3]],null]]],null],[1,\"\\n\"]],[]]]],[]],null]],[]],[[[41,[28,[30,0,[\"isCard\"]],[[30,3]],null],[[[41,[28,[30,0,[\"isAutoAttachedCard\"]],[[30,3,[\"id\"]]],null],[[[1,\" \"],[8,[32,1],[[24,\"data-scopedcss-d7e22fecb0-82837c0ab7\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,2],[[16,\"data-test-autoattached-card\",[28,[32,4],[[30,3]],null]],[24,\"data-scopedcss-d7e22fecb0-82837c0ab7\",\"\"]],[[\"@cardId\",\"@borderType\",\"@onClick\",\"@onRemove\",\"@urlForRealmLookup\"],[[28,[32,4],[[30,3]],null],\"dashed\",[28,[32,3],[[30,0,[\"handleChooseCard\"]],[28,[32,4],[[30,3]],null]],null],[28,[32,3],[[30,0,[\"handleRemoveCard\"]],[28,[32,4],[[30,3]],null]],null],[28,[32,5],[[30,3]],null]]],null],[1,\"\\n \"]],[]],[[[1,\"\\n\"],[41,[30,4],[[[1,\" \"],[1,[30,4]],[1,\"\\n\"]],[]],[[[41,[28,[30,0,[\"isAutoAttachedCard\"]],[[30,3,[\"id\"]]],null],[[[1,\" Topmost card is shared automatically\\n \"]],[]],null]],[]]],[1,\" \"]],[]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,2],[[24,\"data-scopedcss-d7e22fecb0-82837c0ab7\",\"\"]],[[\"@cardId\",\"@borderType\",\"@onRemove\",\"@urlForRealmLookup\"],[[28,[32,4],[[30,3]],null],\"solid\",[28,[32,3],[[30,0,[\"handleRemoveCard\"]],[28,[32,4],[[30,3]],null]],null],[28,[32,5],[[30,3]],null]]],null],[1,\"\\n\"]],[]]]],[]],[[[41,[28,[30,0,[\"isAutoAttachedFile\"]],[[30,3]],null],[[[1,\" \"],[8,[32,1],[[24,\"data-scopedcss-d7e22fecb0-82837c0ab7\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,6],[[16,\"data-test-autoattached-file\",[30,3,[\"sourceUrl\"]]],[24,\"data-scopedcss-d7e22fecb0-82837c0ab7\",\"\"]],[[\"@file\",\"@borderType\",\"@onClick\",\"@onRemove\",\"@uploadStatus\",\"@onRetry\",\"@warningMessage\"],[[30,3],\"dashed\",[28,[32,3],[[30,0,[\"handleChooseFile\"]],[30,3]],null],[28,[32,3],[[30,0,[\"handleRemoveFile\"]],[30,3]],null],[28,[30,0,[\"getUploadStatus\"]],[[30,3]],null],[52,[30,5],[28,[32,3],[[30,5],[30,3]],null]],[28,[30,0,[\"getModalityWarning\"]],[[30,3]],null]]],null],[1,\"\\n \"]],[]],[[[1,\"\\n Currently opened file is shared automatically\\n \"]],[]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,6],[[24,\"data-scopedcss-d7e22fecb0-82837c0ab7\",\"\"]],[[\"@file\",\"@borderType\",\"@onRemove\",\"@uploadStatus\",\"@onRetry\",\"@warningMessage\"],[[30,3],\"solid\",[28,[32,3],[[30,0,[\"handleRemoveFile\"]],[30,3]],null],[28,[30,0,[\"getUploadStatus\"]],[[30,3]],null],[52,[30,5],[28,[32,3],[[30,5],[30,3]],null]],[28,[30,0,[\"getModalityWarning\"]],[[30,3]],null]]],null],[1,\"\\n\"]],[]]],[1,\" \"]],[]]]],[]]]],[3]],null],[41,[28,[32,7],[[28,[32,8],[[30,6,[\"length\"]],[32,9]],null],[28,[32,10],[[30,0,[\"areAllItemsDisplayed\"]]],null]],null],[[[1,\" \"],[8,[32,11],[[24,\"data-test-view-all\",\"\"],[24,\"data-scopedcss-d7e22fecb0-82837c0ab7\",\"\"],[4,[32,12],[\"click\",[30,0,[\"toggleViewAllAttachedCards\"]]],null]],[[\"@kind\"],[\"button\"]],[[\"default\"],[[[[1,\"\\n View All (\"],[1,[30,6,[\"length\"]]],[1,\")\\n \"]],[]]]]],[1,\"\\n\"]],[]],null]],[]],null],[13],[1,\"\\n\"]],[\"&attrs\",\"@isLoaded\",\"item\",\"@autoAttachedCardTooltipMessage\",\"@retryFileUpload\",\"@items\"],[\"if\",\"each\",\"-track-array\"]]",
702
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/attachment-picker/attached-items.gts",
703
- "scope": () => [
704
- isCardErrorJSONAPI,
705
- Tooltip,
706
- CardPill,
707
- fn,
708
- idFor,
709
- urlForRealmLookup,
710
- FilePill,
711
- and,
712
- gt,
713
- MAX_ITEMS_TO_DISPLAY,
714
- not,
715
- Pill,
716
- on
717
- ],
718
- "isStrictMode": true
719
- }), this);
720
- }
721
- };
722
- function idFor(instance) {
723
- return instance.id ?? instance[localId];
724
- }
725
- //#endregion
726
- //#region app/components/ai-assistant/attachment-picker/index.gts
727
- var AiAssistantAttachmentPicker = class extends Component {
728
- static {
729
- setComponentTemplate(templateFactory({
730
- "id": "+jL9HC3y",
731
- "block": "[[[18,12,[[50,[32,0],0,null,[[\"isLoaded\",\"items\",\"autoAttachedCardIds\",\"autoAttachedFiles\",\"removeCard\",\"removeFile\",\"chooseCard\",\"chooseFile\",\"autoAttachedCardTooltipMessage\",\"fileUploadStates\",\"retryFileUpload\",\"inputModalities\"],[[30,0,[\"isLoaded\"]],[30,0,[\"items\"]],[30,1],[30,2],[30,3],[30,4],[30,5],[30,6],[30,7],[30,8],[30,9],[30,10]]]],[50,[32,1],0,null,[[\"chooseCard\",\"chooseFile\",\"chooseLocalFile\"],[[30,5],[30,6],[30,11]]]]]]],[\"@autoAttachedCardIds\",\"@autoAttachedFiles\",\"@removeCard\",\"@removeFile\",\"@chooseCard\",\"@chooseFile\",\"@autoAttachedCardTooltipMessage\",\"@fileUploadStates\",\"@retryFileUpload\",\"@inputModalities\",\"@chooseLocalFile\",\"&default\"],[\"yield\",\"component\"]]",
732
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/attachment-picker/index.gts",
733
- "scope": () => [AttachedItems, AttachButton],
734
- "isStrictMode": true
735
- }), this);
736
- }
737
- static {
738
- decorateFieldV2(this.prototype, "getCardCollection", [consume(GetCardCollectionContextName)]);
739
- }
740
- #getCardCollection = (initializeDeferredDecorator(this, "getCardCollection"), void 0);
741
- get cardCollection() {
742
- return this.getCardCollection(this, () => this.cardIds);
743
- }
744
- static {
745
- decorateMethodV2(this.prototype, "cardCollection", [cached]);
746
- }
747
- get items() {
748
- return [
749
- ...this.cards,
750
- ...this.cardErrors,
751
- ...this.files
752
- ];
753
- }
754
- get isLoaded() {
755
- return this.cardCollection?.isLoaded;
756
- }
757
- get cards() {
758
- return this.cardCollection?.cards ?? [];
759
- }
760
- get cardErrors() {
761
- return this.cardCollection?.cardErrors ?? [];
762
- }
763
- get cardIds() {
764
- let cardIds = this.args.cardIdsToAttach ?? [];
765
- if (this.args.autoAttachedCardIds) cardIds = [...new Set([...this.args.autoAttachedCardIds, ...cardIds])];
766
- cardIds = cardIds.filter(Boolean);
767
- return cardIds;
768
- }
769
- get files() {
770
- let files = this.args.filesToAttach ?? [];
771
- let autoAttachedFiles = this.args.autoAttachedFiles ?? [];
772
- if (autoAttachedFiles.length === 0) return files;
773
- let autoFilesToPrepend = autoAttachedFiles.filter((file) => !files.some((item) => item.sourceUrl === file.sourceUrl));
774
- if (autoFilesToPrepend.length === 0) return files;
775
- return [...autoFilesToPrepend, ...files];
776
- }
777
- };
778
- //#endregion
779
- //#region app/components/ai-assistant/chat-input/index.gts
780
- var AiAssistantChatInput = class extends Component {
781
- static {
782
- setComponentTemplate(templateFactory({
783
- "id": "uxxYgOGg",
784
- "block": "[[[10,0],[14,0,\"chat-input-container\"],[14,\"data-scopedcss-fe3b980786-15aa780743\",\"\"],[12],[1,\"\\n \"],[10,\"label\"],[14,\"for\",\"ai-chat-input\"],[14,0,\"boxel-sr-only\"],[14,\"data-scopedcss-fe3b980786-15aa780743\",\"\"],[12],[1,\"\\n Enter text to chat with AI Assistant\\n \"],[13],[1,\"\\n\"],[41,[30,1],[[[1,\" \"],[8,[30,1],[[24,\"data-scopedcss-fe3b980786-15aa780743\",\"\"]],null,null],[1,\"\\n\"]],[]],null],[1,\" \"],[10,0],[14,0,\"input-and-clone\"],[14,\"data-scopedcss-fe3b980786-15aa780743\",\"\"],[12],[1,\"\\n \"],[11,\"textarea\"],[24,0,\"chat-input\"],[24,1,\"ai-chat-input\"],[16,2,[30,2]],[24,\"placeholder\",\"Enter a prompt\"],[24,\"rows\",\"1\"],[24,\"data-test-boxel-input-id\",\"ai-chat-input\"],[17,3],[24,\"data-scopedcss-fe3b980786-15aa780743\",\"\"],[4,[32,0],[\"input\",[28,[32,1],[\"target.value\",[30,4]],null]],null],[4,[32,0],[\"paste\",[30,0,[\"onPaste\"]]],null],[4,[32,2],[\"Shift+Enter\",[30,0,[\"insertNewLine\"]]],null],[4,[32,2],[\"Enter\",[30,0,[\"onSend\"]]],null],[12],[13],[1,\" \"],[10,0],[14,0,\"clone\"],[14,\"data-scopedcss-fe3b980786-15aa780743\",\"\"],[12],[1,[30,2]],[13],[1,\"\\n \"],[13],[1,\"\\n \"],[8,[32,3],[[16,\"disabled\",[28,[32,4],[[30,5]],null]],[16,\"data-test-can-send-msg\",[30,5]],[24,0,\"send-button\"],[24,\"aria-label\",\"Send\"],[24,\"data-test-send-message-btn\",\"\"],[24,\"data-scopedcss-fe3b980786-15aa780743\",\"\"],[4,[32,0],[\"click\",[30,0,[\"onSend\"]]],null]],[[\"@variant\",\"@icon\",\"@height\",\"@width\"],[\"primary\",[32,5],\"20\",\"25\"]],null],[1,\"\\n\"],[13],[1,\"\\n\"]],[\"@attachButton\",\"@value\",\"&attrs\",\"@onInput\",\"@canSend\"],[\"if\"]]",
785
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/chat-input/index.gts",
786
- "scope": () => [
787
- on,
788
- pick,
789
- modifier$1,
790
- IconButton$1,
791
- not,
792
- IconComponent$17
793
- ],
794
- "isStrictMode": true
795
- }), this);
796
- }
797
- onSend(ev) {
798
- ev.preventDefault();
799
- if ("shiftKey" in ev && ev.shiftKey) return;
800
- if (!this.args.canSend) return;
801
- this.args.onSend();
802
- }
803
- static {
804
- decorateMethodV2(this.prototype, "onSend", [action]);
805
- }
806
- onPaste(event) {
807
- this.args.onPaste?.(event);
808
- }
809
- static {
810
- decorateMethodV2(this.prototype, "onPaste", [action]);
811
- }
812
- insertNewLine(event) {
813
- const textarea = event.target;
814
- if (!textarea) return;
815
- const value = this.args.value;
816
- const startPos = textarea.selectionStart;
817
- const endPos = textarea.selectionEnd;
818
- const newValue = `${value.substring(0, startPos)}\n\n${value.substring(endPos)}`;
819
- this.args.onInput(newValue);
820
- next(() => {
821
- textarea.selectionStart = textarea.selectionEnd = startPos + 2;
822
- });
823
- }
824
- static {
825
- decorateMethodV2(this.prototype, "insertNewLine", [action]);
826
- }
827
- };
828
- //#endregion
829
- //#region ../boxel-icons/dist/@cardstack/boxel-icons/v1/icons/square-dashed-mouse-pointer.js
830
- var IconComponent$1 = setComponentTemplate(templateFactory({
831
- "id": "wUSyjLlW",
832
- "block": "[[[1,\"\\n \"],[11,\"svg\"],[24,\"xmlns\",\"http://www.w3.org/2000/svg\",\"http://www.w3.org/2000/xmlns/\"],[24,\"width\",\"24\"],[24,\"height\",\"24\"],[24,\"fill\",\"none\"],[24,\"stroke\",\"currentColor\"],[24,\"stroke-linecap\",\"round\"],[24,\"stroke-linejoin\",\"round\"],[24,\"stroke-width\",\"2\"],[24,0,\"lucide lucide-square-dashed-mouse-pointer\"],[24,\"viewBox\",\"0 0 24 24\"],[17,1],[12],[10,\"path\"],[14,\"d\",\"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033zM5 3a2 2 0 0 0-2 2M19 3a2 2 0 0 1 2 2M5 21a2 2 0 0 1-2-2M9 3h1M9 21h2M14 3h1M3 9v1M21 9v2M3 14v1\"],[12],[13],[13],[1,\"\\n\"]],[\"&attrs\"],[]]",
833
- "moduleName": "/home/runner/work/boxel/boxel/packages/boxel-icons/src/icons/square-dashed-mouse-pointer.gts",
834
- "isStrictMode": true
835
- }), templateOnly());
836
- IconComponent$1.name = "square-dashed-mouse-pointer";
837
- //#endregion
838
- //#region app/components/ai-assistant/focus-pill/index.gts
839
- var FocusPill = setComponentTemplate(templateFactory({
840
- "id": "kYtbM9mf",
841
- "block": "[[[8,[32,0],[[24,0,\"ai-focus-pill\"],[24,\"data-test-focus-pill-main\",\"\"],[17,1],[24,\"data-scopedcss-026fc0b025-ca8fee692c\",\"\"]],[[\"@variant\"],[\"muted\"]],[[\"iconLeft\",\"default\"],[[[[1,\"\\n \"],[8,[32,1],[[24,\"width\",\"16\"],[24,\"height\",\"16\"],[24,\"data-scopedcss-026fc0b025-ca8fee692c\",\"\"]],null,null],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[10,1],[14,0,\"boxel-ellipsize\"],[15,\"title\",[30,2]],[14,\"data-scopedcss-026fc0b025-ca8fee692c\",\"\"],[12],[1,[30,2]],[13],[1,\"\\n\"],[42,[28,[31,1],[[28,[31,1],[[30,3]],null]],null],null,[[[1,\" \"],[8,[32,0],[[24,0,\"meta-pill boxel-ellipsize\"],[24,\"data-test-focus-pill-meta\",\"\"],[24,\"data-scopedcss-026fc0b025-ca8fee692c\",\"\"]],[[\"@pillBackgroundColor\"],[\"#777\"]],[[\"default\"],[[[[1,\"\\n \"],[1,[30,4]],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[4]],null],[1,\" \"]],[]]]]],[1,\"\\n\\n\"]],[\"&attrs\",\"@label\",\"@metaPills\",\"metaPill\"],[\"each\",\"-track-array\"]]",
842
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/focus-pill/index.gts",
843
- "scope": () => [Pill, IconComponent$1],
844
- "isStrictMode": true
845
- }), templateOnly());
846
- //#endregion
847
- //#region ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/throttle.js
848
- var require_throttle = /* @__PURE__ */ __commonJSMin(((exports, module) => {
849
- var debounce = require_debounce();
850
- var isObject = require_isObject();
851
- /** Error message constants. */
852
- var FUNC_ERROR_TEXT = "Expected a function";
853
- /**
854
- * Creates a throttled function that only invokes `func` at most once per
855
- * every `wait` milliseconds. The throttled function comes with a `cancel`
856
- * method to cancel delayed `func` invocations and a `flush` method to
857
- * immediately invoke them. Provide `options` to indicate whether `func`
858
- * should be invoked on the leading and/or trailing edge of the `wait`
859
- * timeout. The `func` is invoked with the last arguments provided to the
860
- * throttled function. Subsequent calls to the throttled function return the
861
- * result of the last `func` invocation.
862
- *
863
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
864
- * invoked on the trailing edge of the timeout only if the throttled function
865
- * is invoked more than once during the `wait` timeout.
866
- *
867
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
868
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
869
- *
870
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
871
- * for details over the differences between `_.throttle` and `_.debounce`.
872
- *
873
- * @static
874
- * @memberOf _
875
- * @since 0.1.0
876
- * @category Function
877
- * @param {Function} func The function to throttle.
878
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
879
- * @param {Object} [options={}] The options object.
880
- * @param {boolean} [options.leading=true]
881
- * Specify invoking on the leading edge of the timeout.
882
- * @param {boolean} [options.trailing=true]
883
- * Specify invoking on the trailing edge of the timeout.
884
- * @returns {Function} Returns the new throttled function.
885
- * @example
886
- *
887
- * // Avoid excessively updating the position while scrolling.
888
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
889
- *
890
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
891
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
892
- * jQuery(element).on('click', throttled);
893
- *
894
- * // Cancel the trailing throttled invocation.
895
- * jQuery(window).on('popstate', throttled.cancel);
896
- */
897
- function throttle(func, wait, options) {
898
- var leading = true;
899
- var trailing = true;
900
- if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
901
- if (isObject(options)) {
902
- leading = "leading" in options ? !!options.leading : leading;
903
- trailing = "trailing" in options ? !!options.trailing : trailing;
904
- }
905
- return debounce(func, wait, {
906
- "leading": leading,
907
- "maxWait": wait,
908
- "trailing": trailing
909
- });
910
- }
911
- module.exports = throttle;
912
- }));
913
- //#endregion
914
- //#region app/components/ai-assistant/message/attachments.gts
915
- function findAttachedCardAsFile(attachedCardsAsFiles, card) {
916
- return attachedCardsAsFiles?.find((file) => file.sourceUrl === card.id);
917
- }
918
- var Attachments = class extends Component {
919
- static {
920
- decorateFieldV2(this.prototype, "network", [service]);
921
- }
922
- #network = (initializeDeferredDecorator(this, "network"), void 0);
923
- cardErrorRealm = (cardError) => {
924
- if (cardError.realm) return cardError.realm;
925
- let id = cardError.id;
926
- if (!id) return "";
927
- try {
928
- let url = this.network.virtualNetwork.toURL(id);
929
- let lastSlashIndex = url.pathname.lastIndexOf("/");
930
- let pathname = lastSlashIndex >= 0 ? url.pathname.slice(0, lastSlashIndex + 1) : "/";
931
- return `${url.origin}${pathname}`;
932
- } catch {
933
- return id;
934
- }
935
- };
936
- cardErrorDisplayTitle = (cardError) => {
937
- if (cardError.meta.cardTitle) return cardError.meta.cardTitle;
938
- let id = cardError.id;
939
- if (!id) return "Unavailable card";
940
- let path = id;
941
- try {
942
- path = this.network.virtualNetwork.toURL(id).pathname;
943
- } catch {}
944
- if (path.startsWith("/")) path = path.slice(1);
945
- return path.split("/").filter(Boolean).slice(-2).join("/").replace(/\.[^.]+$/, "") || "Unavailable card";
946
- };
947
- static {
948
- setComponentTemplate(templateFactory({
949
- "id": "t1HCZ1iN",
950
- "block": "[[[10,\"ul\"],[14,0,\"items\"],[14,\"data-test-message-items\",\"\"],[14,\"data-scopedcss-bebf74425d-f8c8ebfdca\",\"\"],[12],[1,\"\\n\"],[42,[28,[31,1],[[28,[31,1],[[30,1]],null]],null],null,[[[41,[28,[32,0],[[30,2]],null],[[[42,[28,[31,1],[[28,[31,1],[[30,2,[\"cards\"]]],null]],null],null,[[[1,\" \"],[10,\"li\"],[14,\"data-scopedcss-bebf74425d-f8c8ebfdca\",\"\"],[12],[1,\"\\n\"],[44,[[28,[32,1],[[30,4],[30,3]],null]],[[[1,\" \"],[8,[32,2],[[24,\"data-scopedcss-bebf74425d-f8c8ebfdca\",\"\"]],[[\"@cardId\",\"@file\",\"@borderType\",\"@urlForRealmLookup\",\"@fileActionsEnabled\"],[[30,3,[\"id\"]],[30,5],\"solid\",[28,[32,3],[[30,3]],null],[52,[30,5],true,false]]],null],[1,\"\\n\"]],[5]]],[1,\" \"],[13],[1,\"\\n\"]],[3]],null],[42,[28,[31,1],[[28,[31,1],[[30,2,[\"cardErrors\"]]],null]],null],null,[[[41,[30,6,[\"id\"]],[[[1,\" \"],[10,\"li\"],[14,\"data-scopedcss-bebf74425d-f8c8ebfdca\",\"\"],[12],[1,\"\\n \"],[8,[32,2],[[16,\"title\",[30,6,[\"id\"]]],[16,\"data-test-attached-card-error\",[30,6,[\"id\"]]],[24,\"data-scopedcss-bebf74425d-f8c8ebfdca\",\"\"]],[[\"@cardId\",\"@displayTitle\",\"@borderType\",\"@showErrorIcon\",\"@urlForRealmLookup\"],[[30,6,[\"id\"]],[28,[30,0,[\"cardErrorDisplayTitle\"]],[[30,6]],null],\"solid\",true,[28,[30,0,[\"cardErrorRealm\"]],[[30,6]],null]]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null]],[6]],null]],[]],[[[1,\" \"],[10,\"li\"],[14,\"data-scopedcss-bebf74425d-f8c8ebfdca\",\"\"],[12],[1,\"\\n \"],[8,[32,4],[[24,\"data-scopedcss-bebf74425d-f8c8ebfdca\",\"\"]],[[\"@file\",\"@borderType\",\"@onDownload\",\"@fileActionsEnabled\"],[[30,2],\"solid\",[28,[32,5],[[30,2],[30,7]],null],true]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]]]],[2]],null],[13],[1,\"\\n\"]],[\"@items\",\"item\",\"card\",\"@attachedCardsAsFiles\",\"file\",\"cardError\",\"@downloadFile\"],[\"each\",\"-track-array\",\"if\",\"let\"]]",
951
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/message/attachments.gts",
952
- "scope": () => [
953
- isCardCollectionResource,
954
- findAttachedCardAsFile,
955
- CardPill,
956
- urlForRealmLookup,
957
- FilePill,
958
- onDownload
959
- ],
960
- "isStrictMode": true
961
- }), this);
962
- }
963
- };
964
- function isCardCollectionResource(obj) {
965
- return "value" in obj;
966
- }
967
- function onDownload(item, downloadFile) {
968
- return downloadFile ? () => downloadFile(item) : void 0;
969
- }
970
- //#endregion
971
- //#region app/components/ai-assistant/message/meta.gts
972
- var MessageMeta = setComponentTemplate(templateFactory({
973
- "id": "G8Mg06mD",
974
- "block": "[[[11,\"section\"],[24,0,\"meta\"],[17,1],[24,\"data-scopedcss-356ecd0744-8201dec452\",\"\"],[12],[1,\"\\n\"],[41,[30,2],[[[1,\" \"],[10,0],[15,0,[29,[\"ai-avatar \",[52,[30,3],\"ai-avatar-animated\"]]]],[14,\"aria-label\",\"ai bot\"],[14,\"data-test-ai-avatar\",\"\"],[14,\"data-scopedcss-356ecd0744-8201dec452\",\"\"],[12],[13],[1,\"\\n\"]],[]],[[[41,[30,4],[[[1,\" \"],[8,[30,4],[[24,\"data-scopedcss-356ecd0744-8201dec452\",\"\"]],null,null],[1,\"\\n \"]],[]],null]],[]]],[1,\" \"],[10,\"time\"],[15,\"datetime\",[28,[32,0],[[30,5]],null]],[14,0,\"time\"],[14,\"data-scopedcss-356ecd0744-8201dec452\",\"\"],[12],[1,\"\\n \"],[1,[28,[32,1],[[30,5],\"iiii MMM d, yyyy, h:mm aa\"],null]],[1,\"\\n \"],[13],[1,\"\\n\"],[13],[1,\"\\n\\n\"]],[\"&attrs\",\"@isFromAssistant\",\"@isAvatarAnimated\",\"@profileAvatar\",\"@datetime\"],[\"if\"]]",
975
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/message/meta.gts",
976
- "scope": () => [formatISO, format],
977
- "isStrictMode": true
978
- }), templateOnly());
979
- //#endregion
980
- //#region app/components/ai-assistant/message/index.gts
981
- var import_throttle = /* @__PURE__ */ __toESM(require_throttle());
982
- var MessageScroller = class extends ClassBasedModifier {
983
- hasRegistered = false;
984
- observer;
985
- element;
986
- index;
987
- unregisterScroller;
988
- hasDestructor = false;
989
- modify(element, _positional, { index, registerScroller, unregisterScroller }) {
990
- if (!this.hasDestructor) {
991
- this.hasDestructor = true;
992
- registerDestructor(this, () => this.unregister());
993
- }
994
- if (this.element !== element || this.index !== index || this.unregisterScroller !== unregisterScroller) {
995
- this.unregister();
996
- this.element = element;
997
- this.index = index;
998
- this.unregisterScroller = unregisterScroller;
999
- this.hasRegistered = false;
1000
- }
1001
- if (!this.hasRegistered) {
1002
- this.hasRegistered = true;
1003
- registerScroller({
1004
- index,
1005
- element,
1006
- scrollTo: element.scrollIntoView.bind(element)
1007
- });
1008
- }
1009
- this.observer?.disconnect();
1010
- this.observer = new MutationObserver(() => {
1011
- registerScroller({
1012
- index,
1013
- element,
1014
- scrollTo: element.scrollIntoView.bind(element)
1015
- });
1016
- });
1017
- this.observer.observe(element, {
1018
- childList: true,
1019
- subtree: true
1020
- });
1021
- }
1022
- unregister() {
1023
- this.observer?.disconnect();
1024
- this.observer = void 0;
1025
- this.hasRegistered = false;
1026
- if (this.element && this.index != null && this.unregisterScroller) this.unregisterScroller({
1027
- index: this.index,
1028
- element: this.element
1029
- });
1030
- this.element = void 0;
1031
- this.index = void 0;
1032
- this.unregisterScroller = void 0;
1033
- }
1034
- };
1035
- var ScrollPosition = class extends ClassBasedModifier {
1036
- element;
1037
- setScrollPosition;
1038
- hasDestructor = false;
1039
- detectPosition = (0, import_throttle.default)(() => {
1040
- let element = this.element;
1041
- let setScrollPosition = this.setScrollPosition;
1042
- if (!element || !setScrollPosition) return;
1043
- setScrollPosition({ isBottom: Math.abs(element.scrollHeight - element.clientHeight - element.scrollTop) <= 50 });
1044
- }, 500);
1045
- cleanup() {
1046
- if (this.element) this.element.removeEventListener("scroll", this.detectPosition);
1047
- this.detectPosition.cancel();
1048
- this.element = void 0;
1049
- this.setScrollPosition = void 0;
1050
- }
1051
- modify(element, _positional, { setScrollPosition, registerConversationScroller }) {
1052
- if (!this.hasDestructor) {
1053
- this.hasDestructor = true;
1054
- registerDestructor(this, () => this.cleanup());
1055
- }
1056
- this.setScrollPosition = setScrollPosition;
1057
- registerConversationScroller(() => element.scrollHeight > element.clientHeight, () => {
1058
- element.scrollTop = element.scrollHeight - element.clientHeight;
1059
- });
1060
- if (this.element !== element) {
1061
- this.detectPosition.cancel();
1062
- this.element?.removeEventListener("scroll", this.detectPosition);
1063
- this.element = element;
1064
- element.addEventListener("scroll", this.detectPosition);
1065
- }
1066
- }
1067
- };
1068
- var ReloadBillingOnInsert = class extends ClassBasedModifier {
1069
- hasReloaded = false;
1070
- runReload(reload) {
1071
- reload();
1072
- }
1073
- modify(_element, _positional, { shouldReloadBillingData, reload }) {
1074
- if (shouldReloadBillingData && !this.hasReloaded) {
1075
- this.hasReloaded = true;
1076
- scheduleOnce("afterRender", this, this.runReload, reload);
1077
- }
1078
- }
1079
- };
1080
- function isThinkingMessage(s) {
1081
- if (!s) return false;
1082
- return s.trim() === "Thinking...";
1083
- }
1084
- function isPresent(val) {
1085
- if (val?.toString) val = val?.toString().trim();
1086
- return val ? val !== "" : false;
1087
- }
1088
- function attachedCardErrorMessages(errors) {
1089
- let unreachableCount = 0;
1090
- let runtimeErrorCount = 0;
1091
- let genericErrorCount = 0;
1092
- for (let error of errors) if (isUnreachableCardError(error)) unreachableCount++;
1093
- else if (error.status >= 500) runtimeErrorCount++;
1094
- else genericErrorCount++;
1095
- return [
1096
- ...unreachableCount > 0 ? [unreachableCount === 1 ? `The card is unreachable. It may have been deleted, or you don't have permission to see it.` : `These cards are unreachable. They may have been deleted, or you don't have permission to see them.`] : [],
1097
- ...runtimeErrorCount > 0 ? [runtimeErrorCount === 1 ? `This card could not be displayed because it hit a runtime error.` : `Some cards could not be displayed because they hit runtime errors.`] : [],
1098
- ...genericErrorCount > 0 ? [genericErrorCount === 1 ? `This card could not be displayed because it has an error.` : `Some cards could not be displayed because they have errors.`] : []
1099
- ];
1100
- }
1101
- function isUnreachableCardError(error) {
1102
- return [403, 404].includes(error.status);
1103
- }
1104
- var AiAssistantMessage = class extends Component {
1105
- static {
1106
- decorateFieldV2(this.prototype, "matrixService", [service]);
1107
- }
1108
- #matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
1109
- static {
1110
- decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
1111
- }
1112
- #operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
1113
- static {
1114
- decorateFieldV2(this.prototype, "billingService", [service]);
1115
- }
1116
- #billingService = (initializeDeferredDecorator(this, "billingService"), void 0);
1117
- get isReasoningExpandedByDefault() {
1118
- return this.args.isStreaming && !isPresent(this.args.messageHTML) && isPresent(this.args.reasoningContent) && !isThinkingMessage(this.args.reasoningContent);
1119
- }
1120
- get isReasoningExpanded() {
1121
- return this.matrixService.reasoningExpandedState.get(this.args.eventId) ?? this.isReasoningExpandedByDefault;
1122
- }
1123
- updateReasoningExpanded = (ev) => {
1124
- ev.preventDefault();
1125
- this.matrixService.reasoningExpandedState.set(this.args.eventId, !this.isReasoningExpanded);
1126
- };
1127
- async downloadFile(file) {
1128
- try {
1129
- await this.matrixService.downloadAsFileInBrowser(file);
1130
- } catch (error) {
1131
- console.error("Error downloading file:", error);
1132
- }
1133
- }
1134
- static {
1135
- decorateMethodV2(this.prototype, "downloadFile", [action]);
1136
- }
1137
- reloadBillingDataTask = buildTask(() => ({
1138
- context: this,
1139
- generator: function* () {
1140
- if (!this.billingService.loadingSubscriptionData) yield this.billingService.loadSubscriptionData();
1141
- }
1142
- }), null, "reloadBillingDataTask", null);
1143
- static {
1144
- setComponentTemplate(templateFactory({
1145
- "id": "guhP9zMA",
1146
- "block": "[[[11,\"section\"],[16,0,[28,[32,0],[\"ai-assistant-message\"],[[\"meta-hidden\",\"code-patch-correctness\"],[[30,1],[30,2]]]]],[24,\"data-test-ai-assistant-message\",\"\"],[16,\"data-test-ai-assistant-message-pending\",[30,3]],[17,4],[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"],[4,[32,1],null,[[\"index\",\"registerScroller\",\"unregisterScroller\"],[[30,5],[30,6],[30,7]]]],[4,[32,2],null,[[\"shouldReloadBillingData\",\"reload\"],[[30,0,[\"shouldReloadBillingData\"]],[28,[32,3],[[30,0,[\"reloadBillingDataTask\"]]],null]]]],[12],[1,\"\\n\"],[41,[51,[30,1]],[[[1,\" \"],[8,[32,4],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@datetime\",\"@isFromAssistant\",\"@profileAvatar\",\"@isAvatarAnimated\"],[[30,8],[30,9],[30,10],[30,0,[\"isAvatarAnimated\"]]]],null],[1,\"\\n\"]],[]],null],[1,\" \"],[10,0],[14,0,\"content\"],[14,\"data-test-ai-message-content\",\"\"],[14,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"],[12],[1,\"\\n\"],[41,[30,9],[[[41,[30,0,[\"hasBotMessage\"]],[[[1,\" \"],[8,[32,5],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@monacoSDK\",\"@htmlParts\",\"@roomId\",\"@eventId\",\"@isStreaming\",\"@isLastAssistantMessage\",\"@userMessageThisMessageIsRespondingTo\",\"@reasoning\"],[[30,11],[30,12],[30,13],[30,14],[30,15],[30,16],[30,17],[52,[30,18],[28,[32,6],null,[[\"content\",\"isExpanded\",\"updateExpanded\"],[[30,18],[30,0,[\"isReasoningExpanded\"]],[30,0,[\"updateReasoningExpanded\"]]]]]]]],null],[1,\"\\n\"]],[]],null],[41,[30,0,[\"hasItems\"]],[[[1,\" \"],[8,[32,7],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@items\",\"@downloadFile\"],[[30,0,[\"items\"]],[52,[30,19],[30,0,[\"downloadFile\"]]]]],null],[1,\"\\n\"]],[]],null]],[]],[[[1,\" \"],[8,[32,8],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@html\",\"@isPending\"],[[30,20],[30,3]]],[[\"default\"],[[[[1,\"\\n\"],[41,[30,0,[\"hasItems\"]],[[[1,\" \"],[8,[32,7],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@items\",\"@attachedCardsAsFiles\",\"@downloadFile\"],[[30,0,[\"items\"]],[30,21],[52,[30,19],[30,0,[\"downloadFile\"]]]]],null],[1,\"\\n\"]],[]],null],[1,\" \"]],[]]]]],[1,\"\\n\"]],[]]],[1,\"\\n \"],[18,26,null],[1,\"\\n\\n\"],[41,[30,0,[\"errorMessages\",\"length\"]],[[[41,[30,0,[\"isOutOfCreditsErrorMessage\"]],[[[1,\" \"],[8,[32,9],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@type\"],[\"error\"]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,22,[\"Messages\"]],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@messages\"],[[30,0,[\"errorMessages\"]]]],null],[1,\"\\n\"],[41,[30,0,[\"isOutOfCredits\"]],[[[1,\" \"],[8,[30,22,[\"Action\"]],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@actionName\",\"@action\"],[\"Buy More Credits\",[30,0,[\"operatorModeStateService\",\"toggleProfileSettings\"]]]],null],[1,\"\\n\"]],[]],[[[41,[30,23],[[[1,\" \"],[10,0],[14,0,\"credits-action-row\"],[14,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"credits-added\"],[14,\"data-test-credits-added\",\"\"],[14,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"],[12],[1,\"\\n Credits added!\\n \"],[13],[1,\"\\n \"],[8,[30,22,[\"Action\"]],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@actionName\",\"@action\"],[\"Retry\",[30,23]]],null],[1,\"\\n \"],[13],[1,\"\\n \"]],[]],null]],[]]],[1,\" \"]],[22]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,9],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@type\"],[\"error\"]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,24,[\"Messages\"]],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@messages\"],[[30,0,[\"errorMessages\"]]]],null],[1,\"\\n\"],[41,[30,0,[\"hasAlertActions\"]],[[[1,\" \"],[10,0],[14,0,\"alert-action-buttons-row\"],[14,\"data-test-alert-action-buttons-row\",\"\"],[14,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"],[12],[1,\"\\n\"],[41,[30,25],[[[1,\" \"],[8,[30,24,[\"Action\"]],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@actionName\",\"@action\"],[\"Wait longer\",[30,25]]],null],[1,\"\\n\"]],[]],null],[41,[30,23],[[[1,\" \"],[8,[30,24,[\"Action\"]],[[24,\"data-scopedcss-703e9cec47-c20c7a4bb4\",\"\"]],[[\"@actionName\",\"@action\"],[\"Retry\",[30,23]]],null],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"]],[24]]]]],[1,\"\\n\"]],[]]]],[]],null],[1,\" \"],[13],[1,\"\\n\"],[13],[1,\"\\n\\n\"]],[\"@hideMeta\",\"@isCodePatchCorrectness\",\"@isPending\",\"&attrs\",\"@index\",\"@registerScroller\",\"@unregisterScroller\",\"@datetime\",\"@isFromAssistant\",\"@profileAvatar\",\"@monacoSDK\",\"@messageHTMLParts\",\"@roomId\",\"@eventId\",\"@isStreaming\",\"@isLastAssistantMessage\",\"@userMessageThisMessageIsRespondingTo\",\"@reasoningContent\",\"@isDebugMessage\",\"@messageHTML\",\"@attachedCardsAsFiles\",\"Alert\",\"@retryAction\",\"Alert\",\"@waitAction\",\"&default\"],[\"unless\",\"if\",\"yield\"]]",
1147
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/message/index.gts",
1148
- "scope": () => [
1149
- cn,
1150
- MessageScroller,
1151
- ReloadBillingOnInsert,
1152
- perform,
1153
- MessageMeta,
1154
- FormattedAiBotMessage,
1155
- hash,
1156
- Attachments,
1157
- UserMessage,
1158
- Alert
1159
- ],
1160
- "isStrictMode": true
1161
- }), this);
1162
- }
1163
- get hasBotMessage() {
1164
- return this.args.messageHTMLParts?.length || this.args.reasoningContent;
1165
- }
1166
- get isAvatarAnimated() {
1167
- return this.args.isStreaming && !this.args.errorMessage;
1168
- }
1169
- get hasItems() {
1170
- return this.args.files && this.args.files.length > 0 || this.args.collectionResource && (this.args.collectionResource.cards.length > 0 || this.args.collectionResource.cardErrors.length > 0);
1171
- }
1172
- get items() {
1173
- return [...this.args.collectionResource ? [this.args.collectionResource] : [], ...this.args.files ?? []];
1174
- }
1175
- get errorMessages() {
1176
- return [...this.args.errorMessage ? [this.args.errorMessage] : [], ...attachedCardErrorMessages(this.args.collectionResource?.cardErrors ?? [])];
1177
- }
1178
- get hasAlertActions() {
1179
- return Boolean(this.args.waitAction || this.args.retryAction);
1180
- }
1181
- get shouldReloadBillingData() {
1182
- return Boolean(this.args.reloadBillingData && this.args.isMostRecentMessage);
1183
- }
1184
- get isOutOfCreditsErrorMessage() {
1185
- return this.errorMessages.some((error) => /You need a minimum of \d+ credits to continue using the AI bot\. Please upgrade to a larger plan, or top up your account\./.test(error));
1186
- }
1187
- get hasMinimumCreditsToContinue() {
1188
- return this.billingService.availableCredits >= 10;
1189
- }
1190
- get isOutOfCredits() {
1191
- return !this.hasMinimumCreditsToContinue;
1192
- }
1193
- };
1194
- var AiAssistantConversation = setComponentTemplate(templateFactory({
1195
- "id": "6T09gfOg",
1196
- "block": "[[[11,\"section\"],[24,0,\"ai-assistant-conversation\"],[24,\"tabindex\",\"0\"],[24,\"aria-label\",\"AI Bot conversation\"],[24,\"aria-live\",\"polite\"],[24,\"data-test-ai-assistant-conversation\",\"\"],[24,\"data-scopedcss-703e9cec47-9ffab6485c\",\"\"],[4,[32,0],null,[[\"setScrollPosition\",\"registerConversationScroller\"],[[30,1],[30,2]]]],[12],[1,\"\\n \"],[18,3,null],[1,\"\\n\"],[13],[1,\"\\n\"]],[\"@setScrollPosition\",\"@registerConversationScroller\",\"&default\"],[\"yield\"]]",
1197
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/message/index.gts",
1198
- "scope": () => [ScrollPosition],
1199
- "isStrictMode": true
1200
- }), templateOnly());
1201
- //#endregion
1202
- //#region app/helpers/consume-context.ts
1203
- var consume_context_default = class extends Helper {
1204
- static {
1205
- __name(this, "default");
1206
- }
1207
- constructor(..._args) {
1208
- super(..._args);
1209
- this.didRun = false;
1210
- }
1211
- compute([consume]) {
1212
- if (!this.didRun) {
1213
- this.didRun = true;
1214
- schedule("afterRender", consume);
1215
- }
1216
- }
1217
- };
1218
- //#endregion
1219
- //#region app/components/ai-assistant/skill-menu/skill-toggle.gts
1220
- var SkillToggle = class extends Component {
1221
- static {
1222
- decorateFieldV2(this.prototype, "getCard", [consume(GetCardContextName)]);
1223
- }
1224
- #getCard = (initializeDeferredDecorator(this, "getCard"), void 0);
1225
- static {
1226
- decorateFieldV2(this.prototype, "realm", [service]);
1227
- }
1228
- #realm = (initializeDeferredDecorator(this, "realm"), void 0);
1229
- static {
1230
- decorateFieldV2(this.prototype, "commandService", [service]);
1231
- }
1232
- #commandService = (initializeDeferredDecorator(this, "commandService"), void 0);
1233
- static {
1234
- decorateFieldV2(this.prototype, "cardResource", [tracked]);
1235
- }
1236
- #cardResource = (initializeDeferredDecorator(this, "cardResource"), void 0);
1237
- makeCardResource = () => {
1238
- this.cardResource = this.getCard(this, () => this.args.cardId);
1239
- };
1240
- get card() {
1241
- return this.cardResource?.card;
1242
- }
1243
- get isCreating() {
1244
- return this.card && !this.card.id;
1245
- }
1246
- get menuItems() {
1247
- return [new MenuItem({
1248
- label: "Open Skill Card",
1249
- action: this.openSkillCard
1250
- })];
1251
- }
1252
- async openSkillCard() {
1253
- await new ShowCardCommand(this.commandService.commandContext).execute({ cardId: this.args.cardId });
1254
- }
1255
- static {
1256
- decorateMethodV2(this.prototype, "openSkillCard", [action]);
1257
- }
1258
- static {
1259
- setComponentTemplate(templateFactory({
1260
- "id": "JqeP10Oa",
1261
- "block": "[[[1,[28,[32,0],[[30,0,[\"makeCardResource\"]]],null]],[1,\"\\n\"],[41,[30,0,[\"card\"]],[[[41,[30,0,[\"isCreating\"]],[[[1,\" \"],[8,[32,1],[[24,\"data-scopedcss-d2e1d0ed97-b61a612a3d\",\"\"]],null,null],[1,\"\\n\"]],[]],[[[1,\" \"],[10,0],[14,0,\"toggle-and-realm-icon\"],[14,\"data-scopedcss-d2e1d0ed97-b61a612a3d\",\"\"],[12],[1,\"\\n \"],[8,[32,2],[[24,\"data-scopedcss-d2e1d0ed97-b61a612a3d\",\"\"]],[[\"@realmInfo\"],[[28,[30,0,[\"realm\",\"info\"]],[[30,1]],null]]],null],[1,\"\\n \"],[8,[32,3],[[24,0,\"skill-toggle\"],[16,\"data-test-attached-card\",[30,2]],[16,\"data-test-autoattached-card\",[30,3]],[17,4],[24,\"data-scopedcss-d2e1d0ed97-b61a612a3d\",\"\"]],null,[[\"default\",\"iconRight\"],[[[[1,\"\\n \"],[10,0],[14,0,\"pill-content\"],[14,\"data-scopedcss-d2e1d0ed97-b61a612a3d\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"card-content\"],[15,\"title\",[30,0,[\"card\",\"cardTitle\"]]],[14,\"data-scopedcss-d2e1d0ed97-b61a612a3d\",\"\"],[12],[1,\"\\n \"],[1,[30,0,[\"card\",\"cardTitle\"]]],[1,\"\\n \"],[13],[1,\"\\n \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[8,[32,4],[[24,0,\"skill-dropdown\"],[24,\"data-scopedcss-d2e1d0ed97-b61a612a3d\",\"\"]],null,[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,5],[[24,0,\"skill-dropdown__trigger\"],[16,\"data-test-skill-options-button\",[30,2]],[24,\"data-scopedcss-d2e1d0ed97-b61a612a3d\",\"\"],[4,[30,5],null,null]],[[\"@size\",\"@label\",\"@icon\"],[\"extra-small\",\"Skill options\",\"context-menu-vertical\"]],null],[1,\"\\n \"]],[5]],[[[1,\"\\n \"],[8,[32,6],[[24,0,\"skill-dropdown__menu\"],[24,\"data-scopedcss-d2e1d0ed97-b61a612a3d\",\"\"]],[[\"@items\",\"@closeMenu\"],[[30,0,[\"menuItems\"]],[30,6,[\"close\"]]]],null],[1,\"\\n \"]],[6]]]]],[1,\"\\n \"]],[]]]]],[1,\"\\n \"],[8,[32,7],[[24,0,\"toggle\"],[16,\"data-test-skill-toggle\",[29,[[30,2],\"-\",[52,[30,7],\"on\",\"off\"]]]],[24,\"data-scopedcss-d2e1d0ed97-b61a612a3d\",\"\"]],[[\"@isEnabled\",\"@onChange\",\"@label\"],[[30,7],[30,8],[30,0,[\"card\",\"cardTitle\"]]]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]]]],[]],null]],[\"@urlForRealmLookup\",\"@cardId\",\"@isAutoAttachedCard\",\"&attrs\",\"bindings\",\"dd\",\"@isEnabled\",\"@onToggle\"],[\"if\"]]",
1262
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/skill-menu/skill-toggle.gts",
1263
- "scope": () => [
1264
- consume_context_default,
1265
- LoadingIndicator,
1266
- RealmIcon,
1267
- Pill,
1268
- BoxelDropdown,
1269
- DropdownButton,
1270
- Menu,
1271
- Switch
1272
- ],
1273
- "isStrictMode": true
1274
- }), this);
1275
- }
1276
- };
1277
- //#endregion
1278
- //#region app/components/pill-menu/index.gts
1279
- var PillMenu = class extends Component {
1280
- static {
1281
- setComponentTemplate(templateFactory({
1282
- "id": "P2Q5PQl5",
1283
- "block": "[[[41,[30,0,[\"isExpanded\"]],[[[1,\" \"],[11,0],[16,0,[29,[\"pill-menu \",[52,[48,[30,2]],\"has-footer\"]]]],[17,1],[24,\"data-scopedcss-96625f44ff-e2ac97c9b3\",\"\"],[12],[1,\"\\n \"],[8,[32,0],[[24,0,\"menu-header\"],[24,\"data-test-pill-menu-header\",\"\"],[24,\"data-scopedcss-96625f44ff-e2ac97c9b3\",\"\"]],null,[[\"icon\",\"default\",\"detail\"],[[[[1,\"\\n \"],[18,3,null],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[11,\"button\"],[24,0,\"detail-close-button\"],[24,\"data-test-pill-menu-detail-close\",\"\"],[24,\"data-scopedcss-96625f44ff-e2ac97c9b3\",\"\"],[4,[32,1],[\"click\",[30,0,[\"collapseMenu\"]]],null],[12],[1,\"\\n \"],[18,4,null],[1,\"\\n \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[11,\"button\"],[24,0,\"header-button\"],[24,\"data-test-pill-menu-button\",\"\"],[24,\"data-scopedcss-96625f44ff-e2ac97c9b3\",\"\"],[4,[32,1],[\"click\",[30,0,[\"collapseMenu\"]]],null],[12],[1,\"\\n \"],[8,[32,2],[[24,\"width\",\"8px\"],[24,\"height\",\"8px\"],[24,\"data-scopedcss-96625f44ff-e2ac97c9b3\",\"\"]],null,null],[1,\"\\n \"],[13],[1,\"\\n \"]],[]]]]],[1,\"\\n\"],[41,[48,[30,5]],[[[1,\" \"],[10,0],[14,0,\"menu-content\"],[14,\"data-scopedcss-96625f44ff-e2ac97c9b3\",\"\"],[12],[1,\"\\n \"],[18,5,null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\"\\n\"],[41,[48,[30,2]],[[[1,\" \"],[10,\"footer\"],[14,0,\"menu-footer\"],[14,\"data-scopedcss-96625f44ff-e2ac97c9b3\",\"\"],[12],[1,\"\\n \"],[18,2,null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n\"]],[]],[[[1,\" \"],[11,\"button\"],[24,0,\"pill-menu-button\"],[24,\"data-test-pill-menu-button\",\"\"],[17,1],[24,\"data-scopedcss-96625f44ff-e2ac97c9b3\",\"\"],[4,[32,1],[\"click\",[30,0,[\"expandMenu\"]]],null],[12],[1,\"\\n \"],[18,3,null],[1,\"\\n \"],[18,4,null],[1,\"\\n \"],[8,[32,2],[[24,0,\"minimized-arrow\"],[24,\"width\",\"8px\"],[24,\"height\",\"8px\"],[24,\"data-scopedcss-96625f44ff-e2ac97c9b3\",\"\"]],null,null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]]]],[\"&attrs\",\"&footer\",\"&headerIcon\",\"&headerDetail\",\"&content\"],[\"if\",\"has-block\",\"yield\"]]",
1284
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/pill-menu/index.gts",
1285
- "scope": () => [
1286
- Header,
1287
- on,
1288
- IconComponent$U
1289
- ],
1290
- "isStrictMode": true
1291
- }), this);
1292
- }
1293
- static {
1294
- decorateFieldV2(this.prototype, "isExpanded", [tracked], function() {
1295
- return false;
1296
- });
1297
- }
1298
- #isExpanded = (initializeDeferredDecorator(this, "isExpanded"), void 0);
1299
- expandMenu() {
1300
- this.isExpanded = true;
1301
- this.args.onExpand?.();
1302
- }
1303
- static {
1304
- decorateMethodV2(this.prototype, "expandMenu", [action]);
1305
- }
1306
- collapseMenu() {
1307
- this.isExpanded = false;
1308
- this.args.onCollapse?.();
1309
- }
1310
- static {
1311
- decorateMethodV2(this.prototype, "collapseMenu", [action]);
1312
- }
1313
- };
1314
- //#endregion
1315
- //#region app/components/ai-assistant/skill-menu/index.gts
1316
- var import_pluralize = /* @__PURE__ */ __toESM(require_pluralize());
1317
- var AiAssistantSkillMenu = class extends Component {
1318
- static {
1319
- setComponentTemplate(templateFactory({
1320
- "id": "aIGEseCH",
1321
- "block": "[[[8,[32,0],[[24,0,\"skill-menu\"],[17,1],[24,\"data-scopedcss-0e7626449a-026844675b\",\"\"]],[[\"@onExpand\",\"@onCollapse\"],[[28,[32,1],[[30,0,[\"setExpanded\"]],true],null],[28,[32,1],[[30,0,[\"setExpanded\"]],false],null]]],[[\"headerDetail\",\"content\",\"footer\"],[[[[1,\"\\n \"],[10,1],[14,0,\"skills-length\"],[14,\"data-test-active-skills-count\",\"\"],[14,\"data-scopedcss-0e7626449a-026844675b\",\"\"],[12],[1,[30,0,[\"headerText\"]]],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[10,\"ul\"],[14,0,\"skill-list\"],[14,\"data-scopedcss-0e7626449a-026844675b\",\"\"],[12],[1,\"\\n\"],[42,[28,[31,1],[[28,[31,1],[[30,2]],null]],null],\"cardId\",[[[1,\" \"],[10,\"li\"],[14,\"data-scopedcss-0e7626449a-026844675b\",\"\"],[12],[1,\"\\n \"],[8,[32,2],[[16,\"data-test-pill-menu-item\",[30,3,[\"cardId\"]]],[24,\"data-scopedcss-0e7626449a-026844675b\",\"\"]],[[\"@cardId\",\"@onToggle\",\"@isEnabled\",\"@urlForRealmLookup\"],[[30,3,[\"cardId\"]],[28,[32,1],[[30,0,[\"toggleSkill\"]],[30,3]],null],[30,3,[\"isActive\"]],[28,[30,0,[\"urlForRealmLookup\"]],[[30,3]],null]]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[3]],null],[1,\" \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[8,[32,3],[[24,0,\"attach-button\"],[24,\"data-test-pill-menu-add-button\",\"\"],[24,\"data-scopedcss-0e7626449a-026844675b\",\"\"],[4,[32,4],[\"click\",[30,0,[\"attachSkillCard\"]]],null]],[[\"@kind\",\"@size\",\"@disabled\",\"@loading\"],[\"primary\",\"extra-small\",[30,0,[\"doAttachSkillCard\",\"isRunning\"]],[30,0,[\"isAttachingSkill\"]]]],[[\"default\"],[[[[1,\"\\n\"],[41,[30,0,[\"isAttachingSkill\"]],[[[1,\" Adding Skill\\n\"]],[]],[[[1,\" Choose a Skill to add\\n\"]],[]]],[1,\" \"]],[]]]]],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[\"&attrs\",\"@skills\",\"skill\"],[\"each\",\"-track-array\",\"if\"]]",
1322
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/skill-menu/index.gts",
1323
- "scope": () => [
1324
- PillMenu,
1325
- fn,
1326
- SkillToggle,
1327
- ButtonComponent,
1328
- on
1329
- ],
1330
- "isStrictMode": true
1331
- }), this);
1332
- }
1333
- static {
1334
- decorateFieldV2(this.prototype, "isExpanded", [tracked], function() {
1335
- return false;
1336
- });
1337
- }
1338
- #isExpanded = (initializeDeferredDecorator(this, "isExpanded"), void 0);
1339
- static {
1340
- decorateFieldV2(this.prototype, "isAttachingSkill", [tracked], function() {
1341
- return false;
1342
- });
1343
- }
1344
- #isAttachingSkill = (initializeDeferredDecorator(this, "isAttachingSkill"), void 0);
1345
- urlForRealmLookup(skill) {
1346
- return skill.fileDef.sourceUrl;
1347
- }
1348
- setExpanded(isExpanded) {
1349
- this.isExpanded = isExpanded;
1350
- if (isExpanded) this.args.onExpand?.();
1351
- else this.args.onCollapse?.();
1352
- }
1353
- static {
1354
- decorateMethodV2(this.prototype, "setExpanded", [action]);
1355
- }
1356
- get headerText() {
1357
- if (this.isExpanded) return `Skills: ${this.activeSkills.length} of ${this.args.skills.length} active`;
1358
- return `${this.activeSkills.length} ${(0, import_pluralize.default)("Skills", this.activeSkills.length)}`;
1359
- }
1360
- get activeSkills() {
1361
- return this.args.skills?.filter((skill) => skill.isActive) ?? [];
1362
- }
1363
- attachSkillCard() {
1364
- this.doAttachSkillCard.perform();
1365
- }
1366
- static {
1367
- decorateMethodV2(this.prototype, "attachSkillCard", [action]);
1368
- }
1369
- doAttachSkillCard = buildTask(() => ({
1370
- context: this,
1371
- generator: function* () {
1372
- let selectedCardIds = this.args.skills?.map((skill) => ({ not: { eq: { id: skill.cardId } } })) ?? [];
1373
- let cardId = yield chooseCard({ filter: { every: [{ type: skillCardRef }, ...selectedCardIds] } });
1374
- if (cardId) try {
1375
- this.isAttachingSkill = true;
1376
- yield this.args.onChooseCard?.(cardId);
1377
- } finally {
1378
- this.isAttachingSkill = false;
1379
- }
1380
- }
1381
- }), null, "doAttachSkillCard", "restartable");
1382
- toggleSkill(skill) {
1383
- this.args.onUpdateSkillIsActive?.(!skill.isActive, skill.fileDef.sourceUrl);
1384
- }
1385
- static {
1386
- decorateMethodV2(this.prototype, "toggleSkill", [action]);
1387
- }
1388
- };
1389
- //#endregion
1390
- //#region app/components/ai-assistant/ai-assist-icon@2x.webp
1391
- var ai_assist_icon_2x_default = "data:image/webp;base64,UklGRoYDAABXRUJQVlA4WAoAAAAQAAAAMwAAMwAAQUxQSHIBAAABgJZtb9YqEioBCThYnRwcUAetg+EAHAwHw0HrAByAg+zzbRJ2/kcEA7dt48i9d2/JkjdQTYm/leAtUE0/wSxj1rLIWLSsgC4AViUtA7xH99DoCAjnEMFqXogKmlr1A9Fg07kd0RJ5xO7kNTNgo5c2dB/ZSevIiPRpjEijU4/5cB+3crBy2O8MCeBbwAP6mgn1K2MV+lJhrLVvP4jxdl+5pqPF9lhbuN9iZJE6bClWmghqsquVYlXNyyGy6KCltEJvLharosVDypYcKeTSJjn30JJafvg+dXqp846M5Hz33hZf+rvYceljBDabr95gcs0sMPuo2yVCBxJ6psyrFcpSW8qsVC9aZb3GOiOzRRFU+zKylYLa/1KaF4HZa/5d2zKnzxDdhNpC/ibXVkKj8swgWjs6iVUWyO7q8YmLMFBMutgyiQNS4VpEXdXjevzxlVh5uDNickcabejE+MzbOTnGWbmM0bQLaH5ObvYTOeC/yU8JVlA4IO4BAABQDQCdASo0ADQAPm0skkakIj+hMBIMA/ANiWwAuRfov4fAeaLWeyFGPhU7ernd/RzvIm8wgb58DypeQ+Xe6C73cPt4lM/nKeQIJaIh+0w5W06DfzKUkLwzzvI0Z1mZEQoj3f1onuOrUcKFF6G4HDt8nUWAAP7+9l3+RfZSNX2uw5INGJe5fm2NPbC9v4//Jv/Sx9j/wThZvDxAX6+Mski7H3YP9gB/k3PNtNddfbp/APAt2n27hXnf+Gf++NLmHyMMah7BB2pXZMN3Qjb1YTbt+t8um///sRDqdL/FwJsZtZqDVGGWWjryAzaiV4GXO9DN/CilzOvJ3+P+GViVOGsi8//fRQcxJxrwpy5j/k6GG/eHsYtaVAnhtMDGZXYGDJWdsDvL18YntWV/dv6PEtspt6inaWA38/NApOoAl5ehJRg2GZd/+UJn3EYhCqpJfPHRwUM1L2q/+Qi+Z3/GTAbNpdPy4fuPR+LFKfCJU59oVibJbYQ22VV/USYkoQuNLeNXhc9iUfBRZDLbZeSm4B0wopJ+X8Qr9/X0D9AjiTrBjN7wZcif+pif//6C1tTlo1jibaNsEftdPVofm//N2DLM8S1F3FdVFm/X+8oRGst0f0IATfAP/3iMwGZtTjWKkBM96hm4kqe9JzvZeAAAAA==";
1392
- //#endregion
1393
- //#region ../../node_modules/.pnpm/ember-click-outside@6.1.1_@babel+core@7.29.0/node_modules/ember-click-outside/dist/modifiers/on-click-outside.js
1394
- function _defineProperty(obj, key, value) {
1395
- key = _toPropertyKey(key);
1396
- if (key in obj) Object.defineProperty(obj, key, {
1397
- value,
1398
- enumerable: true,
1399
- configurable: true,
1400
- writable: true
1401
- });
1402
- else obj[key] = value;
1403
- return obj;
1404
- }
1405
- function _toPrimitive(input, hint) {
1406
- if (typeof input !== "object" || input === null) return input;
1407
- var prim = input[Symbol.toPrimitive];
1408
- if (prim !== void 0) {
1409
- var res = prim.call(input, hint || "default");
1410
- if (typeof res !== "object") return res;
1411
- throw new TypeError("@@toPrimitive must return a primitive value.");
1412
- }
1413
- return (hint === "string" ? String : Number)(input);
1414
- }
1415
- function _toPropertyKey(arg) {
1416
- var key = _toPrimitive(arg, "string");
1417
- return typeof key === "symbol" ? key : String(key);
1418
- }
1419
- var proto = typeof Element !== "undefined" ? Element.prototype : {};
1420
- var vendor = proto.matches || proto.matchesSelector || proto.webkitMatchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector;
1421
- function matches(el, selector) {
1422
- if (!el || el.nodeType !== 1) return false;
1423
- if (vendor) return vendor.call(el, selector);
1424
- var nodes = el.parentNode.querySelectorAll(selector);
1425
- for (var i = 0; i < nodes.length; i++) if (nodes[i] == el) return true;
1426
- return false;
1427
- }
1428
- function closest(element, selector) {
1429
- if (matches(element, selector)) return element;
1430
- while (element.parentNode) {
1431
- element = element.parentNode;
1432
- if (matches(element, selector)) return element;
1433
- }
1434
- }
1435
- var documentOrBodyContains = (element) => {
1436
- if (typeof document.contains === "function") return document.contains(element);
1437
- else return document.body.contains(element);
1438
- };
1439
- var ios = () => {
1440
- return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
1441
- };
1442
- var ClickOutsideModifier = class extends ClassBasedModifier {
1443
- constructor() {
1444
- super(...arguments);
1445
- _defineProperty(this, "didSetup", false);
1446
- _defineProperty(this, "action", null);
1447
- _defineProperty(this, "capture", null);
1448
- _defineProperty(this, "eventHandler", null);
1449
- _defineProperty(this, "eventType", "click");
1450
- _defineProperty(this, "exceptSelector", null);
1451
- _defineProperty(this, "cancelOutsideListenerSetup", null);
1452
- _defineProperty(this, "cleanup", () => {
1453
- this._destroy();
1454
- if (ios()) document.body.style.cursor = "";
1455
- });
1456
- registerDestructor(this, this.cleanup);
1457
- }
1458
- modify(element, [action], { capture, eventType, exceptSelector }) {
1459
- if (!this.didSetup) {
1460
- if (ios()) document.body.style.cursor = "pointer";
1461
- this.didSetup = true;
1462
- } else this._destroy();
1463
- this._init({
1464
- element,
1465
- action,
1466
- capture,
1467
- eventType,
1468
- exceptSelector
1469
- });
1470
- }
1471
- _init({ element, action, capture, eventType, exceptSelector }) {
1472
- if (!action) return;
1473
- this.action = action;
1474
- this.exceptSelector = exceptSelector;
1475
- this.capture = capture;
1476
- if (eventType) this.eventType = eventType;
1477
- this.eventHandler = this._createHandler(element, this.action, this.exceptSelector);
1478
- this.cancelOutsideListenerSetup = next(this, this._addClickOutsideListener);
1479
- }
1480
- _destroy() {
1481
- if (!this.action) return;
1482
- cancel(this.cancelOutsideListenerSetup);
1483
- this._removeClickOutsideListener();
1484
- }
1485
- _addClickOutsideListener() {
1486
- let { capture, eventHandler, eventType } = this;
1487
- document.addEventListener(eventType, eventHandler, { capture });
1488
- }
1489
- _removeClickOutsideListener() {
1490
- let { capture, eventHandler, eventType } = this;
1491
- document.removeEventListener(eventType, eventHandler, { capture });
1492
- }
1493
- _createHandler(element, action, exceptSelector) {
1494
- return (e) => {
1495
- if (exceptSelector && e.target && closest(e.target, exceptSelector)) return;
1496
- let path = e.path || e.composedPath && e.composedPath();
1497
- if (path) path.includes(element) || action(e);
1498
- else {
1499
- let isRemoved = !e.target || !documentOrBodyContains(e.target);
1500
- let isInside = element === e.target || element.contains(e.target);
1501
- if (!isRemoved && !isInside) action(e);
1502
- }
1503
- };
1504
- }
1505
- };
1506
- //#endregion
1507
- //#region app/modifiers/scroll-into-view.ts
1508
- var ScrollIntoViewModifier = class extends ClassBasedModifier {
1509
- static {
1510
- decorateFieldV2(this.prototype, "scrollPositionService", [service]);
1511
- }
1512
- #scrollPositionService = (initializeDeferredDecorator(this, "scrollPositionService"), void 0);
1513
- #intersectionObserver;
1514
- #lastRunScrolled = false;
1515
- constructor(owner, args) {
1516
- super(owner, args);
1517
- registerDestructor(this, () => {
1518
- this.#intersectionObserver?.disconnect();
1519
- this.#intersectionObserver = void 0;
1520
- this.element = void 0;
1521
- });
1522
- }
1523
- async modify(element, [shouldScrollIntoView], { container, key }) {
1524
- this.element = element;
1525
- if (shouldScrollIntoView && container && key && !this.scrollPositionService.keyHasScrollPosition(container, key) && !this.#lastRunScrolled) {
1526
- await this.scrollIfNotVisible();
1527
- this.#lastRunScrolled = true;
1528
- } else {
1529
- this.#lastRunScrolled = false;
1530
- this.#intersectionObserver?.disconnect();
1531
- this.#intersectionObserver = void 0;
1532
- }
1533
- }
1534
- async scrollIfNotVisible() {
1535
- let element = this.element;
1536
- return new Promise((resolve) => {
1537
- this.#intersectionObserver?.disconnect();
1538
- let intersectionObserver = new IntersectionObserver((entries) => {
1539
- intersectionObserver.disconnect();
1540
- if (this.#intersectionObserver === intersectionObserver) this.#intersectionObserver = void 0;
1541
- if (!entries[0].isIntersecting) element.scrollIntoView({ block: "center" });
1542
- resolve(void 0);
1543
- });
1544
- this.#intersectionObserver = intersectionObserver;
1545
- intersectionObserver.observe(element);
1546
- });
1547
- }
1548
- };
1549
- //#endregion
1550
- //#region app/components/operator-mode/delete-modal.gts
1551
- var component = setComponentTemplate(templateFactory({
1552
- "id": "sNUrA6y5",
1553
- "block": "[[[8,[32,0],[[24,\"data-test-delete-modal-container\",\"\"],[16,\"data-test-delete-modal\",[30,1,[\"id\"]]],[16,5,[28,[32,1],null,[[\"boxel-modal-offset-top\"],[\"40vh\"]]]],[24,\"data-scopedcss-9e06465ac3-e6cf0aba53\",\"\"]],[[\"@layer\",\"@size\",\"@isOpen\",\"@onClose\"],[\"urgent\",[52,[30,2],[30,2],\"x-small\"],true,[30,3]]],[[\"default\"],[[[[1,\"\\n \"],[10,\"section\"],[15,0,[29,[\"delete \",[30,4]]]],[14,\"data-scopedcss-9e06465ac3-e6cf0aba53\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"content\"],[14,\"data-test-delete-msg\",\"\"],[14,\"data-scopedcss-9e06465ac3-e6cf0aba53\",\"\"],[12],[1,\"\\n\"],[41,[48,[30,8]],[[[1,\" \"],[18,8,null],[1,\"\\n\"]],[]],[[[1,\" \"],[18,9,null],[1,\"\\n\"]],[]]],[1,\" \"],[13],[1,\"\\n \"],[10,2],[14,0,\"content disclaimer\"],[14,\"data-scopedcss-9e06465ac3-e6cf0aba53\",\"\"],[12],[1,\"This action is not reversible.\"],[13],[1,\"\\n \"],[10,\"footer\"],[14,0,\"buttons\"],[14,\"data-scopedcss-9e06465ac3-e6cf0aba53\",\"\"],[12],[1,\"\\n\"],[41,[30,5],[[[1,\" \"],[8,[32,2],[[24,\"data-scopedcss-9e06465ac3-e6cf0aba53\",\"\"]],[[\"@size\",\"@kind\",\"@loading\"],[\"tall\",\"danger\",true]],[[\"default\"],[[[[1,\"\\n Deleting\\n \"]],[]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,2],[[24,\"data-test-confirm-cancel-button\",\"\"],[24,\"data-scopedcss-9e06465ac3-e6cf0aba53\",\"\"],[4,[32,3],[\"click\",[30,3]],null]],[[\"@size\",\"@kind\"],[\"tall\",\"secondary-light\"]],[[\"default\"],[[[[1,\"\\n Cancel\\n \"]],[]]]]],[1,\"\\n \"],[8,[32,2],[[24,\"data-test-confirm-delete-button\",\"\"],[24,\"data-scopedcss-9e06465ac3-e6cf0aba53\",\"\"],[4,[32,3],[\"click\",[28,[32,4],[[30,6],[30,1]],null]],null]],[[\"@size\",\"@kind\"],[\"tall\",\"danger\"]],[[\"default\"],[[[[1,\"\\n Delete\\n \"]],[]]]]],[1,\"\\n\"]],[]]],[41,[30,7],[[[1,\" \"],[10,2],[14,0,\"error\"],[14,\"data-scopedcss-9e06465ac3-e6cf0aba53\",\"\"],[12],[1,[30,7]],[13],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]]]]],[1,\"\\n\\n\"]],[\"@itemToDelete\",\"@size\",\"@onCancel\",\"@containerClass\",\"@isDeleteRunning\",\"@onConfirm\",\"@error\",\"&content\",\"&default\"],[\"if\",\"has-block\",\"yield\"]]",
1554
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/operator-mode/delete-modal.gts",
1555
- "scope": () => [
1556
- Modal,
1557
- cssVar$1,
1558
- ButtonComponent,
1559
- on,
1560
- fn
1561
- ],
1562
- "isStrictMode": true
1563
- }), templateOnly());
1564
- //#endregion
1565
- //#region app/components/ai-assistant/new-session.gts
1566
- var NewSession = setComponentTemplate(templateFactory({
1567
- "id": "J5DdJWsb",
1568
- "block": "[[[10,0],[14,0,\"intro\"],[14,\"data-test-new-session\",\"\"],[14,\"data-scopedcss-023604e0fe-22b9bd59b0\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"title-group\"],[14,\"data-scopedcss-023604e0fe-22b9bd59b0\",\"\"],[12],[1,\"\\n \"],[10,\"img\"],[14,\"alt\",\"AI Assistant\"],[15,\"src\",[32,0]],[14,\"width\",\"40\"],[14,\"height\",\"40\"],[14,\"data-scopedcss-023604e0fe-22b9bd59b0\",\"\"],[12],[13],[1,\"\\n \"],[10,\"h2\"],[14,0,\"title-text\"],[14,\"data-scopedcss-023604e0fe-22b9bd59b0\",\"\"],[12],[1,\"Assistant\"],[13],[1,\"\\n \"],[13],[1,\"\\n\"],[41,[30,1],[[[1,\" \"],[10,0],[14,0,\"error-section\"],[14,\"data-test-room-error\",\"\"],[14,\"data-scopedcss-023604e0fe-22b9bd59b0\",\"\"],[12],[1,\"\\n \"],[10,2],[14,0,\"message\"],[14,\"data-scopedcss-023604e0fe-22b9bd59b0\",\"\"],[12],[1,\"\\n We've encountered an error, please try again later.\\n \"],[13],[1,\"\\n \"],[8,[32,1],[[24,\"data-scopedcss-023604e0fe-22b9bd59b0\",\"\"],[4,[32,2],[\"click\",[30,1]],null]],[[\"@size\",\"@kind\"],[\"small\",\"primary\"]],[[\"default\"],[[[[1,\"\\n Try Again\\n \"]],[]]]]],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[1,\" \"],[10,2],[14,0,\"message\"],[14,\"data-scopedcss-023604e0fe-22b9bd59b0\",\"\"],[12],[1,\"\\n Boxel Assistant is an AI that helps you edit content, design interfaces,\\n write code, and plan workflows using simple text prompts. Just ask the\\n assistant to get started.\\n \"],[13],[1,\"\\n \"],[10,2],[14,0,\"disclaimer\"],[14,\"data-scopedcss-023604e0fe-22b9bd59b0\",\"\"],[12],[1,\"\\n Assistant may display inaccurate info, please double check its\\n responses.\\n \"],[13],[1,\"\\n\"]],[]]],[13],[1,\"\\n\\n\"]],[\"@errorAction\"],[\"if\"]]",
1569
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/new-session.gts",
1570
- "scope": () => [
1571
- ai_assist_icon_2x_default,
1572
- ButtonComponent,
1573
- on
1574
- ],
1575
- "isStrictMode": true
1576
- }), templateOnly());
1577
- //#endregion
1578
- //#region app/components/ai-assistant/panel-popover.gts
1579
- var AiAssistantPanelPopover = setComponentTemplate(templateFactory({
1580
- "id": "BWg6r3pX",
1581
- "block": "[[[1,\"\\n\\n\"],[11,0],[24,0,\"panel-popover\"],[17,1],[24,\"data-scopedcss-2189e5ae0f-3b8b81e9a9\",\"\"],[4,[32,0],[[30,2]],[[\"exceptSelector\"],[\".past-session-menu,.delete\"]]],[12],[1,\"\\n \"],[10,\"header\"],[14,0,\"header\"],[14,\"data-scopedcss-2189e5ae0f-3b8b81e9a9\",\"\"],[12],[1,\"\\n \"],[18,3,null],[1,\"\\n \"],[13],[1,\"\\n \"],[10,0],[14,0,\"body\"],[14,\"tabindex\",\"0\"],[14,\"data-scopedcss-2189e5ae0f-3b8b81e9a9\",\"\"],[12],[1,\"\\n \"],[18,4,null],[1,\"\\n \"],[13],[1,\"\\n\"],[13]],[\"&attrs\",\"@onClose\",\"&header\",\"&body\"],[\"yield\"]]",
1582
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/panel-popover.gts",
1583
- "scope": () => [ClickOutsideModifier],
1584
- "isStrictMode": true
1585
- }), templateOnly());
1586
- //#endregion
1587
- //#region ../boxel-icons/dist/@cardstack/boxel-icons/v1/icons/external-link.js
1588
- var IconComponent = setComponentTemplate(templateFactory({
1589
- "id": "sYpC+X5U",
1590
- "block": "[[[1,\"\\n \"],[11,\"svg\"],[24,\"xmlns\",\"http://www.w3.org/2000/svg\",\"http://www.w3.org/2000/xmlns/\"],[24,\"width\",\"24\"],[24,\"height\",\"24\"],[24,\"fill\",\"none\"],[24,\"stroke\",\"currentColor\"],[24,\"stroke-linecap\",\"round\"],[24,\"stroke-linejoin\",\"round\"],[24,\"stroke-width\",\"2\"],[24,0,\"lucide lucide-external-link\"],[24,\"viewBox\",\"0 0 24 24\"],[17,1],[12],[10,\"path\"],[14,\"d\",\"M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"],[12],[13],[13],[1,\"\\n\"]],[\"&attrs\"],[]]",
1591
- "moduleName": "/home/runner/work/boxel/boxel/packages/boxel-icons/src/icons/external-link.gts",
1592
- "isStrictMode": true
1593
- }), templateOnly());
1594
- IconComponent.name = "external-link";
1595
- //#endregion
1596
- //#region app/components/ai-assistant/past-session-item.gts
1597
- var PastSessionItem = class extends Component {
1598
- static {
1599
- decorateFieldV2(this.prototype, "preventMenuClose", [tracked], function() {
1600
- return false;
1601
- });
1602
- }
1603
- #preventMenuClose = (initializeDeferredDecorator(this, "preventMenuClose"), void 0);
1604
- static {
1605
- setComponentTemplate(templateFactory({
1606
- "id": "btNNm9F+",
1607
- "block": "[[[10,\"li\"],[14,0,\"session\"],[15,\"data-test-joined-room\",[30,1,[\"roomId\"]]],[15,\"data-room-id\",[30,1,[\"roomId\"]]],[15,\"data-is-current-room\",[30,2]],[14,\"data-scopedcss-ce21097887-b7a0c79abc\",\"\"],[12],[1,\"\\n \"],[11,\"button\"],[24,0,\"view-session-button\"],[16,\"data-test-enter-room\",[30,1,[\"roomId\"]]],[24,\"data-scopedcss-ce21097887-b7a0c79abc\",\"\"],[4,[32,0],[\"click\",[28,[32,1],[[30,3,[\"open\"]],[30,1,[\"roomId\"]]],null]],null],[12],[1,\"\\n \"],[10,0],[14,0,\"name\"],[14,\"data-scopedcss-ce21097887-b7a0c79abc\",\"\"],[12],[1,[30,1,[\"name\"]]],[13],[1,\"\\n \"],[10,0],[15,0,[29,[\"date\\n \",[52,[30,0,[\"isStreaming\"]],\"is-streaming\"],\"\\n \",[52,[30,0,[\"hasUnseenMessage\"]],\"has-unseen-message\"]]]],[15,\"data-test-last-active\",[30,0,[\"lastActive\"]]],[15,\"data-test-is-streaming\",[30,0,[\"isStreaming\"]]],[15,\"data-test-is-unseen-message\",[30,0,[\"hasUnseenMessage\"]]],[14,\"data-scopedcss-ce21097887-b7a0c79abc\",\"\"],[12],[1,\"\\n\"],[41,[30,0,[\"isStreaming\"]],[[[1,\" \"],[8,[32,2],[[24,\"width\",\"12px\"],[24,\"height\",\"12px\"],[24,0,\"icon-recency-indicator icon-streaming pulsing\"],[24,\"data-scopedcss-ce21097887-b7a0c79abc\",\"\"]],null,null],[1,\"\\n Thinking…\\n\"]],[]],[[[41,[30,0,[\"hasUnseenMessage\"]],[[[1,\" \"],[8,[32,2],[[24,\"width\",\"10px\"],[24,\"height\",\"10px\"],[24,0,\"icon-recency-indicator icon-new-messages\"],[24,\"data-scopedcss-ce21097887-b7a0c79abc\",\"\"]],null,null],[1,\"\\n Updated\\n \"],[1,[30,0,[\"formattedDate\"]]],[1,\"\\n\"]],[]],[[[1,\" \"],[1,[30,0,[\"formattedDate\"]]],[1,\"\\n \"]],[]]]],[]]],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n \"],[8,[32,3],[[24,\"data-scopedcss-ce21097887-b7a0c79abc\",\"\"]],null,[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,4],[[24,\"data-scopedcss-ce21097887-b7a0c79abc\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,5],[[24,0,\"menu-button\"],[16,\"data-test-past-session-options-button\",[30,1,[\"roomId\"]]],[24,\"data-scopedcss-ce21097887-b7a0c79abc\",\"\"],[4,[30,4],null,null]],[[\"@variant\",\"@size\",\"@label\"],[\"highlight-icon\",\"extra-small\",\"past session options\"]],null],[1,\"\\n \"]],[]],[[[1,\"\\n More Options\\n \"]],[]]]]],[1,\"\\n \"]],[4]],[[[1,\"\\n \"],[8,[32,6],[[24,0,\"menu past-session-menu\"],[24,\"data-scopedcss-ce21097887-b7a0c79abc\",\"\"]],[[\"@closeMenu\",\"@items\"],[[28,[32,1],[[30,0,[\"handleCloseMenu\"]],[30,5,[\"close\"]]],null],[28,[32,7],[[28,[32,8],[\"Open Session\",[28,[32,1],[[30,3,[\"open\"]],[30,1,[\"roomId\"]]],null]],[[\"icon\"],[[32,9]]]],[28,[32,8],[\"Rename\",[28,[32,1],[[30,3,[\"rename\"]],[30,1]],null]],[[\"icon\"],[[32,10]]]],[28,[32,8],[[52,[28,[32,11],[[28,[30,3,[\"getCopiedRoomId\"]],null,null],[30,1,[\"roomId\"]]],null],\"Copied!\",\"Copy Room Id\"],[28,[32,1],[[30,0,[\"handleCopyRoomId\"]],[30,1,[\"roomId\"]]],null]],[[\"icon\"],[[32,12]]]],[28,[32,8],[\"Delete\",[28,[32,1],[[30,3,[\"delete\"]],[30,1]],null]],[[\"icon\"],[[32,13]]]]],null]]],null],[1,\"\\n \"]],[5]]]]],[1,\"\\n\"],[13],[1,\"\\n\\n\"]],[\"@session\",\"@isCurrentRoom\",\"@actions\",\"bindings\",\"dd\"],[\"if\"]]",
1608
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/past-session-item.gts",
1609
- "scope": () => [
1610
- on,
1611
- fn,
1612
- IconComponent$C,
1613
- BoxelDropdown,
1614
- Tooltip,
1615
- DropdownButton,
1616
- Menu,
1617
- array,
1618
- menuItem,
1619
- IconComponent,
1620
- IconComponent$r,
1621
- eq,
1622
- IconComponent$Y,
1623
- IconComponent$k
1624
- ],
1625
- "isStrictMode": true
1626
- }), this);
1627
- }
1628
- static {
1629
- decorateFieldV2(this.prototype, "matrixService", [service]);
1630
- }
1631
- #matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
1632
- handleCopyRoomId(roomId) {
1633
- this.preventMenuClose = true;
1634
- this.args.actions.copyRoomId(roomId);
1635
- setTimeout(() => {
1636
- this.preventMenuClose = false;
1637
- }, 200);
1638
- }
1639
- static {
1640
- decorateMethodV2(this.prototype, "handleCopyRoomId", [action]);
1641
- }
1642
- handleCloseMenu(originalClose) {
1643
- if (!this.preventMenuClose) originalClose();
1644
- }
1645
- static {
1646
- decorateMethodV2(this.prototype, "handleCloseMenu", [action]);
1647
- }
1648
- get createDate() {
1649
- if (!this.args.session.created) return /* @__PURE__ */ new Date();
1650
- return this.args.session.created;
1651
- }
1652
- get isStreaming() {
1653
- return this.args.session.lastMessage?.isStreamingFinished === false;
1654
- }
1655
- get hasUnseenMessage() {
1656
- if (!this.args.session.lastMessage) return false;
1657
- return !this.matrixService.currentUserEventReadReceipts.has(this.args.session.lastMessage.eventId);
1658
- }
1659
- get lastActive() {
1660
- let timestamp = this.matrixService.getLastActiveTimestamp(this.args.session.roomId, this.args.session.lastActiveTimestamp) ?? this.createDate.getTime();
1661
- return isNaN(timestamp) ? Date.now() : timestamp;
1662
- }
1663
- get formattedDate() {
1664
- let now = /* @__PURE__ */ new Date();
1665
- if (isSameDay(this.lastActive, now)) return `Today ${format(this.lastActive, "MMM d, h:mm aa")}`;
1666
- else if (isSameYear(this.lastActive, now)) return format(this.lastActive, "iiii MMM d, h:mm aa");
1667
- return format(this.lastActive, "iiii MMM d, yyyy, h:mm aa");
1668
- }
1669
- };
1670
- //#endregion
1671
- //#region app/components/ai-assistant/past-sessions.gts
1672
- var AiAssistantPastSessionsList = class extends Component {
1673
- static {
1674
- decorateFieldV2(this.prototype, "matrixService", [service]);
1675
- }
1676
- #matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
1677
- checkScroll = modifier((element) => {
1678
- let checkScrollPosition = () => {
1679
- let { scrollHeight, scrollTop, clientHeight } = element;
1680
- if (Math.abs(scrollHeight - scrollTop - clientHeight) <= 1 || scrollHeight <= clientHeight) this.matrixService.loadMoreAIRooms();
1681
- };
1682
- checkScrollPosition();
1683
- element.addEventListener("scroll", checkScrollPosition);
1684
- return () => {
1685
- element.removeEventListener("scroll", checkScrollPosition);
1686
- };
1687
- });
1688
- static {
1689
- setComponentTemplate(templateFactory({
1690
- "id": "xCeucmTa",
1691
- "block": "[[[8,[32,0],[[24,\"data-test-past-sessions\",\"\"],[17,1],[24,\"data-scopedcss-8e5f88795c-c7d0465391\",\"\"]],[[\"@onClose\"],[[30,2]]],[[\"header\",\"body\"],[[[[1,\"\\n Past Sessions\\n \"]],[]],[[[1,\"\\n\"],[41,[30,3],[[[1,\" \"],[11,\"ul\"],[24,0,\"past-sessions\"],[24,\"data-scopedcss-8e5f88795c-c7d0465391\",\"\"],[4,[30,0,[\"checkScroll\"]],null,null],[12],[1,\"\\n\"],[42,[28,[31,2],[[28,[31,2],[[30,3]],null]],null],\"roomId\",[[[1,\" \"],[8,[32,1],[[24,\"data-scopedcss-8e5f88795c-c7d0465391\",\"\"]],[[\"@session\",\"@isCurrentRoom\",\"@actions\"],[[30,4],[28,[32,2],[[30,4,[\"roomId\"]],[30,5]],null],[30,6]]],null],[1,\"\\n\"]],[4]],null],[41,[30,0,[\"matrixService\",\"isLoadingMoreAIRooms\"]],[[[1,\" \"],[10,\"li\"],[14,0,\"loading-indicator-container\"],[14,\"data-test-loading-more-rooms\",\"\"],[14,\"data-scopedcss-8e5f88795c-c7d0465391\",\"\"],[12],[1,\"\\n \"],[8,[32,3],[[24,0,\"loading-indicator\"],[24,\"data-scopedcss-8e5f88795c-c7d0465391\",\"\"]],[[\"@color\"],[\"var(--boxel-dark)\"]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n\"]],[]],[[[1,\" \"],[10,0],[14,0,\"empty-collection\"],[14,\"data-scopedcss-8e5f88795c-c7d0465391\",\"\"],[12],[1,\"\\n No past sessions to show.\\n \"],[13],[1,\"\\n\"]],[]]],[1,\" \"]],[]]]]],[1,\"\\n\\n\"]],[\"&attrs\",\"@onClose\",\"@sessions\",\"session\",\"@currentRoomId\",\"@roomActions\"],[\"if\",\"each\",\"-track-array\"]]",
1692
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/past-sessions.gts",
1693
- "scope": () => [
1694
- AiAssistantPanelPopover,
1695
- PastSessionItem,
1696
- eq,
1697
- LoadingIndicator
1698
- ],
1699
- "isStrictMode": true
1700
- }), this);
1701
- }
1702
- };
1703
- //#endregion
1704
- //#region app/components/ai-assistant/rename-session.gts
1705
- var RenameSession = class extends Component {
1706
- static {
1707
- setComponentTemplate(templateFactory({
1708
- "id": "UDFPtgb+",
1709
- "block": "[[[8,[32,0],[[24,0,\"rename-session\"],[24,\"data-test-rename-session\",\"\"],[17,1],[24,\"data-scopedcss-c89c6b0da6-502e141181\",\"\"]],[[\"@onClose\"],[[30,2]]],[[\"header\",\"body\"],[[[[1,\"Rename Session\"]],[]],[[[1,\"\\n \"],[10,0],[14,0,\"rename-field\"],[14,\"data-scopedcss-c89c6b0da6-502e141181\",\"\"],[12],[1,\"\\n \"],[8,[32,1],[[24,\"aria-label\",\"Session Name\"],[24,\"data-test-name-field\",\"\"],[24,\"data-scopedcss-c89c6b0da6-502e141181\",\"\"]],[[\"@state\",\"@value\",\"@errorMessage\",\"@onInput\"],[[30,0,[\"roomNameInputState\"]],[30,0,[\"newRoomName\"]],[30,0,[\"roomNameError\"]],[30,0,[\"setName\"]]]],null],[1,\"\\n \"],[13],[1,\"\\n \"],[10,\"footer\"],[14,0,\"footer\"],[14,\"data-scopedcss-c89c6b0da6-502e141181\",\"\"],[12],[1,\"\\n \"],[8,[32,2],[[24,\"data-test-cancel-name-button\",\"\"],[24,\"data-scopedcss-c89c6b0da6-502e141181\",\"\"],[4,[32,3],[\"click\",[30,2]],null],[4,[32,4],[\"Escape\",[30,2]],null]],[[\"@kind\",\"@size\"],[\"secondary\",\"extra-small\"]],[[\"default\"],[[[[1,\"\\n Cancel\\n \"]],[]]]]],[1,\"\\n \"],[8,[32,2],[[24,\"data-test-save-name-button\",\"\"],[24,\"data-scopedcss-c89c6b0da6-502e141181\",\"\"],[4,[32,3],[\"click\",[30,0,[\"renameRoom\"]]],null],[4,[32,4],[\"Enter\",[30,0,[\"renameRoom\"]]],null]],[[\"@kind\",\"@size\",\"@disabled\",\"@loading\"],[\"primary\",\"extra-small\",[30,0,[\"isSaveRenameDisabled\"]],[30,0,[\"doRenameRoom\",\"isRunning\"]]]],[[\"default\"],[[[[1,\"\\n Save\\n \"]],[]]]]],[1,\"\\n \"],[13],[1,\"\\n \"]],[]]]]],[1,\"\\n\\n\"]],[\"&attrs\",\"@onClose\"],[]]",
1710
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/rename-session.gts",
1711
- "scope": () => [
1712
- AiAssistantPanelPopover,
1713
- BoxelInput,
1714
- ButtonComponent,
1715
- on,
1716
- modifier$1
1717
- ],
1718
- "isStrictMode": true
1719
- }), this);
1720
- }
1721
- static {
1722
- decorateFieldV2(this.prototype, "matrixService", [service]);
1723
- }
1724
- #matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
1725
- static {
1726
- decorateFieldV2(this.prototype, "newRoomName", [tracked], function() {
1727
- return this.args.room.name;
1728
- });
1729
- }
1730
- #newRoomName = (initializeDeferredDecorator(this, "newRoomName"), void 0);
1731
- static {
1732
- decorateFieldV2(this.prototype, "roomNameError", [tracked], function() {});
1733
- }
1734
- #roomNameError = (initializeDeferredDecorator(this, "roomNameError"), void 0);
1735
- get roomNameInputState() {
1736
- return this.roomNameError ? "invalid" : "initial";
1737
- }
1738
- get isSaveRenameDisabled() {
1739
- return !this.newRoomName?.length || this.newRoomName === this.args.room.name || this.doRenameRoom.isRunning;
1740
- }
1741
- setName(name) {
1742
- this.roomNameError = void 0;
1743
- this.newRoomName = name;
1744
- }
1745
- static {
1746
- decorateMethodV2(this.prototype, "setName", [action]);
1747
- }
1748
- renameRoom() {
1749
- this.doRenameRoom.perform();
1750
- }
1751
- static {
1752
- decorateMethodV2(this.prototype, "renameRoom", [action]);
1753
- }
1754
- doRenameRoom = buildTask(() => ({
1755
- context: this,
1756
- generator: function* () {
1757
- if (!this.newRoomName?.length || !this.args.room.roomId) throw new Error(`bug: should never get here`);
1758
- try {
1759
- yield this.matrixService.setRoomName(this.args.room.roomId, this.newRoomName);
1760
- this.roomNameError = void 0;
1761
- this.newRoomName = "";
1762
- this.args.onClose();
1763
- } catch (e) {
1764
- console.error(e);
1765
- this.roomNameError = `Error renaming room`;
1766
- if (isMatrixError(e)) this.roomNameError += `: ${e.data.error}`;
1767
- else if (e instanceof Error) this.roomNameError += `: ${e.message}`;
1768
- }
1769
- }
1770
- }), null, "doRenameRoom", "restartable");
1771
- };
1772
- //#endregion
1773
- //#region ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseExtremum.js
1774
- var require__baseExtremum = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1775
- var isSymbol = require_isSymbol();
1776
- /**
1777
- * The base implementation of methods like `_.max` and `_.min` which accepts a
1778
- * `comparator` to determine the extremum value.
1779
- *
1780
- * @private
1781
- * @param {Array} array The array to iterate over.
1782
- * @param {Function} iteratee The iteratee invoked per iteration.
1783
- * @param {Function} comparator The comparator used to compare values.
1784
- * @returns {*} Returns the extremum value.
1785
- */
1786
- function baseExtremum(array, iteratee, comparator) {
1787
- var index = -1;
1788
- var length = array.length;
1789
- while (++index < length) {
1790
- var value = array[index];
1791
- var current = iteratee(value);
1792
- if (current != null && (computed === void 0 ? current === current && !isSymbol(current) : comparator(current, computed))) {
1793
- var computed = current;
1794
- var result = value;
1795
- }
1796
- }
1797
- return result;
1798
- }
1799
- module.exports = baseExtremum;
1800
- }));
1801
- //#endregion
1802
- //#region ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGt.js
1803
- var require__baseGt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1804
- /**
1805
- * The base implementation of `_.gt` which doesn't coerce arguments.
1806
- *
1807
- * @private
1808
- * @param {*} value The value to compare.
1809
- * @param {*} other The other value to compare.
1810
- * @returns {boolean} Returns `true` if `value` is greater than `other`,
1811
- * else `false`.
1812
- */
1813
- function baseGt(value, other) {
1814
- return value > other;
1815
- }
1816
- module.exports = baseGt;
1817
- }));
1818
- //#endregion
1819
- //#region ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/max.js
1820
- var require_max = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1821
- var baseExtremum = require__baseExtremum();
1822
- var baseGt = require__baseGt();
1823
- var identity = require_identity();
1824
- /**
1825
- * Computes the maximum value of `array`. If `array` is empty or falsey,
1826
- * `undefined` is returned.
1827
- *
1828
- * @static
1829
- * @since 0.1.0
1830
- * @memberOf _
1831
- * @category Math
1832
- * @param {Array} array The array to iterate over.
1833
- * @returns {*} Returns the maximum value.
1834
- * @example
1835
- *
1836
- * _.max([4, 2, 8, 6]);
1837
- * // => 8
1838
- *
1839
- * _.max([]);
1840
- * // => undefined
1841
- */
1842
- function max(array) {
1843
- return array && array.length ? baseExtremum(array, identity, baseGt) : void 0;
1844
- }
1845
- module.exports = max;
1846
- }));
1847
- //#endregion
1848
- //#region app/components/ai-assistant/action-bar.gts
1849
- var AiAssistantActionBar = class extends Component {
1850
- stop() {
1851
- this.args.stop?.();
1852
- }
1853
- static {
1854
- decorateMethodV2(this.prototype, "stop", [action]);
1855
- }
1856
- static {
1857
- setComponentTemplate(templateFactory({
1858
- "id": "EOHDWlLe",
1859
- "block": "[[[10,0],[15,0,[28,[32,0],[\"ai-assistant-action-bar\"],[[\"unread-indicator\"],[[30,1]]]]],[14,\"data-test-ai-assistant-action-bar\",\"\"],[14,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"],[12],[1,\"\\n\"],[41,[30,1],[[[1,\" \"],[8,[32,1],[[24,0,\"unread-btn\"],[24,\"data-test-unread-messages-button\",\"\"],[24,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"],[4,[32,2],[\"click\",[30,2]],null]],[[\"@kind\"],[\"primary\"]],[[\"default\"],[[[[1,\"\\n \"],[1,[30,3]],[1,\"\\n \"],[8,[32,3],[[24,0,\"unread-btn__icon\"],[24,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"]],null,null],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[]],[[[41,[30,4],[[[1,\" \"],[10,0],[14,0,\"generating-results-container\"],[14,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"],[12],[1,\"\\n \"],[10,1],[14,0,\"generating-results\"],[14,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"],[12],[1,\"\\n Generating results\"],[10,1],[14,0,\"dot\"],[14,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"],[12],[1,\".\"],[13],[10,1],[14,0,\"dot\"],[14,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"],[12],[1,\".\"],[13],[10,1],[14,0,\"dot\"],[14,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"],[12],[1,\".\"],[13],[1,\"\\n \"],[13],[1,\"\\n \"],[8,[32,1],[[24,0,\"stop-btn\"],[24,\"data-test-stop-generating\",\"\"],[24,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"],[4,[32,2],[\"click\",[30,0,[\"stop\"]]],null]],[[\"@kind\",\"@disabled\"],[\"primary\",[30,5]]],[[\"default\"],[[[[1,\"Stop\"]],[]]]]],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[41,[30,6],[[[1,\" \"],[10,1],[14,0,\"accepting-all\"],[14,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"],[12],[1,\"\\n \"],[8,[32,4],[[24,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"]],null,null],[1,\"\\n \"],[1,[52,[30,7],[30,7],\"Apply Diff\"]],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,1],[[24,0,\"action-btn\"],[24,\"data-test-accept-all\",\"\"],[24,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"],[4,[32,2],[\"click\",[30,8]],null]],[[\"@kind\",\"@disabled\"],[\"primary\",[30,6]]],[[\"default\"],[[[[1,\"Accept All\"]],[]]]]],[1,\"\\n \"],[8,[32,1],[[24,0,\"action-btn cancel-btn\"],[24,\"data-test-cancel\",\"\"],[24,\"data-scopedcss-7fb7ac2cff-cbe83deb24\",\"\"],[4,[32,2],[\"click\",[30,9]],null]],[[\"@kind\",\"@disabled\"],[\"secondary-dark\",[30,6]]],[[\"default\"],[[[[1,\"Cancel\"]],[]]]]],[1,\"\\n \"]],[]]]],[]]]],[]]],[13],[1,\"\\n\\n\"]],[\"@showUnreadIndicator\",\"@scrollToFirstUnread\",\"@unreadMessageText\",\"@generatingResults\",\"@stopping\",\"@acceptingAll\",\"@acceptingAllLabel\",\"@acceptAll\",\"@cancel\"],[\"if\"]]",
1860
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/action-bar.gts",
1861
- "scope": () => [
1862
- cn,
1863
- ButtonComponent,
1864
- on,
1865
- IconComponent$9,
1866
- LoadingIndicator
1867
- ],
1868
- "isStrictMode": true
1869
- }), this);
1870
- }
1871
- };
1872
- //#endregion
1873
- //#region app/components/ai-assistant/llm-mode-toggle.gts
1874
- var LLMModeToggle = class extends Component {
1875
- get selected() {
1876
- return this.args.selected === "act" ? "act" : "ask";
1877
- }
1878
- static {
1879
- setComponentTemplate(templateFactory({
1880
- "id": "WXd54S4Y",
1881
- "block": "[[[11,0],[24,0,\"llm-mode-toggle\"],[17,1],[24,\"data-scopedcss-53bc71b4f0-9a0879cafb\",\"\"],[12],[1,\"\\n \"],[8,[32,0],[[24,\"data-scopedcss-53bc71b4f0-9a0879cafb\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[11,\"button\"],[16,0,[29,[\"llm-mode-option \",[52,[28,[32,1],[[30,0,[\"selected\"]],\"ask\"],null],\"selected\"]]]],[24,\"data-test-llm-mode-option\",\"ask\"],[16,\"disabled\",[30,2]],[24,\"data-scopedcss-53bc71b4f0-9a0879cafb\",\"\"],[24,4,\"button\"],[4,[32,2],[\"click\",[28,[32,3],[[30,0,[\"handleOptionClick\"]],\"ask\"],null]],null],[12],[1,\"\\n Ask\\n \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[10,0],[14,0,\"llm-mode-option-tooltip\"],[14,\"data-scopedcss-53bc71b4f0-9a0879cafb\",\"\"],[12],[1,\"\\n Ask mode: Get answers and explanations without making changes\\n \"],[13],[1,\"\\n \"]],[]]]]],[1,\"\\n\\n \"],[8,[32,0],[[24,\"data-scopedcss-53bc71b4f0-9a0879cafb\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[11,\"button\"],[16,0,[29,[\"llm-mode-option \",[52,[28,[32,1],[[30,0,[\"selected\"]],\"act\"],null],\"selected\"]]]],[24,\"data-test-llm-mode-option\",\"act\"],[16,\"disabled\",[30,2]],[24,\"data-scopedcss-53bc71b4f0-9a0879cafb\",\"\"],[24,4,\"button\"],[4,[32,2],[\"click\",[28,[32,3],[[30,0,[\"handleOptionClick\"]],\"act\"],null]],null],[12],[1,\"\\n Act\\n \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[10,0],[14,0,\"llm-mode-option-tooltip\"],[14,\"data-scopedcss-53bc71b4f0-9a0879cafb\",\"\"],[12],[1,\"\\n Act mode: Automatically apply code changes and execute commands\\n \"],[13],[1,\"\\n \"]],[]]]]],[1,\"\\n\"],[13],[1,\"\\n\"]],[\"&attrs\",\"@disabled\"],[\"if\"]]",
1882
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/llm-mode-toggle.gts",
1883
- "scope": () => [
1884
- Tooltip,
1885
- eq,
1886
- on,
1887
- fn
1888
- ],
1889
- "isStrictMode": true
1890
- }), this);
1891
- }
1892
- handleOptionClick(mode) {
1893
- if (mode !== this.selected) this.args.onChange(mode);
1894
- }
1895
- static {
1896
- decorateMethodV2(this.prototype, "handleOptionClick", [action]);
1897
- }
1898
- };
1899
- //#endregion
1900
- //#region app/components/ai-assistant/llm-select.gts
1901
- var LLMSelect = class extends Component {
1902
- static {
1903
- setComponentTemplate(templateFactory({
1904
- "id": "1qIaBCRX",
1905
- "block": "[[[8,[32,0],[[24,0,\"llm-select\"],[17,1],[24,\"data-scopedcss-b9328eec2b-9cb5cd5b3f\",\"\"]],[[\"@onExpand\",\"@onCollapse\"],[[30,2],[30,3]]],[[\"headerDetail\",\"content\"],[[[[1,\"\\n \"],[10,0],[14,0,\"selected-llm-wrapper\"],[14,\"data-scopedcss-b9328eec2b-9cb5cd5b3f\",\"\"],[12],[1,\"\\n \"],[10,1],[14,0,\"selected-llm\"],[15,\"data-test-llm-select-selected\",[30,4]],[14,\"data-scopedcss-b9328eec2b-9cb5cd5b3f\",\"\"],[12],[1,\"\\n \"],[1,[30,0,[\"displayName\"]]],[1,\"\\n \"],[13],[1,\"\\n \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[10,\"ul\"],[14,0,\"llm-list\"],[14,\"data-scopedcss-b9328eec2b-9cb5cd5b3f\",\"\"],[12],[1,\"\\n\"],[42,[28,[31,1],[[28,[31,1],[[30,5]],null]],null],\"id\",[[[1,\" \"],[11,\"li\"],[16,0,[29,[\"llm-option \",[52,[28,[32,1],[[30,4],[30,6,[\"id\"]]],null],\"selected\"]]]],[16,\"data-test-llm-select-item\",[30,6,[\"id\"]]],[24,\"data-scopedcss-b9328eec2b-9cb5cd5b3f\",\"\"],[4,[32,2],[[28,[32,1],[[30,4],[30,6,[\"id\"]]],null]],[[\"container\",\"key\"],[\"llm-select\",[30,6,[\"id\"]]]]],[12],[1,\"\\n \"],[11,\"button\"],[24,0,\"llm-button\"],[24,\"data-scopedcss-b9328eec2b-9cb5cd5b3f\",\"\"],[24,4,\"button\"],[4,[32,3],[\"click\",[28,[32,4],[[30,0,[\"handleOptionClick\"]],[30,6,[\"id\"]]],null]],null],[12],[1,\"\\n \"],[1,[30,6,[\"name\"]]],[1,\"\\n\"],[41,[28,[32,1],[[30,4],[30,6,[\"id\"]]],null],[[[1,\" \"],[8,[32,5],[[24,0,\"selected-icon\"],[24,\"data-scopedcss-b9328eec2b-9cb5cd5b3f\",\"\"]],null,null],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[6]],null],[1,\" \"],[18,7,null],[1,\"\\n \"],[13],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[\"&attrs\",\"@onExpand\",\"@onCollapse\",\"@selected\",\"@options\",\"option\",\"&footer\"],[\"each\",\"-track-array\",\"if\",\"yield\"]]",
1906
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/llm-select.gts",
1907
- "scope": () => [
1908
- PillMenu,
1909
- eq,
1910
- ScrollIntoViewModifier,
1911
- on,
1912
- fn,
1913
- IconComponent$7
1914
- ],
1915
- "isStrictMode": true
1916
- }), this);
1917
- }
1918
- get displayName() {
1919
- return this.args.options.find((o) => o.id === this.args.selected)?.name;
1920
- }
1921
- handleOptionClick(option) {
1922
- this.args.onChange(option);
1923
- }
1924
- static {
1925
- decorateMethodV2(this.prototype, "handleOptionClick", [action]);
1926
- }
1927
- };
1928
- //#endregion
1929
- //#region app/components/matrix/room-message-command.gts
1930
- var RoomMessageCommand = class extends Component {
1931
- static {
1932
- decorateFieldV2(this.prototype, "commandService", [service]);
1933
- }
1934
- #commandService = (initializeDeferredDecorator(this, "commandService"), void 0);
1935
- static {
1936
- decorateFieldV2(this.prototype, "matrixService", [service]);
1937
- }
1938
- #matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
1939
- static {
1940
- decorateFieldV2(this.prototype, "realm", [service]);
1941
- }
1942
- #realm = (initializeDeferredDecorator(this, "realm"), void 0);
1943
- static {
1944
- decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
1945
- }
1946
- #operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
1947
- get previewCommandCode() {
1948
- let { name, arguments: payload } = this.args.messageCommand;
1949
- return JSON.stringify({
1950
- name,
1951
- payload
1952
- }, null, 2);
1953
- }
1954
- get applyButtonState() {
1955
- if (this.failedCommandState) return "failed";
1956
- if (this.didFailCorrectnessCheck) return "applied-with-error";
1957
- return this.args.messageCommand?.status ?? "ready";
1958
- }
1959
- static {
1960
- decorateMethodV2(this.prototype, "applyButtonState", [cached]);
1961
- }
1962
- static {
1963
- decorateFieldV2(this.prototype, "commandResultCard", [use], function() {
1964
- return resource(() => {
1965
- let state = new TrackedObject({ card: void 0 });
1966
- if (this.args.messageCommand.commandResultFileDef) this.args.messageCommand.getCommandResultCard().then((card) => {
1967
- state.card = card;
1968
- });
1969
- return state;
1970
- });
1971
- });
1972
- }
1973
- #commandResultCard = (initializeDeferredDecorator(this, "commandResultCard"), void 0);
1974
- get isDisplayingCode() {
1975
- return this.args.roomResource.isDisplayingCode(this.args.messageCommand.commandRequest);
1976
- }
1977
- toggleViewCode = () => {
1978
- this.args.roomResource.toggleViewCode(this.args.messageCommand.commandRequest);
1979
- };
1980
- scrollBottomIntoView = modifier((element) => {
1981
- let editor = this.args.monacoSDK.editor.getEditors().find((editor) => element.contains(editor.getContainerDomNode()));
1982
- let editorHeight = editor?.getContentHeight() ?? 0;
1983
- if (!editorHeight || editorHeight < 0) return;
1984
- let heightOfOtherChildren = [...element.children].filter((childEl) => childEl !== editor?.getContainerDomNode()).reduce((acc, childEl) => acc + childEl.offsetHeight, 0);
1985
- element.style.height = `${editorHeight + heightOfOtherChildren}px`;
1986
- this.scrollIntoView(element.parentElement);
1987
- });
1988
- scrollIntoView(element) {
1989
- let { top, bottom } = element.getBoundingClientRect();
1990
- if (!(top >= 0 && bottom <= window.innerHeight)) element.scrollIntoView({ block: "end" });
1991
- }
1992
- get headerTitle() {
1993
- if (this.commandResultCard.card) return cardTypeDisplayName(this.commandResultCard.card);
1994
- return "";
1995
- }
1996
- get shouldDisplayResultCard() {
1997
- let commandName = this.args.messageCommand.name ?? "";
1998
- return !!this.commandResultCard.card && commandName !== "checkCorrectness" && !commandName.startsWith("switch-submode");
1999
- }
2000
- get didFailCorrectnessCheck() {
2001
- if (this.args.messageCommand.name !== "checkCorrectness") return false;
2002
- let card = this.commandResultCard.card;
2003
- if (!card) return false;
2004
- let hasErrors = Array.isArray(card.errors) && card.errors.filter(Boolean).length > 0;
2005
- let isMarkedIncorrect = card.correct === false;
2006
- return hasErrors || isMarkedIncorrect;
2007
- }
2008
- get moreOptionsMenuItems() {
2009
- return toMenuItems(this.commandResultCard.card?.[getMenuItems]?.({
2010
- canEdit: false,
2011
- cardCrudFunctions: {},
2012
- menuContext: "ai-assistant",
2013
- menuContextParams: {
2014
- activeRealmURL: this.activeRealmURL,
2015
- canEditActiveRealm: this.canEditActiveRealm
2016
- },
2017
- commandContext: this.commandService.commandContext
2018
- }) ?? []);
2019
- }
2020
- get canEditActiveRealm() {
2021
- let activeRealmURL = this.activeRealmURL;
2022
- return activeRealmURL ? this.realm.canWrite(activeRealmURL) : false;
2023
- }
2024
- get activeRealmURL() {
2025
- return this.operatorModeStateService.realmURL;
2026
- }
2027
- get commandResultCardForRendering() {
2028
- if (!this.commandResultCard.card) throw new Error("Command result card is not available");
2029
- return this.commandResultCard.card;
2030
- }
2031
- get failedCommandState() {
2032
- let commandRequest = this.args.messageCommand.commandRequest;
2033
- if (!commandRequest.id) return;
2034
- return this.matrixService.failedCommandState.get(commandRequest.id);
2035
- }
2036
- static {
2037
- decorateMethodV2(this.prototype, "failedCommandState", [cached]);
2038
- }
2039
- get invalidCommandState() {
2040
- return this.args.messageCommand.status === "invalid" && !!this.args.messageCommand.failureReason;
2041
- }
2042
- get commandDescription() {
2043
- return this.args.messageCommand.description ?? "Preparing tool call...";
2044
- }
2045
- get hasFailedState() {
2046
- return !!(this.failedCommandState || this.didFailCorrectnessCheck);
2047
- }
2048
- static {
2049
- setComponentTemplate(templateFactory({
2050
- "id": "hfGeFCiD",
2051
- "block": "[[[11,0],[16,0,[28,[32,0],[\"room-message-command\"],[[\"is-pending\",\"is-error\",\"is-failed\",\"compact\"],[[30,1],[30,2],[28,[32,1],[[30,0,[\"hasFailedState\"]]],null],[30,3]]]]],[16,\"data-test-command-id\",[30,4,[\"commandRequest\",\"id\"]]],[17,5],[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"],[12],[1,\"\\n\"],[41,[30,6],[[[1,\" \"],[8,[32,2],[[16,0,[28,[32,0],[\"command-code-block\"],[[\"compact\"],[[30,3]]]]],[16,\"data-test-command-card-idle\",[28,[32,3],[[28,[32,4],[[30,4,[\"status\"]],\"applying\"],null]],null]],[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@monacoSDK\",\"@codeData\"],[[30,7],[28,[32,5],null,[[\"code\",\"language\"],[[30,0,[\"previewCommandCode\"]],\"json\"]]]]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,8,[\"commandHeader\"]],[[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@commandDescription\",\"@action\",\"@actionVerb\",\"@code\",\"@isCompact\",\"@commandState\"],[[30,0,[\"commandDescription\"]],[30,9],[30,4,[\"actionVerb\"]],[30,0,[\"previewCommandCode\"]],[30,3],\"preparing\"]],null],[1,\"\\n \"]],[8]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,2],[[16,0,[28,[32,0],[\"command-code-block\"],[[\"compact\"],[[30,3]]]]],[16,\"data-test-command-card-idle\",[28,[32,3],[[28,[32,4],[[30,4,[\"status\"]],\"applying\"],null]],null]],[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"],[4,[30,0,[\"scrollBottomIntoView\"]],null,null]],[[\"@monacoSDK\",\"@codeData\"],[[30,7],[28,[32,5],null,[[\"code\",\"language\"],[[30,0,[\"previewCommandCode\"]],\"json\"]]]]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,10,[\"commandHeader\"]],[[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@commandDescription\",\"@action\",\"@actionVerb\",\"@code\",\"@commandState\",\"@isCompact\",\"@isDisplayingCode\",\"@toggleCode\"],[[30,4,[\"description\"]],[30,9],[30,4,[\"actionVerb\"]],[30,0,[\"previewCommandCode\"]],[30,0,[\"applyButtonState\"]],[30,3],[30,0,[\"isDisplayingCode\"]],[30,0,[\"toggleViewCode\"]]]],null],[1,\"\\n\"],[41,[30,0,[\"isDisplayingCode\"]],[[[1,\" \"],[8,[30,10,[\"editor\"]],[[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],null,null],[1,\"\\n\"]],[]],null],[1,\" \"]],[10]]]]],[1,\"\\n\"],[41,[30,0,[\"failedCommandState\"]],[[[1,\" \"],[8,[32,6],[[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@type\"],[\"error\"]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,11,[\"Messages\"]],[[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@messages\"],[[28,[32,7],[[30,0,[\"failedCommandState\",\"message\"]]],null]]],null],[1,\"\\n \"],[8,[30,11,[\"Action\"]],[[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@action\",\"@actionName\"],[[30,9],\"Retry\"]],null],[1,\"\\n \"]],[11]]]]],[1,\"\\n\"]],[]],[[[41,[30,0,[\"invalidCommandState\"]],[[[1,\" \"],[8,[32,6],[[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@type\"],[\"warning\"]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,12,[\"Messages\"]],[[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@messages\"],[[28,[32,7],[[30,4,[\"failureReason\"]]],null]]],null],[1,\"\\n \"],[8,[30,12,[\"Action\"]],[[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@action\",\"@actionName\"],[[30,9],\"Try Anyway\"]],null],[1,\"\\n \"]],[12]]]]],[1,\"\\n \"]],[]],null]],[]]],[41,[30,0,[\"shouldDisplayResultCard\"]],[[[1,\" \"],[8,[32,8],[[24,0,\"command-result-card-preview\"],[24,\"data-test-command-result-container\",\"\"],[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@displayBoundaries\"],[false]],[[\"default\"],[[[[1,\"\\n \"],[8,[32,9],[[24,0,\"command-result-card-header\"],[24,\"data-test-command-result-header\",\"\"],[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@cardTypeDisplayName\",\"@cardTypeIcon\",\"@moreOptionsMenuItems\"],[[30,0,[\"headerTitle\"]],[28,[32,10],[[30,0,[\"commandResultCardForRendering\"]]],null],[30,0,[\"moreOptionsMenuItems\"]]]],null],[1,\"\\n \"],[8,[32,11],[[24,\"data-test-boxel-command-result\",\"\"],[24,\"data-scopedcss-9b13cc6dc4-b624307393\",\"\"]],[[\"@card\",\"@format\",\"@displayContainer\"],[[30,0,[\"commandResultCardForRendering\"]],\"embedded\",false]],null],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[]],null]],[]]],[13],[1,\"\\n\\n\"]],[\"@isPending\",\"@isError\",\"@isCompact\",\"@messageCommand\",\"&attrs\",\"@isStreaming\",\"@monacoSDK\",\"codeBlock\",\"@runCommand\",\"codeBlock\",\"Alert\",\"Alert\"],[\"if\"]]",
2052
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/matrix/room-message-command.gts",
2053
- "scope": () => [
2054
- cn,
2055
- bool,
2056
- CodeBlockComponent,
2057
- not,
2058
- eq,
2059
- hash,
2060
- Alert,
2061
- array,
2062
- CardContainer,
2063
- CardHeader,
2064
- cardTypeIcon,
2065
- CardRenderer
2066
- ],
2067
- "isStrictMode": true
2068
- }), this);
2069
- }
2070
- };
2071
- //#endregion
2072
- //#region app/components/matrix/room-message.gts
2073
- var STREAMING_TIMEOUT_MS = 180 * 1e3;
2074
- STREAMING_TIMEOUT_MS / 6e4;
2075
- var RoomMessage = class extends Component {
2076
- static {
2077
- decorateFieldV2(this.prototype, "getCardCollection", [consume(GetCardCollectionContextName)]);
2078
- }
2079
- #getCardCollection = (initializeDeferredDecorator(this, "getCardCollection"), void 0);
2080
- static {
2081
- decorateFieldV2(this.prototype, "timeoutCheckTimestamp", [tracked], function() {
2082
- return Date.now();
2083
- });
2084
- }
2085
- #timeoutCheckTimestamp = (initializeDeferredDecorator(this, "timeoutCheckTimestamp"), void 0);
2086
- static {
2087
- decorateFieldV2(this.prototype, "waitStartTimestamp", [tracked]);
2088
- }
2089
- #waitStartTimestamp = (initializeDeferredDecorator(this, "waitStartTimestamp"), void 0);
2090
- constructor(owner, args) {
2091
- super(owner, args);
2092
- this.checkStreamingTimeout.perform();
2093
- }
2094
- get message() {
2095
- return this.args.roomResource.messages[this.args.index];
2096
- }
2097
- get attachedCardCollection() {
2098
- return this.getCardCollection(this, () => this.message.attachedCardIds ?? []);
2099
- }
2100
- static {
2101
- decorateMethodV2(this.prototype, "attachedCardCollection", [cached]);
2102
- }
2103
- checkStreamingTimeout = buildTask(() => ({
2104
- context: this,
2105
- generator: function* () {
2106
- if (!this.isFromAssistant || !this.args.isStreaming) return;
2107
- if (this.message.isStreamingFinished === true) return;
2108
- this.bumpTimeoutCheckTimestamp();
2109
- yield new Promise((resolve) => setTimeout(resolve, 1e3));
2110
- this.checkStreamingTimeout.perform();
2111
- }
2112
- }), null, "checkStreamingTimeout", null);
2113
- waitLonger = () => {
2114
- this.waitStartTimestamp = Date.now();
2115
- this.bumpTimeoutCheckTimestamp();
2116
- if (!this.checkStreamingTimeout.isRunning) this.checkStreamingTimeout.perform();
2117
- };
2118
- bumpTimeoutCheckTimestamp() {
2119
- this.timeoutCheckTimestamp = Date.now();
2120
- }
2121
- get streamingTimeout() {
2122
- if (!this.isFromAssistant || !this.args.isStreaming) return false;
2123
- if (!this.isLastAssistantMessage) return false;
2124
- if (this.message.isStreamingFinished === true) return false;
2125
- let lastActivityTimestamp = Math.max(Number(this.message.updated), this.waitStartTimestamp ?? 0);
2126
- return this.timeoutCheckTimestamp - lastActivityTimestamp > STREAMING_TIMEOUT_MS;
2127
- }
2128
- get isFromAssistant() {
2129
- return this.message.author.userId === aiBotUserId;
2130
- }
2131
- get isLastAssistantMessage() {
2132
- return this.isFromAssistant && this.args.index === this.args.roomResource.indexOfLastNonDebugMessage;
2133
- }
2134
- get userMessageThisMessageIsRespondingTo() {
2135
- if (!this.isFromAssistant) return;
2136
- for (let i = this.args.index - 1; i >= 0; i--) {
2137
- let message = this.args.roomResource.messages[i];
2138
- if (message.author.userId !== aiBotUserId) return message;
2139
- }
2140
- }
2141
- run = buildTask(() => ({
2142
- context: this,
2143
- generator: function* (command) {
2144
- return this.commandService.run.unlinked().perform(command);
2145
- }
2146
- }), null, "run", null);
2147
- static {
2148
- setComponentTemplate(templateFactory({
2149
- "id": "w6yl9Pzy",
2150
- "block": "[[[41,[30,0,[\"attachedCardCollection\",\"isLoaded\"]],[[[1,\" \"],[8,[32,0],[[16,1,[29,[\"message-container-\",[30,1]]]],[16,\"data-test-boxel-message-from\",[30,0,[\"message\",\"author\",\"name\"]]],[16,\"data-test-boxel-message-instance-id\",[30,0,[\"message\",\"instanceId\"]]],[17,2]],[[\"@messageHTML\",\"@messageHTMLParts\",\"@reasoningContent\",\"@monacoSDK\",\"@datetime\",\"@roomId\",\"@eventId\",\"@index\",\"@isLastAssistantMessage\",\"@isMostRecentMessage\",\"@userMessageThisMessageIsRespondingTo\",\"@registerScroller\",\"@unregisterScroller\",\"@isFromAssistant\",\"@profileAvatar\",\"@collectionResource\",\"@files\",\"@attachedCardsAsFiles\",\"@errorMessage\",\"@reloadBillingData\",\"@isDebugMessage\",\"@isStreaming\",\"@retryAction\",\"@waitAction\",\"@isPending\",\"@hideMeta\",\"@isCodePatchCorrectness\",\"@commands\"],[[30,0,[\"message\",\"bodyHTML\"]],[30,0,[\"message\",\"htmlParts\"]],[30,0,[\"message\",\"reasoningContent\"]],[30,3],[30,0,[\"message\",\"created\"]],[30,0,[\"message\",\"roomId\"]],[30,0,[\"message\",\"eventId\"]],[30,1],[30,0,[\"isLastAssistantMessage\"]],[30,4],[30,0,[\"userMessageThisMessageIsRespondingTo\"]],[30,5],[30,6],[30,0,[\"isFromAssistant\"]],[50,[32,1],0,null,[[\"isReady\",\"userId\",\"displayName\"],[true,[30,0,[\"message\",\"author\",\"userId\"]],[30,0,[\"message\",\"author\",\"displayName\"]]]]],[30,0,[\"attachedCardCollection\"]],[30,0,[\"message\",\"attachedFiles\"]],[30,0,[\"message\",\"attachedCardsAsFiles\"]],[30,0,[\"errorMessage\"]],[30,0,[\"message\",\"reloadBillingData\"]],[30,0,[\"message\",\"isDebugMessage\"]],[30,7],[30,8],[52,[30,0,[\"streamingTimeout\"]],[30,0,[\"waitLonger\"]]],[30,9],[30,0,[\"message\",\"isCodePatchCorrectness\"]],[30,0,[\"message\",\"isCodePatchCorrectness\"]],[30,0,[\"message\",\"commands\"]]]],[[\"default\"],[[[[1,\"\\n\"],[42,[28,[31,3],[[28,[31,3],[[30,0,[\"message\",\"commands\"]]],null]],null],null,[[[1,\" \"],[8,[32,2],null,[[\"@messageCommand\",\"@roomResource\",\"@runCommand\",\"@roomId\",\"@isPending\",\"@isCompact\",\"@monacoSDK\",\"@isError\",\"@isStreaming\"],[[30,10],[30,11],[28,[32,3],[[28,[32,4],[[30,0,[\"run\"]]],null],[30,10]],null],[30,12],[30,9],[30,0,[\"message\",\"isCodePatchCorrectness\"]],[30,3],[28,[32,5],[[30,0,[\"errorMessage\"]]],null],[30,7]]],null],[1,\"\\n\"]],[10]],null],[1,\" \"]],[]]]]],[1,\"\\n\"]],[]],null]],[\"@index\",\"&attrs\",\"@monacoSDK\",\"@isMostRecentMessage\",\"@registerScroller\",\"@unregisterScroller\",\"@isStreaming\",\"@retryAction\",\"@isPending\",\"command\",\"@roomResource\",\"@roomId\"],[\"if\",\"component\",\"each\",\"-track-array\"]]",
2151
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/matrix/room-message.gts",
2152
- "scope": () => [
2153
- AiAssistantMessage,
2154
- Avatar,
2155
- RoomMessageCommand,
2156
- fn,
2157
- perform,
2158
- bool
2159
- ],
2160
- "isStrictMode": true
2161
- }), this);
2162
- }
2163
- static {
2164
- decorateFieldV2(this.prototype, "commandService", [service]);
2165
- }
2166
- #commandService = (initializeDeferredDecorator(this, "commandService"), void 0);
2167
- knownErrorMessagePrefixes = [{ "MatrixError: [413] event too large": "Response from the AI assistant was too large to process" }];
2168
- get errorMessage() {
2169
- if (this.message.errorMessage) {
2170
- let humanFriendlyErrorMessage = null;
2171
- for (let errorMessagePrefix of this.knownErrorMessagePrefixes) {
2172
- let key = Object.keys(errorMessagePrefix)[0];
2173
- if (this.message.errorMessage.startsWith(key)) humanFriendlyErrorMessage = errorMessagePrefix[key];
2174
- }
2175
- return humanFriendlyErrorMessage || this.message.errorMessage;
2176
- }
2177
- if (this.streamingTimeout) return `This message has been processing for a long time (more than 3 minutes), possibly due to a delay in response time, or due to a system error.`;
2178
- }
2179
- static {
2180
- decorateMethodV2(this.prototype, "errorMessage", [cached]);
2181
- }
2182
- };
2183
- //#endregion
2184
- //#region app/components/matrix/room.gts
2185
- var import_max = /* @__PURE__ */ __toESM(require_max());
2186
- var LOCAL_SOURCE_URL_PREFIX = "boxel-local://";
2187
- var Room = class extends Component {
2188
- static {
2189
- setComponentTemplate(templateFactory({
2190
- "id": "gTHbemHy",
2191
- "block": "[[[41,[28,[32,0],[[30,0,[\"doMatrixEventFlush\",\"isRunning\"]]],null],[[[1,\" \"],[11,\"section\"],[24,0,\"room\"],[16,\"data-room-settled\",[28,[32,1],[[30,0,[\"doWhenRoomChanges\",\"isIdle\"]],[28,[32,0],[[30,0,[\"matrixService\",\"isLoadingTimeline\"]]],null]],null]],[16,\"data-test-room-settled\",[28,[32,1],[[30,0,[\"doWhenRoomChanges\",\"isIdle\"]],[28,[32,0],[[30,0,[\"matrixService\",\"isLoadingTimeline\"]]],null]],null]],[16,\"data-test-room-name\",[30,1,[\"name\"]]],[16,\"data-test-room\",[30,2]],[16,\"data-room-id\",[30,2]],[17,3],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[12],[1,\"\\n \"],[8,[32,2],[[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@registerConversationScroller\",\"@setScrollPosition\"],[[30,0,[\"registerConversationScroller\"]],[30,0,[\"setScrollPosition\"]]]],[[\"default\"],[[[[1,\"\\n\"],[41,[30,0,[\"matrixService\",\"isLoadingTimeline\"]],[[[1,\" \"],[10,0],[14,0,\"session-preparation-container\"],[14,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[12],[1,\"\\n \"],[8,[32,3],[[24,0,\"loading-indicator\"],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@color\"],[\"var(--boxel-light)\"]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[41,[30,0,[\"aiAssistantPanelService\",\"isPreparingSession\"]],[[[1,\" \"],[10,0],[14,0,\"session-preparation-container\"],[14,\"data-test-session-preparation\",\"\"],[14,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[12],[1,\"\\n \"],[8,[32,3],[[24,0,\"loading-indicator\"],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@color\"],[\"var(--boxel-light)\"]],null],[1,\"\\n \"],[10,1],[14,0,\"session-preparation-message\"],[14,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[12],[1,\"\\n\"],[41,[28,[32,1],[[30,0,[\"aiAssistantPanelService\",\"isSummarizingSession\"]],[30,0,[\"aiAssistantPanelService\",\"isCopyingFileHistory\"]]],null],[[[1,\" Summarizing session and copying files\\n\"]],[]],[[[41,[30,0,[\"aiAssistantPanelService\",\"isSummarizingSession\"]],[[[1,\" Summarizing previous session\\n\"]],[]],[[[41,[30,0,[\"aiAssistantPanelService\",\"isCopyingFileHistory\"]],[[[1,\" Copying file history from previous session\\n\"]],[]],[[[1,\" Preparing session context\\n \"]],[]]]],[]]]],[]]],[1,\" \"],[13],[1,\"\\n \"],[10,1],[14,0,\"session-preparation-message\"],[14,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[12],[1,\"\\n Please keep Assistant open\\n \"],[13],[1,\"\\n \"],[10,1],[14,0,\"session-preparation-small-message\"],[14,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[12],[1,\"\\n Takes 10-20 seconds\\n \"],[13],[1,\"\\n \"],[11,\"button\"],[24,0,\"session-preparation-skip-button\"],[24,\"data-test-session-preparation-skip-button\",\"\"],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[24,4,\"button\"],[4,[32,4],[\"click\",[30,0,[\"skipSessionPreparation\"]]],null],[12],[1,\"\\n Skip\\n \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[42,[28,[31,2],[[28,[31,2],[[30,0,[\"messages\"]]],null]],null],\"eventId\",[[[1,\" \"],[8,[32,5],[[16,\"data-test-message-idx\",[30,5]],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@roomId\",\"@roomResource\",\"@index\",\"@isMostRecentMessage\",\"@registerScroller\",\"@unregisterScroller\",\"@isPending\",\"@monacoSDK\",\"@isStreaming\",\"@retryAction\"],[[30,2],[30,1],[30,5],[28,[30,0,[\"isLastMessage\"]],[[30,5]],null],[30,0,[\"registerMessageScroller\"]],[30,0,[\"unregisterMessageScroller\"]],[28,[30,0,[\"isPendingMessage\"]],[[30,4]],null],[30,6],[28,[30,0,[\"isMessageStreaming\"]],[[30,4]],null],[28,[30,0,[\"maybeRetryAction\"]],[[30,5],[30,4]],null]]],null],[1,\"\\n\"]],[4,5]],[[[1,\" \"],[8,[32,6],[[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@sendPrompt\"],[[30,0,[\"sendMessage\"]]]],null],[1,\"\\n\"]],[]]],[1,\"\\n\"],[41,[30,0,[\"shouldShowUnknownMessageSendError\"]],[[[1,\" \"],[8,[32,7],[[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@type\"],[\"error\"]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,7,[\"Messages\"]],[[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@messages\"],[[28,[32,8],[[30,0,[\"unknownMessageSendError\"]]],null]]],null],[1,\"\\n \"]],[7]]]]],[1,\"\\n\"]],[]],null],[1,\" \"]],[]]]],[]]],[1,\" \"]],[]]]]],[1,\"\\n\\n \"],[10,\"footer\"],[14,0,\"room-actions\"],[14,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[12],[1,\"\\n \"],[8,[32,9],[[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@autoAttachedCardIds\",\"@cardIdsToAttach\",\"@chooseCard\",\"@removeCard\",\"@chooseFile\",\"@chooseLocalFile\",\"@removeFile\",\"@autoAttachedFiles\",\"@filesToAttach\",\"@fileUploadStates\",\"@retryFileUpload\",\"@inputModalities\",\"@autoAttachedCardTooltipMessage\"],[[30,0,[\"autoAttachedCardIds\"]],[30,0,[\"cardIdsToAttach\"]],[30,0,[\"chooseCard\"]],[30,0,[\"removeCard\"]],[28,[32,10],[[30,0,[\"chooseFileTask\"]]],null],[28,[32,10],[[30,0,[\"chooseLocalFileTask\"]]],null],[30,0,[\"removeFile\"]],[30,0,[\"autoAttachedFiles\"]],[30,0,[\"filesToAttach\"]],[30,0,[\"fileUploadStates\"]],[30,0,[\"retryFileUpload\"]],[30,1,[\"activeInputModalities\"]],[52,[28,[32,11],[[30,0,[\"operatorModeStateService\",\"state\",\"submode\"]],[32,12,[\"Code\"]]],null],\"Current card is shared automatically\",\"Topmost card is shared automatically\"]]],[[\"default\"],[[[[1,\"\\n\"],[41,[30,0,[\"displayActionBar\"]],[[[1,\" \"],[8,[32,13],[[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@acceptAll\",\"@cancel\",\"@acceptingAll\",\"@acceptingAllLabel\",\"@generatingResults\",\"@stop\",\"@stopping\",\"@showUnreadIndicator\",\"@unreadMessageText\",\"@scrollToFirstUnread\"],[[28,[32,10],[[30,0,[\"executeAllReadyActionsTask\"]]],null],[30,0,[\"cancelActionBar\"]],[30,0,[\"isAcceptingAll\"]],[30,0,[\"acceptingAllLabel\"]],[30,0,[\"generatingResults\"]],[28,[32,10],[[30,0,[\"stopGeneratingTask\"]]],null],[30,0,[\"stopGeneratingTask\",\"isRunning\"]],[30,0,[\"showUnreadIndicator\"]],[30,0,[\"unreadMessageText\"]],[30,0,[\"scrollToFirstUnread\"]]]],null],[1,\"\\n\"]],[]],null],[1,\" \"],[11,0],[24,0,\"chat-input-area\"],[24,\"data-test-chat-input-area\",\"\"],[16,\"data-drop-zone-active\",[30,0,[\"isDropZoneActive\"]]],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[4,[32,4],[\"dragover\",[30,0,[\"handleChatInputDragOver\"]]],null],[4,[32,4],[\"dragenter\",[30,0,[\"handleChatInputDragEnter\"]]],null],[4,[32,4],[\"dragleave\",[30,0,[\"handleChatInputDragLeave\"]]],null],[4,[32,4],[\"drop\",[30,0,[\"handleChatInputDrop\"]]],null],[12],[1,\"\\n\"],[41,[30,0,[\"isDropZoneActive\"]],[[[1,\" \"],[10,0],[14,0,\"chat-input-drop-hint\"],[14,\"data-test-chat-input-drop-hint\",\"\"],[14,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[12],[1,\"\\n Drop file to attach\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"],[8,[32,14],[[16,\"data-test-message-field\",[30,2]],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@attachButton\",\"@value\",\"@onInput\",\"@onSend\",\"@onPaste\",\"@canSend\"],[[30,9],[30,0,[\"messageToSend\"]],[30,0,[\"setMessage\"]],[30,0,[\"sendMessage\"]],[30,0,[\"handleChatInputPaste\"]],[30,0,[\"canSend\"]]]],null],[1,\"\\n\"],[41,[30,0,[\"aiAssistantPanelService\",\"isFocusPillVisible\"]],[[[1,\" \"],[8,[32,15],[[24,0,\"pill-row\"],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@label\",\"@metaPills\"],[[30,0,[\"aiAssistantPanelService\",\"focusPillLabel\"]],[30,0,[\"aiAssistantPanelService\",\"focusPillMetaPills\"]]]],null],[1,\"\\n\"]],[]],null],[41,[30,0,[\"displayAttachedItems\"]],[[[1,\" \"],[8,[30,8],[[24,0,\"pill-row\"],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],null,null],[1,\"\\n\"]],[]],null],[1,\"\\n \"],[10,0],[14,0,\"chat-input-area__bottom-actions\"],[14,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[12],[1,\"\\n\"],[41,[30,0,[\"displaySkillMenu\"]],[[[1,\" \"],[8,[32,16],[[24,0,\"skill-menu\"],[24,\"data-test-skill-menu\",\"\"],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@skills\",\"@onChooseCard\",\"@onUpdateSkillIsActive\",\"@onExpand\",\"@onCollapse\"],[[30,0,[\"sortedSkills\"]],[28,[32,10],[[30,0,[\"attachSkillTask\"]]],null],[28,[32,10],[[30,0,[\"updateSkillIsActiveTask\"]]],null],[28,[32,17],[[30,0,[\"setSelectedBottomAction\"]],\"skill-menu\"],null],[28,[32,17],[[30,0,[\"setSelectedBottomAction\"]],[27]],null]]],null],[1,\"\\n\"]],[]],null],[41,[30,0,[\"displayLLMSelect\"]],[[[1,\" \"],[8,[32,18],[[24,0,\"llm-select\"],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@selected\",\"@onChange\",\"@options\",\"@disabled\",\"@onExpand\",\"@onCollapse\"],[[30,1,[\"activeLLM\"]],[28,[32,10],[[30,1,[\"activateLLMTask\"]]],null],[30,0,[\"llmsForSelectMenu\"]],[30,1,[\"isActivatingLLM\"]],[28,[32,17],[[30,0,[\"setSelectedBottomAction\"]],\"llm-select\"],null],[28,[32,17],[[30,0,[\"setSelectedBottomAction\"]],[27]],null]]],[[\"footer\"],[[[[1,\"\\n \"],[10,\"li\"],[14,0,\"llm-select-footer\"],[14,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[12],[1,\"\\n\"],[41,[30,0,[\"systemCardId\"]],[[[1,\" \"],[8,[32,19],[[24,0,\"llm-select-footer-action\"],[24,\"data-test-go-to-system-card\",\"\"],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[4,[32,4],[\"click\",[30,0,[\"goToSystemCard\"]]],null]],[[\"@kind\",\"@size\"],[\"text-only\",\"extra-small\"]],[[\"default\"],[[[[1,\"\\n Go to current system card\\n \"]],[]]]]],[1,\"\\n\"]],[]],null],[41,[51,[30,0,[\"isDefaultSystemCard\"]]],[[[1,\" \"],[8,[32,19],[[24,0,\"llm-select-footer-action\"],[24,\"data-test-restore-default-system-card\",\"\"],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"],[4,[32,4],[\"click\",[28,[32,10],[[30,0,[\"restoreDefaultSystemCardTask\"]]],null]],null]],[[\"@kind\",\"@size\"],[\"text-only\",\"extra-small\"]],[[\"default\"],[[[[1,\"\\n Restore default system card\\n \"]],[]]]]],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[]],null],[41,[30,0,[\"displayLLMModeSelect\"]],[[[1,\" \"],[8,[32,20],[[24,0,\"llm-mode-toggle\"],[24,\"data-scopedcss-44299e782d-3abb36e5d1\",\"\"]],[[\"@selected\",\"@onChange\",\"@disabled\"],[[30,1,[\"activeLLMMode\"]],[28,[32,10],[[30,1,[\"activateLLMModeTask\"]]],null],[30,1,[\"isActivatingLLMMode\"]]]],null],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n \"]],[8,9]]]]],[1,\"\\n \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\"\\n\"]],[\"@roomResource\",\"@roomId\",\"&attrs\",\"message\",\"i\",\"@monacoSDK\",\"Alert\",\"AttachedItems\",\"AttachButton\"],[\"if\",\"each\",\"-track-array\",\"unless\"]]",
2192
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/matrix/room.gts",
2193
- "scope": () => [
2194
- not,
2195
- and,
2196
- AiAssistantConversation,
2197
- LoadingIndicator,
2198
- on,
2199
- RoomMessage,
2200
- NewSession,
2201
- Alert,
2202
- array,
2203
- AiAssistantAttachmentPicker,
2204
- perform,
2205
- eq,
2206
- Submodes,
2207
- AiAssistantActionBar,
2208
- AiAssistantChatInput,
2209
- FocusPill,
2210
- AiAssistantSkillMenu,
2211
- fn,
2212
- LLMSelect,
2213
- ButtonComponent,
2214
- LLMModeToggle
2215
- ],
2216
- "isStrictMode": true
2217
- }), this);
2218
- }
2219
- static {
2220
- decorateFieldV2(this.prototype, "getCard", [consume(GetCardContextName)]);
2221
- }
2222
- #getCard = (initializeDeferredDecorator(this, "getCard"), void 0);
2223
- static {
2224
- decorateFieldV2(this.prototype, "selectedBottomAction", [tracked]);
2225
- }
2226
- #selectedBottomAction = (initializeDeferredDecorator(this, "selectedBottomAction"), void 0);
2227
- static {
2228
- decorateFieldV2(this.prototype, "lastCanceledActionMessageId", [tracked]);
2229
- }
2230
- #lastCanceledActionMessageId = (initializeDeferredDecorator(this, "lastCanceledActionMessageId"), void 0);
2231
- static {
2232
- decorateFieldV2(this.prototype, "acceptingAllLabel", [tracked]);
2233
- }
2234
- #acceptingAllLabel = (initializeDeferredDecorator(this, "acceptingAllLabel"), void 0);
2235
- static {
2236
- decorateFieldV2(this.prototype, "isDropZoneActive", [tracked], function() {
2237
- return false;
2238
- });
2239
- }
2240
- #isDropZoneActive = (initializeDeferredDecorator(this, "isDropZoneActive"), void 0);
2241
- dropZoneDragDepth = 0;
2242
- static {
2243
- decorateFieldV2(this.prototype, "store", [service]);
2244
- }
2245
- #store = (initializeDeferredDecorator(this, "store"), void 0);
2246
- static {
2247
- decorateFieldV2(this.prototype, "cardService", [service]);
2248
- }
2249
- #cardService = (initializeDeferredDecorator(this, "cardService"), void 0);
2250
- static {
2251
- decorateFieldV2(this.prototype, "commandService", [service]);
2252
- }
2253
- #commandService = (initializeDeferredDecorator(this, "commandService"), void 0);
2254
- static {
2255
- decorateFieldV2(this.prototype, "fileUpload", [service("file-upload")]);
2256
- }
2257
- #fileUpload = (initializeDeferredDecorator(this, "fileUpload"), void 0);
2258
- static {
2259
- decorateFieldV2(this.prototype, "loaderService", [service("loader-service")]);
2260
- }
2261
- #loaderService = (initializeDeferredDecorator(this, "loaderService"), void 0);
2262
- static {
2263
- decorateFieldV2(this.prototype, "matrixService", [service]);
2264
- }
2265
- #matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
2266
- static {
2267
- decorateFieldV2(this.prototype, "network", [service]);
2268
- }
2269
- #network = (initializeDeferredDecorator(this, "network"), void 0);
2270
- static {
2271
- decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
2272
- }
2273
- #operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
2274
- static {
2275
- decorateFieldV2(this.prototype, "playgroundPanelService", [service]);
2276
- }
2277
- #playgroundPanelService = (initializeDeferredDecorator(this, "playgroundPanelService"), void 0);
2278
- static {
2279
- decorateFieldV2(this.prototype, "specPanelService", [service]);
2280
- }
2281
- #specPanelService = (initializeDeferredDecorator(this, "specPanelService"), void 0);
2282
- static {
2283
- decorateFieldV2(this.prototype, "aiAssistantPanelService", [service]);
2284
- }
2285
- #aiAssistantPanelService = (initializeDeferredDecorator(this, "aiAssistantPanelService"), void 0);
2286
- autoAttachmentResource = getAutoAttachment(this, {
2287
- submode: () => this.operatorModeStateService.state.submode,
2288
- moduleInspectorPanel: () => this.operatorModeStateService.moduleInspectorPanel,
2289
- autoAttachedFileUrls: () => this.autoAttachedFileUrls,
2290
- playgroundPanelCardId: () => this.playgroundPanelCardId,
2291
- activeSpecId: () => this.specPanelService.specSelection,
2292
- topMostStackItems: () => this.topMostStackItems,
2293
- attachedCardIds: () => this.cardIdsToAttach,
2294
- removedCardIds: () => this.removedAttachedCardIds
2295
- });
2296
- removedAttachedCardIds = new TrackedSet();
2297
- removedAttachedFileUrls = [];
2298
- lastAutoAttachedFileUrlsKey;
2299
- lastKnownRoom;
2300
- getConversationScrollability;
2301
- scrollConversationToBottom;
2302
- roomScrollState = /* @__PURE__ */ new WeakMap();
2303
- static {
2304
- decorateFieldV2(this.prototype, "unknownMessageSendError", [tracked], function() {});
2305
- }
2306
- #unknownMessageSendError = (initializeDeferredDecorator(this, "unknownMessageSendError"), void 0);
2307
- _fileUploadStates = new TrackedMap();
2308
- get fileUploadStates() {
2309
- return this._fileUploadStates;
2310
- }
2311
- get shouldShowUnknownMessageSendError() {
2312
- if (!this.unknownMessageSendError) return false;
2313
- return this.messages[this.messages.length - 1]?.errorMessage === void 0;
2314
- }
2315
- constructor(owner, args) {
2316
- super(owner, args);
2317
- this.doMatrixEventFlush.perform();
2318
- registerDestructor(this, () => {
2319
- this.cleanupScrollState();
2320
- this.getConversationScrollability = void 0;
2321
- this.scrollConversationToBottom = void 0;
2322
- });
2323
- }
2324
- get existingScrollState() {
2325
- let room = this.roomForCleanup;
2326
- return room ? this.roomScrollState.get(room) : void 0;
2327
- }
2328
- ensureScrollState() {
2329
- let room = this.room;
2330
- if (!room) return;
2331
- if (this.lastKnownRoom && this.lastKnownRoom !== room) this.cleanupScrollState(this.lastKnownRoom);
2332
- this.lastKnownRoom = room;
2333
- let state = this.roomScrollState.get(room);
2334
- if (!state) {
2335
- let nextState;
2336
- nextState = new TrackedObject({
2337
- isScrolledToBottom: false,
2338
- userHasScrolled: false,
2339
- isConversationScrollable: false,
2340
- messageElements: /* @__PURE__ */ new Map(),
2341
- messageScrollers: /* @__PURE__ */ new Map(),
2342
- messageVisibilityObserver: new IntersectionObserver((entries) => {
2343
- entries.forEach((entry) => {
2344
- let index = nextState.messageElements.get(entry.target);
2345
- if (index != null) {
2346
- if ((!nextState.isConversationScrollable || entry.isIntersecting) && index > this.lastReadMessageIndex) this.sendReadReceipt(this.messages[index]);
2347
- }
2348
- });
2349
- })
2350
- });
2351
- state = nextState;
2352
- this.roomScrollState.set(room, state);
2353
- }
2354
- return state;
2355
- }
2356
- cleanupScrollState(room = this.roomForCleanup) {
2357
- if (!room) return;
2358
- let scrollState = this.roomScrollState.get(room);
2359
- if (!scrollState) return;
2360
- for (let element of scrollState.messageElements.keys()) scrollState.messageVisibilityObserver.unobserve(element);
2361
- scrollState.messageVisibilityObserver.disconnect();
2362
- scrollState.messageElements.clear();
2363
- scrollState.messageScrollers.clear();
2364
- scrollState.isScrolledToBottom = false;
2365
- scrollState.userHasScrolled = false;
2366
- scrollState.isConversationScrollable = false;
2367
- this.roomScrollState.delete(room);
2368
- }
2369
- static {
2370
- decorateFieldV2(this.prototype, "autoAttachedFileResource", [use], function() {
2371
- return resource(() => {
2372
- let state = new TrackedObject({
2373
- value: [],
2374
- remove: (sourceUrl) => {
2375
- if (!sourceUrl) {
2376
- state.value = [];
2377
- return;
2378
- }
2379
- state.value = state.value.filter((file) => file.sourceUrl !== sourceUrl);
2380
- }
2381
- });
2382
- let autoAttachedFileUrls = this.autoAttachedFileUrls;
2383
- let manuallyAttachedFiles = this.filesToAttach;
2384
- let autoAttachedFileUrlsKey = autoAttachedFileUrls.join("\n");
2385
- let removedFileUrls;
2386
- if (autoAttachedFileUrlsKey !== this.lastAutoAttachedFileUrlsKey) {
2387
- this.removedAttachedFileUrls.splice(0);
2388
- removedFileUrls = this.removedAttachedFileUrls;
2389
- this.lastAutoAttachedFileUrlsKey = autoAttachedFileUrlsKey;
2390
- } else removedFileUrls = this.removedAttachedFileUrls;
2391
- state.value = autoAttachedFileUrls.filter((url) => {
2392
- if (!url) return false;
2393
- let isManuallyAttached = manuallyAttachedFiles.some((file) => file.sourceUrl === url);
2394
- let isRemoved = removedFileUrls.includes(url);
2395
- return !isManuallyAttached && !isRemoved;
2396
- }).map((url) => {
2397
- let name = url.split("/").pop();
2398
- return this.matrixService.fileAPI.createFileDef({
2399
- sourceUrl: url,
2400
- name,
2401
- contentType: url.endsWith(".json") ? SupportedMimeType.CardJson : name ? inferContentType(name) : void 0
2402
- });
2403
- });
2404
- return state;
2405
- });
2406
- });
2407
- }
2408
- #autoAttachedFileResource = (initializeDeferredDecorator(this, "autoAttachedFileResource"), void 0);
2409
- get autoAttachedFileUrls() {
2410
- let codePathUrl = this.operatorModeStateService.state.codePath?.href;
2411
- if (!codePathUrl) return [];
2412
- let urls = [codePathUrl];
2413
- if (codePathUrl.endsWith(".json")) {
2414
- let openFile = this.operatorModeStateService.openFile?.current;
2415
- if (openFile && isReady(openFile)) try {
2416
- let adoptsFrom = JSON.parse(openFile.content)?.data?.meta?.adoptsFrom;
2417
- if (adoptsFrom?.module) {
2418
- let moduleURLWithExtension = new URL(adoptsFrom.module.endsWith(".gts") ? adoptsFrom.module : `${adoptsFrom.module}.gts`, openFile.url);
2419
- if (!urls.includes(moduleURLWithExtension.href)) urls.push(moduleURLWithExtension.href);
2420
- }
2421
- } catch (_error) {}
2422
- }
2423
- return urls;
2424
- }
2425
- get autoAttachedFiles() {
2426
- return this.operatorModeStateService.state.submode === Submodes.Code ? this.autoAttachedFileResource.value : [];
2427
- }
2428
- get removeAutoAttachedFile() {
2429
- return (sourceUrl) => {
2430
- this.autoAttachedFileResource.remove(sourceUrl);
2431
- };
2432
- }
2433
- markAttachedFileRemoved(sourceUrl) {
2434
- if (!sourceUrl) return;
2435
- if (!this.removedAttachedFileUrls.includes(sourceUrl)) this.removedAttachedFileUrls.push(sourceUrl);
2436
- }
2437
- get filesToAttach() {
2438
- return this.matrixService.getFilesToSend(this.args.roomId) ?? [];
2439
- }
2440
- static {
2441
- decorateFieldV2(this.prototype, "playgroundPanelCardIdResource", [use], function() {
2442
- return resource(() => {
2443
- let state = new TrackedObject({
2444
- value: void 0,
2445
- remove: () => {
2446
- state.value = void 0;
2447
- }
2448
- });
2449
- (async () => {
2450
- if (!this.args.selectedCardRef) return;
2451
- let moduleId = internalKeyFor(this.args.selectedCardRef, void 0, this.network.virtualNetwork);
2452
- state.value = this.playgroundPanelService.getSelection(moduleId)?.cardId;
2453
- })();
2454
- return state;
2455
- });
2456
- });
2457
- }
2458
- #playgroundPanelCardIdResource = (initializeDeferredDecorator(this, "playgroundPanelCardIdResource"), void 0);
2459
- get playgroundPanelCardId() {
2460
- return this.playgroundPanelCardIdResource.value;
2461
- }
2462
- get removePlaygroundPanelCard() {
2463
- return this.playgroundPanelCardIdResource.remove;
2464
- }
2465
- get isScrolledToBottom() {
2466
- return this.existingScrollState?.isScrolledToBottom ?? false;
2467
- }
2468
- get userHasScrolled() {
2469
- return this.existingScrollState?.userHasScrolled ?? false;
2470
- }
2471
- get isConversationScrollable() {
2472
- return this.existingScrollState?.isConversationScrollable ?? false;
2473
- }
2474
- registerMessageScroller = ({ index, element, scrollTo }) => {
2475
- let scrollState = this.ensureScrollState();
2476
- if (!scrollState) return;
2477
- for (let [registeredElement, registeredIndex] of scrollState.messageElements) if (registeredIndex === index && registeredElement !== element) {
2478
- scrollState.messageElements.delete(registeredElement);
2479
- scrollState.messageVisibilityObserver.unobserve(registeredElement);
2480
- break;
2481
- }
2482
- scrollState.messageElements.set(element, index);
2483
- scrollState.messageScrollers.set(index, scrollTo);
2484
- scrollState.messageVisibilityObserver.observe(element);
2485
- scrollState.isConversationScrollable = Boolean(this.getConversationScrollability?.());
2486
- if (!this.isConversationScrollable || !this.isAllowedToAutoScroll) return;
2487
- if (!this.hasUnreadMessages && index === this.messages.length - 1 && !this.isScrolledToBottom) scrollTo();
2488
- else if (this.hasUnreadMessages && index === this.lastReadMessageIndex + 1) scrollTo();
2489
- else if (this.isScrolledToBottom) this.scrollConversationToBottom?.();
2490
- };
2491
- unregisterMessageScroller = ({ index, element }) => {
2492
- let scrollState = this.existingScrollState;
2493
- if (!scrollState) return;
2494
- let elementOwnsIndex = scrollState.messageElements.get(element) === index;
2495
- scrollState.messageElements.delete(element);
2496
- if (elementOwnsIndex) scrollState.messageScrollers.delete(index);
2497
- scrollState.messageVisibilityObserver.unobserve(element);
2498
- };
2499
- registerConversationScroller = (isConversationScrollable, scrollToBottom) => {
2500
- this.getConversationScrollability = isConversationScrollable;
2501
- this.scrollConversationToBottom = scrollToBottom;
2502
- };
2503
- setScrollPosition = ({ isBottom }) => {
2504
- let scrollState = this.ensureScrollState();
2505
- if (!scrollState) return;
2506
- scrollState.isScrolledToBottom = isBottom;
2507
- if (!isBottom) scrollState.userHasScrolled = true;
2508
- };
2509
- scrollToFirstUnread = () => {
2510
- if (!this.hasUnreadMessages) return;
2511
- let firstUnreadIndex = this.lastReadMessageIndex + 1;
2512
- let scrollTo = this.existingScrollState?.messageScrollers.get(firstUnreadIndex);
2513
- if (!scrollTo) console.warn(`No scroller for message index ${firstUnreadIndex}`);
2514
- else scrollTo({ behavior: "smooth" });
2515
- };
2516
- get isAllowedToAutoScroll() {
2517
- return !this.userHasScrolled || this.isScrolledToBottom;
2518
- }
2519
- get lastReadMessageIndex() {
2520
- let readReceiptIndicies = [];
2521
- for (let receipt of this.matrixService.currentUserEventReadReceipts.keys()) {
2522
- let maybeIndex = this.messages.findIndex((m) => m.eventId === receipt);
2523
- if (maybeIndex != null) readReceiptIndicies.push(maybeIndex);
2524
- }
2525
- return (0, import_max.default)(readReceiptIndicies) ?? -1;
2526
- }
2527
- static {
2528
- decorateMethodV2(this.prototype, "lastReadMessageIndex", [cached]);
2529
- }
2530
- get numberOfUnreadMessages() {
2531
- let unreadMessagesCount = 0;
2532
- let firstUnreadIndex = this.lastReadMessageIndex + 1;
2533
- for (let i = firstUnreadIndex; i < this.messages.length; i++) {
2534
- if (this.matrixService.profile.userId === this.messages[i].author.userId) continue;
2535
- unreadMessagesCount++;
2536
- }
2537
- return unreadMessagesCount;
2538
- }
2539
- static {
2540
- decorateMethodV2(this.prototype, "numberOfUnreadMessages", [cached]);
2541
- }
2542
- get hasUnreadMessages() {
2543
- return this.numberOfUnreadMessages > 0;
2544
- }
2545
- get showUnreadIndicator() {
2546
- return this.isConversationScrollable && this.hasUnreadMessages && !this.isScrolledToBottom;
2547
- }
2548
- get isAcceptingAll() {
2549
- return this.executeAllReadyActionsTask.isRunning || this.commandService.isPerformingAcceptAllForRoom(this.args.roomId);
2550
- }
2551
- get unreadMessageText() {
2552
- return `${this.numberOfUnreadMessages} New ${(0, import_pluralize.default)("Message", this.numberOfUnreadMessages)}`;
2553
- }
2554
- sendReadReceipt(message) {
2555
- if (this.matrixService.profile.userId === message.author.userId) {
2556
- if (isTesting()) console.log(`[read-receipt-trace] skip self event=${message.eventId} room=${this.args.roomId}`);
2557
- return;
2558
- }
2559
- if (this.matrixService.currentUserEventReadReceipts.has(message.eventId)) {
2560
- if (isTesting()) console.log(`[read-receipt-trace] skip already-acked event=${message.eventId} room=${this.args.roomId}`);
2561
- return;
2562
- }
2563
- let matrixEvent = {
2564
- getId: () => message.eventId,
2565
- getRoomId: () => this.args.roomId,
2566
- getTs: () => message.created.getTime()
2567
- };
2568
- if (isTesting()) console.log(`[read-receipt-trace] schedule event=${message.eventId} room=${this.args.roomId}`);
2569
- schedule("afterRender", () => {
2570
- if (isTesting()) console.log(`[read-receipt-trace] dispatch event=${message.eventId} room=${this.args.roomId}`);
2571
- this.matrixService.sendReadReceipt(matrixEvent);
2572
- });
2573
- }
2574
- maybeRetryAction = (messageIndex, message) => {
2575
- if (this.isLastMessage(messageIndex) && message.isRetryable) return this.resendLastMessage;
2576
- };
2577
- isMessageStreaming = (message) => {
2578
- return !message.isStreamingFinished;
2579
- };
2580
- doMatrixEventFlush = buildTask(() => ({
2581
- context: this,
2582
- generator: function* () {
2583
- yield this.matrixService.flushMembership;
2584
- yield this.matrixService.flushTimeline;
2585
- yield this.args.roomResource.processing;
2586
- }
2587
- }), null, "doMatrixEventFlush", "restartable");
2588
- get messages() {
2589
- return this.args.roomResource.messages;
2590
- }
2591
- get skills() {
2592
- return this.args.roomResource.skills;
2593
- }
2594
- get llmsForSelectMenu() {
2595
- let systemCard = this.matrixService.systemCard;
2596
- if (systemCard?.modelConfigurations) {
2597
- let options = [];
2598
- let configModelIds = /* @__PURE__ */ new Set();
2599
- for (let modelConfig of systemCard.modelConfigurations) if (modelConfig.modelId && modelConfig.id) {
2600
- options.push({
2601
- id: modelConfig.id,
2602
- modelId: modelConfig.modelId,
2603
- name: modelConfig.cardTitle || modelConfig.modelId
2604
- });
2605
- configModelIds.add(modelConfig.modelId);
2606
- }
2607
- for (let usedLLM of this.args.roomResource.usedLLMs) if (usedLLM && !configModelIds.has(usedLLM)) options.push({
2608
- id: usedLLM,
2609
- modelId: usedLLM,
2610
- name: usedLLM
2611
- });
2612
- return options;
2613
- }
2614
- let fallbackById = new Map(DEFAULT_FALLBACK_MODELS.map((m) => [m.modelId, m]));
2615
- let allIds = new Set(fallbackById.keys());
2616
- for (let usedLLM of this.args.roomResource.usedLLMs) if (usedLLM) allIds.add(usedLLM);
2617
- return [...allIds].sort().map((id) => ({
2618
- id,
2619
- modelId: id,
2620
- name: fallbackById.get(id)?.displayName ?? id
2621
- }));
2622
- }
2623
- get systemCardId() {
2624
- return this.matrixService.systemCard?.id;
2625
- }
2626
- get isDefaultSystemCard() {
2627
- let systemCardId = this.systemCardId;
2628
- let defaultSystemCardId = config.defaultSystemCardId;
2629
- if (!defaultSystemCardId) return true;
2630
- return !systemCardId || systemCardId === defaultSystemCardId;
2631
- }
2632
- goToSystemCard() {
2633
- let systemCardId = this.systemCardId;
2634
- if (systemCardId) {
2635
- let stackIndex = Math.min(this.operatorModeStateService.numberOfStacks(), 1);
2636
- let stackItem = this.operatorModeStateService.createStackItem(systemCardId, stackIndex, "isolated");
2637
- this.operatorModeStateService.addItemToStack(stackItem);
2638
- }
2639
- }
2640
- static {
2641
- decorateMethodV2(this.prototype, "goToSystemCard", [action]);
2642
- }
2643
- restoreDefaultSystemCardTask = buildTask(() => ({
2644
- context: this,
2645
- generator: function* () {
2646
- yield this.matrixService.setUserSystemCard(void 0);
2647
- }
2648
- }), null, "restoreDefaultSystemCardTask", null);
2649
- get sortedSkills() {
2650
- return [...this.skills].sort((a, b) => {
2651
- let aTitle = a.cardId || a.fileDef.sourceUrl;
2652
- let bTitle = b.cardId || b.fileDef.sourceUrl;
2653
- return aTitle?.localeCompare(bTitle ?? "") ?? 0;
2654
- });
2655
- }
2656
- get room() {
2657
- return this.args.roomResource?.matrixRoom;
2658
- }
2659
- get roomForCleanup() {
2660
- return this.room ?? this.lastKnownRoom;
2661
- }
2662
- doWhenRoomChanges = buildTask(() => ({
2663
- context: this,
2664
- generator: function* () {
2665
- yield all([this.cardService.cardsSettled(), timeout(500)]);
2666
- }
2667
- }), null, "doWhenRoomChanges", "restartable");
2668
- get messageToSend() {
2669
- return this.matrixService.getMessageToSend(this.args.roomId) ?? "";
2670
- }
2671
- get cardIdsToAttach() {
2672
- return this.matrixService.getCardsToSend(this.args.roomId);
2673
- }
2674
- resendLastMessage() {
2675
- if (!this.room) throw new Error("Bug: should not be able to resend a message without a room.");
2676
- let myMessages = this.messages.filter((message) => message.author.userId === this.matrixService.userId);
2677
- if (myMessages.length === 0) throw new Error("Bug: should not be able to resend a message that does not exist.");
2678
- let myLastMessage = myMessages[myMessages.length - 1];
2679
- this.doSendMessage.perform(myLastMessage.body, myLastMessage.attachedCardIds || [], myLastMessage.attachedFiles, myLastMessage.clientGeneratedId, true);
2680
- }
2681
- static {
2682
- decorateMethodV2(this.prototype, "resendLastMessage", [action]);
2683
- }
2684
- setMessage(message) {
2685
- this.matrixService.setMessageToSend(this.args.roomId, message);
2686
- }
2687
- static {
2688
- decorateMethodV2(this.prototype, "setMessage", [action]);
2689
- }
2690
- sendMessage(prompt) {
2691
- let cards = [];
2692
- if (this.cardIdsToAttach) cards.push(...this.cardIdsToAttach);
2693
- if (this.autoAttachedCardIds.size > 0) this.autoAttachedCardIds.forEach((card) => {
2694
- cards.push(card);
2695
- });
2696
- let files = [];
2697
- if (this.autoAttachedFiles.length > 0) files.push(...this.autoAttachedFiles);
2698
- files.push(...this.filesToAttach);
2699
- this.doSendMessage.perform(prompt ?? this.messageToSend, cards.length ? cards : void 0, files.length ? files : void 0);
2700
- }
2701
- static {
2702
- decorateMethodV2(this.prototype, "sendMessage", [action]);
2703
- }
2704
- chooseCard(cardId) {
2705
- if (this.autoAttachedCardIds.has(cardId)) this.removedAttachedCardIds.add(cardId);
2706
- let cardIds = this.cardIdsToAttach ?? [];
2707
- if (!cardIds.includes(cardId)) this.matrixService.setCardsToSend(this.args.roomId, [...cardIds, cardId]);
2708
- }
2709
- static {
2710
- decorateMethodV2(this.prototype, "chooseCard", [action]);
2711
- }
2712
- removeCard(id) {
2713
- if (this.playgroundPanelCardId === id) {
2714
- this.removePlaygroundPanelCard();
2715
- return;
2716
- }
2717
- if (this.autoAttachedCardIds.has(id)) {
2718
- this.removedAttachedCardIds.add(id);
2719
- return;
2720
- }
2721
- let cardIds = this.cardIdsToAttach ?? [];
2722
- if (!cardIds.length) return;
2723
- let next = cardIds.filter((url) => url !== id);
2724
- if (next.length === cardIds.length) return;
2725
- this.matrixService.setCardsToSend(this.args.roomId, next.length ? next : void 0);
2726
- }
2727
- static {
2728
- decorateMethodV2(this.prototype, "removeCard", [action]);
2729
- }
2730
- chooseFileTask = buildTask(() => ({
2731
- context: this,
2732
- generator: function* (file) {
2733
- if (this.isAutoAttachedFile(file)) this.removeAutoAttachedFile(file.sourceUrl ?? void 0);
2734
- let files = this.filesToAttach;
2735
- if (!files?.find((f) => f.sourceUrl === file.sourceUrl)) {
2736
- yield this.matrixService.prefetchFileContent(file);
2737
- this.matrixService.setFilesToSend(this.args.roomId, [...files, file]);
2738
- this.startFileUploadTask.perform(file);
2739
- }
2740
- }
2741
- }), null, "chooseFileTask", "enqueue");
2742
- chooseLocalFileTask = buildTask(() => ({
2743
- context: this,
2744
- generator: function* () {
2745
- let localFile = yield this.fileUpload.pickLocalFile();
2746
- if (!localFile) return;
2747
- yield this.attachLocalFile(localFile);
2748
- }
2749
- }), null, "chooseLocalFileTask", null);
2750
- handleChatInputDragOver(event) {
2751
- let dragEvent = event;
2752
- if (!this.isFileDrag(dragEvent.dataTransfer)) return;
2753
- dragEvent.preventDefault();
2754
- dragEvent.stopPropagation();
2755
- this.isDropZoneActive = true;
2756
- if (dragEvent.dataTransfer) dragEvent.dataTransfer.dropEffect = "copy";
2757
- }
2758
- static {
2759
- decorateMethodV2(this.prototype, "handleChatInputDragOver", [action]);
2760
- }
2761
- handleChatInputDragEnter(event) {
2762
- let dragEvent = event;
2763
- if (!this.isFileDrag(dragEvent.dataTransfer)) return;
2764
- dragEvent.preventDefault();
2765
- dragEvent.stopPropagation();
2766
- this.dropZoneDragDepth++;
2767
- this.isDropZoneActive = true;
2768
- }
2769
- static {
2770
- decorateMethodV2(this.prototype, "handleChatInputDragEnter", [action]);
2771
- }
2772
- handleChatInputDragLeave(event) {
2773
- let dragEvent = event;
2774
- if (!this.isFileDrag(dragEvent.dataTransfer) && !this.isDropZoneActive) return;
2775
- dragEvent.preventDefault();
2776
- dragEvent.stopPropagation();
2777
- this.dropZoneDragDepth = Math.max(0, this.dropZoneDragDepth - 1);
2778
- if (this.dropZoneDragDepth === 0) this.isDropZoneActive = false;
2779
- }
2780
- static {
2781
- decorateMethodV2(this.prototype, "handleChatInputDragLeave", [action]);
2782
- }
2783
- handleChatInputDrop(event) {
2784
- let dragEvent = event;
2785
- let files = Array.from(dragEvent.dataTransfer?.files ?? []);
2786
- if (!files.length) return;
2787
- dragEvent.preventDefault();
2788
- dragEvent.stopPropagation();
2789
- this.dropZoneDragDepth = 0;
2790
- this.isDropZoneActive = false;
2791
- this.attachLocalFilesTask.perform(files);
2792
- }
2793
- static {
2794
- decorateMethodV2(this.prototype, "handleChatInputDrop", [action]);
2795
- }
2796
- handleChatInputPaste(event) {
2797
- let files = this.getClipboardFiles(event.clipboardData);
2798
- if (!files.length) return;
2799
- event.preventDefault();
2800
- event.stopPropagation();
2801
- this.attachLocalFilesTask.perform(files);
2802
- }
2803
- static {
2804
- decorateMethodV2(this.prototype, "handleChatInputPaste", [action]);
2805
- }
2806
- attachLocalFilesTask = buildTask(() => ({
2807
- context: this,
2808
- generator: function* (files) {
2809
- for (let file of files) yield this.attachLocalFile(file);
2810
- }
2811
- }), null, "attachLocalFilesTask", "enqueue");
2812
- getClipboardFiles(clipboardData) {
2813
- if (!clipboardData) return [];
2814
- let files = Array.from(clipboardData.files ?? []);
2815
- if (files.length) return files;
2816
- let itemFiles = [];
2817
- for (let item of Array.from(clipboardData.items ?? [])) {
2818
- if (item.kind !== "file") continue;
2819
- let file = item.getAsFile();
2820
- if (file) itemFiles.push(file);
2821
- }
2822
- return itemFiles;
2823
- }
2824
- isFileDrag(dataTransfer) {
2825
- if (!dataTransfer) return false;
2826
- return Array.from(dataTransfer.types ?? []).includes("Files");
2827
- }
2828
- async attachLocalFile(localFile) {
2829
- let bytes = new Uint8Array(await localFile.arrayBuffer());
2830
- let file = await this.createLocalFileDef(localFile, bytes);
2831
- let files = this.filesToAttach;
2832
- let contentType = file.contentType || localFile.type || "application/octet-stream";
2833
- await this.matrixService.prefetchLocalFileContent(file, bytes, contentType);
2834
- this.matrixService.setFilesToSend(this.args.roomId, [...files, file]);
2835
- this.startFileUploadTask.perform(file);
2836
- }
2837
- isAutoAttachedFile(file) {
2838
- return this.autoAttachedFiles.some((autoFile) => autoFile.sourceUrl === file.sourceUrl);
2839
- }
2840
- static {
2841
- decorateMethodV2(this.prototype, "isAutoAttachedFile", [action]);
2842
- }
2843
- removeFile(file) {
2844
- if (this.isAutoAttachedFile(file)) {
2845
- this.removeAutoAttachedFile(file.sourceUrl ?? void 0);
2846
- return;
2847
- }
2848
- let files = this.filesToAttach;
2849
- if (!files.length) return;
2850
- let newFiles = files.filter((f) => f.sourceUrl !== file.sourceUrl);
2851
- if (newFiles.length === files.length) return;
2852
- this.matrixService.setFilesToSend(this.args.roomId, newFiles.length ? newFiles : void 0);
2853
- this.markAttachedFileRemoved(file.sourceUrl);
2854
- if (file.sourceUrl) this._fileUploadStates.delete(file.sourceUrl);
2855
- }
2856
- static {
2857
- decorateMethodV2(this.prototype, "removeFile", [action]);
2858
- }
2859
- startFileUploadTask = buildTask(() => ({
2860
- context: this,
2861
- generator: function* (file) {
2862
- let sourceUrl = file.sourceUrl;
2863
- if (!sourceUrl) return;
2864
- this._fileUploadStates.set(sourceUrl, { status: "uploading" });
2865
- try {
2866
- let [uploadedFile] = yield this.matrixService.uploadFiles([file]);
2867
- let uploadedOrOriginal = uploadedFile ?? file;
2868
- let files = this.filesToAttach;
2869
- if (files?.find((f) => f.sourceUrl === sourceUrl)) {
2870
- let nextFiles = files.map((f) => f.sourceUrl === sourceUrl ? uploadedOrOriginal : f);
2871
- this.matrixService.setFilesToSend(this.args.roomId, nextFiles);
2872
- this._fileUploadStates.set(sourceUrl, { status: "complete" });
2873
- }
2874
- } catch (e) {
2875
- if (this.filesToAttach?.find((f) => f.sourceUrl === sourceUrl)) this._fileUploadStates.set(sourceUrl, {
2876
- status: "error",
2877
- error: e?.message
2878
- });
2879
- }
2880
- }
2881
- }), null, "startFileUploadTask", null);
2882
- get hasFileUploadIssues() {
2883
- for (let [, state] of this._fileUploadStates) if (state.status === "uploading" || state.status === "error") return true;
2884
- return false;
2885
- }
2886
- retryFileUpload(file) {
2887
- this.startFileUploadTask.perform(file);
2888
- }
2889
- static {
2890
- decorateMethodV2(this.prototype, "retryFileUpload", [action]);
2891
- }
2892
- buildLocalSourceUrl(fileName) {
2893
- return `${LOCAL_SOURCE_URL_PREFIX}${v4()}/${encodeURIComponent(fileName)}`;
2894
- }
2895
- async createLocalFileDef(localFile, bytes) {
2896
- let sourceUrl = this.buildLocalSourceUrl(localFile.name);
2897
- let fileDefCodeRef = resolveFileDefCodeRef(new URL(sourceUrl), this.network.virtualNetwork);
2898
- let extracted = await new FileDefAttributesExtractor({
2899
- loaderService: this.loaderService,
2900
- network: this.network,
2901
- fileURL: sourceUrl,
2902
- fileDefCodeRef,
2903
- baseFileDefCodeRef: baseFileRef,
2904
- contentHash: void 0,
2905
- contentSize: bytes.byteLength,
2906
- fileBytes: bytes,
2907
- buildError: (errorUrl, error) => {
2908
- let errorJSONAPI = formattedError(errorUrl, error).errors[0];
2909
- return errorJsonApiToErrorEntry(errorJSONAPI);
2910
- }
2911
- }).extract();
2912
- if (extracted.status === "error" || !extracted.resource) throw new Error(extracted.error?.error?.message ?? `Failed to extract file metadata for ${localFile.name}`);
2913
- let classCodeRef = extracted.resource.meta.adoptsFrom && "module" in extracted.resource.meta.adoptsFrom && "name" in extracted.resource.meta.adoptsFrom ? extracted.resource.meta.adoptsFrom : fileDefCodeRef;
2914
- let FileDefKlass = (await this.loaderService.loader.import(classCodeRef.module))[classCodeRef.name];
2915
- let baseAttributes = extracted.resource.attributes;
2916
- let attributes = {
2917
- ...baseAttributes,
2918
- sourceUrl,
2919
- url: sourceUrl,
2920
- name: baseAttributes.name ?? localFile.name,
2921
- contentSize: baseAttributes.contentSize ?? bytes.byteLength
2922
- };
2923
- if (!FileDefKlass) return this.matrixService.fileAPI.createFileDef({
2924
- sourceUrl,
2925
- url: sourceUrl,
2926
- name: localFile.name,
2927
- contentType: attributes.contentType ?? localFile.type ?? "application/octet-stream",
2928
- contentHash: attributes.contentHash,
2929
- contentSize: attributes.contentSize
2930
- });
2931
- return new FileDefKlass(attributes);
2932
- }
2933
- doSendMessage = buildTask(() => ({
2934
- context: this,
2935
- generator: function* (message, cardsOrIds, files, clientGeneratedId = v4(), keepInputAndAttachments = false) {
2936
- this.unknownMessageSendError = void 0;
2937
- let messageToSend = this.matrixService.getMessageToSend(this.args.roomId);
2938
- let cardsToSend = this.matrixService.getCardsToSend(this.args.roomId) ?? void 0;
2939
- let cardsToSendCopy = cardsToSend ? [...cardsToSend] : void 0;
2940
- let filesToSend = this.matrixService.getFilesToSend(this.args.roomId) ?? void 0;
2941
- let filesToSendCopy = filesToSend ? [...filesToSend] : void 0;
2942
- const shouldClearDraft = !keepInputAndAttachments;
2943
- if (shouldClearDraft) {
2944
- this.matrixService.setMessageToSend(this.args.roomId, void 0);
2945
- this.matrixService.setCardsToSend(this.args.roomId, void 0);
2946
- this.matrixService.setFilesToSend(this.args.roomId, void 0);
2947
- this._fileUploadStates.clear();
2948
- }
2949
- let openCardIds = new Set([...this.operatorModeStateService.getOpenCardIds() || [], ...this.autoAttachedCardIds]);
2950
- let context = yield this.operatorModeStateService.getSummaryForAIBot(openCardIds);
2951
- try {
2952
- let cards = [];
2953
- if (typeof cardsOrIds?.[0] === "string") {
2954
- let cardsOrErrors = yield Promise.all(cardsOrIds.map((id) => this.store.get(id)));
2955
- cardsOrErrors = cardsOrErrors.filter(Boolean);
2956
- for (let cardOrError of cardsOrErrors) if (isCardInstance(cardOrError)) cards?.push(cardOrError);
2957
- else if (cardOrError.id) {
2958
- let cardFileDef = this.matrixService.fileAPI.createFileDef({
2959
- sourceUrl: cardOrError.id + ".json",
2960
- name: cardOrError.id.split("/").pop()
2961
- });
2962
- if (!files) files = [];
2963
- files.push(cardFileDef);
2964
- }
2965
- } else cards = cardsOrIds;
2966
- yield this.matrixService.sendMessage(this.args.roomId, message, cards, files, clientGeneratedId, context);
2967
- } catch (e) {
2968
- console.error(e);
2969
- this.unknownMessageSendError = "There was an error sending your message. This could be due to network issues, or serialization issues with the cards or files you are trying to send. It might be helpful to refresh the page and try again.";
2970
- if (shouldClearDraft) {
2971
- this.matrixService.setMessageToSend(this.args.roomId, messageToSend);
2972
- this.matrixService.setCardsToSend(this.args.roomId, cardsToSendCopy && cardsToSendCopy.length > 0 ? cardsToSendCopy : void 0);
2973
- this.matrixService.setFilesToSend(this.args.roomId, filesToSendCopy && filesToSendCopy.length > 0 ? filesToSendCopy : void 0);
2974
- }
2975
- }
2976
- }
2977
- }), null, "doSendMessage", "enqueue");
2978
- get topMostStackItems() {
2979
- this.resetAutoAttachedRemovedStateTask.perform();
2980
- return this.operatorModeStateService.topMostStackItems();
2981
- }
2982
- static {
2983
- decorateMethodV2(this.prototype, "topMostStackItems", [cached]);
2984
- }
2985
- resetAutoAttachedRemovedStateTask = buildTask(() => ({
2986
- context: this,
2987
- generator: function* () {
2988
- yield Promise.resolve();
2989
- this.removedAttachedCardIds.clear();
2990
- }
2991
- }), null, "resetAutoAttachedRemovedStateTask", null);
2992
- get autoAttachedCardIds() {
2993
- return this.autoAttachmentResource.cardIds;
2994
- }
2995
- updateSkillIsActiveTask = buildTask(() => ({
2996
- context: this,
2997
- generator: function* (isActive, skillCardId) {
2998
- yield new UpdateRoomSkillsCommand(this.commandService.commandContext).execute({
2999
- roomId: this.args.roomId,
3000
- skillCardIdsToActivate: isActive ? [skillCardId] : [],
3001
- skillCardIdsToDeactivate: isActive ? [] : [skillCardId]
3002
- });
3003
- }
3004
- }), null, "updateSkillIsActiveTask", null);
3005
- get canSend() {
3006
- return !this.doSendMessage.isRunning && Boolean(this.messageToSend?.trim() || this.cardIdsToAttach?.length || this.autoAttachedCardIds.size !== 0 || this.filesToAttach?.length || this.autoAttachedFiles.length > 0) && !this.hasFileUploadIssues && !!this.room && !this.messages.some((m) => this.isPendingMessage(m)) && !this.matrixService.isLoadingTimeline && !this.aiAssistantPanelService.isPreparingSession;
3007
- }
3008
- isLastMessage(messageIndex) {
3009
- return (this.room && messageIndex === this.messages.length - 1) ?? false;
3010
- }
3011
- static {
3012
- decorateMethodV2(this.prototype, "isLastMessage", [action]);
3013
- }
3014
- isPendingMessage(message) {
3015
- return message.status === "sending" || message.status === "queued";
3016
- }
3017
- attachSkillTask = buildTask(() => ({
3018
- context: this,
3019
- generator: function* (cardId) {
3020
- yield new UpdateRoomSkillsCommand(this.commandService.commandContext).execute({
3021
- roomId: this.args.roomId,
3022
- skillCardIdsToActivate: [cardId]
3023
- });
3024
- }
3025
- }), null, "attachSkillTask", null);
3026
- setSelectedBottomAction(action) {
3027
- this.selectedBottomAction = action;
3028
- }
3029
- static {
3030
- decorateMethodV2(this.prototype, "setSelectedBottomAction", [action]);
3031
- }
3032
- skipSessionPreparation() {
3033
- this.aiAssistantPanelService.skipSessionPreparation();
3034
- }
3035
- static {
3036
- decorateMethodV2(this.prototype, "skipSessionPreparation", [action]);
3037
- }
3038
- get displaySkillMenu() {
3039
- return !this.selectedBottomAction || this.selectedBottomAction === "skill-menu";
3040
- }
3041
- get displayLLMSelect() {
3042
- return !this.selectedBottomAction || this.selectedBottomAction === "llm-select";
3043
- }
3044
- get displayLLMModeSelect() {
3045
- return this.displaySkillMenu && this.displayLLMSelect;
3046
- }
3047
- get displayAttachedItems() {
3048
- return this.filesToAttach?.length || this.cardIdsToAttach?.length || this.autoAttachedFiles.length > 0 || this.autoAttachedCardIds?.size;
3049
- }
3050
- get readyCommands() {
3051
- let lastMessage = this.messages[this.messages.length - 1];
3052
- if (!lastMessage || !lastMessage.commands) return [];
3053
- return lastMessage.commands.filter((command) => (command.status === "ready" || command.status === void 0) && !this.commandService.currentlyExecutingCommandRequestIds.has(command.id) && !this.commandService.executedCommandRequestIds.has(command.id));
3054
- }
3055
- static {
3056
- decorateMethodV2(this.prototype, "readyCommands", [cached]);
3057
- }
3058
- get readyCodePatches() {
3059
- let lastMessage = this.messages[this.messages.length - 1];
3060
- if (!lastMessage || !lastMessage.htmlParts) return [];
3061
- return this.commandService.getReadyCodePatches(lastMessage.htmlParts);
3062
- }
3063
- static {
3064
- decorateMethodV2(this.prototype, "readyCodePatches", [cached]);
3065
- }
3066
- get generatingResults() {
3067
- return this.messages[this.messages.length - 1] && !this.messages[this.messages.length - 1].isStreamingFinished;
3068
- }
3069
- get displayActionBar() {
3070
- let lastMessage = this.messages[this.messages.length - 1];
3071
- if (this.lastCanceledActionMessageId && lastMessage?.eventId === this.lastCanceledActionMessageId || lastMessage?.isCanceled) return false;
3072
- return this.showUnreadIndicator || this.generatingResults || this.readyCommands.length > 0 || this.readyCodePatches.length > 0 || this.isAcceptingAll;
3073
- }
3074
- static {
3075
- decorateMethodV2(this.prototype, "displayActionBar", [cached]);
3076
- }
3077
- async executeReadyCommands() {
3078
- for (let command of this.readyCommands) {
3079
- this.acceptingAllLabel = command.actionVerb;
3080
- await this.commandService.run.unlinked().perform(command);
3081
- this.acceptingAllLabel = void 0;
3082
- }
3083
- }
3084
- async executeReadyCodePatches() {
3085
- let lastMessage = this.messages[this.messages.length - 1];
3086
- if (!lastMessage || !lastMessage.htmlParts) return;
3087
- await this.commandService.executeReadyCodePatches(this.args.roomId, lastMessage.htmlParts);
3088
- }
3089
- executeAllReadyActionsTask = buildTask(() => ({
3090
- context: this,
3091
- generator: function* () {
3092
- yield this.executeReadyCodePatches();
3093
- yield this.executeReadyCommands();
3094
- }
3095
- }), null, "executeAllReadyActionsTask", null);
3096
- cancelActionBar() {
3097
- let lastMessage = this.messages[this.messages.length - 1];
3098
- if (lastMessage) {
3099
- this.lastCanceledActionMessageId = lastMessage.eventId;
3100
- this.matrixService.markActionAsCanceled(this.args.roomId, lastMessage.eventId);
3101
- }
3102
- }
3103
- static {
3104
- decorateMethodV2(this.prototype, "cancelActionBar", [action]);
3105
- }
3106
- stopGeneratingTask = buildTask(() => ({
3107
- context: this,
3108
- generator: function* () {
3109
- yield this.matrixService.sendStopGeneratingEvent(this.args.roomId);
3110
- }
3111
- }), null, "stopGeneratingTask", null);
3112
- };
3113
- //#endregion
3114
- //#region app/components/ai-assistant/ai-assist-icon.webp
3115
- var ai_assist_icon_default = "data:image/webp;base64,UklGRgYCAABXRUJQVlA4WAoAAAAQAAAAGQAAGQAAQUxQSMUAAAABgFXbVt1qS0ACEnBQHBQHxUFxUCRcB40TcNA4AAeJg/2xeVwJETEBGHuSrJUkPTbDStjJ8ndI3mmSkvw2ItVaYVxyl3Sgy+UWXhfVA0F4veTx/DQOKwBUIX+f54PzbsT0wXp3GLq+VQ2mpq51j2XfB7UeyWLbpqPWUr7v/3h/S6E2vxYal4uZmcLd5kaucb8ZMY1zH/I5YJHC4ZmDB4B4Cz0QqHfE3N3SgCa3w2oUWkuNWO+SkpzYzHIckneC1Cphx6/4CQBWUDggGgEAANAIAJ0BKhoAGgA+bTCTRyQjIaEoCqiADYlsAJ0y43mfjXDn75NhnMfImEA54jcQPZr58v2MfJAAbPO7yGJmutiLvayjgnMJdH1F2DmS5YAA/sNd5nCfj0nyEoYDCcd/a+s8rM6SzWFYyWRtmknvHddHhrszX/vEF+DSzHS12Ipf4rsqCDi4/Y8hXXNZIh9h1RGCFdzS01aOcoZrbEMhfDAVbYP4DMUiZ2Z33RnvHaDXvQEFvTfUf7h9cMs7+frGUnfFJhxEMu7Gpnx9pu0g4H6//JvvL/lO6yxZ+Ss7ZI09hg86DATL93vF6Qr45v+G511//3aKOEPl+ed21HH7yY5JH/bvJ/ztHqofit+OQBz8BEv/48NeW8AAAA==";
3116
- //#endregion
3117
- //#region app/components/ai-assistant/new-session-settings.gts
3118
- var NewSessionSettings = class extends Component {
3119
- options = [
3120
- "Add Same Skills",
3121
- "Copy File History",
3122
- "Summarize Current Session"
3123
- ];
3124
- isSelected(option) {
3125
- return this.args.selectedOptions.has(option);
3126
- }
3127
- static {
3128
- decorateMethodV2(this.prototype, "isSelected", [action]);
3129
- }
3130
- onOptionChange(e) {
3131
- const target = e.target;
3132
- const option = target.name;
3133
- const checked = target.checked;
3134
- this.args.onOptionChange(option, checked);
3135
- }
3136
- static {
3137
- decorateMethodV2(this.prototype, "onOptionChange", [action]);
3138
- }
3139
- handleCreateSession() {
3140
- this.args.onCreateSession();
3141
- }
3142
- static {
3143
- decorateMethodV2(this.prototype, "handleCreateSession", [action]);
3144
- }
3145
- static {
3146
- setComponentTemplate(templateFactory({
3147
- "id": "BVNgSJ9u",
3148
- "block": "[[[10,0],[14,0,\"new-session-settings-menu\"],[14,\"data-test-new-session-settings-menu\",\"\"],[14,\"data-scopedcss-9f5818a36f-3778919898\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"new-session-settings-header\"],[14,\"data-scopedcss-9f5818a36f-3778919898\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"new-session-settings-title\"],[14,\"data-test-new-session-settings-title\",\"\"],[14,\"data-scopedcss-9f5818a36f-3778919898\",\"\"],[12],[1,\"New Session Options\"],[13],[1,\"\\n \"],[8,[32,0],[[24,0,\"new-session-settings-close-button\"],[24,\"data-test-new-session-settings-close-button\",\"\"],[24,\"data-scopedcss-9f5818a36f-3778919898\",\"\"],[4,[32,1],[\"click\",[30,1]],null]],[[\"@icon\",\"@variant\",\"@size\"],[\"close\",\"ghost\",\"small\"]],null],[1,\"\\n \"],[13],[1,\"\\n \"],[10,0],[14,0,\"new-session-settings-options\"],[14,\"data-test-new-session-settings-options\",\"\"],[14,\"data-scopedcss-9f5818a36f-3778919898\",\"\"],[12],[1,\"\\n\"],[42,[28,[31,1],[[28,[31,1],[[30,0,[\"options\"]]],null]],null],null,[[[1,\" \"],[10,\"label\"],[15,0,[29,[\"new-session-settings-option\\n \",[52,[28,[30,0,[\"isSelected\"]],[[30,2]],null],\"checked\"]]]],[15,\"data-test-new-session-settings-option\",[30,2]],[14,\"data-scopedcss-9f5818a36f-3778919898\",\"\"],[12],[1,\"\\n \"],[11,\"input\"],[16,3,[30,2]],[16,\"checked\",[28,[30,0,[\"isSelected\"]],[[30,2]],null]],[16,\"data-test-new-session-settings-checkbox\",[30,2]],[24,\"data-scopedcss-9f5818a36f-3778919898\",\"\"],[24,4,\"checkbox\"],[4,[32,1],[\"change\",[30,0,[\"onOptionChange\"]]],null],[12],[13],[1,\"\\n \"],[10,1],[14,0,\"new-session-settings-label\"],[15,\"data-test-new-session-settings-label\",[30,2]],[14,\"data-scopedcss-9f5818a36f-3778919898\",\"\"],[12],[1,[30,2]],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[2]],null],[1,\" \"],[13],[1,\"\\n \"],[10,0],[14,0,\"new-session-settings-footer\"],[14,\"data-scopedcss-9f5818a36f-3778919898\",\"\"],[12],[1,\"\\n \"],[8,[32,2],[[24,0,\"new-session-settings-create-button\"],[24,\"data-test-new-session-settings-create-button\",\"\"],[24,\"data-scopedcss-9f5818a36f-3778919898\",\"\"],[4,[32,1],[\"click\",[30,0,[\"handleCreateSession\"]]],null]],[[\"@kind\",\"@size\"],[\"primary\",\"small\"]],[[\"default\"],[[[[1,\"\\n Start New Session\\n \"]],[]]]]],[1,\"\\n \"],[13],[1,\"\\n\"],[13],[1,\"\\n\"]],[\"@onClose\",\"option\"],[\"each\",\"-track-array\",\"if\"]]",
3149
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/new-session-settings.gts",
3150
- "scope": () => [
3151
- DropdownButton,
3152
- on,
3153
- ButtonComponent
3154
- ],
3155
- "isStrictMode": true
3156
- }), this);
3157
- }
3158
- };
3159
- //#endregion
3160
- //#region app/components/ai-assistant/new-session-button.gts
3161
- var NewSessionButton = class extends Component {
3162
- static {
3163
- decorateFieldV2(this.prototype, "showMenu", [tracked], function() {
3164
- return false;
3165
- });
3166
- }
3167
- #showMenu = (initializeDeferredDecorator(this, "showMenu"), void 0);
3168
- static {
3169
- decorateFieldV2(this.prototype, "selectedOptions", [tracked], function() {
3170
- return /* @__PURE__ */ new Set();
3171
- });
3172
- }
3173
- #selectedOptions = (initializeDeferredDecorator(this, "selectedOptions"), void 0);
3174
- updateOption(option, checked) {
3175
- if (checked) this.selectedOptions.add(option);
3176
- else this.selectedOptions.delete(option);
3177
- this.selectedOptions = new Set(this.selectedOptions);
3178
- }
3179
- static {
3180
- decorateMethodV2(this.prototype, "updateOption", [action]);
3181
- }
3182
- handleCreateNewSession(event) {
3183
- let mouseEvent = event;
3184
- if (mouseEvent.shiftKey || this.showMenu) {
3185
- mouseEvent.preventDefault();
3186
- this.showMenu = !this.showMenu;
3187
- return;
3188
- }
3189
- this.args.onCreateNewSession();
3190
- }
3191
- static {
3192
- decorateMethodV2(this.prototype, "handleCreateNewSession", [action]);
3193
- }
3194
- closeMenu() {
3195
- this.showMenu = false;
3196
- }
3197
- static {
3198
- decorateMethodV2(this.prototype, "closeMenu", [action]);
3199
- }
3200
- handleCreateNewSessionFromSettings() {
3201
- this.args.onCreateNewSession({
3202
- addSameSkills: this.selectedOptions.has("Add Same Skills"),
3203
- shouldCopyFileHistory: this.selectedOptions.has("Copy File History"),
3204
- shouldSummarizeSession: this.selectedOptions.has("Summarize Current Session")
3205
- });
3206
- this.closeMenu();
3207
- }
3208
- static {
3209
- decorateMethodV2(this.prototype, "handleCreateNewSessionFromSettings", [action]);
3210
- }
3211
- static {
3212
- setComponentTemplate(templateFactory({
3213
- "id": "iebnJZzb",
3214
- "block": "[[[10,0],[15,0,[29,[\"new-session-button-container \",[52,[30,0,[\"showMenu\"]],\"menu-open\"]]]],[14,\"data-scopedcss-8145f22f51-a321f78deb\",\"\"],[12],[1,\"\\n \"],[8,[32,0],[[24,\"data-scopedcss-8145f22f51-a321f78deb\",\"\"]],null,[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,1],[[24,0,\"button new-session-button\"],[16,\"aria-expanded\",[29,[[30,0,[\"showMenu\"]]]]],[24,\"data-test-create-room-btn\",\"\"],[24,\"data-scopedcss-8145f22f51-a321f78deb\",\"\"],[4,[32,2],[\"click\",[30,0,[\"handleCreateNewSession\"]]],null]],[[\"@disabled\",\"@icon\",\"@size\",\"@width\",\"@height\",\"@variant\",\"@label\"],[[30,1],\"add\",\"extra-small\",\"18\",\"18\",\"highlight-icon\",\"Create new session (Shift+Click for options)\"]],null],[1,\"\\n \"]],[]],[[[1,\"\\n\"],[41,[30,0,[\"showMenu\"]],[[[1,\" Close New Session Settings\\n\"]],[]],[[[1,\" New Session (Shift+Click for options)\\n\"]],[]]],[1,\" \"]],[]]]]],[1,\"\\n\\n\"],[41,[30,0,[\"showMenu\"]],[[[1,\" \"],[11,0],[24,0,\"new-session-menu-wrapper\"],[24,\"data-scopedcss-8145f22f51-a321f78deb\",\"\"],[4,[32,3],[[30,0,[\"closeMenu\"]]],null],[12],[1,\"\\n \"],[8,[32,4],[[24,\"data-scopedcss-8145f22f51-a321f78deb\",\"\"]],[[\"@selectedOptions\",\"@onOptionChange\",\"@onClose\",\"@onCreateSession\"],[[30,0,[\"selectedOptions\"]],[30,0,[\"updateOption\"]],[30,0,[\"closeMenu\"]],[30,0,[\"handleCreateNewSessionFromSettings\"]]]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[13],[1,\"\\n\\n\"]],[\"@disabled\"],[\"if\"]]",
3215
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/new-session-button.gts",
3216
- "scope": () => [
3217
- Tooltip,
3218
- DropdownButton,
3219
- on,
3220
- ClickOutsideModifier,
3221
- NewSessionSettings
3222
- ],
3223
- "isStrictMode": true
3224
- }), this);
3225
- }
3226
- };
3227
- //#endregion
3228
- //#region app/components/ai-assistant/panel.gts
3229
- var { matrixServerName } = config;
3230
- var aiBotUserId = `@${aiBotUsername}:${matrixServerName}`;
3231
- var AiAssistantPanel = class extends Component {
3232
- static {
3233
- decorateFieldV2(this.prototype, "copiedRoomId", [tracked], function() {
3234
- return null;
3235
- });
3236
- }
3237
- #copiedRoomId = (initializeDeferredDecorator(this, "copiedRoomId"), void 0);
3238
- static {
3239
- decorateFieldV2(this.prototype, "isFallbackBannerDismissed", [tracked], function() {
3240
- return false;
3241
- });
3242
- }
3243
- #isFallbackBannerDismissed = (initializeDeferredDecorator(this, "isFallbackBannerDismissed"), void 0);
3244
- static {
3245
- decorateFieldV2(this.prototype, "bannerBottomPx", [tracked]);
3246
- }
3247
- #bannerBottomPx = (initializeDeferredDecorator(this, "bannerBottomPx"), void 0);
3248
- static {
3249
- setComponentTemplate(templateFactory({
3250
- "id": "H2i2QcAm",
3251
- "block": "[[[8,[32,0],[[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"]],[[\"@placement\",\"@offsetOptions\"],[\"bottom-end\",[30,0,[\"velcroOffsetOptions\"]]]],[[\"default\"],[[[[1,\"\\n \"],[11,0],[24,0,\"ai-assistant-panel\"],[24,\"data-test-ai-assistant-panel\",\"\"],[16,\"data-test-room-has-messages\",[52,[30,0,[\"roomResource\",\"messages\"]],true,false]],[16,\"data-test-room-is-empty\",[52,[30,0,[\"roomResource\",\"messages\"]],false,true]],[16,5,[28,[32,1],null,[[\"chat-top-clearance\"],[[30,0,[\"chatTopClearanceCss\"]]]]]],[17,2],[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[12],[1,\"\\n \"],[8,[30,3],[[24,0,\"ai-assistant-panel-resize-handle\"],[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"]],null,null],[1,\"\\n \"],[10,0],[14,0,\"panel-header-container\"],[14,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[12],[1,\"\\n \"],[10,\"header\"],[14,0,\"panel-header\"],[14,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[12],[1,\"\\n \"],[10,\"img\"],[14,\"alt\",\"AI Assistant\"],[15,\"src\",[32,2]],[14,\"width\",\"20\"],[14,\"height\",\"20\"],[14,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[12],[13],[1,\"\\n\"],[44,[[52,[30,0,[\"roomResource\",\"name\"]],[30,0,[\"roomResource\",\"name\"]],\"Assistant\"]],[[[1,\" \"],[10,\"h3\"],[15,\"title\",[30,4]],[14,0,\"panel-title-text\"],[14,\"data-test-chat-title\",\"\"],[14,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[12],[1,\"\\n \"],[1,[30,4]],[1,\"\\n \"],[13],[1,\"\\n\"]],[4]]],[1,\" \"],[8,[32,3],[[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"]],[[\"@disabled\",\"@onCreateNewSession\"],[[28,[32,4],[[30,0,[\"roomResource\",\"messages\",\"length\"]]],null],[30,0,[\"aiAssistantPanelService\",\"createNewSession\"]]]],null],[1,\"\\n\"],[44,[[30,0,[\"aiAssistantPanelService\",\"loadingRooms\"]]],[[[1,\" \"],[8,[32,5],[[24,\"title\",\"Past Sessions\"],[16,0,[29,[\"button past-sessions-button\\n \",[52,[30,0,[\"hasOtherActiveSessions\"]],\"has-other-active-sessions\"]]]],[24,\"data-test-past-sessions-button\",\"\"],[16,\"data-test-has-active-sessions\",[30,0,[\"hasOtherActiveSessions\"]]],[16,\"aria-expanded\",[29,[[30,0,[\"aiAssistantPanelService\",\"isShowingPastSessions\"]]]]],[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[4,[32,7],[\"click\",[30,0,[\"aiAssistantPanelService\",\"displayPastSessions\"]]],null]],[[\"@icon\",\"@label\",\"@size\",\"@variant\",\"@width\",\"@height\",\"@loading\",\"@disabled\"],[[32,6],\"Past Sessions\",\"extra-small\",\"highlight-icon\",\"14\",\"14\",[30,5],[30,0,[\"aiAssistantPanelService\",\"displayRoomError\"]]]],null],[1,\"\\n\"]],[5]]],[1,\" \"],[8,[32,5],[[24,\"title\",\"Close AI Assistant\"],[24,0,\"button\"],[24,\"data-test-close-ai-assistant\",\"\"],[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[4,[32,7],[\"click\",[30,6]],null]],[[\"@icon\",\"@size\",\"@width\",\"@height\",\"@label\",\"@variant\"],[\"close\",\"extra-small\",\"18\",\"18\",\"close ai assistant\",\"highlight-icon\"]],null],[1,\"\\n \"],[13],[1,\"\\n\\n\"],[41,[30,0,[\"shouldShowFallbackBanner\"]],[[[1,\" \"],[8,[32,8],[[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[4,[30,0,[\"measureBanner\"]],null,null]],[[\"@onDismiss\"],[[30,0,[\"dismissFallbackBanner\"]]]],null],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n\\n\"],[41,[30,0,[\"aiAssistantPanelService\",\"isShowingPastSessions\"]],[[[1,\" \"],[8,[32,9],[[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[4,[30,1,[\"loop\"]],null,null]],[[\"@sessions\",\"@currentRoomId\",\"@roomActions\",\"@onClose\"],[[30,0,[\"aiAssistantPanelService\",\"aiSessionRooms\"]],[30,0,[\"matrixService\",\"currentRoomId\"]],[30,0,[\"roomActions\"]],[30,0,[\"aiAssistantPanelService\",\"hidePastSessions\"]]]],null],[1,\"\\n\"]],[]],[[[41,[30,0,[\"aiAssistantPanelService\",\"roomToRename\"]],[[[1,\" \"],[8,[32,10],[[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[4,[30,1,[\"loop\"]],null,null]],[[\"@room\",\"@onClose\"],[[30,0,[\"aiAssistantPanelService\",\"roomToRename\"]],[30,0,[\"aiAssistantPanelService\",\"onCloseRename\"]]]],null],[1,\"\\n \"]],[]],null]],[]]],[1,\"\\n\"],[41,[30,0,[\"aiAssistantPanelService\",\"displayRoomError\"]],[[[1,\" \"],[10,0],[14,0,\"session-error\"],[14,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[12],[1,\"\\n \"],[8,[32,11],[[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"]],[[\"@errorAction\"],[[30,0,[\"aiAssistantPanelService\",\"createNewSession\"]]]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[41,[30,0,[\"isReady\"]],[[[41,[30,0,[\"roomResource\"]],[[[41,[30,0,[\"matrixService\",\"currentRoomId\"]],[[[1,\" \"],[8,[32,12],[[24,0,\"room\"],[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"]],[[\"@roomId\",\"@roomResource\",\"@monacoSDK\",\"@selectedCardRef\"],[[30,0,[\"matrixService\",\"currentRoomId\"]],[30,0,[\"roomResource\"]],[30,0,[\"monacoSDK\"]],[30,7]]],null],[1,\"\\n\"]],[]],null]],[]],null]],[]],[[[1,\" \"],[8,[32,13],[[24,0,\"loading-new-session\"],[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"]],[[\"@color\"],[\"var(--boxel-light)\"]],null],[1,\"\\n \"]],[]]]],[]]],[1,\" \"],[13],[1,\"\\n\"]],[1]]]]],[1,\"\\n\\n\"],[41,[30,0,[\"aiAssistantPanelService\",\"roomToDelete\"]],[[[1,\" \"],[8,[32,14],[[24,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"]],[[\"@itemToDelete\",\"@onConfirm\",\"@onCancel\",\"@error\"],[[30,0,[\"aiAssistantPanelService\",\"roomToDelete\"]],[28,[32,15],[[30,0,[\"aiAssistantPanelService\",\"leaveRoom\"]],[30,0,[\"aiAssistantPanelService\",\"roomToDelete\",\"id\"]]],null],[28,[32,15],[[30,0,[\"aiAssistantPanelService\",\"setRoomToDelete\"]],[27]],null],[30,0,[\"aiAssistantPanelService\",\"roomDeleteError\"]]]],[[\"content\"],[[[[1,\"\\n Delete the room\\n \"],[10,\"strong\"],[14,\"data-scopedcss-452695a0d6-0ee6f74daa\",\"\"],[12],[1,[30,0,[\"aiAssistantPanelService\",\"roomToDelete\",\"name\"]]],[13],[1,\"?\\n \"]],[]]]]],[1,\"\\n\"]],[]],null],[1,\"\\n\"]],[\"popoverVelcro\",\"&attrs\",\"@resizeHandle\",\"title\",\"pastSessionsLoading\",\"@onClose\",\"@selectedCardRef\"],[\"if\",\"let\"]]",
3252
- "moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/panel.gts",
3253
- "scope": () => [
3254
- Velcro,
3255
- cssVar$1,
3256
- ai_assist_icon_default,
3257
- NewSessionButton,
3258
- not,
3259
- DropdownButton,
3260
- IconComponent$5,
3261
- on,
3262
- FallbackBanner,
3263
- AiAssistantPastSessionsList,
3264
- RenameSession,
3265
- NewSession,
3266
- Room,
3267
- LoadingIndicator,
3268
- component,
3269
- fn
3270
- ],
3271
- "isStrictMode": true
3272
- }), this);
3273
- }
3274
- static {
3275
- decorateFieldV2(this.prototype, "matrixService", [service]);
3276
- }
3277
- #matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
3278
- static {
3279
- decorateFieldV2(this.prototype, "monacoService", [service]);
3280
- }
3281
- #monacoService = (initializeDeferredDecorator(this, "monacoService"), void 0);
3282
- static {
3283
- decorateFieldV2(this.prototype, "aiAssistantPanelService", [service]);
3284
- }
3285
- #aiAssistantPanelService = (initializeDeferredDecorator(this, "aiAssistantPanelService"), void 0);
3286
- static {
3287
- decorateFieldV2(this.prototype, "maybeMonacoSDK", [tracked]);
3288
- }
3289
- #maybeMonacoSDK = (initializeDeferredDecorator(this, "maybeMonacoSDK"), void 0);
3290
- constructor(owner, args) {
3291
- super(owner, args);
3292
- this.loadMonaco.perform();
3293
- }
3294
- get velcroOffsetOptions() {
3295
- return {
3296
- mainAxis: 10,
3297
- crossAxis: 50
3298
- };
3299
- }
3300
- get hasOtherActiveSessions() {
3301
- let oneMinuteAgo = (/* @__PURE__ */ new Date(Date.now() - 60 * 1e3)).getTime();
3302
- return this.aiAssistantPanelService.aiSessionRooms.filter((session) => session.roomId !== this.roomResource?.roomId).some((session) => {
3303
- let isSessionActive = false;
3304
- isSessionActive = this.matrixService.getLastActiveTimestamp(session.roomId, session.lastActiveTimestamp) > oneMinuteAgo;
3305
- let lastMessageEventId = session.lastMessage?.eventId;
3306
- let hasSeenLastMessage = lastMessageEventId ? this.matrixService.currentUserEventReadReceipts.has(lastMessageEventId) : false;
3307
- return isSessionActive && !hasSeenLastMessage;
3308
- });
3309
- }
3310
- get shouldShowFallbackBanner() {
3311
- return this.matrixService.isUsingFallbackSystemCard && !this.isFallbackBannerDismissed;
3312
- }
3313
- get chatTopClearanceCss() {
3314
- return this.bannerBottomPx ? `${this.bannerBottomPx}px` : void 0;
3315
- }
3316
- measureBanner = modifier((el) => {
3317
- let update = () => {
3318
- this.bannerBottomPx = el.offsetTop + el.offsetHeight;
3319
- };
3320
- let ro = new ResizeObserver(update);
3321
- ro.observe(el);
3322
- if (el.parentElement) ro.observe(el.parentElement);
3323
- return () => {
3324
- ro.disconnect();
3325
- this.bannerBottomPx = void 0;
3326
- };
3327
- });
3328
- dismissFallbackBanner() {
3329
- this.isFallbackBannerDismissed = true;
3330
- }
3331
- static {
3332
- decorateMethodV2(this.prototype, "dismissFallbackBanner", [action]);
3333
- }
3334
- get roomResource() {
3335
- return this.matrixService.currentRoomId ? this.matrixService.roomResources.get(this.matrixService.currentRoomId) : void 0;
3336
- }
3337
- get roomActions() {
3338
- return {
3339
- open: this.aiAssistantPanelService.enterRoom,
3340
- rename: this.aiAssistantPanelService.setRoomToRename,
3341
- delete: this.aiAssistantPanelService.setRoomToDelete,
3342
- copyRoomId: (roomId) => this.copyRoomIdTask.perform(roomId),
3343
- getCopiedRoomId: () => this.copiedRoomId
3344
- };
3345
- }
3346
- copyRoomIdTask = buildTask(() => ({
3347
- context: this,
3348
- generator: function* (roomId) {
3349
- yield navigator.clipboard.writeText(roomId);
3350
- this.copiedRoomId = roomId;
3351
- setTimeout(() => {
3352
- this.copiedRoomId = null;
3353
- }, 2e3);
3354
- }
3355
- }), null, "copyRoomIdTask", "restartable");
3356
- loadMonaco = buildTask(() => ({
3357
- context: this,
3358
- generator: function* () {
3359
- this.maybeMonacoSDK = yield this.monacoService.getMonacoContext();
3360
- }
3361
- }), null, "loadMonaco", "restartable");
3362
- get monacoSDK() {
3363
- if (this.maybeMonacoSDK) return this.maybeMonacoSDK;
3364
- throw new Error(`cannot use monaco SDK before it has loaded`);
3365
- }
3366
- get isReady() {
3367
- return Boolean(this.matrixService.currentRoomId && this.maybeMonacoSDK && !this.aiAssistantPanelService.loadingRooms && this.aiAssistantPanelService.isCreateRoomIdle);
3368
- }
3369
- };
3370
- //#endregion
3371
- export { auto_attached_card_exports as S, IconComponent$5 as _, component as a, card_collection_exports as b, ai_assist_icon_2x_default as c, consume_context_default as d, AiAssistantConversation as f, AiAssistantAttachmentPicker as g, AiAssistantChatInput as h, IconComponent as i, AiAssistantSkillMenu as l, FocusPill as m, ai_assist_icon_default as n, ScrollIntoViewModifier as o, AiAssistantMessage as p, RoomMessage as r, ClickOutsideModifier as s, AiAssistantPanel as t, PillMenu as u, card_resource_exports as v, getCardCollection as x, getCard as y };