@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.
- package/api.ts +3 -3
- package/bundled-realms/base/command.gts +73 -0
- package/bundled-test-harness/assets/adapter-TgpmkD23.js +2 -0
- package/bundled-test-harness/assets/add-field-to-card-definition-command-test-BVVD6_Wq.js +111 -0
- package/bundled-test-harness/assets/add-workspace-test-BvvYJ2Fk.js +71 -0
- package/bundled-test-harness/assets/ai-assistant-Ba_RBqf6.js +129 -0
- package/bundled-test-harness/assets/ai-assistant-panel-service-test-DK87n1hh.js +95 -0
- package/bundled-test-harness/assets/ai-assistant-test-CZATBlJS.js +2137 -0
- package/bundled-test-harness/assets/ai-function-generation-test-e58MHziu.js +996 -0
- package/bundled-test-harness/assets/ai-module-creation-test-CEieL3Fa.js +150 -0
- package/bundled-test-harness/assets/aibot-message-DhTbAqNk.js +1185 -0
- package/bundled-test-harness/assets/amd-transpile-test-CSk5COu7.js +425 -0
- package/bundled-test-harness/assets/app-Btfy4HWI.js +21464 -0
- package/bundled-test-harness/assets/apply-boxel-formatting-test-BHTP9NBp.js +134 -0
- package/bundled-test-harness/assets/apply-markdown-edit-test-BETCndeK.js +230 -0
- package/bundled-test-harness/assets/apply-search-replace-block-test-KNolar0-.js +630 -0
- package/bundled-test-harness/assets/arc-CA8yZ0zo.js +199 -0
- package/bundled-test-harness/assets/architecture-7EHR7CIX-C5JFMGdb.js +3 -0
- package/bundled-test-harness/assets/architectureDiagram-3BPJPVTR-CmVPjKgm.js +7400 -0
- package/bundled-test-harness/assets/auth-error-guard-test-D0rKESg_.js +30 -0
- package/bundled-test-harness/assets/auth-service-worker-test-DGg_vbKo.js +538 -0
- package/bundled-test-harness/assets/authed-fetch-test-CHF3eh_H.js +75 -0
- package/bundled-test-harness/assets/avif-image-def-test-p9tiyh4_.js +186 -0
- package/bundled-test-harness/assets/base-realm-Chjzrp6m.js +2 -0
- package/bundled-test-harness/assets/base-realm-DpSTsZxD.js +140 -0
- package/bundled-test-harness/assets/basic-test-D7qEz4hw.js +128 -0
- package/bundled-test-harness/assets/bfm-card-references-test-D-m1YnL8.js +577 -0
- package/bundled-test-harness/assets/binary-upload-dedupe-test-8RKK73EG.js +308 -0
- package/bundled-test-harness/assets/blockDiagram-GPEHLZMM-BdVFTa2C.js +4355 -0
- package/bundled-test-harness/assets/bot-registration-test-9zYny2wR.js +99 -0
- package/bundled-test-harness/assets/box-test-0T92xi3A.js +51 -0
- package/bundled-test-harness/assets/brand-guide-attachments-test-5ZtPn4cC.js +87 -0
- package/bundled-test-harness/assets/brand-guide-custom-css-test-CKKSgKyp.js +135 -0
- package/bundled-test-harness/assets/brand-logo-mark-field-test-nlNNQ3rw.js +87 -0
- package/bundled-test-harness/assets/broken-link-template-test-BGIExVof.js +345 -0
- package/bundled-test-harness/assets/browser-index-BaR-gTqG.js +3 -0
- package/bundled-test-harness/assets/browser-index-G4NKYBAj.js +8802 -0
- package/bundled-test-harness/assets/c4Diagram-AAUBKEIU-DyugX7zz.js +3764 -0
- package/bundled-test-harness/assets/cached-fetch-test-MtqvDphJ.js +93 -0
- package/bundled-test-harness/assets/can-read-realm-test-BZmwIOqS.js +58 -0
- package/bundled-test-harness/assets/cancel-indexing-job-test-BsQtQbDu.js +71 -0
- package/bundled-test-harness/assets/card-api-test-BxQ8f0-c.js +196 -0
- package/bundled-test-harness/assets/card-basics-test-B-uBZ8o4.js +4895 -0
- package/bundled-test-harness/assets/card-catalog-test-YmwmyIKf.js +377 -0
- package/bundled-test-harness/assets/card-copy-test-LoqdH1CQ.js +777 -0
- package/bundled-test-harness/assets/card-def-field-def-relationships-test-DvtBA1jv.js +560 -0
- package/bundled-test-harness/assets/card-def-menu-items-test-DHnd0LuM.js +182 -0
- package/bundled-test-harness/assets/card-delete-test-vKF0Jf1X.js +412 -0
- package/bundled-test-harness/assets/card-directory-name-test-CbCuPwSz.js +71 -0
- package/bundled-test-harness/assets/card-playground-test-CRIP3b5-.js +1497 -0
- package/bundled-test-harness/assets/card-prerender-ClYlSOBU.js +12661 -0
- package/bundled-test-harness/assets/card-search-adorn-test-Mggk5ZgY.js +128 -0
- package/bundled-test-harness/assets/card-search-query-builder-test-Cdl12s50.js +88 -0
- package/bundled-test-harness/assets/card-search-selection-menu-test-CtuCCLoB.js +108 -0
- package/bundled-test-harness/assets/channel-BKUMepxs.js +8 -0
- package/bundled-test-harness/assets/check-correctness-test-DBh8DT_f.js +252 -0
- package/bundled-test-harness/assets/chunk-2J33WTMH-ClrRoNQU.js +31 -0
- package/bundled-test-harness/assets/chunk-3OPIFGDE-g_0Oh8jN.js +5548 -0
- package/bundled-test-harness/assets/chunk-4BX2VUAB-D2LCc7Y9.js +11 -0
- package/bundled-test-harness/assets/chunk-4EGX6M5U-D8vRS5IG.js +44 -0
- package/bundled-test-harness/assets/chunk-55IACEB6-C5j4VAmb.js +10 -0
- package/bundled-test-harness/assets/chunk-5DO6E6H7-CPb3jsP0.js +27 -0
- package/bundled-test-harness/assets/chunk-5ZQYHXKU-BlVb7vgG.js +1767 -0
- package/bundled-test-harness/assets/chunk-727SXJPM-C_NVCDMC.js +3877 -0
- package/bundled-test-harness/assets/chunk-AQP2D5EJ-CpwrMix_.js +2622 -0
- package/bundled-test-harness/assets/chunk-BR22UD5L-AF0NWdjT.js +85 -0
- package/bundled-test-harness/assets/chunk-BSJP7CBP-Dgun5vYb.js +114 -0
- package/bundled-test-harness/assets/chunk-CSCIHK7Q-D7nFiAZ-.js +6144 -0
- package/bundled-test-harness/assets/chunk-FHYWG6QK-2nuXS9PL.js +27 -0
- package/bundled-test-harness/assets/chunk-FMBD7UC4-O-Y8VK1S.js +20 -0
- package/bundled-test-harness/assets/chunk-KSCS5N6A-Du5-DprU.js +871 -0
- package/bundled-test-harness/assets/chunk-L5ZTLDWV-C2lDtkix.js +43 -0
- package/bundled-test-harness/assets/chunk-LZXEDZCA-qAMsMZkF.js +65 -0
- package/bundled-test-harness/assets/chunk-MPE355IW-DcT_60Oq.js +27 -0
- package/bundled-test-harness/assets/chunk-MZUSXYTE-BsH_YmnC.js +36 -0
- package/bundled-test-harness/assets/chunk-N66VUXT2-DMyMHgoS.js +70 -0
- package/bundled-test-harness/assets/chunk-ND2GUHAM-DO1Znn8O.js +93 -0
- package/bundled-test-harness/assets/chunk-NZK2D7GU-B1YWBxHm.js +89 -0
- package/bundled-test-harness/assets/chunk-O5CBEL6O-CZVSBsRq.js +2395 -0
- package/bundled-test-harness/assets/chunk-PUPMXCY4-DzOK-Vbt.js +27 -0
- package/bundled-test-harness/assets/chunk-QZHKN3VN-DJFnRn99.js +20 -0
- package/bundled-test-harness/assets/chunk-UIBZB4QT-5KIxBxjk.js +27 -0
- package/bundled-test-harness/assets/chunk-WCWK7LTN-BsQwhliq.js +36 -0
- package/bundled-test-harness/assets/chunk-WU5MYG2G-DUVb5MAo.js +12 -0
- package/bundled-test-harness/assets/chunk-XPW4576I-DLaJYAOU.js +2341 -0
- package/bundled-test-harness/assets/classDiagram-4FO5ZUOK-DjP2uozG.js +31 -0
- package/bundled-test-harness/assets/classDiagram-v2-Q7XG4LA2-Dt6ps5uz.js +31 -0
- package/bundled-test-harness/assets/code-equality-assertion-BBezFT13.js +474 -0
- package/bundled-test-harness/assets/code-patches-test-DzoQGARM.js +1128 -0
- package/bundled-test-harness/assets/code-patching-test-D8r-pJ5w.js +114 -0
- package/bundled-test-harness/assets/code-ref-test-DU3HChNz.js +138 -0
- package/bundled-test-harness/assets/code-semantics-service-test-DArUotKy.js +65 -0
- package/bundled-test-harness/assets/code-submode-test-h5wWKsz2.js +1762 -0
- package/bundled-test-harness/assets/codeblocks-test-FbuwTy5v.js +492 -0
- package/bundled-test-harness/assets/codemirror-context-DVlC9C78.js +2 -0
- package/bundled-test-harness/assets/codemirror-editor-test-JDT9uwqM.js +1176 -0
- package/bundled-test-harness/assets/color-field-test-BssRlQAX.js +213 -0
- package/bundled-test-harness/assets/command-definitions-test-J21kOxBs.js +72 -0
- package/bundled-test-harness/assets/commands-DAo0DgCX.js +1379 -0
- package/bundled-test-harness/assets/commands-calling-test-C3deVvv_.js +200 -0
- package/bundled-test-harness/assets/commands-test--0zViqs2.js +1041 -0
- package/bundled-test-harness/assets/commands-test-BwNn2npL.js +1145 -0
- package/bundled-test-harness/assets/computed-test-BD_KrZmc.js +882 -0
- package/bundled-test-harness/assets/container-C8gu0I0Q.js +14605 -0
- package/bundled-test-harness/assets/convert-to-class-name-test-CX21VRzM.js +17 -0
- package/bundled-test-harness/assets/copy-and-edit-test-BUy_o8XJ.js +291 -0
- package/bundled-test-harness/assets/copy-card-test-LWbugEPe.js +156 -0
- package/bundled-test-harness/assets/copy-file-to-realm-test-BS25EUGV.js +99 -0
- package/bundled-test-harness/assets/copy-source-test-Dh33cqM8.js +56 -0
- package/bundled-test-harness/assets/cose-bilkent-S5V4N54A-CjAFDdpS.js +4275 -0
- package/bundled-test-harness/assets/create-file-test-DOc3YYij.js +963 -0
- package/bundled-test-harness/assets/create-file-test-DgUya7-i.js +397 -0
- package/bundled-test-harness/assets/create-listing-modal-test-DZxZBYS7.js +194 -0
- package/bundled-test-harness/assets/create-listing-pr-request-Aw0ms76l.js +64 -0
- package/bundled-test-harness/assets/create-listing-pr-request-test-CFvqkgky.js +117 -0
- package/bundled-test-harness/assets/create-spec-test-BTRt8oe8.js +239 -0
- package/bundled-test-harness/assets/csv-file-def-test-BVffg8wL.js +101 -0
- package/bundled-test-harness/assets/dagre-BM42HDAG-GoRrN65x.js +606 -0
- package/bundled-test-harness/assets/dagre-ByxOOmYM.js +4195 -0
- package/bundled-test-harness/assets/date-time-fields-test-BEcfCqgB.js +322 -0
- package/bundled-test-harness/assets/debug-message-test-CAxbe6x2.js +119 -0
- package/bundled-test-harness/assets/diagram-2AECGRRQ-B6-pvp9H.js +279 -0
- package/bundled-test-harness/assets/diagram-5GNKFQAL-C9M7hXIc.js +142 -0
- package/bundled-test-harness/assets/diagram-KO2AKTUF-BNJvCLGK.js +551 -0
- package/bundled-test-harness/assets/diagram-LMA3HP47-hlJyTtqP.js +184 -0
- package/bundled-test-harness/assets/diagram-OG6HWLK6-BvPoB3IH.js +857 -0
- package/bundled-test-harness/assets/diffing-test-De9Ev_Fr.js +210 -0
- package/bundled-test-harness/assets/dist-BsEojs3T.js +232 -0
- package/bundled-test-harness/assets/dist-CY3T64Hs.js +105 -0
- package/bundled-test-harness/assets/dist-q2xz8RMj.js +2 -0
- package/bundled-test-harness/assets/editor-test-DOI_TvWQ.js +551 -0
- package/bundled-test-harness/assets/editor.main-CpuM6HrX.js +43566 -0
- package/bundled-test-harness/assets/editor.main-DkMgS1qm.js +3 -0
- package/bundled-test-harness/assets/email-field-test-t-80Z94b.js +74 -0
- package/bundled-test-harness/assets/enum-field-test-DVp-2pip.js +909 -0
- package/bundled-test-harness/assets/erDiagram-TEJ5UH35-CYniRkua.js +2041 -0
- package/bundled-test-harness/assets/error-display-test-IuRxKyLz.js +343 -0
- package/bundled-test-harness/assets/evaluate-module-test-DdnfbFp-.js +66 -0
- package/bundled-test-harness/assets/eventmodeling-FCH6USID-BO089-Cs.js +3 -0
- package/bundled-test-harness/assets/execute-atomic-operations-test-CgbvrBlu.js +75 -0
- package/bundled-test-harness/assets/externals-5atxeNU4.js +5533 -0
- package/bundled-test-harness/assets/extract-css-variables-test-Cii-CYfc.js +169 -0
- package/bundled-test-harness/assets/fallback-banner-test-CUUd-Wuu.js +227 -0
- package/bundled-test-harness/assets/fallback-banner-test-D4NWyahM.js +53 -0
- package/bundled-test-harness/assets/fallback-models-test-2MJ1jAs8.js +163 -0
- package/bundled-test-harness/assets/fetch-card-json-test-Cruqsq6S.js +63 -0
- package/bundled-test-harness/assets/fetcher-test-CkHlbTzz.js +85 -0
- package/bundled-test-harness/assets/field-configuration-test-CqwsGNib.js +535 -0
- package/bundled-test-harness/assets/field-markdown-domain-test-DPjz8i4Y.js +615 -0
- package/bundled-test-harness/assets/field-markdown-primitives-test-Dw07UtT7.js +362 -0
- package/bundled-test-harness/assets/field-markdown-specialized-test-C-t34PAw.js +527 -0
- package/bundled-test-harness/assets/field-path-parser-test-BeNjacPu.js +387 -0
- package/bundled-test-harness/assets/field-playground-test-BILTGxqr.js +902 -0
- package/bundled-test-harness/assets/field-support-predicates-test-Df24w0Wa.js +170 -0
- package/bundled-test-harness/assets/field-test-helpers-P22hxBNz.js +45 -0
- package/bundled-test-harness/assets/file-attachment-test-Cjg4NBeM.js +635 -0
- package/bundled-test-harness/assets/file-chooser-test-Cl0XujPT.js +439 -0
- package/bundled-test-harness/assets/file-def-live-reload-test-D4Obzi12.js +50 -0
- package/bundled-test-harness/assets/file-def-manager-DUgR-gjs.js +470 -0
- package/bundled-test-harness/assets/file-def-manager-canonicalize-test-D_LWVsvz.js +451 -0
- package/bundled-test-harness/assets/file-def-menu-items-test-xvsUTOK4.js +114 -0
- package/bundled-test-harness/assets/file-def-navigation-test-DxPceB7E.js +109 -0
- package/bundled-test-harness/assets/file-def-serialization-test-CpwbDb8p.js +87 -0
- package/bundled-test-harness/assets/file-def-test-CEnKcvW9.js +219 -0
- package/bundled-test-harness/assets/file-tree-test-DE2aH6iq.js +773 -0
- package/bundled-test-harness/assets/flac-audio-def-test-BCg7LnR6.js +138 -0
- package/bundled-test-harness/assets/flowDiagram-I6XJVG4X-Xv8-LIxQ.js +4883 -0
- package/bundled-test-harness/assets/formatted-aibot-message-test-CsxFn62P.js +366 -0
- package/bundled-test-harness/assets/formatted-user-message-test-DjZc8qnA.js +43 -0
- package/bundled-test-harness/assets/freestyle-test-QEZaZCNJ.js +17 -0
- package/bundled-test-harness/assets/full-reindex-realm-test-C_c2OTTD.js +103 -0
- package/bundled-test-harness/assets/ganttDiagram-6RSMTGT7-DmvkzS5w.js +4060 -0
- package/bundled-test-harness/assets/garbage-collection-test-BVuvfidI.js +373 -0
- package/bundled-test-harness/assets/general-test-Ydis4jEq.js +926 -0
- package/bundled-test-harness/assets/generate-css-variables-test-CZCmgTAO.js +88 -0
- package/bundled-test-harness/assets/generate-example-cards-one-shot-test-x_szhkSN.js +67 -0
- package/bundled-test-harness/assets/get-available-realm-identifiers-test-DvRnwCHR.js +49 -0
- package/bundled-test-harness/assets/get-catalog-realm-identifiers-test-46TE-XA0.js +49 -0
- package/bundled-test-harness/assets/get-default-writable-realm-test-DaAkxTNh.js +56 -0
- package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-9XEGHVOV.js +55 -0
- package/bundled-test-harness/assets/get-relationship-membership-state-test-BY4gk5JZ.js +1306 -0
- package/bundled-test-harness/assets/get-type-refs-from-filter-test-BynlX0JE.js +136 -0
- package/bundled-test-harness/assets/get-user-system-card-test-D98Xxn1k.js +52 -0
- package/bundled-test-harness/assets/gif-image-def-test-FwKGFGWw.js +161 -0
- package/bundled-test-harness/assets/gitGraph-WXDBUCRP-Bmn0Z_Xi.js +3 -0
- package/bundled-test-harness/assets/gitGraphDiagram-PVQCEYII-BAo0G82W.js +1150 -0
- package/bundled-test-harness/assets/gts-file-def-test-ivEk8Muv.js +99 -0
- package/bundled-test-harness/assets/head-format-preview-test-CNhvk724.js +156 -0
- package/bundled-test-harness/assets/helpers-BH4Yfo_2.js +5 -0
- package/bundled-test-harness/assets/host-mode-test-BRNndb2h.js +391 -0
- package/bundled-test-harness/assets/host-submode-test-DHd0x-6x.js +904 -0
- package/bundled-test-harness/assets/index-query-engine-test-7Fzc09fG.js +2548 -0
- package/bundled-test-harness/assets/index-writer-test-D3cL2q2N.js +1842 -0
- package/bundled-test-harness/assets/indexeddb-crypto-store-C09Shau-.js +49434 -0
- package/bundled-test-harness/assets/info-J43DQDTF-Dz5b1Xgc.js +3 -0
- package/bundled-test-harness/assets/infoDiagram-5YYISTIA-Dl8XvIfi.js +23 -0
- package/bundled-test-harness/assets/inspector-test-CVZVQdIJ.js +1776 -0
- package/bundled-test-harness/assets/instance-filter-matcher-test-C-4z6qUt.js +564 -0
- package/bundled-test-harness/assets/instantiate-card-test-eQ22Vt_m.js +104 -0
- package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-hXPsRPMU.js +497 -0
- package/bundled-test-harness/assets/interact-submode-setup-D55IIVc5.js +558 -0
- package/bundled-test-harness/assets/interact-submode-test-BwrtFe2m.js +725 -0
- package/bundled-test-harness/assets/invalidate-realm-identifiers-test-BMk7yd-D.js +101 -0
- package/bundled-test-harness/assets/invite-user-to-room-test-B5B0umJQ.js +67 -0
- package/bundled-test-harness/assets/ishikawaDiagram-YF4QCWOH-BrO7NAng.js +1009 -0
- package/bundled-test-harness/assets/isolated-render-test-DX1wdHoS.js +51 -0
- package/bundled-test-harness/assets/item-button-QkVr-FW0.js +203 -0
- package/bundled-test-harness/assets/javascript-BWNQhcCY.js +75 -0
- package/bundled-test-harness/assets/job-priority-header-test-CuBZloLK.js +81 -0
- package/bundled-test-harness/assets/journeyDiagram-JHISSGLW-B7BT66v0.js +1256 -0
- package/bundled-test-harness/assets/jpg-image-def-test-DEx462nY.js +430 -0
- package/bundled-test-harness/assets/json-file-def-test-Cray6ly6.js +92 -0
- package/bundled-test-harness/assets/kanban-definition-UN3LZRKU-C0E5Vmr_.js +1284 -0
- package/bundled-test-harness/assets/last-modified-date-test-BzE25NOB.js +18 -0
- package/bundled-test-harness/assets/limited-set-test-NwGNoXKc.js +123 -0
- package/bundled-test-harness/assets/line-BbGOk93s.js +55 -0
- package/bundled-test-harness/assets/linear-CHTo-YQl.js +417 -0
- package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-CZdgRM1b.js +315 -0
- package/bundled-test-harness/assets/linksto-error-sentinel-test-DhsHO7Xs.js +236 -0
- package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-mt-RrRta.js +303 -0
- package/bundled-test-harness/assets/linksto-many-per-slot-access-test-CdGUXZsi.js +301 -0
- package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-DOJ_6Gwf.js +258 -0
- package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-BZC-gslF.js +194 -0
- package/bundled-test-harness/assets/live-prerendered-search-BSkwf5AH.js +639 -0
- package/bundled-test-harness/assets/live-test-DTfxZnsy.js +100 -0
- package/bundled-test-harness/assets/live-test-WOMYpc1I.js +2 -0
- package/bundled-test-harness/assets/loader-icon-error-test-F_ukQytn.js +62 -0
- package/bundled-test-harness/assets/loader-parallel-prefetch-test-DpNaFnhc.js +257 -0
- package/bundled-test-harness/assets/loader-retry-test-EQ2X0bFS.js +173 -0
- package/bundled-test-harness/assets/loader-test-BYkWAwc4.js +245 -0
- package/bundled-test-harness/assets/loading-test-jfWH_OpH.js +63 -0
- package/bundled-test-harness/assets/login-error-text-test-Cldr1X6h.js +51 -0
- package/bundled-test-harness/assets/m4a-audio-def-test-BQ1WKApD.js +185 -0
- package/bundled-test-harness/assets/main-ByAsLO_g.js +5 -0
- package/bundled-test-harness/assets/markdown-fallback-test-dtTaGP1s.js +316 -0
- package/bundled-test-harness/assets/markdown-file-def-test-shW9Xxd1.js +286 -0
- package/bundled-test-harness/assets/markdown-helpers-test-B6H7p4ay.js +183 -0
- package/bundled-test-harness/assets/markdown-highlighting-test-ZIrFNHRe.js +244 -0
- package/bundled-test-harness/assets/markdown-preview-KII3nJ2M.js +69 -0
- package/bundled-test-harness/assets/markdown-preview-test-De-IaUbK.js +237 -0
- package/bundled-test-harness/assets/marked-sync-CGSehq4u.js +2 -0
- package/bundled-test-harness/assets/marked-sync-DenC7QgC.js +2561 -0
- package/bundled-test-harness/assets/marked-sync-test-jZBr20Hq.js +146 -0
- package/bundled-test-harness/assets/matrix-service-sliding-sync-test-Ax4kyAMt.js +33 -0
- package/bundled-test-harness/assets/mermaid-parser.core-B_3tzKUl.js +114 -0
- package/bundled-test-harness/assets/mermaid.core-D2hqA7Hq.js +1700 -0
- package/bundled-test-harness/assets/message-service-subscription-test-B42KnJ91.js +113 -0
- package/bundled-test-harness/assets/mindmap-definition-RKZ34NQL-IZz7Qpd0.js +1347 -0
- package/bundled-test-harness/assets/mock-matrix-BhFWlMMr.js +14292 -0
- package/bundled-test-harness/assets/mock-matrix-CrtMntcN.js +2 -0
- package/bundled-test-harness/assets/module-transpile-cache-test-BtWN4OiM.js +66 -0
- package/bundled-test-harness/assets/monaco.contribution-B1hOUP3w.js +2 -0
- package/bundled-test-harness/assets/monaco.contribution-DhNsYtZe.js +2 -0
- package/bundled-test-harness/assets/monaco.contribution-DvJDImx2.js +103 -0
- package/bundled-test-harness/assets/monaco.contribution-yXcOyzue.js +243 -0
- package/bundled-test-harness/assets/mp3-audio-def-test-D365TuA7.js +129 -0
- package/bundled-test-harness/assets/mutex-test-DY09HLvv.js +71 -0
- package/bundled-test-harness/assets/number-field-test-wYaQjnzA.js +153 -0
- package/bundled-test-harness/assets/ogg-audio-def-test-Dl01PP31.js +191 -0
- package/bundled-test-harness/assets/open-create-listing-modal-test-D8C2PUFv.js +117 -0
- package/bundled-test-harness/assets/open-workspace-test-DN2n8IkC.js +48 -0
- package/bundled-test-harness/assets/operator-mode-acceptance-test-B_hzJZo4.js +1044 -0
- package/bundled-test-harness/assets/operator-mode-card-catalog-test-Hrrnkdt9.js +989 -0
- package/bundled-test-harness/assets/operator-mode-links-test-DC6sc9TZ.js +797 -0
- package/bundled-test-harness/assets/operator-mode-state-service-test-Aqz9_v0U.js +122 -0
- package/bundled-test-harness/assets/operator-mode-test-CLgpZGEM.js +617 -0
- package/bundled-test-harness/assets/operator-mode-ui-test-CDRrORfC.js +985 -0
- package/bundled-test-harness/assets/ordinal-BIRuJQBH.js +85 -0
- package/bundled-test-harness/assets/overlay-menu-items-test-of24KuXp.js +316 -0
- package/bundled-test-harness/assets/packet-YPE3B663-hs92geQG.js +3 -0
- package/bundled-test-harness/assets/panel-rIdTMDfK.js +3371 -0
- package/bundled-test-harness/assets/past-sessions-test-ZKr4ACF0.js +321 -0
- package/bundled-test-harness/assets/patch-code-test-BZa-Itrt.js +203 -0
- package/bundled-test-harness/assets/patch-fields-test-BkaHs-zo.js +992 -0
- package/bundled-test-harness/assets/patch-instance-test-CRMgg52p.js +287 -0
- package/bundled-test-harness/assets/persist-module-inspector-view-test-CqNy2RXR.js +62 -0
- package/bundled-test-harness/assets/phone-number-field-test-CV6gntON.js +72 -0
- package/bundled-test-harness/assets/pie-LRSECV5Y-DcM5pWE3.js +3 -0
- package/bundled-test-harness/assets/pieDiagram-4H26LBE5-CtO8RHpU.js +253 -0
- package/bundled-test-harness/assets/plan-install-test-lfBTuWXU.js +417 -0
- package/bundled-test-harness/assets/playground-VscW9KdT.js +57 -0
- package/bundled-test-harness/assets/png-image-def-test-CRspcIHP.js +222 -0
- package/bundled-test-harness/assets/prerender-file-extract-test-D3SpxfMI.js +176 -0
- package/bundled-test-harness/assets/prerender-html-test-WWptGXJ0.js +615 -0
- package/bundled-test-harness/assets/prerender-meta-test-DwQEGN6j.js +388 -0
- package/bundled-test-harness/assets/prerender-module-test-BM1AOwRF.js +195 -0
- package/bundled-test-harness/assets/prerendered-card-search-test-BVJ8IHLe.js +708 -0
- package/bundled-test-harness/assets/preview-format-test-DDpiXDN_.js +103 -0
- package/bundled-test-harness/assets/preview-test-D2UV1C5D.js +455 -0
- package/bundled-test-harness/assets/published-realm-url-DUIZzAJ5.js +52 -0
- package/bundled-test-harness/assets/published-realm-url-test-CIgSf4Ub.js +137 -0
- package/bundled-test-harness/assets/qs-test-Bi679H5w.js +36 -0
- package/bundled-test-harness/assets/quadrantDiagram-W4KKPZXB-GOTAKsCo.js +2324 -0
- package/bundled-test-harness/assets/query-field-barrier-test-BlOuVxdS.js +118 -0
- package/bundled-test-harness/assets/query-field-error-sentinel-test-BsB76iUQ.js +202 -0
- package/bundled-test-harness/assets/query-field-normalization-test-B2YodJCr.js +271 -0
- package/bundled-test-harness/assets/query-field-schema-test-CQhJASFx.js +231 -0
- package/bundled-test-harness/assets/query-fields-test-CaZ19leM.js +535 -0
- package/bundled-test-harness/assets/queue-test-DrSip6mJ.js +216 -0
- package/bundled-test-harness/assets/radar-GUYGQ44K-BkAe1nkp.js +3 -0
- package/bundled-test-harness/assets/read-card-for-ai-assistant-test-D8yB-OL9.js +91 -0
- package/bundled-test-harness/assets/read-file-for-ai-assistant-test-K3M0-lBD.js +45 -0
- package/bundled-test-harness/assets/read-source-test-CKlb0ORb.js +67 -0
- package/bundled-test-harness/assets/read-text-file-test-CJdasDDU.js +124 -0
- package/bundled-test-harness/assets/realm-DhUCLR5r.js +884 -0
- package/bundled-test-harness/assets/realm-field-test-kFgxphDI.js +101 -0
- package/bundled-test-harness/assets/realm-index-card-id-test-DAnMAqw4.js +18 -0
- package/bundled-test-harness/assets/realm-indexing-test-BQkX-Dat.js +4018 -0
- package/bundled-test-harness/assets/realm-paths-test-CmEi9rzu.js +33 -0
- package/bundled-test-harness/assets/realm-querying-test-eq3qSXLu.js +1062 -0
- package/bundled-test-harness/assets/realm-test-DLQAtdMt.js +2409 -0
- package/bundled-test-harness/assets/reasoning-test-CwTfyDlj.js +234 -0
- package/bundled-test-harness/assets/recent-files-test-MVIGLp8S.js +449 -0
- package/bundled-test-harness/assets/reindex-realm-test-BwLgJeB3.js +119 -0
- package/bundled-test-harness/assets/relationship-loading-state-test-B4Ca43yD.js +289 -0
- package/bundled-test-harness/assets/render-component-BKEihV4U.js +2 -0
- package/bundled-test-harness/assets/render-error-test-DWD6tfNe.js +22 -0
- package/bundled-test-harness/assets/render-service-test-BjuoVrUK.js +87 -0
- package/bundled-test-harness/assets/render-timer-stub-test-BgUY5u3X.js +84 -0
- package/bundled-test-harness/assets/rendered-markdown-DOP-s6fW.js +211 -0
- package/bundled-test-harness/assets/rendered-markdown-test-CD02UYwA.js +360 -0
- package/bundled-test-harness/assets/requirementDiagram-4Y6WPE33-DJIy7eR9.js +2550 -0
- package/bundled-test-harness/assets/rich-markdown-field-test-BJeQx1tL.js +806 -0
- package/bundled-test-harness/assets/room-message-test-CjD7FlPD.js +171 -0
- package/bundled-test-harness/assets/rust-crypto-GS0FFZ7H.js +16141 -0
- package/bundled-test-harness/assets/sanitize-module-list-test-gi0pcqSy.js +68 -0
- package/bundled-test-harness/assets/sankeyDiagram-5OEKKPKP-wBsbt1Mr.js +1357 -0
- package/bundled-test-harness/assets/schema-editor-test-BSqu8W3e.js +784 -0
- package/bundled-test-harness/assets/schema-generation-test-DVFuSsLl.js +28 -0
- package/bundled-test-harness/assets/scrolling-test-CpzkRiBS.js +292 -0
- package/bundled-test-harness/assets/search-and-choose-test-DVWX4XRb.js +156 -0
- package/bundled-test-harness/assets/search-cache-key-test-BMnYM4a5.js +79 -0
- package/bundled-test-harness/assets/search-command-test-kEfT0AO7.js +135 -0
- package/bundled-test-harness/assets/search-correlation-id-test-D08FtVUZ.js +101 -0
- package/bundled-test-harness/assets/search-data-test-CTrBEc1m.js +243 -0
- package/bundled-test-harness/assets/search-google-images-test-UnKG8qCp.js +168 -0
- package/bundled-test-harness/assets/search-in-flight-key-test-9Va-JXFz.js +79 -0
- package/bundled-test-harness/assets/search-test-COlO2lZi.js +847 -0
- package/bundled-test-harness/assets/send-ai-assistant-message-test-BPjOjt2R.js +52 -0
- package/bundled-test-harness/assets/send-bot-trigger-event-test-BB4lHbB_.js +56 -0
- package/bundled-test-harness/assets/send-request-via-proxy-test-U8frmHZA.js +333 -0
- package/bundled-test-harness/assets/sending-test-DjEzksEX.js +317 -0
- package/bundled-test-harness/assets/sequenceDiagram-3UESZ5HK-QAEjhoay.js +5551 -0
- package/bundled-test-harness/assets/serialization-test-DHdLriC8.js +8283 -0
- package/bundled-test-harness/assets/set-user-system-card-test-C8I1lDBh.js +59 -0
- package/bundled-test-harness/assets/setup-BkuybBki.js +769 -0
- package/bundled-test-harness/assets/setup-gxkWJKID.js +2 -0
- package/bundled-test-harness/assets/show-card-test-DHKQ6AI4.js +362 -0
- package/bundled-test-harness/assets/skills-test-DlMgZrPV.js +568 -0
- package/bundled-test-harness/assets/spec-test-s9Zj7x2E.js +1012 -0
- package/bundled-test-harness/assets/stateDiagram-AJRCARHV-nEhf3efZ.js +363 -0
- package/bundled-test-harness/assets/stateDiagram-v2-BHNVJYJU-tZz_3w-7.js +29 -0
- package/bundled-test-harness/assets/store-add-test-D44FWRl3.js +52 -0
- package/bundled-test-harness/assets/store-test-TTmNBs5v.js +1562 -0
- package/bundled-test-harness/assets/summarize-session-test-DHAuNb5K.js +169 -0
- package/bundled-test-harness/assets/svg-image-def-test-C2_GGzR6.js +164 -0
- package/bundled-test-harness/assets/switch-submode-test-CfGaoxVe.js +168 -0
- package/bundled-test-harness/assets/test-realm-service-worker-C21o7yvW.js +73 -0
- package/bundled-test-harness/assets/tests-BSt6h9iC.js +2771 -0
- package/bundled-test-harness/assets/text-file-def-test-CR4QO7e_.js +93 -0
- package/bundled-test-harness/assets/text-input-validator-test-DYS3mFj9.js +155 -0
- package/bundled-test-harness/assets/text-suggestion-test-GUxJ7WtF.js +339 -0
- package/bundled-test-harness/assets/theme-card-test-Ba2KqFB8.js +573 -0
- package/bundled-test-harness/assets/timeline-definition-PNZ67QCA-BQYyTIei.js +1545 -0
- package/bundled-test-harness/assets/transform-cards-test-DyA8eCom.js +341 -0
- package/bundled-test-harness/assets/treeView-BLDUP644-Z4ezSvef.js +3 -0
- package/bundled-test-harness/assets/treemap-LRROVOQU-Bf5rk_He.js +3 -0
- package/bundled-test-harness/assets/ts-file-def-test-Cxnc6H74.js +90 -0
- package/bundled-test-harness/assets/tsMode-oJEHe-CR.js +968 -0
- package/bundled-test-harness/assets/typescript-DLbb7q56.js +2 -0
- package/bundled-test-harness/assets/update-room-skills-test-B7VLHU3-.js +197 -0
- package/bundled-test-harness/assets/url-test-w-69Zycf.js +103 -0
- package/bundled-test-harness/assets/use-ai-assistant-test-DJkFz7_b.js +330 -0
- package/bundled-test-harness/assets/validate-realm-test-BioLutB8.js +53 -0
- package/bundled-test-harness/assets/vennDiagram-CIIHVFJN-9eLwsQET.js +2833 -0
- package/bundled-test-harness/assets/wardley-L42UT6IY-qNP5_917.js +3 -0
- package/bundled-test-harness/assets/wardleyDiagram-YWT4CUSO-DZhEm4N4.js +872 -0
- package/bundled-test-harness/assets/wav-audio-def-test-DqsTEBw8.js +155 -0
- package/bundled-test-harness/assets/webp-image-def-test-23wOLPMu.js +225 -0
- package/bundled-test-harness/assets/workspace-chooser-delete-test-Q6S_nGDT.js +189 -0
- package/bundled-test-harness/assets/workspace-chooser-test-CzsvY1v_.js +235 -0
- package/bundled-test-harness/assets/workspace-delete-multiple-test-BNFHkJpQ.js +213 -0
- package/bundled-test-harness/assets/workspace-delete-summary-test-DLzNdjvC.js +63 -0
- package/bundled-test-harness/assets/write-binary-file-test-PHHt9fVI.js +100 -0
- package/bundled-test-harness/assets/write-text-file-test-DuHe6tR5.js +172 -0
- package/bundled-test-harness/assets/xychartDiagram-2RQKCTM6-bflHQbEv.js +2551 -0
- package/bundled-test-harness/index.html +24 -23
- package/bundled-test-harness/tests/index.html +31 -30
- package/bundled-types/base/command.d.ts +48 -0
- package/bundled-types/host-app/components/operator-mode/publish-realm-modal.gts +17 -26
- package/bundled-types/host-app/lib/published-realm-url.ts +135 -0
- package/package.json +2 -2
- package/src/build-program.ts +12 -12
- package/src/commands/consolidate-workspaces.ts +1 -1
- package/src/commands/file/delete.ts +4 -4
- package/src/commands/file/index.ts +6 -6
- package/src/commands/file/lint.ts +4 -4
- package/src/commands/file/list.ts +3 -3
- package/src/commands/file/read.ts +3 -3
- package/src/commands/file/touch.ts +6 -6
- package/src/commands/file/write.ts +3 -3
- package/src/commands/lint.ts +6 -6
- package/src/commands/parse.ts +6 -6
- package/src/commands/profile.ts +4 -4
- package/src/commands/read-transpiled.ts +6 -3
- package/src/commands/realm/cancel-indexing.ts +3 -3
- package/src/commands/realm/create.ts +2 -2
- package/src/commands/realm/history.ts +4 -4
- package/src/commands/realm/index.ts +15 -15
- package/src/commands/realm/indexing-errors.ts +3 -3
- package/src/commands/realm/list.ts +2 -2
- package/src/commands/realm/milestone.ts +4 -4
- package/src/commands/realm/publish.ts +4 -4
- package/src/commands/realm/pull.ts +6 -6
- package/src/commands/realm/push.ts +7 -7
- package/src/commands/realm/remove.ts +3 -3
- package/src/commands/realm/status.ts +8 -8
- package/src/commands/realm/sync.ts +9 -9
- package/src/commands/realm/unpublish.ts +3 -3
- package/src/commands/realm/wait-for-ready.ts +2 -2
- package/src/commands/realm/watch/index.ts +2 -2
- package/src/commands/realm/watch/start.ts +13 -10
- package/src/commands/realm/watch/stop.ts +2 -2
- package/src/commands/run-command.ts +6 -3
- package/src/commands/search.ts +3 -3
- package/src/commands/test.ts +5 -5
- package/src/index.ts +2 -2
- package/src/lib/auth-resolver.ts +3 -3
- package/src/lib/boxel-cli-client.ts +18 -15
- package/src/lib/checkpoint-manager.ts +1 -1
- package/src/lib/find-checkpoint.ts +1 -1
- package/src/lib/profile-manager.ts +4 -4
- package/src/lib/realm-local-paths.ts +1 -1
- package/src/lib/realm-sync-base.ts +1 -1
- package/src/lib/seed-auth.ts +1 -1
- package/src/lib/sync-logic.ts +1 -1
- package/src/lib/watch-process-registry.ts +1 -1
- package/bundled-test-harness/assets/adapter-C8oDflNN.js +0 -2
- package/bundled-test-harness/assets/add-field-to-card-definition-command-test-Cs670972.js +0 -111
- package/bundled-test-harness/assets/add-workspace-test-BviDAUBK.js +0 -71
- package/bundled-test-harness/assets/ai-assistant-B5fp2iOz.js +0 -129
- package/bundled-test-harness/assets/ai-assistant-panel-service-test-NpHZzZAz.js +0 -95
- package/bundled-test-harness/assets/ai-assistant-test-jPV29jEw.js +0 -2137
- package/bundled-test-harness/assets/ai-function-generation-test-QRPcE9tQ.js +0 -996
- package/bundled-test-harness/assets/ai-module-creation-test-DyuyfnkY.js +0 -150
- package/bundled-test-harness/assets/aibot-message-Dwxp5hTW.js +0 -1185
- package/bundled-test-harness/assets/amd-transpile-test-CF7Lkbif.js +0 -425
- package/bundled-test-harness/assets/app-CgP2IpNG.js +0 -21464
- package/bundled-test-harness/assets/apply-boxel-formatting-test-BXyZ3z0I.js +0 -134
- package/bundled-test-harness/assets/apply-markdown-edit-test-C6bcaj3a.js +0 -230
- package/bundled-test-harness/assets/apply-search-replace-block-test-BSwC4J9g.js +0 -630
- package/bundled-test-harness/assets/arc-DNRb_8LA.js +0 -199
- package/bundled-test-harness/assets/architecture-7EHR7CIX-BtVh_LBJ.js +0 -3
- package/bundled-test-harness/assets/architectureDiagram-3BPJPVTR-D9UYbaKj.js +0 -7400
- package/bundled-test-harness/assets/auth-error-guard-test-Bvu8E7Wy.js +0 -30
- package/bundled-test-harness/assets/auth-service-worker-test-CC6DzdfK.js +0 -538
- package/bundled-test-harness/assets/authed-fetch-test-CfF-IBHI.js +0 -75
- package/bundled-test-harness/assets/avif-image-def-test-B9L2z0nR.js +0 -186
- package/bundled-test-harness/assets/base-realm-43wjttN2.js +0 -140
- package/bundled-test-harness/assets/base-realm-CJ5x9iyX.js +0 -2
- package/bundled-test-harness/assets/basic-test-B64a5zCK.js +0 -128
- package/bundled-test-harness/assets/bfm-card-references-test-cLQVLpth.js +0 -577
- package/bundled-test-harness/assets/binary-upload-dedupe-test-By7Y1iQ3.js +0 -308
- package/bundled-test-harness/assets/blockDiagram-GPEHLZMM-LgOorG2O.js +0 -4355
- package/bundled-test-harness/assets/bot-registration-test-DOjf0P1R.js +0 -99
- package/bundled-test-harness/assets/box-test-Cd1-RcXg.js +0 -51
- package/bundled-test-harness/assets/brand-guide-attachments-test-DxRqP8fo.js +0 -87
- package/bundled-test-harness/assets/brand-guide-custom-css-test-DBpZiHzJ.js +0 -135
- package/bundled-test-harness/assets/brand-logo-mark-field-test-61k4e5Om.js +0 -87
- package/bundled-test-harness/assets/broken-link-template-test-A1P4flQ5.js +0 -345
- package/bundled-test-harness/assets/browser-index-Bzhpucwe.js +0 -3
- package/bundled-test-harness/assets/browser-index-D0mzSWYV.js +0 -8802
- package/bundled-test-harness/assets/c4Diagram-AAUBKEIU-1iq94vGa.js +0 -3764
- package/bundled-test-harness/assets/cached-fetch-test-ByQ-5OQI.js +0 -93
- package/bundled-test-harness/assets/can-read-realm-test-VFLHJdEv.js +0 -58
- package/bundled-test-harness/assets/cancel-indexing-job-test-n3Os4ZaX.js +0 -71
- package/bundled-test-harness/assets/card-api-test-DvNfLv3V.js +0 -196
- package/bundled-test-harness/assets/card-basics-test-CKzZuFdw.js +0 -4895
- package/bundled-test-harness/assets/card-catalog-test-JFvkVHED.js +0 -377
- package/bundled-test-harness/assets/card-copy-test-iwrFA72s.js +0 -777
- package/bundled-test-harness/assets/card-def-field-def-relationships-test-D5s2RH5t.js +0 -560
- package/bundled-test-harness/assets/card-def-menu-items-test-XcmkT4NF.js +0 -182
- package/bundled-test-harness/assets/card-delete-test-jtAOHk1Y.js +0 -412
- package/bundled-test-harness/assets/card-directory-name-test-veQEp5FJ.js +0 -71
- package/bundled-test-harness/assets/card-playground-test-P7Ed0tO4.js +0 -1497
- package/bundled-test-harness/assets/card-prerender-DXG8cQEv.js +0 -12661
- package/bundled-test-harness/assets/card-search-adorn-test-BX0-IJHB.js +0 -128
- package/bundled-test-harness/assets/card-search-query-builder-test-D01uixke.js +0 -88
- package/bundled-test-harness/assets/card-search-selection-menu-test-DMTeZFmW.js +0 -108
- package/bundled-test-harness/assets/channel-BvoW_rbI.js +0 -8
- package/bundled-test-harness/assets/check-correctness-test-D7QB1GTo.js +0 -252
- package/bundled-test-harness/assets/chunk-2J33WTMH-BbxCvOlt.js +0 -31
- package/bundled-test-harness/assets/chunk-3OPIFGDE-DHY3s0oT.js +0 -5548
- package/bundled-test-harness/assets/chunk-4BX2VUAB-CRivrLQ6.js +0 -11
- package/bundled-test-harness/assets/chunk-4EGX6M5U-qWzlMeqd.js +0 -44
- package/bundled-test-harness/assets/chunk-55IACEB6-DOl6NECJ.js +0 -10
- package/bundled-test-harness/assets/chunk-5DO6E6H7-scwNnzDb.js +0 -27
- package/bundled-test-harness/assets/chunk-5ZQYHXKU-BeETnugr.js +0 -1767
- package/bundled-test-harness/assets/chunk-727SXJPM-BlycTxFE.js +0 -3877
- package/bundled-test-harness/assets/chunk-AQP2D5EJ-BE3Clw-g.js +0 -2622
- package/bundled-test-harness/assets/chunk-BR22UD5L-BTPKlhWA.js +0 -85
- package/bundled-test-harness/assets/chunk-BSJP7CBP-BIhtUfvc.js +0 -114
- package/bundled-test-harness/assets/chunk-CSCIHK7Q-DnRAp6Bv.js +0 -6144
- package/bundled-test-harness/assets/chunk-FHYWG6QK-DpIXIGDC.js +0 -27
- package/bundled-test-harness/assets/chunk-FMBD7UC4-B36w3LIg.js +0 -20
- package/bundled-test-harness/assets/chunk-KSCS5N6A-gbz9p9BU.js +0 -871
- package/bundled-test-harness/assets/chunk-L5ZTLDWV-HNfH9U8K.js +0 -43
- package/bundled-test-harness/assets/chunk-LZXEDZCA-CbKHJfzx.js +0 -65
- package/bundled-test-harness/assets/chunk-MPE355IW-BGVbCTZH.js +0 -27
- package/bundled-test-harness/assets/chunk-MZUSXYTE-DoCjuxcJ.js +0 -36
- package/bundled-test-harness/assets/chunk-N66VUXT2-BX17MI-i.js +0 -70
- package/bundled-test-harness/assets/chunk-ND2GUHAM-IpeiJZYz.js +0 -93
- package/bundled-test-harness/assets/chunk-NZK2D7GU-CH-Gg7qc.js +0 -89
- package/bundled-test-harness/assets/chunk-O5CBEL6O-D2JbLgI8.js +0 -2395
- package/bundled-test-harness/assets/chunk-PUPMXCY4-DS4ZxM2V.js +0 -27
- package/bundled-test-harness/assets/chunk-QZHKN3VN-WLHeRUJ3.js +0 -20
- package/bundled-test-harness/assets/chunk-UIBZB4QT-DNIJBpkq.js +0 -27
- package/bundled-test-harness/assets/chunk-WCWK7LTN-CqRJ3WOy.js +0 -36
- package/bundled-test-harness/assets/chunk-WU5MYG2G-CtItCLbE.js +0 -12
- package/bundled-test-harness/assets/chunk-XPW4576I-D2Q7Qo8n.js +0 -2341
- package/bundled-test-harness/assets/classDiagram-4FO5ZUOK-CnNFReKQ.js +0 -31
- package/bundled-test-harness/assets/classDiagram-v2-Q7XG4LA2-BlhpbohY.js +0 -31
- package/bundled-test-harness/assets/code-equality-assertion-C-2g5YGf.js +0 -474
- package/bundled-test-harness/assets/code-patches-test-DaV4Mon_.js +0 -1128
- package/bundled-test-harness/assets/code-patching-test-CcbWlImN.js +0 -114
- package/bundled-test-harness/assets/code-ref-test-8Yj8gbww.js +0 -138
- package/bundled-test-harness/assets/code-semantics-service-test-C3srTfDz.js +0 -65
- package/bundled-test-harness/assets/code-submode-test-BUhjvWtB.js +0 -1762
- package/bundled-test-harness/assets/codeblocks-test-3zAp0_GA.js +0 -492
- package/bundled-test-harness/assets/codemirror-context-C7KmSAyy.js +0 -2
- package/bundled-test-harness/assets/codemirror-editor-test-WojU4k2h.js +0 -1176
- package/bundled-test-harness/assets/color-field-test-yESUakoE.js +0 -213
- package/bundled-test-harness/assets/command-definitions-test-UsXsAhn7.js +0 -72
- package/bundled-test-harness/assets/commands-CBDBujm_.js +0 -1379
- package/bundled-test-harness/assets/commands-calling-test-DJTl0EbL.js +0 -200
- package/bundled-test-harness/assets/commands-test-DW2gupNS.js +0 -1041
- package/bundled-test-harness/assets/commands-test-DjLnuojW.js +0 -1145
- package/bundled-test-harness/assets/computed-test-0n5g8Ez5.js +0 -882
- package/bundled-test-harness/assets/container-D8y7fmir.js +0 -14602
- package/bundled-test-harness/assets/convert-to-class-name-test-DSIflIV2.js +0 -17
- package/bundled-test-harness/assets/copy-and-edit-test-BuK1ZHr-.js +0 -291
- package/bundled-test-harness/assets/copy-card-test-DnDC4_7J.js +0 -156
- package/bundled-test-harness/assets/copy-file-to-realm-test-CFd_3Iff.js +0 -99
- package/bundled-test-harness/assets/copy-source-test-38yUGJor.js +0 -56
- package/bundled-test-harness/assets/cose-bilkent-S5V4N54A-DXA1S87S.js +0 -4275
- package/bundled-test-harness/assets/create-file-test-B2oem0-V.js +0 -963
- package/bundled-test-harness/assets/create-file-test-BHk00RtD.js +0 -397
- package/bundled-test-harness/assets/create-listing-modal-test-L-71-Uo2.js +0 -194
- package/bundled-test-harness/assets/create-listing-pr-request-CZaLsHhE.js +0 -64
- package/bundled-test-harness/assets/create-listing-pr-request-test-OGzk4Q2E.js +0 -117
- package/bundled-test-harness/assets/create-spec-test-BsM7VKuH.js +0 -239
- package/bundled-test-harness/assets/csv-file-def-test-BhJalhE-.js +0 -101
- package/bundled-test-harness/assets/dagre-BIk_r1iU.js +0 -4195
- package/bundled-test-harness/assets/dagre-BM42HDAG-FaUWeGOj.js +0 -606
- package/bundled-test-harness/assets/date-time-fields-test-Cs5T6Xk1.js +0 -322
- package/bundled-test-harness/assets/debug-message-test-WlHe7pJF.js +0 -119
- package/bundled-test-harness/assets/diagram-2AECGRRQ-DLve-IVM.js +0 -279
- package/bundled-test-harness/assets/diagram-5GNKFQAL-CJG1RTLk.js +0 -142
- package/bundled-test-harness/assets/diagram-KO2AKTUF-DYGDq3dD.js +0 -551
- package/bundled-test-harness/assets/diagram-LMA3HP47-BNRYdpMl.js +0 -184
- package/bundled-test-harness/assets/diagram-OG6HWLK6-BlJH5g83.js +0 -857
- package/bundled-test-harness/assets/diffing-test-DO54USSm.js +0 -210
- package/bundled-test-harness/assets/dist-BDRmXkWl.js +0 -232
- package/bundled-test-harness/assets/dist-BfNSLd0O.js +0 -105
- package/bundled-test-harness/assets/dist-BoireClP.js +0 -2
- package/bundled-test-harness/assets/editor-test-DChC9LuR.js +0 -551
- package/bundled-test-harness/assets/editor.main-BiohyrHK.js +0 -3
- package/bundled-test-harness/assets/editor.main-CMU_0pR1.js +0 -43566
- package/bundled-test-harness/assets/email-field-test-DWIFSfZ-.js +0 -74
- package/bundled-test-harness/assets/enum-field-test-BUc6l4us.js +0 -909
- package/bundled-test-harness/assets/erDiagram-TEJ5UH35-pOJ2novh.js +0 -2041
- package/bundled-test-harness/assets/error-display-test-CHSE6h6Z.js +0 -343
- package/bundled-test-harness/assets/evaluate-module-test-Caa5n0B9.js +0 -66
- package/bundled-test-harness/assets/eventmodeling-FCH6USID-B6XXU7R3.js +0 -3
- package/bundled-test-harness/assets/execute-atomic-operations-test-CT060oDk.js +0 -75
- package/bundled-test-harness/assets/externals-Do1fVZ4j.js +0 -5533
- package/bundled-test-harness/assets/extract-css-variables-test-DzjAsMgg.js +0 -169
- package/bundled-test-harness/assets/fallback-banner-test-CmxysrDn.js +0 -227
- package/bundled-test-harness/assets/fallback-banner-test-DJ4cO8PB.js +0 -53
- package/bundled-test-harness/assets/fallback-models-test-r5upJFeA.js +0 -163
- package/bundled-test-harness/assets/fetch-card-json-test-Di1wmvy5.js +0 -63
- package/bundled-test-harness/assets/fetcher-test-DjzNl_7F.js +0 -85
- package/bundled-test-harness/assets/field-configuration-test-C3vr-HhG.js +0 -535
- package/bundled-test-harness/assets/field-markdown-domain-test-DG2U4qIm.js +0 -615
- package/bundled-test-harness/assets/field-markdown-primitives-test-Bay2v8nT.js +0 -362
- package/bundled-test-harness/assets/field-markdown-specialized-test-Bl0Sl4sc.js +0 -527
- package/bundled-test-harness/assets/field-path-parser-test-bxxwUjcm.js +0 -387
- package/bundled-test-harness/assets/field-playground-test-Bcjfws4m.js +0 -902
- package/bundled-test-harness/assets/field-support-predicates-test-DYTqOGvv.js +0 -170
- package/bundled-test-harness/assets/field-test-helpers-DYSfSGdh.js +0 -45
- package/bundled-test-harness/assets/file-attachment-test-6ypDRDS7.js +0 -635
- package/bundled-test-harness/assets/file-chooser-test-mtmcHTFP.js +0 -439
- package/bundled-test-harness/assets/file-def-live-reload-test-CX1-lOv6.js +0 -50
- package/bundled-test-harness/assets/file-def-manager-DNHII2oj.js +0 -470
- package/bundled-test-harness/assets/file-def-manager-canonicalize-test-i_7UVakF.js +0 -451
- package/bundled-test-harness/assets/file-def-menu-items-test-Dw458iku.js +0 -114
- package/bundled-test-harness/assets/file-def-navigation-test-B3Ztr1Rd.js +0 -109
- package/bundled-test-harness/assets/file-def-serialization-test-C_gV8AkU.js +0 -87
- package/bundled-test-harness/assets/file-def-test-vXXJmtxX.js +0 -219
- package/bundled-test-harness/assets/file-tree-test-BJCiw9jm.js +0 -773
- package/bundled-test-harness/assets/flac-audio-def-test-BX3SE1vW.js +0 -138
- package/bundled-test-harness/assets/flowDiagram-I6XJVG4X-7Q5ROn4X.js +0 -4883
- package/bundled-test-harness/assets/formatted-aibot-message-test-DyqUz2nt.js +0 -366
- package/bundled-test-harness/assets/formatted-user-message-test-aqAzqvBP.js +0 -43
- package/bundled-test-harness/assets/freestyle-test-CLRrZkAE.js +0 -17
- package/bundled-test-harness/assets/full-reindex-realm-test-ClqPVQ0c.js +0 -103
- package/bundled-test-harness/assets/ganttDiagram-6RSMTGT7-BkDoIAAE.js +0 -4060
- package/bundled-test-harness/assets/garbage-collection-test-Ba2dD3qS.js +0 -373
- package/bundled-test-harness/assets/general-test-D0zhs14K.js +0 -926
- package/bundled-test-harness/assets/generate-css-variables-test-CKrXSlHs.js +0 -88
- package/bundled-test-harness/assets/generate-example-cards-one-shot-test-fSAdGJeT.js +0 -67
- package/bundled-test-harness/assets/get-available-realm-identifiers-test-BXMUW65I.js +0 -49
- package/bundled-test-harness/assets/get-catalog-realm-identifiers-test-DKEq6Zcq.js +0 -49
- package/bundled-test-harness/assets/get-default-writable-realm-test-Dp4nBIRP.js +0 -56
- package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-DYNnMgD-.js +0 -55
- package/bundled-test-harness/assets/get-relationship-membership-state-test-k9EUNWeq.js +0 -1306
- package/bundled-test-harness/assets/get-type-refs-from-filter-test-BPuivF-v.js +0 -136
- package/bundled-test-harness/assets/get-user-system-card-test-DSHv00O7.js +0 -52
- package/bundled-test-harness/assets/gif-image-def-test-LuDSr5Kz.js +0 -161
- package/bundled-test-harness/assets/gitGraph-WXDBUCRP-BrG_LYEh.js +0 -3
- package/bundled-test-harness/assets/gitGraphDiagram-PVQCEYII-QJjQcX4J.js +0 -1150
- package/bundled-test-harness/assets/gts-file-def-test-bS3ML062.js +0 -99
- package/bundled-test-harness/assets/head-format-preview-test-B8IPh71E.js +0 -156
- package/bundled-test-harness/assets/helpers-wSIq-bau.js +0 -5
- package/bundled-test-harness/assets/host-mode-test-D44nXoQZ.js +0 -391
- package/bundled-test-harness/assets/host-submode-test-CefkXg9F.js +0 -904
- package/bundled-test-harness/assets/index-query-engine-test-DJnDqmfK.js +0 -2548
- package/bundled-test-harness/assets/index-writer-test-BcrCMj37.js +0 -1842
- package/bundled-test-harness/assets/indexeddb-crypto-store-RTTNdynf.js +0 -49434
- package/bundled-test-harness/assets/info-J43DQDTF-DhDzvz9k.js +0 -3
- package/bundled-test-harness/assets/infoDiagram-5YYISTIA-8TmRFIRz.js +0 -23
- package/bundled-test-harness/assets/inspector-test-D4iMBlbL.js +0 -1776
- package/bundled-test-harness/assets/instance-filter-matcher-test-CYT6N3hN.js +0 -564
- package/bundled-test-harness/assets/instantiate-card-test-j1JS5lDe.js +0 -104
- package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-B-aXzOh6.js +0 -497
- package/bundled-test-harness/assets/interact-submode-setup-VMwOUl3u.js +0 -558
- package/bundled-test-harness/assets/interact-submode-test-D5lNNXdq.js +0 -725
- package/bundled-test-harness/assets/invalidate-realm-identifiers-test-71Ze8eGV.js +0 -101
- package/bundled-test-harness/assets/invite-user-to-room-test-UfjsvwVp.js +0 -67
- package/bundled-test-harness/assets/ishikawaDiagram-YF4QCWOH-7UALIGwM.js +0 -1009
- package/bundled-test-harness/assets/isolated-render-test-C2IL-Fz3.js +0 -51
- package/bundled-test-harness/assets/item-button-6g7XYj56.js +0 -203
- package/bundled-test-harness/assets/javascript-BwLQ7_Nc.js +0 -75
- package/bundled-test-harness/assets/job-priority-header-test-C3FfKLPP.js +0 -81
- package/bundled-test-harness/assets/journeyDiagram-JHISSGLW-t4gEZYup.js +0 -1256
- package/bundled-test-harness/assets/jpg-image-def-test-BTBk9lk5.js +0 -430
- package/bundled-test-harness/assets/json-file-def-test-BpU_Eidn.js +0 -92
- package/bundled-test-harness/assets/kanban-definition-UN3LZRKU-C_KHB3_r.js +0 -1284
- package/bundled-test-harness/assets/last-modified-date-test-fE7IP0q0.js +0 -18
- package/bundled-test-harness/assets/limited-set-test-uu2vX1Sv.js +0 -123
- package/bundled-test-harness/assets/line-BiZHXOjs.js +0 -55
- package/bundled-test-harness/assets/linear-DUaMMmmA.js +0 -417
- package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-qZeqQ1gt.js +0 -315
- package/bundled-test-harness/assets/linksto-error-sentinel-test-BaV3I8Xx.js +0 -236
- package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-BvJi1vCb.js +0 -303
- package/bundled-test-harness/assets/linksto-many-per-slot-access-test-CK60Cugk.js +0 -301
- package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-BWxdEO9D.js +0 -258
- package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-CIsLhqR2.js +0 -194
- package/bundled-test-harness/assets/live-prerendered-search-jZe3I16p.js +0 -639
- package/bundled-test-harness/assets/live-test-CF_R5WGr.js +0 -2
- package/bundled-test-harness/assets/live-test-jO7lXuyB.js +0 -100
- package/bundled-test-harness/assets/loader-icon-error-test-N4JYZuTx.js +0 -62
- package/bundled-test-harness/assets/loader-parallel-prefetch-test-DteeG7mU.js +0 -257
- package/bundled-test-harness/assets/loader-retry-test-DYVgpS_I.js +0 -173
- package/bundled-test-harness/assets/loader-test-DLI8JIx-.js +0 -245
- package/bundled-test-harness/assets/loading-test-D4ZBtRYf.js +0 -63
- package/bundled-test-harness/assets/login-error-text-test-Dcq7q3EY.js +0 -51
- package/bundled-test-harness/assets/m4a-audio-def-test-BKqGO-CW.js +0 -185
- package/bundled-test-harness/assets/main-BjBdsiQT.js +0 -5
- package/bundled-test-harness/assets/markdown-fallback-test-BBj80dZZ.js +0 -316
- package/bundled-test-harness/assets/markdown-file-def-test-BnMF5rQF.js +0 -286
- package/bundled-test-harness/assets/markdown-helpers-test-DnuuSLfS.js +0 -183
- package/bundled-test-harness/assets/markdown-highlighting-test-CWRp2Rce.js +0 -244
- package/bundled-test-harness/assets/markdown-preview-test-Bf5OqKGf.js +0 -237
- package/bundled-test-harness/assets/markdown-preview-yYHtwNeI.js +0 -69
- package/bundled-test-harness/assets/marked-sync-2EfimW4i.js +0 -2
- package/bundled-test-harness/assets/marked-sync-DZOVFLjK.js +0 -2561
- package/bundled-test-harness/assets/marked-sync-test-BaaYbZNF.js +0 -146
- package/bundled-test-harness/assets/matrix-service-sliding-sync-test-CdEy3ASW.js +0 -33
- package/bundled-test-harness/assets/mermaid-parser.core-CKNAdXJW.js +0 -114
- package/bundled-test-harness/assets/mermaid.core-C0mfwy8A.js +0 -1700
- package/bundled-test-harness/assets/message-service-subscription-test-pGz_7rz3.js +0 -113
- package/bundled-test-harness/assets/mindmap-definition-RKZ34NQL-ClcHxkdY.js +0 -1347
- package/bundled-test-harness/assets/mock-matrix-D7JHfFtT.js +0 -2
- package/bundled-test-harness/assets/mock-matrix-DqDbNhEj.js +0 -14292
- package/bundled-test-harness/assets/module-transpile-cache-test-D0M-fPxs.js +0 -66
- package/bundled-test-harness/assets/monaco.contribution-BEs3qwfd.js +0 -103
- package/bundled-test-harness/assets/monaco.contribution-Dpx8UiPl.js +0 -2
- package/bundled-test-harness/assets/monaco.contribution-RF_qxJYG.js +0 -2
- package/bundled-test-harness/assets/monaco.contribution-jPVrF29f.js +0 -243
- package/bundled-test-harness/assets/mp3-audio-def-test-CxeRk1bl.js +0 -129
- package/bundled-test-harness/assets/mutex-test-D1xyxTj2.js +0 -71
- package/bundled-test-harness/assets/number-field-test-gjAGDy6P.js +0 -153
- package/bundled-test-harness/assets/ogg-audio-def-test-B6Ww3Ixr.js +0 -191
- package/bundled-test-harness/assets/open-create-listing-modal-test-uN58T3rI.js +0 -117
- package/bundled-test-harness/assets/open-workspace-test-DXVsvBFJ.js +0 -48
- package/bundled-test-harness/assets/operator-mode-acceptance-test-BxIq2xSS.js +0 -1044
- package/bundled-test-harness/assets/operator-mode-card-catalog-test-xFYx9_ng.js +0 -989
- package/bundled-test-harness/assets/operator-mode-links-test-qhXWmz-S.js +0 -797
- package/bundled-test-harness/assets/operator-mode-state-service-test-BdA_uvaY.js +0 -122
- package/bundled-test-harness/assets/operator-mode-test-D3EyTwq3.js +0 -617
- package/bundled-test-harness/assets/operator-mode-ui-test-CSrk6Q0A.js +0 -985
- package/bundled-test-harness/assets/ordinal-DO1mUmjg.js +0 -85
- package/bundled-test-harness/assets/overlay-menu-items-test-CuqqLsQT.js +0 -316
- package/bundled-test-harness/assets/packet-YPE3B663--JkMNy78.js +0 -3
- package/bundled-test-harness/assets/panel-C2rtbx32.js +0 -3371
- package/bundled-test-harness/assets/past-sessions-test-B9SCbbXz.js +0 -316
- package/bundled-test-harness/assets/patch-code-test-CcFr9pDb.js +0 -203
- package/bundled-test-harness/assets/patch-fields-test-BW1gzcJM.js +0 -992
- package/bundled-test-harness/assets/patch-instance-test-DKqA9gQ6.js +0 -287
- package/bundled-test-harness/assets/persist-module-inspector-view-test-D1eKBUkt.js +0 -62
- package/bundled-test-harness/assets/phone-number-field-test-D1is5RWv.js +0 -72
- package/bundled-test-harness/assets/pie-LRSECV5Y-BDVv8Wdy.js +0 -3
- package/bundled-test-harness/assets/pieDiagram-4H26LBE5-CSYI-nMz.js +0 -253
- package/bundled-test-harness/assets/plan-install-test-DB-PrjPR.js +0 -417
- package/bundled-test-harness/assets/playground-B0iQV7dU.js +0 -57
- package/bundled-test-harness/assets/png-image-def-test-DnOsJGs6.js +0 -222
- package/bundled-test-harness/assets/prerender-file-extract-test-DhOLozj2.js +0 -176
- package/bundled-test-harness/assets/prerender-html-test-DKVhQZA9.js +0 -615
- package/bundled-test-harness/assets/prerender-meta-test-CnRNyqSz.js +0 -388
- package/bundled-test-harness/assets/prerender-module-test-D163QcrZ.js +0 -195
- package/bundled-test-harness/assets/prerendered-card-search-test-DX-8yabJ.js +0 -708
- package/bundled-test-harness/assets/preview-format-test-H7bnpdlC.js +0 -103
- package/bundled-test-harness/assets/preview-test-B7u6uWJR.js +0 -455
- package/bundled-test-harness/assets/qs-test-COb0mre6.js +0 -36
- package/bundled-test-harness/assets/quadrantDiagram-W4KKPZXB-2Y2ben29.js +0 -2324
- package/bundled-test-harness/assets/query-field-barrier-test-Cypj-MhK.js +0 -118
- package/bundled-test-harness/assets/query-field-error-sentinel-test-Dnqn8TdN.js +0 -202
- package/bundled-test-harness/assets/query-field-normalization-test-B7D8SHBP.js +0 -271
- package/bundled-test-harness/assets/query-field-schema-test-DIYY3-c8.js +0 -231
- package/bundled-test-harness/assets/query-fields-test-k-VBF9PE.js +0 -535
- package/bundled-test-harness/assets/queue-test-B_74vXZE.js +0 -216
- package/bundled-test-harness/assets/radar-GUYGQ44K-Cn2A0VBR.js +0 -3
- package/bundled-test-harness/assets/read-card-for-ai-assistant-test-SyL9F_La.js +0 -91
- package/bundled-test-harness/assets/read-file-for-ai-assistant-test-nLPp49U2.js +0 -45
- package/bundled-test-harness/assets/read-source-test-DBELJkhN.js +0 -67
- package/bundled-test-harness/assets/read-text-file-test-CP1JuWlX.js +0 -124
- package/bundled-test-harness/assets/realm-Dr4iygv_.js +0 -884
- package/bundled-test-harness/assets/realm-field-test-Cice2mYk.js +0 -101
- package/bundled-test-harness/assets/realm-index-card-id-test-BzpozdWc.js +0 -18
- package/bundled-test-harness/assets/realm-indexing-test-C0YSXziR.js +0 -4018
- package/bundled-test-harness/assets/realm-paths-test-DV_g07rF.js +0 -33
- package/bundled-test-harness/assets/realm-querying-test-B526abM0.js +0 -1062
- package/bundled-test-harness/assets/realm-test-D8UN5X-w.js +0 -2409
- package/bundled-test-harness/assets/reasoning-test-ClIOvdkX.js +0 -234
- package/bundled-test-harness/assets/recent-files-test-C2J_dJUD.js +0 -449
- package/bundled-test-harness/assets/reindex-realm-test-DMphy1g6.js +0 -119
- package/bundled-test-harness/assets/relationship-loading-state-test-BWrZdLlZ.js +0 -289
- package/bundled-test-harness/assets/render-component-BII_KnyK.js +0 -2
- package/bundled-test-harness/assets/render-error-test-BUAJJlUi.js +0 -22
- package/bundled-test-harness/assets/render-service-test-BKkCjErY.js +0 -87
- package/bundled-test-harness/assets/render-timer-stub-test-TUDMWJ8v.js +0 -84
- package/bundled-test-harness/assets/rendered-markdown-ColekGTF.js +0 -211
- package/bundled-test-harness/assets/rendered-markdown-test-B4CWIo02.js +0 -360
- package/bundled-test-harness/assets/requirementDiagram-4Y6WPE33-CTICatxk.js +0 -2550
- package/bundled-test-harness/assets/rich-markdown-field-test-B5u6D3Nk.js +0 -806
- package/bundled-test-harness/assets/room-message-test-0eJSqQfu.js +0 -171
- package/bundled-test-harness/assets/rust-crypto-B0m3j_yZ.js +0 -16141
- package/bundled-test-harness/assets/sanitize-module-list-test-rH6OqjKh.js +0 -68
- package/bundled-test-harness/assets/sankeyDiagram-5OEKKPKP-hBIg6-LP.js +0 -1357
- package/bundled-test-harness/assets/schema-editor-test-DH4MLFCD.js +0 -784
- package/bundled-test-harness/assets/schema-generation-test-BZMkX7VA.js +0 -28
- package/bundled-test-harness/assets/scrolling-test-CFTyLG8X.js +0 -292
- package/bundled-test-harness/assets/search-and-choose-test-CcbVyp4c.js +0 -156
- package/bundled-test-harness/assets/search-cache-key-test-BYt46iNT.js +0 -79
- package/bundled-test-harness/assets/search-command-test-BRIJPr54.js +0 -135
- package/bundled-test-harness/assets/search-correlation-id-test-B298Tfux.js +0 -101
- package/bundled-test-harness/assets/search-data-test-DHV2Fd4S.js +0 -243
- package/bundled-test-harness/assets/search-google-images-test-CNrazllP.js +0 -168
- package/bundled-test-harness/assets/search-in-flight-key-test-Dy3bU2c1.js +0 -79
- package/bundled-test-harness/assets/search-test-DL1-gD-G.js +0 -847
- package/bundled-test-harness/assets/send-ai-assistant-message-test-CyEkQ5pD.js +0 -52
- package/bundled-test-harness/assets/send-bot-trigger-event-test-CAsK28m-.js +0 -56
- package/bundled-test-harness/assets/send-request-via-proxy-test-DpMlRvPv.js +0 -333
- package/bundled-test-harness/assets/sending-test-BOeGYcTU.js +0 -317
- package/bundled-test-harness/assets/sequenceDiagram-3UESZ5HK-DQMiI040.js +0 -5551
- package/bundled-test-harness/assets/serialization-test-gY2QQVxS.js +0 -8283
- package/bundled-test-harness/assets/set-user-system-card-test-BE3y5GNK.js +0 -59
- package/bundled-test-harness/assets/setup-B8O9JQKq.js +0 -769
- package/bundled-test-harness/assets/setup-BMqGUBDK.js +0 -2
- package/bundled-test-harness/assets/show-card-test-BfJNnWMy.js +0 -362
- package/bundled-test-harness/assets/skills-test-CqhnZxBi.js +0 -568
- package/bundled-test-harness/assets/spec-test-BUKNn_1q.js +0 -1012
- package/bundled-test-harness/assets/stateDiagram-AJRCARHV-BoOij2yt.js +0 -363
- package/bundled-test-harness/assets/stateDiagram-v2-BHNVJYJU-Dosil5p2.js +0 -29
- package/bundled-test-harness/assets/store-add-test-BR1M-IDR.js +0 -52
- package/bundled-test-harness/assets/store-test-DaqI-HRh.js +0 -1562
- package/bundled-test-harness/assets/summarize-session-test-BMg54JGF.js +0 -169
- package/bundled-test-harness/assets/svg-image-def-test-xNyIKRPV.js +0 -164
- package/bundled-test-harness/assets/switch-submode-test-BKvpODUD.js +0 -168
- package/bundled-test-harness/assets/test-realm-service-worker-DK4SmTM5.js +0 -73
- package/bundled-test-harness/assets/tests-x4_eRjiT.js +0 -2770
- package/bundled-test-harness/assets/text-file-def-test-CsXiyVfI.js +0 -93
- package/bundled-test-harness/assets/text-input-validator-test-D4s_laO7.js +0 -155
- package/bundled-test-harness/assets/text-suggestion-test-CkLf1xuS.js +0 -339
- package/bundled-test-harness/assets/theme-card-test-D-6L6OfD.js +0 -573
- package/bundled-test-harness/assets/timeline-definition-PNZ67QCA-DD2d81uJ.js +0 -1545
- package/bundled-test-harness/assets/transform-cards-test-CRZF2gqZ.js +0 -341
- package/bundled-test-harness/assets/treeView-BLDUP644-CUm8wuM-.js +0 -3
- package/bundled-test-harness/assets/treemap-LRROVOQU-lbLrY2PE.js +0 -3
- package/bundled-test-harness/assets/ts-file-def-test-CDo6ojCf.js +0 -90
- package/bundled-test-harness/assets/tsMode-BPQoRibc.js +0 -968
- package/bundled-test-harness/assets/typescript-BaU6yDhK.js +0 -2
- package/bundled-test-harness/assets/update-room-skills-test-BnSgVFwT.js +0 -197
- package/bundled-test-harness/assets/url-test-CK-HB0qu.js +0 -103
- package/bundled-test-harness/assets/use-ai-assistant-test-BuJXEP8H.js +0 -330
- package/bundled-test-harness/assets/validate-realm-test-Cx7MOtS8.js +0 -53
- package/bundled-test-harness/assets/vennDiagram-CIIHVFJN-DtXtzGwZ.js +0 -2833
- package/bundled-test-harness/assets/wardley-L42UT6IY-D8aCp_Ox.js +0 -3
- package/bundled-test-harness/assets/wardleyDiagram-YWT4CUSO-D-73g3bB.js +0 -872
- package/bundled-test-harness/assets/wav-audio-def-test-DIo2GzQL.js +0 -155
- package/bundled-test-harness/assets/webp-image-def-test-BQsV0_De.js +0 -225
- package/bundled-test-harness/assets/workspace-chooser-delete-test-peDXmnQf.js +0 -189
- package/bundled-test-harness/assets/workspace-chooser-test-DS2RtTEF.js +0 -235
- package/bundled-test-harness/assets/workspace-delete-multiple-test-DTbjRSzN.js +0 -213
- package/bundled-test-harness/assets/workspace-delete-summary-test-B--ink4m.js +0 -63
- package/bundled-test-harness/assets/write-binary-file-test-A3TQ5lFn.js +0 -100
- package/bundled-test-harness/assets/write-text-file-test-D_rjNDsT.js +0 -172
- package/bundled-test-harness/assets/xychartDiagram-2RQKCTM6-D1aoqDp-.js +0 -2551
- /package/bundled-test-harness/assets/{abap-CLdVBGqB.js → abap-FZAuBTMl.js} +0 -0
- /package/bundled-test-harness/assets/{apex-DV8eHjgQ.js → apex-CAO3qFTc.js} +0 -0
- /package/bundled-test-harness/assets/{array-DsDWWqmW.js → array-CRfHnEm4.js} +0 -0
- /package/bundled-test-harness/assets/{azcli-C4pZYsiJ.js → azcli-Bnu7jG0Y.js} +0 -0
- /package/bundled-test-harness/assets/{bat-DBoaeFpB.js → bat-DdE54Pqq.js} +0 -0
- /package/bundled-test-harness/assets/{bicep-VlrJhbeK.js → bicep-Dp4vFp3K.js} +0 -0
- /package/bundled-test-harness/assets/{cameligo-jyzrvLUm.js → cameligo-Cym4x98m.js} +0 -0
- /package/bundled-test-harness/assets/{chunk-NNHCCRGN-Be15HUz2.js → chunk-NNHCCRGN-PWOfDYpb.js} +0 -0
- /package/bundled-test-harness/assets/{clojure-bzahmEtz.js → clojure-B47IJ25u.js} +0 -0
- /package/bundled-test-harness/assets/{codemirror-context-BauLYUNt.js → codemirror-context-oJy03XqC.js} +0 -0
- /package/bundled-test-harness/assets/{coffee-CMADdzOH.js → coffee-CZlkBXT8.js} +0 -0
- /package/bundled-test-harness/assets/{cpp-CEJwzcLE.js → cpp-mX4KaA7p.js} +0 -0
- /package/bundled-test-harness/assets/{csharp-XYqm0UE0.js → csharp-C-OeDGwk.js} +0 -0
- /package/bundled-test-harness/assets/{csp-82fNWQc2.js → csp-AS2OEE8R.js} +0 -0
- /package/bundled-test-harness/assets/{css-B5b0ooFS.js → css-C-TQxhWe.js} +0 -0
- /package/bundled-test-harness/assets/{cssMode-DTKuqAkO.js → cssMode-C87GnEsk.js} +0 -0
- /package/bundled-test-harness/assets/{cypher-Df9GkdDY.js → cypher-T6F_0eIM.js} +0 -0
- /package/bundled-test-harness/assets/{cytoscape.esm-D0iwZ9Jj.js → cytoscape.esm-Bc2V-MhP.js} +0 -0
- /package/bundled-test-harness/assets/{dart-C4JY9dMc.js → dart-DzVesk0n.js} +0 -0
- /package/bundled-test-harness/assets/{defaultLocale-BtLxQtxy.js → defaultLocale-CAoL4lzt.js} +0 -0
- /package/bundled-test-harness/assets/{dist-D-PuK2H3.js → dist-BZ5MfZEJ.js} +0 -0
- /package/bundled-test-harness/assets/{dockerfile-Ck0tNttO.js → dockerfile-BH0_bQxC.js} +0 -0
- /package/bundled-test-harness/assets/{ecl-BpeXqJR_.js → ecl-KIxjxrJo.js} +0 -0
- /package/bundled-test-harness/assets/{elixir-HmBzrXaX.js → elixir-CPPdtCW1.js} +0 -0
- /package/bundled-test-harness/assets/{flow9-DhsfsDhH.js → flow9-Dxho7Ldf.js} +0 -0
- /package/bundled-test-harness/assets/{freemarker2-D3Yd6nGl.js → freemarker2-DP1aOr3_.js} +0 -0
- /package/bundled-test-harness/assets/{fsharp-D56OprHc.js → fsharp-ozN53Joe.js} +0 -0
- /package/bundled-test-harness/assets/{go-BITsFLfX.js → go-DPj6Rbqe.js} +0 -0
- /package/bundled-test-harness/assets/{graphlib-qkaQhadO.js → graphlib-DOITgaas.js} +0 -0
- /package/bundled-test-harness/assets/{graphql-CJJVsEX1.js → graphql-C8_-AnBG.js} +0 -0
- /package/bundled-test-harness/assets/{handlebars-Dvw6QbL7.js → handlebars-B2gYBZpU.js} +0 -0
- /package/bundled-test-harness/assets/{hcl-DSTZcJuq.js → hcl-r3d7BhXB.js} +0 -0
- /package/bundled-test-harness/assets/{helpers-D_JZYUOQ.js → helpers-CItTycq2.js} +0 -0
- /package/bundled-test-harness/assets/{html-Bik3qLmc.js → html-DhN1Nxr0.js} +0 -0
- /package/bundled-test-harness/assets/{htmlMode-DPCaR3Ab.js → htmlMode-BnBg5hCh.js} +0 -0
- /package/bundled-test-harness/assets/{ini-li-kC8ZU.js → ini-CzzRigmS.js} +0 -0
- /package/bundled-test-harness/assets/{init-Bq7IGMcH.js → init-Bd2YUhsG.js} +0 -0
- /package/bundled-test-harness/assets/{java-CETpuNN7.js → java-BgeDsIoV.js} +0 -0
- /package/bundled-test-harness/assets/{jsonMode-CZ3hOG-W.js → jsonMode-sRb0gsB8.js} +0 -0
- /package/bundled-test-harness/assets/{julia-hgihs1aN.js → julia-u3K1H5Ts.js} +0 -0
- /package/bundled-test-harness/assets/{katex-DqhsSYO4.js → katex-CHY7BUZt.js} +0 -0
- /package/bundled-test-harness/assets/{kotlin-CKfyb82K.js → kotlin-DfqmlJ10.js} +0 -0
- /package/bundled-test-harness/assets/{less-xB5yXbw8.js → less-CSzH7DPY.js} +0 -0
- /package/bundled-test-harness/assets/{lexon-BLwrXVrI.js → lexon-DwPTpxXt.js} +0 -0
- /package/bundled-test-harness/assets/{liquid-Bf2lpknJ.js → liquid-95J9g5Vk.js} +0 -0
- /package/bundled-test-harness/assets/{lua-Ch5i3IrF.js → lua-CGw6zbeh.js} +0 -0
- /package/bundled-test-harness/assets/{m3-D5tNlhaF.js → m3-BfgwloGF.js} +0 -0
- /package/bundled-test-harness/assets/{markdown-Dzc9uMky.js → markdown-RZRK7Mc9.js} +0 -0
- /package/bundled-test-harness/assets/{mdx-xsI4TJrf.js → mdx-BYD-W2sn.js} +0 -0
- /package/bundled-test-harness/assets/{mips-CmdzHkQm.js → mips-DAySN5Lp.js} +0 -0
- /package/bundled-test-harness/assets/{msdax-CAZvxB9E.js → msdax-Cy0COjTJ.js} +0 -0
- /package/bundled-test-harness/assets/{mysql-CyVS-z5H.js → mysql-CfGw9jyw.js} +0 -0
- /package/bundled-test-harness/assets/{objective-c-CCG8cTc_.js → objective-c-B4uU-8T-.js} +0 -0
- /package/bundled-test-harness/assets/{pascal-c8B45FOC.js → pascal-CGDuZzXi.js} +0 -0
- /package/bundled-test-harness/assets/{pascaligo-CCqwSqBv.js → pascaligo-eg02k4VJ.js} +0 -0
- /package/bundled-test-harness/assets/{path-CsS38UoK.js → path-Dxiz9G2t.js} +0 -0
- /package/bundled-test-harness/assets/{perl-JUICYbO2.js → perl-BiT-JJJw.js} +0 -0
- /package/bundled-test-harness/assets/{pgsql-aNRiL0Cg.js → pgsql-DAMjrVBF.js} +0 -0
- /package/bundled-test-harness/assets/{php-B0YZj_Vw.js → php-kOSUYQyc.js} +0 -0
- /package/bundled-test-harness/assets/{pla-D3Zb3KCn.js → pla-BShYV-HC.js} +0 -0
- /package/bundled-test-harness/assets/{postiats-ks1KABlA.js → postiats-9Xamd4W2.js} +0 -0
- /package/bundled-test-harness/assets/{powerquery-D35K_osc.js → powerquery-l2Nw525Q.js} +0 -0
- /package/bundled-test-harness/assets/{powershell-DXQo6KTk.js → powershell-B5rdEn86.js} +0 -0
- /package/bundled-test-harness/assets/{protobuf-CFDvn49_.js → protobuf-DjFcruCV.js} +0 -0
- /package/bundled-test-harness/assets/{pug-CGdWzJm1.js → pug-d79Nz4-Z.js} +0 -0
- /package/bundled-test-harness/assets/{python-BHLYjYlP.js → python-d8oxFZIM.js} +0 -0
- /package/bundled-test-harness/assets/{qsharp-BIq3i63T.js → qsharp-CeTlfxZW.js} +0 -0
- /package/bundled-test-harness/assets/{qunit-2hoQyeAZ.js → qunit-Cqwmt9Vl.js} +0 -0
- /package/bundled-test-harness/assets/{r-CBvzvDSA.js → r-BOu7JTro.js} +0 -0
- /package/bundled-test-harness/assets/{razor-JQ0RiIvo.js → razor-ZatoG_Is.js} +0 -0
- /package/bundled-test-harness/assets/{recent-files-cards-BQMviQb1.js → recent-files-cards-C3vIjaKb.js} +0 -0
- /package/bundled-test-harness/assets/{redis-BmSHTqTU.js → redis-DdXYPyQE.js} +0 -0
- /package/bundled-test-harness/assets/{redshift-B1NmQEH7.js → redshift-DswnW-YX.js} +0 -0
- /package/bundled-test-harness/assets/{render-component-g_fhz2dX.js → render-component-Bs21y6iv.js} +0 -0
- /package/bundled-test-harness/assets/{restructuredtext-Br9BtTbk.js → restructuredtext-C75vUmvX.js} +0 -0
- /package/bundled-test-harness/assets/{rough.esm-D8VnzNsL.js → rough.esm-B83ARgx6.js} +0 -0
- /package/bundled-test-harness/assets/{ruby-D9_-y1I3.js → ruby-D77950a-.js} +0 -0
- /package/bundled-test-harness/assets/{rust-1Jjr1EOs.js → rust-C_G4PKsG.js} +0 -0
- /package/bundled-test-harness/assets/{sb-X2JE4zEr.js → sb-Cz3P8_Gp.js} +0 -0
- /package/bundled-test-harness/assets/{scala-qFJERKkR.js → scala-DYqUg04P.js} +0 -0
- /package/bundled-test-harness/assets/{scheme-D-WJPStO.js → scheme-B31XEGu5.js} +0 -0
- /package/bundled-test-harness/assets/{scss-DysfZiXA.js → scss-CtvB8On5.js} +0 -0
- /package/bundled-test-harness/assets/{shell-C0Iu3NNJ.js → shell-C2QqpcPN.js} +0 -0
- /package/bundled-test-harness/assets/{solidity-Bato3Qrk.js → solidity-FHrhZFd-.js} +0 -0
- /package/bundled-test-harness/assets/{sophia-DI0cKdK8.js → sophia-Cxv5FOXb.js} +0 -0
- /package/bundled-test-harness/assets/{sparql-BTJMtwoD.js → sparql-CgGkGeQB.js} +0 -0
- /package/bundled-test-harness/assets/{sql-R6uHqFYU.js → sql-S6Dos2P0.js} +0 -0
- /package/bundled-test-harness/assets/{src-CdPyB7gY.js → src-CvuaVSsl.js} +0 -0
- /package/bundled-test-harness/assets/{st-CoyBvq37.js → st-Bfa7LAWp.js} +0 -0
- /package/bundled-test-harness/assets/{swift-Bj-haAlF.js → swift-BQD5Ef-A.js} +0 -0
- /package/bundled-test-harness/assets/{systemverilog-B-x1NEFI.js → systemverilog-DaNkPux4.js} +0 -0
- /package/bundled-test-harness/assets/{tcl-DAUdSQgz.js → tcl-gOPgCDyb.js} +0 -0
- /package/bundled-test-harness/assets/{test-support-BHjxBpDK.js → test-support-BEQX5x9U.js} +0 -0
- /package/bundled-test-harness/assets/{test-support-yKvYEh-u.js → test-support-BL4XKobD.js} +0 -0
- /package/bundled-test-harness/assets/{twig-B0sJ-GzS.js → twig-Bk4gPn5b.js} +0 -0
- /package/bundled-test-harness/assets/{typescript-DTMIM5Gl.js → typescript-pPYlxWzr.js} +0 -0
- /package/bundled-test-harness/assets/{typespec-6yo9VQxY.js → typespec-D9Zz743B.js} +0 -0
- /package/bundled-test-harness/assets/{vb-Bh2IfdtJ.js → vb-ziqHIsJV.js} +0 -0
- /package/bundled-test-harness/assets/{view-card-demo-U_AOj-RK.js → view-card-demo-CSIVYD3T.js} +0 -0
- /package/bundled-test-harness/assets/{wgsl-DsvJnCCt.js → wgsl-BXiwkiJL.js} +0 -0
- /package/bundled-test-harness/assets/{xml-CisPXcjD.js → xml-a_tUOik-.js} +0 -0
- /package/bundled-test-harness/assets/{yaml-DkHUoYI5.js → yaml-B3H8LDzK.js} +0 -0
|
@@ -0,0 +1,2137 @@
|
|
|
1
|
+
import { s as __toESM } from "./chunk-CGdGNDIi.js";
|
|
2
|
+
import { r as initializeDeferredDecorator, t as decorateFieldV2 } from "./runtime-CYyqkz5q-z3Y1hsJm.js";
|
|
3
|
+
import { Dn as APP_BOXEL_LLM_MODE, Jr as wrapper_default, Mi as skillCardRef, Mn as APP_BOXEL_REASONING_CONTENT_KEY, On as APP_BOXEL_MESSAGE_MSGTYPE, Zn as testRealmURL, ca as Deferred, pn as APP_BOXEL_ACTIVE_LLM, ua as rri, vi as baseRealm } from "./runtime-common-C7uLt5dN.js";
|
|
4
|
+
import { $n as setComponentTemplate } from "./service-DJ87xpDt.js";
|
|
5
|
+
import { V as templateFactory } from "./index-DaCZcoCY-D2gI_aMw.js";
|
|
6
|
+
import { i as envSkillId, o as skillsRealmURL, t as catalogRealmURL } from "./utils-C7xS5xXC.js";
|
|
7
|
+
import "./template-D3TMIrc1.js";
|
|
8
|
+
import "./template-factory-DMEv2kVd.js";
|
|
9
|
+
import { m as GridContainer } from "./components-DkyK1awC.js";
|
|
10
|
+
import { t as AiAssistantMessageDrafts, v as src_default } from "./local-storage-keys-wtjuKtZY.js";
|
|
11
|
+
import { I as waitUntil, N as visit, d as click, l as triggerEvent, o as waitFor, s as fillIn } from "./dist-D1U_uSwt.js";
|
|
12
|
+
import { t as require_qunit } from "./qunit-Cqwmt9Vl.js";
|
|
13
|
+
import { r as getService } from "./dist-CY3T64Hs.js";
|
|
14
|
+
import { D as setupAcceptanceTestRealm, F as setupUserSubscription, M as setupOnSave, P as setupRealmServerEndpoints, a as SYSTEM_CARD_FIXTURE_CONTENTS, at as setupAuthEndpoints, b as getMonacoContent, h as delay, i as getRoomIdForRealmAndUser, j as setupLocalIndexing, nt as setupApplicationTest, o as addSkillToAiAssistant, s as assertMessages, t as setupMockMatrix, tt as visitOperatorMode, w as realmConfigCardJSON } from "./mock-matrix-BhFWlMMr.js";
|
|
15
|
+
import { G as contains, I as StringField, L as SystemCard, Q as field, a as CardDef, d as Component, lt as linksTo, mt as setupBaseRealm, o as CardInfoField, s as CardsGrid, ut as linksToMany, w as ModelConfiguration } from "./base-realm-DpSTsZxD.js";
|
|
16
|
+
//#region tests/acceptance/ai-assistant-test.gts
|
|
17
|
+
var import_qunit = /* @__PURE__ */ __toESM(require_qunit());
|
|
18
|
+
async function selectCardFromCatalog(cardId) {
|
|
19
|
+
await click("[data-test-attach-button]");
|
|
20
|
+
await click("[data-test-attach-card-btn]");
|
|
21
|
+
await fillIn("[data-test-search-field]", cardId);
|
|
22
|
+
await click(`[data-test-card-catalog-item="${cardId}"]`);
|
|
23
|
+
await click("[data-test-card-catalog-go-button]");
|
|
24
|
+
}
|
|
25
|
+
async function waitForSessionPreparationToFinish(timeout = 3e4) {
|
|
26
|
+
const aiAssistantPanelService = getService("ai-assistant-panel-service");
|
|
27
|
+
await waitUntil(() => !aiAssistantPanelService.isPreparingSession, { timeout });
|
|
28
|
+
}
|
|
29
|
+
var countryDefinition = `import { field, contains, CardDef } from 'https://cardstack.com/base/card-api';
|
|
30
|
+
import StringField from 'https://cardstack.com/base/string';
|
|
31
|
+
export class Country extends CardDef {
|
|
32
|
+
static displayName = 'Country';
|
|
33
|
+
@field name = contains(StringField);
|
|
34
|
+
}`;
|
|
35
|
+
var matrixRoomId;
|
|
36
|
+
var mockedFileContent = "Hello, world!";
|
|
37
|
+
var TEST_MODEL_NAMES = {
|
|
38
|
+
"openai/gpt-5": "OpenAI: GPT-5",
|
|
39
|
+
"openai/gpt-5-extended": "OpenAI: GPT-5 Extended Thinking",
|
|
40
|
+
"openai/gpt-4o-mini": "OpenAI: GPT-4o-mini",
|
|
41
|
+
"anthropic/claude-sonnet-4.6": "Anthropic: Claude Sonnet 4.6",
|
|
42
|
+
"anthropic/claude-sonnet-4.5": "Anthropic: Claude Sonnet 4.5",
|
|
43
|
+
"anthropic/claude-3.7-sonnet": "Anthropic: Claude 3.7 Sonnet",
|
|
44
|
+
"deepseek/deepseek-chat-v3-0324": "DeepSeek: DeepSeek V3 0324",
|
|
45
|
+
"google/gemini-2.5-flash": "Google: Gemini 2.5 Flash"
|
|
46
|
+
};
|
|
47
|
+
var TEST_MODEL_CONFIG_IDS = {
|
|
48
|
+
"openai/gpt-5": `${testRealmURL}ModelConfiguration/gpt-5`,
|
|
49
|
+
"openai/gpt-5-extended": `${testRealmURL}ModelConfiguration/gpt-5-extended`,
|
|
50
|
+
"openai/gpt-4o-mini": `${testRealmURL}ModelConfiguration/gpt-4o-mini`,
|
|
51
|
+
"anthropic/claude-sonnet-4.6": `${testRealmURL}ModelConfiguration/claude-sonnet-4.6`,
|
|
52
|
+
"anthropic/claude-sonnet-4.5": `${testRealmURL}ModelConfiguration/claude-sonnet-4.5`,
|
|
53
|
+
"anthropic/claude-3.7-sonnet": `${testRealmURL}ModelConfiguration/claude-sonnet-3.7`,
|
|
54
|
+
"deepseek/deepseek-chat-v3-0324": `${testRealmURL}ModelConfiguration/deepseek-chat-v3-0324`,
|
|
55
|
+
"google/gemini-2.5-flash": `${testRealmURL}ModelConfiguration/gemini-2.5-flash`
|
|
56
|
+
};
|
|
57
|
+
function configIdFor(modelId) {
|
|
58
|
+
return TEST_MODEL_CONFIG_IDS[modelId] ?? modelId;
|
|
59
|
+
}
|
|
60
|
+
function modelNameFor(llmId) {
|
|
61
|
+
return TEST_MODEL_NAMES[llmId] ?? llmId;
|
|
62
|
+
}
|
|
63
|
+
(0, import_qunit.module)("Acceptance | AI Assistant tests", function(hooks) {
|
|
64
|
+
setupApplicationTest(hooks);
|
|
65
|
+
setupLocalIndexing(hooks);
|
|
66
|
+
setupOnSave(hooks);
|
|
67
|
+
let mockMatrixUtils = setupMockMatrix(hooks, {
|
|
68
|
+
loggedInAs: "@testuser:localhost",
|
|
69
|
+
activeRealms: [baseRealm.url, testRealmURL],
|
|
70
|
+
directRooms: [
|
|
71
|
+
getRoomIdForRealmAndUser(testRealmURL, "@testuser:localhost"),
|
|
72
|
+
getRoomIdForRealmAndUser(baseRealm.url, "@testuser:localhost"),
|
|
73
|
+
"test-auth-realm-server-session-room"
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
let { createAndJoinRoom, getRoomIds, getRoomState, simulateRemoteMessage } = mockMatrixUtils;
|
|
77
|
+
setupRealmServerEndpoints(hooks, [{
|
|
78
|
+
route: "_request-forward",
|
|
79
|
+
getResponse: async (req) => {
|
|
80
|
+
const body = await req.json();
|
|
81
|
+
if (body.url.includes("openrouter.ai/api/v1/chat/completions")) {
|
|
82
|
+
const requestBody = JSON.parse(body.requestBody);
|
|
83
|
+
if (requestBody.messages && requestBody.messages.some((msg) => msg.content && msg.content.includes("Please provide a concise summary"))) {
|
|
84
|
+
const conversationText = requestBody.messages.filter((msg) => msg.role === "user" && !msg.content.includes("Please provide a concise summary")).map((msg) => msg.content).join(" ");
|
|
85
|
+
let summary = "This conversation focused on general discussion.";
|
|
86
|
+
if (conversationText.includes("project")) summary = "This conversation focused on project help, specifically creating a new card for a person with name and age fields. The user requested assistance with card creation and field definition.";
|
|
87
|
+
else if (conversationText.includes("card") && conversationText.includes("file")) summary = "This conversation involved discussing a person card (Hassan) and a pet definition file. The user shared both a Person card and a pet.gts file, then asked for help understanding the structure.";
|
|
88
|
+
else if (conversationText.includes("error")) throw new Error("OpenRouter API error");
|
|
89
|
+
return new Response(JSON.stringify({ choices: [{ message: { content: summary } }] }), {
|
|
90
|
+
status: 200,
|
|
91
|
+
headers: { "Content-Type": "application/json" }
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return new Response(JSON.stringify({
|
|
96
|
+
success: true,
|
|
97
|
+
data: {
|
|
98
|
+
id: 123,
|
|
99
|
+
name: "test"
|
|
100
|
+
}
|
|
101
|
+
}), {
|
|
102
|
+
status: 200,
|
|
103
|
+
headers: { "Content-Type": "application/json" }
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}]);
|
|
107
|
+
setupBaseRealm(hooks);
|
|
108
|
+
hooks.beforeEach(async function() {
|
|
109
|
+
matrixRoomId = createAndJoinRoom({
|
|
110
|
+
sender: "@testuser:localhost",
|
|
111
|
+
name: "room-test"
|
|
112
|
+
});
|
|
113
|
+
setupUserSubscription();
|
|
114
|
+
setupAuthEndpoints();
|
|
115
|
+
class Pet extends CardDef {
|
|
116
|
+
static displayName = "Pet";
|
|
117
|
+
static {
|
|
118
|
+
decorateFieldV2(this.prototype, "name", [field], function() {
|
|
119
|
+
return contains(StringField);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
#name = (initializeDeferredDecorator(this, "name"), void 0);
|
|
123
|
+
static {
|
|
124
|
+
decorateFieldV2(this.prototype, "favoriteTreat", [field], function() {
|
|
125
|
+
return contains(StringField);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
#favoriteTreat = (initializeDeferredDecorator(this, "favoriteTreat"), void 0);
|
|
129
|
+
static {
|
|
130
|
+
decorateFieldV2(this.prototype, "cardTitle", [field], function() {
|
|
131
|
+
return contains(StringField, { computeVia: function() {
|
|
132
|
+
return this.name;
|
|
133
|
+
} });
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
#cardTitle = (initializeDeferredDecorator(this, "cardTitle"), void 0);
|
|
137
|
+
static embedded = class Embedded extends Component {
|
|
138
|
+
static {
|
|
139
|
+
setComponentTemplate(templateFactory({
|
|
140
|
+
"id": "42cIT+kJ",
|
|
141
|
+
"block": "[[[10,\"h3\"],[15,\"data-test-pet\",[30,1,[\"name\"]]],[12],[1,\"\\n \"],[8,[30,2,[\"name\"]],null,null,null],[1,\"\\n\"],[13]],[\"@model\",\"@fields\"],[]]",
|
|
142
|
+
"moduleName": "/home/runner/work/boxel/boxel/packages/host/tests/acceptance/ai-assistant-test.gts",
|
|
143
|
+
"isStrictMode": true
|
|
144
|
+
}), this);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
static isolated = class Isolated extends Component {
|
|
148
|
+
static {
|
|
149
|
+
setComponentTemplate(templateFactory({
|
|
150
|
+
"id": "Z8KhIcUS",
|
|
151
|
+
"block": "[[[8,[32,0],[[24,0,\"container\"]],null,[[\"default\"],[[[[1,\"\\n \"],[10,\"h2\"],[12],[8,[30,1,[\"cardTitle\"]],null,null,null],[13],[1,\"\\n \"],[10,0],[12],[1,\"\\n \"],[10,0],[12],[1,\"Favorite Treat: \"],[8,[30,1,[\"favoriteTreat\"]],null,null,null],[13],[1,\"\\n \"],[10,0],[14,\"data-test-editable-meta\",\"\"],[12],[1,\"\\n\"],[41,[30,2],[[[1,\" \"],[8,[30,1,[\"cardTitle\"]],null,null,null],[1,\"\\n is editable.\\n\"]],[]],[[[1,\" \"],[8,[30,1,[\"cardTitle\"]],null,null,null],[1,\"\\n is NOT editable.\\n\"]],[]]],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]]]]]],[\"@fields\",\"@canEdit\"],[\"if\"]]",
|
|
152
|
+
"moduleName": "/home/runner/work/boxel/boxel/packages/host/tests/acceptance/ai-assistant-test.gts",
|
|
153
|
+
"scope": () => [GridContainer],
|
|
154
|
+
"isStrictMode": true
|
|
155
|
+
}), this);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
class Person extends CardDef {
|
|
160
|
+
static displayName = "Person";
|
|
161
|
+
static {
|
|
162
|
+
decorateFieldV2(this.prototype, "firstName", [field], function() {
|
|
163
|
+
return contains(StringField);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
#firstName = (initializeDeferredDecorator(this, "firstName"), void 0);
|
|
167
|
+
static {
|
|
168
|
+
decorateFieldV2(this.prototype, "lastName", [field], function() {
|
|
169
|
+
return contains(StringField);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
#lastName = (initializeDeferredDecorator(this, "lastName"), void 0);
|
|
173
|
+
static {
|
|
174
|
+
decorateFieldV2(this.prototype, "pet", [field], function() {
|
|
175
|
+
return linksTo(Pet);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
#pet = (initializeDeferredDecorator(this, "pet"), void 0);
|
|
179
|
+
static {
|
|
180
|
+
decorateFieldV2(this.prototype, "friends", [field], function() {
|
|
181
|
+
return linksToMany(Pet);
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
#friends = (initializeDeferredDecorator(this, "friends"), void 0);
|
|
185
|
+
static {
|
|
186
|
+
decorateFieldV2(this.prototype, "firstLetterOfTheName", [field], function() {
|
|
187
|
+
return contains(StringField, { computeVia: function() {
|
|
188
|
+
if (!this.firstName) return;
|
|
189
|
+
return this.firstName[0];
|
|
190
|
+
} });
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
#firstLetterOfTheName = (initializeDeferredDecorator(this, "firstLetterOfTheName"), void 0);
|
|
194
|
+
static {
|
|
195
|
+
decorateFieldV2(this.prototype, "cardTitle", [field], function() {
|
|
196
|
+
return contains(StringField, { computeVia: function() {
|
|
197
|
+
return [this.firstName, this.lastName].filter(Boolean).join(" ");
|
|
198
|
+
} });
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
#cardTitle = (initializeDeferredDecorator(this, "cardTitle"), void 0);
|
|
202
|
+
static isolated = class Isolated extends Component {
|
|
203
|
+
static {
|
|
204
|
+
setComponentTemplate(templateFactory({
|
|
205
|
+
"id": "cygZodII",
|
|
206
|
+
"block": "[[[10,\"h2\"],[15,\"data-test-person\",[30,1,[\"firstName\"]]],[12],[1,\"\\n \"],[8,[30,2,[\"firstName\"]],null,null,null],[1,\"\\n\"],[13],[1,\"\\n\"],[10,2],[15,\"data-test-first-letter-of-the-name\",[30,1,[\"firstLetterOfTheName\"]]],[12],[1,\"\\n \"],[8,[30,2,[\"firstLetterOfTheName\"]],null,null,null],[1,\"\\n\"],[13],[1,\"\\nPet:\\n\"],[8,[30,2,[\"pet\"]],null,null,null],[1,\"\\nFriends:\\n\"],[8,[30,2,[\"friends\"]],null,null,null]],[\"@model\",\"@fields\"],[]]",
|
|
207
|
+
"moduleName": "/home/runner/work/boxel/boxel/packages/host/tests/acceptance/ai-assistant-test.gts",
|
|
208
|
+
"isStrictMode": true
|
|
209
|
+
}), this);
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
let mangoPet = new Pet({ name: "Mango" });
|
|
214
|
+
let openAiGpt5Model = new ModelConfiguration({
|
|
215
|
+
cardInfo: new CardInfoField({ name: modelNameFor("openai/gpt-5") }),
|
|
216
|
+
modelId: "openai/gpt-5",
|
|
217
|
+
toolsSupported: true,
|
|
218
|
+
reasoningEffort: "minimal"
|
|
219
|
+
});
|
|
220
|
+
let openAiGpt5ExtendedModel = new ModelConfiguration({
|
|
221
|
+
cardInfo: new CardInfoField({ name: modelNameFor("openai/gpt-5-extended") }),
|
|
222
|
+
modelId: "openai/gpt-5",
|
|
223
|
+
toolsSupported: true,
|
|
224
|
+
reasoningEffort: "high"
|
|
225
|
+
});
|
|
226
|
+
let openAiGpt4oMiniModel = new ModelConfiguration({
|
|
227
|
+
cardInfo: new CardInfoField({ name: modelNameFor("openai/gpt-4o-mini") }),
|
|
228
|
+
modelId: "openai/gpt-4o-mini",
|
|
229
|
+
toolsSupported: true
|
|
230
|
+
});
|
|
231
|
+
let anthropicClaudeSonnet46Model = new ModelConfiguration({
|
|
232
|
+
cardInfo: new CardInfoField({ name: modelNameFor("anthropic/claude-sonnet-4.6") }),
|
|
233
|
+
modelId: "anthropic/claude-sonnet-4.6",
|
|
234
|
+
toolsSupported: true
|
|
235
|
+
});
|
|
236
|
+
let anthropicClaudeSonnet45Model = new ModelConfiguration({
|
|
237
|
+
cardInfo: new CardInfoField({ name: modelNameFor("anthropic/claude-sonnet-4.5") }),
|
|
238
|
+
modelId: "anthropic/claude-sonnet-4.5",
|
|
239
|
+
toolsSupported: true
|
|
240
|
+
});
|
|
241
|
+
let anthropicClaudeSonnet37Model = new ModelConfiguration({
|
|
242
|
+
cardInfo: new CardInfoField({ name: modelNameFor("anthropic/claude-3.7-sonnet") }),
|
|
243
|
+
modelId: "anthropic/claude-3.7-sonnet",
|
|
244
|
+
toolsSupported: true
|
|
245
|
+
});
|
|
246
|
+
let defaultSystemCard = new SystemCard({
|
|
247
|
+
defaultModelConfiguration: anthropicClaudeSonnet46Model,
|
|
248
|
+
modelConfigurations: [
|
|
249
|
+
openAiGpt5Model,
|
|
250
|
+
openAiGpt5ExtendedModel,
|
|
251
|
+
openAiGpt4oMiniModel,
|
|
252
|
+
anthropicClaudeSonnet46Model,
|
|
253
|
+
anthropicClaudeSonnet45Model,
|
|
254
|
+
anthropicClaudeSonnet37Model
|
|
255
|
+
]
|
|
256
|
+
});
|
|
257
|
+
let deepseekModel = new ModelConfiguration({
|
|
258
|
+
cardInfo: new CardInfoField({ name: modelNameFor("deepseek/deepseek-chat-v3-0324") }),
|
|
259
|
+
modelId: "deepseek/deepseek-chat-v3-0324",
|
|
260
|
+
toolsSupported: true
|
|
261
|
+
});
|
|
262
|
+
let geminiFlashModel = new ModelConfiguration({
|
|
263
|
+
cardInfo: new CardInfoField({ name: modelNameFor("google/gemini-2.5-flash") }),
|
|
264
|
+
modelId: "google/gemini-2.5-flash",
|
|
265
|
+
toolsSupported: true
|
|
266
|
+
});
|
|
267
|
+
let alternateSystemCard = new SystemCard({
|
|
268
|
+
defaultModelConfiguration: deepseekModel,
|
|
269
|
+
modelConfigurations: [
|
|
270
|
+
deepseekModel,
|
|
271
|
+
geminiFlashModel,
|
|
272
|
+
openAiGpt5Model
|
|
273
|
+
]
|
|
274
|
+
});
|
|
275
|
+
await setupAcceptanceTestRealm({
|
|
276
|
+
mockMatrixUtils,
|
|
277
|
+
contents: {
|
|
278
|
+
...SYSTEM_CARD_FIXTURE_CONTENTS,
|
|
279
|
+
"person.gts": { Person },
|
|
280
|
+
"pet.gts": { Pet },
|
|
281
|
+
"broken-card.gts": `
|
|
282
|
+
import { CardDef, field, contains } from 'https://cardstack.com/base/card-api';
|
|
283
|
+
import StringField from 'https://cardstack.com/base/string';
|
|
284
|
+
import { BrokenField } from './does-not-exist';
|
|
285
|
+
export class BrokenCard extends CardDef {
|
|
286
|
+
static displayName = 'Broken Card';
|
|
287
|
+
@field name = contains(StringField);
|
|
288
|
+
@field broken = contains(BrokenField);
|
|
289
|
+
}
|
|
290
|
+
`,
|
|
291
|
+
"BrokenCard/errored.json": { data: {
|
|
292
|
+
attributes: { name: "Errored Instance" },
|
|
293
|
+
meta: { adoptsFrom: {
|
|
294
|
+
module: "../broken-card",
|
|
295
|
+
name: "BrokenCard"
|
|
296
|
+
} }
|
|
297
|
+
} },
|
|
298
|
+
"country.gts": countryDefinition,
|
|
299
|
+
"Country/indonesia.json": { data: {
|
|
300
|
+
attributes: { name: "Indonesia" },
|
|
301
|
+
meta: { adoptsFrom: {
|
|
302
|
+
module: `${testRealmURL}country`,
|
|
303
|
+
name: "Country"
|
|
304
|
+
} }
|
|
305
|
+
} },
|
|
306
|
+
"Pet/ringo.json": new Pet({ name: "Ringo" }),
|
|
307
|
+
"Person/hassan.json": new Person({
|
|
308
|
+
firstName: "Hassan",
|
|
309
|
+
lastName: "Abdel-Rahman",
|
|
310
|
+
pet: mangoPet,
|
|
311
|
+
friends: [mangoPet]
|
|
312
|
+
}),
|
|
313
|
+
"Pet/mango.json": mangoPet,
|
|
314
|
+
"Pet/vangogh.json": new Pet({ name: "Van Gogh" }),
|
|
315
|
+
"Person/fadhlan.json": new Person({
|
|
316
|
+
firstName: "Fadhlan",
|
|
317
|
+
pet: mangoPet,
|
|
318
|
+
friends: [mangoPet]
|
|
319
|
+
}),
|
|
320
|
+
"plant.gts": `
|
|
321
|
+
import { CardDef, field, contains, StringField } from 'https://cardstack.com/base/card-api';
|
|
322
|
+
export class Plant extends CardDef {
|
|
323
|
+
static displayName = "Plant";
|
|
324
|
+
@field commonName = contains(StringField);
|
|
325
|
+
}
|
|
326
|
+
`,
|
|
327
|
+
"Plant/highbush-blueberry.json": { data: {
|
|
328
|
+
attributes: { commonName: "Highbush Blueberry" },
|
|
329
|
+
meta: { adoptsFrom: {
|
|
330
|
+
module: `../plant`,
|
|
331
|
+
name: "Plant"
|
|
332
|
+
} }
|
|
333
|
+
} },
|
|
334
|
+
"Spec/plant-spec.json": { data: {
|
|
335
|
+
type: "card",
|
|
336
|
+
attributes: {
|
|
337
|
+
ref: {
|
|
338
|
+
name: "Plant",
|
|
339
|
+
module: `${testRealmURL}plant`
|
|
340
|
+
},
|
|
341
|
+
specType: "card",
|
|
342
|
+
cardTitle: "Plant spec"
|
|
343
|
+
},
|
|
344
|
+
meta: { adoptsFrom: {
|
|
345
|
+
module: "https://cardstack.com/base/spec",
|
|
346
|
+
name: "Spec"
|
|
347
|
+
} }
|
|
348
|
+
} },
|
|
349
|
+
"Skill/example.json": { data: {
|
|
350
|
+
attributes: {
|
|
351
|
+
cardTitle: "Example Skill",
|
|
352
|
+
cardDescription: "This skill card is for testing purposes",
|
|
353
|
+
instructions: "This is an example skill card",
|
|
354
|
+
commands: []
|
|
355
|
+
},
|
|
356
|
+
meta: { adoptsFrom: skillCardRef }
|
|
357
|
+
} },
|
|
358
|
+
"Skill/example2.json": { data: {
|
|
359
|
+
attributes: {
|
|
360
|
+
cardTitle: "Example 2 Skill",
|
|
361
|
+
cardDescription: "This skill card is also for testing purposes",
|
|
362
|
+
instructions: "This is a second example skill card",
|
|
363
|
+
commands: []
|
|
364
|
+
},
|
|
365
|
+
meta: { adoptsFrom: skillCardRef }
|
|
366
|
+
} },
|
|
367
|
+
"ModelConfiguration/gpt-4o-mini.json": openAiGpt4oMiniModel,
|
|
368
|
+
"ModelConfiguration/gpt-5.json": openAiGpt5Model,
|
|
369
|
+
"ModelConfiguration/gpt-5-extended.json": openAiGpt5ExtendedModel,
|
|
370
|
+
"ModelConfiguration/claude-sonnet-4.6.json": anthropicClaudeSonnet46Model,
|
|
371
|
+
"ModelConfiguration/claude-sonnet-4.5.json": anthropicClaudeSonnet45Model,
|
|
372
|
+
"ModelConfiguration/claude-sonnet-3.7.json": anthropicClaudeSonnet37Model,
|
|
373
|
+
"SystemCard/default.json": defaultSystemCard,
|
|
374
|
+
"ModelConfiguration/deepseek-chat-v3-0324.json": deepseekModel,
|
|
375
|
+
"ModelConfiguration/gemini-2.5-flash.json": geminiFlashModel,
|
|
376
|
+
"SystemCard/productivity.json": alternateSystemCard,
|
|
377
|
+
"index.json": new CardsGrid(),
|
|
378
|
+
"realm.json": realmConfigCardJSON({
|
|
379
|
+
name: "Test Workspace B",
|
|
380
|
+
backgroundURL: "https://i.postimg.cc/VNvHH93M/pawel-czerwinski-Ly-ZLa-A5jti-Y-unsplash.jpg",
|
|
381
|
+
iconURL: "https://i.postimg.cc/L8yXRvws/icon.png"
|
|
382
|
+
})
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
getService("matrix-service").fetchMatrixHostedFile = async (_url) => {
|
|
386
|
+
return new Response(mockedFileContent);
|
|
387
|
+
};
|
|
388
|
+
});
|
|
389
|
+
(0, import_qunit.test)("attaches a card in a conversation multiple times", async function(assert) {
|
|
390
|
+
await visitOperatorMode({ stacks: [[{
|
|
391
|
+
id: `${testRealmURL}index`,
|
|
392
|
+
format: "isolated"
|
|
393
|
+
}]] });
|
|
394
|
+
await click("[data-test-open-ai-assistant]");
|
|
395
|
+
await waitFor(`[data-room-settled]`);
|
|
396
|
+
const testCard = `${testRealmURL}Person/hassan`;
|
|
397
|
+
for (let i = 1; i <= 3; i++) {
|
|
398
|
+
await fillIn("[data-test-message-field]", `Message - ${i}`);
|
|
399
|
+
await selectCardFromCatalog(testCard);
|
|
400
|
+
await click("[data-test-send-message-btn]");
|
|
401
|
+
}
|
|
402
|
+
assertMessages(assert, [
|
|
403
|
+
{
|
|
404
|
+
from: "testuser",
|
|
405
|
+
message: "Message - 1",
|
|
406
|
+
cards: [{
|
|
407
|
+
id: testCard,
|
|
408
|
+
cardTitle: "Hassan"
|
|
409
|
+
}]
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
from: "testuser",
|
|
413
|
+
message: "Message - 2",
|
|
414
|
+
cards: [{
|
|
415
|
+
id: testCard,
|
|
416
|
+
cardTitle: "Hassan"
|
|
417
|
+
}]
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
from: "testuser",
|
|
421
|
+
message: "Message - 3",
|
|
422
|
+
cards: [{
|
|
423
|
+
id: testCard,
|
|
424
|
+
cardTitle: "Hassan"
|
|
425
|
+
}]
|
|
426
|
+
}
|
|
427
|
+
]);
|
|
428
|
+
await click("[data-test-boxel-filter-list-button=\"All Cards\"]");
|
|
429
|
+
await click(`[data-test-stack-card="${testRealmURL}index"] [data-test-cards-grid-item="${testCard}"] .field-component-card`);
|
|
430
|
+
await waitFor(`[data-test-stack-card="${testCard}"]`);
|
|
431
|
+
await click(`[data-test-stack-card="${testCard}"] [data-test-edit-button]`);
|
|
432
|
+
await fillIn("[data-test-field=\"firstName\"] [data-test-boxel-input]", "Updated Name");
|
|
433
|
+
await click(`[data-test-stack-card="${testCard}"] [data-test-edit-button]`);
|
|
434
|
+
await fillIn("[data-test-message-field]", `Message with updated card`);
|
|
435
|
+
await click("[data-test-send-message-btn]");
|
|
436
|
+
assertMessages(assert, [
|
|
437
|
+
{
|
|
438
|
+
from: "testuser",
|
|
439
|
+
message: "Message - 1",
|
|
440
|
+
cards: [{
|
|
441
|
+
id: testCard,
|
|
442
|
+
cardTitle: "Updated Name Abdel-Rahman"
|
|
443
|
+
}]
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
from: "testuser",
|
|
447
|
+
message: "Message - 2",
|
|
448
|
+
cards: [{
|
|
449
|
+
id: testCard,
|
|
450
|
+
cardTitle: "Updated Name Abdel-Rahman"
|
|
451
|
+
}]
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
from: "testuser",
|
|
455
|
+
message: "Message - 3",
|
|
456
|
+
cards: [{
|
|
457
|
+
id: testCard,
|
|
458
|
+
cardTitle: "Updated Name Abdel-Rahman"
|
|
459
|
+
}]
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
from: "testuser",
|
|
463
|
+
message: "Message with updated card",
|
|
464
|
+
cards: [{
|
|
465
|
+
id: testCard,
|
|
466
|
+
cardTitle: "Updated Name Abdel-Rahman"
|
|
467
|
+
}]
|
|
468
|
+
}
|
|
469
|
+
]);
|
|
470
|
+
});
|
|
471
|
+
(0, import_qunit.test)("attached cards include computed fields", async function(assert) {
|
|
472
|
+
await visitOperatorMode({ stacks: [[{
|
|
473
|
+
id: `${testRealmURL}index`,
|
|
474
|
+
format: "isolated"
|
|
475
|
+
}]] });
|
|
476
|
+
await click("[data-test-open-ai-assistant]");
|
|
477
|
+
await waitFor(`[data-room-settled]`);
|
|
478
|
+
const testCard = `${testRealmURL}Person/hassan`;
|
|
479
|
+
await fillIn("[data-test-message-field]", `Message - 1`);
|
|
480
|
+
await selectCardFromCatalog(testCard);
|
|
481
|
+
await click("[data-test-send-message-btn]");
|
|
482
|
+
assertMessages(assert, [{
|
|
483
|
+
from: "testuser",
|
|
484
|
+
message: "Message - 1",
|
|
485
|
+
cards: [{
|
|
486
|
+
id: testCard,
|
|
487
|
+
cardTitle: "Hassan"
|
|
488
|
+
}]
|
|
489
|
+
}]);
|
|
490
|
+
let roomEvents = mockMatrixUtils.getRoomEvents(matrixRoomId);
|
|
491
|
+
let lastMessageEvent = roomEvents[roomEvents.length - 1];
|
|
492
|
+
assert.ok(lastMessageEvent, "A message event was found");
|
|
493
|
+
let messageDataString = lastMessageEvent.content?.data;
|
|
494
|
+
assert.ok(messageDataString, "Message has data string");
|
|
495
|
+
let messageData = JSON.parse(messageDataString);
|
|
496
|
+
assert.ok(messageData, "Message data is parsable");
|
|
497
|
+
let attachedCards = messageData.attachedCards;
|
|
498
|
+
assert.ok(attachedCards, "Message has attachedCards");
|
|
499
|
+
assert.strictEqual(attachedCards.length, 1, "One card is attached");
|
|
500
|
+
let attachedCard = attachedCards[0];
|
|
501
|
+
assert.ok(attachedCard, "Attached card is present");
|
|
502
|
+
const mxcUrl = attachedCard.url;
|
|
503
|
+
assert.ok(mxcUrl, "Attached card has a URL (mxc)");
|
|
504
|
+
assert.ok(mxcUrl.startsWith("http://mock-server/_matrix/media/"), `Card URL "${mxcUrl}" should start with http://mock-server/_matrix/media/`);
|
|
505
|
+
let cardContent = await getService("matrix-service").downloadCardFileDef(attachedCard);
|
|
506
|
+
assert.strictEqual(cardContent.data.attributes.cardTitle, "Hassan Abdel-Rahman", "Computed card title is present in downloaded content");
|
|
507
|
+
});
|
|
508
|
+
(0, import_qunit.test)("displays active LLM in chat input", async function(assert) {
|
|
509
|
+
await visitOperatorMode({ stacks: [[{
|
|
510
|
+
id: `${testRealmURL}index`,
|
|
511
|
+
format: "isolated"
|
|
512
|
+
}]] });
|
|
513
|
+
await click("[data-test-open-ai-assistant]");
|
|
514
|
+
await waitFor(`[data-room-settled]`);
|
|
515
|
+
let defaultModelName = modelNameFor("anthropic/claude-sonnet-4.6");
|
|
516
|
+
assert.dom("[data-test-llm-select-selected]").hasText(defaultModelName);
|
|
517
|
+
await click("[data-test-llm-select-selected]");
|
|
518
|
+
assert.dom("[data-test-llm-select-item]").exists({ count: 6 });
|
|
519
|
+
let llmIdToChangeTo = "anthropic/claude-3.7-sonnet";
|
|
520
|
+
let llmConfigId = configIdFor(llmIdToChangeTo);
|
|
521
|
+
let llmNameToChangeTo = modelNameFor("anthropic/claude-3.7-sonnet");
|
|
522
|
+
assert.dom(`[data-test-llm-select-item="${llmConfigId}"]`).hasText(llmNameToChangeTo);
|
|
523
|
+
await click(`[data-test-llm-select-item="${llmConfigId}"] button`);
|
|
524
|
+
await click("[data-test-llm-select-selected]");
|
|
525
|
+
assert.dom("[data-test-llm-select-selected]").hasText(llmNameToChangeTo);
|
|
526
|
+
let roomState = getRoomState(matrixRoomId, APP_BOXEL_ACTIVE_LLM, "");
|
|
527
|
+
assert.strictEqual(roomState.model, llmIdToChangeTo);
|
|
528
|
+
});
|
|
529
|
+
(0, import_qunit.test)("active LLM event includes metadata when switching models", async function(assert) {
|
|
530
|
+
await visitOperatorMode({ stacks: [[{
|
|
531
|
+
id: `${testRealmURL}index`,
|
|
532
|
+
format: "isolated"
|
|
533
|
+
}]] });
|
|
534
|
+
await click("[data-test-open-ai-assistant]");
|
|
535
|
+
await waitFor("[data-room-settled]");
|
|
536
|
+
await click("[data-test-llm-select-selected]");
|
|
537
|
+
await click(`[data-test-llm-select-item="${configIdFor("openai/gpt-4o-mini")}"] button`);
|
|
538
|
+
await click("[data-test-llm-select-selected]");
|
|
539
|
+
await waitUntil(() => {
|
|
540
|
+
return getRoomState(matrixRoomId, APP_BOXEL_ACTIVE_LLM, "").model === "openai/gpt-4o-mini";
|
|
541
|
+
});
|
|
542
|
+
let firstState = getRoomState(matrixRoomId, APP_BOXEL_ACTIVE_LLM, "");
|
|
543
|
+
assert.strictEqual(firstState.model, "openai/gpt-4o-mini", "Switching to GPT-4o mini updates active LLM");
|
|
544
|
+
assert.true(firstState.toolsSupported, "Active LLM event records tool support for GPT-4o mini");
|
|
545
|
+
assert.strictEqual(firstState.reasoningEffort, null, "Reasoning effort is omitted when not configured");
|
|
546
|
+
await click("[data-test-llm-select-selected]");
|
|
547
|
+
await click(`[data-test-llm-select-item="${configIdFor("openai/gpt-5")}"] button`);
|
|
548
|
+
await click("[data-test-llm-select-selected]");
|
|
549
|
+
await waitUntil(() => {
|
|
550
|
+
return getRoomState(matrixRoomId, APP_BOXEL_ACTIVE_LLM, "").model === "openai/gpt-5";
|
|
551
|
+
});
|
|
552
|
+
let secondState = getRoomState(matrixRoomId, APP_BOXEL_ACTIVE_LLM, "");
|
|
553
|
+
assert.strictEqual(secondState.model, "openai/gpt-5", "Switching back to GPT-5 updates active LLM");
|
|
554
|
+
assert.true(secondState.toolsSupported, "Active LLM event records tool support for GPT-5");
|
|
555
|
+
assert.strictEqual(secondState.reasoningEffort, "minimal", "Active LLM event records configured reasoning effort for GPT-5");
|
|
556
|
+
});
|
|
557
|
+
(0, import_qunit.test)("duplicate model IDs render as distinct menu items with correct state", async function(assert) {
|
|
558
|
+
await visitOperatorMode({ stacks: [[{
|
|
559
|
+
id: `${testRealmURL}index`,
|
|
560
|
+
format: "isolated"
|
|
561
|
+
}]] });
|
|
562
|
+
await click("[data-test-open-ai-assistant]");
|
|
563
|
+
await waitFor(`[data-room-settled]`);
|
|
564
|
+
await click("[data-test-llm-select-selected]");
|
|
565
|
+
let gpt5ConfigId = configIdFor("openai/gpt-5");
|
|
566
|
+
let gpt5ExtendedConfigId = configIdFor("openai/gpt-5-extended");
|
|
567
|
+
assert.dom(`[data-test-llm-select-item="${gpt5ConfigId}"]`).exists("GPT-5 (minimal) config appears in the menu");
|
|
568
|
+
assert.dom(`[data-test-llm-select-item="${gpt5ExtendedConfigId}"]`).exists("GPT-5 Extended Thinking config appears in the menu");
|
|
569
|
+
assert.dom(`[data-test-llm-select-item="${gpt5ConfigId}"]`).hasText(modelNameFor("openai/gpt-5"));
|
|
570
|
+
assert.dom(`[data-test-llm-select-item="${gpt5ExtendedConfigId}"]`).hasText(modelNameFor("openai/gpt-5-extended"));
|
|
571
|
+
await click(`[data-test-llm-select-item="${gpt5ExtendedConfigId}"] button`);
|
|
572
|
+
await click("[data-test-llm-select-selected]");
|
|
573
|
+
await waitUntil(() => {
|
|
574
|
+
let state = getRoomState(matrixRoomId, APP_BOXEL_ACTIVE_LLM, "");
|
|
575
|
+
return state.model === "openai/gpt-5" && state.reasoningEffort === "high";
|
|
576
|
+
});
|
|
577
|
+
let extendedState = getRoomState(matrixRoomId, APP_BOXEL_ACTIVE_LLM, "");
|
|
578
|
+
assert.strictEqual(extendedState.model, "openai/gpt-5", "Extended thinking variant sends the same modelId");
|
|
579
|
+
assert.strictEqual(extendedState.reasoningEffort, "high", "Extended thinking variant sends its own reasoningEffort");
|
|
580
|
+
await click("[data-test-llm-select-selected]");
|
|
581
|
+
await click(`[data-test-llm-select-item="${gpt5ConfigId}"] button`);
|
|
582
|
+
await click("[data-test-llm-select-selected]");
|
|
583
|
+
await waitUntil(() => {
|
|
584
|
+
let state = getRoomState(matrixRoomId, APP_BOXEL_ACTIVE_LLM, "");
|
|
585
|
+
return state.model === "openai/gpt-5" && state.reasoningEffort === "minimal";
|
|
586
|
+
});
|
|
587
|
+
let minimalState = getRoomState(matrixRoomId, APP_BOXEL_ACTIVE_LLM, "");
|
|
588
|
+
assert.strictEqual(minimalState.model, "openai/gpt-5", "Minimal variant sends the same modelId");
|
|
589
|
+
assert.strictEqual(minimalState.reasoningEffort, "minimal", "Minimal variant sends its own reasoningEffort");
|
|
590
|
+
});
|
|
591
|
+
(0, import_qunit.test)("defaults to the system card default regardless of submode", async function(assert) {
|
|
592
|
+
await visitOperatorMode({ stacks: [[{
|
|
593
|
+
id: `${testRealmURL}index`,
|
|
594
|
+
format: "isolated"
|
|
595
|
+
}]] });
|
|
596
|
+
await click("[data-test-open-ai-assistant]");
|
|
597
|
+
await waitFor(`[data-room-settled]`);
|
|
598
|
+
let matrixService = getService("matrix-service");
|
|
599
|
+
let defaultSystemModelId = matrixService.systemCard?.defaultModelConfiguration?.modelId ?? matrixService.systemCard?.modelConfigurations?.[0]?.modelId;
|
|
600
|
+
assert.ok(defaultSystemModelId, "system card provides a default model");
|
|
601
|
+
let expectedName = modelNameFor(defaultSystemModelId);
|
|
602
|
+
assert.dom("[data-test-llm-select-selected]").hasText(expectedName);
|
|
603
|
+
await click("[data-test-submode-switcher-button]");
|
|
604
|
+
await click("[data-test-boxel-menu-item-text=\"Code\"]");
|
|
605
|
+
assert.dom("[data-test-llm-select-selected]").hasText(expectedName);
|
|
606
|
+
await click("[data-test-close-ai-assistant]");
|
|
607
|
+
});
|
|
608
|
+
(0, import_qunit.test)("selecting a new system card via menu updates available models", async function(assert) {
|
|
609
|
+
await visitOperatorMode({ stacks: [[{
|
|
610
|
+
id: `${testRealmURL}SystemCard/productivity`,
|
|
611
|
+
format: "isolated"
|
|
612
|
+
}]] });
|
|
613
|
+
await click("[data-test-open-ai-assistant]");
|
|
614
|
+
await waitFor(`[data-room-settled]`);
|
|
615
|
+
await click("[data-test-llm-select-selected]");
|
|
616
|
+
assert.dom(`[data-test-llm-select-item="${configIdFor("deepseek/deepseek-chat-v3-0324")}"]`).doesNotExist();
|
|
617
|
+
await click("[data-test-llm-select-selected]");
|
|
618
|
+
await click("[data-test-close-ai-assistant]");
|
|
619
|
+
await click("[data-test-more-options-button]");
|
|
620
|
+
await click("[data-test-boxel-menu-item-text=\"Set as My System Card\"]");
|
|
621
|
+
let matrixService = getService("matrix-service");
|
|
622
|
+
await waitUntil(() => matrixService.systemCard?.modelConfigurations?.[0]?.modelId === "deepseek/deepseek-chat-v3-0324");
|
|
623
|
+
await click("[data-test-open-ai-assistant]");
|
|
624
|
+
await waitFor(`[data-room-settled]`);
|
|
625
|
+
assert.dom("[data-test-llm-select-selected]").hasText(modelNameFor("deepseek/deepseek-chat-v3-0324"));
|
|
626
|
+
await click("[data-test-llm-select-selected]");
|
|
627
|
+
assert.dom(`[data-test-llm-select-item="${configIdFor("deepseek/deepseek-chat-v3-0324")}"]`).exists();
|
|
628
|
+
assert.dom(`[data-test-llm-select-item="${configIdFor("deepseek/deepseek-chat-v3-0324")}"]`).hasText(modelNameFor("deepseek/deepseek-chat-v3-0324"));
|
|
629
|
+
assert.dom(`[data-test-llm-select-item="${configIdFor("google/gemini-2.5-flash")}"]`).exists();
|
|
630
|
+
await click("[data-test-pill-menu-button]");
|
|
631
|
+
await click("[data-test-close-ai-assistant]");
|
|
632
|
+
});
|
|
633
|
+
(0, import_qunit.test)("LLM select footer shows \"Go to current system card\" action", async function(assert) {
|
|
634
|
+
await visitOperatorMode({ stacks: [[{
|
|
635
|
+
id: `${testRealmURL}index`,
|
|
636
|
+
format: "isolated"
|
|
637
|
+
}]] });
|
|
638
|
+
await click("[data-test-open-ai-assistant]");
|
|
639
|
+
await waitFor("[data-room-settled]");
|
|
640
|
+
await click("[data-test-llm-select-selected]");
|
|
641
|
+
assert.dom("[data-test-go-to-system-card]").exists("Go to system card action is visible");
|
|
642
|
+
assert.dom("[data-test-go-to-system-card]").hasText("Go to current system card");
|
|
643
|
+
await click("[data-test-pill-menu-button]");
|
|
644
|
+
await click("[data-test-close-ai-assistant]");
|
|
645
|
+
});
|
|
646
|
+
(0, import_qunit.test)("LLM select footer shows \"Restore default\" when non-default system card is active", async function(assert) {
|
|
647
|
+
await visitOperatorMode({ stacks: [[{
|
|
648
|
+
id: `${testRealmURL}SystemCard/productivity`,
|
|
649
|
+
format: "isolated"
|
|
650
|
+
}]] });
|
|
651
|
+
await click("[data-test-more-options-button]");
|
|
652
|
+
await click("[data-test-boxel-menu-item-text=\"Set as My System Card\"]");
|
|
653
|
+
let matrixService = getService("matrix-service");
|
|
654
|
+
await waitUntil(() => matrixService.systemCard?.modelConfigurations?.[0]?.modelId === "deepseek/deepseek-chat-v3-0324");
|
|
655
|
+
await click("[data-test-open-ai-assistant]");
|
|
656
|
+
await waitFor("[data-room-settled]");
|
|
657
|
+
await click("[data-test-llm-select-selected]");
|
|
658
|
+
assert.dom("[data-test-restore-default-system-card]").exists("Restore default action is visible for non-default system card");
|
|
659
|
+
await click("[data-test-pill-menu-button]");
|
|
660
|
+
await click("[data-test-close-ai-assistant]");
|
|
661
|
+
});
|
|
662
|
+
(0, import_qunit.test)("LLM select footer hides \"Restore default\" when default system card is active", async function(assert) {
|
|
663
|
+
await visitOperatorMode({ stacks: [[{
|
|
664
|
+
id: `${testRealmURL}index`,
|
|
665
|
+
format: "isolated"
|
|
666
|
+
}]] });
|
|
667
|
+
await click("[data-test-open-ai-assistant]");
|
|
668
|
+
await waitFor("[data-room-settled]");
|
|
669
|
+
await click("[data-test-llm-select-selected]");
|
|
670
|
+
assert.dom("[data-test-restore-default-system-card]").doesNotExist("Restore default action is hidden when default system card is active");
|
|
671
|
+
await click("[data-test-pill-menu-button]");
|
|
672
|
+
await click("[data-test-close-ai-assistant]");
|
|
673
|
+
});
|
|
674
|
+
(0, import_qunit.test)("auto-attached file is not displayed in interact mode", async function(assert) {
|
|
675
|
+
await visitOperatorMode({
|
|
676
|
+
submode: "interact",
|
|
677
|
+
codePath: `${testRealmURL}index.json`,
|
|
678
|
+
stacks: [[{
|
|
679
|
+
id: `${testRealmURL}index`,
|
|
680
|
+
format: "isolated"
|
|
681
|
+
}]]
|
|
682
|
+
});
|
|
683
|
+
await click("[data-test-boxel-filter-list-button=\"All Cards\"]");
|
|
684
|
+
await click("[data-test-cards-grid-item=\"http://test-realm/test/Person/fadhlan\"] .field-component-card");
|
|
685
|
+
await click("[data-test-open-ai-assistant]");
|
|
686
|
+
await waitFor(`[data-room-settled]`);
|
|
687
|
+
assert.dom("[data-test-autoattached-file]").doesNotExist();
|
|
688
|
+
assert.dom("[data-test-autoattached-card]").exists();
|
|
689
|
+
await click("[data-test-submode-switcher-button]");
|
|
690
|
+
await click("[data-test-boxel-menu-item-text=\"Code\"]");
|
|
691
|
+
assert.dom("[data-test-autoattached-file]").exists();
|
|
692
|
+
assert.dom("[data-test-autoattached-card]").exists();
|
|
693
|
+
await click("[data-test-submode-switcher-button]");
|
|
694
|
+
await click("[data-test-boxel-menu-item-text=\"Interact\"]");
|
|
695
|
+
assert.dom("[data-test-autoattached-file]").doesNotExist();
|
|
696
|
+
assert.dom("[data-test-autoattached-card]").exists();
|
|
697
|
+
});
|
|
698
|
+
(0, import_qunit.test)("cards are auto-attached in code mode", async function(assert) {
|
|
699
|
+
await visitOperatorMode({
|
|
700
|
+
submode: "interact",
|
|
701
|
+
codePath: `${testRealmURL}index.json`,
|
|
702
|
+
stacks: [[{
|
|
703
|
+
id: `${testRealmURL}index`,
|
|
704
|
+
format: "isolated"
|
|
705
|
+
}]]
|
|
706
|
+
});
|
|
707
|
+
await click("[data-test-boxel-filter-list-button=\"All Cards\"]");
|
|
708
|
+
await click("[data-test-cards-grid-item=\"http://test-realm/test/Person/fadhlan\"] .field-component-card");
|
|
709
|
+
await click("[data-test-open-ai-assistant]");
|
|
710
|
+
await waitFor(`[data-room-settled]`);
|
|
711
|
+
await waitUntil(() => document.querySelector("[data-test-autoattached-card]") || document.querySelector("[data-test-autoattached-file]"));
|
|
712
|
+
assert.dom("[data-test-autoattached-file]").doesNotExist();
|
|
713
|
+
assert.dom("[data-test-autoattached-card]").exists();
|
|
714
|
+
await click("[data-test-submode-switcher-button]");
|
|
715
|
+
await click("[data-test-boxel-menu-item-text=\"Code\"]");
|
|
716
|
+
assert.dom("[data-test-autoattached-file]").exists();
|
|
717
|
+
assert.dom("[data-test-autoattached-card]").exists();
|
|
718
|
+
await click(`[data-test-autoattached-card] [data-test-remove-card-btn]`);
|
|
719
|
+
assert.dom("[data-test-autoattached-card]").doesNotExist();
|
|
720
|
+
});
|
|
721
|
+
(0, import_qunit.test)("errored card instance is not auto-attached in code mode", async function(assert) {
|
|
722
|
+
await visitOperatorMode({
|
|
723
|
+
submode: "code",
|
|
724
|
+
codePath: `${testRealmURL}BrokenCard/errored.json`,
|
|
725
|
+
stacks: [[]]
|
|
726
|
+
});
|
|
727
|
+
await click("[data-test-open-ai-assistant]");
|
|
728
|
+
await waitFor(`[data-room-settled]`);
|
|
729
|
+
assert.dom("[data-test-autoattached-file]").exists("errored card JSON file should still be auto-attached as a file");
|
|
730
|
+
assert.dom("[data-test-autoattached-card]").doesNotExist("errored card instance should not be auto-attached as a card");
|
|
731
|
+
});
|
|
732
|
+
(0, import_qunit.test)("can send a newly created auto-attached card", async function(assert) {
|
|
733
|
+
await visitOperatorMode({
|
|
734
|
+
submode: "interact",
|
|
735
|
+
codePath: `${testRealmURL}index.json`,
|
|
736
|
+
stacks: [[{
|
|
737
|
+
id: `${testRealmURL}index`,
|
|
738
|
+
format: "isolated"
|
|
739
|
+
}]]
|
|
740
|
+
});
|
|
741
|
+
let id;
|
|
742
|
+
this.onSave((url) => {
|
|
743
|
+
id = url.href;
|
|
744
|
+
});
|
|
745
|
+
await click("[data-test-open-ai-assistant]");
|
|
746
|
+
assert.dom("[data-test-attached-card]").doesNotExist();
|
|
747
|
+
await click("[data-test-boxel-filter-list-button=\"All Cards\"]");
|
|
748
|
+
await click("[data-test-create-new-card-button]");
|
|
749
|
+
await click(`[data-test-card-catalog-item="https://cardstack.com/base/types/card"]`);
|
|
750
|
+
await click(`[data-test-card-catalog-go-button]`);
|
|
751
|
+
await waitUntil(() => id);
|
|
752
|
+
id = id;
|
|
753
|
+
await fillIn("[data-test-field=\"cardInfo-name\"] input", "new card");
|
|
754
|
+
assert.dom(`[data-test-attached-card]`).containsText("new card");
|
|
755
|
+
await fillIn("[data-test-message-field]", `Message with updated card`);
|
|
756
|
+
await click("[data-test-send-message-btn]");
|
|
757
|
+
assertMessages(assert, [{
|
|
758
|
+
from: "testuser",
|
|
759
|
+
message: "Message with updated card",
|
|
760
|
+
cards: [{
|
|
761
|
+
id,
|
|
762
|
+
cardTitle: "new card"
|
|
763
|
+
}]
|
|
764
|
+
}]);
|
|
765
|
+
});
|
|
766
|
+
(0, import_qunit.test)("can open attached card dropdown menu", async function(assert) {
|
|
767
|
+
await visitOperatorMode({
|
|
768
|
+
submode: "interact",
|
|
769
|
+
codePath: `${testRealmURL}index.json`,
|
|
770
|
+
stacks: [[{
|
|
771
|
+
id: `${testRealmURL}index`,
|
|
772
|
+
format: "isolated"
|
|
773
|
+
}]]
|
|
774
|
+
});
|
|
775
|
+
await click("[data-test-boxel-filter-list-button=\"All Cards\"]");
|
|
776
|
+
await click("[data-test-cards-grid-item=\"http://test-realm/test/Person/fadhlan\"] .field-component-card");
|
|
777
|
+
await click("[data-test-open-ai-assistant]");
|
|
778
|
+
await waitFor(`[data-room-settled]`);
|
|
779
|
+
await waitUntil(() => document.querySelector("[data-test-autoattached-card]") || document.querySelector("[data-test-autoattached-file]"));
|
|
780
|
+
await fillIn("[data-test-message-field]", `Message with updated card`);
|
|
781
|
+
await click("[data-test-send-message-btn]");
|
|
782
|
+
mockedFileContent = "test card content";
|
|
783
|
+
await click("[data-test-workspace-chooser-toggle]");
|
|
784
|
+
await click("[data-test-attached-file-dropdown-button=\"Fadhlan\"]");
|
|
785
|
+
assert.dom("[data-test-boxel-menu-item-text=\"Open in Code Mode\"]").exists();
|
|
786
|
+
assert.dom("[data-test-boxel-menu-item-text=\"Copy Submitted Content\"]").exists();
|
|
787
|
+
assert.dom("[data-test-boxel-menu-item-text=\"Restore Submitted Content\"]").exists();
|
|
788
|
+
await waitFor("[data-test-copy-file-content=\"test card content\"]");
|
|
789
|
+
await click("[data-test-boxel-menu-item-text=\"Open in Code Mode\"]");
|
|
790
|
+
await waitUntil(() => getMonacoContent().startsWith("{\"data\":{\"type\":\"card\",\"id\":\"http://test-realm/test/Person/fadhlan\""), { timeout: 5e3 });
|
|
791
|
+
});
|
|
792
|
+
(0, import_qunit.test)("can open attach file modal", async function(assert) {
|
|
793
|
+
await visitOperatorMode({
|
|
794
|
+
submode: "code",
|
|
795
|
+
stacks: [[{
|
|
796
|
+
id: `${testRealmURL}index`,
|
|
797
|
+
format: "isolated"
|
|
798
|
+
}]]
|
|
799
|
+
});
|
|
800
|
+
await click("[data-test-open-ai-assistant]");
|
|
801
|
+
await waitFor(`[data-room-settled]`);
|
|
802
|
+
await getService("monaco-service").getMonacoContext();
|
|
803
|
+
await click("[data-test-attach-button]");
|
|
804
|
+
await click("[data-test-attach-file-btn]");
|
|
805
|
+
assert.dom("[data-test-choose-file-modal]").exists();
|
|
806
|
+
assert.dom("[data-test-file=\"pet.gts\"]").exists();
|
|
807
|
+
await click("[data-test-realm-dropdown-trigger]");
|
|
808
|
+
await waitFor("[data-test-boxel-menu-item-text=\"Base Workspace\"]");
|
|
809
|
+
await click("[data-test-boxel-menu-item-text=\"Base Workspace\"]");
|
|
810
|
+
assert.dom("[data-test-file=\"boolean.gts\"]").exists();
|
|
811
|
+
await click("[data-test-realm-dropdown-trigger]");
|
|
812
|
+
await waitFor("[data-test-boxel-menu-item-text=\"Test Workspace B\"]");
|
|
813
|
+
await click("[data-test-boxel-menu-item-text=\"Test Workspace B\"]");
|
|
814
|
+
await click("[data-test-file=\"person.gts\"]");
|
|
815
|
+
await click("[data-test-choose-file-modal-add-button]");
|
|
816
|
+
assert.dom("[data-test-attached-file]").exists({ count: 1 });
|
|
817
|
+
assert.dom("[data-test-attached-file]").hasText("person.gts");
|
|
818
|
+
await click("[data-test-attach-button]");
|
|
819
|
+
await click("[data-test-attach-file-btn]");
|
|
820
|
+
await click("[data-test-file=\"pet.gts\"]");
|
|
821
|
+
await click("[data-test-choose-file-modal-add-button]");
|
|
822
|
+
assert.dom("[data-test-attached-file]").exists({ count: 2 });
|
|
823
|
+
assert.dom(`[data-test-attached-file="${testRealmURL}person.gts"]`).hasText("person.gts");
|
|
824
|
+
assert.dom(`[data-test-attached-file="${testRealmURL}pet.gts"]`).hasText("pet.gts");
|
|
825
|
+
await click(`[data-test-attached-file="${testRealmURL}person.gts"] [data-test-remove-file-btn]`);
|
|
826
|
+
assert.dom("[data-test-attached-file]").hasText("pet.gts");
|
|
827
|
+
await fillIn("[data-test-message-field]", `Message With File`);
|
|
828
|
+
await click("[data-test-send-message-btn]");
|
|
829
|
+
assertMessages(assert, [{
|
|
830
|
+
from: "testuser",
|
|
831
|
+
message: "Message With File",
|
|
832
|
+
files: [{
|
|
833
|
+
sourceUrl: `${testRealmURL}pet.gts`,
|
|
834
|
+
name: "pet.gts"
|
|
835
|
+
}]
|
|
836
|
+
}]);
|
|
837
|
+
});
|
|
838
|
+
(0, import_qunit.test)("can display and remove auto attached file", async function(assert) {
|
|
839
|
+
await visitOperatorMode({
|
|
840
|
+
submode: "code",
|
|
841
|
+
stacks: [[{
|
|
842
|
+
id: `${testRealmURL}index`,
|
|
843
|
+
format: "isolated"
|
|
844
|
+
}]]
|
|
845
|
+
});
|
|
846
|
+
await click("[data-test-open-ai-assistant]");
|
|
847
|
+
await waitFor(`[data-room-settled]`);
|
|
848
|
+
await click("[data-test-file=\"person.gts\"]");
|
|
849
|
+
assert.dom("[data-test-autoattached-file]").exists();
|
|
850
|
+
assert.dom(`[data-test-autoattached-file]`).hasText("person.gts");
|
|
851
|
+
await click("[data-test-file-browser-toggle]");
|
|
852
|
+
await click(`[data-test-autoattached-file] [data-test-remove-file-btn]`);
|
|
853
|
+
assert.dom("[data-test-autoattached-file]").doesNotExist();
|
|
854
|
+
await click("[data-test-file-browser-toggle]");
|
|
855
|
+
await click("[data-test-file=\"pet.gts\"]");
|
|
856
|
+
assert.dom("[data-test-autoattached-file]").exists();
|
|
857
|
+
assert.dom(`[data-test-autoattached-file]`).hasText("pet.gts");
|
|
858
|
+
await click("[data-test-file-browser-toggle]");
|
|
859
|
+
await click("[data-test-file=\"person.gts\"]");
|
|
860
|
+
assert.dom("[data-test-autoattached-file]").exists();
|
|
861
|
+
assert.dom(`[data-test-autoattached-file]`).hasText("person.gts");
|
|
862
|
+
});
|
|
863
|
+
(0, import_qunit.test)("loads more AI rooms when scrolling", async function(assert) {
|
|
864
|
+
for (let i = 1; i <= 15; i++) createAndJoinRoom({
|
|
865
|
+
sender: "@testuser:localhost",
|
|
866
|
+
name: `AI Room ${i}`
|
|
867
|
+
});
|
|
868
|
+
await visitOperatorMode({ stacks: [[{
|
|
869
|
+
id: `${testRealmURL}index`,
|
|
870
|
+
format: "isolated"
|
|
871
|
+
}]] });
|
|
872
|
+
await click("[data-test-open-ai-assistant]");
|
|
873
|
+
await waitFor(`[data-room-settled]`);
|
|
874
|
+
await click("[data-test-past-sessions-button]");
|
|
875
|
+
assert.dom("[data-test-past-sessions]").exists();
|
|
876
|
+
await waitUntil(() => document.querySelectorAll("[data-test-joined-room]").length >= 10);
|
|
877
|
+
let initialRoomCount = document.querySelectorAll("[data-test-joined-room]").length;
|
|
878
|
+
assert.ok(initialRoomCount >= 10, `Expected at least 10 rooms, got ${initialRoomCount}`);
|
|
879
|
+
let pastSessionsElement = document.querySelector("[data-test-past-sessions] .body ul");
|
|
880
|
+
if (pastSessionsElement) pastSessionsElement.scrollTop = pastSessionsElement.scrollHeight;
|
|
881
|
+
await waitUntil(() => {
|
|
882
|
+
return document.querySelectorAll("[data-test-joined-room]").length >= Math.min(initialRoomCount + 1, 16);
|
|
883
|
+
});
|
|
884
|
+
assert.dom("[data-test-joined-room]").exists({ count: 16 });
|
|
885
|
+
});
|
|
886
|
+
(0, import_qunit.test)("preserves ai assistant panel open/closed status", async function(assert) {
|
|
887
|
+
let operatorModeStateParam = wrapper_default({
|
|
888
|
+
stacks: [[{
|
|
889
|
+
id: `${testRealmURL}index`,
|
|
890
|
+
format: "isolated"
|
|
891
|
+
}]],
|
|
892
|
+
aiAssistantOpen: false
|
|
893
|
+
});
|
|
894
|
+
await visit(`/?operatorModeEnabled=true&operatorModeState=${encodeURIComponent(operatorModeStateParam)}`);
|
|
895
|
+
assert.dom("[data-test-ai-assistant-panel]").doesNotExist();
|
|
896
|
+
await click("[data-test-open-ai-assistant]");
|
|
897
|
+
await waitFor(`[data-room-settled]`);
|
|
898
|
+
assert.dom("[data-test-ai-assistant-panel]").exists();
|
|
899
|
+
let operatorModeStateService = getService("operator-mode-state-service");
|
|
900
|
+
assert.true(operatorModeStateService.aiAssistantOpen, "URL state should have aiAssistantOpen: true");
|
|
901
|
+
await click("[data-test-close-ai-assistant]");
|
|
902
|
+
assert.dom("[data-test-ai-assistant-panel]").doesNotExist();
|
|
903
|
+
assert.false(operatorModeStateService.aiAssistantOpen, "URL state should have aiAssistantOpen: false");
|
|
904
|
+
await visitOperatorMode({
|
|
905
|
+
stacks: [[{
|
|
906
|
+
id: `${testRealmURL}index`,
|
|
907
|
+
format: "isolated"
|
|
908
|
+
}]],
|
|
909
|
+
aiAssistantOpen: true
|
|
910
|
+
});
|
|
911
|
+
assert.dom("[data-test-ai-assistant-panel]").exists();
|
|
912
|
+
});
|
|
913
|
+
(0, import_qunit.test)("auto-attached cards behaviour", async function(assert) {
|
|
914
|
+
await visitOperatorMode({
|
|
915
|
+
submode: "interact",
|
|
916
|
+
codePath: `${testRealmURL}index.json`,
|
|
917
|
+
stacks: [[{
|
|
918
|
+
id: `${testRealmURL}index`,
|
|
919
|
+
format: "isolated"
|
|
920
|
+
}]]
|
|
921
|
+
});
|
|
922
|
+
await click("[data-test-boxel-filter-list-button=\"All Cards\"]");
|
|
923
|
+
await click(`[data-test-cards-grid-item="${testRealmURL}Person/fadhlan"] .field-component-card`);
|
|
924
|
+
await click("[data-test-open-ai-assistant]");
|
|
925
|
+
await waitFor(`[data-room-settled]`);
|
|
926
|
+
assert.dom("[data-test-autoattached-file]").doesNotExist();
|
|
927
|
+
assert.dom("[data-test-autoattached-card]").exists({ count: 1 });
|
|
928
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Person/fadhlan"][data-test-autoattached-card]`).exists();
|
|
929
|
+
await click("[data-test-add-card-right-stack]");
|
|
930
|
+
await fillIn("[data-test-search-field]", "Mango");
|
|
931
|
+
await click(`[data-test-search-result="${testRealmURL}Pet/mango"]`);
|
|
932
|
+
assert.dom("[data-test-autoattached-card]").exists({ count: 2 });
|
|
933
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Person/fadhlan"][data-test-autoattached-card]`).exists();
|
|
934
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Pet/mango"][data-test-autoattached-card]`).exists();
|
|
935
|
+
await click("[data-test-attach-button]");
|
|
936
|
+
await click("[data-test-attach-card-btn]");
|
|
937
|
+
await fillIn("[data-test-search-field]", "Mango");
|
|
938
|
+
await click(`[data-test-card-catalog-item="${testRealmURL}Pet/mango"]`);
|
|
939
|
+
await click("[data-test-card-catalog-go-button]");
|
|
940
|
+
assert.dom("[data-test-autoattached-card]").exists({ count: 1 });
|
|
941
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Person/fadhlan"][data-test-autoattached-card]`).exists();
|
|
942
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Pet/mango"][data-test-autoattached-card]`).doesNotExist();
|
|
943
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Pet/mango"]`).exists();
|
|
944
|
+
await click("[data-test-submode-switcher-button]");
|
|
945
|
+
await click("[data-test-boxel-menu-item-text=\"Code\"]");
|
|
946
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Person/fadhlan"][data-test-autoattached-card]`).doesNotExist();
|
|
947
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Pet/mango"][data-test-autoattached-card]`).doesNotExist();
|
|
948
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Pet/mango"]`).exists();
|
|
949
|
+
await click("[data-test-file-browser-toggle]");
|
|
950
|
+
await click("[data-test-directory=\"Person/\"]");
|
|
951
|
+
await click("[data-test-file=\"Person/fadhlan.json\"]");
|
|
952
|
+
assert.dom("[data-test-attached-card]").exists({ count: 2 });
|
|
953
|
+
assert.dom("[data-test-autoattached-card]").exists({ count: 1 });
|
|
954
|
+
assert.dom("[data-test-autoattached-file]").exists({ count: 2 });
|
|
955
|
+
assert.dom(`[data-test-attached-file="${testRealmURL}Person/fadhlan.json"][data-test-autoattached-file]`).exists();
|
|
956
|
+
assert.dom(`[data-test-attached-file="${testRealmURL}person.gts"][data-test-autoattached-file]`).exists();
|
|
957
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Pet/mango"]`).exists();
|
|
958
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Person/fadhlan"][data-test-autoattached-card]`).exists();
|
|
959
|
+
await click("[data-test-file=\"country.gts\"]");
|
|
960
|
+
await click("[data-test-module-inspector-view=\"preview\"]");
|
|
961
|
+
assert.dom("[data-test-attached-card]").exists({ count: 2 });
|
|
962
|
+
assert.dom("[data-test-autoattached-card]").exists({ count: 1 });
|
|
963
|
+
assert.dom("[data-test-autoattached-file]").exists({ count: 1 });
|
|
964
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Pet/mango"]`).exists();
|
|
965
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Country/indonesia"][data-test-autoattached-card]`).exists();
|
|
966
|
+
assert.dom(`[data-test-attached-file="${testRealmURL}country.gts"][data-test-autoattached-file]`).exists();
|
|
967
|
+
await click(`[data-test-attached-card="${testRealmURL}Country/indonesia"] [data-test-remove-card-btn]`);
|
|
968
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Country/indonesia"]`).doesNotExist();
|
|
969
|
+
});
|
|
970
|
+
(0, import_qunit.test)("displays \"Generating results...\" when streaming", async function(assert) {
|
|
971
|
+
await visitOperatorMode({
|
|
972
|
+
submode: "interact",
|
|
973
|
+
codePath: `${testRealmURL}index.json`,
|
|
974
|
+
stacks: [[{
|
|
975
|
+
id: `${testRealmURL}index`,
|
|
976
|
+
format: "isolated"
|
|
977
|
+
}]]
|
|
978
|
+
});
|
|
979
|
+
await click("[data-test-boxel-filter-list-button=\"All Cards\"]");
|
|
980
|
+
await click(`[data-test-cards-grid-item="${testRealmURL}Person/fadhlan"] .field-component-card`);
|
|
981
|
+
await click("[data-test-open-ai-assistant]");
|
|
982
|
+
await waitFor(`[data-room-settled]`);
|
|
983
|
+
let eventId = simulateRemoteMessage(matrixRoomId, "@aibot:localhost", {
|
|
984
|
+
body: "Streaming...",
|
|
985
|
+
msgtype: APP_BOXEL_MESSAGE_MSGTYPE,
|
|
986
|
+
format: "org.matrix.custom.html",
|
|
987
|
+
isStreamingFinished: false
|
|
988
|
+
});
|
|
989
|
+
await waitFor("[data-test-ai-assistant-action-bar]");
|
|
990
|
+
assert.dom("[data-test-ai-assistant-action-bar]").containsText("Generating results...");
|
|
991
|
+
assert.dom("[data-test-stop-generating]").exists();
|
|
992
|
+
simulateRemoteMessage(matrixRoomId, "@aibot:localhost", {
|
|
993
|
+
body: "Streaming finished",
|
|
994
|
+
msgtype: APP_BOXEL_MESSAGE_MSGTYPE,
|
|
995
|
+
format: "org.matrix.custom.html",
|
|
996
|
+
isStreamingFinished: true,
|
|
997
|
+
"m.relates_to": {
|
|
998
|
+
event_id: eventId,
|
|
999
|
+
rel_type: "m.replace"
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
await waitUntil(() => !document.querySelector("[data-test-ai-assistant-action-bar]"));
|
|
1003
|
+
});
|
|
1004
|
+
(0, import_qunit.test)("displays \"Generation Cancelled\" in the bottom of the message", async function(assert) {
|
|
1005
|
+
await visitOperatorMode({
|
|
1006
|
+
submode: "interact",
|
|
1007
|
+
codePath: `${testRealmURL}index.json`,
|
|
1008
|
+
stacks: [[{
|
|
1009
|
+
id: `${testRealmURL}index`,
|
|
1010
|
+
format: "isolated"
|
|
1011
|
+
}]]
|
|
1012
|
+
});
|
|
1013
|
+
await click("[data-test-boxel-filter-list-button=\"All Cards\"]");
|
|
1014
|
+
await click(`[data-test-cards-grid-item="${testRealmURL}Person/fadhlan"] .field-component-card`);
|
|
1015
|
+
await click("[data-test-open-ai-assistant]");
|
|
1016
|
+
await waitFor(`[data-room-settled]`);
|
|
1017
|
+
let eventId = simulateRemoteMessage(matrixRoomId, "@aibot:localhost", {
|
|
1018
|
+
body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
1019
|
+
msgtype: APP_BOXEL_MESSAGE_MSGTYPE,
|
|
1020
|
+
format: "org.matrix.custom.html",
|
|
1021
|
+
isStreamingFinished: false,
|
|
1022
|
+
isCanceled: false
|
|
1023
|
+
});
|
|
1024
|
+
await waitFor("[data-test-ai-assistant-message]");
|
|
1025
|
+
assert.dom("[data-test-ai-assistant-action-bar]").exists();
|
|
1026
|
+
assert.dom("[data-test-ai-assistant-action-bar]").containsText("Generating results...");
|
|
1027
|
+
assert.dom("[data-test-stop-generating]").exists();
|
|
1028
|
+
assert.dom("[data-test-ai-message-content]").hasText("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
|
|
1029
|
+
simulateRemoteMessage(matrixRoomId, "@aibot:localhost", {
|
|
1030
|
+
body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
1031
|
+
msgtype: APP_BOXEL_MESSAGE_MSGTYPE,
|
|
1032
|
+
format: "org.matrix.custom.html",
|
|
1033
|
+
isStreamingFinished: true,
|
|
1034
|
+
isCanceled: true,
|
|
1035
|
+
"m.relates_to": {
|
|
1036
|
+
event_id: eventId,
|
|
1037
|
+
rel_type: "m.replace"
|
|
1038
|
+
}
|
|
1039
|
+
});
|
|
1040
|
+
await waitUntil(() => !document.querySelector("[data-test-ai-assistant-action-bar]"));
|
|
1041
|
+
assert.dom("[data-test-ai-message-content]").hasText("Lorem ipsum dolor sit amet, consectetur adipiscing elit. {Generation Cancelled}");
|
|
1042
|
+
});
|
|
1043
|
+
(0, import_qunit.test)(`displays "Generation Cancelled" in the bottom of the message when it's stopped during reasoning`, async function(assert) {
|
|
1044
|
+
await visitOperatorMode({
|
|
1045
|
+
submode: "interact",
|
|
1046
|
+
codePath: `${testRealmURL}index.json`,
|
|
1047
|
+
stacks: [[{
|
|
1048
|
+
id: `${testRealmURL}index`,
|
|
1049
|
+
format: "isolated"
|
|
1050
|
+
}]]
|
|
1051
|
+
});
|
|
1052
|
+
await click("[data-test-boxel-filter-list-button=\"All Cards\"]");
|
|
1053
|
+
await click(`[data-test-cards-grid-item="${testRealmURL}Person/fadhlan"] .field-component-card`);
|
|
1054
|
+
await click("[data-test-open-ai-assistant]");
|
|
1055
|
+
await waitFor(`[data-room-settled]`);
|
|
1056
|
+
let eventId = simulateRemoteMessage(matrixRoomId, "@aibot:localhost", {
|
|
1057
|
+
[APP_BOXEL_REASONING_CONTENT_KEY]: "This message will be cancelled before the reasoning is finished",
|
|
1058
|
+
msgtype: APP_BOXEL_MESSAGE_MSGTYPE,
|
|
1059
|
+
format: "org.matrix.custom.html",
|
|
1060
|
+
isStreamingFinished: false,
|
|
1061
|
+
isCanceled: false
|
|
1062
|
+
});
|
|
1063
|
+
await waitFor("[data-test-ai-assistant-message]");
|
|
1064
|
+
assert.dom("[data-test-ai-assistant-action-bar]").exists();
|
|
1065
|
+
assert.dom("[data-test-ai-assistant-action-bar]").containsText("Generating results...");
|
|
1066
|
+
assert.dom("[data-test-stop-generating]").exists();
|
|
1067
|
+
assert.dom("[data-test-ai-message-content]").containsText("Thinking...");
|
|
1068
|
+
assert.dom("[data-test-ai-message-content]").doesNotContainText("{Generation Cancelled}");
|
|
1069
|
+
assert.dom("[data-test-reasoning]").containsText("This message will be cancelled before the reasoning is finished");
|
|
1070
|
+
simulateRemoteMessage(matrixRoomId, "@aibot:localhost", {
|
|
1071
|
+
[APP_BOXEL_REASONING_CONTENT_KEY]: "This message will be cancelled before the reasoning is finished",
|
|
1072
|
+
msgtype: APP_BOXEL_MESSAGE_MSGTYPE,
|
|
1073
|
+
format: "org.matrix.custom.html",
|
|
1074
|
+
isStreamingFinished: true,
|
|
1075
|
+
isCanceled: true,
|
|
1076
|
+
"m.relates_to": {
|
|
1077
|
+
event_id: eventId,
|
|
1078
|
+
rel_type: "m.replace"
|
|
1079
|
+
}
|
|
1080
|
+
});
|
|
1081
|
+
await waitUntil(() => !document.querySelector("[data-test-ai-assistant-action-bar]"));
|
|
1082
|
+
assert.dom("[data-test-ai-message-content]").containsText("Thinking...");
|
|
1083
|
+
assert.dom("[data-test-ai-message-content]").containsText("{Generation Cancelled}");
|
|
1084
|
+
await click("[data-test-reasoning]");
|
|
1085
|
+
assert.dom("[data-test-reasoning]").containsText("This message will be cancelled before the reasoning is finished");
|
|
1086
|
+
});
|
|
1087
|
+
(0, import_qunit.test)(`should not display action bar when there is no code patch block`, async function(assert) {
|
|
1088
|
+
await visitOperatorMode({
|
|
1089
|
+
submode: "interact",
|
|
1090
|
+
codePath: `${testRealmURL}index.json`,
|
|
1091
|
+
stacks: [[{
|
|
1092
|
+
id: `${testRealmURL}index`,
|
|
1093
|
+
format: "isolated"
|
|
1094
|
+
}]]
|
|
1095
|
+
});
|
|
1096
|
+
await click("[data-test-boxel-filter-list-button=\"All Cards\"]");
|
|
1097
|
+
await click(`[data-test-cards-grid-item="${testRealmURL}Person/fadhlan"] .field-component-card`);
|
|
1098
|
+
await click("[data-test-open-ai-assistant]");
|
|
1099
|
+
await waitFor(`[data-room-settled]`);
|
|
1100
|
+
simulateRemoteMessage(matrixRoomId, "@aibot:localhost", {
|
|
1101
|
+
body: `\`\`\`
|
|
1102
|
+
{ "name": "test" }
|
|
1103
|
+
\`\`\``,
|
|
1104
|
+
msgtype: APP_BOXEL_MESSAGE_MSGTYPE,
|
|
1105
|
+
format: "org.matrix.custom.html",
|
|
1106
|
+
isStreamingFinished: true
|
|
1107
|
+
});
|
|
1108
|
+
await waitFor("[data-test-ai-assistant-message]");
|
|
1109
|
+
assert.dom("[data-test-ai-assistant-action-bar]").doesNotExist();
|
|
1110
|
+
});
|
|
1111
|
+
(0, import_qunit.test)("code mode context sent with message", async function(assert) {
|
|
1112
|
+
await visitOperatorMode({
|
|
1113
|
+
submode: "code",
|
|
1114
|
+
codePath: `${testRealmURL}Plant/highbush-blueberry.json`,
|
|
1115
|
+
stacks: [[{
|
|
1116
|
+
id: `${testRealmURL}index`,
|
|
1117
|
+
format: "isolated"
|
|
1118
|
+
}, {
|
|
1119
|
+
id: `${testRealmURL}Plant/highbush-blueberry`,
|
|
1120
|
+
format: "isolated"
|
|
1121
|
+
}]]
|
|
1122
|
+
});
|
|
1123
|
+
await click("[data-test-open-ai-assistant]");
|
|
1124
|
+
await waitFor(`[data-room-settled]`);
|
|
1125
|
+
assert.dom("[data-test-focus-pill-main]").containsText("Card");
|
|
1126
|
+
assert.dom("[data-test-focus-pill-meta]").exists({ count: 1 }, "FocusPill shows one meta pill");
|
|
1127
|
+
let metaEls = document.querySelectorAll("[data-test-focus-pill-meta]");
|
|
1128
|
+
assert.dom(metaEls[0]).hasText("Isolated", "FocusPill shows item type \"Format\"");
|
|
1129
|
+
await click("[data-test-format-chooser=\"embedded\"]");
|
|
1130
|
+
assert.dom("[data-test-focus-pill-meta]").exists({ count: 1 }, "FocusPill shows one meta pill");
|
|
1131
|
+
metaEls = document.querySelectorAll("[data-test-focus-pill-meta]");
|
|
1132
|
+
assert.dom(metaEls[0]).hasText("Embedded", "FocusPill shows item type \"Format\"");
|
|
1133
|
+
await fillIn("[data-test-message-field]", `Message - 1`);
|
|
1134
|
+
await click("[data-test-send-message-btn]");
|
|
1135
|
+
let roomEvents = mockMatrixUtils.getRoomEvents(matrixRoomId);
|
|
1136
|
+
let lastMessageEvent = roomEvents[roomEvents.length - 1];
|
|
1137
|
+
let contextSent = JSON.parse(lastMessageEvent.content.data).context;
|
|
1138
|
+
assert.strictEqual(contextSent.realmUrl, testRealmURL, "Context sent with message contains correct realmUrl");
|
|
1139
|
+
assert.strictEqual(contextSent.submode, "code", "Context sent with message contains correct submode");
|
|
1140
|
+
assert.deepEqual(contextSent.openCardIds, [`${testRealmURL}Plant/highbush-blueberry`], "Context sent with message contains correct openCardIds");
|
|
1141
|
+
assert.strictEqual(contextSent.codeMode.currentFile, `${testRealmURL}Plant/highbush-blueberry.json`, "Context sent with message contains correct currentFile");
|
|
1142
|
+
assert.deepEqual(contextSent.codeMode.selectionRange, {
|
|
1143
|
+
startLine: 1,
|
|
1144
|
+
startColumn: 1,
|
|
1145
|
+
endLine: 1,
|
|
1146
|
+
endColumn: 1
|
|
1147
|
+
}, "Context sent with message contains correct selectionRange");
|
|
1148
|
+
assert.strictEqual(contextSent.codeMode.moduleInspectorPanel, "preview", "Context sent with message contains correct moduleInspectorPanel");
|
|
1149
|
+
assert.deepEqual(contextSent.codeMode.previewPanelSelection, {
|
|
1150
|
+
cardId: `${testRealmURL}Plant/highbush-blueberry`,
|
|
1151
|
+
format: "embedded"
|
|
1152
|
+
}, "Context sent with message contains correct previewPanelSelection");
|
|
1153
|
+
assert.deepEqual(contextSent.codeMode.selectedCodeRef, void 0, "Context sent with message contains correct selectedCodeRef");
|
|
1154
|
+
assert.deepEqual(contextSent.codeMode.inheritanceChain, void 0, "Context sent with message contains undefined inheritanceChain when no selectedCodeRef");
|
|
1155
|
+
assert.strictEqual(contextSent.codeMode.activeSpecId, void 0, "Context sent with message contains undefined activeSpecId when spec panel is not active");
|
|
1156
|
+
assert.deepEqual(contextSent.realmPermissions, {
|
|
1157
|
+
canRead: true,
|
|
1158
|
+
canWrite: true
|
|
1159
|
+
}, "Context sent with message contains correct realmPermissions");
|
|
1160
|
+
await click("[data-test-clickable-definition-container]");
|
|
1161
|
+
await waitFor("[data-test-focus-pill-main]");
|
|
1162
|
+
assert.dom("[data-test-focus-pill-main]").containsText("Plant", "FocusPill shows selected code label");
|
|
1163
|
+
assert.dom("[data-test-focus-pill-meta]").exists({ count: 1 }, "FocusPill shows one meta pill");
|
|
1164
|
+
metaEls = document.querySelectorAll("[data-test-focus-pill-meta]");
|
|
1165
|
+
assert.dom(metaEls[0]).hasText("Schema", "FocusPill shows item type \"Schema\"");
|
|
1166
|
+
await fillIn("[data-test-message-field]", `Message - 2`);
|
|
1167
|
+
await click("[data-test-send-message-btn]");
|
|
1168
|
+
roomEvents = mockMatrixUtils.getRoomEvents(matrixRoomId);
|
|
1169
|
+
lastMessageEvent = roomEvents[roomEvents.length - 1];
|
|
1170
|
+
contextSent = JSON.parse(lastMessageEvent.content.data).context;
|
|
1171
|
+
assert.strictEqual(contextSent.realmUrl, testRealmURL, "Context sent with message contains correct realmUrl");
|
|
1172
|
+
assert.strictEqual(contextSent.submode, "code", "Context sent with message contains correct submode");
|
|
1173
|
+
assert.deepEqual(contextSent.openCardIds, [], "Context sent with message contains correct openCardIds");
|
|
1174
|
+
assert.strictEqual(contextSent.codeMode.currentFile, `${testRealmURL}plant.gts`, "Context sent with message contains correct currentFile");
|
|
1175
|
+
assert.deepEqual(contextSent.codeMode.selectionRange, {
|
|
1176
|
+
startLine: 3,
|
|
1177
|
+
startColumn: 45,
|
|
1178
|
+
endLine: 3,
|
|
1179
|
+
endColumn: 45
|
|
1180
|
+
}, "Context sent with message contains correct selectionRange");
|
|
1181
|
+
assert.strictEqual(contextSent.codeMode.moduleInspectorPanel, "schema", "Context sent with message contains correct moduleInspectorPanel");
|
|
1182
|
+
assert.strictEqual(contextSent.codeMode.previewPanelSelection, void 0, "Context sent with message contains correct previewPanelSelection");
|
|
1183
|
+
assert.deepEqual(contextSent.codeMode.selectedCodeRef, {
|
|
1184
|
+
module: rri("http://test-realm/test/plant"),
|
|
1185
|
+
name: "Plant"
|
|
1186
|
+
}, "Context sent with message contains correct selectedCodeRef");
|
|
1187
|
+
assert.ok(contextSent.codeMode.inheritanceChain, "Context sent with message contains inheritanceChain");
|
|
1188
|
+
assert.deepEqual(contextSent.codeMode.inheritanceChain[0].codeRef, {
|
|
1189
|
+
module: rri("http://test-realm/test/plant"),
|
|
1190
|
+
name: "Plant"
|
|
1191
|
+
}, "First item in inheritanceChain is the Plant card");
|
|
1192
|
+
assert.ok(Array.isArray(contextSent.codeMode.inheritanceChain[0].fields), "Plant card has fields array");
|
|
1193
|
+
assert.ok(contextSent.codeMode.inheritanceChain[0].fields.includes("commonName"), "Plant card includes commonName field");
|
|
1194
|
+
let lastInheritanceItem = contextSent.codeMode.inheritanceChain[contextSent.codeMode.inheritanceChain.length - 1];
|
|
1195
|
+
assert.strictEqual(lastInheritanceItem.codeRef.name, "CardDef", "Last item in inheritanceChain is CardDef");
|
|
1196
|
+
contextSent.codeMode.inheritanceChain.forEach((item, index) => {
|
|
1197
|
+
assert.ok(Array.isArray(item.fields), `Inheritance chain item ${index} has fields array`);
|
|
1198
|
+
assert.ok("codeRef" in item, `Inheritance chain item ${index} has codeRef property`);
|
|
1199
|
+
});
|
|
1200
|
+
assert.ok(lastInheritanceItem.codeRef.module.includes("card-api"), "Last item in inheritanceChain comes from card-api module");
|
|
1201
|
+
assert.deepEqual(contextSent.realmPermissions, {
|
|
1202
|
+
canRead: true,
|
|
1203
|
+
canWrite: true
|
|
1204
|
+
}, "Context sent with message contains correct realmPermissions");
|
|
1205
|
+
await click("[data-test-boxel-button][data-test-module-inspector-view=\"preview\"]");
|
|
1206
|
+
let editor = getService("monaco-service").editor;
|
|
1207
|
+
if (editor?.setSelection) editor.setSelection({
|
|
1208
|
+
startLineNumber: 3,
|
|
1209
|
+
startColumn: 45,
|
|
1210
|
+
endLineNumber: 6,
|
|
1211
|
+
endColumn: 1
|
|
1212
|
+
});
|
|
1213
|
+
await waitFor("[data-test-focus-pill-main]");
|
|
1214
|
+
await delay(20);
|
|
1215
|
+
assert.dom("[data-test-focus-pill-main]").containsText("Plant", "FocusPill still shows selected code label");
|
|
1216
|
+
assert.dom("[data-test-focus-pill-meta]").exists({ count: 3 }, "FocusPill shows three meta pills");
|
|
1217
|
+
metaEls = document.querySelectorAll("[data-test-focus-pill-meta]");
|
|
1218
|
+
assert.dom(metaEls[0]).hasText("Preview", "FocusPill shows item type \"Preview\"");
|
|
1219
|
+
assert.dom(metaEls[1]).hasText("Isolated", "FocusPill shows format \"Isolated\"");
|
|
1220
|
+
assert.dom(metaEls[2]).hasText("Lines 3-6", "FocusPill shows multi-line selection range \"Lines 3-6\"");
|
|
1221
|
+
await click("[data-test-format-chooser=\"fitted\"]");
|
|
1222
|
+
metaEls = document.querySelectorAll("[data-test-focus-pill-meta]");
|
|
1223
|
+
assert.dom(metaEls[1]).hasText("Fitted", "FocusPill shows format \"Fitted\"");
|
|
1224
|
+
await fillIn("[data-test-message-field]", `Message - 3`);
|
|
1225
|
+
await click("[data-test-send-message-btn]");
|
|
1226
|
+
roomEvents = mockMatrixUtils.getRoomEvents(matrixRoomId);
|
|
1227
|
+
lastMessageEvent = roomEvents[roomEvents.length - 1];
|
|
1228
|
+
contextSent = JSON.parse(lastMessageEvent.content.data).context;
|
|
1229
|
+
assert.strictEqual(contextSent.realmUrl, testRealmURL, "Context sent with message contains correct realmUrl");
|
|
1230
|
+
assert.strictEqual(contextSent.submode, "code", "Context sent with message contains correct submode");
|
|
1231
|
+
assert.deepEqual(contextSent.openCardIds, [`${testRealmURL}Plant/highbush-blueberry`], "Context sent with message contains correct openCardIds");
|
|
1232
|
+
assert.strictEqual(contextSent.codeMode.currentFile, `${testRealmURL}plant.gts`, "Context sent with message contains correct currentFile");
|
|
1233
|
+
assert.deepEqual(contextSent.codeMode.selectionRange, {
|
|
1234
|
+
startLine: 3,
|
|
1235
|
+
startColumn: 45,
|
|
1236
|
+
endLine: 6,
|
|
1237
|
+
endColumn: 1
|
|
1238
|
+
}, "Context sent with message contains correct selectionRange");
|
|
1239
|
+
assert.strictEqual(contextSent.codeMode.moduleInspectorPanel, "preview", "Context sent with message contains correct moduleInspectorPanel");
|
|
1240
|
+
assert.deepEqual(contextSent.codeMode.previewPanelSelection, {
|
|
1241
|
+
cardId: `${testRealmURL}Plant/highbush-blueberry`,
|
|
1242
|
+
format: "fitted"
|
|
1243
|
+
}, "Context sent with message contains correct previewPanelSelection");
|
|
1244
|
+
assert.deepEqual(contextSent.codeMode.selectedCodeRef, {
|
|
1245
|
+
module: rri("http://test-realm/test/plant"),
|
|
1246
|
+
name: "Plant"
|
|
1247
|
+
}, "Context sent with message contains correct selectedCodeRef");
|
|
1248
|
+
assert.strictEqual(contextSent.codeMode.activeSpecId, void 0, "Context sent with message contains undefined activeSpecId when spec panel is not active");
|
|
1249
|
+
assert.deepEqual(contextSent.realmPermissions, {
|
|
1250
|
+
canRead: true,
|
|
1251
|
+
canWrite: true
|
|
1252
|
+
}, "Context sent with message contains correct realmPermissions");
|
|
1253
|
+
await click("[data-test-boxel-button][data-test-module-inspector-view=\"spec\"]");
|
|
1254
|
+
await waitFor("[data-test-focus-pill-main]");
|
|
1255
|
+
{
|
|
1256
|
+
const metaEls = document.querySelectorAll("[data-test-focus-pill-meta]");
|
|
1257
|
+
assert.dom(metaEls[0]).hasText("Spec", "FocusPill shows item type \"Spec\"");
|
|
1258
|
+
}
|
|
1259
|
+
await fillIn("[data-test-message-field]", `Message - 4`);
|
|
1260
|
+
await click("[data-test-send-message-btn]");
|
|
1261
|
+
roomEvents = mockMatrixUtils.getRoomEvents(matrixRoomId);
|
|
1262
|
+
lastMessageEvent = roomEvents[roomEvents.length - 1];
|
|
1263
|
+
contextSent = JSON.parse(lastMessageEvent.content.data).context;
|
|
1264
|
+
assert.strictEqual(contextSent.realmUrl, testRealmURL, "Context sent with message contains correct realmUrl");
|
|
1265
|
+
assert.strictEqual(contextSent.submode, "code", "Context sent with message contains correct submode");
|
|
1266
|
+
assert.deepEqual(contextSent.openCardIds, ["http://test-realm/test/Spec/plant-spec"], "Context sent with message contains correct openCardIds");
|
|
1267
|
+
assert.strictEqual(contextSent.codeMode.currentFile, `${testRealmURL}plant.gts`, "Context sent with message contains correct currentFile");
|
|
1268
|
+
assert.strictEqual(contextSent.codeMode.moduleInspectorPanel, "spec", "Context sent with message contains correct moduleInspectorPanel");
|
|
1269
|
+
assert.strictEqual(contextSent.codeMode.previewPanelSelection, void 0, "Context sent with message contains correct previewPanelSelection");
|
|
1270
|
+
assert.deepEqual(contextSent.codeMode.selectedCodeRef, {
|
|
1271
|
+
module: rri("http://test-realm/test/plant"),
|
|
1272
|
+
name: "Plant"
|
|
1273
|
+
}, "Context sent with message contains correct selectedCodeRef");
|
|
1274
|
+
assert.ok(contextSent.codeMode.activeSpecId, "Context sent with message contains activeSpecId when spec panel is active");
|
|
1275
|
+
assert.true(contextSent.codeMode.activeSpecId.startsWith(testRealmURL), "activeSpecId should start with test realm URL");
|
|
1276
|
+
assert.deepEqual(contextSent.realmPermissions, {
|
|
1277
|
+
canRead: true,
|
|
1278
|
+
canWrite: true
|
|
1279
|
+
}, "Context sent with message contains correct realmPermissions");
|
|
1280
|
+
});
|
|
1281
|
+
(0, import_qunit.test)("dashboard context sent with message", async function(assert) {
|
|
1282
|
+
await visitOperatorMode({
|
|
1283
|
+
submode: "interact",
|
|
1284
|
+
workspaceChooserOpened: true,
|
|
1285
|
+
stacks: [[]]
|
|
1286
|
+
});
|
|
1287
|
+
await click("[data-test-open-ai-assistant]");
|
|
1288
|
+
await waitFor(`[data-room-settled]`);
|
|
1289
|
+
await fillIn("[data-test-message-field]", `Message - 1`);
|
|
1290
|
+
await click("[data-test-send-message-btn]");
|
|
1291
|
+
let roomEvents = mockMatrixUtils.getRoomEvents(matrixRoomId);
|
|
1292
|
+
let lastMessageEvent = roomEvents[roomEvents.length - 1];
|
|
1293
|
+
let contextSent = JSON.parse(lastMessageEvent.content.data).context;
|
|
1294
|
+
assert.strictEqual(contextSent.realmUrl, void 0, "Context sent with message does not contain realmUrl");
|
|
1295
|
+
assert.strictEqual(contextSent.submode, "workspace-chooser", "Context sent with message contains correct submode");
|
|
1296
|
+
assert.deepEqual(contextSent.workspaces, [
|
|
1297
|
+
{
|
|
1298
|
+
name: "Test Workspace B",
|
|
1299
|
+
type: "user-workspace",
|
|
1300
|
+
url: testRealmURL
|
|
1301
|
+
},
|
|
1302
|
+
catalogRealmURL && {
|
|
1303
|
+
name: "Cardstack Catalog",
|
|
1304
|
+
type: "catalog-workspace",
|
|
1305
|
+
url: catalogRealmURL
|
|
1306
|
+
},
|
|
1307
|
+
{
|
|
1308
|
+
name: "Boxel Skills",
|
|
1309
|
+
type: "catalog-workspace",
|
|
1310
|
+
url: skillsRealmURL
|
|
1311
|
+
}
|
|
1312
|
+
].filter(Boolean), "Context sent with message contains correct workspaces");
|
|
1313
|
+
});
|
|
1314
|
+
(0, import_qunit.test)("clicking auto-attached card makes it a chosen card", async function(assert) {
|
|
1315
|
+
await visitOperatorMode({
|
|
1316
|
+
submode: "interact",
|
|
1317
|
+
stacks: [[{
|
|
1318
|
+
id: `${testRealmURL}Person/fadhlan`,
|
|
1319
|
+
format: "isolated"
|
|
1320
|
+
}]]
|
|
1321
|
+
});
|
|
1322
|
+
await click("[data-test-open-ai-assistant]");
|
|
1323
|
+
await waitFor(`[data-room-settled]`);
|
|
1324
|
+
assert.dom("[data-test-autoattached-card]").exists({ count: 1 });
|
|
1325
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Person/fadhlan"][data-test-autoattached-card]`).exists();
|
|
1326
|
+
await click(`[data-test-attached-card="${testRealmURL}Person/fadhlan"][data-test-autoattached-card]`);
|
|
1327
|
+
assert.dom("[data-test-autoattached-card]").doesNotExist();
|
|
1328
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Person/fadhlan"]`).exists();
|
|
1329
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Person/fadhlan"][data-test-autoattached-card]`).doesNotExist();
|
|
1330
|
+
await click(`[data-test-attached-card="${testRealmURL}Person/fadhlan"] [data-test-remove-card-btn]`);
|
|
1331
|
+
assert.dom(`[data-test-attached-card="${testRealmURL}Person/fadhlan"]`).doesNotExist();
|
|
1332
|
+
});
|
|
1333
|
+
(0, import_qunit.test)("clicking auto-attached file makes it a chosen file", async function(assert) {
|
|
1334
|
+
await visitOperatorMode({
|
|
1335
|
+
submode: "code",
|
|
1336
|
+
codePath: `${testRealmURL}plant.gts`,
|
|
1337
|
+
stacks: [[{
|
|
1338
|
+
id: `${testRealmURL}index`,
|
|
1339
|
+
format: "isolated"
|
|
1340
|
+
}]]
|
|
1341
|
+
});
|
|
1342
|
+
await click("[data-test-open-ai-assistant]");
|
|
1343
|
+
await waitFor(`[data-room-settled]`);
|
|
1344
|
+
assert.dom("[data-test-autoattached-file]").exists({ count: 1 });
|
|
1345
|
+
assert.dom(`[data-test-attached-file="${testRealmURL}plant.gts"][data-test-autoattached-file]`).exists();
|
|
1346
|
+
await click(`[data-test-attached-file="${testRealmURL}plant.gts"][data-test-autoattached-file]`);
|
|
1347
|
+
assert.dom("[data-test-autoattached-file]").doesNotExist();
|
|
1348
|
+
assert.dom(`[data-test-attached-file="${testRealmURL}plant.gts"]`).exists();
|
|
1349
|
+
assert.dom(`[data-test-attached-file="${testRealmURL}plant.gts"][data-test-autoattached-file]`).doesNotExist();
|
|
1350
|
+
await click(`[data-test-attached-file="${testRealmURL}plant.gts"] [data-test-remove-file-btn]`);
|
|
1351
|
+
assert.dom(`[data-test-attached-file="${testRealmURL}plant.gts"]`).doesNotExist();
|
|
1352
|
+
await click("[data-test-module-inspector-view=\"spec\"]");
|
|
1353
|
+
await waitFor("[data-test-spec-selector-item-path]");
|
|
1354
|
+
assert.dom("[data-test-autoattached-card]").exists({ count: 1 });
|
|
1355
|
+
let autoAttachedCards = document.querySelectorAll("[data-test-autoattached-card]");
|
|
1356
|
+
let hasAutoAttachedSpec = Array.from(autoAttachedCards).some((card) => {
|
|
1357
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/plant-spec");
|
|
1358
|
+
});
|
|
1359
|
+
assert.ok(hasAutoAttachedSpec, "Auto-attached card should be the plant spec card");
|
|
1360
|
+
});
|
|
1361
|
+
(0, import_qunit.test)("auto-attaches spec card when spec panel is open and spec is selected", async function(assert) {
|
|
1362
|
+
await visitOperatorMode({
|
|
1363
|
+
submode: "code",
|
|
1364
|
+
codePath: `${testRealmURL}plant.gts`,
|
|
1365
|
+
stacks: [[{
|
|
1366
|
+
id: `${testRealmURL}index`,
|
|
1367
|
+
format: "isolated"
|
|
1368
|
+
}]]
|
|
1369
|
+
});
|
|
1370
|
+
await click("[data-test-open-ai-assistant]");
|
|
1371
|
+
await waitFor(`[data-room-settled]`);
|
|
1372
|
+
await click("[data-test-module-inspector-view=\"spec\"]");
|
|
1373
|
+
await waitFor("[data-test-spec-selector-item-path]");
|
|
1374
|
+
assert.dom("[data-test-autoattached-card]").exists({ count: 1 });
|
|
1375
|
+
let autoAttachedCards = document.querySelectorAll("[data-test-autoattached-card]");
|
|
1376
|
+
let hasAutoAttachedSpec = Array.from(autoAttachedCards).some((card) => {
|
|
1377
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/plant-spec");
|
|
1378
|
+
});
|
|
1379
|
+
assert.ok(hasAutoAttachedSpec, "Auto-attached card should be the plant spec card");
|
|
1380
|
+
});
|
|
1381
|
+
(0, import_qunit.test)("does not auto-attach spec card when spec panel is closed", async function(assert) {
|
|
1382
|
+
await visitOperatorMode({
|
|
1383
|
+
submode: "code",
|
|
1384
|
+
codePath: `${testRealmURL}plant.gts`,
|
|
1385
|
+
stacks: [[{
|
|
1386
|
+
id: `${testRealmURL}index`,
|
|
1387
|
+
format: "isolated"
|
|
1388
|
+
}]]
|
|
1389
|
+
});
|
|
1390
|
+
await click("[data-test-open-ai-assistant]");
|
|
1391
|
+
await waitFor(`[data-room-settled]`);
|
|
1392
|
+
await click("[data-test-module-inspector-view=\"spec\"]");
|
|
1393
|
+
await waitFor("[data-test-spec-selector-item-path]");
|
|
1394
|
+
await click("[data-test-module-inspector-view=\"schema\"]");
|
|
1395
|
+
let autoAttachedCards = document.querySelectorAll("[data-test-autoattached-card]");
|
|
1396
|
+
let hasAutoAttachedSpec = Array.from(autoAttachedCards).some((card) => {
|
|
1397
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/");
|
|
1398
|
+
});
|
|
1399
|
+
assert.false(hasAutoAttachedSpec, "No spec card should be auto-attached when spec panel is closed");
|
|
1400
|
+
});
|
|
1401
|
+
(0, import_qunit.test)("does not auto-attach spec card when no spec is selected", async function(assert) {
|
|
1402
|
+
await visitOperatorMode({
|
|
1403
|
+
submode: "code",
|
|
1404
|
+
codePath: `${testRealmURL}country.gts`,
|
|
1405
|
+
stacks: [[{
|
|
1406
|
+
id: `${testRealmURL}index`,
|
|
1407
|
+
format: "isolated"
|
|
1408
|
+
}]]
|
|
1409
|
+
});
|
|
1410
|
+
await click("[data-test-open-ai-assistant]");
|
|
1411
|
+
await waitFor(`[data-room-settled]`);
|
|
1412
|
+
await click("[data-test-module-inspector-view=\"spec\"]");
|
|
1413
|
+
assert.dom("[data-test-spec-selector-item-path]").doesNotExist();
|
|
1414
|
+
let autoAttachedCards = document.querySelectorAll("[data-test-autoattached-card]");
|
|
1415
|
+
let hasAutoAttachedSpec = Array.from(autoAttachedCards).some((card) => {
|
|
1416
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/");
|
|
1417
|
+
});
|
|
1418
|
+
assert.false(hasAutoAttachedSpec, "No spec card should be auto-attached when no spec is selected");
|
|
1419
|
+
});
|
|
1420
|
+
(0, import_qunit.test)("manually attached spec cards do not duplicate auto-attached ones", async function(assert) {
|
|
1421
|
+
await visitOperatorMode({
|
|
1422
|
+
submode: "code",
|
|
1423
|
+
codePath: `${testRealmURL}plant.gts`,
|
|
1424
|
+
stacks: [[{
|
|
1425
|
+
id: `${testRealmURL}index`,
|
|
1426
|
+
format: "isolated"
|
|
1427
|
+
}]]
|
|
1428
|
+
});
|
|
1429
|
+
await click("[data-test-open-ai-assistant]");
|
|
1430
|
+
await waitFor(`[data-room-settled]`);
|
|
1431
|
+
await click("[data-test-module-inspector-view=\"spec\"]");
|
|
1432
|
+
await waitFor("[data-test-spec-selector-item-path]");
|
|
1433
|
+
await waitUntil(() => {
|
|
1434
|
+
let autoAttachedCards = document.querySelectorAll("[data-test-autoattached-card]");
|
|
1435
|
+
return Array.from(autoAttachedCards).some((card) => {
|
|
1436
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/plant-spec");
|
|
1437
|
+
});
|
|
1438
|
+
});
|
|
1439
|
+
let autoAttachedCardsBefore = document.querySelectorAll("[data-test-autoattached-card]");
|
|
1440
|
+
let autoAttachedSpecId = Array.from(autoAttachedCardsBefore).find((card) => {
|
|
1441
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/");
|
|
1442
|
+
})?.getAttribute("data-test-attached-card");
|
|
1443
|
+
if (autoAttachedSpecId) {
|
|
1444
|
+
await click("[data-test-attach-button]");
|
|
1445
|
+
await click("[data-test-attach-card-btn]");
|
|
1446
|
+
await fillIn("[data-test-search-field]", "Plant spec");
|
|
1447
|
+
await click(`[data-test-card-catalog-item="${autoAttachedSpecId}"]`);
|
|
1448
|
+
await click("[data-test-card-catalog-go-button]");
|
|
1449
|
+
let specCards = document.querySelectorAll(`[data-test-attached-card="${autoAttachedSpecId}"]`);
|
|
1450
|
+
assert.strictEqual(specCards.length, 1, "Spec card should only appear once, not duplicated");
|
|
1451
|
+
let remainingAutoAttachedCards = document.querySelectorAll("[data-test-autoattached-card]");
|
|
1452
|
+
let hasAutoAttachedSpec = Array.from(remainingAutoAttachedCards).some((card) => {
|
|
1453
|
+
return card.getAttribute("data-test-attached-card") === autoAttachedSpecId;
|
|
1454
|
+
});
|
|
1455
|
+
assert.false(hasAutoAttachedSpec, "Manually attached spec should no longer be auto-attached");
|
|
1456
|
+
} else assert.ok(false, "Expected a spec card to be auto-attached, but none was found");
|
|
1457
|
+
});
|
|
1458
|
+
(0, import_qunit.test)("manually attached cards and files persist through reload without duplicating auto attachments", async function(assert) {
|
|
1459
|
+
src_default.localStorage.removeItem(AiAssistantMessageDrafts);
|
|
1460
|
+
await visitOperatorMode({
|
|
1461
|
+
submode: "code",
|
|
1462
|
+
codePath: `${testRealmURL}plant.gts`,
|
|
1463
|
+
stacks: [[{
|
|
1464
|
+
id: `${testRealmURL}index`,
|
|
1465
|
+
format: "isolated"
|
|
1466
|
+
}]],
|
|
1467
|
+
aiAssistantOpen: true
|
|
1468
|
+
});
|
|
1469
|
+
await waitFor(`[data-room-settled]`);
|
|
1470
|
+
await click("[data-test-module-inspector-view=\"spec\"]");
|
|
1471
|
+
await waitFor("[data-test-spec-selector-item-path]");
|
|
1472
|
+
let autoAttachedSpecId;
|
|
1473
|
+
await waitUntil(() => {
|
|
1474
|
+
let autoAttachedCards = document.querySelectorAll("[data-test-autoattached-card]");
|
|
1475
|
+
let specCard = Array.from(autoAttachedCards).find((card) => {
|
|
1476
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/");
|
|
1477
|
+
});
|
|
1478
|
+
if (specCard) {
|
|
1479
|
+
autoAttachedSpecId = specCard.getAttribute("data-test-attached-card");
|
|
1480
|
+
return true;
|
|
1481
|
+
}
|
|
1482
|
+
return false;
|
|
1483
|
+
});
|
|
1484
|
+
assert.ok(autoAttachedSpecId, "expected a spec card to be auto-attached");
|
|
1485
|
+
await click("[data-test-attach-button]");
|
|
1486
|
+
await click("[data-test-attach-card-btn]");
|
|
1487
|
+
await fillIn("[data-test-search-field]", "Plant spec");
|
|
1488
|
+
await click(`[data-test-card-catalog-item="${autoAttachedSpecId}"]`);
|
|
1489
|
+
await click("[data-test-card-catalog-go-button]");
|
|
1490
|
+
await click("[data-test-attach-button]");
|
|
1491
|
+
await click("[data-test-attach-file-btn]");
|
|
1492
|
+
await click("[data-test-file=\"plant.gts\"]");
|
|
1493
|
+
await click("[data-test-choose-file-modal-add-button]");
|
|
1494
|
+
await fillIn("[data-test-message-field]", "Reload keeps my draft");
|
|
1495
|
+
await visitOperatorMode({
|
|
1496
|
+
submode: "code",
|
|
1497
|
+
codePath: `${testRealmURL}plant.gts`,
|
|
1498
|
+
stacks: [[{
|
|
1499
|
+
id: `${testRealmURL}index`,
|
|
1500
|
+
format: "isolated"
|
|
1501
|
+
}]],
|
|
1502
|
+
aiAssistantOpen: true
|
|
1503
|
+
});
|
|
1504
|
+
await waitFor(`[data-test-room-settled]`);
|
|
1505
|
+
await click("[data-test-module-inspector-view=\"spec\"]");
|
|
1506
|
+
await waitFor("[data-test-spec-selector-item-path]");
|
|
1507
|
+
assert.dom("[data-test-message-field]").hasValue("Reload keeps my draft");
|
|
1508
|
+
assert.dom(`[data-test-attached-card="${autoAttachedSpecId}"]`).exists({ count: 1 });
|
|
1509
|
+
assert.dom(`[data-test-autoattached-card][data-test-attached-card="${autoAttachedSpecId}"]`).doesNotExist();
|
|
1510
|
+
assert.dom(`[data-test-attached-file="${testRealmURL}plant.gts"]`).exists({ count: 1 });
|
|
1511
|
+
assert.dom("[data-test-autoattached-file]").doesNotExist();
|
|
1512
|
+
});
|
|
1513
|
+
(0, import_qunit.test)("auto-attached spec card can be removed", async function(assert) {
|
|
1514
|
+
await visitOperatorMode({
|
|
1515
|
+
submode: "code",
|
|
1516
|
+
codePath: `${testRealmURL}plant.gts`,
|
|
1517
|
+
stacks: [[{
|
|
1518
|
+
id: `${testRealmURL}index`,
|
|
1519
|
+
format: "isolated"
|
|
1520
|
+
}]]
|
|
1521
|
+
});
|
|
1522
|
+
await click("[data-test-open-ai-assistant]");
|
|
1523
|
+
await waitFor(`[data-room-settled]`);
|
|
1524
|
+
await click("[data-test-module-inspector-view=\"spec\"]");
|
|
1525
|
+
await waitFor("[data-test-spec-selector-item-path]");
|
|
1526
|
+
await waitUntil(() => {
|
|
1527
|
+
let autoAttachedCards = document.querySelectorAll("[data-test-autoattached-card]");
|
|
1528
|
+
return Array.from(autoAttachedCards).some((card) => {
|
|
1529
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/plant-spec");
|
|
1530
|
+
});
|
|
1531
|
+
});
|
|
1532
|
+
let autoAttachedSpecCard = Array.from(document.querySelectorAll("[data-test-autoattached-card]")).find((card) => {
|
|
1533
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/");
|
|
1534
|
+
});
|
|
1535
|
+
if (autoAttachedSpecCard) {
|
|
1536
|
+
let specCardId = autoAttachedSpecCard.getAttribute("data-test-attached-card");
|
|
1537
|
+
await click(autoAttachedSpecCard.querySelector("[data-test-remove-card-btn]"));
|
|
1538
|
+
assert.dom(`[data-test-attached-card="${specCardId}"]`).doesNotExist();
|
|
1539
|
+
} else assert.ok(false, "Expected a spec card to be auto-attached, but none was found");
|
|
1540
|
+
});
|
|
1541
|
+
(0, import_qunit.test)("spec card re-auto-attaches when switching back to spec panel", async function(assert) {
|
|
1542
|
+
await visitOperatorMode({
|
|
1543
|
+
submode: "code",
|
|
1544
|
+
codePath: `${testRealmURL}plant.gts`,
|
|
1545
|
+
stacks: [[{
|
|
1546
|
+
id: `${testRealmURL}index`,
|
|
1547
|
+
format: "isolated"
|
|
1548
|
+
}]]
|
|
1549
|
+
});
|
|
1550
|
+
await click("[data-test-open-ai-assistant]");
|
|
1551
|
+
await waitFor(`[data-room-settled]`);
|
|
1552
|
+
await click("[data-test-module-inspector-view=\"spec\"]");
|
|
1553
|
+
await waitFor("[data-test-spec-selector-item-path]");
|
|
1554
|
+
await waitUntil(() => {
|
|
1555
|
+
let autoAttachedCards = document.querySelectorAll("[data-test-autoattached-card]");
|
|
1556
|
+
return Array.from(autoAttachedCards).some((card) => {
|
|
1557
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/plant-spec");
|
|
1558
|
+
});
|
|
1559
|
+
});
|
|
1560
|
+
let autoAttachedSpecCards = Array.from(document.querySelectorAll("[data-test-autoattached-card]")).filter((card) => {
|
|
1561
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/");
|
|
1562
|
+
});
|
|
1563
|
+
assert.ok(autoAttachedSpecCards.length > 0, "Spec card should be auto-attached when spec panel is open");
|
|
1564
|
+
await click("[data-test-module-inspector-view=\"schema\"]");
|
|
1565
|
+
let autoAttachedSpecCardsAfterSwitch = Array.from(document.querySelectorAll("[data-test-autoattached-card]")).filter((card) => {
|
|
1566
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/");
|
|
1567
|
+
});
|
|
1568
|
+
assert.strictEqual(autoAttachedSpecCardsAfterSwitch.length, 0, "Spec card should not be auto-attached when spec panel is closed");
|
|
1569
|
+
await click("[data-test-module-inspector-view=\"spec\"]");
|
|
1570
|
+
await waitUntil(() => {
|
|
1571
|
+
let autoAttachedCards = document.querySelectorAll("[data-test-autoattached-card]");
|
|
1572
|
+
return Array.from(autoAttachedCards).some((card) => {
|
|
1573
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/plant-spec");
|
|
1574
|
+
});
|
|
1575
|
+
});
|
|
1576
|
+
let autoAttachedSpecCardsAfterReturn = Array.from(document.querySelectorAll("[data-test-autoattached-card]")).filter((card) => {
|
|
1577
|
+
return card.getAttribute("data-test-attached-card")?.includes("Spec/");
|
|
1578
|
+
});
|
|
1579
|
+
assert.ok(autoAttachedSpecCardsAfterReturn.length > 0, "Spec card should be auto-attached again when returning to spec panel");
|
|
1580
|
+
});
|
|
1581
|
+
(0, import_qunit.test)("\"Add Same Skills\" copies skill configuration to new session", async function(assert) {
|
|
1582
|
+
await visitOperatorMode({
|
|
1583
|
+
stacks: [[{
|
|
1584
|
+
id: `${testRealmURL}index`,
|
|
1585
|
+
format: "isolated"
|
|
1586
|
+
}]],
|
|
1587
|
+
aiAssistantOpen: true
|
|
1588
|
+
});
|
|
1589
|
+
await waitFor(`[data-room-settled]`);
|
|
1590
|
+
await addSkillToAiAssistant(`${testRealmURL}Skill/example`);
|
|
1591
|
+
await addSkillToAiAssistant(`${testRealmURL}Skill/example2`);
|
|
1592
|
+
await click("[data-test-skill-menu]");
|
|
1593
|
+
await waitUntil(() => document.querySelectorAll("[data-test-skill-menu] [data-test-attached-card]")?.length === 2);
|
|
1594
|
+
assert.dom(`[data-test-skill-menu] [data-test-attached-card="${testRealmURL}Skill/example"]`).exists();
|
|
1595
|
+
assert.dom(`[data-test-skill-menu] [data-test-attached-card="${testRealmURL}Skill/example2"]`).exists();
|
|
1596
|
+
assert.dom(`[data-test-skill-toggle="${testRealmURL}Skill/example-on"`).exists();
|
|
1597
|
+
assert.dom(`[data-test-skill-toggle="${testRealmURL}Skill/example2-on"`).exists();
|
|
1598
|
+
await click(`[data-test-skill-toggle="${testRealmURL}Skill/example2-on"`);
|
|
1599
|
+
await waitFor(`[data-test-skill-toggle="${testRealmURL}Skill/example2-off"`);
|
|
1600
|
+
assert.dom(`[data-test-skill-toggle="${testRealmURL}Skill/example2-off"`).exists();
|
|
1601
|
+
await fillIn("[data-test-message-field]", "Enabling create new session button");
|
|
1602
|
+
await click("[data-test-send-message-btn]");
|
|
1603
|
+
let roomsBeforeSameSkills = getRoomIds();
|
|
1604
|
+
await click("[data-test-create-room-btn]", { shiftKey: true });
|
|
1605
|
+
await click("[data-test-new-session-settings-option=\"Add Same Skills\"]");
|
|
1606
|
+
await click("[data-test-new-session-settings-create-button]");
|
|
1607
|
+
await waitFor("[data-room-settled]");
|
|
1608
|
+
let duplicatedSkillsRoomId = getRoomIds().find((roomId) => !roomsBeforeSameSkills.includes(roomId));
|
|
1609
|
+
assert.ok(duplicatedSkillsRoomId, "Creating a new session with copied skills creates a new room");
|
|
1610
|
+
if (duplicatedSkillsRoomId) {
|
|
1611
|
+
let activeLLMState = getRoomState(duplicatedSkillsRoomId, APP_BOXEL_ACTIVE_LLM, "");
|
|
1612
|
+
assert.strictEqual(typeof activeLLMState.toolsSupported, "boolean", "New room active LLM event includes toolsSupported metadata");
|
|
1613
|
+
assert.true(Object.prototype.hasOwnProperty.call(activeLLMState, "reasoningEffort"), "New room active LLM event includes reasoningEffort metadata");
|
|
1614
|
+
}
|
|
1615
|
+
await click("[data-test-skill-menu][data-test-pill-menu-button]");
|
|
1616
|
+
await waitFor("[data-test-skill-menu]");
|
|
1617
|
+
await waitUntil(() => document.querySelectorAll("[data-test-skill-menu] [data-test-attached-card]")?.length === 2);
|
|
1618
|
+
assert.dom(`[data-test-skill-menu] [data-test-attached-card="${testRealmURL}Skill/example"]`).exists();
|
|
1619
|
+
assert.dom(`[data-test-skill-menu] [data-test-attached-card="${testRealmURL}Skill/example2"]`).exists();
|
|
1620
|
+
assert.dom(`[data-test-skill-toggle="${testRealmURL}Skill/example-on"`).exists();
|
|
1621
|
+
assert.dom(`[data-test-skill-toggle="${testRealmURL}Skill/example2-off"`).exists();
|
|
1622
|
+
await fillIn("[data-test-message-field]", "Enabling create new session button");
|
|
1623
|
+
await click("[data-test-send-message-btn]");
|
|
1624
|
+
let roomsBeforeNewSession = getRoomIds();
|
|
1625
|
+
await waitFor("[data-test-create-room-btn]:not([disabled])");
|
|
1626
|
+
await click("[data-test-create-room-btn]");
|
|
1627
|
+
await waitFor("[data-room-settled]");
|
|
1628
|
+
let newlyCreatedRoomId = getRoomIds().find((roomId) => !roomsBeforeNewSession.includes(roomId));
|
|
1629
|
+
assert.ok(newlyCreatedRoomId, "Creating a new session creates a new room");
|
|
1630
|
+
if (newlyCreatedRoomId) {
|
|
1631
|
+
let activeLLMState = getRoomState(newlyCreatedRoomId, APP_BOXEL_ACTIVE_LLM, "");
|
|
1632
|
+
assert.strictEqual(typeof activeLLMState.toolsSupported, "boolean", "Newly created room includes toolsSupported metadata");
|
|
1633
|
+
assert.true(Object.prototype.hasOwnProperty.call(activeLLMState, "reasoningEffort"), "Newly created room includes reasoningEffort metadata");
|
|
1634
|
+
}
|
|
1635
|
+
await click("[data-test-skill-menu][data-test-pill-menu-button]");
|
|
1636
|
+
await waitFor("[data-test-skill-menu]");
|
|
1637
|
+
try {
|
|
1638
|
+
await waitUntil(() => document.querySelectorAll("[data-test-skill-menu] [data-test-attached-card]")?.length === 1);
|
|
1639
|
+
} catch {
|
|
1640
|
+
let attached = Array.from(document.querySelectorAll("[data-test-skill-menu] [data-test-attached-card]")).map((el) => el.getAttribute("data-test-attached-card"));
|
|
1641
|
+
assert.ok(false, `Default skill never rendered on the new session's skill menu. Attached cards seen: ${JSON.stringify(attached)}; expected exactly [${envSkillId}].`);
|
|
1642
|
+
return;
|
|
1643
|
+
}
|
|
1644
|
+
assert.dom("[data-test-skill-menu] [data-test-attached-card]").exists({ count: 1 });
|
|
1645
|
+
assert.dom(`[data-test-skill-menu] [data-test-attached-card="${envSkillId}"]`).exists();
|
|
1646
|
+
});
|
|
1647
|
+
(0, import_qunit.test)("ask/act toggle defaults to ask on new session", async function(assert) {
|
|
1648
|
+
await visitOperatorMode({ stacks: [[{
|
|
1649
|
+
id: `${testRealmURL}index`,
|
|
1650
|
+
format: "isolated"
|
|
1651
|
+
}]] });
|
|
1652
|
+
await click("[data-test-open-ai-assistant]");
|
|
1653
|
+
await waitFor("[data-room-settled]");
|
|
1654
|
+
assert.dom("[data-test-llm-mode-option=\"ask\"]").hasClass("selected", "Ask is selected by default on new session");
|
|
1655
|
+
assert.dom("[data-test-llm-mode-option=\"act\"]").doesNotHaveClass("selected", "Act is not selected by default");
|
|
1656
|
+
});
|
|
1657
|
+
(0, import_qunit.test)("new session inherits llm mode from current room", async function(assert) {
|
|
1658
|
+
await visitOperatorMode({ stacks: [[{
|
|
1659
|
+
id: `${testRealmURL}index`,
|
|
1660
|
+
format: "isolated"
|
|
1661
|
+
}]] });
|
|
1662
|
+
await click("[data-test-open-ai-assistant]");
|
|
1663
|
+
await waitFor("[data-room-settled]");
|
|
1664
|
+
await click("[data-test-llm-mode-option=\"act\"]");
|
|
1665
|
+
assert.dom("[data-test-llm-mode-option=\"act\"]").hasClass("selected", "LLM mode is set to act");
|
|
1666
|
+
await fillIn("[data-test-message-field]", "Enable create new session button");
|
|
1667
|
+
await click("[data-test-send-message-btn]");
|
|
1668
|
+
let roomsBeforeNewSession = getRoomIds();
|
|
1669
|
+
await waitFor("[data-test-create-room-btn]:not([disabled])");
|
|
1670
|
+
await click("[data-test-create-room-btn]");
|
|
1671
|
+
await waitFor("[data-room-settled]");
|
|
1672
|
+
let newlyCreatedRoomId = getRoomIds().find((roomId) => !roomsBeforeNewSession.includes(roomId));
|
|
1673
|
+
assert.ok(newlyCreatedRoomId, "Creating a new session creates a new room");
|
|
1674
|
+
if (newlyCreatedRoomId) {
|
|
1675
|
+
let llmModeState = getRoomState(newlyCreatedRoomId, APP_BOXEL_LLM_MODE, "");
|
|
1676
|
+
assert.strictEqual(llmModeState?.mode, "act", "New session inherits LLM mode from current room");
|
|
1677
|
+
}
|
|
1678
|
+
});
|
|
1679
|
+
(0, import_qunit.test)("copies file history when creating new session with option checked", async function(assert) {
|
|
1680
|
+
await visitOperatorMode({
|
|
1681
|
+
submode: "interact",
|
|
1682
|
+
stacks: [[{
|
|
1683
|
+
id: `${testRealmURL}index`,
|
|
1684
|
+
format: "isolated"
|
|
1685
|
+
}]]
|
|
1686
|
+
});
|
|
1687
|
+
await click("[data-test-open-ai-assistant]");
|
|
1688
|
+
await waitFor(`[data-room-settled]`);
|
|
1689
|
+
await fillIn("[data-test-message-field]", "Message with card");
|
|
1690
|
+
await selectCardFromCatalog(`${testRealmURL}Person/hassan`);
|
|
1691
|
+
await click("[data-test-send-message-btn]");
|
|
1692
|
+
await fillIn("[data-test-message-field]", "Message with file");
|
|
1693
|
+
await click("[data-test-attach-button]");
|
|
1694
|
+
await click("[data-test-attach-file-btn]");
|
|
1695
|
+
await click("[data-test-file=\"pet.gts\"]");
|
|
1696
|
+
await click("[data-test-choose-file-modal-add-button]");
|
|
1697
|
+
await click("[data-test-send-message-btn]");
|
|
1698
|
+
await fillIn("[data-test-message-field]", "Message with another card");
|
|
1699
|
+
await selectCardFromCatalog(`${testRealmURL}Pet/mango`);
|
|
1700
|
+
await click("[data-test-send-message-btn]");
|
|
1701
|
+
assertMessages(assert, [
|
|
1702
|
+
{
|
|
1703
|
+
from: "testuser",
|
|
1704
|
+
message: "Message with card",
|
|
1705
|
+
cards: [{
|
|
1706
|
+
id: `${testRealmURL}Person/hassan`,
|
|
1707
|
+
cardTitle: "Hassan"
|
|
1708
|
+
}]
|
|
1709
|
+
},
|
|
1710
|
+
{
|
|
1711
|
+
from: "testuser",
|
|
1712
|
+
message: "Message with file",
|
|
1713
|
+
files: [{
|
|
1714
|
+
sourceUrl: `${testRealmURL}pet.gts`,
|
|
1715
|
+
name: "pet.gts"
|
|
1716
|
+
}]
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1719
|
+
from: "testuser",
|
|
1720
|
+
message: "Message with another card",
|
|
1721
|
+
cards: [{
|
|
1722
|
+
id: `${testRealmURL}Pet/mango`,
|
|
1723
|
+
cardTitle: "Mango"
|
|
1724
|
+
}]
|
|
1725
|
+
}
|
|
1726
|
+
]);
|
|
1727
|
+
await click("[data-test-create-room-btn]", { shiftKey: true });
|
|
1728
|
+
await click("[data-test-new-session-settings-option=\"Copy File History\"]");
|
|
1729
|
+
await click("[data-test-new-session-settings-create-button]");
|
|
1730
|
+
await waitFor(`[data-room-settled]`);
|
|
1731
|
+
await waitForSessionPreparationToFinish();
|
|
1732
|
+
await waitUntil(() => {
|
|
1733
|
+
return document.querySelectorAll("[data-test-message-idx]").length === 1;
|
|
1734
|
+
});
|
|
1735
|
+
assertMessages(assert, [{
|
|
1736
|
+
from: "testuser",
|
|
1737
|
+
message: "This session includes files and cards from the previous conversation for context.",
|
|
1738
|
+
cards: [{
|
|
1739
|
+
id: `${testRealmURL}Person/hassan`,
|
|
1740
|
+
cardTitle: "Hassan"
|
|
1741
|
+
}, {
|
|
1742
|
+
id: `${testRealmURL}Pet/mango`,
|
|
1743
|
+
cardTitle: "Mango"
|
|
1744
|
+
}],
|
|
1745
|
+
files: [{
|
|
1746
|
+
sourceUrl: `${testRealmURL}pet.gts`,
|
|
1747
|
+
name: "pet.gts"
|
|
1748
|
+
}]
|
|
1749
|
+
}]);
|
|
1750
|
+
});
|
|
1751
|
+
(0, import_qunit.test)("summarizes current session when creating new session with option checked", async function(assert) {
|
|
1752
|
+
await visitOperatorMode({
|
|
1753
|
+
submode: "interact",
|
|
1754
|
+
stacks: [[{
|
|
1755
|
+
id: `${testRealmURL}index`,
|
|
1756
|
+
format: "isolated"
|
|
1757
|
+
}]]
|
|
1758
|
+
});
|
|
1759
|
+
await click("[data-test-open-ai-assistant]");
|
|
1760
|
+
await waitFor(`[data-room-settled]`);
|
|
1761
|
+
await fillIn("[data-test-message-field]", "Hello, I need help with my project");
|
|
1762
|
+
await click("[data-test-send-message-btn]");
|
|
1763
|
+
await fillIn("[data-test-message-field]", "I want to create a new card for a person");
|
|
1764
|
+
await click("[data-test-send-message-btn]");
|
|
1765
|
+
await fillIn("[data-test-message-field]", "The person should have a name and age field");
|
|
1766
|
+
await click("[data-test-send-message-btn]");
|
|
1767
|
+
assertMessages(assert, [
|
|
1768
|
+
{
|
|
1769
|
+
from: "testuser",
|
|
1770
|
+
message: "Hello, I need help with my project"
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
from: "testuser",
|
|
1774
|
+
message: "I want to create a new card for a person"
|
|
1775
|
+
},
|
|
1776
|
+
{
|
|
1777
|
+
from: "testuser",
|
|
1778
|
+
message: "The person should have a name and age field"
|
|
1779
|
+
}
|
|
1780
|
+
]);
|
|
1781
|
+
await click("[data-test-create-room-btn]", { shiftKey: true });
|
|
1782
|
+
await click("[data-test-new-session-settings-option=\"Summarize Current Session\"]");
|
|
1783
|
+
await click("[data-test-new-session-settings-create-button]");
|
|
1784
|
+
await waitFor(`[data-room-settled]`);
|
|
1785
|
+
await waitForSessionPreparationToFinish();
|
|
1786
|
+
await waitUntil(() => document.querySelectorAll("[data-test-message-idx]").length >= 1, {
|
|
1787
|
+
timeout: 5e3,
|
|
1788
|
+
timeoutMessage: "timed out waiting for summary message to arrive in new session"
|
|
1789
|
+
});
|
|
1790
|
+
assertMessages(assert, [{
|
|
1791
|
+
from: "testuser",
|
|
1792
|
+
message: "This is a summary of the previous conversation that should be included as context for our discussion: This conversation focused on project help, specifically creating a new card for a person with name and age fields. The user requested assistance with card creation and field definition."
|
|
1793
|
+
}]);
|
|
1794
|
+
});
|
|
1795
|
+
(0, import_qunit.test)("summarizes current session with cards and files when creating new session", async function(assert) {
|
|
1796
|
+
await visitOperatorMode({
|
|
1797
|
+
submode: "interact",
|
|
1798
|
+
stacks: [[{
|
|
1799
|
+
id: `${testRealmURL}index`,
|
|
1800
|
+
format: "isolated"
|
|
1801
|
+
}]]
|
|
1802
|
+
});
|
|
1803
|
+
await click("[data-test-open-ai-assistant]");
|
|
1804
|
+
await waitFor(`[data-room-settled]`);
|
|
1805
|
+
await fillIn("[data-test-message-field]", "I have a person card here");
|
|
1806
|
+
await selectCardFromCatalog(`${testRealmURL}Person/hassan`);
|
|
1807
|
+
await click("[data-test-send-message-btn]");
|
|
1808
|
+
await fillIn("[data-test-message-field]", "And here is the pet definition file");
|
|
1809
|
+
await click("[data-test-attach-button]");
|
|
1810
|
+
await click("[data-test-attach-file-btn]");
|
|
1811
|
+
await click("[data-test-file=\"pet.gts\"]");
|
|
1812
|
+
await click("[data-test-choose-file-modal-add-button]");
|
|
1813
|
+
await click("[data-test-send-message-btn]");
|
|
1814
|
+
await fillIn("[data-test-message-field]", "Can you help me understand this structure?");
|
|
1815
|
+
await click("[data-test-send-message-btn]");
|
|
1816
|
+
await waitFor(`[data-room-settled]`);
|
|
1817
|
+
assertMessages(assert, [
|
|
1818
|
+
{
|
|
1819
|
+
from: "testuser",
|
|
1820
|
+
message: "I have a person card here",
|
|
1821
|
+
cards: [{
|
|
1822
|
+
id: `${testRealmURL}Person/hassan`,
|
|
1823
|
+
cardTitle: "Hassan"
|
|
1824
|
+
}]
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
from: "testuser",
|
|
1828
|
+
message: "And here is the pet definition file",
|
|
1829
|
+
files: [{
|
|
1830
|
+
sourceUrl: `${testRealmURL}pet.gts`,
|
|
1831
|
+
name: "pet.gts"
|
|
1832
|
+
}]
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
from: "testuser",
|
|
1836
|
+
message: "Can you help me understand this structure?"
|
|
1837
|
+
}
|
|
1838
|
+
]);
|
|
1839
|
+
await click("[data-test-create-room-btn]", { shiftKey: true });
|
|
1840
|
+
await click("[data-test-new-session-settings-option=\"Summarize Current Session\"]");
|
|
1841
|
+
await click("[data-test-new-session-settings-create-button]");
|
|
1842
|
+
await waitFor(`[data-room-settled]`);
|
|
1843
|
+
await waitForSessionPreparationToFinish();
|
|
1844
|
+
await waitUntil(() => document.querySelectorAll("[data-test-message-idx]").length >= 1, { timeoutMessage: "timed out waiting for summary message to arrive in new session" });
|
|
1845
|
+
assertMessages(assert, [{
|
|
1846
|
+
from: "testuser",
|
|
1847
|
+
message: "This is a summary of the previous conversation that should be included as context for our discussion: This conversation involved discussing a person card (Hassan) and a pet definition file. The user shared both a Person card and a pet.gts file, then asked for help understanding the structure."
|
|
1848
|
+
}]);
|
|
1849
|
+
});
|
|
1850
|
+
(0, import_qunit.test)("handles summarization error gracefully when creating new session", async function(assert) {
|
|
1851
|
+
await visitOperatorMode({
|
|
1852
|
+
submode: "interact",
|
|
1853
|
+
stacks: [[{
|
|
1854
|
+
id: `${testRealmURL}index`,
|
|
1855
|
+
format: "isolated"
|
|
1856
|
+
}]]
|
|
1857
|
+
});
|
|
1858
|
+
await click("[data-test-open-ai-assistant]");
|
|
1859
|
+
await waitFor(`[data-room-settled]`);
|
|
1860
|
+
await fillIn("[data-test-message-field]", "Test message for summarization");
|
|
1861
|
+
await click("[data-test-send-message-btn]");
|
|
1862
|
+
const originalRequestForward = getService("realm-server").requestForward;
|
|
1863
|
+
getService("realm-server").requestForward = async () => {
|
|
1864
|
+
throw new Error("Summarization service unavailable");
|
|
1865
|
+
};
|
|
1866
|
+
await click("[data-test-create-room-btn]", { shiftKey: true });
|
|
1867
|
+
await click("[data-test-new-session-settings-option=\"Summarize Current Session\"]");
|
|
1868
|
+
await click("[data-test-new-session-settings-create-button]");
|
|
1869
|
+
await waitFor(`[data-room-settled]`);
|
|
1870
|
+
await waitForSessionPreparationToFinish();
|
|
1871
|
+
assertMessages(assert, []);
|
|
1872
|
+
getService("realm-server").requestForward = originalRequestForward;
|
|
1873
|
+
});
|
|
1874
|
+
(0, import_qunit.test)("skip button skips session preparation and shows correct wording", async function(assert) {
|
|
1875
|
+
const matrixService = getService("matrix-service");
|
|
1876
|
+
const originalGetPromptParts = matrixService.getPromptParts;
|
|
1877
|
+
let summarizationDeferred = new Deferred();
|
|
1878
|
+
matrixService.getPromptParts = async (roomId) => {
|
|
1879
|
+
await summarizationDeferred.promise;
|
|
1880
|
+
return originalGetPromptParts.call(matrixService, roomId);
|
|
1881
|
+
};
|
|
1882
|
+
await visitOperatorMode({
|
|
1883
|
+
submode: "interact",
|
|
1884
|
+
stacks: [[{
|
|
1885
|
+
id: `${testRealmURL}index`,
|
|
1886
|
+
format: "isolated"
|
|
1887
|
+
}]]
|
|
1888
|
+
});
|
|
1889
|
+
await click("[data-test-open-ai-assistant]");
|
|
1890
|
+
await waitFor(`[data-room-settled]`);
|
|
1891
|
+
await fillIn("[data-test-message-field]", "Test message for summarization");
|
|
1892
|
+
await click("[data-test-send-message-btn]");
|
|
1893
|
+
await click("[data-test-create-room-btn]", { shiftKey: true });
|
|
1894
|
+
await click("[data-test-new-session-settings-option=\"Summarize Current Session\"]");
|
|
1895
|
+
await click("[data-test-new-session-settings-create-button]");
|
|
1896
|
+
try {
|
|
1897
|
+
await waitFor("[data-test-session-preparation]");
|
|
1898
|
+
assert.dom("[data-test-session-preparation]").includesText("Summarizing previous session");
|
|
1899
|
+
assert.dom("[data-test-session-preparation]").includesText("Takes 10-20 seconds");
|
|
1900
|
+
await waitFor("[data-test-session-preparation-skip-button]");
|
|
1901
|
+
assert.dom("[data-test-session-preparation-skip-button]").hasText("Skip");
|
|
1902
|
+
await click("[data-test-session-preparation-skip-button]");
|
|
1903
|
+
await waitFor("[data-test-session-preparation]", { count: 0 });
|
|
1904
|
+
await waitFor("[data-test-message-field]");
|
|
1905
|
+
await waitUntil(() => {
|
|
1906
|
+
let field = document.querySelector("[data-test-message-field]");
|
|
1907
|
+
return Boolean(field && !field.hasAttribute("disabled"));
|
|
1908
|
+
});
|
|
1909
|
+
assert.dom("[data-test-message-field]").isNotDisabled();
|
|
1910
|
+
assertMessages(assert, []);
|
|
1911
|
+
} finally {
|
|
1912
|
+
summarizationDeferred.fulfill();
|
|
1913
|
+
matrixService.getPromptParts = originalGetPromptParts;
|
|
1914
|
+
}
|
|
1915
|
+
});
|
|
1916
|
+
(0, import_qunit.test)("ai assistant panel width persists to localStorage", async function(assert) {
|
|
1917
|
+
src_default.localStorage.removeItem("ai-assistant-panel-width");
|
|
1918
|
+
const testWidth = 60;
|
|
1919
|
+
src_default.localStorage.setItem("ai-assistant-panel-width", String(testWidth));
|
|
1920
|
+
let operatorModeStateParam = wrapper_default({
|
|
1921
|
+
stacks: [[{
|
|
1922
|
+
id: `${testRealmURL}index`,
|
|
1923
|
+
format: "isolated"
|
|
1924
|
+
}]],
|
|
1925
|
+
aiAssistantOpen: true
|
|
1926
|
+
});
|
|
1927
|
+
await visit(`/?operatorModeEnabled=true&operatorModeState=${encodeURIComponent(operatorModeStateParam)}`);
|
|
1928
|
+
assert.dom("[data-test-ai-assistant-panel]").exists();
|
|
1929
|
+
let aiAssistantPanel = document.querySelector("[data-test-ai-assistant-panel]");
|
|
1930
|
+
assert.ok(aiAssistantPanel, "AI assistant panel should exist");
|
|
1931
|
+
let initialWidth = aiAssistantPanel.getBoundingClientRect().width;
|
|
1932
|
+
assert.ok(initialWidth > 0, "AI assistant panel should have a width");
|
|
1933
|
+
let submodeLayout = document.querySelector("[data-test-submode-layout]");
|
|
1934
|
+
assert.ok(submodeLayout, "submode layout should exist");
|
|
1935
|
+
let actualPercentageWidth = initialWidth / submodeLayout.getBoundingClientRect().width * 100;
|
|
1936
|
+
let storedWidth = src_default.localStorage.getItem("ai-assistant-panel-width");
|
|
1937
|
+
assert.ok(storedWidth, "Width should be in localStorage");
|
|
1938
|
+
assert.strictEqual(Number(storedWidth), testWidth, "Stored width should match the test width");
|
|
1939
|
+
assert.ok(Math.abs(actualPercentageWidth - testWidth) < 5, `Actual panel width percentage (${actualPercentageWidth.toFixed(1)}%) should be close to stored width (${testWidth}%)`);
|
|
1940
|
+
let resizeHandle = document.querySelector("[data-boxel-panel-resize-handle-id]");
|
|
1941
|
+
assert.ok(resizeHandle, "Resize handle should exist");
|
|
1942
|
+
let resizeHandleRect = resizeHandle.getBoundingClientRect();
|
|
1943
|
+
await triggerEvent(resizeHandle, "pointerdown", {
|
|
1944
|
+
clientX: resizeHandleRect.x,
|
|
1945
|
+
clientY: resizeHandleRect.y
|
|
1946
|
+
});
|
|
1947
|
+
await triggerEvent(resizeHandle, "pointermove", {
|
|
1948
|
+
clientX: resizeHandleRect.x + 20,
|
|
1949
|
+
clientY: resizeHandleRect.y
|
|
1950
|
+
});
|
|
1951
|
+
await triggerEvent(resizeHandle, "pointerup");
|
|
1952
|
+
await waitFor("[data-test-ai-assistant-panel]");
|
|
1953
|
+
let updatedStoredWidth = src_default.localStorage.getItem("ai-assistant-panel-width");
|
|
1954
|
+
assert.ok(updatedStoredWidth, "Width should still be in localStorage after resize");
|
|
1955
|
+
let updatedParsedWidth = Number(updatedStoredWidth);
|
|
1956
|
+
assert.ok(updatedParsedWidth > 0, "Updated width should be a positive number");
|
|
1957
|
+
assert.ok(updatedParsedWidth <= 100, "Updated width should be a percentage (<= 100)");
|
|
1958
|
+
assert.notStrictEqual(updatedParsedWidth, testWidth, "Width should have changed after resize");
|
|
1959
|
+
let resizedWidth = aiAssistantPanel.getBoundingClientRect().width;
|
|
1960
|
+
assert.ok(resizedWidth > 0, "AI assistant panel should still have a width after resize");
|
|
1961
|
+
});
|
|
1962
|
+
(0, import_qunit.test)("creates new session with settings even when empty new session exists", async function(assert) {
|
|
1963
|
+
await visitOperatorMode({ stacks: [[{
|
|
1964
|
+
id: `${testRealmURL}index`,
|
|
1965
|
+
format: "isolated"
|
|
1966
|
+
}]] });
|
|
1967
|
+
await click("[data-test-open-ai-assistant]");
|
|
1968
|
+
await waitFor(`[data-room-settled]`);
|
|
1969
|
+
await fillIn("[data-test-message-field]", "First message with card");
|
|
1970
|
+
await selectCardFromCatalog(`${testRealmURL}Person/hassan`);
|
|
1971
|
+
await click("[data-test-send-message-btn]");
|
|
1972
|
+
await fillIn("[data-test-message-field]", "Second message with file");
|
|
1973
|
+
await click("[data-test-attach-button]");
|
|
1974
|
+
await click("[data-test-attach-file-btn]");
|
|
1975
|
+
await click("[data-test-file=\"pet.gts\"]");
|
|
1976
|
+
await click("[data-test-choose-file-modal-add-button]");
|
|
1977
|
+
await click("[data-test-send-message-btn]");
|
|
1978
|
+
await fillIn("[data-test-message-field]", "Third message with another card");
|
|
1979
|
+
await selectCardFromCatalog(`${testRealmURL}Pet/mango`);
|
|
1980
|
+
await click("[data-test-send-message-btn]");
|
|
1981
|
+
assertMessages(assert, [
|
|
1982
|
+
{
|
|
1983
|
+
from: "testuser",
|
|
1984
|
+
message: "First message with card",
|
|
1985
|
+
cards: [{
|
|
1986
|
+
id: `${testRealmURL}Person/hassan`,
|
|
1987
|
+
cardTitle: "Hassan"
|
|
1988
|
+
}]
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
from: "testuser",
|
|
1992
|
+
message: "Second message with file",
|
|
1993
|
+
files: [{
|
|
1994
|
+
sourceUrl: `${testRealmURL}pet.gts`,
|
|
1995
|
+
name: "pet.gts"
|
|
1996
|
+
}]
|
|
1997
|
+
},
|
|
1998
|
+
{
|
|
1999
|
+
from: "testuser",
|
|
2000
|
+
message: "Third message with another card",
|
|
2001
|
+
cards: [{
|
|
2002
|
+
id: `${testRealmURL}Pet/mango`,
|
|
2003
|
+
cardTitle: "Mango"
|
|
2004
|
+
}]
|
|
2005
|
+
}
|
|
2006
|
+
]);
|
|
2007
|
+
const matrixService = getService("matrix-service");
|
|
2008
|
+
const firstRoomId = matrixService.currentRoomId;
|
|
2009
|
+
assert.ok(firstRoomId, "Should have first room ID");
|
|
2010
|
+
await click("[data-test-create-room-btn]");
|
|
2011
|
+
await waitFor(`[data-room-settled]`);
|
|
2012
|
+
const secondRoomId = matrixService.currentRoomId;
|
|
2013
|
+
assert.ok(secondRoomId, "Should have second room ID");
|
|
2014
|
+
assert.notStrictEqual(secondRoomId, firstRoomId, "Second room should be different from first room");
|
|
2015
|
+
await click("[data-test-past-sessions-button]");
|
|
2016
|
+
await waitFor(`[data-test-enter-room="${firstRoomId}"]`);
|
|
2017
|
+
await click(`[data-test-enter-room="${firstRoomId}"]`);
|
|
2018
|
+
await waitFor(`[data-room-settled]`);
|
|
2019
|
+
assert.strictEqual(matrixService.currentRoomId, firstRoomId, "Should be back in the first room");
|
|
2020
|
+
assertMessages(assert, [
|
|
2021
|
+
{
|
|
2022
|
+
from: "testuser",
|
|
2023
|
+
message: "First message with card",
|
|
2024
|
+
cards: [{
|
|
2025
|
+
id: `${testRealmURL}Person/hassan`,
|
|
2026
|
+
cardTitle: "Hassan"
|
|
2027
|
+
}]
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
from: "testuser",
|
|
2031
|
+
message: "Second message with file",
|
|
2032
|
+
files: [{
|
|
2033
|
+
sourceUrl: `${testRealmURL}pet.gts`,
|
|
2034
|
+
name: "pet.gts"
|
|
2035
|
+
}]
|
|
2036
|
+
},
|
|
2037
|
+
{
|
|
2038
|
+
from: "testuser",
|
|
2039
|
+
message: "Third message with another card",
|
|
2040
|
+
cards: [{
|
|
2041
|
+
id: `${testRealmURL}Pet/mango`,
|
|
2042
|
+
cardTitle: "Mango"
|
|
2043
|
+
}]
|
|
2044
|
+
}
|
|
2045
|
+
]);
|
|
2046
|
+
await click("[data-test-create-room-btn]", { shiftKey: true });
|
|
2047
|
+
await click("[data-test-new-session-settings-option=\"Copy File History\"]");
|
|
2048
|
+
await click("[data-test-new-session-settings-create-button]");
|
|
2049
|
+
await waitFor(`[data-room-settled]`);
|
|
2050
|
+
await waitForSessionPreparationToFinish();
|
|
2051
|
+
await waitFor("[data-test-user-message]");
|
|
2052
|
+
const thirdRoomId = matrixService.currentRoomId;
|
|
2053
|
+
assert.ok(thirdRoomId, "Should have third room ID");
|
|
2054
|
+
assert.notStrictEqual(thirdRoomId, firstRoomId, "Third room should be different from first room");
|
|
2055
|
+
assert.notStrictEqual(thirdRoomId, secondRoomId, "Third room should be different from second room");
|
|
2056
|
+
assertMessages(assert, [{
|
|
2057
|
+
from: "testuser",
|
|
2058
|
+
message: "This session includes files and cards from the previous conversation for context.",
|
|
2059
|
+
cards: [{
|
|
2060
|
+
id: `${testRealmURL}Person/hassan`,
|
|
2061
|
+
cardTitle: "Hassan"
|
|
2062
|
+
}, {
|
|
2063
|
+
id: `${testRealmURL}Pet/mango`,
|
|
2064
|
+
cardTitle: "Mango"
|
|
2065
|
+
}],
|
|
2066
|
+
files: [{
|
|
2067
|
+
sourceUrl: `${testRealmURL}pet.gts`,
|
|
2068
|
+
name: "pet.gts"
|
|
2069
|
+
}]
|
|
2070
|
+
}]);
|
|
2071
|
+
});
|
|
2072
|
+
(0, import_qunit.test)("restores chat input of unsent messages", async function(assert) {
|
|
2073
|
+
await visitOperatorMode({ stacks: [[{
|
|
2074
|
+
id: `${testRealmURL}index`,
|
|
2075
|
+
format: "isolated"
|
|
2076
|
+
}]] });
|
|
2077
|
+
await click("[data-test-open-ai-assistant]");
|
|
2078
|
+
await waitFor(`[data-room-settled]`);
|
|
2079
|
+
const matrixService = getService("matrix-service");
|
|
2080
|
+
await waitFor(`[data-room-settled]`);
|
|
2081
|
+
let firstRoomId = matrixService.currentRoomId;
|
|
2082
|
+
assert.ok(firstRoomId, "Should have an initial room ID");
|
|
2083
|
+
if (!firstRoomId) throw new Error("Missing room ID for initial session");
|
|
2084
|
+
await waitFor(`[data-test-message-field="${firstRoomId}"]`);
|
|
2085
|
+
await fillIn(`[data-test-message-field="${firstRoomId}"]`, "hey, could you do something for me?");
|
|
2086
|
+
await click("[data-test-send-message-btn]");
|
|
2087
|
+
await fillIn(`[data-test-message-field="${firstRoomId}"]`, "how old is the sun?");
|
|
2088
|
+
await click("[data-test-create-room-btn]");
|
|
2089
|
+
await waitFor(`[data-room-settled]`);
|
|
2090
|
+
let secondRoomId = matrixService.currentRoomId;
|
|
2091
|
+
assert.ok(secondRoomId, "Should have a second room ID");
|
|
2092
|
+
if (!secondRoomId) throw new Error("Missing room ID for new session");
|
|
2093
|
+
assert.notStrictEqual(secondRoomId, firstRoomId, "Second room should be different from first room");
|
|
2094
|
+
await waitFor(`[data-test-message-field="${secondRoomId}"]`);
|
|
2095
|
+
assert.dom(`[data-test-message-field="${secondRoomId}"]`).hasValue("", "New room starts with an empty chat input");
|
|
2096
|
+
await click("[data-test-past-sessions-button]");
|
|
2097
|
+
await waitFor(`[data-test-enter-room="${firstRoomId}"]`);
|
|
2098
|
+
await click(`[data-test-enter-room="${firstRoomId}"]`);
|
|
2099
|
+
await waitFor(`[data-room-settled]`);
|
|
2100
|
+
await waitUntil(() => matrixService.currentRoomId === firstRoomId);
|
|
2101
|
+
await waitFor(`[data-test-message-field="${firstRoomId}"]`);
|
|
2102
|
+
assert.dom(`[data-test-message-field="${firstRoomId}"]`).hasValue("how old is the sun?", "Draft message is restored when returning to the original room");
|
|
2103
|
+
});
|
|
2104
|
+
(0, import_qunit.test)("shows an error and persists the prompt in case the message failed to send", async function(assert) {
|
|
2105
|
+
await visitOperatorMode({ stacks: [[{
|
|
2106
|
+
id: `${testRealmURL}index`,
|
|
2107
|
+
format: "isolated"
|
|
2108
|
+
}]] });
|
|
2109
|
+
await click("[data-test-open-ai-assistant]");
|
|
2110
|
+
await waitFor(`[data-room-settled]`);
|
|
2111
|
+
const matrixService = getService("matrix-service");
|
|
2112
|
+
let roomId = matrixService.currentRoomId;
|
|
2113
|
+
assert.ok(roomId, "Should have a room ID");
|
|
2114
|
+
if (!roomId) throw new Error("Missing room ID for message failure test");
|
|
2115
|
+
await waitFor(`[data-test-message-field="${roomId}"]`);
|
|
2116
|
+
const originalSendMessage = matrixService.sendMessage;
|
|
2117
|
+
let sendAttempts = 0;
|
|
2118
|
+
matrixService.sendMessage = async function(..._args) {
|
|
2119
|
+
sendAttempts++;
|
|
2120
|
+
throw new Error("Intentional failure for test");
|
|
2121
|
+
};
|
|
2122
|
+
const failingMessage = "This message should trigger an error";
|
|
2123
|
+
try {
|
|
2124
|
+
await fillIn(`[data-test-message-field="${roomId}"]`, failingMessage);
|
|
2125
|
+
await waitUntil(() => matrixService.getMessageToSend(roomId) === failingMessage);
|
|
2126
|
+
await click("[data-test-send-message-btn]");
|
|
2127
|
+
await waitFor("[data-test-boxel-alert=\"error\"]");
|
|
2128
|
+
assert.strictEqual(sendAttempts, 1, "sendMessage was attempted once");
|
|
2129
|
+
assert.dom("[data-test-boxel-alert=\"error\"] [data-test-alert-message=\"0\"]").hasText("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.");
|
|
2130
|
+
await waitUntil(() => matrixService.getMessageToSend(roomId) === failingMessage);
|
|
2131
|
+
assert.dom(`[data-test-message-field="${roomId}"]`).hasValue(failingMessage, "Draft message is restored after a failed send attempt");
|
|
2132
|
+
} finally {
|
|
2133
|
+
matrixService.sendMessage = originalSendMessage;
|
|
2134
|
+
}
|
|
2135
|
+
});
|
|
2136
|
+
});
|
|
2137
|
+
//#endregion
|