@cardstack/boxel-cli 0.9.0 → 0.10.0-unstable.0
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/README.md +12 -0
- package/bundled-test-harness/assets/account-switch-failed-GCSVbJML.js +23 -0
- package/bundled-test-harness/assets/account-switch-failed-GsWni_Gk.css +18 -0
- package/bundled-test-harness/assets/account-switch-failed-test-CdZWNths.js +45 -0
- package/bundled-test-harness/assets/add-workspace-c7L50Gx8.js +141 -0
- package/bundled-test-harness/assets/add-workspace-test-BZxHa6Pe.js +72 -0
- package/bundled-test-harness/assets/advanced-color-picker-0pGF-3WG.js +504 -0
- package/bundled-test-harness/assets/advanced-color-picker-pbO4HWc_.js +2 -0
- package/bundled-test-harness/assets/ai-assistant-test-Dnm4o9vK.js +2211 -0
- package/bundled-test-harness/assets/ai-module-creation-test-C6253CMt.js +151 -0
- package/bundled-test-harness/assets/aibot-message-miKyGeKk.js +278 -0
- package/bundled-test-harness/assets/app-i8pGdQkw.js +22855 -0
- package/bundled-test-harness/assets/app-zC7o6PyQ.css +2718 -0
- package/bundled-test-harness/assets/audio-file-def-DHnydP0t.js +133 -0
- package/bundled-test-harness/assets/auth-container-BP2gSoo4.css +51 -0
- package/bundled-test-harness/assets/auth-container-DN94iVfX.js +24 -0
- package/bundled-test-harness/assets/avif-meta-extractor-Bo5zRX1V.js +162 -0
- package/bundled-test-harness/assets/base64-image-B0RYxzHT.js +2 -0
- package/bundled-test-harness/assets/base64-image-Bxjqdwew.js +262 -0
- package/bundled-test-harness/assets/big-integer-7RLj5_7H.js +89 -0
- package/bundled-test-harness/assets/big-integer-C9sJxKVy.js +2 -0
- package/bundled-test-harness/assets/binary-upload-dedupe-test-DZo3EaV0.js +308 -0
- package/bundled-test-harness/assets/boolean-CcKPYUph.js +94 -0
- package/bundled-test-harness/assets/boolean-DvsSmtM7.js +2 -0
- package/bundled-test-harness/assets/brand-functional-palette-KpVSY2Sa.js +137 -0
- package/bundled-test-harness/assets/brand-logo-DDiOec0t.js +295 -0
- package/bundled-test-harness/assets/broken-link-template-test-DAngUbFJ.js +192 -0
- package/bundled-test-harness/assets/bundled-base-C_lumba6.js +254 -0
- package/bundled-test-harness/assets/bundled-base-modules-test-CSF7Rl4Z.js +54 -0
- package/bundled-test-harness/assets/buried-stack-item-scroll-test-B0J_EP88.js +236 -0
- package/bundled-test-harness/assets/bxl-expression-test-Dej7WgI6.js +250 -0
- package/bundled-test-harness/assets/can-invoke-test-elyUcOKT.js +401 -0
- package/bundled-test-harness/assets/card-api-CjWXCkqh.js +8 -0
- package/bundled-test-harness/assets/card-api-Dzje0smT.js +4393 -0
- package/bundled-test-harness/assets/card-api-test-DA8d4Ooc.js +198 -0
- package/bundled-test-harness/assets/card-basics-test-mp1Odo-l.js +5364 -0
- package/bundled-test-harness/assets/card-chooser-paging-test-y8OfboYd.js +235 -0
- package/bundled-test-harness/assets/card-chooser-test-nmg2zkDj.js +393 -0
- package/bundled-test-harness/assets/card-collection-BXiO3i7R.js +118 -0
- package/bundled-test-harness/assets/card-context-search-results-Dbhn7lvW.js +30 -0
- package/bundled-test-harness/assets/card-context-search-results-test-DVXT-YC5.js +184 -0
- package/bundled-test-harness/assets/card-def-field-def-relationships-test-mX4rxrtO.js +562 -0
- package/bundled-test-harness/assets/card-delete-test-BxFsqFnX.js +466 -0
- package/bundled-test-harness/assets/card-error-C-7hjxu9.js +72 -0
- package/bundled-test-harness/assets/card-error-awaiting-index-test-BvfY2eaW.js +53 -0
- package/bundled-test-harness/assets/card-error-detail-nMwopDir.js +271 -0
- package/bundled-test-harness/assets/card-info-CTFxdohf.js +2 -0
- package/bundled-test-harness/assets/card-list-B9QrkJ97.js +2 -0
- package/bundled-test-harness/assets/card-list-XbwLCXZS.js +202 -0
- package/bundled-test-harness/assets/card-resource-JGLjQUy6.js +86 -0
- package/bundled-test-harness/assets/cards-grid-CWG41hZE.js +344 -0
- package/bundled-test-harness/assets/cards-grid-DSpX99p6.js +2 -0
- package/bundled-test-harness/assets/cards-grid-layout-Bht0LwZy.js +2 -0
- package/bundled-test-harness/assets/cards-grid-layout-CdpKlHUb.js +111 -0
- package/bundled-test-harness/assets/check-correctness-test-C4BrUeKA.js +554 -0
- package/bundled-test-harness/assets/clip-BEVvLrXx.js +2 -0
- package/bundled-test-harness/assets/clip-CoB714qX.js +92 -0
- package/bundled-test-harness/assets/code-ref-C2uguisI.js +2 -0
- package/bundled-test-harness/assets/code-ref-Cy7sV5a4.js +138 -0
- package/bundled-test-harness/assets/code-submode-availability-test-BsA_Ul01.js +198 -0
- package/bundled-test-harness/assets/code-submode-test-DkBhpEPB.js +1839 -0
- package/bundled-test-harness/assets/codeblocks-test-B1eZ2_JF.js +418 -0
- package/bundled-test-harness/assets/codemirror-editor-C6pxSm5y.js +2 -0
- package/bundled-test-harness/assets/codemirror-editor-DzM46Cd8.js +701 -0
- package/bundled-test-harness/assets/codemirror-embed-toolbar-test-BemP-ZdG.js +366 -0
- package/bundled-test-harness/assets/color-C-jGNFWZ.js +2 -0
- package/bundled-test-harness/assets/color-field-test-DPIRaBec.js +212 -0
- package/bundled-test-harness/assets/color-picker-field-Bv4IjS-d.js +139 -0
- package/bundled-test-harness/assets/color-picker-field-D1bYCQIg.js +2 -0
- package/bundled-test-harness/assets/color-wheel-picker-IIaCQplL.js +283 -0
- package/bundled-test-harness/assets/color-wheel-picker-Kw-UN3kV.js +2 -0
- package/bundled-test-harness/assets/color-zzCBneih.js +65 -0
- package/bundled-test-harness/assets/command-data-BMBtjT1E.js +95 -0
- package/bundled-test-harness/assets/command-data-BXC5Z0oA.js +2 -0
- package/bundled-test-harness/assets/compaction-test-CxUKnxlQ.js +150 -0
- package/bundled-test-harness/assets/components-Ct_agx0G.js +14294 -0
- package/bundled-test-harness/assets/computed-test-C-lpGQQ3.js +1320 -0
- package/bundled-test-harness/assets/container-BdPu8rvc.css +5565 -0
- package/bundled-test-harness/assets/container-Dj-5prh9.js +11288 -0
- package/bundled-test-harness/assets/contains-many-component-CAWqzX8W.js +2 -0
- package/bundled-test-harness/assets/contrast-checker-addon-BTLD7oMx.js +2 -0
- package/bundled-test-harness/assets/contrast-checker-addon-DBzizR04.js +71 -0
- package/bundled-test-harness/assets/convert-to-class-name-test-zZuKxYvF.js +17 -0
- package/bundled-test-harness/assets/coordinate-Bw8va6tO.js +48 -0
- package/bundled-test-harness/assets/copy-file-to-realm-test-DtCKPzqj.js +148 -0
- package/bundled-test-harness/assets/country-B_tWpLlO.js +199 -0
- package/bundled-test-harness/assets/create-file-modal-D-VPyEYp.js +570 -0
- package/bundled-test-harness/assets/create-listing-modal-test-hyLkQY0u.js +273 -0
- package/bundled-test-harness/assets/create-listing-pr-request-test-rjWFA_5S.js +117 -0
- package/bundled-test-harness/assets/create-spec-test-HKIxZGxK.js +256 -0
- package/bundled-test-harness/assets/create-specs-9-ELVyJP.js +215 -0
- package/bundled-test-harness/assets/create-submission-workflow-test-DNZrbRX8.js +132 -0
- package/bundled-test-harness/assets/credential-fields-test-xPEdA911.js +157 -0
- package/bundled-test-harness/assets/css-value-Du3HL39X.js +48 -0
- package/bundled-test-harness/assets/csv-file-def-EHRmilrp.js +277 -0
- package/bundled-test-harness/assets/currency-y6ZCHIqG.js +134 -0
- package/bundled-test-harness/assets/date-B27PrSFT.js +183 -0
- package/bundled-test-harness/assets/date-CiP5Eb9i.js +2 -0
- package/bundled-test-harness/assets/date-time-fields-test-Clf5vxRW.js +359 -0
- package/bundled-test-harness/assets/datetime-BEbR9YgU.js +201 -0
- package/bundled-test-harness/assets/datetime-DPnrt1wl.js +2 -0
- package/bundled-test-harness/assets/datetime-stamp-AuT7F7qn.js +2 -0
- package/bundled-test-harness/assets/datetime-stamp-CGwP2P3f.js +81 -0
- package/bundled-test-harness/assets/day-BFLxZ9bQ.js +2 -0
- package/bundled-test-harness/assets/day-CQoEkqgE.js +113 -0
- package/bundled-test-harness/assets/debug-message-test-CzgOpfcI.js +117 -0
- package/bundled-test-harness/assets/dist-B-fYvxfL.js +389 -0
- package/bundled-test-harness/assets/dist-C2IXvIKX.js +323 -0
- package/bundled-test-harness/assets/dist-CdNZu43l.js +1710 -0
- package/bundled-test-harness/assets/docx-file-def-BQMw460_.js +60 -0
- package/bundled-test-harness/assets/docx-meta-extractor-DBlmH_kV.js +60 -0
- package/bundled-test-harness/assets/docx-meta-extractor-Dw4gZ0ae.js +2 -0
- package/bundled-test-harness/assets/duration-B0SnEiw1.js +184 -0
- package/bundled-test-harness/assets/duration-DbjJTFeA.js +2 -0
- package/bundled-test-harness/assets/email-C-8cyWiQ.js +80 -0
- package/bundled-test-harness/assets/email-field-test-BOBmvQqx.js +75 -0
- package/bundled-test-harness/assets/email-xUgCst-p.js +2 -0
- package/bundled-test-harness/assets/enum-BWiCyJlu.js +167 -0
- package/bundled-test-harness/assets/enum-CzYjivhO.js +2 -0
- package/bundled-test-harness/assets/enum-field-test-Bea9EsQR.js +953 -0
- package/bundled-test-harness/assets/error-display-test-Cbl2D_0c.js +343 -0
- package/bundled-test-harness/assets/ethereum-address-Bw_J05bD.js +78 -0
- package/bundled-test-harness/assets/ethereum-address-C9wHMBt3.js +2 -0
- package/bundled-test-harness/assets/expiration-warning-BHcJEjZt.js +90 -0
- package/bundled-test-harness/assets/expiration-warning-_G8SKZd0.js +2 -0
- package/bundled-test-harness/assets/externals-CKblKBo1.js +4393 -0
- package/bundled-test-harness/assets/fallback-banner-BqCrvTDt.js +24 -0
- package/bundled-test-harness/assets/fallback-banner-live-delete-test-D_AYMvf6.js +207 -0
- package/bundled-test-harness/assets/fallback-banner-test-B8Ne9a5g.js +225 -0
- package/bundled-test-harness/assets/fallback-banner-test-C7oaSxd1.js +53 -0
- package/bundled-test-harness/assets/fallback-models-test-DY-PvU9k.js +161 -0
- package/bundled-test-harness/assets/field-component-Bj8YthPE.js +2 -0
- package/bundled-test-harness/assets/field-configuration-test-B5LztQ47.js +548 -0
- package/bundled-test-harness/assets/field-edit-Cx_haspD.js +36 -0
- package/bundled-test-harness/assets/field-edit-DQZWUz3F.js +2 -0
- package/bundled-test-harness/assets/field-markdown-domain-test-DnqK3CrE.js +616 -0
- package/bundled-test-harness/assets/field-markdown-oversize-test-BEpbXIvl.js +88 -0
- package/bundled-test-harness/assets/field-markdown-primitives-test-BDORWoOk.js +365 -0
- package/bundled-test-harness/assets/field-markdown-specialized-test-BmIzadYq.js +534 -0
- package/bundled-test-harness/assets/field-test-helpers-CRF9-jFw.js +45 -0
- package/bundled-test-harness/assets/file-api-DPMJghBY.js +7 -0
- package/bundled-test-harness/assets/file-attachment-test-DFLXg3xV.js +796 -0
- package/bundled-test-harness/assets/file-chooser-panel-test-B4DzCWkt.js +153 -0
- package/bundled-test-harness/assets/file-chooser-test-DpjOWgpB.js +504 -0
- package/bundled-test-harness/assets/file-def-edit-Bstl7Kkl.js +2 -0
- package/bundled-test-harness/assets/file-def-edit-C1dzJxmQ.js +26 -0
- package/bundled-test-harness/assets/file-def-embedded-CUy4G7Vc.js +2 -0
- package/bundled-test-harness/assets/file-def-embedded-DJs6P5t0.js +38 -0
- package/bundled-test-harness/assets/file-def-fitted-BlrBFfLh.js +38 -0
- package/bundled-test-harness/assets/file-def-fitted-Bo5Qfkyf.js +2 -0
- package/bundled-test-harness/assets/file-def-isolated-BsHydanv.js +38 -0
- package/bundled-test-harness/assets/file-def-isolated-Dp-Lc99-.js +2 -0
- package/bundled-test-harness/assets/file-def-serialization-test-CISKpt_o.js +89 -0
- package/bundled-test-harness/assets/file-menu-items-7_ltrFZq.js +117 -0
- package/bundled-test-harness/assets/file-menu-items-BnRG9ydE.js +2 -0
- package/bundled-test-harness/assets/file-preview-stage-CV3qZpiK.js +72 -0
- package/bundled-test-harness/assets/file-preview-stage-DTA5X8rX.js +2 -0
- package/bundled-test-harness/assets/file-shell-embedded-BpmiVzIG.js +2 -0
- package/bundled-test-harness/assets/file-shell-embedded-CEv0-6OE.js +68 -0
- package/bundled-test-harness/assets/file-shell-fitted-C6k3GnMc.js +2 -0
- package/bundled-test-harness/assets/file-shell-fitted-iSTg3PJa.js +98 -0
- package/bundled-test-harness/assets/file-shell-isolated-C-pEod2J.js +195 -0
- package/bundled-test-harness/assets/file-shell-isolated-DI9oU7ix.js +2 -0
- package/bundled-test-harness/assets/file-tree-from-index-BtOOMqnb.js +151 -0
- package/bundled-test-harness/assets/file-tree-from-index-test-T8w3hPw_.js +96 -0
- package/bundled-test-harness/assets/film-5n9_gRqZ.js +4074 -0
- package/bundled-test-harness/assets/film-Ca2Vzlfu.js +13 -0
- package/bundled-test-harness/assets/film-DEvhBbBu.js +2 -0
- package/bundled-test-harness/assets/fitted-6OGuHgoU.js +2 -0
- package/bundled-test-harness/assets/fitted-B2l1jlSp.js +34 -0
- package/bundled-test-harness/assets/flac-meta-extractor-BoJqvmDC.js +99 -0
- package/bundled-test-harness/assets/font-file-def-Czzt5paT.js +64 -0
- package/bundled-test-harness/assets/font-meta-extractor-DQYT_e5b.js +2 -0
- package/bundled-test-harness/assets/font-meta-extractor-IHD-pG8V.js +303 -0
- package/bundled-test-harness/assets/formatted-aibot-message-test-Djsl8RzE.js +109 -0
- package/bundled-test-harness/assets/from-elsewhere-BXcLYxxu.js +131 -0
- package/bundled-test-harness/assets/frontmatter-field-CciolgL3.js +41 -0
- package/bundled-test-harness/assets/garbage-collection-test-BTOLAfB6.js +403 -0
- package/bundled-test-harness/assets/gauge-C1loqGq3.js +2 -0
- package/bundled-test-harness/assets/gauge-u8dxl90d.js +106 -0
- package/bundled-test-harness/assets/general-test-Cd5WtVvd.js +926 -0
- package/bundled-test-harness/assets/get-relationship-membership-state-test-DJAuhOVM.js +1308 -0
- package/bundled-test-harness/assets/gif-meta-extractor-tSaPtuYW.js +114 -0
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-in-cards-test-DNSy5l59.js +160 -0
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-test-B6BbQxYq.js +74 -0
- package/bundled-test-harness/assets/helper-m6jA5HmU.js +478 -0
- package/bundled-test-harness/assets/host-submode-test-CsgdksBi.js +1243 -0
- package/bundled-test-harness/assets/html-file-def-yKtdMSa-.js +82 -0
- package/bundled-test-harness/assets/hydratable-card-CxNfbqly.js +147 -0
- package/bundled-test-harness/assets/hydratable-card-test-NJ4CI4ey.js +426 -0
- package/bundled-test-harness/assets/icons-B3SAtRoj.js +894 -0
- package/bundled-test-harness/assets/image-file-def-B0rpS3Yy.js +3 -0
- package/bundled-test-harness/assets/image-file-def-DUFmjNL8.js +65 -0
- package/bundled-test-harness/assets/image-olOUqgMQ.js +47 -0
- package/bundled-test-harness/assets/index-changes-test-D7OE-99k.js +367 -0
- package/bundled-test-harness/assets/index-query-engine-test-BBKqgSmg.js +2593 -0
- package/bundled-test-harness/assets/inspector-test-DV6Ms2uz.js +1930 -0
- package/bundled-test-harness/assets/instance-filter-matcher-test-Bs4kf7E8.js +788 -0
- package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-DIfgRhIN.js +475 -0
- package/bundled-test-harness/assets/interact-submode-setup-D4M_e580.js +566 -0
- package/bundled-test-harness/assets/is-component-declaration-test-jPGRTVh1.js +50 -0
- package/bundled-test-harness/assets/iso-bmff-DHtkSbQM.js +205 -0
- package/bundled-test-harness/assets/iso-bmff-zmOHoSVg.js +2 -0
- package/bundled-test-harness/assets/isolated-and-edit-BAnwcK1T.js +2 -0
- package/bundled-test-harness/assets/job-priority-header-test-7j2f3Dtl.js +81 -0
- package/bundled-test-harness/assets/job-scoped-instance-residency-test-DPzVQUL3.js +103 -0
- package/bundled-test-harness/assets/join-the-community-Ft5fjeIA.js +86 -0
- package/bundled-test-harness/assets/jpg-meta-extractor-Dsq6rZ8F.js +88 -0
- package/bundled-test-harness/assets/json-field-CxOZvp3k.js +19 -0
- package/bundled-test-harness/assets/json-field-ojdwGD6T.js +2 -0
- package/bundled-test-harness/assets/json-file-def-Da_5-zSM.js +298 -0
- package/bundled-test-harness/assets/last-modified-date-BnyJsc04.js +43 -0
- package/bundled-test-harness/assets/last-modified-date-test-DFl2mo1B.js +28 -0
- package/bundled-test-harness/assets/links-to-editor-DO24-71w.js +2 -0
- package/bundled-test-harness/assets/links-to-many-component-C7DabwAY.js +2 -0
- package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-D4lDhvnQ.js +398 -0
- package/bundled-test-harness/assets/linksto-error-sentinel-test-oWgDz00K.js +238 -0
- package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-CpSl7zJ7.js +354 -0
- package/bundled-test-harness/assets/linksto-many-per-slot-access-test-DJY3J8Xl.js +303 -0
- package/bundled-test-harness/assets/linksto-sentinel-reload-test-BxzfoONe.js +197 -0
- package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-DyE99km_.js +260 -0
- package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-dcWAAgxt.js +196 -0
- package/bundled-test-harness/assets/llm-model-DrswiczZ.js +64 -0
- package/bundled-test-harness/assets/login-C-EIG0-Q.css +543 -0
- package/bundled-test-harness/assets/login-CNeL-9IC.js +408 -0
- package/bundled-test-harness/assets/login-error-text-test-CEH2tjNP.js +51 -0
- package/bundled-test-harness/assets/login-test-BpMx7qwV.js +246 -0
- package/bundled-test-harness/assets/m4a-meta-extractor-BJkMHUIK.js +204 -0
- package/bundled-test-harness/assets/main-BaUgfpPE.js +5 -0
- package/bundled-test-harness/assets/markdown-ByEGbwov.js +7 -0
- package/bundled-test-harness/assets/markdown-KJzgTg-A.js +2 -0
- package/bundled-test-harness/assets/markdown-editor-mode-select-BUGPXaSE.js +2 -0
- package/bundled-test-harness/assets/markdown-editor-mode-select-DBk8dG0O.js +54 -0
- package/bundled-test-harness/assets/markdown-embed-chooser-modal-test-BIlEmna9.js +470 -0
- package/bundled-test-harness/assets/markdown-embed-preview-pane-test-B6rscKpk.js +447 -0
- package/bundled-test-harness/assets/markdown-embed-preview-test-CTQw1wq-.js +368 -0
- package/bundled-test-harness/assets/markdown-fallback-BVsco6gJ.js +2 -0
- package/bundled-test-harness/assets/markdown-fallback-test-C_CIFEzH.js +316 -0
- package/bundled-test-harness/assets/markdown-highlighting-test-D6YvywF5.js +244 -0
- package/bundled-test-harness/assets/markdown-preview-1TSMSUv0.js +64 -0
- package/bundled-test-harness/assets/markdown-preview-jbuUjLoD.js +72 -0
- package/bundled-test-harness/assets/markdown-preview-test-zuU5uoA_.js +238 -0
- package/bundled-test-harness/assets/markdown-skill-frontmatter-test-CoicGRkb.js +146 -0
- package/bundled-test-harness/assets/menu-items-DZ_uOoYu.js +2 -0
- package/bundled-test-harness/assets/message-tool-test-K6LgTq5d.js +33 -0
- package/bundled-test-harness/assets/metadata-fields-WiOuUCDl.js +1415 -0
- package/bundled-test-harness/assets/metadata-fields-iu5AfQp3.js +2 -0
- package/bundled-test-harness/assets/midi-audio-def-CD2-4Wjx.js +52 -0
- package/bundled-test-harness/assets/midi-meta-extractor-CE3sLiEV.js +284 -0
- package/bundled-test-harness/assets/midi-meta-extractor-O7c8LHYV.js +2 -0
- package/bundled-test-harness/assets/migrate-skill-test-Beh-AeSN.js +161 -0
- package/bundled-test-harness/assets/mini-BNXINKKF.js +85 -0
- package/bundled-test-harness/assets/mini-C43Q4BWp.js +1519 -0
- package/bundled-test-harness/assets/mini-card-chooser-test-B1GMp-31.js +272 -0
- package/bundled-test-harness/assets/mini-file-chooser-test-CbI1vrQn.js +201 -0
- package/bundled-test-harness/assets/missing-template-BPhJRbDs.js +48 -0
- package/bundled-test-harness/assets/missing-template-DP-Pi-HQ.js +2 -0
- package/bundled-test-harness/assets/modal-KpPz2f8x.js +322 -0
- package/bundled-test-harness/assets/modal-container-0Efz_h2z.js +40 -0
- package/bundled-test-harness/assets/model-cost-tier-test-D-5VSjh6.js +173 -0
- package/bundled-test-harness/assets/module-contents-service-BRkTETb6.js +256 -0
- package/bundled-test-harness/assets/moment-Cln59YUK.js +3474 -0
- package/bundled-test-harness/assets/monaco-AbHCoDJY.js +143 -0
- package/bundled-test-harness/assets/monaco-test-DCPi18sy.js +100 -0
- package/bundled-test-harness/assets/monaco-test-waiter-lvFEYpFj.js +190 -0
- package/bundled-test-harness/assets/month-1eUIsvWN.js +2 -0
- package/bundled-test-harness/assets/month-BeUdWMWQ.js +123 -0
- package/bundled-test-harness/assets/month-day-Bbsd8YbR.js +192 -0
- package/bundled-test-harness/assets/month-day-Dks5STJu.js +2 -0
- package/bundled-test-harness/assets/month-year-pL_rpUhX.js +2 -0
- package/bundled-test-harness/assets/month-year-wH_YnYgL.js +93 -0
- package/bundled-test-harness/assets/mp3-meta-extractor-C3u34UHM.js +476 -0
- package/bundled-test-harness/assets/mp4-meta-extractor-Bj3F7dxs.js +188 -0
- package/bundled-test-harness/assets/multiple-stacks-test-mkNdTUMI.js +208 -0
- package/bundled-test-harness/assets/nested-query-field-render-test-BQLn3wg9.js +249 -0
- package/bundled-test-harness/assets/no-stacks-test-DpwZQAJ-.js +48 -0
- package/bundled-test-harness/assets/number-DZa-fHpu.js +151 -0
- package/bundled-test-harness/assets/number-Dvua76YP.js +3 -0
- package/bundled-test-harness/assets/number-field-test-BiaH2eaB.js +184 -0
- package/bundled-test-harness/assets/number-input-D5nDYDkK.js +82 -0
- package/bundled-test-harness/assets/office-extract-JzYva33g.js +27 -0
- package/bundled-test-harness/assets/office-extract-XMpsyYRh.js +2 -0
- package/bundled-test-harness/assets/ogg-meta-extractor-DJosZ9LA.js +225 -0
- package/bundled-test-harness/assets/on-key-BBVkS8Bi.js +472 -0
- package/bundled-test-harness/assets/ooxml-BlAE2w4d.js +172 -0
- package/bundled-test-harness/assets/ooxml-D-p8OmuM.js +2 -0
- package/bundled-test-harness/assets/open-image-in-new-tab-test-DWBU5pw9.js +52 -0
- package/bundled-test-harness/assets/operation-lowering-test-nzqprueU.js +2812 -0
- package/bundled-test-harness/assets/operations-CPvfTuY3.js +766 -0
- package/bundled-test-harness/assets/operations-invocation-test-C75T6zn3.js +523 -0
- package/bundled-test-harness/assets/operations-query-test-BoCszQEW.js +459 -0
- package/bundled-test-harness/assets/operations-test-79ipSnpM.js +2518 -0
- package/bundled-test-harness/assets/operations-x3Aw2Nky.js +3 -0
- package/bundled-test-harness/assets/operator-mode-acceptance-test-jjsYtt96.js +1188 -0
- package/bundled-test-harness/assets/operator-mode-card-chooser-test-hZP9gEQK.js +1036 -0
- package/bundled-test-harness/assets/operator-mode-links-test-DN16SuIx.js +793 -0
- package/bundled-test-harness/assets/operator-mode-state-service-gwiTSiWX.js +1275 -0
- package/bundled-test-harness/assets/operator-mode-state-service-test-Dt2qnKKP.js +206 -0
- package/bundled-test-harness/assets/operator-mode-test-BZnnxO9q.js +683 -0
- package/bundled-test-harness/assets/operator-mode-ui-test-O--qEo-y.js +1027 -0
- package/bundled-test-harness/assets/overlay-menu-items-test-Bl2k0aAa.js +317 -0
- package/bundled-test-harness/assets/overlays-CdN_JokA.js +270 -0
- package/bundled-test-harness/assets/overlays-clip-test-DpbR1ZTz.js +91 -0
- package/bundled-test-harness/assets/overlays-detached-element-test-cLgEGvMs.js +56 -0
- package/bundled-test-harness/assets/pane-PYdezM7g.js +330 -0
- package/bundled-test-harness/assets/panel-7FDqkxrr.js +474 -0
- package/bundled-test-harness/assets/panel-C3E0s49q.js +3540 -0
- package/bundled-test-harness/assets/past-sessions-test-BsjEeoze.js +321 -0
- package/bundled-test-harness/assets/patch-fields-test-CsixJmSr.js +1014 -0
- package/bundled-test-harness/assets/patch-instance-test-CBDgTi0L.js +348 -0
- package/bundled-test-harness/assets/pdf-file-def-9VNjnqDa.js +76 -0
- package/bundled-test-harness/assets/pdf-meta-extractor-BF4e5kMR.js +156 -0
- package/bundled-test-harness/assets/pdf-meta-extractor-D8Bxh2cc.js +2 -0
- package/bundled-test-harness/assets/pdf-viewer-Bu413sN8.js +112 -0
- package/bundled-test-harness/assets/pdf-viewer-GKDi_xmf.js +2 -0
- package/bundled-test-harness/assets/percentage-TOr6qK2T.js +84 -0
- package/bundled-test-harness/assets/permission-checking-realm-test-BRNVYszm.js +306 -0
- package/bundled-test-harness/assets/phone-number-D5SR8nWu.js +236 -0
- package/bundled-test-harness/assets/phone-number-field-test-DffwtqGd.js +73 -0
- package/bundled-test-harness/assets/phone-number-hf_xIVGQ.js +2 -0
- package/bundled-test-harness/assets/plate-Vojc88hM.js +41 -0
- package/bundled-test-harness/assets/plate-dTUzEMj5.js +2 -0
- package/bundled-test-harness/assets/player-CmRw0uM5.js +82 -0
- package/bundled-test-harness/assets/player-Dt85lPZl.js +2 -0
- package/bundled-test-harness/assets/plural-field-components-test-DNpGuH1D.js +198 -0
- package/bundled-test-harness/assets/png-image-def-GY7gjqya.js +48 -0
- package/bundled-test-harness/assets/png-meta-extractor-4pI611re.js +2 -0
- package/bundled-test-harness/assets/png-meta-extractor-CHp_rpAi.js +111 -0
- package/bundled-test-harness/assets/policy-scoped-search-test-CipPu7tY.js +339 -0
- package/bundled-test-harness/assets/pptx-file-def-lBBiebvn.js +60 -0
- package/bundled-test-harness/assets/pptx-meta-extractor-BjJYWiOJ.js +77 -0
- package/bundled-test-harness/assets/pptx-meta-extractor-DbT-dPRg.js +2 -0
- package/bundled-test-harness/assets/prerender-persistence-block-test-ClHMVvJt.js +124 -0
- package/bundled-test-harness/assets/prerender-serialize-cycle-test-LdqaMTK8.js +134 -0
- package/bundled-test-harness/assets/preview-CYlam_aW.js +74 -0
- package/bundled-test-harness/assets/preview-format-CiSo4kEa.js +41 -0
- package/bundled-test-harness/assets/preview-format-test-MsB1TOLB.js +103 -0
- package/bundled-test-harness/assets/process-card-B3xBGkv1.js +2 -0
- package/bundled-test-harness/assets/process-card-DumVcx9E.js +114 -0
- package/bundled-test-harness/assets/process-card-test-C44H8yVy.js +94 -0
- package/bundled-test-harness/assets/profile-settings-modal-ipYzrVTz.js +708 -0
- package/bundled-test-harness/assets/progress-circle-DJ6WSO2E.js +95 -0
- package/bundled-test-harness/assets/progress-circle-q358_9Sn.js +2 -0
- package/bundled-test-harness/assets/quarter-BjO5DlU2.js +2 -0
- package/bundled-test-harness/assets/quarter-_D72FwfS.js +168 -0
- package/bundled-test-harness/assets/query-field-membership-status-test-CzDyfK49.js +323 -0
- package/bundled-test-harness/assets/query-field-page-optin-test-B-x3vsmC.js +126 -0
- package/bundled-test-harness/assets/query-field-schema-test-DFw6KuYv.js +231 -0
- package/bundled-test-harness/assets/query-field-stale-prerender-test-DSQ-cv_O.js +152 -0
- package/bundled-test-harness/assets/query-fields-test-DQiMFRCe.js +535 -0
- package/bundled-test-harness/assets/rail-CNspDFyn.js +44 -0
- package/bundled-test-harness/assets/rail-D2YcQ0VP.js +2 -0
- package/bundled-test-harness/assets/realm-82Z5RUM_.js +95 -0
- package/bundled-test-harness/assets/realm-config-SgrwqjRu.js +844 -0
- package/bundled-test-harness/assets/realm-config-policy-standing-test-C6sQNk2u.js +290 -0
- package/bundled-test-harness/assets/realm-config-routing-rule-edit-test-DcYXBlvi.js +274 -0
- package/bundled-test-harness/assets/realm-config-settings-test-DblJv06X.js +187 -0
- package/bundled-test-harness/assets/realm-dropdown-CDvL8k3B.js +560 -0
- package/bundled-test-harness/assets/realm-et890flh.js +2 -0
- package/bundled-test-harness/assets/realm-field-test-pBK_x-Xw.js +100 -0
- package/bundled-test-harness/assets/realm-indexing-test-DSFn2F8F.js +4380 -0
- package/bundled-test-harness/assets/realm-policy-test-DYnLqzTS.js +1141 -0
- package/bundled-test-harness/assets/realm-test-DOZT2EG5.js +2363 -0
- package/bundled-test-harness/assets/realm-url-tooltip-qaXTjRb-.js +56 -0
- package/bundled-test-harness/assets/realm-url-tooltip-test-DGTEeLH9.js +78 -0
- package/bundled-test-harness/assets/reasoning-test-BRkhvYjr.js +234 -0
- package/bundled-test-harness/assets/recent-colors-addon-BreXcpg8.js +2 -0
- package/bundled-test-harness/assets/recent-colors-addon-CmCkbJ2_.js +61 -0
- package/bundled-test-harness/assets/relationship-loading-state-test-B6UGYKzG.js +290 -0
- package/bundled-test-harness/assets/relative-time-BjHvL023.js +2 -0
- package/bundled-test-harness/assets/relative-time-ChYKOMIM.js +129 -0
- package/bundled-test-harness/assets/remix-card-test-CpV0kKfq.js +58 -0
- package/bundled-test-harness/assets/rendered-markdown-CJa7IzCC.js +263 -0
- package/bundled-test-harness/assets/rendered-markdown-test-CVKsHS4P.js +587 -0
- package/bundled-test-harness/assets/resident-instance-reuse-test-jQfW1NMn.js +82 -0
- package/bundled-test-harness/assets/response-field-B2-daCl2.js +38 -0
- package/bundled-test-harness/assets/result-tile-BSg4mzbc.js +140 -0
- package/bundled-test-harness/assets/rich-markdown-BtP1yamM.js +2 -0
- package/bundled-test-harness/assets/rich-markdown-C6rQUngb.js +218 -0
- package/bundled-test-harness/assets/rich-markdown-field-test-9yB6ykCe.js +1647 -0
- package/bundled-test-harness/assets/room-C7tKd02X.js +1008 -0
- package/bundled-test-harness/assets/room-message-test-DsMmRYpV.js +445 -0
- package/bundled-test-harness/assets/room-test-golI1H61.js +95 -0
- package/bundled-test-harness/assets/run-realm-code-CbXk6bnK.js +1600 -0
- package/bundled-test-harness/assets/run-realm-code-test-B9JeesaW.js +2468 -0
- package/bundled-test-harness/assets/schema-generation-test-uLLGm5Vh.js +28 -0
- package/bundled-test-harness/assets/score-BQhCQdUP.js +2 -0
- package/bundled-test-harness/assets/score-CoWEzENH.js +100 -0
- package/bundled-test-harness/assets/scrolling-test-WHWEkKeZ.js +384 -0
- package/bundled-test-harness/assets/search-BkQYpQDY.js +605 -0
- package/bundled-test-harness/assets/search-adorn-test-CW92JPOk.js +136 -0
- package/bundled-test-harness/assets/search-entries-BU4w6Ymc.js +472 -0
- package/bundled-test-harness/assets/search-entries-result-test-9eydsDtD.js +234 -0
- package/bundled-test-harness/assets/search-entries-test-ByUREx0G.js +1486 -0
- package/bundled-test-harness/assets/search-result-header-UFkdo0Bx.js +128 -0
- package/bundled-test-harness/assets/search-results-DrHTuVRZ.js +266 -0
- package/bundled-test-harness/assets/search-results-test-krtQQM57.js +578 -0
- package/bundled-test-harness/assets/search-selection-menu-test-DoqSbez7.js +108 -0
- package/bundled-test-harness/assets/search-sheet-persistence-test-4ZPaEY-y.js +131 -0
- package/bundled-test-harness/assets/search-test-BYpq32RM.js +2241 -0
- package/bundled-test-harness/assets/searchable-BXw4T11q.js +192 -0
- package/bundled-test-harness/assets/searchable-CVvPDA3Q.js +2 -0
- package/bundled-test-harness/assets/searchable-option-test-BhLFI4ei.js +322 -0
- package/bundled-test-harness/assets/searchable-search-doc-test-DrNLCF73.js +1271 -0
- package/bundled-test-harness/assets/secure-sign-in-VNQhe0ae.js +130 -0
- package/bundled-test-harness/assets/secure-sign-in-Za8PX9cD.css +24 -0
- package/bundled-test-harness/assets/secure-sign-in-aunWHCrB.js +73 -0
- package/bundled-test-harness/assets/secure-sign-in-test-BcY1TcNd.js +32 -0
- package/bundled-test-harness/assets/secure-sign-in-test-DRdz89BT.js +245 -0
- package/bundled-test-harness/assets/sending-test-mbHpGZUu.js +576 -0
- package/bundled-test-harness/assets/serialization-rri-form-audit-test-nypV9J82.js +136 -0
- package/bundled-test-harness/assets/serialization-test-aLwrFv4d.js +8758 -0
- package/bundled-test-harness/assets/setup-Dgn0s6Zk.js +772 -0
- package/bundled-test-harness/assets/shared-link-target-reuse-test-D9MR2UNc.js +207 -0
- package/bundled-test-harness/assets/show-card-Dwfk332M.js +67 -0
- package/bundled-test-harness/assets/show-card-test-CRPwwJvc.js +365 -0
- package/bundled-test-harness/assets/show-file-DLdFPHMR.js +34 -0
- package/bundled-test-harness/assets/signed-capture-DUR9PohQ.js +204 -0
- package/bundled-test-harness/assets/signed-capture-link-test-DfTAB6OT.js +132 -0
- package/bundled-test-harness/assets/single-stack-test-Crr_8nti.js +652 -0
- package/bundled-test-harness/assets/skill-DQ00VonZ.js +3 -0
- package/bundled-test-harness/assets/skill-reference-LEitQV9i.js +112 -0
- package/bundled-test-harness/assets/skill-yZXS1VHQ.js +76 -0
- package/bundled-test-harness/assets/skills-test-D3-C-Dbm.js +648 -0
- package/bundled-test-harness/assets/slider-picker-B6AxKL2j.js +245 -0
- package/bundled-test-harness/assets/slider-picker-C4Tc5o-s.js +2 -0
- package/bundled-test-harness/assets/spec-Cl_LB6nC.js +602 -0
- package/bundled-test-harness/assets/spinner-BHFM7zcR.js +39 -0
- package/bundled-test-harness/assets/spinner-DvAvsyDT.css +21 -0
- package/bundled-test-harness/assets/store-BV6WX8oV.js +2205 -0
- package/bundled-test-harness/assets/store-module-rebuild-test-HyphFJiF.js +454 -0
- package/bundled-test-harness/assets/store-search-test-nUeJ5opb.js +175 -0
- package/bundled-test-harness/assets/store-test-BebUIJAg.js +3460 -0
- package/bundled-test-harness/assets/string-BHZZwNlZ.js +9 -0
- package/bundled-test-harness/assets/submode-switcher-D-U9cXo0.js +169 -0
- package/bundled-test-harness/assets/svg-meta-extractor-BsG4w2nX.js +42 -0
- package/bundled-test-harness/assets/swatches-picker-4vFztxHo.js +33 -0
- package/bundled-test-harness/assets/swatches-picker-C7RE7uJ8.js +2 -0
- package/bundled-test-harness/assets/switch-submode-CuA0Zfjn.js +79 -0
- package/bundled-test-harness/assets/switch-submode-test-i1Qic_Cp.js +168 -0
- package/bundled-test-harness/assets/tag-CZNs3DPN.js +105 -0
- package/bundled-test-harness/assets/tests-BneuP252.js +3523 -0
- package/bundled-test-harness/assets/text-area-DAShQQBe.js +9 -0
- package/bundled-test-harness/assets/text-file-def-D2Rs6nS1.js +151 -0
- package/bundled-test-harness/assets/text-input-validator-test-C9IG-1GZ.js +156 -0
- package/bundled-test-harness/assets/theme-Dm8LWaRK.js +9 -0
- package/bundled-test-harness/assets/theme-card-test-Cbb6tAap.js +621 -0
- package/bundled-test-harness/assets/theme-scheme-island-test-DOVLakx3.js +264 -0
- package/bundled-test-harness/assets/three-d-model-def-DWSPQGgD.js +70 -0
- package/bundled-test-harness/assets/time--_Txqya1.js +126 -0
- package/bundled-test-harness/assets/time-DKD7Bdjd.js +2 -0
- package/bundled-test-harness/assets/time-slots-BZaugjq_.js +2 -0
- package/bundled-test-harness/assets/time-slots-C85M0rWl.js +85 -0
- package/bundled-test-harness/assets/timeline-B3KGDm3M.js +2 -0
- package/bundled-test-harness/assets/timeline-BMwgaZZu.js +59 -0
- package/bundled-test-harness/assets/to-device-streaming-test-CMp5bFiz.js +163 -0
- package/bundled-test-harness/assets/token-usage-test-CXA0b8Ep.js +166 -0
- package/bundled-test-harness/assets/tool-field-BGLelnsr.js +94 -0
- package/bundled-test-harness/assets/tool-field-BOFuDDt3.js +2 -0
- package/bundled-test-harness/assets/tools-CTjy7Aub.js +725 -0
- package/bundled-test-harness/assets/tools-calling-test--JR-7AK7.js +200 -0
- package/bundled-test-harness/assets/tools-test-6yAW3W5I.js +2820 -0
- package/bundled-test-harness/assets/tools-test-DhpMUQkz.js +1624 -0
- package/bundled-test-harness/assets/ts-file-def-CDbf8aw2.js +159 -0
- package/bundled-test-harness/assets/update-room-skills-test-DoKsS_1C.js +240 -0
- package/bundled-test-harness/assets/url-D0ooeJxC.js +2 -0
- package/bundled-test-harness/assets/url-mFskVPSX.js +96 -0
- package/bundled-test-harness/assets/video-file-def-AcmWqzev.js +76 -0
- package/bundled-test-harness/assets/wav-meta-extractor-CbTLruQf.js +368 -0
- package/bundled-test-harness/assets/webm-meta-extractor-C9JH-CMX.js +178 -0
- package/bundled-test-harness/assets/webp-meta-extractor-C6sHm4J7.js +98 -0
- package/bundled-test-harness/assets/website-Bxuk_OmR.js +92 -0
- package/bundled-test-harness/assets/week-Bxssxce7.js +2 -0
- package/bundled-test-harness/assets/week-DQLj9974.js +111 -0
- package/bundled-test-harness/assets/welcome-to-boxel-BH82RsW5.js +172 -0
- package/bundled-test-harness/assets/workspace-DJ_s2x4g.js +614 -0
- package/bundled-test-harness/assets/workspace-a11y-test-BJbZNgoP.js +197 -0
- package/bundled-test-harness/assets/workspace-behavior-test-BLBARTfb.js +200 -0
- package/bundled-test-harness/assets/workspace-chooser-BpmlVrVn.js +2219 -0
- package/bundled-test-harness/assets/workspace-chooser-CqLR2Dzh.css +1296 -0
- package/bundled-test-harness/assets/workspace-chooser-catalog-order-test-CmAVNAWC.js +36 -0
- package/bundled-test-harness/assets/workspace-chooser-unreachable-notice-test-DEfG7Uh9.js +60 -0
- package/bundled-test-harness/assets/workspace-delete-multiple-test-DE7Z8ooj.js +212 -0
- package/bundled-test-harness/assets/workspace-delete-summary-test-CwtG_zLH.js +63 -0
- package/bundled-test-harness/assets/workspace-timestamp-labels-test-DFAaRmJW.js +58 -0
- package/bundled-test-harness/assets/xlsx-file-def-DcvaRYnZ.js +60 -0
- package/bundled-test-harness/assets/xlsx-meta-extractor-0RlViVaf.js +101 -0
- package/bundled-test-harness/assets/xlsx-meta-extractor-BH30Vuem.js +2 -0
- package/bundled-test-harness/assets/year-B_MBk_hE.js +78 -0
- package/bundled-test-harness/assets/year-hSpccI9L.js +2 -0
- package/bundled-test-harness/assets/zip-file-def-c84iddi9.js +288 -0
- package/bundled-test-harness/index.html +78 -68
- package/bundled-test-harness/tests/index.html +78 -68
- package/bundled-types/host-app/components/matrix/account-switch-failed.gts +2 -2
- package/bundled-types/host-app/components/matrix/auth.gts +2 -2
- package/bundled-types/host-app/components/matrix/cli-auth.gts +7 -6
- package/bundled-types/host-app/components/matrix/forgot-password.gts +43 -129
- package/bundled-types/host-app/components/matrix/login.gts +15 -118
- package/bundled-types/host-app/components/matrix/register-user.gts +45 -226
- package/bundled-types/host-app/components/matrix/secure-sign-in.gts +235 -0
- package/bundled-types/host-app/components/operator-mode/container.gts +13 -1
- package/bundled-types/host-app/components/operator-mode/profile-info-popover.gts +1 -1
- package/bundled-types/host-app/config/environment.ts +1 -1
- package/bundled-types/host-app/lib/secure-sign-in.ts +130 -0
- package/bundled-types/host-app/services/matrix-service.ts +46 -0
- package/bundled-types/host-app/services/monaco-service.ts +0 -5
- package/bundled-types/host-app/utils/login-token.ts +23 -10
- package/dist/api.js +1 -1
- package/dist/index.js +289 -285
- package/package.json +1 -1
- package/src/build-program.ts +6 -2
- package/src/commands/profile.ts +72 -3
- package/src/lib/profile-manager.ts +5 -1
- package/src/lib/secure-session.ts +29 -0
- package/src/lib/sso-login.ts +94 -15
- package/bundled-test-harness/assets/account-switch-failed-B3pr_iC3.js +0 -32
- package/bundled-test-harness/assets/account-switch-failed-DTGZZo-G.css +0 -61
- package/bundled-test-harness/assets/account-switch-failed-test-9ENVgvlx.js +0 -45
- package/bundled-test-harness/assets/add-workspace-BAbk0250.js +0 -141
- package/bundled-test-harness/assets/add-workspace-test-ChAja_t-.js +0 -72
- package/bundled-test-harness/assets/advanced-color-picker-C-xBFJ2S.js +0 -504
- package/bundled-test-harness/assets/advanced-color-picker-bWAmCT-8.js +0 -2
- package/bundled-test-harness/assets/ai-assistant-test-BJ9yetuC.js +0 -2211
- package/bundled-test-harness/assets/ai-module-creation-test-Bw3TKS9d.js +0 -151
- package/bundled-test-harness/assets/aibot-message-DkgHT6eJ.js +0 -465
- package/bundled-test-harness/assets/app-DW5QjtRp.js +0 -22816
- package/bundled-test-harness/assets/app-yCDjO4mk.css +0 -2718
- package/bundled-test-harness/assets/audio-file-def-bJ3cXVmC.js +0 -133
- package/bundled-test-harness/assets/avif-meta-extractor-CrSDfYEt.js +0 -162
- package/bundled-test-harness/assets/base64-image-C7UBjK5W.js +0 -262
- package/bundled-test-harness/assets/base64-image-CjWpxROT.js +0 -2
- package/bundled-test-harness/assets/big-integer-BBql7oGZ.js +0 -89
- package/bundled-test-harness/assets/big-integer-B_TrzRy_.js +0 -2
- package/bundled-test-harness/assets/binary-upload-dedupe-test-BiX8kS7D.js +0 -308
- package/bundled-test-harness/assets/boolean-9LNUUTfw.js +0 -2
- package/bundled-test-harness/assets/boolean-BAmK01TF.js +0 -94
- package/bundled-test-harness/assets/brand-functional-palette-CFuoS-LS.js +0 -137
- package/bundled-test-harness/assets/brand-logo-By89eknI.js +0 -295
- package/bundled-test-harness/assets/broken-link-template-test-odBriDSP.js +0 -192
- package/bundled-test-harness/assets/bundled-base-CLQkkmN4.js +0 -254
- package/bundled-test-harness/assets/bundled-base-modules-test-BYrTaTwa.js +0 -54
- package/bundled-test-harness/assets/buried-stack-item-scroll-test-DU4bM5nd.js +0 -236
- package/bundled-test-harness/assets/bxl-expression-test-Cs9JaZbC.js +0 -250
- package/bundled-test-harness/assets/can-invoke-test-ccMc06BU.js +0 -401
- package/bundled-test-harness/assets/card-api-Bn65NUT0.js +0 -8
- package/bundled-test-harness/assets/card-api-test-COrFXu2i.js +0 -198
- package/bundled-test-harness/assets/card-api-u1pOrwS6.js +0 -4393
- package/bundled-test-harness/assets/card-basics-test-D4rn3iN-.js +0 -5364
- package/bundled-test-harness/assets/card-chooser-paging-test-bZhdrUXt.js +0 -235
- package/bundled-test-harness/assets/card-chooser-test-D9w1duob.js +0 -393
- package/bundled-test-harness/assets/card-collection-ClCV-__1.js +0 -118
- package/bundled-test-harness/assets/card-context-search-results-H_rN3Upz.js +0 -30
- package/bundled-test-harness/assets/card-context-search-results-test-jciyaouV.js +0 -184
- package/bundled-test-harness/assets/card-def-field-def-relationships-test-BVZoQzM8.js +0 -562
- package/bundled-test-harness/assets/card-delete-test-CuLcZFnY.js +0 -466
- package/bundled-test-harness/assets/card-error-DIOivSkD.js +0 -72
- package/bundled-test-harness/assets/card-error-awaiting-index-test-JMwcRONq.js +0 -53
- package/bundled-test-harness/assets/card-error-detail-96jWBx6B.js +0 -271
- package/bundled-test-harness/assets/card-info-BxPtwG1h.js +0 -2
- package/bundled-test-harness/assets/card-list-B34qY3io.js +0 -2
- package/bundled-test-harness/assets/card-list-BpCaKkZJ.js +0 -202
- package/bundled-test-harness/assets/card-resource-DcPbIwH9.js +0 -86
- package/bundled-test-harness/assets/cards-grid-CTN8nBT_.js +0 -344
- package/bundled-test-harness/assets/cards-grid-Cx44vL-M.js +0 -2
- package/bundled-test-harness/assets/cards-grid-layout-BdL0Uzxl.js +0 -111
- package/bundled-test-harness/assets/cards-grid-layout-Dn8Yb4ma.js +0 -2
- package/bundled-test-harness/assets/check-correctness-test-BfMV-MC0.js +0 -554
- package/bundled-test-harness/assets/clip-CK6mVuyN.js +0 -92
- package/bundled-test-harness/assets/clip-CfXD1JTr.js +0 -2
- package/bundled-test-harness/assets/code-ref-85Bih6Zl.js +0 -138
- package/bundled-test-harness/assets/code-ref-DATHaoyt.js +0 -2
- package/bundled-test-harness/assets/code-submode-availability-test-DLYlx0wo.js +0 -198
- package/bundled-test-harness/assets/code-submode-test-CDIi7MjD.js +0 -1824
- package/bundled-test-harness/assets/codeblocks-test-CNPyTvuv.js +0 -418
- package/bundled-test-harness/assets/codemirror-editor-BPOPTR-f.js +0 -2
- package/bundled-test-harness/assets/codemirror-editor-DPhG0pec.js +0 -701
- package/bundled-test-harness/assets/codemirror-embed-toolbar-test-Dk5lFOUq.js +0 -366
- package/bundled-test-harness/assets/color-BxN5gRSg.js +0 -65
- package/bundled-test-harness/assets/color-CrunRcis.js +0 -2
- package/bundled-test-harness/assets/color-field-test-COjFIpXV.js +0 -212
- package/bundled-test-harness/assets/color-picker-field-C-GS1CIw.js +0 -139
- package/bundled-test-harness/assets/color-picker-field-D3RXhbCK.js +0 -2
- package/bundled-test-harness/assets/color-wheel-picker-Bz8cBmf4.js +0 -283
- package/bundled-test-harness/assets/color-wheel-picker-DrwPrB8B.js +0 -2
- package/bundled-test-harness/assets/command-data-BxXgtNBf.js +0 -2
- package/bundled-test-harness/assets/command-data-ZdkcpEgG.js +0 -95
- package/bundled-test-harness/assets/compaction-test-DS7DTGT_.js +0 -150
- package/bundled-test-harness/assets/components-CbCTWAON.js +0 -17777
- package/bundled-test-harness/assets/computed-test-D_OrXDtR.js +0 -1320
- package/bundled-test-harness/assets/container-DDolu1gk.js +0 -11109
- package/bundled-test-harness/assets/container-DndcCIMv.css +0 -5169
- package/bundled-test-harness/assets/contains-many-component-BtgnAXih.js +0 -2
- package/bundled-test-harness/assets/contrast-checker-addon-kwtLKWdL.js +0 -2
- package/bundled-test-harness/assets/contrast-checker-addon-zFY5cen1.js +0 -71
- package/bundled-test-harness/assets/convert-to-class-name-test-BcGWl2K1.js +0 -17
- package/bundled-test-harness/assets/coordinate-D72EF1Pl.js +0 -48
- package/bundled-test-harness/assets/copy-file-to-realm-test-CYoDX4YV.js +0 -148
- package/bundled-test-harness/assets/country-B-iIe5v8.js +0 -199
- package/bundled-test-harness/assets/create-file-modal-PpvMksjR.js +0 -570
- package/bundled-test-harness/assets/create-listing-modal-test-CQtEf_UD.js +0 -273
- package/bundled-test-harness/assets/create-listing-pr-request-test-CDtKWyfk.js +0 -117
- package/bundled-test-harness/assets/create-spec-test-Cbqk8I9T.js +0 -256
- package/bundled-test-harness/assets/create-specs-CZg2cpnh.js +0 -215
- package/bundled-test-harness/assets/create-submission-workflow-test-CYrxF7bg.js +0 -132
- package/bundled-test-harness/assets/credential-fields-test-Di4jCJgU.js +0 -157
- package/bundled-test-harness/assets/css-value-CceJyI5o.js +0 -48
- package/bundled-test-harness/assets/csv-file-def-DJL2aZI9.js +0 -277
- package/bundled-test-harness/assets/currency-Bn5WIqzF.js +0 -134
- package/bundled-test-harness/assets/date-XI2CVYA2.js +0 -2
- package/bundled-test-harness/assets/date-h83UJcFR.js +0 -183
- package/bundled-test-harness/assets/date-time-fields-test-Cterr2mj.js +0 -359
- package/bundled-test-harness/assets/datetime-DadI80tC.js +0 -201
- package/bundled-test-harness/assets/datetime-Dpb_Sejj.js +0 -2
- package/bundled-test-harness/assets/datetime-stamp-C4vv397u.js +0 -81
- package/bundled-test-harness/assets/datetime-stamp-DIsJdQux.js +0 -2
- package/bundled-test-harness/assets/day-C4pZoGNM.js +0 -113
- package/bundled-test-harness/assets/day-D0goBhKb.js +0 -2
- package/bundled-test-harness/assets/debug-message-test-CV0sj-fl.js +0 -117
- package/bundled-test-harness/assets/dist-CAIttNZm.js +0 -1710
- package/bundled-test-harness/assets/dist-CLbqnmnm.js +0 -389
- package/bundled-test-harness/assets/dist-qkBOmIQy.js +0 -323
- package/bundled-test-harness/assets/docx-file-def-hz2tVQKf.js +0 -60
- package/bundled-test-harness/assets/docx-meta-extractor-CeRshlxL.js +0 -60
- package/bundled-test-harness/assets/docx-meta-extractor-muK5CKF3.js +0 -2
- package/bundled-test-harness/assets/duration-BYx1dLfm.js +0 -2
- package/bundled-test-harness/assets/duration-FAmTFeUa.js +0 -184
- package/bundled-test-harness/assets/email-D-bFy_C1.js +0 -80
- package/bundled-test-harness/assets/email-field-test-CY9K2zur.js +0 -75
- package/bundled-test-harness/assets/email-j4DZNH2-.js +0 -2
- package/bundled-test-harness/assets/enum-B7_baAn_.js +0 -167
- package/bundled-test-harness/assets/enum-BQqNzVQS.js +0 -2
- package/bundled-test-harness/assets/enum-field-test-BJ9Epz15.js +0 -953
- package/bundled-test-harness/assets/error-display-test-CbDWjJ2F.js +0 -343
- package/bundled-test-harness/assets/ethereum-address-BOLEnKsm.js +0 -78
- package/bundled-test-harness/assets/ethereum-address-s3Kvb2wG.js +0 -2
- package/bundled-test-harness/assets/expiration-warning-BaIP1MOZ.js +0 -2
- package/bundled-test-harness/assets/expiration-warning-gjEtxPk0.js +0 -90
- package/bundled-test-harness/assets/externals-Bih8ejPS.js +0 -4393
- package/bundled-test-harness/assets/fallback-banner-MlImHjSD.js +0 -24
- package/bundled-test-harness/assets/fallback-banner-live-delete-test-Bm7IKXPf.js +0 -207
- package/bundled-test-harness/assets/fallback-banner-test-C7TGA0Ob.js +0 -53
- package/bundled-test-harness/assets/fallback-banner-test-lvuaVRXu.js +0 -225
- package/bundled-test-harness/assets/fallback-models-test-Dy7iIKUS.js +0 -161
- package/bundled-test-harness/assets/field-component-DBoOxTke.js +0 -2
- package/bundled-test-harness/assets/field-configuration-test-DnAnzyC-.js +0 -548
- package/bundled-test-harness/assets/field-edit-DdJ8Akso.js +0 -2
- package/bundled-test-harness/assets/field-edit-XAop92l8.js +0 -36
- package/bundled-test-harness/assets/field-markdown-domain-test-cZCqbcjj.js +0 -616
- package/bundled-test-harness/assets/field-markdown-oversize-test-BuATetVz.js +0 -88
- package/bundled-test-harness/assets/field-markdown-primitives-test-BsubQfhv.js +0 -365
- package/bundled-test-harness/assets/field-markdown-specialized-test-4eNLiYpF.js +0 -534
- package/bundled-test-harness/assets/field-test-helpers-9I7cHnaU.js +0 -45
- package/bundled-test-harness/assets/file-api-CC86I7Er.js +0 -7
- package/bundled-test-harness/assets/file-attachment-test-o9191GMb.js +0 -796
- package/bundled-test-harness/assets/file-chooser-panel-test-C8aZuJlk.js +0 -153
- package/bundled-test-harness/assets/file-chooser-test-B0Tn8CCR.js +0 -504
- package/bundled-test-harness/assets/file-def-edit-BSiF2Lje.js +0 -2
- package/bundled-test-harness/assets/file-def-edit-C5TYBp_q.js +0 -26
- package/bundled-test-harness/assets/file-def-embedded-BLVTCiVB.js +0 -2
- package/bundled-test-harness/assets/file-def-embedded-Bep4iD6s.js +0 -38
- package/bundled-test-harness/assets/file-def-fitted-BTs-AS78.js +0 -2
- package/bundled-test-harness/assets/file-def-fitted-DcPitdYu.js +0 -38
- package/bundled-test-harness/assets/file-def-isolated-Kg1YVhm-.js +0 -38
- package/bundled-test-harness/assets/file-def-isolated-tK5JWCam.js +0 -2
- package/bundled-test-harness/assets/file-def-serialization-test-D4wnd5XK.js +0 -89
- package/bundled-test-harness/assets/file-menu-items-CH4-naSK.js +0 -117
- package/bundled-test-harness/assets/file-menu-items-emUxx3ZI.js +0 -2
- package/bundled-test-harness/assets/file-preview-stage-B1McIWwu.js +0 -2
- package/bundled-test-harness/assets/file-preview-stage-BgZLNMN4.js +0 -72
- package/bundled-test-harness/assets/file-shell-embedded-BmfuwWfU.js +0 -2
- package/bundled-test-harness/assets/file-shell-embedded-zh8CJanA.js +0 -68
- package/bundled-test-harness/assets/file-shell-fitted-DSFUNRGJ.js +0 -2
- package/bundled-test-harness/assets/file-shell-fitted-DXKDH0fn.js +0 -98
- package/bundled-test-harness/assets/file-shell-isolated-0F1MFv4q.js +0 -2
- package/bundled-test-harness/assets/file-shell-isolated-DduZZzmi.js +0 -195
- package/bundled-test-harness/assets/file-tree-from-index-BzDvvUHy.js +0 -151
- package/bundled-test-harness/assets/file-tree-from-index-test-D0hfI4a1.js +0 -96
- package/bundled-test-harness/assets/film-BN_HVXBU.js +0 -13
- package/bundled-test-harness/assets/film-CKkbUi0L.js +0 -2
- package/bundled-test-harness/assets/film-CMNJITZ-.js +0 -4074
- package/bundled-test-harness/assets/fitted-CAvdcKpu.js +0 -34
- package/bundled-test-harness/assets/fitted-CbKOwd1u.js +0 -2
- package/bundled-test-harness/assets/flac-meta-extractor-e8qajPSl.js +0 -99
- package/bundled-test-harness/assets/font-file-def-9atde5W8.js +0 -64
- package/bundled-test-harness/assets/font-meta-extractor-IralDC8M.js +0 -303
- package/bundled-test-harness/assets/font-meta-extractor-zPBVOfoR.js +0 -2
- package/bundled-test-harness/assets/formatted-aibot-message-test-CWOiZUng.js +0 -109
- package/bundled-test-harness/assets/from-elsewhere-ChxbtsBa.js +0 -131
- package/bundled-test-harness/assets/frontmatter-field-cdig7KR9.js +0 -41
- package/bundled-test-harness/assets/garbage-collection-test-Dg-ww_Sb.js +0 -403
- package/bundled-test-harness/assets/gauge-B45nLOGe.js +0 -106
- package/bundled-test-harness/assets/gauge-BK-768BM.js +0 -2
- package/bundled-test-harness/assets/general-test-D7cn7PUr.js +0 -926
- package/bundled-test-harness/assets/get-relationship-membership-state-test-Skmj9V6y.js +0 -1308
- package/bundled-test-harness/assets/gif-meta-extractor-BychhK9q.js +0 -114
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-in-cards-test-C09YUmk4.js +0 -160
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-test-DYskx_Kk.js +0 -74
- package/bundled-test-harness/assets/helper-BHX0HLF2.js +0 -478
- package/bundled-test-harness/assets/host-submode-test-Clw_QnvF.js +0 -1243
- package/bundled-test-harness/assets/html-file-def-C0P9giwU.js +0 -82
- package/bundled-test-harness/assets/hydratable-card-DnjrxKsT.js +0 -147
- package/bundled-test-harness/assets/hydratable-card-test-BAmWHfv1.js +0 -426
- package/bundled-test-harness/assets/icons-DBXBZgLe.js +0 -894
- package/bundled-test-harness/assets/image-Cip6ojDd.js +0 -47
- package/bundled-test-harness/assets/image-file-def-BdQxjZcN.js +0 -65
- package/bundled-test-harness/assets/image-file-def-DP4aqWcS.js +0 -3
- package/bundled-test-harness/assets/index-changes-test-D8b_56Ke.js +0 -367
- package/bundled-test-harness/assets/index-query-engine-test-CCyaUwMX.js +0 -2593
- package/bundled-test-harness/assets/inspector-test-BJTVGdOO.js +0 -1930
- package/bundled-test-harness/assets/instance-filter-matcher-test-DjsPrXL7.js +0 -788
- package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-DSqM0vxh.js +0 -475
- package/bundled-test-harness/assets/interact-submode-setup-DF31UMX-.js +0 -566
- package/bundled-test-harness/assets/is-component-declaration-test-Did47eG9.js +0 -50
- package/bundled-test-harness/assets/iso-bmff-LuWkGL__.js +0 -205
- package/bundled-test-harness/assets/iso-bmff-_flO6c20.js +0 -2
- package/bundled-test-harness/assets/isolated-and-edit-frocLHin.js +0 -2
- package/bundled-test-harness/assets/job-priority-header-test-DHLAXfp7.js +0 -81
- package/bundled-test-harness/assets/job-scoped-instance-residency-test-C1Bt5j98.js +0 -103
- package/bundled-test-harness/assets/join-the-community-BBUSO2cs.js +0 -86
- package/bundled-test-harness/assets/jpg-meta-extractor-CoybO4Hq.js +0 -88
- package/bundled-test-harness/assets/json-field-8sdH5RQb.js +0 -2
- package/bundled-test-harness/assets/json-field-BDD3iTUh.js +0 -19
- package/bundled-test-harness/assets/json-file-def-BKibsfc6.js +0 -298
- package/bundled-test-harness/assets/last-modified-date-CR5jru2m.js +0 -43
- package/bundled-test-harness/assets/last-modified-date-test-jJ00YdTm.js +0 -28
- package/bundled-test-harness/assets/links-to-editor-rDoCYaN-.js +0 -2
- package/bundled-test-harness/assets/links-to-many-component-BqZT88Fb.js +0 -2
- package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-Cp1Eb_4U.js +0 -398
- package/bundled-test-harness/assets/linksto-error-sentinel-test-Bddavnh_.js +0 -238
- package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-c5WegXnR.js +0 -354
- package/bundled-test-harness/assets/linksto-many-per-slot-access-test-CWskzfGW.js +0 -303
- package/bundled-test-harness/assets/linksto-sentinel-reload-test-ByeVNhr8.js +0 -197
- package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-DP26i6Gb.js +0 -260
- package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-fDUXx8tO.js +0 -196
- package/bundled-test-harness/assets/llm-model-BcLEkTV7.js +0 -64
- package/bundled-test-harness/assets/login-CeuuNVvU.css +0 -139
- package/bundled-test-harness/assets/login-DV0WlJv-.js +0 -348
- package/bundled-test-harness/assets/login-error-text-test-BMGY_9gW.js +0 -51
- package/bundled-test-harness/assets/login-test-CL9YpMH5.js +0 -246
- package/bundled-test-harness/assets/m4a-meta-extractor-CHO1JQtb.js +0 -204
- package/bundled-test-harness/assets/main-CPLT8JNu.js +0 -5
- package/bundled-test-harness/assets/markdown-BvBALLGh.js +0 -7
- package/bundled-test-harness/assets/markdown-DFezmrFD.js +0 -2
- package/bundled-test-harness/assets/markdown-editor-mode-select-Au64bcIO.js +0 -2
- package/bundled-test-harness/assets/markdown-editor-mode-select-rK9PP8rv.js +0 -54
- package/bundled-test-harness/assets/markdown-embed-chooser-modal-test-CIxizf5k.js +0 -470
- package/bundled-test-harness/assets/markdown-embed-preview-pane-test-C7GoNN7l.js +0 -447
- package/bundled-test-harness/assets/markdown-embed-preview-test-CDnj4uhd.js +0 -368
- package/bundled-test-harness/assets/markdown-fallback-n7PsLNmO.js +0 -2
- package/bundled-test-harness/assets/markdown-fallback-test-DTHT6OwQ.js +0 -316
- package/bundled-test-harness/assets/markdown-highlighting-test-DJ-4WSE_.js +0 -244
- package/bundled-test-harness/assets/markdown-preview-Ccelx5W-.js +0 -64
- package/bundled-test-harness/assets/markdown-preview-JXuMC_ve.js +0 -72
- package/bundled-test-harness/assets/markdown-preview-test-ByZqrpPk.js +0 -238
- package/bundled-test-harness/assets/markdown-skill-frontmatter-test-DAHGeL4K.js +0 -146
- package/bundled-test-harness/assets/menu-items-DzJm9H_H.js +0 -2
- package/bundled-test-harness/assets/message-tool-test-lmdrIEdY.js +0 -33
- package/bundled-test-harness/assets/metadata-fields-BZZr4Qe5.js +0 -2
- package/bundled-test-harness/assets/metadata-fields-BtdjGsKE.js +0 -1415
- package/bundled-test-harness/assets/midi-audio-def-uYbYFmFi.js +0 -52
- package/bundled-test-harness/assets/midi-meta-extractor-DNI5gc1q.js +0 -284
- package/bundled-test-harness/assets/midi-meta-extractor-DbKZ4fMG.js +0 -2
- package/bundled-test-harness/assets/migrate-skill-test-DI1xceiL.js +0 -161
- package/bundled-test-harness/assets/mini-CNoDyHqG.js +0 -1519
- package/bundled-test-harness/assets/mini-DexlIeKK.js +0 -85
- package/bundled-test-harness/assets/mini-card-chooser-test-DT5eIf1_.js +0 -272
- package/bundled-test-harness/assets/mini-file-chooser-test-DTQnKTZJ.js +0 -201
- package/bundled-test-harness/assets/missing-template-DL2mwddM.js +0 -2
- package/bundled-test-harness/assets/missing-template-ltqlJ4JC.js +0 -48
- package/bundled-test-harness/assets/modal-container-DRnt95-S.js +0 -40
- package/bundled-test-harness/assets/modal-zE95eEFp.js +0 -322
- package/bundled-test-harness/assets/model-cost-tier-test-CcFz7hcv.js +0 -173
- package/bundled-test-harness/assets/module-contents-service-Dk_zWt-V.js +0 -256
- package/bundled-test-harness/assets/month-BqReBYWo.js +0 -2
- package/bundled-test-harness/assets/month-RhvmIp40.js +0 -123
- package/bundled-test-harness/assets/month-day-XFAQA72z.js +0 -2
- package/bundled-test-harness/assets/month-day-XzKpk6nz.js +0 -192
- package/bundled-test-harness/assets/month-year-BeuNr2Cl.js +0 -2
- package/bundled-test-harness/assets/month-year-DhU7hATV.js +0 -93
- package/bundled-test-harness/assets/mp3-meta-extractor-Dx2RnJc5.js +0 -476
- package/bundled-test-harness/assets/mp4-meta-extractor--k0m8KsT.js +0 -188
- package/bundled-test-harness/assets/multiple-stacks-test-bC24IWcJ.js +0 -208
- package/bundled-test-harness/assets/nested-query-field-render-test-qxElXx1e.js +0 -249
- package/bundled-test-harness/assets/no-stacks-test-Br7IGAgV.js +0 -48
- package/bundled-test-harness/assets/number-73SsCMEF.js +0 -3
- package/bundled-test-harness/assets/number-CicTBWQd.js +0 -151
- package/bundled-test-harness/assets/number-field-test-kV5zXo1J.js +0 -184
- package/bundled-test-harness/assets/number-input-CQy4xUeA.js +0 -82
- package/bundled-test-harness/assets/office-extract-Bo8sbNkK.js +0 -27
- package/bundled-test-harness/assets/office-extract-CfBaoRMD.js +0 -2
- package/bundled-test-harness/assets/ogg-meta-extractor-aIf5q_Rq.js +0 -225
- package/bundled-test-harness/assets/on-key-C8acaldQ.js +0 -472
- package/bundled-test-harness/assets/ooxml-Bu3iZezv.js +0 -172
- package/bundled-test-harness/assets/ooxml-jQPBQK25.js +0 -2
- package/bundled-test-harness/assets/open-image-in-new-tab-test-CP7q3kMm.js +0 -52
- package/bundled-test-harness/assets/operation-lowering-test-9Mdr0hRT.js +0 -2812
- package/bundled-test-harness/assets/operations-R9b661Qn.js +0 -3
- package/bundled-test-harness/assets/operations-Zv_V3Api.js +0 -766
- package/bundled-test-harness/assets/operations-invocation-test-BJPpWb2H.js +0 -523
- package/bundled-test-harness/assets/operations-query-test-DufdmPQF.js +0 -459
- package/bundled-test-harness/assets/operations-test-CzT051YH.js +0 -2518
- package/bundled-test-harness/assets/operator-mode-acceptance-test-ByOIOcD0.js +0 -1188
- package/bundled-test-harness/assets/operator-mode-card-chooser-test-CNhR9mvv.js +0 -1036
- package/bundled-test-harness/assets/operator-mode-links-test-CuxSVTPR.js +0 -793
- package/bundled-test-harness/assets/operator-mode-state-service-CCeHt5SH.js +0 -1275
- package/bundled-test-harness/assets/operator-mode-state-service-test-C8TI9WWg.js +0 -206
- package/bundled-test-harness/assets/operator-mode-test-DG-mG8Tn.js +0 -683
- package/bundled-test-harness/assets/operator-mode-ui-test-DB7xhjS0.js +0 -1027
- package/bundled-test-harness/assets/overlay-menu-items-test-C6rcdF_S.js +0 -317
- package/bundled-test-harness/assets/overlays-D2zmPxzK.js +0 -270
- package/bundled-test-harness/assets/overlays-clip-test-Clpq3JzQ.js +0 -91
- package/bundled-test-harness/assets/overlays-detached-element-test-BtsTeJch.js +0 -56
- package/bundled-test-harness/assets/pane-f-IYhcWT.js +0 -330
- package/bundled-test-harness/assets/panel-B3PCSBbf.js +0 -3540
- package/bundled-test-harness/assets/panel-Ban7zCBP.js +0 -474
- package/bundled-test-harness/assets/past-sessions-test-uM2m-oKV.js +0 -321
- package/bundled-test-harness/assets/patch-fields-test-COPjDhnt.js +0 -1014
- package/bundled-test-harness/assets/patch-instance-test-CRb3dfby.js +0 -348
- package/bundled-test-harness/assets/pdf-file-def-J_yOUU8_.js +0 -76
- package/bundled-test-harness/assets/pdf-meta-extractor-83T5Bdo7.js +0 -156
- package/bundled-test-harness/assets/pdf-meta-extractor-INFIklMy.js +0 -2
- package/bundled-test-harness/assets/pdf-viewer-B4rRluWA.js +0 -2
- package/bundled-test-harness/assets/pdf-viewer-vYem8ozk.js +0 -112
- package/bundled-test-harness/assets/percentage-ChagfNRG.js +0 -84
- package/bundled-test-harness/assets/permission-checking-realm-test-Dmb2a428.js +0 -306
- package/bundled-test-harness/assets/phone-number-BiD2eaSd.js +0 -236
- package/bundled-test-harness/assets/phone-number-C-wt4_UK.js +0 -2
- package/bundled-test-harness/assets/phone-number-field-test-BHzAmuBP.js +0 -73
- package/bundled-test-harness/assets/plate-CqN2nM6P.js +0 -41
- package/bundled-test-harness/assets/plate-DaIfpORN.js +0 -2
- package/bundled-test-harness/assets/player-CGt5fTd5.js +0 -2
- package/bundled-test-harness/assets/player-CN0l44LK.js +0 -82
- package/bundled-test-harness/assets/plural-field-components-test-CO2g2opW.js +0 -198
- package/bundled-test-harness/assets/png-image-def-B_oou2wS.js +0 -48
- package/bundled-test-harness/assets/png-meta-extractor-BfPz1qP_.js +0 -2
- package/bundled-test-harness/assets/png-meta-extractor-C8ai8sPw.js +0 -111
- package/bundled-test-harness/assets/policy-scoped-search-test-BRRp2a1A.js +0 -339
- package/bundled-test-harness/assets/pptx-file-def-C3qYEHDM.js +0 -60
- package/bundled-test-harness/assets/pptx-meta-extractor-8IuoBq4I.js +0 -77
- package/bundled-test-harness/assets/pptx-meta-extractor-BPhy9RMM.js +0 -2
- package/bundled-test-harness/assets/prerender-persistence-block-test-Cteb_Rs_.js +0 -124
- package/bundled-test-harness/assets/prerender-serialize-cycle-test-CH7b6Ra9.js +0 -134
- package/bundled-test-harness/assets/preview-CmERZpI6.js +0 -74
- package/bundled-test-harness/assets/preview-format-BPMlCSbb.js +0 -41
- package/bundled-test-harness/assets/preview-format-test-B7sA8fbZ.js +0 -103
- package/bundled-test-harness/assets/process-card-CtDzDB-_.js +0 -2
- package/bundled-test-harness/assets/process-card-erbWKY5h.js +0 -114
- package/bundled-test-harness/assets/process-card-test-DXOt1jDW.js +0 -94
- package/bundled-test-harness/assets/profile-settings-modal-11BrR058.js +0 -708
- package/bundled-test-harness/assets/progress-circle-Cd79Zqh2.js +0 -2
- package/bundled-test-harness/assets/progress-circle-sc-W5aUl.js +0 -95
- package/bundled-test-harness/assets/quarter-B61kCpcD.js +0 -168
- package/bundled-test-harness/assets/quarter-d5jkTzcz.js +0 -2
- package/bundled-test-harness/assets/query-field-membership-status-test-BmpVfohw.js +0 -323
- package/bundled-test-harness/assets/query-field-page-optin-test-9_Cce-OJ.js +0 -126
- package/bundled-test-harness/assets/query-field-schema-test-CwV7xanX.js +0 -231
- package/bundled-test-harness/assets/query-field-stale-prerender-test-RkdnZ-VV.js +0 -152
- package/bundled-test-harness/assets/query-fields-test-BLxYkTAM.js +0 -535
- package/bundled-test-harness/assets/rail-CFPU0tFe.js +0 -2
- package/bundled-test-harness/assets/rail-CQ53Dakr.js +0 -44
- package/bundled-test-harness/assets/realm-DdVH9lSZ.js +0 -95
- package/bundled-test-harness/assets/realm-DdsFw3b-.js +0 -2
- package/bundled-test-harness/assets/realm-config-DIslxoB7.js +0 -844
- package/bundled-test-harness/assets/realm-config-policy-standing-test-b4WxNDor.js +0 -290
- package/bundled-test-harness/assets/realm-config-routing-rule-edit-test-C-rcvkkD.js +0 -274
- package/bundled-test-harness/assets/realm-config-settings-test-DDUkM3zw.js +0 -187
- package/bundled-test-harness/assets/realm-dropdown-1j55Dy-1.js +0 -560
- package/bundled-test-harness/assets/realm-field-test-D-uEtFKO.js +0 -100
- package/bundled-test-harness/assets/realm-indexing-test-U9m0epR-.js +0 -4380
- package/bundled-test-harness/assets/realm-policy-test-DhKabhlk.js +0 -1141
- package/bundled-test-harness/assets/realm-test-BX6C9SS5.js +0 -2363
- package/bundled-test-harness/assets/realm-url-tooltip-BjjcKqBx.js +0 -56
- package/bundled-test-harness/assets/realm-url-tooltip-test-DW0ZwEEE.js +0 -78
- package/bundled-test-harness/assets/reasoning-test-BWT94KXG.js +0 -234
- package/bundled-test-harness/assets/recent-colors-addon-CfgmgilF.js +0 -61
- package/bundled-test-harness/assets/recent-colors-addon-D--Ry3Pf.js +0 -2
- package/bundled-test-harness/assets/relationship-loading-state-test-C5R6jao_.js +0 -290
- package/bundled-test-harness/assets/relative-time-Bq7pqums.js +0 -2
- package/bundled-test-harness/assets/relative-time-D0QyW4ig.js +0 -129
- package/bundled-test-harness/assets/remix-card-test-Cy0h3Xdf.js +0 -58
- package/bundled-test-harness/assets/rendered-markdown-Hw_EF8SO.js +0 -263
- package/bundled-test-harness/assets/rendered-markdown-test-CqeF-UZd.js +0 -587
- package/bundled-test-harness/assets/resident-instance-reuse-test-BiI6L40n.js +0 -82
- package/bundled-test-harness/assets/response-field-BCxG5phG.js +0 -38
- package/bundled-test-harness/assets/result-tile-DMzRnTP8.js +0 -140
- package/bundled-test-harness/assets/rich-markdown-C4RUl7L0.js +0 -2
- package/bundled-test-harness/assets/rich-markdown-DxQSCg-o.js +0 -218
- package/bundled-test-harness/assets/rich-markdown-field-test-B7wpedKs.js +0 -1647
- package/bundled-test-harness/assets/room-D0M0Zwrs.js +0 -1008
- package/bundled-test-harness/assets/room-message-test-BWWd4xC8.js +0 -445
- package/bundled-test-harness/assets/room-test-DFH-nOwi.js +0 -95
- package/bundled-test-harness/assets/run-realm-code-DyVyEDBl.js +0 -1600
- package/bundled-test-harness/assets/run-realm-code-test-BpxF-tOz.js +0 -2468
- package/bundled-test-harness/assets/schema-generation-test-DjaJqpYP.js +0 -28
- package/bundled-test-harness/assets/score-Cfp34BE7.js +0 -2
- package/bundled-test-harness/assets/score-DIWWpeyf.js +0 -100
- package/bundled-test-harness/assets/scrolling-test-hA_uBwBg.js +0 -384
- package/bundled-test-harness/assets/search-C0-b7dJI.js +0 -605
- package/bundled-test-harness/assets/search-adorn-test-C6KP3AwA.js +0 -136
- package/bundled-test-harness/assets/search-entries-BfPq5sPS.js +0 -472
- package/bundled-test-harness/assets/search-entries-result-test-Bl9u_BOD.js +0 -234
- package/bundled-test-harness/assets/search-entries-test-BDC_lS43.js +0 -1486
- package/bundled-test-harness/assets/search-result-header-DCAze_cg.js +0 -128
- package/bundled-test-harness/assets/search-results-Dd0enVun.js +0 -266
- package/bundled-test-harness/assets/search-results-test-T5KEEII4.js +0 -578
- package/bundled-test-harness/assets/search-selection-menu-test-CCssnBq1.js +0 -108
- package/bundled-test-harness/assets/search-sheet-persistence-test-BzQiO-FK.js +0 -131
- package/bundled-test-harness/assets/search-test-fyCWb24m.js +0 -2241
- package/bundled-test-harness/assets/searchable-BkgeKQMl.js +0 -2
- package/bundled-test-harness/assets/searchable-D_6p6fyb.js +0 -192
- package/bundled-test-harness/assets/searchable-option-test-CnCUYGaq.js +0 -322
- package/bundled-test-harness/assets/searchable-search-doc-test-B8Q0D98v.js +0 -1271
- package/bundled-test-harness/assets/sending-test-D5PGBDys.js +0 -576
- package/bundled-test-harness/assets/serialization-rri-form-audit-test-BRJ1cJ31.js +0 -136
- package/bundled-test-harness/assets/serialization-test-DM6hK258.js +0 -8758
- package/bundled-test-harness/assets/setup-C_GgVgzM.js +0 -772
- package/bundled-test-harness/assets/shared-link-target-reuse-test-Be-lSKib.js +0 -207
- package/bundled-test-harness/assets/show-card-BFG6KR1m.js +0 -67
- package/bundled-test-harness/assets/show-card-test-l0wMrfZq.js +0 -365
- package/bundled-test-harness/assets/show-file-B8-FRVHj.js +0 -34
- package/bundled-test-harness/assets/signed-capture-D_Q44TQ7.js +0 -204
- package/bundled-test-harness/assets/signed-capture-link-test-DOS5xpYv.js +0 -132
- package/bundled-test-harness/assets/single-stack-test-BIEtzHVS.js +0 -652
- package/bundled-test-harness/assets/skill-BUTGmSsm.js +0 -76
- package/bundled-test-harness/assets/skill-Bo7R_2Ud.js +0 -3
- package/bundled-test-harness/assets/skill-reference-Cs64py3k.js +0 -112
- package/bundled-test-harness/assets/skills-test-CXxSIkYa.js +0 -648
- package/bundled-test-harness/assets/slider-picker-C81errGI.js +0 -245
- package/bundled-test-harness/assets/slider-picker-mvKsy6cR.js +0 -2
- package/bundled-test-harness/assets/spec-B55lJurX.js +0 -602
- package/bundled-test-harness/assets/store-DyQ0KiyI.js +0 -2205
- package/bundled-test-harness/assets/store-module-rebuild-test-C7532_bS.js +0 -454
- package/bundled-test-harness/assets/store-search-test-80NMJuoW.js +0 -175
- package/bundled-test-harness/assets/store-test-dHiWXXMs.js +0 -3460
- package/bundled-test-harness/assets/string-DHlQEHYm.js +0 -9
- package/bundled-test-harness/assets/submode-switcher-DQv-CD6G.js +0 -169
- package/bundled-test-harness/assets/svg-meta-extractor-Uw_EJytF.js +0 -42
- package/bundled-test-harness/assets/swatches-picker-CaEoibN1.js +0 -33
- package/bundled-test-harness/assets/swatches-picker-gPl50JbP.js +0 -2
- package/bundled-test-harness/assets/switch-submode-BKDnJd4m.js +0 -79
- package/bundled-test-harness/assets/switch-submode-test-_E2mVk4z.js +0 -168
- package/bundled-test-harness/assets/tag-B60lDr-j.js +0 -105
- package/bundled-test-harness/assets/tests-BBBgPBB6.js +0 -3520
- package/bundled-test-harness/assets/text-area-CJjWmwpi.js +0 -9
- package/bundled-test-harness/assets/text-file-def-u_dl0i2z.js +0 -151
- package/bundled-test-harness/assets/text-input-validator-test-BTwnkSS2.js +0 -156
- package/bundled-test-harness/assets/theme-BK-fAHVn.js +0 -9
- package/bundled-test-harness/assets/theme-card-test-BQmT7rqr.js +0 -621
- package/bundled-test-harness/assets/theme-scheme-island-test-Oi3aeyp1.js +0 -264
- package/bundled-test-harness/assets/three-d-model-def-B4KckPVC.js +0 -70
- package/bundled-test-harness/assets/time-BcuaSkHg.js +0 -126
- package/bundled-test-harness/assets/time-f7Irg7Z7.js +0 -2
- package/bundled-test-harness/assets/time-slots-ClYIZN53.js +0 -2
- package/bundled-test-harness/assets/time-slots-TI1aaqRN.js +0 -85
- package/bundled-test-harness/assets/timeline-Cof9eyq0.js +0 -59
- package/bundled-test-harness/assets/timeline-DFWQtCWE.js +0 -2
- package/bundled-test-harness/assets/to-device-streaming-test-BDrUUlOt.js +0 -163
- package/bundled-test-harness/assets/token-usage-test-CiZo03fY.js +0 -166
- package/bundled-test-harness/assets/tool-field-BXHr9r0w.js +0 -94
- package/bundled-test-harness/assets/tool-field-CoRO5C4R.js +0 -2
- package/bundled-test-harness/assets/tools-CmVaYDIS.js +0 -725
- package/bundled-test-harness/assets/tools-calling-test-B454__XF.js +0 -200
- package/bundled-test-harness/assets/tools-test-CLu51dJO.js +0 -1624
- package/bundled-test-harness/assets/tools-test-XGRAvVug.js +0 -2820
- package/bundled-test-harness/assets/ts-file-def-C05BDwdg.js +0 -159
- package/bundled-test-harness/assets/update-room-skills-test-jOvP14JX.js +0 -240
- package/bundled-test-harness/assets/url-BFf2CNo-.js +0 -2
- package/bundled-test-harness/assets/url-CYm-CeXp.js +0 -96
- package/bundled-test-harness/assets/video-file-def-B2UIrOFS.js +0 -76
- package/bundled-test-harness/assets/wav-meta-extractor-BNkv7e2f.js +0 -368
- package/bundled-test-harness/assets/webm-meta-extractor-C933kYyc.js +0 -178
- package/bundled-test-harness/assets/webp-meta-extractor-BLz0z1pZ.js +0 -98
- package/bundled-test-harness/assets/website-BuOMUW1v.js +0 -92
- package/bundled-test-harness/assets/week-Bo0666ji.js +0 -111
- package/bundled-test-harness/assets/week-CaVFA8Vc.js +0 -2
- package/bundled-test-harness/assets/welcome-to-boxel-PWard7GF.js +0 -172
- package/bundled-test-harness/assets/workspace-KXfFTQNV.js +0 -614
- package/bundled-test-harness/assets/workspace-a11y-test-Buwb-rfO.js +0 -197
- package/bundled-test-harness/assets/workspace-behavior-test-CbgFUOOo.js +0 -200
- package/bundled-test-harness/assets/workspace-chooser-BmQvhhrl.js +0 -2248
- package/bundled-test-harness/assets/workspace-chooser-Cu84Gd_E.css +0 -1317
- package/bundled-test-harness/assets/workspace-chooser-catalog-order-test-rcRw6sni.js +0 -36
- package/bundled-test-harness/assets/workspace-chooser-unreachable-notice-test-DUXnBIdY.js +0 -60
- package/bundled-test-harness/assets/workspace-delete-multiple-test-DjRKhZ2g.js +0 -212
- package/bundled-test-harness/assets/workspace-delete-summary-test-CvkLVYyN.js +0 -63
- package/bundled-test-harness/assets/workspace-timestamp-labels-test-AYJT4inv.js +0 -58
- package/bundled-test-harness/assets/xlsx-file-def-DuKdbGrJ.js +0 -60
- package/bundled-test-harness/assets/xlsx-meta-extractor-Bz-C2JWP.js +0 -101
- package/bundled-test-harness/assets/xlsx-meta-extractor-ClwwgABg.js +0 -2
- package/bundled-test-harness/assets/year-B6ctHikl.js +0 -2
- package/bundled-test-harness/assets/year-C11uAQE6.js +0 -78
- package/bundled-test-harness/assets/zip-file-def-B8XN-OS_.js +0 -288
- package/bundled-types/host-app/components/matrix/auth-button.gts +0 -39
- package/bundled-types/host-app/components/matrix/auth-container.gts +0 -69
- package/bundled-types/host-app/components/matrix/auth-form-field.gts +0 -43
|
@@ -1,3540 +0,0 @@
|
|
|
1
|
-
import { i as __name, r as __exportAll, s as __toESM } from "./chunk-Rp0pCe6z.js";
|
|
2
|
-
import { n as decorateMethodV2, r as initializeDeferredDecorator, t as decorateFieldV2 } from "./runtime--fcdnjmJ-BoCBNIsz.js";
|
|
3
|
-
import { J as cardTypeIcon, Po as isCardInstance, a as chooseCard, b as require_pluralize, bc as stringifyErrorForLog, cc as inferContentType, cn as isSameDay, en as isSameYear, fc as formattedError, fr as LOCAL_SOURCE_URL_PREFIX, hc as isCardErrorJSONAPI, ka as resolveFileDefCodeRef, l as hasExecutableExtension, o as chooseFile, on as format, q as cardTypeDisplayName, rn as formatISO, u as internalKeyFor, uo as SupportedMimeType } from "./runtime-common-ClpqhbwG.js";
|
|
4
|
-
import { s as throttle, v as max } from "./lodash-DnaZ_rzx.js";
|
|
5
|
-
import { C as baseCardRef, E as baseRRI, F as getMenuItems, J as skillCardRef, K as realmURL, L as hasNothingToShow, S as aiBotUsername, T as baseFileRef, V as localId, m as GetCardContextName, p as GetCardCollectionContextName, t as CardContextName } from "./constants-CqKWhRfY.js";
|
|
6
|
-
import { i as v4 } from "./esm-browser-CIYLo70w.js";
|
|
7
|
-
import { t as config } from "./environment-DIUJgBKt.js";
|
|
8
|
-
import { On as isDestroyed, kn as isDestroying, wt as setComponentTemplate } from "./cache-DtDz7X5V-Wn8jRDfL.js";
|
|
9
|
-
import { _t as schedule, d as action, lt as cancel, pt as next, r as service, vt as scheduleOnce } from "./service-LFpJ8EEP.js";
|
|
10
|
-
import { H as templateFactory, S as on, n as Helper } from "./index-DaCZcoCY-CgzbilMy.js";
|
|
11
|
-
import { n as registerDestructor } from "./destroyable-mdLYRn_o.js";
|
|
12
|
-
import { t as isTesting } from "./runtime-9O0mNd7j.js";
|
|
13
|
-
import { n as buildTask } from "./async-arrow-runtime-STsj7E8Y.js";
|
|
14
|
-
import { n as resource, r as use } from "./dist-qkBOmIQy.js";
|
|
15
|
-
import { i as fn, o as hash, t as array } from "./helper-BHX0HLF2.js";
|
|
16
|
-
import { n as Resource } from "./dist-CLbqnmnm.js";
|
|
17
|
-
import { a as TrackedMap, i as TrackedSet, n as TrackedObject } from "./dist-B9tGPKZz.js";
|
|
18
|
-
import "./modifier-D0EP-FQ7.js";
|
|
19
|
-
import { n as Submodes } from "./submode-switcher-DQv-CD6G.js";
|
|
20
|
-
import "./component-BJO47HTh.js";
|
|
21
|
-
import { t as Component } from "./dist-CkA1rgqO.js";
|
|
22
|
-
import { n as tracked, t as cached } from "./tracking-800VJb8b.js";
|
|
23
|
-
import "./template-factory-ds9s0u8l.js";
|
|
24
|
-
import { t as templateOnly } from "./template-only-6nVzLWF-.js";
|
|
25
|
-
import "./helper-DazkUnmP.js";
|
|
26
|
-
import { S as toMenuItems, a as and, c as eq, f as not, it as cn_default, l as gt, o as bool, v as pick, x as menu_item_default, y as MenuItem, z as css_var_default } from "./helpers-BN6ReMzK.js";
|
|
27
|
-
import { $ as CardContainer, B as BoxelInput, D as Header, E as IconComponent$4, J as BoxelDropdown, K as RealmIcon, S as BoxelSelect, U as CardHeader, _ as Modal, b as Switch, dt as Alert, ht as LoadingIndicator, it as DropdownButton, l as Pill, mt as ButtonComponent, nt as Tooltip, pt as IconButton, q as Menu, rt as IconComponent$3, st as IconComponent$2, ut as Avatar } from "./components-CbCTWAON.js";
|
|
28
|
-
import { H as IconComponent$6, J as IconComponent$10, O as IconComponent$5, Q as IconComponent$13, S as IconComponent$12, X as IconComponent$8, _ as IconComponent$7, ct as IconComponent$9, k as IconComponent$11, v as IconComponent$14 } from "./icons-DBXBZgLe.js";
|
|
29
|
-
import { r as modifier, t as ClassBasedModifier } from "./dist-nMt-N14r.js";
|
|
30
|
-
import { t as Velcro } from "./dist-CAIttNZm.js";
|
|
31
|
-
import { i as all, r as timeout } from "./dist-DEVZvbin.js";
|
|
32
|
-
import { t as buildWaiter } from "./dist-CSQ-y1Ft.js";
|
|
33
|
-
import { c as isReady } from "./operator-mode-state-service-CCeHt5SH.js";
|
|
34
|
-
import { r as provide, t as consume } from "./dist-Ble0L9o7.js";
|
|
35
|
-
import { t as CardRenderer } from "./card-renderer-CHJ6q62f.js";
|
|
36
|
-
import { g as isTextBasedContentType, v as modalityLabel, y as requiredModality } from "./file-def-manager-NMzjcl_S.js";
|
|
37
|
-
import { r as isMarkdownSkillId } from "./skill-tools-NZxKP9oK.js";
|
|
38
|
-
import { r as pickableModels, t as modelIdsOf } from "./pickable-models-0K0eyoK_.js";
|
|
39
|
-
import { n as isMatrixError } from "./matrix-utils-xO-g4JGP.js";
|
|
40
|
-
import { t as UpdateRoomSkillsTool } from "./update-room-skills-r535xnMn.js";
|
|
41
|
-
import { l as urlForRealmLookup } from "./utils-DZFRsMFd.js";
|
|
42
|
-
import { n as CodeBlockComponent, r as CodeBlockToolCallHeader, t as FormattedAiBotMessage } from "./aibot-message-DkgHT6eJ.js";
|
|
43
|
-
import { t as ShowCardTool } from "./show-card-BFG6KR1m.js";
|
|
44
|
-
import { t as errorJsonApiToErrorEntry } from "./window-error-handler-DV_GtWRW.js";
|
|
45
|
-
import { t as FileDefAttributesExtractor } from "./file-def-attributes-extractor-B3vn2V7A.js";
|
|
46
|
-
import { n as isAutoExecutableTool } from "./tool-auto-execute-CRfykgrZ.js";
|
|
47
|
-
import { t as modifier$1 } from "./on-key-C8acaldQ.js";
|
|
48
|
-
import { t as IconComponent$15 } from "./arrow-down-ebpf4Skj.js";
|
|
49
|
-
import { t as IconComponent$16 } from "./history-OSRPoD0l.js";
|
|
50
|
-
import { t as RealmURLTooltip } from "./realm-url-tooltip-BjjcKqBx.js";
|
|
51
|
-
import { t as IconComponent$17 } from "./captions-QHDgOGxD.js";
|
|
52
|
-
import { t as IconComponent$18 } from "./file-code-DeOPwoLV.js";
|
|
53
|
-
import { t as perform } from "./perform-g9ba6YNZ.js";
|
|
54
|
-
import { t as _class } from "./to-elsewhere-MFFftJ0J.js";
|
|
55
|
-
import { t as IconComponent$19 } from "./refresh-cw-Cw7W_v15.js";
|
|
56
|
-
import { t as IconComponent$20 } from "./triangle-alert-CqCP_ZLF.js";
|
|
57
|
-
import { t as UserMessage } from "./user-message-CES0BJx1.js";
|
|
58
|
-
import { t as ScrollIntoViewModifier } from "./scroll-into-view-DztRuYLl.js";
|
|
59
|
-
import { t as IconComponent$21 } from "./external-link-DijsVuwZ.js";
|
|
60
|
-
import { n as FallbackBanner } from "./fallback-banner-MlImHjSD.js";
|
|
61
|
-
//#region app/resources/auto-attached-card.ts
|
|
62
|
-
var auto_attached_card_exports = /* @__PURE__ */ __exportAll({
|
|
63
|
-
AutoAttachment: () => AutoAttachment,
|
|
64
|
-
getAutoAttachment: () => getAutoAttachment
|
|
65
|
-
});
|
|
66
|
-
/**
|
|
67
|
-
* Manages the auto-attachment of cards within our stack in consideration of user-actions of manually
|
|
68
|
-
* removing and attaching new cards in the ai panel
|
|
69
|
-
*/
|
|
70
|
-
var AutoAttachment = class extends Resource {
|
|
71
|
-
cardIds = new TrackedSet();
|
|
72
|
-
#hasRegisteredDestructor = false;
|
|
73
|
-
#referenceCounts = /* @__PURE__ */ new Map();
|
|
74
|
-
static {
|
|
75
|
-
decorateFieldV2(this.prototype, "cardService", [service]);
|
|
76
|
-
}
|
|
77
|
-
#cardService = (initializeDeferredDecorator(this, "cardService"), void 0);
|
|
78
|
-
static {
|
|
79
|
-
decorateFieldV2(this.prototype, "store", [service]);
|
|
80
|
-
}
|
|
81
|
-
#store = (initializeDeferredDecorator(this, "store"), void 0);
|
|
82
|
-
modify(_positional, named) {
|
|
83
|
-
const { submode, moduleInspectorPanel, autoAttachedFileUrls, playgroundPanelCardId, activeSpecId, topMostStackItems, attachedCardIds, removedCardIds } = named;
|
|
84
|
-
this.reconcileReferences(this.getCandidateCardIds(submode, moduleInspectorPanel, autoAttachedFileUrls, playgroundPanelCardId, activeSpecId, topMostStackItems, attachedCardIds, removedCardIds));
|
|
85
|
-
this.calculateAutoAttachments.perform(submode, moduleInspectorPanel, autoAttachedFileUrls, playgroundPanelCardId, activeSpecId, topMostStackItems, attachedCardIds, removedCardIds);
|
|
86
|
-
if (!this.#hasRegisteredDestructor) {
|
|
87
|
-
this.#hasRegisteredDestructor = true;
|
|
88
|
-
registerDestructor(this, () => {
|
|
89
|
-
for (let [id, count] of this.#referenceCounts) for (let i = 0; i < count; i++) this.store.dropReference(id);
|
|
90
|
-
this.#referenceCounts.clear();
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
calculateAutoAttachments = buildTask(() => ({
|
|
95
|
-
context: this,
|
|
96
|
-
generator: function* (submode, moduleInspectorPanel, autoAttachedFileUrls, playgroundPanelCardId, activeSpecId, topMostStackItems, attachedCardIds, removedCardIds) {
|
|
97
|
-
this.cardIds.clear();
|
|
98
|
-
if (submode === Submodes.Interact) for (let item of topMostStackItems) {
|
|
99
|
-
if (!item.id) continue;
|
|
100
|
-
if (removedCardIds?.has(item.id)) continue;
|
|
101
|
-
if (attachedCardIds?.includes(item.id)) continue;
|
|
102
|
-
let card = yield this.loadCard(item.id);
|
|
103
|
-
if (!card || !isCardInstance(card)) continue;
|
|
104
|
-
let realmURL$1 = card[realmURL];
|
|
105
|
-
if (realmURL$1 && item.id === `${realmURL$1.href}index`) continue;
|
|
106
|
-
this.cardIds.add(item.id);
|
|
107
|
-
}
|
|
108
|
-
else if (submode === Submodes.Code) {
|
|
109
|
-
let cardFileUrl = autoAttachedFileUrls?.find((url) => url.endsWith(".json"));
|
|
110
|
-
let cardId = cardFileUrl ? cardFileUrl.replace(/\.json$/, "") : void 0;
|
|
111
|
-
if (cardId && !removedCardIds?.has(cardId) && !attachedCardIds?.includes(cardId)) {
|
|
112
|
-
let card = yield this.loadCard(cardId);
|
|
113
|
-
if (card && isCardInstance(card)) this.cardIds.add(cardId);
|
|
114
|
-
}
|
|
115
|
-
if (moduleInspectorPanel === "preview" && playgroundPanelCardId && !removedCardIds?.has(playgroundPanelCardId) && !attachedCardIds?.includes(playgroundPanelCardId)) this.cardIds.add(playgroundPanelCardId);
|
|
116
|
-
if (moduleInspectorPanel === "spec" && activeSpecId && !removedCardIds?.has(activeSpecId) && !attachedCardIds?.includes(activeSpecId)) this.cardIds.add(activeSpecId);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}), null, "calculateAutoAttachments", "restartable");
|
|
120
|
-
async loadCard(id) {
|
|
121
|
-
let existing = this.store.peek(id);
|
|
122
|
-
if (existing) return existing;
|
|
123
|
-
return await this.store.get(id);
|
|
124
|
-
}
|
|
125
|
-
getCandidateCardIds(submode, moduleInspectorPanel, autoAttachedFileUrls, playgroundPanelCardId, activeSpecId, topMostStackItems, attachedCardIds, removedCardIds) {
|
|
126
|
-
let candidateIds = [];
|
|
127
|
-
if (submode === Submodes.Interact) {
|
|
128
|
-
for (let item of topMostStackItems) if (item.id && !removedCardIds?.has(item.id) && !attachedCardIds?.includes(item.id)) candidateIds.push(item.id);
|
|
129
|
-
return candidateIds;
|
|
130
|
-
}
|
|
131
|
-
if (submode !== Submodes.Code) return candidateIds;
|
|
132
|
-
let cardFileUrl = autoAttachedFileUrls?.find((url) => url.endsWith(".json"));
|
|
133
|
-
let cardId = cardFileUrl ? cardFileUrl.replace(/\.json$/, "") : void 0;
|
|
134
|
-
if (cardId && !removedCardIds?.has(cardId) && !attachedCardIds?.includes(cardId)) candidateIds.push(cardId);
|
|
135
|
-
if (moduleInspectorPanel === "preview" && playgroundPanelCardId && !removedCardIds?.has(playgroundPanelCardId) && !attachedCardIds?.includes(playgroundPanelCardId)) candidateIds.push(playgroundPanelCardId);
|
|
136
|
-
if (moduleInspectorPanel === "spec" && activeSpecId && !removedCardIds?.has(activeSpecId) && !attachedCardIds?.includes(activeSpecId)) candidateIds.push(activeSpecId);
|
|
137
|
-
return candidateIds;
|
|
138
|
-
}
|
|
139
|
-
reconcileReferences(targetIds) {
|
|
140
|
-
let targetCounts = this.countReferences(targetIds);
|
|
141
|
-
for (let [id, currentCount] of this.#referenceCounts) {
|
|
142
|
-
let targetCount = targetCounts.get(id) ?? 0;
|
|
143
|
-
if (currentCount > targetCount) this.dropReference(id, currentCount - targetCount);
|
|
144
|
-
}
|
|
145
|
-
for (let [id, targetCount] of targetCounts) {
|
|
146
|
-
let currentCount = this.#referenceCounts.get(id) ?? 0;
|
|
147
|
-
if (targetCount > currentCount) this.addReference(id, targetCount - currentCount);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
countReferences(ids) {
|
|
151
|
-
let counts = /* @__PURE__ */ new Map();
|
|
152
|
-
for (let id of ids) counts.set(id, (counts.get(id) ?? 0) + 1);
|
|
153
|
-
return counts;
|
|
154
|
-
}
|
|
155
|
-
addReference(id, count = 1) {
|
|
156
|
-
if (!id || count <= 0) return;
|
|
157
|
-
for (let i = 0; i < count; i++) this.store.addReference(id);
|
|
158
|
-
this.#referenceCounts.set(id, (this.#referenceCounts.get(id) ?? 0) + count);
|
|
159
|
-
}
|
|
160
|
-
dropReference(id, count = 1) {
|
|
161
|
-
if (!id || count <= 0) return;
|
|
162
|
-
let currentCount = this.#referenceCounts.get(id);
|
|
163
|
-
if (!currentCount) return;
|
|
164
|
-
let drops = Math.min(count, currentCount);
|
|
165
|
-
for (let i = 0; i < drops; i++) this.store.dropReference(id);
|
|
166
|
-
let remaining = currentCount - drops;
|
|
167
|
-
if (remaining <= 0) this.#referenceCounts.delete(id);
|
|
168
|
-
else this.#referenceCounts.set(id, remaining);
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
function getAutoAttachment(parent, args) {
|
|
172
|
-
return AutoAttachment.from(parent, () => ({ named: {
|
|
173
|
-
submode: args.submode(),
|
|
174
|
-
moduleInspectorPanel: args.moduleInspectorPanel(),
|
|
175
|
-
autoAttachedFileUrls: args.autoAttachedFileUrls(),
|
|
176
|
-
playgroundPanelCardId: args.playgroundPanelCardId(),
|
|
177
|
-
activeSpecId: args.activeSpecId(),
|
|
178
|
-
topMostStackItems: args.topMostStackItems(),
|
|
179
|
-
attachedCardIds: args.attachedCardIds(),
|
|
180
|
-
removedCardIds: args.removedCardIds()
|
|
181
|
-
} }));
|
|
182
|
-
}
|
|
183
|
-
//#endregion
|
|
184
|
-
//#region app/components/ai-assistant/action-bar.gts
|
|
185
|
-
var AiAssistantActionBar = class extends Component {
|
|
186
|
-
stop() {
|
|
187
|
-
this.args.stop?.();
|
|
188
|
-
}
|
|
189
|
-
static {
|
|
190
|
-
decorateMethodV2(this.prototype, "stop", [action]);
|
|
191
|
-
}
|
|
192
|
-
static {
|
|
193
|
-
setComponentTemplate(templateFactory({
|
|
194
|
-
"id": "i7s/Tvok",
|
|
195
|
-
"block": "[[[10,0],[15,0,[28,[32,0],[\"ai-assistant-action-bar\"],[[\"unread-indicator\"],[[30,1]]]]],[14,\"data-test-ai-assistant-action-bar\",\"\"],[14,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"],[12],[1,\"\\n\"],[41,[30,1],[[[1,\" \"],[8,[32,1],[[24,0,\"unread-btn\"],[24,\"data-test-unread-messages-button\",\"\"],[24,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"],[4,[32,2],[\"click\",[30,2]],null]],[[\"@kind\"],[\"primary\"]],[[\"default\"],[[[[1,\"\\n \"],[1,[30,3]],[1,\"\\n \"],[8,[32,3],[[24,0,\"unread-btn__icon\"],[24,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"]],null,null],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[]],[[[41,[30,4],[[[1,\" \"],[10,0],[14,0,\"generating-results-container\"],[14,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"],[12],[1,\"\\n \"],[10,1],[14,0,\"generating-results\"],[14,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"],[12],[1,\"\\n \"],[1,[52,[30,5],[30,5],\"Generating results\"]],[10,1],[14,0,\"dot\"],[14,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"],[12],[1,\".\"],[13],[10,1],[14,0,\"dot\"],[14,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"],[12],[1,\".\"],[13],[10,1],[14,0,\"dot\"],[14,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"],[12],[1,\".\"],[13],[1,\"\\n \"],[13],[1,\"\\n \"],[8,[32,1],[[24,0,\"stop-btn\"],[24,\"data-test-stop-generating\",\"\"],[24,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"],[4,[32,2],[\"click\",[30,0,[\"stop\"]]],null]],[[\"@kind\",\"@disabled\"],[\"primary\",[30,6]]],[[\"default\"],[[[[1,\"Stop\"]],[]]]]],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[41,[30,7],[[[1,\" \"],[10,1],[14,0,\"accepting-all\"],[14,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"],[12],[1,\"\\n \"],[8,[32,4],[[24,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"]],[[\"@color\"],[\"var(--boxel-highlight)\"]],null],[1,\"\\n \"],[1,[52,[30,8],[30,8],\"Apply Diff\"]],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,1],[[24,0,\"action-btn\"],[24,\"data-test-accept-all\",\"\"],[24,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"],[4,[32,2],[\"click\",[30,9]],null]],[[\"@kind\",\"@disabled\"],[\"primary\",[30,7]]],[[\"default\"],[[[[1,\"Accept All\"]],[]]]]],[1,\"\\n \"],[8,[32,1],[[24,0,\"action-btn cancel-btn\"],[24,\"data-test-cancel\",\"\"],[24,\"data-scopedcss-b796ffe1b6-219e287346\",\"\"],[4,[32,2],[\"click\",[30,10]],null]],[[\"@kind\",\"@disabled\"],[\"secondary-dark\",[30,7]]],[[\"default\"],[[[[1,\"Cancel\"]],[]]]]],[1,\"\\n \"]],[]]]],[]]]],[]]],[13],[1,\"\\n\\n\"]],[\"@showUnreadIndicator\",\"@scrollToFirstUnread\",\"@unreadMessageText\",\"@generatingResults\",\"@generatingLabel\",\"@stopping\",\"@acceptingAll\",\"@acceptingAllLabel\",\"@acceptAll\",\"@cancel\"],[\"if\"]]",
|
|
196
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/action-bar.gts",
|
|
197
|
-
"scope": () => [
|
|
198
|
-
cn_default,
|
|
199
|
-
ButtonComponent,
|
|
200
|
-
on,
|
|
201
|
-
IconComponent$15,
|
|
202
|
-
LoadingIndicator
|
|
203
|
-
],
|
|
204
|
-
"isStrictMode": true
|
|
205
|
-
}), this);
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
//#endregion
|
|
209
|
-
//#region app/components/ai-assistant/attachment-picker/attach-button.gts
|
|
210
|
-
var AttachButtonTrigger = setComponentTemplate(templateFactory({
|
|
211
|
-
"id": "u4STmgtZ",
|
|
212
|
-
"block": "[[[8,[32,0],[[24,0,\"attach-button__trigger-icon\"],[24,\"width\",\"22px\"],[24,\"height\",\"22px\"],[24,\"data-test-attach-button\",\"\"]],null,null]],[],[]]",
|
|
213
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/attachment-picker/attach-button.gts",
|
|
214
|
-
"scope": () => [IconComponent$2],
|
|
215
|
-
"isStrictMode": true
|
|
216
|
-
}), templateOnly());
|
|
217
|
-
var AttachButton = class extends Component {
|
|
218
|
-
static {
|
|
219
|
-
setComponentTemplate(templateFactory({
|
|
220
|
-
"id": "3XkTvQ6t",
|
|
221
|
-
"block": "[[[8,[32,0],[[24,0,\"attach-button\"],[24,\"data-scopedcss-19e32a2ed7-8ca2f29c11\",\"\"]],[[\"@options\",\"@selected\",\"@onChange\",\"@verticalPosition\",\"@renderInPlace\",\"@placeholder\",\"@searchEnabled\",\"@matchTriggerWidth\",\"@dropdownClass\",\"@triggerComponent\"],[[30,0,[\"menuOptions\"]],[27],[30,0,[\"handleSelection\"]],\"above\",true,\"\",false,false,\"attach-button__dropdown\",[50,[32,1],0,null,null]]],[[\"default\"],[[[[1,\"\\n\"],[41,[28,[32,2],[[30,1],\"Attach a Card\"],null],[[[1,\" \"],[10,0],[14,0,\"menu-option\"],[14,\"data-test-attach-card-btn\",\"\"],[14,\"data-scopedcss-19e32a2ed7-8ca2f29c11\",\"\"],[12],[1,\"\\n \"],[8,[32,3],[[24,\"width\",\"16px\"],[24,\"height\",\"16px\"],[24,\"data-scopedcss-19e32a2ed7-8ca2f29c11\",\"\"]],null,null],[1,\"\\n \"],[10,1],[14,\"data-scopedcss-19e32a2ed7-8ca2f29c11\",\"\"],[12],[1,[30,1]],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[41,[28,[32,2],[[30,1],\"Attach a File (Workspace)\"],null],[[[1,\" \"],[10,0],[14,0,\"menu-option\"],[14,\"data-test-attach-workspace-file-btn\",\"\"],[14,\"data-test-attach-file-btn\",\"\"],[14,\"data-scopedcss-19e32a2ed7-8ca2f29c11\",\"\"],[12],[1,\"\\n \"],[8,[32,4],[[24,\"width\",\"16px\"],[24,\"height\",\"16px\"],[24,\"data-scopedcss-19e32a2ed7-8ca2f29c11\",\"\"]],null,null],[1,\"\\n \"],[10,1],[14,\"data-scopedcss-19e32a2ed7-8ca2f29c11\",\"\"],[12],[1,[30,1]],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[41,[28,[32,2],[[30,1],\"Attach a File (Your Computer)\"],null],[[[1,\" \"],[10,0],[14,0,\"menu-option\"],[14,\"data-test-attach-local-file-btn\",\"\"],[14,\"data-scopedcss-19e32a2ed7-8ca2f29c11\",\"\"],[12],[1,\"\\n \"],[8,[32,4],[[24,\"width\",\"16px\"],[24,\"height\",\"16px\"],[24,\"data-scopedcss-19e32a2ed7-8ca2f29c11\",\"\"]],null,null],[1,\"\\n \"],[10,1],[14,\"data-scopedcss-19e32a2ed7-8ca2f29c11\",\"\"],[12],[1,[30,1]],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[1,\" \"],[10,1],[14,\"data-scopedcss-19e32a2ed7-8ca2f29c11\",\"\"],[12],[1,[30,1]],[13],[1,\"\\n \"]],[]]]],[]]]],[]]]],[1]]]]],[1,\"\\n\"]],[\"option\"],[\"component\",\"if\"]]",
|
|
222
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/attachment-picker/attach-button.gts",
|
|
223
|
-
"scope": () => [
|
|
224
|
-
BoxelSelect,
|
|
225
|
-
AttachButtonTrigger,
|
|
226
|
-
eq,
|
|
227
|
-
IconComponent$17,
|
|
228
|
-
IconComponent$18
|
|
229
|
-
],
|
|
230
|
-
"isStrictMode": true
|
|
231
|
-
}), this);
|
|
232
|
-
}
|
|
233
|
-
get menuOptions() {
|
|
234
|
-
return [
|
|
235
|
-
"Attach a Card",
|
|
236
|
-
"Attach a File (Workspace)",
|
|
237
|
-
"Attach a File (Your Computer)"
|
|
238
|
-
];
|
|
239
|
-
}
|
|
240
|
-
handleSelection(option) {
|
|
241
|
-
if (option === "Attach a Card") this.onAttachCard();
|
|
242
|
-
else if (option === "Attach a File (Workspace)") this.onChooseFile();
|
|
243
|
-
else if (option === "Attach a File (Your Computer)") this.onChooseLocalFile();
|
|
244
|
-
}
|
|
245
|
-
static {
|
|
246
|
-
decorateMethodV2(this.prototype, "handleSelection", [action]);
|
|
247
|
-
}
|
|
248
|
-
onAttachCard() {
|
|
249
|
-
this.chooseCardTask.perform();
|
|
250
|
-
}
|
|
251
|
-
static {
|
|
252
|
-
decorateMethodV2(this.prototype, "onAttachCard", [action]);
|
|
253
|
-
}
|
|
254
|
-
onChooseFile() {
|
|
255
|
-
this.doChooseFile.perform();
|
|
256
|
-
}
|
|
257
|
-
static {
|
|
258
|
-
decorateMethodV2(this.prototype, "onChooseFile", [action]);
|
|
259
|
-
}
|
|
260
|
-
onChooseLocalFile() {
|
|
261
|
-
this.doChooseLocalFile.perform();
|
|
262
|
-
}
|
|
263
|
-
static {
|
|
264
|
-
decorateMethodV2(this.prototype, "onChooseLocalFile", [action]);
|
|
265
|
-
}
|
|
266
|
-
chooseCardTask = buildTask(() => ({
|
|
267
|
-
context: this,
|
|
268
|
-
generator: function* () {
|
|
269
|
-
let cardId = yield chooseCard({ filter: { type: baseCardRef } });
|
|
270
|
-
if (cardId) this.args.chooseCard(cardId);
|
|
271
|
-
}
|
|
272
|
-
}), null, "chooseCardTask", "restartable");
|
|
273
|
-
doChooseFile = buildTask(() => ({
|
|
274
|
-
context: this,
|
|
275
|
-
generator: function* () {
|
|
276
|
-
let chosenFiles = yield chooseFile({ multiSelect: true });
|
|
277
|
-
yield Promise.all((chosenFiles ?? []).map((f) => this.args.chooseFile(f)));
|
|
278
|
-
return chosenFiles;
|
|
279
|
-
}
|
|
280
|
-
}), null, "doChooseFile", "restartable");
|
|
281
|
-
doChooseLocalFile = buildTask(() => ({
|
|
282
|
-
context: this,
|
|
283
|
-
generator: function* () {
|
|
284
|
-
yield this.args.chooseLocalFile();
|
|
285
|
-
}
|
|
286
|
-
}), null, "doChooseLocalFile", "restartable");
|
|
287
|
-
};
|
|
288
|
-
//#endregion
|
|
289
|
-
//#region ../boxel-icons/dist/@cardstack/boxel-icons/v1/icons/undo-2.js
|
|
290
|
-
var IconComponent$1 = setComponentTemplate(templateFactory({
|
|
291
|
-
"id": "p9r+KJ5X",
|
|
292
|
-
"block": "[[[1,\"\\n \"],[11,\"svg\"],[24,\"xmlns\",\"http://www.w3.org/2000/svg\",\"http://www.w3.org/2000/xmlns/\"],[24,\"width\",\"24\"],[24,\"height\",\"24\"],[24,\"fill\",\"none\"],[24,\"stroke\",\"currentColor\"],[24,\"stroke-linecap\",\"round\"],[24,\"stroke-linejoin\",\"round\"],[24,\"stroke-width\",\"2\"],[24,0,\"lucide lucide-undo-2\"],[24,\"viewBox\",\"0 0 24 24\"],[17,1],[12],[10,\"path\"],[14,\"d\",\"M9 14 4 9l5-5\"],[12],[13],[10,\"path\"],[14,\"d\",\"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5 5.5 5.5 0 0 1-5.5 5.5H11\"],[12],[13],[13],[1,\"\\n\"]],[\"&attrs\"],[]]",
|
|
293
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/boxel-icons/src/icons/undo-2.gts",
|
|
294
|
-
"isStrictMode": true
|
|
295
|
-
}), templateOnly());
|
|
296
|
-
IconComponent$1.name = "undo-2";
|
|
297
|
-
//#endregion
|
|
298
|
-
//#region app/components/ai-assistant/restore-file-modal.gts
|
|
299
|
-
var component$1 = setComponentTemplate(templateFactory({
|
|
300
|
-
"id": "AzCDVCZx",
|
|
301
|
-
"block": "[[[8,[32,0],[[24,\"data-test-restore-file-modal-container\",\"\"],[16,5,[28,[32,1],null,[[\"boxel-modal-offset-top\"],[\"40vh\"]]]],[24,\"data-scopedcss-39df46fdc8-d920daa38c\",\"\"]],[[\"@layer\",\"@size\",\"@isOpen\",\"@onClose\"],[\"urgent\",\"x-small\",true,[30,1]]],[[\"default\"],[[[[1,\"\\n \"],[10,\"section\"],[14,0,\"restore\"],[14,\"data-scopedcss-39df46fdc8-d920daa38c\",\"\"],[12],[1,\"\\n \"],[10,2],[14,0,\"content\"],[14,\"data-scopedcss-39df46fdc8-d920daa38c\",\"\"],[12],[1,\"\\n Are you sure you want to restore file contents?\\n \"],[13],[1,\"\\n \"],[10,2],[14,0,\"content disclaimer\"],[14,\"data-scopedcss-39df46fdc8-d920daa38c\",\"\"],[12],[1,\"This action is not reversible.\"],[13],[1,\"\\n \"],[10,\"footer\"],[14,0,\"buttons\"],[14,\"data-scopedcss-39df46fdc8-d920daa38c\",\"\"],[12],[1,\"\\n\"],[41,[30,2],[[[1,\" \"],[8,[32,2],[[24,\"data-scopedcss-39df46fdc8-d920daa38c\",\"\"]],[[\"@size\",\"@kind\",\"@loading\"],[\"tall\",\"danger\",true]],[[\"default\"],[[[[1,\"\\n Restoring\\n \"]],[]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,2],[[24,\"data-test-confirm-cancel-button\",\"\"],[24,\"data-scopedcss-39df46fdc8-d920daa38c\",\"\"],[4,[32,3],[\"click\",[30,1]],null]],[[\"@size\",\"@kind\"],[\"tall\",\"secondary-light\"]],[[\"default\"],[[[[1,\"\\n Cancel\\n \"]],[]]]]],[1,\"\\n \"],[8,[32,2],[[24,\"data-test-confirm-restore-button\",\"\"],[24,\"data-scopedcss-39df46fdc8-d920daa38c\",\"\"],[4,[32,3],[\"click\",[30,3]],null]],[[\"@size\",\"@kind\"],[\"tall\",\"danger\"]],[[\"default\"],[[[[1,\"\\n Restore\\n \"]],[]]]]],[1,\"\\n\"]],[]]],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]]]]],[1,\"\\n\\n\"]],[\"@onCancel\",\"@isRestoreRunning\",\"@onConfirm\"],[\"if\"]]",
|
|
302
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/restore-file-modal.gts",
|
|
303
|
-
"scope": () => [
|
|
304
|
-
Modal,
|
|
305
|
-
css_var_default,
|
|
306
|
-
ButtonComponent,
|
|
307
|
-
on
|
|
308
|
-
],
|
|
309
|
-
"isStrictMode": true
|
|
310
|
-
}), templateOnly());
|
|
311
|
-
//#endregion
|
|
312
|
-
//#region app/components/ai-assistant/attached-file-dropdown-menu.gts
|
|
313
|
-
var AttachedFileDropdownMenu = class extends Component {
|
|
314
|
-
static {
|
|
315
|
-
decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
|
|
316
|
-
}
|
|
317
|
-
#operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
|
|
318
|
-
static {
|
|
319
|
-
decorateFieldV2(this.prototype, "matrixService", [service]);
|
|
320
|
-
}
|
|
321
|
-
#matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
|
|
322
|
-
static {
|
|
323
|
-
decorateFieldV2(this.prototype, "cardService", [service]);
|
|
324
|
-
}
|
|
325
|
-
#cardService = (initializeDeferredDecorator(this, "cardService"), void 0);
|
|
326
|
-
static {
|
|
327
|
-
decorateFieldV2(this.prototype, "network", [service]);
|
|
328
|
-
}
|
|
329
|
-
#network = (initializeDeferredDecorator(this, "network"), void 0);
|
|
330
|
-
static {
|
|
331
|
-
decorateFieldV2(this.prototype, "isRestorePatchedFileModalOpen", [tracked], function() {
|
|
332
|
-
return false;
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
#isRestorePatchedFileModalOpen = (initializeDeferredDecorator(this, "isRestorePatchedFileModalOpen"), void 0);
|
|
336
|
-
static {
|
|
337
|
-
decorateFieldV2(this.prototype, "fileContent", [tracked], function() {
|
|
338
|
-
return null;
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
#fileContent = (initializeDeferredDecorator(this, "fileContent"), void 0);
|
|
342
|
-
openInCodeMode() {
|
|
343
|
-
if (this.operatorModeStateService.workspaceChooserOpened) this.operatorModeStateService.closeWorkspaceChooser();
|
|
344
|
-
if (this.operatorModeStateService.state.submode === Submodes.Code && this.args.file.sourceUrl && this.network.virtualNetwork.unresolveURL(this.args.file.sourceUrl) === this.operatorModeStateService.state.codePath) return;
|
|
345
|
-
this.operatorModeStateService.updateSubmode(Submodes.Code);
|
|
346
|
-
this.operatorModeStateService.updateCodePath(new URL(this.args.file.sourceUrl));
|
|
347
|
-
}
|
|
348
|
-
static {
|
|
349
|
-
decorateMethodV2(this.prototype, "openInCodeMode", [action]);
|
|
350
|
-
}
|
|
351
|
-
copySubmittedContentTask = buildTask(() => ({
|
|
352
|
-
context: this,
|
|
353
|
-
generator: function* () {
|
|
354
|
-
if (this.loadFileContent.isRunning) yield this.loadFileContent.perform();
|
|
355
|
-
navigator.clipboard.writeText(this.fileContent);
|
|
356
|
-
}
|
|
357
|
-
}), null, "copySubmittedContentTask", "drop");
|
|
358
|
-
toggleRestorePatchedFileModal = () => {
|
|
359
|
-
this.isRestorePatchedFileModalOpen = !this.isRestorePatchedFileModalOpen;
|
|
360
|
-
};
|
|
361
|
-
get menuItems() {
|
|
362
|
-
let sourceUrl = this.args.file?.sourceUrl;
|
|
363
|
-
return [
|
|
364
|
-
...!sourceUrl || this.operatorModeStateService.codeSubmodeOffered(sourceUrl) ? [new MenuItem({
|
|
365
|
-
label: "Open in Code Mode",
|
|
366
|
-
action: this.openInCodeMode,
|
|
367
|
-
icon: IconComponent$5,
|
|
368
|
-
disabled: !sourceUrl
|
|
369
|
-
})] : [],
|
|
370
|
-
new MenuItem({
|
|
371
|
-
label: "Copy Submitted Content",
|
|
372
|
-
action: this.copySubmittedContentTask.perform,
|
|
373
|
-
icon: IconComponent$3,
|
|
374
|
-
disabled: !this.args.file?.sourceUrl || this.args.isNewFile
|
|
375
|
-
}),
|
|
376
|
-
new MenuItem({
|
|
377
|
-
label: "Restore Submitted Content",
|
|
378
|
-
action: this.toggleRestorePatchedFileModal,
|
|
379
|
-
icon: IconComponent$1,
|
|
380
|
-
dangerous: true,
|
|
381
|
-
disabled: !this.args.file?.sourceUrl || this.args.isNewFile
|
|
382
|
-
})
|
|
383
|
-
];
|
|
384
|
-
}
|
|
385
|
-
restoreContent = buildTask(() => ({
|
|
386
|
-
context: this,
|
|
387
|
-
generator: function* () {
|
|
388
|
-
if (this.loadFileContent.isRunning) yield this.loadFileContent.perform();
|
|
389
|
-
let content = this.fileContent;
|
|
390
|
-
yield this.cardService.saveSource(new URL(this.args.isCardInstance && !this.args.file.sourceUrl.endsWith(".json") ? this.args.file.sourceUrl + ".json" : this.args.file.sourceUrl), content, "bot-patch", { resetLoader: hasExecutableExtension(this.args.file.sourceUrl) });
|
|
391
|
-
this.isRestorePatchedFileModalOpen = false;
|
|
392
|
-
}
|
|
393
|
-
}), null, "restoreContent", "drop");
|
|
394
|
-
loadFileContent = buildTask(() => ({
|
|
395
|
-
context: this,
|
|
396
|
-
generator: function* () {
|
|
397
|
-
if (!this.args.file?.sourceUrl) return;
|
|
398
|
-
let content = yield (yield this.matrixService.fetchMatrixHostedFile(this.args.file.url)).text();
|
|
399
|
-
this.fileContent = content;
|
|
400
|
-
}
|
|
401
|
-
}), null, "loadFileContent", "drop");
|
|
402
|
-
static {
|
|
403
|
-
setComponentTemplate(templateFactory({
|
|
404
|
-
"id": "SYKDMTRb",
|
|
405
|
-
"block": "[[[41,[30,0,[\"isRestorePatchedFileModalOpen\"]],[[[1,\" \"],[8,[32,0],null,[[\"@named\",\"@send\"],[\"modal-elsewhere\",[50,[32,1],0,null,[[\"onConfirm\",\"onCancel\",\"isRestoreRunning\"],[[28,[32,2],[[30,0,[\"restoreContent\"]]],null],[30,0,[\"toggleRestorePatchedFileModal\"]],[30,0,[\"restoreContent\",\"isRunning\"]]]]]]],null],[1,\"\\n\"]],[]],null],[8,[32,3],null,null,[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,4],[[16,\"data-test-attached-file-dropdown-button\",[30,2,[\"name\"]]],[16,\"data-test-copy-file-content\",[30,0,[\"fileContent\"]]],[4,[30,1],null,null],[4,[32,5],[\"click\",[28,[32,2],[[30,0,[\"loadFileContent\"]]],null]],null]],[[\"@size\",\"@label\",\"@icon\"],[\"extra-small\",\"file options\",\"context-menu-vertical\"]],null],[1,\"\\n \"]],[1]],[[[1,\"\\n \"],[8,[32,6],[[24,0,\"context-menu-list\"]],[[\"@items\",\"@closeMenu\"],[[30,0,[\"menuItems\"]],[30,3,[\"close\"]]]],null],[1,\"\\n \"]],[3]]]]]],[\"bindings\",\"@file\",\"dd\"],[\"if\",\"component\"]]",
|
|
406
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/attached-file-dropdown-menu.gts",
|
|
407
|
-
"scope": () => [
|
|
408
|
-
_class,
|
|
409
|
-
component$1,
|
|
410
|
-
perform,
|
|
411
|
-
BoxelDropdown,
|
|
412
|
-
DropdownButton,
|
|
413
|
-
on,
|
|
414
|
-
Menu
|
|
415
|
-
],
|
|
416
|
-
"isStrictMode": true
|
|
417
|
-
}), this);
|
|
418
|
-
}
|
|
419
|
-
};
|
|
420
|
-
//#endregion
|
|
421
|
-
//#region app/components/card-pill.gts
|
|
422
|
-
var CardPill = class extends Component {
|
|
423
|
-
static {
|
|
424
|
-
decorateFieldV2(this.prototype, "getCard", [consume(GetCardContextName)]);
|
|
425
|
-
}
|
|
426
|
-
#getCard = (initializeDeferredDecorator(this, "getCard"), void 0);
|
|
427
|
-
static {
|
|
428
|
-
decorateFieldV2(this.prototype, "realm", [service]);
|
|
429
|
-
}
|
|
430
|
-
#realm = (initializeDeferredDecorator(this, "realm"), void 0);
|
|
431
|
-
get cardResource() {
|
|
432
|
-
return this.getCard(this, () => this.args.cardId);
|
|
433
|
-
}
|
|
434
|
-
static {
|
|
435
|
-
decorateMethodV2(this.prototype, "cardResource", [cached]);
|
|
436
|
-
}
|
|
437
|
-
get cardTitle() {
|
|
438
|
-
return this.args.displayTitle || this.card?.cardTitle || this.cardError?.meta.cardTitle;
|
|
439
|
-
}
|
|
440
|
-
get card() {
|
|
441
|
-
return this.cardResource?.card;
|
|
442
|
-
}
|
|
443
|
-
get cardError() {
|
|
444
|
-
return this.cardResource?.cardError;
|
|
445
|
-
}
|
|
446
|
-
get isCreating() {
|
|
447
|
-
return this.card && !this.card.id && !this.cardError;
|
|
448
|
-
}
|
|
449
|
-
handleCardClick() {
|
|
450
|
-
if (this.args.onClick) this.args.onClick();
|
|
451
|
-
}
|
|
452
|
-
static {
|
|
453
|
-
decorateMethodV2(this.prototype, "handleCardClick", [action]);
|
|
454
|
-
}
|
|
455
|
-
handleRemoveClick(event) {
|
|
456
|
-
event.stopPropagation();
|
|
457
|
-
if (this.args.onRemove) this.args.onRemove();
|
|
458
|
-
}
|
|
459
|
-
static {
|
|
460
|
-
decorateMethodV2(this.prototype, "handleRemoveClick", [action]);
|
|
461
|
-
}
|
|
462
|
-
get pillKind() {
|
|
463
|
-
return this.args.onClick ? "button" : "default";
|
|
464
|
-
}
|
|
465
|
-
get borderStyle() {
|
|
466
|
-
return this.args.borderType === "dashed" ? "dashed" : "solid";
|
|
467
|
-
}
|
|
468
|
-
get borderClass() {
|
|
469
|
-
return `border-${this.borderStyle}`;
|
|
470
|
-
}
|
|
471
|
-
static {
|
|
472
|
-
setComponentTemplate(templateFactory({
|
|
473
|
-
"id": "tJVP0P6L",
|
|
474
|
-
"block": "[[[41,[30,0,[\"isCreating\"]],[[[1,\" \"],[8,[32,0],[[24,\"data-scopedcss-64c760ebba-3b4e11ca17\",\"\"]],null,null],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,1],[[16,0,[28,[32,2],[\"card-pill\",[30,0,[\"borderClass\"]]],null]],[16,\"data-test-attached-card\",[30,1]],[17,2],[24,\"data-scopedcss-64c760ebba-3b4e11ca17\",\"\"],[4,[32,3],[\"click\",[30,0,[\"handleCardClick\"]]],null]],[[\"@kind\"],[[30,0,[\"pillKind\"]]]],[[\"iconLeft\",\"default\",\"iconRight\"],[[[[1,\"\\n\"],[41,[30,3],[[[1,\" \"],[8,[32,4],[[24,0,\"fallback-card-icon\"],[24,\"width\",\"18\"],[24,\"height\",\"18\"],[24,\"aria-hidden\",\"true\"],[24,\"data-scopedcss-64c760ebba-3b4e11ca17\",\"\"]],null,null],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,5],[[24,\"data-scopedcss-64c760ebba-3b4e11ca17\",\"\"]],[[\"@urlInRealm\"],[[30,4]]],[[\"default\"],[[[[1,\"\\n \"],[8,[32,6],[[24,\"data-scopedcss-64c760ebba-3b4e11ca17\",\"\"]],[[\"@realmInfo\"],[[28,[30,0,[\"realm\",\"info\"]],[[30,4]],null]]],null],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[]]],[1,\" \"]],[]],[[[1,\"\\n \"],[10,0],[14,0,\"card-content\"],[15,\"title\",[30,0,[\"cardTitle\"]]],[14,\"data-scopedcss-64c760ebba-3b4e11ca17\",\"\"],[12],[1,\"\\n \"],[1,[30,0,[\"cardTitle\"]]],[1,\"\\n \"],[13],[1,\"\\n\\n \"]],[]],[[[1,\"\\n\"],[41,[30,5],[[[1,\" \"],[8,[32,7],[[24,0,\"remove-button\"],[24,\"data-test-remove-card-btn\",\"\"],[24,\"data-scopedcss-64c760ebba-3b4e11ca17\",\"\"],[4,[32,3],[\"click\",[30,0,[\"handleRemoveClick\"]]],null]],[[\"@icon\",\"@height\",\"@width\"],[[32,8],\"10\",\"10\"]],null],[1,\"\\n\"]],[]],null],[1,\"\\n\"],[41,[30,6],[[[1,\" \"],[8,[32,9],[[24,\"data-scopedcss-64c760ebba-3b4e11ca17\",\"\"]],[[\"@file\",\"@isNewFile\",\"@isCardInstance\"],[[30,6],false,true]],null],[1,\"\\n\"]],[]],null],[1,\" \"]],[]]]]],[1,\"\\n\"]],[]]]],[\"@cardId\",\"&attrs\",\"@showErrorIcon\",\"@urlForRealmLookup\",\"@onRemove\",\"@file\"],[\"if\"]]",
|
|
475
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/card-pill.gts",
|
|
476
|
-
"scope": () => [
|
|
477
|
-
LoadingIndicator,
|
|
478
|
-
Pill,
|
|
479
|
-
cn_default,
|
|
480
|
-
on,
|
|
481
|
-
IconComponent$6,
|
|
482
|
-
RealmURLTooltip,
|
|
483
|
-
RealmIcon,
|
|
484
|
-
IconButton,
|
|
485
|
-
IconComponent$7,
|
|
486
|
-
AttachedFileDropdownMenu
|
|
487
|
-
],
|
|
488
|
-
"isStrictMode": true
|
|
489
|
-
}), this);
|
|
490
|
-
}
|
|
491
|
-
};
|
|
492
|
-
//#endregion
|
|
493
|
-
//#region app/components/file-pill.gts
|
|
494
|
-
var FilePill = class extends Component {
|
|
495
|
-
static {
|
|
496
|
-
decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
|
|
497
|
-
}
|
|
498
|
-
#operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
|
|
499
|
-
get displayName() {
|
|
500
|
-
let fileName = this.args.file.name?.trim();
|
|
501
|
-
if (fileName) return fileName;
|
|
502
|
-
return this.args.file.sourceUrl ?? "Unnamed file";
|
|
503
|
-
}
|
|
504
|
-
handleFileClick() {
|
|
505
|
-
if (this.args.onClick) this.args.onClick();
|
|
506
|
-
}
|
|
507
|
-
static {
|
|
508
|
-
decorateMethodV2(this.prototype, "handleFileClick", [action]);
|
|
509
|
-
}
|
|
510
|
-
handleRemoveClick(event) {
|
|
511
|
-
event.stopPropagation();
|
|
512
|
-
if (this.args.onRemove) this.args.onRemove();
|
|
513
|
-
}
|
|
514
|
-
static {
|
|
515
|
-
decorateMethodV2(this.prototype, "handleRemoveClick", [action]);
|
|
516
|
-
}
|
|
517
|
-
handleDownloadClick(event) {
|
|
518
|
-
event.stopPropagation();
|
|
519
|
-
if (this.args.onDownload) this.args.onDownload();
|
|
520
|
-
}
|
|
521
|
-
static {
|
|
522
|
-
decorateMethodV2(this.prototype, "handleDownloadClick", [action]);
|
|
523
|
-
}
|
|
524
|
-
handleRetryClick(event) {
|
|
525
|
-
event.stopPropagation();
|
|
526
|
-
this.args.onRetry?.();
|
|
527
|
-
}
|
|
528
|
-
static {
|
|
529
|
-
decorateMethodV2(this.prototype, "handleRetryClick", [action]);
|
|
530
|
-
}
|
|
531
|
-
get pillKind() {
|
|
532
|
-
return this.args.onClick ? "button" : "default";
|
|
533
|
-
}
|
|
534
|
-
get borderStyle() {
|
|
535
|
-
return this.args.borderType === "dashed" ? "dashed" : "solid";
|
|
536
|
-
}
|
|
537
|
-
get borderClass() {
|
|
538
|
-
return `border-${this.borderStyle}`;
|
|
539
|
-
}
|
|
540
|
-
static {
|
|
541
|
-
setComponentTemplate(templateFactory({
|
|
542
|
-
"id": "0YQV1SqR",
|
|
543
|
-
"block": "[[[8,[32,0],[[16,0,[28,[32,1],[\"file-pill\",[30,0,[\"borderClass\"]]],[[\"has-warning\"],[[30,1]]]]],[16,\"data-test-attached-file\",[30,2,[\"sourceUrl\"]]],[16,\"data-test-file-upload-status\",[30,3]],[16,\"data-test-file-modality-warning\",[52,[30,1],\"true\"]],[17,4],[24,\"data-scopedcss-d9038518d9-74805ca0ee\",\"\"],[4,[32,2],[\"click\",[30,0,[\"handleFileClick\"]]],null]],[[\"@kind\"],[[30,0,[\"pillKind\"]]]],[[\"iconLeft\",\"default\",\"iconRight\"],[[[[1,\"\\n\"],[41,[30,1],[[[1,\" \"],[8,[32,3],[[24,\"data-scopedcss-d9038518d9-74805ca0ee\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,4],[[24,0,\"warning-icon\"],[24,\"width\",\"18\"],[24,\"height\",\"18\"],[24,\"data-scopedcss-d9038518d9-74805ca0ee\",\"\"]],null,null],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[1,[30,1]],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,5],[[24,\"width\",\"18\"],[24,\"height\",\"18\"],[16,5,[28,[32,6],null,[[\"icon-color\"],[\"#0031ff\"]]]],[24,\"data-scopedcss-d9038518d9-74805ca0ee\",\"\"]],null,null],[1,\"\\n\"]],[]]],[1,\" \"]],[]],[[[1,\"\\n \"],[10,1],[14,0,\"file-name\"],[15,\"title\",[30,0,[\"displayName\"]]],[14,\"data-scopedcss-d9038518d9-74805ca0ee\",\"\"],[12],[1,\"\\n \"],[1,[30,0,[\"displayName\"]]],[1,\"\\n \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n\"],[41,[28,[32,7],[[30,3],\"error\"],null],[[[41,[30,5],[[[1,\" \"],[8,[32,8],[[24,0,\"retry-button\"],[24,\"data-test-file-retry-btn\",\"\"],[24,\"data-scopedcss-d9038518d9-74805ca0ee\",\"\"],[4,[32,2],[\"click\",[30,0,[\"handleRetryClick\"]]],null]],[[\"@icon\",\"@height\",\"@width\"],[[32,9],\"10\",\"10\"]],null],[1,\"\\n\"]],[]],null]],[]],null],[41,[30,6],[[[1,\" \"],[8,[32,8],[[24,0,\"remove-button\"],[24,\"data-test-remove-file-btn\",\"\"],[24,\"data-scopedcss-d9038518d9-74805ca0ee\",\"\"],[4,[32,2],[\"click\",[30,0,[\"handleRemoveClick\"]]],null]],[[\"@icon\",\"@height\",\"@width\"],[[32,10],\"10\",\"10\"]],null],[1,\"\\n\"]],[]],null],[41,[30,7],[[[1,\" \"],[8,[32,8],[[24,0,\"download-button\"],[24,\"data-test-download-file-btn\",\"\"],[24,\"data-scopedcss-d9038518d9-74805ca0ee\",\"\"],[4,[32,2],[\"click\",[30,0,[\"handleDownloadClick\"]]],null]],[[\"@icon\",\"@height\",\"@width\"],[[32,11],\"10\",\"10\"]],null],[1,\"\\n\"]],[]],null],[1,\"\\n\"],[41,[30,8],[[[1,\" \"],[8,[32,12],[[24,\"data-scopedcss-d9038518d9-74805ca0ee\",\"\"]],[[\"@file\",\"@isNewFile\"],[[30,2],false]],null],[1,\"\\n\"]],[]],null],[1,\" \"]],[]]]]],[1,\"\\n\"]],[\"@warningMessage\",\"@file\",\"@uploadStatus\",\"&attrs\",\"@onRetry\",\"@onRemove\",\"@onDownload\",\"@fileActionsEnabled\"],[\"if\"]]",
|
|
544
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/file-pill.gts",
|
|
545
|
-
"scope": () => [
|
|
546
|
-
Pill,
|
|
547
|
-
cn_default,
|
|
548
|
-
on,
|
|
549
|
-
Tooltip,
|
|
550
|
-
IconComponent$20,
|
|
551
|
-
IconComponent$18,
|
|
552
|
-
css_var_default,
|
|
553
|
-
eq,
|
|
554
|
-
IconButton,
|
|
555
|
-
IconComponent$19,
|
|
556
|
-
IconComponent$7,
|
|
557
|
-
IconComponent$8,
|
|
558
|
-
AttachedFileDropdownMenu
|
|
559
|
-
],
|
|
560
|
-
"isStrictMode": true
|
|
561
|
-
}), this);
|
|
562
|
-
}
|
|
563
|
-
};
|
|
564
|
-
//#endregion
|
|
565
|
-
//#region app/components/ai-assistant/attachment-picker/attached-items.gts
|
|
566
|
-
var MAX_ITEMS_TO_DISPLAY = 4;
|
|
567
|
-
var AttachedItems = class extends Component {
|
|
568
|
-
static {
|
|
569
|
-
decorateFieldV2(this.prototype, "areAllItemsDisplayed", [tracked], function() {
|
|
570
|
-
return false;
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
#areAllItemsDisplayed = (initializeDeferredDecorator(this, "areAllItemsDisplayed"), void 0);
|
|
574
|
-
static {
|
|
575
|
-
decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
|
|
576
|
-
}
|
|
577
|
-
#operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
|
|
578
|
-
get itemsToDisplay() {
|
|
579
|
-
return this.areAllItemsDisplayed ? this.args.items : this.args.items.slice(0, MAX_ITEMS_TO_DISPLAY);
|
|
580
|
-
}
|
|
581
|
-
isCard = (item) => {
|
|
582
|
-
return isCardInstance(item);
|
|
583
|
-
};
|
|
584
|
-
isAutoAttachedCard = (cardId) => {
|
|
585
|
-
return this.args.autoAttachedCardIds?.has(cardId) ?? false;
|
|
586
|
-
};
|
|
587
|
-
isAutoAttachedFile = (file) => {
|
|
588
|
-
return this.args.autoAttachedFiles?.some((autoFile) => autoFile.sourceUrl === file.sourceUrl) ?? false;
|
|
589
|
-
};
|
|
590
|
-
toggleViewAllAttachedCards() {
|
|
591
|
-
this.areAllItemsDisplayed = !this.areAllItemsDisplayed;
|
|
592
|
-
}
|
|
593
|
-
static {
|
|
594
|
-
decorateMethodV2(this.prototype, "toggleViewAllAttachedCards", [action]);
|
|
595
|
-
}
|
|
596
|
-
getCardErrorRealm(cardError) {
|
|
597
|
-
return cardError.realm ?? this.operatorModeStateService.realmURL;
|
|
598
|
-
}
|
|
599
|
-
handleRemoveCard(cardId) {
|
|
600
|
-
this.args.removeCard(cardId);
|
|
601
|
-
}
|
|
602
|
-
static {
|
|
603
|
-
decorateMethodV2(this.prototype, "handleRemoveCard", [action]);
|
|
604
|
-
}
|
|
605
|
-
handleChooseCard(cardId) {
|
|
606
|
-
if (this.args.chooseCard) this.args.chooseCard(cardId);
|
|
607
|
-
}
|
|
608
|
-
static {
|
|
609
|
-
decorateMethodV2(this.prototype, "handleChooseCard", [action]);
|
|
610
|
-
}
|
|
611
|
-
handleChooseFile(file) {
|
|
612
|
-
if (this.args.chooseFile) this.args.chooseFile(file);
|
|
613
|
-
}
|
|
614
|
-
static {
|
|
615
|
-
decorateMethodV2(this.prototype, "handleChooseFile", [action]);
|
|
616
|
-
}
|
|
617
|
-
handleRemoveFile(file) {
|
|
618
|
-
this.args.removeFile(file);
|
|
619
|
-
}
|
|
620
|
-
static {
|
|
621
|
-
decorateMethodV2(this.prototype, "handleRemoveFile", [action]);
|
|
622
|
-
}
|
|
623
|
-
getUploadStatus = (file) => {
|
|
624
|
-
let sourceUrl = file.sourceUrl;
|
|
625
|
-
if (!sourceUrl) return;
|
|
626
|
-
return this.args.fileUploadStates?.get(sourceUrl)?.status;
|
|
627
|
-
};
|
|
628
|
-
getModalityWarning = (file) => {
|
|
629
|
-
let modality = requiredModality(file.contentType);
|
|
630
|
-
if (modality) {
|
|
631
|
-
let modalities = this.args.inputModalities;
|
|
632
|
-
if (modalities && !modalities.includes(modality)) return `Model does not support ${modalityLabel(modality)}. Only metadata will be sent.`;
|
|
633
|
-
return;
|
|
634
|
-
}
|
|
635
|
-
if (!isTextBasedContentType(file.contentType)) return "File type not supported. Will send file metadata only.";
|
|
636
|
-
};
|
|
637
|
-
static {
|
|
638
|
-
setComponentTemplate(templateFactory({
|
|
639
|
-
"id": "vcvRHOjT",
|
|
640
|
-
"block": "[[[11,0],[24,0,\"attached-items\"],[17,1],[24,\"data-scopedcss-6b03763bf4-82837c0ab7\",\"\"],[12],[1,\"\\n\"],[41,[30,2],[[[42,[28,[31,2],[[28,[31,2],[[30,0,[\"itemsToDisplay\"]]],null]],null],null,[[[41,[28,[32,0],[[30,3]],null],[[[41,[30,3,[\"id\"]],[[[41,[28,[30,0,[\"isAutoAttachedCard\"]],[[30,3,[\"id\"]]],null],[[[1,\" \"],[8,[32,1],[[24,\"data-scopedcss-6b03763bf4-82837c0ab7\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,2],[[16,\"data-test-autoattached-card\",[30,3,[\"id\"]]],[24,\"data-scopedcss-6b03763bf4-82837c0ab7\",\"\"]],[[\"@cardId\",\"@borderType\",\"@onClick\",\"@onRemove\",\"@urlForRealmLookup\"],[[30,3,[\"id\"]],\"dashed\",[28,[32,3],[[30,0,[\"handleChooseCard\"]],[30,3,[\"id\"]]],null],[28,[32,3],[[30,0,[\"handleRemoveCard\"]],[30,3,[\"id\"]]],null],[28,[30,0,[\"getCardErrorRealm\"]],[[30,3]],null]]],null],[1,\"\\n \"]],[]],[[[1,\"\\n\"],[41,[30,4],[[[1,\" \"],[1,[30,4]],[1,\"\\n\"]],[]],[[[41,[28,[30,0,[\"isAutoAttachedCard\"]],[[30,3,[\"id\"]]],null],[[[1,\" Topmost card is shared automatically\\n \"]],[]],null]],[]]],[1,\" \"]],[]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,2],[[24,\"data-scopedcss-6b03763bf4-82837c0ab7\",\"\"]],[[\"@cardId\",\"@borderType\",\"@onRemove\",\"@urlForRealmLookup\"],[[30,3,[\"id\"]],\"solid\",[28,[32,3],[[30,0,[\"handleRemoveCard\"]],[30,3,[\"id\"]]],null],[28,[30,0,[\"getCardErrorRealm\"]],[[30,3]],null]]],null],[1,\"\\n\"]],[]]]],[]],null]],[]],[[[41,[28,[30,0,[\"isCard\"]],[[30,3]],null],[[[41,[28,[30,0,[\"isAutoAttachedCard\"]],[[30,3,[\"id\"]]],null],[[[1,\" \"],[8,[32,1],[[24,\"data-scopedcss-6b03763bf4-82837c0ab7\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,2],[[16,\"data-test-autoattached-card\",[28,[32,4],[[30,3]],null]],[24,\"data-scopedcss-6b03763bf4-82837c0ab7\",\"\"]],[[\"@cardId\",\"@borderType\",\"@onClick\",\"@onRemove\",\"@urlForRealmLookup\"],[[28,[32,4],[[30,3]],null],\"dashed\",[28,[32,3],[[30,0,[\"handleChooseCard\"]],[28,[32,4],[[30,3]],null]],null],[28,[32,3],[[30,0,[\"handleRemoveCard\"]],[28,[32,4],[[30,3]],null]],null],[28,[32,5],[[30,3]],null]]],null],[1,\"\\n \"]],[]],[[[1,\"\\n\"],[41,[30,4],[[[1,\" \"],[1,[30,4]],[1,\"\\n\"]],[]],[[[41,[28,[30,0,[\"isAutoAttachedCard\"]],[[30,3,[\"id\"]]],null],[[[1,\" Topmost card is shared automatically\\n \"]],[]],null]],[]]],[1,\" \"]],[]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,2],[[24,\"data-scopedcss-6b03763bf4-82837c0ab7\",\"\"]],[[\"@cardId\",\"@borderType\",\"@onRemove\",\"@urlForRealmLookup\"],[[28,[32,4],[[30,3]],null],\"solid\",[28,[32,3],[[30,0,[\"handleRemoveCard\"]],[28,[32,4],[[30,3]],null]],null],[28,[32,5],[[30,3]],null]]],null],[1,\"\\n\"]],[]]]],[]],[[[41,[28,[30,0,[\"isAutoAttachedFile\"]],[[30,3]],null],[[[1,\" \"],[8,[32,1],[[24,\"data-scopedcss-6b03763bf4-82837c0ab7\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,6],[[16,\"data-test-autoattached-file\",[30,3,[\"sourceUrl\"]]],[24,\"data-scopedcss-6b03763bf4-82837c0ab7\",\"\"]],[[\"@file\",\"@borderType\",\"@onClick\",\"@onRemove\",\"@uploadStatus\",\"@onRetry\",\"@warningMessage\"],[[30,3],\"dashed\",[28,[32,3],[[30,0,[\"handleChooseFile\"]],[30,3]],null],[28,[32,3],[[30,0,[\"handleRemoveFile\"]],[30,3]],null],[28,[30,0,[\"getUploadStatus\"]],[[30,3]],null],[52,[30,5],[28,[32,3],[[30,5],[30,3]],null]],[28,[30,0,[\"getModalityWarning\"]],[[30,3]],null]]],null],[1,\"\\n \"]],[]],[[[1,\"\\n Currently opened file is shared automatically\\n \"]],[]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,6],[[24,\"data-scopedcss-6b03763bf4-82837c0ab7\",\"\"]],[[\"@file\",\"@borderType\",\"@onRemove\",\"@uploadStatus\",\"@onRetry\",\"@warningMessage\"],[[30,3],\"solid\",[28,[32,3],[[30,0,[\"handleRemoveFile\"]],[30,3]],null],[28,[30,0,[\"getUploadStatus\"]],[[30,3]],null],[52,[30,5],[28,[32,3],[[30,5],[30,3]],null]],[28,[30,0,[\"getModalityWarning\"]],[[30,3]],null]]],null],[1,\"\\n\"]],[]]],[1,\" \"]],[]]]],[]]]],[3]],null],[41,[28,[32,7],[[28,[32,8],[[30,6,[\"length\"]],[32,9]],null],[28,[32,10],[[30,0,[\"areAllItemsDisplayed\"]]],null]],null],[[[1,\" \"],[8,[32,11],[[24,\"data-test-view-all\",\"\"],[24,\"data-scopedcss-6b03763bf4-82837c0ab7\",\"\"],[4,[32,12],[\"click\",[30,0,[\"toggleViewAllAttachedCards\"]]],null]],[[\"@kind\"],[\"button\"]],[[\"default\"],[[[[1,\"\\n View All (\"],[1,[30,6,[\"length\"]]],[1,\")\\n \"]],[]]]]],[1,\"\\n\"]],[]],null]],[]],null],[13],[1,\"\\n\"]],[\"&attrs\",\"@isLoaded\",\"item\",\"@autoAttachedCardTooltipMessage\",\"@retryFileUpload\",\"@items\"],[\"if\",\"each\",\"-track-array\"]]",
|
|
641
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/attachment-picker/attached-items.gts",
|
|
642
|
-
"scope": () => [
|
|
643
|
-
isCardErrorJSONAPI,
|
|
644
|
-
Tooltip,
|
|
645
|
-
CardPill,
|
|
646
|
-
fn,
|
|
647
|
-
idFor,
|
|
648
|
-
urlForRealmLookup,
|
|
649
|
-
FilePill,
|
|
650
|
-
and,
|
|
651
|
-
gt,
|
|
652
|
-
MAX_ITEMS_TO_DISPLAY,
|
|
653
|
-
not,
|
|
654
|
-
Pill,
|
|
655
|
-
on
|
|
656
|
-
],
|
|
657
|
-
"isStrictMode": true
|
|
658
|
-
}), this);
|
|
659
|
-
}
|
|
660
|
-
};
|
|
661
|
-
function idFor(instance) {
|
|
662
|
-
return instance.id ?? instance[localId];
|
|
663
|
-
}
|
|
664
|
-
//#endregion
|
|
665
|
-
//#region app/components/ai-assistant/attachment-picker/index.gts
|
|
666
|
-
var AiAssistantAttachmentPicker = class extends Component {
|
|
667
|
-
static {
|
|
668
|
-
setComponentTemplate(templateFactory({
|
|
669
|
-
"id": "+jL9HC3y",
|
|
670
|
-
"block": "[[[18,12,[[50,[32,0],0,null,[[\"isLoaded\",\"items\",\"autoAttachedCardIds\",\"autoAttachedFiles\",\"removeCard\",\"removeFile\",\"chooseCard\",\"chooseFile\",\"autoAttachedCardTooltipMessage\",\"fileUploadStates\",\"retryFileUpload\",\"inputModalities\"],[[30,0,[\"isLoaded\"]],[30,0,[\"items\"]],[30,1],[30,2],[30,3],[30,4],[30,5],[30,6],[30,7],[30,8],[30,9],[30,10]]]],[50,[32,1],0,null,[[\"chooseCard\",\"chooseFile\",\"chooseLocalFile\"],[[30,5],[30,6],[30,11]]]]]]],[\"@autoAttachedCardIds\",\"@autoAttachedFiles\",\"@removeCard\",\"@removeFile\",\"@chooseCard\",\"@chooseFile\",\"@autoAttachedCardTooltipMessage\",\"@fileUploadStates\",\"@retryFileUpload\",\"@inputModalities\",\"@chooseLocalFile\",\"&default\"],[\"yield\",\"component\"]]",
|
|
671
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/attachment-picker/index.gts",
|
|
672
|
-
"scope": () => [AttachedItems, AttachButton],
|
|
673
|
-
"isStrictMode": true
|
|
674
|
-
}), this);
|
|
675
|
-
}
|
|
676
|
-
static {
|
|
677
|
-
decorateFieldV2(this.prototype, "getCardCollection", [consume(GetCardCollectionContextName)]);
|
|
678
|
-
}
|
|
679
|
-
#getCardCollection = (initializeDeferredDecorator(this, "getCardCollection"), void 0);
|
|
680
|
-
get cardCollection() {
|
|
681
|
-
return this.getCardCollection(this, () => this.cardIds);
|
|
682
|
-
}
|
|
683
|
-
static {
|
|
684
|
-
decorateMethodV2(this.prototype, "cardCollection", [cached]);
|
|
685
|
-
}
|
|
686
|
-
get items() {
|
|
687
|
-
return [
|
|
688
|
-
...this.cards,
|
|
689
|
-
...this.cardErrors,
|
|
690
|
-
...this.files
|
|
691
|
-
];
|
|
692
|
-
}
|
|
693
|
-
get isLoaded() {
|
|
694
|
-
return this.cardCollection?.isLoaded;
|
|
695
|
-
}
|
|
696
|
-
get cards() {
|
|
697
|
-
return this.cardCollection?.cards ?? [];
|
|
698
|
-
}
|
|
699
|
-
get cardErrors() {
|
|
700
|
-
return this.cardCollection?.cardErrors ?? [];
|
|
701
|
-
}
|
|
702
|
-
get cardIds() {
|
|
703
|
-
let cardIds = this.args.cardIdsToAttach ?? [];
|
|
704
|
-
if (this.args.autoAttachedCardIds) cardIds = [...new Set([...this.args.autoAttachedCardIds, ...cardIds])];
|
|
705
|
-
cardIds = cardIds.filter(Boolean);
|
|
706
|
-
return cardIds;
|
|
707
|
-
}
|
|
708
|
-
get files() {
|
|
709
|
-
let files = this.args.filesToAttach ?? [];
|
|
710
|
-
let autoAttachedFiles = this.args.autoAttachedFiles ?? [];
|
|
711
|
-
if (autoAttachedFiles.length === 0) return files;
|
|
712
|
-
let autoFilesToPrepend = autoAttachedFiles.filter((file) => !files.some((item) => item.sourceUrl === file.sourceUrl));
|
|
713
|
-
if (autoFilesToPrepend.length === 0) return files;
|
|
714
|
-
return [...autoFilesToPrepend, ...files];
|
|
715
|
-
}
|
|
716
|
-
};
|
|
717
|
-
//#endregion
|
|
718
|
-
//#region app/components/ai-assistant/chat-input/index.gts
|
|
719
|
-
var AiAssistantChatInput = class extends Component {
|
|
720
|
-
static {
|
|
721
|
-
setComponentTemplate(templateFactory({
|
|
722
|
-
"id": "wmUD2wbl",
|
|
723
|
-
"block": "[[[10,0],[14,0,\"chat-input-container\"],[14,\"data-scopedcss-be6c467814-5d5036e80a\",\"\"],[12],[1,\"\\n \"],[10,\"label\"],[14,\"for\",\"ai-chat-input\"],[14,0,\"boxel-sr-only\"],[14,\"data-scopedcss-be6c467814-5d5036e80a\",\"\"],[12],[1,\"\\n Enter text to chat with AI Assistant\\n \"],[13],[1,\"\\n\"],[41,[30,1],[[[1,\" \"],[8,[30,1],[[24,\"data-scopedcss-be6c467814-5d5036e80a\",\"\"]],null,null],[1,\"\\n\"]],[]],null],[1,\" \"],[10,0],[14,0,\"input-and-clone\"],[14,\"data-scopedcss-be6c467814-5d5036e80a\",\"\"],[12],[1,\"\\n \"],[11,\"textarea\"],[24,0,\"chat-input\"],[24,1,\"ai-chat-input\"],[16,2,[30,2]],[24,\"placeholder\",\"Enter a prompt\"],[24,\"rows\",\"1\"],[24,\"data-test-boxel-input-id\",\"ai-chat-input\"],[17,3],[24,\"data-scopedcss-be6c467814-5d5036e80a\",\"\"],[4,[32,0],[\"input\",[28,[32,1],[\"target.value\",[30,4]],null]],null],[4,[32,0],[\"paste\",[30,0,[\"onPaste\"]]],null],[4,[32,2],[\"Shift+Enter\",[30,0,[\"insertNewLine\"]]],null],[4,[32,2],[\"Enter\",[30,0,[\"onSend\"]]],null],[12],[13],[1,\" \"],[10,0],[14,0,\"clone\"],[14,\"data-scopedcss-be6c467814-5d5036e80a\",\"\"],[12],[1,[30,2]],[13],[1,\"\\n \"],[13],[1,\"\\n \"],[8,[32,3],[[16,\"disabled\",[28,[32,4],[[30,5]],null]],[16,\"data-test-can-send-msg\",[30,5]],[24,0,\"send-button\"],[24,\"aria-label\",\"Send\"],[24,\"data-test-send-message-btn\",\"\"],[24,\"data-scopedcss-be6c467814-5d5036e80a\",\"\"],[4,[32,0],[\"click\",[30,0,[\"onSend\"]]],null]],[[\"@loading\",\"@variant\",\"@icon\",\"@height\",\"@width\"],[[30,6],\"primary\",[32,5],\"20\",\"25\"]],null],[1,\"\\n\"],[13],[1,\"\\n\"]],[\"@attachButton\",\"@value\",\"&attrs\",\"@onInput\",\"@canSend\",\"@isSending\"],[\"if\"]]",
|
|
724
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/chat-input/index.gts",
|
|
725
|
-
"scope": () => [
|
|
726
|
-
on,
|
|
727
|
-
pick,
|
|
728
|
-
modifier$1,
|
|
729
|
-
IconButton,
|
|
730
|
-
not,
|
|
731
|
-
IconComponent$9
|
|
732
|
-
],
|
|
733
|
-
"isStrictMode": true
|
|
734
|
-
}), this);
|
|
735
|
-
}
|
|
736
|
-
onSend(ev) {
|
|
737
|
-
ev.preventDefault();
|
|
738
|
-
if ("shiftKey" in ev && ev.shiftKey) return;
|
|
739
|
-
if (!this.args.canSend) return;
|
|
740
|
-
this.args.onSend();
|
|
741
|
-
}
|
|
742
|
-
static {
|
|
743
|
-
decorateMethodV2(this.prototype, "onSend", [action]);
|
|
744
|
-
}
|
|
745
|
-
onPaste(event) {
|
|
746
|
-
this.args.onPaste?.(event);
|
|
747
|
-
}
|
|
748
|
-
static {
|
|
749
|
-
decorateMethodV2(this.prototype, "onPaste", [action]);
|
|
750
|
-
}
|
|
751
|
-
insertNewLine(event) {
|
|
752
|
-
const textarea = event.target;
|
|
753
|
-
if (!textarea) return;
|
|
754
|
-
const value = this.args.value;
|
|
755
|
-
const startPos = textarea.selectionStart;
|
|
756
|
-
const endPos = textarea.selectionEnd;
|
|
757
|
-
const newValue = `${value.substring(0, startPos)}\n\n${value.substring(endPos)}`;
|
|
758
|
-
this.args.onInput(newValue);
|
|
759
|
-
next(() => {
|
|
760
|
-
textarea.selectionStart = textarea.selectionEnd = startPos + 2;
|
|
761
|
-
});
|
|
762
|
-
}
|
|
763
|
-
static {
|
|
764
|
-
decorateMethodV2(this.prototype, "insertNewLine", [action]);
|
|
765
|
-
}
|
|
766
|
-
};
|
|
767
|
-
//#endregion
|
|
768
|
-
//#region ../boxel-icons/dist/@cardstack/boxel-icons/v1/icons/square-dashed-mouse-pointer.js
|
|
769
|
-
var IconComponent = setComponentTemplate(templateFactory({
|
|
770
|
-
"id": "wUSyjLlW",
|
|
771
|
-
"block": "[[[1,\"\\n \"],[11,\"svg\"],[24,\"xmlns\",\"http://www.w3.org/2000/svg\",\"http://www.w3.org/2000/xmlns/\"],[24,\"width\",\"24\"],[24,\"height\",\"24\"],[24,\"fill\",\"none\"],[24,\"stroke\",\"currentColor\"],[24,\"stroke-linecap\",\"round\"],[24,\"stroke-linejoin\",\"round\"],[24,\"stroke-width\",\"2\"],[24,0,\"lucide lucide-square-dashed-mouse-pointer\"],[24,\"viewBox\",\"0 0 24 24\"],[17,1],[12],[10,\"path\"],[14,\"d\",\"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033zM5 3a2 2 0 0 0-2 2M19 3a2 2 0 0 1 2 2M5 21a2 2 0 0 1-2-2M9 3h1M9 21h2M14 3h1M3 9v1M21 9v2M3 14v1\"],[12],[13],[13],[1,\"\\n\"]],[\"&attrs\"],[]]",
|
|
772
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/boxel-icons/src/icons/square-dashed-mouse-pointer.gts",
|
|
773
|
-
"isStrictMode": true
|
|
774
|
-
}), templateOnly());
|
|
775
|
-
IconComponent.name = "square-dashed-mouse-pointer";
|
|
776
|
-
//#endregion
|
|
777
|
-
//#region app/components/ai-assistant/focus-pill/index.gts
|
|
778
|
-
var FocusPill = setComponentTemplate(templateFactory({
|
|
779
|
-
"id": "Ab+cYkf4",
|
|
780
|
-
"block": "[[[8,[32,0],[[24,0,\"ai-focus-pill\"],[24,\"data-test-focus-pill-main\",\"\"],[17,1],[24,\"data-scopedcss-e08b2c0a46-ca8fee692c\",\"\"]],[[\"@variant\"],[\"muted\"]],[[\"iconLeft\",\"default\"],[[[[1,\"\\n \"],[8,[32,1],[[24,\"width\",\"16\"],[24,\"height\",\"16\"],[24,\"data-scopedcss-e08b2c0a46-ca8fee692c\",\"\"]],null,null],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[10,1],[14,0,\"boxel-ellipsize\"],[15,\"title\",[30,2]],[14,\"data-scopedcss-e08b2c0a46-ca8fee692c\",\"\"],[12],[1,[30,2]],[13],[1,\"\\n\"],[42,[28,[31,1],[[28,[31,1],[[30,3]],null]],null],null,[[[1,\" \"],[8,[32,0],[[24,0,\"meta-pill boxel-ellipsize\"],[24,\"data-test-focus-pill-meta\",\"\"],[24,\"data-scopedcss-e08b2c0a46-ca8fee692c\",\"\"]],[[\"@pillBackgroundColor\"],[\"#777\"]],[[\"default\"],[[[[1,\"\\n \"],[1,[30,4]],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[4]],null],[1,\" \"]],[]]]]],[1,\"\\n\\n\"]],[\"&attrs\",\"@label\",\"@metaPills\",\"metaPill\"],[\"each\",\"-track-array\"]]",
|
|
781
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/focus-pill/index.gts",
|
|
782
|
-
"scope": () => [Pill, IconComponent],
|
|
783
|
-
"isStrictMode": true
|
|
784
|
-
}), templateOnly());
|
|
785
|
-
//#endregion
|
|
786
|
-
//#region app/lib/format-token-usage.ts
|
|
787
|
-
function formatTokenUsage(usage) {
|
|
788
|
-
let format = (count) => count == null ? "?" : count.toLocaleString();
|
|
789
|
-
let input = `${format(usage.promptTokens)} in`;
|
|
790
|
-
if (usage.cachedTokens != null) input += ` (${format(usage.cachedTokens)} cached)`;
|
|
791
|
-
let parts = [input, `${format(usage.completionTokens)} out`];
|
|
792
|
-
if (usage.costUsd != null) parts.push(`$${usage.costUsd.toFixed(4)}`);
|
|
793
|
-
return parts.join(" · ");
|
|
794
|
-
}
|
|
795
|
-
//#endregion
|
|
796
|
-
//#region app/components/ai-assistant/message/attachments.gts
|
|
797
|
-
function findAttachedCardAsFile(attachedCardsAsFiles, card) {
|
|
798
|
-
return attachedCardsAsFiles?.find((file) => file.sourceUrl === card.id);
|
|
799
|
-
}
|
|
800
|
-
var Attachments = class extends Component {
|
|
801
|
-
static {
|
|
802
|
-
decorateFieldV2(this.prototype, "network", [service]);
|
|
803
|
-
}
|
|
804
|
-
#network = (initializeDeferredDecorator(this, "network"), void 0);
|
|
805
|
-
cardErrorRealm = (cardError) => {
|
|
806
|
-
if (cardError.realm) return cardError.realm;
|
|
807
|
-
let id = cardError.id;
|
|
808
|
-
if (!id) return "";
|
|
809
|
-
try {
|
|
810
|
-
let url = this.network.virtualNetwork.toURL(id);
|
|
811
|
-
let lastSlashIndex = url.pathname.lastIndexOf("/");
|
|
812
|
-
let pathname = lastSlashIndex >= 0 ? url.pathname.slice(0, lastSlashIndex + 1) : "/";
|
|
813
|
-
return `${url.origin}${pathname}`;
|
|
814
|
-
} catch {
|
|
815
|
-
return id;
|
|
816
|
-
}
|
|
817
|
-
};
|
|
818
|
-
cardErrorDisplayTitle = (cardError) => {
|
|
819
|
-
if (cardError.meta.cardTitle) return cardError.meta.cardTitle;
|
|
820
|
-
let id = cardError.id;
|
|
821
|
-
if (!id) return "Unavailable card";
|
|
822
|
-
let path = id;
|
|
823
|
-
try {
|
|
824
|
-
path = this.network.virtualNetwork.toURL(id).pathname;
|
|
825
|
-
} catch {}
|
|
826
|
-
if (path.startsWith("/")) path = path.slice(1);
|
|
827
|
-
return path.split("/").filter(Boolean).slice(-2).join("/").replace(/\.[^.]+$/, "") || "Unavailable card";
|
|
828
|
-
};
|
|
829
|
-
static {
|
|
830
|
-
setComponentTemplate(templateFactory({
|
|
831
|
-
"id": "J5FJHQzR",
|
|
832
|
-
"block": "[[[10,\"ul\"],[14,0,\"items\"],[14,\"data-test-message-items\",\"\"],[14,\"data-scopedcss-778f828930-f8c8ebfdca\",\"\"],[12],[1,\"\\n\"],[42,[28,[31,1],[[28,[31,1],[[30,1]],null]],null],null,[[[41,[28,[32,0],[[30,2]],null],[[[42,[28,[31,1],[[28,[31,1],[[30,2,[\"cards\"]]],null]],null],null,[[[1,\" \"],[10,\"li\"],[14,\"data-scopedcss-778f828930-f8c8ebfdca\",\"\"],[12],[1,\"\\n\"],[44,[[28,[32,1],[[30,4],[30,3]],null]],[[[1,\" \"],[8,[32,2],[[24,\"data-scopedcss-778f828930-f8c8ebfdca\",\"\"]],[[\"@cardId\",\"@file\",\"@borderType\",\"@urlForRealmLookup\",\"@fileActionsEnabled\"],[[30,3,[\"id\"]],[30,5],\"solid\",[28,[32,3],[[30,3]],null],[52,[30,5],true,false]]],null],[1,\"\\n\"]],[5]]],[1,\" \"],[13],[1,\"\\n\"]],[3]],null],[42,[28,[31,1],[[28,[31,1],[[30,2,[\"cardErrors\"]]],null]],null],null,[[[41,[30,6,[\"id\"]],[[[1,\" \"],[10,\"li\"],[14,\"data-scopedcss-778f828930-f8c8ebfdca\",\"\"],[12],[1,\"\\n \"],[8,[32,2],[[16,\"title\",[30,6,[\"id\"]]],[24,\"data-theme\",\"light\"],[16,\"data-test-attached-card-error\",[30,6,[\"id\"]]],[24,\"data-scopedcss-778f828930-f8c8ebfdca\",\"\"]],[[\"@cardId\",\"@displayTitle\",\"@borderType\",\"@showErrorIcon\",\"@urlForRealmLookup\"],[[30,6,[\"id\"]],[28,[30,0,[\"cardErrorDisplayTitle\"]],[[30,6]],null],\"solid\",true,[28,[30,0,[\"cardErrorRealm\"]],[[30,6]],null]]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null]],[6]],null]],[]],[[[1,\" \"],[10,\"li\"],[14,\"data-scopedcss-778f828930-f8c8ebfdca\",\"\"],[12],[1,\"\\n \"],[8,[32,4],[[24,\"data-scopedcss-778f828930-f8c8ebfdca\",\"\"]],[[\"@file\",\"@borderType\",\"@onDownload\",\"@fileActionsEnabled\"],[[30,2],\"solid\",[28,[32,5],[[30,2],[30,7]],null],true]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]]]],[2]],null],[13],[1,\"\\n\"]],[\"@items\",\"item\",\"card\",\"@attachedCardsAsFiles\",\"file\",\"cardError\",\"@downloadFile\"],[\"each\",\"-track-array\",\"if\",\"let\"]]",
|
|
833
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/message/attachments.gts",
|
|
834
|
-
"scope": () => [
|
|
835
|
-
isCardCollectionResource,
|
|
836
|
-
findAttachedCardAsFile,
|
|
837
|
-
CardPill,
|
|
838
|
-
urlForRealmLookup,
|
|
839
|
-
FilePill,
|
|
840
|
-
onDownload
|
|
841
|
-
],
|
|
842
|
-
"isStrictMode": true
|
|
843
|
-
}), this);
|
|
844
|
-
}
|
|
845
|
-
};
|
|
846
|
-
function isCardCollectionResource(obj) {
|
|
847
|
-
return "value" in obj;
|
|
848
|
-
}
|
|
849
|
-
function onDownload(item, downloadFile) {
|
|
850
|
-
return downloadFile ? () => downloadFile(item) : void 0;
|
|
851
|
-
}
|
|
852
|
-
//#endregion
|
|
853
|
-
//#region app/components/ai-assistant/message/compaction-status.gts
|
|
854
|
-
var descriptions = {
|
|
855
|
-
running: "Summarizing earlier conversation",
|
|
856
|
-
done: "Summarized earlier conversation",
|
|
857
|
-
failed: "Could not summarize earlier conversation"
|
|
858
|
-
};
|
|
859
|
-
var states = {
|
|
860
|
-
running: "applying",
|
|
861
|
-
done: "applied",
|
|
862
|
-
failed: "failed"
|
|
863
|
-
};
|
|
864
|
-
var CompactionStatus = class extends Component {
|
|
865
|
-
static {
|
|
866
|
-
decorateFieldV2(this.prototype, "isDisplayingSummary", [tracked], function() {
|
|
867
|
-
return false;
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
#isDisplayingSummary = (initializeDeferredDecorator(this, "isDisplayingSummary"), void 0);
|
|
871
|
-
get description() {
|
|
872
|
-
return descriptions[this.args.compaction.status];
|
|
873
|
-
}
|
|
874
|
-
get state() {
|
|
875
|
-
return states[this.args.compaction.status];
|
|
876
|
-
}
|
|
877
|
-
get summary() {
|
|
878
|
-
return this.args.compaction.summary ?? "";
|
|
879
|
-
}
|
|
880
|
-
get toggleSummary() {
|
|
881
|
-
return this.summary ? this.toggle : void 0;
|
|
882
|
-
}
|
|
883
|
-
toggle = () => {
|
|
884
|
-
this.isDisplayingSummary = !this.isDisplayingSummary;
|
|
885
|
-
};
|
|
886
|
-
noop = () => {};
|
|
887
|
-
static {
|
|
888
|
-
setComponentTemplate(templateFactory({
|
|
889
|
-
"id": "iY2P7zn5",
|
|
890
|
-
"block": "[[[11,0],[24,0,\"compaction-status\"],[16,\"data-test-compaction-status\",[30,1,[\"status\"]]],[17,2],[24,\"data-scopedcss-093ba8831d-977f07604f\",\"\"],[12],[1,\"\\n \"],[8,[32,0],[[24,\"data-scopedcss-093ba8831d-977f07604f\",\"\"]],[[\"@action\",\"@actionVerb\",\"@code\",\"@commandDescription\",\"@toolCallState\",\"@isCompact\",\"@isDisplayingCode\",\"@toggleCode\"],[[30,0,[\"noop\"]],\"\",[30,0,[\"summary\"]],[30,0,[\"description\"]],[30,0,[\"state\"]],true,[30,0,[\"isDisplayingSummary\"]],[30,0,[\"toggleSummary\"]]]],null],[1,\"\\n\"],[41,[30,0,[\"isDisplayingSummary\"]],[[[1,\" \"],[10,0],[14,0,\"summary\"],[14,\"data-test-compaction-summary\",\"\"],[14,\"data-scopedcss-093ba8831d-977f07604f\",\"\"],[12],[1,\"\\n \"],[1,[30,0,[\"summary\"]]],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[13],[1,\"\\n\"]],[\"@compaction\",\"&attrs\"],[\"if\"]]",
|
|
891
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/message/compaction-status.gts",
|
|
892
|
-
"scope": () => [CodeBlockToolCallHeader],
|
|
893
|
-
"isStrictMode": true
|
|
894
|
-
}), this);
|
|
895
|
-
}
|
|
896
|
-
};
|
|
897
|
-
//#endregion
|
|
898
|
-
//#region app/components/ai-assistant/message/meta.gts
|
|
899
|
-
var MessageMeta = setComponentTemplate(templateFactory({
|
|
900
|
-
"id": "jQO6a+sI",
|
|
901
|
-
"block": "[[[11,\"section\"],[24,0,\"meta\"],[17,1],[24,\"data-scopedcss-7007737f56-8201dec452\",\"\"],[12],[1,\"\\n\"],[41,[30,2],[[[1,\" \"],[10,0],[15,0,[29,[\"ai-avatar \",[52,[30,3],\"ai-avatar-animated\"]]]],[14,\"aria-label\",\"ai bot\"],[14,\"data-test-ai-avatar\",\"\"],[14,\"data-scopedcss-7007737f56-8201dec452\",\"\"],[12],[13],[1,\"\\n\"]],[]],[[[41,[30,4],[[[1,\" \"],[8,[30,4],[[24,\"data-scopedcss-7007737f56-8201dec452\",\"\"]],null,null],[1,\"\\n \"]],[]],null]],[]]],[1,\" \"],[10,\"time\"],[15,\"datetime\",[28,[32,0],[[30,5]],null]],[14,0,\"time\"],[14,\"data-scopedcss-7007737f56-8201dec452\",\"\"],[12],[1,\"\\n \"],[1,[28,[32,1],[[30,5],\"iiii MMM d, yyyy, h:mm aa\"],null]],[1,\"\\n \"],[13],[1,\"\\n\"],[13],[1,\"\\n\\n\"]],[\"&attrs\",\"@isFromAssistant\",\"@isAvatarAnimated\",\"@profileAvatar\",\"@datetime\"],[\"if\"]]",
|
|
902
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/message/meta.gts",
|
|
903
|
-
"scope": () => [formatISO, format],
|
|
904
|
-
"isStrictMode": true
|
|
905
|
-
}), templateOnly());
|
|
906
|
-
//#endregion
|
|
907
|
-
//#region app/components/ai-assistant/message/index.gts
|
|
908
|
-
var MessageScroller = class extends ClassBasedModifier {
|
|
909
|
-
hasRegistered = false;
|
|
910
|
-
observer;
|
|
911
|
-
element;
|
|
912
|
-
index;
|
|
913
|
-
unregisterScroller;
|
|
914
|
-
hasDestructor = false;
|
|
915
|
-
modify(element, _positional, { index, registerScroller, unregisterScroller }) {
|
|
916
|
-
if (!this.hasDestructor) {
|
|
917
|
-
this.hasDestructor = true;
|
|
918
|
-
registerDestructor(this, () => this.unregister());
|
|
919
|
-
}
|
|
920
|
-
if (this.element !== element || this.index !== index || this.unregisterScroller !== unregisterScroller) {
|
|
921
|
-
this.unregister();
|
|
922
|
-
this.element = element;
|
|
923
|
-
this.index = index;
|
|
924
|
-
this.unregisterScroller = unregisterScroller;
|
|
925
|
-
this.hasRegistered = false;
|
|
926
|
-
}
|
|
927
|
-
if (!this.hasRegistered) {
|
|
928
|
-
this.hasRegistered = true;
|
|
929
|
-
registerScroller({
|
|
930
|
-
index,
|
|
931
|
-
element,
|
|
932
|
-
scrollTo: element.scrollIntoView.bind(element)
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
this.observer?.disconnect();
|
|
936
|
-
this.observer = new MutationObserver(() => {
|
|
937
|
-
registerScroller({
|
|
938
|
-
index,
|
|
939
|
-
element,
|
|
940
|
-
scrollTo: element.scrollIntoView.bind(element)
|
|
941
|
-
});
|
|
942
|
-
});
|
|
943
|
-
this.observer.observe(element, {
|
|
944
|
-
childList: true,
|
|
945
|
-
subtree: true
|
|
946
|
-
});
|
|
947
|
-
}
|
|
948
|
-
unregister() {
|
|
949
|
-
this.observer?.disconnect();
|
|
950
|
-
this.observer = void 0;
|
|
951
|
-
this.hasRegistered = false;
|
|
952
|
-
if (this.element && this.index != null && this.unregisterScroller) this.unregisterScroller({
|
|
953
|
-
index: this.index,
|
|
954
|
-
element: this.element
|
|
955
|
-
});
|
|
956
|
-
this.element = void 0;
|
|
957
|
-
this.index = void 0;
|
|
958
|
-
this.unregisterScroller = void 0;
|
|
959
|
-
}
|
|
960
|
-
};
|
|
961
|
-
var ScrollPosition = class extends ClassBasedModifier {
|
|
962
|
-
element;
|
|
963
|
-
setScrollPosition;
|
|
964
|
-
hasDestructor = false;
|
|
965
|
-
detectPosition = throttle(() => {
|
|
966
|
-
let element = this.element;
|
|
967
|
-
let setScrollPosition = this.setScrollPosition;
|
|
968
|
-
if (!element || !setScrollPosition) return;
|
|
969
|
-
setScrollPosition({ isBottom: Math.abs(element.scrollHeight - element.clientHeight - element.scrollTop) <= 50 });
|
|
970
|
-
}, 500);
|
|
971
|
-
clientHeightBeforeResize;
|
|
972
|
-
handleResize = () => {
|
|
973
|
-
let element = this.element;
|
|
974
|
-
if (!element) return;
|
|
975
|
-
let previousClientHeight = this.clientHeightBeforeResize;
|
|
976
|
-
this.clientHeightBeforeResize = element.clientHeight;
|
|
977
|
-
if (previousClientHeight == null || previousClientHeight === element.clientHeight) return;
|
|
978
|
-
if (element.scrollHeight - previousClientHeight - element.scrollTop <= 50) element.scrollTop = element.scrollHeight - element.clientHeight;
|
|
979
|
-
};
|
|
980
|
-
resizeObserver = new ResizeObserver(() => this.handleResize());
|
|
981
|
-
cleanup() {
|
|
982
|
-
if (this.element) this.element.removeEventListener("scroll", this.detectPosition);
|
|
983
|
-
this.detectPosition.cancel();
|
|
984
|
-
this.resizeObserver.disconnect();
|
|
985
|
-
this.element = void 0;
|
|
986
|
-
this.setScrollPosition = void 0;
|
|
987
|
-
this.clientHeightBeforeResize = void 0;
|
|
988
|
-
}
|
|
989
|
-
modify(element, _positional, { setScrollPosition, registerConversationScroller }) {
|
|
990
|
-
if (!this.hasDestructor) {
|
|
991
|
-
this.hasDestructor = true;
|
|
992
|
-
registerDestructor(this, () => this.cleanup());
|
|
993
|
-
}
|
|
994
|
-
this.setScrollPosition = setScrollPosition;
|
|
995
|
-
registerConversationScroller(() => element.scrollHeight > element.clientHeight, () => {
|
|
996
|
-
element.scrollTop = element.scrollHeight - element.clientHeight;
|
|
997
|
-
});
|
|
998
|
-
if (this.element !== element) {
|
|
999
|
-
this.detectPosition.cancel();
|
|
1000
|
-
this.element?.removeEventListener("scroll", this.detectPosition);
|
|
1001
|
-
this.element = element;
|
|
1002
|
-
element.addEventListener("scroll", this.detectPosition);
|
|
1003
|
-
this.clientHeightBeforeResize = element.clientHeight;
|
|
1004
|
-
this.resizeObserver.disconnect();
|
|
1005
|
-
this.resizeObserver.observe(element);
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
};
|
|
1009
|
-
var ReloadBillingOnInsert = class extends ClassBasedModifier {
|
|
1010
|
-
hasReloaded = false;
|
|
1011
|
-
runReload(reload) {
|
|
1012
|
-
reload();
|
|
1013
|
-
}
|
|
1014
|
-
modify(_element, _positional, { shouldReloadBillingData, reload }) {
|
|
1015
|
-
if (shouldReloadBillingData && !this.hasReloaded) {
|
|
1016
|
-
this.hasReloaded = true;
|
|
1017
|
-
scheduleOnce("afterRender", this, this.runReload, reload);
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
};
|
|
1021
|
-
function isThinkingMessage(s) {
|
|
1022
|
-
if (!s) return false;
|
|
1023
|
-
return s.trim() === "Thinking...";
|
|
1024
|
-
}
|
|
1025
|
-
function isPresent(val) {
|
|
1026
|
-
if (val?.toString) val = val?.toString().trim();
|
|
1027
|
-
return val ? val !== "" : false;
|
|
1028
|
-
}
|
|
1029
|
-
function attachedCardErrorMessages(errors) {
|
|
1030
|
-
let unreachableCount = 0;
|
|
1031
|
-
let runtimeErrorCount = 0;
|
|
1032
|
-
let genericErrorCount = 0;
|
|
1033
|
-
for (let error of errors) if (isUnreachableCardError(error)) unreachableCount++;
|
|
1034
|
-
else if (error.status >= 500) runtimeErrorCount++;
|
|
1035
|
-
else genericErrorCount++;
|
|
1036
|
-
return [
|
|
1037
|
-
...unreachableCount > 0 ? [unreachableCount === 1 ? `The card is unreachable. It may have been deleted, or you don't have permission to see it.` : `These cards are unreachable. They may have been deleted, or you don't have permission to see them.`] : [],
|
|
1038
|
-
...runtimeErrorCount > 0 ? [runtimeErrorCount === 1 ? `This card could not be displayed because it hit a runtime error.` : `Some cards could not be displayed because they hit runtime errors.`] : [],
|
|
1039
|
-
...genericErrorCount > 0 ? [genericErrorCount === 1 ? `This card could not be displayed because it has an error.` : `Some cards could not be displayed because they have errors.`] : []
|
|
1040
|
-
];
|
|
1041
|
-
}
|
|
1042
|
-
function isUnreachableCardError(error) {
|
|
1043
|
-
return [403, 404].includes(error.status);
|
|
1044
|
-
}
|
|
1045
|
-
var AiAssistantMessage = class extends Component {
|
|
1046
|
-
static {
|
|
1047
|
-
decorateFieldV2(this.prototype, "matrixService", [service]);
|
|
1048
|
-
}
|
|
1049
|
-
#matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
|
|
1050
|
-
static {
|
|
1051
|
-
decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
|
|
1052
|
-
}
|
|
1053
|
-
#operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
|
|
1054
|
-
static {
|
|
1055
|
-
decorateFieldV2(this.prototype, "billingService", [service]);
|
|
1056
|
-
}
|
|
1057
|
-
#billingService = (initializeDeferredDecorator(this, "billingService"), void 0);
|
|
1058
|
-
get isReasoningExpandedByDefault() {
|
|
1059
|
-
return this.args.isStreaming && !isPresent(this.args.messageHTML) && isPresent(this.args.reasoningContent) && !isThinkingMessage(this.args.reasoningContent);
|
|
1060
|
-
}
|
|
1061
|
-
get isReasoningExpanded() {
|
|
1062
|
-
return this.matrixService.reasoningExpandedState.get(this.args.eventId) ?? this.isReasoningExpandedByDefault;
|
|
1063
|
-
}
|
|
1064
|
-
updateReasoningExpanded = (ev) => {
|
|
1065
|
-
ev.preventDefault();
|
|
1066
|
-
this.matrixService.reasoningExpandedState.set(this.args.eventId, !this.isReasoningExpanded);
|
|
1067
|
-
};
|
|
1068
|
-
async downloadFile(file) {
|
|
1069
|
-
try {
|
|
1070
|
-
await this.matrixService.downloadAsFileInBrowser(file);
|
|
1071
|
-
} catch (error) {
|
|
1072
|
-
console.error("Error downloading file:", error);
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
static {
|
|
1076
|
-
decorateMethodV2(this.prototype, "downloadFile", [action]);
|
|
1077
|
-
}
|
|
1078
|
-
reloadBillingDataTask = buildTask(() => ({
|
|
1079
|
-
context: this,
|
|
1080
|
-
generator: function* () {
|
|
1081
|
-
if (!this.billingService.loadingSubscriptionData) yield this.billingService.loadSubscriptionData();
|
|
1082
|
-
}
|
|
1083
|
-
}), null, "reloadBillingDataTask", null);
|
|
1084
|
-
static {
|
|
1085
|
-
setComponentTemplate(templateFactory({
|
|
1086
|
-
"id": "rSLt4YNZ",
|
|
1087
|
-
"block": "[[[11,\"section\"],[16,0,[28,[32,0],[\"ai-assistant-message\"],[[\"meta-hidden\",\"code-patch-correctness\"],[[30,1],[30,2]]]]],[24,\"data-test-ai-assistant-message\",\"\"],[16,\"data-test-ai-assistant-message-pending\",[30,3]],[17,4],[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"],[4,[32,1],null,[[\"index\",\"registerScroller\",\"unregisterScroller\"],[[30,5],[30,6],[30,7]]]],[4,[32,2],null,[[\"shouldReloadBillingData\",\"reload\"],[[30,0,[\"shouldReloadBillingData\"]],[28,[32,3],[[30,0,[\"reloadBillingDataTask\"]]],null]]]],[12],[1,\"\\n\"],[41,[51,[30,1]],[[[1,\" \"],[8,[32,4],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@datetime\",\"@isFromAssistant\",\"@profileAvatar\",\"@isAvatarAnimated\"],[[30,8],[30,9],[30,10],[30,0,[\"isAvatarAnimated\"]]]],null],[1,\"\\n\"]],[]],null],[1,\" \"],[10,0],[14,0,\"content\"],[14,\"data-test-ai-message-content\",\"\"],[14,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"],[12],[1,\"\\n\"],[41,[30,9],[[[41,[30,11],[[[1,\" \"],[8,[32,5],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@compaction\"],[[30,11]]],null],[1,\"\\n\"]],[]],null],[41,[30,0,[\"hasBotMessage\"]],[[[1,\" \"],[8,[32,6],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@monacoSDK\",\"@htmlParts\",\"@roomId\",\"@eventId\",\"@isStreaming\",\"@reasoning\"],[[30,12],[30,13],[30,14],[30,15],[30,16],[52,[30,0,[\"reasoningContent\"]],[28,[32,7],null,[[\"content\",\"isExpanded\",\"updateExpanded\"],[[30,0,[\"reasoningContent\"]],[30,0,[\"isReasoningExpanded\"]],[30,0,[\"updateReasoningExpanded\"]]]]]]]],null],[1,\"\\n\"]],[]],null],[41,[30,0,[\"hasItems\"]],[[[1,\" \"],[8,[32,8],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@items\",\"@downloadFile\"],[[30,0,[\"items\"]],[52,[30,17],[30,0,[\"downloadFile\"]]]]],null],[1,\"\\n\"]],[]],null]],[]],[[[1,\" \"],[8,[32,9],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@html\",\"@isPending\"],[[30,18],[30,3]]],[[\"default\"],[[[[1,\"\\n\"],[41,[30,0,[\"hasItems\"]],[[[1,\" \"],[8,[32,8],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@items\",\"@attachedCardsAsFiles\",\"@downloadFile\"],[[30,0,[\"items\"]],[30,19],[52,[30,17],[30,0,[\"downloadFile\"]]]]],null],[1,\"\\n\"]],[]],null],[1,\" \"]],[]]]]],[1,\"\\n\"]],[]]],[1,\"\\n \"],[18,24,null],[1,\"\\n\\n\"],[41,[30,0,[\"errorMessages\",\"length\"]],[[[41,[30,0,[\"isOutOfCreditsErrorMessage\"]],[[[1,\" \"],[8,[32,10],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@type\"],[\"error\"]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,20,[\"Messages\"]],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@messages\"],[[30,0,[\"errorMessages\"]]]],null],[1,\"\\n\"],[41,[30,0,[\"isOutOfCredits\"]],[[[1,\" \"],[8,[30,20,[\"Action\"]],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@actionName\",\"@action\"],[\"Buy More Credits\",[30,0,[\"operatorModeStateService\",\"toggleProfileSettings\"]]]],null],[1,\"\\n\"]],[]],[[[41,[30,21],[[[1,\" \"],[10,0],[14,0,\"credits-action-row\"],[14,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"credits-added\"],[14,\"data-test-credits-added\",\"\"],[14,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"],[12],[1,\"\\n Credits added!\\n \"],[13],[1,\"\\n \"],[8,[30,20,[\"Action\"]],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@actionName\",\"@action\"],[\"Retry\",[30,21]]],null],[1,\"\\n \"],[13],[1,\"\\n \"]],[]],null]],[]]],[1,\" \"]],[20]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,10],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@type\"],[\"error\"]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,22,[\"Messages\"]],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@messages\"],[[30,0,[\"errorMessages\"]]]],null],[1,\"\\n\"],[41,[30,0,[\"hasAlertActions\"]],[[[1,\" \"],[10,0],[14,0,\"alert-action-buttons-row\"],[14,\"data-test-alert-action-buttons-row\",\"\"],[14,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"],[12],[1,\"\\n\"],[41,[30,23],[[[1,\" \"],[8,[30,22,[\"Action\"]],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@actionName\",\"@action\"],[\"Wait longer\",[30,23]]],null],[1,\"\\n\"]],[]],null],[41,[30,21],[[[1,\" \"],[8,[30,22,[\"Action\"]],[[24,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"]],[[\"@actionName\",\"@action\"],[\"Retry\",[30,21]]],null],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"]],[22]]]]],[1,\"\\n\"]],[]]]],[]],null],[1,\"\\n\"],[41,[30,0,[\"tokenUsage\"]],[[[1,\" \"],[10,0],[14,0,\"token-usage\"],[14,\"data-test-token-usage\",\"\"],[14,\"data-scopedcss-a985c327b3-784e6e2a40\",\"\"],[12],[1,\"\\n \"],[1,[30,0,[\"tokenUsage\"]]],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n\"],[13],[1,\"\\n\\n\"]],[\"@hideMeta\",\"@isCodePatchCorrectness\",\"@isPending\",\"&attrs\",\"@index\",\"@registerScroller\",\"@unregisterScroller\",\"@datetime\",\"@isFromAssistant\",\"@profileAvatar\",\"@compaction\",\"@monacoSDK\",\"@messageHTMLParts\",\"@roomId\",\"@eventId\",\"@isStreaming\",\"@isDebugMessage\",\"@messageHTML\",\"@attachedCardsAsFiles\",\"Alert\",\"@retryAction\",\"Alert\",\"@waitAction\",\"&default\"],[\"unless\",\"if\",\"yield\"]]",
|
|
1088
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/message/index.gts",
|
|
1089
|
-
"scope": () => [
|
|
1090
|
-
cn_default,
|
|
1091
|
-
MessageScroller,
|
|
1092
|
-
ReloadBillingOnInsert,
|
|
1093
|
-
perform,
|
|
1094
|
-
MessageMeta,
|
|
1095
|
-
CompactionStatus,
|
|
1096
|
-
FormattedAiBotMessage,
|
|
1097
|
-
hash,
|
|
1098
|
-
Attachments,
|
|
1099
|
-
UserMessage,
|
|
1100
|
-
Alert
|
|
1101
|
-
],
|
|
1102
|
-
"isStrictMode": true
|
|
1103
|
-
}), this);
|
|
1104
|
-
}
|
|
1105
|
-
get reasoningContent() {
|
|
1106
|
-
if (this.args.compaction?.status === "running" && isThinkingMessage(this.args.reasoningContent)) return null;
|
|
1107
|
-
return this.args.reasoningContent;
|
|
1108
|
-
}
|
|
1109
|
-
get hasBotMessage() {
|
|
1110
|
-
return this.args.messageHTMLParts?.length || this.reasoningContent;
|
|
1111
|
-
}
|
|
1112
|
-
get tokenUsage() {
|
|
1113
|
-
if (!this.operatorModeStateService.operatorModeController.showTokens) return;
|
|
1114
|
-
let { usage } = this.args;
|
|
1115
|
-
if (usage?.promptTokens == null && usage?.completionTokens == null) return;
|
|
1116
|
-
return formatTokenUsage(usage);
|
|
1117
|
-
}
|
|
1118
|
-
static {
|
|
1119
|
-
decorateMethodV2(this.prototype, "tokenUsage", [cached]);
|
|
1120
|
-
}
|
|
1121
|
-
get isAvatarAnimated() {
|
|
1122
|
-
return this.args.isStreaming && !this.args.errorMessage;
|
|
1123
|
-
}
|
|
1124
|
-
get hasItems() {
|
|
1125
|
-
return this.args.files && this.args.files.length > 0 || this.args.collectionResource && (this.args.collectionResource.cards.length > 0 || this.args.collectionResource.cardErrors.length > 0);
|
|
1126
|
-
}
|
|
1127
|
-
get items() {
|
|
1128
|
-
return [...this.args.collectionResource ? [this.args.collectionResource] : [], ...this.args.files ?? []];
|
|
1129
|
-
}
|
|
1130
|
-
get errorMessages() {
|
|
1131
|
-
return [...this.args.errorMessage ? [this.args.errorMessage] : [], ...attachedCardErrorMessages(this.args.collectionResource?.cardErrors ?? [])];
|
|
1132
|
-
}
|
|
1133
|
-
get hasAlertActions() {
|
|
1134
|
-
return Boolean(this.args.waitAction || this.args.retryAction);
|
|
1135
|
-
}
|
|
1136
|
-
get shouldReloadBillingData() {
|
|
1137
|
-
return Boolean(this.args.reloadBillingData && this.args.isMostRecentMessage);
|
|
1138
|
-
}
|
|
1139
|
-
get isOutOfCreditsErrorMessage() {
|
|
1140
|
-
return this.errorMessages.some((error) => /You need a minimum of \d+ credits to continue using the AI bot\. Please upgrade to a larger plan, or top up your account\./.test(error));
|
|
1141
|
-
}
|
|
1142
|
-
get hasMinimumCreditsToContinue() {
|
|
1143
|
-
return this.billingService.availableCredits >= 10;
|
|
1144
|
-
}
|
|
1145
|
-
get isOutOfCredits() {
|
|
1146
|
-
return !this.hasMinimumCreditsToContinue;
|
|
1147
|
-
}
|
|
1148
|
-
};
|
|
1149
|
-
var AiAssistantConversation = setComponentTemplate(templateFactory({
|
|
1150
|
-
"id": "zOdKsRSB",
|
|
1151
|
-
"block": "[[[11,\"section\"],[24,0,\"ai-assistant-conversation\"],[24,\"tabindex\",\"0\"],[24,\"aria-label\",\"AI Bot conversation\"],[24,\"aria-live\",\"polite\"],[24,\"data-test-ai-assistant-conversation\",\"\"],[24,\"data-scopedcss-a985c327b3-09ccd0174e\",\"\"],[4,[32,0],null,[[\"setScrollPosition\",\"registerConversationScroller\"],[[30,1],[30,2]]]],[12],[1,\"\\n \"],[18,3,null],[1,\"\\n\"],[13],[1,\"\\n\"]],[\"@setScrollPosition\",\"@registerConversationScroller\",\"&default\"],[\"yield\"]]",
|
|
1152
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/message/index.gts",
|
|
1153
|
-
"scope": () => [ScrollPosition],
|
|
1154
|
-
"isStrictMode": true
|
|
1155
|
-
}), templateOnly());
|
|
1156
|
-
//#endregion
|
|
1157
|
-
//#region app/helpers/consume-context.ts
|
|
1158
|
-
var consume_context_default = class extends Helper {
|
|
1159
|
-
static {
|
|
1160
|
-
__name(this, "default");
|
|
1161
|
-
}
|
|
1162
|
-
didRun = false;
|
|
1163
|
-
compute([consume]) {
|
|
1164
|
-
if (!this.didRun) {
|
|
1165
|
-
this.didRun = true;
|
|
1166
|
-
schedule("afterRender", consume);
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
};
|
|
1170
|
-
//#endregion
|
|
1171
|
-
//#region app/components/ai-assistant/skill-menu/skill-toggle.gts
|
|
1172
|
-
var SkillToggle = class extends Component {
|
|
1173
|
-
static {
|
|
1174
|
-
decorateFieldV2(this.prototype, "getCard", [consume(GetCardContextName)]);
|
|
1175
|
-
}
|
|
1176
|
-
#getCard = (initializeDeferredDecorator(this, "getCard"), void 0);
|
|
1177
|
-
static {
|
|
1178
|
-
decorateFieldV2(this.prototype, "realm", [service]);
|
|
1179
|
-
}
|
|
1180
|
-
#realm = (initializeDeferredDecorator(this, "realm"), void 0);
|
|
1181
|
-
static {
|
|
1182
|
-
decorateFieldV2(this.prototype, "toolService", [service]);
|
|
1183
|
-
}
|
|
1184
|
-
#toolService = (initializeDeferredDecorator(this, "toolService"), void 0);
|
|
1185
|
-
static {
|
|
1186
|
-
decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
|
|
1187
|
-
}
|
|
1188
|
-
#operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
|
|
1189
|
-
static {
|
|
1190
|
-
decorateFieldV2(this.prototype, "cardResource", [tracked]);
|
|
1191
|
-
}
|
|
1192
|
-
#cardResource = (initializeDeferredDecorator(this, "cardResource"), void 0);
|
|
1193
|
-
get isMarkdownSkill() {
|
|
1194
|
-
return isMarkdownSkillId(this.args.cardId);
|
|
1195
|
-
}
|
|
1196
|
-
makeCardResource = () => {
|
|
1197
|
-
this.cardResource = this.getCard(this, () => this.args.cardId, { type: this.isMarkdownSkill ? "file-meta" : "card" });
|
|
1198
|
-
};
|
|
1199
|
-
get card() {
|
|
1200
|
-
return this.cardResource?.card;
|
|
1201
|
-
}
|
|
1202
|
-
get isUnavailable() {
|
|
1203
|
-
return Boolean(this.cardResource?.cardError);
|
|
1204
|
-
}
|
|
1205
|
-
get displayTitle() {
|
|
1206
|
-
let card = this.card;
|
|
1207
|
-
if (!card) return "Untitled Skill";
|
|
1208
|
-
return card.cardTitle ?? card.title ?? card.frontmatter?.name ?? card.name ?? "Untitled Skill";
|
|
1209
|
-
}
|
|
1210
|
-
get isCreating() {
|
|
1211
|
-
return this.card && !this.card.id;
|
|
1212
|
-
}
|
|
1213
|
-
get menuItems() {
|
|
1214
|
-
return [new MenuItem({
|
|
1215
|
-
label: this.isMarkdownSkill ? "Open Skill File" : "Open Skill Card",
|
|
1216
|
-
action: this.openSkill
|
|
1217
|
-
})];
|
|
1218
|
-
}
|
|
1219
|
-
async openSkill() {
|
|
1220
|
-
if (this.isMarkdownSkill) await this.openSkillFile();
|
|
1221
|
-
else await this.openSkillCard();
|
|
1222
|
-
}
|
|
1223
|
-
static {
|
|
1224
|
-
decorateMethodV2(this.prototype, "openSkill", [action]);
|
|
1225
|
-
}
|
|
1226
|
-
async openSkillCard() {
|
|
1227
|
-
await new ShowCardTool(this.toolService.toolContext).execute({ cardId: this.args.cardId });
|
|
1228
|
-
}
|
|
1229
|
-
async openSkillFile() {
|
|
1230
|
-
let { operatorModeStateService: om } = this;
|
|
1231
|
-
if (om.state?.submode === "code") {
|
|
1232
|
-
await om.updateCodePath(new URL(this.args.cardId));
|
|
1233
|
-
return;
|
|
1234
|
-
}
|
|
1235
|
-
let newStackIndex = Math.min(om.numberOfStacks(), 1);
|
|
1236
|
-
let newStackItem = om.createStackItem(this.args.cardId, newStackIndex, "isolated", void 0, "file");
|
|
1237
|
-
om.addItemToStack(newStackItem);
|
|
1238
|
-
}
|
|
1239
|
-
static {
|
|
1240
|
-
setComponentTemplate(templateFactory({
|
|
1241
|
-
"id": "TZ5GLvt4",
|
|
1242
|
-
"block": "[[[1,[28,[32,0],[[30,0,[\"makeCardResource\"]]],null]],[1,\"\\n\"],[41,[30,0,[\"isUnavailable\"]],[[[1,\" \"],[10,0],[14,0,\"toggle-and-realm-icon\"],[14,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"],[12],[1,\"\\n \"],[8,[32,1],[[24,0,\"skill-toggle skill-toggle--unavailable\"],[16,\"data-test-skill-unavailable\",[30,1]],[17,2],[24,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"]],null,[[\"default\"],[[[[1,\"\\n \"],[10,0],[14,0,\"pill-content\"],[14,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"card-content\"],[15,\"title\",[30,1]],[14,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"],[12],[1,\"\\n Skill unavailable\\n \"],[13],[1,\"\\n \"],[13],[1,\"\\n \"]],[]]]]],[1,\"\\n \"],[8,[32,2],[[24,0,\"toggle\"],[16,\"data-test-skill-toggle\",[29,[[30,1],\"-\",[52,[30,3],\"on\",\"off\"]]]],[24,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"]],[[\"@isEnabled\",\"@onChange\",\"@label\"],[[28,[32,3],[[30,3]],null],[30,4],\"Skill unavailable\"]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[41,[30,0,[\"card\"]],[[[41,[30,0,[\"isCreating\"]],[[[1,\" \"],[8,[32,4],[[24,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"]],null,null],[1,\"\\n\"]],[]],[[[1,\" \"],[10,0],[14,0,\"toggle-and-realm-icon\"],[14,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"],[12],[1,\"\\n \"],[8,[32,5],[[24,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"]],[[\"@urlInRealm\"],[[30,5]]],[[\"default\"],[[[[1,\"\\n \"],[8,[32,6],[[24,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"]],[[\"@realmInfo\"],[[28,[30,0,[\"realm\",\"info\"]],[[30,5]],null]]],null],[1,\"\\n \"]],[]]]]],[1,\"\\n \"],[8,[32,1],[[24,0,\"skill-toggle\"],[16,\"data-test-attached-card\",[30,1]],[16,\"data-test-autoattached-card\",[30,6]],[17,2],[24,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"]],null,[[\"default\",\"iconRight\"],[[[[1,\"\\n \"],[10,0],[14,0,\"pill-content\"],[14,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"card-content\"],[15,\"title\",[30,0,[\"displayTitle\"]]],[14,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"],[12],[1,\"\\n \"],[1,[30,0,[\"displayTitle\"]]],[1,\"\\n \"],[13],[1,\"\\n \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[8,[32,7],[[24,0,\"skill-dropdown\"],[24,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"]],null,[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,8],[[24,0,\"skill-dropdown__trigger\"],[16,\"data-test-skill-options-button\",[30,1]],[24,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"],[4,[30,7],null,null]],[[\"@size\",\"@label\",\"@icon\"],[\"extra-small\",\"Skill options\",\"context-menu-vertical\"]],null],[1,\"\\n \"]],[7]],[[[1,\"\\n \"],[8,[32,9],[[24,0,\"skill-dropdown__menu\"],[24,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"]],[[\"@items\",\"@closeMenu\"],[[30,0,[\"menuItems\"]],[30,8,[\"close\"]]]],null],[1,\"\\n \"]],[8]]]]],[1,\"\\n \"]],[]]]]],[1,\"\\n \"],[8,[32,2],[[24,0,\"toggle\"],[16,\"data-test-skill-toggle\",[29,[[30,1],\"-\",[52,[30,3],\"on\",\"off\"]]]],[24,\"data-scopedcss-2724285e6e-7ceb57906d\",\"\"]],[[\"@isEnabled\",\"@onChange\",\"@label\"],[[28,[32,3],[[30,3]],null],[30,4],[30,0,[\"displayTitle\"]]]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]]]],[]],null]],[]]]],[\"@cardId\",\"&attrs\",\"@isEnabled\",\"@onToggle\",\"@urlForRealmLookup\",\"@isAutoAttachedCard\",\"bindings\",\"dd\"],[\"if\"]]",
|
|
1243
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/skill-menu/skill-toggle.gts",
|
|
1244
|
-
"scope": () => [
|
|
1245
|
-
consume_context_default,
|
|
1246
|
-
Pill,
|
|
1247
|
-
Switch,
|
|
1248
|
-
Boolean,
|
|
1249
|
-
LoadingIndicator,
|
|
1250
|
-
RealmURLTooltip,
|
|
1251
|
-
RealmIcon,
|
|
1252
|
-
BoxelDropdown,
|
|
1253
|
-
DropdownButton,
|
|
1254
|
-
Menu
|
|
1255
|
-
],
|
|
1256
|
-
"isStrictMode": true
|
|
1257
|
-
}), this);
|
|
1258
|
-
}
|
|
1259
|
-
};
|
|
1260
|
-
//#endregion
|
|
1261
|
-
//#region app/components/pill-menu/index.gts
|
|
1262
|
-
var waiter = buildWaiter("pill-menu:collapse-animation-waiter");
|
|
1263
|
-
var PillMenu = class extends Component {
|
|
1264
|
-
static {
|
|
1265
|
-
setComponentTemplate(templateFactory({
|
|
1266
|
-
"id": "JxsOgG+h",
|
|
1267
|
-
"block": "[[[41,[30,0,[\"isExpanded\"]],[[[1,\" \"],[11,0],[16,0,[29,[\"pill-menu\\n \",[52,[48,[30,2]],\"has-content-actions\"],\"\\n \",[52,[30,0,[\"isExpanding\"]],\"is-expanding\"],\"\\n \",[52,[30,0,[\"isCollapsing\"]],\"is-collapsing\"]]]],[17,1],[24,\"data-scopedcss-a60d4c9c1a-9572978145\",\"\"],[4,[32,0],[\"animationend\",[30,0,[\"handleMenuAnimationEnd\"]]],null],[4,[32,0],[\"animationcancel\",[30,0,[\"handleMenuAnimationEnd\"]]],null],[12],[1,\"\\n \"],[8,[32,1],[[24,0,\"menu-header\"],[24,\"data-test-pill-menu-header\",\"\"],[24,\"data-scopedcss-a60d4c9c1a-9572978145\",\"\"]],null,[[\"icon\",\"default\",\"detail\"],[[[[1,\"\\n \"],[18,3,null],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[11,\"button\"],[24,0,\"detail-close-button\"],[24,\"data-test-pill-menu-detail-close\",\"\"],[24,\"data-scopedcss-a60d4c9c1a-9572978145\",\"\"],[4,[32,0],[\"click\",[30,0,[\"collapseMenu\"]]],null],[12],[1,\"\\n \"],[18,4,null],[1,\"\\n \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[11,\"button\"],[24,0,\"header-button\"],[24,\"data-test-pill-menu-button\",\"\"],[24,\"data-scopedcss-a60d4c9c1a-9572978145\",\"\"],[4,[32,0],[\"click\",[30,0,[\"collapseMenu\"]]],null],[12],[1,\"\\n \"],[8,[32,2],[[24,0,\"collapse-icon\"],[24,\"width\",\"8px\"],[24,\"height\",\"8px\"],[24,\"data-scopedcss-a60d4c9c1a-9572978145\",\"\"]],null,null],[1,\"\\n \"],[13],[1,\"\\n \"]],[]]]]],[1,\"\\n \"],[10,0],[14,0,\"menu-content\"],[14,\"data-scopedcss-a60d4c9c1a-9572978145\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"menu-content-scroll\"],[14,\"data-scopedcss-a60d4c9c1a-9572978145\",\"\"],[12],[1,\"\\n \"],[18,5,null],[1,\"\\n\\n\"],[41,[48,[30,2]],[[[1,\" \"],[10,0],[14,0,\"menu-content-actions\"],[14,\"data-scopedcss-a60d4c9c1a-9572978145\",\"\"],[12],[1,\"\\n \"],[18,2,null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,3],[[24,0,\"pill-menu-button\"],[24,\"data-test-pill-menu-button\",\"\"],[17,1],[24,\"data-scopedcss-a60d4c9c1a-9572978145\",\"\"],[4,[32,0],[\"click\",[30,0,[\"expandMenu\"]]],null]],[[\"@kind\",\"@size\",\"@pill\"],[\"secondary\",\"extra-small\",true]],[[\"default\"],[[[[1,\"\\n \"],[18,3,null],[1,\"\\n \"],[18,4,null],[1,\"\\n \"],[8,[32,2],[[24,0,\"minimized-arrow\"],[24,\"width\",\"8px\"],[24,\"height\",\"8px\"],[24,\"data-scopedcss-a60d4c9c1a-9572978145\",\"\"]],null,null],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[]]]],[\"&attrs\",\"&contentActions\",\"&headerIcon\",\"&headerDetail\",\"&content\"],[\"if\",\"has-block\",\"yield\"]]",
|
|
1268
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/pill-menu/index.gts",
|
|
1269
|
-
"scope": () => [
|
|
1270
|
-
on,
|
|
1271
|
-
Header,
|
|
1272
|
-
IconComponent$10,
|
|
1273
|
-
ButtonComponent
|
|
1274
|
-
],
|
|
1275
|
-
"isStrictMode": true
|
|
1276
|
-
}), this);
|
|
1277
|
-
}
|
|
1278
|
-
static {
|
|
1279
|
-
decorateFieldV2(this.prototype, "isExpanded", [tracked], function() {
|
|
1280
|
-
return false;
|
|
1281
|
-
});
|
|
1282
|
-
}
|
|
1283
|
-
#isExpanded = (initializeDeferredDecorator(this, "isExpanded"), void 0);
|
|
1284
|
-
static {
|
|
1285
|
-
decorateFieldV2(this.prototype, "isExpanding", [tracked], function() {
|
|
1286
|
-
return false;
|
|
1287
|
-
});
|
|
1288
|
-
}
|
|
1289
|
-
#isExpanding = (initializeDeferredDecorator(this, "isExpanding"), void 0);
|
|
1290
|
-
static {
|
|
1291
|
-
decorateFieldV2(this.prototype, "isCollapsing", [tracked], function() {
|
|
1292
|
-
return false;
|
|
1293
|
-
});
|
|
1294
|
-
}
|
|
1295
|
-
#isCollapsing = (initializeDeferredDecorator(this, "isCollapsing"), void 0);
|
|
1296
|
-
collapseWaiterToken;
|
|
1297
|
-
constructor(owner, args) {
|
|
1298
|
-
super(owner, args);
|
|
1299
|
-
registerDestructor(this, () => this.releaseCollapseWaiter());
|
|
1300
|
-
}
|
|
1301
|
-
get prefersReducedMotion() {
|
|
1302
|
-
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1303
|
-
}
|
|
1304
|
-
expandMenu() {
|
|
1305
|
-
this.isCollapsing = false;
|
|
1306
|
-
this.releaseCollapseWaiter();
|
|
1307
|
-
this.isExpanded = true;
|
|
1308
|
-
this.isExpanding = !this.prefersReducedMotion;
|
|
1309
|
-
this.args.onExpand?.();
|
|
1310
|
-
}
|
|
1311
|
-
static {
|
|
1312
|
-
decorateMethodV2(this.prototype, "expandMenu", [action]);
|
|
1313
|
-
}
|
|
1314
|
-
collapseMenu() {
|
|
1315
|
-
if (this.isCollapsing) return;
|
|
1316
|
-
if (this.prefersReducedMotion) {
|
|
1317
|
-
this.finishCollapse();
|
|
1318
|
-
return;
|
|
1319
|
-
}
|
|
1320
|
-
this.isCollapsing = true;
|
|
1321
|
-
this.collapseWaiterToken = waiter.beginAsync();
|
|
1322
|
-
}
|
|
1323
|
-
static {
|
|
1324
|
-
decorateMethodV2(this.prototype, "collapseMenu", [action]);
|
|
1325
|
-
}
|
|
1326
|
-
handleMenuAnimationEnd(event) {
|
|
1327
|
-
if (!(event instanceof AnimationEvent) || event.target !== event.currentTarget) return;
|
|
1328
|
-
if (event.animationName.startsWith("pill-menu-expand")) {
|
|
1329
|
-
this.isExpanding = false;
|
|
1330
|
-
return;
|
|
1331
|
-
}
|
|
1332
|
-
if (this.isCollapsing && event.animationName.startsWith("pill-menu-collapse")) this.finishCollapse();
|
|
1333
|
-
}
|
|
1334
|
-
static {
|
|
1335
|
-
decorateMethodV2(this.prototype, "handleMenuAnimationEnd", [action]);
|
|
1336
|
-
}
|
|
1337
|
-
finishCollapse() {
|
|
1338
|
-
this.isCollapsing = false;
|
|
1339
|
-
this.releaseCollapseWaiter();
|
|
1340
|
-
this.isExpanded = false;
|
|
1341
|
-
this.args.onCollapse?.();
|
|
1342
|
-
}
|
|
1343
|
-
releaseCollapseWaiter() {
|
|
1344
|
-
if (this.collapseWaiterToken) {
|
|
1345
|
-
waiter.endAsync(this.collapseWaiterToken);
|
|
1346
|
-
this.collapseWaiterToken = void 0;
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
};
|
|
1350
|
-
//#endregion
|
|
1351
|
-
//#region app/components/ai-assistant/skill-menu/index.gts
|
|
1352
|
-
var import_pluralize = /* @__PURE__ */ __toESM(require_pluralize());
|
|
1353
|
-
var markdownDefRef = {
|
|
1354
|
-
module: baseRRI("markdown-file-def"),
|
|
1355
|
-
name: "MarkdownDef"
|
|
1356
|
-
};
|
|
1357
|
-
var AiAssistantSkillMenu = class extends Component {
|
|
1358
|
-
static {
|
|
1359
|
-
setComponentTemplate(templateFactory({
|
|
1360
|
-
"id": "yAuxUgmr",
|
|
1361
|
-
"block": "[[[8,[32,0],[[24,0,\"skill-menu\"],[17,1],[24,\"data-scopedcss-69ef22e013-d5d53fa194\",\"\"]],[[\"@onExpand\",\"@onCollapse\"],[[28,[32,1],[[30,0,[\"setExpanded\"]],true],null],[28,[32,1],[[30,0,[\"setExpanded\"]],false],null]]],[[\"headerDetail\",\"content\",\"contentActions\"],[[[[1,\"\\n \"],[10,1],[14,0,\"skills-length boxel-ellipsize\"],[14,\"data-test-active-skills-count\",\"\"],[14,\"data-scopedcss-69ef22e013-d5d53fa194\",\"\"],[12],[1,[30,0,[\"headerText\"]]],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[10,\"ul\"],[14,0,\"skill-list\"],[14,\"data-scopedcss-69ef22e013-d5d53fa194\",\"\"],[12],[1,\"\\n\"],[42,[28,[31,1],[[28,[31,1],[[30,2]],null]],null],\"cardId\",[[[1,\" \"],[10,\"li\"],[14,\"data-scopedcss-69ef22e013-d5d53fa194\",\"\"],[12],[1,\"\\n \"],[8,[32,2],[[16,\"data-test-pill-menu-item\",[30,3,[\"cardId\"]]],[24,\"data-scopedcss-69ef22e013-d5d53fa194\",\"\"]],[[\"@cardId\",\"@onToggle\",\"@isEnabled\",\"@urlForRealmLookup\"],[[30,3,[\"cardId\"]],[28,[32,1],[[30,0,[\"toggleSkill\"]],[30,3]],null],[30,3,[\"isActive\"]],[28,[30,0,[\"urlForRealmLookup\"]],[[30,3]],null]]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[3]],null],[1,\" \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[8,[32,3],[[24,0,\"attach-button\"],[24,\"data-test-pill-menu-add-button\",\"\"],[24,\"data-scopedcss-69ef22e013-d5d53fa194\",\"\"],[4,[32,4],[\"click\",[30,0,[\"attachSkillCard\"]]],null]],[[\"@kind\",\"@size\",\"@pill\",\"@disabled\",\"@loading\"],[\"secondary\",\"extra-small\",true,[30,0,[\"doAttachSkillCard\",\"isRunning\"]],[30,0,[\"isAttachingSkill\"]]]],[[\"default\"],[[[[1,\"\\n\"],[41,[30,0,[\"isAttachingSkill\"]],[[[1,\" Adding Skill\\n\"]],[]],[[[1,\" Choose a Skill to Add\\n\"]],[]]],[1,\" \"]],[]]]]],[1,\"\\n \"],[8,[32,3],[[24,0,\"attach-button\"],[24,\"data-test-pill-menu-add-markdown-button\",\"\"],[24,\"data-scopedcss-69ef22e013-d5d53fa194\",\"\"],[4,[32,4],[\"click\",[30,0,[\"attachSkillMarkdown\"]]],null]],[[\"@kind\",\"@size\",\"@pill\",\"@disabled\",\"@loading\"],[\"secondary\",\"extra-small\",true,[30,0,[\"doAttachSkillMarkdown\",\"isRunning\"]],[30,0,[\"isAttachingSkillMarkdown\"]]]],[[\"default\"],[[[[1,\"\\n\"],[41,[30,0,[\"isAttachingSkillMarkdown\"]],[[[1,\" Adding Skill\\n\"]],[]],[[[1,\" Choose a Skill File to Add\\n\"]],[]]],[1,\" \"]],[]]]]],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[\"&attrs\",\"@skills\",\"skill\"],[\"each\",\"-track-array\",\"if\"]]",
|
|
1362
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/skill-menu/index.gts",
|
|
1363
|
-
"scope": () => [
|
|
1364
|
-
PillMenu,
|
|
1365
|
-
fn,
|
|
1366
|
-
SkillToggle,
|
|
1367
|
-
ButtonComponent,
|
|
1368
|
-
on
|
|
1369
|
-
],
|
|
1370
|
-
"isStrictMode": true
|
|
1371
|
-
}), this);
|
|
1372
|
-
}
|
|
1373
|
-
static {
|
|
1374
|
-
decorateFieldV2(this.prototype, "isExpanded", [tracked], function() {
|
|
1375
|
-
return false;
|
|
1376
|
-
});
|
|
1377
|
-
}
|
|
1378
|
-
#isExpanded = (initializeDeferredDecorator(this, "isExpanded"), void 0);
|
|
1379
|
-
static {
|
|
1380
|
-
decorateFieldV2(this.prototype, "isAttachingSkill", [tracked], function() {
|
|
1381
|
-
return false;
|
|
1382
|
-
});
|
|
1383
|
-
}
|
|
1384
|
-
#isAttachingSkill = (initializeDeferredDecorator(this, "isAttachingSkill"), void 0);
|
|
1385
|
-
static {
|
|
1386
|
-
decorateFieldV2(this.prototype, "isAttachingSkillMarkdown", [tracked], function() {
|
|
1387
|
-
return false;
|
|
1388
|
-
});
|
|
1389
|
-
}
|
|
1390
|
-
#isAttachingSkillMarkdown = (initializeDeferredDecorator(this, "isAttachingSkillMarkdown"), void 0);
|
|
1391
|
-
urlForRealmLookup(skill) {
|
|
1392
|
-
return skill.fileDef.sourceUrl;
|
|
1393
|
-
}
|
|
1394
|
-
setExpanded(isExpanded) {
|
|
1395
|
-
this.isExpanded = isExpanded;
|
|
1396
|
-
if (isExpanded) this.args.onExpand?.();
|
|
1397
|
-
else this.args.onCollapse?.();
|
|
1398
|
-
}
|
|
1399
|
-
static {
|
|
1400
|
-
decorateMethodV2(this.prototype, "setExpanded", [action]);
|
|
1401
|
-
}
|
|
1402
|
-
get headerText() {
|
|
1403
|
-
if (this.isExpanded) return `Skills: ${this.activeSkills.length} of ${this.args.skills.length} active`;
|
|
1404
|
-
return `${this.activeSkills.length} ${(0, import_pluralize.default)("Skills", this.activeSkills.length)}`;
|
|
1405
|
-
}
|
|
1406
|
-
get activeSkills() {
|
|
1407
|
-
return this.args.skills?.filter((skill) => skill.isActive) ?? [];
|
|
1408
|
-
}
|
|
1409
|
-
attachSkillCard() {
|
|
1410
|
-
this.doAttachSkillCard.perform();
|
|
1411
|
-
}
|
|
1412
|
-
static {
|
|
1413
|
-
decorateMethodV2(this.prototype, "attachSkillCard", [action]);
|
|
1414
|
-
}
|
|
1415
|
-
doAttachSkillCard = buildTask(() => ({
|
|
1416
|
-
context: this,
|
|
1417
|
-
generator: function* () {
|
|
1418
|
-
let selectedCardIds = this.args.skills?.map((skill) => ({ not: { eq: { id: skill.cardId } } })) ?? [];
|
|
1419
|
-
let cardId = yield chooseCard({ filter: { every: [{ type: skillCardRef }, ...selectedCardIds] } });
|
|
1420
|
-
if (cardId) try {
|
|
1421
|
-
this.isAttachingSkill = true;
|
|
1422
|
-
yield this.args.onChooseCard?.(cardId);
|
|
1423
|
-
} finally {
|
|
1424
|
-
this.isAttachingSkill = false;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
}), null, "doAttachSkillCard", "restartable");
|
|
1428
|
-
attachSkillMarkdown() {
|
|
1429
|
-
this.doAttachSkillMarkdown.perform();
|
|
1430
|
-
}
|
|
1431
|
-
static {
|
|
1432
|
-
decorateMethodV2(this.prototype, "attachSkillMarkdown", [action]);
|
|
1433
|
-
}
|
|
1434
|
-
doAttachSkillMarkdown = buildTask(() => ({
|
|
1435
|
-
context: this,
|
|
1436
|
-
generator: function* () {
|
|
1437
|
-
let file = yield chooseFile({
|
|
1438
|
-
fileType: markdownDefRef,
|
|
1439
|
-
fileTypeName: "Skill",
|
|
1440
|
-
fileFieldFilter: { kind: "skill" }
|
|
1441
|
-
});
|
|
1442
|
-
if (file?.sourceUrl) try {
|
|
1443
|
-
this.isAttachingSkillMarkdown = true;
|
|
1444
|
-
yield this.args.onChooseSkillMarkdown?.(file.sourceUrl);
|
|
1445
|
-
} finally {
|
|
1446
|
-
this.isAttachingSkillMarkdown = false;
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
|
-
}), null, "doAttachSkillMarkdown", "restartable");
|
|
1450
|
-
toggleSkill(skill) {
|
|
1451
|
-
this.args.onUpdateSkillIsActive?.(!skill.isActive, skill.fileDef.sourceUrl);
|
|
1452
|
-
}
|
|
1453
|
-
static {
|
|
1454
|
-
decorateMethodV2(this.prototype, "toggleSkill", [action]);
|
|
1455
|
-
}
|
|
1456
|
-
};
|
|
1457
|
-
//#endregion
|
|
1458
|
-
//#region app/components/ai-assistant/ai-assist-icon@2x.webp
|
|
1459
|
-
var ai_assist_icon_2x_default = "data:image/webp;base64,UklGRoYDAABXRUJQVlA4WAoAAAAQAAAAMwAAMwAAQUxQSHIBAAABgJZtb9YqEioBCThYnRwcUAetg+EAHAwHw0HrAByAg+zzbRJ2/kcEA7dt48i9d2/JkjdQTYm/leAtUE0/wSxj1rLIWLSsgC4AViUtA7xH99DoCAjnEMFqXogKmlr1A9Fg07kd0RJ5xO7kNTNgo5c2dB/ZSevIiPRpjEijU4/5cB+3crBy2O8MCeBbwAP6mgn1K2MV+lJhrLVvP4jxdl+5pqPF9lhbuN9iZJE6bClWmghqsquVYlXNyyGy6KCltEJvLharosVDypYcKeTSJjn30JJafvg+dXqp846M5Hz33hZf+rvYceljBDabr95gcs0sMPuo2yVCBxJ6psyrFcpSW8qsVC9aZb3GOiOzRRFU+zKylYLa/1KaF4HZa/5d2zKnzxDdhNpC/ibXVkKj8swgWjs6iVUWyO7q8YmLMFBMutgyiQNS4VpEXdXjevzxlVh5uDNickcabejE+MzbOTnGWbmM0bQLaH5ObvYTOeC/yU8JVlA4IO4BAABQDQCdASo0ADQAPm0skkakIj+hMBIMA/ANiWwAuRfov4fAeaLWeyFGPhU7ernd/RzvIm8wgb58DypeQ+Xe6C73cPt4lM/nKeQIJaIh+0w5W06DfzKUkLwzzvI0Z1mZEQoj3f1onuOrUcKFF6G4HDt8nUWAAP7+9l3+RfZSNX2uw5INGJe5fm2NPbC9v4//Jv/Sx9j/wThZvDxAX6+Mski7H3YP9gB/k3PNtNddfbp/APAt2n27hXnf+Gf++NLmHyMMah7BB2pXZMN3Qjb1YTbt+t8um///sRDqdL/FwJsZtZqDVGGWWjryAzaiV4GXO9DN/CilzOvJ3+P+GViVOGsi8//fRQcxJxrwpy5j/k6GG/eHsYtaVAnhtMDGZXYGDJWdsDvL18YntWV/dv6PEtspt6inaWA38/NApOoAl5ehJRg2GZd/+UJn3EYhCqpJfPHRwUM1L2q/+Qi+Z3/GTAbNpdPy4fuPR+LFKfCJU59oVibJbYQ22VV/USYkoQuNLeNXhc9iUfBRZDLbZeSm4B0wopJ+X8Qr9/X0D9AjiTrBjN7wZcif+pif//6C1tTlo1jibaNsEftdPVofm//N2DLM8S1F3FdVFm/X+8oRGst0f0IATfAP/3iMwGZtTjWKkBM96hm4kqe9JzvZeAAAAA==";
|
|
1460
|
-
//#endregion
|
|
1461
|
-
//#region ../../node_modules/.pnpm/ember-click-outside@6.1.1_@babel+core@7.29.7_supports-color@8.1.1__supports-color@8.1.1/node_modules/ember-click-outside/dist/modifiers/on-click-outside.js
|
|
1462
|
-
function _defineProperty(obj, key, value) {
|
|
1463
|
-
key = _toPropertyKey(key);
|
|
1464
|
-
if (key in obj) Object.defineProperty(obj, key, {
|
|
1465
|
-
value,
|
|
1466
|
-
enumerable: true,
|
|
1467
|
-
configurable: true,
|
|
1468
|
-
writable: true
|
|
1469
|
-
});
|
|
1470
|
-
else obj[key] = value;
|
|
1471
|
-
return obj;
|
|
1472
|
-
}
|
|
1473
|
-
function _toPrimitive(input, hint) {
|
|
1474
|
-
if (typeof input !== "object" || input === null) return input;
|
|
1475
|
-
var prim = input[Symbol.toPrimitive];
|
|
1476
|
-
if (prim !== void 0) {
|
|
1477
|
-
var res = prim.call(input, hint || "default");
|
|
1478
|
-
if (typeof res !== "object") return res;
|
|
1479
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1480
|
-
}
|
|
1481
|
-
return (hint === "string" ? String : Number)(input);
|
|
1482
|
-
}
|
|
1483
|
-
function _toPropertyKey(arg) {
|
|
1484
|
-
var key = _toPrimitive(arg, "string");
|
|
1485
|
-
return typeof key === "symbol" ? key : String(key);
|
|
1486
|
-
}
|
|
1487
|
-
var proto = typeof Element !== "undefined" ? Element.prototype : {};
|
|
1488
|
-
var vendor = proto.matches || proto.matchesSelector || proto.webkitMatchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector;
|
|
1489
|
-
function matches(el, selector) {
|
|
1490
|
-
if (!el || el.nodeType !== 1) return false;
|
|
1491
|
-
if (vendor) return vendor.call(el, selector);
|
|
1492
|
-
var nodes = el.parentNode.querySelectorAll(selector);
|
|
1493
|
-
for (var i = 0; i < nodes.length; i++) if (nodes[i] == el) return true;
|
|
1494
|
-
return false;
|
|
1495
|
-
}
|
|
1496
|
-
function closest(element, selector) {
|
|
1497
|
-
if (matches(element, selector)) return element;
|
|
1498
|
-
while (element.parentNode) {
|
|
1499
|
-
element = element.parentNode;
|
|
1500
|
-
if (matches(element, selector)) return element;
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
var documentOrBodyContains = (element) => {
|
|
1504
|
-
if (typeof document.contains === "function") return document.contains(element);
|
|
1505
|
-
else return document.body.contains(element);
|
|
1506
|
-
};
|
|
1507
|
-
var ios = () => {
|
|
1508
|
-
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
1509
|
-
};
|
|
1510
|
-
var ClickOutsideModifier = class extends ClassBasedModifier {
|
|
1511
|
-
constructor() {
|
|
1512
|
-
super(...arguments);
|
|
1513
|
-
_defineProperty(this, "didSetup", false);
|
|
1514
|
-
_defineProperty(this, "action", null);
|
|
1515
|
-
_defineProperty(this, "capture", null);
|
|
1516
|
-
_defineProperty(this, "eventHandler", null);
|
|
1517
|
-
_defineProperty(this, "eventType", "click");
|
|
1518
|
-
_defineProperty(this, "exceptSelector", null);
|
|
1519
|
-
_defineProperty(this, "cancelOutsideListenerSetup", null);
|
|
1520
|
-
_defineProperty(this, "cleanup", () => {
|
|
1521
|
-
this._destroy();
|
|
1522
|
-
if (ios()) document.body.style.cursor = "";
|
|
1523
|
-
});
|
|
1524
|
-
registerDestructor(this, this.cleanup);
|
|
1525
|
-
}
|
|
1526
|
-
modify(element, [action], { capture, eventType, exceptSelector }) {
|
|
1527
|
-
if (!this.didSetup) {
|
|
1528
|
-
if (ios()) document.body.style.cursor = "pointer";
|
|
1529
|
-
this.didSetup = true;
|
|
1530
|
-
} else this._destroy();
|
|
1531
|
-
this._init({
|
|
1532
|
-
element,
|
|
1533
|
-
action,
|
|
1534
|
-
capture,
|
|
1535
|
-
eventType,
|
|
1536
|
-
exceptSelector
|
|
1537
|
-
});
|
|
1538
|
-
}
|
|
1539
|
-
_init({ element, action, capture, eventType, exceptSelector }) {
|
|
1540
|
-
if (!action) return;
|
|
1541
|
-
this.action = action;
|
|
1542
|
-
this.exceptSelector = exceptSelector;
|
|
1543
|
-
this.capture = capture;
|
|
1544
|
-
if (eventType) this.eventType = eventType;
|
|
1545
|
-
this.eventHandler = this._createHandler(element, this.action, this.exceptSelector);
|
|
1546
|
-
this.cancelOutsideListenerSetup = next(this, this._addClickOutsideListener);
|
|
1547
|
-
}
|
|
1548
|
-
_destroy() {
|
|
1549
|
-
if (!this.action) return;
|
|
1550
|
-
cancel(this.cancelOutsideListenerSetup);
|
|
1551
|
-
this._removeClickOutsideListener();
|
|
1552
|
-
}
|
|
1553
|
-
_addClickOutsideListener() {
|
|
1554
|
-
let { capture, eventHandler, eventType } = this;
|
|
1555
|
-
document.addEventListener(eventType, eventHandler, { capture });
|
|
1556
|
-
}
|
|
1557
|
-
_removeClickOutsideListener() {
|
|
1558
|
-
let { capture, eventHandler, eventType } = this;
|
|
1559
|
-
document.removeEventListener(eventType, eventHandler, { capture });
|
|
1560
|
-
}
|
|
1561
|
-
_createHandler(element, action, exceptSelector) {
|
|
1562
|
-
return (e) => {
|
|
1563
|
-
if (exceptSelector && e.target && closest(e.target, exceptSelector)) return;
|
|
1564
|
-
let path = e.path || e.composedPath && e.composedPath();
|
|
1565
|
-
if (path) path.includes(element) || action(e);
|
|
1566
|
-
else {
|
|
1567
|
-
let isRemoved = !e.target || !documentOrBodyContains(e.target);
|
|
1568
|
-
let isInside = element === e.target || element.contains(e.target);
|
|
1569
|
-
if (!isRemoved && !isInside) action(e);
|
|
1570
|
-
}
|
|
1571
|
-
};
|
|
1572
|
-
}
|
|
1573
|
-
};
|
|
1574
|
-
//#endregion
|
|
1575
|
-
//#region app/components/operator-mode/delete-modal.gts
|
|
1576
|
-
var component = setComponentTemplate(templateFactory({
|
|
1577
|
-
"id": "eK6KocNp",
|
|
1578
|
-
"block": "[[[8,[32,0],[[24,\"data-test-delete-modal-container\",\"\"],[16,\"data-test-delete-modal\",[30,1,[\"id\"]]],[16,5,[28,[32,1],null,[[\"boxel-modal-offset-top\"],[\"40vh\"]]]],[24,\"data-theme\",\"light\"],[24,\"data-scopedcss-b251231310-e6cf0aba53\",\"\"]],[[\"@layer\",\"@size\",\"@isOpen\",\"@onClose\"],[\"urgent\",[52,[30,2],[30,2],\"x-small\"],true,[30,3]]],[[\"default\"],[[[[1,\"\\n \"],[10,\"section\"],[15,0,[29,[\"delete \",[30,4]]]],[14,\"data-scopedcss-b251231310-e6cf0aba53\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"content\"],[14,\"data-test-delete-msg\",\"\"],[14,\"data-scopedcss-b251231310-e6cf0aba53\",\"\"],[12],[1,\"\\n\"],[41,[48,[30,8]],[[[1,\" \"],[18,8,null],[1,\"\\n\"]],[]],[[[1,\" \"],[18,9,null],[1,\"\\n\"]],[]]],[1,\" \"],[13],[1,\"\\n \"],[10,2],[14,0,\"content disclaimer\"],[14,\"data-scopedcss-b251231310-e6cf0aba53\",\"\"],[12],[1,\"This action is not reversible.\"],[13],[1,\"\\n \"],[10,\"footer\"],[14,0,\"buttons\"],[14,\"data-scopedcss-b251231310-e6cf0aba53\",\"\"],[12],[1,\"\\n\"],[41,[30,5],[[[1,\" \"],[8,[32,2],[[24,\"data-scopedcss-b251231310-e6cf0aba53\",\"\"]],[[\"@size\",\"@kind\",\"@loading\"],[\"tall\",\"danger\",true]],[[\"default\"],[[[[1,\"\\n Deleting\\n \"]],[]]]]],[1,\"\\n\"]],[]],[[[1,\" \"],[8,[32,2],[[24,\"data-test-confirm-cancel-button\",\"\"],[24,\"data-scopedcss-b251231310-e6cf0aba53\",\"\"],[4,[32,3],[\"click\",[30,3]],null]],[[\"@size\",\"@kind\"],[\"tall\",\"secondary-light\"]],[[\"default\"],[[[[1,\"\\n Cancel\\n \"]],[]]]]],[1,\"\\n \"],[8,[32,2],[[24,\"data-test-confirm-delete-button\",\"\"],[24,\"data-scopedcss-b251231310-e6cf0aba53\",\"\"],[4,[32,3],[\"click\",[28,[32,4],[[30,6],[30,1]],null]],null]],[[\"@size\",\"@kind\"],[\"tall\",\"danger\"]],[[\"default\"],[[[[1,\"\\n Delete\\n \"]],[]]]]],[1,\"\\n\"]],[]]],[41,[30,7],[[[1,\" \"],[10,2],[14,0,\"error\"],[14,\"data-scopedcss-b251231310-e6cf0aba53\",\"\"],[12],[1,[30,7]],[13],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]]]]],[1,\"\\n\\n\"]],[\"@itemToDelete\",\"@size\",\"@onCancel\",\"@containerClass\",\"@isDeleteRunning\",\"@onConfirm\",\"@error\",\"&content\",\"&default\"],[\"if\",\"has-block\",\"yield\"]]",
|
|
1579
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/operator-mode/delete-modal.gts",
|
|
1580
|
-
"scope": () => [
|
|
1581
|
-
Modal,
|
|
1582
|
-
css_var_default,
|
|
1583
|
-
ButtonComponent,
|
|
1584
|
-
on,
|
|
1585
|
-
fn
|
|
1586
|
-
],
|
|
1587
|
-
"isStrictMode": true
|
|
1588
|
-
}), templateOnly());
|
|
1589
|
-
//#endregion
|
|
1590
|
-
//#region app/components/ai-assistant/new-session.gts
|
|
1591
|
-
var NewSession = setComponentTemplate(templateFactory({
|
|
1592
|
-
"id": "+71/XeKl",
|
|
1593
|
-
"block": "[[[10,0],[14,0,\"intro\"],[14,\"data-test-new-session\",\"\"],[14,\"data-scopedcss-8ba06c3381-22b9bd59b0\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"title-group\"],[14,\"data-scopedcss-8ba06c3381-22b9bd59b0\",\"\"],[12],[1,\"\\n \"],[10,\"img\"],[14,\"alt\",\"AI Assistant\"],[15,\"src\",[32,0]],[14,\"width\",\"40\"],[14,\"height\",\"40\"],[14,\"data-scopedcss-8ba06c3381-22b9bd59b0\",\"\"],[12],[13],[1,\"\\n \"],[10,\"h2\"],[14,0,\"title-text\"],[14,\"data-scopedcss-8ba06c3381-22b9bd59b0\",\"\"],[12],[1,\"Assistant\"],[13],[1,\"\\n \"],[13],[1,\"\\n\"],[41,[30,1],[[[1,\" \"],[10,0],[14,0,\"error-section\"],[14,\"data-test-room-error\",\"\"],[14,\"data-scopedcss-8ba06c3381-22b9bd59b0\",\"\"],[12],[1,\"\\n \"],[10,2],[14,0,\"message\"],[14,\"data-scopedcss-8ba06c3381-22b9bd59b0\",\"\"],[12],[1,\"\\n We've encountered an error, please try again later.\\n \"],[13],[1,\"\\n \"],[8,[32,1],[[24,\"data-scopedcss-8ba06c3381-22b9bd59b0\",\"\"],[4,[32,2],[\"click\",[30,1]],null]],[[\"@size\",\"@kind\"],[\"small\",\"primary\"]],[[\"default\"],[[[[1,\"\\n Try Again\\n \"]],[]]]]],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[1,\" \"],[10,2],[14,0,\"message\"],[14,\"data-scopedcss-8ba06c3381-22b9bd59b0\",\"\"],[12],[1,\"\\n Boxel Assistant is an AI that helps you edit content, design interfaces,\\n write code, and plan workflows using simple text prompts. Just ask the\\n assistant to get started.\\n \"],[13],[1,\"\\n \"],[10,2],[14,0,\"disclaimer\"],[14,\"data-scopedcss-8ba06c3381-22b9bd59b0\",\"\"],[12],[1,\"\\n Assistant may display inaccurate info, please double check its\\n responses.\\n \"],[13],[1,\"\\n\"]],[]]],[13],[1,\"\\n\\n\"]],[\"@errorAction\"],[\"if\"]]",
|
|
1594
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/new-session.gts",
|
|
1595
|
-
"scope": () => [
|
|
1596
|
-
ai_assist_icon_2x_default,
|
|
1597
|
-
ButtonComponent,
|
|
1598
|
-
on
|
|
1599
|
-
],
|
|
1600
|
-
"isStrictMode": true
|
|
1601
|
-
}), templateOnly());
|
|
1602
|
-
//#endregion
|
|
1603
|
-
//#region app/components/ai-assistant/panel-popover.gts
|
|
1604
|
-
var AiAssistantPanelPopover = setComponentTemplate(templateFactory({
|
|
1605
|
-
"id": "KB1FpbCG",
|
|
1606
|
-
"block": "[[[1,\"\\n\\n\"],[11,0],[24,0,\"panel-popover\"],[17,1],[24,\"data-scopedcss-2e6635f2ad-a9fc4c3902\",\"\"],[4,[32,0],[[30,2]],[[\"exceptSelector\"],[\".past-session-menu,.delete\"]]],[12],[1,\"\\n \"],[10,\"header\"],[14,0,\"header\"],[14,\"data-scopedcss-2e6635f2ad-a9fc4c3902\",\"\"],[12],[1,\"\\n \"],[18,3,null],[1,\"\\n \"],[13],[1,\"\\n \"],[10,0],[14,0,\"body\"],[14,\"tabindex\",\"0\"],[14,\"data-test-panel-popover-body\",\"\"],[14,\"data-scopedcss-2e6635f2ad-a9fc4c3902\",\"\"],[12],[1,\"\\n \"],[18,4,null],[1,\"\\n \"],[13],[1,\"\\n\"],[13]],[\"&attrs\",\"@onClose\",\"&header\",\"&body\"],[\"yield\"]]",
|
|
1607
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/panel-popover.gts",
|
|
1608
|
-
"scope": () => [ClickOutsideModifier],
|
|
1609
|
-
"isStrictMode": true
|
|
1610
|
-
}), templateOnly());
|
|
1611
|
-
//#endregion
|
|
1612
|
-
//#region app/components/ai-assistant/past-session-item.gts
|
|
1613
|
-
var PastSessionItem = class extends Component {
|
|
1614
|
-
static {
|
|
1615
|
-
decorateFieldV2(this.prototype, "preventMenuClose", [tracked], function() {
|
|
1616
|
-
return false;
|
|
1617
|
-
});
|
|
1618
|
-
}
|
|
1619
|
-
#preventMenuClose = (initializeDeferredDecorator(this, "preventMenuClose"), void 0);
|
|
1620
|
-
closeDropdownAction = null;
|
|
1621
|
-
triggerElement = null;
|
|
1622
|
-
menuElement = null;
|
|
1623
|
-
registerCloseAction = modifier((element, [closeFn]) => {
|
|
1624
|
-
this.closeDropdownAction = closeFn;
|
|
1625
|
-
this.menuElement = element;
|
|
1626
|
-
return () => {
|
|
1627
|
-
this.closeDropdownAction = null;
|
|
1628
|
-
this.menuElement = null;
|
|
1629
|
-
};
|
|
1630
|
-
});
|
|
1631
|
-
registerTriggerElement = modifier((element) => {
|
|
1632
|
-
this.triggerElement = element;
|
|
1633
|
-
return () => {
|
|
1634
|
-
this.triggerElement = null;
|
|
1635
|
-
};
|
|
1636
|
-
});
|
|
1637
|
-
closeDropdownTask = buildTask(() => ({
|
|
1638
|
-
context: this,
|
|
1639
|
-
generator: function* () {
|
|
1640
|
-
yield timeout(200);
|
|
1641
|
-
if (this.triggerElement?.matches(":focus-visible") || this.menuElement?.contains(document.activeElement)) return;
|
|
1642
|
-
this.closeDropdownAction?.();
|
|
1643
|
-
if (document.activeElement === this.triggerElement) this.triggerElement?.blur();
|
|
1644
|
-
}
|
|
1645
|
-
}), null, "closeDropdownTask", "restartable");
|
|
1646
|
-
scheduleCloseDropdown() {
|
|
1647
|
-
this.closeDropdownTask.perform();
|
|
1648
|
-
}
|
|
1649
|
-
static {
|
|
1650
|
-
decorateMethodV2(this.prototype, "scheduleCloseDropdown", [action]);
|
|
1651
|
-
}
|
|
1652
|
-
cancelCloseDropdown() {
|
|
1653
|
-
this.closeDropdownTask.cancelAll();
|
|
1654
|
-
}
|
|
1655
|
-
static {
|
|
1656
|
-
decorateMethodV2(this.prototype, "cancelCloseDropdown", [action]);
|
|
1657
|
-
}
|
|
1658
|
-
static {
|
|
1659
|
-
setComponentTemplate(templateFactory({
|
|
1660
|
-
"id": "YZyEKuF0",
|
|
1661
|
-
"block": "[[[11,\"li\"],[24,0,\"session\"],[16,\"data-test-joined-room\",[30,1,[\"roomId\"]]],[16,\"data-room-id\",[30,1,[\"roomId\"]]],[16,\"data-is-current-room\",[30,2]],[24,\"data-scopedcss-daa6e1c1db-8fabcaf48a\",\"\"],[4,[32,0],[\"mouseenter\",[30,0,[\"cancelCloseDropdown\"]]],null],[4,[32,0],[\"mouseleave\",[30,0,[\"scheduleCloseDropdown\"]]],null],[12],[1,\"\\n \"],[11,\"button\"],[24,0,\"view-session-button\"],[16,\"data-test-enter-room\",[30,1,[\"roomId\"]]],[24,\"data-scopedcss-daa6e1c1db-8fabcaf48a\",\"\"],[4,[32,0],[\"click\",[28,[32,1],[[30,3,[\"open\"]],[30,1,[\"roomId\"]]],null]],null],[12],[1,\"\\n \"],[10,0],[14,0,\"name\"],[14,\"data-scopedcss-daa6e1c1db-8fabcaf48a\",\"\"],[12],[1,[30,1,[\"name\"]]],[13],[1,\"\\n \"],[10,0],[15,0,[29,[\"date\\n \",[52,[30,0,[\"isStreaming\"]],\"is-streaming\"],\"\\n \",[52,[30,0,[\"hasUnseenMessage\"]],\"has-unseen-message\"]]]],[15,\"data-test-last-active\",[30,0,[\"lastActive\"]]],[15,\"data-test-is-streaming\",[30,0,[\"isStreaming\"]]],[15,\"data-test-is-unseen-message\",[30,0,[\"hasUnseenMessage\"]]],[14,\"data-scopedcss-daa6e1c1db-8fabcaf48a\",\"\"],[12],[1,\"\\n\"],[41,[30,0,[\"isStreaming\"]],[[[1,\" \"],[8,[32,2],[[24,\"width\",\"12px\"],[24,\"height\",\"12px\"],[24,0,\"icon-recency-indicator icon-streaming pulsing\"],[24,\"data-scopedcss-daa6e1c1db-8fabcaf48a\",\"\"]],null,null],[1,\"\\n Thinking…\\n\"]],[]],[[[41,[30,0,[\"hasUnseenMessage\"]],[[[1,\" \"],[8,[32,2],[[24,\"width\",\"10px\"],[24,\"height\",\"10px\"],[24,0,\"icon-recency-indicator icon-new-messages\"],[24,\"data-scopedcss-daa6e1c1db-8fabcaf48a\",\"\"]],null,null],[1,\"\\n Updated\\n \"],[1,[30,0,[\"formattedDate\"]]],[1,\"\\n\"]],[]],[[[1,\" \"],[1,[30,0,[\"formattedDate\"]]],[1,\"\\n \"]],[]]]],[]]],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n \"],[8,[32,3],[[24,\"data-scopedcss-daa6e1c1db-8fabcaf48a\",\"\"]],[[\"@contentClass\"],[\"past-session-menu-dropdown\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,4],[[24,\"data-scopedcss-daa6e1c1db-8fabcaf48a\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,5],[[24,0,\"menu-button\"],[16,\"data-test-past-session-options-button\",[30,1,[\"roomId\"]]],[24,\"data-scopedcss-daa6e1c1db-8fabcaf48a\",\"\"],[4,[30,4],null,null],[4,[30,0,[\"registerTriggerElement\"]],null,null]],[[\"@variant\",\"@size\",\"@label\"],[\"highlight-icon\",\"extra-small\",\"past session options\"]],null],[1,\"\\n \"]],[]],[[[1,\"\\n More Options\\n \"]],[]]]]],[1,\"\\n \"]],[4]],[[[1,\"\\n \"],[8,[32,6],[[24,0,\"menu past-session-menu\"],[24,\"data-scopedcss-daa6e1c1db-8fabcaf48a\",\"\"],[4,[30,0,[\"registerCloseAction\"]],[[30,5,[\"close\"]]],null],[4,[32,0],[\"mouseenter\",[30,0,[\"cancelCloseDropdown\"]]],null],[4,[32,0],[\"mouseleave\",[30,0,[\"scheduleCloseDropdown\"]]],null]],[[\"@isRounded\",\"@closeMenu\",\"@items\"],[false,[28,[32,1],[[30,0,[\"handleCloseMenu\"]],[30,5,[\"close\"]]],null],[28,[32,7],[[28,[32,8],[\"Open Session\",[28,[32,1],[[30,3,[\"open\"]],[30,1,[\"roomId\"]]],null]],[[\"icon\"],[[32,9]]]],[28,[32,8],[\"Rename\",[28,[32,1],[[30,3,[\"rename\"]],[30,1]],null]],[[\"icon\"],[[32,10]]]],[28,[32,8],[[52,[28,[32,11],[[28,[30,3,[\"getCopiedRoomId\"]],null,null],[30,1,[\"roomId\"]]],null],\"Copied!\",\"Copy Room Id\"],[28,[32,1],[[30,0,[\"handleCopyRoomId\"]],[30,1,[\"roomId\"]]],null]],[[\"icon\"],[[32,12]]]],[28,[32,8],[\"Delete\",[28,[32,1],[[30,3,[\"delete\"]],[30,1]],null]],[[\"icon\"],[[32,13]]]]],null]]],null],[1,\"\\n \"]],[5]]]]],[1,\"\\n\"],[13],[1,\"\\n\\n\"]],[\"@session\",\"@isCurrentRoom\",\"@actions\",\"bindings\",\"dd\"],[\"if\"]]",
|
|
1662
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/past-session-item.gts",
|
|
1663
|
-
"scope": () => [
|
|
1664
|
-
on,
|
|
1665
|
-
fn,
|
|
1666
|
-
IconComponent$11,
|
|
1667
|
-
BoxelDropdown,
|
|
1668
|
-
Tooltip,
|
|
1669
|
-
DropdownButton,
|
|
1670
|
-
Menu,
|
|
1671
|
-
array,
|
|
1672
|
-
menu_item_default,
|
|
1673
|
-
IconComponent$21,
|
|
1674
|
-
IconComponent$12,
|
|
1675
|
-
eq,
|
|
1676
|
-
IconComponent$13,
|
|
1677
|
-
IconComponent$14
|
|
1678
|
-
],
|
|
1679
|
-
"isStrictMode": true
|
|
1680
|
-
}), this);
|
|
1681
|
-
}
|
|
1682
|
-
static {
|
|
1683
|
-
decorateFieldV2(this.prototype, "matrixService", [service]);
|
|
1684
|
-
}
|
|
1685
|
-
#matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
|
|
1686
|
-
handleCopyRoomId(roomId) {
|
|
1687
|
-
this.preventMenuClose = true;
|
|
1688
|
-
this.args.actions.copyRoomId(roomId);
|
|
1689
|
-
this.resetPreventMenuCloseTask.perform();
|
|
1690
|
-
}
|
|
1691
|
-
static {
|
|
1692
|
-
decorateMethodV2(this.prototype, "handleCopyRoomId", [action]);
|
|
1693
|
-
}
|
|
1694
|
-
resetPreventMenuCloseTask = buildTask(() => ({
|
|
1695
|
-
context: this,
|
|
1696
|
-
generator: function* () {
|
|
1697
|
-
yield timeout(200);
|
|
1698
|
-
this.preventMenuClose = false;
|
|
1699
|
-
}
|
|
1700
|
-
}), null, "resetPreventMenuCloseTask", "restartable");
|
|
1701
|
-
handleCloseMenu(originalClose) {
|
|
1702
|
-
if (!this.preventMenuClose) originalClose();
|
|
1703
|
-
}
|
|
1704
|
-
static {
|
|
1705
|
-
decorateMethodV2(this.prototype, "handleCloseMenu", [action]);
|
|
1706
|
-
}
|
|
1707
|
-
get createDate() {
|
|
1708
|
-
if (!this.args.session.created) return /* @__PURE__ */ new Date();
|
|
1709
|
-
return this.args.session.created;
|
|
1710
|
-
}
|
|
1711
|
-
get isStreaming() {
|
|
1712
|
-
return this.args.session.lastMessage?.isStreamingFinished === false;
|
|
1713
|
-
}
|
|
1714
|
-
get hasUnseenMessage() {
|
|
1715
|
-
if (!this.args.session.lastMessage) return false;
|
|
1716
|
-
return !this.matrixService.currentUserEventReadReceipts.has(this.args.session.lastMessage.eventId);
|
|
1717
|
-
}
|
|
1718
|
-
get lastActive() {
|
|
1719
|
-
let timestamp = this.matrixService.getLastActiveTimestamp(this.args.session.roomId, this.args.session.lastActiveTimestamp) ?? this.createDate.getTime();
|
|
1720
|
-
return isNaN(timestamp) ? Date.now() : timestamp;
|
|
1721
|
-
}
|
|
1722
|
-
get formattedDate() {
|
|
1723
|
-
let now = /* @__PURE__ */ new Date();
|
|
1724
|
-
if (isSameDay(this.lastActive, now)) return `Today ${format(this.lastActive, "MMM d, h:mm aa")}`;
|
|
1725
|
-
else if (isSameYear(this.lastActive, now)) return format(this.lastActive, "iiii MMM d, h:mm aa");
|
|
1726
|
-
return format(this.lastActive, "iiii MMM d, yyyy, h:mm aa");
|
|
1727
|
-
}
|
|
1728
|
-
};
|
|
1729
|
-
//#endregion
|
|
1730
|
-
//#region app/components/ai-assistant/past-sessions.gts
|
|
1731
|
-
function findScrollContainer(element) {
|
|
1732
|
-
let candidate = element;
|
|
1733
|
-
while (candidate) {
|
|
1734
|
-
let { overflowY } = getComputedStyle(candidate);
|
|
1735
|
-
if (overflowY === "auto" || overflowY === "scroll") return candidate;
|
|
1736
|
-
candidate = candidate.parentElement;
|
|
1737
|
-
}
|
|
1738
|
-
return element;
|
|
1739
|
-
}
|
|
1740
|
-
var AiAssistantPastSessionsList = class extends Component {
|
|
1741
|
-
static {
|
|
1742
|
-
decorateFieldV2(this.prototype, "matrixService", [service]);
|
|
1743
|
-
}
|
|
1744
|
-
#matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
|
|
1745
|
-
checkScroll = modifier((element) => {
|
|
1746
|
-
let scroller = findScrollContainer(element);
|
|
1747
|
-
let checkScrollPosition = () => {
|
|
1748
|
-
let { scrollHeight, scrollTop, clientHeight } = scroller;
|
|
1749
|
-
if (Math.abs(scrollHeight - scrollTop - clientHeight) <= 1 || scrollHeight <= clientHeight) this.matrixService.loadMoreAIRooms();
|
|
1750
|
-
};
|
|
1751
|
-
checkScrollPosition();
|
|
1752
|
-
scroller.addEventListener("scroll", checkScrollPosition);
|
|
1753
|
-
return () => {
|
|
1754
|
-
scroller.removeEventListener("scroll", checkScrollPosition);
|
|
1755
|
-
};
|
|
1756
|
-
});
|
|
1757
|
-
static {
|
|
1758
|
-
setComponentTemplate(templateFactory({
|
|
1759
|
-
"id": "27r36Z3f",
|
|
1760
|
-
"block": "[[[8,[32,0],[[24,\"data-test-past-sessions\",\"\"],[17,1],[24,\"data-scopedcss-894c4d34ef-493dbc9799\",\"\"]],[[\"@onClose\"],[[30,2]]],[[\"header\",\"body\"],[[[[1,\"\\n Past Sessions\\n \"]],[]],[[[1,\"\\n\"],[41,[30,3],[[[1,\" \"],[11,\"ul\"],[24,0,\"past-sessions\"],[24,\"data-scopedcss-894c4d34ef-493dbc9799\",\"\"],[4,[30,0,[\"checkScroll\"]],null,null],[12],[1,\"\\n\"],[42,[28,[31,2],[[28,[31,2],[[30,3]],null]],null],\"roomId\",[[[1,\" \"],[8,[32,1],[[24,\"data-scopedcss-894c4d34ef-493dbc9799\",\"\"]],[[\"@session\",\"@isCurrentRoom\",\"@actions\"],[[30,4],[28,[32,2],[[30,4,[\"roomId\"]],[30,5]],null],[30,6]]],null],[1,\"\\n\"]],[4]],null],[41,[30,0,[\"matrixService\",\"isLoadingMoreAIRooms\"]],[[[1,\" \"],[10,\"li\"],[14,0,\"loading-indicator-container\"],[14,\"data-test-loading-more-rooms\",\"\"],[14,\"data-scopedcss-894c4d34ef-493dbc9799\",\"\"],[12],[1,\"\\n \"],[8,[32,3],[[24,0,\"loading-indicator\"],[24,\"data-scopedcss-894c4d34ef-493dbc9799\",\"\"]],[[\"@color\"],[\"var(--boxel-dark)\"]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n\"]],[]],[[[1,\" \"],[10,0],[14,0,\"empty-collection\"],[14,\"data-scopedcss-894c4d34ef-493dbc9799\",\"\"],[12],[1,\"\\n No past sessions to show.\\n \"],[13],[1,\"\\n\"]],[]]],[1,\" \"]],[]]]]],[1,\"\\n\\n\"]],[\"&attrs\",\"@onClose\",\"@sessions\",\"session\",\"@currentRoomId\",\"@roomActions\"],[\"if\",\"each\",\"-track-array\"]]",
|
|
1761
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/past-sessions.gts",
|
|
1762
|
-
"scope": () => [
|
|
1763
|
-
AiAssistantPanelPopover,
|
|
1764
|
-
PastSessionItem,
|
|
1765
|
-
eq,
|
|
1766
|
-
LoadingIndicator
|
|
1767
|
-
],
|
|
1768
|
-
"isStrictMode": true
|
|
1769
|
-
}), this);
|
|
1770
|
-
}
|
|
1771
|
-
};
|
|
1772
|
-
//#endregion
|
|
1773
|
-
//#region app/components/ai-assistant/rename-session.gts
|
|
1774
|
-
var RenameSession = class extends Component {
|
|
1775
|
-
static {
|
|
1776
|
-
setComponentTemplate(templateFactory({
|
|
1777
|
-
"id": "7DLF8a1H",
|
|
1778
|
-
"block": "[[[8,[32,0],[[24,0,\"rename-session\"],[24,\"data-test-rename-session\",\"\"],[17,1],[24,\"data-scopedcss-a15cac7205-16ceddfd22\",\"\"]],[[\"@onClose\"],[[30,2]]],[[\"header\",\"body\"],[[[[1,\"Rename Session\"]],[]],[[[1,\"\\n \"],[10,0],[14,0,\"rename-field\"],[14,\"data-scopedcss-a15cac7205-16ceddfd22\",\"\"],[12],[1,\"\\n \"],[8,[32,1],[[24,\"aria-label\",\"Session Name\"],[24,\"data-test-name-field\",\"\"],[24,\"data-scopedcss-a15cac7205-16ceddfd22\",\"\"]],[[\"@state\",\"@value\",\"@errorMessage\",\"@onInput\"],[[30,0,[\"roomNameInputState\"]],[30,0,[\"newRoomName\"]],[30,0,[\"roomNameError\"]],[30,0,[\"setName\"]]]],null],[1,\"\\n \"],[13],[1,\"\\n \"],[10,\"footer\"],[14,0,\"footer\"],[14,\"data-scopedcss-a15cac7205-16ceddfd22\",\"\"],[12],[1,\"\\n \"],[8,[32,2],[[24,\"data-test-cancel-name-button\",\"\"],[24,\"data-scopedcss-a15cac7205-16ceddfd22\",\"\"],[4,[32,3],[\"click\",[30,2]],null],[4,[32,4],[\"Escape\",[30,2]],null]],[[\"@kind\",\"@size\"],[\"secondary\",\"extra-small\"]],[[\"default\"],[[[[1,\"\\n Cancel\\n \"]],[]]]]],[1,\"\\n \"],[8,[32,2],[[24,\"data-test-save-name-button\",\"\"],[24,\"data-scopedcss-a15cac7205-16ceddfd22\",\"\"],[4,[32,3],[\"click\",[30,0,[\"renameRoom\"]]],null],[4,[32,4],[\"Enter\",[30,0,[\"renameRoom\"]]],null]],[[\"@kind\",\"@size\",\"@disabled\",\"@loading\"],[\"primary\",\"extra-small\",[30,0,[\"isSaveRenameDisabled\"]],[30,0,[\"doRenameRoom\",\"isRunning\"]]]],[[\"default\"],[[[[1,\"\\n Save\\n \"]],[]]]]],[1,\"\\n \"],[13],[1,\"\\n \"]],[]]]]],[1,\"\\n\\n\"]],[\"&attrs\",\"@onClose\"],[]]",
|
|
1779
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/rename-session.gts",
|
|
1780
|
-
"scope": () => [
|
|
1781
|
-
AiAssistantPanelPopover,
|
|
1782
|
-
BoxelInput,
|
|
1783
|
-
ButtonComponent,
|
|
1784
|
-
on,
|
|
1785
|
-
modifier$1
|
|
1786
|
-
],
|
|
1787
|
-
"isStrictMode": true
|
|
1788
|
-
}), this);
|
|
1789
|
-
}
|
|
1790
|
-
static {
|
|
1791
|
-
decorateFieldV2(this.prototype, "matrixService", [service]);
|
|
1792
|
-
}
|
|
1793
|
-
#matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
|
|
1794
|
-
static {
|
|
1795
|
-
decorateFieldV2(this.prototype, "newRoomName", [tracked], function() {
|
|
1796
|
-
return this.args.room.name;
|
|
1797
|
-
});
|
|
1798
|
-
}
|
|
1799
|
-
#newRoomName = (initializeDeferredDecorator(this, "newRoomName"), void 0);
|
|
1800
|
-
static {
|
|
1801
|
-
decorateFieldV2(this.prototype, "roomNameError", [tracked], function() {});
|
|
1802
|
-
}
|
|
1803
|
-
#roomNameError = (initializeDeferredDecorator(this, "roomNameError"), void 0);
|
|
1804
|
-
get roomNameInputState() {
|
|
1805
|
-
return this.roomNameError ? "invalid" : "initial";
|
|
1806
|
-
}
|
|
1807
|
-
get isSaveRenameDisabled() {
|
|
1808
|
-
return !this.newRoomName?.length || this.newRoomName === this.args.room.name || this.doRenameRoom.isRunning;
|
|
1809
|
-
}
|
|
1810
|
-
setName(name) {
|
|
1811
|
-
this.roomNameError = void 0;
|
|
1812
|
-
this.newRoomName = name;
|
|
1813
|
-
}
|
|
1814
|
-
static {
|
|
1815
|
-
decorateMethodV2(this.prototype, "setName", [action]);
|
|
1816
|
-
}
|
|
1817
|
-
renameRoom() {
|
|
1818
|
-
this.doRenameRoom.perform();
|
|
1819
|
-
}
|
|
1820
|
-
static {
|
|
1821
|
-
decorateMethodV2(this.prototype, "renameRoom", [action]);
|
|
1822
|
-
}
|
|
1823
|
-
doRenameRoom = buildTask(() => ({
|
|
1824
|
-
context: this,
|
|
1825
|
-
generator: function* () {
|
|
1826
|
-
if (!this.newRoomName?.length || !this.args.room.roomId) throw new Error(`bug: should never get here`);
|
|
1827
|
-
try {
|
|
1828
|
-
yield this.matrixService.setRoomName(this.args.room.roomId, this.newRoomName);
|
|
1829
|
-
this.roomNameError = void 0;
|
|
1830
|
-
this.newRoomName = "";
|
|
1831
|
-
this.args.onClose();
|
|
1832
|
-
} catch (e) {
|
|
1833
|
-
console.error(e);
|
|
1834
|
-
this.roomNameError = `Error renaming room`;
|
|
1835
|
-
if (isMatrixError(e)) this.roomNameError += `: ${e.data.error}`;
|
|
1836
|
-
else if (e instanceof Error) this.roomNameError += `: ${e.message}`;
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
}), null, "doRenameRoom", "restartable");
|
|
1840
|
-
};
|
|
1841
|
-
//#endregion
|
|
1842
|
-
//#region app/components/ai-assistant/llm-mode-toggle.gts
|
|
1843
|
-
var LLMModeToggle = class extends Component {
|
|
1844
|
-
get selected() {
|
|
1845
|
-
return this.args.selected === "act" ? "act" : "ask";
|
|
1846
|
-
}
|
|
1847
|
-
static {
|
|
1848
|
-
setComponentTemplate(templateFactory({
|
|
1849
|
-
"id": "RUCOFFtl",
|
|
1850
|
-
"block": "[[[11,0],[24,0,\"llm-mode-toggle\"],[17,1],[24,\"data-scopedcss-aa50e84ab7-b1fd6282ca\",\"\"],[12],[1,\"\\n \"],[8,[32,0],[[24,\"data-scopedcss-aa50e84ab7-b1fd6282ca\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[11,\"button\"],[16,0,[29,[\"llm-mode-option \",[52,[28,[32,1],[[30,0,[\"selected\"]],\"ask\"],null],\"selected\"]]]],[16,\"disabled\",[30,2]],[24,\"data-test-llm-mode-option\",\"ask\"],[24,\"data-scopedcss-aa50e84ab7-b1fd6282ca\",\"\"],[24,4,\"button\"],[4,[32,2],[\"click\",[28,[32,3],[[30,0,[\"handleOptionClick\"]],\"ask\"],null]],null],[12],[1,\"\\n Ask\\n \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[10,0],[14,0,\"llm-mode-option-tooltip\"],[14,\"data-scopedcss-aa50e84ab7-b1fd6282ca\",\"\"],[12],[1,\"\\n Ask mode: Get answers and explanations without making changes\\n \"],[13],[1,\"\\n \"]],[]]]]],[1,\"\\n\\n \"],[8,[32,0],[[24,\"data-scopedcss-aa50e84ab7-b1fd6282ca\",\"\"]],[[\"@placement\"],[\"top\"]],[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[11,\"button\"],[16,0,[29,[\"llm-mode-option \",[52,[28,[32,1],[[30,0,[\"selected\"]],\"act\"],null],\"selected\"]]]],[16,\"disabled\",[30,2]],[24,\"data-test-llm-mode-option\",\"act\"],[24,\"data-scopedcss-aa50e84ab7-b1fd6282ca\",\"\"],[24,4,\"button\"],[4,[32,2],[\"click\",[28,[32,3],[[30,0,[\"handleOptionClick\"]],\"act\"],null]],null],[12],[1,\"\\n Act\\n \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[10,0],[14,0,\"llm-mode-option-tooltip\"],[14,\"data-scopedcss-aa50e84ab7-b1fd6282ca\",\"\"],[12],[1,\"\\n Act mode: Automatically apply code changes and execute commands\\n \"],[13],[1,\"\\n \"]],[]]]]],[1,\"\\n\"],[13],[1,\"\\n\"]],[\"&attrs\",\"@disabled\"],[\"if\"]]",
|
|
1851
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/llm-mode-toggle.gts",
|
|
1852
|
-
"scope": () => [
|
|
1853
|
-
Tooltip,
|
|
1854
|
-
eq,
|
|
1855
|
-
on,
|
|
1856
|
-
fn
|
|
1857
|
-
],
|
|
1858
|
-
"isStrictMode": true
|
|
1859
|
-
}), this);
|
|
1860
|
-
}
|
|
1861
|
-
handleOptionClick(mode) {
|
|
1862
|
-
if (mode !== this.selected) this.args.onChange(mode);
|
|
1863
|
-
}
|
|
1864
|
-
static {
|
|
1865
|
-
decorateMethodV2(this.prototype, "handleOptionClick", [action]);
|
|
1866
|
-
}
|
|
1867
|
-
};
|
|
1868
|
-
//#endregion
|
|
1869
|
-
//#region app/components/ai-assistant/llm-select.gts
|
|
1870
|
-
var LLMSelect = class extends Component {
|
|
1871
|
-
static {
|
|
1872
|
-
setComponentTemplate(templateFactory({
|
|
1873
|
-
"id": "g1vjLhQ2",
|
|
1874
|
-
"block": "[[[8,[32,0],[[24,0,\"llm-select\"],[17,1],[24,\"data-scopedcss-d018e6990c-c6b2091ffb\",\"\"]],[[\"@onExpand\",\"@onCollapse\"],[[30,2],[30,3]]],[[\"headerDetail\",\"content\",\"contentActions\"],[[[[1,\"\\n \"],[10,0],[14,0,\"selected-llm-wrapper\"],[14,\"data-scopedcss-d018e6990c-c6b2091ffb\",\"\"],[12],[1,\"\\n \"],[10,1],[14,0,\"selected-llm\"],[15,\"data-test-llm-select-selected\",[30,4]],[14,\"data-scopedcss-d018e6990c-c6b2091ffb\",\"\"],[12],[1,\"\\n \"],[1,[30,0,[\"displayName\"]]],[1,\"\\n \"],[13],[1,\"\\n\"],[41,[30,0,[\"selectedCostTierLabel\"]],[[[1,\" \"],[10,1],[14,0,\"llm-cost\"],[15,\"data-test-llm-cost-selected\",[30,0,[\"selectedCostTierLabel\"]]],[14,\"data-scopedcss-d018e6990c-c6b2091ffb\",\"\"],[12],[1,\"\\n \"],[1,[30,0,[\"selectedCostTierLabel\"]]],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[10,\"ul\"],[14,0,\"llm-list\"],[14,\"data-scopedcss-d018e6990c-c6b2091ffb\",\"\"],[12],[1,\"\\n\"],[42,[28,[31,2],[[28,[31,2],[[30,5]],null]],null],\"id\",[[[1,\" \"],[11,\"li\"],[16,0,[29,[\"llm-option \",[52,[28,[32,1],[[30,4],[30,6,[\"id\"]]],null],\"selected\"]]]],[16,\"data-test-llm-select-item\",[30,6,[\"id\"]]],[24,\"data-scopedcss-d018e6990c-c6b2091ffb\",\"\"],[4,[32,2],[[28,[32,1],[[30,4],[30,6,[\"id\"]]],null]],[[\"container\",\"key\"],[\"llm-select\",[30,6,[\"id\"]]]]],[12],[1,\"\\n \"],[11,\"button\"],[24,0,\"llm-button\"],[24,\"data-scopedcss-d018e6990c-c6b2091ffb\",\"\"],[24,4,\"button\"],[4,[32,3],[\"click\",[28,[32,4],[[30,0,[\"handleOptionClick\"]],[30,6,[\"id\"]]],null]],null],[12],[1,\"\\n \"],[10,1],[14,0,\"llm-name\"],[14,\"data-scopedcss-d018e6990c-c6b2091ffb\",\"\"],[12],[1,[30,6,[\"name\"]]],[13],[1,\"\\n \"],[10,1],[14,0,\"llm-meta\"],[14,\"data-scopedcss-d018e6990c-c6b2091ffb\",\"\"],[12],[1,\"\\n\"],[41,[30,6,[\"costTierLabel\"]],[[[1,\" \"],[10,1],[14,0,\"llm-cost\"],[15,\"data-test-llm-cost\",[30,6,[\"costTierLabel\"]]],[14,\"data-scopedcss-d018e6990c-c6b2091ffb\",\"\"],[12],[1,\"\\n \"],[1,[30,6,[\"costTierLabel\"]]],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[41,[28,[32,1],[[30,4],[30,6,[\"id\"]]],null],[[[1,\" \"],[8,[32,5],[[24,0,\"selected-icon\"],[24,\"data-scopedcss-d018e6990c-c6b2091ffb\",\"\"]],null,null],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[6]],null],[1,\" \"],[13],[1,\"\\n \"]],[]],[[[1,\"\\n \"],[18,7,null],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[\"&attrs\",\"@onExpand\",\"@onCollapse\",\"@selected\",\"@options\",\"option\",\"&menuActions\"],[\"if\",\"each\",\"-track-array\",\"yield\"]]",
|
|
1875
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/llm-select.gts",
|
|
1876
|
-
"scope": () => [
|
|
1877
|
-
PillMenu,
|
|
1878
|
-
eq,
|
|
1879
|
-
ScrollIntoViewModifier,
|
|
1880
|
-
on,
|
|
1881
|
-
fn,
|
|
1882
|
-
IconComponent$4
|
|
1883
|
-
],
|
|
1884
|
-
"isStrictMode": true
|
|
1885
|
-
}), this);
|
|
1886
|
-
}
|
|
1887
|
-
get selectedOption() {
|
|
1888
|
-
return this.args.options.find((o) => o.id === this.args.selected);
|
|
1889
|
-
}
|
|
1890
|
-
get displayName() {
|
|
1891
|
-
return this.selectedOption?.name;
|
|
1892
|
-
}
|
|
1893
|
-
get selectedCostTierLabel() {
|
|
1894
|
-
return this.selectedOption?.costTierLabel;
|
|
1895
|
-
}
|
|
1896
|
-
handleOptionClick(option) {
|
|
1897
|
-
this.args.onChange(option);
|
|
1898
|
-
}
|
|
1899
|
-
static {
|
|
1900
|
-
decorateMethodV2(this.prototype, "handleOptionClick", [action]);
|
|
1901
|
-
}
|
|
1902
|
-
};
|
|
1903
|
-
//#endregion
|
|
1904
|
-
//#region app/components/matrix/room-message-tool.gts
|
|
1905
|
-
function hasOwnEmbeddedView(card) {
|
|
1906
|
-
let klass = card.constructor;
|
|
1907
|
-
while (klass && !Object.hasOwn(klass, "embedded")) klass = Object.getPrototypeOf(klass);
|
|
1908
|
-
return !!klass && !Object.hasOwn(klass, "isCardDef");
|
|
1909
|
-
}
|
|
1910
|
-
var RoomMessageTool = class extends Component {
|
|
1911
|
-
static {
|
|
1912
|
-
decorateFieldV2(this.prototype, "toolService", [service]);
|
|
1913
|
-
}
|
|
1914
|
-
#toolService = (initializeDeferredDecorator(this, "toolService"), void 0);
|
|
1915
|
-
static {
|
|
1916
|
-
decorateFieldV2(this.prototype, "matrixService", [service]);
|
|
1917
|
-
}
|
|
1918
|
-
#matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
|
|
1919
|
-
static {
|
|
1920
|
-
decorateFieldV2(this.prototype, "realm", [service]);
|
|
1921
|
-
}
|
|
1922
|
-
#realm = (initializeDeferredDecorator(this, "realm"), void 0);
|
|
1923
|
-
static {
|
|
1924
|
-
decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
|
|
1925
|
-
}
|
|
1926
|
-
#operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
|
|
1927
|
-
static {
|
|
1928
|
-
decorateFieldV2(this.prototype, "store", [service]);
|
|
1929
|
-
}
|
|
1930
|
-
#store = (initializeDeferredDecorator(this, "store"), void 0);
|
|
1931
|
-
static {
|
|
1932
|
-
decorateFieldV2(this.prototype, "cardContext", [consume(CardContextName)]);
|
|
1933
|
-
}
|
|
1934
|
-
#cardContext = (initializeDeferredDecorator(this, "cardContext"), void 0);
|
|
1935
|
-
get context() {
|
|
1936
|
-
return {
|
|
1937
|
-
...this.cardContext,
|
|
1938
|
-
loadRoomMedia: this.matrixService.loadRoomMedia
|
|
1939
|
-
};
|
|
1940
|
-
}
|
|
1941
|
-
static {
|
|
1942
|
-
decorateMethodV2(this.prototype, "context", [provide(CardContextName)]);
|
|
1943
|
-
}
|
|
1944
|
-
get argumentsLength() {
|
|
1945
|
-
return (this.args.messageTool.argumentsText ?? JSON.stringify(this.args.messageTool.arguments ?? {})).length;
|
|
1946
|
-
}
|
|
1947
|
-
get previewCommandCode() {
|
|
1948
|
-
let { name, arguments: payload, argumentsText } = this.args.messageTool;
|
|
1949
|
-
if (argumentsText) return argumentsText;
|
|
1950
|
-
return JSON.stringify({
|
|
1951
|
-
name,
|
|
1952
|
-
payload
|
|
1953
|
-
}, null, 2);
|
|
1954
|
-
}
|
|
1955
|
-
get applyButtonState() {
|
|
1956
|
-
if (this.failedToolState) return "failed";
|
|
1957
|
-
if (this.didFailCorrectnessCheck) return "applied-with-error";
|
|
1958
|
-
let status = this.args.messageTool?.status;
|
|
1959
|
-
if ((status === "ready" || status === void 0) && this.willAutoExecute) {
|
|
1960
|
-
let { roomResource, messageTool } = this.args;
|
|
1961
|
-
if (roomResource.wasEverStopped(messageTool.eventId) && !this.toolService.currentlyExecutingToolRequestIds.has(messageTool.id)) return "canceled";
|
|
1962
|
-
return "applying";
|
|
1963
|
-
}
|
|
1964
|
-
return status ?? "ready";
|
|
1965
|
-
}
|
|
1966
|
-
static {
|
|
1967
|
-
decorateMethodV2(this.prototype, "applyButtonState", [cached]);
|
|
1968
|
-
}
|
|
1969
|
-
get willAutoExecute() {
|
|
1970
|
-
let activeMode = this.args.roomResource.getActiveLLMModeForMessage(this.args.messageTool.eventId);
|
|
1971
|
-
let isOwnedByCurrentAgent = this.args.messageTool.message.agentId === this.matrixService.agentId;
|
|
1972
|
-
return isAutoExecutableTool(this.args.messageTool, activeMode, isOwnedByCurrentAgent);
|
|
1973
|
-
}
|
|
1974
|
-
static {
|
|
1975
|
-
decorateFieldV2(this.prototype, "toolResultCard", [use], function() {
|
|
1976
|
-
return resource(({ on }) => {
|
|
1977
|
-
let state = new TrackedObject({
|
|
1978
|
-
card: void 0,
|
|
1979
|
-
isRealmCard: false
|
|
1980
|
-
});
|
|
1981
|
-
let referencedId;
|
|
1982
|
-
let isTornDown = false;
|
|
1983
|
-
let isLoading = false;
|
|
1984
|
-
on.cleanup(() => {
|
|
1985
|
-
isTornDown = true;
|
|
1986
|
-
if (isLoading && isTesting()) console.log(`[tool-result-card] discarded an in-flight result card load for tool call ${this.args.messageTool.toolRequest.id}`);
|
|
1987
|
-
if (referencedId) this.store.dropReference(referencedId);
|
|
1988
|
-
});
|
|
1989
|
-
if (this.args.messageTool.toolResultFileDef) {
|
|
1990
|
-
isLoading = true;
|
|
1991
|
-
this.args.messageTool.getCommandResultCard().then((result) => {
|
|
1992
|
-
isLoading = false;
|
|
1993
|
-
if (!result && isTesting()) console.log(`[tool-result-card] result card load for tool call ${this.args.messageTool.toolRequest.id} produced no card`);
|
|
1994
|
-
if (isTornDown || !result) return;
|
|
1995
|
-
let { card, isRealmCard } = result;
|
|
1996
|
-
if (card.id) {
|
|
1997
|
-
referencedId = card.id;
|
|
1998
|
-
this.store.addReference(card.id);
|
|
1999
|
-
}
|
|
2000
|
-
state.isRealmCard = isRealmCard;
|
|
2001
|
-
state.card = card;
|
|
2002
|
-
});
|
|
2003
|
-
}
|
|
2004
|
-
return state;
|
|
2005
|
-
});
|
|
2006
|
-
});
|
|
2007
|
-
}
|
|
2008
|
-
#toolResultCard = (initializeDeferredDecorator(this, "toolResultCard"), void 0);
|
|
2009
|
-
get isDisplayingCode() {
|
|
2010
|
-
return this.args.roomResource.isDisplayingCode(this.args.messageTool.toolRequest);
|
|
2011
|
-
}
|
|
2012
|
-
toggleViewCode = () => {
|
|
2013
|
-
this.args.roomResource.toggleViewCode(this.args.messageTool.toolRequest);
|
|
2014
|
-
};
|
|
2015
|
-
scrollBottomIntoView = modifier((element) => {
|
|
2016
|
-
if (!this.isDisplayingCode) return;
|
|
2017
|
-
this.scrollIntoView(element.parentElement);
|
|
2018
|
-
});
|
|
2019
|
-
scrollIntoView(element) {
|
|
2020
|
-
let { top, bottom } = element.getBoundingClientRect();
|
|
2021
|
-
if (!(top >= 0 && bottom <= window.innerHeight)) element.scrollIntoView({ block: "end" });
|
|
2022
|
-
}
|
|
2023
|
-
get headerTitle() {
|
|
2024
|
-
if (this.toolResultCard.card) return cardTypeDisplayName(this.toolResultCard.card);
|
|
2025
|
-
return "";
|
|
2026
|
-
}
|
|
2027
|
-
get shouldDisplayResultCard() {
|
|
2028
|
-
let { card, isRealmCard } = this.toolResultCard;
|
|
2029
|
-
if (!card) return false;
|
|
2030
|
-
if (isRealmCard) return true;
|
|
2031
|
-
return hasOwnEmbeddedView(card) && !card[hasNothingToShow];
|
|
2032
|
-
}
|
|
2033
|
-
get didFailCorrectnessCheck() {
|
|
2034
|
-
if (this.args.messageTool.name !== "checkCorrectness") return false;
|
|
2035
|
-
let card = this.toolResultCard.card;
|
|
2036
|
-
if (!card) return false;
|
|
2037
|
-
let hasErrors = Array.isArray(card.errors) && card.errors.filter(Boolean).length > 0;
|
|
2038
|
-
let isMarkedIncorrect = card.correct === false;
|
|
2039
|
-
return hasErrors || isMarkedIncorrect;
|
|
2040
|
-
}
|
|
2041
|
-
get moreOptionsMenuItems() {
|
|
2042
|
-
return toMenuItems(this.toolResultCard.card?.[getMenuItems]?.({
|
|
2043
|
-
canEdit: false,
|
|
2044
|
-
cardCrudFunctions: {},
|
|
2045
|
-
menuContext: "ai-assistant",
|
|
2046
|
-
menuContextParams: {
|
|
2047
|
-
activeRealmURL: this.activeRealmURL,
|
|
2048
|
-
canEditActiveRealm: this.canEditActiveRealm
|
|
2049
|
-
},
|
|
2050
|
-
toolContext: this.toolService.toolContext
|
|
2051
|
-
}) ?? []);
|
|
2052
|
-
}
|
|
2053
|
-
get canEditActiveRealm() {
|
|
2054
|
-
let activeRealmURL = this.activeRealmURL;
|
|
2055
|
-
return activeRealmURL ? this.realm.canWrite(activeRealmURL) : false;
|
|
2056
|
-
}
|
|
2057
|
-
get activeRealmURL() {
|
|
2058
|
-
return this.operatorModeStateService.realmURL;
|
|
2059
|
-
}
|
|
2060
|
-
get commandResultCardForRendering() {
|
|
2061
|
-
if (!this.toolResultCard.card) throw new Error("Command result card is not available");
|
|
2062
|
-
return this.toolResultCard.card;
|
|
2063
|
-
}
|
|
2064
|
-
get failedToolState() {
|
|
2065
|
-
let toolRequest = this.args.messageTool.toolRequest;
|
|
2066
|
-
if (!toolRequest.id) return;
|
|
2067
|
-
return this.matrixService.failedToolState.get(toolRequest.id);
|
|
2068
|
-
}
|
|
2069
|
-
static {
|
|
2070
|
-
decorateMethodV2(this.prototype, "failedToolState", [cached]);
|
|
2071
|
-
}
|
|
2072
|
-
get failedToolCallState() {
|
|
2073
|
-
return this.args.messageTool.status === "failed" && !this.failedToolState;
|
|
2074
|
-
}
|
|
2075
|
-
get invalidToolCallState() {
|
|
2076
|
-
return this.args.messageTool.status === "invalid" && !!this.args.messageTool.failureReason && !this.args.messageTool.isBotExecuted;
|
|
2077
|
-
}
|
|
2078
|
-
get approvalReason() {
|
|
2079
|
-
let reason = this.args.messageTool.toolRequest.arguments?.reason;
|
|
2080
|
-
return typeof reason === "string" && reason.trim() ? reason.trim() : "";
|
|
2081
|
-
}
|
|
2082
|
-
get clickReasons() {
|
|
2083
|
-
let { messageTool } = this.args;
|
|
2084
|
-
if (messageTool.message.agentId !== this.matrixService.agentId) return [];
|
|
2085
|
-
return this.applyButtonState === "ready" || Boolean(this.failedToolState) || this.failedToolCallState || this.invalidToolCallState ? messageTool.clickReasons : [];
|
|
2086
|
-
}
|
|
2087
|
-
static {
|
|
2088
|
-
decorateMethodV2(this.prototype, "clickReasons", [cached]);
|
|
2089
|
-
}
|
|
2090
|
-
get isPreparing() {
|
|
2091
|
-
if (this.args.isStreaming) return true;
|
|
2092
|
-
let { messageTool } = this.args;
|
|
2093
|
-
return messageTool.isResolving && (messageTool.status === "ready" || messageTool.status === void 0);
|
|
2094
|
-
}
|
|
2095
|
-
get commandDescription() {
|
|
2096
|
-
return this.args.messageTool.description ?? "Preparing tool call...";
|
|
2097
|
-
}
|
|
2098
|
-
get hasFailedState() {
|
|
2099
|
-
return !!(this.failedToolState || this.failedToolCallState || this.didFailCorrectnessCheck);
|
|
2100
|
-
}
|
|
2101
|
-
static {
|
|
2102
|
-
setComponentTemplate(templateFactory({
|
|
2103
|
-
"id": "3hr0o0Fx",
|
|
2104
|
-
"block": "[[[11,0],[16,0,[28,[32,0],[\"room-message-tool\"],[[\"is-pending\",\"is-error\",\"is-failed\",\"compact\"],[[30,1],[30,2],[28,[32,1],[[30,0,[\"hasFailedState\"]]],null],[30,3]]]]],[16,\"data-test-tool-call-id\",[30,4,[\"toolRequest\",\"id\"]]],[16,\"data-tool-name\",[30,4,[\"name\"]]],[16,\"data-tool-arguments-length\",[30,0,[\"argumentsLength\"]]],[17,5],[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"],[12],[1,\"\\n\"],[41,[30,0,[\"isPreparing\"]],[[[1,\" \"],[8,[32,2],[[16,0,[28,[32,0],[\"tool-code-block\"],[[\"compact\"],[[30,3]]]]],[16,\"data-test-tool-call-card-idle\",[28,[32,3],[[28,[32,4],[[30,0,[\"applyButtonState\"]],\"applying\"],null]],null]],[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@monacoSDK\",\"@codeData\"],[[30,6],[28,[32,5],null,[[\"code\",\"language\"],[[30,0,[\"previewCommandCode\"]],\"json\"]]]]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,7,[\"commandHeader\"]],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@commandDescription\",\"@action\",\"@actionVerb\",\"@code\",\"@isCompact\",\"@toolCallState\",\"@isDisplayingCode\",\"@toggleCode\"],[[30,0,[\"commandDescription\"]],[30,8],[30,4,[\"actionVerb\"]],[30,0,[\"previewCommandCode\"]],[30,3],\"preparing\",[30,0,[\"isDisplayingCode\"]],[30,0,[\"toggleViewCode\"]]]],null],[1,\"\\n\"],[41,[30,0,[\"isDisplayingCode\"]],[[[1,\" \"],[8,[30,7,[\"editor\"]],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],null,null],[1,\"\\n\"]],[]],null],[1,\" \"]],[7]]]]],[1,\"\\n\"]],[]],[[[41,[30,0,[\"clickReasons\",\"length\"]],[[[1,\" \"],[10,0],[14,0,\"click-reasons\"],[14,\"data-test-tool-call-click-reasons\",\"\"],[14,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"],[12],[1,\"\\n \"],[10,2],[14,0,\"click-reasons-intro\"],[14,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"],[12],[1,\"This waits for your click because it\\n contains:\"],[13],[1,\"\\n \"],[10,\"ul\"],[14,0,\"click-reasons-list\"],[14,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"],[12],[1,\"\\n\"],[42,[28,[31,2],[[28,[31,2],[[30,0,[\"clickReasons\"]]],null]],null],null,[[[1,\" \"],[10,\"li\"],[15,\"data-test-tool-call-click-reason\",[30,9,[\"call\"]]],[14,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"],[12],[1,\"\\n \"],[10,\"code\"],[14,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"],[12],[1,[30,9,[\"call\"]]],[13],[1,\"\\n —\\n \"],[1,[30,9,[\"reason\"]]],[1,\"\\n \"],[13],[1,\"\\n\"]],[9]],null],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"],[8,[32,2],[[16,0,[28,[32,0],[\"tool-code-block\"],[[\"compact\"],[[30,3]]]]],[16,\"data-test-tool-call-card-idle\",[28,[32,3],[[28,[32,4],[[30,0,[\"applyButtonState\"]],\"applying\"],null]],null]],[24,\"data-test-tool-code-block\",\"\"],[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"],[4,[30,0,[\"scrollBottomIntoView\"]],null,null]],[[\"@monacoSDK\",\"@codeData\"],[[30,6],[28,[32,5],null,[[\"code\",\"language\"],[[30,0,[\"previewCommandCode\"]],\"json\"]]]]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,10,[\"commandHeader\"]],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@commandDescription\",\"@action\",\"@secondaryAction\",\"@secondaryActionVerb\",\"@actionVerb\",\"@code\",\"@toolCallState\",\"@isCompact\",\"@isDisplayingCode\",\"@toggleCode\"],[[30,4,[\"description\"]],[30,8],[52,[30,4,[\"awaitsApproval\"]],[30,11]],\"Decline\",[30,4,[\"actionVerb\"]],[30,0,[\"previewCommandCode\"]],[30,0,[\"applyButtonState\"]],[30,3],[30,0,[\"isDisplayingCode\"]],[30,0,[\"toggleViewCode\"]]]],null],[1,\"\\n\"],[41,[30,0,[\"isDisplayingCode\"]],[[[1,\" \"],[8,[30,10,[\"editor\"]],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],null,null],[1,\"\\n\"]],[]],null],[1,\" \"]],[10]]]]],[1,\"\\n\"],[41,[30,4,[\"awaitsApproval\"]],[[[1,\" \"],[10,2],[14,0,\"approval-note\"],[14,\"data-test-tool-call-approval\",\"\"],[14,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"],[12],[1,\"\\n\"],[41,[30,0,[\"approvalReason\"]],[[[1,\" The assistant asks for your approval and says: “\"],[1,[30,0,[\"approvalReason\"]]],[1,\"”\\n Approve if that's OK with you.\\n\"]],[]],[[[1,\" The assistant asks for your approval to do this. Approve if that's\\n OK with you.\\n\"]],[]]],[1,\" \"],[13],[1,\"\\n\"]],[]],null],[41,[30,0,[\"failedToolState\"]],[[[1,\" \"],[8,[32,6],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@type\"],[\"error\"]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,12,[\"Messages\"]],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@messages\"],[[28,[32,7],[[30,0,[\"failedToolState\",\"message\"]]],null]]],null],[1,\"\\n \"],[8,[30,12,[\"Action\"]],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@action\",\"@actionName\"],[[30,8],\"Retry\"]],null],[1,\"\\n \"]],[12]]]]],[1,\"\\n\"]],[]],[[[41,[30,0,[\"failedToolCallState\"]],[[[1,\" \"],[8,[32,6],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@type\"],[\"error\"]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,13,[\"Messages\"]],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@messages\"],[[28,[32,7],[[52,[30,4,[\"failureReason\"]],[30,4,[\"failureReason\"]],\"Tool call failed.\"]],null]]],null],[1,\"\\n \"],[8,[30,13,[\"Action\"]],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@action\",\"@actionName\"],[[30,8],\"Retry\"]],null],[1,\"\\n \"]],[13]]]]],[1,\"\\n\"]],[]],[[[41,[30,0,[\"invalidToolCallState\"]],[[[1,\" \"],[8,[32,6],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@type\"],[\"warning\"]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,14,[\"Messages\"]],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@messages\"],[[28,[32,7],[[30,4,[\"failureReason\"]]],null]]],null],[1,\"\\n \"],[8,[30,14,[\"Action\"]],[[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@action\",\"@actionName\"],[[30,8],\"Try Anyway\"]],null],[1,\"\\n \"]],[14]]]]],[1,\"\\n \"]],[]],null]],[]]]],[]]],[41,[30,0,[\"shouldDisplayResultCard\"]],[[[1,\" \"],[8,[32,8],[[24,0,\"tool-result-card-preview\"],[24,\"data-theme\",\"light\"],[24,\"data-test-tool-result-container\",\"\"],[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@displayBoundaries\"],[false]],[[\"default\"],[[[[1,\"\\n \"],[8,[32,9],[[24,0,\"tool-result-card-header\"],[24,\"data-test-tool-result-header\",\"\"],[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@cardTypeDisplayName\",\"@cardTypeIcon\",\"@moreOptionsMenuItems\"],[[30,0,[\"headerTitle\"]],[28,[32,10],[[30,0,[\"commandResultCardForRendering\"]]],null],[30,0,[\"moreOptionsMenuItems\"]]]],null],[1,\"\\n \"],[8,[32,11],[[24,\"data-test-boxel-tool-call-result\",\"\"],[24,\"data-scopedcss-58f1aa8cb0-bbefafd7e6\",\"\"]],[[\"@card\",\"@format\",\"@displayContainer\"],[[30,0,[\"commandResultCardForRendering\"]],\"embedded\",false]],null],[1,\"\\n \"]],[]]]]],[1,\"\\n\"]],[]],null]],[]]],[13],[1,\"\\n\\n\"]],[\"@isPending\",\"@isError\",\"@isCompact\",\"@messageTool\",\"&attrs\",\"@monacoSDK\",\"codeBlock\",\"@runCommand\",\"clickReason\",\"codeBlock\",\"@declineCommand\",\"Alert\",\"Alert\",\"Alert\"],[\"if\",\"each\",\"-track-array\"]]",
|
|
2105
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/matrix/room-message-tool.gts",
|
|
2106
|
-
"scope": () => [
|
|
2107
|
-
cn_default,
|
|
2108
|
-
bool,
|
|
2109
|
-
CodeBlockComponent,
|
|
2110
|
-
not,
|
|
2111
|
-
eq,
|
|
2112
|
-
hash,
|
|
2113
|
-
Alert,
|
|
2114
|
-
array,
|
|
2115
|
-
CardContainer,
|
|
2116
|
-
CardHeader,
|
|
2117
|
-
cardTypeIcon,
|
|
2118
|
-
CardRenderer
|
|
2119
|
-
],
|
|
2120
|
-
"isStrictMode": true
|
|
2121
|
-
}), this);
|
|
2122
|
-
}
|
|
2123
|
-
};
|
|
2124
|
-
//#endregion
|
|
2125
|
-
//#region app/components/matrix/room-message.gts
|
|
2126
|
-
var STREAMING_TIMEOUT_MS = 180 * 1e3;
|
|
2127
|
-
STREAMING_TIMEOUT_MS / 6e4;
|
|
2128
|
-
var MESSAGE_GROUPING_WINDOW_MS = 120 * 1e3;
|
|
2129
|
-
var RoomMessage = class extends Component {
|
|
2130
|
-
static {
|
|
2131
|
-
decorateFieldV2(this.prototype, "getCardCollection", [consume(GetCardCollectionContextName)]);
|
|
2132
|
-
}
|
|
2133
|
-
#getCardCollection = (initializeDeferredDecorator(this, "getCardCollection"), void 0);
|
|
2134
|
-
static {
|
|
2135
|
-
decorateFieldV2(this.prototype, "timeoutCheckTimestamp", [tracked], function() {
|
|
2136
|
-
return Date.now();
|
|
2137
|
-
});
|
|
2138
|
-
}
|
|
2139
|
-
#timeoutCheckTimestamp = (initializeDeferredDecorator(this, "timeoutCheckTimestamp"), void 0);
|
|
2140
|
-
static {
|
|
2141
|
-
decorateFieldV2(this.prototype, "waitStartTimestamp", [tracked]);
|
|
2142
|
-
}
|
|
2143
|
-
#waitStartTimestamp = (initializeDeferredDecorator(this, "waitStartTimestamp"), void 0);
|
|
2144
|
-
constructor(owner, args) {
|
|
2145
|
-
super(owner, args);
|
|
2146
|
-
this.checkStreamingTimeout.perform();
|
|
2147
|
-
}
|
|
2148
|
-
get message() {
|
|
2149
|
-
return this.args.roomResource.messages[this.args.index];
|
|
2150
|
-
}
|
|
2151
|
-
get attachedCardCollection() {
|
|
2152
|
-
return this.getCardCollection(this, () => this.message.attachedCardIds ?? []);
|
|
2153
|
-
}
|
|
2154
|
-
static {
|
|
2155
|
-
decorateMethodV2(this.prototype, "attachedCardCollection", [cached]);
|
|
2156
|
-
}
|
|
2157
|
-
checkStreamingTimeout = buildTask(() => ({
|
|
2158
|
-
context: this,
|
|
2159
|
-
generator: function* () {
|
|
2160
|
-
if (!this.isFromAssistant || !this.args.isStreaming) return;
|
|
2161
|
-
if (this.message.isStreamingFinished === true) return;
|
|
2162
|
-
this.bumpTimeoutCheckTimestamp();
|
|
2163
|
-
yield new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
2164
|
-
this.checkStreamingTimeout.perform();
|
|
2165
|
-
}
|
|
2166
|
-
}), null, "checkStreamingTimeout", null);
|
|
2167
|
-
waitLonger = () => {
|
|
2168
|
-
this.waitStartTimestamp = Date.now();
|
|
2169
|
-
this.bumpTimeoutCheckTimestamp();
|
|
2170
|
-
if (!this.checkStreamingTimeout.isRunning) this.checkStreamingTimeout.perform();
|
|
2171
|
-
};
|
|
2172
|
-
bumpTimeoutCheckTimestamp() {
|
|
2173
|
-
this.timeoutCheckTimestamp = Date.now();
|
|
2174
|
-
}
|
|
2175
|
-
get streamingTimeout() {
|
|
2176
|
-
if (!this.isFromAssistant || !this.args.isStreaming) return false;
|
|
2177
|
-
if (!this.isLastAssistantMessage) return false;
|
|
2178
|
-
if (this.message.isStreamingFinished === true) return false;
|
|
2179
|
-
let lastActivityTimestamp = Math.max(Number(this.message.updated), this.waitStartTimestamp ?? 0);
|
|
2180
|
-
return this.timeoutCheckTimestamp - lastActivityTimestamp > STREAMING_TIMEOUT_MS;
|
|
2181
|
-
}
|
|
2182
|
-
get isFromAssistant() {
|
|
2183
|
-
return this.message.author.userId === aiBotUserId;
|
|
2184
|
-
}
|
|
2185
|
-
get isLastAssistantMessage() {
|
|
2186
|
-
return this.isFromAssistant && this.args.index === this.args.roomResource.indexOfLastNonDebugMessage;
|
|
2187
|
-
}
|
|
2188
|
-
run = buildTask(() => ({
|
|
2189
|
-
context: this,
|
|
2190
|
-
generator: function* (command) {
|
|
2191
|
-
if (command.awaitsApproval) return this.toolService.answerApproval.unlinked().perform(command, "approve");
|
|
2192
|
-
return this.toolService.run.unlinked().perform(command);
|
|
2193
|
-
}
|
|
2194
|
-
}), null, "run", null);
|
|
2195
|
-
decline = buildTask(() => ({
|
|
2196
|
-
context: this,
|
|
2197
|
-
generator: function* (command) {
|
|
2198
|
-
return this.toolService.answerApproval.unlinked().perform(command, "decline");
|
|
2199
|
-
}
|
|
2200
|
-
}), null, "decline", null);
|
|
2201
|
-
isCompactTool = (tool) => this.message.isCodePatchCorrectness || tool.isBotExecuted && !tool.awaitsApproval;
|
|
2202
|
-
get isBotToolsOnlyMessage() {
|
|
2203
|
-
return !!this.message.tools?.length && this.message.tools.every((tool) => tool.isBotExecuted && !tool.awaitsApproval) && !this.message.htmlParts?.length && !this.message.reasoningContent && !this.message.attachedFiles?.length && !this.message.attachedCardsAsFiles?.length && !this.message.attachedCardIds?.length;
|
|
2204
|
-
}
|
|
2205
|
-
get isGroupedWithPreviousMessage() {
|
|
2206
|
-
let previousMessage = this.args.roomResource.messages[this.args.index - 1];
|
|
2207
|
-
if (!previousMessage) return false;
|
|
2208
|
-
return previousMessage.author.userId === this.message.author.userId && this.message.created.getTime() - previousMessage.created.getTime() < MESSAGE_GROUPING_WINDOW_MS;
|
|
2209
|
-
}
|
|
2210
|
-
get hideMeta() {
|
|
2211
|
-
return this.message.isCodePatchCorrectness || this.isGroupedWithPreviousMessage;
|
|
2212
|
-
}
|
|
2213
|
-
static {
|
|
2214
|
-
setComponentTemplate(templateFactory({
|
|
2215
|
-
"id": "EE4v8NRJ",
|
|
2216
|
-
"block": "[[[41,[30,0,[\"attachedCardCollection\",\"isLoaded\"]],[[[1,\" \"],[8,[32,0],[[16,1,[29,[\"message-container-\",[30,1]]]],[16,\"data-test-boxel-message-from\",[30,0,[\"message\",\"author\",\"name\"]]],[16,0,[28,[32,1],null,[[\"bot-tools-only\"],[[30,0,[\"isBotToolsOnlyMessage\"]]]]]],[16,\"data-test-boxel-message-instance-id\",[30,0,[\"message\",\"instanceId\"]]],[17,2]],[[\"@messageHTML\",\"@messageHTMLParts\",\"@reasoningContent\",\"@monacoSDK\",\"@datetime\",\"@roomId\",\"@eventId\",\"@index\",\"@isMostRecentMessage\",\"@registerScroller\",\"@unregisterScroller\",\"@isFromAssistant\",\"@profileAvatar\",\"@collectionResource\",\"@files\",\"@attachedCardsAsFiles\",\"@errorMessage\",\"@reloadBillingData\",\"@isDebugMessage\",\"@isStreaming\",\"@retryAction\",\"@waitAction\",\"@isPending\",\"@hideMeta\",\"@isCodePatchCorrectness\",\"@commands\",\"@usage\",\"@compaction\"],[[30,0,[\"message\",\"bodyHTML\"]],[30,0,[\"message\",\"htmlParts\"]],[30,0,[\"message\",\"reasoningContent\"]],[30,3],[30,0,[\"message\",\"created\"]],[30,0,[\"message\",\"roomId\"]],[30,0,[\"message\",\"eventId\"]],[30,1],[30,4],[30,5],[30,6],[30,0,[\"isFromAssistant\"]],[50,[32,2],0,null,[[\"isReady\",\"userId\",\"displayName\"],[true,[30,0,[\"message\",\"author\",\"userId\"]],[30,0,[\"message\",\"author\",\"displayName\"]]]]],[30,0,[\"attachedCardCollection\"]],[30,0,[\"message\",\"attachedFiles\"]],[30,0,[\"message\",\"attachedCardsAsFiles\"]],[30,0,[\"errorMessage\"]],[30,0,[\"message\",\"reloadBillingData\"]],[30,0,[\"message\",\"isDebugMessage\"]],[30,7],[30,8],[52,[30,0,[\"streamingTimeout\"]],[30,0,[\"waitLonger\"]]],[30,9],[30,0,[\"hideMeta\"]],[30,0,[\"message\",\"isCodePatchCorrectness\"]],[30,0,[\"message\",\"tools\"]],[30,0,[\"message\",\"usage\"]],[30,0,[\"message\",\"compaction\"]]]],[[\"default\"],[[[[1,\"\\n\"],[42,[28,[31,3],[[28,[31,3],[[30,0,[\"message\",\"tools\"]]],null]],null],null,[[[1,\" \"],[8,[32,3],null,[[\"@messageTool\",\"@roomResource\",\"@runCommand\",\"@declineCommand\",\"@roomId\",\"@isPending\",\"@isCompact\",\"@monacoSDK\",\"@isError\",\"@isStreaming\"],[[30,10],[30,11],[28,[32,4],[[28,[32,5],[[30,0,[\"run\"]]],null],[30,10]],null],[28,[32,4],[[28,[32,5],[[30,0,[\"decline\"]]],null],[30,10]],null],[30,12],[30,9],[28,[30,0,[\"isCompactTool\"]],[[30,10]],null],[30,3],[28,[32,6],[[30,0,[\"errorMessage\"]]],null],[30,7]]],null],[1,\"\\n\"]],[10]],null],[1,\" \"]],[]]]]],[1,\"\\n\"]],[]],null]],[\"@index\",\"&attrs\",\"@monacoSDK\",\"@isMostRecentMessage\",\"@registerScroller\",\"@unregisterScroller\",\"@isStreaming\",\"@retryAction\",\"@isPending\",\"command\",\"@roomResource\",\"@roomId\"],[\"if\",\"component\",\"each\",\"-track-array\"]]",
|
|
2217
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/matrix/room-message.gts",
|
|
2218
|
-
"scope": () => [
|
|
2219
|
-
AiAssistantMessage,
|
|
2220
|
-
cn_default,
|
|
2221
|
-
Avatar,
|
|
2222
|
-
RoomMessageTool,
|
|
2223
|
-
fn,
|
|
2224
|
-
perform,
|
|
2225
|
-
bool
|
|
2226
|
-
],
|
|
2227
|
-
"isStrictMode": true
|
|
2228
|
-
}), this);
|
|
2229
|
-
}
|
|
2230
|
-
static {
|
|
2231
|
-
decorateFieldV2(this.prototype, "toolService", [service]);
|
|
2232
|
-
}
|
|
2233
|
-
#toolService = (initializeDeferredDecorator(this, "toolService"), void 0);
|
|
2234
|
-
knownErrorMessagePrefixes = [{ "MatrixError: [413] event too large": "Response from the AI assistant was too large to process" }];
|
|
2235
|
-
get errorMessage() {
|
|
2236
|
-
if (this.message.errorMessage) {
|
|
2237
|
-
let humanFriendlyErrorMessage = null;
|
|
2238
|
-
for (let errorMessagePrefix of this.knownErrorMessagePrefixes) {
|
|
2239
|
-
let key = Object.keys(errorMessagePrefix)[0];
|
|
2240
|
-
if (this.message.errorMessage.startsWith(key)) humanFriendlyErrorMessage = errorMessagePrefix[key];
|
|
2241
|
-
}
|
|
2242
|
-
return humanFriendlyErrorMessage || this.message.errorMessage;
|
|
2243
|
-
}
|
|
2244
|
-
if (this.streamingTimeout) return `This message has been processing for a long time (more than 3 minutes), possibly due to a delay in response time, or due to a system error.`;
|
|
2245
|
-
}
|
|
2246
|
-
static {
|
|
2247
|
-
decorateMethodV2(this.prototype, "errorMessage", [cached]);
|
|
2248
|
-
}
|
|
2249
|
-
};
|
|
2250
|
-
//#endregion
|
|
2251
|
-
//#region app/components/matrix/room.gts
|
|
2252
|
-
var Room = class extends Component {
|
|
2253
|
-
static {
|
|
2254
|
-
setComponentTemplate(templateFactory({
|
|
2255
|
-
"id": "eBCFREhm",
|
|
2256
|
-
"block": "[[[41,[28,[32,0],[[30,0,[\"doMatrixEventFlush\",\"isRunning\"]]],null],[[[1,\" \"],[11,\"section\"],[24,0,\"room\"],[16,\"data-room-settled\",[28,[32,1],[[30,0,[\"doWhenRoomChanges\",\"isIdle\"]],[28,[32,0],[[30,0,[\"matrixService\",\"isLoadingTimeline\"]]],null]],null]],[16,\"data-test-room-settled\",[28,[32,1],[[30,0,[\"doWhenRoomChanges\",\"isIdle\"]],[28,[32,0],[[30,0,[\"matrixService\",\"isLoadingTimeline\"]]],null]],null]],[16,\"data-test-room-name\",[30,1,[\"name\"]]],[16,\"data-test-room\",[30,2]],[16,\"data-room-id\",[30,2]],[17,3],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[12],[1,\"\\n \"],[8,[32,2],[[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@registerConversationScroller\",\"@setScrollPosition\"],[[30,0,[\"registerConversationScroller\"]],[30,0,[\"setScrollPosition\"]]]],[[\"default\"],[[[[1,\"\\n\"],[41,[30,0,[\"matrixService\",\"isLoadingTimeline\"]],[[[1,\" \"],[10,0],[14,0,\"session-preparation-container\"],[14,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[12],[1,\"\\n \"],[8,[32,3],[[24,0,\"loading-indicator\"],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@color\"],[\"var(--boxel-light)\"]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[41,[30,0,[\"aiAssistantPanelService\",\"isPreparingSession\"]],[[[1,\" \"],[10,0],[14,0,\"session-preparation-container\"],[14,\"data-test-session-preparation\",\"\"],[14,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[12],[1,\"\\n \"],[8,[32,3],[[24,0,\"loading-indicator\"],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@color\"],[\"var(--boxel-light)\"]],null],[1,\"\\n \"],[10,1],[14,0,\"session-preparation-message\"],[14,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[12],[1,\"\\n\"],[41,[28,[32,1],[[30,0,[\"aiAssistantPanelService\",\"isSummarizingSession\"]],[30,0,[\"aiAssistantPanelService\",\"isCopyingFileHistory\"]]],null],[[[1,\" Summarizing session and copying files\\n\"]],[]],[[[41,[30,0,[\"aiAssistantPanelService\",\"isSummarizingSession\"]],[[[1,\" Summarizing previous session\\n\"]],[]],[[[41,[30,0,[\"aiAssistantPanelService\",\"isCopyingFileHistory\"]],[[[1,\" Copying file history from previous session\\n\"]],[]],[[[1,\" Preparing session context\\n \"]],[]]]],[]]]],[]]],[1,\" \"],[13],[1,\"\\n \"],[10,1],[14,0,\"session-preparation-message\"],[14,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[12],[1,\"\\n Please keep Assistant open\\n \"],[13],[1,\"\\n \"],[10,1],[14,0,\"session-preparation-small-message\"],[14,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[12],[1,\"\\n Takes 10-20 seconds\\n \"],[13],[1,\"\\n \"],[11,\"button\"],[24,0,\"session-preparation-skip-button\"],[24,\"data-test-session-preparation-skip-button\",\"\"],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[24,4,\"button\"],[4,[32,4],[\"click\",[30,0,[\"skipSessionPreparation\"]]],null],[12],[1,\"\\n Skip\\n \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[42,[28,[31,2],[[28,[31,2],[[30,0,[\"messages\"]]],null]],null],\"eventId\",[[[1,\" \"],[8,[32,5],[[16,\"data-test-message-idx\",[30,5]],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@roomId\",\"@roomResource\",\"@index\",\"@isMostRecentMessage\",\"@registerScroller\",\"@unregisterScroller\",\"@isPending\",\"@monacoSDK\",\"@isStreaming\",\"@retryAction\"],[[30,2],[30,1],[30,5],[28,[30,0,[\"isLastMessage\"]],[[30,5]],null],[30,0,[\"registerMessageScroller\"]],[30,0,[\"unregisterMessageScroller\"]],[28,[30,0,[\"isPendingMessage\"]],[[30,4]],null],[30,6],[28,[30,0,[\"isMessageStreaming\"]],[[30,4]],null],[28,[30,0,[\"maybeRetryAction\"]],[[30,5],[30,4]],null]]],null],[1,\"\\n\"]],[4,5]],[[[1,\" \"],[8,[32,6],[[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@sendPrompt\"],[[30,0,[\"sendMessage\"]]]],null],[1,\"\\n\"]],[]]],[1,\"\\n\"],[41,[30,0,[\"shouldShowUnknownMessageSendError\"]],[[[1,\" \"],[8,[32,7],[[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@type\"],[\"error\"]],[[\"default\"],[[[[1,\"\\n \"],[8,[30,7,[\"Messages\"]],[[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@messages\"],[[28,[32,8],[[30,0,[\"unknownMessageSendError\"]]],null]]],null],[1,\"\\n \"]],[7]]]]],[1,\"\\n\"]],[]],null],[1,\"\\n\"],[41,[30,0,[\"conversationTokenUsage\"]],[[[1,\" \"],[10,0],[14,0,\"conversation-token-usage\"],[14,\"data-test-conversation-token-usage\",\"\"],[14,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[12],[1,\"\\n Session total:\\n \"],[1,[30,0,[\"conversationTokenUsage\"]]],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"]],[]]]],[]]],[1,\" \"]],[]]]]],[1,\"\\n\\n \"],[10,\"footer\"],[14,0,\"room-actions\"],[14,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[12],[1,\"\\n \"],[8,[32,9],[[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@autoAttachedCardIds\",\"@cardIdsToAttach\",\"@chooseCard\",\"@removeCard\",\"@chooseFile\",\"@chooseLocalFile\",\"@removeFile\",\"@autoAttachedFiles\",\"@filesToAttach\",\"@fileUploadStates\",\"@retryFileUpload\",\"@inputModalities\",\"@autoAttachedCardTooltipMessage\"],[[30,0,[\"autoAttachedCardIds\"]],[30,0,[\"cardIdsToAttach\"]],[30,0,[\"chooseCard\"]],[30,0,[\"removeCard\"]],[28,[32,10],[[30,0,[\"chooseFileTask\"]]],null],[28,[32,10],[[30,0,[\"chooseLocalFileTask\"]]],null],[30,0,[\"removeFile\"]],[30,0,[\"autoAttachedFiles\"]],[30,0,[\"filesToAttach\"]],[30,0,[\"fileUploadStates\"]],[30,0,[\"retryFileUpload\"]],[30,1,[\"activeInputModalities\"]],[52,[28,[32,11],[[30,0,[\"operatorModeStateService\",\"state\",\"submode\"]],[32,12,[\"Code\"]]],null],\"Current card is shared automatically\",\"Topmost card is shared automatically\"]]],[[\"default\"],[[[[1,\"\\n\"],[41,[30,0,[\"displayActionBar\"]],[[[1,\" \"],[8,[32,13],[[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@acceptAll\",\"@cancel\",\"@acceptingAll\",\"@acceptingAllLabel\",\"@generatingResults\",\"@generatingLabel\",\"@stop\",\"@stopping\",\"@showUnreadIndicator\",\"@unreadMessageText\",\"@scrollToFirstUnread\"],[[28,[32,10],[[30,0,[\"executeAllReadyActionsTask\"]]],null],[30,0,[\"cancelActionBar\"]],[30,0,[\"isAcceptingAll\"]],[30,0,[\"acceptingAllLabel\"]],[30,0,[\"assistantLoopActive\"]],[52,[30,0,[\"generatingResults\"]],\"Generating results\",\"Running tools\"],[28,[32,10],[[30,0,[\"stopGeneratingTask\"]]],null],[30,0,[\"stopGeneratingTask\",\"isRunning\"]],[30,0,[\"showUnreadIndicator\"]],[30,0,[\"unreadMessageText\"]],[30,0,[\"scrollToFirstUnread\"]]]],null],[1,\"\\n\"]],[]],null],[1,\" \"],[11,0],[24,0,\"chat-input-area\"],[24,\"data-test-chat-input-area\",\"\"],[16,\"data-drop-zone-active\",[30,0,[\"isDropZoneActive\"]]],[24,\"data-theme\",\"light\"],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[4,[32,4],[\"dragover\",[30,0,[\"handleChatInputDragOver\"]]],null],[4,[32,4],[\"dragenter\",[30,0,[\"handleChatInputDragEnter\"]]],null],[4,[32,4],[\"dragleave\",[30,0,[\"handleChatInputDragLeave\"]]],null],[4,[32,4],[\"drop\",[30,0,[\"handleChatInputDrop\"]]],null],[12],[1,\"\\n\"],[41,[30,0,[\"isDropZoneActive\"]],[[[1,\" \"],[10,0],[14,0,\"chat-input-drop-hint\"],[14,\"data-test-chat-input-drop-hint\",\"\"],[14,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[12],[1,\"\\n Drop file to attach\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\" \"],[8,[32,14],[[16,\"data-test-message-field\",[30,2]],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@attachButton\",\"@value\",\"@onInput\",\"@onSend\",\"@onPaste\",\"@canSend\",\"@isSending\"],[[30,9],[30,0,[\"messageToSend\"]],[30,0,[\"setMessage\"]],[30,0,[\"sendMessage\"]],[30,0,[\"handleChatInputPaste\"]],[30,0,[\"canSend\"]],[30,0,[\"isSending\"]]]],null],[1,\"\\n\"],[41,[30,0,[\"aiAssistantPanelService\",\"isFocusPillVisible\"]],[[[1,\" \"],[8,[32,15],[[24,0,\"pill-row\"],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@label\",\"@metaPills\"],[[30,0,[\"aiAssistantPanelService\",\"focusPillLabel\"]],[30,0,[\"aiAssistantPanelService\",\"focusPillMetaPills\"]]]],null],[1,\"\\n\"]],[]],null],[41,[30,0,[\"displayAttachedItems\"]],[[[1,\" \"],[8,[30,8],[[24,0,\"pill-row\"],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],null,null],[1,\"\\n\"]],[]],null],[1,\"\\n \"],[10,0],[14,0,\"chat-input-area__bottom-actions\"],[14,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[12],[1,\"\\n\"],[41,[30,0,[\"displaySkillMenu\"]],[[[1,\" \"],[8,[32,16],[[24,0,\"skill-menu\"],[24,\"data-test-skill-menu\",\"\"],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@skills\",\"@onChooseCard\",\"@onChooseSkillMarkdown\",\"@onUpdateSkillIsActive\",\"@onExpand\",\"@onCollapse\"],[[30,0,[\"sortedSkills\"]],[28,[32,10],[[30,0,[\"attachSkillTask\"]]],null],[28,[32,10],[[30,0,[\"attachSkillTask\"]]],null],[28,[32,10],[[30,0,[\"updateSkillIsActiveTask\"]]],null],[28,[32,17],[[30,0,[\"setSelectedBottomAction\"]],\"skill-menu\"],null],[28,[32,17],[[30,0,[\"setSelectedBottomAction\"]],[27]],null]]],null],[1,\"\\n\"]],[]],null],[41,[30,0,[\"displayLLMSelect\"]],[[[1,\" \"],[8,[32,18],[[24,0,\"llm-select\"],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@selected\",\"@onChange\",\"@options\",\"@disabled\",\"@onExpand\",\"@onCollapse\"],[[30,1,[\"activeLLM\"]],[28,[32,10],[[30,1,[\"activateLLMTask\"]]],null],[30,0,[\"llmsForSelectMenu\"]],[30,1,[\"isActivatingLLM\"]],[28,[32,17],[[30,0,[\"setSelectedBottomAction\"]],\"llm-select\"],null],[28,[32,17],[[30,0,[\"setSelectedBottomAction\"]],[27]],null]]],[[\"menuActions\"],[[[[1,\"\\n\"],[41,[30,0,[\"systemCardId\"]],[[[1,\" \"],[8,[32,19],[[24,0,\"llm-select-footer-action\"],[24,\"data-test-go-to-system-card\",\"\"],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[4,[32,4],[\"click\",[30,0,[\"goToSystemCard\"]]],null]],[[\"@kind\",\"@size\",\"@pill\"],[\"secondary\",\"extra-small\",true]],[[\"default\"],[[[[1,\"\\n Go to Current System Card\\n \"]],[]]]]],[1,\"\\n\"]],[]],null],[41,[51,[30,0,[\"isDefaultSystemCard\"]]],[[[1,\" \"],[8,[32,19],[[24,0,\"llm-select-footer-action\"],[24,\"data-test-restore-default-system-card\",\"\"],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"],[4,[32,4],[\"click\",[28,[32,10],[[30,0,[\"restoreDefaultSystemCardTask\"]]],null]],null]],[[\"@kind\",\"@size\",\"@pill\"],[\"secondary\",\"extra-small\",true]],[[\"default\"],[[[[1,\"\\n Restore Default System Card\\n \"]],[]]]]],[1,\"\\n\"]],[]],null],[1,\" \"]],[]]]]],[1,\"\\n\"]],[]],null],[41,[30,0,[\"displayLLMModeSelect\"]],[[[1,\" \"],[8,[32,20],[[24,0,\"llm-mode-toggle\"],[24,\"data-scopedcss-810fdc6e2b-b28cb6fe0c\",\"\"]],[[\"@selected\",\"@onChange\",\"@disabled\"],[[30,1,[\"activeLLMMode\"]],[28,[32,10],[[30,1,[\"activateLLMModeTask\"]]],null],[30,1,[\"isActivatingLLMMode\"]]]],null],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n \"],[13],[1,\"\\n \"]],[8,9]]]]],[1,\"\\n \"],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[1,\"\\n\"]],[\"@roomResource\",\"@roomId\",\"&attrs\",\"message\",\"i\",\"@monacoSDK\",\"Alert\",\"AttachedItems\",\"AttachButton\"],[\"if\",\"each\",\"-track-array\",\"unless\"]]",
|
|
2257
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/matrix/room.gts",
|
|
2258
|
-
"scope": () => [
|
|
2259
|
-
not,
|
|
2260
|
-
and,
|
|
2261
|
-
AiAssistantConversation,
|
|
2262
|
-
LoadingIndicator,
|
|
2263
|
-
on,
|
|
2264
|
-
RoomMessage,
|
|
2265
|
-
NewSession,
|
|
2266
|
-
Alert,
|
|
2267
|
-
array,
|
|
2268
|
-
AiAssistantAttachmentPicker,
|
|
2269
|
-
perform,
|
|
2270
|
-
eq,
|
|
2271
|
-
Submodes,
|
|
2272
|
-
AiAssistantActionBar,
|
|
2273
|
-
AiAssistantChatInput,
|
|
2274
|
-
FocusPill,
|
|
2275
|
-
AiAssistantSkillMenu,
|
|
2276
|
-
fn,
|
|
2277
|
-
LLMSelect,
|
|
2278
|
-
ButtonComponent,
|
|
2279
|
-
LLMModeToggle
|
|
2280
|
-
],
|
|
2281
|
-
"isStrictMode": true
|
|
2282
|
-
}), this);
|
|
2283
|
-
}
|
|
2284
|
-
static {
|
|
2285
|
-
decorateFieldV2(this.prototype, "getCard", [consume(GetCardContextName)]);
|
|
2286
|
-
}
|
|
2287
|
-
#getCard = (initializeDeferredDecorator(this, "getCard"), void 0);
|
|
2288
|
-
static {
|
|
2289
|
-
decorateFieldV2(this.prototype, "selectedBottomAction", [tracked]);
|
|
2290
|
-
}
|
|
2291
|
-
#selectedBottomAction = (initializeDeferredDecorator(this, "selectedBottomAction"), void 0);
|
|
2292
|
-
static {
|
|
2293
|
-
decorateFieldV2(this.prototype, "lastCanceledActionMessageId", [tracked]);
|
|
2294
|
-
}
|
|
2295
|
-
#lastCanceledActionMessageId = (initializeDeferredDecorator(this, "lastCanceledActionMessageId"), void 0);
|
|
2296
|
-
static {
|
|
2297
|
-
decorateFieldV2(this.prototype, "acceptingAllLabel", [tracked]);
|
|
2298
|
-
}
|
|
2299
|
-
#acceptingAllLabel = (initializeDeferredDecorator(this, "acceptingAllLabel"), void 0);
|
|
2300
|
-
static {
|
|
2301
|
-
decorateFieldV2(this.prototype, "isDropZoneActive", [tracked], function() {
|
|
2302
|
-
return false;
|
|
2303
|
-
});
|
|
2304
|
-
}
|
|
2305
|
-
#isDropZoneActive = (initializeDeferredDecorator(this, "isDropZoneActive"), void 0);
|
|
2306
|
-
dropZoneDragDepth = 0;
|
|
2307
|
-
static {
|
|
2308
|
-
decorateFieldV2(this.prototype, "store", [service]);
|
|
2309
|
-
}
|
|
2310
|
-
#store = (initializeDeferredDecorator(this, "store"), void 0);
|
|
2311
|
-
static {
|
|
2312
|
-
decorateFieldV2(this.prototype, "cardService", [service]);
|
|
2313
|
-
}
|
|
2314
|
-
#cardService = (initializeDeferredDecorator(this, "cardService"), void 0);
|
|
2315
|
-
static {
|
|
2316
|
-
decorateFieldV2(this.prototype, "toolService", [service]);
|
|
2317
|
-
}
|
|
2318
|
-
#toolService = (initializeDeferredDecorator(this, "toolService"), void 0);
|
|
2319
|
-
static {
|
|
2320
|
-
decorateFieldV2(this.prototype, "fileUpload", [service("file-upload")]);
|
|
2321
|
-
}
|
|
2322
|
-
#fileUpload = (initializeDeferredDecorator(this, "fileUpload"), void 0);
|
|
2323
|
-
static {
|
|
2324
|
-
decorateFieldV2(this.prototype, "loaderService", [service("loader-service")]);
|
|
2325
|
-
}
|
|
2326
|
-
#loaderService = (initializeDeferredDecorator(this, "loaderService"), void 0);
|
|
2327
|
-
static {
|
|
2328
|
-
decorateFieldV2(this.prototype, "matrixService", [service]);
|
|
2329
|
-
}
|
|
2330
|
-
#matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
|
|
2331
|
-
static {
|
|
2332
|
-
decorateFieldV2(this.prototype, "network", [service]);
|
|
2333
|
-
}
|
|
2334
|
-
#network = (initializeDeferredDecorator(this, "network"), void 0);
|
|
2335
|
-
static {
|
|
2336
|
-
decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
|
|
2337
|
-
}
|
|
2338
|
-
#operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
|
|
2339
|
-
static {
|
|
2340
|
-
decorateFieldV2(this.prototype, "playgroundPanelService", [service]);
|
|
2341
|
-
}
|
|
2342
|
-
#playgroundPanelService = (initializeDeferredDecorator(this, "playgroundPanelService"), void 0);
|
|
2343
|
-
static {
|
|
2344
|
-
decorateFieldV2(this.prototype, "specPanelService", [service]);
|
|
2345
|
-
}
|
|
2346
|
-
#specPanelService = (initializeDeferredDecorator(this, "specPanelService"), void 0);
|
|
2347
|
-
static {
|
|
2348
|
-
decorateFieldV2(this.prototype, "aiAssistantPanelService", [service]);
|
|
2349
|
-
}
|
|
2350
|
-
#aiAssistantPanelService = (initializeDeferredDecorator(this, "aiAssistantPanelService"), void 0);
|
|
2351
|
-
autoAttachmentResource = getAutoAttachment(this, {
|
|
2352
|
-
submode: () => this.operatorModeStateService.state.submode,
|
|
2353
|
-
moduleInspectorPanel: () => this.operatorModeStateService.moduleInspectorPanel,
|
|
2354
|
-
autoAttachedFileUrls: () => this.autoAttachedFileUrls,
|
|
2355
|
-
playgroundPanelCardId: () => this.playgroundPanelCardId,
|
|
2356
|
-
activeSpecId: () => this.specPanelService.specSelection,
|
|
2357
|
-
topMostStackItems: () => this.topMostStackItems,
|
|
2358
|
-
attachedCardIds: () => this.cardIdsToAttach,
|
|
2359
|
-
removedCardIds: () => this.removedAttachedCardIds
|
|
2360
|
-
});
|
|
2361
|
-
removedAttachedCardIds = new TrackedSet();
|
|
2362
|
-
removedAttachedFileUrls = [];
|
|
2363
|
-
lastAutoAttachedFileUrlsKey;
|
|
2364
|
-
lastKnownRoom;
|
|
2365
|
-
getConversationScrollability;
|
|
2366
|
-
scrollConversationToBottom;
|
|
2367
|
-
roomScrollState = /* @__PURE__ */ new WeakMap();
|
|
2368
|
-
static {
|
|
2369
|
-
decorateFieldV2(this.prototype, "unknownMessageSendError", [tracked], function() {});
|
|
2370
|
-
}
|
|
2371
|
-
#unknownMessageSendError = (initializeDeferredDecorator(this, "unknownMessageSendError"), void 0);
|
|
2372
|
-
_fileUploadStates = new TrackedMap();
|
|
2373
|
-
get fileUploadStates() {
|
|
2374
|
-
return this._fileUploadStates;
|
|
2375
|
-
}
|
|
2376
|
-
get shouldShowUnknownMessageSendError() {
|
|
2377
|
-
if (!this.unknownMessageSendError) return false;
|
|
2378
|
-
return this.messages[this.messages.length - 1]?.errorMessage === void 0;
|
|
2379
|
-
}
|
|
2380
|
-
constructor(owner, args) {
|
|
2381
|
-
super(owner, args);
|
|
2382
|
-
this.doMatrixEventFlush.perform();
|
|
2383
|
-
schedule("afterRender", () => {
|
|
2384
|
-
if (isDestroyed(this) || isDestroying(this)) return;
|
|
2385
|
-
this.matrixService.ensurePendingSendsHydrated(this.args.roomId);
|
|
2386
|
-
});
|
|
2387
|
-
registerDestructor(this, () => {
|
|
2388
|
-
this.cleanupScrollState();
|
|
2389
|
-
this.getConversationScrollability = void 0;
|
|
2390
|
-
this.scrollConversationToBottom = void 0;
|
|
2391
|
-
});
|
|
2392
|
-
}
|
|
2393
|
-
get existingScrollState() {
|
|
2394
|
-
let room = this.roomForCleanup;
|
|
2395
|
-
return room ? this.roomScrollState.get(room) : void 0;
|
|
2396
|
-
}
|
|
2397
|
-
ensureScrollState() {
|
|
2398
|
-
let room = this.room;
|
|
2399
|
-
if (!room) return;
|
|
2400
|
-
if (this.lastKnownRoom && this.lastKnownRoom !== room) this.cleanupScrollState(this.lastKnownRoom);
|
|
2401
|
-
this.lastKnownRoom = room;
|
|
2402
|
-
let state = this.roomScrollState.get(room);
|
|
2403
|
-
if (!state) {
|
|
2404
|
-
let nextState;
|
|
2405
|
-
nextState = new TrackedObject({
|
|
2406
|
-
isScrolledToBottom: false,
|
|
2407
|
-
userHasScrolled: false,
|
|
2408
|
-
isConversationScrollable: false,
|
|
2409
|
-
messageElements: /* @__PURE__ */ new Map(),
|
|
2410
|
-
messageScrollers: /* @__PURE__ */ new Map(),
|
|
2411
|
-
messageVisibilityObserver: new IntersectionObserver((entries) => {
|
|
2412
|
-
entries.forEach((entry) => {
|
|
2413
|
-
let index = nextState.messageElements.get(entry.target);
|
|
2414
|
-
if (index != null) {
|
|
2415
|
-
if ((!nextState.isConversationScrollable || entry.isIntersecting) && index > this.lastReadMessageIndex) this.sendReadReceipt(this.messages[index]);
|
|
2416
|
-
}
|
|
2417
|
-
});
|
|
2418
|
-
})
|
|
2419
|
-
});
|
|
2420
|
-
state = nextState;
|
|
2421
|
-
this.roomScrollState.set(room, state);
|
|
2422
|
-
}
|
|
2423
|
-
return state;
|
|
2424
|
-
}
|
|
2425
|
-
cleanupScrollState(room = this.roomForCleanup) {
|
|
2426
|
-
if (!room) return;
|
|
2427
|
-
let scrollState = this.roomScrollState.get(room);
|
|
2428
|
-
if (!scrollState) return;
|
|
2429
|
-
for (let element of scrollState.messageElements.keys()) scrollState.messageVisibilityObserver.unobserve(element);
|
|
2430
|
-
scrollState.messageVisibilityObserver.disconnect();
|
|
2431
|
-
scrollState.messageElements.clear();
|
|
2432
|
-
scrollState.messageScrollers.clear();
|
|
2433
|
-
scrollState.isScrolledToBottom = false;
|
|
2434
|
-
scrollState.userHasScrolled = false;
|
|
2435
|
-
scrollState.isConversationScrollable = false;
|
|
2436
|
-
this.roomScrollState.delete(room);
|
|
2437
|
-
}
|
|
2438
|
-
static {
|
|
2439
|
-
decorateFieldV2(this.prototype, "autoAttachedFileResource", [use], function() {
|
|
2440
|
-
return resource(() => {
|
|
2441
|
-
let state = new TrackedObject({
|
|
2442
|
-
value: [],
|
|
2443
|
-
remove: (sourceUrl) => {
|
|
2444
|
-
if (!sourceUrl) {
|
|
2445
|
-
state.value = [];
|
|
2446
|
-
return;
|
|
2447
|
-
}
|
|
2448
|
-
state.value = state.value.filter((file) => file.sourceUrl !== sourceUrl);
|
|
2449
|
-
}
|
|
2450
|
-
});
|
|
2451
|
-
let autoAttachedFileUrls = this.autoAttachedFileUrls;
|
|
2452
|
-
let manuallyAttachedFiles = this.filesToAttach;
|
|
2453
|
-
let autoAttachedFileUrlsKey = autoAttachedFileUrls.join("\n");
|
|
2454
|
-
let removedFileUrls;
|
|
2455
|
-
if (autoAttachedFileUrlsKey !== this.lastAutoAttachedFileUrlsKey) {
|
|
2456
|
-
this.removedAttachedFileUrls.splice(0);
|
|
2457
|
-
removedFileUrls = this.removedAttachedFileUrls;
|
|
2458
|
-
this.lastAutoAttachedFileUrlsKey = autoAttachedFileUrlsKey;
|
|
2459
|
-
} else removedFileUrls = this.removedAttachedFileUrls;
|
|
2460
|
-
state.value = autoAttachedFileUrls.filter((url) => {
|
|
2461
|
-
if (!url) return false;
|
|
2462
|
-
let isManuallyAttached = manuallyAttachedFiles.some((file) => file.sourceUrl === url);
|
|
2463
|
-
let isRemoved = removedFileUrls.includes(url);
|
|
2464
|
-
return !isManuallyAttached && !isRemoved;
|
|
2465
|
-
}).map((url) => {
|
|
2466
|
-
let name = url.split("/").pop();
|
|
2467
|
-
return this.matrixService.fileAPI.createFileDef({
|
|
2468
|
-
sourceUrl: url,
|
|
2469
|
-
name,
|
|
2470
|
-
contentType: url.endsWith(".json") ? SupportedMimeType.CardJson : name ? inferContentType(name) : void 0
|
|
2471
|
-
});
|
|
2472
|
-
});
|
|
2473
|
-
return state;
|
|
2474
|
-
});
|
|
2475
|
-
});
|
|
2476
|
-
}
|
|
2477
|
-
#autoAttachedFileResource = (initializeDeferredDecorator(this, "autoAttachedFileResource"), void 0);
|
|
2478
|
-
get autoAttachedFileUrls() {
|
|
2479
|
-
let codePathUrl = this.operatorModeStateService.state.codePath ? this.network.virtualNetwork.toURLHref(this.operatorModeStateService.state.codePath) : void 0;
|
|
2480
|
-
if (!codePathUrl) return [];
|
|
2481
|
-
let urls = [codePathUrl];
|
|
2482
|
-
if (codePathUrl.endsWith(".json")) {
|
|
2483
|
-
let openFile = this.operatorModeStateService.openFile?.current;
|
|
2484
|
-
if (openFile && isReady(openFile)) try {
|
|
2485
|
-
let adoptsFrom = JSON.parse(openFile.content)?.data?.meta?.adoptsFrom;
|
|
2486
|
-
if (adoptsFrom?.module) {
|
|
2487
|
-
let moduleRef = adoptsFrom.module.endsWith(".gts") ? adoptsFrom.module : `${adoptsFrom.module}.gts`;
|
|
2488
|
-
let moduleURLWithExtension = this.network.virtualNetwork.resolveURL(moduleRef, openFile.url);
|
|
2489
|
-
if (!urls.includes(moduleURLWithExtension.href)) urls.push(moduleURLWithExtension.href);
|
|
2490
|
-
}
|
|
2491
|
-
} catch (_error) {}
|
|
2492
|
-
}
|
|
2493
|
-
return urls;
|
|
2494
|
-
}
|
|
2495
|
-
get autoAttachedFiles() {
|
|
2496
|
-
return this.operatorModeStateService.state.submode === Submodes.Code ? this.autoAttachedFileResource.value : [];
|
|
2497
|
-
}
|
|
2498
|
-
get removeAutoAttachedFile() {
|
|
2499
|
-
return (sourceUrl) => {
|
|
2500
|
-
this.autoAttachedFileResource.remove(sourceUrl);
|
|
2501
|
-
};
|
|
2502
|
-
}
|
|
2503
|
-
markAttachedFileRemoved(sourceUrl) {
|
|
2504
|
-
if (!sourceUrl) return;
|
|
2505
|
-
if (!this.removedAttachedFileUrls.includes(sourceUrl)) this.removedAttachedFileUrls.push(sourceUrl);
|
|
2506
|
-
}
|
|
2507
|
-
get filesToAttach() {
|
|
2508
|
-
return this.matrixService.getFilesToSend(this.args.roomId) ?? [];
|
|
2509
|
-
}
|
|
2510
|
-
static {
|
|
2511
|
-
decorateFieldV2(this.prototype, "playgroundPanelCardIdResource", [use], function() {
|
|
2512
|
-
return resource(() => {
|
|
2513
|
-
let state = new TrackedObject({
|
|
2514
|
-
value: void 0,
|
|
2515
|
-
remove: () => {
|
|
2516
|
-
state.value = void 0;
|
|
2517
|
-
}
|
|
2518
|
-
});
|
|
2519
|
-
(async () => {
|
|
2520
|
-
if (!this.args.selectedCardRef) return;
|
|
2521
|
-
let moduleId = internalKeyFor(this.args.selectedCardRef, void 0, this.network.virtualNetwork);
|
|
2522
|
-
state.value = this.playgroundPanelService.getSelection(moduleId)?.cardId;
|
|
2523
|
-
})();
|
|
2524
|
-
return state;
|
|
2525
|
-
});
|
|
2526
|
-
});
|
|
2527
|
-
}
|
|
2528
|
-
#playgroundPanelCardIdResource = (initializeDeferredDecorator(this, "playgroundPanelCardIdResource"), void 0);
|
|
2529
|
-
get playgroundPanelCardId() {
|
|
2530
|
-
return this.playgroundPanelCardIdResource.value;
|
|
2531
|
-
}
|
|
2532
|
-
get removePlaygroundPanelCard() {
|
|
2533
|
-
return this.playgroundPanelCardIdResource.remove;
|
|
2534
|
-
}
|
|
2535
|
-
get isScrolledToBottom() {
|
|
2536
|
-
return this.existingScrollState?.isScrolledToBottom ?? false;
|
|
2537
|
-
}
|
|
2538
|
-
get userHasScrolled() {
|
|
2539
|
-
return this.existingScrollState?.userHasScrolled ?? false;
|
|
2540
|
-
}
|
|
2541
|
-
get isConversationScrollable() {
|
|
2542
|
-
return this.existingScrollState?.isConversationScrollable ?? false;
|
|
2543
|
-
}
|
|
2544
|
-
registerMessageScroller = ({ index, element, scrollTo }) => {
|
|
2545
|
-
let scrollState = this.ensureScrollState();
|
|
2546
|
-
if (!scrollState) return;
|
|
2547
|
-
for (let [registeredElement, registeredIndex] of scrollState.messageElements) if (registeredIndex === index && registeredElement !== element) {
|
|
2548
|
-
scrollState.messageElements.delete(registeredElement);
|
|
2549
|
-
scrollState.messageVisibilityObserver.unobserve(registeredElement);
|
|
2550
|
-
break;
|
|
2551
|
-
}
|
|
2552
|
-
scrollState.messageElements.set(element, index);
|
|
2553
|
-
scrollState.messageScrollers.set(index, scrollTo);
|
|
2554
|
-
scrollState.messageVisibilityObserver.observe(element);
|
|
2555
|
-
scrollState.isConversationScrollable = Boolean(this.getConversationScrollability?.());
|
|
2556
|
-
if (!this.isConversationScrollable || !this.isAllowedToAutoScroll) return;
|
|
2557
|
-
if (!this.hasUnreadMessages && index === this.messages.length - 1 && !this.isScrolledToBottom) scrollTo();
|
|
2558
|
-
else if (this.hasUnreadMessages && index === this.lastReadMessageIndex + 1) scrollTo();
|
|
2559
|
-
else if (this.isScrolledToBottom) this.scrollConversationToBottom?.();
|
|
2560
|
-
};
|
|
2561
|
-
unregisterMessageScroller = ({ index, element }) => {
|
|
2562
|
-
let scrollState = this.existingScrollState;
|
|
2563
|
-
if (!scrollState) return;
|
|
2564
|
-
let elementOwnsIndex = scrollState.messageElements.get(element) === index;
|
|
2565
|
-
scrollState.messageElements.delete(element);
|
|
2566
|
-
if (elementOwnsIndex) scrollState.messageScrollers.delete(index);
|
|
2567
|
-
scrollState.messageVisibilityObserver.unobserve(element);
|
|
2568
|
-
};
|
|
2569
|
-
registerConversationScroller = (isConversationScrollable, scrollToBottom) => {
|
|
2570
|
-
this.getConversationScrollability = isConversationScrollable;
|
|
2571
|
-
this.scrollConversationToBottom = scrollToBottom;
|
|
2572
|
-
};
|
|
2573
|
-
setScrollPosition = ({ isBottom }) => {
|
|
2574
|
-
let scrollState = this.ensureScrollState();
|
|
2575
|
-
if (!scrollState) return;
|
|
2576
|
-
scrollState.isScrolledToBottom = isBottom;
|
|
2577
|
-
if (!isBottom) scrollState.userHasScrolled = true;
|
|
2578
|
-
};
|
|
2579
|
-
scrollToFirstUnread = () => {
|
|
2580
|
-
if (!this.hasUnreadMessages) return;
|
|
2581
|
-
let firstUnreadIndex = this.lastReadMessageIndex + 1;
|
|
2582
|
-
let scrollTo = this.existingScrollState?.messageScrollers.get(firstUnreadIndex);
|
|
2583
|
-
if (!scrollTo) console.warn(`No scroller for message index ${firstUnreadIndex}`);
|
|
2584
|
-
else scrollTo({ behavior: "smooth" });
|
|
2585
|
-
};
|
|
2586
|
-
get isAllowedToAutoScroll() {
|
|
2587
|
-
return !this.userHasScrolled || this.isScrolledToBottom;
|
|
2588
|
-
}
|
|
2589
|
-
get lastReadMessageIndex() {
|
|
2590
|
-
let readReceiptIndicies = [];
|
|
2591
|
-
for (let receipt of this.matrixService.currentUserEventReadReceipts.keys()) {
|
|
2592
|
-
let maybeIndex = this.messages.findIndex((m) => m.eventId === receipt);
|
|
2593
|
-
if (maybeIndex != null) readReceiptIndicies.push(maybeIndex);
|
|
2594
|
-
}
|
|
2595
|
-
return max(readReceiptIndicies) ?? -1;
|
|
2596
|
-
}
|
|
2597
|
-
static {
|
|
2598
|
-
decorateMethodV2(this.prototype, "lastReadMessageIndex", [cached]);
|
|
2599
|
-
}
|
|
2600
|
-
get numberOfUnreadMessages() {
|
|
2601
|
-
let unreadMessagesCount = 0;
|
|
2602
|
-
let firstUnreadIndex = this.lastReadMessageIndex + 1;
|
|
2603
|
-
for (let i = firstUnreadIndex; i < this.messages.length; i++) {
|
|
2604
|
-
if (this.matrixService.profile.userId === this.messages[i].author.userId) continue;
|
|
2605
|
-
unreadMessagesCount++;
|
|
2606
|
-
}
|
|
2607
|
-
return unreadMessagesCount;
|
|
2608
|
-
}
|
|
2609
|
-
static {
|
|
2610
|
-
decorateMethodV2(this.prototype, "numberOfUnreadMessages", [cached]);
|
|
2611
|
-
}
|
|
2612
|
-
get hasUnreadMessages() {
|
|
2613
|
-
return this.numberOfUnreadMessages > 0;
|
|
2614
|
-
}
|
|
2615
|
-
get showUnreadIndicator() {
|
|
2616
|
-
return this.isConversationScrollable && this.hasUnreadMessages && !this.isScrolledToBottom;
|
|
2617
|
-
}
|
|
2618
|
-
get isAcceptingAll() {
|
|
2619
|
-
return this.executeAllReadyActionsTask.isRunning || this.toolService.isPerformingAcceptAllForRoom(this.args.roomId);
|
|
2620
|
-
}
|
|
2621
|
-
get unreadMessageText() {
|
|
2622
|
-
return `${this.numberOfUnreadMessages} New ${(0, import_pluralize.default)("Message", this.numberOfUnreadMessages)}`;
|
|
2623
|
-
}
|
|
2624
|
-
sendReadReceipt(message) {
|
|
2625
|
-
if (this.matrixService.profile.userId === message.author.userId) {
|
|
2626
|
-
if (isTesting()) console.log(`[read-receipt-trace] skip self event=${message.eventId} room=${this.args.roomId}`);
|
|
2627
|
-
return;
|
|
2628
|
-
}
|
|
2629
|
-
if (this.matrixService.currentUserEventReadReceipts.has(message.eventId)) {
|
|
2630
|
-
if (isTesting()) console.log(`[read-receipt-trace] skip already-acked event=${message.eventId} room=${this.args.roomId}`);
|
|
2631
|
-
return;
|
|
2632
|
-
}
|
|
2633
|
-
let matrixEvent = {
|
|
2634
|
-
getId: () => message.eventId,
|
|
2635
|
-
getRoomId: () => this.args.roomId,
|
|
2636
|
-
getTs: () => message.created.getTime()
|
|
2637
|
-
};
|
|
2638
|
-
if (isTesting()) console.log(`[read-receipt-trace] schedule event=${message.eventId} room=${this.args.roomId}`);
|
|
2639
|
-
schedule("afterRender", () => {
|
|
2640
|
-
if (isTesting()) console.log(`[read-receipt-trace] dispatch event=${message.eventId} room=${this.args.roomId}`);
|
|
2641
|
-
this.matrixService.sendReadReceipt(matrixEvent);
|
|
2642
|
-
});
|
|
2643
|
-
}
|
|
2644
|
-
maybeRetryAction = (messageIndex, message) => {
|
|
2645
|
-
if (this.isLastMessage(messageIndex) && message.isRetryable) return this.resendLastMessage;
|
|
2646
|
-
};
|
|
2647
|
-
isMessageStreaming = (message) => {
|
|
2648
|
-
return !message.isStreamingFinished;
|
|
2649
|
-
};
|
|
2650
|
-
doMatrixEventFlush = buildTask(() => ({
|
|
2651
|
-
context: this,
|
|
2652
|
-
generator: function* () {
|
|
2653
|
-
yield this.matrixService.flushMembership;
|
|
2654
|
-
yield this.matrixService.flushTimeline;
|
|
2655
|
-
yield this.args.roomResource.processing;
|
|
2656
|
-
}
|
|
2657
|
-
}), null, "doMatrixEventFlush", "restartable");
|
|
2658
|
-
get messages() {
|
|
2659
|
-
return this.args.roomResource.messages;
|
|
2660
|
-
}
|
|
2661
|
-
get conversationTokenUsage() {
|
|
2662
|
-
if (!this.operatorModeStateService.operatorModeController.showTokens) return;
|
|
2663
|
-
let promptTokens = 0;
|
|
2664
|
-
let completionTokens = 0;
|
|
2665
|
-
let cachedTokens = 0;
|
|
2666
|
-
let turnsWithCached = 0;
|
|
2667
|
-
let costUsd = 0;
|
|
2668
|
-
let turnsWithCost = 0;
|
|
2669
|
-
let turnsWithUsage = 0;
|
|
2670
|
-
for (let message of this.messages) {
|
|
2671
|
-
let usage = message.usage;
|
|
2672
|
-
if (!usage || usage.promptTokens == null && usage.completionTokens == null) continue;
|
|
2673
|
-
turnsWithUsage++;
|
|
2674
|
-
promptTokens += usage.promptTokens ?? 0;
|
|
2675
|
-
completionTokens += usage.completionTokens ?? 0;
|
|
2676
|
-
if (usage.cachedTokens != null) {
|
|
2677
|
-
cachedTokens += usage.cachedTokens;
|
|
2678
|
-
turnsWithCached++;
|
|
2679
|
-
}
|
|
2680
|
-
if (usage.costUsd != null) {
|
|
2681
|
-
costUsd += usage.costUsd;
|
|
2682
|
-
turnsWithCost++;
|
|
2683
|
-
}
|
|
2684
|
-
}
|
|
2685
|
-
if (turnsWithUsage < 2) return;
|
|
2686
|
-
return formatTokenUsage({
|
|
2687
|
-
promptTokens,
|
|
2688
|
-
completionTokens,
|
|
2689
|
-
...turnsWithCached === turnsWithUsage ? { cachedTokens } : {},
|
|
2690
|
-
...turnsWithCost === turnsWithUsage ? { costUsd } : {}
|
|
2691
|
-
});
|
|
2692
|
-
}
|
|
2693
|
-
static {
|
|
2694
|
-
decorateMethodV2(this.prototype, "conversationTokenUsage", [cached]);
|
|
2695
|
-
}
|
|
2696
|
-
get skills() {
|
|
2697
|
-
return this.args.roomResource.skills;
|
|
2698
|
-
}
|
|
2699
|
-
get llmsForSelectMenu() {
|
|
2700
|
-
this.ensureModelCostTiersLoaded();
|
|
2701
|
-
let costTierByModelId = this.modelCostTierByModelId;
|
|
2702
|
-
return this.baseLlmOptions.map((option) => ({
|
|
2703
|
-
...option,
|
|
2704
|
-
costTierLabel: costTierByModelId.get(option.modelId)
|
|
2705
|
-
}));
|
|
2706
|
-
}
|
|
2707
|
-
get baseLlmOptions() {
|
|
2708
|
-
return pickableModels(this.matrixService.systemCard, this.args.roomResource.usedLLMs);
|
|
2709
|
-
}
|
|
2710
|
-
static {
|
|
2711
|
-
decorateMethodV2(this.prototype, "baseLlmOptions", [cached]);
|
|
2712
|
-
}
|
|
2713
|
-
get pickerModelIds() {
|
|
2714
|
-
return modelIdsOf(this.baseLlmOptions);
|
|
2715
|
-
}
|
|
2716
|
-
static {
|
|
2717
|
-
decorateMethodV2(this.prototype, "pickerModelIds", [cached]);
|
|
2718
|
-
}
|
|
2719
|
-
static {
|
|
2720
|
-
decorateFieldV2(this.prototype, "modelCostTierByModelId", [tracked], function() {
|
|
2721
|
-
return /* @__PURE__ */ new Map();
|
|
2722
|
-
});
|
|
2723
|
-
}
|
|
2724
|
-
#modelCostTierByModelId = (initializeDeferredDecorator(this, "modelCostTierByModelId"), void 0);
|
|
2725
|
-
lastModelCostTierKey = "";
|
|
2726
|
-
ensureModelCostTiersLoaded() {
|
|
2727
|
-
let modelIds = this.pickerModelIds;
|
|
2728
|
-
let realmURL = config.resolvedOpenRouterRealmURL;
|
|
2729
|
-
let key = realmURL && modelIds.length > 0 ? `${realmURL}::${[...modelIds].sort().join("|")}` : "";
|
|
2730
|
-
if (key === this.lastModelCostTierKey) return;
|
|
2731
|
-
this.lastModelCostTierKey = key;
|
|
2732
|
-
if (!key) return;
|
|
2733
|
-
this.loadModelCostTiers.perform(modelIds, realmURL, key);
|
|
2734
|
-
}
|
|
2735
|
-
loadModelCostTiers = buildTask(() => ({
|
|
2736
|
-
context: this,
|
|
2737
|
-
generator: function* (modelIds, realmURL, key) {
|
|
2738
|
-
let tiers = /* @__PURE__ */ new Map();
|
|
2739
|
-
try {
|
|
2740
|
-
let query = { filter: {
|
|
2741
|
-
on: {
|
|
2742
|
-
module: this.network.virtualNetwork.unresolveURL(new URL("openrouter-model", realmURL).href),
|
|
2743
|
-
name: "OpenRouterModel"
|
|
2744
|
-
},
|
|
2745
|
-
in: { modelId: modelIds }
|
|
2746
|
-
} };
|
|
2747
|
-
let instances = yield this.store.search(query, [realmURL]);
|
|
2748
|
-
for (let instance of instances) {
|
|
2749
|
-
let model = instance;
|
|
2750
|
-
if (!model.modelId || !model.costTierLabel) continue;
|
|
2751
|
-
tiers.set(model.modelId, model.costTierLabel);
|
|
2752
|
-
}
|
|
2753
|
-
} catch (e) {
|
|
2754
|
-
console.warn("Failed to load model cost tiers", e);
|
|
2755
|
-
if (this.lastModelCostTierKey === key) this.lastModelCostTierKey = "";
|
|
2756
|
-
return;
|
|
2757
|
-
}
|
|
2758
|
-
this.modelCostTierByModelId = tiers;
|
|
2759
|
-
}
|
|
2760
|
-
}), null, "loadModelCostTiers", "restartable");
|
|
2761
|
-
get systemCardId() {
|
|
2762
|
-
return this.matrixService.systemCard?.id;
|
|
2763
|
-
}
|
|
2764
|
-
get isDefaultSystemCard() {
|
|
2765
|
-
let systemCardId = this.systemCardId;
|
|
2766
|
-
if (!config.defaultSystemCardId) return true;
|
|
2767
|
-
return !systemCardId || this.matrixService.isDefaultSystemCardId(systemCardId);
|
|
2768
|
-
}
|
|
2769
|
-
goToSystemCard() {
|
|
2770
|
-
let systemCardId = this.systemCardId;
|
|
2771
|
-
if (systemCardId) {
|
|
2772
|
-
if (this.operatorModeStateService.workspaceChooserOpened) this.operatorModeStateService.closeWorkspaceChooser();
|
|
2773
|
-
let stackIndex = Math.min(this.operatorModeStateService.numberOfStacks(), 1);
|
|
2774
|
-
let stackItem = this.operatorModeStateService.createStackItem(systemCardId, stackIndex, "isolated");
|
|
2775
|
-
this.operatorModeStateService.addItemToStack(stackItem);
|
|
2776
|
-
}
|
|
2777
|
-
}
|
|
2778
|
-
static {
|
|
2779
|
-
decorateMethodV2(this.prototype, "goToSystemCard", [action]);
|
|
2780
|
-
}
|
|
2781
|
-
restoreDefaultSystemCardTask = buildTask(() => ({
|
|
2782
|
-
context: this,
|
|
2783
|
-
generator: function* () {
|
|
2784
|
-
yield this.matrixService.setUserSystemCard(void 0);
|
|
2785
|
-
}
|
|
2786
|
-
}), null, "restoreDefaultSystemCardTask", null);
|
|
2787
|
-
get sortedSkills() {
|
|
2788
|
-
return [...this.skills].sort((a, b) => {
|
|
2789
|
-
let aTitle = a.cardId || a.fileDef.sourceUrl;
|
|
2790
|
-
let bTitle = b.cardId || b.fileDef.sourceUrl;
|
|
2791
|
-
return aTitle?.localeCompare(bTitle ?? "") ?? 0;
|
|
2792
|
-
});
|
|
2793
|
-
}
|
|
2794
|
-
get room() {
|
|
2795
|
-
return this.args.roomResource?.matrixRoom;
|
|
2796
|
-
}
|
|
2797
|
-
get roomForCleanup() {
|
|
2798
|
-
return this.room ?? this.lastKnownRoom;
|
|
2799
|
-
}
|
|
2800
|
-
doWhenRoomChanges = buildTask(() => ({
|
|
2801
|
-
context: this,
|
|
2802
|
-
generator: function* () {
|
|
2803
|
-
yield all([this.cardService.cardsSettled(), timeout(500)]);
|
|
2804
|
-
}
|
|
2805
|
-
}), null, "doWhenRoomChanges", "restartable");
|
|
2806
|
-
get messageToSend() {
|
|
2807
|
-
return this.matrixService.getMessageToSend(this.args.roomId) ?? "";
|
|
2808
|
-
}
|
|
2809
|
-
get cardIdsToAttach() {
|
|
2810
|
-
return this.matrixService.getCardsToSend(this.args.roomId);
|
|
2811
|
-
}
|
|
2812
|
-
resendLastMessage() {
|
|
2813
|
-
if (!this.room) throw new Error("Bug: should not be able to resend a message without a room.");
|
|
2814
|
-
let myMessages = this.messages.filter((message) => message.author.userId === this.matrixService.userId);
|
|
2815
|
-
if (myMessages.length === 0) throw new Error("Bug: should not be able to resend a message that does not exist.");
|
|
2816
|
-
let myLastMessage = myMessages[myMessages.length - 1];
|
|
2817
|
-
this.doSendMessage.perform(myLastMessage.body, myLastMessage.attachedCardIds || [], myLastMessage.attachedFiles, myLastMessage.clientGeneratedId, true, myLastMessage.typedByUser === true);
|
|
2818
|
-
}
|
|
2819
|
-
static {
|
|
2820
|
-
decorateMethodV2(this.prototype, "resendLastMessage", [action]);
|
|
2821
|
-
}
|
|
2822
|
-
setMessage(message) {
|
|
2823
|
-
this.matrixService.setMessageToSend(this.args.roomId, message);
|
|
2824
|
-
}
|
|
2825
|
-
static {
|
|
2826
|
-
decorateMethodV2(this.prototype, "setMessage", [action]);
|
|
2827
|
-
}
|
|
2828
|
-
sendMessage(prompt) {
|
|
2829
|
-
let cards = [];
|
|
2830
|
-
if (this.cardIdsToAttach) cards.push(...this.cardIdsToAttach);
|
|
2831
|
-
if (this.autoAttachedCardIds.size > 0) this.autoAttachedCardIds.forEach((card) => {
|
|
2832
|
-
cards.push(card);
|
|
2833
|
-
});
|
|
2834
|
-
let files = [];
|
|
2835
|
-
if (this.autoAttachedFiles.length > 0) files.push(...this.autoAttachedFiles);
|
|
2836
|
-
files.push(...this.filesToAttach);
|
|
2837
|
-
this.doSendMessage.perform(prompt ?? this.messageToSend, cards.length ? cards : void 0, files.length ? files : void 0);
|
|
2838
|
-
}
|
|
2839
|
-
static {
|
|
2840
|
-
decorateMethodV2(this.prototype, "sendMessage", [action]);
|
|
2841
|
-
}
|
|
2842
|
-
chooseCard(cardId) {
|
|
2843
|
-
if (this.autoAttachedCardIds.has(cardId)) this.removedAttachedCardIds.add(cardId);
|
|
2844
|
-
let cardIds = this.cardIdsToAttach ?? [];
|
|
2845
|
-
if (!cardIds.includes(cardId)) this.matrixService.setCardsToSend(this.args.roomId, [...cardIds, cardId]);
|
|
2846
|
-
}
|
|
2847
|
-
static {
|
|
2848
|
-
decorateMethodV2(this.prototype, "chooseCard", [action]);
|
|
2849
|
-
}
|
|
2850
|
-
removeCard(id) {
|
|
2851
|
-
if (this.playgroundPanelCardId === id) {
|
|
2852
|
-
this.removePlaygroundPanelCard();
|
|
2853
|
-
return;
|
|
2854
|
-
}
|
|
2855
|
-
if (this.autoAttachedCardIds.has(id)) {
|
|
2856
|
-
this.removedAttachedCardIds.add(id);
|
|
2857
|
-
return;
|
|
2858
|
-
}
|
|
2859
|
-
let cardIds = this.cardIdsToAttach ?? [];
|
|
2860
|
-
if (!cardIds.length) return;
|
|
2861
|
-
let next = cardIds.filter((url) => url !== id);
|
|
2862
|
-
if (next.length === cardIds.length) return;
|
|
2863
|
-
this.matrixService.setCardsToSend(this.args.roomId, next.length ? next : void 0);
|
|
2864
|
-
}
|
|
2865
|
-
static {
|
|
2866
|
-
decorateMethodV2(this.prototype, "removeCard", [action]);
|
|
2867
|
-
}
|
|
2868
|
-
chooseFileTask = buildTask(() => ({
|
|
2869
|
-
context: this,
|
|
2870
|
-
generator: function* (file) {
|
|
2871
|
-
if (this.isAutoAttachedFile(file)) this.removeAutoAttachedFile(file.sourceUrl ?? void 0);
|
|
2872
|
-
let files = this.filesToAttach;
|
|
2873
|
-
if (!files?.find((f) => f.sourceUrl === file.sourceUrl)) {
|
|
2874
|
-
yield this.matrixService.prefetchFileContent(file);
|
|
2875
|
-
this.matrixService.setFilesToSend(this.args.roomId, [...files, file]);
|
|
2876
|
-
this.startFileUploadTask.perform(file);
|
|
2877
|
-
}
|
|
2878
|
-
}
|
|
2879
|
-
}), null, "chooseFileTask", "enqueue");
|
|
2880
|
-
chooseLocalFileTask = buildTask(() => ({
|
|
2881
|
-
context: this,
|
|
2882
|
-
generator: function* () {
|
|
2883
|
-
let localFile = yield this.fileUpload.pickLocalFile();
|
|
2884
|
-
if (!localFile) return;
|
|
2885
|
-
yield this.attachLocalFile(localFile);
|
|
2886
|
-
}
|
|
2887
|
-
}), null, "chooseLocalFileTask", null);
|
|
2888
|
-
handleChatInputDragOver(event) {
|
|
2889
|
-
let dragEvent = event;
|
|
2890
|
-
if (!this.isFileDrag(dragEvent.dataTransfer)) return;
|
|
2891
|
-
dragEvent.preventDefault();
|
|
2892
|
-
dragEvent.stopPropagation();
|
|
2893
|
-
this.isDropZoneActive = true;
|
|
2894
|
-
if (dragEvent.dataTransfer) dragEvent.dataTransfer.dropEffect = "copy";
|
|
2895
|
-
}
|
|
2896
|
-
static {
|
|
2897
|
-
decorateMethodV2(this.prototype, "handleChatInputDragOver", [action]);
|
|
2898
|
-
}
|
|
2899
|
-
handleChatInputDragEnter(event) {
|
|
2900
|
-
let dragEvent = event;
|
|
2901
|
-
if (!this.isFileDrag(dragEvent.dataTransfer)) return;
|
|
2902
|
-
dragEvent.preventDefault();
|
|
2903
|
-
dragEvent.stopPropagation();
|
|
2904
|
-
this.dropZoneDragDepth++;
|
|
2905
|
-
this.isDropZoneActive = true;
|
|
2906
|
-
}
|
|
2907
|
-
static {
|
|
2908
|
-
decorateMethodV2(this.prototype, "handleChatInputDragEnter", [action]);
|
|
2909
|
-
}
|
|
2910
|
-
handleChatInputDragLeave(event) {
|
|
2911
|
-
let dragEvent = event;
|
|
2912
|
-
if (!this.isFileDrag(dragEvent.dataTransfer) && !this.isDropZoneActive) return;
|
|
2913
|
-
dragEvent.preventDefault();
|
|
2914
|
-
dragEvent.stopPropagation();
|
|
2915
|
-
this.dropZoneDragDepth = Math.max(0, this.dropZoneDragDepth - 1);
|
|
2916
|
-
if (this.dropZoneDragDepth === 0) this.isDropZoneActive = false;
|
|
2917
|
-
}
|
|
2918
|
-
static {
|
|
2919
|
-
decorateMethodV2(this.prototype, "handleChatInputDragLeave", [action]);
|
|
2920
|
-
}
|
|
2921
|
-
handleChatInputDrop(event) {
|
|
2922
|
-
let dragEvent = event;
|
|
2923
|
-
let files = Array.from(dragEvent.dataTransfer?.files ?? []);
|
|
2924
|
-
if (!files.length) return;
|
|
2925
|
-
dragEvent.preventDefault();
|
|
2926
|
-
dragEvent.stopPropagation();
|
|
2927
|
-
this.dropZoneDragDepth = 0;
|
|
2928
|
-
this.isDropZoneActive = false;
|
|
2929
|
-
this.attachLocalFilesTask.perform(files);
|
|
2930
|
-
}
|
|
2931
|
-
static {
|
|
2932
|
-
decorateMethodV2(this.prototype, "handleChatInputDrop", [action]);
|
|
2933
|
-
}
|
|
2934
|
-
handleChatInputPaste(event) {
|
|
2935
|
-
let files = this.getClipboardFiles(event.clipboardData);
|
|
2936
|
-
if (!files.length) return;
|
|
2937
|
-
event.preventDefault();
|
|
2938
|
-
event.stopPropagation();
|
|
2939
|
-
this.attachLocalFilesTask.perform(files);
|
|
2940
|
-
}
|
|
2941
|
-
static {
|
|
2942
|
-
decorateMethodV2(this.prototype, "handleChatInputPaste", [action]);
|
|
2943
|
-
}
|
|
2944
|
-
attachLocalFilesTask = buildTask(() => ({
|
|
2945
|
-
context: this,
|
|
2946
|
-
generator: function* (files) {
|
|
2947
|
-
for (let file of files) yield this.attachLocalFile(file);
|
|
2948
|
-
}
|
|
2949
|
-
}), null, "attachLocalFilesTask", "enqueue");
|
|
2950
|
-
getClipboardFiles(clipboardData) {
|
|
2951
|
-
if (!clipboardData) return [];
|
|
2952
|
-
let files = Array.from(clipboardData.files ?? []);
|
|
2953
|
-
if (files.length) return files;
|
|
2954
|
-
let itemFiles = [];
|
|
2955
|
-
for (let item of Array.from(clipboardData.items ?? [])) {
|
|
2956
|
-
if (item.kind !== "file") continue;
|
|
2957
|
-
let file = item.getAsFile();
|
|
2958
|
-
if (file) itemFiles.push(file);
|
|
2959
|
-
}
|
|
2960
|
-
return itemFiles;
|
|
2961
|
-
}
|
|
2962
|
-
isFileDrag(dataTransfer) {
|
|
2963
|
-
if (!dataTransfer) return false;
|
|
2964
|
-
return Array.from(dataTransfer.types ?? []).includes("Files");
|
|
2965
|
-
}
|
|
2966
|
-
async attachLocalFile(localFile) {
|
|
2967
|
-
let bytes = new Uint8Array(await localFile.arrayBuffer());
|
|
2968
|
-
let file = await this.createLocalFileDef(localFile, bytes);
|
|
2969
|
-
let files = this.filesToAttach;
|
|
2970
|
-
let contentType = file.contentType || localFile.type || "application/octet-stream";
|
|
2971
|
-
await this.matrixService.prefetchLocalFileContent(file, bytes, contentType);
|
|
2972
|
-
this.matrixService.setFilesToSend(this.args.roomId, [...files, file]);
|
|
2973
|
-
this.startFileUploadTask.perform(file);
|
|
2974
|
-
}
|
|
2975
|
-
isAutoAttachedFile(file) {
|
|
2976
|
-
return this.autoAttachedFiles.some((autoFile) => autoFile.sourceUrl === file.sourceUrl);
|
|
2977
|
-
}
|
|
2978
|
-
static {
|
|
2979
|
-
decorateMethodV2(this.prototype, "isAutoAttachedFile", [action]);
|
|
2980
|
-
}
|
|
2981
|
-
removeFile(file) {
|
|
2982
|
-
if (this.isAutoAttachedFile(file)) {
|
|
2983
|
-
this.removeAutoAttachedFile(file.sourceUrl ?? void 0);
|
|
2984
|
-
return;
|
|
2985
|
-
}
|
|
2986
|
-
let files = this.filesToAttach;
|
|
2987
|
-
if (!files.length) return;
|
|
2988
|
-
let newFiles = files.filter((f) => f.sourceUrl !== file.sourceUrl);
|
|
2989
|
-
if (newFiles.length === files.length) return;
|
|
2990
|
-
this.matrixService.setFilesToSend(this.args.roomId, newFiles.length ? newFiles : void 0);
|
|
2991
|
-
this.markAttachedFileRemoved(file.sourceUrl);
|
|
2992
|
-
if (file.sourceUrl) this._fileUploadStates.delete(file.sourceUrl);
|
|
2993
|
-
}
|
|
2994
|
-
static {
|
|
2995
|
-
decorateMethodV2(this.prototype, "removeFile", [action]);
|
|
2996
|
-
}
|
|
2997
|
-
startFileUploadTask = buildTask(() => ({
|
|
2998
|
-
context: this,
|
|
2999
|
-
generator: function* (file) {
|
|
3000
|
-
let sourceUrl = file.sourceUrl;
|
|
3001
|
-
if (!sourceUrl) return;
|
|
3002
|
-
this._fileUploadStates.set(sourceUrl, { status: "uploading" });
|
|
3003
|
-
try {
|
|
3004
|
-
let [uploadedFile] = yield this.matrixService.uploadFiles([file]);
|
|
3005
|
-
let uploadedOrOriginal = uploadedFile ?? file;
|
|
3006
|
-
let files = this.filesToAttach;
|
|
3007
|
-
if (files?.find((f) => f.sourceUrl === sourceUrl)) {
|
|
3008
|
-
let nextFiles = files.map((f) => f.sourceUrl === sourceUrl ? uploadedOrOriginal : f);
|
|
3009
|
-
this.matrixService.setFilesToSend(this.args.roomId, nextFiles);
|
|
3010
|
-
this._fileUploadStates.set(sourceUrl, { status: "complete" });
|
|
3011
|
-
}
|
|
3012
|
-
} catch (e) {
|
|
3013
|
-
if (this.filesToAttach?.find((f) => f.sourceUrl === sourceUrl)) this._fileUploadStates.set(sourceUrl, {
|
|
3014
|
-
status: "error",
|
|
3015
|
-
error: e?.message
|
|
3016
|
-
});
|
|
3017
|
-
}
|
|
3018
|
-
}
|
|
3019
|
-
}), null, "startFileUploadTask", null);
|
|
3020
|
-
get hasFileUploadIssues() {
|
|
3021
|
-
for (let [, state] of this._fileUploadStates) if (state.status === "uploading" || state.status === "error") return true;
|
|
3022
|
-
return false;
|
|
3023
|
-
}
|
|
3024
|
-
retryFileUpload(file) {
|
|
3025
|
-
this.startFileUploadTask.perform(file);
|
|
3026
|
-
}
|
|
3027
|
-
static {
|
|
3028
|
-
decorateMethodV2(this.prototype, "retryFileUpload", [action]);
|
|
3029
|
-
}
|
|
3030
|
-
buildLocalSourceUrl(fileName) {
|
|
3031
|
-
return `${LOCAL_SOURCE_URL_PREFIX}${v4()}/${encodeURIComponent(fileName)}`;
|
|
3032
|
-
}
|
|
3033
|
-
async createLocalFileDef(localFile, bytes) {
|
|
3034
|
-
let sourceUrl = this.buildLocalSourceUrl(localFile.name);
|
|
3035
|
-
let fileDefCodeRef = resolveFileDefCodeRef(new URL(sourceUrl));
|
|
3036
|
-
let extracted = await new FileDefAttributesExtractor({
|
|
3037
|
-
loaderService: this.loaderService,
|
|
3038
|
-
network: this.network,
|
|
3039
|
-
fileURL: sourceUrl,
|
|
3040
|
-
fileDefCodeRef,
|
|
3041
|
-
baseFileDefCodeRef: baseFileRef,
|
|
3042
|
-
contentHash: void 0,
|
|
3043
|
-
contentSize: bytes.byteLength,
|
|
3044
|
-
fileSizeLimitBytes: config.fileSizeLimitBytes,
|
|
3045
|
-
fileBytes: bytes,
|
|
3046
|
-
buildError: (errorUrl, error) => {
|
|
3047
|
-
let errorJSONAPI = formattedError(errorUrl, error).errors[0];
|
|
3048
|
-
return errorJsonApiToErrorEntry(errorJSONAPI);
|
|
3049
|
-
}
|
|
3050
|
-
}).extract();
|
|
3051
|
-
if (extracted.status === "error" || !extracted.resource) throw new Error(extracted.error?.error?.message ?? `Failed to extract file metadata for ${localFile.name}`);
|
|
3052
|
-
let classCodeRef = extracted.resource.meta.adoptsFrom && "module" in extracted.resource.meta.adoptsFrom && "name" in extracted.resource.meta.adoptsFrom ? extracted.resource.meta.adoptsFrom : fileDefCodeRef;
|
|
3053
|
-
let FileDefKlass = (await this.loaderService.loader.import(classCodeRef.module))[classCodeRef.name];
|
|
3054
|
-
let baseAttributes = extracted.resource.attributes;
|
|
3055
|
-
let attributes = {
|
|
3056
|
-
...baseAttributes,
|
|
3057
|
-
sourceUrl,
|
|
3058
|
-
url: sourceUrl,
|
|
3059
|
-
name: baseAttributes.name ?? localFile.name,
|
|
3060
|
-
contentSize: baseAttributes.contentSize ?? bytes.byteLength
|
|
3061
|
-
};
|
|
3062
|
-
if (!FileDefKlass) return this.matrixService.fileAPI.createFileDef({
|
|
3063
|
-
sourceUrl,
|
|
3064
|
-
url: sourceUrl,
|
|
3065
|
-
name: localFile.name,
|
|
3066
|
-
contentType: attributes.contentType ?? localFile.type ?? "application/octet-stream",
|
|
3067
|
-
contentHash: attributes.contentHash,
|
|
3068
|
-
contentSize: attributes.contentSize
|
|
3069
|
-
});
|
|
3070
|
-
let api = await this.cardService.getAPI();
|
|
3071
|
-
let resource = {
|
|
3072
|
-
...extracted.resource,
|
|
3073
|
-
attributes
|
|
3074
|
-
};
|
|
3075
|
-
return await api.createFromSerialized(resource, { data: resource }, new URL(sourceUrl));
|
|
3076
|
-
}
|
|
3077
|
-
doSendMessage = buildTask(() => ({
|
|
3078
|
-
context: this,
|
|
3079
|
-
generator: function* (message, cardsOrIds, files, clientGeneratedId = v4(), keepInputAndAttachments = false, typedByUser = true) {
|
|
3080
|
-
this.unknownMessageSendError = void 0;
|
|
3081
|
-
const isRetry = keepInputAndAttachments;
|
|
3082
|
-
const roomId = this.args.roomId;
|
|
3083
|
-
let snapshotBody = message ?? "";
|
|
3084
|
-
let snapshotCardIds = [];
|
|
3085
|
-
if (cardsOrIds) if (typeof cardsOrIds[0] === "string") snapshotCardIds = cardsOrIds.slice();
|
|
3086
|
-
else snapshotCardIds = cardsOrIds.map((c) => c.id).filter((id) => Boolean(id));
|
|
3087
|
-
let snapshotFiles = files ?? [];
|
|
3088
|
-
if (!isRetry) {
|
|
3089
|
-
let originServerTs = yield this.matrixService.addOptimisticEvent(roomId, {
|
|
3090
|
-
body: snapshotBody,
|
|
3091
|
-
clientGeneratedId,
|
|
3092
|
-
attachedCardIds: snapshotCardIds,
|
|
3093
|
-
attachedFiles: snapshotFiles.map((f) => f.serialize())
|
|
3094
|
-
});
|
|
3095
|
-
this.matrixService.persistOptimisticSend(roomId, {
|
|
3096
|
-
clientGeneratedId,
|
|
3097
|
-
body: snapshotBody,
|
|
3098
|
-
attachedCardIds: snapshotCardIds,
|
|
3099
|
-
attachedFiles: snapshotFiles.map((f) => f.serialize()),
|
|
3100
|
-
createdAt: originServerTs
|
|
3101
|
-
});
|
|
3102
|
-
this.matrixService.setMessageToSend(roomId, void 0);
|
|
3103
|
-
this.matrixService.setCardsToSend(roomId, void 0);
|
|
3104
|
-
this.matrixService.setFilesToSend(roomId, void 0);
|
|
3105
|
-
this._fileUploadStates.clear();
|
|
3106
|
-
} else this.matrixService.patchPendingSend(roomId, clientGeneratedId, { status: "sending" });
|
|
3107
|
-
try {
|
|
3108
|
-
let openCardIds = new Set([...this.operatorModeStateService.getOpenCardIds() || [], ...this.autoAttachedCardIds]);
|
|
3109
|
-
let context = {
|
|
3110
|
-
...yield this.operatorModeStateService.getSummaryForAIBot(openCardIds),
|
|
3111
|
-
typedByUser
|
|
3112
|
-
};
|
|
3113
|
-
let cards = [];
|
|
3114
|
-
if (typeof cardsOrIds?.[0] === "string") {
|
|
3115
|
-
let cardsOrErrors = yield Promise.all(cardsOrIds.map((id) => this.store.get(id)));
|
|
3116
|
-
cardsOrErrors = cardsOrErrors.filter(Boolean);
|
|
3117
|
-
for (let cardOrError of cardsOrErrors) if (isCardInstance(cardOrError)) cards?.push(cardOrError);
|
|
3118
|
-
else if (cardOrError.id) {
|
|
3119
|
-
let cardFileDef = this.matrixService.fileAPI.createFileDef({
|
|
3120
|
-
sourceUrl: cardOrError.id + ".json",
|
|
3121
|
-
name: cardOrError.id.split("/").pop()
|
|
3122
|
-
});
|
|
3123
|
-
if (!files) files = [];
|
|
3124
|
-
files.push(cardFileDef);
|
|
3125
|
-
}
|
|
3126
|
-
} else cards = cardsOrIds;
|
|
3127
|
-
yield this.matrixService.sendMessage(roomId, message, cards, files, clientGeneratedId, context);
|
|
3128
|
-
} catch (e) {
|
|
3129
|
-
console.error(`message send pipeline threw (clientGeneratedId=${clientGeneratedId}): ${stringifyErrorForLog(e)}`);
|
|
3130
|
-
if (this.matrixService.findPendingMatrixEventStatus(roomId, clientGeneratedId) === "sent") {
|
|
3131
|
-
console.warn(`sendMessage threw after matrix accepted clientGeneratedId=${clientGeneratedId}; leaving bubble in sending state for reconciliation.`);
|
|
3132
|
-
return;
|
|
3133
|
-
}
|
|
3134
|
-
this.unknownMessageSendError = "There was an error sending your message. This could be due to network issues, or serialization issues with the cards or files you are trying to send. It might be helpful to refresh the page and try again.";
|
|
3135
|
-
this.matrixService.patchPendingSend(roomId, clientGeneratedId, {
|
|
3136
|
-
status: "not_sent",
|
|
3137
|
-
errorMessage: "Failed to send"
|
|
3138
|
-
});
|
|
3139
|
-
}
|
|
3140
|
-
}
|
|
3141
|
-
}), null, "doSendMessage", "enqueue");
|
|
3142
|
-
get topMostStackItems() {
|
|
3143
|
-
this.resetAutoAttachedRemovedStateTask.perform();
|
|
3144
|
-
return this.operatorModeStateService.topMostStackItems();
|
|
3145
|
-
}
|
|
3146
|
-
static {
|
|
3147
|
-
decorateMethodV2(this.prototype, "topMostStackItems", [cached]);
|
|
3148
|
-
}
|
|
3149
|
-
resetAutoAttachedRemovedStateTask = buildTask(() => ({
|
|
3150
|
-
context: this,
|
|
3151
|
-
generator: function* () {
|
|
3152
|
-
yield Promise.resolve();
|
|
3153
|
-
this.removedAttachedCardIds.clear();
|
|
3154
|
-
}
|
|
3155
|
-
}), null, "resetAutoAttachedRemovedStateTask", null);
|
|
3156
|
-
get autoAttachedCardIds() {
|
|
3157
|
-
return this.autoAttachmentResource.cardIds;
|
|
3158
|
-
}
|
|
3159
|
-
updateSkillIsActiveTask = buildTask(() => ({
|
|
3160
|
-
context: this,
|
|
3161
|
-
generator: function* (isActive, skillCardId) {
|
|
3162
|
-
yield new UpdateRoomSkillsTool(this.toolService.toolContext).execute({
|
|
3163
|
-
roomId: this.args.roomId,
|
|
3164
|
-
skillCardIdsToActivate: isActive ? [skillCardId] : [],
|
|
3165
|
-
skillCardIdsToDeactivate: isActive ? [] : [skillCardId]
|
|
3166
|
-
});
|
|
3167
|
-
}
|
|
3168
|
-
}), null, "updateSkillIsActiveTask", null);
|
|
3169
|
-
get isSending() {
|
|
3170
|
-
return this.doSendMessage.isRunning;
|
|
3171
|
-
}
|
|
3172
|
-
get canSend() {
|
|
3173
|
-
return !this.doSendMessage.isRunning && Boolean(this.messageToSend?.trim() || this.cardIdsToAttach?.length || this.autoAttachedCardIds.size !== 0 || this.filesToAttach?.length || this.autoAttachedFiles.length > 0) && !this.hasFileUploadIssues && !!this.room && !this.messages.some((m) => m.author.userId === this.matrixService.userId && m.status === "not_sent") && !this.matrixService.isLoadingTimeline && !this.aiAssistantPanelService.isPreparingSession;
|
|
3174
|
-
}
|
|
3175
|
-
isLastMessage(messageIndex) {
|
|
3176
|
-
return (this.room && messageIndex === this.messages.length - 1) ?? false;
|
|
3177
|
-
}
|
|
3178
|
-
static {
|
|
3179
|
-
decorateMethodV2(this.prototype, "isLastMessage", [action]);
|
|
3180
|
-
}
|
|
3181
|
-
isPendingMessage(message) {
|
|
3182
|
-
return message.status === "sending" || message.status === "queued";
|
|
3183
|
-
}
|
|
3184
|
-
attachSkillTask = buildTask(() => ({
|
|
3185
|
-
context: this,
|
|
3186
|
-
generator: function* (cardId) {
|
|
3187
|
-
yield new UpdateRoomSkillsTool(this.toolService.toolContext).execute({
|
|
3188
|
-
roomId: this.args.roomId,
|
|
3189
|
-
skillCardIdsToActivate: [cardId]
|
|
3190
|
-
});
|
|
3191
|
-
}
|
|
3192
|
-
}), null, "attachSkillTask", null);
|
|
3193
|
-
setSelectedBottomAction(action) {
|
|
3194
|
-
this.selectedBottomAction = action;
|
|
3195
|
-
}
|
|
3196
|
-
static {
|
|
3197
|
-
decorateMethodV2(this.prototype, "setSelectedBottomAction", [action]);
|
|
3198
|
-
}
|
|
3199
|
-
skipSessionPreparation() {
|
|
3200
|
-
this.aiAssistantPanelService.skipSessionPreparation();
|
|
3201
|
-
}
|
|
3202
|
-
static {
|
|
3203
|
-
decorateMethodV2(this.prototype, "skipSessionPreparation", [action]);
|
|
3204
|
-
}
|
|
3205
|
-
get displaySkillMenu() {
|
|
3206
|
-
return !this.selectedBottomAction || this.selectedBottomAction === "skill-menu";
|
|
3207
|
-
}
|
|
3208
|
-
get displayLLMSelect() {
|
|
3209
|
-
return !this.selectedBottomAction || this.selectedBottomAction === "llm-select";
|
|
3210
|
-
}
|
|
3211
|
-
get displayLLMModeSelect() {
|
|
3212
|
-
return this.displaySkillMenu && this.displayLLMSelect;
|
|
3213
|
-
}
|
|
3214
|
-
get displayAttachedItems() {
|
|
3215
|
-
return this.filesToAttach?.length || this.cardIdsToAttach?.length || this.autoAttachedFiles.length > 0 || this.autoAttachedCardIds?.size;
|
|
3216
|
-
}
|
|
3217
|
-
get readyTools() {
|
|
3218
|
-
let lastMessage = this.messages[this.messages.length - 1];
|
|
3219
|
-
if (!lastMessage || !lastMessage.tools) return [];
|
|
3220
|
-
let activeMode = this.matrixService.roomResources.get(this.args.roomId)?.getActiveLLMModeForMessage(lastMessage.eventId);
|
|
3221
|
-
let isOwnedByCurrentAgent = lastMessage.agentId === this.matrixService.agentId;
|
|
3222
|
-
return lastMessage.tools.filter((command) => (command.status === "ready" || command.status === void 0) && !this.toolService.currentlyExecutingToolRequestIds.has(command.id) && !this.toolService.executedToolRequestIds.has(command.id) && !command.awaitsApproval && !command.isResolving && !isAutoExecutableTool(command, activeMode, isOwnedByCurrentAgent));
|
|
3223
|
-
}
|
|
3224
|
-
static {
|
|
3225
|
-
decorateMethodV2(this.prototype, "readyTools", [cached]);
|
|
3226
|
-
}
|
|
3227
|
-
get generatingResults() {
|
|
3228
|
-
let lastMessage = this.messages[this.messages.length - 1];
|
|
3229
|
-
if (!lastMessage) return false;
|
|
3230
|
-
if (lastMessage.author.userId !== this.matrixService.aiBotUserId) return false;
|
|
3231
|
-
return !lastMessage.isStreamingFinished;
|
|
3232
|
-
}
|
|
3233
|
-
get assistantLoopActive() {
|
|
3234
|
-
let lastMessage = this.messages[this.messages.length - 1];
|
|
3235
|
-
if (!lastMessage || lastMessage.author.userId !== this.matrixService.aiBotUserId || lastMessage.isCanceled || lastMessage.errorMessage || this.args.roomResource.isStopped(lastMessage.eventId)) return false;
|
|
3236
|
-
if (!lastMessage.isStreamingFinished) return true;
|
|
3237
|
-
let activeMode = this.args.roomResource.getActiveLLMModeForMessage(lastMessage.eventId);
|
|
3238
|
-
let isOwnedByCurrentAgent = lastMessage.agentId === this.matrixService.agentId;
|
|
3239
|
-
return lastMessage.tools.some((tool) => (tool.status === "ready" || tool.status === "applying" || tool.status === void 0) && !tool.awaitsApproval && !this.matrixService.failedToolState.has(tool.id) && (tool.executedBy === "ai-bot" || isAutoExecutableTool(tool, activeMode, isOwnedByCurrentAgent)));
|
|
3240
|
-
}
|
|
3241
|
-
static {
|
|
3242
|
-
decorateMethodV2(this.prototype, "assistantLoopActive", [cached]);
|
|
3243
|
-
}
|
|
3244
|
-
get displayActionBar() {
|
|
3245
|
-
let lastMessage = this.messages[this.messages.length - 1];
|
|
3246
|
-
if (this.lastCanceledActionMessageId && lastMessage?.eventId === this.lastCanceledActionMessageId || lastMessage?.isCanceled) return false;
|
|
3247
|
-
return this.showUnreadIndicator || this.assistantLoopActive || this.readyTools.length > 0 || this.isAcceptingAll;
|
|
3248
|
-
}
|
|
3249
|
-
static {
|
|
3250
|
-
decorateMethodV2(this.prototype, "displayActionBar", [cached]);
|
|
3251
|
-
}
|
|
3252
|
-
async executeReadyCommands() {
|
|
3253
|
-
for (let command of this.readyTools) {
|
|
3254
|
-
this.acceptingAllLabel = command.actionVerb;
|
|
3255
|
-
await this.toolService.run.unlinked().perform(command);
|
|
3256
|
-
this.acceptingAllLabel = void 0;
|
|
3257
|
-
}
|
|
3258
|
-
}
|
|
3259
|
-
executeAllReadyActionsTask = buildTask(() => ({
|
|
3260
|
-
context: this,
|
|
3261
|
-
generator: function* () {
|
|
3262
|
-
yield this.executeReadyCommands();
|
|
3263
|
-
}
|
|
3264
|
-
}), null, "executeAllReadyActionsTask", null);
|
|
3265
|
-
cancelActionBar() {
|
|
3266
|
-
let lastMessage = this.messages[this.messages.length - 1];
|
|
3267
|
-
if (lastMessage) {
|
|
3268
|
-
this.lastCanceledActionMessageId = lastMessage.eventId;
|
|
3269
|
-
this.matrixService.markActionAsCanceled(this.args.roomId, lastMessage.eventId);
|
|
3270
|
-
}
|
|
3271
|
-
}
|
|
3272
|
-
static {
|
|
3273
|
-
decorateMethodV2(this.prototype, "cancelActionBar", [action]);
|
|
3274
|
-
}
|
|
3275
|
-
stopGeneratingTask = buildTask(() => ({
|
|
3276
|
-
context: this,
|
|
3277
|
-
generator: function* () {
|
|
3278
|
-
yield this.matrixService.sendStopGeneratingEvent(this.args.roomId);
|
|
3279
|
-
}
|
|
3280
|
-
}), null, "stopGeneratingTask", null);
|
|
3281
|
-
};
|
|
3282
|
-
//#endregion
|
|
3283
|
-
//#region app/components/ai-assistant/ai-assist-icon.webp
|
|
3284
|
-
var ai_assist_icon_default = "data:image/webp;base64,UklGRgYCAABXRUJQVlA4WAoAAAAQAAAAGQAAGQAAQUxQSMUAAAABgFXbVt1qS0ACEnBQHBQHxUFxUCRcB40TcNA4AAeJg/2xeVwJETEBGHuSrJUkPTbDStjJ8ndI3mmSkvw2ItVaYVxyl3Sgy+UWXhfVA0F4veTx/DQOKwBUIX+f54PzbsT0wXp3GLq+VQ2mpq51j2XfB7UeyWLbpqPWUr7v/3h/S6E2vxYal4uZmcLd5kaucb8ZMY1zH/I5YJHC4ZmDB4B4Cz0QqHfE3N3SgCa3w2oUWkuNWO+SkpzYzHIckneC1Cphx6/4CQBWUDggGgEAANAIAJ0BKhoAGgA+bTCTRyQjIaEoCqiADYlsAJ0y43mfjXDn75NhnMfImEA54jcQPZr58v2MfJAAbPO7yGJmutiLvayjgnMJdH1F2DmS5YAA/sNd5nCfj0nyEoYDCcd/a+s8rM6SzWFYyWRtmknvHddHhrszX/vEF+DSzHS12Ipf4rsqCDi4/Y8hXXNZIh9h1RGCFdzS01aOcoZrbEMhfDAVbYP4DMUiZ2Z33RnvHaDXvQEFvTfUf7h9cMs7+frGUnfFJhxEMu7Gpnx9pu0g4H6//JvvL/lO6yxZ+Ss7ZI09hg86DATL93vF6Qr45v+G511//3aKOEPl+ed21HH7yY5JH/bvJ/ztHqofit+OQBz8BEv/48NeW8AAAA==";
|
|
3285
|
-
//#endregion
|
|
3286
|
-
//#region app/components/ai-assistant/new-session-settings.gts
|
|
3287
|
-
var NewSessionSettings = class extends Component {
|
|
3288
|
-
options = [
|
|
3289
|
-
"Add Same Skills",
|
|
3290
|
-
"Copy File History",
|
|
3291
|
-
"Summarize Current Session"
|
|
3292
|
-
];
|
|
3293
|
-
isSelected(option) {
|
|
3294
|
-
return this.args.selectedOptions.has(option);
|
|
3295
|
-
}
|
|
3296
|
-
static {
|
|
3297
|
-
decorateMethodV2(this.prototype, "isSelected", [action]);
|
|
3298
|
-
}
|
|
3299
|
-
onOptionChange(e) {
|
|
3300
|
-
const target = e.target;
|
|
3301
|
-
const option = target.name;
|
|
3302
|
-
const checked = target.checked;
|
|
3303
|
-
this.args.onOptionChange(option, checked);
|
|
3304
|
-
}
|
|
3305
|
-
static {
|
|
3306
|
-
decorateMethodV2(this.prototype, "onOptionChange", [action]);
|
|
3307
|
-
}
|
|
3308
|
-
handleCreateSession() {
|
|
3309
|
-
this.args.onCreateSession();
|
|
3310
|
-
}
|
|
3311
|
-
static {
|
|
3312
|
-
decorateMethodV2(this.prototype, "handleCreateSession", [action]);
|
|
3313
|
-
}
|
|
3314
|
-
static {
|
|
3315
|
-
setComponentTemplate(templateFactory({
|
|
3316
|
-
"id": "/Xn6PygW",
|
|
3317
|
-
"block": "[[[10,0],[14,0,\"new-session-settings-menu\"],[14,\"data-test-new-session-settings-menu\",\"\"],[14,\"data-scopedcss-205ecf6407-627f6da08a\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"new-session-settings-header\"],[14,\"data-scopedcss-205ecf6407-627f6da08a\",\"\"],[12],[1,\"\\n \"],[10,0],[14,0,\"new-session-settings-title\"],[14,\"data-test-new-session-settings-title\",\"\"],[14,\"data-scopedcss-205ecf6407-627f6da08a\",\"\"],[12],[1,\"New Session Options\"],[13],[1,\"\\n \"],[8,[32,0],[[24,0,\"new-session-settings-close-button\"],[24,\"data-test-new-session-settings-close-button\",\"\"],[24,\"data-scopedcss-205ecf6407-627f6da08a\",\"\"],[4,[32,1],[\"click\",[30,1]],null]],[[\"@icon\",\"@variant\",\"@size\",\"@label\"],[\"close\",\"ghost\",\"small\",\"close new session options\"]],null],[1,\"\\n \"],[13],[1,\"\\n \"],[10,0],[14,0,\"new-session-settings-options\"],[14,\"data-test-new-session-settings-options\",\"\"],[14,\"data-scopedcss-205ecf6407-627f6da08a\",\"\"],[12],[1,\"\\n\"],[42,[28,[31,1],[[28,[31,1],[[30,0,[\"options\"]]],null]],null],null,[[[1,\" \"],[10,\"label\"],[15,0,[29,[\"new-session-settings-option\\n \",[52,[28,[30,0,[\"isSelected\"]],[[30,2]],null],\"checked\"]]]],[15,\"data-test-new-session-settings-option\",[30,2]],[14,\"data-scopedcss-205ecf6407-627f6da08a\",\"\"],[12],[1,\"\\n \"],[11,\"input\"],[16,3,[30,2]],[16,\"checked\",[28,[30,0,[\"isSelected\"]],[[30,2]],null]],[16,\"data-test-new-session-settings-checkbox\",[30,2]],[24,\"data-scopedcss-205ecf6407-627f6da08a\",\"\"],[24,4,\"checkbox\"],[4,[32,1],[\"change\",[30,0,[\"onOptionChange\"]]],null],[12],[13],[1,\"\\n \"],[10,1],[14,0,\"new-session-settings-label\"],[15,\"data-test-new-session-settings-label\",[30,2]],[14,\"data-scopedcss-205ecf6407-627f6da08a\",\"\"],[12],[1,[30,2]],[13],[1,\"\\n \"],[13],[1,\"\\n\"]],[2]],null],[1,\" \"],[13],[1,\"\\n \"],[10,0],[14,0,\"new-session-settings-footer\"],[14,\"data-scopedcss-205ecf6407-627f6da08a\",\"\"],[12],[1,\"\\n \"],[8,[32,2],[[24,0,\"new-session-settings-create-button\"],[24,\"data-test-new-session-settings-create-button\",\"\"],[24,\"data-scopedcss-205ecf6407-627f6da08a\",\"\"],[4,[32,1],[\"click\",[30,0,[\"handleCreateSession\"]]],null]],[[\"@kind\",\"@size\"],[\"primary\",\"small\"]],[[\"default\"],[[[[1,\"\\n Start New Session\\n \"]],[]]]]],[1,\"\\n \"],[13],[1,\"\\n\"],[13],[1,\"\\n\"]],[\"@onClose\",\"option\"],[\"each\",\"-track-array\",\"if\"]]",
|
|
3318
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/new-session-settings.gts",
|
|
3319
|
-
"scope": () => [
|
|
3320
|
-
DropdownButton,
|
|
3321
|
-
on,
|
|
3322
|
-
ButtonComponent
|
|
3323
|
-
],
|
|
3324
|
-
"isStrictMode": true
|
|
3325
|
-
}), this);
|
|
3326
|
-
}
|
|
3327
|
-
};
|
|
3328
|
-
//#endregion
|
|
3329
|
-
//#region app/components/ai-assistant/new-session-button.gts
|
|
3330
|
-
var NewSessionButton = class extends Component {
|
|
3331
|
-
static {
|
|
3332
|
-
decorateFieldV2(this.prototype, "showMenu", [tracked], function() {
|
|
3333
|
-
return false;
|
|
3334
|
-
});
|
|
3335
|
-
}
|
|
3336
|
-
#showMenu = (initializeDeferredDecorator(this, "showMenu"), void 0);
|
|
3337
|
-
static {
|
|
3338
|
-
decorateFieldV2(this.prototype, "selectedOptions", [tracked], function() {
|
|
3339
|
-
return /* @__PURE__ */ new Set();
|
|
3340
|
-
});
|
|
3341
|
-
}
|
|
3342
|
-
#selectedOptions = (initializeDeferredDecorator(this, "selectedOptions"), void 0);
|
|
3343
|
-
updateOption(option, checked) {
|
|
3344
|
-
if (checked) this.selectedOptions.add(option);
|
|
3345
|
-
else this.selectedOptions.delete(option);
|
|
3346
|
-
this.selectedOptions = new Set(this.selectedOptions);
|
|
3347
|
-
}
|
|
3348
|
-
static {
|
|
3349
|
-
decorateMethodV2(this.prototype, "updateOption", [action]);
|
|
3350
|
-
}
|
|
3351
|
-
handleCreateNewSession(event) {
|
|
3352
|
-
let mouseEvent = event;
|
|
3353
|
-
if (mouseEvent.shiftKey || this.showMenu) {
|
|
3354
|
-
mouseEvent.preventDefault();
|
|
3355
|
-
this.showMenu = !this.showMenu;
|
|
3356
|
-
return;
|
|
3357
|
-
}
|
|
3358
|
-
this.args.onCreateNewSession();
|
|
3359
|
-
}
|
|
3360
|
-
static {
|
|
3361
|
-
decorateMethodV2(this.prototype, "handleCreateNewSession", [action]);
|
|
3362
|
-
}
|
|
3363
|
-
closeMenu() {
|
|
3364
|
-
this.showMenu = false;
|
|
3365
|
-
}
|
|
3366
|
-
static {
|
|
3367
|
-
decorateMethodV2(this.prototype, "closeMenu", [action]);
|
|
3368
|
-
}
|
|
3369
|
-
handleCreateNewSessionFromSettings() {
|
|
3370
|
-
this.args.onCreateNewSession({
|
|
3371
|
-
addSameSkills: this.selectedOptions.has("Add Same Skills"),
|
|
3372
|
-
shouldCopyFileHistory: this.selectedOptions.has("Copy File History"),
|
|
3373
|
-
shouldSummarizeSession: this.selectedOptions.has("Summarize Current Session")
|
|
3374
|
-
});
|
|
3375
|
-
this.closeMenu();
|
|
3376
|
-
}
|
|
3377
|
-
static {
|
|
3378
|
-
decorateMethodV2(this.prototype, "handleCreateNewSessionFromSettings", [action]);
|
|
3379
|
-
}
|
|
3380
|
-
static {
|
|
3381
|
-
setComponentTemplate(templateFactory({
|
|
3382
|
-
"id": "j/09E6Bu",
|
|
3383
|
-
"block": "[[[10,0],[15,0,[29,[\"new-session-button-container \",[52,[30,0,[\"showMenu\"]],\"menu-open\"]]]],[14,\"data-scopedcss-04c6980fc4-a321f78deb\",\"\"],[12],[1,\"\\n \"],[8,[32,0],[[24,\"data-scopedcss-04c6980fc4-a321f78deb\",\"\"]],null,[[\"trigger\",\"content\"],[[[[1,\"\\n \"],[8,[32,1],[[24,0,\"button new-session-button\"],[16,\"aria-expanded\",[29,[[30,0,[\"showMenu\"]]]]],[24,\"data-test-create-room-btn\",\"\"],[24,\"data-scopedcss-04c6980fc4-a321f78deb\",\"\"],[4,[32,2],[\"click\",[30,0,[\"handleCreateNewSession\"]]],null]],[[\"@disabled\",\"@icon\",\"@size\",\"@width\",\"@height\",\"@variant\",\"@label\"],[[30,1],\"add\",\"extra-small\",\"18\",\"18\",\"highlight-icon\",\"Create new session (Shift+Click for options)\"]],null],[1,\"\\n \"]],[]],[[[1,\"\\n\"],[41,[30,0,[\"showMenu\"]],[[[1,\" Close New Session Settings\\n\"]],[]],[[[1,\" New Session (Shift+Click for options)\\n\"]],[]]],[1,\" \"]],[]]]]],[1,\"\\n\\n\"],[41,[30,0,[\"showMenu\"]],[[[1,\" \"],[11,0],[24,0,\"new-session-menu-wrapper\"],[24,\"data-scopedcss-04c6980fc4-a321f78deb\",\"\"],[4,[32,3],[[30,0,[\"closeMenu\"]]],null],[12],[1,\"\\n \"],[8,[32,4],[[24,\"data-scopedcss-04c6980fc4-a321f78deb\",\"\"]],[[\"@selectedOptions\",\"@onOptionChange\",\"@onClose\",\"@onCreateSession\"],[[30,0,[\"selectedOptions\"]],[30,0,[\"updateOption\"]],[30,0,[\"closeMenu\"]],[30,0,[\"handleCreateNewSessionFromSettings\"]]]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],null],[13],[1,\"\\n\\n\"]],[\"@disabled\"],[\"if\"]]",
|
|
3384
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/new-session-button.gts",
|
|
3385
|
-
"scope": () => [
|
|
3386
|
-
Tooltip,
|
|
3387
|
-
DropdownButton,
|
|
3388
|
-
on,
|
|
3389
|
-
ClickOutsideModifier,
|
|
3390
|
-
NewSessionSettings
|
|
3391
|
-
],
|
|
3392
|
-
"isStrictMode": true
|
|
3393
|
-
}), this);
|
|
3394
|
-
}
|
|
3395
|
-
};
|
|
3396
|
-
//#endregion
|
|
3397
|
-
//#region app/components/ai-assistant/panel.gts
|
|
3398
|
-
var { matrixServerName } = config;
|
|
3399
|
-
var aiBotUserId = `@${aiBotUsername}:${matrixServerName}`;
|
|
3400
|
-
var AiAssistantPanel = class extends Component {
|
|
3401
|
-
static {
|
|
3402
|
-
decorateFieldV2(this.prototype, "copiedRoomId", [tracked], function() {
|
|
3403
|
-
return null;
|
|
3404
|
-
});
|
|
3405
|
-
}
|
|
3406
|
-
#copiedRoomId = (initializeDeferredDecorator(this, "copiedRoomId"), void 0);
|
|
3407
|
-
static {
|
|
3408
|
-
decorateFieldV2(this.prototype, "isFallbackBannerDismissed", [tracked], function() {
|
|
3409
|
-
return false;
|
|
3410
|
-
});
|
|
3411
|
-
}
|
|
3412
|
-
#isFallbackBannerDismissed = (initializeDeferredDecorator(this, "isFallbackBannerDismissed"), void 0);
|
|
3413
|
-
static {
|
|
3414
|
-
decorateFieldV2(this.prototype, "bannerBottomPx", [tracked]);
|
|
3415
|
-
}
|
|
3416
|
-
#bannerBottomPx = (initializeDeferredDecorator(this, "bannerBottomPx"), void 0);
|
|
3417
|
-
static {
|
|
3418
|
-
setComponentTemplate(templateFactory({
|
|
3419
|
-
"id": "07TxGT8l",
|
|
3420
|
-
"block": "[[[8,[32,0],[[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"]],[[\"@placement\",\"@offsetOptions\"],[\"bottom-end\",[30,0,[\"velcroOffsetOptions\"]]]],[[\"default\"],[[[[1,\"\\n \"],[11,0],[24,0,\"ai-assistant-panel\"],[24,\"data-holds-focus\",\"\"],[24,\"data-test-ai-assistant-panel\",\"\"],[16,\"data-test-room-has-messages\",[52,[30,0,[\"roomResource\",\"messages\"]],true,false]],[16,\"data-test-room-is-empty\",[52,[30,0,[\"roomResource\",\"messages\"]],false,true]],[16,5,[28,[32,1],null,[[\"chat-top-clearance\"],[[30,0,[\"chatTopClearanceCss\"]]]]]],[17,2],[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[12],[1,\"\\n \"],[8,[30,3],[[24,0,\"ai-assistant-panel-resize-handle\"],[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"]],null,null],[1,\"\\n \"],[10,0],[14,0,\"panel-header-container\"],[14,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[12],[1,\"\\n \"],[10,\"header\"],[14,0,\"panel-header\"],[14,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[12],[1,\"\\n \"],[10,\"img\"],[14,\"alt\",\"AI Assistant\"],[15,\"src\",[32,2]],[14,\"width\",\"20\"],[14,\"height\",\"20\"],[14,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[12],[13],[1,\"\\n\"],[44,[[52,[30,0,[\"roomResource\",\"name\"]],[30,0,[\"roomResource\",\"name\"]],\"Assistant\"]],[[[1,\" \"],[10,\"h3\"],[15,\"title\",[30,4]],[14,0,\"panel-title-text\"],[14,\"data-test-chat-title\",\"\"],[14,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[12],[1,\"\\n \"],[1,[30,4]],[1,\"\\n \"],[13],[1,\"\\n\"]],[4]]],[1,\" \"],[8,[32,3],[[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"]],[[\"@disabled\",\"@onCreateNewSession\"],[[28,[32,4],[[30,0,[\"roomResource\",\"messages\",\"length\"]]],null],[30,0,[\"aiAssistantPanelService\",\"createNewSession\"]]]],null],[1,\"\\n\"],[44,[[30,0,[\"aiAssistantPanelService\",\"loadingRooms\"]]],[[[1,\" \"],[8,[32,5],[[24,\"title\",\"Past Sessions\"],[16,0,[29,[\"button past-sessions-button\\n \",[52,[30,0,[\"hasOtherActiveSessions\"]],\"has-other-active-sessions\"]]]],[24,\"data-test-past-sessions-button\",\"\"],[16,\"data-test-has-active-sessions\",[30,0,[\"hasOtherActiveSessions\"]]],[16,\"aria-expanded\",[29,[[30,0,[\"aiAssistantPanelService\",\"isShowingPastSessions\"]]]]],[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[4,[32,7],[\"click\",[30,0,[\"aiAssistantPanelService\",\"displayPastSessions\"]]],null]],[[\"@icon\",\"@label\",\"@size\",\"@variant\",\"@width\",\"@height\",\"@loading\",\"@disabled\"],[[32,6],\"Past Sessions\",\"extra-small\",\"highlight-icon\",\"14\",\"14\",[30,5],[30,0,[\"aiAssistantPanelService\",\"displayRoomError\"]]]],null],[1,\"\\n\"]],[5]]],[1,\" \"],[8,[32,5],[[24,\"title\",\"Close AI Assistant\"],[24,0,\"button\"],[24,\"data-test-close-ai-assistant\",\"\"],[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[4,[32,7],[\"click\",[30,6]],null]],[[\"@icon\",\"@size\",\"@width\",\"@height\",\"@label\",\"@variant\"],[\"close\",\"extra-small\",\"18\",\"18\",\"close ai assistant\",\"highlight-icon\"]],null],[1,\"\\n \"],[13],[1,\"\\n\\n\"],[41,[30,0,[\"shouldShowFallbackBanner\"]],[[[1,\" \"],[8,[32,8],[[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[4,[30,0,[\"measureBanner\"]],null,null]],[[\"@onDismiss\"],[[30,0,[\"dismissFallbackBanner\"]]]],null],[1,\"\\n\"]],[]],null],[1,\" \"],[13],[1,\"\\n\\n\"],[41,[30,0,[\"aiAssistantPanelService\",\"isShowingPastSessions\"]],[[[1,\" \"],[8,[32,9],[[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[4,[30,1,[\"loop\"]],null,null]],[[\"@sessions\",\"@currentRoomId\",\"@roomActions\",\"@onClose\"],[[30,0,[\"aiAssistantPanelService\",\"aiSessionRooms\"]],[30,0,[\"matrixService\",\"currentRoomId\"]],[30,0,[\"roomActions\"]],[30,0,[\"aiAssistantPanelService\",\"hidePastSessions\"]]]],null],[1,\"\\n\"]],[]],[[[41,[30,0,[\"aiAssistantPanelService\",\"roomToRename\"]],[[[1,\" \"],[8,[32,10],[[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[4,[30,1,[\"loop\"]],null,null]],[[\"@room\",\"@onClose\"],[[30,0,[\"aiAssistantPanelService\",\"roomToRename\"]],[30,0,[\"aiAssistantPanelService\",\"onCloseRename\"]]]],null],[1,\"\\n \"]],[]],null]],[]]],[1,\"\\n\"],[41,[30,0,[\"aiAssistantPanelService\",\"displayRoomError\"]],[[[1,\" \"],[10,0],[14,0,\"session-error\"],[14,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[12],[1,\"\\n \"],[8,[32,11],[[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"]],[[\"@errorAction\"],[[30,0,[\"aiAssistantPanelService\",\"createNewSession\"]]]],null],[1,\"\\n \"],[13],[1,\"\\n\"]],[]],[[[41,[30,0,[\"isReady\"]],[[[41,[30,0,[\"roomResource\"]],[[[41,[30,0,[\"matrixService\",\"currentRoomId\"]],[[[1,\" \"],[8,[32,12],[[24,0,\"room\"],[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"]],[[\"@roomId\",\"@roomResource\",\"@monacoSDK\",\"@selectedCardRef\"],[[30,0,[\"matrixService\",\"currentRoomId\"]],[30,0,[\"roomResource\"]],[30,0,[\"monacoSDK\"]],[30,7]]],null],[1,\"\\n\"]],[]],null]],[]],null]],[]],[[[1,\" \"],[8,[32,13],[[24,0,\"loading-new-session\"],[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"]],[[\"@color\"],[\"var(--boxel-light)\"]],null],[1,\"\\n \"]],[]]]],[]]],[1,\" \"],[13],[1,\"\\n\"]],[1]]]]],[1,\"\\n\\n\"],[41,[30,0,[\"aiAssistantPanelService\",\"roomToDelete\"]],[[[1,\" \"],[8,[32,14],[[24,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"]],[[\"@itemToDelete\",\"@onConfirm\",\"@onCancel\",\"@error\"],[[30,0,[\"aiAssistantPanelService\",\"roomToDelete\"]],[28,[32,15],[[30,0,[\"aiAssistantPanelService\",\"leaveRoom\"]],[30,0,[\"aiAssistantPanelService\",\"roomToDelete\",\"id\"]]],null],[28,[32,15],[[30,0,[\"aiAssistantPanelService\",\"setRoomToDelete\"]],[27]],null],[30,0,[\"aiAssistantPanelService\",\"roomDeleteError\"]]]],[[\"content\"],[[[[1,\"\\n Delete the room\\n \"],[10,\"strong\"],[14,\"data-scopedcss-9b63bb4e74-def0b52a54\",\"\"],[12],[1,[30,0,[\"aiAssistantPanelService\",\"roomToDelete\",\"name\"]]],[13],[1,\"?\\n \"]],[]]]]],[1,\"\\n\"]],[]],null],[1,\"\\n\"]],[\"popoverVelcro\",\"&attrs\",\"@resizeHandle\",\"title\",\"pastSessionsLoading\",\"@onClose\",\"@selectedCardRef\"],[\"if\",\"let\"]]",
|
|
3421
|
-
"moduleName": "/home/runner/work/boxel/boxel/packages/host/app/components/ai-assistant/panel.gts",
|
|
3422
|
-
"scope": () => [
|
|
3423
|
-
Velcro,
|
|
3424
|
-
css_var_default,
|
|
3425
|
-
ai_assist_icon_default,
|
|
3426
|
-
NewSessionButton,
|
|
3427
|
-
not,
|
|
3428
|
-
DropdownButton,
|
|
3429
|
-
IconComponent$16,
|
|
3430
|
-
on,
|
|
3431
|
-
FallbackBanner,
|
|
3432
|
-
AiAssistantPastSessionsList,
|
|
3433
|
-
RenameSession,
|
|
3434
|
-
NewSession,
|
|
3435
|
-
Room,
|
|
3436
|
-
LoadingIndicator,
|
|
3437
|
-
component,
|
|
3438
|
-
fn
|
|
3439
|
-
],
|
|
3440
|
-
"isStrictMode": true
|
|
3441
|
-
}), this);
|
|
3442
|
-
}
|
|
3443
|
-
static {
|
|
3444
|
-
decorateFieldV2(this.prototype, "matrixService", [service]);
|
|
3445
|
-
}
|
|
3446
|
-
#matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
|
|
3447
|
-
static {
|
|
3448
|
-
decorateFieldV2(this.prototype, "monacoService", [service]);
|
|
3449
|
-
}
|
|
3450
|
-
#monacoService = (initializeDeferredDecorator(this, "monacoService"), void 0);
|
|
3451
|
-
static {
|
|
3452
|
-
decorateFieldV2(this.prototype, "aiAssistantPanelService", [service]);
|
|
3453
|
-
}
|
|
3454
|
-
#aiAssistantPanelService = (initializeDeferredDecorator(this, "aiAssistantPanelService"), void 0);
|
|
3455
|
-
static {
|
|
3456
|
-
decorateFieldV2(this.prototype, "maybeMonacoSDK", [tracked]);
|
|
3457
|
-
}
|
|
3458
|
-
#maybeMonacoSDK = (initializeDeferredDecorator(this, "maybeMonacoSDK"), void 0);
|
|
3459
|
-
constructor(owner, args) {
|
|
3460
|
-
super(owner, args);
|
|
3461
|
-
this.loadMonaco.perform();
|
|
3462
|
-
}
|
|
3463
|
-
get velcroOffsetOptions() {
|
|
3464
|
-
return {
|
|
3465
|
-
mainAxis: 10,
|
|
3466
|
-
crossAxis: 50
|
|
3467
|
-
};
|
|
3468
|
-
}
|
|
3469
|
-
get hasOtherActiveSessions() {
|
|
3470
|
-
let oneMinuteAgo = (/* @__PURE__ */ new Date(Date.now() - 60 * 1e3)).getTime();
|
|
3471
|
-
return this.aiAssistantPanelService.aiSessionRooms.filter((session) => session.roomId !== this.roomResource?.roomId).some((session) => {
|
|
3472
|
-
let isSessionActive = false;
|
|
3473
|
-
isSessionActive = this.matrixService.getLastActiveTimestamp(session.roomId, session.lastActiveTimestamp) > oneMinuteAgo;
|
|
3474
|
-
let lastMessageEventId = session.lastMessage?.eventId;
|
|
3475
|
-
let hasSeenLastMessage = lastMessageEventId ? this.matrixService.currentUserEventReadReceipts.has(lastMessageEventId) : false;
|
|
3476
|
-
return isSessionActive && !hasSeenLastMessage;
|
|
3477
|
-
});
|
|
3478
|
-
}
|
|
3479
|
-
get shouldShowFallbackBanner() {
|
|
3480
|
-
return this.matrixService.isUsingFallbackSystemCard && !this.isFallbackBannerDismissed;
|
|
3481
|
-
}
|
|
3482
|
-
get chatTopClearanceCss() {
|
|
3483
|
-
return this.bannerBottomPx ? `${this.bannerBottomPx}px` : void 0;
|
|
3484
|
-
}
|
|
3485
|
-
measureBanner = modifier((el) => {
|
|
3486
|
-
let update = () => {
|
|
3487
|
-
this.bannerBottomPx = el.offsetTop + el.offsetHeight;
|
|
3488
|
-
};
|
|
3489
|
-
let ro = new ResizeObserver(update);
|
|
3490
|
-
ro.observe(el);
|
|
3491
|
-
if (el.parentElement) ro.observe(el.parentElement);
|
|
3492
|
-
return () => {
|
|
3493
|
-
ro.disconnect();
|
|
3494
|
-
this.bannerBottomPx = void 0;
|
|
3495
|
-
};
|
|
3496
|
-
});
|
|
3497
|
-
dismissFallbackBanner() {
|
|
3498
|
-
this.isFallbackBannerDismissed = true;
|
|
3499
|
-
}
|
|
3500
|
-
static {
|
|
3501
|
-
decorateMethodV2(this.prototype, "dismissFallbackBanner", [action]);
|
|
3502
|
-
}
|
|
3503
|
-
get roomResource() {
|
|
3504
|
-
return this.matrixService.currentRoomId ? this.matrixService.roomResources.get(this.matrixService.currentRoomId) : void 0;
|
|
3505
|
-
}
|
|
3506
|
-
get roomActions() {
|
|
3507
|
-
return {
|
|
3508
|
-
open: this.aiAssistantPanelService.enterRoom,
|
|
3509
|
-
rename: this.aiAssistantPanelService.setRoomToRename,
|
|
3510
|
-
delete: this.aiAssistantPanelService.setRoomToDelete,
|
|
3511
|
-
copyRoomId: (roomId) => this.copyRoomIdTask.perform(roomId),
|
|
3512
|
-
getCopiedRoomId: () => this.copiedRoomId
|
|
3513
|
-
};
|
|
3514
|
-
}
|
|
3515
|
-
copyRoomIdTask = buildTask(() => ({
|
|
3516
|
-
context: this,
|
|
3517
|
-
generator: function* (roomId) {
|
|
3518
|
-
yield navigator.clipboard.writeText(roomId);
|
|
3519
|
-
this.copiedRoomId = roomId;
|
|
3520
|
-
setTimeout(() => {
|
|
3521
|
-
this.copiedRoomId = null;
|
|
3522
|
-
}, 2e3);
|
|
3523
|
-
}
|
|
3524
|
-
}), null, "copyRoomIdTask", "restartable");
|
|
3525
|
-
loadMonaco = buildTask(() => ({
|
|
3526
|
-
context: this,
|
|
3527
|
-
generator: function* () {
|
|
3528
|
-
this.maybeMonacoSDK = yield this.monacoService.getMonacoContext();
|
|
3529
|
-
}
|
|
3530
|
-
}), null, "loadMonaco", "restartable");
|
|
3531
|
-
get monacoSDK() {
|
|
3532
|
-
if (this.maybeMonacoSDK) return this.maybeMonacoSDK;
|
|
3533
|
-
throw new Error(`cannot use monaco SDK before it has loaded`);
|
|
3534
|
-
}
|
|
3535
|
-
get isReady() {
|
|
3536
|
-
return Boolean(this.matrixService.currentRoomId && this.maybeMonacoSDK && !this.aiAssistantPanelService.loadingRooms && this.aiAssistantPanelService.isCreateRoomIdle);
|
|
3537
|
-
}
|
|
3538
|
-
};
|
|
3539
|
-
//#endregion
|
|
3540
|
-
export { auto_attached_card_exports as _, ClickOutsideModifier as a, PillMenu as c, AiAssistantMessage as d, FocusPill as f, AiAssistantActionBar as g, IconComponent$1 as h, component as i, consume_context_default as l, AiAssistantAttachmentPicker as m, ai_assist_icon_default as n, ai_assist_icon_2x_default as o, AiAssistantChatInput as p, RoomMessage as r, AiAssistantSkillMenu as s, AiAssistantPanel as t, AiAssistantConversation as u };
|