@yuriai/web 0.3.6-beta.14 → 0.3.6-beta.16
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/{AgentAvatar-5tMBB3OP.js → AgentAvatar-Cz7vWoUM.js} +1 -1
- package/dist/assets/{AgentSelector-Cb7GNCSr.js → AgentSelector-tguIbO8e.js} +1 -1
- package/dist/assets/{ArchivedSessionsDialog-8gBAWGWJ.js → ArchivedSessionsDialog-C0Vf38jt.js} +1 -1
- package/dist/assets/{AssistantConversationSurface-DBgTUUEt.js → AssistantConversationSurface-TNj9TKag.js} +3 -3
- package/dist/assets/{AssistantSessionCard-_yFsx4WB.js → AssistantSessionCard-BX_ck4KS.js} +2 -2
- package/dist/assets/{AssistantUnreadBadge-a2u_bBfi.js → AssistantUnreadBadge-DSjJfYrh.js} +1 -1
- package/dist/assets/{AssistantView-BxqHaArC.js → AssistantView-eAuI94K6.js} +1 -1
- package/dist/assets/{AssistantWorkingAvatar-DHZVN5kD.js → AssistantWorkingAvatar-OhfpjL1t.js} +1 -1
- package/dist/assets/{AssistantsSettingsPage-CCG2-SGj.js → AssistantsSettingsPage-X19bTIju.js} +1 -1
- package/dist/assets/{BinaryFileFallback-DyOwcZlP.js → BinaryFileFallback-DDWawtzt.js} +1 -1
- package/dist/assets/{BtwPanel-BhJA_qnp.js → BtwPanel-Dhn1iVrH.js} +2 -2
- package/dist/assets/BusyDots-q2aVrHbQ.js +4 -0
- package/dist/assets/{ChatContainer-vX0hPadC.js → ChatContainer-CYq3DRwu.js} +21 -21
- package/dist/assets/ChatView-CD7B735C.js +3 -0
- package/dist/assets/{DiagramView-XjJTNa7h.js → DiagramView-D8qMjsAQ.js} +1 -1
- package/dist/assets/{DiffView-B6_7v5dX.js → DiffView-BRUUP_UF.js} +1 -1
- package/dist/assets/{DiffViewToggle-as2OeoZV.js → DiffViewToggle-Bn4WLr8E.js} +1 -1
- package/dist/assets/{ErrorBoundary-6AeJc3yJ.js → ErrorBoundary-UqQdMytG.js} +1 -1
- package/dist/assets/{FadeInOnReveal-BKAakuxD.js → FadeInOnReveal-BV_4xYNR.js} +1 -1
- package/dist/assets/{GuiPluginMount-DlrUvFjg.js → GuiPluginMount-CEXVtLmV.js} +1 -1
- package/dist/assets/{GuiPluginPage-DsBH_Y2M.js → GuiPluginPage-BziZa4M0.js} +1 -1
- package/dist/assets/{GuiPluginSurface-BisC0s24.js → GuiPluginSurface-gxhtskj7.js} +1 -1
- package/dist/assets/{GuiPluginTitlebarItems-CraVxzKU.js → GuiPluginTitlebarItems-mIMh81nb.js} +1 -1
- package/dist/assets/{GuiPluginWindow-DjrDed9m.js → GuiPluginWindow-DvVG8u7w.js} +1 -1
- package/dist/assets/{Icon-zB0u-x9G.js → Icon-C6Duv_oe.js} +1 -1
- package/dist/assets/{ImageLoadingPlaceholder-COr72scf.js → ImageLoadingPlaceholder-BIQ6Y6SP.js} +1 -1
- package/dist/assets/{LoadingImage-DCyqFHPY.js → LoadingImage-Dk4wxhnT.js} +1 -1
- package/dist/assets/{MarkdownRenderer-YxMjOHQg.js → MarkdownRenderer-BY310t1T.js} +2 -2
- package/dist/assets/{MarkdownRendererImpl-FJ3saBi-.js → MarkdownRendererImpl-nAHoW0Z9.js} +3 -3
- package/dist/assets/{MarkstreamRendererImpl-69EMw8mz.js → MarkstreamRendererImpl-shwGZ7Tl.js} +1 -1
- package/dist/assets/{MobileAssistantSettingsPage-BoH-3iPc.js → MobileAssistantSettingsPage-DOJwDh_T.js} +1 -1
- package/dist/assets/{MobileAssistantTab-59nMj5dF.js → MobileAssistantTab-BAkvh3MP.js} +1 -1
- package/dist/assets/{MobileBtwPage-EwMOy6Vg.js → MobileBtwPage-BdPAeG7v.js} +1 -1
- package/dist/assets/{MobileChangesSurface-BfMWp6TX.js → MobileChangesSurface-DmlszV_t.js} +1 -1
- package/dist/assets/{MobileChatScreen-CZDiNi7M.js → MobileChatScreen-CEbQNMgn.js} +1 -1
- package/dist/assets/{MobileDetailNavigation-DKv1HfQX.js → MobileDetailNavigation-BUMzEYEL.js} +1 -1
- package/dist/assets/{MobileFilesSurface-BiK7LCem.js → MobileFilesSurface-DCQsIn2I.js} +2 -2
- package/dist/assets/{MobileHtmlNetworkBoundary-BXh_BJ93.js → MobileHtmlNetworkBoundary-DiuzUkq3.js} +2 -2
- package/dist/assets/{MobileOverlayPanel-Pr-vLaIF.js → MobileOverlayPanel-DhGG1USg.js} +1 -1
- package/dist/assets/{MobileResizableSheet-O2gv2sCB.js → MobileResizableSheet-BN5lO8_k.js} +1 -1
- package/dist/assets/{MobileSettingsTab-DadXop75.js → MobileSettingsTab-B4wkSo7K.js} +1 -1
- package/dist/assets/{MobileShareBridge-CaiscA4w.js → MobileShareBridge-DUHyEHab.js} +1 -1
- package/dist/assets/{MobileSurface-B_2aVFm1.js → MobileSurface-CuAPWI6D.js} +1 -1
- package/dist/assets/{MobileTabPageHeader-T0zUz7Wl.js → MobileTabPageHeader-Bh1ILbqr.js} +1 -1
- package/dist/assets/{ModelLogo-C1Vv7gz6.js → ModelLogo-R0TXf5Pt.js} +1 -1
- package/dist/assets/{ModelSelector-BP_s_VhY.js → ModelSelector-D5pSGqN8.js} +1 -1
- package/dist/assets/{MultiRunWindow--tNVFKUJ.js → MultiRunWindow-DJb6RpVw.js} +1 -1
- package/dist/assets/{OnboardingScreen-DMdy73Dq.js → OnboardingScreen-CdHEr54c.js} +1 -1
- package/dist/assets/{OverlayScrollbar-n5T49w2e.js → OverlayScrollbar-CrwDy2Pt.js} +1 -1
- package/dist/assets/{PierreDiffViewer-i3OsvUKm.js → PierreDiffViewer-BYO9Wbwk.js} +1 -1
- package/dist/assets/{ProviderLogo-D-ldwq0G.js → ProviderLogo-C8aB3qlM.js} +1 -1
- package/dist/assets/{RemoteAssistantSessionCard-CNpcgVmv.js → RemoteAssistantSessionCard-C_hCy6FE.js} +1 -1
- package/dist/assets/{RemoteDesktopPanel-hTuLKJZb.js → RemoteDesktopPanel-Cj6G6AyD.js} +1 -1
- package/dist/assets/ScheduledTasksDialog-z2v4fwrE.js +3 -0
- package/dist/assets/{ScrollableOverlay-DAMUOn67.js → ScrollableOverlay-BrA__-l0.js} +1 -1
- package/dist/assets/{SettingsGroup-CwMJmhq2.js → SettingsGroup-DMAcPhM4.js} +1 -1
- package/dist/assets/{SettingsView-bYWNjHtA.js → SettingsView-BuGjKeb9.js} +10 -10
- package/dist/assets/{SettingsWindow-D0ZzAXW0.js → SettingsWindow-_sonrUby.js} +1 -1
- package/dist/assets/{SetupTourDialog-CgM5YonA.js → SetupTourDialog-Cf1Jm1Gl.js} +1 -1
- package/dist/assets/{SyncActions-Ct2yZTbg.js → SyncActions-BWHWdbi_.js} +1 -1
- package/dist/assets/{TerminalView-BU5w40RA.js → TerminalView-DN60v7to.js} +3 -3
- package/dist/assets/{TextSelectionMenu-a7yyDz5R.js → TextSelectionMenu-YlWMOZkS.js} +2 -2
- package/dist/assets/{ToolOutputDialog-CGYnrXVV.js → ToolOutputDialog-B388thfl.js} +2 -2
- package/dist/assets/{YuriLogo-Cexwa29m.js → YuriLogo-CdbCjzA8.js} +1 -1
- package/dist/assets/{YuriWordmark-Bn5KdqMC.js → YuriWordmark-rISEHjrd.js} +1 -1
- package/dist/assets/{assistant-attachment-cache-Y7yhlQcv.js → assistant-attachment-cache-BsIYVOYw.js} +1 -1
- package/dist/assets/{assistantMessagePreview-BXNdMDW-.js → assistantMessagePreview-DJVWTOKl.js} +1 -1
- package/dist/assets/{assistantQueries-DkAmjFg7.js → assistantQueries-C_SpnqtF.js} +1 -1
- package/dist/assets/{auto-read-context-DLilPZMl.js → auto-read-context-BO5tE9k_.js} +1 -1
- package/dist/assets/{capgoAdapter-DaIrgBjp.js → capgoAdapter-qaeQqHpT.js} +1 -1
- package/dist/assets/{card-CXE0ffyH.js → card-t-tgqQ79.js} +1 -1
- package/dist/assets/{chatUpwardIntent-DRFjEP4t.js → chatUpwardIntent-BEntur0S.js} +1 -1
- package/dist/assets/{checkbox-hYuewn9u.js → checkbox-D-OIaMB8.js} +1 -1
- package/dist/assets/{client-QcYZg8_d.js → client-BuCd-T7s.js} +1 -1
- package/dist/assets/{collapsible-C4a0ndbm.js → collapsible-CCc6anWP.js} +1 -1
- package/dist/assets/{connection-hint-Ci6c4iij.js → connection-hint-DAQZ45pI.js} +1 -1
- package/dist/assets/{context-menu-D73tnkiI.js → context-menu-BhnOdTDq.js} +1 -1
- package/dist/assets/{desktopHosts-DFa3lf0i.js → desktopHosts-COI-czjF.js} +1 -1
- package/dist/assets/{desktopRelayRestore-CGq-Ylgq.js → desktopRelayRestore-BEPNc7qb.js} +1 -1
- package/dist/assets/device-TCHW5U2y.js +2 -0
- package/dist/assets/{diagram-B2X1oieg.js → diagram-sCh-Ausk.js} +1 -1
- package/dist/assets/{dialog-B2Po85oU.js → dialog-C9DNMP08.js} +1 -1
- package/dist/assets/{dropdown-menu-vW7wfT5z.js → dropdown-menu-CcQq6JDI.js} +1 -1
- package/dist/assets/{fileMentionTouchSelection-B73h0W0P.js → fileMentionTouchSelection-HhfJS8d1.js} +1 -1
- package/dist/assets/{fileReferenceActions-DEUhs_7h.js → fileReferenceActions-wN7mWY3w.js} +1 -1
- package/dist/assets/{gitApi-DG2Gj6gC.js → gitApi-BNkkLnOi.js} +1 -1
- package/dist/assets/{gitApiHttp-C8AU1uiY.js → gitApiHttp-CrPYe9Oc.js} +2 -2
- package/dist/assets/{githubAuthQueries-IJPWBo0B.js → githubAuthQueries-CTTiXZ9q.js} +1 -1
- package/dist/assets/{historyImportQueries-B3QBdaKo.js → historyImportQueries-B4DVAuxZ.js} +1 -1
- package/dist/assets/{host-DchPrZpw.js → host-BjnskVUP.js} +1 -1
- package/dist/assets/{i18n-WsU03nwB.js → i18n-CYty_Jft.js} +1 -1
- package/dist/assets/{icons-6sA6AOaU.js → icons-DlTcJ36Q.js} +1 -1
- package/dist/assets/{imageSource-B39pFDdo.js → imageSource-BquIRnWW.js} +1 -1
- package/dist/assets/{input-BpDiYSsP.js → input-DVzjAzTw.js} +1 -1
- package/dist/assets/{input-store-PqhVEhUI.js → input-store-BtvRZZcg.js} +1 -1
- package/dist/assets/insertionBoundaries-WYUnaIac.js +1 -0
- package/dist/assets/{kbd-Dd1lM8OM.js → kbd-DA0IyUcd.js} +1 -1
- package/dist/assets/main-BfuLSPdJ.js +169 -0
- package/dist/assets/{main-BtqqLSTt.js → main-BpAkYb0H.js} +2 -2
- package/dist/assets/{markdownHeightCache-BzWUzccz.js → markdownHeightCache-CcgRs1ER.js} +1 -1
- package/dist/assets/{mcpQueries-8frBxd65.js → mcpQueries-CCvxTdrj.js} +1 -1
- package/dist/assets/miniChat-D2l_XXQe.js +2 -0
- package/dist/assets/mobile-mVNRvGd5.js +2 -0
- package/dist/assets/{mobileBackNavigation-Ch0aK3t9.js → mobileBackNavigation-B8wJO_pZ.js} +1 -1
- package/dist/assets/{mobileConnections-Bay_JNn0.js → mobileConnections-Ckzqn3Y9.js} +2 -2
- package/dist/assets/{multirun-CQ2v1-nW.js → multirun-B34hqzTY.js} +1 -1
- package/dist/assets/{native-config-B8eHFnvv.js → native-config-CD8pMBkt.js} +1 -1
- package/dist/assets/{nativeComposerCover--wSR2Iru.js → nativeComposerCover-CEyD3731.js} +1 -1
- package/dist/assets/{navigation-33oih6q2.js → navigation-atykJu0I.js} +2 -2
- package/dist/assets/openRemoteProjectSession-B63pkBaj.js +1 -0
- package/dist/assets/openSessionFromDeepLink-Bz07xQfv.js +2 -0
- package/dist/assets/platform-B2ylz14u.js +1 -0
- package/dist/assets/{pluginPresentation-BqcbcLYL.js → pluginPresentation-4xMNGtKI.js} +2 -2
- package/dist/assets/{project-preview-CIkGbBPZ.js → project-preview-Dq--046z.js} +1 -1
- package/dist/assets/{projectActions-D84EVh3q.js → projectActions-B11KAI3f.js} +1 -1
- package/dist/assets/{prompt-attachment-upload-D1c308Ba.js → prompt-attachment-upload-m0vbcftI.js} +1 -1
- package/dist/assets/{pwa-JM_Ia4Qo.js → pwa-uLk3vYDP.js} +2 -2
- package/dist/assets/{queue-abort-optimistic-BspQeOrZ.js → queue-abort-optimistic-C_L5pmK0.js} +1 -1
- package/dist/assets/{quota-C7uYEfoX.js → quota-CNmk_bQD.js} +1 -1
- package/dist/assets/{reference-history-DuOv6xPy.js → reference-history-CN8H7cQY.js} +1 -1
- package/dist/assets/{remote-input-store-CquhCIoR.js → remote-input-store-CE88ZLsw.js} +1 -1
- package/dist/assets/{remoteProjectQueries-BunVM5PM.js → remoteProjectQueries-zO4jYbru.js} +1 -1
- package/dist/assets/{remoteSessionReference-brIKt6ea.js → remoteSessionReference-BvbDndSv.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-1iiZ6q0N.js → renderElectronMiniChatApp-BImqnwc-.js} +2 -2
- package/dist/assets/renderMobileApp-DjKpQ6id.js +17 -0
- package/dist/assets/{runtime-file-download-wMVtKk2v.js → runtime-file-download-CzZ_VAoB.js} +1 -1
- package/dist/assets/{runtime-file-resource-DKJJoOOc.js → runtime-file-resource-9kLrAtnQ.js} +1 -1
- package/dist/assets/{runtimeConfig-qjNoqcXT.js → runtimeConfig-Cs95Hj1_.js} +1 -1
- package/dist/assets/runtimeEndpointReset-BeO-ZC0f.js +4 -0
- package/dist/assets/{scheduledTaskNavigation-DpfZSGu8.js → scheduledTaskNavigation-r3g3DfXq.js} +1 -1
- package/dist/assets/{select-Ojd202kE.js → select-Cb6W8KRB.js} +1 -1
- package/dist/assets/sessionLookup-MXum2sR5.js +1 -0
- package/dist/assets/{sessionOwnership-Nqb7MQgW.js → sessionOwnership-CgeZg9fN.js} +1 -1
- package/dist/assets/{shortcuts-BOzfBNF8.js → shortcuts-5iHGo1f3.js} +1 -1
- package/dist/assets/{sortable-tabs-strip-DlQjS9bw.js → sortable-tabs-strip-D5MuRWnZ.js} +1 -1
- package/dist/assets/{speechSettingsQueries-DzDLUBnb.js → speechSettingsQueries-D2CugjM1.js} +1 -1
- package/dist/assets/{switch-BN9zvb0m.js → switch-DLlbkkU5.js} +1 -1
- package/dist/assets/{terminalApi-D2ECmoAo.js → terminalApi-CsTh04jY.js} +1 -1
- package/dist/assets/{textarea-ChLN9tnA.js → textarea-Cg3Yz3Oc.js} +1 -1
- package/dist/assets/{timeFormat-D1hdmWbu.js → timeFormat-fIpRkrOb.js} +1 -1
- package/dist/assets/{tooltip-Cdsa-YWG.js → tooltip-Chqxbwjz.js} +1 -1
- package/dist/assets/{truncated-path-DjN9DJvh.js → truncated-path-DWUl2HQC.js} +1 -1
- package/dist/assets/{types-DHO20zYy.js → types-DfbaAnUB.js} +1 -1
- package/dist/assets/ui-lbbchWJP.js +13 -0
- package/dist/assets/useAppFontEffects-BDoatEWZ.js +7 -0
- package/dist/assets/{useAssistantUIStore-DEiMjSqf.js → useAssistantUIStore-BUWPTwNV.js} +1 -1
- package/dist/assets/{useDesktopWindowControlsLayout-OdYH5vsn.js → useDesktopWindowControlsLayout-C_VGQBG3.js} +1 -1
- package/dist/assets/{useDictation-DUR68U4T.js → useDictation-C81KyPa6.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-DNVTRp-B.js → useEffectiveDirectory-Dqdl58J7.js} +1 -1
- package/dist/assets/{useFontPreferences-BY0TXvWI.js → useFontPreferences-DyMUXTQC.js} +1 -1
- package/dist/assets/{useGitStore-DsxzluvZ.js → useGitStore-kco1LBfw.js} +1 -1
- package/dist/assets/{useInlineCommentDraftStore-DU-yffqD.js → useInlineCommentDraftStore-DFr7FLv-.js} +1 -1
- package/dist/assets/useMcpConfigStore-C9SxNeU1.js +1 -0
- package/dist/assets/{useMobileSwipeActions-rPGl_HNn.js → useMobileSwipeActions-vvnhP5zs.js} +1 -1
- package/dist/assets/useMobileTranscriptSyncHint-DVm8zIWR.js +10 -0
- package/dist/assets/{useModelLists-xVEEc-e7.js → useModelLists-CU3ffp2-.js} +1 -1
- package/dist/assets/{useOpenCodeReadiness-C5D4297L.js → useOpenCodeReadiness-KpQk8Bm7.js} +1 -1
- package/dist/assets/{usePluginsStore-DEctn121.js → usePluginsStore-BJNtJkXv.js} +1 -1
- package/dist/assets/{useProjectGitActions-D7yZSor5.js → useProjectGitActions-DuzvQm-w.js} +1 -1
- package/dist/assets/{useProjectGitStore-DFz9Eb6v.js → useProjectGitStore-U9tDVHik.js} +1 -1
- package/dist/assets/{useProjectRuntimeAPIs-TALa4FqO.js → useProjectRuntimeAPIs-DJubGUM_.js} +1 -1
- package/dist/assets/{useQuotaStore-BqPJ1nzk.js → useQuotaStore-B4FEz0gR.js} +1 -1
- package/dist/assets/{useSessionBtwStore-DAQVlbuf.js → useSessionBtwStore-D5bVhQ1l.js} +1 -1
- package/dist/assets/{useStreamingTextThrottle-BpC1BNz_.js → useStreamingTextThrottle-DlgF3Cnn.js} +1 -1
- package/dist/assets/{useUIStore-P32bzAJc.js → useUIStore-68ZPpgYA.js} +1 -1
- package/dist/assets/{worktreeManager-D56glCi_.js → worktreeManager-BJCsjptu.js} +1 -1
- package/dist/assets/{worktreeSourceBranchPreference-CNtT0ymW.js → worktreeSourceBranchPreference-qDpG1uyC.js} +1 -1
- package/dist/index.html +15 -15
- package/dist/mini-chat.html +15 -15
- package/dist/mobile.html +1 -1
- package/package.json +1 -1
- package/server/index.js +1 -0
- package/server/lib/assistants/DOCUMENTATION.md +7 -3
- package/server/lib/assistants/builtin-skills.js +19 -3
- package/server/lib/assistants/builtin-skills.test.js +16 -0
- package/server/lib/assistants/harness.js +2 -1
- package/server/lib/assistants/routes.js +1 -0
- package/server/lib/assistants/service.js +6 -2
- package/server/lib/gui-customization/DOCUMENTATION.md +19 -7
- package/server/lib/gui-customization/projects-client.mjs +1 -1
- package/server/lib/gui-customization/projects.js +6 -6
- package/server/lib/gui-customization/projects.test.js +13 -2
- package/server/lib/gui-customization/remote-connections-client.mjs +1 -1
- package/server/lib/gui-customization/remote-connections.js +6 -6
- package/server/lib/gui-customization/session-skill.js +15 -3
- package/server/lib/gui-customization/skill/references/deep-links.md +6 -6
- package/server/lib/gui-customization/skill-caller.js +18 -0
- package/server/lib/opencode/feature-routes-runtime.js +20 -3
- package/dist/assets/BusyDots-B9Zv4OUg.js +0 -4
- package/dist/assets/ChatView-OJAZBsfN.js +0 -3
- package/dist/assets/ScheduledTasksDialog-dgU5OpBK.js +0 -3
- package/dist/assets/device-CtdJ8KBJ.js +0 -2
- package/dist/assets/insertionBoundaries-Cu6Djn8S.js +0 -1
- package/dist/assets/main-CdUAbE7p.js +0 -169
- package/dist/assets/miniChat-C7JCQrXA.js +0 -2
- package/dist/assets/mobile-CcIasitd.js +0 -2
- package/dist/assets/openRemoteProjectSession-B94TYao_.js +0 -1
- package/dist/assets/openSessionFromDeepLink-C9jS-EIM.js +0 -2
- package/dist/assets/platform-CNdx57HN.js +0 -1
- package/dist/assets/renderMobileApp-CdTenU5H.js +0 -17
- package/dist/assets/runtimeEndpointReset-DKchBECK.js +0 -4
- package/dist/assets/sessionLookup-D299jmfx.js +0 -1
- package/dist/assets/ui-CU6n15y3.js +0 -13
- package/dist/assets/useAppFontEffects-Bqt4cv2k.js +0 -7
- package/dist/assets/useMcpConfigStore-al7LZT72.js +0 -1
- package/dist/assets/useMobileTranscriptSyncHint-BVvgdcp4.js +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{l as t,u as n,z as r}from"./platform-B2ylz14u.js";import{a as i,i as a,r as o}from"./vendor-zustand-CTekDqaS.js";import{ot as s,st as c}from"./vendor-base-ui-wXsskyKm.js";import{St as l,an as u,jt as d,on as f}from"./gitApiHttp-CrPYe9Oc.js";import{t as p}from"./safeStorage-DTOhKN0V.js";import{i as m,t as h}from"./vendor-pathe-vBmvQE8f.js";import{n as g}from"./vendor-react-BkccXcWz.js";import{s as _,u as v}from"./vendor-tanstack-react-query-DIb_ItL-.js";import{E as y}from"./runtime-file-resource-9kLrAtnQ.js";import{o as b}from"./path-utils-jGozTg9d.js";import{r as x}from"./vendor-reactuses-core-DjKFMfz7.js";import{r as S}from"./useUIStore-68ZPpgYA.js";import{o as ee,s as C}from"./spacedFileMention-Ds4GtgiF.js";import{Ba as w,Fa as T,Fi as E,Oi as D,R as O,Sa as k,Va as A,Xi as j,_ as M,b as N,bt as P,da as F,f as I,ro as L,uo as R,ut as te}from"./ui-lbbchWJP.js";import{n as z}from"./Icon-C6Duv_oe.js";import{s as ne}from"./remoteProjectQueries-zO4jYbru.js";import{t as re}from"./i18n-CYty_Jft.js";import{t as ie}from"./ScrollableOverlay-BrA__-l0.js";import{t as ae}from"./useDebouncedValue-BHlMPqY8.js";import{t as oe}from"./AgentAvatar-Cz7vWoUM.js";import{c as se,d as ce,l as le,n as ue,r as de,t as fe}from"./fileMentionTouchSelection-HhfJS8d1.js";import{a as pe,o as me,s as he}from"./fileMentionAutocompleteState-B9411b4o.js";var ge=(e,t)=>{let n=t.trim();if(!n)return[...e].sort((e,t)=>e.isBuiltIn===t.isBuiltIn?e.name.localeCompare(t.name):e.isBuiltIn?-1:1);let r=C([...e],n,e=>[e.name,e.description??``]);return r.sort((e,t)=>e.score===t.score?e.item.isBuiltIn===t.item.isBuiltIn?e.item.name.localeCompare(t.item.name):e.item.isBuiltIn?-1:1:e.score-t.score),r.map(e=>e.item)},_e=(e,t)=>e===t||e.length===t.length&&e.every((e,n)=>{let r=t[n];return r!=null&&e.id===r.id&&e.title===r.title&&(e.subtitle??``)===(r.subtitle??``)&&(e.badge??``)===(r.badge??``)&&e.iconName===r.iconName&&e.agentName===r.agentName}),ve=(e,t)=>e.highlightedIndex===t.highlightedIndex&&_e(e.rows,t.rows),ye=(e,t)=>_e(e,t)?e:t.slice(),be=(e,t,n)=>{e&&(t.current&&ve(t.current,n)||(t.current=n,e(n)))},xe=(e,t)=>{t.current=null,e?.({rows:[],highlightedIndex:0})},B=e(c(),1),V=g(),Se=e=>e.directories.flatMap(e=>e.sessions),H=(e,t)=>({...ne(e,t.location.hostId),select:Se}),Ce=async(e,t,n)=>{n.sdk();let r=await e.fetchQuery(H(t,n));return n.sdk(),Se(r)},U=(e,t,n,r)=>{n.sdk();let i=e.getQueryData(H(t,n).queryKey);for(let e of i?.directories??[]){let t=e.sessions.find(e=>e.id===r);if(t)return t.title||r}return r},W=(e,t,n,r={})=>({queryKey:[...e.queryScope,`composer-files`,t,n,r],staleTime:3e4,gcTime:3e4,queryFn:async({signal:i})=>{let a=await e.sdk().file.find({query:t,location:{directory:e.location.directory},limit:n,type:r.type},{signal:i});if(e.sdk(),i.throwIfAborted(),!Array.isArray(a.data))throw Error(`File search returned no data`);return a.data.map(t=>{let n=m(t.path),r=h(n);return{name:r,path:b(e.location.directory,n),relativePath:n,extension:r.includes(`.`)?r.split(`.`).pop()?.toLowerCase():void 0,isDirectory:t.type===`directory`}})}}),G=e=>{if(!e)return``;let t=e.replace(/\\/g,`/`),n=t.startsWith(`//`),r=t.replace(/\/+/g,`/`);n&&!r.startsWith(`//`)&&(r=`/${r}`);let i=r===`/`,a=/^[A-Za-z]:\/$/.test(r);return!i&&!a&&(r=r.replace(/\/+$/,``)),r},K=e=>/^[A-Za-z]:\//.test(e)?e.toLowerCase():e,q=e=>e.startsWith(`yuri-remote-location:`)?t(e):G(e),J=(e,t)=>{let r=G(n(t,`local`).directory),i=G(e);if(!r||!i)return!1;let a=K(r),o=K(i);return o===a||o.startsWith(a.endsWith(`/`)?a:`${a}/`)},we=e=>{if(!e||typeof e!=`object`)return{};let t=e,n={};for(let[e,r]of Object.entries(t)){let t;try{t=q(e)}catch{continue}if(!t||!r||typeof r!=`object`)continue;let i=r,a=Array.isArray(i.openPaths)?Array.from(new Set(i.openPaths.filter(e=>typeof e==`string`).map(e=>G(e)).filter(e=>J(e,t)))):[],o=Array.isArray(i.expandedPaths)?Array.from(new Set(i.expandedPaths.filter(e=>typeof e==`string`).map(e=>G(e)).filter(e=>J(e,t)))):[],s=typeof i.selectedPath==`string`?G(i.selectedPath):null,c=s&&J(s,t)?s:a[0]??null,l=typeof i.touchedAt==`number`&&Number.isFinite(i.touchedAt)?i.touchedAt:Date.now(),u=n[t];if(u){let e=Array.from(new Set([...u.openPaths,...a])),r=Array.from(new Set([...u.expandedPaths,...o])),i=u.selectedPath??c??e[0]??null;n[t]={openPaths:e,selectedPath:i,expandedPaths:r,touchedAt:Math.max(u.touchedAt,l)};continue}n[t]={openPaths:a,selectedPath:c,expandedPaths:o,touchedAt:l}}return n},Y=(e,t)=>{let n=Object.entries(e);if(n.length<=t)return e;n.sort((e,t)=>(t[1]?.touchedAt??0)-(e[1]?.touchedAt??0));let r={};for(let[e,i]of n.slice(0,t))r[e]=i;return r},X=e=>e?{...e,touchedAt:Date.now()}:{openPaths:[],selectedPath:null,expandedPaths:[],touchedAt:Date.now()},Z=i()(o(a((e,t)=>({byRoot:{},addOpenPath:(t,n,r)=>{let i=q((t||``).trim()),a=G((n||``).trim());!i||!a||!r?.allowOutsideRoot&&!J(a,i)||e(e=>{let t=e.byRoot[i],n=X(t),r=n.openPaths.includes(a),o=r?n.openPaths:[...n.openPaths,a],s=n.selectedPath??a;return t&&r&&t.selectedPath===s?e:{byRoot:Y({...e.byRoot,[i]:{...n,openPaths:o,selectedPath:s}},20)}})},removeOpenPath:(t,n)=>{let r=q((t||``).trim()),i=G((n||``).trim());!r||!i||e(e=>{let t=e.byRoot[r];if(!t)return e;let n=K(i),a=e=>K(e)===n,o=t.selectedPath?a(t.selectedPath):!1;if(!t.openPaths.some(a)&&!o)return e;let s=t.openPaths.filter(e=>!a(e)),c=o?s[0]??null:t.selectedPath;return{byRoot:Y({...e.byRoot,[r]:{...t,openPaths:s,selectedPath:c,touchedAt:Date.now()}},20)}})},removeOpenPathsByPrefix:(t,n)=>{let r=q((t||``).trim()),i=G((n||``).trim());!r||!i||e(e=>{let t=e.byRoot[r];if(!t)return e;let n=K(i),a=n.endsWith(`/`)?n:`${n}/`,o=e=>{let t=K(e);return t===n||t.startsWith(a)},s=t.openPaths.filter(e=>!o(e));if(s.length===t.openPaths.length)return e;let c=t.selectedPath&&o(t.selectedPath)?s[0]??null:t.selectedPath;return{byRoot:Y({...e.byRoot,[r]:{...t,openPaths:s,selectedPath:c,touchedAt:Date.now()}},20)}})},removeExpandedPathsByPrefix:(t,n)=>{let r=q((t||``).trim()),i=G((n||``).trim());!r||!i||e(e=>{let t=e.byRoot[r];if(!t)return e;let n=K(i),a=n.endsWith(`/`)?n:`${n}/`,o=t.expandedPaths.filter(e=>{let t=K(e);return t!==n&&!t.startsWith(a)});return o.length===t.expandedPaths.length?e:{byRoot:Y({...e.byRoot,[r]:{...t,expandedPaths:o,touchedAt:Date.now()}},20)}})},setSelectedPath:(t,n,r)=>{let i=q((t||``).trim()),a=n?G(n.trim()):null;!i||a&&!r?.allowOutsideRoot&&!J(a,i)||e(e=>{let t=e.byRoot[i],n=X(t),r=a&&!n.openPaths.includes(a)?[...n.openPaths,a]:n.openPaths;return t&&t.selectedPath===a&&r===t.openPaths?e:{byRoot:Y({...e.byRoot,[i]:{...n,openPaths:r,selectedPath:a}},20)}})},ensureSelectedPath:e=>{let n=q((e||``).trim());if(!n)return;let r=t().byRoot[n];if(!r||r.selectedPath)return;let i=r.openPaths[0]??null;i&&t().setSelectedPath(n,i)},toggleExpandedPath:(t,n)=>{let r=q((t||``).trim()),i=G((n||``).trim());!r||!i||!J(i,r)||e(e=>{let t=e.byRoot[r],n=X(t),a=n.expandedPaths.includes(i)?n.expandedPaths.filter(e=>e!==i):[...n.expandedPaths,i];return t&&t.expandedPaths===a&&t.selectedPath===n.selectedPath&&t.openPaths===n.openPaths?e:{byRoot:Y({...e.byRoot,[r]:{...n,expandedPaths:a}},20)}})},expandPath:(t,n)=>{let r=q((t||``).trim()),i=G((n||``).trim());!r||!i||!J(i,r)||e(e=>{let t=e.byRoot[r],n=X(t);return n.expandedPaths.includes(i)&&t?e:{byRoot:Y({...e.byRoot,[r]:{...n,expandedPaths:[...n.expandedPaths,i]}},20)}})},expandPaths:(t,n)=>{let r=q((t||``).trim());if(!r||!n||n.length===0)return;let i=n.map(e=>G((e||``).trim())).filter(e=>e&&J(e,r));i.length!==0&&e(e=>{let t=e.byRoot[r],n=X(t),a=new Set(n.expandedPaths),o=i.filter(e=>!a.has(e));return o.length===0?e:{byRoot:Y({...e.byRoot,[r]:{...n,expandedPaths:[...n.expandedPaths,...o]}},20)}})}}),{name:`files-view-tabs-store`,version:2,storage:p(),migrate:e=>{if(!e||typeof e!=`object`)return{byRoot:{}};let t=e.byRoot;return{byRoot:we(t)}},merge:(e,t)=>({...t,byRoot:we(e&&typeof e==`object`?e.byRoot:void 0)}),partialize:e=>({byRoot:we(e.byRoot)})}),{name:`files-view-tabs-store`})),Q=()=>{let e=(0,V.c)(17),t=I(Te),n=P(),r;e[0]===t?r=e[1]:(r=e=>t?e.getAttachment(t):void 0,e[0]=t,e[1]=r);let i=N(r),a=I(Ee),o=I(De),s=A(Oe),c=A(ke),u=l(Ae);if(t){let r;e[2]===i?r=e[3]:(r=M(i),e[2]=i,e[3]=r);let o=r;if(o)return o;let s;e[4]!==t||e[5]!==a?(s=a.get(t),e[4]=t,e[5]=a,e[6]=s):s=e[6];let c=s;if(c?.path)return c.path;let l;if(e[7]!==t||e[8]!==n){let r;e[10]===t?r=e[11]:(r=e=>e.id===t,e[10]=t,e[11]=r),l=n.find(r),e[7]=t,e[8]=n,e[9]=l}else l=e[9];let u=l;if(u?.directory)return u.directory}if(o?.open&&(o.bootstrapPendingDirectory||o.directoryOverride))return(o.bootstrapPendingDirectory||o.directoryOverride)??void 0;if(s){let t;if(e[12]!==s||e[13]!==c){let n;e[15]===s?n=e[16]:(n=e=>e.id===s,e[15]=s,e[16]=n),t=c.find(n),e[12]=s,e[13]=c,e[14]=t}else t=e[14];let n=t;if(n?.path)return n.path}return u??void 0};function Te(e){return e.currentSessionId}function Ee(e){return e.worktreeMetadata}function De(e){return e.newSessionDraft}function Oe(e){return e.activeProjectId}function ke(e){return e.projects}function Ae(e){return e.currentDirectory}var $=s(),je=`bg-transparent font-[inherit] text-[var(--primary-base)]`,Me=(e,t)=>{let n=t.trim().toLowerCase();if(!n)return e;let r=e.toLowerCase();if(!r.includes(n))return e;let i=[],a=0,o=r.indexOf(n);for(;o!==-1;)o>a&&i.push(e.slice(a,o)),i.push((0,$.jsx)(`mark`,{className:je,children:e.slice(o,o+n.length)},`${o}-${n}`)),a=o+n.length,o=r.indexOf(n,a);return a<e.length&&i.push(e.slice(a)),i},Ne=B.forwardRef((e,t)=>{let n=(0,V.c)(4),r=y(),i;return n[0]!==r||n[1]!==e||n[2]!==t?(i=r?.entry.location.hostId?(0,$.jsx)(Le,{...e,ref:t,entry:r.entry,registry:r.registry},JSON.stringify(r.entry.queryScope)):(0,$.jsx)(Pe,{...e,ref:t}),n[0]=r,n[1]=e,n[2]=t,n[3]=i):i=n[3],i}),Pe=B.forwardRef((e,t)=>{let n=(0,V.c)(22),r=Q()??``,i=I(ze),a=E(Be),o=!!e.onSessionSelect,s;n[0]===o?s=n[1]:(s={enabled:o},n[0]=o,n[1]=s);let c=O(s),l=A(Ve),u=A(He),f;if(n[2]!==l||n[3]!==r||n[4]!==u){let e=u.find(e=>e.id===l)?.path||r;f=e?e.replace(/\\/g,`/`).replace(/\/+$/,``):null,n[2]=l,n[3]=r,n[4]=u,n[5]=f}else f=n[5];let p=f,m;n[6]===p?m=n[7]:(m=e=>p?e.byRoot[p]:void 0,n[6]=p,n[7]=m);let h=Z(m),g=j(Ue),_=d(We),v;n[8]!==a||n[9]!==c||n[10]!==e.onSessionSelect?(v=e.onSessionSelect?D(a,c):[],n[8]=a,n[9]=c,n[10]=e.onSessionSelect,n[11]=v):v=n[11];let y=v,b=e.currentSessionId??i,x;return n[12]!==g||n[13]!==r||n[14]!==p||n[15]!==h||n[16]!==e||n[17]!==t||n[18]!==_||n[19]!==y||n[20]!==b?(x=(0,$.jsx)(Re,{...e,ref:t,currentDirectory:r,currentSessionId:b,projectRoot:p,projectTabs:h,agentCatalog:g,sessions:y,searchFiles:_}),n[12]=g,n[13]=r,n[14]=p,n[15]=h,n[16]=e,n[17]=t,n[18]=_,n[19]=y,n[20]=b,n[21]=x):x=n[21],x}),Fe=[],Ie=[],Le=B.forwardRef((e,t)=>{let n=(0,V.c)(32),{entry:r,registry:i}=e,a=v(),o;n[0]===r?o=n[1]:(o=T(r.location.directory,void 0,r),n[0]=r,n[1]=o);let s=!!e.onAgentSelect,c;n[2]!==o||n[3]!==s?(c={...o,enabled:s},n[2]=o,n[3]=s,n[4]=c):c=n[4];let l=_(c),u;n[5]!==r||n[6]!==i?(u=H(i,r),n[5]=r,n[6]=i,n[7]=u):u=n[7];let d=!!e.onSessionSelect,f;n[8]!==u||n[9]!==d?(f={...u,enabled:d},n[8]=u,n[9]=d,n[10]=f):f=n[10];let p=_(f),m;n[11]===r.key?m=n[12]:(m=e=>e.byRoot[r.key],n[11]=r.key,n[12]=m);let h=Z(m),g;n[13]!==a||n[14]!==r?(g=(e,t,n,i)=>{let o=n===void 0?60:n;return a.fetchQuery(W(r,t,o,i))},n[13]=a,n[14]=r,n[15]=g):g=n[15];let y=x(g),b=r.location.directory,S;if(n[16]!==r.location.directory){let e;n[18]===Symbol.for(`react.memo_cache_sentinel`)?(e=/\/+$/,n[18]=e):e=n[18],S=r.location.directory.replace(/\\/g,`/`).replace(e,``),n[16]=r.location.directory,n[17]=S}else S=n[17];let ee=l.data??Ie,C=p.data??Fe,w=l.error??p.error,E;n[19]===r?E=n[20]:(E=()=>{r.sdk()},n[19]=r,n[20]=E);let D;return n[21]!==r.location.directory||n[22]!==h||n[23]!==e||n[24]!==t||n[25]!==y||n[26]!==ee||n[27]!==C||n[28]!==w||n[29]!==E||n[30]!==S?(D=(0,$.jsx)(Re,{...e,ref:t,currentDirectory:b,projectRoot:S,projectTabs:h,agentCatalog:ee,sessions:C,searchFiles:y,catalogError:w,assertCurrent:E}),n[21]=r.location.directory,n[22]=h,n[23]=e,n[24]=t,n[25]=y,n[26]=ee,n[27]=C,n[28]=w,n[29]=E,n[30]=S,n[31]=D):D=n[31],D}),Re=B.forwardRef(({searchQuery:e,onFileSelect:t,onAgentSelect:n,onSkillSelect:r,onSessionSelect:i,onClose:a,style:o,onRowsChange:s,currentDirectory:c,currentSessionId:l,projectRoot:d,projectTabs:p,agentCatalog:m,sessions:h,searchFiles:g,catalogError:_,assertCurrent:v},y)=>{let{t:b}=re(),C=ae(e,180),w=f(),T=u(),[E,D]=B.useState([]),[O,A]=B.useState(!1),[j,M]=B.useState(null),[N,P]=B.useState(0),I=B.useRef(0),te=B.useRef({query:e,directory:c,ids:[]}),[ne,ce]=B.useState(360),[le,ge]=B.useState({}),[_e,ve]=B.useState({}),ye=B.useRef([]),V=B.useRef([]),Se=B.useRef([]),H=B.useRef(null),Ce=B.useRef(null),U=B.useRef(null);U.current||=fe();let W=S(e=>e.isMobile),G=(e??``).trim(),K=k({directory:c||null}),q=B.useMemo(()=>r?K.data??[]:[],[r,K.data]),J=B.useMemo(()=>{if(!d||!p)return[];let e=[p.selectedPath,...p.openPaths.slice().reverse()].filter(e=>typeof e==`string`&&e.length>0),t=new Set,n=[];for(let r of e){if(t.has(r))continue;t.add(r);let e=r.replace(/\\/g,`/`),i=e.split(`/`).filter(Boolean).pop()||e,a=e.startsWith(`${d}/`)?e.slice(d.length+1):e;n.push({name:i,path:e,relativePath:a,extension:i.includes(`.`)?i.split(`.`).pop()?.toLowerCase():void 0})}return he(n,G,{limit:6})},[G,d,p]),we=B.useMemo(()=>n?F(m).filter(e=>e.mode!==`primary`):[],[m,n]),Y=B.useMemo(()=>i?pe({sessions:h,currentSessionId:l??null,searchQuery:G}):[],[h,l,G,i]),X=J,Z=E,Q=B.useMemo(()=>se({skills:q,agents:we,sessions:Y,recentFiles:X,pathHits:Z,searchQuery:G,untitledSession:b(`chat.fileMentionAutocomplete.untitledSession`),sessionBadge:b(`chat.fileMentionAutocomplete.sessionType`),skillBadge:b(`chat.commandAutocomplete.badge.skill`)}),[q,we,Y,X,Z,G,b]);B.useEffect(()=>{let e=e=>{let t=e.target;!t||!H.current||H.current.contains(t)||a()};return document.addEventListener(`pointerdown`,e,!0),()=>{document.removeEventListener(`pointerdown`,e,!0)}},[a]),B.useEffect(()=>{if(!c){D([]),A(!1),M(null);return}let e=(C??``).trim(),t=ee(e);if(!t){D([]),A(!1),M(null);return}let n=!1;A(!0),M(null);let r={includeHidden:w,respectGitignore:!T};return Promise.all([g(c,t,80,{...r,type:`file`}),g(c,t,40,{...r,type:`directory`})]).then(([t,r])=>{if(n)return;let i=new Set(J.map(e=>e.path));D(me({files:t,directories:r,query:e,excludePaths:i,limit:20}))}).catch(e=>{n||M(e instanceof Error?e:Error(String(e)))}).finally(()=>{n||A(!1)}),()=>{n=!0}},[c,C,J,g,w,T]),B.useLayoutEffect(()=>{let t=te.current,n=t.ids[I.current],r=t.query===e&&t.directory===c?Math.max(0,Q.findIndex(e=>e.id===n)):0;te.current={query:e,directory:c,ids:Q.map(e=>e.id)},I.current=r,P(r)},[Q,e,c]),B.useEffect(()=>{ge({}),ve({})},[Q]),B.useEffect(()=>{ye.current[N]?.scrollIntoView({block:`nearest`})},[N]),B.useEffect(()=>{let e=null,t=()=>{e!==null&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{let e={},t={};V.current.forEach((n,r)=>{if(!n)return;let i=Se.current[r]?.offsetWidth??n.scrollWidth,a=Math.max(0,i-n.clientWidth),o=a>8;if(e[r]=o,o){let e=Math.max(.6,a/110);t[r]=e}}),ge(e),ve(t)})};return t(),window.addEventListener(`resize`,t),()=>{e!==null&&cancelAnimationFrame(e),window.removeEventListener(`resize`,t)}},[Q]),B.useEffect(()=>{let e=V.current[N];if(!e)return;let t=()=>{let t=e.clientWidth;t>0&&ce(t)};if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[N]);let Te=x(e=>{t(e)}),Ee=x(e=>{n?.(e)}),De=x(e=>{i?.(e)}),Oe=x(e=>{r?.(e)}),ke=(e,t)=>({onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{e.pointerType===`touch`&&U.current?.pointerDown(e.clientX,e.clientY)},onPointerMove:e=>{e.pointerType===`touch`&&U.current?.pointerMove(e.clientX,e.clientY)},onPointerUp:e=>{e.pointerType===`touch`&&(U.current?.pointerUp(t)??!1)&&(e.preventDefault(),e.stopPropagation())},onPointerCancel:()=>U.current?.pointerCancel(),onClick:()=>{U.current?.click(t)},onMouseMove:()=>{I.current=e,P(e)}}),Ae=e=>{try{v?.()}catch(e){M(e instanceof Error?e:Error(String(e)));return}let t=Q.length;if(t===0)return;let n=(e%t+t)%t,r=Q[n];if(r.agentName!==void 0){Ee(r.agentName);return}if(r.id.startsWith(`skill:`)){let e=q.find(e=>r.id===`skill:${e.name}-${e.scope}`);e&&Oe(e);return}if(r.id.startsWith(`session:`)){let e=Y.find(e=>r.id===`session:${e.id}`);e&&De(e);return}let i=r.id.startsWith(`recent:`)?X.find(e=>r.id===`recent:${e.path}`):Z.find(e=>r.id===`file:${e.path}`);i&&Te(i)};B.useEffect(()=>{be(s,Ce,{rows:Q,highlightedIndex:N})},[s,N,Q]);let je=B.useRef(s);return je.current=s,B.useEffect(()=>()=>{xe(je.current,Ce)},[]),B.useImperativeHandle(y,()=>({acceptIndex:e=>{Ae(e)},handleKeyDown:e=>{if(e===`Escape`){a();return}let t=Q.length;if(t!==0){if(e===`ArrowDown`){I.current=(I.current+1)%t,P(I.current);return}if(e===`ArrowUp`){I.current=(I.current-1+t)%t,P(I.current);return}(e===`Enter`||e===`Tab`)&&Ae(I.current)}}})),(0,$.jsxs)(ue,{ref:H,isMobile:W,className:`max-w-[640px] max-h-64`,style:o,children:[(0,$.jsx)(ie,{preventOverscroll:!0,outerClassName:`flex-1 min-h-0`,className:`px-0`,children:(0,$.jsxs)(`div`,{className:`py-1`,children:[_||K.error||j?(0,$.jsx)(`div`,{role:`alert`,className:`px-3 py-2 typography-ui-label text-muted-foreground`,children:(_??K.error??j)?.message}):null,Q.map((e,t)=>{let n=e.id.startsWith(`file:`)||e.id.startsWith(`recent:`),r=n?R(e.title,{maxLength:60}):e.title,i=N===t,a=le[t]??!1,o=_e[t]??2.6;return(0,$.jsxs)(`div`,{"data-mention-id":e.id,ref:e=>{ye.current[t]=e},className:L(`flex items-center gap-2 px-3 py-1.5 cursor-pointer typography-ui-label rounded-lg`,W&&`min-h-11`,de(W,i),!W&&i&&`text-interactive-selection-foreground`),...ke(t,()=>Ae(t)),children:[(0,$.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center`,children:e.agentName===void 0?(0,$.jsx)(z,{name:e.iconName,className:`size-3.5 text-current`}):(0,$.jsx)(oe,{name:e.agentName,size:20})}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,$.jsxs)(`span`,{ref:e=>{V.current[t]=e},className:L(`relative block min-w-0 overflow-hidden`,n&&a&&i&&`file-mention-marquee-container`),style:i?{"--file-mention-marquee-width":`${ne}px`,"--file-mention-marquee-duration":`${o}s`}:void 0,title:e.title,children:[(0,$.jsx)(`span`,{ref:e=>{Se.current[t]=e},className:`absolute invisible whitespace-nowrap pointer-events-none`,"aria-hidden":!0,children:e.title}),n&&a&&i?(0,$.jsx)(`span`,{className:`inline-block whitespace-nowrap file-mention-marquee`,children:Me(e.title,G)}):(0,$.jsx)(`span`,{className:`block truncate`,children:Me(r,G)})]}),e.trailingLabel?(0,$.jsx)(`span`,{className:L(`max-w-[40%] shrink-0 truncate text-muted-foreground`,W?`typography-micro`:`typography-meta`),children:e.trailingLabel}):null]}),e.subtitle?(0,$.jsx)(`div`,{className:L(`truncate text-muted-foreground`,W?`typography-micro`:`typography-meta`),children:Me(e.subtitle,G)}):null]})]},e.id)}),O&&Z.length===0?(0,$.jsx)(`div`,{className:`flex items-center justify-center py-3`,children:(0,$.jsx)(z,{name:`refresh`,className:`h-4 w-4 animate-spin text-muted-foreground`})}):null,!O&&Q.length===0&&(0,$.jsx)(`div`,{className:`px-3 py-2 typography-ui-label text-muted-foreground`,children:b(`chat.fileMentionAutocomplete.empty`)})]})}),!W&&(0,$.jsx)(`div`,{className:`px-3 pt-1 pb-1.5 border-t typography-meta text-muted-foreground`,children:b(`chat.autocomplete.keyboardHint`)})]})});function ze(e){return e.currentSessionId}function Be(e){return e.activeSessions}function Ve(e){return e.activeProjectId}function He(e){return e.projects}function Ue(e){return e.agents}function We(e){return e.searchFiles}var Ge=new Set([`new`,`fork`,`compact`,`reload`,`undo`,`redo`,`model`,`btw`]),Ke=(e,t)=>{if(!t||e.isSkill)return!1;let n=e.name?.trim().toLowerCase();return!!(n&&Ge.has(n))},qe=(e,t)=>!e||t({name:e}),Je=` `,Ye=(e,t)=>{let n=Math.max(0,Math.min(t,e.length)),r=n;for(;r>0&&!/\s/.test(e[r-1]);)--r;return r>=2&&e[r-1]===Je&&e[r-2]===`/`&&(r-=2),e[r]===`/`?{start:r,end:n}:null},Xe=`text-[10px] leading-none uppercase font-bold tracking-tight px-1.5 py-1 rounded border flex-shrink-0`,Ze=L(Xe,`bg-[color-mix(in_srgb,var(--primary-base)_12%,transparent)] text-[color-mix(in_srgb,var(--primary-base)_70%,transparent)] border-[color-mix(in_srgb,var(--primary-base)_24%,transparent)]`),Qe=L(Xe,`bg-[color-mix(in_srgb,var(--status-success)_12%,transparent)] text-[color-mix(in_srgb,var(--status-success)_70%,transparent)] border-[color-mix(in_srgb,var(--status-success)_24%,transparent)]`),$e=L(Xe,`bg-[color-mix(in_srgb,var(--status-info)_12%,transparent)] text-[color-mix(in_srgb,var(--status-info)_70%,transparent)] border-[color-mix(in_srgb,var(--status-info)_24%,transparent)]`),et=L(Xe,`bg-[var(--surface-muted)] text-muted-foreground border-[var(--interactive-border)]/60`),tt=(e,t)=>e.length===t.length&&e.every((e,n)=>e.id===t[n]?.id&&e.description===t[n]?.description),nt=e=>{let t=!!e.sessionID;return{hasSession:t,canStartSessionCommand:t||e.hasNewDraft}},rt=B.forwardRef(({searchQuery:e,onCommandSelect:t,onClose:n,directory:i,style:a,commandPolicy:o,commandContext:s,onRowsChange:c},l)=>{let{t:u}=re(),d=S(e=>e.isMobile),f=I(e=>e.currentSessionId),p=I(e=>!!e.newSessionDraft?.open),m=I(B.useCallback(e=>f?e.getDirectoryForSession(f):void 0,[f])),h=te(f??``,m??void 0),g=B.useMemo(()=>s??{sessionID:f??null,hasMessages:h.length>0,hasNewDraft:p},[s,f,h.length,p]),{hasSession:_,canStartSessionCommand:v}=B.useMemo(()=>nt(g),[g]),y=g.hasMessages,[b,x]=B.useState([]),[ee,C]=B.useState(!1),T=w({directory:i}),E=B.useMemo(()=>T.data??[],[T.data]),D=T.isFetching,[O,k]=B.useState(0),A=B.useRef(0),j=B.useRef(!1),M=B.useRef([]),N=B.useRef(null),P=B.useRef(!1),F=B.useRef(null),R=B.useRef(!1),ne=B.useRef(null);B.useEffect(()=>{let e=e=>{let t=e.target;!t||!N.current||N.current.contains(t)||n()};return document.addEventListener(`pointerdown`,e,!0),()=>{document.removeEventListener(`pointerdown`,e,!0)}},[n]),B.useEffect(()=>{(async()=>{C(D);try{let t=E.flatMap((e,t)=>e.source===`skill`?[]:[{id:`opencode:${e.scope??`global`}:${e.name}:${e.agent??``}:${e.model??``}:${t}`,name:e.name,source:`opencode`,description:e.description,agent:e.agent??void 0,model:e.model??void 0,isBuiltIn:e.isBuiltIn,scope:e.scope,reference:e.reference}]),n=[{id:`yuri:new`,name:`new`,source:`yuri`,description:u(`chat.commandAutocomplete.command.newDescription`),isBuiltIn:!0},..._&&!y?[{id:`yuri:init`,name:`init`,source:`yuri`,description:u(`chat.commandAutocomplete.command.initDescription`),isBuiltIn:!0}]:[],..._?[{id:`yuri:btw`,name:`btw`,source:`yuri`,description:u(`chat.btw.description`),isBuiltIn:!0},{id:`yuri:undo`,name:`undo`,source:`yuri`,description:u(`chat.commandAutocomplete.command.undoDescription`),isBuiltIn:!0},{id:`yuri:redo`,name:`redo`,source:`yuri`,description:u(`chat.commandAutocomplete.command.redoDescription`),isBuiltIn:!0},{id:`yuri:fork`,name:`fork`,source:`yuri`,description:u(`chat.commandAutocomplete.command.forkDescription`),isBuiltIn:!0},{id:`yuri:timeline`,name:`timeline`,source:`yuri`,description:u(`chat.commandAutocomplete.command.timelineDescription`),isBuiltIn:!0}]:[],{id:`yuri:model`,name:`model`,source:`yuri`,description:u(`chat.commandAutocomplete.command.modelDescription`),isBuiltIn:!0},{id:`yuri:compact`,name:`compact`,source:`yuri`,description:u(`chat.commandAutocomplete.command.compactDescription`),isBuiltIn:!0},...r()?[{id:`yuri:reload`,name:`reload`,source:`yuri`,description:u(`chat.commandAutocomplete.command.reloadDescription`),isBuiltIn:!0}]:[],..._?[{id:`yuri:summary`,name:`summary`,source:`yuri`,description:u(`chat.commandAutocomplete.command.summaryDescription`),isYuri:!0}]:[],...v?[{id:`yuri:workspace-review`,name:`workspace-review`,source:`yuri`,description:u(`chat.commandAutocomplete.command.workspaceReviewDescription`),isYuri:!0}]:[],...v?[{id:`yuri:craft-goal`,name:`craft-goal`,source:`yuri`,description:u(`chat.commandAutocomplete.command.craftGoalDescription`),isYuri:!0}]:[],...v?[{id:`yuri:catch-up`,name:`catch-up`,source:`yuri`,description:u(`chat.commandAutocomplete.command.catchUpDescription`),isYuri:!0}]:[],...v?[{id:`yuri:debug`,name:`debug`,source:`yuri`,description:u(`chat.commandAutocomplete.command.debugDescription`),isYuri:!0}]:[],...v?[{id:`yuri:weigh`,name:`weigh`,source:`yuri`,description:u(`chat.commandAutocomplete.command.weighDescription`),isYuri:!0}]:[],...v?[{id:`yuri:explore`,name:`explore`,source:`yuri`,description:u(`chat.commandAutocomplete.command.exploreDescription`),isYuri:!0}]:[],...t],i=!y,a=ge(n.filter(e=>(i||e.name!==`init`)&&(o?.(e)??!0)),e);x(e=>tt(e,a)?e:a)}catch{let t=!y,n=ge([{id:`yuri:new`,name:`new`,source:`yuri`,description:u(`chat.commandAutocomplete.command.newDescription`),isBuiltIn:!0},..._&&!y?[{id:`yuri:init`,name:`init`,source:`yuri`,description:u(`chat.commandAutocomplete.command.initDescription`),isBuiltIn:!0}]:[],..._?[{id:`yuri:btw`,name:`btw`,source:`yuri`,description:u(`chat.btw.description`),isBuiltIn:!0},{id:`yuri:undo`,name:`undo`,source:`yuri`,description:u(`chat.commandAutocomplete.command.undoDescription`),isBuiltIn:!0},{id:`yuri:redo`,name:`redo`,source:`yuri`,description:u(`chat.commandAutocomplete.command.redoDescription`),isBuiltIn:!0},{id:`yuri:fork`,name:`fork`,source:`yuri`,description:u(`chat.commandAutocomplete.command.forkDescription`),isBuiltIn:!0},{id:`yuri:timeline`,name:`timeline`,source:`yuri`,description:u(`chat.commandAutocomplete.command.timelineDescription`),isBuiltIn:!0}]:[],{id:`yuri:model`,name:`model`,source:`yuri`,description:u(`chat.commandAutocomplete.command.modelDescription`),isBuiltIn:!0},{id:`yuri:compact`,name:`compact`,source:`yuri`,description:u(`chat.commandAutocomplete.command.compactDescription`),isBuiltIn:!0},...r()?[{id:`yuri:reload`,name:`reload`,source:`yuri`,description:u(`chat.commandAutocomplete.command.reloadDescription`),isBuiltIn:!0}]:[],..._?[{id:`yuri:summary`,name:`summary`,source:`yuri`,description:u(`chat.commandAutocomplete.command.summaryDescription`),isYuri:!0}]:[],...v?[{id:`yuri:workspace-review`,name:`workspace-review`,source:`yuri`,description:u(`chat.commandAutocomplete.command.workspaceReviewDescription`),isYuri:!0}]:[],...v?[{id:`yuri:craft-goal`,name:`craft-goal`,source:`yuri`,description:u(`chat.commandAutocomplete.command.craftGoalDescription`),isYuri:!0}]:[],...v?[{id:`yuri:catch-up`,name:`catch-up`,source:`yuri`,description:u(`chat.commandAutocomplete.command.catchUpDescription`),isYuri:!0}]:[],...v?[{id:`yuri:debug`,name:`debug`,source:`yuri`,description:u(`chat.commandAutocomplete.command.debugDescription`),isYuri:!0}]:[],...v?[{id:`yuri:weigh`,name:`weigh`,source:`yuri`,description:u(`chat.commandAutocomplete.command.weighDescription`),isYuri:!0}]:[],...v?[{id:`yuri:explore`,name:`explore`,source:`yuri`,description:u(`chat.commandAutocomplete.command.exploreDescription`),isYuri:!0}]:[]].filter(e=>(t||e.name!==`init`)&&(o?.(e)??!0)),e);x(e=>tt(e,n)?e:n)}finally{C(!1)}})()},[e,y,_,v,E,D,u,o]),B.useEffect(()=>{k(0)},[b]),B.useEffect(()=>{A.current=O},[O]),B.useEffect(()=>{M.current[O]?.scrollIntoView({block:`nearest`})},[O]),B.useEffect(()=>{be(c,ne,{rows:le(b,{skill:u(`chat.commandAutocomplete.badge.skill`),command:u(`chat.commandAutocomplete.badge.command`),system:u(`chat.commandAutocomplete.badge.system`)}),highlightedIndex:O})},[b,c,O,u]);let ae=B.useRef(c);ae.current=c,B.useEffect(()=>()=>{xe(ae.current,ne)},[]),B.useImperativeHandle(l,()=>({acceptIndex:(e,n=!0)=>{let r=b[e];r&&t(r,Ke(r,n))},handleKeyDown:e=>{let r=b.length;if(e===`Escape`){n();return}if(r!==0){if(e===`ArrowDown`){j.current=!0,k(e=>(e+1)%r);return}if(e===`ArrowUp`){j.current=!0,k(e=>(e-1+r)%r);return}if(e===`Enter`||e===`Tab`){let n=(A.current%r+r)%r,i=b[n];i&&t(i,Ke(i,e===`Enter`))}}}}),[b,n,t]);let oe=e=>{let t=ce(e);switch(e.name){case`new`:return(0,$.jsx)(z,{name:t,className:`h-3.5 w-3.5`});case`init`:return(0,$.jsx)(z,{name:t,className:`h-3.5 w-3.5 text-green-500`});case`undo`:return(0,$.jsx)(z,{name:t,className:`h-3.5 w-3.5 text-orange-500`});case`redo`:return(0,$.jsx)(z,{name:t,className:`h-3.5 w-3.5 text-orange-500`});case`timeline`:case`reload`:return(0,$.jsx)(z,{name:t,className:`h-3.5 w-3.5`});case`compact`:return(0,$.jsx)(z,{name:t,className:`h-3.5 w-3.5 text-purple-500`});case`goal`:return(0,$.jsx)(z,{name:t,className:`h-3.5 w-3.5`});case`review`:return(0,$.jsx)(z,{name:t,className:`h-3.5 w-3.5 text-blue-500`});case`test`:case`build`:case`run`:return(0,$.jsx)(z,{name:t,className:`h-3.5 w-3.5 text-cyan-500`});default:return e.isBuiltIn?(0,$.jsx)(z,{name:t,className:`h-3.5 w-3.5 text-yellow-500`}):(0,$.jsx)(z,{name:t,className:`h-3.5 w-3.5 text-muted-foreground`})}};return(0,$.jsxs)(ue,{ref:N,isMobile:d,className:`max-w-[450px] max-h-64`,style:a,children:[(0,$.jsx)(ie,{preventOverscroll:!0,outerClassName:`flex-1 min-h-0`,className:`px-0 py-1.5`,children:ee?(0,$.jsx)(`div`,{className:`flex items-center justify-center py-4`,children:(0,$.jsx)(z,{name:`refresh`,className:`h-4 w-4 animate-spin text-muted-foreground`})}):(0,$.jsxs)(`div`,{children:[b.map((n,r)=>{let i=n.isBuiltIn,a=n.isYuri;return(0,$.jsxs)(`div`,{ref:e=>{M.current[r]=e},className:L(`flex gap-2 px-2 py-2 cursor-pointer rounded-lg`,d?`items-center`:`items-start`,de(d,r===O),!d&&r===O&&`bg-interactive-selection/35`),onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{e.pointerType===`touch`&&(F.current={x:e.clientX,y:e.clientY},R.current=!1)},onPointerMove:e=>{if(e.pointerType!==`touch`||!F.current)return;let t=e.clientX-F.current.x,n=e.clientY-F.current.y;Math.hypot(t,n)>6&&(R.current=!0)},onPointerUp:e=>{if(e.pointerType!==`touch`)return;let r=R.current;F.current=null,R.current=!1,!r&&(e.preventDefault(),e.stopPropagation(),P.current=!0,t(n,Ke(n,d)))},onPointerCancel:()=>{F.current=null,R.current=!1},onClick:()=>{if(P.current){P.current=!1;return}t(n,Ke(n,d))},onMouseMove:()=>{j.current=!1,k(r)},children:[(0,$.jsx)(`div`,{className:L(!d&&`mt-0.5`),children:oe(n)}),(0,$.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)(`span`,{className:`typography-ui-label font-medium`,children:[`/`,Me(n.name,e)]}),n.isSkill?(0,$.jsx)(`span`,{className:Ze,children:u(`chat.commandAutocomplete.badge.skill`)}):(0,$.jsx)(`span`,{className:Ze,children:u(`chat.commandAutocomplete.badge.command`)}),a?(0,$.jsx)(`span`,{className:et,children:`Yuri`}):i?(0,$.jsx)(`span`,{className:et,children:u(`chat.commandAutocomplete.badge.system`)}):n.scope?(0,$.jsx)(`span`,{className:n.scope===`project`?$e:Qe,children:n.scope}):null,n.agent&&(0,$.jsx)(`span`,{className:et,children:n.agent})]}),n.description&&!d&&(0,$.jsx)(`div`,{className:`typography-meta text-muted-foreground mt-0.5 truncate`,children:Me(n.description,e)})]})]},n.id)}),b.length===0&&(0,$.jsx)(`div`,{className:`px-3 py-2 typography-ui-label text-muted-foreground`,children:u(`chat.commandAutocomplete.empty`)})]})}),!d&&(0,$.jsx)(`div`,{className:`px-3 pt-1 pb-1.5 border-t typography-meta text-muted-foreground`,children:u(`chat.autocomplete.keyboardHint`)})]})});rt.displayName=`CommandAutocomplete`;var it=(e,t,n)=>{if(!e)return e;let r=t.length>0&&!/\s$/.test(t)&&!/^\s/.test(e)&&!/[([{]$/.test(t),i=n.length>0&&!/\s$/.test(e)&&!/^\s/.test(n)&&!/^[\])}.,;:!?]/.test(n);return`${r?` `:``}${e}${i?` `:``}`},at=(e,t,n)=>{let r=it(e,t,n);return`${t.length===0&&!/^\s/.test(r)?` `:``}${r}${n.length===0&&!/\s$/.test(r)?` `:``}`},ot=(e,t,n,r)=>{let i=e.slice(0,t),a=e.slice(n),o=at(r,i,a),s=Math.max(0,o.indexOf(r)),c=i.length+s;return{text:`${i}${o}${a}`,caret:i.length+o.length,start:c,end:c+r.length}},st=(e,t)=>{let n=e=>`${e.kind}:${e.value}:${e.range.start}:${e.range.end}`;return new Set(e.map(n)).has(n(t))||e.some(e=>e.range.start<t.range.end&&t.range.start<e.range.end)?[...e]:[...e,t]},ct=(e,t)=>t<e.length&&e[t]===` `?t+1:t;export{rt as a,Ne as c,Ce as d,U as f,at as i,Q as l,st as n,Ye as o,ye as p,ot as r,qe as s,ct as t,Z as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ot as t,st as n}from"./vendor-base-ui-wXsskyKm.js";import{n as r}from"./vendor-react-BkccXcWz.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ot as t,st as n}from"./vendor-base-ui-wXsskyKm.js";import{n as r}from"./vendor-react-BkccXcWz.js";import{ro as i}from"./ui-lbbchWJP.js";import{n as a}from"./Icon-C6Duv_oe.js";var o=r(),s=e(n(),1),c=t();function l(e){let t=(0,o.c)(11),n,r,a;t[0]===e?(n=t[1],r=t[2],a=t[3]):({className:n,variant:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a);let s=a===void 0?`default`:a,l=s===`hint`&&`h-3.5 min-w-0 shrink-0 rounded-full border-0 bg-[color-mix(in_srgb,var(--surface-foreground)_6%,transparent)] px-1.5 font-sans text-[10px] font-medium tracking-tight text-muted-foreground/65 shadow-none dark:shadow-none`,u;t[4]!==n||t[5]!==l?(u=i(`pointer-events-none inline-flex h-5 min-w-5 shrink-0 select-none items-center justify-center`,`rounded-md border border-[var(--interactive-border)] bg-[var(--surface-muted)]`,`px-1.5 font-mono typography-micro font-medium leading-none normal-case`,`text-[var(--surface-muted-foreground)] whitespace-nowrap`,`shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.12)]`,`dark:shadow-[inset_0_-1px_0_0_rgba(255,255,255,0.08)]`,l,n),t[4]=n,t[5]=l,t[6]=u):u=t[6];let d;return t[7]!==r||t[8]!==u||t[9]!==s?(d=(0,c.jsx)(`kbd`,{"data-slot":`kbd`,"data-variant":s,className:u,...r}),t[7]=r,t[8]=u,t[9]=s,t[10]=d):d=t[10],d}var u={"⌘":`command`,cmd:`command`,command:`command`,meta:`command`,"↵":`corner-down-left`,enter:`corner-down-left`,return:`corner-down-left`,"↑":`arrow-up`,arrowup:`arrow-up`,"↓":`arrow-down`,arrowdown:`arrow-down`,"←":`arrow-left`,arrowleft:`arrow-left`,"→":`arrow-right`,arrowright:`arrow-right`,"⇧":`arrow-up`,shift:`arrow-up`};function d(e){let t=(0,o.c)(17),{shortcut:n,className:r,tone:d,variant:p}=e,m=d===void 0?`default`:d,h=p===void 0?`default`:p,g,_,v,y;if(t[0]!==r||t[1]!==n||t[2]!==m||t[3]!==h){y=Symbol.for(`react.early_return_sentinel`);bb0:{let e=n.split(`+`).map(f).filter(Boolean);if(e.length===0){y=null;break bb0}g=`shortcut-kbd`,t[8]===r?_=t[9]:(_=i(`inline-flex items-center gap-1 whitespace-nowrap normal-case`,r),t[8]=r,t[9]=_);let o;t[10]!==m||t[11]!==h?(o=(e,t)=>(0,c.jsxs)(s.Fragment,{children:[t>0?(0,c.jsx)(`span`,{className:h===`hint`?`text-[10px] font-normal text-muted-foreground/65`:`typography-micro font-semibold text-[var(--surface-muted-foreground)]`,children:`+`}):null,(0,c.jsx)(l,{variant:h,"aria-label":e,className:i(m===`selection`&&`border-[var(--interactive-selection)] bg-[var(--interactive-selection)] text-[var(--interactive-selection-foreground)]`),children:h===`hint`&&u[e.toLowerCase()]?(0,c.jsx)(a,{name:u[e.toLowerCase()],className:`size-2.5`}):/^[a-z]$/i.test(e)?e.toUpperCase():e})]},`${e}-${t}`),t[10]=m,t[11]=h,t[12]=o):o=t[12],v=e.map(o)}t[0]=r,t[1]=n,t[2]=m,t[3]=h,t[4]=g,t[5]=_,t[6]=v,t[7]=y}else g=t[4],_=t[5],v=t[6],y=t[7];if(y!==Symbol.for(`react.early_return_sentinel`))return y;let b;return t[13]!==g||t[14]!==_||t[15]!==v?(b=(0,c.jsx)(`span`,{"data-slot":g,className:_,children:v}),t[13]=g,t[14]=_,t[15]=v,t[16]=b):b=t[16],b}function f(e){return e.trim()}export{d as n,l as t};
|