@vellumai/web 0.10.0-staging.1 → 0.10.0-staging.2
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/{BundleConfirmPage-DJIGg7bK.js → BundleConfirmPage-CkXUMWg6.js} +1 -1
- package/dist/assets/account-page-D5qDx37o.js +1 -0
- package/dist/assets/{add-credits-modal-DvrQcX_K.js → add-credits-modal-DpHTkxV2.js} +1 -1
- package/dist/assets/{advanced-page-yAmIJ0-O.js → advanced-page-DWX9qbxa.js} +1 -1
- package/dist/assets/ai-page-Cp6X0S2W.js +1 -0
- package/dist/assets/{api-CGh7zC7Z.js → api-BSHLYsxJ.js} +1 -1
- package/dist/assets/{api-key-screen-CSIU6tlW.js → api-key-screen-DvV4RiY0.js} +1 -1
- package/dist/assets/{archive-page-C2M9DCgh.js → archive-page-B7i9-bc2.js} +1 -1
- package/dist/assets/{assistant-api-ClCDtfaz.js → assistant-api-D7r6RWoh.js} +1 -1
- package/dist/assets/{assistant-feature-flag-store-BMVR2Dx7.js → assistant-feature-flag-store-D2CUHsmL.js} +1 -1
- package/dist/assets/{assistant-identity-store-BIu8LXuD.js → assistant-identity-store-BFaMpt_3.js} +1 -1
- package/dist/assets/{assistant-status-panel-CqM_xxPL.js → assistant-status-panel-CMdqv7mF.js} +1 -1
- package/dist/assets/auth-store-CrTf0uWL.js +7 -0
- package/dist/assets/{billing-page-BFPsW1V-.js → billing-page-CMhUfBBf.js} +3 -3
- package/dist/assets/{bookmarks-page-Cuqjyd6n.js → bookmarks-page-BBlx8L6h.js} +1 -1
- package/dist/assets/{build-state-CI5r3DCj.js → build-state-DqzVxR37.js} +1 -1
- package/dist/assets/{client-feature-flag-store-C1ws4QpG.js → client-feature-flag-store-ivPVcKfH.js} +1 -1
- package/dist/assets/{command-palette-window-page-DmXX3g9_.js → command-palette-window-page-CHu_bF8J.js} +1 -1
- package/dist/assets/{command-palette-c-GkLSgn.js → command-palette-yIWk_niH.js} +1 -1
- package/dist/assets/{community-page-fRxEWvml.js → community-page-CiartSQX.js} +1 -1
- package/dist/assets/{connect-page-fCkHk4FB.js → connect-page-Bvs0EgCJ.js} +1 -1
- package/dist/assets/{consent-controls-C1u7ZVkJ.js → consent-controls-cNdj_gb8.js} +1 -1
- package/dist/assets/{contacts-page-route-DWj-5GZ2.js → contacts-page-route-C9IaBKKe.js} +1 -1
- package/dist/assets/{conversation-queries-C5J_wBFK.js → conversation-queries-Dt4RoWIo.js} +1 -1
- package/dist/assets/{debug-page-NtJJIUeZ.js → debug-page-DGQMqihK.js} +2 -2
- package/dist/assets/{deploy-dialogs-ZukSD1Ok.js → deploy-dialogs-DWIqIDdv.js} +1 -1
- package/dist/assets/{developer-page-uTOD0kmX.js → developer-page-ClPMK7n8.js} +1 -1
- package/dist/assets/{devices-page-t38uJ_Rj.js → devices-page-N9s-okC5.js} +1 -1
- package/dist/assets/{dictation-overlay-page-bgPMse-0.js → dictation-overlay-page-D_eJHI6R.js} +1 -1
- package/dist/assets/{document-viewer-page-4J5Pxy_g.js → document-viewer-page-CmSYAtEc.js} +1 -1
- package/dist/assets/{earn-credits-modal-Dw8Q142A.js → earn-credits-modal-OFm9gF2_.js} +1 -1
- package/dist/assets/{emails-page-DtWzs4ko.js → emails-page-psWdsGCD.js} +1 -1
- package/dist/assets/esm--X8IY1ec.js +1 -0
- package/dist/assets/{esm-BhnwM79d.js → esm-Cs-ixW_a.js} +2 -2
- package/dist/assets/{esm-CiJceiot.js → esm-DkmmS1Rg.js} +2 -2
- package/dist/assets/{esm-D18RlLzi.js → esm-DxJBeF-2.js} +2 -2
- package/dist/assets/{esm-Fz1t-KBM.js → esm-JmlvYCir.js} +2 -2
- package/dist/assets/{esm-RSkzRC1V.js → esm-LyzWW9Z1.js} +2 -2
- package/dist/assets/{feature-flag-catalog-zKzlKAIS.js → feature-flag-catalog-DEr38CMM.js} +1 -1
- package/dist/assets/{file-editor-Dsmrsieh.js → file-editor-CKotrZYQ.js} +1 -1
- package/dist/assets/{general-page-BmuGD9t1.js → general-page-CaAos_hp.js} +1 -1
- package/dist/assets/hatching-screen-CtgkoJwM.js +1 -0
- package/dist/assets/{home-page-route-B9TWPA_Z.js → home-page-route-syOFwCBN.js} +1 -1
- package/dist/assets/hosting-screen-Duoz3ECF.js +1 -0
- package/dist/assets/{identity-page-route-C_hcLi9A.js → identity-page-route-gCgQUpAC.js} +1 -1
- package/dist/assets/{index-DjBiif5r.js → index-LP2PV_QY.js} +31 -31
- package/dist/assets/{inspect-page-Ds4ete37.js → inspect-page-CYszP4kv.js} +3 -3
- package/dist/assets/{install-BTdfOS56.js → install-BK1MtTfb.js} +1 -1
- package/dist/assets/{integrations-page-BcINhzsa.js → integrations-page-8RrTqdmS.js} +1 -1
- package/dist/assets/{intelligence-layout-D4ZCqIzW.js → intelligence-layout-DMxSxRZX.js} +1 -1
- package/dist/assets/{keyboard-shortcuts-page-0nrN6XlU.js → keyboard-shortcuts-page-q_QkRUkC.js} +1 -1
- package/dist/assets/{library-detail-page-DRWl6nzT.js → library-detail-page-_lrynJRj.js} +1 -1
- package/dist/assets/{library-page-tkcbXp1r.js → library-page-CKh1x82Q.js} +1 -1
- package/dist/assets/{login-flow-B745Do-L.js → login-flow-BMwbZfKA.js} +1 -1
- package/dist/assets/{login-page-mv9EfrL5.js → login-page-CDtyRiaq.js} +1 -1
- package/dist/assets/{logout-page-orHUxw4u.js → logout-page-vdgRWyPg.js} +1 -1
- package/dist/assets/{logs-layout-DRmlEOMI.js → logs-layout-btcFTD4i.js} +1 -1
- package/dist/assets/{mcp-page-D3WCeVhI.js → mcp-page-DdG8hp_Z.js} +1 -1
- package/dist/assets/{memory-router-playground-page-1HTpZRzo.js → memory-router-playground-page-Bt_KJsxN.js} +1 -1
- package/dist/assets/{metric-card-CXCuWhNG.js → metric-card-B3EBP9m4.js} +1 -1
- package/dist/assets/{mobile-sidebar-drawer-Bx5YTlNy.js → mobile-sidebar-drawer-Cd68jgRD.js} +1 -1
- package/dist/assets/{native-file-Cd0uSBuG.js → native-file-CbhjzPxL.js} +2 -2
- package/dist/assets/{notifications-page-Z4rBfcim.js → notifications-page-BilkBeoP.js} +1 -1
- package/dist/assets/{oauth-complete-page-dL5TWauu.js → oauth-complete-page-BC7UElNs.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-ygMAHToC.js → oauth-popup-complete-page-CiTNEvfk.js} +1 -1
- package/dist/assets/{pairing-page-B_goGm8F.js → pairing-page-Dc-5wQmY.js} +1 -1
- package/dist/assets/{platform-loopback-page-40umE5Nz.js → platform-loopback-page-Wie5xEwr.js} +1 -1
- package/dist/assets/{plugin-detail-page-BnQ2kf7Y.js → plugin-detail-page-CtWtIYBW.js} +1 -1
- package/dist/assets/{plugins-page-pcTOnJpU.js → plugins-page-1vkkdBfG.js} +1 -1
- package/dist/assets/{prechat-route-Cbk86DeT.js → prechat-route-CG8Qo2Tq.js} +1 -1
- package/dist/assets/{prefs-DjG8e7dK.js → prefs-Mrqh1A7Y.js} +1 -1
- package/dist/assets/{privacy-page-ChgL1FV8.js → privacy-page-rNHkqHfs.js} +1 -1
- package/dist/assets/{privacy-screen-CND_dL-J.js → privacy-screen-Cck6z5wu.js} +1 -1
- package/dist/assets/{provider-callback-page-BB-waTRl.js → provider-callback-page-CrZXFWM7.js} +1 -1
- package/dist/assets/{provider-signup-page-DKG8Ow1Y.js → provider-signup-page-Beuafn_s.js} +1 -1
- package/dist/assets/{proxy-BaYss8LN.js → proxy-CQsxT9tJ.js} +1 -1
- package/dist/assets/{quick-input-page-rj5DDrdc.js → quick-input-page-0PEcj6WT.js} +1 -1
- package/dist/assets/{research-mock-page-Crn0z5z6.js → research-mock-page-D7-VpSBh.js} +1 -1
- package/dist/assets/{research-onboarding-route-BtoNZ0do.js → research-onboarding-route-DAPVTFHs.js} +2 -2
- package/dist/assets/{review-terms-screen-BvG3xAnz.js → review-terms-screen-C8XTIUYc.js} +1 -1
- package/dist/assets/sdk.gen-DRL3oRwz.js +1 -0
- package/dist/assets/{select-assistant-screen-EaSNw87g.js → select-assistant-screen-PZqDGbI2.js} +1 -1
- package/dist/assets/{settings-layout-0KMmprEe.js → settings-layout-ByZKbs5J.js} +1 -1
- package/dist/assets/{share-feedback-modal-DDiWBGt6.js → share-feedback-modal-CuxFlSR6.js} +1 -1
- package/dist/assets/{sidebar-tree-SP7fohd6.js → sidebar-tree-BZUv9ggX.js} +1 -1
- package/dist/assets/{signup-page-mHalxyN4.js → signup-page-BWnAp0Bw.js} +1 -1
- package/dist/assets/{signup-shell-CIXfwueV.js → signup-shell-D6LXKfGy.js} +1 -1
- package/dist/assets/{skills-page-D_3kRG_-.js → skills-page-BAodqgt1.js} +1 -1
- package/dist/assets/{sounds-page-DWJKkT-Q.js → sounds-page-hDPPoEEQ.js} +1 -1
- package/dist/assets/{step-indicator-dots-CxPpUjj-.js → step-indicator-dots-CwbobrxS.js} +1 -1
- package/dist/assets/{subagent-detail-panel-CO8xcBkY.js → subagent-detail-panel-Db9feY1I.js} +1 -1
- package/dist/assets/{system-events-page-BT7c7g29.js → system-events-page-DYi0jI1g.js} +1 -1
- package/dist/assets/{tiptap-document-editor-CH0hLQg8.js → tiptap-document-editor-DD5B0bf0.js} +1 -1
- package/dist/assets/{tool-detail-panel-DjQRk3C4.js → tool-detail-panel-DZf8WIS6.js} +1 -1
- package/dist/assets/{trace-page-DXoNPNF2.js → trace-page-DSDi-YYp.js} +1 -1
- package/dist/assets/typed-storage-SkUUNYR1.js +1 -0
- package/dist/assets/{upgrade-cancel-page-D3ClLquH.js → upgrade-cancel-page-DHzkb9An.js} +1 -1
- package/dist/assets/{upgrade-success-page-D8M_sxa0.js → upgrade-success-page-CIooZvxn.js} +1 -1
- package/dist/assets/{usage-page-CdTcaS_i.js → usage-page-XWL-WFaq.js} +1 -1
- package/dist/assets/use-is-org-ready-BoWiaeMc.js +1 -0
- package/dist/assets/{use-onboarding-login-CrYY0jua.js → use-onboarding-login-CxXV3Iue.js} +1 -1
- package/dist/assets/{use-reduced-motion-C9zjvTsb.js → use-reduced-motion-CXbk4fYO.js} +1 -1
- package/dist/assets/{utils-BjpQXgRD.js → utils-B5-aBe5u.js} +1 -1
- package/dist/assets/{voice-page-DYQ_Bjkg.js → voice-page-BwA-ETwe.js} +1 -1
- package/dist/assets/{weather-forecast-display-PvQnLjFm.js → weather-forecast-display-tzc5l6oR.js} +1 -1
- package/dist/assets/{web-CUsG7AaW.js → web-DKvxfNu_.js} +1 -1
- package/dist/assets/{welcome-screen-Csr3Xjbb.js → welcome-screen-BkL_1qYq.js} +1 -1
- package/dist/assets/{workflow-detail-panel-C1hoa9n4.js → workflow-detail-panel-DYQvTG3m.js} +1 -1
- package/dist/assets/{workspace-page-D2jf__1O.js → workspace-page-t_8JOOXv.js} +1 -1
- package/dist/index.html +39 -38
- package/package.json +1 -1
- package/dist/assets/account-page-B-pFQ4QZ.js +0 -1
- package/dist/assets/ai-page-CSwTzhul.js +0 -1
- package/dist/assets/auth-store-CyAWX99c.js +0 -6
- package/dist/assets/hatching-screen-D9XPAXWn.js +0 -1
- package/dist/assets/hosting-screen-BFr_zyC4.js +0 -1
- package/dist/assets/sdk.gen-D7k-QjYl.js +0 -1
- package/dist/assets/use-is-org-ready-CMpj-2ts.js +0 -1
- /package/dist/assets/{about-page-CVV-MCho.js → about-page-Bue2vNnY.js} +0 -0
- /package/dist/assets/{account-shell-e28XT1Gw.js → account-shell-oWV1wIYb.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-D6zRL_dw.js → avatar-bundled-components-UfXe4Pfu.js} +0 -0
- /package/dist/assets/{avatar-svg-compositor-BDV_OAev.js → avatar-svg-compositor-Bbqkq_FE.js} +0 -0
- /package/dist/assets/{build.umd-BrMpqUXB.js → build.umd-TjHHwLRY.js} +0 -0
- /package/dist/assets/{composer-focus-zRjwsXmH.js → composer-focus-DP3jFn8K.js} +0 -0
- /package/dist/assets/{contacts-gateway-AXbkzYpn.js → contacts-gateway-Cf32jSYa.js} +0 -0
- /package/dist/assets/{conversation-selection-DCYDhK6e.js → conversation-selection-BMndnV1U.js} +0 -0
- /package/dist/assets/{conversation-store-CBtnzP2n.js → conversation-store-BSxi0r0X.js} +0 -0
- /package/dist/assets/{danger-zone-redirect-page-BiH15rFW.js → danger-zone-redirect-page-5H-AuIvi.js} +0 -0
- /package/dist/assets/{definitions-DhIUJp4x.js → definitions-BqAtozTh.js} +0 -0
- /package/dist/assets/{detail-card-DeCfFKxN.js → detail-card-CLwQ17AA.js} +0 -0
- /package/dist/assets/{edit-chat-session-BUoLTWlo.js → edit-chat-session-B1tanC3Z.js} +0 -0
- /package/dist/assets/{effective-timezone-DKIHYiQs.js → effective-timezone-wo2Bhl1P.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-BRNanslS.js → emoji-catalog-data-B6Q5tPZJ.js} +0 -0
- /package/dist/assets/{environment-store-BPyWfH08.js → environment-store-Ck7wXCrL.js} +0 -0
- /package/dist/assets/{format-2xr96iXO.js → format-B12w_G9l.js} +0 -0
- /package/dist/assets/{format-date-CVdOzfYM.js → format-date-B6hTwbOM.js} +0 -0
- /package/dist/assets/{format-file-size-HIBUjVRS.js → format-file-size-DxhjMSDx.js} +0 -0
- /package/dist/assets/{haptics-1zSZHQps.js → haptics-BtSYrQNK.js} +0 -0
- /package/dist/assets/{impersonate-version-flag-BBe6qZWh.js → impersonate-version-flag-ZdQOgpO3.js} +0 -0
- /package/dist/assets/{lib-CLT_iFkF.js → lib-CQbq3OZw.js} +0 -0
- /package/dist/assets/{llm-dimension-Czl_J9gg.js → llm-dimension-Cs4q1Ovq.js} +0 -0
- /package/dist/assets/{misc-BurDhv2T.js → misc-Bo3spjOe.js} +0 -0
- /package/dist/assets/{native-deep-link-CFFM1NaG.js → native-deep-link-_WT_7c80.js} +0 -0
- /package/dist/assets/{page-shell-CTmljSuy.js → page-shell-C0oiLAoY.js} +0 -0
- /package/dist/assets/{password-reset-page-DJQASQbj.js → password-reset-page-Cf5SQHDV.js} +0 -0
- /package/dist/assets/{pdf-DDcCO6Ea.js → pdf-CMJp1GoR.js} +0 -0
- /package/dist/assets/{prechat-names-Dl1bWxyY.js → prechat-names-BZIP2Y-H.js} +0 -0
- /package/dist/assets/{provider-key-AiDfAj3X.js → provider-key-DH6JmPXt.js} +0 -0
- /package/dist/assets/{public-asset-DSNbX6CW.js → public-asset-Dp-i4xhW.js} +0 -0
- /package/dist/assets/{reduced-motion-C-oXOoz4.js → reduced-motion-Do7LyjE6.js} +0 -0
- /package/dist/assets/{schedules-BfL_KgUR.js → schedules-DqkGi2Lm.js} +0 -0
- /package/dist/assets/{semver-CWB8BPhv.js → semver-DmouQEQK.js} +0 -0
- /package/dist/assets/{setting-row-Bke-X9s7.js → setting-row-IILQu7AE.js} +0 -0
- /package/dist/assets/{sound-manager-Cuz_K65T.js → sound-manager-CC2af7bI.js} +0 -0
- /package/dist/assets/{subagent-status-BZXtYoyE.js → subagent-status-CaVVlphf.js} +0 -0
- /package/dist/assets/{system-events-redirect-page-BhFhVZX3.js → system-events-redirect-page-CmooXfba.js} +0 -0
- /package/dist/assets/{usage-window-DOM_y3PN.js → usage-window-BO_9IIjX.js} +0 -0
- /package/dist/assets/{use-active-assistant-id-BtGthKQp.js → use-active-assistant-id-512RohBL.js} +0 -0
- /package/dist/assets/{use-bus-subscription-DSrmmjvt.js → use-bus-subscription-RUbeQDfy.js} +0 -0
- /package/dist/assets/{use-is-mobile-C0ubX5Es.js → use-is-mobile-CvT53Qs1.js} +0 -0
- /package/dist/assets/{use-plugin-drift-DyjoyDBs.js → use-plugin-drift-BUHRYq2W.js} +0 -0
- /package/dist/assets/{viewer-store-Cfso5FNU.js → viewer-store-CInCucV8.js} +0 -0
- /package/dist/assets/{web-D5xtOjGa.js → web-4XHemeeJ.js} +0 -0
- /package/dist/assets/{web-D9FZSZCN.js → web-BEsXuN9d.js} +0 -0
- /package/dist/assets/{web-DgFXqVj3.js → web-BcNl6r2T.js} +0 -0
- /package/dist/assets/{web-liDG2TJr.js → web-BorhjBfF.js} +0 -0
- /package/dist/assets/{web-1_PP1DD_.js → web-CVJTgRoJ.js} +0 -0
- /package/dist/assets/{web-Ci20mxIU.js → web-DALQZUJ4.js} +0 -0
- /package/dist/assets/{xterm-DDh2F3IU.js → xterm-BJ2bbKsF.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-CyzlQnJv.js → xterm-addon-fit-BJTajn72.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./is-electron-BuSDabCt.js";import{t as i}from"./arrow-up-BsbPgGtM.js";import{t as a}from"./public-asset-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./is-electron-BuSDabCt.js";import{t as i}from"./arrow-up-BsbPgGtM.js";import{t as a}from"./public-asset-Dp-i4xhW.js";var o=e(t(),1);async function s(e){r()&&await window.vellum?.quickInput?.submit(e)}async function c(){r()&&await window.vellum?.quickInput?.dismiss()}var l=n();function u(){let[e,t]=(0,o.useState)(``),n=(0,o.useRef)(null);(0,o.useEffect)(()=>{n.current?.focus()},[]);let r=(0,o.useCallback)(n=>{n.preventDefault();let r=e.trim();r&&(s(r),t(``))},[e]),u=(0,o.useCallback)(e=>{e.key===`Escape`&&(e.preventDefault(),c())},[]);return(0,l.jsx)(`div`,{className:`flex h-screen w-screen items-center justify-center bg-transparent p-2`,children:(0,l.jsxs)(`form`,{onSubmit:r,className:`flex w-full items-center gap-3 rounded-2xl border border-[var(--border-default)] bg-[var(--surface-base)] px-4 py-3 shadow-lg`,children:[(0,l.jsx)(`img`,{src:a(`/vellum-logo.svg`),alt:`Vellum`,width:24,height:24,className:`shrink-0 dark:hidden`,draggable:!1}),(0,l.jsx)(`img`,{src:a(`/vellum-logo-white.svg`),alt:`Vellum`,width:24,height:24,className:`hidden shrink-0 dark:block`,draggable:!1}),(0,l.jsx)(`input`,{ref:n,type:`text`,value:e,onChange:e=>t(e.target.value),onKeyDown:u,placeholder:`Ask Vellum anything...`,className:`min-w-0 flex-1 bg-transparent text-sm text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none`}),(0,l.jsx)(`button`,{type:`submit`,disabled:!e.trim(),className:`flex size-7 shrink-0 items-center justify-center rounded-full bg-[var(--surface-accent)] text-[var(--content-on-accent)] transition-opacity disabled:opacity-30`,children:(0,l.jsx)(i,{size:16})})]})})}export{u as QuickInputPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,r as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{a as o}from"./routes-BKwsRssF.js";import{t as s}from"./client-feature-flag-store-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,r as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{a as o}from"./routes-BKwsRssF.js";import{t as s}from"./client-feature-flag-store-ivPVcKfH.js";import{t as c}from"./conversation-store-BSxi0r0X.js";import{t as l}from"./conversation-selection-BMndnV1U.js";import{pt as u}from"./index-LP2PV_QY.js";var d=e(t(),1),f=a(),p=[{claim:`Software engineer based in Austin, TX`,confidence:`confident`,sources:[`https://github.com/example-dev`]},{claim:`Product engineer at an early-stage AI startup`,confidence:`confident`,sources:[`https://example.com/team`]},{claim:`Maintains an open-source CLI tool for local LLM evaluation and tooling`,confidence:`confident`,sources:[`https://github.com/example-dev`,`https://example.com/project`]},{claim:`Primarily writes TypeScript and Go`,confidence:`confident`,sources:[`https://github.com/example-dev`]},{claim:`Came up through a coding bootcamp rather than a CS degree`,confidence:`maybe`,sources:[]}],m=[`Summarize this week's AI model releases for me`,`Draft a technical blog post from your latest notes`,`Build a tracker for competitor product launches`,`Analyze a CSV of metrics and surface the trends`];function h(e){return`https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&sz=64`}function g(){let e=r(),t=s.use.researchOnboarding(),[a,g]=(0,d.useState)(`results`),[_,v]=(0,d.useState)(()=>new Map),[y,b]=(0,d.useState)(!1),x=p.map((e,t)=>({fact:e,index:t}));return t?(0,f.jsxs)(`div`,{className:`relative h-screen w-screen`,children:[(0,f.jsx)(`div`,{className:`absolute left-1/2 top-3 z-50 flex -translate-x-1/2 gap-1 rounded-full border border-[var(--border-base)] bg-[var(--surface-lift)] p-1`,children:[`loading`,`results`,`empty`].map(e=>(0,f.jsx)(n,{variant:a===e?`primary`:`ghost`,size:`compact`,onClick:()=>g(e),children:e},e))}),(0,f.jsx)(u,{mode:a,loadingContent:(0,f.jsxs)(`div`,{className:`text-[var(--content-secondary)]`,children:[(0,f.jsx)(`p`,{className:`text-lg`,children:`Getting to know you…`}),(0,f.jsx)(`p`,{className:`text-body-medium-lighter`,children:`(mock — the live flow shows the search activity feed here)`})]}),items:x,removals:_,suggestions:m,resultsTitle:`Here's what I know about you. You can remove any that aren't true:`,showDeeperDiveCard:!y,showSuggestions:y,canContinue:!0,resolveFavicon:h,onRemove:e=>v(t=>t.has(e)?t:new Map(t).set(e,null)),onSetReason:(e,t)=>v(n=>new Map(n).set(e,t)),onRestore:e=>v(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n}),onDeeperDive:()=>b(!0),onGoodForNow:()=>b(!0),onSuggestionClick:t=>{let n=l();c.getState().setActiveConversationId(n),e(`${o.conversation(n)}?prompt=${encodeURIComponent(t)}`)},onContinue:()=>e(o.assistant)})]}):(0,f.jsx)(i,{to:o.assistant,replace:!0})}export{g as ResearchMockPage};
|
package/dist/assets/{research-onboarding-route-BtoNZ0do.js → research-onboarding-route-DAPVTFHs.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,r as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./input-CwdmSRlD.js";import{
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,r as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./input-CwdmSRlD.js";import{n as s,q as c}from"./auth-store-CrTf0uWL.js";import{a as l}from"./routes-BKwsRssF.js";import{t as u}from"./client-feature-flag-store-ivPVcKfH.js";import{an as d,ft as f,yt as p}from"./index-LP2PV_QY.js";import{t as m}from"./prechat-names-BZIP2Y-H.js";var h=e(t(),1);function g({firstName:e,lastName:t,occupation:n}){let r=[e.trim(),t.trim()].filter(Boolean).join(` `),i=n.trim();return`${[r?`My name is ${r}.`:``,i?`I work as ${i}.`:``].filter(Boolean).join(` `)||`I'd like you to get to know me before we start working together.`}
|
|
2
2
|
|
|
3
3
|
Before we dive in, get to know me. Search the web for what's publicly known about the person matching my name and role, and infer a handful of things about who I am — what I do, my role, where I'm based, what I'm into, anything that would help you assist me better. Lean on public sources (LinkedIn, company pages, social profiles, articles). It's fine to make reasonable inferences and label them honestly.
|
|
4
4
|
|
|
@@ -35,4 +35,4 @@ Rules for "suggestions":
|
|
|
35
35
|
- Make them feel concrete and immediately runnable, not generic.
|
|
36
36
|
|
|
37
37
|
Don't include anything sensitive or private. If you found very little, lean on "guessing" claims and broadly useful suggestions for my role.
|
|
38
|
-
Output ONLY the JSON object — no code fence, no extra text.`}var _=a();function v({initialFirstName:e=``,initialLastName:t=``,onSubmit:r}){let[i,a]=(0,h.useState)(e),[s,c]=(0,h.useState)(t),[l,u]=(0,h.useState)(``),d=i.trim().length>0&&l.trim().length>0;function p(){d&&r({firstName:i,lastName:s,occupation:l})}return(0,_.jsx)(f,{showCreatureFooter:!1,children:(0,_.jsxs)(`form`,{className:`mx-auto flex min-h-screen w-full max-w-md flex-col px-6 pb-40 text-[var(--content-default)]`,onSubmit:e=>{e.preventDefault(),p()},children:[(0,_.jsxs)(`div`,{className:`flex flex-1 flex-col items-center pt-16`,children:[(0,_.jsx)(`h1`,{className:`text-center text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:`Let's start with you.`}),(0,_.jsx)(`p`,{className:`mt-2 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`A few details so I can get to know you before we dive in.`}),(0,_.jsxs)(`div`,{className:`mt-8 flex w-full flex-col gap-6`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,_.jsx)(o,{label:`First name`,placeholder:`First name`,value:i,onChange:e=>a(e.target.value),autoFocus:!0,fullWidth:!0}),(0,_.jsx)(o,{label:`Last name`,placeholder:`Last name`,value:s,onChange:e=>c(e.target.value),fullWidth:!0}),(0,_.jsx)(o,{label:`What do you do?`,placeholder:`e.g. Product designer at a fintech startup`,value:l,onChange:e=>u(e.target.value),fullWidth:!0})]})]}),(0,_.jsx)(`div`,{className:`flex w-full flex-col gap-2 pb-4`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:(0,_.jsx)(n,{type:`submit`,variant:`primary`,size:`regular`,fullWidth:!0,disabled:!d,className:`h-11 text-base`,children:`Continue`})})]})})}function y(){let e=r(),t=
|
|
38
|
+
Output ONLY the JSON object — no code fence, no extra text.`}var _=a();function v({initialFirstName:e=``,initialLastName:t=``,onSubmit:r}){let[i,a]=(0,h.useState)(e),[s,c]=(0,h.useState)(t),[l,u]=(0,h.useState)(``),d=i.trim().length>0&&l.trim().length>0;function p(){d&&r({firstName:i,lastName:s,occupation:l})}return(0,_.jsx)(f,{showCreatureFooter:!1,children:(0,_.jsxs)(`form`,{className:`mx-auto flex min-h-screen w-full max-w-md flex-col px-6 pb-40 text-[var(--content-default)]`,onSubmit:e=>{e.preventDefault(),p()},children:[(0,_.jsxs)(`div`,{className:`flex flex-1 flex-col items-center pt-16`,children:[(0,_.jsx)(`h1`,{className:`text-center text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:`Let's start with you.`}),(0,_.jsx)(`p`,{className:`mt-2 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`A few details so I can get to know you before we dive in.`}),(0,_.jsxs)(`div`,{className:`mt-8 flex w-full flex-col gap-6`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,_.jsx)(o,{label:`First name`,placeholder:`First name`,value:i,onChange:e=>a(e.target.value),autoFocus:!0,fullWidth:!0}),(0,_.jsx)(o,{label:`Last name`,placeholder:`Last name`,value:s,onChange:e=>c(e.target.value),fullWidth:!0}),(0,_.jsx)(o,{label:`What do you do?`,placeholder:`e.g. Product designer at a fintech startup`,value:l,onChange:e=>u(e.target.value),fullWidth:!0})]})]}),(0,_.jsx)(`div`,{className:`flex w-full flex-col gap-2 pb-4`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:(0,_.jsx)(n,{type:`submit`,variant:`primary`,size:`regular`,fullWidth:!0,disabled:!d,className:`h-11 text-base`,children:`Continue`})})]})})}function y(){let e=r(),t=s.use.user(),n=p.use.enterFocus(),a=p.use.exitFocus(),o=p.use.beginCheckin(),f=u.use.researchOnboarding(),y=u.use.hydrated();(0,h.useEffect)(()=>{a()},[a]);function b({firstName:t,lastName:r,occupation:i}){let a=[t.trim(),r.trim()].filter(Boolean).join(` `),s=t.trim();d({tools:[],tasks:[],tone:m,...a?{userName:a}:{},...i.trim()?{occupation:i.trim()}:{},initialMessage:g({firstName:t,lastName:r,occupation:i}),title:s?`Getting to know ${s}`:`Getting to know you`}),o(a||void 0),n(),c.markExpectingFirstMessage(),c.checkAssistant().finally(()=>{e(`${l.assistant}?onboarding=1`,{replace:!0})})}return f?(0,_.jsx)(v,{initialFirstName:t?.firstName??``,initialLastName:t?.lastName??``,onSubmit:b}):y?(0,_.jsx)(i,{to:l.assistant,replace:!0}):null}export{y as ResearchOnboardingRoute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./is-electron-BuSDabCt.js";import{f as s,i as c,n as l}from"./auth-store-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./is-electron-BuSDabCt.js";import{f as s,i as c,n as l}from"./auth-store-CrTf0uWL.js";import{t as u}from"./return-to-Bc7amvZZ.js";import{a as d}from"./routes-BKwsRssF.js";import{c as f,d as p,f as m,l as h,s as g,u as _}from"./prefs-Mrqh1A7Y.js";import{Vr as v,ft as y,ta as b}from"./index-LP2PV_QY.js";import{n as x,t as S}from"./consent-controls-cNdj_gb8.js";var C=e(t(),1),w=a();function T(){let e=r(),[t]=i(),a=l.use.user()?.id??null,T=l.use.logout(),E=o(),D=c(),[O,k]=m(),[A,j]=h(),[M,N]=_(),[P,F]=p(),[I]=g(),[L]=f(),[R]=(0,C.useState)(()=>!O),[z]=(0,C.useState)(()=>!A),[B]=(0,C.useState)(()=>!I),[V]=(0,C.useState)(()=>!L),H=!R&&!z&&!B&&!V,U=R||H,W=z||H,G=B||H,K=V||H,q=!H&&!R&&!z,J=H?`Terms & privacy`:q?`Review your privacy preferences`:`Updated terms`,Y=H?`Review your terms and privacy preferences anytime.`:q?`Confirm your privacy preferences to continue.`:`We've updated our terms. Please review and accept to continue.`,X=(0,C.useCallback)(()=>{s({userId:a,tos:O,privacy:A,shareAnalytics:M,shareDiagnostics:P,hasPlatformSession:D}),e(u(t.get(`returnTo`),d.assistant),{replace:!0})},[A,D,e,t,M,P,O,a]),Z=(0,C.useCallback)(async()=>{await T(),v(d.account.login)},[T]);return(0,w.jsx)(y,{showCreatureFooter:!1,children:(0,w.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${E?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`px-6 py-16`} text-[var(--content-default)]`,children:[(0,w.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full border border-[var(--border-subtle)] bg-[var(--surface-lift)]`,style:{animation:`fadeInUp 0.5s ease-out 0.05s both`},children:(0,w.jsx)(b,{className:`h-6 w-6 text-[var(--content-secondary)]`,strokeWidth:1.75})}),(0,w.jsx)(`h1`,{className:`mt-5 ${E?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,style:{animation:`fadeInUp 0.5s ease-out 0.12s both`},children:J}),(0,w.jsx)(`p`,{className:`text-center text-body-medium-lighter text-[var(--content-tertiary)] ${E?`mt-3`:`mt-3.5`}`,style:{animation:`fadeInUp 0.5s ease-out 0.2s both`},children:Y}),(G||K)&&(0,w.jsx)(x,{electron:E,showAnalytics:G,showDiagnostics:K,shareAnalytics:M,shareDiagnostics:P,onShareAnalyticsChange:N,onShareDiagnosticsChange:F,className:`mt-9 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.28s both`}}),(W||U)&&(0,w.jsx)(S,{electron:E,showPrivacy:W,showTos:U,privacyConsent:A,tosAccepted:O,onPrivacyChange:j,onTosChange:k,className:`mt-6 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.36s both`}}),(0,w.jsxs)(`div`,{className:`mt-9 flex w-full flex-col ${E?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.44s both`},children:[(0,w.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:U&&!O||W&&!A,onClick:X,className:E?void 0:`h-11 text-base`,children:`Continue`}),(0,w.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,onClick:Z,className:E?void 0:`h-11 text-base`,children:`Log out`})]})]})})}export{T as ReviewTermsScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./client.gen-Cuv6iN0E.js";var t=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/`,...t}),n=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/backups/`,...t}),r=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/backups/`,...t}),i=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/backups/{snapshot_name}/restore/`,...t}),a=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/history/`,...t}),o=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/history/{doctor_session_id}/`,...t}),s=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/sessions/`,...t}),c=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/sessions/{session_id}/`,...t}),l=t=>(t.client??e).sse.get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/sessions/{session_id}/events/`,...t}),u=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/doctor/sessions/{session_id}/messages/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),d=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/domains/`,...t}),f=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/domains/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),p=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/domains/{id}/`,...t}),m=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/domains/{id}/verification-status/`,...t}),h=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/email-addresses/`,...t}),g=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/email-addresses/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),_=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/email-addresses/{id}/`,...t}),v=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/email-addresses/{id}/status/`,...t}),y=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{name:`Authorization`,type:`apiKey`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/emails/`,...t}),b=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/handle-available/`,...t}),x=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/maintenance-mode/enter/`,...t}),S=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/maintenance-mode/exit/`,...t}),C=t=>(t.client??e).post({security:[{name:`Authorization`,type:`apiKey`},{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/oauth/{provider}/start/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),w=t=>(t.client??e).get({security:[{name:`Authorization`,type:`apiKey`},{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/oauth/connections/`,...t}),T=t=>(t.client??e).post({security:[{name:`Authorization`,type:`apiKey`},{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/oauth/connections/{connection_id}/disconnect/`,...t}),E=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/push-tokens/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),D=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/push-tokens/{token}/`,...t}),O=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/release-channel/`,...t}),k=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/release-channel/preview/opt-in/`,...t}),A=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/release-channel/preview/opt-out/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),j=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/system-events/`,...t}),M=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/terminal/sessions/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),N=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/terminal/sessions/{session_id}/`,...t}),P=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/terminal/sessions/{session_id}/input/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),F=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/assistants/{assistant_id}/terminal/sessions/{session_id}/resize/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),I=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/`,...t}),L=t=>(t.client??e).patch({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),R=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/operational/status/`,...t}),z=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/resize/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),B=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/restart/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),V=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/retire/`,...t}),H=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/rollback/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),U=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/sleep-policy/`,...t}),W=t=>(t.client??e).patch({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/sleep-policy/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),G=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/upgrade/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),K=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/upgrade-policy/`,...t}),ee=t=>(t.client??e).patch({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/{id}/upgrade-policy/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),q=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/access-consent/`,...t}),J=t=>(t?.client??e).patch({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/access-consent/`,...t,headers:{"Content-Type":`application/json`,...t?.headers}}),Y=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/active/`,...t}),X=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/assistants/hatch/`,...t,headers:{"Content-Type":`application/json`,...t?.headers}}),Z=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/auth/live-voice-token/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),Q=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/feature-flags/client-flag-values/`,...t}),$=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/feedback/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),te=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/`,...t}),ne=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/auto-top-up/`,...t}),re=t=>(t.client??e).put({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/auto-top-up/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),ie=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/auto-top-up/disable/`,...t}),ae=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/auto-top-up/remove-payment-method/`,...t}),oe=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/auto-top-up/setup-intent/`,...t}),se=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/invoices/`,...t}),ce=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/invoices/download/`,...t}),le=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/plans/`,...t}),ue=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/portal-session/`,...t}),de=t=>(t?.client??e).get({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/`,...t}),fe=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/change-credit-tier/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),pe=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/change-machine-tier/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),me=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/change-storage-tier/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),he=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/onboarding/`,...t}),ge=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/onboarding/domain/`,...t,headers:{"Content-Type":`application/json`,...t?.headers}}),_e=t=>(t.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/subscription/upgrade/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),ve=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/summary/`,...t}),ye=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/summary/`,...t}),be=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/top-ups/checkout-session/`,...t,headers:{"Content-Type":`application/json`,...t?.headers}}),xe=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/usage/series/`,...t}),Se=t=>(t.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/billing/usage/totals/`,...t}),Ce=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/notifications/`,...t}),we=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/notifications/{id}/acknowledge/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),Te=t=>(t.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/notifications/{id}/snooze/`,...t,headers:{"Content-Type":`application/json`,...t.headers}}),Ee=t=>(t?.client??e).post({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/notifications/pause-rules/`,...t,headers:{"Content-Type":`application/json`,...t?.headers}}),De=t=>(t.client??e).delete({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/organizations/notifications/pause-rules/{rule_id}/`,...t}),Oe=t=>(t?.client??e).get({security:[{scheme:`bearer`,type:`http`},{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/referral-codes/me/`,...t}),ke=t=>(t?.client??e).get({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`},{name:`Authorization`,type:`apiKey`}],url:`/v1/releases/`,...t}),Ae=t=>(t?.client??e).post({security:[{in:`cookie`,name:`sessionid`,type:`apiKey`},{name:`X-Session-Token`,type:`apiKey`}],url:`/v1/user/deletion-request/`,...t});export{Q as $,R as A,Ae as At,I as B,X as C,we as Ct,w as D,Te as Dt,S as E,De as Et,A as F,M as G,W as H,O as I,F as J,N as K,z as L,D as M,E as N,T as O,Oe as Ot,k as P,Z as Q,B as R,b as S,te as St,x as T,Ee as Tt,U,H as V,j as W,ee as X,G as Y,K as Z,g as _,ye as _t,i as a,re as at,v as b,xe as bt,o as c,le as ct,l as d,pe as dt,$ as et,u as f,me as ft,m as g,_e as gt,d as h,de as ht,r as i,oe as it,L as j,C as k,ke as kt,s as l,ue as lt,p as m,he as mt,q as n,ae as nt,n as o,ce as ot,f as p,ge as pt,P as q,Y as r,ne as rt,a as s,se as st,J as t,ie as tt,c as u,fe as ut,_ as v,ve as vt,t as w,Ce as wt,y as x,Se as xt,h as y,be as yt,V as z};
|
package/dist/assets/{select-assistant-screen-EaSNw87g.js → select-assistant-screen-PZqDGbI2.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./confirm-dialog-DbNUkFt6.js";import{t as s}from"./modal-DX6UN7b0.js";import{E as c,N as l,O as u,u as d,z as f}from"./local-mode-9ZkSq1Fr.js";import{t as p}from"./is-electron-BuSDabCt.js";import{n as m}from"./resolved-assistants-store-DMuRxkZC.js";import{
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./confirm-dialog-DbNUkFt6.js";import{t as s}from"./modal-DX6UN7b0.js";import{E as c,N as l,O as u,u as d,z as f}from"./local-mode-9ZkSq1Fr.js";import{t as p}from"./is-electron-BuSDabCt.js";import{n as m}from"./resolved-assistants-store-DMuRxkZC.js";import{G as h,i as g,l as _,n as v}from"./auth-store-CrTf0uWL.js";import{a as y}from"./routes-BKwsRssF.js";import{t as ee}from"./use-onboarding-login-CxXV3Iue.js";import{Fa as b,Mt as x,ft as S,ho as C,jt as w,to as T}from"./index-LP2PV_QY.js";import{r as E}from"./format-date-B6hTwbOM.js";var D=e(t(),1),O=a();function k({open:e,assistantName:t,isPending:r,errorMessage:i,onCancel:a,onRepair:c,onRetire:l}){let[u,d]=(0,D.useState)(`menu`);(0,D.useEffect)(()=>{e&&d(`menu`)},[e]);let f=i?(0,O.jsx)(`span`,{className:`mt-3 block text-body-small-default text-[var(--system-negative-strong)]`,children:i}):null;return u===`confirm-repair`?(0,O.jsx)(o,{open:e,title:`Repair Assistant?`,message:(0,O.jsxs)(O.Fragment,{children:[`Repairing re-provisions this assistant’s authentication token. Any other devices or browser sessions connected to it will be signed out and need to reconnect.`,f]}),confirmLabel:`Repair`,isPending:r,onConfirm:c,onCancel:()=>d(`menu`)}):u===`confirm-retire`?(0,O.jsx)(w,{open:e,isPending:r,extraMessage:f,onConfirm:l,onCancel:()=>d(`menu`)}):(0,O.jsx)(s.Root,{open:e,onOpenChange:e=>{!e&&!r&&a()},children:(0,O.jsxs)(s.Content,{size:`sm`,hideCloseButton:!0,onEscapeKeyDown:e=>{e.preventDefault(),e.stopPropagation(),r||a()},children:[(0,O.jsx)(s.Header,{children:(0,O.jsx)(s.Title,{children:`Can’t Authenticate Assistant`})}),(0,O.jsxs)(s.Body,{children:[(0,O.jsxs)(s.Description,{children:[`The authentication token for `,t,` is missing or can no longer be refreshed, so this assistant can’t be connected. You can repair it, retire it, or pick a different assistant.`]}),f,(0,O.jsxs)(`div`,{className:`mt-5 flex w-full flex-col gap-2`,children:[(0,O.jsx)(n,{variant:`primary`,fullWidth:!0,disabled:r,onClick:()=>d(`confirm-repair`),children:`Wake & Repair`}),(0,O.jsx)(n,{variant:`dangerOutline`,fullWidth:!0,disabled:r,onClick:()=>d(`confirm-retire`),children:`Retire Assistant`}),(0,O.jsx)(n,{variant:`outlined`,fullWidth:!0,disabled:r,onClick:a,children:`Cancel`})]})]})]})})}function A(e){return e.name?e.name:e.isLocal?`Local Assistant`:`Cloud Assistant`}function j(e){if(e.hatchedAt)return`Created ${E(e.hatchedAt)}`}function M(){let e=r(),[t]=i(),a=t.get(`fromLogin`)===`1`,o=t.get(`fromSettings`)===`1`,s=p(),b=g(),C=m.use.assistants(),w=_.use.currentOrganizationId(),{loading:T,error:E,login:j,cancel:M}=ee(),P=e=>e.isLocal||b,F=C.filter(P),I=C.some(e=>e.isPlatformHosted)&&!b,[L,R]=(0,D.useState)(null),[z,B]=(0,D.useState)(!1),[V,H]=(0,D.useState)(!1),[U,W]=(0,D.useState)(null),[G,K]=(0,D.useState)(null),[q,J]=(0,D.useState)(!1),[Y,X]=(0,D.useState)(null);(0,D.useEffect)(()=>{if(L!=null||F.length===0)return;let e=h(w);R(F.find(t=>t.id===e)?.id??F[0].id)},[L,F,w]);let Z=async t=>{B(!0),W(null);try{t.isLocal?await v.getState().connectLocalAssistant(t.id):await v.getState().connectPlatformAssistant(t.id),e(y.assistant,{replace:!0})}catch(e){console.error(`selectAssistant.handleConnect failed`,e),t.isLocal&&(c(e)||f(e))&&d(t.id)?K(t):W(`Failed to connect. Please try again.`),B(!1)}},Q=()=>{K(null),J(!1),X(null),H(!1)},te=async()=>{if(!(!G||q)){J(!0),X(null);try{let e=await u(G.id,{repairGuardian:!0});if(e.ok){l(),Q(),Z(G);return}X(e.error||`Repair failed. Please try again.`)}catch(e){console.error(`selectAssistant.recoveryRepair failed`,e),X(`Repair failed. Please try again.`)}J(!1)}},ne=async()=>{if(!(!G||q)){J(!0),X(null);try{let t=await x(G.id);if(t.ok){Q(),e(t.nextRoute,{replace:!0});return}X(t.error)}catch(e){console.error(`selectAssistant.recoveryRetire failed`,e),X(`Failed to retire assistant. Please try again.`)}J(!1)}};(0,D.useEffect)(()=>{a||o||z||V||C.length!==0&&C.length===1&&F.length===1&&(H(!0),Z(F[0]))},[C.length,F.length]);let re=()=>{let e=C.find(e=>e.id===L);e&&Z(e)},ie=()=>{e(y.welcome)},$=E??U;return V&&!$&&!G?(0,O.jsx)(S,{children:(0,O.jsx)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-xl flex-col items-center justify-center px-6 text-[var(--content-default)]`,children:(0,O.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Connecting to your assistant…`})})}):(0,O.jsxs)(S,{children:[(0,O.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${s?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`min-h-screen px-6 pb-40 pt-16`} text-[var(--content-default)]`,children:[(0,O.jsx)(`h1`,{className:s?`text-title-large`:`text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.5s ease-out 0.1s both`},children:`Choose an Assistant`}),(0,O.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)] ${s?`mt-3.5`:`mt-3`}`,style:{animation:`fadeInUp 0.5s ease-out 0.3s both`},children:`Select which assistant you’d like to use.`}),$&&(0,O.jsx)(`p`,{className:`mt-4 text-body-small-default text-[var(--system-negative-strong)]`,children:$}),(0,O.jsx)(`div`,{className:`flex w-full flex-col ${s?`mt-8 gap-2`:`mt-10 gap-3`}`,style:{animation:`fadeInUp 0.5s ease-out 0.4s both`},children:C.map(e=>{let t=P(e);return(0,O.jsx)(N,{assistant:e,selected:L===e.id,disabled:!t,badge:!t&&e.isPlatformHosted?`Requires Account`:void 0,onSelect:()=>{t&&R(e.id)}},e.id)})}),(0,O.jsxs)(`div`,{className:`mt-8 flex w-full flex-col ${s?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.5s both`},children:[F.length>0&&(0,O.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,className:s?void 0:`h-11 text-base`,onClick:re,disabled:!L||z,children:z?`Connecting…`:`Continue`}),(0,O.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,className:s?void 0:`h-11 text-base`,onClick:()=>void e(`${y.onboarding.hosting}?from=select-assistant`),disabled:z||T,children:`Create New Assistant`}),I&&(0,O.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,className:s?void 0:`h-11 text-base`,onClick:T?M:()=>void j(),disabled:z,children:T?`Cancel`:`Log In`}),(0,O.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,className:s?void 0:`h-11 text-base`,onClick:ie,disabled:z||T,children:`Back`})]})]}),(0,O.jsx)(k,{open:G!=null,assistantName:G?A(G):``,isPending:q,errorMessage:Y??void 0,onCancel:Q,onRepair:()=>void te(),onRetire:()=>void ne()})]})}function N({assistant:e,selected:t,disabled:n,badge:r,onSelect:i}){let a=j(e),o=p();return(0,O.jsxs)(`button`,{type:`button`,onClick:i,disabled:n,className:[`group flex w-full items-center border text-left`,o?`gap-3 rounded-lg p-3`:`gap-4 rounded-2xl px-5 py-4`,`transition-all duration-200 ease-out`,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-[var(--surface-secondary)]`,t&&!n?`border-[var(--primary-base)] bg-[var(--primary-base)]/[0.08] shadow-[inset_0_0_0_1px_var(--primary-base)]`:`border-[var(--border-element)] bg-transparent`].join(` `),children:[(0,O.jsx)(`div`,{className:[`flex shrink-0 items-center justify-center transition-colors duration-200`,o?`h-8 w-8 rounded-lg`:`h-10 w-10 rounded-xl`,t&&!n?`bg-[var(--primary-base)]/15 text-[var(--primary-base)]`:`bg-[var(--surface-tertiary)] text-[var(--content-secondary)]`].join(` `),children:e.isLocal?(0,O.jsx)(b,{className:`h-5 w-5`}):(0,O.jsx)(T,{className:`h-5 w-5`})}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:A(e)}),r&&(0,O.jsx)(`span`,{className:`rounded-full bg-[var(--surface-tertiary)] px-2 py-0.5 text-[var(--content-tertiary)] ${o?`text-label-medium-default`:`text-body-small-default`}`,children:r})]}),a&&(0,O.jsx)(`span`,{className:`mt-0.5 block text-[var(--content-tertiary)] ${o?`text-label-medium-default`:`text-body-small-default`}`,children:a})]}),!n&&(0,O.jsx)(`div`,{className:[`flex h-5 w-5 shrink-0 items-center justify-center rounded-full border-2 transition-all duration-200`,t?`border-[var(--primary-base)] bg-[var(--primary-base)]`:`border-[var(--border-element)] group-hover:border-[var(--content-tertiary)]`].join(` `),children:t&&(0,O.jsx)(C,{className:`h-3 w-3 text-[var(--surface-base)]`,strokeWidth:3})})]})}export{M as SelectAssistantScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{d as n,i as r,u as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./is-electron-BuSDabCt.js";import{t as s}from"./log-in-DOSWwTiS.js";import{i as c}from"./auth-store-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{d as n,i as r,u as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./is-electron-BuSDabCt.js";import{t as s}from"./log-in-DOSWwTiS.js";import{i as c}from"./auth-store-CrTf0uWL.js";import{a as l}from"./routes-BKwsRssF.js";import{t as u}from"./client-feature-flag-store-ivPVcKfH.js";import{t as d}from"./use-onboarding-login-CxXV3Iue.js";import{t as f}from"./assistant-feature-flag-store-D2CUHsmL.js";import{Br as p,It as m,Z as h,ka as g}from"./index-LP2PV_QY.js";import{n as _,t as v}from"./sidebar-tree-BZUv9ggX.js";var y=e(t(),1),b=a();function x(){let e=f.use.settingsDeveloperNav(),t=f.use.mcpSettings(),a=u.use.platformNotifications(),x=u.use.bookmarks(),S=m({platformHostedOnly:!0}),C=m(),{pathname:w}=i(),T=n(),E=c(),{login:D}=d(),O=(0,y.useMemo)(()=>h.filter(e=>!(e.id===`notifications`&&(!a||S===`gated`)||e.id===`billing`&&C!==`full`||e.id===`bookmarks`&&!x||e.id===`devices`&&S===`gated`||e.id===`keyboard-shortcuts`&&!o()||e.id===`mcp`&&!t||e.id===`developer`)),[a,S,C,x,t]),k=(0,y.useMemo)(()=>{let t=[];return e&&t.push(...h.filter(e=>e.id===`developer`)),t.push(E?{id:`logout`,label:`Log Out`,icon:g,onSelect:()=>void p(T)}:{id:`login`,label:`Log In`,icon:s,onSelect:()=>void D()}),t},[e,E,T,D]),A=(0,y.useMemo)(()=>{if(w===l.settings.root)return`Settings`;let e=h.find(e=>w===e.href||w.startsWith(e.href+`/`));return e?e.label:`Settings`},[w]);return(0,b.jsx)(_,{backHref:l.assistant,sidebar:(0,b.jsx)(v,{items:O,bottomItems:k,indexPath:l.settings.root}),title:A,children:(0,b.jsx)(r,{})})}export{x as SettingsLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,r as t}from"./chunk-jRWAZmH_.js";import{t as n}from"./react-DJZBPgpf.js";import{O as r,n as i,t as a}from"./button-D7s2Q_uG.js";import{t as o}from"./useMutation-Lj4VunQV.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./dropdown-yOV5eJnU.js";import{t as l}from"./notice-G5Imd5pC.js";import{n as u,t as d}from"./input-CwdmSRlD.js";import{t as f}from"./toggle-_vZlLDBV.js";import{t as p}from"./is-electron-BuSDabCt.js";import{t as m}from"./bug-BIPj7Nbx.js";import{t as h}from"./info-BJtskZc-.js";import{t as g}from"./loader-circle-CTs38Ovl.js";import{t as _}from"./x-Dz7msELe.js";import{Jt as v}from"./sdk.gen-Bew9wO5C.js";import{n as y}from"./auth-store-CyAWX99c.js";import{t as b}from"./dist-nMnxT9pm.js";import{t as x}from"./impersonate-version-flag-BBe6qZWh.js";import{Ea as S,Na as C,Oa as ee,Ur as w,Wn as te,ba as T,ia as ne}from"./index-DjBiif5r.js";var E=e(n(),1),re=e(r(),1),D=`vellum:debug:`;function O(){let e={};if(typeof window>`u`)return e;try{for(let t=0;t<window.localStorage.length;t++){let n=window.localStorage.key(t);if(n===null||!n.startsWith(D))continue;let r=window.localStorage.getItem(n);r!==null&&(e[n]=r)}}catch{}return e}function k(){return{collectedAt:new Date().toISOString(),resolved:{impersonateAssistantVersion:x()},overrides:O()}}var A=t({ShareFeedbackModal:()=>B}),j=s(),M=[{value:`bug_report`,label:`Bug Report`,icon:m,includesLogsByDefault:!0},{value:`feature_request`,label:`Feature Request`,icon:C,includesLogsByDefault:!1},{value:`other`,label:`Other`,icon:S,includesLogsByDefault:!1}],N=[{value:`past_hour`,label:`Past hour`,cutoffMs:3600*1e3},{value:`past_24_hours`,label:`Past 24 hours`,cutoffMs:1440*60*1e3},{value:`all_time`,label:`All time`,cutoffMs:null}],ie=N.map(e=>({value:e.value,label:e.label})),P=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`video/mp4`,`video/quicktime`,`video/webm`]),F=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`mp4`,`mov`,`webm`]),I=10,L=50*1024*1024,ae={bug_report:`bug_report`,feature_request:`feature_request`,other:`other`};function oe(){return p()?`electron`:b.getPlatform()===`ios`?`ios`:`web`}function se(e){if(e.size>L)return!1;if(e.type&&P.has(e.type))return!0;if(!e.type){let t=e.name.split(`.`).pop()?.toLowerCase();return t?F.has(t):!1}return!1}function R(e,t){let n=Math.ceil(t.length/512),r=new Uint8Array(512+n*512),i=new TextEncoder,a=(e,t,n)=>{let a=i.encode(e);r.set(a.slice(0,n),t)},o=(e,t,n)=>{a(e.toString(8).padStart(n-1,`0`)+`\0`,t,n)};a(e,0,100),o(420,100,8),o(0,108,8),o(0,116,8),o(t.length,124,12),o(Math.floor(Date.now()/1e3),136,12);for(let e=148;e<156;e++)r[e]=32;r[156]=48,a(`ustar\0`,257,6),a(`00`,263,2);let s=0;for(let e=0;e<512;e++)s+=r[e];return o(s,148,7),r[155]=32,r.set(t,512),r}async function z(e,t){try{let n={};t.window.startTime!=null&&(n.startTime=t.window.startTime,n.endTime=t.window.endTime),t.activeConversationId&&(n.conversationId=t.activeConversationId);let{data:r,error:i}=await v({path:{assistant_id:e},body:n,parseAs:`blob`,throwOnError:!1});if(i||!(r instanceof Blob))return null;let a=await r.arrayBuffer();return new Uint8Array(a)}catch{return null}}async function ce(e,t,n,r){if(typeof CompressionStream>`u`)return null;let i=new Date,a=N.find(t=>t.value===e),o=i.getTime(),s=a?.cutoffMs==null?null:o-a.cutoffMs,c=s==null?null:new Date(s).toISOString(),l=null;try{l=r?.()??null}catch{l=null}let u=w(l),d={collected_at:i.toISOString(),time_range:e,cutoff:c,log_window:{start_time_ms:s,end_time_ms:o},assistant_id:t,active_conversation_id:n,user_agent:typeof navigator<`u`?navigator.userAgent:``,language:typeof navigator<`u`?navigator.language:``,platform:typeof navigator<`u`?navigator.platform:``,url:typeof window<`u`?window.location.href:``,viewport:typeof window<`u`?{width:window.innerWidth,height:window.innerHeight}:null,screen:typeof screen<`u`?{width:screen.width,height:screen.height}:null,connection:typeof navigator<`u`&&`connection`in navigator?{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}:null,deviceMemory:typeof navigator<`u`&&`deviceMemory`in navigator?navigator.deviceMemory:null,hardwareConcurrency:typeof navigator<`u`?navigator.hardwareConcurrency:null},f=new TextEncoder().encode(JSON.stringify(d,null,2)),m=new TextEncoder().encode(JSON.stringify(u,null,2)),h=[R(`web-client-context.json`,f),R(`web-chat-diagnostics.json`,m)],g=new TextEncoder().encode(JSON.stringify(k(),null,2));h.push(R(`web-debug-flags.json`,g));try{let e=typeof window<`u`?window._vellumDebug?.chat:null;if(e){let t={clientMessages:e.getClientMessages?.()??null,transcriptItems:e.getTranscriptItems?.()??null,pendingInteractions:e.listPendingInteractions?.()??null,thinkingIndicator:e.thinkingIndicator?.()??null,streamingRing:e.streamingRing?.()??null,reconciliationDiagnostics:e.getReconciliationDiagnostics?.()??null},n=new TextEncoder().encode(JSON.stringify(t,null,2));h.push(R(`web-chat-debug-api-triage.json`,n))}}catch{}try{let e=typeof window<`u`?window._vellumDebug?.events:null;if(e){let t={focus:typeof document<`u`?{hasFocus:typeof document.hasFocus==`function`?document.hasFocus():null,visibilityState:document.visibilityState}:null,clients:e.getClients().map(({abortSignal:e,...t})=>({...t,aborted:e.aborted})),events:e.getEvents()},n=new TextEncoder().encode(JSON.stringify(t,null,2));h.push(R(`web-sse-liveness-triage.json`,n))}}catch{}if(p()&&window.vellum?.feedback){try{let e=await window.vellum.feedback.diagnostics(),t=new TextEncoder().encode(JSON.stringify(e,null,2));h.push(R(`electron-diagnostics.json`,t))}catch{}try{let e=await window.vellum.feedback.logs();if(e){let t=new TextEncoder().encode(e);h.push(R(`electron-main-logs.txt`,t))}}catch{}}if(t){let e=await z(t,{window:{startTime:s,endTime:o},activeConversationId:n});e&&h.push(R(`platform-logs.tar.gz`,e))}h.push(new Uint8Array(1024));let _=h.reduce((e,t)=>e+t.length,0),v=new Uint8Array(_),y=0;for(let e of h)v.set(e,y),y+=e.length;let b=new Blob([v.buffer]),x=await new Response(b.stream().pipeThrough(new CompressionStream(`gzip`))).blob();return new File([x],`web-client-logs-${i.getTime()}.tar.gz`,{type:`application/gzip`})}function B({open:e,onClose:t,initialReason:n,onSubmitted:r,assistantId:s,assistantVersion:m,activeConversationId:v,getDiagnosticsSnapshot:b}){let x=y.use.user()?.email,S=(0,E.useId)(),C=(0,E.useRef)(null),w=(0,E.useRef)(null),D=(0,E.useRef)(null),O=(0,E.useRef)(null),[k,A]=(0,E.useState)(n??`bug_report`),[N,P]=(0,E.useState)(``),[F,L]=(0,E.useState)(``),[R,z]=(0,E.useState)(M.find(e=>e.value===(n??`bug_report`))?.includesLogsByDefault??!0),[B,V]=(0,E.useState)(!1),[H,U]=(0,E.useState)(`past_hour`),[W,G]=(0,E.useState)([]),[K,q]=(0,E.useState)(null),[de,J]=(0,E.useState)(!1),[Y,X]=(0,E.useState)(!1),Z=o(te()),[fe,Q]=(0,E.useState)(!1),$=Z.isPending||fe,pe=!x,me=(0,E.useMemo)(()=>N.trim().length>0&&F.trim().length>0,[N,F]);(0,E.useEffect)(()=>{if(!e)return;let t=n??`bug_report`;A(t),P(``),L(x??``),z(M.find(e=>e.value===t)?.includesLogsByDefault??!0),V(!1),U(`past_hour`),G([]),X(!1),q(null),Q(!1),Z.reset();let r=setTimeout(()=>{x?D.current?.focus():O.current?.focus()},50);return()=>clearTimeout(r)},[e]),(0,E.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]);let he=e=>{A(e),B||z(M.find(t=>t.value===e)?.includesLogsByDefault??!1)},ge=()=>{z(e=>!e),V(!0)},_e=(0,E.useCallback)(e=>{e.key===`Escape`&&!$&&t()},[t,$]),ve=(0,E.useCallback)(e=>{e.target===C.current&&!$&&t()},[t,$]),ye=(0,E.useCallback)(e=>{G(t=>{let n=I-t.length;if(n<=0)return t;let r=new Set(t.map(e=>`${e.name}:${e.size}`)),i=[];for(let t of e){if(i.length>=n)break;if(!se(t))continue;let e=`${t.name}:${t.size}`;r.has(e)||(r.add(e),i.push(t))}return i.length>0?[...t,...i]:t})},[]),be=e=>{e.target.files&&ye(Array.from(e.target.files)),e.target.value=``},xe=e=>{e.preventDefault(),J(!1),e.dataTransfer.files?.length&&ye(Array.from(e.dataTransfer.files))},Se=e=>{e.preventDefault(),J(!0)},Ce=e=>{e.preventDefault(),e.currentTarget===e.target&&J(!1)},we=e=>{G(t=>t.filter((t,n)=>n!==e))};return e?(0,re.createPortal)((0,j.jsx)(`div`,{ref:C,role:`dialog`,"aria-modal":`true`,"aria-labelledby":S,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onKeyDown:_e,onClick:ve,onDrop:xe,onDragOver:Se,onDragLeave:Ce,children:(0,j.jsxs)(`div`,{className:`mx-4 flex w-full max-w-lg flex-col rounded-xl border p-6 shadow-xl`,style:{backgroundColor:`var(--surface-lift)`,borderColor:`var(--border-base)`,maxHeight:`calc(100vh - 2rem)`},children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b pb-4`,style:{borderColor:`var(--border-subtle)`},children:[(0,j.jsx)(`h2`,{id:S,className:`!m-0 text-title-small text-[var(--content-default)]`,children:`Share Feedback`}),(0,j.jsx)(a,{variant:`ghost`,iconOnly:(0,j.jsx)(_,{}),onClick:t,disabled:$,"aria-label":`Close`,tintColor:`var(--content-secondary)`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-3.5 overflow-y-auto pt-4 ${$?`pointer-events-none opacity-60`:``}`,children:[pe&&(0,j.jsx)(d,{id:`${S}-email`,ref:O,label:`Email`,type:`email`,placeholder:`you@example.com`,value:F,onChange:e=>L(e.target.value),leftIcon:(0,j.jsx)(ee,{className:`h-4 w-4`,"aria-hidden":!0}),fullWidth:!0}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,j.jsx)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:`Category`}),(0,j.jsx)(`div`,{className:`flex gap-2`,children:M.map(e=>(0,j.jsx)(le,{option:e,isSelected:k===e.value,onSelect:()=>he(e.value)},e.value))})]}),(0,j.jsx)(`hr`,{className:`border-[var(--border-subtle)]`}),k===`bug_report`&&(0,j.jsxs)(l,{tone:`info`,children:[`Tip: Get faster support by posting in our`,` `,(0,j.jsx)(`a`,{href:`https://vellum.ai/community`,target:`_blank`,rel:`noopener noreferrer`,className:`underline text-[var(--content-default)]`,children:`Discord community`})]}),k===`feature_request`&&(0,j.jsxs)(l,{tone:`info`,children:[`Tip: Vote on features on our`,` `,(0,j.jsx)(`a`,{href:`https://vellum.ai/roadmap`,target:`_blank`,rel:`noopener noreferrer`,className:`underline text-[var(--content-default)]`,children:`public roadmap`})]}),(0,j.jsx)(u,{id:`${S}-message`,ref:D,label:k===`bug_report`?`What went wrong?`:k===`feature_request`?`Describe your idea`:`What's on your mind?`,rows:3,placeholder:k===`bug_report`?`What did you expect to happen, and what happened instead?`:k===`feature_request`?`What problem would this solve for you?`:`Share your thoughts...`,value:N,onChange:e=>P(e.target.value),fullWidth:!0}),k!==`feature_request`&&(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,j.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5`,children:[(0,j.jsx)(f,{checked:R,onChange:ge,"aria-label":`Include browser diagnostics`}),(0,j.jsx)(`span`,{className:`text-body-medium-lighter leading-6 text-[var(--content-default)]`,children:`Include diagnostics`})]}),(0,j.jsx)(i,{content:`Diagnostics include browser context, assistant logs, and timestamps — never passwords or credentials.`,children:(0,j.jsx)(`button`,{type:`button`,"aria-label":`About diagnostics`,className:`inline-flex items-center justify-center text-[var(--content-tertiary)]`,children:(0,j.jsx)(h,{className:`h-3.5 w-3.5`})})})]}),R&&(0,j.jsx)(c,{options:ie,value:H,onChange:U,"aria-label":`Diagnostics time range`})]}),p()&&v&&k!==`feature_request`&&(0,j.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5`,children:[(0,j.jsx)(f,{checked:Y,onChange:()=>X(e=>!e),"aria-label":`Include the most recent conversation`}),(0,j.jsx)(`span`,{className:`text-body-medium-lighter leading-6 text-[var(--content-default)]`,children:`Include the most recent conversation`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:[`Attachments`,W.length>0&&(0,j.jsxs)(`span`,{className:`text-[var(--content-tertiary)]`,children:[` · `,W.length,`/`,I]})]}),(0,j.jsx)(a,{variant:`outlined`,size:`compact`,leftIcon:(0,j.jsx)(T,{}),onClick:()=>w.current?.click(),disabled:W.length>=I,children:`Add files`}),(0,j.jsx)(`input`,{ref:w,type:`file`,multiple:!0,accept:`image/png,image/jpeg,image/gif,image/webp,video/mp4,video/quicktime,video/webm`,onChange:be,className:`hidden`})]}),W.length>0&&(0,j.jsx)(`div`,{className:`flex gap-2 overflow-x-auto`,children:W.map((e,t)=>(0,j.jsx)(ue,{file:e,onRemove:()=>we(t)},`${e.name}-${t}`))}),de&&(0,j.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Drop files to attach…`})]}),K&&(0,j.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--system-negative-strong)]`,children:K})]}),(0,j.jsx)(`div`,{className:`mt-4 flex items-center justify-end gap-2 border-t pt-4`,style:{borderColor:`var(--border-subtle)`},children:$?(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-body-medium-lighter text-[var(--content-secondary)]`,children:[(0,j.jsx)(g,{className:`h-4 w-4 animate-spin`}),`Sending feedback…`]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(a,{variant:`ghost`,onClick:t,children:`Cancel`}),(0,j.jsx)(a,{variant:`primary`,leftIcon:(0,j.jsx)(ne,{}),onClick:async()=>{if(!(!me||$)){q(null),Q(!0);try{let e=R&&k!==`feature_request`?await ce(H,s??null,p()?Y?v??null:null:v??null,b):null;await Z.mutateAsync({headers:{"Content-Type":null},body:{message:N.trim(),classification:ae[k],email:F.trim(),client:oe(),client_version:void 0,...s?{assistant_id:s}:{},...m?{assistant_version:m}:{},...e?{logs_file:e}:{},...W.length?{attachments:W}:{}},bodySerializer:e=>{let t=new FormData;for(let[n,r]of Object.entries(e))if(r!=null){if(n===`attachments`&&Array.isArray(r)){for(let e of r)t.append(`attachments`,e);continue}r instanceof Blob?t.append(n,r):t.append(n,String(r))}return t}}),r?.(),t()}catch(e){q(e instanceof Error?e.message:`Failed to submit feedback. Please try again.`)}finally{Q(!1)}}},disabled:!me,children:`Submit`})]})})]})}),document.body):null}function le({option:e,isSelected:t,onSelect:n}){let r=e.icon;return(0,j.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,className:`flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-left transition-colors`,style:{borderColor:t?`var(--primary-base)`:`var(--border-base)`,backgroundColor:t?`color-mix(in oklab, var(--primary-base) 10%, transparent)`:`transparent`},children:[(0,j.jsx)(r,{className:`h-3.5 w-3.5 shrink-0`,style:{color:t?`var(--primary-base)`:`var(--content-secondary)`}}),(0,j.jsx)(`span`,{className:`text-body-small-default`,style:{color:t?`var(--primary-base)`:`var(--content-default)`},children:e.label})]})}function ue({file:e,onRemove:t}){let n=e.type.startsWith(`image/`),r=(0,E.useMemo)(()=>n?URL.createObjectURL(e):null,[e,n]);return(0,E.useEffect)(()=>{if(r)return()=>URL.revokeObjectURL(r)},[r]),(0,j.jsxs)(`div`,{className:`relative flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)]`,title:e.name,children:[n&&r?(0,j.jsx)(`img`,{src:r,alt:e.name,className:`h-full w-full object-cover`}):(0,j.jsx)(T,{className:`h-5 w-5 text-[var(--content-secondary)]`}),(0,j.jsx)(a,{variant:`ghost`,size:`compact`,iconOnly:(0,j.jsx)(_,{}),onClick:t,"aria-label":`Remove ${e.name}`,className:`absolute top-0.5 right-0.5 h-4 w-4 rounded-full bg-black/60 text-white hover:bg-black/70`,tintColor:`#fff`})]})}export{A as n,B as t};
|
|
1
|
+
import{o as e,r as t}from"./chunk-jRWAZmH_.js";import{t as n}from"./react-DJZBPgpf.js";import{O as r,n as i,t as a}from"./button-D7s2Q_uG.js";import{t as o}from"./useMutation-Lj4VunQV.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./dropdown-yOV5eJnU.js";import{t as l}from"./notice-G5Imd5pC.js";import{n as u,t as d}from"./input-CwdmSRlD.js";import{t as f}from"./toggle-_vZlLDBV.js";import{t as p}from"./is-electron-BuSDabCt.js";import{t as m}from"./bug-BIPj7Nbx.js";import{t as h}from"./info-BJtskZc-.js";import{t as g}from"./loader-circle-CTs38Ovl.js";import{t as _}from"./x-Dz7msELe.js";import{Jt as v}from"./sdk.gen-Bew9wO5C.js";import{n as y}from"./auth-store-CrTf0uWL.js";import{t as b}from"./dist-nMnxT9pm.js";import{t as x}from"./impersonate-version-flag-ZdQOgpO3.js";import{Ea as S,Na as C,Oa as ee,Ur as w,Wn as te,ba as T,ia as ne}from"./index-LP2PV_QY.js";var E=e(n(),1),re=e(r(),1),D=`vellum:debug:`;function O(){let e={};if(typeof window>`u`)return e;try{for(let t=0;t<window.localStorage.length;t++){let n=window.localStorage.key(t);if(n===null||!n.startsWith(D))continue;let r=window.localStorage.getItem(n);r!==null&&(e[n]=r)}}catch{}return e}function k(){return{collectedAt:new Date().toISOString(),resolved:{impersonateAssistantVersion:x()},overrides:O()}}var A=t({ShareFeedbackModal:()=>B}),j=s(),M=[{value:`bug_report`,label:`Bug Report`,icon:m,includesLogsByDefault:!0},{value:`feature_request`,label:`Feature Request`,icon:C,includesLogsByDefault:!1},{value:`other`,label:`Other`,icon:S,includesLogsByDefault:!1}],N=[{value:`past_hour`,label:`Past hour`,cutoffMs:3600*1e3},{value:`past_24_hours`,label:`Past 24 hours`,cutoffMs:1440*60*1e3},{value:`all_time`,label:`All time`,cutoffMs:null}],ie=N.map(e=>({value:e.value,label:e.label})),P=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`video/mp4`,`video/quicktime`,`video/webm`]),F=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`mp4`,`mov`,`webm`]),I=10,L=50*1024*1024,ae={bug_report:`bug_report`,feature_request:`feature_request`,other:`other`};function oe(){return p()?`electron`:b.getPlatform()===`ios`?`ios`:`web`}function se(e){if(e.size>L)return!1;if(e.type&&P.has(e.type))return!0;if(!e.type){let t=e.name.split(`.`).pop()?.toLowerCase();return t?F.has(t):!1}return!1}function R(e,t){let n=Math.ceil(t.length/512),r=new Uint8Array(512+n*512),i=new TextEncoder,a=(e,t,n)=>{let a=i.encode(e);r.set(a.slice(0,n),t)},o=(e,t,n)=>{a(e.toString(8).padStart(n-1,`0`)+`\0`,t,n)};a(e,0,100),o(420,100,8),o(0,108,8),o(0,116,8),o(t.length,124,12),o(Math.floor(Date.now()/1e3),136,12);for(let e=148;e<156;e++)r[e]=32;r[156]=48,a(`ustar\0`,257,6),a(`00`,263,2);let s=0;for(let e=0;e<512;e++)s+=r[e];return o(s,148,7),r[155]=32,r.set(t,512),r}async function z(e,t){try{let n={};t.window.startTime!=null&&(n.startTime=t.window.startTime,n.endTime=t.window.endTime),t.activeConversationId&&(n.conversationId=t.activeConversationId);let{data:r,error:i}=await v({path:{assistant_id:e},body:n,parseAs:`blob`,throwOnError:!1});if(i||!(r instanceof Blob))return null;let a=await r.arrayBuffer();return new Uint8Array(a)}catch{return null}}async function ce(e,t,n,r){if(typeof CompressionStream>`u`)return null;let i=new Date,a=N.find(t=>t.value===e),o=i.getTime(),s=a?.cutoffMs==null?null:o-a.cutoffMs,c=s==null?null:new Date(s).toISOString(),l=null;try{l=r?.()??null}catch{l=null}let u=w(l),d={collected_at:i.toISOString(),time_range:e,cutoff:c,log_window:{start_time_ms:s,end_time_ms:o},assistant_id:t,active_conversation_id:n,user_agent:typeof navigator<`u`?navigator.userAgent:``,language:typeof navigator<`u`?navigator.language:``,platform:typeof navigator<`u`?navigator.platform:``,url:typeof window<`u`?window.location.href:``,viewport:typeof window<`u`?{width:window.innerWidth,height:window.innerHeight}:null,screen:typeof screen<`u`?{width:screen.width,height:screen.height}:null,connection:typeof navigator<`u`&&`connection`in navigator?{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}:null,deviceMemory:typeof navigator<`u`&&`deviceMemory`in navigator?navigator.deviceMemory:null,hardwareConcurrency:typeof navigator<`u`?navigator.hardwareConcurrency:null},f=new TextEncoder().encode(JSON.stringify(d,null,2)),m=new TextEncoder().encode(JSON.stringify(u,null,2)),h=[R(`web-client-context.json`,f),R(`web-chat-diagnostics.json`,m)],g=new TextEncoder().encode(JSON.stringify(k(),null,2));h.push(R(`web-debug-flags.json`,g));try{let e=typeof window<`u`?window._vellumDebug?.chat:null;if(e){let t={clientMessages:e.getClientMessages?.()??null,transcriptItems:e.getTranscriptItems?.()??null,pendingInteractions:e.listPendingInteractions?.()??null,thinkingIndicator:e.thinkingIndicator?.()??null,streamingRing:e.streamingRing?.()??null,reconciliationDiagnostics:e.getReconciliationDiagnostics?.()??null},n=new TextEncoder().encode(JSON.stringify(t,null,2));h.push(R(`web-chat-debug-api-triage.json`,n))}}catch{}try{let e=typeof window<`u`?window._vellumDebug?.events:null;if(e){let t={focus:typeof document<`u`?{hasFocus:typeof document.hasFocus==`function`?document.hasFocus():null,visibilityState:document.visibilityState}:null,clients:e.getClients().map(({abortSignal:e,...t})=>({...t,aborted:e.aborted})),events:e.getEvents()},n=new TextEncoder().encode(JSON.stringify(t,null,2));h.push(R(`web-sse-liveness-triage.json`,n))}}catch{}if(p()&&window.vellum?.feedback){try{let e=await window.vellum.feedback.diagnostics(),t=new TextEncoder().encode(JSON.stringify(e,null,2));h.push(R(`electron-diagnostics.json`,t))}catch{}try{let e=await window.vellum.feedback.logs();if(e){let t=new TextEncoder().encode(e);h.push(R(`electron-main-logs.txt`,t))}}catch{}}if(t){let e=await z(t,{window:{startTime:s,endTime:o},activeConversationId:n});e&&h.push(R(`platform-logs.tar.gz`,e))}h.push(new Uint8Array(1024));let _=h.reduce((e,t)=>e+t.length,0),v=new Uint8Array(_),y=0;for(let e of h)v.set(e,y),y+=e.length;let b=new Blob([v.buffer]),x=await new Response(b.stream().pipeThrough(new CompressionStream(`gzip`))).blob();return new File([x],`web-client-logs-${i.getTime()}.tar.gz`,{type:`application/gzip`})}function B({open:e,onClose:t,initialReason:n,onSubmitted:r,assistantId:s,assistantVersion:m,activeConversationId:v,getDiagnosticsSnapshot:b}){let x=y.use.user()?.email,S=(0,E.useId)(),C=(0,E.useRef)(null),w=(0,E.useRef)(null),D=(0,E.useRef)(null),O=(0,E.useRef)(null),[k,A]=(0,E.useState)(n??`bug_report`),[N,P]=(0,E.useState)(``),[F,L]=(0,E.useState)(``),[R,z]=(0,E.useState)(M.find(e=>e.value===(n??`bug_report`))?.includesLogsByDefault??!0),[B,V]=(0,E.useState)(!1),[H,U]=(0,E.useState)(`past_hour`),[W,G]=(0,E.useState)([]),[K,q]=(0,E.useState)(null),[de,J]=(0,E.useState)(!1),[Y,X]=(0,E.useState)(!1),Z=o(te()),[fe,Q]=(0,E.useState)(!1),$=Z.isPending||fe,pe=!x,me=(0,E.useMemo)(()=>N.trim().length>0&&F.trim().length>0,[N,F]);(0,E.useEffect)(()=>{if(!e)return;let t=n??`bug_report`;A(t),P(``),L(x??``),z(M.find(e=>e.value===t)?.includesLogsByDefault??!0),V(!1),U(`past_hour`),G([]),X(!1),q(null),Q(!1),Z.reset();let r=setTimeout(()=>{x?D.current?.focus():O.current?.focus()},50);return()=>clearTimeout(r)},[e]),(0,E.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]);let he=e=>{A(e),B||z(M.find(t=>t.value===e)?.includesLogsByDefault??!1)},ge=()=>{z(e=>!e),V(!0)},_e=(0,E.useCallback)(e=>{e.key===`Escape`&&!$&&t()},[t,$]),ve=(0,E.useCallback)(e=>{e.target===C.current&&!$&&t()},[t,$]),ye=(0,E.useCallback)(e=>{G(t=>{let n=I-t.length;if(n<=0)return t;let r=new Set(t.map(e=>`${e.name}:${e.size}`)),i=[];for(let t of e){if(i.length>=n)break;if(!se(t))continue;let e=`${t.name}:${t.size}`;r.has(e)||(r.add(e),i.push(t))}return i.length>0?[...t,...i]:t})},[]),be=e=>{e.target.files&&ye(Array.from(e.target.files)),e.target.value=``},xe=e=>{e.preventDefault(),J(!1),e.dataTransfer.files?.length&&ye(Array.from(e.dataTransfer.files))},Se=e=>{e.preventDefault(),J(!0)},Ce=e=>{e.preventDefault(),e.currentTarget===e.target&&J(!1)},we=e=>{G(t=>t.filter((t,n)=>n!==e))};return e?(0,re.createPortal)((0,j.jsx)(`div`,{ref:C,role:`dialog`,"aria-modal":`true`,"aria-labelledby":S,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onKeyDown:_e,onClick:ve,onDrop:xe,onDragOver:Se,onDragLeave:Ce,children:(0,j.jsxs)(`div`,{className:`mx-4 flex w-full max-w-lg flex-col rounded-xl border p-6 shadow-xl`,style:{backgroundColor:`var(--surface-lift)`,borderColor:`var(--border-base)`,maxHeight:`calc(100vh - 2rem)`},children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b pb-4`,style:{borderColor:`var(--border-subtle)`},children:[(0,j.jsx)(`h2`,{id:S,className:`!m-0 text-title-small text-[var(--content-default)]`,children:`Share Feedback`}),(0,j.jsx)(a,{variant:`ghost`,iconOnly:(0,j.jsx)(_,{}),onClick:t,disabled:$,"aria-label":`Close`,tintColor:`var(--content-secondary)`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-3.5 overflow-y-auto pt-4 ${$?`pointer-events-none opacity-60`:``}`,children:[pe&&(0,j.jsx)(d,{id:`${S}-email`,ref:O,label:`Email`,type:`email`,placeholder:`you@example.com`,value:F,onChange:e=>L(e.target.value),leftIcon:(0,j.jsx)(ee,{className:`h-4 w-4`,"aria-hidden":!0}),fullWidth:!0}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,j.jsx)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:`Category`}),(0,j.jsx)(`div`,{className:`flex gap-2`,children:M.map(e=>(0,j.jsx)(le,{option:e,isSelected:k===e.value,onSelect:()=>he(e.value)},e.value))})]}),(0,j.jsx)(`hr`,{className:`border-[var(--border-subtle)]`}),k===`bug_report`&&(0,j.jsxs)(l,{tone:`info`,children:[`Tip: Get faster support by posting in our`,` `,(0,j.jsx)(`a`,{href:`https://vellum.ai/community`,target:`_blank`,rel:`noopener noreferrer`,className:`underline text-[var(--content-default)]`,children:`Discord community`})]}),k===`feature_request`&&(0,j.jsxs)(l,{tone:`info`,children:[`Tip: Vote on features on our`,` `,(0,j.jsx)(`a`,{href:`https://vellum.ai/roadmap`,target:`_blank`,rel:`noopener noreferrer`,className:`underline text-[var(--content-default)]`,children:`public roadmap`})]}),(0,j.jsx)(u,{id:`${S}-message`,ref:D,label:k===`bug_report`?`What went wrong?`:k===`feature_request`?`Describe your idea`:`What's on your mind?`,rows:3,placeholder:k===`bug_report`?`What did you expect to happen, and what happened instead?`:k===`feature_request`?`What problem would this solve for you?`:`Share your thoughts...`,value:N,onChange:e=>P(e.target.value),fullWidth:!0}),k!==`feature_request`&&(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,j.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5`,children:[(0,j.jsx)(f,{checked:R,onChange:ge,"aria-label":`Include browser diagnostics`}),(0,j.jsx)(`span`,{className:`text-body-medium-lighter leading-6 text-[var(--content-default)]`,children:`Include diagnostics`})]}),(0,j.jsx)(i,{content:`Diagnostics include browser context, assistant logs, and timestamps — never passwords or credentials.`,children:(0,j.jsx)(`button`,{type:`button`,"aria-label":`About diagnostics`,className:`inline-flex items-center justify-center text-[var(--content-tertiary)]`,children:(0,j.jsx)(h,{className:`h-3.5 w-3.5`})})})]}),R&&(0,j.jsx)(c,{options:ie,value:H,onChange:U,"aria-label":`Diagnostics time range`})]}),p()&&v&&k!==`feature_request`&&(0,j.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5`,children:[(0,j.jsx)(f,{checked:Y,onChange:()=>X(e=>!e),"aria-label":`Include the most recent conversation`}),(0,j.jsx)(`span`,{className:`text-body-medium-lighter leading-6 text-[var(--content-default)]`,children:`Include the most recent conversation`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:[`Attachments`,W.length>0&&(0,j.jsxs)(`span`,{className:`text-[var(--content-tertiary)]`,children:[` · `,W.length,`/`,I]})]}),(0,j.jsx)(a,{variant:`outlined`,size:`compact`,leftIcon:(0,j.jsx)(T,{}),onClick:()=>w.current?.click(),disabled:W.length>=I,children:`Add files`}),(0,j.jsx)(`input`,{ref:w,type:`file`,multiple:!0,accept:`image/png,image/jpeg,image/gif,image/webp,video/mp4,video/quicktime,video/webm`,onChange:be,className:`hidden`})]}),W.length>0&&(0,j.jsx)(`div`,{className:`flex gap-2 overflow-x-auto`,children:W.map((e,t)=>(0,j.jsx)(ue,{file:e,onRemove:()=>we(t)},`${e.name}-${t}`))}),de&&(0,j.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Drop files to attach…`})]}),K&&(0,j.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--system-negative-strong)]`,children:K})]}),(0,j.jsx)(`div`,{className:`mt-4 flex items-center justify-end gap-2 border-t pt-4`,style:{borderColor:`var(--border-subtle)`},children:$?(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-body-medium-lighter text-[var(--content-secondary)]`,children:[(0,j.jsx)(g,{className:`h-4 w-4 animate-spin`}),`Sending feedback…`]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(a,{variant:`ghost`,onClick:t,children:`Cancel`}),(0,j.jsx)(a,{variant:`primary`,leftIcon:(0,j.jsx)(ne,{}),onClick:async()=>{if(!(!me||$)){q(null),Q(!0);try{let e=R&&k!==`feature_request`?await ce(H,s??null,p()?Y?v??null:null:v??null,b):null;await Z.mutateAsync({headers:{"Content-Type":null},body:{message:N.trim(),classification:ae[k],email:F.trim(),client:oe(),client_version:void 0,...s?{assistant_id:s}:{},...m?{assistant_version:m}:{},...e?{logs_file:e}:{},...W.length?{attachments:W}:{}},bodySerializer:e=>{let t=new FormData;for(let[n,r]of Object.entries(e))if(r!=null){if(n===`attachments`&&Array.isArray(r)){for(let e of r)t.append(`attachments`,e);continue}r instanceof Blob?t.append(n,r):t.append(n,String(r))}return t}}),r?.(),t()}catch(e){q(e instanceof Error?e.message:`Failed to submit feedback. Please try again.`)}finally{Q(!1)}}},disabled:!me,children:`Submit`})]})})]})}),document.body):null}function le({option:e,isSelected:t,onSelect:n}){let r=e.icon;return(0,j.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,className:`flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-left transition-colors`,style:{borderColor:t?`var(--primary-base)`:`var(--border-base)`,backgroundColor:t?`color-mix(in oklab, var(--primary-base) 10%, transparent)`:`transparent`},children:[(0,j.jsx)(r,{className:`h-3.5 w-3.5 shrink-0`,style:{color:t?`var(--primary-base)`:`var(--content-secondary)`}}),(0,j.jsx)(`span`,{className:`text-body-small-default`,style:{color:t?`var(--primary-base)`:`var(--content-default)`},children:e.label})]})}function ue({file:e,onRemove:t}){let n=e.type.startsWith(`image/`),r=(0,E.useMemo)(()=>n?URL.createObjectURL(e):null,[e,n]);return(0,E.useEffect)(()=>{if(r)return()=>URL.revokeObjectURL(r)},[r]),(0,j.jsxs)(`div`,{className:`relative flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)]`,title:e.name,children:[n&&r?(0,j.jsx)(`img`,{src:r,alt:e.name,className:`h-full w-full object-cover`}):(0,j.jsx)(T,{className:`h-5 w-5 text-[var(--content-secondary)]`}),(0,j.jsx)(a,{variant:`ghost`,size:`compact`,iconOnly:(0,j.jsx)(_,{}),onClick:t,"aria-label":`Remove ${e.name}`,className:`absolute top-0.5 right-0.5 h-4 w-4 rounded-full bg-black/60 text-white hover:bg-black/70`,tintColor:`#fff`})]})}export{A as n,B as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,t as i,u as a}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{t as s}from"./typography-BscuIPxA.js";import{r as c}from"./src-D6Nu2Lol.js";import{t as l}from"./is-electron-BuSDabCt.js";import{t as u}from"./arrow-left-DpZuwfUr.js";import{t as d}from"./chevron-right-HpmykQ8I.js";import{a as f}from"./routes-BKwsRssF.js";import{n as p}from"./use-is-mobile-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,t as i,u as a}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{t as s}from"./typography-BscuIPxA.js";import{r as c}from"./src-D6Nu2Lol.js";import{t as l}from"./is-electron-BuSDabCt.js";import{t as u}from"./arrow-left-DpZuwfUr.js";import{t as d}from"./chevron-right-HpmykQ8I.js";import{a as f}from"./routes-BKwsRssF.js";import{n as p}from"./use-is-mobile-CvT53Qs1.js";import{t as m}from"./haptics-BtSYrQNK.js";import{Nt as h,Zt as g}from"./index-LP2PV_QY.js";var _=e(t(),1),v=20,y=100,b=.3,x=.7,S=10,C=.3,w=200,T=180,E=200,D=.25,O=50;function k(e){return Math.min(y,e*b)}function A(e,t){return Math.abs(t)>Math.abs(e)*x}function j(e,t){return Math.abs(e)<S&&Math.abs(t)<S?`pending`:A(e,t)||e<=0?`cancel`:`confirm`}function M(e,t){return e<=t?e:t+(e-t)*C}function N(e,t){return e>=t}function P(e){e.style.transition=``,e.style.transform=``,e.style.willChange=``,e.style.opacity=``}function F({containerRef:e,onBack:t,enabled:n,navKey:r}){let i=(0,_.useRef)(null),a=(0,_.useRef)(t),o=(0,_.useRef)(n),s=(0,_.useRef)(!1);(0,_.useLayoutEffect)(()=>{a.current=t,o.current=n},[t,n]),(0,_.useEffect)(()=>{if(!g())return;let t=e.current;if(!t)return;let n=new Set,r=!1,c=(e,t)=>{let i=setTimeout(()=>{n.delete(i),r||e()},t);n.add(i)},l=()=>P(t),u=()=>k(window.innerWidth),d=e=>{t.style.transform=e===0?``:`translateX(${e}px)`},f=(e,t)=>{for(let n=0;n<e.length;n+=1){let r=e[n];if(r&&r.identifier===t)return r}return null},p=e=>{if(i.current=null,e){t.style.transition=`transform ${w}ms ease-out`,d(0);let e=()=>{t.removeEventListener(`transitionend`,e),l()};t.addEventListener(`transitionend`,e,{once:!0}),c(l,w+O)}else l()},h=()=>{t.style.transition=`transform ${T}ms ease-in`,d(window.innerWidth);let e=!1,n=()=>{if(e||r)return;e=!0,t.removeEventListener(`transitionend`,n);let i=-(window.innerWidth*D);t.style.transition=`none`,t.style.transform=`translateX(${i}px)`,t.style.opacity=`0`,t.offsetWidth,s.current=!0,a.current(),c(()=>{s.current&&(s.current=!1,l())},E*2)};t.addEventListener(`transitionend`,n,{once:!0}),c(n,T+O)},_=e=>{if(!o.current||i.current||e.touches.length!==1)return;let t=e.touches[0];t&&(t.clientX>v||(i.current={touchId:t.identifier,startX:t.clientX,startY:t.clientY,confirmed:!1,hasFiredHaptic:!1}))},y=e=>{let n=i.current;if(!n)return;if(e.touches.length>1){p(!1);return}let r=f(e.touches,n.touchId);if(!r)return;let a=r.clientX-n.startX,o=r.clientY-n.startY;if(!n.confirmed){let e=j(a,o);if(e===`pending`)return;if(e===`cancel`){p(!1);return}n.confirmed=!0,t.style.transition=`none`,t.style.willChange=`transform`}let s=u();if(A(a,o)&&a<s){p(!0);return}let c=M(a,s);a>=s&&!n.hasFiredHaptic&&(n.hasFiredHaptic=!0,m.light()),d(c)},b=e=>{let t=i.current;if(!t)return;let n=f(e.changedTouches,t.touchId),r=n?n.clientX-t.startX:0;t.confirmed&&N(r,u())?(i.current=null,h()):t.confirmed?p(!0):p(!1)},x=()=>{i.current?.confirmed?p(!0):p(!1)};return document.addEventListener(`touchstart`,_,{passive:!0}),document.addEventListener(`touchmove`,y,{passive:!0}),document.addEventListener(`touchend`,b,{passive:!0}),document.addEventListener(`touchcancel`,x,{passive:!0}),()=>{r=!0;for(let e of n)clearTimeout(e);n.clear(),i.current=null,document.removeEventListener(`touchstart`,_),document.removeEventListener(`touchmove`,y),document.removeEventListener(`touchend`,b),document.removeEventListener(`touchcancel`,x),l()}},[e]),(0,_.useLayoutEffect)(()=>{if(!s.current)return;s.current=!1;let t=e.current;if(!t)return;let n=!1,r=()=>{n||(n=!0,t.removeEventListener(`transitionend`,r),P(t))};t.style.transition=`transform ${E}ms ease-out, opacity ${E}ms ease-out`,t.style.transform=``,t.style.opacity=``,t.addEventListener(`transitionend`,r,{once:!0});let i=setTimeout(r,E+O);return()=>{clearTimeout(i),t.removeEventListener(`transitionend`,r),P(t)}},[r,e])}var I=o();function L({sidebar:e,children:t,actions:o,backHref:c,title:d=`Settings`,menuRoute:m=f.settings.root}){let{pathname:g}=a(),v=r(),y=g===m,b=p(),x=(0,_.useRef)(null),S=y?c:m;F({containerRef:x,onBack:(0,_.useCallback)(()=>{v(S)},[v,S]),enabled:b&&!y,navKey:g});let C=l(),w=y?`Back from ${d}`:`Back to ${d} menu`,T=(0,I.jsx)(n,{variant:`ghost`,iconOnly:(0,I.jsx)(u,{}),"aria-label":w,tintColor:`var(--content-secondary)`,onClick:()=>v(S)}),E=(0,I.jsx)(n,{asChild:!0,variant:`outlined`,"aria-label":`Back from ${d}`,className:`h-8 w-8 px-0`,tintColor:`var(--content-secondary)`,children:(0,I.jsx)(i,{to:c,className:`flex items-center justify-center no-underline`,children:(0,I.jsx)(u,{size:16,"aria-hidden":`true`})})});return(0,I.jsxs)(`div`,{ref:x,className:`flex h-full min-h-0 w-full flex-1 flex-col gap-4 p-4 sm:p-6 md:gap-0`,style:{paddingTop:C?`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 3.75rem)`:`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 1rem)`},children:[(0,I.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 md:hidden`,children:[T,(0,I.jsx)(s,{as:`h1`,variant:`body-large-default`,className:`flex-1 truncate text-center`,style:{color:`var(--content-tertiary)`,lineHeight:1.4},children:d}),(0,I.jsx)(`div`,{className:`h-10 w-10 shrink-0`,"aria-hidden":`true`})]}),C?(0,I.jsx)(`div`,{className:`shrink-0 pb-4 empty:hidden`,children:(0,I.jsx)(h,{placement:`electron`,className:`px-0 pt-0`})}):null,(0,I.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden md:rounded-[12px] md:border md:border-[var(--border-base)] md:bg-[var(--surface-overlay)]`,children:[(0,I.jsxs)(`div`,{className:`hidden shrink-0 items-center justify-between gap-4 px-6 py-5 md:flex`,children:[(0,I.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[E,(0,I.jsx)(`h1`,{className:`text-title-large truncate`,style:{color:`var(--content-emphasised)`,lineHeight:1.2},children:d})]}),(0,I.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:o})]}),(0,I.jsxs)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:[(0,I.jsx)(`aside`,{className:`hidden w-64 shrink-0 overflow-y-auto md:block`,"aria-label":`${d} navigation`,children:e}),y?(0,I.jsx)(`div`,{className:`flex min-w-0 min-h-0 flex-1 flex-col overflow-y-auto pb-6 md:hidden`,children:e}):null,(0,I.jsx)(`main`,{className:`min-w-0 min-h-0 flex-1 flex-col gap-4 overflow-y-auto pb-6 md:flex md:px-6 md:pt-0 ${y?`hidden`:`flex`}`,children:t})]})]})]})}function R({items:e,bottomItems:t,indexPath:n}){let{pathname:i}=a(),o=r(),s=(e,t,r)=>{let{href:a,onSelect:s}=e,l=a!=null&&(i===a||i.startsWith(a+`/`)||r&&n!=null&&i===n);return(0,I.jsxs)(_.Fragment,{children:[(0,I.jsx)(c.Item,{icon:e.icon,label:e.label,active:l,trailingIcon:a==null?void 0:d,trailingIconClassName:a==null?void 0:`md:hidden`,href:a,onSelect:s,onClick:a==null?void 0:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||(e.preventDefault(),o(a))}}),!t&&(0,I.jsx)(`div`,{role:`presentation`,"aria-hidden":!0,className:`my-2 h-px w-full bg-[var(--border-base)] md:hidden`})]},e.id)};return(0,I.jsxs)(`nav`,{"aria-label":`Sidebar navigation`,className:`flex min-h-full flex-col md:gap-2 md:px-6 md:pb-4`,children:[e.map((n,r)=>s(n,r===e.length-1&&!t?.length,r===0)),t&&t.length>0&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`flex-1`}),(0,I.jsx)(`div`,{role:`presentation`,"aria-hidden":!0,className:`mx-0 my-2 h-px w-full bg-[var(--border-base)] md:mx-0`}),t.map((e,n)=>s(e,n===t.length-1,!1))]})]})}export{L as n,R as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{h as n,t as r}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as i}from"./jsx-runtime-CVSDxk6A.js";import{t as a}from"./is-electron-BuSDabCt.js";import{A as o,
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{h as n,t as r}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as i}from"./jsx-runtime-CVSDxk6A.js";import{t as a}from"./is-electron-BuSDabCt.js";import{A as o,j as s}from"./auth-store-CrTf0uWL.js";import{a as c}from"./routes-BKwsRssF.js";import{n as l,r as u}from"./login-flow-BMwbZfKA.js";import{t as d}from"./proxy-CQsxT9tJ.js";import{J as f,R as p,W as m}from"./index-LP2PV_QY.js";import{t as h}from"./signup-shell-D6LXKfGy.js";var g=e(t(),1),_=i();function v({words:e}){let[t,n]=(0,g.useState)(0),r=(0,g.useMemo)(()=>e.reduce((e,t)=>e.length>=t.length?e:t),[e]);return(0,g.useEffect)(()=>{let t=setInterval(()=>{n(t=>(t+1)%e.length)},2400);return()=>clearInterval(t)},[e.length]),(0,_.jsxs)(`span`,{className:`signup__rotating`,children:[(0,_.jsxs)(`span`,{className:`signup__rotating-sizer`,"aria-hidden":!0,children:[r,`.`]}),(0,_.jsx)(f,{mode:`wait`,children:(0,_.jsxs)(d.em,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:-16},transition:{duration:.3,ease:`easeInOut`},children:[e[t],`.`]},e[t])})]})}var y=[`Personal Intelligence`,`Software Engineer`,`Finance Ops`,`Household Manager`,`GTM Engineer`,`Product Lead`],b=[{icon:(0,_.jsx)(p,{size:18}),label:`Continue with Google`,providerHint:`GoogleOAuth`},{icon:(0,_.jsx)(m,{size:18}),label:`Continue with Apple`,providerHint:`AppleOAuth`},{icon:(0,_.jsxs)(`svg`,{width:18,height:18,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.8,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,_.jsx)(`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}),(0,_.jsx)(`path`,{d:`m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7`})]}),label:`Continue with Email`}];function x({returnTo:e}){let[t,n]=(0,g.useState)(null),i=u(e,{authIntent:`signup`}),d=t=>{n(null);let r=!!t&&!o()&&!a();s(l,i,{returnTo:e,...t?{providerHint:t}:{},...r?{}:{intent:`signup`}}).catch(e=>{console.error(`[signup] auth flow failed:`,e),n(`Something went wrong. Please try again.`)})};return(0,_.jsxs)(h,{children:[(0,_.jsxs)(`h1`,{className:`signup__title`,children:[`Meet your new`,(0,_.jsx)(`br`,{}),(0,_.jsx)(v,{words:y})]}),(0,_.jsx)(`p`,{className:`signup__subtitle`,children:`The most powerful assistant that can handle your work and life admin tasks.`}),(0,_.jsx)(`div`,{className:`signup__buttons`,children:b.map((e,t)=>(0,_.jsxs)(`button`,{type:`button`,className:`signup__btn`,onClick:()=>d(e.providerHint),children:[t===0&&(0,_.jsx)(`span`,{className:`signup__tag`,children:`Most used`}),e.icon,e.label]},e.label))}),t&&(0,_.jsx)(`p`,{className:`signup__error`,children:t}),(0,_.jsxs)(`p`,{className:`signup__footer`,children:[`Already have an account?`,` `,(0,_.jsx)(r,{to:c.account.login,className:`signup__link`,children:`Sign in`})]}),(0,_.jsxs)(`a`,{className:`signup__download`,href:`/downloads`,children:[(0,_.jsx)(m,{size:16}),`Download for macOS`]})]})}function S(){let[e]=n();return(0,_.jsx)(x,{returnTo:e.get(`returnTo`)})}export{S as SignupPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{t}from"./public-asset-
|
|
1
|
+
import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{t}from"./public-asset-Dp-i4xhW.js";import{t as n}from"./proxy-CQsxT9tJ.js";var r=e();function i({children:e}){return(0,r.jsxs)(n.div,{"data-theme":`dark`,className:`signup`,initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:[(0,r.jsxs)(`div`,{className:`signup__left`,children:[(0,r.jsx)(`div`,{className:`signup__logo`,children:(0,r.jsx)(`img`,{src:t(`/vellum-logo-white.svg`),alt:`Vellum`,width:82,height:25})}),(0,r.jsx)(`div`,{className:`signup__form`,children:e})]}),(0,r.jsx)(n.div,{className:`signup__right`,initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.15},"aria-hidden":!0,children:(0,r.jsx)(`video`,{className:`signup__video`,src:t(`/vellum-scene-cut.mp4`),autoPlay:!0,loop:!0,muted:!0,playsInline:!0})})]})}export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{a as t,t as n}from"./local-settings-lVNyIOJ_.js";import{t as r}from"./react-DJZBPgpf.js";import{O as i,t as a}from"./button-D7s2Q_uG.js";import{h as o}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as s}from"./QueryClientProvider-DKhXIxGb.js";import{t as c}from"./useQuery-B45lW1Kk.js";import{t as l}from"./useMutation-Lj4VunQV.js";import{t as u}from"./jsx-runtime-CVSDxk6A.js";import{t as d}from"./card-BibIM9x3.js";import{t as f}from"./menu-BvyV91Np.js";import"./src-D6Nu2Lol.js";import{t as p}from"./confirm-dialog-DbNUkFt6.js";import{t as m}from"./popover-PnyzuDx3.js";import{t as h}from"./input-CwdmSRlD.js";import{n as g}from"./stat-square-B5tBfA4w.js";import{n as _,t as v}from"./panel-item-BFOUNXY1.js";import{t as y}from"./createLucideIcon-DIlBzeWM.js";import{t as b}from"./arrow-left-DpZuwfUr.js";import{a as x,c as S,i as C,n as w,o as T,r as E,s as D,t as ee}from"./install-BTdfOS56.js";import{t as O}from"./calendar-Dm2Jn-zV.js";import{t as k}from"./cloud-off-DJomNBuZ.js";import{t as A}from"./code-CXddtaOh.js";import{t as j}from"./globe-BV8ouh66.js";import{t as te}from"./link-2-BedDg97D.js";import{t as M}from"./loader-circle-CTs38Ovl.js";import{t as N}from"./sparkles-B9QIWdq0.js";import{t as P}from"./triangle-alert-M_S_Pe8C.js";import{t as F}from"./x-Dz7msELe.js";import{Gt as ne,_t as re,gt as ie,ht as I,mt as ae,pt as oe}from"./react-query.gen-DdB0sQgj.js";import{n as se}from"./use-is-mobile-C0ubX5Es.js";import{$i as L,Ca as R,Ea as z,H as B,Ha as V,Ki as H,Li as U,Oa as W,Pa as G,U as K,Ui as ce,Wa as q,aa as le,fo as J,ho as ue,mo as de,qa as fe,qi as pe,ra as me,xa as he,xo as Y,za as ge}from"./index-DjBiif5r.js";import{t as _e}from"./use-active-assistant-id-BtGthKQp.js";var ve=y(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),ye=y(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),X=e(r(),1),be={mail:W,calendar:O,"message-circle":z,globe:j,zap:U,code:A,mic:R,"shopping-cart":L,palette:ye,heart:ge,settings:me,"link-2":te};function xe(e){return be[e]}var Z=u();function Se({selected:e,onSelect:t,counts:n,totalCount:r,showCounts:i,categories:a}){let o=[...a].sort((e,t)=>e.label.localeCompare(t.label));return(0,Z.jsxs)(`nav`,{className:`flex flex-col gap-1`,"aria-label":`Skill categories`,children:[(0,Z.jsx)(Ce,{icon:G,label:`All`,count:r,isActive:e===null,showCount:i,onClick:()=>t(null)}),o.map(r=>(0,Z.jsx)(Ce,{icon:xe(r.icon)??G,label:r.label,count:n[r.slug]??0,isActive:e===r.slug,showCount:i,onClick:()=>t(r.slug)},r.slug))]})}function Ce({icon:e,label:t,count:n,isActive:r,showCount:i,onClick:o}){return(0,Z.jsxs)(a,{variant:`ghost`,onClick:o,"aria-pressed":r,className:`h-auto justify-between gap-3 rounded-lg border-0 bg-transparent px-3 py-2 text-left hover:bg-[var(--ghost-hover)]`,style:{backgroundColor:r?`var(--surface-active)`:void 0,color:r?`var(--content-default)`:`var(--content-secondary)`},children:[(0,Z.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,Z.jsx)(e,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}),(0,Z.jsx)(`span`,{className:`text-body-medium-default`,children:t})]}),i&&(0,Z.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:n})]})}var we=e(i(),1);function Te(e,t){return t??e.find(e=>e.name===`SKILL.md`)?.path??null}function Ee(e,t){let[n,r]=(0,X.useState)(null),i=c({...ae({path:{assistant_id:e,id:t}}),select:e=>e??null}),a=(0,X.useMemo)(()=>i.data?.files??[],[i.data]),o=(0,X.useMemo)(()=>a.find(e=>e.name===`SKILL.md`),[a]),s=Te(a,n),l=c({...oe({path:{assistant_id:e,id:t},query:{path:s??``}}),select:e=>e??null,enabled:!!s});return{fileEntries:a,skillMd:o,selectedPath:n,setSelectedPath:r,activePath:s,activeFile:a.find(e=>e.path===s),isFilesLoading:i.isLoading,fileContent:l.data?.content??null,isBinary:!!l.data?.isBinary,isContentLoading:l.isLoading}}function De({fileName:e,content:t,isBinary:n,viewMode:r=`preview`}){return n?(0,Z.jsx)(`p`,{className:`flex h-full items-center justify-center text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`Binary file — no preview available.`}):t===null?(0,Z.jsxs)(`p`,{className:`flex h-full items-center justify-center text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:[`No preview available for `,e,`.`]}):K(e,void 0)&&r===`preview`?(0,Z.jsx)(`div`,{className:`h-full overflow-auto px-6 py-4`,style:{color:`var(--content-default)`},children:(0,Z.jsx)(B,{content:t})}):(0,Z.jsx)(`pre`,{className:`h-full overflow-y-auto whitespace-pre-wrap break-words p-4 font-mono text-body-small-default`,style:{color:`var(--content-default)`},children:t})}function Oe({assistantId:e,skill:t,onBack:n,onInstall:r,onRemove:i,isInstalling:o=!1,isRemoving:s=!1}){let c=E(t),l=x(t),{fileEntries:u,setSelectedPath:f,activePath:p,activeFile:m,isFilesLoading:h,fileContent:_,isBinary:v,isContentLoading:y}=Ee(e,t.id),[S,C]=(0,X.useState)(`preview`);(0,X.useEffect)(()=>{C(`preview`)},[p]);let[w,ee]=(0,X.useState)(null);(0,X.useEffect)(()=>{ee(document.getElementById(`viewport-overlays`))},[]);let O=m?K(m.name,void 0):!1,k=O?S:`raw`,j=(0,Z.jsxs)(`div`,{className:`fixed inset-0 z-40 flex flex-col overflow-hidden bg-[var(--surface-overlay)]`,style:{paddingTop:`calc(8px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)))`,paddingBottom:`calc(8px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)))`,paddingLeft:`calc(12px + var(--safe-area-inset-left, env(safe-area-inset-left, 0px)))`,paddingRight:`calc(12px + var(--safe-area-inset-right, env(safe-area-inset-right, 0px)))`},children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(a,{variant:`ghost`,iconOnly:(0,Z.jsx)(b,{"aria-hidden":!0}),expandOnMobile:!0,"aria-label":`Back to skills`,onClick:n,className:`max-md:bg-[var(--surface-active)]`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate px-2 text-center text-body-medium-default`,style:{color:`var(--content-secondary)`},children:t.name}),(0,Z.jsx)(ke,{available:c,removable:l,isInstalling:o,isRemoving:s,onInstall:r,onRemove:i})]}),(0,Z.jsxs)(`div`,{className:`mt-4 flex flex-col gap-2`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Z.jsx)(D,{skill:t,className:`h-6 w-6 shrink-0 text-[22px] leading-none`}),(0,Z.jsx)(`h2`,{className:`min-w-0 truncate text-title-medium`,style:{color:`var(--content-emphasised)`},children:t.name})]}),(0,Z.jsx)(T,{origin:t.origin})]}),(0,Z.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:t.description})]}),(0,Z.jsx)(d.Root,{asChild:!0,noPadding:!0,children:(0,Z.jsxs)(`div`,{className:`mt-6 flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border bg-[var(--surface-lift)]`,style:{borderColor:`var(--border-hover)`},children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b px-3 py-2`,style:{borderColor:`var(--border-hover)`},children:[(0,Z.jsx)(je,{fileEntries:u,activePath:p,activeName:m?.name??null,onSelect:f}),(0,Z.jsx)(g,{iconOnly:!0,ariaLabel:`File view mode`,value:k,onChange:C,items:[{value:`preview`,label:`Preview`,icon:(0,Z.jsx)(fe,{"aria-hidden":!0}),disabled:!O},{value:`raw`,label:`Source`,icon:(0,Z.jsx)(A,{"aria-hidden":!0})}]})]}),(0,Z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:h||y?(0,Z.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Z.jsx)(M,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})}):m?(0,Z.jsx)(De,{fileName:m.name,content:_,isBinary:v,viewMode:k}):(0,Z.jsx)(`p`,{className:`flex h-full items-center justify-center text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`Select a file to view its contents.`})})]})})]});return w?(0,we.createPortal)(j,w):j}function ke({available:e,removable:t,isInstalling:n,isRemoving:r,onInstall:i,onRemove:o}){return n||r?(0,Z.jsx)(a,{variant:`ghost`,iconOnly:(0,Z.jsx)(M,{className:`animate-spin`,"aria-hidden":!0}),expandOnMobile:!0,disabled:!0,"aria-label":`Pending`,className:`max-md:bg-[var(--surface-active)]`}):e?(0,Z.jsx)(a,{variant:`ghost`,iconOnly:(0,Z.jsx)(Y,{"aria-hidden":!0}),expandOnMobile:!0,"aria-label":`Install skill`,onClick:i,disabled:!i,className:`max-md:bg-[var(--surface-active)]`}):t?(0,Z.jsx)(a,{variant:`dangerGhost`,iconOnly:(0,Z.jsx)(H,{"aria-hidden":!0}),expandOnMobile:!0,"aria-label":`Remove skill`,onClick:o,disabled:!o,className:`max-md:rounded-full max-md:bg-[var(--system-negative-weak)]`}):(0,Z.jsx)(a,{variant:`dangerGhost`,iconOnly:(0,Z.jsx)(H,{"aria-hidden":!0}),expandOnMobile:!0,disabled:!0,title:`Bundled skills cannot be removed`,"aria-label":`Bundled skill cannot be removed`,className:`max-md:rounded-full max-md:bg-[var(--system-negative-weak)]`})}function Ae(e){return(e??``).endsWith(`/directory`)}function je({fileEntries:e,activePath:t,activeName:n,onSelect:r}){let i=n??`Select a file`;return e.length===0?(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-body-medium-default`,style:{color:`var(--content-emphasised)`},children:[(0,Z.jsx)(Me,{}),(0,Z.jsx)(`span`,{className:`truncate`,children:i})]}):(0,Z.jsxs)(f.Root,{children:[(0,Z.jsx)(f.Trigger,{children:(0,Z.jsxs)(`button`,{type:`button`,className:`flex min-w-0 items-center gap-2 rounded-md text-body-medium-default`,style:{color:`var(--content-emphasised)`},children:[(0,Z.jsx)(Me,{}),(0,Z.jsx)(`span`,{className:`truncate`,children:i}),(0,Z.jsx)(de,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`},"aria-hidden":!0})]})}),(0,Z.jsx)(f.Content,{align:`start`,children:e.map(e=>{let n=Ae(e.mimeType);return(0,Z.jsx)(f.Item,{onSelect:()=>r(e.path),leftIcon:n?(0,Z.jsx)(V,{}):(0,Z.jsx)(q,{}),"aria-current":e.path===t?`true`:void 0,children:e.name},e.path)})})]})}function Me(){return(0,Z.jsx)(`span`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-[var(--surface-base)]`,"aria-hidden":!0,children:(0,Z.jsx)(q,{className:`h-4 w-4`,style:{color:`var(--content-secondary)`}})})}var Ne=[{value:`all`,label:`All`,icon:G},{value:`installed`,label:`Installed`,icon:J},{value:`available`,label:`Available`,icon:Y}],Pe=[{value:`vellum`,label:`Vellum`,icon:S},{value:`clawhub`,label:`Clawhub`,icon:j},{value:`skillssh`,label:`skills.sh`,icon:pe},{value:`custom`,label:`Custom`,icon:ce}];function Fe({search:e,onSearchChange:t,filter:n,onFilterChange:r,isSearching:i,categories:a,category:o,onCategoryChange:s,counts:c,totalCount:l,showCounts:u}){return(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(h,{type:`search`,value:e,onChange:e=>{t(e.target.value)},placeholder:`Search skills`,"aria-label":`Search skills`,leftIcon:(0,Z.jsx)(le,{className:`h-4 w-4`,"aria-hidden":!0}),rightIcon:i?(0,Z.jsx)(M,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}):void 0,fullWidth:!0,wrapperClassName:`flex-1`}),(0,Z.jsx)(Ie,{filter:n,onFilterChange:r,categories:a,category:o,onCategoryChange:s,counts:c,totalCount:l,showCounts:u})]})}function Ie(e){let t=se(),[n,r]=(0,X.useState)(!1),i=(0,Z.jsx)(a,{type:`button`,variant:`outlined`,iconOnly:(0,Z.jsx)(ve,{"aria-hidden":!0}),"aria-label":`Filter skills`,"aria-haspopup":t?`dialog`:`listbox`,"aria-expanded":n,tintColor:`var(--primary-base)`});return t?(0,Z.jsx)(Le,{...e,open:n,onOpenChange:r,trigger:i}):(0,Z.jsxs)(m.Root,{open:n,onOpenChange:r,children:[(0,Z.jsx)(m.Trigger,{asChild:!0,children:i}),(0,Z.jsx)(m.Content,{align:`end`,sideOffset:4,className:`w-44 overflow-hidden p-0`,children:(0,Z.jsxs)(`ul`,{role:`listbox`,children:[(0,Z.jsx)(Re,{label:`Status`,options:Ne,selected:e.filter,onSelect:t=>{e.onFilterChange(t),r(!1)}}),(0,Z.jsx)(`div`,{className:`border-t`,style:{borderColor:`var(--border-base)`}}),(0,Z.jsx)(Re,{label:`Source`,options:Pe,selected:e.filter,onSelect:t=>{e.onFilterChange(t),r(!1)}})]})})]})}function Le({filter:e,onFilterChange:t,categories:n,category:r,onCategoryChange:i,counts:o,totalCount:s,showCounts:c,open:l,onOpenChange:u,trigger:d}){let f=[...n].sort((e,t)=>e.label.localeCompare(t.label));return(0,Z.jsxs)(_.Root,{open:l,onOpenChange:u,children:[(0,Z.jsx)(_.Trigger,{asChild:!0,children:d}),(0,Z.jsxs)(_.Content,{className:`max-h-[85dvh]`,"aria-describedby":void 0,children:[(0,Z.jsx)(`div`,{"aria-hidden":!0,className:`mx-auto mb-3 h-1 w-9 shrink-0 rounded-full bg-[var(--border-element)]`}),(0,Z.jsx)(_.Header,{children:(0,Z.jsx)(_.Title,{children:`Filters`})}),(0,Z.jsxs)(_.Body,{className:`flex flex-col gap-3 pt-2`,children:[(0,Z.jsx)(Q,{label:`Status`,children:Ne.map(n=>(0,Z.jsx)($,{icon:n.icon,label:n.label,active:e===n.value,onSelect:()=>t(n.value)},n.value))}),(0,Z.jsx)(Q,{label:`Source`,children:Pe.map(n=>(0,Z.jsx)($,{icon:n.icon,label:n.label,active:e===n.value,onSelect:()=>t(n.value)},n.value))}),(0,Z.jsxs)(Q,{label:`Categories`,children:[(0,Z.jsx)($,{icon:G,label:`All`,active:r===null,badge:c?s:void 0,onSelect:()=>i(null)}),f.map(e=>(0,Z.jsx)($,{icon:xe(e.icon)??G,label:e.label,active:r===e.slug,badge:c?o[e.slug]??0:void 0,onSelect:()=>i(e.slug)},e.slug))]})]}),(0,Z.jsx)(_.Footer,{children:(0,Z.jsx)(a,{type:`button`,variant:`primary`,fullWidth:!0,onClick:()=>u(!1),children:`Done`})})]})]})}function Q({label:e,children:t}){return(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`px-2 pb-1 text-body-small-default uppercase tracking-wide`,style:{color:`var(--content-tertiary)`},children:e}),t]})}function $({icon:e,label:t,active:n,badge:r,onSelect:i}){return(0,Z.jsx)(v,{icon:e,label:t,active:n,activeVariant:`branded`,badge:r,trailingAction:n&&r==null?(0,Z.jsx)(ue,{className:`h-4 w-4 text-[var(--primary-base)]`,"aria-hidden":!0}):void 0,onSelect:i})}function Re({label:e,options:t,selected:n,onSelect:r}){return(0,Z.jsxs)(`li`,{children:[(0,Z.jsx)(`div`,{className:`px-3 pb-1 pt-2 text-body-small-default uppercase tracking-wide`,style:{color:`var(--content-tertiary)`},children:e}),(0,Z.jsx)(`ul`,{children:t.map(e=>{let t=e.icon,i=n===e.value;return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>r(e.value),role:`option`,"aria-selected":i,className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-body-medium-lighter transition-colors hover:bg-[var(--surface-hover)]`,style:{color:i?`var(--primary-base)`:`var(--content-default)`},children:[(0,Z.jsx)(t,{className:`h-4 w-4`,"aria-hidden":!0}),(0,Z.jsx)(`span`,{className:`flex-1`,children:e.label}),i&&(0,Z.jsx)(J,{className:`h-3.5 w-3.5`,"aria-hidden":!0})]})},e.value)})})]})}function ze({skill:e,onSelect:t,onInstall:n,onRemove:r,isInstalling:i=!1,isRemoving:o=!1}){let s=E(e),c=x(e);return(0,Z.jsx)(d.Root,{asChild:!0,children:(0,Z.jsxs)(`div`,{role:`button`,tabIndex:0,onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},className:`flex cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors hover:bg-[var(--surface-hover)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]`,children:[(0,Z.jsx)(`div`,{className:`flex shrink-0 items-center justify-center text-[28px] leading-none`,children:(0,Z.jsx)(D,{skill:e,className:`h-7 w-7`})}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`truncate text-body-medium-default`,style:{color:`var(--content-emphasised)`},children:e.name}),(0,Z.jsx)(T,{origin:e.origin})]}),(0,Z.jsx)(`p`,{className:`mt-1 truncate text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:e.description})]}),s?i?(0,Z.jsx)(a,{type:`button`,iconOnly:(0,Z.jsx)(M,{className:`animate-spin`,"aria-hidden":!0}),disabled:!0,"aria-label":`Installing`,expandOnMobile:!1}):(0,Z.jsx)(a,{type:`button`,iconOnly:(0,Z.jsx)(Y,{"aria-hidden":!0}),onClick:e=>{e.stopPropagation(),n?.()},disabled:!n,"aria-label":`Install skill`,expandOnMobile:!1}):(0,Z.jsx)(a,{type:`button`,variant:`dangerOutline`,iconOnly:o?(0,Z.jsx)(M,{className:`animate-spin`,"aria-hidden":!0}):(0,Z.jsx)(H,{"aria-hidden":!0}),onClick:e=>{e.stopPropagation(),r?.()},disabled:!c||o||!r,"aria-label":c?`Remove skill`:`Bundled skill cannot be removed`,title:c?void 0:`Bundled skills cannot be removed`,expandOnMobile:!1})]})})}function Be(e){return c({...I({path:{assistant_id:e}}),select:e=>e.categories,staleTime:300*1e3})}function Ve(e){switch(e){case`installed`:return{kind:`installed`};case`available`:return{kind:`available`};case`vellum`:case`clawhub`:case`skillssh`:case`custom`:return{origin:e};default:return{}}}function He(e){return[...e].sort((e,t)=>{let n=C(e);return n===C(t)?e.name.localeCompare(t.name,void 0,{sensitivity:`base`}):n?-1:1})}function Ue(e,t){let[n,r]=(0,X.useState)(e);return(0,X.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>clearTimeout(n)},[e,t]),n}var We=300,Ge=`vellum:skills:tipDismissed`;function Ke({assistantId:e,initialSkillId:r}){let i=s(),a=se(),[o,u]=(0,X.useState)(``),d=Ue(o.trim(),We),[f,m]=(0,X.useState)(`all`),[h,g]=(0,X.useState)(null),[_,v]=(0,X.useState)(r??null),[y,b]=(0,X.useState)(null),[x,S]=(0,X.useState)(null),[C,T]=(0,X.useState)(null),[E,D]=(0,X.useState)(()=>n(Ge,!1)),{data:O=[]}=Be(e),{origin:k,kind:A}=(0,X.useMemo)(()=>Ve(f),[f]),j=c({...ie({path:{assistant_id:e},query:{include:`catalog`,origin:k,kind:A,q:d||void 0,category:h??void 0}}),select:e=>({skills:e.skills,categoryCounts:e.categoryCounts,totalCount:e.totalCount}),enabled:!!e}),te=c({...ie({path:{assistant_id:e},query:{include:`catalog`,origin:k,kind:A,q:d||void 0}}),select:e=>({skills:e.skills,categoryCounts:e.categoryCounts,totalCount:e.totalCount}),enabled:!!e&&h!==null}),M=(0,X.useCallback)(()=>{i.invalidateQueries({queryKey:re({path:{assistant_id:e}})})},[e,i]),N=l({mutationFn:t=>ee(e,t),onMutate:e=>b(e),onSettled:()=>{b(null),M()}}),P=ne({onMutate:e=>S(e.path.id),onSettled:()=>{S(null),M()}}),F=(0,X.useCallback)(e=>{N.mutate(e.slug??e.id)},[N]),I=(0,X.useCallback)(e=>{T(e)},[]),ae=(0,X.useCallback)(()=>{C&&(P.mutate({path:{assistant_id:e,id:C.id}}),T(null))},[e,C,P]),oe=(0,X.useCallback)(()=>{D(!0),t(Ge,!0)},[]),L=(0,X.useMemo)(()=>j.data?.skills??[],[j.data?.skills]),R=h===null?j.data:te.data,{counts:z,totalCount:B}=qe(R?.skills??L,R?.categoryCounts,R?.totalCount),V=(0,X.useMemo)(()=>He(L),[L]),H=(0,X.useMemo)(()=>_?L.find(e=>e.id===_)??null:null,[L,_]),U=(0,Z.jsx)(p,{open:C!==null,title:`Remove skill`,message:C?`Remove "${C.name}" from this assistant?`:``,confirmLabel:`Remove`,destructive:!0,onConfirm:ae,onCancel:()=>T(null)});if(H){let t={assistantId:e,skill:H,onBack:()=>v(null),onInstall:()=>F(H),onRemove:()=>I(H),isInstalling:y===(H.slug??H.id),isRemoving:x===H.id};return(0,Z.jsxs)(Z.Fragment,{children:[a?(0,Z.jsx)(Oe,{...t}):(0,Z.jsx)(w,{...t}),U]})}let W=j.isFetching&&!!d;return(0,Z.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1 flex-col gap-4`,children:[!E&&(0,Z.jsx)(Je,{onDismiss:oe}),(0,Z.jsx)(Fe,{search:o,onSearchChange:u,filter:f,onFilterChange:m,isSearching:W,categories:O,category:h,onCategoryChange:g,counts:z,totalCount:B,showCounts:!W}),(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-6`,children:[(0,Z.jsx)(`aside`,{className:`hidden w-56 shrink-0 overflow-y-auto sm:block`,children:(0,Z.jsx)(Se,{selected:h,onSelect:g,counts:z,totalCount:B,showCounts:!W,categories:O})}),(0,Z.jsx)(`div`,{className:`min-w-0 flex-1 overflow-y-auto`,children:j.isLoading?(0,Z.jsx)(Ye,{}):j.isError?(0,Z.jsx)(Xe,{}):V.length===0?(0,Z.jsx)(Ze,{filter:f,category:h}):(0,Z.jsx)(`ul`,{className:`flex flex-col gap-2`,children:V.map(e=>(0,Z.jsx)(`li`,{children:(0,Z.jsx)(ze,{skill:e,onSelect:()=>v(e.id),onInstall:()=>F(e),onRemove:()=>I(e),isInstalling:y===(e.slug??e.id),isRemoving:x===e.id})},e.id))})})]}),U]})}function qe(e,t,n){return(0,X.useMemo)(()=>{if(t&&Object.keys(t).length>0)return{counts:t,totalCount:n??e.length};let r={};for(let t of e){let e=t.category??`system`;r[e]=(r[e]??0)+1}return{counts:r,totalCount:n??e.length}},[e,t,n])}function Je({onDismiss:e}){return(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg px-4 py-2.5 text-body-small-default`,style:{backgroundColor:`var(--surface-base)`,color:`var(--content-secondary)`},children:[(0,Z.jsx)(N,{className:`h-4 w-4 shrink-0`,style:{color:`var(--primary-base)`}}),(0,Z.jsx)(`p`,{className:`flex-1`,children:`You can create a new custom skill by describing what you want in chat.`}),(0,Z.jsx)(a,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Z.jsx)(F,{"aria-hidden":!0}),onClick:e,"aria-label":`Dismiss tip`,tintColor:`var(--content-tertiary)`,expandOnMobile:!1})]})}function Ye(){return(0,Z.jsx)(`div`,{className:`flex items-center justify-center py-16`,children:(0,Z.jsx)(M,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})})}function Xe(){return(0,Z.jsx)(d.Root,{children:(0,Z.jsxs)(d.Body,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,Z.jsx)(P,{className:`mb-3 h-8 w-8`,style:{color:`var(--system-danger)`},"aria-hidden":!0}),(0,Z.jsx)(`h3`,{className:`text-title-small`,style:{color:`var(--content-default)`},children:`Failed to load skills`}),(0,Z.jsx)(`p`,{className:`mt-1 max-w-sm text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`Something went wrong. Try refreshing the page.`})]})})}function Ze({filter:e,category:t}){let{title:n,subtitle:r,Icon:i}=Qe(e,t);return(0,Z.jsx)(d.Root,{children:(0,Z.jsxs)(d.Body,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,Z.jsx)(i,{className:`mb-3 h-8 w-8`,style:{color:`var(--content-tertiary)`},"aria-hidden":!0}),(0,Z.jsx)(`h3`,{className:`text-title-small`,style:{color:`var(--content-default)`},children:n}),(0,Z.jsx)(`p`,{className:`mt-1 max-w-sm text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:r})]})})}function Qe(e,t){if(t)return{title:`No skills in this category`,subtitle:`Try selecting a different category or clearing the filter.`,Icon:G};switch(e){case`installed`:return{title:`No Skills Installed`,subtitle:`Ask your assistant in chat to search for and install new skills.`,Icon:U};case`available`:return{title:`No Skills Available`,subtitle:`All available skills have been installed.`,Icon:J};case`vellum`:return{title:`No Vellum Skills`,subtitle:`No bundled Vellum skills found.`,Icon:he};case`clawhub`:return{title:`No Clawhub Skills`,subtitle:`No Clawhub skills found. Try searching the catalog.`,Icon:j};case`skillssh`:return{title:`No skills.sh Skills`,subtitle:`No skills.sh skills found. Try searching the catalog.`,Icon:pe};case`custom`:return{title:`No Custom Skills`,subtitle:`Create a custom skill by describing what you want in chat.`,Icon:ce};default:return{title:`No Skills Available`,subtitle:`Check your connection to the Vellum catalog.`,Icon:k}}}function $e(){let e=_e(),[t]=o();return(0,Z.jsx)(Ke,{assistantId:e,initialSkillId:t.get(`skill`)??void 0})}export{$e as SkillsPage};
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{a as t,t as n}from"./local-settings-lVNyIOJ_.js";import{t as r}from"./react-DJZBPgpf.js";import{O as i,t as a}from"./button-D7s2Q_uG.js";import{h as o}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as s}from"./QueryClientProvider-DKhXIxGb.js";import{t as c}from"./useQuery-B45lW1Kk.js";import{t as l}from"./useMutation-Lj4VunQV.js";import{t as u}from"./jsx-runtime-CVSDxk6A.js";import{t as d}from"./card-BibIM9x3.js";import{t as f}from"./menu-BvyV91Np.js";import"./src-D6Nu2Lol.js";import{t as p}from"./confirm-dialog-DbNUkFt6.js";import{t as m}from"./popover-PnyzuDx3.js";import{t as h}from"./input-CwdmSRlD.js";import{n as g}from"./stat-square-B5tBfA4w.js";import{n as _,t as v}from"./panel-item-BFOUNXY1.js";import{t as y}from"./createLucideIcon-DIlBzeWM.js";import{t as b}from"./arrow-left-DpZuwfUr.js";import{a as x,c as S,i as C,n as w,o as T,r as E,s as D,t as ee}from"./install-BK1MtTfb.js";import{t as O}from"./calendar-Dm2Jn-zV.js";import{t as k}from"./cloud-off-DJomNBuZ.js";import{t as A}from"./code-CXddtaOh.js";import{t as j}from"./globe-BV8ouh66.js";import{t as te}from"./link-2-BedDg97D.js";import{t as M}from"./loader-circle-CTs38Ovl.js";import{t as N}from"./sparkles-B9QIWdq0.js";import{t as P}from"./triangle-alert-M_S_Pe8C.js";import{t as F}from"./x-Dz7msELe.js";import{Gt as ne,_t as re,gt as ie,ht as I,mt as ae,pt as oe}from"./react-query.gen-DdB0sQgj.js";import{n as se}from"./use-is-mobile-CvT53Qs1.js";import{$i as L,Ca as R,Ea as z,H as B,Ha as V,Ki as H,Li as U,Oa as W,Pa as G,U as K,Ui as ce,Wa as q,aa as le,fo as J,ho as ue,mo as de,qa as fe,qi as pe,ra as me,xa as he,xo as Y,za as ge}from"./index-LP2PV_QY.js";import{t as _e}from"./use-active-assistant-id-512RohBL.js";var ve=y(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),ye=y(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),X=e(r(),1),be={mail:W,calendar:O,"message-circle":z,globe:j,zap:U,code:A,mic:R,"shopping-cart":L,palette:ye,heart:ge,settings:me,"link-2":te};function xe(e){return be[e]}var Z=u();function Se({selected:e,onSelect:t,counts:n,totalCount:r,showCounts:i,categories:a}){let o=[...a].sort((e,t)=>e.label.localeCompare(t.label));return(0,Z.jsxs)(`nav`,{className:`flex flex-col gap-1`,"aria-label":`Skill categories`,children:[(0,Z.jsx)(Ce,{icon:G,label:`All`,count:r,isActive:e===null,showCount:i,onClick:()=>t(null)}),o.map(r=>(0,Z.jsx)(Ce,{icon:xe(r.icon)??G,label:r.label,count:n[r.slug]??0,isActive:e===r.slug,showCount:i,onClick:()=>t(r.slug)},r.slug))]})}function Ce({icon:e,label:t,count:n,isActive:r,showCount:i,onClick:o}){return(0,Z.jsxs)(a,{variant:`ghost`,onClick:o,"aria-pressed":r,className:`h-auto justify-between gap-3 rounded-lg border-0 bg-transparent px-3 py-2 text-left hover:bg-[var(--ghost-hover)]`,style:{backgroundColor:r?`var(--surface-active)`:void 0,color:r?`var(--content-default)`:`var(--content-secondary)`},children:[(0,Z.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,Z.jsx)(e,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}),(0,Z.jsx)(`span`,{className:`text-body-medium-default`,children:t})]}),i&&(0,Z.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:n})]})}var we=e(i(),1);function Te(e,t){return t??e.find(e=>e.name===`SKILL.md`)?.path??null}function Ee(e,t){let[n,r]=(0,X.useState)(null),i=c({...ae({path:{assistant_id:e,id:t}}),select:e=>e??null}),a=(0,X.useMemo)(()=>i.data?.files??[],[i.data]),o=(0,X.useMemo)(()=>a.find(e=>e.name===`SKILL.md`),[a]),s=Te(a,n),l=c({...oe({path:{assistant_id:e,id:t},query:{path:s??``}}),select:e=>e??null,enabled:!!s});return{fileEntries:a,skillMd:o,selectedPath:n,setSelectedPath:r,activePath:s,activeFile:a.find(e=>e.path===s),isFilesLoading:i.isLoading,fileContent:l.data?.content??null,isBinary:!!l.data?.isBinary,isContentLoading:l.isLoading}}function De({fileName:e,content:t,isBinary:n,viewMode:r=`preview`}){return n?(0,Z.jsx)(`p`,{className:`flex h-full items-center justify-center text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`Binary file — no preview available.`}):t===null?(0,Z.jsxs)(`p`,{className:`flex h-full items-center justify-center text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:[`No preview available for `,e,`.`]}):K(e,void 0)&&r===`preview`?(0,Z.jsx)(`div`,{className:`h-full overflow-auto px-6 py-4`,style:{color:`var(--content-default)`},children:(0,Z.jsx)(B,{content:t})}):(0,Z.jsx)(`pre`,{className:`h-full overflow-y-auto whitespace-pre-wrap break-words p-4 font-mono text-body-small-default`,style:{color:`var(--content-default)`},children:t})}function Oe({assistantId:e,skill:t,onBack:n,onInstall:r,onRemove:i,isInstalling:o=!1,isRemoving:s=!1}){let c=E(t),l=x(t),{fileEntries:u,setSelectedPath:f,activePath:p,activeFile:m,isFilesLoading:h,fileContent:_,isBinary:v,isContentLoading:y}=Ee(e,t.id),[S,C]=(0,X.useState)(`preview`);(0,X.useEffect)(()=>{C(`preview`)},[p]);let[w,ee]=(0,X.useState)(null);(0,X.useEffect)(()=>{ee(document.getElementById(`viewport-overlays`))},[]);let O=m?K(m.name,void 0):!1,k=O?S:`raw`,j=(0,Z.jsxs)(`div`,{className:`fixed inset-0 z-40 flex flex-col overflow-hidden bg-[var(--surface-overlay)]`,style:{paddingTop:`calc(8px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)))`,paddingBottom:`calc(8px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)))`,paddingLeft:`calc(12px + var(--safe-area-inset-left, env(safe-area-inset-left, 0px)))`,paddingRight:`calc(12px + var(--safe-area-inset-right, env(safe-area-inset-right, 0px)))`},children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(a,{variant:`ghost`,iconOnly:(0,Z.jsx)(b,{"aria-hidden":!0}),expandOnMobile:!0,"aria-label":`Back to skills`,onClick:n,className:`max-md:bg-[var(--surface-active)]`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate px-2 text-center text-body-medium-default`,style:{color:`var(--content-secondary)`},children:t.name}),(0,Z.jsx)(ke,{available:c,removable:l,isInstalling:o,isRemoving:s,onInstall:r,onRemove:i})]}),(0,Z.jsxs)(`div`,{className:`mt-4 flex flex-col gap-2`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Z.jsx)(D,{skill:t,className:`h-6 w-6 shrink-0 text-[22px] leading-none`}),(0,Z.jsx)(`h2`,{className:`min-w-0 truncate text-title-medium`,style:{color:`var(--content-emphasised)`},children:t.name})]}),(0,Z.jsx)(T,{origin:t.origin})]}),(0,Z.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:t.description})]}),(0,Z.jsx)(d.Root,{asChild:!0,noPadding:!0,children:(0,Z.jsxs)(`div`,{className:`mt-6 flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border bg-[var(--surface-lift)]`,style:{borderColor:`var(--border-hover)`},children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b px-3 py-2`,style:{borderColor:`var(--border-hover)`},children:[(0,Z.jsx)(je,{fileEntries:u,activePath:p,activeName:m?.name??null,onSelect:f}),(0,Z.jsx)(g,{iconOnly:!0,ariaLabel:`File view mode`,value:k,onChange:C,items:[{value:`preview`,label:`Preview`,icon:(0,Z.jsx)(fe,{"aria-hidden":!0}),disabled:!O},{value:`raw`,label:`Source`,icon:(0,Z.jsx)(A,{"aria-hidden":!0})}]})]}),(0,Z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:h||y?(0,Z.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Z.jsx)(M,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})}):m?(0,Z.jsx)(De,{fileName:m.name,content:_,isBinary:v,viewMode:k}):(0,Z.jsx)(`p`,{className:`flex h-full items-center justify-center text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`Select a file to view its contents.`})})]})})]});return w?(0,we.createPortal)(j,w):j}function ke({available:e,removable:t,isInstalling:n,isRemoving:r,onInstall:i,onRemove:o}){return n||r?(0,Z.jsx)(a,{variant:`ghost`,iconOnly:(0,Z.jsx)(M,{className:`animate-spin`,"aria-hidden":!0}),expandOnMobile:!0,disabled:!0,"aria-label":`Pending`,className:`max-md:bg-[var(--surface-active)]`}):e?(0,Z.jsx)(a,{variant:`ghost`,iconOnly:(0,Z.jsx)(Y,{"aria-hidden":!0}),expandOnMobile:!0,"aria-label":`Install skill`,onClick:i,disabled:!i,className:`max-md:bg-[var(--surface-active)]`}):t?(0,Z.jsx)(a,{variant:`dangerGhost`,iconOnly:(0,Z.jsx)(H,{"aria-hidden":!0}),expandOnMobile:!0,"aria-label":`Remove skill`,onClick:o,disabled:!o,className:`max-md:rounded-full max-md:bg-[var(--system-negative-weak)]`}):(0,Z.jsx)(a,{variant:`dangerGhost`,iconOnly:(0,Z.jsx)(H,{"aria-hidden":!0}),expandOnMobile:!0,disabled:!0,title:`Bundled skills cannot be removed`,"aria-label":`Bundled skill cannot be removed`,className:`max-md:rounded-full max-md:bg-[var(--system-negative-weak)]`})}function Ae(e){return(e??``).endsWith(`/directory`)}function je({fileEntries:e,activePath:t,activeName:n,onSelect:r}){let i=n??`Select a file`;return e.length===0?(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-body-medium-default`,style:{color:`var(--content-emphasised)`},children:[(0,Z.jsx)(Me,{}),(0,Z.jsx)(`span`,{className:`truncate`,children:i})]}):(0,Z.jsxs)(f.Root,{children:[(0,Z.jsx)(f.Trigger,{children:(0,Z.jsxs)(`button`,{type:`button`,className:`flex min-w-0 items-center gap-2 rounded-md text-body-medium-default`,style:{color:`var(--content-emphasised)`},children:[(0,Z.jsx)(Me,{}),(0,Z.jsx)(`span`,{className:`truncate`,children:i}),(0,Z.jsx)(de,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`},"aria-hidden":!0})]})}),(0,Z.jsx)(f.Content,{align:`start`,children:e.map(e=>{let n=Ae(e.mimeType);return(0,Z.jsx)(f.Item,{onSelect:()=>r(e.path),leftIcon:n?(0,Z.jsx)(V,{}):(0,Z.jsx)(q,{}),"aria-current":e.path===t?`true`:void 0,children:e.name},e.path)})})]})}function Me(){return(0,Z.jsx)(`span`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-[var(--surface-base)]`,"aria-hidden":!0,children:(0,Z.jsx)(q,{className:`h-4 w-4`,style:{color:`var(--content-secondary)`}})})}var Ne=[{value:`all`,label:`All`,icon:G},{value:`installed`,label:`Installed`,icon:J},{value:`available`,label:`Available`,icon:Y}],Pe=[{value:`vellum`,label:`Vellum`,icon:S},{value:`clawhub`,label:`Clawhub`,icon:j},{value:`skillssh`,label:`skills.sh`,icon:pe},{value:`custom`,label:`Custom`,icon:ce}];function Fe({search:e,onSearchChange:t,filter:n,onFilterChange:r,isSearching:i,categories:a,category:o,onCategoryChange:s,counts:c,totalCount:l,showCounts:u}){return(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(h,{type:`search`,value:e,onChange:e=>{t(e.target.value)},placeholder:`Search skills`,"aria-label":`Search skills`,leftIcon:(0,Z.jsx)(le,{className:`h-4 w-4`,"aria-hidden":!0}),rightIcon:i?(0,Z.jsx)(M,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}):void 0,fullWidth:!0,wrapperClassName:`flex-1`}),(0,Z.jsx)(Ie,{filter:n,onFilterChange:r,categories:a,category:o,onCategoryChange:s,counts:c,totalCount:l,showCounts:u})]})}function Ie(e){let t=se(),[n,r]=(0,X.useState)(!1),i=(0,Z.jsx)(a,{type:`button`,variant:`outlined`,iconOnly:(0,Z.jsx)(ve,{"aria-hidden":!0}),"aria-label":`Filter skills`,"aria-haspopup":t?`dialog`:`listbox`,"aria-expanded":n,tintColor:`var(--primary-base)`});return t?(0,Z.jsx)(Le,{...e,open:n,onOpenChange:r,trigger:i}):(0,Z.jsxs)(m.Root,{open:n,onOpenChange:r,children:[(0,Z.jsx)(m.Trigger,{asChild:!0,children:i}),(0,Z.jsx)(m.Content,{align:`end`,sideOffset:4,className:`w-44 overflow-hidden p-0`,children:(0,Z.jsxs)(`ul`,{role:`listbox`,children:[(0,Z.jsx)(Re,{label:`Status`,options:Ne,selected:e.filter,onSelect:t=>{e.onFilterChange(t),r(!1)}}),(0,Z.jsx)(`div`,{className:`border-t`,style:{borderColor:`var(--border-base)`}}),(0,Z.jsx)(Re,{label:`Source`,options:Pe,selected:e.filter,onSelect:t=>{e.onFilterChange(t),r(!1)}})]})})]})}function Le({filter:e,onFilterChange:t,categories:n,category:r,onCategoryChange:i,counts:o,totalCount:s,showCounts:c,open:l,onOpenChange:u,trigger:d}){let f=[...n].sort((e,t)=>e.label.localeCompare(t.label));return(0,Z.jsxs)(_.Root,{open:l,onOpenChange:u,children:[(0,Z.jsx)(_.Trigger,{asChild:!0,children:d}),(0,Z.jsxs)(_.Content,{className:`max-h-[85dvh]`,"aria-describedby":void 0,children:[(0,Z.jsx)(`div`,{"aria-hidden":!0,className:`mx-auto mb-3 h-1 w-9 shrink-0 rounded-full bg-[var(--border-element)]`}),(0,Z.jsx)(_.Header,{children:(0,Z.jsx)(_.Title,{children:`Filters`})}),(0,Z.jsxs)(_.Body,{className:`flex flex-col gap-3 pt-2`,children:[(0,Z.jsx)(Q,{label:`Status`,children:Ne.map(n=>(0,Z.jsx)($,{icon:n.icon,label:n.label,active:e===n.value,onSelect:()=>t(n.value)},n.value))}),(0,Z.jsx)(Q,{label:`Source`,children:Pe.map(n=>(0,Z.jsx)($,{icon:n.icon,label:n.label,active:e===n.value,onSelect:()=>t(n.value)},n.value))}),(0,Z.jsxs)(Q,{label:`Categories`,children:[(0,Z.jsx)($,{icon:G,label:`All`,active:r===null,badge:c?s:void 0,onSelect:()=>i(null)}),f.map(e=>(0,Z.jsx)($,{icon:xe(e.icon)??G,label:e.label,active:r===e.slug,badge:c?o[e.slug]??0:void 0,onSelect:()=>i(e.slug)},e.slug))]})]}),(0,Z.jsx)(_.Footer,{children:(0,Z.jsx)(a,{type:`button`,variant:`primary`,fullWidth:!0,onClick:()=>u(!1),children:`Done`})})]})]})}function Q({label:e,children:t}){return(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`px-2 pb-1 text-body-small-default uppercase tracking-wide`,style:{color:`var(--content-tertiary)`},children:e}),t]})}function $({icon:e,label:t,active:n,badge:r,onSelect:i}){return(0,Z.jsx)(v,{icon:e,label:t,active:n,activeVariant:`branded`,badge:r,trailingAction:n&&r==null?(0,Z.jsx)(ue,{className:`h-4 w-4 text-[var(--primary-base)]`,"aria-hidden":!0}):void 0,onSelect:i})}function Re({label:e,options:t,selected:n,onSelect:r}){return(0,Z.jsxs)(`li`,{children:[(0,Z.jsx)(`div`,{className:`px-3 pb-1 pt-2 text-body-small-default uppercase tracking-wide`,style:{color:`var(--content-tertiary)`},children:e}),(0,Z.jsx)(`ul`,{children:t.map(e=>{let t=e.icon,i=n===e.value;return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>r(e.value),role:`option`,"aria-selected":i,className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-body-medium-lighter transition-colors hover:bg-[var(--surface-hover)]`,style:{color:i?`var(--primary-base)`:`var(--content-default)`},children:[(0,Z.jsx)(t,{className:`h-4 w-4`,"aria-hidden":!0}),(0,Z.jsx)(`span`,{className:`flex-1`,children:e.label}),i&&(0,Z.jsx)(J,{className:`h-3.5 w-3.5`,"aria-hidden":!0})]})},e.value)})})]})}function ze({skill:e,onSelect:t,onInstall:n,onRemove:r,isInstalling:i=!1,isRemoving:o=!1}){let s=E(e),c=x(e);return(0,Z.jsx)(d.Root,{asChild:!0,children:(0,Z.jsxs)(`div`,{role:`button`,tabIndex:0,onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},className:`flex cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors hover:bg-[var(--surface-hover)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]`,children:[(0,Z.jsx)(`div`,{className:`flex shrink-0 items-center justify-center text-[28px] leading-none`,children:(0,Z.jsx)(D,{skill:e,className:`h-7 w-7`})}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`truncate text-body-medium-default`,style:{color:`var(--content-emphasised)`},children:e.name}),(0,Z.jsx)(T,{origin:e.origin})]}),(0,Z.jsx)(`p`,{className:`mt-1 truncate text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:e.description})]}),s?i?(0,Z.jsx)(a,{type:`button`,iconOnly:(0,Z.jsx)(M,{className:`animate-spin`,"aria-hidden":!0}),disabled:!0,"aria-label":`Installing`,expandOnMobile:!1}):(0,Z.jsx)(a,{type:`button`,iconOnly:(0,Z.jsx)(Y,{"aria-hidden":!0}),onClick:e=>{e.stopPropagation(),n?.()},disabled:!n,"aria-label":`Install skill`,expandOnMobile:!1}):(0,Z.jsx)(a,{type:`button`,variant:`dangerOutline`,iconOnly:o?(0,Z.jsx)(M,{className:`animate-spin`,"aria-hidden":!0}):(0,Z.jsx)(H,{"aria-hidden":!0}),onClick:e=>{e.stopPropagation(),r?.()},disabled:!c||o||!r,"aria-label":c?`Remove skill`:`Bundled skill cannot be removed`,title:c?void 0:`Bundled skills cannot be removed`,expandOnMobile:!1})]})})}function Be(e){return c({...I({path:{assistant_id:e}}),select:e=>e.categories,staleTime:300*1e3})}function Ve(e){switch(e){case`installed`:return{kind:`installed`};case`available`:return{kind:`available`};case`vellum`:case`clawhub`:case`skillssh`:case`custom`:return{origin:e};default:return{}}}function He(e){return[...e].sort((e,t)=>{let n=C(e);return n===C(t)?e.name.localeCompare(t.name,void 0,{sensitivity:`base`}):n?-1:1})}function Ue(e,t){let[n,r]=(0,X.useState)(e);return(0,X.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>clearTimeout(n)},[e,t]),n}var We=300,Ge=`vellum:skills:tipDismissed`;function Ke({assistantId:e,initialSkillId:r}){let i=s(),a=se(),[o,u]=(0,X.useState)(``),d=Ue(o.trim(),We),[f,m]=(0,X.useState)(`all`),[h,g]=(0,X.useState)(null),[_,v]=(0,X.useState)(r??null),[y,b]=(0,X.useState)(null),[x,S]=(0,X.useState)(null),[C,T]=(0,X.useState)(null),[E,D]=(0,X.useState)(()=>n(Ge,!1)),{data:O=[]}=Be(e),{origin:k,kind:A}=(0,X.useMemo)(()=>Ve(f),[f]),j=c({...ie({path:{assistant_id:e},query:{include:`catalog`,origin:k,kind:A,q:d||void 0,category:h??void 0}}),select:e=>({skills:e.skills,categoryCounts:e.categoryCounts,totalCount:e.totalCount}),enabled:!!e}),te=c({...ie({path:{assistant_id:e},query:{include:`catalog`,origin:k,kind:A,q:d||void 0}}),select:e=>({skills:e.skills,categoryCounts:e.categoryCounts,totalCount:e.totalCount}),enabled:!!e&&h!==null}),M=(0,X.useCallback)(()=>{i.invalidateQueries({queryKey:re({path:{assistant_id:e}})})},[e,i]),N=l({mutationFn:t=>ee(e,t),onMutate:e=>b(e),onSettled:()=>{b(null),M()}}),P=ne({onMutate:e=>S(e.path.id),onSettled:()=>{S(null),M()}}),F=(0,X.useCallback)(e=>{N.mutate(e.slug??e.id)},[N]),I=(0,X.useCallback)(e=>{T(e)},[]),ae=(0,X.useCallback)(()=>{C&&(P.mutate({path:{assistant_id:e,id:C.id}}),T(null))},[e,C,P]),oe=(0,X.useCallback)(()=>{D(!0),t(Ge,!0)},[]),L=(0,X.useMemo)(()=>j.data?.skills??[],[j.data?.skills]),R=h===null?j.data:te.data,{counts:z,totalCount:B}=qe(R?.skills??L,R?.categoryCounts,R?.totalCount),V=(0,X.useMemo)(()=>He(L),[L]),H=(0,X.useMemo)(()=>_?L.find(e=>e.id===_)??null:null,[L,_]),U=(0,Z.jsx)(p,{open:C!==null,title:`Remove skill`,message:C?`Remove "${C.name}" from this assistant?`:``,confirmLabel:`Remove`,destructive:!0,onConfirm:ae,onCancel:()=>T(null)});if(H){let t={assistantId:e,skill:H,onBack:()=>v(null),onInstall:()=>F(H),onRemove:()=>I(H),isInstalling:y===(H.slug??H.id),isRemoving:x===H.id};return(0,Z.jsxs)(Z.Fragment,{children:[a?(0,Z.jsx)(Oe,{...t}):(0,Z.jsx)(w,{...t}),U]})}let W=j.isFetching&&!!d;return(0,Z.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1 flex-col gap-4`,children:[!E&&(0,Z.jsx)(Je,{onDismiss:oe}),(0,Z.jsx)(Fe,{search:o,onSearchChange:u,filter:f,onFilterChange:m,isSearching:W,categories:O,category:h,onCategoryChange:g,counts:z,totalCount:B,showCounts:!W}),(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-6`,children:[(0,Z.jsx)(`aside`,{className:`hidden w-56 shrink-0 overflow-y-auto sm:block`,children:(0,Z.jsx)(Se,{selected:h,onSelect:g,counts:z,totalCount:B,showCounts:!W,categories:O})}),(0,Z.jsx)(`div`,{className:`min-w-0 flex-1 overflow-y-auto`,children:j.isLoading?(0,Z.jsx)(Ye,{}):j.isError?(0,Z.jsx)(Xe,{}):V.length===0?(0,Z.jsx)(Ze,{filter:f,category:h}):(0,Z.jsx)(`ul`,{className:`flex flex-col gap-2`,children:V.map(e=>(0,Z.jsx)(`li`,{children:(0,Z.jsx)(ze,{skill:e,onSelect:()=>v(e.id),onInstall:()=>F(e),onRemove:()=>I(e),isInstalling:y===(e.slug??e.id),isRemoving:x===e.id})},e.id))})})]}),U]})}function qe(e,t,n){return(0,X.useMemo)(()=>{if(t&&Object.keys(t).length>0)return{counts:t,totalCount:n??e.length};let r={};for(let t of e){let e=t.category??`system`;r[e]=(r[e]??0)+1}return{counts:r,totalCount:n??e.length}},[e,t,n])}function Je({onDismiss:e}){return(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg px-4 py-2.5 text-body-small-default`,style:{backgroundColor:`var(--surface-base)`,color:`var(--content-secondary)`},children:[(0,Z.jsx)(N,{className:`h-4 w-4 shrink-0`,style:{color:`var(--primary-base)`}}),(0,Z.jsx)(`p`,{className:`flex-1`,children:`You can create a new custom skill by describing what you want in chat.`}),(0,Z.jsx)(a,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Z.jsx)(F,{"aria-hidden":!0}),onClick:e,"aria-label":`Dismiss tip`,tintColor:`var(--content-tertiary)`,expandOnMobile:!1})]})}function Ye(){return(0,Z.jsx)(`div`,{className:`flex items-center justify-center py-16`,children:(0,Z.jsx)(M,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})})}function Xe(){return(0,Z.jsx)(d.Root,{children:(0,Z.jsxs)(d.Body,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,Z.jsx)(P,{className:`mb-3 h-8 w-8`,style:{color:`var(--system-danger)`},"aria-hidden":!0}),(0,Z.jsx)(`h3`,{className:`text-title-small`,style:{color:`var(--content-default)`},children:`Failed to load skills`}),(0,Z.jsx)(`p`,{className:`mt-1 max-w-sm text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`Something went wrong. Try refreshing the page.`})]})})}function Ze({filter:e,category:t}){let{title:n,subtitle:r,Icon:i}=Qe(e,t);return(0,Z.jsx)(d.Root,{children:(0,Z.jsxs)(d.Body,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,Z.jsx)(i,{className:`mb-3 h-8 w-8`,style:{color:`var(--content-tertiary)`},"aria-hidden":!0}),(0,Z.jsx)(`h3`,{className:`text-title-small`,style:{color:`var(--content-default)`},children:n}),(0,Z.jsx)(`p`,{className:`mt-1 max-w-sm text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:r})]})})}function Qe(e,t){if(t)return{title:`No skills in this category`,subtitle:`Try selecting a different category or clearing the filter.`,Icon:G};switch(e){case`installed`:return{title:`No Skills Installed`,subtitle:`Ask your assistant in chat to search for and install new skills.`,Icon:U};case`available`:return{title:`No Skills Available`,subtitle:`All available skills have been installed.`,Icon:J};case`vellum`:return{title:`No Vellum Skills`,subtitle:`No bundled Vellum skills found.`,Icon:he};case`clawhub`:return{title:`No Clawhub Skills`,subtitle:`No Clawhub skills found. Try searching the catalog.`,Icon:j};case`skillssh`:return{title:`No skills.sh Skills`,subtitle:`No skills.sh skills found. Try searching the catalog.`,Icon:pe};case`custom`:return{title:`No Custom Skills`,subtitle:`Create a custom skill by describing what you want in chat.`,Icon:ce};default:return{title:`No Skills Available`,subtitle:`Check your connection to the Vellum catalog.`,Icon:k}}}function $e(){let e=_e(),[t]=o();return(0,Z.jsx)(Ke,{assistantId:e,initialSkillId:t.get(`skill`)??void 0})}export{$e as SkillsPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{n}from"./QueryClientProvider-DKhXIxGb.js";import{t as r}from"./useQuery-B45lW1Kk.js";import{t as i}from"./useMutation-Lj4VunQV.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./card-BibIM9x3.js";import{t as s}from"./toggle-_vZlLDBV.js";import{Ct as c,St as l,bt as u,vt as d}from"./react-query.gen-DdB0sQgj.js";import{a as f,i as p,n as m,r as h,t as g}from"./sound-manager-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{n}from"./QueryClientProvider-DKhXIxGb.js";import{t as r}from"./useQuery-B45lW1Kk.js";import{t as i}from"./useMutation-Lj4VunQV.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./card-BibIM9x3.js";import{t as s}from"./toggle-_vZlLDBV.js";import{Ct as c,St as l,bt as u,vt as d}from"./react-query.gen-DdB0sQgj.js";import{a as f,i as p,n as m,r as h,t as g}from"./sound-manager-CC2af7bI.js";import{Ki as _,ha as v,mo as y}from"./index-LP2PV_QY.js";import{t as b}from"./use-active-assistant-id-512RohBL.js";var x=e(t(),1),S=a();function C({label:e,description:t,checked:n,disabled:r,onChange:i}){return(0,S.jsxs)(`div`,{className:`flex items-center justify-between gap-3 py-1`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e}),t&&(0,S.jsx)(`div`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:t})]}),(0,S.jsx)(s,{checked:n,disabled:r,onChange:i,label:e})]})}function w(){return(0,S.jsx)(`div`,{className:`border-t border-[var(--border-base)]`})}function T({event:e,eventConfig:t,availableSounds:n,globalEnabled:r,onToggle:i,onAddSound:a,onRemoveSound:o,onPreview:c}){let[l,u]=(0,x.useState)(!1),d=n.filter(e=>!t.sounds.includes(e.filename)),p=n.length>0&&d.length===0;return(0,S.jsxs)(`div`,{className:`py-3`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,S.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:m[e]}),(0,S.jsx)(s,{checked:t.enabled,disabled:!r,onChange:i,label:`Enable ${m[e]}`})]}),t.enabled&&(0,S.jsxs)(`div`,{className:`mt-2 space-y-1 pl-2`,children:[t.sounds.length===0?(0,S.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Default Blip`}):t.sounds.map(e=>(0,S.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,S.jsx)(`span`,{className:`truncate text-body-small-default text-[var(--content-secondary)]`,title:e,children:f(e)}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`button`,{type:`button`,onClick:()=>c(e),className:`inline-flex items-center rounded-md px-1.5 py-0.5 text-body-small-default text-[var(--content-tertiary)] hover:bg-[var(--surface-base)] dark:text-[var(--content-disabled)] dark:hover:bg-[var(--ghost-hover)]`,"aria-label":`Preview ${e}`,children:(0,S.jsx)(v,{className:`h-3 w-3`})}),(0,S.jsx)(`button`,{type:`button`,onClick:()=>o(e),className:`inline-flex items-center rounded-md px-1.5 py-0.5 text-body-small-default text-[var(--content-tertiary)] hover:bg-[var(--surface-base)] dark:text-[var(--content-disabled)] dark:hover:bg-[var(--ghost-hover)]`,"aria-label":`Remove ${e}`,children:(0,S.jsx)(_,{className:`h-3 w-3`})})]})]},e)),n.length===0?(0,S.jsx)(`p`,{className:`text-body-small-default italic text-[var(--content-disabled)]`,children:`No sound files yet. Drop audio files into data/sounds/ in your workspace.`}):p?(0,S.jsx)(`button`,{type:`button`,disabled:!0,className:`inline-flex items-center gap-1 rounded-md border border-[var(--border-base)] bg-white px-2 py-1 text-body-small-default text-[var(--content-disabled)] disabled:cursor-not-allowed dark:bg-[var(--surface-lift)] dark:text-[var(--content-tertiary)]`,children:`All sounds added`}):(0,S.jsxs)(`div`,{className:`relative inline-block`,children:[(0,S.jsxs)(`button`,{type:`button`,onClick:()=>u(e=>!e),className:`inline-flex items-center gap-1 rounded-md border border-[var(--border-base)] bg-white px-2 py-1 text-body-small-default text-[var(--content-default)] hover:bg-[var(--surface-base)] dark:bg-[var(--surface-lift)] dark:hover:bg-[var(--ghost-hover)]`,children:[`Add sound`,(0,S.jsx)(y,{className:`h-3 w-3`})]}),l&&(0,S.jsx)(`div`,{className:`absolute left-0 z-10 mt-1 max-h-64 w-56 overflow-auto rounded-md border border-[var(--border-base)] bg-white p-1 shadow-lg dark:bg-[var(--surface-lift)]`,onMouseLeave:()=>u(!1),children:d.map(e=>(0,S.jsx)(`button`,{type:`button`,onClick:()=>{a(e.filename),u(!1)},className:`block w-full truncate rounded px-2 py-1 text-left text-body-small-default text-[var(--content-default)] hover:bg-[var(--surface-base)] dark:hover:bg-[var(--ghost-hover)]`,title:e.filename,children:e.label},e.filename))})]})]})]})}function E(){let e=n(),t=b(),a=(0,x.useMemo)(()=>u({path:{assistant_id:t}}),[t]),s=(0,x.useMemo)(()=>d({path:{assistant_id:t}}),[t]),{data:f}=r(a),{data:m}=r(s),_=f??p(),y=m?.sounds??[],E=(0,x.useMemo)(()=>({path:{assistant_id:t}}),[t]),D=i({...c(E),onMutate:async t=>{await e.cancelQueries({queryKey:a.queryKey});let n=e.getQueryData(a.queryKey);return l(e,E,t.body),{previous:n}},onError:(t,n,r)=>{r?.previous!==void 0&&l(e,E,r.previous)},onSettled:()=>{e.invalidateQueries({queryKey:a.queryKey})}}),O=(0,x.useCallback)(n=>{let r=n(e.getQueryData(a.queryKey)??p());D.mutate({path:{assistant_id:t},body:r})},[t,a.queryKey,e,D]),k=e=>{O(t=>({...t,globalEnabled:e}))},A=e=>{O(t=>({...t,volume:e}))},[j,M]=(0,x.useState)(null),N=j??_.volume,P=(e,t)=>{O(n=>({...n,events:{...n.events,[e]:{...n.events[e]??{enabled:!1,sounds:[]},enabled:t}}}))},F=(e,t)=>{O(n=>{let r=n.events[e]??{enabled:!0,sounds:[]};return r.sounds.includes(t)?n:{...n,events:{...n.events,[e]:{...r,sounds:[...r.sounds,t]}}}})},I=(e,t)=>{O(n=>{let r=n.events[e];return r?{...n,events:{...n.events,[e]:{...r,sounds:r.sounds.filter(e=>e!==t)}}}:n})},L=()=>{g().previewFallbackBlip(_.volume)},R=e=>{g().previewSound(e,_.volume)};return(0,S.jsxs)(`div`,{className:`space-y-6`,children:[(0,S.jsxs)(o,{children:[(0,S.jsx)(C,{label:`Enable sound effects`,description:`Master switch for every event-driven sound.`,checked:_.globalEnabled,onChange:k}),(0,S.jsx)(w,{}),(0,S.jsxs)(`div`,{className:`flex items-center gap-3 py-3`,children:[(0,S.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:`Volume`}),(0,S.jsx)(`input`,{type:`range`,min:0,max:1,step:.05,value:N,onChange:e=>M(parseFloat(e.target.value)),onPointerUp:e=>{let t=parseFloat(e.currentTarget.value);M(null),t!==_.volume&&A(t)},onKeyUp:e=>{let t=parseFloat(e.currentTarget.value);M(null),t!==_.volume&&A(t)},onBlur:e=>{let t=parseFloat(e.currentTarget.value);M(null),t!==_.volume&&A(t)},className:`h-1 w-48 cursor-pointer`,disabled:!_.globalEnabled,"aria-label":`Sound effect volume`}),(0,S.jsxs)(`span`,{className:`tabular-nums text-body-small-default text-[var(--content-tertiary)]`,children:[Math.round(N*100),`%`]})]}),(0,S.jsx)(w,{}),(0,S.jsxs)(`div`,{className:`flex items-center justify-between py-3`,children:[(0,S.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:`Preview default blip`}),(0,S.jsxs)(`button`,{type:`button`,onClick:L,disabled:!_.globalEnabled,className:`inline-flex items-center gap-1.5 rounded-md border border-[var(--border-base)] bg-white px-3 py-1.5 text-body-medium-lighter text-[var(--content-default)] hover:bg-[var(--surface-base)] disabled:cursor-not-allowed disabled:opacity-50 dark:bg-[var(--surface-lift)] dark:hover:bg-[var(--ghost-hover)]`,children:[(0,S.jsx)(v,{className:`h-3.5 w-3.5`}),`Preview`]})]})]}),(0,S.jsxs)(o,{children:[(0,S.jsxs)(`div`,{className:`pb-2`,children:[(0,S.jsx)(`h3`,{className:`text-title-small text-[var(--content-default)]`,children:`Sound Events`}),(0,S.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Add one or more sounds per event. When multiple are configured, one plays at random.`})]}),(0,S.jsx)(`div`,{className:`divide-y divide-[var(--border-base)]`,children:h.map(e=>(0,S.jsx)(T,{event:e,eventConfig:_.events[e]??{enabled:!1,sounds:[]},availableSounds:y,globalEnabled:_.globalEnabled,onToggle:t=>P(e,t),onAddSound:t=>F(e,t),onRemoveSound:t=>I(e,t),onPreview:e=>R(e)},e))})]})]})}export{E as SoundsPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{a as t}from"./prefs-
|
|
1
|
+
import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{a as t}from"./prefs-Mrqh1A7Y.js";import{Wr as n}from"./index-LP2PV_QY.js";var r=`onboarding_v3_2026_05`,i=`onboarding.funnelSessionId`,a=`onboarding.funnelVariant`,o={control:`control`,paredDown:`pared_down`};function s(e){return e===`variant-a`?o.paredDown:o.control}var c={privacyTos:{stepName:`privacy_tos`,stepIndex:0},nameVibe:{stepName:`name_vibe`,stepIndex:1},controlWorkType:{stepName:`work_type`,stepIndex:2},controlTools:{stepName:`tools`,stepIndex:3},controlPriorAssistants:{stepName:`prior_assistants`,stepIndex:4},controlGmailConnect:{stepName:`gmail_connect`,stepIndex:5},controlGetApp:{stepName:`get_app`,stepIndex:6},gmailConnect:{stepName:`gmail_connect`,stepIndex:2}};function l(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}function u(){if(typeof window>`u`)return crypto.randomUUID();let e=``;try{e=sessionStorage.getItem(i)??``}catch{e=``}if(e)return e;let t=crypto.randomUUID();try{sessionStorage.setItem(i,t)}catch{}return t}function d(e){return e===o.control||e===o.paredDown}function f(){if(typeof window>`u`)return null;try{let e=sessionStorage.getItem(a);return d(e)?e:null}catch{return null}}function p(e){let t=f();if(t)return t;if(typeof window>`u`)return e;try{sessionStorage.setItem(a,e)}catch{}return e}function m(e,t={}){let n=Date.now(),i=t.variant??f()??o.control;return{type:`onboarding`,daemon_event_id:crypto.randomUUID(),recorded_at:n,screen:e.stepName,session_id:u(),step_name:e.stepName,step_index:e.stepIndex,completed_at:new Date(n).toISOString(),user_id:t.userId??null,funnel_version:r,ab_variant:i}}function h(e,r={}){if(typeof window>`u`||!t())return;let i=l(m(e,r)),a=JSON.stringify({device_id:n(),assistant_version:`web-dev`,events:[i]});fetch(`/v1/telemetry/ingest/`,{method:`POST`,headers:{"Content-Type":`application/json`},body:a,keepalive:!0}).catch(()=>{})}var g=e();function _({current:e,total:t}){return(0,g.jsx)(`div`,{className:`flex items-center gap-1.5`,role:`group`,"aria-label":`Step ${e+1} of ${t}`,children:Array.from({length:t},(t,n)=>(0,g.jsx)(`div`,{"aria-hidden":`true`,className:`h-[3px] w-8 rounded-full transition-colors ${n<=e?`bg-[var(--content-default)]`:`bg-[var(--content-default)] opacity-20`}`},n))})}export{u as a,p as c,h as i,c as n,s as o,o as r,f as s,_ as t};
|