@qredence/fleet 0.6.2 → 0.6.3

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/web/client/assets/DialogTitle-DiAm7YNe.js +1 -0
  3. package/dist/web/client/assets/alert-dialog-CYE37KMM.js +1 -0
  4. package/dist/web/client/assets/{artifacts-panel-DmQghvw8.js → artifacts-panel-ClDpGWOU.js} +1 -1
  5. package/dist/web/client/assets/{chat-C24kD2SP.js → chat-BVMnC5Qh.js} +1 -1
  6. package/dist/web/client/assets/{chat-command-palette-BIwjhE6s.js → chat-command-palette-YuyaJNbi.js} +1 -1
  7. package/dist/web/client/assets/{citations-BUvM92nt.js → citations-DXqV2NLy.js} +1 -1
  8. package/dist/web/client/assets/command-Cw4X8Bpk.js +1 -0
  9. package/dist/web/client/assets/dialog-BzcIOvFC.js +1 -0
  10. package/dist/web/client/assets/{fork-picker-dialog-CpwEwsxA.js → fork-picker-dialog-BYRr-xTy.js} +1 -1
  11. package/dist/web/client/assets/git-branch-CTq9aACS.js +1 -0
  12. package/dist/web/client/assets/globals-BtCXZXL_.css +2 -0
  13. package/dist/web/client/assets/{index-BGnQeUYE.js → index-B9aXxpOv.js} +2 -2
  14. package/dist/web/client/assets/{model-selector-list-CRZCXeBf.js → model-selector-list-CHD8lMAl.js} +1 -1
  15. package/dist/web/client/assets/{openui-renderer-Bkkx5kmA.js → openui-renderer-C4e9FOVR.js} +8 -8
  16. package/dist/web/client/assets/provider-catalog-ClVvphe0.js +1 -0
  17. package/dist/web/client/assets/provider-label-CwZ-KDxk.js +1 -0
  18. package/dist/web/client/assets/right-panel-registry-BnYCffmM.js +2 -0
  19. package/dist/web/client/assets/routes-DUontXSG.js +16 -0
  20. package/dist/web/client/assets/{session-tool-renderer-3E3cv8D0.js → session-tool-renderer-Bd3dsE2D.js} +3 -3
  21. package/dist/web/client/assets/session-tree-panel-CM4_wwrM.js +1 -0
  22. package/dist/web/client/assets/settings-dialog-DMTD9m6z.js +2 -0
  23. package/dist/web/client/assets/sparkles-BY5MFyk6.js +1 -0
  24. package/dist/web/client/assets/{subagent-chat-panel-C5ukYiUx.js → subagent-chat-panel-BESrXxAR.js} +1 -1
  25. package/dist/web/client/assets/{subagent-transcript-lqNcSVbH.js → subagent-transcript-CAqFJfMj.js} +1 -1
  26. package/dist/web/client/assets/{subagents-panel-SJKhaVTr.js → subagents-panel-8aKOwWLs.js} +1 -1
  27. package/dist/web/client/assets/{virtualized-turn-list-BgUgX6tM.js → virtualized-turn-list-mL3ONUUA.js} +3 -3
  28. package/dist/web/client/bundle-budget.json +6 -6
  29. package/dist/web/server/{_tanstack-start-manifest_v-BDPifIFN-DTSNCHBX.js → _tanstack-start-manifest_v-Cm8xE-Rb-TMLYN3GY.js} +15 -13
  30. package/dist/web/server/{artifacts-panel-BN3DgqfV-N73J6N5Y.js → artifacts-panel-CwLVBqyi-CDORJY75.js} +21 -20
  31. package/dist/web/server/{chat-command-palette-G8awyZRw-2QE7FXGT.js → chat-command-palette-DUha04ia-5OV7WVJZ.js} +11 -9
  32. package/dist/web/server/{chunk-ZOVXMNJM.js → chunk-3Q3QKLHC.js} +5 -96
  33. package/dist/web/server/{chunk-6SOMNRAX.js → chunk-ADYZWC5L.js} +12 -12
  34. package/dist/web/server/{chunk-CW6KZUKT.js → chunk-B2LF64HM.js} +1 -1
  35. package/dist/web/server/{chunk-YMPJMHXZ.js → chunk-DP26GVWH.js} +3 -2
  36. package/dist/web/server/chunk-ETCO5KZK.js +113 -0
  37. package/dist/web/server/{chunk-ENGEUJIH.js → chunk-FMAYMBRS.js} +22 -20
  38. package/dist/web/server/{chunk-WB2LJC3R.js → chunk-FTLJ66KU.js} +4 -4
  39. package/dist/web/server/{chunk-OSMP55KI.js → chunk-H5D5DX3K.js} +1 -20
  40. package/dist/web/server/chunk-HGVJEUV4.js +102 -0
  41. package/dist/web/server/{chunk-FT74GAAH.js → chunk-KZ35W5M7.js} +27 -27
  42. package/dist/web/server/{chunk-CCYLHNZJ.js → chunk-O2IC376F.js} +46 -3
  43. package/dist/web/server/chunk-OMPXUTMX.js +33 -0
  44. package/dist/web/server/{chunk-BUXJSBE3.js → chunk-RJNGEU6C.js} +1 -1
  45. package/dist/web/server/{chunk-O2UYZT3Z.js → chunk-T2UTBHJ4.js} +48 -4
  46. package/dist/web/server/{chunk-NMBH57JT.js → chunk-TU2WNRAL.js} +6 -6
  47. package/dist/web/server/{chunk-JPDRUSUD.js → chunk-UM3RHJNZ.js} +1 -1
  48. package/dist/web/server/{chunk-4OTHKQMG.js → chunk-V5IFFLZQ.js} +4 -4
  49. package/dist/web/server/{chunk-EDAWH2MT.js → chunk-XEG4JTND.js} +2 -2
  50. package/dist/web/server/{chunk-NCK2FJAD.js → chunk-XSOUURPF.js} +2 -2
  51. package/dist/web/server/{chunk-ESM7OCRL.js → chunk-YCCF676T.js} +3 -3
  52. package/dist/web/server/{chunk-JVOW2NWC.js → chunk-YDDDSVNB.js} +7 -100
  53. package/dist/web/server/{fork-picker-dialog-YKlapaxN-DR5L74ST.js → fork-picker-dialog-DeMiLZtS-WTRTTP64.js} +4 -3
  54. package/dist/web/server/{message-queue-Demph1x4-RBJUC3AT.js → message-queue-Demph1x4-GGXJUUKO.js} +4 -4
  55. package/dist/web/server/{model-selector-list-BmzLiCx9-TK6JGGKU.js → model-selector-list-BeGQHwKV-UJYFO4KX.js} +9 -8
  56. package/dist/web/server/{openui-renderer-moJGf0LA-QCU3PI6H.js → openui-renderer-B4z18Brm-HSMKJ47D.js} +13 -12
  57. package/dist/web/server/{router-CPdFlpbe-LAD4MNZB.js → router-DfG45nTQ-3VXEUYG5.js} +278 -56
  58. package/dist/web/server/{routes-hkom6S6L-DUPPQHPY.js → routes-B9F9UfF1-UN2IVBMJ.js} +271 -117
  59. package/dist/web/server/server.js +2 -2
  60. package/dist/web/server/{session-tool-renderer-CglQ2ky7-2JVYNZG2.js → session-tool-renderer-CT65wuet-RQBMXHEZ.js} +11 -10
  61. package/dist/web/server/session-tree-panel-rS0t1wbf-HNA6AJBY.js +229 -0
  62. package/dist/web/server/{settings-dialog-BCEfmgtP-T3WQEZHB.js → settings-dialog-CqkrDSnm-LFEKSS7Y.js} +38 -34
  63. package/dist/web/server/{subagent-chat-panel-BTwI1kdB-LKBWA4GD.js → subagent-chat-panel-Cf7QdDqH-DPPSVLSY.js} +18 -17
  64. package/dist/web/server/{subagents-panel-8Z9_csoV-HYMEEBHB.js → subagents-panel-_JsUw-6t-MZWM5P45.js} +18 -17
  65. package/package.json +1 -1
  66. package/dist/web/client/assets/command-Dv96gATQ.js +0 -1
  67. package/dist/web/client/assets/dialog-BCb4rQh0.js +0 -1
  68. package/dist/web/client/assets/globals-DCtBkCSD.css +0 -2
  69. package/dist/web/client/assets/provider-catalog-C0XBIasJ.js +0 -1
  70. package/dist/web/client/assets/provider-label-Cka0ep0S.js +0 -1
  71. package/dist/web/client/assets/right-panel-registry-BCW7fQTG.js +0 -2
  72. package/dist/web/client/assets/routes-BWe5Iz-2.js +0 -16
  73. package/dist/web/client/assets/settings-dialog-B8lHq2tT.js +0 -2
  74. package/dist/web/client/assets/sparkles-D8XIY8pN.js +0 -1
  75. package/dist/web/server/{chunk-43S5N7SH.js → chunk-5RTGRTPD.js} +3 -3
  76. package/dist/web/server/{chunk-OMEDERPG.js → chunk-S2IBIJIG.js} +3 -3
  77. package/dist/web/server/{chunk-IXGLKAPN.js → chunk-TR2GA5OF.js} +3 -3
  78. package/dist/web/server/{workspace-panel-BHEB9nRM-TS62SYBA.js → workspace-panel-BHEB9nRM-Y6KGIVGP.js} +2 -2
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./createLucideIcon-_dfI7Arx.js";import{t as i}from"./right-panel-registry-BCW7fQTG.js";import{i as a,n as o,r as s,t as c}from"./sun-D0llhiMU.js";import{a as l}from"./right-panel-context-CS8tJMzE.js";import{t as u}from"./square-DQaQu9bp.js";import{a as d,c as f,i as p,n as m,o as h,r as g,s as _}from"./command-Dv96gATQ.js";var v=r(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),y=e(t(),1),b=n();function x({open:e,onOpenChange:t,onNewSession:n,onStop:r,onResumeSession:x,onSetRightPanel:S,onThemeChange:C,sessions:w,isStreaming:T,themePreference:E}){let[D,O]=(0,y.useState)(``),[k,A]=(0,y.useState)(e);e!==k&&(A(e),e&&O(``));let j=e=>{e(),t(!1)};return(0,b.jsxs)(m,{open:e,onOpenChange:t,children:[(0,b.jsx)(d,{placeholder:`Type a command or search…`,value:D,onValueChange:O}),(0,b.jsxs)(_,{children:[(0,b.jsx)(g,{children:`No commands found.`}),(0,b.jsxs)(p,{heading:`Actions`,children:[(0,b.jsxs)(h,{onSelect:()=>j(n),keywords:[`new`,`session`,`chat`],children:[(0,b.jsx)(l,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`New session`})]}),T&&(0,b.jsxs)(h,{onSelect:()=>j(r),keywords:[`stop`,`abort`,`cancel`],children:[(0,b.jsx)(u,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Stop generation`})]})]}),(0,b.jsx)(f,{}),(0,b.jsx)(p,{heading:`Panels`,children:i.map(e=>{let t=e.icon;return(0,b.jsxs)(h,{onSelect:()=>j(()=>S(e.id)),keywords:e.commandKeywords,children:[(0,b.jsx)(t,{}),(0,b.jsx)(`span`,{children:e.commandLabel})]},e.id)})}),w.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f,{}),(0,b.jsx)(p,{heading:`Sessions`,children:w.map(e=>{let t=e.title;return(0,b.jsxs)(h,{onSelect:()=>j(()=>x(e)),keywords:[`session`,t],children:[(0,b.jsx)(v,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{className:`truncate`,children:t})]},e.sessionId)})})]}),(0,b.jsx)(f,{}),(0,b.jsxs)(p,{heading:`Theme`,children:[(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`light`)),keywords:[`theme`,`light`],children:[(0,b.jsx)(c,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Light`}),E===`light`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]}),(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`dark`)),keywords:[`theme`,`dark`],children:[(0,b.jsx)(o,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Dark`}),E===`dark`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]}),(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`system`)),keywords:[`theme`,`system`],children:[(0,b.jsx)(s,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`System`}),E===`system`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]})]})]})]})}export{x as ChatCommandPalette};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./createLucideIcon-_dfI7Arx.js";import{t as i}from"./right-panel-registry-BnYCffmM.js";import{i as a,n as o,r as s,t as c}from"./sun-D0llhiMU.js";import{a as l}from"./right-panel-context-CS8tJMzE.js";import{t as u}from"./square-DQaQu9bp.js";import{a as d,c as f,i as p,n as m,o as h,r as g,s as _}from"./command-Cw4X8Bpk.js";var v=r(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),y=e(t(),1),b=n();function x({open:e,onOpenChange:t,onNewSession:n,onStop:r,onResumeSession:x,onSetRightPanel:S,onThemeChange:C,sessions:w,isStreaming:T,themePreference:E}){let[D,O]=(0,y.useState)(``),[k,A]=(0,y.useState)(e);e!==k&&(A(e),e&&O(``));let j=e=>{e(),t(!1)};return(0,b.jsxs)(m,{open:e,onOpenChange:t,children:[(0,b.jsx)(d,{placeholder:`Type a command or search…`,value:D,onValueChange:O}),(0,b.jsxs)(_,{children:[(0,b.jsx)(g,{children:`No commands found.`}),(0,b.jsxs)(p,{heading:`Actions`,children:[(0,b.jsxs)(h,{onSelect:()=>j(n),keywords:[`new`,`session`,`chat`],children:[(0,b.jsx)(l,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`New session`})]}),T&&(0,b.jsxs)(h,{onSelect:()=>j(r),keywords:[`stop`,`abort`,`cancel`],children:[(0,b.jsx)(u,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Stop generation`})]})]}),(0,b.jsx)(f,{}),(0,b.jsx)(p,{heading:`Panels`,children:i.map(e=>{let t=e.icon;return(0,b.jsxs)(h,{onSelect:()=>j(()=>S(e.id)),keywords:e.commandKeywords,children:[(0,b.jsx)(t,{}),(0,b.jsx)(`span`,{children:e.commandLabel})]},e.id)})}),w.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f,{}),(0,b.jsx)(p,{heading:`Sessions`,children:w.map(e=>{let t=e.title;return(0,b.jsxs)(h,{onSelect:()=>j(()=>x(e)),keywords:[`session`,t],children:[(0,b.jsx)(v,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{className:`truncate`,children:t})]},e.sessionId)})})]}),(0,b.jsx)(f,{}),(0,b.jsxs)(p,{heading:`Theme`,children:[(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`light`)),keywords:[`theme`,`light`],children:[(0,b.jsx)(c,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Light`}),E===`light`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]}),(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`dark`)),keywords:[`theme`,`dark`],children:[(0,b.jsx)(o,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Dark`}),E===`dark`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]}),(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`system`)),keywords:[`theme`,`system`],children:[(0,b.jsx)(s,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`System`}),E===`system`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]})]})]})]})}export{x as ChatCommandPalette};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Brtgag-m.js";import{f as i,l as a,o,r as s}from"./ease-CMumuPlX.js";import{n as c,t as l}from"./use-reduced-motion-BOcG709U.js";import{t as u}from"./createLucideIcon-_dfI7Arx.js";import{t as d}from"./chevron-down-DUUprRP5.js";import{t as f}from"./safe-external-url-BbAom7Bm.js";import{t as p}from"./agent-disclosure-CMrxF7L-.js";import{a as m}from"./sparkles-D8XIY8pN.js";var h=u(`book-open-text`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M16 13h2`,key:`weia3s`}],[`path`,{d:`M16 9h2`,key:`1n7gjm`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}],[`path`,{d:`M6 13h2`,key:`1cckiz`}],[`path`,{d:`M6 9h2`,key:`1k7j9f`}]]),g=u(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),_=u(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),v=u(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),y=u(`message-circle-question-mark`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),b=e(t(),1);function x(){let[e,t]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(hover: hover) and (pointer: fine)`),n=()=>t(e.matches);return n(),e.addEventListener?.(`change`,n),()=>e.removeEventListener?.(`change`,n)},[]),e}function S(e){try{return new URL(`/favicon.ico`,e).toString()}catch{return null}}var C=n();function w(e,t){return`${e}-${t.replace(/[^a-zA-Z0-9_-]/g,`-`)}`}function T({url:e,className:t}){let n=e&&f(e)?S(e):null,[i,a]=(0,b.useState)(null);return(0,C.jsx)(`span`,{"aria-hidden":`true`,className:r(`grid size-5 shrink-0 place-items-center text-muted-foreground`,t),children:n&&i!==n?(0,C.jsx)(`img`,{src:n,alt:``,width:16,height:16,loading:`lazy`,referrerPolicy:`no-referrer`,onError:()=>a(n),className:`size-4 rounded-sm object-contain`}):(0,C.jsx)(g,{className:`size-3.5`})})}function E({citations:e,limit:t=3,className:n}){return(0,C.jsx)(`span`,{"aria-hidden":`true`,className:r(`flex -space-x-1.5`,n),children:e.slice(0,t).map(e=>(0,C.jsx)(T,{url:e.url,className:`size-6 rounded-full bg-background ring-2 ring-background`},e.id))})}function D({citation:e,index:t,idPrefix:n}){let r=e.url&&f(e.url)?e.url:void 0,i=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(T,{url:e.url}),(0,C.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2 gap-y-0.5`,children:[(0,C.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground/80 transition-colors group-hover/citation:text-foreground`,children:e.title}),e.domain?(0,C.jsx)(`span`,{className:`min-w-0 truncate text-xs text-muted-foreground/60`,children:e.domain}):null]}),(0,C.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,C.jsx)(`span`,{className:`grid size-5 place-items-center rounded-md bg-foreground/[0.05] text-micro font-semibold tabular-nums text-muted-foreground`,children:t}),r?(0,C.jsx)(m,{className:`size-3.5 text-muted-foreground/40 transition-colors group-hover/citation:text-muted-foreground`}):null]})]}),a=`group/citation flex items-center gap-2 rounded-md px-1.5 py-1 outline-none focus-visible:ring-2 focus-visible:ring-ring`,o=w(n,e.id);return r?(0,C.jsx)(`a`,{id:o,href:r,target:`_blank`,rel:`noreferrer noopener`,className:a,children:i}):(0,C.jsx)(`div`,{id:o,className:a,children:i})}function O({citations:e,idPrefix:t,className:n}){let a=l()??!1,u=(0,b.useId)(),d=t??`citation-list-${u.replace(/:/g,``)}`;return(0,C.jsx)(`div`,{className:r(`grid gap-0.5`,n),children:(0,C.jsx)(c,{mode:`popLayout`,children:e.map((e,t)=>(0,C.jsx)(i.div,{layout:`position`,initial:a?{opacity:1}:{opacity:0,y:6},animate:{opacity:1,y:0},exit:a?{opacity:0}:{opacity:0,y:-3},transition:a?{duration:0}:{opacity:{duration:.18,ease:s},y:o,layout:o},children:(0,C.jsx)(D,{citation:e,index:t+1,idPrefix:d})},e.id))})})}function k({citations:e,title:t=`Sources`,open:n,defaultOpen:o=!1,onOpenChange:s,idPrefix:c,className:u}){let f=l()??!1,m=(0,b.useId)(),g=`${m}-content`,_=c??`citation-${m.replace(/:/g,``)}`,[v,y]=(0,b.useState)(o),x=n??v,S=(0,b.useCallback)(e=>{n===void 0&&y(e),s?.(e)},[s,n]);return(0,C.jsxs)(`div`,{className:r(`w-full text-sm`,u),children:[(0,C.jsxs)(`button`,{type:`button`,"aria-expanded":x,"aria-controls":g,onClick:()=>S(!x),className:`group -ml-1 flex min-h-8 items-center gap-2 rounded-lg px-1 text-left text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring`,children:[(0,C.jsx)(h,{className:`size-4`}),(0,C.jsx)(`span`,{className:`font-medium`,children:t}),(0,C.jsx)(`span`,{className:`rounded-full bg-muted px-1.5 py-0.5 text-micro font-semibold tabular-nums`,children:e.length}),(0,C.jsx)(i.span,{"aria-hidden":`true`,animate:{rotate:x?180:0},transition:f?{duration:0}:a,className:`text-muted-foreground/60`,children:(0,C.jsx)(d,{className:`size-3.5`})})]}),(0,C.jsx)(p,{id:g,open:x,children:(0,C.jsx)(O,{citations:e,idPrefix:_,className:`mt-1`})})]})}export{y as a,h as c,x as i,E as n,v as o,k as r,_ as s,O as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Brtgag-m.js";import{f as i,l as a,o,r as s}from"./ease-CMumuPlX.js";import{n as c,t as l}from"./use-reduced-motion-BOcG709U.js";import{t as u}from"./createLucideIcon-_dfI7Arx.js";import{t as d}from"./chevron-down-DUUprRP5.js";import{t as f}from"./safe-external-url-BbAom7Bm.js";import{t as p}from"./agent-disclosure-CMrxF7L-.js";import{i as m}from"./sparkles-BY5MFyk6.js";var h=u(`book-open-text`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M16 13h2`,key:`weia3s`}],[`path`,{d:`M16 9h2`,key:`1n7gjm`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}],[`path`,{d:`M6 13h2`,key:`1cckiz`}],[`path`,{d:`M6 9h2`,key:`1k7j9f`}]]),g=u(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),_=u(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),v=u(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),y=u(`message-circle-question-mark`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),b=e(t(),1);function x(){let[e,t]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(hover: hover) and (pointer: fine)`),n=()=>t(e.matches);return n(),e.addEventListener?.(`change`,n),()=>e.removeEventListener?.(`change`,n)},[]),e}function S(e){try{return new URL(`/favicon.ico`,e).toString()}catch{return null}}var C=n();function w(e,t){return`${e}-${t.replace(/[^a-zA-Z0-9_-]/g,`-`)}`}function T({url:e,className:t}){let n=e&&f(e)?S(e):null,[i,a]=(0,b.useState)(null);return(0,C.jsx)(`span`,{"aria-hidden":`true`,className:r(`grid size-5 shrink-0 place-items-center text-muted-foreground`,t),children:n&&i!==n?(0,C.jsx)(`img`,{src:n,alt:``,width:16,height:16,loading:`lazy`,referrerPolicy:`no-referrer`,onError:()=>a(n),className:`size-4 rounded-sm object-contain`}):(0,C.jsx)(g,{className:`size-3.5`})})}function E({citations:e,limit:t=3,className:n}){return(0,C.jsx)(`span`,{"aria-hidden":`true`,className:r(`flex -space-x-1.5`,n),children:e.slice(0,t).map(e=>(0,C.jsx)(T,{url:e.url,className:`size-6 rounded-full bg-background ring-2 ring-background`},e.id))})}function D({citation:e,index:t,idPrefix:n}){let r=e.url&&f(e.url)?e.url:void 0,i=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(T,{url:e.url}),(0,C.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2 gap-y-0.5`,children:[(0,C.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground/80 transition-colors group-hover/citation:text-foreground`,children:e.title}),e.domain?(0,C.jsx)(`span`,{className:`min-w-0 truncate text-xs text-muted-foreground/60`,children:e.domain}):null]}),(0,C.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,C.jsx)(`span`,{className:`grid size-5 place-items-center rounded-md bg-foreground/[0.05] text-micro font-semibold tabular-nums text-muted-foreground`,children:t}),r?(0,C.jsx)(m,{className:`size-3.5 text-muted-foreground/40 transition-colors group-hover/citation:text-muted-foreground`}):null]})]}),a=`group/citation flex items-center gap-2 rounded-md px-1.5 py-1 outline-none focus-visible:ring-2 focus-visible:ring-ring`,o=w(n,e.id);return r?(0,C.jsx)(`a`,{id:o,href:r,target:`_blank`,rel:`noreferrer noopener`,className:a,children:i}):(0,C.jsx)(`div`,{id:o,className:a,children:i})}function O({citations:e,idPrefix:t,className:n}){let a=l()??!1,u=(0,b.useId)(),d=t??`citation-list-${u.replace(/:/g,``)}`;return(0,C.jsx)(`div`,{className:r(`grid gap-0.5`,n),children:(0,C.jsx)(c,{mode:`popLayout`,children:e.map((e,t)=>(0,C.jsx)(i.div,{layout:`position`,initial:a?{opacity:1}:{opacity:0,y:6},animate:{opacity:1,y:0},exit:a?{opacity:0}:{opacity:0,y:-3},transition:a?{duration:0}:{opacity:{duration:.18,ease:s},y:o,layout:o},children:(0,C.jsx)(D,{citation:e,index:t+1,idPrefix:d})},e.id))})})}function k({citations:e,title:t=`Sources`,open:n,defaultOpen:o=!1,onOpenChange:s,idPrefix:c,className:u}){let f=l()??!1,m=(0,b.useId)(),g=`${m}-content`,_=c??`citation-${m.replace(/:/g,``)}`,[v,y]=(0,b.useState)(o),x=n??v,S=(0,b.useCallback)(e=>{n===void 0&&y(e),s?.(e)},[s,n]);return(0,C.jsxs)(`div`,{className:r(`w-full text-sm`,u),children:[(0,C.jsxs)(`button`,{type:`button`,"aria-expanded":x,"aria-controls":g,onClick:()=>S(!x),className:`group -ml-1 flex min-h-8 items-center gap-2 rounded-lg px-1 text-left text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring`,children:[(0,C.jsx)(h,{className:`size-4`}),(0,C.jsx)(`span`,{className:`font-medium`,children:t}),(0,C.jsx)(`span`,{className:`rounded-full bg-muted px-1.5 py-0.5 text-micro font-semibold tabular-nums`,children:e.length}),(0,C.jsx)(i.span,{"aria-hidden":`true`,animate:{rotate:x?180:0},transition:f?{duration:0}:a,className:`text-muted-foreground/60`,children:(0,C.jsx)(d,{className:`size-3.5`})})]}),(0,C.jsx)(p,{id:g,open:x,children:(0,C.jsx)(O,{citations:e,idPrefix:_,className:`mt-1`})})]})}export{y as a,h as c,x as i,E as n,v as o,k as r,_ as s,O as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Brtgag-m.js";import{t as i}from"./check-B3LlvM65.js";import{t as a}from"./search-BjcXAUrI.js";import{a as o,n as s,o as c,r as l,t as u}from"./dialog-BzcIOvFC.js";import{T as d,g as f,i as p,m,n as h,r as g,t as _}from"./dist-DbHxXSgQ.js";import{n as v,t as y}from"./input-group-D7lAfKHR.js";var b=1,x=.9,S=.8,C=.17,w=.1,T=.999,E=.9999,D=.99,O=/[\\\/_+.#"@\[\(\{&]/,k=/[\\\/_+.#"@\[\(\{&]/g,A=/[\s-]/,j=/[\s-]/g;function M(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?b:D;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=M(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=b:O.test(e.charAt(l-1))?(d*=S,p=e.slice(i,l-1).match(k),p&&i>0&&(d*=T**+p.length)):A.test(e.charAt(l-1))?(d*=x,m=e.slice(i,l-1).match(j),m&&i>0&&(d*=T**+m.length)):(d*=C,i>0&&(d*=T**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=E)),(d<w&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=M(e,t,n,r,l+1,a+2,o),f*w>d&&(d=f*w)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function N(e){return e.toLowerCase().replace(j,` `)}function P(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,M(e,t,N(e),N(t),0,0,{})}var F=e(t(),1),I=`[cmdk-group=""]`,L=`[cmdk-group-items=""]`,ee=`[cmdk-group-heading=""]`,R=`[cmdk-item=""]`,z=`${R}:not([aria-disabled="true"])`,B=`cmdk-item-select`,V=`data-value`,te=(e,t,n)=>P(e,t,n),ne=F.createContext(void 0),H=()=>F.useContext(ne),U=F.createContext(void 0),W=()=>F.useContext(U),G=F.createContext(void 0),K=F.forwardRef((e,t)=>{let n=X(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=X(()=>new Set),i=X(()=>new Map),a=X(()=>new Map),o=X(()=>new Set),s=fe(e),{label:c,children:l,value:u,onValueChange:d,filter:p,shouldFilter:h,loop:g,disablePointerSelection:_=!1,vimBindings:v=!0,...y}=e,b=m(),x=m(),S=m(),C=F.useRef(null),w=me();Y(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,T.emit()}},[u]),Y(()=>{w(6,j)},[]);let T=F.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)A(),O(),w(1,k);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(S);e?e.focus():(i=document.getElementById(b))==null||i.focus()}if(w(7,()=>{n.current.selectedItemId=M()?.id,T.emit()}),r||w(5,j),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}T.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),E=F.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,D(t,r)),w(2,()=>{O(),T.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),w(3,()=>{A(),O(),n.current.value||k(),T.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=M();w(4,()=>{A(),t?.getAttribute(`id`)===e&&k(),T.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:b,inputId:S,labelId:x,listInnerRef:C}),[]);function D(e,t){let r=s.current?.filter??te;return e?r(e,n.current.search,t):0}function O(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=C.current;N().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(L);t?t.appendChild(e.parentElement===t?e:e.closest(`${L} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${L} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=C.current?.querySelector(`${I}[${V}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function k(){let e=N().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(V);T.setState(`value`,e||void 0)}function A(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=D(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function j(){var e;let t=M();t&&(t.parentElement?.firstChild===t&&((e=t.closest(I)?.querySelector(ee))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function M(){return C.current?.querySelector(`${R}[aria-selected="true"]`)}function N(){return Array.from(C.current?.querySelectorAll(z)||[])}function P(e){let t=N()[e];t&&T.setState(`value`,t.getAttribute(V))}function H(e){var t;let n=M(),r=N(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&T.setState(`value`,a.getAttribute(V))}function W(e){let t=M()?.closest(I),n;for(;t&&!n;)t=e>0?ue(t,I):de(t,I),n=t?.querySelector(z);n?T.setState(`value`,n.getAttribute(V)):H(e)}let G=()=>P(N().length-1),K=e=>{e.preventDefault(),e.metaKey?G():e.altKey?W(1):H(1)},q=e=>{e.preventDefault(),e.metaKey?P(0):e.altKey?W(-1):H(-1)};return F.createElement(f.div,{ref:t,tabIndex:-1,...y,"cmdk-root":``,onKeyDown:e=>{var t;(t=y.onKeyDown)==null||t.call(y,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:v&&e.ctrlKey&&K(e);break;case`ArrowDown`:K(e);break;case`p`:case`k`:v&&e.ctrlKey&&q(e);break;case`ArrowUp`:q(e);break;case`Home`:e.preventDefault(),P(0);break;case`End`:e.preventDefault(),G();break;case`Enter`:{e.preventDefault();let t=M();if(t){let e=new Event(B);t.dispatchEvent(e)}}}}},F.createElement(`label`,{"cmdk-label":``,htmlFor:E.inputId,id:E.labelId,style:ge},c),Q(e,e=>F.createElement(U.Provider,{value:T},F.createElement(ne.Provider,{value:E},e))))}),q=F.forwardRef((e,t)=>{let n=m(),r=F.useRef(null),i=F.useContext(G),a=H(),o=fe(e),s=o.current?.forceMount??i?.forceMount;Y(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=pe(n,r,[e.value,e.children,r],e.keywords),l=W(),u=Z(e=>e.value&&e.value===c.current),p=Z(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);F.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(B,h),()=>t.removeEventListener(B,h)},[p,e.onSelect,e.disabled]);function h(){var e,t;g(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function g(){l.setState(`value`,c.current,!0)}if(!p)return null;let{disabled:_,value:v,onSelect:y,forceMount:b,keywords:x,...S}=e;return F.createElement(f.div,{ref:d(r,t),...S,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!_,"aria-selected":!!u,"data-disabled":!!_,"data-selected":!!u,onPointerMove:_||a.getDisablePointerSelection()?void 0:g,onClick:_?void 0:h},e.children)}),re=F.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=m(),s=F.useRef(null),c=F.useRef(null),l=m(),u=H(),p=Z(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));Y(()=>u.group(o),[]),pe(o,s,[e.value,e.heading,c]);let h=F.useMemo(()=>({id:o,forceMount:i}),[i]);return F.createElement(f.div,{ref:d(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!p||void 0},n&&F.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),Q(e,e=>F.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},F.createElement(G.Provider,{value:h},e))))}),ie=F.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=F.useRef(null),a=Z(e=>!e.search);return!n&&!a?null:F.createElement(f.div,{ref:d(i,t),...r,"cmdk-separator":``,role:`separator`})}),ae=F.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=W(),o=Z(e=>e.search),s=Z(e=>e.selectedItemId),c=H();return F.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),F.createElement(f.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),oe=F.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=F.useRef(null),o=F.useRef(null),s=Z(e=>e.selectedItemId),c=H();return F.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),F.createElement(f.div,{ref:d(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},Q(e,e=>F.createElement(`div`,{ref:d(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),se=F.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return F.createElement(_,{open:n,onOpenChange:r},F.createElement(p,{container:o},F.createElement(g,{"cmdk-overlay":``,className:i}),F.createElement(h,{"aria-label":e.label,"cmdk-dialog":``,className:a},F.createElement(K,{ref:t,...s}))))}),ce=F.forwardRef((e,t)=>Z(e=>e.filtered.count===0)?F.createElement(f.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),le=F.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return F.createElement(f.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Q(e,e=>F.createElement(`div`,{"aria-hidden":!0},e)))}),J=Object.assign(K,{List:oe,Item:q,Input:ae,Group:re,Separator:ie,Dialog:se,Empty:ce,Loading:le});function ue(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function de(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function fe(e){let t=F.useRef(e);return Y(()=>{t.current=e}),t}var Y=typeof window>`u`?F.useEffect:F.useLayoutEffect;function X(e){let t=F.useRef();return t.current===void 0&&(t.current=e()),t}function Z(e){let t=W(),n=()=>e(t.snapshot());return F.useSyncExternalStore(t.subscribe,n,n)}function pe(e,t,n,r=[]){let i=F.useRef(),a=H();return Y(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(V,s),i.current=s}),i}var me=()=>{let[e,t]=F.useState(),n=X(()=>new Map);return Y(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function he(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Q({asChild:e,children:t},n){return e&&F.isValidElement(t)?F.cloneElement(he(t),{ref:t.ref},n(t.props.children)):n(t)}var ge={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},$=n();function _e({className:e,...t}){return(0,$.jsx)(J,{"data-slot":`command`,className:r(`flex size-full flex-col overflow-hidden !rounded-xl p-1 text-popover-foreground`,e),...t})}function ve({title:e=`Command Palette`,description:t=`Search for a command to run...`,children:n,className:i,showCloseButton:a=!1,...d}){return(0,$.jsx)(u,{...d,children:(0,$.jsxs)(s,{className:r(`top-1/3 translate-y-0 overflow-hidden !rounded-xl p-0`,i),showCloseButton:a,children:[(0,$.jsxs)(o,{className:`sr-only`,children:[(0,$.jsx)(c,{children:e}),(0,$.jsx)(l,{children:t})]}),(0,$.jsx)(_e,{children:n})]})})}function ye({className:e,...t}){return(0,$.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`p-1 pb-0`,children:(0,$.jsxs)(y,{className:`!h-8 !rounded-lg border-input/30 bg-input/30 !shadow-none *:data-[slot=input-group-addon]:!pl-2`,children:[(0,$.jsx)(J.Input,{"data-slot":`command-input`,className:r(`w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t}),(0,$.jsx)(v,{children:(0,$.jsx)(a,{className:`size-4 shrink-0 opacity-50`})})]})})}function be({className:e,...t}){return(0,$.jsx)(J.List,{"data-slot":`command-list`,className:r(`no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none`,e),...t})}function xe({className:e,...t}){return(0,$.jsx)(J.Empty,{"data-slot":`command-empty`,className:r(`py-6 text-center text-sm`,e),...t})}function Se({className:e,...t}){return(0,$.jsx)(J.Group,{"data-slot":`command-group`,className:r(`overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground`,e),...t})}function Ce({className:e,...t}){return(0,$.jsx)(J.Separator,{"data-slot":`command-separator`,className:r(`-mx-1 h-px bg-border`,e),...t})}function we({className:e,children:t,...n}){return(0,$.jsxs)(J.Item,{"data-slot":`command-item`,className:r(`group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:!rounded-lg data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground`,e),...n,children:[t,(0,$.jsx)(i,{className:`ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`})]})}export{ye as a,Ce as c,Se as i,ve as n,we as o,xe as r,be as s,_e as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-NZYk81nU.js";import{rt as t,t as n}from"./button-Dl0ce3Y5.js";import{t as r}from"./utils-Brtgag-m.js";import{a as i,c as a,i as o,l as s,n as c,o as l,r as u,s as d,t as f,u as p}from"./DialogTitle-DiAm7YNe.js";import{t as m}from"./x-BGsDD848.js";var h=t(function(e){return d(`dialog`,e)}),g=e(),_=4;function v({...e}){return(0,g.jsx)(h,{"data-slot":`dialog`,...e})}function y({...e}){return(0,g.jsx)(c,{"data-slot":`dialog-portal`,...e})}function b({className:e,...t}){return(0,g.jsx)(l,{"data-slot":`dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function x({className:e,children:t,showCloseButton:o=!0,overlayClassName:c,...l}){let d=s(),f=Math.min(d+_,8);return(0,g.jsxs)(y,{children:[(0,g.jsx)(b,{className:c}),(0,g.jsxs)(u,{"data-slot":`dialog-content`,className:r(`fixed top-1/2 left-1/2 z-[51] grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 text-sm text-popover-foreground duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,p(f),e),...l,children:[(0,g.jsx)(a,{value:f,children:t}),o&&(0,g.jsxs)(i,{"data-slot":`dialog-close`,render:(0,g.jsx)(n,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,g.jsx)(m,{}),(0,g.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function S({className:e,...t}){return(0,g.jsx)(`div`,{"data-slot":`dialog-header`,className:r(`flex flex-col gap-2`,e),...t})}function C({className:e,showCloseButton:t=!1,children:a,...o}){return(0,g.jsxs)(`div`,{"data-slot":`dialog-footer`,className:r(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...o,children:[a,t&&(0,g.jsx)(i,{render:(0,g.jsx)(n,{variant:`outline`}),children:`Close`})]})}function w({className:e,...t}){return(0,g.jsx)(f,{"data-slot":`dialog-title`,className:r(`font-heading text-base leading-none font-medium`,e),...t})}function T({className:e,...t}){return(0,g.jsx)(o,{"data-slot":`dialog-description`,className:r(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}export{S as a,C as i,x as n,w as o,T as r,v as t};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-NZYk81nU.js";import{a as t,n,o as r,r as i,t as a}from"./dialog-BCb4rQh0.js";var o=e();function s({entries:e,onOpenChange:s,onPick:c}){let l=e!==null&&e.length>0;return(0,o.jsx)(a,{open:l,onOpenChange:s,children:(0,o.jsxs)(n,{className:`max-w-lg`,children:[(0,o.jsxs)(t,{children:[(0,o.jsx)(r,{children:`Fork from a message`}),(0,o.jsx)(i,{children:`Creates a new session branched before the selected user message.`})]}),(0,o.jsx)(`div`,{className:`flex max-h-[min(420px,60vh)] flex-col gap-1 overflow-y-auto`,children:(e??[]).map(e=>(0,o.jsxs)(`button`,{type:`button`,className:`flex w-full cursor-pointer flex-col gap-0.5 rounded-md p-2 text-left text-body leading-5 hover:bg-foreground/6`,onClick:()=>{c(e.id),s(!1)},children:[(0,o.jsx)(`span`,{className:`truncate font-medium`,children:e.preview}),(0,o.jsx)(`span`,{className:`truncate font-mono text-caption text-foreground/40`,children:e.id})]},e.id))})]})})}export{s as ForkPickerDialog};
1
+ import{t as e}from"./jsx-runtime-NZYk81nU.js";import{a as t,n,o as r,r as i,t as a}from"./dialog-BzcIOvFC.js";var o=e();function s({entries:e,onOpenChange:s,onPick:c}){let l=e!==null&&e.length>0;return(0,o.jsx)(a,{open:l,onOpenChange:s,children:(0,o.jsxs)(n,{className:`max-w-lg`,children:[(0,o.jsxs)(t,{children:[(0,o.jsx)(r,{children:`Fork from a message`}),(0,o.jsx)(i,{children:`Creates a new session branched before the selected user message.`})]}),(0,o.jsx)(`div`,{className:`flex max-h-[min(420px,60vh)] flex-col gap-1 overflow-y-auto`,children:(e??[]).map(e=>(0,o.jsxs)(`button`,{type:`button`,className:`flex w-full cursor-pointer flex-col gap-0.5 rounded-md p-2 text-left text-body leading-5 hover:bg-foreground/6`,onClick:()=>{c(e.id),s(!1)},children:[(0,o.jsx)(`span`,{className:`truncate font-medium`,children:e.preview}),(0,o.jsx)(`span`,{className:`truncate font-mono text-caption text-foreground/40`,children:e.id})]},e.id))})]})})}export{s as ForkPickerDialog};
@@ -0,0 +1 @@
1
+ import{t as e}from"./createLucideIcon-_dfI7Arx.js";var t=e(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]);export{t};