@yuriai/web 0.3.7 → 0.3.8-beta.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/README.md +5 -3
- package/dist/assets/{AgentAvatar-4HfTeQK1.js → AgentAvatar-CzUo20cq.js} +1 -1
- package/dist/assets/{AgentSelector-Db0C7nfY.js → AgentSelector-BYe6JxpS.js} +1 -1
- package/dist/assets/{ArchivedSessionsDialog-Cja7TIg6.js → ArchivedSessionsDialog-CfidThGZ.js} +1 -1
- package/dist/assets/{AssistantConversationSurface-Cg0Z0laN.js → AssistantConversationSurface-D9pxE0LL.js} +3 -3
- package/dist/assets/{AssistantSessionCard-CRaYbAwR.js → AssistantSessionCard-UpViUHNh.js} +2 -2
- package/dist/assets/{AssistantUnreadBadge-B0XaBtKU.js → AssistantUnreadBadge-Cu11SA54.js} +1 -1
- package/dist/assets/{AssistantView-D7Ec_wbs.js → AssistantView-Cn8EHVTJ.js} +1 -1
- package/dist/assets/{AssistantWorkingAvatar-QmEGmd3p.js → AssistantWorkingAvatar-DXpA53IL.js} +1 -1
- package/dist/assets/{AssistantsSettingsPage-SynpDBbu.js → AssistantsSettingsPage-DgB1NmO5.js} +1 -1
- package/dist/assets/{BinaryFileFallback-CLr78pii.js → BinaryFileFallback-DXA8nGbU.js} +1 -1
- package/dist/assets/{BtwPanel-eNUn2HxV.js → BtwPanel-DkoRSk96.js} +1 -1
- package/dist/assets/{BusyDots-CGTf_jqS.js → BusyDots-BJ7g-GAZ.js} +1 -1
- package/dist/assets/{ChatContainer-DUJRc6kx.js → ChatContainer-Br3bKIVW.js} +4 -4
- package/dist/assets/{ChatView-DJnxvyiB.js → ChatView-Dg7Q_Wwt.js} +1 -1
- package/dist/assets/{DiagramView-BQ_5mLmc.js → DiagramView-eNKpLrSw.js} +1 -1
- package/dist/assets/{DiffView-KE3aMklA.js → DiffView-B-Y0Knyh.js} +1 -1
- package/dist/assets/{DiffViewToggle-B-fDu13M.js → DiffViewToggle-BmJbap6o.js} +1 -1
- package/dist/assets/{ErrorBoundary-BMkurwx0.js → ErrorBoundary-DGeC8hrR.js} +1 -1
- package/dist/assets/{FadeInOnReveal-BNxn8bBO.js → FadeInOnReveal-D6FCXnEi.js} +1 -1
- package/dist/assets/{GuiPluginMount-CcxWjZGn.js → GuiPluginMount-CYYTSXpA.js} +1 -1
- package/dist/assets/{GuiPluginPage-B6DZGRf5.js → GuiPluginPage-B7UFo1YT.js} +1 -1
- package/dist/assets/{GuiPluginSurface-CZ-rTgd0.js → GuiPluginSurface-DFOsSAf1.js} +1 -1
- package/dist/assets/{GuiPluginTitlebarItems-ByapzQyJ.js → GuiPluginTitlebarItems-Cr4QSCKu.js} +1 -1
- package/dist/assets/{GuiPluginWindow-DtZqX_qS.js → GuiPluginWindow-DzXnwUM0.js} +1 -1
- package/dist/assets/{Icon-CUOVBCQn.js → Icon-Bj9hTMjF.js} +1 -1
- package/dist/assets/{ImageLoadingPlaceholder-ON75MLXx.js → ImageLoadingPlaceholder-Ugc-GANq.js} +1 -1
- package/dist/assets/{LoadingImage-CE1QZoPZ.js → LoadingImage-uYHHT_VX.js} +1 -1
- package/dist/assets/MarkdownRenderer-1X8XlOwN.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-SH7kLqNr.js → MarkdownRendererImpl-CIX7kNlF.js} +1 -1
- package/dist/assets/{MarkstreamRendererImpl-kWCEeJ84.js → MarkstreamRendererImpl-hHcz8MiN.js} +1 -1
- package/dist/assets/{MobileAssistantSettingsPage-DkSgJLH5.js → MobileAssistantSettingsPage-CHcRJtXv.js} +1 -1
- package/dist/assets/{MobileAssistantTab-DlreBfpD.js → MobileAssistantTab-BO5SDNo5.js} +1 -1
- package/dist/assets/{MobileBtwPage-DUOHjbOb.js → MobileBtwPage-CBAt4xS7.js} +1 -1
- package/dist/assets/{MobileChangesSurface-s-IkQzDj.js → MobileChangesSurface-DSryfzt8.js} +1 -1
- package/dist/assets/{MobileChatScreen-RJicegCg.js → MobileChatScreen-CGk04i3r.js} +1 -1
- package/dist/assets/{MobileDetailNavigation-B0Xb37E5.js → MobileDetailNavigation-CIqxaASf.js} +1 -1
- package/dist/assets/{MobileFilesSurface-CR7C7ern.js → MobileFilesSurface-k1QgAZSz.js} +2 -2
- package/dist/assets/{MobileHtmlNetworkBoundary-CG4kdWvo.js → MobileHtmlNetworkBoundary-wYqNGLbr.js} +2 -2
- package/dist/assets/{MobileOverlayPanel-DLDL_a6S.js → MobileOverlayPanel-DH89DhXZ.js} +1 -1
- package/dist/assets/{MobileResizableSheet-BTsMGacb.js → MobileResizableSheet-BFNJaq9p.js} +1 -1
- package/dist/assets/{MobileSettingsTab-DIqufnwp.js → MobileSettingsTab-Bs9qRYqM.js} +1 -1
- package/dist/assets/{MobileShareBridge-BgAD2FqK.js → MobileShareBridge-DY3Lzf8x.js} +1 -1
- package/dist/assets/{MobileSurface-D_9tJDu_.js → MobileSurface-CCGzDCA8.js} +1 -1
- package/dist/assets/{MobileTabPageHeader-CPEY1sVL.js → MobileTabPageHeader-CFaFn4mL.js} +1 -1
- package/dist/assets/{ModelLogo-CoEkCK6k.js → ModelLogo-Clc0TbVa.js} +1 -1
- package/dist/assets/{ModelSelector-CdSx-1l3.js → ModelSelector-Bzdl6__F.js} +1 -1
- package/dist/assets/{MultiRunWindow-08NX-bpU.js → MultiRunWindow-BI8M6MMJ.js} +1 -1
- package/dist/assets/{OnboardingScreen-DW4PQZ48.js → OnboardingScreen-CnQxeBTb.js} +1 -1
- package/dist/assets/{OverlayScrollbar-D4U670-p.js → OverlayScrollbar-DxWbQtPi.js} +1 -1
- package/dist/assets/{PierreDiffViewer-CU2O_Gqy.js → PierreDiffViewer-eVvrzbhm.js} +1 -1
- package/dist/assets/{ProviderLogo-C9ON1xS-.js → ProviderLogo-2q99kcs0.js} +1 -1
- package/dist/assets/{RemoteAssistantSessionCard-44WC5u9f.js → RemoteAssistantSessionCard-DQzIrlZD.js} +1 -1
- package/dist/assets/{RemoteDesktopPanel-BfdjP2Ug.js → RemoteDesktopPanel-5Hy1Vul9.js} +1 -1
- package/dist/assets/{ScheduledTasksDialog-p2z6x4k7.js → ScheduledTasksDialog-CU-96_KI.js} +1 -1
- package/dist/assets/{ScrollableOverlay-B5Mx_IrY.js → ScrollableOverlay-B6nm-QHe.js} +1 -1
- package/dist/assets/{SettingsGroup-Bd0hGXKp.js → SettingsGroup-VX5EIcdB.js} +1 -1
- package/dist/assets/{SettingsView-BbEPSEy3.js → SettingsView-8FgFGfhK.js} +1 -1
- package/dist/assets/{SettingsWindow-DO2ySMZ8.js → SettingsWindow-CjVC__o_.js} +1 -1
- package/dist/assets/{SetupTourDialog-Bm0scCiD.js → SetupTourDialog-Cd4anq2F.js} +1 -1
- package/dist/assets/{SyncActions-ktq_QbjA.js → SyncActions-CA80mSXn.js} +1 -1
- package/dist/assets/{TerminalView-tXyVGRwg.js → TerminalView-Cy3tfVjh.js} +1 -1
- package/dist/assets/{TextSelectionMenu-CCsFVQha.js → TextSelectionMenu-C3G3QdRe.js} +1 -1
- package/dist/assets/{ToolOutputDialog-BX3Vi-k5.js → ToolOutputDialog-BUGnb_Yu.js} +1 -1
- package/dist/assets/{assistantMessagePreview-Bh2bPUPh.js → assistantMessagePreview-DMQN3Gwb.js} +1 -1
- package/dist/assets/{assistantQueries-9sjQcHoO.js → assistantQueries-3TdsxIwK.js} +1 -1
- package/dist/assets/{auto-read-context-JBvQYPyM.js → auto-read-context-BFDDD6Nm.js} +1 -1
- package/dist/assets/{capgoAdapter-llXcw7v2.js → capgoAdapter-Bw37IoVM.js} +1 -1
- package/dist/assets/{card-YOYJB2Bf.js → card-ZDEmL6t1.js} +1 -1
- package/dist/assets/{chatUpwardIntent-Z6bMNkax.js → chatUpwardIntent-BB-rCDpI.js} +1 -1
- package/dist/assets/{checkbox-ByuwPnuS.js → checkbox-B0zYfEMl.js} +1 -1
- package/dist/assets/{collapsible-ByaFR6Oc.js → collapsible-BOWyQRZn.js} +1 -1
- package/dist/assets/{connection-hint-DugoAaao.js → connection-hint-By7s_PpE.js} +1 -1
- package/dist/assets/{context-menu-DKL8DaT6.js → context-menu-BK6NbucI.js} +1 -1
- package/dist/assets/{diagram-DkVURCJZ.js → diagram-DYl1ElOP.js} +1 -1
- package/dist/assets/{dialog-CQbyU8pU.js → dialog-kKHr6l0I.js} +1 -1
- package/dist/assets/{dropdown-menu-W3Ii298F.js → dropdown-menu-NxiXa_EI.js} +1 -1
- package/dist/assets/{fileMentionTouchSelection-CwTAmgan.js → fileMentionTouchSelection-DWX5kpzC.js} +1 -1
- package/dist/assets/{gitApi-droqYZ9A.js → gitApi-OVA3TAy3.js} +1 -1
- package/dist/assets/{icons-CLvvQeAy.js → icons-BpK9iAgA.js} +1 -1
- package/dist/assets/{input-DSdEvspA.js → input-CoI-IWJg.js} +1 -1
- package/dist/assets/{insertionBoundaries-Bf3EMWj8.js → insertionBoundaries-Bw6mz-QZ.js} +1 -1
- package/dist/assets/{kbd-hp3-RDSe.js → kbd-Cvn5LQY3.js} +1 -1
- package/dist/assets/{main-D71N_bhn.js → main-CAX_GxTi.js} +4 -4
- package/dist/assets/{main-ClNDsxXD.js → main-CFSCPKQq.js} +2 -2
- package/dist/assets/{markdownHeightCache-qX2f-vgi.js → markdownHeightCache-CknUtMlX.js} +1 -1
- package/dist/assets/{mcpQueries-DKxn0-Iq.js → mcpQueries-B3bAYBwV.js} +1 -1
- package/dist/assets/{miniChat-DuWGMHPI.js → miniChat-DCPNrx-v.js} +2 -2
- package/dist/assets/{mobile-CjbFG_ps.js → mobile-Ck9hV98N.js} +2 -2
- package/dist/assets/{mobileBackNavigation-Ce-CFzRu.js → mobileBackNavigation-oDcLGmHp.js} +1 -1
- package/dist/assets/{mobileConnections-BWToBinV.js → mobileConnections-CBqRp-3T.js} +2 -2
- package/dist/assets/{multirun-ByBZh9To.js → multirun-CS8jFKDn.js} +1 -1
- package/dist/assets/{native-config-BDAV-Sn-.js → native-config-zrhK__rU.js} +1 -1
- package/dist/assets/{nativeComposerCover-DcWXqfZa.js → nativeComposerCover-MPlMSBBX.js} +1 -1
- package/dist/assets/{navigation-DiqbYNCD.js → navigation-CkCH8e3H.js} +1 -1
- package/dist/assets/{openRemoteProjectSession-DPb8H79n.js → openRemoteProjectSession-BbAkznDS.js} +1 -1
- package/dist/assets/{openSessionFromDeepLink-gJWOkm8w.js → openSessionFromDeepLink-qg52CXP9.js} +2 -2
- package/dist/assets/{pluginPresentation-C8XRIFn5.js → pluginPresentation-DkI5wY0D.js} +1 -1
- package/dist/assets/{pwa-CLwERclR.js → pwa-oKMat1GX.js} +1 -1
- package/dist/assets/{queue-abort-optimistic-BET9wo1a.js → queue-abort-optimistic-CDuhpG2v.js} +1 -1
- package/dist/assets/{reference-history-BAPLZtrN.js → reference-history-BJ9mAdW1.js} +1 -1
- package/dist/assets/{remoteSessionReference-B-5Nd45t.js → remoteSessionReference-DICMQab5.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-DudyNNIU.js → renderElectronMiniChatApp-D_crcFe0.js} +2 -2
- package/dist/assets/{renderMobileApp-GIRJpszx.js → renderMobileApp-DYGufF-U.js} +4 -4
- package/dist/assets/{runtimeConfig-CUiokUFx.js → runtimeConfig-AnrhVRkF.js} +1 -1
- package/dist/assets/{runtimeEndpointReset-DXfdUC1r.js → runtimeEndpointReset-BDoCO-tc.js} +2 -2
- package/dist/assets/{select--wmAuAOB.js → select-COAwWxv-.js} +1 -1
- package/dist/assets/{sessionLookup-on217pcK.js → sessionLookup-BtXyFcKe.js} +1 -1
- package/dist/assets/{sessionOwnership-BoiTRI2O.js → sessionOwnership-Ck4bRAGZ.js} +1 -1
- package/dist/assets/{shortcuts-D3O9f1E5.js → shortcuts-BFw2eop1.js} +1 -1
- package/dist/assets/{sortable-tabs-strip-DvvltU2l.js → sortable-tabs-strip-Duxo9Ip3.js} +1 -1
- package/dist/assets/{speechSettingsQueries-Cqj3BM7O.js → speechSettingsQueries-CqamPgA0.js} +1 -1
- package/dist/assets/{switch-ClpM-4qX.js → switch-CjaNqGBY.js} +1 -1
- package/dist/assets/{textarea-Cpcy0ejH.js → textarea-B0VZhgml.js} +1 -1
- package/dist/assets/{tooltip-B9I9lmf0.js → tooltip-vDrp4bzq.js} +1 -1
- package/dist/assets/{truncated-path-BPcF8ywI.js → truncated-path-CrzP3UBz.js} +1 -1
- package/dist/assets/types-D4sSimuj.js +2 -0
- package/dist/assets/{ui-BqoDhEiW.js → ui-Pjq_Ygzo.js} +4 -4
- package/dist/assets/{useAppFontEffects-CaZbgo4R.js → useAppFontEffects-CzJ2wyOQ.js} +2 -2
- package/dist/assets/{useDesktopWindowControlsLayout-BA4DI_W1.js → useDesktopWindowControlsLayout-C9oYWUK2.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-DQMEyl5O.js → useEffectiveDirectory-DoR6gkPG.js} +1 -1
- package/dist/assets/{useGitStore-Dvd_1jyD.js → useGitStore-Tb4ovphQ.js} +1 -1
- package/dist/assets/{useInlineCommentDraftStore-DWSuMEHF.js → useInlineCommentDraftStore-4A4nJ3nE.js} +1 -1
- package/dist/assets/{useMcpConfigStore-7NoTGiyv.js → useMcpConfigStore-DzP-AJLe.js} +1 -1
- package/dist/assets/{useMobileSwipeActions-7iuGbwWj.js → useMobileSwipeActions-BoaPQqab.js} +1 -1
- package/dist/assets/{useMobileTranscriptSyncHint-B3NigAUx.js → useMobileTranscriptSyncHint-B3mZDzht.js} +1 -1
- package/dist/assets/{useModelLists-C5fB7vLV.js → useModelLists-QXDxo5Ac.js} +1 -1
- package/dist/assets/{useOpenCodeReadiness-B4IGjODK.js → useOpenCodeReadiness-CPwbuznT.js} +1 -1
- package/dist/assets/{usePluginsStore-D2P-bQeH.js → usePluginsStore-Cw2anjTl.js} +1 -1
- package/dist/assets/{useProjectGitActions-CiL6W09h.js → useProjectGitActions-7id8Rqeg.js} +1 -1
- package/dist/assets/{useProjectGitStore-Bv65Bj_P.js → useProjectGitStore-8GteDOkw.js} +1 -1
- package/dist/assets/{useProjectRuntimeAPIs-CYT-3dZd.js → useProjectRuntimeAPIs-BjRL5EMv.js} +1 -1
- package/dist/assets/{useSessionBtwStore-H4R5jYT2.js → useSessionBtwStore-DDZStXhl.js} +1 -1
- package/dist/assets/{useStreamingTextThrottle-D9STYrQw.js → useStreamingTextThrottle-B4yaNsPw.js} +1 -1
- package/dist/assets/{worktreeManager-33ddwAq1.js → worktreeManager-DmdHIgOn.js} +1 -1
- package/dist/assets/{worktreeSourceBranchPreference-Cp5jF1M9.js → worktreeSourceBranchPreference-Buq7Vnm1.js} +1 -1
- package/dist/index.html +5 -5
- package/dist/mini-chat.html +5 -5
- package/dist/mobile.html +1 -1
- package/package.json +1 -1
- package/server/lib/host-update/DOCUMENTATION.md +28 -16
- package/server/lib/host-update/cli-worker.js +71 -24
- package/server/lib/host-update/cli.js +9 -6
- package/server/lib/host-update/cli.test.js +28 -5
- package/server/lib/host-update/releases.js +33 -2
- package/server/lib/host-update/runtime.test.js +16 -1
- package/dist/assets/MarkdownRenderer-DL1l4dgn.js +0 -2
- package/dist/assets/types-DjBXLnbS.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{T as t,ot as n,st as r,w as i}from"./vendor-base-ui-wXsskyKm.js";import{n as a}from"./vendor-react-BkccXcWz.js";import{io as o}from"./ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{T as t,ot as n,st as r,w as i}from"./vendor-base-ui-wXsskyKm.js";import{n as a}from"./vendor-react-BkccXcWz.js";import{io as o}from"./ui-Pjq_Ygzo.js";import{n as s}from"./Icon-Bj9hTMjF.js";var c=a(),l=e(r(),1),u=n(),d=l.memo(function(e){let n=(0,c.c)(20),{checked:r,onChange:a,disabled:l,indeterminate:d,ariaLabel:f,className:p,iconClassName:m}=e,h=l!==void 0&&l,g=r||d,_;n[0]===a?_=n[1]:(_=e=>a(!!e),n[0]=a,n[1]=_);let v=g?`border-[color:color-mix(in_srgb,var(--primary-base)_65%,var(--interactive-border))] bg-transparent shadow-none hover:bg-[var(--interactive-hover)] hover:border-[color:color-mix(in_srgb,var(--primary-base)_75%,var(--interactive-border))]`:`border-[var(--interactive-border)] bg-transparent shadow-none hover:bg-[var(--interactive-hover)] hover:border-[var(--interactive-border)]`,y;n[2]!==p||n[3]!==v?(y=o(`group/checkbox relative flex shrink-0 self-center items-center justify-center rounded-[4px] border outline-none`,`h-[14px] w-[14px] min-h-[14px] min-w-[14px]`,`transition-[background-color,border-color,box-shadow] duration-200 ease-out`,v,`focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)] focus-visible:ring-offset-1 focus-visible:ring-offset-transparent`,`disabled:cursor-not-allowed disabled:opacity-50`,p),n[2]=p,n[3]=v,n[4]=y):y=n[4];let b;n[5]===m?b=n[6]:(b=o(`flex items-center justify-center text-[var(--primary-base)]`,`data-[unchecked]:hidden`,m),n[5]=m,n[6]=b);let x;n[7]===d?x=n[8]:(x=d?(0,u.jsx)(s,{name:`subtract`,className:o(`h-[10px] w-[10px] min-h-[10px] min-w-[10px]`,`text-[var(--primary-base)]`)}):(0,u.jsx)(s,{name:`check`,className:o(`h-[10px] w-[10px] min-h-[10px] min-w-[10px]`,`text-[var(--primary-base)]`)}),n[7]=d,n[8]=x);let S;n[9]!==b||n[10]!==x?(S=(0,u.jsx)(i,{keepMounted:!0,className:b,children:x}),n[9]=b,n[10]=x,n[11]=S):S=n[11];let C;return n[12]!==f||n[13]!==r||n[14]!==h||n[15]!==d||n[16]!==_||n[17]!==y||n[18]!==S?(C=(0,u.jsx)(t,{checked:r,onCheckedChange:_,disabled:h,indeterminate:d,"aria-label":f,className:y,children:S}),n[12]=f,n[13]=r,n[14]=h,n[15]=d,n[16]=_,n[17]=y,n[18]=S,n[19]=C):C=n[19],C});export{d as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{D as t,E as n,O as r,ot as i,st as a}from"./vendor-base-ui-wXsskyKm.js";import{n as o}from"./vendor-react-BkccXcWz.js";import{io as s}from"./ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{D as t,E as n,O as r,ot as i,st as a}from"./vendor-base-ui-wXsskyKm.js";import{n as o}from"./vendor-react-BkccXcWz.js";import{io as s}from"./ui-Pjq_Ygzo.js";var c=o(),l=e(a(),1),u=i(),d=r,f=e=>{let n=(0,c.c)(14),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:a,asChild:r,children:i,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let d;n[5]!==r||n[6]!==i?(d=r&&l.isValidElement(i)?{render:i}:{children:i},n[5]=r,n[6]=i,n[7]=d):d=n[7];let f=d,p;n[8]===a?p=n[9]:(p=s(`flex w-full items-center justify-between rounded-lg px-2 py-1.5 text-left text-foreground hover:bg-interactive-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary`,a),n[8]=a,n[9]=p);let m;return n[10]!==o||n[11]!==f||n[12]!==p?(m=(0,u.jsx)(t,{className:p,...o,...f}),n[10]=o,n[11]=f,n[12]=p,n[13]=m):m=n[13],m},p=e=>{let t=(0,c.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=s(`overflow-hidden data-[closed]:animate-collapsible-up data-[open]:animate-collapsible-down`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,u.jsx)(n,{className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o};export{p as n,f as r,d as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{C as t,S as n,_ as r,b as i,ot as a,st as o,x as s,y as c}from"./vendor-base-ui-wXsskyKm.js";import{n as l}from"./vendor-react-BkccXcWz.js";import{D as u}from"./runtime-file-resource-BGZ4tGr5.js";import{r as d}from"./vendor-reactuses-core-DjKFMfz7.js";import{Xn as f,io as p}from"./ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{C as t,S as n,_ as r,b as i,ot as a,st as o,x as s,y as c}from"./vendor-base-ui-wXsskyKm.js";import{n as l}from"./vendor-react-BkccXcWz.js";import{D as u}from"./runtime-file-resource-BGZ4tGr5.js";import{r as d}from"./vendor-reactuses-core-DjKFMfz7.js";import{Xn as f,io as p}from"./ui-Pjq_Ygzo.js";import{n as m}from"./Icon-Bj9hTMjF.js";import{t as h}from"./i18n-Sh2Qk9nD.js";import{i as g,n as _,t as v}from"./tooltip-vDrp4bzq.js";var y=l(),b=e(o(),1),x=new WeakMap;function S(){let e=new Map,t=new Set,n=[],r=()=>{n=[...e.values()],t.forEach(e=>e())};return{subscribe(e){return t.add(e),()=>{t.delete(e)}},getSnapshot:()=>n,report(t){let n=Symbol();return e.set(n,t),r(),()=>{e.delete(n)&&r()}}}}function C(e,t){let n=x.get(e);n||x.set(e,n=new Map);let r=n.get(t);return r||n.set(t,r=S()),r}function w(e,t,n,r){let i=(0,y.c)(6),a=d(r),o,s;i[0]!==t||i[1]!==n||i[2]!==e||i[3]!==a?(o=()=>{if(n)return C(e,t).report({message:n,retry:a})},s=[e,t,n,a],i[0]=t,i[1]=n,i[2]=e,i[3]=a,i[4]=o,i[5]=s):(o=i[4],s=i[5]),(0,b.useEffect)(o,s)}function T(e,t){let n=(0,y.c)(3),r;n[0]!==t||n[1]!==e?(r=C(e,t),n[0]=t,n[1]=e,n[2]=r):r=n[2];let i=r;return(0,b.useSyncExternalStore)(i.subscribe,i.getSnapshot,i.getSnapshot)}var E=a(),D=b.memo(function({registry:e,hostId:a,connectionError:o}){let{t:l}=h(),u=T(e,a),[d,p]=b.useState(!1),g=[...new Set([o,...u.map(e=>e.message)].filter(Boolean))].join(`
|
|
2
2
|
`);return g?(0,E.jsxs)(t,{children:[(0,E.jsx)(n,{openOnHover:!0,delay:200,closeDelay:150,"aria-label":g,nativeButton:!1,render:(0,E.jsx)(`span`,{role:`button`,tabIndex:0}),"data-remote-host-error":a,onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),className:`app-region-no-drag inline-flex size-5 shrink-0 items-center justify-center border-0 bg-transparent p-0 text-[var(--status-error)] outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:(0,E.jsx)(m,{name:`exclamation-fill`,className:`size-3.5`})}),(0,E.jsx)(s,{children:(0,E.jsx)(i,{side:`bottom`,sideOffset:6,collisionPadding:12,className:`z-50`,children:(0,E.jsxs)(c,{"data-remote-host-error-popup":``,className:`yuri-mobile-overlay-surface yuri-popup-surface max-w-[min(24rem,calc(100vw-2rem))] rounded-xl p-3 text-foreground outline-none`,onClick:e=>e.stopPropagation(),children:[(0,E.jsx)(r,{className:`max-h-64 overflow-y-auto whitespace-pre-wrap typography-meta [overflow-wrap:anywhere]`,children:g}),u.length?(0,E.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,E.jsx)(f,{size:`xs`,disabled:d,onClick:async()=>{p(!0);try{await Promise.all(u.map(e=>e.retry()))}finally{p(!1)}},children:l(`chat.history.retry`)})}):null]})})})]}):null}),O=b.memo(function(e){let t=(0,y.c)(61),{registry:n,hostId:r,remoteState:i,composer:a,unsupported:o,showName:s,nameOnlyTip:c,compactName:l,isolateLongPress:d}=e,f=a!==void 0&&a,b=o!==void 0&&o,x=s!==void 0&&s,S=c!==void 0&&c,C=l!==void 0&&l,w=d!==void 0&&d,{t:T}=h(),O=u(n,r),k;t[0]!==O?.state||t[1]!==i||t[2]!==T||t[3]!==b?(k=T(b?`remoteProjects.unsupported`:i&&i!==`ok`?`remoteProjects.${i}`:`remoteProjects.state.${O?.state??`offline`}`),t[0]=O?.state,t[1]=i,t[2]=T,t[3]=b,t[4]=k):k=t[4];let A=k,j=!b&&O?.state===`connected`&&(!i||i===`ok`),M;t[5]!==O||t[6]!==T?(M=O?.lastSyncedAt?T(`remoteProjects.lastSync`,{time:new Date(O.lastSyncedAt).toLocaleString()}):null,t[5]=O,t[6]=T,t[7]=M):M=t[7];let N=M,P=O?.name??r,F=O?.lastError?.message,I;t[8]!==N||t[9]!==A||t[10]!==F||t[11]!==P?(I=[P,A,N,F].filter(Boolean),t[8]=N,t[9]=A,t[10]=F,t[11]=P,t[12]=I):I=t[12];let L=I.join(` · `),R=S?O?.name??r:L,z=O?.name??r,B;t[13]!==O?.source||t[14]!==z?(B=O?.source===`ssh`&&/^[^\s@]+@[^\s@]+$/.test(z)?z.slice(z.indexOf(`@`)+1):z,t[13]=O?.source,t[14]=z,t[15]=B):B=t[15];let V=B,H;t[16]===w?H=t[17]:(H=e=>{w&&(e.pointerType===`touch`||e.pointerType===`pen`)&&e.stopPropagation()},t[16]=w,t[17]=H);let U=w?ee:void 0,W;t[18]!==C||t[19]!==f||t[20]!==x?(W=p(`inline-flex items-center gap-1 align-middle`,C?`h-5 min-w-0 max-w-48 text-[11px] leading-5 text-foreground/70`:[`h-4 justify-center text-xs leading-none text-muted-foreground`,f||x?`min-w-0`:`w-4 shrink-0`]),t[18]=C,t[19]=f,t[20]=x,t[21]=W):W=t[21];let G;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,E.jsx)(m,{name:`computer`,className:`block size-3 shrink-0`}),t[22]=G):G=t[22];let K;t[23]!==j||t[24]!==V||t[25]!==C||t[26]!==f||t[27]!==z||t[28]!==x||t[29]!==A||t[30]!==T?(K=f?(0,E.jsxs)(`span`,{className:`truncate`,children:[z,` · `,A,j?``:` · ${T(`remoteProjects.sendBlocked`)}`]}):C||x?(0,E.jsx)(`span`,{className:`truncate`,children:C?V:z}):null,t[23]=j,t[24]=V,t[25]=C,t[26]=f,t[27]=z,t[28]=x,t[29]=A,t[30]=T,t[31]=K):K=t[31];let q;t[32]!==r||t[33]!==U||t[34]!==W||t[35]!==K||t[36]!==R?(q=(0,E.jsxs)(`span`,{"aria-label":R,"data-remote-host":r,onContextMenuCapture:U,className:W,children:[G,K]}),t[32]=r,t[33]=U,t[34]=W,t[35]=K,t[36]=R,t[37]=q):q=t[37];let J;t[38]!==H||t[39]!==q?(J=(0,E.jsx)(g,{asChild:!0,onPointerDown:H,children:q}),t[38]=H,t[39]=q,t[40]=J):J=t[40];let Y;t[41]!==j||t[42]!==O||t[43]!==N||t[44]!==z||t[45]!==S||t[46]!==A?(Y=S?z:(0,E.jsxs)(`div`,{className:`space-y-1.5 py-0.5`,children:[(0,E.jsx)(`div`,{className:`font-medium`,children:z}),(0,E.jsxs)(`ul`,{className:`space-y-1 text-xs leading-5 text-muted-foreground`,children:[(0,E.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,E.jsx)(`span`,{"aria-hidden":`true`,className:p(`mt-2 size-1.5 shrink-0 rounded-full`,j?`bg-[var(--status-success)]`:`bg-muted-foreground`)}),(0,E.jsx)(`span`,{children:A})]}),N?(0,E.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,E.jsx)(`span`,{"aria-hidden":`true`,className:`mt-2 size-1.5 shrink-0 rounded-full bg-muted-foreground/60`}),(0,E.jsx)(`span`,{children:N})]}):null,O?.lastError?.message?(0,E.jsxs)(`li`,{className:`flex items-start gap-2 text-[var(--status-error)]`,children:[(0,E.jsx)(`span`,{"aria-hidden":`true`,className:`mt-2 size-1.5 shrink-0 rounded-full bg-current`}),(0,E.jsx)(`span`,{children:O.lastError.message})]}):null]})]}),t[41]=j,t[42]=O,t[43]=N,t[44]=z,t[45]=S,t[46]=A,t[47]=Y):Y=t[47];let X;t[48]===Y?X=t[49]:(X=(0,E.jsx)(_,{side:`top`,sideOffset:6,className:`max-w-[min(22rem,calc(100vw-2rem))] text-left [overflow-wrap:anywhere]`,children:Y}),t[48]=Y,t[49]=X);let Z;t[50]!==J||t[51]!==X?(Z=(0,E.jsxs)(v,{delayDuration:600,children:[J,X]}),t[50]=J,t[51]=X,t[52]=Z):Z=t[52];let Q;t[53]!==O?.lastError?.message||t[54]!==r||t[55]!==S||t[56]!==n?(Q=S?null:(0,E.jsx)(D,{registry:n,hostId:r,connectionError:O?.lastError?.message}),t[53]=O?.lastError?.message,t[54]=r,t[55]=S,t[56]=n,t[57]=Q):Q=t[57];let $;return t[58]!==Z||t[59]!==Q?($=(0,E.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1`,children:[Z,Q]}),t[58]=Z,t[59]=Q,t[60]=$):$=t[60],$});function ee(e){e.preventDefault(),e.stopPropagation()}function k(e){if(e?.state===`connected`)return null;if(!e||e.state===`connecting`){let t=e?.preparationPhase;return{key:t&&t!==`connecting`?`remoteProjects.preparation.${t}`:`remoteProjects.state.connecting`,pending:!0}}return{key:`remoteProjects.state.${e.state}`,pending:!1}}export{w as i,O as n,D as r,k as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-hePW80VL.js";import{A as e,B as t,H as n,M as r,V as i,k as a,ot as o,st as s,z as c}from"./vendor-base-ui-wXsskyKm.js";import{n as l}from"./vendor-react-BkccXcWz.js";import{io as u}from"./ui-
|
|
1
|
+
import"./rolldown-runtime-hePW80VL.js";import{A as e,B as t,H as n,M as r,V as i,k as a,ot as o,st as s,z as c}from"./vendor-base-ui-wXsskyKm.js";import{n as l}from"./vendor-react-BkccXcWz.js";import{io as u}from"./ui-Pjq_Ygzo.js";import{n as d,r as f,t as p}from"./dropdown-menu.styles-BDla58Rm.js";var m=l();s();var h=o();function g(t){let n=(0,m.c)(4),r;n[0]===t?r=n[1]:({...r}=t,n[0]=t,n[1]=r);let i;return n[2]===r?i=n[3]:(i=(0,h.jsx)(e,{...r}),n[2]=r,n[3]=i),i}function _(e){let t=(0,m.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,h.jsx)(a,{...n}),t[2]=n,t[3]=r),r}function v(e){let n=(0,m.c)(20),r,a,o,s,l;n[0]===e?(r=n[1],a=n[2],o=n[3],s=n[4],l=n[5]):({className:a,positionerClassName:o,children:r,style:l,...s}=e,n[0]=e,n[1]=r,n[2]=a,n[3]=o,n[4]=s,n[5]=l);let f;n[6]===o?f=n[7]:(f=u(`app-region-no-drag z-50`,o),n[6]=o,n[7]=f);let p;n[8]===l?p=n[9]:(p={color:`var(--surface-elevated-foreground)`,...l},n[8]=l,n[9]=p);let g;n[10]===a?g=n[11]:(g=u(d,a),n[10]=a,n[11]=g);let _;n[12]!==r||n[13]!==s||n[14]!==p||n[15]!==g?(_=(0,h.jsx)(i,{"data-slot":`dropdown-menu-content`,style:p,className:g,...s,children:r}),n[12]=r,n[13]=s,n[14]=p,n[15]=g,n[16]=_):_=n[16];let v;return n[17]!==f||n[18]!==_?(v=(0,h.jsx)(t,{children:(0,h.jsx)(c,{className:f,children:_})}),n[17]=f,n[18]=_,n[19]=v):v=n[19],v}function y(e){let t=(0,m.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=u(p,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(n,{className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function b(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=u(f,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(r,{className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}export{_ as a,b as i,v as n,y as r,g as t};
|
|
@@ -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{io as r}from"./ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ot as t,st as n}from"./vendor-base-ui-wXsskyKm.js";import{io as r}from"./ui-Pjq_Ygzo.js";import{t as i}from"./vendor-react-drawio-C9rszQEJ.js";var a=e(n(),1),o=t(),s=`<mxfile><diagram id="new" name="Page-1"><mxGraphModel dx="0" dy="0" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel></diagram></mxfile>`;function c(){if(typeof document>`u`)return!1;let e=document.documentElement.getAttribute(`data-theme`);return e===`dark`||!e&&window.matchMedia(`(prefers-color-scheme: dark)`).matches}var l=a.forwardRef(function({xml:e,readOnly:t,className:n,onChange:l},u){let d=a.useRef(e),f=a.useRef(null),p=a.useRef(!1),[m,h]=a.useState(c),g=a.useRef(e),_=a.useRef(e);_.current!==e&&(_.current=e,g.current=e,d.current=e);let v=a.useRef(m);v.current!==m&&(v.current=m,g.current=d.current);let y=a.useRef(null);a.useEffect(()=>{let e=()=>h(c());e();let t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]}),()=>t.disconnect()},[]),a.useEffect(()=>{let e=setTimeout(()=>{y.current?.querySelector(`.diagrams-iframe`)?.focus()},600);return()=>clearTimeout(e)},[]),a.useImperativeHandle(u,()=>({getXml:()=>d.current}));let b=a.useCallback(()=>{!e&&!p.current&&(p.current=!0,setTimeout(()=>{f.current?.template({})},500))},[e]),x=a.useCallback(e=>{d.current=e.xml,l?.(e.xml)},[l]);return(0,o.jsx)(`div`,{ref:y,className:r(`h-full w-full`,n),children:(0,o.jsx)(i,{ref:f,xml:g.current||s,autosave:!0,urlParameters:{ui:t?`simple`:m?`dark`:`kennedy`,spin:!0,libraries:!t,chrome:t,nav:t,layers:t,noSaveBtn:!0,noExitBtn:!0,saveAndExit:!1},onLoad:b,onAutoSave:x},m?`dark`:`light`)})});export{l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,Q as n,X as r,Z as i,et as a,nt as o,ot as s,rt as c,st as l,tt as u}from"./vendor-base-ui-wXsskyKm.js";import{n as d}from"./vendor-react-BkccXcWz.js";import{io as f}from"./ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,Q as n,X as r,Z as i,et as a,nt as o,ot as s,rt as c,st as l,tt as u}from"./vendor-base-ui-wXsskyKm.js";import{n as d}from"./vendor-react-BkccXcWz.js";import{io as f}from"./ui-Pjq_Ygzo.js";import{n as p}from"./Icon-Bj9hTMjF.js";import{t as m}from"./i18n-Sh2Qk9nD.js";var h=e(l(),1),g=d(),_=s(),v=0;function y(e,t){return e&&h.isValidElement(t)?{render:t}:{children:t}}function b(e){let t=(0,g.c)(4),r;t[0]===e?r=t[1]:({...r}=e,t[0]=e,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,_.jsx)(n,{...r}),t[2]=r,t[3]=i),i}function x(e){let t=(0,g.c)(10),n,i,a;t[0]===e?(n=t[1],i=t[2],a=t[3]):({asChild:n,children:i,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a);let o;t[4]!==n||t[5]!==i?(o=y(n,i),t[4]=n,t[5]=i,t[6]=o):o=t[6];let s=o,c;return t[7]!==a||t[8]!==s?(c=(0,_.jsx)(r,{"data-slot":`dialog-trigger`,...a,...s}),t[7]=a,t[8]=s,t[9]=c):c=t[9],c}function S(e){let n=(0,g.c)(4),r;n[0]===e?r=n[1]:({...r}=e,n[0]=e,n[1]=r);let i;return n[2]===r?i=n[3]:(i=(0,_.jsx)(t,{...r}),n[2]=r,n[3]=i),i}var C=h.forwardRef((e,t)=>{let n=(0,g.c)(10),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[3]=a):a=n[3],h.useEffect(A,a);let o=t,s;n[4]===r?s=n[5]:(s=f(`app-region-no-drag fixed inset-0 z-50 bg-black/50 dark:bg-black/75`,`transition-opacity duration-150 ease-out`,`data-[starting-style]:opacity-0 data-[ending-style]:opacity-0`,r),n[4]=r,n[5]=s);let l;return n[6]!==i||n[7]!==o||n[8]!==s?(l=(0,_.jsx)(c,{ref:o,"data-slot":`dialog-overlay`,className:s,...i}),n[6]=i,n[7]=o,n[8]=s,n[9]=l):l=n[9],l});C.displayName=`DialogOverlay`;function w(e){let t=(0,g.c)(33),n,r,i,s,c,l,u;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6],u=t[7]):({className:r,overlayClassName:s,containerClassName:i,children:n,showCloseButton:l,presentation:u,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=u);let d=u===void 0?`default`:u,{t:h}=m(),v=l??d!==`picker`,y=d===`picker`&&`yuri-picker-backdrop`,b;t[8]!==s||t[9]!==y?(b=f(`rounded-none`,y,s),t[8]=s,t[9]=y,t[10]=b):b=t[10];let x;t[11]===b?x=t[12]:(x=(0,_.jsx)(C,{className:b}),t[11]=b,t[12]=x);let w=i??(d===`picker`?`block p-0`:`items-center p-4`),T;t[13]===w?T=t[14]:(T=f(`fixed inset-0 z-50 flex justify-center pointer-events-none`,w),t[13]=w,t[14]=T);let E=d===`picker`&&`yuri-picker-dialog yuri-mobile-overlay-surface yuri-mobile-overlay-surface--translucent yuri-composer-autocomplete-surface fixed left-1/2 top-[10vh] w-[min(42rem,calc(100vw-3rem))] max-w-none -translate-x-1/2 translate-y-0 gap-0 overflow-hidden rounded-3xl border-0 p-0`,D;t[15]!==r||t[16]!==E?(D=f(`app-region-no-drag relative pointer-events-auto bg-background text-foreground flex flex-col w-full max-w-lg max-h-full gap-4 rounded-xl border p-6 shadow-none overflow-y-auto pwa-dialog-content origin-center`,`transition-all duration-150 ease-out`,`data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.98]`,`data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]`,`data-[nested-dialog-open]:brightness-[0.55] dark:data-[nested-dialog-open]:brightness-[0.4]`,E,r),t[15]=r,t[16]=E,t[17]=D):D=t[17];let O;t[18]!==v||t[19]!==h?(O=v&&(0,_.jsxs)(o,{"data-slot":`dialog-close`,className:`ring-offset-background focus:ring-ring data-[open]:bg-interactive-active data-[open]:text-foreground absolute top-2 right-2 rounded-lg opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none text-muted-foreground hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,_.jsx)(p,{name:`close`}),(0,_.jsx)(`span`,{className:`sr-only`,children:h(`dialog.common.actions.close`)})]}),t[18]=v,t[19]=h,t[20]=O):O=t[20];let k;t[21]!==n||t[22]!==d||t[23]!==c||t[24]!==D||t[25]!==O?(k=(0,_.jsxs)(a,{"data-slot":`dialog-content`,"data-state-slot":`dialog`,"data-presentation":d,className:D,...c,children:[n,O]}),t[21]=n,t[22]=d,t[23]=c,t[24]=D,t[25]=O,t[26]=k):k=t[26];let A;t[27]!==k||t[28]!==T?(A=(0,_.jsx)(`div`,{className:T,children:k}),t[27]=k,t[28]=T,t[29]=A):A=t[29];let j;return t[30]!==A||t[31]!==x?(j=(0,_.jsxs)(S,{children:[x,A]}),t[30]=A,t[31]=x,t[32]=j):j=t[32],j}function T(e){let t=(0,g.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=f(`flex flex-col gap-2 text-center sm:text-left`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,_.jsx)(`div`,{"data-slot":`dialog-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function E(e){let t=(0,g.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=f(`flex flex-col-reverse gap-2 bottom-safe-area sm:flex-row sm:justify-end`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,_.jsx)(`div`,{"data-slot":`dialog-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function D(e){let t=(0,g.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=f(`typography-markdown leading-none font-semibold text-foreground`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,_.jsx)(i,{"data-slot":`dialog-title`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function O(e){let t=(0,g.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=f(`text-muted-foreground typography-ui-label`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,_.jsx)(u,{"data-slot":`dialog-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function k(){v=Math.max(0,v-1),v===0&&document.documentElement.classList.remove(`yuri-dialog-open`)}function A(){return v+=1,document.documentElement.classList.add(`yuri-dialog-open`),k}export{T as a,E as i,w as n,D as o,O as r,x as s,b as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{B as t,F as n,H as r,I as i,L as a,M as o,N as s,R as c,V as l,ot as u,st as d,z as f}from"./vendor-base-ui-wXsskyKm.js";import{n as p}from"./vendor-react-BkccXcWz.js";import{io as m}from"./ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{B as t,F as n,H as r,I as i,L as a,M as o,N as s,R as c,V as l,ot as u,st as d,z as f}from"./vendor-base-ui-wXsskyKm.js";import{n as p}from"./vendor-react-BkccXcWz.js";import{io as m}from"./ui-Pjq_Ygzo.js";import{n as h}from"./Icon-Bj9hTMjF.js";import{n as g,r as _,t as v}from"./dropdown-menu.styles-BDla58Rm.js";var y=p(),b=e(d(),1),x=u(),S=b.createContext(null),C=e=>e?e.closest(`[data-slot="dialog-content"], [role="dialog"]`):null;function w(e,t){return e&&b.isValidElement(t)?{render:t}:{children:t}}function T(e){let t=(0,y.c)(9),r;t[0]===e?r=t[1]:({...r}=e,t[0]=e,t[1]=r);let[i,a]=b.useState(null),o;t[2]===i?o=t[3]:(o={portalContainer:i,setPortalContainer:a},t[2]=i,t[3]=o);let s=o,c;t[4]===r?c=t[5]:(c=(0,x.jsx)(n,{...r}),t[4]=r,t[5]=c);let l;return t[6]!==s||t[7]!==c?(l=(0,x.jsx)(S.Provider,{value:s,children:c}),t[6]=s,t[7]=c,t[8]=l):l=t[8],l}function E(e){let t=(0,y.c)(22),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({asChild:n,children:r,onPointerDownCapture:a,onFocusCapture:i,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let c=b.useContext(S),l;t[6]===c?l=t[7]:(l=e=>{if(!c)return;let t=e instanceof HTMLElement?e:null;c.setPortalContainer(C(t))},t[6]=c,t[7]=l);let u=l,d;t[8]!==n||t[9]!==r?(d=w(n,r),t[8]=n,t[9]=r,t[10]=d):d=t[10];let f=d,p;t[11]!==a||t[12]!==u?(p=e=>{u(e.currentTarget),a?.(e)},t[11]=a,t[12]=u,t[13]=p):p=t[13];let m;t[14]!==i||t[15]!==u?(m=e=>{u(e.currentTarget),i?.(e)},t[14]=i,t[15]=u,t[16]=m):m=t[16];let h;return t[17]!==o||t[18]!==f||t[19]!==p||t[20]!==m?(h=(0,x.jsx)(s,{"data-slot":`dropdown-menu-trigger`,onPointerDownCapture:p,onFocusCapture:m,...o,...f}),t[17]=o,t[18]=f,t[19]=p,t[20]=m,t[21]=h):h=t[21],h}function D(e){let n=(0,y.c)(40),r,i,a,o,s,c,u,d,p,h,_,v,C;if(n[0]!==e){let{className:t,sideOffset:l,align:f,side:m,alignOffset:g,anchor:y,portalToBody:b,positionerClassName:x,style:S,children:w,onCloseAutoFocus:T,collisionPadding:E,collisionAvoidance:D,...O}=e;s=t,h=l,r=f,d=m,i=g,a=y,_=b,c=x,p=S,o=w,v=E,C=D,u=O,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=u,n[8]=d,n[9]=p,n[10]=h,n[11]=_,n[12]=v,n[13]=C}else r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],u=n[7],d=n[8],p=n[9],h=n[10],_=n[11],v=n[12],C=n[13];let w=h===void 0?4:h,T=_!==void 0&&_,E=v===void 0?8:v,D;n[14]===C?D=n[15]:(D=C===void 0?{side:`shift`,align:`shift`}:C,n[14]=C,n[15]=D);let O=D,k=b.useContext(S),A=T?void 0:k?.portalContainer||void 0,j;n[16]===c?j=n[17]:(j=m(`app-region-no-drag z-50`,c),n[16]=c,n[17]=j);let M;n[18]===p?M=n[19]:(M={color:`var(--surface-elevated-foreground)`,...p},n[18]=p,n[19]=M);let N;n[20]===s?N=n[21]:(N=m(g,s),n[20]=s,n[21]=N);let P;n[22]!==o||n[23]!==u||n[24]!==M||n[25]!==N?(P=(0,x.jsx)(l,{"data-slot":`dropdown-menu-content`,style:M,className:N,...u,children:o}),n[22]=o,n[23]=u,n[24]=M,n[25]=N,n[26]=P):P=n[26];let F;n[27]!==r||n[28]!==i||n[29]!==a||n[30]!==O||n[31]!==E||n[32]!==d||n[33]!==w||n[34]!==P||n[35]!==j?(F=(0,x.jsx)(f,{anchor:a,sideOffset:w,align:r,side:d,alignOffset:i,collisionPadding:E,collisionAvoidance:O,className:j,children:P}),n[27]=r,n[28]=i,n[29]=a,n[30]=O,n[31]=E,n[32]=d,n[33]=w,n[34]=P,n[35]=j,n[36]=F):F=n[36];let I;return n[37]!==F||n[38]!==A?(I=(0,x.jsx)(t,{container:A,children:F}),n[37]=F,n[38]=A,n[39]=I):I=n[39],I}function O(e){let t=(0,y.c)(24),n,i,a,o,s,c,l,u;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8]):({className:a,inset:o,variant:u,asChild:n,children:i,onSelect:c,onClick:s,...l}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u);let d=u===void 0?`default`:u,f;t[9]!==n||t[10]!==i?(f=w(n,i),t[9]=n,t[10]=i,t[11]=f):f=t[11];let p=f,h;t[12]!==s||t[13]!==c?(h=e=>{s?.(e),e.defaultPrevented||c?.(e)},t[12]=s,t[13]=c,t[14]=h):h=t[14];let g=h,_;t[15]===a?_=t[16]:(_=m(v,a),t[15]=a,t[16]=_);let b;return t[17]!==g||t[18]!==o||t[19]!==l||t[20]!==p||t[21]!==_||t[22]!==d?(b=(0,x.jsx)(r,{"data-slot":`dropdown-menu-item`,"data-inset":o,"data-variant":d,className:_,...l,onClick:g,...p}),t[17]=g,t[18]=o,t[19]=l,t[20]=p,t[21]=_,t[22]=d,t[23]=b):b=t[23],b}function k(e){let t=(0,y.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,x.jsx)(c,{"data-slot":`dropdown-menu-radio-group`,...n}),t[2]=n,t[3]=r),r}function A(e){let t=(0,y.c)(11),n,r,o;t[0]===e?(n=t[1],r=t[2],o=t[3]):({className:r,children:n,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o);let s;t[4]===r?s=t[5]:(s=m(`data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover data-[checked]:bg-interactive-selection data-[checked]:text-interactive-selection-foreground relative flex cursor-pointer items-start gap-2 rounded-lg py-1 pl-2 pr-8 typography-ui-label outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,r),t[4]=r,t[5]=s);let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,x.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-3.5 items-center justify-center text-primary`,children:(0,x.jsx)(i,{children:(0,x.jsx)(h,{name:`check`,className:`size-3`})})}),t[6]=c):c=t[6];let l;return t[7]!==n||t[8]!==o||t[9]!==s?(l=(0,x.jsxs)(a,{"data-slot":`dropdown-menu-radio-item`,className:s,...o,children:[c,n]}),t[7]=n,t[8]=o,t[9]=s,t[10]=l):l=t[10],l}function j(e){let t=(0,y.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=m(`px-2 py-1 typography-ui-label font-medium data-[inset]:pl-8`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,x.jsx)(`div`,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function M(e){let t=(0,y.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=m(_,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,x.jsx)(o,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{k as a,E as c,j as i,D as n,A as o,O as r,M as s,T as t};
|
package/dist/assets/{fileMentionTouchSelection-CwTAmgan.js → fileMentionTouchSelection-DWX5kpzC.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,ot as n,st as r}from"./vendor-base-ui-wXsskyKm.js";import{u as i}from"./prompt-attachment-upload-BzYqZdzd.js";import{n as a}from"./vendor-react-BkccXcWz.js";import{io as o}from"./ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,ot as n,st as r}from"./vendor-base-ui-wXsskyKm.js";import{u as i}from"./prompt-attachment-upload-BzYqZdzd.js";import{n as a}from"./vendor-react-BkccXcWz.js";import{io as o}from"./ui-Pjq_Ygzo.js";import{r as s,t as c}from"./Icon-Bj9hTMjF.js";import{t as l}from"./vendor-fuzzysort-ukaRp9PC.js";import{d as u,i as d,u as f}from"./fileMentionAutocompleteState-B9411b4o.js";var p=e=>{switch(e.name){case`new`:return`add`;case`init`:return`file`;case`undo`:return`arrow-go-back`;case`redo`:return`arrow-go-forward`;case`timeline`:return`time`;case`compact`:return`scissors`;case`reload`:return`refresh`;case`goal`:return`target`;case`review`:return`search-eye`;case`test`:case`build`:case`run`:return`terminal-box`;default:return e.isBuiltIn?`flashlight`:`command`}},m=()=>`book-open`,h=e=>{if(e.isDirectory)return`folder-3-fill`;switch(e.extension?.toLowerCase()){case`ts`:case`tsx`:case`js`:case`jsx`:case`json`:return`code`;case`md`:case`mdx`:return`file`;case`png`:case`jpg`:case`jpeg`:case`gif`:case`svg`:return`file-image`;default:return`file-pdf`}},g=()=>`ai-agent`,_=()=>`chat-thread`,v=32,y=(e,t)=>{let n=s[e];return typeof n!=`string`||n.length===0?null:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="${t}" stroke-width="${c}" stroke-linecap="round" stroke-linejoin="round">${n}</svg>`},b=(e,t)=>{let n=y(e,t);return!n||typeof document>`u`?Promise.resolve(null):new Promise(e=>{let t=new Image;t.decoding=`async`,t.onload=()=>{try{let n=document.createElement(`canvas`);n.width=v,n.height=v;let r=n.getContext(`2d`);if(!r){e(null);return}r.clearRect(0,0,v,v),r.drawImage(t,0,0,v,v);let i=n.toDataURL(`image/png`),a=i.indexOf(`,`);e(a>=0?i.slice(a+1):null)}catch{e(null)}},t.onerror=()=>e(null),t.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`})},x=e(l(),1),S=(e,t)=>e.map(e=>{let n=e.isSkill?t.skill:e.isYuri?`Yuri`:e.isBuiltIn?t.system:e.scope||e.agent||t.command;return{id:e.id,title:`/${e.name}`,subtitle:e.description,badge:n,iconName:p(e)}}),C=({skills:e=[],agents:t,sessions:n,recentFiles:r,pathHits:i,untitledSession:a,sessionBadge:o,skillBadge:s,searchQuery:c=``})=>{let l=[];for(let t of e)l.push({id:`skill:${t.name}-${t.scope}`,title:`@${t.name}`,subtitle:t.description,badge:s??t.scope,iconName:m()});for(let e of t)l.push({id:`agent:${e.name}`,title:`@${e.name}`,subtitle:e.description,iconName:g(),agentName:e.name});for(let e of n)l.push({id:`session:${e.id}`,title:e.title||a,trailingLabel:e.directory?.split(/[\\/]/).filter(Boolean).pop(),badge:o,iconName:_()});let d=c.trim(),p=new Map(l.map((e,t)=>[e.id,t])),v=(e,t)=>x.default.go(d,e,{keys:[`title`,e=>e.id.startsWith(`skill:`)?e.subtitle??``:``,e=>e.id.startsWith(`session:`)?e.id.slice(8):``],threshold:.5,limit:t,scoreFn:e=>{let t=e[0];return Math.max(f(d,e.obj.title,t?.score??0),e[1]?.score??0,e.obj.id.startsWith(`session:`)?u(d,e.obj.id.slice(8)):0)}}),y=d?[...v(l.filter(e=>!e.id.startsWith(`session:`)),10),...v(l.filter(e=>e.id.startsWith(`session:`)),1/0)].sort((e,t)=>t.score-e.score||(p.get(e.obj.id)??0)-(p.get(t.obj.id)??0)).map(e=>e.obj):l.slice();l.length=0;for(let e of r)l.push({id:`recent:${e.path}`,title:e.relativePath||e.name,iconName:h(e)});for(let e of i)l.push({id:`file:${e.path}`,title:e.relativePath||e.name,iconName:h(e)});if(!d)return[...y.filter(e=>!e.id.startsWith(`session:`)),...l,...y.filter(e=>e.id.startsWith(`session:`))];let b=0;return[...y,...l].filter(e=>e.id.startsWith(`session:`)||b++<10)},w=(e,t)=>{if(!e.includes(`/`)||t.size===0)return[];let n=RegExp(`(^|\\s)/(${i})?([A-Za-z0-9][A-Za-z0-9_-]*)(?=$|\\s)`,`g`),r=[],a;for(;(a=n.exec(e))!==null;){let e=a[3]??``;if(!t.has(e.toLowerCase()))continue;let n=a[2]??``,i=a.index+(a[1]?.length??0);r.push({start:i,end:i+1+n.length+e.length,name:e,hasSlot:n.length>0})}return r},T=(e,t,n=e.length)=>{let r=w(e,t).filter(e=>!e.hasSlot);if(r.length===0)return null;let a=e,o=n;for(let e=r.length-1;e>=0;--e){let t=r[e].start+1;a=`${a.slice(0,t)}${i}${a.slice(t)}`,o>t&&(o+=i.length)}return a===e?null:{text:a,caret:o}},E=e=>e.startsWith(i)?e.slice(i.length):e,D=e=>{if(e.inputMode===`shell`)return null;let t=e.text,n=Math.max(0,Math.min(e.cursor,t.length));if(t.startsWith(`/`)){let e=t.indexOf(` `),r=t.indexOf(`
|
|
2
2
|
`),i=Math.min(e===-1?t.length:e,r===-1?t.length:r);if(n<=i&&e===-1)return{kind:`slash-command`,query:E(t.substring(1,i)),tokenStart:0,tokenEnd:i}}let r=t.substring(0,n),i=d({value:t,cursorPosition:n,inputSource:e.mentionInputSource??`manual`,insertedText:e.insertedText});return i===null?null:{kind:`mention`,query:i,tokenStart:r.lastIndexOf(`@`),tokenEnd:n}},O=e=>e===`mention`?`@`:`/`,k=(e,t,n)=>{if(n&&n.tokenStart>=0&&n.tokenEnd>=n.tokenStart&&n.tokenEnd<=e.length&&e.startsWith(O(n.kind),n.tokenStart))return{start:n.tokenStart,end:n.tokenEnd};let r=D({text:e,cursor:t});return r?{start:r.tokenStart,end:r.tokenEnd}:null},A=e(r(),1),j=a(),M=e(t(),1),N=`absolute z-[100] min-w-0 w-full bottom-full mb-2 left-0 flex flex-col rounded-xl`,P=`pointer-events-auto absolute z-[100] min-w-0 flex flex-col rounded-xl`;function F(e,t){return o(e?P:N,`yuri-mobile-overlay-surface yuri-mobile-overlay-surface--translucent yuri-composer-autocomplete-surface`,t)}function I(e,t){return e?`yuri-composer-autocomplete-row`:o(`mx-1.5 hover:bg-[color-mix(in_srgb,var(--interactive-selection)_40%,transparent)]`,t&&`bg-[color-mix(in_srgb,var(--interactive-selection)_40%,transparent)]`)}var L=.4,R=e=>{let t=e.gap??8,n=Math.min(e.composerTop-t,e.visibleBottom-t);return{left:e.composerLeft,width:e.composerWidth,bottom:Math.max(0,e.fixedContainingBottom-n),maxHeight:z({popupBottom:n,boundaryTop:e.boundaryTop,viewportHeight:e.viewportHeight,gap:t})}},z=e=>{let t=e.gap??8,n=Math.max(0,e.popupBottom-e.boundaryTop-t),r=e.viewportHeight*L,i=Math.floor(Math.min(n,r));return n>=120?Math.min(n,Math.max(120,i)):i},B=(e,t=0)=>{let n=e.closest(`main`);if(!n)return null;let r=(e.closest(`.mobile-chat-screen__content`)?.parentElement??n.parentElement?.closest(`main`)??n).querySelector(`:scope > .yuri-mobile-detail-navigation`)?.getBoundingClientRect().bottom,i=n.getBoundingClientRect().top;return Math.max(r===void 0?i:Math.max(r,i),t)},V=(e,t)=>{let n=(0,j.c)(5),[r,i]=A.useState(void 0),a;n[0]!==t||n[1]!==e?(a=()=>{if(!t){i(void 0);return}let n=0,r=0,a=()=>{let t=e.current?.parentElement;if(!t)return;let n=t.getBoundingClientRect(),r=window.visualViewport,a=r?.offsetTop??0,o=r?.height??window.innerHeight,s=window.innerHeight,c=a+o,l=B(t,a)??a,u=R({composerTop:n.top,composerLeft:n.left,composerWidth:n.width,fixedContainingBottom:s,visibleBottom:c,boundaryTop:l,viewportHeight:o});i(e=>e&&e.left===u.left&&e.width===u.width&&e.bottom===u.bottom&&e.maxHeight===u.maxHeight?e:u)},o=()=>{a(),n&&window.cancelAnimationFrame(n),r&&window.clearTimeout(r),n=window.requestAnimationFrame(()=>{a(),r=window.setTimeout(a,220)})};return a(),window.addEventListener(`resize`,a),window.addEventListener(`yuri:keyboard-settled`,o),window.addEventListener(`yuri:keyboard-anim`,o),window.visualViewport?.addEventListener(`resize`,a),window.visualViewport?.addEventListener(`scroll`,a),()=>{n&&window.cancelAnimationFrame(n),r&&window.clearTimeout(r),window.removeEventListener(`resize`,a),window.removeEventListener(`yuri:keyboard-settled`,o),window.removeEventListener(`yuri:keyboard-anim`,o),window.visualViewport?.removeEventListener(`resize`,a),window.visualViewport?.removeEventListener(`scroll`,a)}},n[0]=t,n[1]=e,n[2]=a):a=n[2];let o;return n[3]===t?o=n[4]:(o=[t],n[3]=t,n[4]=o),A.useLayoutEffect(a,o),t?r:void 0},H=n(),U=A.forwardRef((e,t)=>{let n=(0,j.c)(24),{isMobile:r,className:i,style:a,children:o}=e,s=A.useRef(null),c=V(s,r),l=typeof document<`u`?document.body:null;if(!r){let e;n[0]===i?e=n[1]:(e=F(!1,i),n[0]=i,n[1]=e);let r;return n[2]!==o||n[3]!==t||n[4]!==a||n[5]!==e?(r=(0,H.jsx)(`div`,{ref:t,className:e,style:a,children:o}),n[2]=o,n[3]=t,n[4]=a,n[5]=e,n[6]=r):r=n[6],r}let u;n[7]===i?u=n[8]:(u=F(!0,i),n[7]=i,n[8]=u);let d;n[9]===c?d=n[10]:(d=c?{left:c.left,width:c.width,bottom:c.bottom,maxHeight:c.maxHeight,overflow:`hidden`}:{visibility:`hidden`},n[9]=c,n[10]=d);let f;n[11]!==a||n[12]!==d?(f={...a,...d},n[11]=a,n[12]=d,n[13]=f):f=n[13];let p;n[14]!==o||n[15]!==t||n[16]!==u||n[17]!==f?(p=(0,H.jsx)(`div`,{className:`pointer-events-none fixed inset-0 z-[100]`,children:(0,H.jsx)(`div`,{ref:t,className:u,style:f,children:o})}),n[14]=o,n[15]=t,n[16]=u,n[17]=f,n[18]=p):p=n[18];let m=p,h;n[19]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,H.jsx)(`span`,{ref:s,className:`hidden`,"aria-hidden":!0}),n[19]=h):h=n[19];let g;n[20]===m?g=n[21]:(g=l?(0,M.createPortal)(m,l):m,n[20]=m,n[21]=g);let _;return n[22]===g?_=n[23]:(_=(0,H.jsxs)(H.Fragment,{children:[h,g]}),n[22]=g,n[23]=_),_});U.displayName=`ComposerAutocompleteLayer`;var W=()=>{let e=null,t=!1,n=!1;return{pointerDown:(n,r)=>{e={x:n,y:r},t=!1},pointerMove:(n,r)=>{e&&Math.hypot(n-e.x,r-e.y)>6&&(t=!0)},pointerCancel:()=>{e=null,t=!1},pointerUp:r=>{if(!e)return!1;let i=!t;return e=null,t=!1,i?(n=!0,r(),!0):(n=!0,!1)},click:e=>n?(n=!1,!1):(e(),!0)}};export{D as a,C as c,p as d,k as i,S as l,U as n,T as o,I as r,E as s,W as t,b as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,n}from"./runtime-switch-DEPKHgdL.js";import{n as r}from"./runtime-fetch-V-iMWR8t.js";import{t as i}from"./runtimeAPIRegistry-C2VogTny.js";import{$ as a,A as o,B as s,D as c,E as l,F as u,G as d,H as f,I as p,J as m,K as ee,L as te,M as ne,N as re,O as ie,P as ae,Q as oe,R as se,S as ce,T as le,U as ue,V as de,W as h,X as fe,Y as pe,Z as me,_ as he,_t as ge,a as _e,at as ve,b as ye,bt as be,c as xe,ct as Se,d as Ce,dt as we,et as Te,f as Ee,ft as De,g as Oe,gt as ke,h as Ae,ht as je,i as Me,it as Ne,j as g,k as Pe,l as Fe,lt as Ie,m as Le,mt as Re,n as ze,nt as Be,o as Ve,ot as He,p as Ue,pt as We,q as Ge,r as Ke,rt as qe,s as Je,st as Ye,t as Xe,tt as Ze,u as Qe,ut as $e,v as et,vt as tt,x as nt,y as rt,yt as it,z as at}from"./gitApiHttp-ZjM4HkSo.js";import{n as ot}from"./client-CmtAKi5B.js";import{Zi as _,f as v,l as st}from"./ui-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,n}from"./runtime-switch-DEPKHgdL.js";import{n as r}from"./runtime-fetch-V-iMWR8t.js";import{t as i}from"./runtimeAPIRegistry-C2VogTny.js";import{$ as a,A as o,B as s,D as c,E as l,F as u,G as d,H as f,I as p,J as m,K as ee,L as te,M as ne,N as re,O as ie,P as ae,Q as oe,R as se,S as ce,T as le,U as ue,V as de,W as h,X as fe,Y as pe,Z as me,_ as he,_t as ge,a as _e,at as ve,b as ye,bt as be,c as xe,ct as Se,d as Ce,dt as we,et as Te,f as Ee,ft as De,g as Oe,gt as ke,h as Ae,ht as je,i as Me,it as Ne,j as g,k as Pe,l as Fe,lt as Ie,m as Le,mt as Re,n as ze,nt as Be,o as Ve,ot as He,p as Ue,pt as We,q as Ge,r as Ke,rt as qe,s as Je,st as Ye,t as Xe,tt as Ze,u as Qe,ut as $e,v as et,vt as tt,x as nt,y as rt,yt as it,z as at}from"./gitApiHttp-ZjM4HkSo.js";import{n as ot}from"./client-CmtAKi5B.js";import{Zi as _,f as v,l as st}from"./ui-Pjq_Ygzo.js";var y=`/api/magic-prompts`,ct=new Map([{id:`git.commit.generate.visible`,title:`Commit Generation Visible Prompt`,group:`Git`,description:`Visible user message for commit message generation.`,template:`You are generating a Conventional Commits subject line from the diffs of the selected files.`},{id:`git.commit.generate.instructions`,title:`Commit Generation Instructions`,group:`Git`,description:`Hidden instructions for commit message generation.`,placeholders:[{key:`selected_files`,description:`Bullet list of currently selected file paths.`}],template:`Return exactly one JSON object and nothing else. Do not include prose, markdown, explanations, or code fences.
|
|
2
2
|
|
|
3
3
|
The JSON object must have exactly this shape:
|
|
4
4
|
{"subject": string, "highlights": string[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./Icon-
|
|
1
|
+
import{r as e}from"./Icon-Bj9hTMjF.js";var t=(e,t)=>{if(!t||t.length<2)return e;let n=t.map(e=>e.name).filter(Boolean).sort((e,t)=>t.length-e.length);return e.map(([e,t])=>{let r=n.find(t=>e.startsWith(`${t} · `));return r?[e,{...t,accountName:r}]:[e,t]})},n=(e,t)=>{let n=e[t]?.accountName;return!n||t>0&&e[t-1].accountName===n?null:new Set(e.map(e=>e.accountName).filter(Boolean)).size>1?n:null},r=(e,t)=>n(e.map(([,e])=>e),t),i={globe:`global`,server:`server`,"circle-check":`checkbox-circle`,"circle-x":`close-circle`,"window-analytics":`bar-chart-box`};function a(t){return t?Object.hasOwn(i,t)?i[t]:Object.hasOwn(e,t)?t:void 0:void 0}export{t as i,r as n,n as r,a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-hePW80VL.js";import{ot as e,st as t}from"./vendor-base-ui-wXsskyKm.js";import{n}from"./vendor-react-BkccXcWz.js";import{io as r}from"./ui-
|
|
1
|
+
import"./rolldown-runtime-hePW80VL.js";import{ot as e,st as t}from"./vendor-base-ui-wXsskyKm.js";import{n}from"./vendor-react-BkccXcWz.js";import{io as r}from"./ui-Pjq_Ygzo.js";var i=n();t();var a=e();function o(e){let t=(0,i.c)(23),n,o,s,c,l,u;t[0]===e?(n=t[1],o=t[2],s=t[3],c=t[4],l=t[5],u=t[6]):({className:o,type:u,bordered:n,placeholder:c,endAdornment:s,...l}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=s,t[4]=c,t[5]=l,t[6]=u);let d=c||` `,f=n!==void 0&&`border border-transparent ring-0 focus:ring-0 aria-invalid:ring-1 aria-invalid:focus:ring-1`,p=n&&`border-[var(--form-surface-border)]`,m=s&&`pe-11`,h;t[7]!==o||t[8]!==f||t[9]!==p||t[10]!==m?(h=r(`text-foreground file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground bg-[var(--surface-elevated)] appearance-none flex h-9 w-full min-w-0 rounded-lg px-3 py-1 typography-markdown outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:typography-ui-label file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:typography-ui-label`,`ring-1 ring-inset ring-border/60 transition duration-200 ease-out`,`hover:[&:not(:focus)]:bg-[var(--surface-subtle)] hover:[&:not(:focus)]:ring-transparent`,`focus:ring-2 focus:ring-[var(--interactive-focus-ring)] focus-visible:outline-none`,`aria-invalid:ring-[var(--status-error)] aria-invalid:focus:ring-[var(--status-error)]`,f,p,o,m),t[7]=o,t[8]=f,t[9]=p,t[10]=m,t[11]=h):h=t[11];let g;t[12]!==n||t[13]!==l||t[14]!==d||t[15]!==h||t[16]!==u?(g=(0,a.jsx)(`input`,{type:u,"data-slot":`input`,"data-bordered":n,placeholder:d,className:h,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,...l}),t[12]=n,t[13]=l,t[14]=d,t[15]=h,t[16]=u,t[17]=g):g=t[17];let _=g;if(!s)return _;let v;t[18]===s?v=t[19]:(v=(0,a.jsx)(`div`,{"data-slot":`input-end-adornment`,className:`absolute inset-y-0 end-0 flex items-center`,children:s}),t[18]=s,t[19]=v);let y;return t[20]!==_||t[21]!==v?(y=(0,a.jsxs)(`div`,{"data-slot":`input-wrapper`,className:`relative min-w-0 w-full flex-1`,children:[_,v]}),t[20]=_,t[21]=v,t[22]=y):y=t[22],y}export{o as t};
|
|
@@ -1 +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-ZjM4HkSo.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-BGZ4tGr5.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 C,s as w}from"./spacedFileMention-Ds4GtgiF.js";import{Ca as T,Ha as E,Ia as D,Ii as O,R as k,Va as ee,Zi as A,_ as j,b as M,do as te,dt as N,f as P,fa as ne,io as F,ki as I,xt as L}from"./ui-BqoDhEiW.js";import{n as R}from"./Icon-CUOVBCQn.js";import{s as re}from"./remoteProjectQueries-BQzoY_Y9.js";import{t as ie}from"./i18n-Sh2Qk9nD.js";import{t as ae}from"./ScrollableOverlay-B5Mx_IrY.js";import{t as oe}from"./useDebouncedValue-BHlMPqY8.js";import{t as se}from"./AgentAvatar-4HfTeQK1.js";import{c as ce,d as le,l as ue,n as de,r as fe,t as pe}from"./fileMentionTouchSelection-CwTAmgan.js";import{a as me,o as he,s as ge}from"./fileMentionAutocompleteState-B9411b4o.js";var _e=(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=w([...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)},ve=(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}),ye=(e,t)=>e.highlightedIndex===t.highlightedIndex&&ve(e.rows,t.rows),be=(e,t)=>ve(e,t)?e:t.slice(),xe=(e,t,n)=>{e&&(t.current&&ye(t.current,n)||(t.current=n,e(n)))},Se=(e,t)=>{t.current=null,e?.({rows:[],highlightedIndex:0})},z=e(c(),1),B=g(),Ce=e=>e.directories.flatMap(e=>e.sessions),V=(e,t)=>({...re(e,t.location.hostId),select:Ce}),we=async(e,t,n)=>{n.sdk();let r=await e.fetchQuery(V(t,n));return n.sdk(),Ce(r)},H=(e,t,n,r)=>{n.sdk();let i=e.getQueryData(V(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},U=(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`}})}}),W=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},G=e=>/^[A-Za-z]:\//.test(e)?e.toLowerCase():e,K=e=>e.startsWith(`yuri-remote-location:`)?t(e):W(e),q=(e,t)=>{let r=W(n(t,`local`).directory),i=W(e);if(!r||!i)return!1;let a=G(r),o=G(i);return o===a||o.startsWith(a.endsWith(`/`)?a:`${a}/`)},J=e=>{if(!e||typeof e!=`object`)return{};let t=e,n={};for(let[e,r]of Object.entries(t)){let t;try{t=K(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=>W(e)).filter(e=>q(e,t)))):[],o=Array.isArray(i.expandedPaths)?Array.from(new Set(i.expandedPaths.filter(e=>typeof e==`string`).map(e=>W(e)).filter(e=>q(e,t)))):[],s=typeof i.selectedPath==`string`?W(i.selectedPath):null,c=s&&q(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=K((t||``).trim()),a=W((n||``).trim());!i||!a||!r?.allowOutsideRoot&&!q(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=K((t||``).trim()),i=W((n||``).trim());!r||!i||e(e=>{let t=e.byRoot[r];if(!t)return e;let n=G(i),a=e=>G(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=K((t||``).trim()),i=W((n||``).trim());!r||!i||e(e=>{let t=e.byRoot[r];if(!t)return e;let n=G(i),a=n.endsWith(`/`)?n:`${n}/`,o=e=>{let t=G(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=K((t||``).trim()),i=W((n||``).trim());!r||!i||e(e=>{let t=e.byRoot[r];if(!t)return e;let n=G(i),a=n.endsWith(`/`)?n:`${n}/`,o=t.expandedPaths.filter(e=>{let t=G(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=K((t||``).trim()),a=n?W(n.trim()):null;!i||a&&!r?.allowOutsideRoot&&!q(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=K((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=K((t||``).trim()),i=W((n||``).trim());!r||!i||!q(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=K((t||``).trim()),i=W((n||``).trim());!r||!i||!q(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=K((t||``).trim());if(!r||!n||n.length===0)return;let i=n.map(e=>W((e||``).trim())).filter(e=>e&&q(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:J(t)}},merge:(e,t)=>({...t,byRoot:J(e&&typeof e==`object`?e.byRoot:void 0)}),partialize:e=>({byRoot:J(e.byRoot)})}),{name:`files-view-tabs-store`})),Q=()=>{let e=(0,B.c)(17),t=P(Te),n=L(),r;e[0]===t?r=e[1]:(r=e=>t?e.getAttachment(t):void 0,e[0]=t,e[1]=r);let i=M(r),a=P(Ee),o=P(De),s=E(Oe),c=E(ke),u=l(Ae);if(t){let r;e[2]===i?r=e[3]:(r=j(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=z.forwardRef((e,t)=>{let n=(0,B.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=z.forwardRef((e,t)=>{let n=(0,B.c)(22),r=Q()??``,i=P(ze),a=O(Be),o=!!e.onSessionSelect,s;n[0]===o?s=n[1]:(s={enabled:o},n[0]=o,n[1]=s);let c=k(s),l=E(Ve),u=E(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=A(Ue),_=d(We),v;n[8]!==a||n[9]!==c||n[10]!==e.onSessionSelect?(v=e.onSessionSelect?I(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=z.forwardRef((e,t)=>{let n=(0,B.c)(32),{entry:r,registry:i}=e,a=v(),o;n[0]===r?o=n[1]:(o=D(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=V(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(U(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 C=l.data??Ie,w=p.data??Fe,T=l.error??p.error,E;n[19]===r?E=n[20]:(E=()=>{r.sdk()},n[19]=r,n[20]=E);let O;return n[21]!==r.location.directory||n[22]!==h||n[23]!==e||n[24]!==t||n[25]!==y||n[26]!==C||n[27]!==w||n[28]!==T||n[29]!==E||n[30]!==S?(O=(0,$.jsx)(Re,{...e,ref:t,currentDirectory:b,projectRoot:S,projectTabs:h,agentCatalog:C,sessions:w,searchFiles:y,catalogError:T,assertCurrent:E}),n[21]=r.location.directory,n[22]=h,n[23]=e,n[24]=t,n[25]=y,n[26]=C,n[27]=w,n[28]=T,n[29]=E,n[30]=S,n[31]=O):O=n[31],O}),Re=z.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}=ie(),w=oe(e,180),E=f(),D=u(),[O,k]=z.useState([]),[ee,A]=z.useState(!1),[j,M]=z.useState(null),[N,P]=z.useState(0),I=z.useRef(0),L=z.useRef({query:e,directory:c,ids:[]}),[re,le]=z.useState(360),[ue,_e]=z.useState({}),[ve,ye]=z.useState({}),be=z.useRef([]),B=z.useRef([]),Ce=z.useRef([]),V=z.useRef(null),we=z.useRef(null),H=z.useRef(null);H.current||=pe();let U=S(e=>e.isMobile),W=(e??``).trim(),G=T({directory:c||null}),K=z.useMemo(()=>r?G.data??[]:[],[r,G.data]),q=z.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 ge(n,W,{limit:6})},[W,d,p]),J=z.useMemo(()=>n?ne(m).filter(e=>e.mode!==`primary`):[],[m,n]),Y=z.useMemo(()=>i?me({sessions:h,currentSessionId:l??null,searchQuery:W}):[],[h,l,W,i]),X=q,Z=O,Q=z.useMemo(()=>ce({skills:K,agents:J,sessions:Y,recentFiles:X,pathHits:Z,searchQuery:W,untitledSession:b(`chat.fileMentionAutocomplete.untitledSession`),sessionBadge:b(`chat.fileMentionAutocomplete.sessionType`),skillBadge:b(`chat.commandAutocomplete.badge.skill`)}),[K,J,Y,X,Z,W,b]);z.useEffect(()=>{let e=e=>{let t=e.target;!t||!V.current||V.current.contains(t)||a()};return document.addEventListener(`pointerdown`,e,!0),()=>{document.removeEventListener(`pointerdown`,e,!0)}},[a]),z.useEffect(()=>{if(!c){k([]),A(!1),M(null);return}let e=(w??``).trim(),t=C(e);if(!t){k([]),A(!1),M(null);return}let n=!1;A(!0),M(null);let r={includeHidden:E,respectGitignore:!D};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(q.map(e=>e.path));k(he({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,w,q,g,E,D]),z.useLayoutEffect(()=>{let t=L.current,n=t.ids[I.current],r=t.query===e&&t.directory===c?Math.max(0,Q.findIndex(e=>e.id===n)):0;L.current={query:e,directory:c,ids:Q.map(e=>e.id)},I.current=r,P(r)},[Q,e,c]),z.useEffect(()=>{_e({}),ye({})},[Q]),z.useEffect(()=>{be.current[N]?.scrollIntoView({block:`nearest`})},[N]),z.useEffect(()=>{let e=null,t=()=>{e!==null&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{let e={},t={};B.current.forEach((n,r)=>{if(!n)return;let i=Ce.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}}),_e(e),ye(t)})};return t(),window.addEventListener(`resize`,t),()=>{e!==null&&cancelAnimationFrame(e),window.removeEventListener(`resize`,t)}},[Q]),z.useEffect(()=>{let e=B.current[N];if(!e)return;let t=()=>{let t=e.clientWidth;t>0&&le(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`&&H.current?.pointerDown(e.clientX,e.clientY)},onPointerMove:e=>{e.pointerType===`touch`&&H.current?.pointerMove(e.clientX,e.clientY)},onPointerUp:e=>{e.pointerType===`touch`&&(H.current?.pointerUp(t)??!1)&&(e.preventDefault(),e.stopPropagation())},onPointerCancel:()=>H.current?.pointerCancel(),onClick:()=>{H.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=K.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)};z.useEffect(()=>{xe(s,we,{rows:Q,highlightedIndex:N})},[s,N,Q]);let je=z.useRef(s);return je.current=s,z.useEffect(()=>()=>{Se(je.current,we)},[]),z.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)(de,{ref:V,isMobile:U,className:`max-w-[640px] max-h-64`,style:o,children:[(0,$.jsx)(ae,{preventOverscroll:!0,outerClassName:`flex-1 min-h-0`,className:`px-0`,children:(0,$.jsxs)(`div`,{className:`py-1`,children:[_||G.error||j?(0,$.jsx)(`div`,{role:`alert`,className:`px-3 py-2 typography-ui-label text-muted-foreground`,children:(_??G.error??j)?.message}):null,Q.map((e,t)=>{let n=e.id.startsWith(`file:`)||e.id.startsWith(`recent:`),r=n?te(e.title,{maxLength:60}):e.title,i=N===t,a=ue[t]??!1,o=ve[t]??2.6;return(0,$.jsxs)(`div`,{"data-mention-id":e.id,ref:e=>{be.current[t]=e},className:F(`flex items-center gap-2 px-3 py-1.5 cursor-pointer typography-ui-label rounded-lg`,U&&`min-h-11`,fe(U,i),!U&&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)(R,{name:e.iconName,className:`size-3.5 text-current`}):(0,$.jsx)(se,{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=>{B.current[t]=e},className:F(`relative block min-w-0 overflow-hidden`,n&&a&&i&&`file-mention-marquee-container`),style:i?{"--file-mention-marquee-width":`${re}px`,"--file-mention-marquee-duration":`${o}s`}:void 0,title:e.title,children:[(0,$.jsx)(`span`,{ref:e=>{Ce.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,W)}):(0,$.jsx)(`span`,{className:`block truncate`,children:Me(r,W)})]}),e.trailingLabel?(0,$.jsx)(`span`,{className:F(`max-w-[40%] shrink-0 truncate text-muted-foreground`,U?`typography-micro`:`typography-meta`),children:e.trailingLabel}):null]}),e.subtitle?(0,$.jsx)(`div`,{className:F(`truncate text-muted-foreground`,U?`typography-micro`:`typography-meta`),children:Me(e.subtitle,W)}):null]})]},e.id)}),ee&&Z.length===0?(0,$.jsx)(`div`,{className:`flex items-center justify-center py-3`,children:(0,$.jsx)(R,{name:`refresh`,className:`h-4 w-4 animate-spin text-muted-foreground`})}):null,!ee&&Q.length===0&&(0,$.jsx)(`div`,{className:`px-3 py-2 typography-ui-label text-muted-foreground`,children:b(`chat.fileMentionAutocomplete.empty`)})]})}),!U&&(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=F(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=F(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=F(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=F(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=z.forwardRef(({searchQuery:e,onCommandSelect:t,onClose:n,directory:i,style:a,commandPolicy:o,commandContext:s,onRowsChange:c},l)=>{let{t:u}=ie(),d=S(e=>e.isMobile),f=P(e=>e.currentSessionId),p=P(e=>!!e.newSessionDraft?.open),m=P(z.useCallback(e=>f?e.getDirectoryForSession(f):void 0,[f])),h=N(f??``,m??void 0),g=z.useMemo(()=>s??{sessionID:f??null,hasMessages:h.length>0,hasNewDraft:p},[s,f,h.length,p]),{hasSession:_,canStartSessionCommand:v}=z.useMemo(()=>nt(g),[g]),y=g.hasMessages,[b,x]=z.useState([]),[C,w]=z.useState(!1),T=ee({directory:i}),E=z.useMemo(()=>T.data??[],[T.data]),D=T.isFetching,[O,k]=z.useState(0),A=z.useRef(0),j=z.useRef(!1),M=z.useRef([]),te=z.useRef(null),ne=z.useRef(!1),I=z.useRef(null),L=z.useRef(!1),re=z.useRef(null);z.useEffect(()=>{let e=e=>{let t=e.target;!t||!te.current||te.current.contains(t)||n()};return document.addEventListener(`pointerdown`,e,!0),()=>{document.removeEventListener(`pointerdown`,e,!0)}},[n]),z.useEffect(()=>{(async()=>{w(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=_e(n.filter(e=>(i||e.name!==`init`)&&(o?.(e)??!0)),e);x(e=>tt(e,a)?e:a)}catch{let t=!y,n=_e([{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{w(!1)}})()},[e,y,_,v,E,D,u,o]),z.useEffect(()=>{k(0)},[b]),z.useEffect(()=>{A.current=O},[O]),z.useEffect(()=>{M.current[O]?.scrollIntoView({block:`nearest`})},[O]),z.useEffect(()=>{xe(c,re,{rows:ue(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 oe=z.useRef(c);oe.current=c,z.useEffect(()=>()=>{Se(oe.current,re)},[]),z.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 se=e=>{let t=le(e);switch(e.name){case`new`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5`});case`init`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-green-500`});case`undo`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-orange-500`});case`redo`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-orange-500`});case`timeline`:case`reload`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5`});case`compact`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-purple-500`});case`goal`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5`});case`review`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-blue-500`});case`test`:case`build`:case`run`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-cyan-500`});default:return e.isBuiltIn?(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-yellow-500`}):(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-muted-foreground`})}};return(0,$.jsxs)(de,{ref:te,isMobile:d,className:`max-w-[450px] max-h-64`,style:a,children:[(0,$.jsx)(ae,{preventOverscroll:!0,outerClassName:`flex-1 min-h-0`,className:`px-0 py-1.5`,children:C?(0,$.jsx)(`div`,{className:`flex items-center justify-center py-4`,children:(0,$.jsx)(R,{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:F(`flex gap-2 px-2 py-2 cursor-pointer rounded-lg`,d?`items-center`:`items-start`,fe(d,r===O),!d&&r===O&&`bg-interactive-selection/35`),onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{e.pointerType===`touch`&&(I.current={x:e.clientX,y:e.clientY},L.current=!1)},onPointerMove:e=>{if(e.pointerType!==`touch`||!I.current)return;let t=e.clientX-I.current.x,n=e.clientY-I.current.y;Math.hypot(t,n)>6&&(L.current=!0)},onPointerUp:e=>{if(e.pointerType!==`touch`)return;let r=L.current;I.current=null,L.current=!1,!r&&(e.preventDefault(),e.stopPropagation(),ne.current=!0,t(n,Ke(n,d)))},onPointerCancel:()=>{I.current=null,L.current=!1},onClick:()=>{if(ne.current){ne.current=!1;return}t(n,Ke(n,d))},onMouseMove:()=>{j.current=!1,k(r)},children:[(0,$.jsx)(`div`,{className:F(!d&&`mt-0.5`),children:se(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,we as d,H as f,at as i,Q as l,st as n,Ye as o,be as p,ot as r,qe as s,ct as t,Z as u};
|
|
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-ZjM4HkSo.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-BGZ4tGr5.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 C,s as w}from"./spacedFileMention-Ds4GtgiF.js";import{Ca as T,Ha as E,Ia as D,Ii as O,R as k,Va as ee,Zi as A,_ as j,b as M,do as te,dt as N,f as P,fa as ne,io as F,ki as I,xt as L}from"./ui-Pjq_Ygzo.js";import{n as R}from"./Icon-Bj9hTMjF.js";import{s as re}from"./remoteProjectQueries-BQzoY_Y9.js";import{t as ie}from"./i18n-Sh2Qk9nD.js";import{t as ae}from"./ScrollableOverlay-B6nm-QHe.js";import{t as oe}from"./useDebouncedValue-BHlMPqY8.js";import{t as se}from"./AgentAvatar-CzUo20cq.js";import{c as ce,d as le,l as ue,n as de,r as fe,t as pe}from"./fileMentionTouchSelection-DWX5kpzC.js";import{a as me,o as he,s as ge}from"./fileMentionAutocompleteState-B9411b4o.js";var _e=(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=w([...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)},ve=(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}),ye=(e,t)=>e.highlightedIndex===t.highlightedIndex&&ve(e.rows,t.rows),be=(e,t)=>ve(e,t)?e:t.slice(),xe=(e,t,n)=>{e&&(t.current&&ye(t.current,n)||(t.current=n,e(n)))},Se=(e,t)=>{t.current=null,e?.({rows:[],highlightedIndex:0})},z=e(c(),1),B=g(),Ce=e=>e.directories.flatMap(e=>e.sessions),V=(e,t)=>({...re(e,t.location.hostId),select:Ce}),we=async(e,t,n)=>{n.sdk();let r=await e.fetchQuery(V(t,n));return n.sdk(),Ce(r)},H=(e,t,n,r)=>{n.sdk();let i=e.getQueryData(V(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},U=(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`}})}}),W=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},G=e=>/^[A-Za-z]:\//.test(e)?e.toLowerCase():e,K=e=>e.startsWith(`yuri-remote-location:`)?t(e):W(e),q=(e,t)=>{let r=W(n(t,`local`).directory),i=W(e);if(!r||!i)return!1;let a=G(r),o=G(i);return o===a||o.startsWith(a.endsWith(`/`)?a:`${a}/`)},J=e=>{if(!e||typeof e!=`object`)return{};let t=e,n={};for(let[e,r]of Object.entries(t)){let t;try{t=K(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=>W(e)).filter(e=>q(e,t)))):[],o=Array.isArray(i.expandedPaths)?Array.from(new Set(i.expandedPaths.filter(e=>typeof e==`string`).map(e=>W(e)).filter(e=>q(e,t)))):[],s=typeof i.selectedPath==`string`?W(i.selectedPath):null,c=s&&q(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=K((t||``).trim()),a=W((n||``).trim());!i||!a||!r?.allowOutsideRoot&&!q(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=K((t||``).trim()),i=W((n||``).trim());!r||!i||e(e=>{let t=e.byRoot[r];if(!t)return e;let n=G(i),a=e=>G(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=K((t||``).trim()),i=W((n||``).trim());!r||!i||e(e=>{let t=e.byRoot[r];if(!t)return e;let n=G(i),a=n.endsWith(`/`)?n:`${n}/`,o=e=>{let t=G(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=K((t||``).trim()),i=W((n||``).trim());!r||!i||e(e=>{let t=e.byRoot[r];if(!t)return e;let n=G(i),a=n.endsWith(`/`)?n:`${n}/`,o=t.expandedPaths.filter(e=>{let t=G(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=K((t||``).trim()),a=n?W(n.trim()):null;!i||a&&!r?.allowOutsideRoot&&!q(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=K((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=K((t||``).trim()),i=W((n||``).trim());!r||!i||!q(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=K((t||``).trim()),i=W((n||``).trim());!r||!i||!q(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=K((t||``).trim());if(!r||!n||n.length===0)return;let i=n.map(e=>W((e||``).trim())).filter(e=>e&&q(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:J(t)}},merge:(e,t)=>({...t,byRoot:J(e&&typeof e==`object`?e.byRoot:void 0)}),partialize:e=>({byRoot:J(e.byRoot)})}),{name:`files-view-tabs-store`})),Q=()=>{let e=(0,B.c)(17),t=P(Te),n=L(),r;e[0]===t?r=e[1]:(r=e=>t?e.getAttachment(t):void 0,e[0]=t,e[1]=r);let i=M(r),a=P(Ee),o=P(De),s=E(Oe),c=E(ke),u=l(Ae);if(t){let r;e[2]===i?r=e[3]:(r=j(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=z.forwardRef((e,t)=>{let n=(0,B.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=z.forwardRef((e,t)=>{let n=(0,B.c)(22),r=Q()??``,i=P(ze),a=O(Be),o=!!e.onSessionSelect,s;n[0]===o?s=n[1]:(s={enabled:o},n[0]=o,n[1]=s);let c=k(s),l=E(Ve),u=E(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=A(Ue),_=d(We),v;n[8]!==a||n[9]!==c||n[10]!==e.onSessionSelect?(v=e.onSessionSelect?I(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=z.forwardRef((e,t)=>{let n=(0,B.c)(32),{entry:r,registry:i}=e,a=v(),o;n[0]===r?o=n[1]:(o=D(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=V(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(U(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 C=l.data??Ie,w=p.data??Fe,T=l.error??p.error,E;n[19]===r?E=n[20]:(E=()=>{r.sdk()},n[19]=r,n[20]=E);let O;return n[21]!==r.location.directory||n[22]!==h||n[23]!==e||n[24]!==t||n[25]!==y||n[26]!==C||n[27]!==w||n[28]!==T||n[29]!==E||n[30]!==S?(O=(0,$.jsx)(Re,{...e,ref:t,currentDirectory:b,projectRoot:S,projectTabs:h,agentCatalog:C,sessions:w,searchFiles:y,catalogError:T,assertCurrent:E}),n[21]=r.location.directory,n[22]=h,n[23]=e,n[24]=t,n[25]=y,n[26]=C,n[27]=w,n[28]=T,n[29]=E,n[30]=S,n[31]=O):O=n[31],O}),Re=z.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}=ie(),w=oe(e,180),E=f(),D=u(),[O,k]=z.useState([]),[ee,A]=z.useState(!1),[j,M]=z.useState(null),[N,P]=z.useState(0),I=z.useRef(0),L=z.useRef({query:e,directory:c,ids:[]}),[re,le]=z.useState(360),[ue,_e]=z.useState({}),[ve,ye]=z.useState({}),be=z.useRef([]),B=z.useRef([]),Ce=z.useRef([]),V=z.useRef(null),we=z.useRef(null),H=z.useRef(null);H.current||=pe();let U=S(e=>e.isMobile),W=(e??``).trim(),G=T({directory:c||null}),K=z.useMemo(()=>r?G.data??[]:[],[r,G.data]),q=z.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 ge(n,W,{limit:6})},[W,d,p]),J=z.useMemo(()=>n?ne(m).filter(e=>e.mode!==`primary`):[],[m,n]),Y=z.useMemo(()=>i?me({sessions:h,currentSessionId:l??null,searchQuery:W}):[],[h,l,W,i]),X=q,Z=O,Q=z.useMemo(()=>ce({skills:K,agents:J,sessions:Y,recentFiles:X,pathHits:Z,searchQuery:W,untitledSession:b(`chat.fileMentionAutocomplete.untitledSession`),sessionBadge:b(`chat.fileMentionAutocomplete.sessionType`),skillBadge:b(`chat.commandAutocomplete.badge.skill`)}),[K,J,Y,X,Z,W,b]);z.useEffect(()=>{let e=e=>{let t=e.target;!t||!V.current||V.current.contains(t)||a()};return document.addEventListener(`pointerdown`,e,!0),()=>{document.removeEventListener(`pointerdown`,e,!0)}},[a]),z.useEffect(()=>{if(!c){k([]),A(!1),M(null);return}let e=(w??``).trim(),t=C(e);if(!t){k([]),A(!1),M(null);return}let n=!1;A(!0),M(null);let r={includeHidden:E,respectGitignore:!D};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(q.map(e=>e.path));k(he({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,w,q,g,E,D]),z.useLayoutEffect(()=>{let t=L.current,n=t.ids[I.current],r=t.query===e&&t.directory===c?Math.max(0,Q.findIndex(e=>e.id===n)):0;L.current={query:e,directory:c,ids:Q.map(e=>e.id)},I.current=r,P(r)},[Q,e,c]),z.useEffect(()=>{_e({}),ye({})},[Q]),z.useEffect(()=>{be.current[N]?.scrollIntoView({block:`nearest`})},[N]),z.useEffect(()=>{let e=null,t=()=>{e!==null&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{let e={},t={};B.current.forEach((n,r)=>{if(!n)return;let i=Ce.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}}),_e(e),ye(t)})};return t(),window.addEventListener(`resize`,t),()=>{e!==null&&cancelAnimationFrame(e),window.removeEventListener(`resize`,t)}},[Q]),z.useEffect(()=>{let e=B.current[N];if(!e)return;let t=()=>{let t=e.clientWidth;t>0&&le(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`&&H.current?.pointerDown(e.clientX,e.clientY)},onPointerMove:e=>{e.pointerType===`touch`&&H.current?.pointerMove(e.clientX,e.clientY)},onPointerUp:e=>{e.pointerType===`touch`&&(H.current?.pointerUp(t)??!1)&&(e.preventDefault(),e.stopPropagation())},onPointerCancel:()=>H.current?.pointerCancel(),onClick:()=>{H.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=K.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)};z.useEffect(()=>{xe(s,we,{rows:Q,highlightedIndex:N})},[s,N,Q]);let je=z.useRef(s);return je.current=s,z.useEffect(()=>()=>{Se(je.current,we)},[]),z.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)(de,{ref:V,isMobile:U,className:`max-w-[640px] max-h-64`,style:o,children:[(0,$.jsx)(ae,{preventOverscroll:!0,outerClassName:`flex-1 min-h-0`,className:`px-0`,children:(0,$.jsxs)(`div`,{className:`py-1`,children:[_||G.error||j?(0,$.jsx)(`div`,{role:`alert`,className:`px-3 py-2 typography-ui-label text-muted-foreground`,children:(_??G.error??j)?.message}):null,Q.map((e,t)=>{let n=e.id.startsWith(`file:`)||e.id.startsWith(`recent:`),r=n?te(e.title,{maxLength:60}):e.title,i=N===t,a=ue[t]??!1,o=ve[t]??2.6;return(0,$.jsxs)(`div`,{"data-mention-id":e.id,ref:e=>{be.current[t]=e},className:F(`flex items-center gap-2 px-3 py-1.5 cursor-pointer typography-ui-label rounded-lg`,U&&`min-h-11`,fe(U,i),!U&&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)(R,{name:e.iconName,className:`size-3.5 text-current`}):(0,$.jsx)(se,{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=>{B.current[t]=e},className:F(`relative block min-w-0 overflow-hidden`,n&&a&&i&&`file-mention-marquee-container`),style:i?{"--file-mention-marquee-width":`${re}px`,"--file-mention-marquee-duration":`${o}s`}:void 0,title:e.title,children:[(0,$.jsx)(`span`,{ref:e=>{Ce.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,W)}):(0,$.jsx)(`span`,{className:`block truncate`,children:Me(r,W)})]}),e.trailingLabel?(0,$.jsx)(`span`,{className:F(`max-w-[40%] shrink-0 truncate text-muted-foreground`,U?`typography-micro`:`typography-meta`),children:e.trailingLabel}):null]}),e.subtitle?(0,$.jsx)(`div`,{className:F(`truncate text-muted-foreground`,U?`typography-micro`:`typography-meta`),children:Me(e.subtitle,W)}):null]})]},e.id)}),ee&&Z.length===0?(0,$.jsx)(`div`,{className:`flex items-center justify-center py-3`,children:(0,$.jsx)(R,{name:`refresh`,className:`h-4 w-4 animate-spin text-muted-foreground`})}):null,!ee&&Q.length===0&&(0,$.jsx)(`div`,{className:`px-3 py-2 typography-ui-label text-muted-foreground`,children:b(`chat.fileMentionAutocomplete.empty`)})]})}),!U&&(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=F(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=F(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=F(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=F(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=z.forwardRef(({searchQuery:e,onCommandSelect:t,onClose:n,directory:i,style:a,commandPolicy:o,commandContext:s,onRowsChange:c},l)=>{let{t:u}=ie(),d=S(e=>e.isMobile),f=P(e=>e.currentSessionId),p=P(e=>!!e.newSessionDraft?.open),m=P(z.useCallback(e=>f?e.getDirectoryForSession(f):void 0,[f])),h=N(f??``,m??void 0),g=z.useMemo(()=>s??{sessionID:f??null,hasMessages:h.length>0,hasNewDraft:p},[s,f,h.length,p]),{hasSession:_,canStartSessionCommand:v}=z.useMemo(()=>nt(g),[g]),y=g.hasMessages,[b,x]=z.useState([]),[C,w]=z.useState(!1),T=ee({directory:i}),E=z.useMemo(()=>T.data??[],[T.data]),D=T.isFetching,[O,k]=z.useState(0),A=z.useRef(0),j=z.useRef(!1),M=z.useRef([]),te=z.useRef(null),ne=z.useRef(!1),I=z.useRef(null),L=z.useRef(!1),re=z.useRef(null);z.useEffect(()=>{let e=e=>{let t=e.target;!t||!te.current||te.current.contains(t)||n()};return document.addEventListener(`pointerdown`,e,!0),()=>{document.removeEventListener(`pointerdown`,e,!0)}},[n]),z.useEffect(()=>{(async()=>{w(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=_e(n.filter(e=>(i||e.name!==`init`)&&(o?.(e)??!0)),e);x(e=>tt(e,a)?e:a)}catch{let t=!y,n=_e([{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{w(!1)}})()},[e,y,_,v,E,D,u,o]),z.useEffect(()=>{k(0)},[b]),z.useEffect(()=>{A.current=O},[O]),z.useEffect(()=>{M.current[O]?.scrollIntoView({block:`nearest`})},[O]),z.useEffect(()=>{xe(c,re,{rows:ue(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 oe=z.useRef(c);oe.current=c,z.useEffect(()=>()=>{Se(oe.current,re)},[]),z.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 se=e=>{let t=le(e);switch(e.name){case`new`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5`});case`init`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-green-500`});case`undo`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-orange-500`});case`redo`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-orange-500`});case`timeline`:case`reload`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5`});case`compact`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-purple-500`});case`goal`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5`});case`review`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-blue-500`});case`test`:case`build`:case`run`:return(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-cyan-500`});default:return e.isBuiltIn?(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-yellow-500`}):(0,$.jsx)(R,{name:t,className:`h-3.5 w-3.5 text-muted-foreground`})}};return(0,$.jsxs)(de,{ref:te,isMobile:d,className:`max-w-[450px] max-h-64`,style:a,children:[(0,$.jsx)(ae,{preventOverscroll:!0,outerClassName:`flex-1 min-h-0`,className:`px-0 py-1.5`,children:C?(0,$.jsx)(`div`,{className:`flex items-center justify-center py-4`,children:(0,$.jsx)(R,{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:F(`flex gap-2 px-2 py-2 cursor-pointer rounded-lg`,d?`items-center`:`items-start`,fe(d,r===O),!d&&r===O&&`bg-interactive-selection/35`),onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{e.pointerType===`touch`&&(I.current={x:e.clientX,y:e.clientY},L.current=!1)},onPointerMove:e=>{if(e.pointerType!==`touch`||!I.current)return;let t=e.clientX-I.current.x,n=e.clientY-I.current.y;Math.hypot(t,n)>6&&(L.current=!0)},onPointerUp:e=>{if(e.pointerType!==`touch`)return;let r=L.current;I.current=null,L.current=!1,!r&&(e.preventDefault(),e.stopPropagation(),ne.current=!0,t(n,Ke(n,d)))},onPointerCancel:()=>{I.current=null,L.current=!1},onClick:()=>{if(ne.current){ne.current=!1;return}t(n,Ke(n,d))},onMouseMove:()=>{j.current=!1,k(r)},children:[(0,$.jsx)(`div`,{className:F(!d&&`mt-0.5`),children:se(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,we as d,H as f,at as i,Q as l,st as n,Ye as o,be 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{io as i}from"./ui-
|
|
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{io as i}from"./ui-Pjq_Ygzo.js";import{n as a}from"./Icon-Bj9hTMjF.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};
|