@vellumai/web 0.11.10 → 0.11.11-staging.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{a2a-invite-CXZCA0Zh.js → a2a-invite-CPJzZFxs.js} +1 -1
- package/dist/assets/{about-page-DiyUJjGf.js → about-page-CUgJHA5B.js} +1 -1
- package/dist/assets/{account-page-CJWUeKni.js → account-page-BcaCcrQ5.js} +1 -1
- package/dist/assets/{account-shell-BF0wq3dL.js → account-shell-BwMiS5eS.js} +1 -1
- package/dist/assets/{acp-run-detail-panel-rEbi1ucP.js → acp-run-detail-panel-CDEvMuZN.js} +4 -4
- package/dist/assets/{activity-redirect-page-Bqoawew6.js → activity-redirect-page-B9V2rwAj.js} +1 -1
- package/dist/assets/activity-steps-panel-_2nO2hLt.js +1 -0
- package/dist/assets/{add-credits-modal-0MXreRar.js → add-credits-modal-usx1QEZe.js} +1 -1
- package/dist/assets/ai-page-C7qm-6y6.js +1 -0
- package/dist/assets/{android-billing-handoff-Do0Z_tWL.js → android-billing-handoff-BUTt2d09.js} +1 -1
- package/dist/assets/{api-key-screen-DHqMahec.js → api-key-screen-GaslyZp0.js} +1 -1
- package/dist/assets/{app-info-DmJ1IJBZ.js → app-info-Cvzn3GZD.js} +1 -1
- package/dist/assets/archive-redirect-page-DOI43TQ_.js +1 -0
- package/dist/assets/{assistant-status-panel-gPe4jn29.js → assistant-status-panel-D3sHpMqJ.js} +1 -1
- package/dist/assets/{auth-welcome-screen-CroiP_sh.js → auth-welcome-screen-eAxwy9B6.js} +1 -1
- package/dist/assets/avatar-random-DFtXSSLR.js +2 -0
- package/dist/assets/{await-org-header-settled-CYg9juTz.js → await-org-header-settled-DjsOMI_o.js} +1 -1
- package/dist/assets/background-task-detail-panel-4Ef72q_P.js +1 -0
- package/dist/assets/billing-page-DJkh2mqp.js +3 -0
- package/dist/assets/{billing-redirect-page-piXEk2bD.js → billing-redirect-page-lFBbRbZL.js} +1 -1
- package/dist/assets/{bookmarks-page-ixMKQPzN.js → bookmarks-page-DhLDUMVZ.js} +1 -1
- package/dist/assets/{bundle-confirm-page-BZfmArZf.js → bundle-confirm-page-CY71zLY_.js} +1 -1
- package/dist/assets/channel-transcript-panel-DlTl_rkq.js +1 -0
- package/dist/assets/channels-page-route-DOpfCHvn.js +1 -0
- package/dist/assets/{chat-BbBv19qz.js → chat-BoSCrBEN.js} +2 -2
- package/dist/assets/chat-Crh-IQP2.js +3 -0
- package/dist/assets/chat-DCiQjC79.js +3 -0
- package/dist/assets/{chat-CXKEPjVV.js → chat-DnEnxQY3.js} +1 -1
- package/dist/assets/{checkout-continuation--Gp9g8Cs.js → checkout-continuation-D7ie6AMf.js} +1 -1
- package/dist/assets/{checkout-page-Dt_x1-Ak.js → checkout-page-ClaHnCdb.js} +1 -1
- package/dist/assets/checkout-return-target-B92h_ifa.js +1 -0
- package/dist/assets/{command-palette-BYjwAuJQ.js → command-palette-rT1QjMrN.js} +1 -1
- package/dist/assets/{command-palette-window-page-KNdnCkz_.js → command-palette-window-page-CNa7s1pC.js} +1 -1
- package/dist/assets/common-B5y4elXG.js +1 -0
- package/dist/assets/common-BVmW4pRb.js +1 -0
- package/dist/assets/common-CvN2RPRt.js +1 -0
- package/dist/assets/common-HL1rpLx4.js +1 -0
- package/dist/assets/{community-page-CGeHYhxR.js → community-page-DAPfsIVB.js} +1 -1
- package/dist/assets/{companion-accent-DwBPqfnb.js → companion-accent-9aR-oHNo.js} +1 -1
- package/dist/assets/{companion-layout-Bv3xdQBy.js → companion-layout-9XtWH_Tw.js} +1 -1
- package/dist/assets/companion-surface-page-BlYhCYln.js +1 -0
- package/dist/assets/companion-watch-frame-page-CRGJ7b8J.js +1 -0
- package/dist/assets/{connect-page-DvDO8pYQ.js → connect-page-Clwv42O4.js} +1 -1
- package/dist/assets/{consent-controls-Cqi-XchY.js → consent-controls-DdAItfXQ.js} +1 -1
- package/dist/assets/contacts-gateway-CLvFrx7d.js +1 -0
- package/dist/assets/contacts-page-route-DHYZ5j7J.js +1 -0
- package/dist/assets/{credential-entry-page-DVLlpzsQ.js → credential-entry-page-Cpjr7gQ3.js} +1 -1
- package/dist/assets/credentials-page-BRXmYzjm.js +1 -0
- package/dist/assets/{csv-preview-ClM4J2DW.js → csv-preview-CawPvbK-.js} +1 -1
- package/dist/assets/danger-zone-redirect-page-DwAD4_1o.js +1 -0
- package/dist/assets/debug-page-DiWN66wZ.js +4 -0
- package/dist/assets/deploy-dialogs-BGfJhXfR.js +1 -0
- package/dist/assets/{detail-card-DozMITtn.js → detail-card-jvRtVqYP.js} +1 -1
- package/dist/assets/{detail-panel-stop-button-DFPBKjBo.js → detail-panel-stop-button-uyJ8115k.js} +1 -1
- package/dist/assets/{detail-primitives-0Z051SZJ.js → detail-primitives-CbjbhFKa.js} +1 -1
- package/dist/assets/developer-page-DgE9QGx1.js +1 -0
- package/dist/assets/devices-redirect-page-CI2rhp5W.js +1 -0
- package/dist/assets/{dictation-overlay-page-Bocg7l5v.js → dictation-overlay-page-C777jSds.js} +1 -1
- package/dist/assets/{document-viewer-page-C7s8-yWd.js → document-viewer-page-CHoCEvLq.js} +1 -1
- package/dist/assets/{ellipsis-vertical-D7YDF4in.js → ellipsis-vertical-DADudCz4.js} +1 -1
- package/dist/assets/{emails-page-aS97qZTB.js → emails-page-C-h-hozi.js} +1 -1
- package/dist/assets/environment-store-nW1kS6hK.js +1 -0
- package/dist/assets/esm-BSNOjRx5.js +2 -0
- package/dist/assets/{esm-a0gpEIyX.js → esm-BWVF2Y1c.js} +1 -1
- package/dist/assets/esm-Bf7IIQEA.js +2 -0
- package/dist/assets/esm-CXb-WsoR.js +2 -0
- package/dist/assets/esm-ChxulCpt.js +1 -0
- package/dist/assets/{esm-BhPoSi3M.js → esm-CpxXvY_E.js} +1 -1
- package/dist/assets/esm-DFLqVTHx.js +2 -0
- package/dist/assets/esm-ZSI4p3fg.js +2 -0
- package/dist/assets/{esm-ClRq7QTb.js → esm-ymiNYWzN.js} +2 -2
- package/dist/assets/{file-editor-d-VpdSmC.js → file-editor-BfyaAZHZ.js} +1 -1
- package/dist/assets/{folder-open-DbnJZzcO.js → folder-open-BDPMS2Bk.js} +1 -1
- package/dist/assets/general-page-CL9dpzI_.js +2 -0
- package/dist/assets/hatching-screen-sYDtxm21.js +1 -0
- package/dist/assets/home-CRUn8Yw4.js +1 -0
- package/dist/assets/home-D2OzWyoc.js +1 -0
- package/dist/assets/home-DGDzIcQo.js +1 -0
- package/dist/assets/home-DT3YtecW.js +1 -0
- package/dist/assets/{hosting-screen-Cvd_lgtV.js → hosting-screen-BRPgiVIq.js} +1 -1
- package/dist/assets/{icons-B-6TfGtd.js → icons-J6Mg9wGk.js} +1 -1
- package/dist/assets/identity-page-route-89gXMGFI.js +7 -0
- package/dist/assets/index-DQDnf_eu.js +378 -0
- package/dist/assets/index-Z3rcCmYR.css +2 -0
- package/dist/assets/inspect-page-DSmAtTkm.js +9 -0
- package/dist/assets/integrations-page-C5CQyQ2F.js +1 -0
- package/dist/assets/{intelligence-layout-BHPtC2az.js → intelligence-layout-DlQRvWhG.js} +1 -1
- package/dist/assets/keyboard-shortcuts-redirect-page-DkgJw4U8.js +1 -0
- package/dist/assets/latest-assistant-text-BpCDgrnK.js +24 -0
- package/dist/assets/{library-detail-page-0dxGGatK.js → library-detail-page-DfD1DmsU.js} +1 -1
- package/dist/assets/{library-page-CN0wcNRe.js → library-page-D7eThUaQ.js} +1 -1
- package/dist/assets/login-page-lJ-THKjW.js +1 -0
- package/dist/assets/logout-page-V27m2opg.js +1 -0
- package/dist/assets/{logs-layout-BtCoT0Cv.js → logs-layout-Dl102jGT.js} +1 -1
- package/dist/assets/markdown-preview-_ypjjQKw.js +1 -0
- package/dist/assets/{media-preview-DvwMMiAb.js → media-preview-pouFBxHv.js} +1 -1
- package/dist/assets/memory-page-route-Di4niZaj.js +2 -0
- package/dist/assets/{memory-router-playground-page-knM-79pF.js → memory-router-playground-page-D6sjHog2.js} +1 -1
- package/dist/assets/{message-files-panel-CoABbiHA.js → message-files-panel-hal2l0SJ.js} +1 -1
- package/dist/assets/{metric-card-tzSXowqX.js → metric-card-Tz73HQz6.js} +1 -1
- package/dist/assets/{notifications-page-iwCiEsvG.js → notifications-page-BlOP5AuA.js} +1 -1
- package/dist/assets/{oauth-complete-page-BSNj9OfZ.js → oauth-complete-page-D4X9OFVl.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-C5tlMQzH.js → oauth-popup-complete-page-BoC1RRIS.js} +2 -2
- package/dist/assets/onboarding-By5--dgc.js +1 -0
- package/dist/assets/onboarding-CyghSDei.js +1 -0
- package/dist/assets/onboarding-DURrVZHW.js +1 -0
- package/dist/assets/onboarding-DpRYpuMJ.js +1 -0
- package/dist/assets/{page-shell-yrQdXH7t.js → page-shell-fm1YwclX.js} +1 -1
- package/dist/assets/{pairing-page-CL8D36Jw.js → pairing-page-B-cX97r5.js} +1 -1
- package/dist/assets/password-reset-page-BmXGE4Na.js +1 -0
- package/dist/assets/pdf-file-preview-vXIxE_y3.js +1 -0
- package/dist/assets/{peeking-eyes-CR9he4vp.js → peeking-eyes-Cd_vM7n7.js} +1 -1
- package/dist/assets/personality-page-0hKUbJYP.js +1 -0
- package/dist/assets/personality-page-CAPkUFND.js +1 -0
- package/dist/assets/personality-sliders-CPmlmj63.js +1 -0
- package/dist/assets/plans-page-BSCdsq-m.js +1 -0
- package/dist/assets/{platform-loopback-page-BJQB1fxq.js → platform-loopback-page-B8sQLDy-.js} +1 -1
- package/dist/assets/{plugin-detail-page-DbOSNUlU.js → plugin-detail-page-BWB0zWzR.js} +1 -1
- package/dist/assets/plugins-page-CRXxGgTy.js +1 -0
- package/dist/assets/{preview-error-CWZXjhgJ.js → preview-error-IRU4n6NE.js} +1 -1
- package/dist/assets/privacy-page-Dsiwhz7F.js +1 -0
- package/dist/assets/privacy-screen-CIYrwdw1.js +1 -0
- package/dist/assets/{provider-callback-page-BiJRbo2j.js → provider-callback-page-CiOyEu1I.js} +1 -1
- package/dist/assets/{provider-key-e7bkE4FW.js → provider-key-DVNz158b.js} +1 -1
- package/dist/assets/{provider-signup-page-BHcqfJkj.js → provider-signup-page-CaBHAaVE.js} +1 -1
- package/dist/assets/{provisioning-targets-BudKfChL.js → provisioning-targets-B4BHvnEd.js} +1 -1
- package/dist/assets/{quick-input-page-CtnR_stl.js → quick-input-page-Ckb7xAZH.js} +1 -1
- package/dist/assets/{rehype-katex-Byll-Mky.js → rehype-katex-BdAeiamK.js} +1 -1
- package/dist/assets/{repeat-AwziNvx5.js → repeat-CCwj4O1J.js} +1 -1
- package/dist/assets/{research-mock-page-CcU6Ca5m.js → research-mock-page-BSETvRjx.js} +1 -1
- package/dist/assets/research-onboarding-route-BuYRtQSe.js +50 -0
- package/dist/assets/review-terms-screen-DRk06Myz.js +1 -0
- package/dist/assets/{schedules-CtfOJ78L.js → schedules-BQNFqct9.js} +1 -1
- package/dist/assets/{schedules-PMAnmP3b.js → schedules-BYBhZ7mO.js} +1 -1
- package/dist/assets/{schedules-DaEQbLMm.js → schedules-CDvLIWKh.js} +1 -1
- package/dist/assets/schedules-D3HD8p8g.js +1 -0
- package/dist/assets/{schedules-C0VutBSw.js → schedules-WC2eLrIb.js} +1 -1
- package/dist/assets/schedules-page-nTwYXzhR.js +1 -0
- package/dist/assets/security-redirect-page-DVniPka0.js +1 -0
- package/dist/assets/select-assistant-screen-CmmN8Am2.js +1 -0
- package/dist/assets/{self-hosted-servers-X73OsSz4.js → self-hosted-servers-wpZr05pq.js} +1 -1
- package/dist/assets/{service-form-controls-Cn7xIKry.js → service-form-controls-8lk3HI-d.js} +1 -1
- package/dist/assets/{setting-row-CwEW1k3A.js → setting-row-BcOgBLaR.js} +1 -1
- package/dist/assets/settings-B6wO0t8B.js +3 -0
- package/dist/assets/settings-DVK5FRAh.js +3 -0
- package/dist/assets/settings-DgmDMlOQ.js +3 -0
- package/dist/assets/settings-divider-VgdU-pfK.js +1 -0
- package/dist/assets/settings-jYUDijAh.js +3 -0
- package/dist/assets/settings-layout-BqN4nHEa.js +1 -0
- package/dist/assets/share-feedback-modal-C7IT18K9.js +2 -0
- package/dist/assets/{sidebar-tree-ppFGlSW4.js → sidebar-tree-DpNEOrfj.js} +1 -1
- package/dist/assets/{signup-page-CBFu4Phx.js → signup-page-DdkYOX7Y.js} +1 -1
- package/dist/assets/{signup-shell-C9bkpRpP.js → signup-shell-D8C8x6jq.js} +1 -1
- package/dist/assets/skill-detail-page-DVumQlEN.js +2 -0
- package/dist/assets/skill-detail-panel-CT-jljvb.js +1 -0
- package/dist/assets/{skill-removal-dialog-Dmej1bap.js → skill-removal-dialog-Dx8GKlpI.js} +1 -1
- package/dist/assets/skills-page-CHJHSVj0.js +1 -0
- package/dist/assets/{sounds-page-BqQ6POCA.js → sounds-page-BGhmO08R.js} +1 -1
- package/dist/assets/{start-screen-ClrAUbI0.js → start-screen-BkY8mGko.js} +1 -1
- package/dist/assets/{stt-language-picker-modal-CZO7JoYT.js → stt-language-picker-modal-CGKbJcy9.js} +1 -1
- package/dist/assets/subagent-detail-panel-beWG69Hl.js +1 -0
- package/dist/assets/superpowers-page-HyQcWkSI.js +1 -0
- package/dist/assets/{system-events-page-Bm5hG4ru.js → system-events-page-DfZuXZ8o.js} +1 -1
- package/dist/assets/system-events-redirect-page-CQBT1sTs.js +1 -0
- package/dist/assets/{text-preview-BKJ1Aeao.js → text-preview-D0ClSe-D.js} +1 -1
- package/dist/assets/{theme-stage-page-DlRKsOdI.js → theme-stage-page-B_kyzu5g.js} +1 -1
- package/dist/assets/{tiptap-document-editor-B-vV6rr1.js → tiptap-document-editor-Cvg4m3Jb.js} +2 -2
- package/dist/assets/{tool-detail-panel-uczeeElt.js → tool-detail-panel-C1JtPDNo.js} +5 -5
- package/dist/assets/{trait-cycle-row-0CXwkqPS.js → trait-cycle-row-B1gzHNaP.js} +1 -1
- package/dist/assets/upgrade-cancel-page-B_ZzvB1P.js +1 -0
- package/dist/assets/{upgrade-success-page-CbbRpoIM.js → upgrade-success-page-BiiEqKUl.js} +1 -1
- package/dist/assets/usage-redirect-page-Cq9-83DU.js +1 -0
- package/dist/assets/use-assistant-identity-details-B8t0PWAY.js +1 -0
- package/dist/assets/use-checkout-dismiss-refresh-qFgFbDRu.js +1 -0
- package/dist/assets/{use-edge-swipe-back-DONCpBgK.js → use-edge-swipe-back-wmpbfcPH.js} +2 -2
- package/dist/assets/{use-hotkey-recorder-DKlT-BSf.js → use-hotkey-recorder-rzbXg-FL.js} +1 -1
- package/dist/assets/use-invite-link-dialog-ucTozPp8.js +1 -0
- package/dist/assets/{use-platform-assistant-id-DxHYaWx7.js → use-platform-assistant-id-B-om4AXx.js} +1 -1
- package/dist/assets/use-return-to-short-circuit-Czr04IAg.js +1 -0
- package/dist/assets/{use-side-list-room-CKAXuhLb.js → use-side-list-room-TTk8JAoZ.js} +1 -1
- package/dist/assets/{use-skill-actions-weVkg8kB.js → use-skill-actions-Bbt1hFZW.js} +1 -1
- package/dist/assets/{use-skill-detail-files-B6B6qn4A.js → use-skill-detail-files-BW-1Qkny.js} +1 -1
- package/dist/assets/use-supports-credentials-settings-ijBVt33y.js +1 -0
- package/dist/assets/use-transcript-message-by-id-CcDd00RP.js +1 -0
- package/dist/assets/{vendor-CCI2T82b.js → vendor-BHZEElF1.js} +2 -2
- package/dist/assets/voice-page-XXaolhMB.js +1 -0
- package/dist/assets/wake-detail-panel-BSihfogz.js +1 -0
- package/dist/assets/{weather-forecast-display-CuijMBMn.js → weather-forecast-display-B9yYsjMo.js} +1 -1
- package/dist/assets/{web-eI0P3yE6.js → web-B2_caxFX.js} +1 -1
- package/dist/assets/{web-EwBZl1wu.js → web-BOrJoIOM.js} +1 -1
- package/dist/assets/{web-BEoX04Jw.js → web-BrEN7aux.js} +1 -1
- package/dist/assets/{web-UubwrDv3.js → web-C-o9MWuw.js} +1 -1
- package/dist/assets/{web-DFZ_YZd_.js → web-CMnVoOAU.js} +1 -1
- package/dist/assets/{web-CoxWKp0K.js → web-CPpYjuK8.js} +1 -1
- package/dist/assets/{web-rdfhOXRa.js → web-D2Td5VLb.js} +1 -1
- package/dist/assets/{web-WkD7VOGO.js → web-MWgzbds5.js} +1 -1
- package/dist/assets/{web-B3en8Rn5.js → web-POLVz5YQ.js} +1 -1
- package/dist/assets/welcome-screen-B5Lyxn3g.js +1 -0
- package/dist/assets/{workflow-detail-panel-CjgIzQ49.js → workflow-detail-panel-Bw9m95uu.js} +1 -1
- package/dist/assets/workspace-page-BVGPYJ7s.js +1 -0
- package/dist/images/integrations/ATTRIBUTION.md +7 -1
- package/dist/images/integrations/stripe-link.svg +1 -0
- package/dist/index.html +4 -4
- package/dist/skills/stripe-app-setup/assets/icon.svg +1 -1
- package/dist/skills/stripe-link-wallet/assets/icon.svg +1 -1
- package/package.json +1 -1
- package/dist/assets/activity-steps-panel-BEVnG3V-.js +0 -1
- package/dist/assets/ai-page-CiAqQ6Bt.js +0 -1
- package/dist/assets/archive-redirect-page-BHo8cKBO.js +0 -1
- package/dist/assets/avatar-random-B3s-p6ri.js +0 -2
- package/dist/assets/background-task-detail-panel-viJcb3cl.js +0 -1
- package/dist/assets/billing-page-DK2GIN6k.js +0 -3
- package/dist/assets/channel-transcript-panel-CjU1kHAM.js +0 -1
- package/dist/assets/channels-page-route-TMKiofYF.js +0 -1
- package/dist/assets/chat-BY2HhBFw.js +0 -3
- package/dist/assets/chat-D7KieOMp.js +0 -3
- package/dist/assets/checkout-return-target-DgcrCyAx.js +0 -1
- package/dist/assets/common-BPztxW3Y.js +0 -1
- package/dist/assets/common-BUtR7wv2.js +0 -1
- package/dist/assets/common-CbFrJQkH.js +0 -1
- package/dist/assets/common-Cl4fl5fm.js +0 -1
- package/dist/assets/companion-surface-page-DVqRvVT7.js +0 -1
- package/dist/assets/companion-watch-frame-page-Dmj0BZLk.js +0 -1
- package/dist/assets/contacts-gateway-BoQ3VEpG.js +0 -1
- package/dist/assets/contacts-page-route-dMHiwIhE.js +0 -1
- package/dist/assets/credentials-page-DGuGRbME.js +0 -1
- package/dist/assets/danger-zone-redirect-page-QSBD8j9D.js +0 -1
- package/dist/assets/debug-page-BNLV56hO.js +0 -4
- package/dist/assets/deploy-dialogs-B5rrR-6M.js +0 -1
- package/dist/assets/developer-page-bqyYnvvf.js +0 -1
- package/dist/assets/devices-redirect-page-D7XxyAb6.js +0 -1
- package/dist/assets/environment-store-Cwp_aQVg.js +0 -1
- package/dist/assets/esm-BNAZWYPG.js +0 -2
- package/dist/assets/esm-C2CZjfig.js +0 -2
- package/dist/assets/esm-C66pb4Yp.js +0 -2
- package/dist/assets/esm-CblTp9Ve.js +0 -2
- package/dist/assets/esm-DP3PASER.js +0 -1
- package/dist/assets/esm-Egdl0RD-.js +0 -2
- package/dist/assets/general-page-Bpcb3cOw.js +0 -2
- package/dist/assets/hatching-screen-BqKoH9nP.js +0 -1
- package/dist/assets/home-C32sLT0d.js +0 -1
- package/dist/assets/home-D405qdeA.js +0 -1
- package/dist/assets/home-DFtnBWbS.js +0 -1
- package/dist/assets/home-uCy8kFT4.js +0 -1
- package/dist/assets/identity-page-route-Be9kkJ6U.js +0 -7
- package/dist/assets/index-BHBLeC80.js +0 -373
- package/dist/assets/index-D5tXP3pV.css +0 -2
- package/dist/assets/inspect-page-UYu_6yuD.js +0 -9
- package/dist/assets/integrations-page-4nGzHdaB.js +0 -1
- package/dist/assets/keyboard-shortcuts-redirect-page-HZbAKXV3.js +0 -1
- package/dist/assets/latest-assistant-text-BVDHPDcj.js +0 -24
- package/dist/assets/login-page-Ce0yHHIY.js +0 -1
- package/dist/assets/logout-page-HAgKDdSg.js +0 -1
- package/dist/assets/markdown-preview-oANTtJ4h.js +0 -1
- package/dist/assets/memory-page-route-Bafhl3aE.js +0 -2
- package/dist/assets/onboarding-BPTfs_sw.js +0 -1
- package/dist/assets/onboarding-C7OPvVK5.js +0 -1
- package/dist/assets/onboarding-N4S8AW6k.js +0 -1
- package/dist/assets/onboarding-USgRFwiW.js +0 -1
- package/dist/assets/password-reset-page-BP0tU3JU.js +0 -1
- package/dist/assets/pdf-file-preview-DotetIoy.js +0 -1
- package/dist/assets/personality-page-BzN3CB4G.js +0 -1
- package/dist/assets/plans-page-BDO6hVar.js +0 -1
- package/dist/assets/plugins-page-CrmooYb6.js +0 -1
- package/dist/assets/privacy-page-DTg59h01.js +0 -1
- package/dist/assets/privacy-screen-CAuKxlCT.js +0 -1
- package/dist/assets/research-onboarding-route-C_1EYWlc.js +0 -50
- package/dist/assets/review-terms-screen-DNEe5COX.js +0 -1
- package/dist/assets/schedules-C6GFTq9e.js +0 -1
- package/dist/assets/schedules-page-DF9d_-hO.js +0 -1
- package/dist/assets/security-redirect-page-fOqpqXhg.js +0 -1
- package/dist/assets/select-assistant-screen-7s__H50j.js +0 -1
- package/dist/assets/settings--jCGbMu6.js +0 -3
- package/dist/assets/settings-3vxhzYeD.js +0 -3
- package/dist/assets/settings-B-KoDbyO.js +0 -3
- package/dist/assets/settings-DwOrI3PD.js +0 -3
- package/dist/assets/settings-divider-DvaVqZSv.js +0 -1
- package/dist/assets/settings-layout-DKQW650m.js +0 -1
- package/dist/assets/share-feedback-modal-CXO1WiLR.js +0 -2
- package/dist/assets/skill-detail-page-C34NDUXJ.js +0 -2
- package/dist/assets/skill-detail-panel-BFyWuPsn.js +0 -1
- package/dist/assets/skills-page-Cf_hKy9r.js +0 -1
- package/dist/assets/subagent-detail-panel-Cl9ImrOJ.js +0 -1
- package/dist/assets/superpowers-page-D1k1MEVI.js +0 -1
- package/dist/assets/system-events-redirect-page-B74O6yIF.js +0 -1
- package/dist/assets/upgrade-cancel-page-DonPXETN.js +0 -1
- package/dist/assets/usage-redirect-page-D9ARkbO8.js +0 -1
- package/dist/assets/use-assistant-identity-details-BCrYYzla.js +0 -1
- package/dist/assets/use-checkout-dismiss-refresh--5bkiBrA.js +0 -1
- package/dist/assets/use-invite-link-dialog-DBeao10u.js +0 -1
- package/dist/assets/use-return-to-short-circuit-_5KJP58I.js +0 -1
- package/dist/assets/use-supports-credentials-settings-CRJVJGGZ.js +0 -1
- package/dist/assets/use-transcript-message-by-id-DKwkoAvU.js +0 -1
- package/dist/assets/voice-page-ESLvI7Wk.js +0 -1
- package/dist/assets/welcome-screen-BKhi16Mk.js +0 -1
- package/dist/assets/workspace-page-BVZIUjC3.js +0 -1
- package/dist/images/integrations/stripe.svg +0 -1
- /package/dist/assets/{account-FKgqRJu9.js → account-B1tdnuHu.js} +0 -0
- /package/dist/assets/{account-DgnbnECc.js → account-BpjF1FcL.js} +0 -0
- /package/dist/assets/{account-ip20tetF.js → account-CDYIOEop.js} +0 -0
- /package/dist/assets/{account-BA5jqDj6.js → account-CMHxxodV.js} +0 -0
- /package/dist/assets/{app-types-0Zm-1JhZ.js → app-types-Cdaoyk68.js} +0 -0
- /package/dist/assets/{build.umd-CVBQeTU4.js → build.umd-D0fYRXes.js} +0 -0
- /package/dist/assets/{channels--lv8FGdf.js → channels-CKDv8opG.js} +0 -0
- /package/dist/assets/{channels-v0C60cYP.js → channels-CgsqO0aj.js} +0 -0
- /package/dist/assets/{channels-ClWUJtCx.js → channels-DQz8Bwtu.js} +0 -0
- /package/dist/assets/{channels-B9icBql9.js → channels-NDoGKGX8.js} +0 -0
- /package/dist/assets/{contacts-BQ94fuUV.js → contacts-Bh_MYxSk.js} +0 -0
- /package/dist/assets/{contacts-Cf8Z8Ypm.js → contacts-CInkR3JS.js} +0 -0
- /package/dist/assets/{contacts-CoAmmYoi.js → contacts-D86MChD9.js} +0 -0
- /package/dist/assets/{contacts-COqsemVO.js → contacts-h-w_hSzp.js} +0 -0
- /package/dist/assets/{credential-requests-WG2Ly11i.js → credential-requests-BjZSWf_0.js} +0 -0
- /package/dist/assets/{credential-requests-BfzszdNh.js → credential-requests-C7JqReYE.js} +0 -0
- /package/dist/assets/{credential-requests-D-BHmCso.js → credential-requests-D6ig9X8D.js} +0 -0
- /package/dist/assets/{credential-requests-72ffRzBF.js → credential-requests-ViHiGkgf.js} +0 -0
- /package/dist/assets/{definitions-BYsSaA4u.js → definitions-CGRzYJQ-.js} +0 -0
- /package/dist/assets/{definitions-SYFqlqxu.js → definitions-wN3z9PyF.js} +0 -0
- /package/dist/assets/{format-countdown-Dz5XCJoT.js → format-countdown-BXhSZIXr.js} +0 -0
- /package/dist/assets/{intelligence-BY-nSeKR.js → intelligence--rw9sQRV.js} +0 -0
- /package/dist/assets/{intelligence-DE4NupPM.js → intelligence-BLXIZaSt.js} +0 -0
- /package/dist/assets/{intelligence-CP8sCCS_.js → intelligence-DDhSFSo1.js} +0 -0
- /package/dist/assets/{intelligence-C7n9yEoU.js → intelligence-DgmD3m7L.js} +0 -0
- /package/dist/assets/{library-DBkZoDRF.js → library-BzWAFd7u.js} +0 -0
- /package/dist/assets/{library-Bqld62NF.js → library-CWNVp4Fz.js} +0 -0
- /package/dist/assets/{library-Bc86UsJ1.js → library-DUNnEriw.js} +0 -0
- /package/dist/assets/{library-1J6AIi1i.js → library-DcIjNcBu.js} +0 -0
- /package/dist/assets/{link-click-x__AmmnM.js → link-click-Bf0iY5L5.js} +0 -0
- /package/dist/assets/{logs-CCscJ0kU.js → logs-BAtQmLjS.js} +0 -0
- /package/dist/assets/{logs-CLvjJFut.js → logs-CDhr0LNU.js} +0 -0
- /package/dist/assets/{logs-Dj54XwvB.js → logs-DLlqDECg.js} +0 -0
- /package/dist/assets/{logs-t63DIvWv.js → logs-DTS_pAWF.js} +0 -0
- /package/dist/assets/{machine-sizes-Dnm82Ei9.js → machine-sizes-e-LXSVgE.js} +0 -0
- /package/dist/assets/{onboarding-step-layout-DX3nTIye.js → onboarding-step-layout-D72OtlpI.js} +0 -0
- /package/dist/assets/{pdf-BRXrngio.js → pdf-DnylW3Bf.js} +0 -0
- /package/dist/assets/{plugin-attribution-COvprnE5.js → plugin-attribution-B5mnfUh-.js} +0 -0
- /package/dist/assets/{radio-card-nav-wiR_yhVP.js → radio-card-nav-sf2Bg58E.js} +0 -0
- /package/dist/assets/{remote-web-CCHcuH5v.js → remote-web-Ca__kstK.js} +0 -0
- /package/dist/assets/{remote-web-DZcYWPqy.js → remote-web-DgGVyJMy.js} +0 -0
- /package/dist/assets/{remote-web-CX-BHRlQ.js → remote-web-Dk1E9lsm.js} +0 -0
- /package/dist/assets/{remote-web-B_CKO1lH.js → remote-web-TLSNFN0b.js} +0 -0
- /package/dist/assets/{terminal-BEPJM1_8.js → terminal-CkqsVgH3.js} +0 -0
- /package/dist/assets/{terminal-rnCKES6C.js → terminal-D1lTh7E1.js} +0 -0
- /package/dist/assets/{terminal-CDc9oJxM.js → terminal-DY5U7Xsm.js} +0 -0
- /package/dist/assets/{terminal-D6cGApBS.js → terminal-vmjXYXT8.js} +0 -0
- /package/dist/assets/{usage-window-zygj9EXK.js → usage-window-ClIdr8C5.js} +0 -0
- /package/dist/assets/{workspace-DBMxgrue.js → workspace-9m7doAnE.js} +0 -0
- /package/dist/assets/{workspace-Bz-skFgd.js → workspace-CpF9Qh1z.js} +0 -0
- /package/dist/assets/{workspace-DECIUhvv.js → workspace-DbJOdo19.js} +0 -0
- /package/dist/assets/{workspace-BlqPRjdc.js → workspace-uqtGPjFe.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-D5lx1Kpc.js → xterm-addon-fit-Bg_J8owL.js} +0 -0
- /package/dist/assets/{xterm-CnYdVfXB.js → xterm-ihSa4dNU.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Zn as t,er as n,j as r}from"./vendor-BHZEElF1.js";import{b as i,g as a,n as o,r as s,t as c}from"./react-DPM_L_aA.js";import{gn as l,pi as u}from"./icons-J6Mg9wGk.js";import{$ as d,Bu as f,By as p,Cv as m,Cy as h,Hs as g,Hv as _,Lo as v,Mt as y,Ro as b,Sl as x,Sy as S,Tt as C,Vs as w,Vu as T,Wv as E,X as D,Y as O,Yd as ee,Z as te,_a as k,aa as ne,ah as A,ay as re,ba as j,by as ie,cv as ae,ea as oe,ga as se,gy as ce,ha as le,ia as ue,kt as M,ky as N,ma as de,na as fe,pa as pe,ra as me,rp as he,ta as P,uy as F,va as I,wl as L,wt as R,wv as ge,wy as _e,ya as z,zo as ve}from"./index-DQDnf_eu.js";import{t as B}from"./detail-card-jvRtVqYP.js";import{t as ye}from"./stt-language-picker-modal-CGKbJcy9.js";import{t as be}from"./use-hotkey-recorder-rzbXg-FL.js";var V=e(i(),1),H=c();function U({label:e,selected:t,recording:n=!1,onClick:r}){return(0,H.jsxs)(`button`,{type:`button`,onClick:r,className:[`inline-flex items-center gap-2 rounded-lg border px-3 py-1.5 text-body-medium-lighter transition-colors`,`border-[var(--border-subtle)]`,t?`bg-[var(--surface-active)]`:`bg-[var(--surface-lift)] hover:bg-[var(--surface-hover)]`,n?`animate-pulse`:``].filter(Boolean).join(` `),children:[(0,H.jsx)(`span`,{className:[`inline-block h-2.5 w-2.5 rounded-full border`,t?`border-[var(--primary-base)] bg-[var(--primary-base)]`:`border-[var(--border-element)]`].join(` `)}),(0,H.jsx)(`span`,{className:`text-[var(--content-default)]`,children:e})]})}function xe(){let{t:e}=r(`settings`),{available:t,currentCode:n,configuredProviderId:i,selectLanguage:a,selecting:o}=te(O()),[s,c]=(0,V.useState)(!1);return t?(0,H.jsxs)(B,{title:e(`listeningLanguageCard.title`),subtitle:e(`listeningLanguageCard.subtitle`),children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(`span`,{className:`min-w-0 text-body-medium-lighter text-[var(--content-default)]`,children:d(n,i)}),(0,H.jsx)(p,{variant:`outlined`,onClick:()=>c(!0),className:`shrink-0`,children:e(`listeningLanguageCard.change`)})]}),(0,H.jsx)(ye,{open:s,onOpenChange:c,title:e(`listeningLanguageCard.title`),currentCode:n,configuredProviderId:i,selectLanguage:a,selecting:o})]}):null}var W=`flux`;function Se(e){return e===`vellum`}function Ce(e,t){let n=e?.trim().toLowerCase();return!n||n===`multi`||t===void 0?!0:t.includes(n.split(`-`)[0]??n)}function we(){let{t:e}=r(`settings`),i=n(),a=he(),o=O(),[s,c]=(0,V.useState)(!1),{data:l}=t({...f({path:{assistant_id:o}}),enabled:a,staleTime:3e4}),u=l?.services?.stt,{data:d}=t({...ee({path:{assistant_id:o}}),enabled:a,staleTime:5*6e4}),p=u?.roles?.liveVoice?.provider??u?.provider,m=d?.providers?.find(e=>e.id===p),h=m?.modelFamilies?.includes(W)??!1;if(!p||!h)return null;let g=Ce(u?.language,m?.turnDetectionLanguages),_=u?.roles?.liveVoice,v=_?_.model:u?.providers?.[p]?.model,y=v===void 0?Se(p)&&g:v===W,b=async t=>{c(!0);try{let{response:e}=await A({path:{assistant_id:o},body:{services:{stt:{roles:{liveVoice:{provider:p,model:t?W:m?.baseModelFamily}}}}},throwOnError:!1});if(!e?.ok)throw Error(String(e?.status??``));await i.invalidateQueries({queryKey:T({path:{assistant_id:o}})})}catch{ie.error(e(`voicePage.turnDetectionFailed`))}finally{c(!1)}};return(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e(`voicePage.turnDetectionLabel`)}),(0,H.jsx)(`p`,{className:`text-body-small-lighter text-[var(--content-tertiary)]`,children:e(g?`voicePage.turnDetectionDescription`:`voicePage.turnDetectionLanguageUnsupported`)}),(0,H.jsx)(N,{checked:y,disabled:s||!g&&!y,onChange:e=>void b(e),"aria-label":e(`voicePage.turnDetectionLabel`)})]})}var G=`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--content-quiet)]`,K=`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--system-negative-strong)]`,Te=2;function q(e){let t=[];return e.ctrlKey&&t.push(`control`),e.altKey&&t.push(`option`),e.shiftKey&&t.push(`shift`),e.metaKey&&t.push(`command`),j(t)}function Ee(){let{t:e}=r(`settings`),t=le(),n=oe(e=>e.registered)===!1,[i,a]=(0,V.useState)(null),[o,s]=(0,V.useState)(!1),[c,u]=(0,V.useState)([]),[d,f]=(0,V.useState)(!1),m=(0,V.useRef)(null),h=(0,V.useCallback)(async()=>{a((await x())?.inputMonitoring.status??null)},[]);(0,V.useEffect)(()=>{h();let e=setInterval(()=>{h()},2e3);return()=>{clearInterval(e)}},[h]);let g=(0,V.useCallback)(()=>{L(`inputMonitoring`).then(h)},[h]),_=(0,V.useCallback)(e=>{se(e),s(!1),u([]),f(!1),e.kind!==`off`&&g()},[g]),v=(0,V.useCallback)(()=>{s(!0),u([]),f(!1),requestAnimationFrame(()=>{m.current?.focus()})},[]),y=(0,V.useCallback)(()=>{s(!1),u([]),f(!1)},[]),b=(0,V.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){y();return}u(q(e))},[y]),S=(0,V.useCallback)(e=>{if(o&&!(q(e).length>0)){if(c.length>=Te){_({kind:`modifierOnly`,modifiers:c});return}u([]),f(!0)}},[_,c,o]);(0,V.useEffect)(()=>{if(!o)return;let e=e=>{m.current&&!m.current.contains(e.target)&&y()};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[y,o]);let C=de(t),w=t.kind===`modifierOnly`&&!C,T=t.kind!==`off`,E=t.kind===`modifierOnly`&&t.modifiers.includes(`control`)&&t.modifiers.includes(`option`),D=i===`granted`;return(0,H.jsx)(B,{title:e(`voiceKeyCard.title`),subtitle:e(`voiceKeyCard.subtitle`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsxs)(`div`,{ref:m,tabIndex:o?0:-1,onKeyDown:o?b:void 0,onKeyUp:o?S:void 0,className:`flex flex-wrap items-center gap-2 focus:outline-none`,children:[(0,H.jsx)(U,{label:e(`voiceKeyCard.fnLabel`),selected:C,onClick:()=>_(pe)}),o?(0,H.jsx)(U,{label:c.length>0?z(c):e(`voiceKeyCard.recordingPrompt`),selected:!0,recording:!0,onClick:y}):(0,H.jsx)(U,{label:t.kind===`modifierOnly`&&!C?z(t.modifiers):e(`voiceKeyCard.customLabel`),selected:w,onClick:v}),(0,H.jsx)(U,{label:e(`voiceKeyCard.offLabel`),selected:!T,onClick:()=>_({kind:`off`})})]}),d&&(0,H.jsxs)(`div`,{className:G,children:[(0,H.jsx)(l,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voiceKeyCard.customHint`)})]}),T&&i!==null&&!D&&(0,H.jsxs)(`div`,{className:`flex flex-col items-start gap-2 pt-1`,children:[(0,H.jsxs)(`div`,{className:K,children:[(0,H.jsx)(l,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voiceKeyCard.needsInputMonitoring`)})]}),(0,H.jsx)(p,{variant:`outlined`,onClick:g,children:e(`voiceKeyCard.allowInputMonitoring`)})]}),T&&D&&n&&(0,H.jsxs)(`div`,{className:K,children:[(0,H.jsx)(l,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voiceKeyCard.refusedNote`)})]}),C&&(0,H.jsxs)(`div`,{className:G,children:[(0,H.jsx)(l,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voiceKeyCard.fnDictationNote`)})]}),E&&(0,H.jsxs)(`div`,{className:G,children:[(0,H.jsx)(l,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voiceKeyCard.voiceOverNote`)})]})]})})}function De({assistantId:e,open:t,onOpenChange:n}){return(0,H.jsx)(S.Root,{open:t,onOpenChange:n,children:(0,H.jsx)(S.Content,{size:`md`,children:(0,H.jsx)(Oe,{assistantId:e,onDone:()=>n(!1)})})})}function Oe({assistantId:e,onDone:t}){let{t:n}=r(),{available:i,currentModel:a,selectModel:o,selecting:s}=M(e);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(S.Header,{children:[(0,H.jsx)(S.Title,{children:n(`voicePickerModal.title`)}),i&&(0,H.jsx)(S.Description,{children:`Uses Vellum credits, through providers like ElevenLabs and Deepgram.`})]}),(0,H.jsx)(S.Body,{children:(0,H.jsx)(C,{assistantId:e,filterBySource:!0,value:a,onChange:o,autoScrollToSelected:!0})}),(0,H.jsxs)(S.Footer,{className:`items-center justify-between gap-3`,children:[(0,H.jsx)(D,{}),(0,H.jsx)(p,{variant:`primary`,onClick:t,disabled:s,className:`shrink-0`,children:n(`voicePickerModal.done`)})]})]})}function ke(){let{t:e}=r(`settings`),t=O(),{available:n,settled:i,voices:a,currentModel:o}=M(t),s=a.find(e=>e.model===o)??a[0],[c,l]=(0,V.useState)(!1),u=ae.use.name(),d=u?e(`voicePickerCard.titleWithName`,{name:u}):e(`voicePickerCard.title`);return i?n&&s?(0,H.jsxs)(B,{title:d,subtitle:e(`voicePickerCard.creditsNote`),children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(R,{description:s.description,className:`min-w-0 text-body-medium-lighter text-[var(--content-default)]`}),(0,H.jsx)(p,{variant:`outlined`,onClick:()=>l(!0),className:`shrink-0`,children:e(`voicePickerCard.changeButton`)})]}),(0,H.jsx)(De,{assistantId:t,open:c,onOpenChange:l})]}):(0,H.jsx)(B,{title:d,children:(0,H.jsx)(y,{})}):(0,H.jsx)(B,{title:d,children:(0,H.jsx)(re,{as:`span`,role:`status`,"aria-label":e(`voicePickerCard.loadingAria`),className:`block h-9 w-48`})})}var Ae=[{prefKey:`showUserTranscript`,label:`Show the words you say`,description:`Live transcription while you speak.`},{prefKey:`showAssistantTranscript`,label:`Show the words the assistant says`,description:`Text alongside the spoken response.`}],je=`We recommend keeping both off to start. It feels more like a real conversation.`;function Me(){let{t:e}=r();return(0,H.jsx)(`span`,{className:`shrink-0 rounded-full bg-[var(--surface-active)] px-2 py-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:e(`voiceTranscriptToggles.recommendedOff`)})}function Ne({label:e,description:t,showBadge:n,checked:r,onChange:i}){return(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 py-1`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`truncate text-body-medium-lighter text-[var(--content-default)]`,children:e}),n?(0,H.jsx)(Me,{}):null]}),t?(0,H.jsx)(`div`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:t}):null]}),(0,H.jsx)(N,{checked:r,onChange:i,"aria-label":e})]})}function Pe({showDescription:e=!1,showRecommendedBadge:t=!1}){let{t:n}=r(),i=g.use.showUserTranscript(),a=g.use.showAssistantTranscript(),o=g.use.setShowUserTranscript(),s=g.use.setShowAssistantTranscript(),c={showUserTranscript:{checked:i,onChange:o},showAssistantTranscript:{checked:a,onChange:s}},l=(e,t)=>n(e===`showUserTranscript`?`voiceTranscriptToggles.userTranscriptLabel`:`voiceTranscriptToggles.assistantTranscriptLabel`,t),u=(e,t)=>n(e===`showUserTranscript`?`voiceTranscriptToggles.userTranscriptDescription`:`voiceTranscriptToggles.assistantTranscriptDescription`,t);return(0,H.jsx)(H.Fragment,{children:Ae.map(n=>{let r=c[n.prefKey];return(0,H.jsx)(Ne,{label:l(n.prefKey,n.label),description:e?u(n.prefKey,n.description):void 0,showBadge:t,checked:r.checked,onChange:r.onChange},n.prefKey)})})}var J=`text-body-small-default text-[var(--content-tertiary)]`;function Fe(){let[e]=a(),t=e.get(`tab`);return t===`sounds`?(0,H.jsx)(s,{replace:!0,to:m.settings.sounds}):t===`services`?(0,H.jsx)(s,{replace:!0,to:m.settings.ai}):(0,H.jsx)(Ie,{})}function Ie(){let{t:e}=r(`settings`);return(0,H.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[(0,H.jsxs)(Y,{heading:e(`voicePage.sectionOutputHeading`),description:e(`voicePage.sectionOutputDescription`),children:[(0,H.jsx)(ke,{}),(0,H.jsx)(Le,{})]}),(0,H.jsxs)(Y,{heading:e(`voicePage.sectionInputHeading`),description:e(`voicePage.sectionInputDescription`),children:[(0,H.jsx)(Re,{}),(0,H.jsx)(xe,{}),ve()?(0,H.jsx)(Ee,{}):(0,H.jsx)(Ve,{}),(0,H.jsx)(He,{})]}),(0,H.jsx)(Y,{heading:e(`voicePage.sectionCaptionsHeading`),children:(0,H.jsx)(X,{})})]})}function Le(){let{t:e}=r(`settings`),{available:t}=M(O());return t?(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 px-1 text-body-small-lighter text-[var(--content-tertiary)]`,children:[(0,H.jsx)(l,{className:`h-3.5 w-3.5 shrink-0 text-[var(--content-quiet)]`}),(0,H.jsx)(`span`,{children:e(`voicePage.speechServicesBannerPrompt`)}),(0,H.jsxs)(o,{to:`${m.settings.ai}#text-to-speech`,className:`inline-flex items-center gap-1 text-[var(--content-secondary)] underline decoration-[var(--border-element)] underline-offset-2 hover:text-[var(--content-default)]`,children:[e(`voicePage.speechServicesBannerLink`),(0,H.jsx)(u,{className:`h-3 w-3`})]})]}):null}function Y({heading:e,description:t,children:n}){return(0,H.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(`h2`,{className:`text-label-medium-default uppercase tracking-wide text-[var(--content-tertiary)]`,children:e}),t&&(0,H.jsx)(`p`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:t})]}),n]})}function X(){let{t:e}=r(`settings`);return(0,H.jsx)(B,{title:e(`voicePage.captionsTitle`),subtitle:e(`voicePage.captionsSubtitle`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(Pe,{showDescription:!0}),(0,H.jsx)(`p`,{className:`${J} pt-1`,children:e(`voicePage.captionsRecommendation`,je)})]})})}var Z=``;function Re(){let{t:e}=r(`settings`),[t,n]=(0,V.useState)([]),[i,a]=(0,V.useState)(!1),[o,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(()=>b()),u=(0,V.useCallback)(async()=>{if(navigator.mediaDevices?.enumerateDevices)try{let e=(await navigator.mediaDevices.enumerateDevices()).filter(e=>e.kind===`audioinput`);a(e.length>0&&e.every(e=>!e.label)),n(e.filter(e=>e.deviceId!==``&&e.deviceId!==`default`&&e.deviceId!==`communications`)),s(e.length===0||e.some(e=>!!e.label))}catch{n([]),a(!1),s(!1)}},[]),d=(0,V.useCallback)(async()=>{try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});for(let t of e.getTracks())t.stop()}catch{}u()},[u]);(0,V.useEffect)(()=>{u();let e=navigator.mediaDevices;if(!e?.addEventListener)return;let t=()=>void u();return e.addEventListener(`devicechange`,t),()=>e.removeEventListener(`devicechange`,t)},[u]);let f=(0,V.useMemo)(()=>{let n=t.map((t,n)=>({value:t.deviceId,label:t.label||e(`voicePage.microphoneFallbackLabel`,{index:n+1})})),r=c!==Z&&!n.some(e=>e.value===c);return[{value:null,label:e(`voicePage.systemDefault`)},...n,...r?[{value:c,label:e(o?`voicePage.savedMicrophoneNotConnected`:`voicePage.savedMicrophone`)}]:[]]},[t,c,o,e]),m=(0,V.useCallback)(e=>{l(e),e===Z?_(v):E(v,e)},[]),h=c===Z?null:c;return(0,H.jsx)(B,{title:e(`voicePage.microphoneTitle`),subtitle:e(`voicePage.microphoneSubtitle`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,H.jsx)(`div`,{className:`max-w-xs`,children:(0,H.jsx)(F,{options:f,value:h,onChange:m,onSelectNone:()=>m(Z),"aria-label":e(`voicePage.microphoneAriaLabel`)})}),i&&(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(p,{variant:`outlined`,onClick:d,children:e(`voicePage.allowMicrophoneAccess`)}),(0,H.jsx)(`span`,{className:J,children:e(`voicePage.grantMicrophoneAccessHint`)})]})]})})}var ze=new Set([`Control`,`Alt`,`Shift`,`Meta`]),Q=`toggleVoice`,Be=[{label:`Ctrl+Shift`,activator:{kind:`modifierOnly`,modifiers:[`control`,`shift`]}},{label:`Alt`,activator:{kind:`modifierOnly`,modifiers:[`option`]}}];function Ve(){let{t:e}=r(`settings`),t=ge(),[n,i]=(0,V.useState)(()=>me()),[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)([]),[u,d]=(0,V.useState)(!1),f=(0,V.useRef)(null),p=(0,V.useMemo)(()=>{let e=fe();return[{label:k(e),activator:e}]},[]),m=n.kind!==`off`,h=(0,V.useCallback)(e=>{i(e),ne(e),o(!1),c([]),d(!1)},[]),g=be({onBound:()=>h({kind:`off`})}),_=g.catalog.find(e=>e.key===Q)?.accelerator??``,v=g.recordingKey===Q,y=ue()?Be:[],b=(0,V.useCallback)(e=>{h(e),g.removeHotkey(Q)},[g,h]),x=(0,V.useCallback)(()=>{h({kind:`off`}),g.removeHotkey(Q)},[g,h]),S=(0,V.useCallback)(()=>{o(!0),c([]),d(!1),requestAnimationFrame(()=>{f.current?.focus()})},[]),C=(0,V.useCallback)(()=>{o(!1),c([]),d(!1)},[]),w=(0,V.useCallback)(e=>{let t=[];return e.ctrlKey&&t.push(`control`),e.altKey&&t.push(`option`),e.shiftKey&&t.push(`shift`),e.metaKey&&t.push(`command`),t},[]),T=(0,V.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){C();return}let t=w(e);if(ze.has(e.key)){d(!1),c(j(t));return}if(t.length===0){d(!0);return}h({kind:`key`,label:e.key.length===1?e.key.toUpperCase():e.key,modifiers:j(t)})},[C,w,h]),E=(0,V.useCallback)(e=>{a&&w(e).length===0&&s.length>0&&(c([]),d(!0))},[w,a,s]);(0,V.useEffect)(()=>{if(!a)return;let e=e=>{f.current&&!f.current.contains(e.target)&&C()};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[C,a]);let D=m&&!p.some(e=>I(e.activator,n));return t?(0,H.jsx)(B,{title:e(`voicePage.voiceShortcutTitle`),subtitle:e(`voicePage.voiceShortcutSubtitleDesktop`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[y.map(e=>(0,H.jsx)(U,{label:e.label,selected:I(e.activator,n),onClick:()=>b(e.activator)},e.label)),(0,H.jsx)(U,{label:v?e(`voicePage.recordingPrompt`):_?(0,H.jsx)(ce,{accelerator:_}):e(`voicePage.customKey`),selected:_!==``,recording:v,onClick:v?g.stopRecording:()=>g.startRecording(Q)}),(0,H.jsx)(U,{label:e(`voicePage.offKeyLabel`),selected:n.kind===`off`&&!_&&!v,onClick:x})]}),g.conflict?.key===Q&&(0,H.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,H.jsx)(l,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voicePage.shortcutConflict`,{command:g.conflict.label})})]})]})}):(0,H.jsx)(B,{title:e(`voicePage.voiceShortcutTitle`),subtitle:e(`voicePage.voiceShortcutSubtitle`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,H.jsx)(N,{checked:m,onChange:e=>{h(e?P():{kind:`off`})},label:e(`voicePage.enableVoiceShortcut`)}),m&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(`span`,{className:J,children:e(`voicePage.activationKeyLabel`)}),(0,H.jsxs)(`div`,{ref:f,tabIndex:a?0:-1,onKeyDown:a?T:void 0,onKeyUp:a?E:void 0,className:`flex flex-wrap items-center gap-2 focus:outline-none`,children:[p.map(e=>(0,H.jsx)(U,{label:e.label,selected:I(e.activator,n),onClick:()=>h(e.activator)},e.label)),a?(0,H.jsx)(U,{label:s.length>0?z(s):e(`voicePage.pressShortcut`),selected:!0,recording:!0,onClick:C}):(0,H.jsx)(U,{label:D?k(n):e(`voicePage.customKey`),selected:D,onClick:S})]}),u&&(0,H.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--content-quiet)]`,children:[(0,H.jsx)(l,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voicePage.shortcutChordHint`)})]}),m&&(0,H.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-lighter text-[var(--content-quiet)]`,children:[(0,H.jsx)(l,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:e(`voicePage.focusedTabNote`)})]})]})]})})}function He(){let{t:e}=r(`settings`),t=g.use.pauseBeforeReplyMs(),n=g.use.setPauseBeforeReplyMs(),i=g.use.interruptSensitivity(),a=g.use.setInterruptSensitivity(),o=(0,V.useMemo)(()=>[{value:`low`,label:e(`voicePage.interruptSensitivityLow`)},{value:`medium`,label:e(`voicePage.interruptSensitivityMedium`)},{value:`high`,label:e(`voicePage.interruptSensitivityHigh`)}],[e]),s=t!==null||i!==null;return(0,H.jsx)(B,{title:e(`voicePage.turnTakingTitle`),subtitle:e(`voicePage.turnTakingSubtitle`),children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,H.jsx)(we,{}),(0,H.jsx)($,{label:e(`voicePage.pauseBeforeReplyLabel`),description:e(`voicePage.pauseBeforeReplyDescription`),isDefault:t===null,children:(0,H.jsx)(`div`,{className:`max-w-xs`,children:(0,H.jsx)(h,{value:(t??1200)/1e3,onValueChange:e=>{typeof e==`number`&&n(Math.round(e*1e3))},min:500/1e3,max:w/1e3,step:.1,showValue:!0,formatValue:e=>`${(typeof e==`number`?e:e[0]).toFixed(1)}s`,"aria-label":e(`voicePage.pauseBeforeReplyAriaLabel`)})})}),(0,H.jsx)($,{label:e(`voicePage.interruptSensitivityLabel`),description:e(`voicePage.interruptSensitivityDescription`),isDefault:i===null,children:(0,H.jsx)(`div`,{className:`max-w-xs`,children:(0,H.jsx)(_e,{items:o,value:i??`medium`,onChange:a,ariaLabel:e(`voicePage.interruptSensitivityAriaLabel`)})})}),s&&(0,H.jsx)(`div`,{children:(0,H.jsx)(p,{variant:`outlined`,onClick:()=>{n(null),a(null)},children:e(`voicePage.resetToDefaults`)})})]})})}function $({label:e,description:t,isDefault:n,children:i}){let{t:a}=r(`settings`);return(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e}),n&&(0,H.jsx)(`span`,{className:`shrink-0 rounded-full bg-[var(--surface-active)] px-2 py-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:a(`voicePage.defaultBadge`)})]}),(0,H.jsx)(`p`,{className:J,children:t}),i]})}export{Fe as VoicePage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-BHZEElF1.js";import{t}from"./react-DPM_L_aA.js";import{P as n}from"./icons-J6Mg9wGk.js";import{_ as r,nn as i,tn as a}from"./index-DQDnf_eu.js";var o=t();function s({payload:t,onClose:a}){let{t:s}=e(`chat`),u=i(t.body);return(0,o.jsx)(r,{Glyph:n,title:t.title||s(`wakeDetailPanel.title`),closeLabel:s(`wakeDetailPanel.close`),closeTooltip:s(`wakeDetailPanel.close`),closeVariant:`outlined`,onClose:a,children:(0,o.jsxs)(`dl`,{className:`flex flex-col gap-6`,children:[u.workflow&&(0,o.jsx)(l,{label:s(`wakeDetailPanel.workflow`),children:u.workflow}),u.runStatus&&(0,o.jsx)(l,{label:s(`wakeDetailPanel.runStatus`),children:(0,o.jsx)(`span`,{className:`whitespace-pre-wrap break-words`,children:u.runStatus})}),u.result&&(0,o.jsx)(l,{label:s(`wakeDetailPanel.result`),children:(0,o.jsx)(c,{result:u.result})}),u.rest&&(0,o.jsx)(l,{label:s(`wakeDetailPanel.details`),children:(0,o.jsx)(`span`,{className:`whitespace-pre-wrap break-words`,children:u.rest})}),t.metadata.length>0&&(0,o.jsx)(`div`,{className:`flex flex-col gap-6`,children:t.metadata.map(e=>(0,o.jsx)(l,{label:e.label,children:e.value},e.label))})]})})}function c({result:e}){let t=a(e);return t?(0,o.jsx)(`div`,{className:`flex flex-col gap-4`,children:t.map((e,t)=>(0,o.jsx)(`div`,{className:t>0?`flex flex-col gap-2 border-t border-[var(--border-hover)] pt-4`:`flex flex-col gap-2`,children:e.map(e=>(0,o.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,o.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:e.key}),(0,o.jsx)(`span`,{className:`whitespace-pre-wrap break-words`,children:e.value})]},e.key))},t))}):(0,o.jsx)(`span`,{className:`whitespace-pre-wrap break-words`,children:e})}function l({label:e,children:t}){return(0,o.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,o.jsx)(`dt`,{className:`text-label-medium-default text-[var(--content-tertiary)]`,children:e}),(0,o.jsx)(`dd`,{className:`text-body-medium-default text-[var(--content-default)]`,children:t})]})}export{s as WakeDetailPanel};
|
package/dist/assets/{weather-forecast-display-CuijMBMn.js → weather-forecast-display-B9yYsjMo.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{j as t}from"./vendor-CCI2T82b.js";import{b as n,t as r}from"./react-DPM_L_aA.js";import{At as i,D as a,I as o,Zn as s,dr as c,gr as l,hr as u,mr as d,pr as f,s as p,ur as m}from"./icons-B-6TfGtd.js";import{Bt as h,Lt as g,Rt as _,na as v,zt as y}from"./index-BHBLeC80.js";var b=e(n(),1),x={"sun.max.fill":{icon:a,className:`text-orange-500`},"cloud.sun.fill":{icon:c,className:`text-amber-400`},"moon.fill":{icon:i,className:`text-blue-400`},"cloud.moon.fill":{icon:d,className:`text-blue-400`},"cloud.fill":{icon:m,className:`text-stone-400`},"cloud.rain.fill":{icon:f,className:`text-blue-400`},snowflake:{icon:o,className:`text-blue-300`},"cloud.bolt.fill":{icon:u,className:`text-orange-500`},"cloud.fog.fill":{icon:l,className:`text-stone-400`}},S={sunny:{icon:a,className:`text-orange-500`},clear:{icon:a,className:`text-orange-500`},"partly cloudy":{icon:c,className:`text-amber-400`},"mostly sunny":{icon:c,className:`text-amber-400`},cloudy:{icon:m,className:`text-stone-400`},overcast:{icon:m,className:`text-stone-400`},rainy:{icon:f,className:`text-blue-400`},rain:{icon:f,className:`text-blue-400`},drizzle:{icon:f,className:`text-blue-400`},snow:{icon:o,className:`text-blue-300`},snowy:{icon:o,className:`text-blue-300`},thunderstorm:{icon:u,className:`text-orange-500`},thunder:{icon:u,className:`text-orange-500`},foggy:{icon:l,className:`text-stone-400`},fog:{icon:l,className:`text-stone-400`},mist:{icon:l,className:`text-stone-400`},hazy:{icon:l,className:`text-stone-400`},night:{icon:i,className:`text-blue-400`},"mainly clear":{icon:a,className:`text-orange-500`},"mostly cloudy":{icon:m,className:`text-stone-400`},breezy:{icon:p,className:`text-stone-400`},windy:{icon:p,className:`text-stone-400`},cool:{icon:m,className:`text-stone-400`},warm:{icon:a,className:`text-orange-500`},hot:{icon:a,className:`text-orange-500`},cold:{icon:o,className:`text-blue-300`},"cold snap":{icon:o,className:`text-blue-300`},"warm, mostly sunny":{icon:c,className:`text-amber-400`},"cooler, breezy":{icon:p,className:`text-stone-400`}},C={icon:m,className:`text-stone-400`};function w(e){let t=x[e];if(t)return t;let n=e.toLowerCase(),r=S[n];if(r)return r;for(let[e,t]of Object.entries(S))if(n.includes(e))return t;return C}function T(e){if(typeof e==`string`){let t=e.match(/^(\d+)\s*mph\s*(.*)/i);if(t)return{speed:Number(t[1]),direction:t[2]?.trim()||void 0}}return{}}function E(e){let t;if(typeof e.location==`string`)t=e.location;else{let n=y(e.location);n&&typeof n.name==`string`&&(t=n.name)}if(!t)return null;let n=y(e.current),r=_(n?.temp)??_(e.currentTemp)??_(e.temperature)??_(e.temp),i=_(n?.feelsLike)??_(n?.feels_like)??_(n?.apparentTemperature)??_(e.feelsLike)??_(e.feels_like)??_(e.apparentTemperature),a=h(n?.condition)??h(e.condition),o=_(n?.humidity)??_(e.humidity),s=T(n?.wind??e.wind),c=_(n?.windSpeed)??_(n?.wind_speed)??_(e.windSpeed)??_(e.wind_speed)??s.speed,l=h(n?.windDirection)??h(n?.wind_direction)??h(e.windDirection)??h(e.wind_direction)??s.direction,u=y(e.units),d=h(u?.temperature)??h(n?.unit)??h(e.unit)??`F`,f=h(u?.speed)??h(e.windUnit)??h(e.wind_unit),p=g(e.hourly).map((e,t)=>({id:h(e.id)??String(t),time:h(e.time)??``,icon:h(e.icon)??h(e.condition)??`cloud.fill`,temp:_(e.tempC)??_(e.temp)??_(e.temperature),tempC:_(e.tempC)})),m=g([e.forecast,e.daily,e.days].find(Array.isArray)).map((e,t)=>({id:h(e.id)??String(t),day:h(e.day)??h(e.date),dayLabel:h(e.dayLabel)??h(e.date),icon:h(e.icon)??h(e.condition)??`cloud.fill`,low:_(e.low),high:_(e.high),lowC:_(e.lowC),highC:_(e.highC),precip:_(e.precip)??_(e.precipitation)??_(e.precipitationProbability),condition:h(e.condition)}));return{location:t,currentTemp:r,feelsLike:i,condition:a,humidity:o,windSpeed:c,windDirection:l,windUnit:f,unit:d,hourly:p.length>0?p:void 0,forecast:m.length>0?m:void 0}}function D(e){return e*9/5+32}function O(e){return(e-32)*5/9}function k(e,t,n){if(e===void 0)return null;let r=e;return t&&!n&&(r=O(e)),!t&&n&&(r=D(e)),`${Math.round(r)}`}function A(e,t,n){return e.tempC===void 0?e.temp===void 0?null:k(e.temp,t,n):k(e.tempC,!1,n)}function j(e,t,n){return e.lowC===void 0?k(e.low,t,n):k(e.lowC,!1,n)}function M(e,t,n){return e.highC===void 0?k(e.high,t,n):k(e.highC,!1,n)}var N=r();function P({icon:e,size:t=20}){let{icon:n,className:r}=w(e);return(0,N.jsx)(n,{width:t,height:t,className:r})}function F({useFahrenheit:e,onToggle:n}){let{t:r}=t(`chat`);return(0,N.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border border-[var(--border-element)]`,children:[(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!0),className:v(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-[var(--primary-base)] text-[var(--content-inset)]`:`bg-transparent text-[var(--content-quiet)]`),children:r(`weatherForecastDisplay.fahrenheit`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!1),className:v(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-transparent text-[var(--content-quiet)]`:`bg-[var(--primary-base)] text-[var(--content-inset)]`),children:r(`weatherForecastDisplay.celsius`)})]})}function I({data:e,sourceIsFahrenheit:n,useFahrenheit:r,onToggle:i}){let{t:a}=t(`chat`),o=e.location,c=k(e.currentTemp,n,r),l=k(e.feelsLike,n,r),u=r?`F`:`C`,d=e.forecast?.[0],f=d?M(d,n,r):null,m=d?j(d,n,r):null,h=null;return e.windSpeed!==void 0&&(h=`${Math.round(e.windSpeed)} ${e.windUnit??`mph`}`,e.windDirection&&(h=`${e.windDirection} ${h}`)),(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:o}),c!==null&&(0,N.jsxs)(`div`,{className:`mt-1 text-4xl font-light text-[var(--content-default)]`,children:[c,`°`,u]}),e.condition&&(0,N.jsx)(`div`,{className:`mt-0.5 text-body-small-default text-[var(--content-quiet)]`,children:e.condition})]}),(0,N.jsx)(F,{useFahrenheit:r,onToggle:i})]}),(0,N.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[l!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:a(`weatherForecastDisplay.feelsLike`,{temp:l})}),f!==null&&m!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:a(`weatherForecastDisplay.highLow`,{high:f,low:m})}),h&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(p,{width:12,height:12}),h]}),e.humidity!==void 0&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(s,{width:12,height:12}),e.humidity,`%`]})]})]})}function L({hourly:e,sourceIsFahrenheit:n,useFahrenheit:r}){let{t:i}=t(`chat`);return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex gap-3 overflow-x-auto`,children:e.map((e,t)=>{let a=e.time.toLowerCase()===`now`,o=A(e,n,r);return(0,N.jsxs)(`div`,{className:`flex min-w-[3rem] shrink-0 flex-col items-center gap-1`,children:[(0,N.jsx)(`span`,{className:a?`text-body-small-emphasised text-[var(--content-default)]`:`text-label-medium-default text-[var(--content-quiet)]`,children:a?i(`weatherForecastDisplay.now`):e.time}),(0,N.jsx)(P,{icon:e.icon,size:18}),o!==null&&(0,N.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-default)]`,children:[o,`°`]})]},e.id??t)})})})}function R({forecast:e,currentTemp:t,sourceIsFahrenheit:n,useFahrenheit:r}){let{globalMin:i,globalMax:a}=(0,b.useMemo)(()=>{let t=1/0,n=-1/0;for(let r of e){let e=r.lowC??r.low,i=r.highC??r.high;e!==void 0&&e<t&&(t=e),i!==void 0&&i>n&&(n=i)}return{globalMin:t===1/0?0:t,globalMax:n===-1/0?100:n}},[e]),o=a-i||1;return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map((e,s)=>{let c=e.dayLabel??e.day??`Day ${s+1}`,l=c.toLowerCase()===`today`,u=j(e,n,r),d=M(e,n,r),f=e.precip,p=e.lowC??e.low??i,m=e.highC??e.high??a,h=(p-i)/o*100,g=(m-i)/o*100,_=Math.max(g-h,2),y=null;if(l&&t!==void 0){let r=(e.lowC!==void 0||e.highC!==void 0)&&n?(t-32)*5/9:t;y=m===p?50:(Math.max(p,Math.min(m,r))-p)/(m-p)*100}return(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:v(`w-12 shrink-0 truncate text-body-small-default`,l?`text-[var(--content-default)]`:`text-[var(--content-quiet)]`),children:c}),(0,N.jsxs)(`div`,{className:`flex w-10 shrink-0 items-center justify-center gap-0.5`,children:[(0,N.jsx)(P,{icon:e.icon,size:16}),f!==void 0&&f>0&&(0,N.jsxs)(`span`,{className:`text-label-small-default text-blue-400`,children:[Math.round(f),`%`]})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-faint)]`,children:u===null?`--`:`${u}°`}),(0,N.jsxs)(`div`,{className:`relative h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--border-subtle)]`,children:[(0,N.jsx)(`div`,{className:`absolute top-0 h-full rounded-full bg-[var(--primary-base)]`,style:{left:`${h}%`,width:`${_}%`}}),y!==null&&(0,N.jsx)(`div`,{className:`absolute top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-[var(--aux-white)] bg-[var(--aux-white)] shadow-sm`,style:{left:`${h+y/100*_}%`}})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-default)]`,children:d===null?`--`:`${d}°`})]},e.id??s)})})})}function z({templateData:e,fallback:t}){let n=(0,b.useMemo)(()=>E(e),[e]),r=n?.unit?.toUpperCase()===`F`||n?.unit?.toLowerCase()===`fahrenheit`,[i,a]=(0,b.useState)(null),o=i??r;return!n||n.currentTemp===void 0&&!n.forecast?.length?t??null:(0,N.jsxs)(`div`,{className:`mt-3`,children:[(0,N.jsx)(I,{data:n,sourceIsFahrenheit:r,useFahrenheit:o,onToggle:a}),n.hourly&&n.hourly.length>0&&(0,N.jsx)(L,{hourly:n.hourly,sourceIsFahrenheit:r,useFahrenheit:o}),n.forecast&&n.forecast.length>0&&(0,N.jsx)(R,{forecast:n.forecast,currentTemp:n.currentTemp,sourceIsFahrenheit:r,useFahrenheit:o})]})}export{z as WeatherForecastDisplay};
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{j as t}from"./vendor-BHZEElF1.js";import{b as n,t as r}from"./react-DPM_L_aA.js";import{D as i,I as a,Qn as o,_r as s,dr as c,fr as l,gr as u,hr as d,jt as f,mr as p,s as m}from"./icons-J6Mg9wGk.js";import{Bt as h,Lt as g,Qi as _,Rt as v,zt as y}from"./index-DQDnf_eu.js";var b=e(n(),1),x={"sun.max.fill":{icon:i,className:`text-orange-500`},"cloud.sun.fill":{icon:l,className:`text-amber-400`},"moon.fill":{icon:f,className:`text-blue-400`},"cloud.moon.fill":{icon:d,className:`text-blue-400`},"cloud.fill":{icon:c,className:`text-stone-400`},"cloud.rain.fill":{icon:p,className:`text-blue-400`},snowflake:{icon:a,className:`text-blue-300`},"cloud.bolt.fill":{icon:u,className:`text-orange-500`},"cloud.fog.fill":{icon:s,className:`text-stone-400`}},S={sunny:{icon:i,className:`text-orange-500`},clear:{icon:i,className:`text-orange-500`},"partly cloudy":{icon:l,className:`text-amber-400`},"mostly sunny":{icon:l,className:`text-amber-400`},cloudy:{icon:c,className:`text-stone-400`},overcast:{icon:c,className:`text-stone-400`},rainy:{icon:p,className:`text-blue-400`},rain:{icon:p,className:`text-blue-400`},drizzle:{icon:p,className:`text-blue-400`},snow:{icon:a,className:`text-blue-300`},snowy:{icon:a,className:`text-blue-300`},thunderstorm:{icon:u,className:`text-orange-500`},thunder:{icon:u,className:`text-orange-500`},foggy:{icon:s,className:`text-stone-400`},fog:{icon:s,className:`text-stone-400`},mist:{icon:s,className:`text-stone-400`},hazy:{icon:s,className:`text-stone-400`},night:{icon:f,className:`text-blue-400`},"mainly clear":{icon:i,className:`text-orange-500`},"mostly cloudy":{icon:c,className:`text-stone-400`},breezy:{icon:m,className:`text-stone-400`},windy:{icon:m,className:`text-stone-400`},cool:{icon:c,className:`text-stone-400`},warm:{icon:i,className:`text-orange-500`},hot:{icon:i,className:`text-orange-500`},cold:{icon:a,className:`text-blue-300`},"cold snap":{icon:a,className:`text-blue-300`},"warm, mostly sunny":{icon:l,className:`text-amber-400`},"cooler, breezy":{icon:m,className:`text-stone-400`}},C={icon:c,className:`text-stone-400`};function w(e){let t=x[e];if(t)return t;let n=e.toLowerCase(),r=S[n];if(r)return r;for(let[e,t]of Object.entries(S))if(n.includes(e))return t;return C}function T(e){if(typeof e==`string`){let t=e.match(/^(\d+)\s*mph\s*(.*)/i);if(t)return{speed:Number(t[1]),direction:t[2]?.trim()||void 0}}return{}}function E(e){let t;if(typeof e.location==`string`)t=e.location;else{let n=y(e.location);n&&typeof n.name==`string`&&(t=n.name)}if(!t)return null;let n=y(e.current),r=v(n?.temp)??v(e.currentTemp)??v(e.temperature)??v(e.temp),i=v(n?.feelsLike)??v(n?.feels_like)??v(n?.apparentTemperature)??v(e.feelsLike)??v(e.feels_like)??v(e.apparentTemperature),a=h(n?.condition)??h(e.condition),o=v(n?.humidity)??v(e.humidity),s=T(n?.wind??e.wind),c=v(n?.windSpeed)??v(n?.wind_speed)??v(e.windSpeed)??v(e.wind_speed)??s.speed,l=h(n?.windDirection)??h(n?.wind_direction)??h(e.windDirection)??h(e.wind_direction)??s.direction,u=y(e.units),d=h(u?.temperature)??h(n?.unit)??h(e.unit)??`F`,f=h(u?.speed)??h(e.windUnit)??h(e.wind_unit),p=g(e.hourly).map((e,t)=>({id:h(e.id)??String(t),time:h(e.time)??``,icon:h(e.icon)??h(e.condition)??`cloud.fill`,temp:v(e.tempC)??v(e.temp)??v(e.temperature),tempC:v(e.tempC)})),m=g([e.forecast,e.daily,e.days].find(Array.isArray)).map((e,t)=>({id:h(e.id)??String(t),day:h(e.day)??h(e.date),dayLabel:h(e.dayLabel)??h(e.date),icon:h(e.icon)??h(e.condition)??`cloud.fill`,low:v(e.low),high:v(e.high),lowC:v(e.lowC),highC:v(e.highC),precip:v(e.precip)??v(e.precipitation)??v(e.precipitationProbability),condition:h(e.condition)}));return{location:t,currentTemp:r,feelsLike:i,condition:a,humidity:o,windSpeed:c,windDirection:l,windUnit:f,unit:d,hourly:p.length>0?p:void 0,forecast:m.length>0?m:void 0}}function D(e){return e*9/5+32}function O(e){return(e-32)*5/9}function k(e,t,n){if(e===void 0)return null;let r=e;return t&&!n&&(r=O(e)),!t&&n&&(r=D(e)),`${Math.round(r)}`}function A(e,t,n){return e.tempC===void 0?e.temp===void 0?null:k(e.temp,t,n):k(e.tempC,!1,n)}function j(e,t,n){return e.lowC===void 0?k(e.low,t,n):k(e.lowC,!1,n)}function M(e,t,n){return e.highC===void 0?k(e.high,t,n):k(e.highC,!1,n)}var N=r();function P({icon:e,size:t=20}){let{icon:n,className:r}=w(e);return(0,N.jsx)(n,{width:t,height:t,className:r})}function F({useFahrenheit:e,onToggle:n}){let{t:r}=t(`chat`);return(0,N.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border border-[var(--border-element)]`,children:[(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!0),className:_(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-[var(--primary-base)] text-[var(--content-inset)]`:`bg-transparent text-[var(--content-quiet)]`),children:r(`weatherForecastDisplay.fahrenheit`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!1),className:_(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-transparent text-[var(--content-quiet)]`:`bg-[var(--primary-base)] text-[var(--content-inset)]`),children:r(`weatherForecastDisplay.celsius`)})]})}function I({data:e,sourceIsFahrenheit:n,useFahrenheit:r,onToggle:i}){let{t:a}=t(`chat`),s=e.location,c=k(e.currentTemp,n,r),l=k(e.feelsLike,n,r),u=r?`F`:`C`,d=e.forecast?.[0],f=d?M(d,n,r):null,p=d?j(d,n,r):null,h=null;return e.windSpeed!==void 0&&(h=`${Math.round(e.windSpeed)} ${e.windUnit??`mph`}`,e.windDirection&&(h=`${e.windDirection} ${h}`)),(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:s}),c!==null&&(0,N.jsxs)(`div`,{className:`mt-1 text-4xl font-light text-[var(--content-default)]`,children:[c,`°`,u]}),e.condition&&(0,N.jsx)(`div`,{className:`mt-0.5 text-body-small-default text-[var(--content-quiet)]`,children:e.condition})]}),(0,N.jsx)(F,{useFahrenheit:r,onToggle:i})]}),(0,N.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[l!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:a(`weatherForecastDisplay.feelsLike`,{temp:l})}),f!==null&&p!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:a(`weatherForecastDisplay.highLow`,{high:f,low:p})}),h&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(m,{width:12,height:12}),h]}),e.humidity!==void 0&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(o,{width:12,height:12}),e.humidity,`%`]})]})]})}function L({hourly:e,sourceIsFahrenheit:n,useFahrenheit:r}){let{t:i}=t(`chat`);return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex gap-3 overflow-x-auto`,children:e.map((e,t)=>{let a=e.time.toLowerCase()===`now`,o=A(e,n,r);return(0,N.jsxs)(`div`,{className:`flex min-w-[3rem] shrink-0 flex-col items-center gap-1`,children:[(0,N.jsx)(`span`,{className:a?`text-body-small-emphasised text-[var(--content-default)]`:`text-label-medium-default text-[var(--content-quiet)]`,children:a?i(`weatherForecastDisplay.now`):e.time}),(0,N.jsx)(P,{icon:e.icon,size:18}),o!==null&&(0,N.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-default)]`,children:[o,`°`]})]},e.id??t)})})})}function R({forecast:e,currentTemp:t,sourceIsFahrenheit:n,useFahrenheit:r}){let{globalMin:i,globalMax:a}=(0,b.useMemo)(()=>{let t=1/0,n=-1/0;for(let r of e){let e=r.lowC??r.low,i=r.highC??r.high;e!==void 0&&e<t&&(t=e),i!==void 0&&i>n&&(n=i)}return{globalMin:t===1/0?0:t,globalMax:n===-1/0?100:n}},[e]),o=a-i||1;return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map((e,s)=>{let c=e.dayLabel??e.day??`Day ${s+1}`,l=c.toLowerCase()===`today`,u=j(e,n,r),d=M(e,n,r),f=e.precip,p=e.lowC??e.low??i,m=e.highC??e.high??a,h=(p-i)/o*100,g=(m-i)/o*100,v=Math.max(g-h,2),y=null;if(l&&t!==void 0){let r=(e.lowC!==void 0||e.highC!==void 0)&&n?(t-32)*5/9:t;y=m===p?50:(Math.max(p,Math.min(m,r))-p)/(m-p)*100}return(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:_(`w-12 shrink-0 truncate text-body-small-default`,l?`text-[var(--content-default)]`:`text-[var(--content-quiet)]`),children:c}),(0,N.jsxs)(`div`,{className:`flex w-10 shrink-0 items-center justify-center gap-0.5`,children:[(0,N.jsx)(P,{icon:e.icon,size:16}),f!==void 0&&f>0&&(0,N.jsxs)(`span`,{className:`text-label-small-default text-blue-400`,children:[Math.round(f),`%`]})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-faint)]`,children:u===null?`--`:`${u}°`}),(0,N.jsxs)(`div`,{className:`relative h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--border-subtle)]`,children:[(0,N.jsx)(`div`,{className:`absolute top-0 h-full rounded-full bg-[var(--primary-base)]`,style:{left:`${h}%`,width:`${v}%`}}),y!==null&&(0,N.jsx)(`div`,{className:`absolute top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-[var(--aux-white)] bg-[var(--aux-white)] shadow-sm`,style:{left:`${h+y/100*v}%`}})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-default)]`,children:d===null?`--`:`${d}°`})]},e.id??s)})})})}function z({templateData:e,fallback:t}){let n=(0,b.useMemo)(()=>E(e),[e]),r=n?.unit?.toUpperCase()===`F`||n?.unit?.toLowerCase()===`fahrenheit`,[i,a]=(0,b.useState)(null),o=i??r;return!n||n.currentTemp===void 0&&!n.forecast?.length?t??null:(0,N.jsxs)(`div`,{className:`mt-3`,children:[(0,N.jsx)(I,{data:n,sourceIsFahrenheit:r,useFahrenheit:o,onToggle:a}),n.hourly&&n.hourly.length>0&&(0,N.jsx)(L,{hourly:n.hourly,sourceIsFahrenheit:r,useFahrenheit:o}),n.forecast&&n.forecast.length>0&&(0,N.jsx)(R,{forecast:n.forecast,currentTemp:n.currentTemp,sourceIsFahrenheit:r,useFahrenheit:o})]})}export{z as WeatherForecastDisplay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,O as t}from"./vendor-
|
|
1
|
+
import{D as e,O as t}from"./vendor-BHZEElF1.js";import{n}from"./definitions-wN3z9PyF.js";function r(e){let t=e.split(`/`).filter(e=>e!==`.`),n=[];return t.forEach(e=>{e===`..`&&n.length>0&&n[n.length-1]!==`..`?n.pop():n.push(e)}),n.join(`/`)}function i(e,t){e=r(e),t=r(t);let n=e.split(`/`),i=t.split(`/`);return e!==t&&n.every((e,t)=>e===i[t])}var a=class r extends e{constructor(){super(...arguments),this.DB_VERSION=1,this.DB_NAME=`Disc`,this._writeCmds=[`add`,`put`,`delete`],this.downloadFile=async e=>{let n=t(e,e.webFetchExtra),r=await fetch(e.url,n),i;if(!e.progress)i=await r.blob();else if(!r?.body)i=new Blob;else{let t=r.body.getReader(),n=0,a=[],o=r.headers.get(`content-type`),s=parseInt(r.headers.get(`content-length`)||`0`,10);for(;;){let{done:r,value:i}=await t.read();if(r)break;a.push(i),n+=i?.length||0;let o={url:e.url,bytes:n,contentLength:s};this.notifyListeners(`progress`,o)}let c=new Uint8Array(n),l=0;for(let e of a)e!==void 0&&(c.set(e,l),l+=e.length);i=new Blob([c.buffer],{type:o||void 0})}return{path:(await this.writeFile({path:e.path,directory:e.directory??void 0,recursive:e.recursive??!1,data:i})).uri,blob:i}}}readFileInChunks(e,t){throw this.unavailable(`Method not implemented.`)}async initDb(){if(this._db!==void 0)return this._db;if(!(`indexedDB`in window))throw this.unavailable(`This browser doesn't support IndexedDB`);return new Promise((e,t)=>{let n=indexedDB.open(this.DB_NAME,this.DB_VERSION);n.onupgradeneeded=r.doUpgrade,n.onsuccess=()=>{this._db=n.result,e(n.result)},n.onerror=()=>t(n.error),n.onblocked=()=>{console.warn(`db blocked`)}})}static doUpgrade(e){let t=e.target.result;switch(e.oldVersion){default:t.objectStoreNames.contains(`FileStorage`)&&t.deleteObjectStore(`FileStorage`),t.createObjectStore(`FileStorage`,{keyPath:`path`}).createIndex(`by_folder`,`folder`)}}async dbRequest(e,t){let n=this._writeCmds.indexOf(e)===-1?`readonly`:`readwrite`;return this.initDb().then(r=>new Promise((i,a)=>{let o=r.transaction([`FileStorage`],n).objectStore(`FileStorage`)[e](...t);o.onsuccess=()=>i(o.result),o.onerror=()=>a(o.error)}))}async dbIndexRequest(e,t,n){let r=this._writeCmds.indexOf(t)===-1?`readonly`:`readwrite`;return this.initDb().then(i=>new Promise((a,o)=>{let s=i.transaction([`FileStorage`],r).objectStore(`FileStorage`).index(e)[t](...n);s.onsuccess=()=>a(s.result),s.onerror=()=>o(s.error)}))}getPath(e,t){let n=t===void 0?``:t.replace(/^[/]+|[/]+$/g,``),r=``;return e!==void 0&&(r+=`/`+e),t!==``&&(r+=`/`+n),r}async clear(){(await this.initDb()).transaction([`FileStorage`],`readwrite`).objectStore(`FileStorage`).clear()}async readFile(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(n===void 0)throw Error(`File does not exist.`);return{data:n.content?n.content:``}}async writeFile(e){let t=this.getPath(e.directory,e.path),n=e.data,r=e.encoding,i=e.recursive,a=await this.dbRequest(`get`,[t]);if(a&&a.type===`directory`)throw Error(`The supplied path is a directory.`);let o=t.substr(0,t.lastIndexOf(`/`));if(await this.dbRequest(`get`,[o])===void 0){let t=o.indexOf(`/`,1);if(t!==-1){let n=o.substr(t);await this.mkdir({path:n,directory:e.directory,recursive:i})}}if(!r&&!(n instanceof Blob)&&(n=n.indexOf(`,`)>=0?n.split(`,`)[1]:n,!this.isBase64String(n)))throw Error(`The supplied data is not valid base64 content.`);let s=Date.now(),c={path:t,folder:o,type:`file`,size:n instanceof Blob?n.size:n.length,ctime:s,mtime:s,content:n};return await this.dbRequest(`put`,[c]),{uri:c.path}}async appendFile(e){let t=this.getPath(e.directory,e.path),n=e.data,r=e.encoding,i=t.substr(0,t.lastIndexOf(`/`)),a=Date.now(),o=a,s=await this.dbRequest(`get`,[t]);if(s&&s.type===`directory`)throw Error(`The supplied path is a directory.`);if(await this.dbRequest(`get`,[i])===void 0){let t=i.indexOf(`/`,1);if(t!==-1){let n=i.substr(t);await this.mkdir({path:n,directory:e.directory,recursive:!0})}}if(!r&&!this.isBase64String(n))throw Error(`The supplied data is not valid base64 content.`);if(s!==void 0){if(s.content instanceof Blob)throw Error(`The occupied entry contains a Blob object which cannot be appended to.`);n=s.content!==void 0&&!r?btoa(atob(s.content)+atob(n)):s.content+n,o=s.ctime}let c={path:t,folder:i,type:`file`,size:n.length,ctime:o,mtime:a,content:n};await this.dbRequest(`put`,[c])}async deleteFile(e){let t=this.getPath(e.directory,e.path);if(await this.dbRequest(`get`,[t])===void 0)throw Error(`File does not exist.`);if((await this.dbIndexRequest(`by_folder`,`getAllKeys`,[IDBKeyRange.only(t)])).length!==0)throw Error(`Folder is not empty.`);await this.dbRequest(`delete`,[t])}async mkdir(e){let t=this.getPath(e.directory,e.path),n=e.recursive,r=t.substr(0,t.lastIndexOf(`/`)),i=(t.match(/\//g)||[]).length,a=await this.dbRequest(`get`,[r]),o=await this.dbRequest(`get`,[t]);if(i===1)throw Error(`Cannot create Root directory`);if(o!==void 0)throw Error(`Current directory does already exist.`);if(!n&&i!==2&&a===void 0)throw Error(`Parent directory must exist`);if(n&&i!==2&&a===void 0){let t=r.substr(r.indexOf(`/`,1));await this.mkdir({path:t,directory:e.directory,recursive:n})}let s=Date.now(),c={path:t,folder:r,type:`directory`,size:0,ctime:s,mtime:s};await this.dbRequest(`put`,[c])}async rmdir(e){let{path:t,directory:n,recursive:r}=e,i=this.getPath(n,t),a=await this.dbRequest(`get`,[i]);if(a===void 0)throw Error(`Folder does not exist.`);if(a.type!==`directory`)throw Error(`Requested path is not a directory`);let o=await this.readdir({path:t,directory:n});if(o.files.length!==0&&!r)throw Error(`Folder is not empty`);for(let e of o.files){let i=`${t}/${e.name}`;(await this.stat({path:i,directory:n})).type===`file`?await this.deleteFile({path:i,directory:n}):await this.rmdir({path:i,directory:n,recursive:r})}await this.dbRequest(`delete`,[i])}async readdir(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(e.path!==``&&n===void 0)throw Error(`Folder does not exist.`);let r=await this.dbIndexRequest(`by_folder`,`getAllKeys`,[IDBKeyRange.only(t)]);return{files:await Promise.all(r.map(async e=>{let n=await this.dbRequest(`get`,[e]);return n===void 0&&(n=await this.dbRequest(`get`,[e+`/`])),{name:e.substring(t.length+1),type:n.type,size:n.size,ctime:n.ctime,mtime:n.mtime,uri:n.path}}))}}async getUri(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);return n===void 0&&(n=await this.dbRequest(`get`,[t+`/`])),{uri:n?.path||t}}async stat(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(n===void 0&&(n=await this.dbRequest(`get`,[t+`/`])),n===void 0)throw Error(`Entry does not exist.`);return{name:n.path.substring(t.length+1),type:n.type,size:n.size,ctime:n.ctime,mtime:n.mtime,uri:n.path}}async rename(e){await this._copy(e,!0)}async copy(e){return this._copy(e,!1)}async requestPermissions(){return{publicStorage:`granted`}}async checkPermissions(){return{publicStorage:`granted`}}async _copy(e,t=!1){let{toDirectory:r}=e,{to:a,from:o,directory:s}=e;if(!a||!o)throw Error(`Both to and from must be provided`);r||=s;let c=this.getPath(s,o),l=this.getPath(r,a);if(c===l)return{uri:l};if(i(c,l))throw Error(`To path cannot contain the from path`);let u;try{u=await this.stat({path:a,directory:r})}catch{let e=a.split(`/`);e.pop();let t=e.join(`/`);if(e.length>0&&(await this.stat({path:t,directory:r})).type!==`directory`)throw Error(`Parent directory of the to path is a file`)}if(u&&u.type===`directory`)throw Error(`Cannot overwrite a directory with a file`);let d=await this.stat({path:o,directory:s}),f=async(e,t,n)=>{let i=this.getPath(r,e),a=await this.dbRequest(`get`,[i]);a.ctime=t,a.mtime=n,await this.dbRequest(`put`,[a])},p=d.ctime?d.ctime:Date.now();switch(d.type){case`file`:{let e=await this.readFile({path:o,directory:s});t&&await this.deleteFile({path:o,directory:s});let i;!(e.data instanceof Blob)&&!this.isBase64String(e.data)&&(i=n.UTF8);let c=await this.writeFile({path:a,directory:r,data:e.data,encoding:i});return t&&await f(a,p,d.mtime),c}case`directory`:{if(u)throw Error(`Cannot move a directory over an existing object`);try{await this.mkdir({path:a,directory:r,recursive:!1}),t&&await f(a,p,d.mtime)}catch{}let e=(await this.readdir({path:o,directory:s})).files;for(let n of e)await this._copy({from:`${o}/${n.name}`,to:`${a}/${n.name}`,directory:s,toDirectory:r},t);t&&await this.rmdir({path:o,directory:s})}}return{uri:l}}isBase64String(e){try{return btoa(atob(e))==e}catch{return!1}}};a._debug=!0;export{a as FilesystemWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e}from"./vendor-
|
|
1
|
+
import{D as e}from"./vendor-BHZEElF1.js";var t=class extends e{async canShare(){return typeof navigator>`u`||!navigator.share?{value:!1}:{value:!0}}async share(e){if(typeof navigator>`u`||!navigator.share)throw this.unavailable(`Share API not available in this browser`);return await navigator.share({title:e.title,text:e.text,url:e.url}),{}}};export{t as ShareWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e}from"./vendor-
|
|
1
|
+
import{D as e}from"./vendor-BHZEElF1.js";var t=class extends e{async getSafeAreaInsets(){return{insets:{top:0,left:0,right:0,bottom:0}}}async getStatusBarHeight(){return{statusBarHeight:0}}setImmersiveNavigationBar(){throw this.unimplemented(`Method not supported on Web.`)}unsetImmersiveNavigationBar(){throw this.unimplemented(`Method not supported on Web.`)}};export{t as SafeAreaWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e}from"./vendor-
|
|
1
|
+
import{D as e}from"./vendor-BHZEElF1.js";import{n as t,t as n}from"./definitions-CGRzYJQ-.js";var r=class extends e{constructor(){super(...arguments),this.selectionStarted=!1}async impact(e){let t=this.patternForImpact(e?.style);this.vibrateWithPattern(t)}async notification(e){let t=this.patternForNotification(e?.type);this.vibrateWithPattern(t)}async vibrate(e){let t=e?.duration||300;this.vibrateWithPattern([t])}async selectionStart(){this.selectionStarted=!0}async selectionChanged(){this.selectionStarted&&this.vibrateWithPattern([70])}async selectionEnd(){this.selectionStarted=!1}patternForImpact(e=n.Heavy){return e===n.Medium?[43]:e===n.Light?[20]:[61]}patternForNotification(e=t.Success){return e===t.Warning?[30,40,30,50,60]:e===t.Error?[27,45,50]:[35,65,21]}vibrateWithPattern(e){if(navigator.vibrate)navigator.vibrate(e);else throw this.unavailable(`Browser does not support the vibrate API`)}};export{r as HapticsWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e}from"./vendor-
|
|
1
|
+
import{D as e}from"./vendor-BHZEElF1.js";var t=class extends e{async start(e){return new Promise(async(t,n)=>{await navigator.mediaDevices.getUserMedia({audio:!e.disableAudio,video:!0}).then(e=>{e.getTracks().forEach(e=>e.stop())}).catch(e=>{n(e)});let r=document.getElementById(`video`),i=document.getElementById(e.parent);if(r)n({message:`camera already started`});else{let r=document.createElement(`video`);r.id=`video`,r.setAttribute(`class`,e.className||``),e.position!==`rear`&&r.setAttribute(`style`,`-webkit-transform: scaleX(-1); transform: scaleX(-1);`);let a=navigator.userAgent.toLowerCase();if(a.includes(`safari`)&&!a.includes(`chrome`)&&(r.setAttribute(`autoplay`,`true`),r.setAttribute(`muted`,`true`),r.setAttribute(`playsinline`,`true`)),i.appendChild(r),navigator.mediaDevices?.getUserMedia){let i={video:{width:{ideal:e.width},height:{ideal:e.height}}};e.position===`rear`?(i.video.facingMode=`environment`,this.isBackCamera=!0):this.isBackCamera=!1,navigator.mediaDevices.getUserMedia(i).then(function(e){r.srcObject=e,r.play(),t()},e=>{n(e)})}}})}async startRecordVideo(){throw this.unimplemented(`Not implemented on web.`)}async stopRecordVideo(){throw this.unimplemented(`Not implemented on web.`)}async stop(){let e=document.getElementById(`video`);if(e){e.pause();let t=e.srcObject.getTracks();for(let e of t)e.stop();e.remove()}}async capture(e){return new Promise(t=>{let n=document.getElementById(`video`),r=document.createElement(`canvas`),i=r.getContext(`2d`);r.width=n.videoWidth,r.height=n.videoHeight,this.isBackCamera||(i.translate(n.videoWidth,0),i.scale(-1,1)),i.drawImage(n,0,0,n.videoWidth,n.videoHeight);let a;a=e.quality==null?r.toDataURL(`image/png`).replace(`data:image/png;base64,`,``):r.toDataURL(`image/jpeg`,e.quality/100).replace(`data:image/jpeg;base64,`,``),t({value:a})})}async captureSample(e){return this.capture(e)}async getSupportedFlashModes(){throw Error(`getSupportedFlashModes not supported under the web platform`)}async setFlashMode(e){throw Error(`setFlashMode not supported under the web platform`)}async flip(){throw Error(`flip not supported under the web platform`)}async setOpacity(e){let t=document.getElementById(`video`);t&&e.opacity&&t.style.setProperty(`opacity`,e.opacity.toString())}async isCameraStarted(){throw this.unimplemented(`Not implemented on web.`)}};export{t as CameraPreviewWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e}from"./vendor-
|
|
1
|
+
import{D as e}from"./vendor-BHZEElF1.js";function t(){let e=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,t=`unknown`,n=e?e.type||e.effectiveType:null;if(n&&typeof n==`string`)switch(n){case`bluetooth`:case`cellular`:t=`cellular`;break;case`none`:t=`none`;break;case`ethernet`:case`wifi`:case`wimax`:t=`wifi`;break;case`other`:case`unknown`:t=`unknown`;break;case`slow-2g`:case`2g`:case`3g`:t=`cellular`;break;case`4g`:t=`wifi`;break;default:break}return t}var n=class extends e{constructor(){super(),this.handleOnline=()=>{let e={connected:!0,connectionType:t()};this.notifyListeners(`networkStatusChange`,e)},this.handleOffline=()=>{this.notifyListeners(`networkStatusChange`,{connected:!1,connectionType:`none`})},typeof window<`u`&&(window.addEventListener(`online`,this.handleOnline),window.addEventListener(`offline`,this.handleOffline))}async getStatus(){if(!window.navigator)throw this.unavailable(`Browser does not support the Network Information API`);let e=window.navigator.onLine,n=t();return{connected:e,connectionType:e?n:`none`}}};new n;export{n as NetworkWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e}from"./vendor-
|
|
1
|
+
import{D as e}from"./vendor-BHZEElF1.js";var t=class extends e{constructor(){super(),this.handleVisibilityChange=()=>{let e={isActive:document.hidden!==!0};this.notifyListeners(`appStateChange`,e),document.hidden?this.notifyListeners(`pause`,null):this.notifyListeners(`resume`,null)},document.addEventListener(`visibilitychange`,this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented(`Not implemented on web.`)}async getInfo(){throw this.unimplemented(`Not implemented on web.`)}async getLaunchUrl(){return{url:``}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented(`Not implemented on web.`)}async toggleBackButtonHandler(){throw this.unimplemented(`Not implemented on web.`)}async getAppLanguage(){return{value:navigator.language.split(`-`)[0].toLowerCase()}}};export{t as AppWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e}from"./vendor-
|
|
1
|
+
import{D as e}from"./vendor-BHZEElF1.js";var t=class extends e{constructor(){super(),this._lastWindow=null}async open(e){this._lastWindow=window.open(e.url,e.windowName||`_blank`)}async close(){return new Promise((e,t)=>{this._lastWindow==null?t(`No active window to close!`):(this._lastWindow.close(),this._lastWindow=null,e())})}};new t;export{t as BrowserWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e}from"./vendor-
|
|
1
|
+
import{D as e}from"./vendor-BHZEElF1.js";var t=class extends e{constructor(){super(...arguments),this.pending=[],this.deliveredNotifications=[],this.hasNotificationSupport=()=>{if(!(`Notification`in window)||!Notification.requestPermission)return!1;if(Notification.permission!==`granted`)try{new Notification(``)}catch(e){if(e instanceof Error&&e.name===`TypeError`)return!1}return!0}}async getDeliveredNotifications(){let e=[];for(let t of this.deliveredNotifications){let n={title:t.title,id:parseInt(t.tag),body:t.body};e.push(n)}return{notifications:e}}async removeDeliveredNotifications(e){for(let t of e.notifications){let e=this.deliveredNotifications.find(e=>e.tag===String(t.id));e?.close(),this.deliveredNotifications=this.deliveredNotifications.filter(()=>!e)}}async removeAllDeliveredNotifications(){for(let e of this.deliveredNotifications)e.close();this.deliveredNotifications=[]}async createChannel(){throw this.unimplemented(`Not implemented on web.`)}async deleteChannel(){throw this.unimplemented(`Not implemented on web.`)}async listChannels(){throw this.unimplemented(`Not implemented on web.`)}async schedule(e){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);for(let t of e.notifications)this.sendNotification(t);return{notifications:e.notifications.map(e=>({id:e.id}))}}async getPending(){return{notifications:this.pending}}async registerActionTypes(){throw this.unimplemented(`Not implemented on web.`)}async cancel(e){this.pending=this.pending.filter(t=>!e.notifications.find(e=>e.id===t.id))}async areEnabled(){let{display:e}=await this.checkPermissions();return{value:e===`granted`}}async changeExactNotificationSetting(){throw this.unimplemented(`Not implemented on web.`)}async checkExactNotificationSetting(){throw this.unimplemented(`Not implemented on web.`)}async requestPermissions(){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);return{display:this.transformNotificationPermission(await Notification.requestPermission())}}async checkPermissions(){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);return{display:this.transformNotificationPermission(Notification.permission)}}transformNotificationPermission(e){switch(e){case`granted`:return`granted`;case`denied`:return`denied`;default:return`prompt`}}sendPending(){let e=[],t=new Date().getTime();for(let n of this.pending)n.schedule?.at&&n.schedule.at.getTime()<=t&&(this.buildNotification(n),e.push(n));this.pending=this.pending.filter(t=>!e.find(e=>e===t))}sendNotification(e){if(e.schedule?.at){let t=e.schedule.at.getTime()-new Date().getTime();this.pending.push(e),setTimeout(()=>{this.sendPending()},t);return}this.buildNotification(e)}buildNotification(e){let t=new Notification(e.title,{body:e.body,tag:String(e.id)});return t.addEventListener(`click`,this.onClick.bind(this,e),!1),t.addEventListener(`show`,this.onShow.bind(this,e),!1),t.addEventListener(`close`,()=>{this.deliveredNotifications=this.deliveredNotifications.filter(()=>!this)},!1),this.deliveredNotifications.push(t),t}onClick(e){let t={actionId:`tap`,notification:e};this.notifyListeners(`localNotificationActionPerformed`,t)}onShow(e){this.notifyListeners(`localNotificationReceived`,e)}};export{t as LocalNotificationsWeb};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-BHZEElF1.js";import{f as t,t as n}from"./react-DPM_L_aA.js";import{Cv as r,L_ as i,Or as a}from"./index-DQDnf_eu.js";import{t as o}from"./auth-welcome-screen-eAxwy9B6.js";var s=n();function c(){let{t:n}=e(`onboarding`),c=t();return(0,s.jsx)(o,{secondary:{label:n(`welcome.continueWithoutAccount`),onSelect:()=>{i()?c(r.selectAssistant,a):c(r.onboarding.hosting,a)}}})}export{c as WelcomeScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{_ as t,f as n,g as r,j as i}from"./vendor-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{_ as t,f as n,g as r,j as i}from"./vendor-BHZEElF1.js";import{b as a,t as o}from"./react-DPM_L_aA.js";import{Br as s,Nr as c,m as l,o as u,si as d,v as f,vi as p,zr as m}from"./icons-J6Mg9wGk.js";import{n as h,r as g,t as _}from"./metric-card-Tz73HQz6.js";import{By as v,Dr as y,En as b,Ms as x,Ns as S,Tn as C,_ as w,js as T,un as E,zy as D}from"./index-DQDnf_eu.js";import{t as O}from"./detail-panel-stop-button-uyJ8115k.js";import{t as k}from"./status-badge-pill-DsYKTPMw.js";var A=e(a(),1),j=o();function M({title:e,body:t,emptyText:n}){return(0,j.jsxs)(`div`,{className:`mb-5`,children:[(0,j.jsx)(D,{variant:`body-medium-default`,as:`h3`,className:`mb-2 text-[var(--content-emphasised)]`,children:e}),t?(0,j.jsx)(D,{variant:`body-medium-lighter`,as:`p`,className:`whitespace-pre-wrap break-words leading-relaxed text-[var(--content-default)]`,children:t}):(0,j.jsx)(D,{variant:`body-medium-lighter`,as:`p`,className:`text-[var(--content-tertiary)]`,children:n})]})}function N({leaf:e}){let{t}=i(`chat`),n=e.status===`running`?t(`workflowLeafDetail.running`):t(`workflowLeafDetail.noResultSummary`);return(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`div`,{className:`mb-5 grid grid-cols-2 gap-3`,children:[(0,j.jsx)(_,{icon:(0,j.jsx)(p,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.inputTokens??0,format:e=>h(Math.round(e)),label:t(`workflowLeafDetail.input`)}),(0,j.jsx)(_,{icon:(0,j.jsx)(g,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.outputTokens??0,format:e=>h(Math.round(e)),label:t(`workflowLeafDetail.output`)})]}),(0,j.jsx)(M,{title:t(`workflowLeafDetail.prompt`),body:e.promptSummary,emptyText:t(`workflowLeafDetail.noPromptSummary`)}),(0,j.jsx)(M,{title:t(`workflowLeafDetail.result`),body:e.resultSummary,emptyText:n})]})}function P({status:e}){return(0,j.jsx)(k,{color:x(e),label:S(e)})}function F(e){switch(e){case`completed`:return`var(--system-positive-strong)`;case`failed`:return`var(--system-negative-strong)`;case`cancelled`:return`var(--content-secondary)`;default:return`var(--primary-base)`}}function I(e){switch(e){case`completed`:return`Completed`;case`failed`:return`Failed`;case`cancelled`:return`Cancelled`;default:return`Running`}}function L({status:e}){return(0,j.jsx)(k,{color:F(e),label:I(e)})}function R({status:e}){let{t:a}=i(`chat`),o=n(),s=`h-3.5 w-3.5 shrink-0`,l;return l=e===`running`?(0,j.jsx)(E,{className:`shrink-0`,dotSize:4,gap:2}):e===`completed`?(0,j.jsx)(c,{className:s,style:{color:`var(--system-positive-strong)`}}):e===`failed`?(0,j.jsx)(f,{className:s,style:{color:`var(--system-negative-strong)`}}):(0,j.jsx)(d,{className:s,style:{color:`var(--content-secondary)`},role:`img`,"aria-label":a(`workflowSubagentRow.cancelledAria`)}),(0,j.jsx)(t,{mode:`wait`,initial:!1,children:(0,j.jsx)(r.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:o?{duration:0}:{duration:.15,ease:[.16,1,.3,1]},className:`flex shrink-0 items-center`,children:l},e)})}function z({runId:e,leaf:t,components:n,onSelect:r}){let{t:a}=i(`chat`),o=t.label??`Subagent ${t.seq}`,s=t.promptSummary,c=C(`${e}:${t.seq}`);return(0,j.jsx)(`button`,{type:`button`,onClick:r,"aria-label":a(`workflowSubagentRow.openDetailsAria`,{title:o}),className:`flex w-full cursor-pointer items-center justify-between gap-2 rounded-[6px] px-2 py-1.5 text-left transition-colors hover:bg-[var(--surface-overlay)]`,children:(0,j.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,j.jsx)(R,{status:t.status}),n?(0,j.jsx)(b,{components:n,bodyShapeId:c.bodyShape,eyeStyleId:c.eyeStyle,colorId:c.color,size:16}):(0,j.jsx)(`div`,{style:{width:16,height:16,flexShrink:0},"aria-hidden":!0}),(0,j.jsx)(D,{variant:`body-medium-default`,title:o,className:`max-w-[60%] shrink-0 truncate text-[var(--content-default)]`,children:o}),s&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 text-[var(--content-tertiary)] opacity-10`,children:`|`}),(0,j.jsx)(D,{variant:`body-medium-lighter`,title:s,className:`min-w-0 truncate text-[var(--content-tertiary)]`,children:s})]})]})})}function B({entry:e,onClose:t,onStop:a,onRequestJournal:o}){let{t:c}=i(`chat`),d=T(e.status),f=n(),x=e.label??e.runId,S=e.agentsSpawned||e.leaves.size,E=y(),k=[...e.leaves.values()].sort((e,t)=>e.seq-t.seq),[M,F]=(0,A.useState)(null),[I,R]=(0,A.useState)(e.runId);I!==e.runId&&(R(e.runId),F(null));let B=M==null?void 0:e.leaves.get(M),V=B?C(`${e.runId}:${B.seq}`):void 0,H=(0,A.useCallback)(()=>F(null),[]),U=B?B.label??`Subagent ${B.seq}`:``,W=B?U:x,G=d?`live`:`final`;return(0,A.useEffect)(()=>{o?.(e.runId)},[e.runId,G,o]),(0,j.jsx)(w,{headerAbove:B&&(0,j.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-[var(--border-hover)] px-5 py-3`,children:[(0,j.jsx)(`button`,{type:`button`,onClick:H,title:x,className:`min-w-0 shrink cursor-pointer truncate text-left text-[var(--content-default)] hover:underline`,children:(0,j.jsx)(D,{variant:`body-small-default`,as:`span`,children:x})}),(0,j.jsx)(m,{className:`h-2.5 w-2.5 shrink-0 text-[var(--content-tertiary)]`,"aria-hidden":!0}),(0,j.jsx)(D,{variant:`body-small-default`,as:`span`,title:U,className:`min-w-0 shrink truncate text-[var(--content-secondary)]`,children:U})]}),icon:(0,j.jsxs)(j.Fragment,{children:[B&&(0,j.jsx)(v,{variant:`outlined`,iconOnly:(0,j.jsx)(s,{}),onClick:H,"aria-label":c(`workflowDetailPanel.backToSubagentsAria`),tooltip:c(`workflowDetailPanel.back`),className:`shrink-0`}),B?E&&V?(0,j.jsx)(b,{components:E,bodyShapeId:V.bodyShape,eyeStyleId:V.eyeStyle,colorId:V.color,size:32}):(0,j.jsx)(`div`,{style:{width:32,height:32,flexShrink:0},"aria-hidden":!0}):(0,j.jsx)(u,{className:`h-5 w-5 shrink-0 text-[var(--content-secondary)]`,"aria-hidden":!0})]}),title:W,headerTrailing:B?(0,j.jsx)(L,{status:B.status}):(0,j.jsx)(P,{status:e.status}),headerActions:d&&a?(0,j.jsx)(O,{onStop:()=>a(e.runId),ariaLabel:c(`workflowDetailPanel.stopWorkflow`)}):void 0,closeLabel:c(`workflowDetailPanel.closeDetail`),onClose:t,children:(0,j.jsx)(r.div,{initial:{opacity:0},animate:{opacity:1},transition:f?{duration:0}:{duration:.18,ease:[.16,1,.3,1]},children:B?(0,j.jsx)(N,{leaf:B}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`mb-5 grid grid-cols-3 gap-3`,children:[(0,j.jsx)(_,{icon:(0,j.jsx)(p,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.inputTokens,format:e=>h(Math.round(e)),label:c(`workflowDetailPanel.input`)}),(0,j.jsx)(_,{icon:(0,j.jsx)(g,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.outputTokens,format:e=>h(Math.round(e)),label:c(`workflowDetailPanel.output`)}),(0,j.jsx)(_,{icon:(0,j.jsx)(l,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:S,format:e=>h(Math.round(e)),label:c(`workflowDetailPanel.agents`)})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(D,{variant:`body-medium-default`,as:`h3`,className:`mb-4 text-[var(--content-emphasised)]`,children:c(`workflowDetailPanel.subagents`)}),k.length===0?(0,j.jsx)(D,{variant:`body-small-default`,className:`py-4 text-center text-[var(--content-tertiary)]`,children:c(`workflowDetailPanel.noSubagentsYet`)}):(0,j.jsx)(`div`,{className:`flex flex-col gap-1`,children:k.map(t=>(0,j.jsx)(z,{runId:e.runId,leaf:t,components:E,onSelect:()=>F(t.seq)},t.seq))})]})]})},B?String(B.seq):`list`)})}export{B as WorkflowDetailPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Jn as t,N as n,Xn as r,Zn as i,er as a,j as o}from"./vendor-BHZEElF1.js";import{b as s,g as c,t as l}from"./react-DPM_L_aA.js";import{$n as u,An as d,Ci as f,In as p,Jn as m,Mn as h,Rn as g,Vn as _,Vr as v,Y as y,ct as b,i as x,p as S,qn as C,rn as w,vn as T,vt as E,x as D,zr as O}from"./icons-J6Mg9wGk.js";import{t as k}from"./folder-open-BDPMS2Bk.js";import{Ay as A,By as j,Jr as M,Ln as N,Sy as P,Y as F,ag as I,an as ee,cg as L,dy as R,hy as z,ig as B,in as te,my as V,ng as ne,og as re,on as H,rg as U,sg as ie,sn as W,xy as G,yy as ae}from"./index-DQDnf_eu.js";import{n as K,r as oe,t as se}from"./use-side-list-room-TTk8JAoZ.js";import{t as q}from"./format-file-size-BCpFMv3k.js";import{i as J,n as ce,r as Y,t as X}from"./file-editor-BfyaAZHZ.js";var le=f(`arrow-down-a-z`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M20 8h-5`,key:`1vsyxs`}],[`path`,{d:`M15 10V6.5a2.5 2.5 0 0 1 5 0V10`,key:`ag13bf`}],[`path`,{d:`M15 14h5l-5 6h5`,key:`ur5jdg`}]]),ue=f(`arrow-down-wide-narrow`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M11 4h10`,key:`1w87gc`}],[`path`,{d:`M11 8h7`,key:`djye34`}],[`path`,{d:`M11 12h4`,key:`q8tih4`}]]),Z=e(s(),1);function de(e){if(!e)return``;let t=e.indexOf(`;`);return(t===-1?e:e.slice(0,t)).trim()}function fe(e,t){return de(t)===`application/json`?!0:(e??``).toLowerCase().endsWith(`.json`)}function pe(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function me(e){return e.split(`/`).some(e=>e.startsWith(`.`))}var Q=l();function he(e){let{assistantId:t,path:n,name:r,showHidden:i}=e,[a,o]=(0,Z.useState)(!1),[s,c]=(0,Z.useState)(!1);return{isDownloading:a,error:s,download:(0,Z.useCallback)(async()=>{c(!1),o(!0);try{await N({assistantId:t,path:n,filename:r,showHidden:i})}catch{c(!0)}finally{o(!1)}},[t,n,r,i])}}function ge({assistantId:e,path:t,name:n,showHidden:r}){let{t:i}=o(`workspace`),{isDownloading:a,error:s,download:c}=he({assistantId:e,path:t,name:n,showHidden:r});return(0,Q.jsx)(j,{variant:`ghost`,size:`regular`,iconOnly:a?(0,Q.jsx)(w,{className:`animate-spin`,"aria-hidden":!0}):(0,Q.jsx)(u,{"aria-hidden":!0}),onClick:()=>void c(),disabled:a,"aria-label":i(`workspaceFileViewer.downloadAria`,{name:n}),tooltip:i(s?`workspaceFileViewer.downloadFailed`:`workspaceFileViewer.download`)})}function _e(e){return r({queryFn:async()=>{let{data:t,error:n}=await B({path:e.path,query:{path:e.query.path,...e.query.showHidden?{showHidden:`true`}:{}}});if(n)throw n;return t},queryKey:[`assistantsWorkspaceFileRetrieve`,e]})}function ve({mimeType:e}){let t=e.indexOf(`;`),n=(t===-1?e:e.slice(0,t)).trim(),r=g;return n.startsWith(`image/`)?r=T:n.startsWith(`video/`)?r=S:!n.startsWith(`text/`)&&n!==`application/json`&&n!==`application/octet-stream`&&(r=p),(0,Q.jsx)(`span`,{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded`,style:{backgroundColor:`color-mix(in oklab, var(--content-default) 10%, transparent)`},children:(0,Q.jsx)(r,{className:`h-3.5 w-3.5`,style:{color:`var(--content-default)`}})})}function ye({viewMode:e,onChange:t}){let{t:n}=o(`workspace`);return(0,Q.jsx)(`div`,{className:`inline-flex rounded-md p-0.5`,style:{backgroundColor:`color-mix(in oklab, var(--content-default) 6%, transparent)`},children:[`preview`,`source`].map(r=>{let i=e===r;return(0,Q.jsx)(j,{variant:`ghost`,onClick:()=>t(r),className:`h-auto rounded border-0 px-2.5 py-1 text-body-small-default hover:bg-transparent`,style:{backgroundColor:i?`var(--surface-lift)`:`transparent`,color:i?`var(--content-default)`:`var(--content-tertiary)`,boxShadow:i?`0 1px 2px rgba(0,0,0,0.15)`:void 0},children:n(r===`preview`?`workspaceFileViewer.preview`:`workspaceFileViewer.source`)},r)})})}function $({name:e,mimeType:t,size:n,rightContent:r}){return(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b px-3 py-2.5`,style:{borderColor:`var(--border-element)`},children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(ve,{mimeType:t}),(0,Q.jsx)(`span`,{className:`truncate text-body-medium-default`,style:{color:`var(--content-default)`},children:e}),n!=null&&(0,Q.jsx)(`span`,{className:`shrink-0 text-body-small-default`,style:{color:`var(--content-tertiary)`},children:q(n)})]}),r]})}function be({assistantId:e,path:t,mimeType:n,showHidden:r}){let{data:a,isLoading:o}=i({queryFn:async()=>{let n=await U({path:{assistant_id:e},query:{path:t,...r?{showHidden:`true`}:{}},parseAs:`blob`});if(n.error)throw n.error;return n.data},queryKey:[`assistantsWorkspaceFileContentRetrieve`,{assistantId:e,path:t,showHidden:r}],enabled:!!t}),[s,c]=(0,Z.useState)(null);return(0,Z.useEffect)(()=>{if(!a)return;let e=URL.createObjectURL(a);return c(e),()=>{URL.revokeObjectURL(e),c(null)}},[a]),o?(0,Q.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,Q.jsx)(w,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})}):s?n.startsWith(`image/`)?(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Q.jsx)(`img`,{src:s,alt:t.split(`/`).pop()??`image`,className:`max-h-[70vh] max-w-full rounded object-contain`})}):n.startsWith(`video/`)?(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Q.jsx)(`video`,{src:s,controls:!0,className:`max-h-[70vh] max-w-full rounded`})}):null:null}function xe({assistantId:e,path:t,name:n,mimeType:r,size:i,modifiedAt:a,showHidden:s}){let{t:c}=o(`workspace`),{isDownloading:l,error:d,download:f}=he({assistantId:e,path:t,name:n,showHidden:s});return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:n,mimeType:r,size:i}),(0,Q.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,Q.jsxs)(`div`,{className:`w-full max-w-sm rounded-lg border p-6 text-center`,style:{borderColor:`var(--border-base)`,backgroundColor:`var(--surface-lift)`},children:[(0,Q.jsx)(p,{className:`mx-auto h-10 w-10`,style:{color:`var(--content-tertiary)`}}),(0,Q.jsx)(`p`,{className:`mt-3 text-body-medium-default`,style:{color:`var(--content-default)`},children:n}),(0,Q.jsxs)(`div`,{className:`mt-2 space-y-1`,children:[(0,Q.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:r}),(0,Q.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:q(i,`Unknown size`)}),a&&(0,Q.jsxs)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:[c(`workspaceFileViewer.modifiedLabel`),` `,new Date(a).toLocaleString()]})]}),(0,Q.jsx)(j,{variant:`outlined`,size:`compact`,leftIcon:l?(0,Q.jsx)(w,{className:`animate-spin`,"aria-hidden":!0}):(0,Q.jsx)(u,{"aria-hidden":!0}),onClick:f,disabled:l,"aria-label":c(`workspaceFileViewer.downloadAria`,{name:n}),className:`mt-4`,children:c(l?`workspaceFileViewer.downloading`:`workspaceFileViewer.download`)}),d&&(0,Q.jsx)(`p`,{className:`mt-2 text-body-small-default`,style:{color:`var(--system-error)`},children:c(`workspaceFileViewer.downloadFailed`)})]})})]})}function Se({assistantId:e,selectedPath:n,showHidden:r,viewMode:s,onChangeViewMode:c,onBrowse:l,pathRename:u,pathDelete:d}){let{t:f}=o(`workspace`),p=a(),{data:m,isLoading:h}=i({..._e({path:{assistant_id:e},query:{path:n??``,showHidden:r}}),enabled:!!n}),[g,_]=(0,Z.useState)(null),[v,y]=(0,Z.useState)(null);(0,Z.useEffect)(()=>{if(!u)return;let{from:e,to:t}=u,n=n=>n===e?t:n.startsWith(`${e}/`)?t+n.slice(e.length):n;_(e=>e==null?e:n(e)),y(e=>e==null?e:{...e,path:n(e.path)})},[u]),(0,Z.useEffect)(()=>{if(!d)return;let{path:e}=d,t=t=>t===e||t.startsWith(`${e}/`);_(e=>e!=null&&t(e)?null:e),y(e=>e!=null&&t(e.path)?null:e)},[d]);let b=g!=null&&g===n,x=m?.content??``,S=v?.path===n?v.content:x,C=()=>{_(null),y(null)},T=t({mutationFn:async({path:t,content:n})=>{let{error:r,response:i}=await L({path:{assistant_id:e},body:{path:t,content:n,encoding:`utf8`},throwOnError:!1});if(!i?.ok||r)throw Error(`Failed to save file`)},onSuccess:(e,t)=>{_(e=>e===t.path?null:e),y(e=>e?.path===t.path?null:e),p.invalidateQueries({queryKey:[`assistantsWorkspaceFileRetrieve`]})}}),E=S!==x,D=(0,Z.useCallback)(()=>{n&&E&&!T.isPending&&T.mutate({path:n,content:S})},[n,E,T,S]);if(!n)return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3`,children:[(0,Q.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:f(`workspaceFileViewer.selectAFile`)}),l&&(0,Q.jsx)(j,{type:`button`,onClick:l,leftIcon:(0,Q.jsx)(k,{"aria-hidden":!0}),children:f(`workspaceFileViewer.browseFiles`)})]});if(h)return(0,Q.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Q.jsx)(w,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})});if(!m)return(0,Q.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Q.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:f(`workspaceFileViewer.fileNotFound`)})});let O=m.mimeType??`application/octet-stream`,A=m.name??n.split(`/`).pop()??n,M=W(A,O),N=fe(A,O),P=m.content!=null&&!M&&!N,F=n?me(n):!0,I=b&&(0,Q.jsx)(ce,{isDirty:E,isSaving:T.isPending,error:T.isError?f(`workspaceFileViewer.saveFailed`):null,onSave:D,onDiscard:C});if(M&&m.content!=null){let e=b?S:m.content;return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:A,mimeType:O,rightContent:(0,Q.jsx)(ye,{viewMode:s,onChange:e=>{b&&C(),c(e)}})}),(0,Q.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Q.jsx)(X,{content:e,fileName:A,mimeType:O,showEdit:!F&&s===`source`,isEditing:b,onToggleEdit:()=>b?C():_(n)}),s===`preview`?(0,Q.jsx)(`div`,{className:`h-full overflow-auto px-6 py-4`,style:{color:`var(--content-default)`},children:(0,Q.jsx)(H,{content:e})}):b?(0,Q.jsx)(Y,{value:S,onChange:e=>y({path:n,content:e}),onSave:D}):(0,Q.jsx)(J,{content:m.content,readOnly:F,onStartEdit:()=>_(n)})]}),I]})}if(N&&m.content!=null){let e=b?S:m.content,t=pe(e);return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:A,mimeType:O,rightContent:(0,Q.jsx)(ye,{viewMode:s,onChange:e=>{b&&C(),c(e)}})}),(0,Q.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Q.jsx)(X,{content:s===`preview`?t:e,downloadContent:e,fileName:A,mimeType:O,showEdit:!F&&s===`source`,isEditing:b,onToggleEdit:()=>b?C():_(n)}),s===`preview`?(0,Q.jsx)(J,{content:t,readOnly:!0,whiteSpace:`pre`}):b?(0,Q.jsx)(Y,{value:S,onChange:e=>y({path:n,content:e}),onSave:D}):(0,Q.jsx)(J,{content:m.content,readOnly:F,onStartEdit:()=>_(n)})]}),I]})}return P?(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:A,mimeType:O,size:m.size}),(0,Q.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Q.jsx)(X,{content:b?S:m.content??``,fileName:A,mimeType:O,showEdit:!F,isEditing:b,onToggleEdit:()=>b?C():_(n)}),b?(0,Q.jsx)(Y,{value:S,onChange:e=>y({path:n,content:e}),onSave:D}):(0,Q.jsx)(J,{content:m.content??``,readOnly:F,onStartEdit:()=>_(n)})]}),I]}):O.startsWith(`image/`)||O.startsWith(`video/`)?(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:A,mimeType:O,size:m.size,rightContent:(0,Q.jsx)(ge,{assistantId:e,path:n,name:A,showHidden:r})}),(0,Q.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,Q.jsx)(be,{assistantId:e,path:n,mimeType:O,showHidden:r})})]}):(0,Q.jsx)(xe,{assistantId:e,path:n,name:A,mimeType:O,size:m.size,modifiedAt:m.modifiedAt,showHidden:r})}function Ce(e,t){if(t===`name`)return e;let n=e.slice();return n.sort((e,t)=>{let n=e.size??null,r=t.size??null;return n===null&&r===null?(e.name??``).localeCompare(t.name??``):n===null?1:r===null?-1:n===r?(e.name??``).localeCompare(t.name??``):r-n}),n}async function we(e,t,n,r){let i=n.toLowerCase(),a=r?.toLowerCase(),{data:o}=await ie({path:{assistant_id:e},query:t?{path:t}:{}});if(o?.entries?.some(e=>{let t=(e.name??``).toLowerCase();return t===i&&t!==a}))throw Error(`"${n}" already exists here.`)}function Te({entry:e}){return e.type===`directory`?(0,Q.jsx)(d,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):e.mimeType?.startsWith(`image/`)?(0,Q.jsx)(T,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):e.mimeType?.startsWith(`video/`)?(0,Q.jsx)(S,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Q.jsx)(g,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}})}function Ee({entry:e,assistantId:t,expandedPaths:n,selectedPath:r,showHidden:a,sortMode:s,searchLower:c,onToggleExpand:l,onSelectPath:u,onRequestDelete:d,onRequestRename:f,onRequestCreate:p,depth:m}){let{t:g}=o(`workspace`),y=e.path??``,b=e.name??``,x=e.type===`directory`,S=n.has(y),C=r===y,w=b.startsWith(`.`),T=!me(y),k=x&&(S||c.length>0),{data:A}=i({...ee({assistantId:t,path:y,showHidden:a,includeDirSizes:s===`size`}),enabled:x&&k}),j=(0,Z.useMemo)(()=>Ce(A?.entries??[],s),[A?.entries,s]),M=c===``||b.toLowerCase().includes(c);if(c!==``&&!x&&!M)return null;let N=(0,Q.jsxs)(`button`,{onClick:()=>{x?l(y):u(y)},className:`flex w-full items-center gap-1.5 px-2 py-1 text-left text-body-medium-lighter transition-colors hover:bg-[var(--surface-hover)]`,style:{paddingLeft:`${m*14+8}px`,paddingRight:`8px`,color:C?`var(--content-default)`:w?`var(--content-tertiary)`:`var(--content-default)`,backgroundColor:C?`color-mix(in oklab, var(--primary-base) 12%, transparent)`:void 0,opacity:w&&!C?.7:1},children:[x?k?(0,Q.jsx)(v,{className:`h-3 w-3 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Q.jsx)(O,{className:`h-3 w-3 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Q.jsx)(`span`,{className:`h-3 w-3 shrink-0`}),(0,Q.jsx)(Te,{entry:e}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:b}),e.size!=null&&(0,Q.jsx)(`span`,{className:`shrink-0 text-label-medium-default tabular-nums`,style:{color:`var(--content-tertiary)`},children:q(e.size)})]});return(0,Q.jsxs)(`div`,{children:[T?(0,Q.jsxs)(R.Root,{children:[(0,Q.jsx)(R.Trigger,{children:N}),(0,Q.jsxs)(R.Content,{children:[x&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(R.Item,{leftIcon:(0,Q.jsx)(_,{className:`h-3.5 w-3.5`}),onSelect:()=>p({kind:`file`,parentPath:y}),children:g(`workspaceTree.newFile`)}),(0,Q.jsx)(R.Item,{leftIcon:(0,Q.jsx)(h,{className:`h-3.5 w-3.5`}),onSelect:()=>p({kind:`folder`,parentPath:y}),children:g(`workspaceTree.newFolder`)}),(0,Q.jsx)(R.Separator,{})]}),(0,Q.jsx)(R.Item,{leftIcon:(0,Q.jsx)(D,{className:`h-3.5 w-3.5`}),onSelect:()=>d({path:y,name:b,isDirectory:x}),children:g(`workspaceTree.delete`)}),(0,Q.jsx)(R.Item,{leftIcon:(0,Q.jsx)(E,{className:`h-3.5 w-3.5`}),onSelect:()=>f({path:y,name:b,isDirectory:x}),children:g(`workspaceTree.rename`)})]})]}):N,x&&k&&j.length>0&&(0,Q.jsx)(`div`,{children:j.map(e=>(0,Q.jsx)(Ee,{entry:e,assistantId:t,expandedPaths:n,selectedPath:r,showHidden:a,sortMode:s,searchLower:c,onToggleExpand:l,onSelectPath:u,onRequestDelete:d,onRequestRename:f,onRequestCreate:p,depth:m+1},e.path))})]})}function De({title:e,placeholder:t,confirmLabel:n,pendingLabel:r,initialName:i,onCancel:a,onConfirm:s,pending:c,error:l}){let{t:u}=o(`workspace`),d=(0,Z.useRef)(null),[f,p]=(0,Z.useState)(i??``),m=f.trim(),h=m.length>0&&(/[/\\]/.test(m)||m===`.`||m===`..`),g=m.length>0&&!h&&!c;return(0,Q.jsx)(P.Root,{open:!0,onOpenChange:e=>{!e&&!c&&a()},children:(0,Q.jsx)(P.Content,{size:`sm`,hideCloseButton:!0,"aria-describedby":void 0,onOpenAutoFocus:e=>{e.preventDefault();let t=d.current;t&&(t.focus(),requestAnimationFrame(()=>{t.setSelectionRange(0,t.value.length)}))},onEscapeKeyDown:e=>{e.preventDefault(),e.stopPropagation(),c||a()},children:(0,Q.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),g&&s(m)},children:[(0,Q.jsx)(P.Header,{children:(0,Q.jsx)(P.Title,{children:e})}),(0,Q.jsx)(P.Body,{children:(0,Q.jsx)(A,{ref:d,label:u(`workspaceTree.nameLabel`),value:f,onChange:e=>p(e.target.value),placeholder:t,errorText:l??(h?u(`workspaceTree.nameError`):void 0),autoComplete:`off`,spellCheck:!1,fullWidth:!0})}),(0,Q.jsxs)(P.Footer,{children:[(0,Q.jsx)(j,{type:`button`,variant:`outlined`,onClick:a,disabled:c,children:u(`workspaceTree.cancel`)}),(0,Q.jsx)(j,{type:`submit`,variant:`primary`,disabled:!g,children:c?r:n})]})]})})})}function Oe({assistantId:e,expandedPaths:r,selectedPath:s,showHidden:c,sortMode:l,onToggleExpand:u,onExpandPath:d,onSelectPath:f,onToggleShowHidden:p,onChangeSortMode:h,onPathDeleted:g,onPathRenamed:_,search:v,onSearchChange:b}){let{t:S}=o(`workspace`),w=a(),T=v.trim().toLowerCase(),[E,D]=(0,Z.useState)(!1),[O,k]=(0,Z.useState)(null),[M,N]=(0,Z.useState)(null),P=(0,Z.useCallback)(()=>{k(null),N(null)},[]),{data:F,isLoading:R}=i(ee({assistantId:e,showHidden:c,includeDirSizes:l===`size`})),z=(0,Z.useMemo)(()=>Ce(F?.entries??[],l),[F?.entries,l]),B=(0,Z.useCallback)(()=>{for(let e of[te,`assistantsWorkspaceFileRetrieve`,`assistantsWorkspaceFileContentRetrieve`])w.invalidateQueries({queryKey:[e]})},[w]),V=t({mutationFn:async t=>{let n=t.parentPath?`${t.parentPath}/${t.name}`:t.name;await we(e,t.parentPath,t.name);let{error:r,response:i}=t.kind===`file`?await L({path:{assistant_id:e},body:{path:n,content:``,encoding:`utf8`},throwOnError:!1}):await I({path:{assistant_id:e},body:{path:n},throwOnError:!1});if(r||!i?.ok)throw Error(typeof r==`string`?r:`Failed to create — check the name and try again.`);return{...t,path:n}},onSuccess:e=>{P(),B(),e.parentPath&&d(e.parentPath),e.kind===`file`?f(e.path):d(e.path)},onError:e=>{N(e instanceof Error?e.message:`Failed to create.`)}}),H=t({mutationFn:async t=>{let n=t.oldPath.lastIndexOf(`/`),r=n===-1?``:t.oldPath.slice(0,n),i=t.oldPath.slice(n+1),a=r?`${r}/${t.newName}`:t.newName;await we(e,r,t.newName,i);let{error:o,response:s}=await re({path:{assistant_id:e},body:{oldPath:t.oldPath,newPath:a},throwOnError:!1});if(o||!s?.ok)throw Error(typeof o==`string`?o:`Failed to rename — check the name and try again.`);return{oldPath:t.oldPath,newPath:a}},onSuccess:({oldPath:e,newPath:t})=>{P(),B(),_(e,t)},onError:e=>{N(e instanceof Error?e.message:`Failed to rename.`)}}),U=(0,Z.useCallback)(e=>{N(null),k({type:`create`,...e})},[]),ie=(0,Z.useCallback)(e=>{N(null),k({type:`rename`,path:e.path,name:e.name})},[]),[W,G]=(0,Z.useState)(null),K=t({mutationFn:async t=>{let{error:n,response:r}=await ne({path:{assistant_id:e},body:{path:t.path},throwOnError:!1});if(n||!r?.ok)throw Error(typeof n==`string`?n:`Failed to delete — try again.`);return t},onSuccess:e=>{G(null),B(),g(e.path)}}),oe=(0,Z.useCallback)(e=>{K.reset(),G(e)},[K]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between border-b px-3 py-2.5`,style:{borderColor:`var(--border-element)`},children:[(0,Q.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-secondary)`},children:S(`workspaceTree.heading`)}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,Q.jsx)(j,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:l===`size`?(0,Q.jsx)(ue,{"aria-hidden":!0}):(0,Q.jsx)(le,{"aria-hidden":!0}),onClick:()=>h(l===`size`?`name`:`size`),"aria-label":S(l===`size`?`workspaceTree.sortByNameAria`:`workspaceTree.sortBySizeAria`),title:S(l===`size`?`workspaceTree.sortedBySizeTitle`:`workspaceTree.sortedByNameTitle`),tintColor:l===`size`?`var(--content-default)`:`var(--content-tertiary)`}),(0,Q.jsx)(j,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:c?(0,Q.jsx)(C,{"aria-hidden":!0}):(0,Q.jsx)(m,{"aria-hidden":!0}),onClick:p,"aria-label":S(c?`workspaceTree.hideHiddenAria`:`workspaceTree.showHiddenAria`),title:S(c?`workspaceTree.hideHiddenAria`:`workspaceTree.showHiddenAria`),tintColor:c?`var(--content-default)`:`var(--content-tertiary)`}),(0,Q.jsx)(ke,{open:E,onOpenChange:D,onSelectKind:e=>{D(!1),U({kind:e,parentPath:``})}})]})]}),(0,Q.jsx)(`div`,{className:`px-3 py-2`,children:(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsx)(A,{type:`text`,value:v,onChange:e=>b(e.target.value),placeholder:S(`workspaceTree.searchPlaceholder`),leftIcon:(0,Q.jsx)(y,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),fullWidth:!0,spellCheck:!1,autoComplete:`off`}),v&&(0,Q.jsx)(j,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(x,{"aria-hidden":!0}),onClick:()=>b(``),"aria-label":S(`workspaceTree.clearSearchAria`),className:`absolute right-1.5 top-1/2 -translate-y-1/2`,tintColor:`var(--content-tertiary)`})]})}),(0,Q.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto py-1`,children:R?(0,Q.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,Q.jsx)(`div`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent`,style:{color:`var(--content-tertiary)`}})}):z.length?z.map(t=>(0,Q.jsx)(Ee,{entry:t,assistantId:e,expandedPaths:r,selectedPath:s,showHidden:c,sortMode:l,searchLower:T,onToggleExpand:u,onSelectPath:f,onRequestDelete:oe,onRequestRename:ie,onRequestCreate:U,depth:0},t.path)):(0,Q.jsx)(`p`,{className:`px-3 py-4 text-center text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:S(`workspaceTree.noFilesFound`)})}),O?.type===`create`&&(0,Q.jsx)(De,{title:O.kind===`file`?S(`workspaceTree.newFile`):S(`workspaceTree.newFolder`),placeholder:O.kind===`file`?`filename.md`:`folder-name`,confirmLabel:S(`workspaceTree.create`),pendingLabel:S(`workspaceTree.creating`),onCancel:P,onConfirm:e=>{N(null),V.mutate({kind:O.kind,parentPath:O.parentPath,name:e})},pending:V.isPending,error:M},`create-${O.kind}-${O.parentPath}`),O?.type===`rename`&&(0,Q.jsx)(De,{title:S(`workspaceTree.rename`),placeholder:O.name,confirmLabel:S(`workspaceTree.rename`),pendingLabel:S(`workspaceTree.renaming`),initialName:O.name,onCancel:P,onConfirm:e=>{if(e===O.name){P();return}N(null),H.mutate({oldPath:O.path,newName:e})},pending:H.isPending,error:M},`rename-${O.path}`),(0,Q.jsx)(ae,{open:W!==null,title:W?.isDirectory?S(`workspaceTree.deleteFolderTitle`):S(`workspaceTree.deleteFileTitle`),message:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(n,{i18nKey:W?.isDirectory?`workspaceTree.deleteFolderMessage`:`workspaceTree.deleteFileMessage`,ns:`workspace`,values:{name:W?.name??``},components:{name:(0,Q.jsx)(`span`,{style:{color:`var(--content-default)`}})}}),K.error&&(0,Q.jsx)(`span`,{className:`mt-2 block`,style:{color:`var(--system-negative-strong)`},children:K.error.message})]}),confirmLabel:K.isPending?S(`workspaceTree.deleting`):S(`workspaceTree.delete`),destructive:!0,isPending:K.isPending,onConfirm:()=>{W&&K.mutate(W)},onCancel:()=>G(null)})]})}function ke({open:e,onOpenChange:t,onSelectKind:n}){let{t:r}=o(`workspace`);return M()?(0,Q.jsxs)(G.Root,{open:e,onOpenChange:t,children:[(0,Q.jsx)(G.Trigger,{asChild:!0,children:(0,Q.jsx)(j,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(b,{"aria-hidden":!0}),"aria-label":r(`workspaceTree.createTriggerAria`),title:r(`workspaceTree.createTriggerTitle`),tintColor:`var(--content-tertiary)`})}),(0,Q.jsxs)(G.Content,{children:[(0,Q.jsx)(G.Header,{className:`sr-only`,children:(0,Q.jsx)(G.Title,{children:r(`workspaceTree.creatingHeading`)})}),(0,Q.jsxs)(G.Body,{className:`pt-0`,children:[(0,Q.jsx)(V,{icon:_,label:r(`workspaceTree.newFile`),onSelect:()=>n(`file`)}),(0,Q.jsx)(V,{icon:h,label:r(`workspaceTree.newFolder`),onSelect:()=>n(`folder`)})]})]})]}):(0,Q.jsxs)(z.Root,{open:e,onOpenChange:t,children:[(0,Q.jsx)(z.Trigger,{asChild:!0,children:(0,Q.jsx)(j,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(b,{"aria-hidden":!0}),"aria-label":r(`workspaceTree.createTriggerAria`),title:r(`workspaceTree.createTriggerTitle`),tintColor:`var(--content-tertiary)`})}),(0,Q.jsxs)(z.Content,{align:`end`,sideOffset:4,children:[(0,Q.jsx)(z.Item,{leftIcon:(0,Q.jsx)(_,{className:`h-3.5 w-3.5`}),onSelect:()=>n(`file`),children:r(`workspaceTree.newFile`)}),(0,Q.jsx)(z.Item,{leftIcon:(0,Q.jsx)(h,{className:`h-3.5 w-3.5`}),onSelect:()=>n(`folder`),children:r(`workspaceTree.newFolder`)})]})]})}function Ae(e){let t=e.split(`/`),n=new Set;for(let e=1;e<t.length;e++)n.add(t.slice(0,e).join(`/`));return n}function je({assistantId:e}){let{t}=o(`workspace`),[n,r]=c(),[i,a]=(0,Z.useState)(()=>{let e=n.get(`file`);return e?Ae(e):new Set}),[s,l]=(0,Z.useState)(()=>n.get(`file`)),[u,d]=(0,Z.useState)(!1),[f,p]=(0,Z.useState)(()=>n.get(`sort`)===`size`?`size`:`name`),[m,h]=(0,Z.useState)(`preview`);(0,Z.useEffect)(()=>{let e=n.get(`file`);e&&(l(e),a(t=>{let n=new Set(t);for(let t of Ae(e))n.add(t);return n.size===t.size?t:n}),r(e=>{let t=new URLSearchParams(e);return t.delete(`file`),t},{replace:!0}))},[n,r]);let g=(0,Z.useCallback)(e=>{a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),_=(0,Z.useCallback)(e=>{a(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})},[]),{paneRef:v,hasRoomForList:y,drawerOpen:b,openDrawer:x,closeDrawer:S}=se(),[C,w]=(0,Z.useState)(``),T=(0,Z.useCallback)(e=>{l(e),S()},[S]),[E,D]=(0,Z.useState)(null),O=(0,Z.useCallback)(e=>{let t=t=>t===e||t.startsWith(`${e}/`);l(e=>e!==null&&t(e)?null:e),a(e=>{let n=new Set([...e].filter(e=>!t(e)));return n.size===e.size?e:n}),D({path:e})},[]),[k,A]=(0,Z.useState)(null),j={assistantId:e,expandedPaths:i,selectedPath:s,showHidden:u,sortMode:f,onToggleExpand:g,onExpandPath:_,onSelectPath:T,onToggleShowHidden:()=>d(e=>!e),onChangeSortMode:p,onPathDeleted:O,onPathRenamed:(0,Z.useCallback)((e,t)=>{let n=n=>n===e?t:n.startsWith(`${e}/`)?t+n.slice(e.length):n;l(e=>e===null?e:n(e)),a(e=>{let t=!1,r=new Set;for(let i of e){let e=n(i);e!==i&&(t=!0),r.add(e)}return t?r:e}),A({from:e,to:t})},[]),search:C,onSearchChange:w};return(0,Q.jsxs)(`div`,{ref:v,className:`flex h-full min-h-0 flex-col gap-4`,children:[y?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:`flex items-center`,children:(0,Q.jsx)(oe,{onClick:x})}),(0,Q.jsx)(K,{open:b,onClose:S,title:t(`workspaceBrowser.drawerTitle`),children:(0,Q.jsx)(Oe,{...j})})]}),(0,Q.jsxs)(`div`,{className:`grid min-h-0 flex-1 gap-4 ${y?`grid-cols-[320px_1fr]`:`grid-cols-1`}`,children:[y?(0,Q.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden rounded-xl border`,style:{backgroundColor:`var(--surface-overlay)`,borderColor:`var(--border-base)`},children:(0,Q.jsx)(Oe,{...j})}):null,(0,Q.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden rounded-xl border`,style:{backgroundColor:`var(--surface-overlay)`,borderColor:`var(--border-base)`},children:(0,Q.jsx)(Se,{assistantId:e,selectedPath:s,showHidden:u,viewMode:m,onChangeViewMode:h,onBrowse:y?void 0:x,pathRename:k,pathDelete:E})})]})]})}function Me(){return(0,Q.jsx)(je,{assistantId:F()})}export{Me as WorkspacePage};
|
|
@@ -13,14 +13,20 @@ exactly (except where noted).
|
|
|
13
13
|
|
|
14
14
|
| Assets | Source | Licence |
|
|
15
15
|
| ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
16
|
-
| `airtable`, `asana`, `calendly`, `discord`, `dropbox`, `hubspot`, `sanity`, `spotify`, `
|
|
16
|
+
| `airtable`, `asana`, `calendly`, `discord`, `dropbox`, `hubspot`, `sanity`, `spotify`, `telegram`, `todoist`, `x` | [Simple Icons](https://github.com/simple-icons/simple-icons) | CC0-1.0 (public domain, no attribution required) |
|
|
17
17
|
| `eventbrite`, `salesforce` | [glincker/thesvg](https://github.com/glincker/thesvg) | MIT (notice below) |
|
|
18
18
|
| `monday` | [WorldVectorLogo](https://worldvectorlogo.com/logo/monday-1) | Trademark of monday.com; no software licence granted (see Trademark, below) |
|
|
19
|
+
| `stripe-link` | [link.com](https://link.com) | Trademark of Stripe; no software licence granted (see Trademark, below) |
|
|
19
20
|
|
|
20
21
|
`monday`'s path data and fill colours are byte-identical to the source. Only
|
|
21
22
|
the outer `viewBox` and a wrapping group transform were changed, to fit the
|
|
22
23
|
source's wide mark into a square icon slot.
|
|
23
24
|
|
|
25
|
+
`stripe-link` is the green Link symbol inlined in link.com's own header, with
|
|
26
|
+
the site's CSS custom properties resolved to the brand colours they carry there
|
|
27
|
+
(`#00D66F` circle, `#011E0F` mark). Link is a Stripe product with its own mark,
|
|
28
|
+
so the parent Stripe `S` is not a stand-in for it.
|
|
29
|
+
|
|
24
30
|
## Unrecorded provenance
|
|
25
31
|
|
|
26
32
|
`apple-notes`, `excel`, `figma`, `github`, `github-dark`, `gmail`,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><title>Link</title><circle cx="20" cy="20" r="20" fill="#00D66F"/><path fill="#011E0F" d="M19.08 8h-6.168c1.2 5.017 4.704 9.305 9.088 12-4.392 2.697-7.888 6.985-9.088 12h6.168c1.528-4.64 5.76-8.672 10.96-9.495v-5.017C24.832 16.672 20.6 12.64 19.08 8Z"/></svg>
|
package/dist/index.html
CHANGED
|
@@ -331,12 +331,12 @@
|
|
|
331
331
|
display: none;
|
|
332
332
|
}
|
|
333
333
|
</style>
|
|
334
|
-
<script type="module" crossorigin src="/assistant/assets/index-
|
|
334
|
+
<script type="module" crossorigin src="/assistant/assets/index-DQDnf_eu.js"></script>
|
|
335
335
|
<link rel="modulepreload" crossorigin href="/assistant/assets/rolldown-runtime-BM3Ffeng.js">
|
|
336
336
|
<link rel="modulepreload" crossorigin href="/assistant/assets/react-DPM_L_aA.js">
|
|
337
|
-
<link rel="modulepreload" crossorigin href="/assistant/assets/vendor-
|
|
338
|
-
<link rel="modulepreload" crossorigin href="/assistant/assets/icons-
|
|
339
|
-
<link rel="stylesheet" crossorigin href="/assistant/assets/index-
|
|
337
|
+
<link rel="modulepreload" crossorigin href="/assistant/assets/vendor-BHZEElF1.js">
|
|
338
|
+
<link rel="modulepreload" crossorigin href="/assistant/assets/icons-J6Mg9wGk.js">
|
|
339
|
+
<link rel="stylesheet" crossorigin href="/assistant/assets/index-Z3rcCmYR.css">
|
|
340
340
|
<script>window.__VELLUM_CONFIG__={"webUrl":"https://www.vellum.ai","platformUrl":"https://platform.vellum.ai"}</script></head>
|
|
341
341
|
<body>
|
|
342
342
|
<!--
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg fill="#
|
|
1
|
+
<svg fill="#635BFF" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Stripe</title><path d="M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg
|
|
1
|
+
<svg role="img" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><title>Link</title><circle cx="20" cy="20" r="20" fill="#00D66F"/><path fill="#011E0F" d="M19.08 8h-6.168c1.2 5.017 4.704 9.305 9.088 12-4.392 2.697-7.888 6.985-9.088 12h6.168c1.528-4.64 5.76-8.672 10.96-9.495v-5.017C24.832 16.672 20.6 12.64 19.08 8Z"/></svg>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{j as t}from"./vendor-CCI2T82b.js";import{b as n,t as r}from"./react-DPM_L_aA.js";import{zr as i}from"./icons-B-6TfGtd.js";import{Ct as a,Kn as o,Ps as s,Ry as c,St as l,_ as u,bn as d,bt as f,ct as p,dt as m,er as h,fn as g,gn as _,it as v,lt as y,mn as b,nt as x,ot as S,pn as C,rt as w,st as T,tn as E,tt as D,un as O,xt as k,zy as A}from"./index-BHBLeC80.js";import{t as j}from"./use-transcript-message-by-id-DKwkoAvU.js";import{ToolDetailBody as M,t as N,toolDetailHeaderTitle as P}from"./tool-detail-panel-uczeeElt.js";var F=e(n(),1);function I(e,t,n){let r=k(t,n.workflow),i=e=>{let t=a(e,n.workflow.byToolUseId);if(t!==null&&r.has(t))return!0;let i=f(e,n.acpByToolUseId);if(i!==null&&n.acpById[i]!==void 0)return!0;let o=l(e);return o!==void 0&&n.backgroundTaskById[o]!==void 0},o=t.filter(e=>!i(e));if(o.length===t.length)return{items:e,toolCalls:t};let s=new Set(o.map(e=>e.id));return{items:e.filter(e=>e.kind!==`toolCall`||s.has(e.toolCall.id)),toolCalls:o}}function L(e,t){let n=j(e),r=s.use.byId(),i=s.use.byToolUseId(),a=s.use.notFoundRunIds(),c=s.use.hydrationFailedRunIds(),l=o.use.byId(),u=o.use.byToolUseId(),d=h.use.byId();return(0,F.useMemo)(()=>{if(!n||t==null)return null;let e=b(n.contentBlocks??[],{splitInlineThinking:n.role!==`user`})[t];if(!e||e.type!==`activity`)return null;let{cardItems:o,toolCalls:s}=C(e.items);return I(o,s,{workflow:{byId:r,byToolUseId:i,notFoundRunIds:a,hydrationFailedRunIds:c},acpById:l,acpByToolUseId:u,backgroundTaskById:d})},[n,t,r,i,a,c,l,u,d])}var R=r(),z=60;function B({payload:e,onClose:n,assistantId:r}){let{t:a}=t(`chat`),[o,s]=(0,F.useState)(null),l=L(e.messageId,e.groupIndex),d=l?.items??e.items,f=l?.toolCalls??e.toolCalls,p=v(d),h=x(p.steps),g=w(p.state,p.steps),_=g===`loading`,y=D(g,p.totalDurationLabel??``,h.failed),b=_&&p.currentStepTitle||y,S=new Map(f.map(e=>[e.id,e])),C=o?o.kind===`thinking`?`Thinking`:P(o):``;return(0,R.jsx)(u,{icon:o?(0,R.jsx)(A,{variant:`outlined`,iconOnly:(0,R.jsx)(i,{}),"aria-label":a(`activityStepsPanel.backAria`),tooltip:a(`activityStepsPanel.backTooltip`),onClick:()=>s(null),className:`shrink-0`}):void 0,titleNode:o?(0,R.jsx)(c,{variant:`title-medium`,className:`min-w-0 shrink truncate py-0.5 leading-snug text-[var(--content-default)]`,children:C}):(0,R.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 py-0.5`,children:[(0,R.jsx)(c,{variant:`title-medium`,className:`min-w-0 shrink truncate leading-snug text-[var(--content-default)]`,children:_?(0,R.jsx)(O,{children:b}):b}),p.stepCount?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{"aria-hidden":!0,className:`size-[3px] shrink-0 rounded-full bg-[var(--content-tertiary)]`}),(0,R.jsx)(c,{variant:`title-medium`,className:`shrink-0 whitespace-nowrap leading-snug text-[var(--content-secondary)]`,children:p.stepCount})]}):null]}),closeLabel:a(`activityStepsPanel.closeSteps`),onClose:n,children:o?(0,R.jsx)(H,{detail:o,assistantId:r}):(0,R.jsx)(m,{steps:p.steps,timeline:!0,renderStep:t=>(0,R.jsx)(V,{step:t,activeDetail:o,onOpenDetail:s,lookupToolCall:e=>S.get(e),messageId:e.messageId,groupIndex:e.groupIndex})})})}function V({step:e,activeDetail:n,onOpenDetail:r,lookupToolCall:i,messageId:a,groupIndex:o}){let{t:s}=t(`chat`);if(e.kind===`thinking`){let t=a!=null&&e.thinkingItemIndex!=null?{messageId:a,thinkingGroupIndex:o,thinkingItemIndex:e.thinkingItemIndex}:{};return(0,R.jsx)(p,{iconName:`brain`,label:d(_(e.text),z),ariaLabel:s(`activityStepsPanel.viewThinkingAria`),active:!1,onClick:()=>r({kind:`thinking`,toolCallId:``,toolName:``,title:s(`activityStepsPanel.thinkingTitle`),activity:``,input:{},status:`completed`,thinkingText:e.text,...t})})}if(e.kind===`web_search`)return(0,R.jsx)(T,{step:e});if(e.kind===`web_search_error`)return(0,R.jsx)(S,{step:e});if(e.kind!==`tool`)return(0,R.jsx)(y,{step:e});let c=i(e.toolCallId);return(0,R.jsx)(p,{iconName:e.iconName,label:e.activity||e.info||e.title,active:n?.toolCallId===e.toolCallId,onClick:()=>{c&&r(g(c))}})}function H({detail:e,assistantId:t}){let n=N(e.kind===`thinking`?e.messageId:void 0,e.thinkingGroupIndex,e.thinkingItemIndex);return(0,R.jsx)(`div`,{className:`flex flex-col gap-4`,children:e.kind===`thinking`?(0,R.jsx)(E,{content:n??e.thinkingText??``,hardLineBreaks:!0,assistantId:t}):(0,R.jsx)(M,{detail:e,assistantId:t})})}export{B as ActivityStepsPanel};
|