pisper 0.6.44 → 0.6.45

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 (127) hide show
  1. package/package.json +6 -6
  2. package/web/.vite/manifest.json +691 -691
  3. package/web/assets/{AppDialog-BmhtqPq6.js → AppDialog-DNRcFofn.js} +1 -1
  4. package/web/assets/{AppOverlays-cyz0mMc9.js → AppOverlays-D1G4bRJ_.js} +1 -1
  5. package/web/assets/{AssetsPage-a_DNQXQF.js → AssetsPage-BxfXloqY.js} +1 -1
  6. package/web/assets/{AttachmentTray-Fx0RVdj2.js → AttachmentTray-ChMs2_F_.js} +1 -1
  7. package/web/assets/{BoardPage-CQF_701M.js → BoardPage-BWPe3aOh.js} +3 -3
  8. package/web/assets/{ChannelsPage-C4sSuXef.js → ChannelsPage-DIqDgADZ.js} +1 -1
  9. package/web/assets/{ChatAppearancePage-BA77E4RG.js → ChatAppearancePage-RMfIitpr.js} +1 -1
  10. package/web/assets/{ChatHistoryPage-Bo932avi.js → ChatHistoryPage-Dv2EeHAV.js} +1 -1
  11. package/web/assets/{ChatMessage-DyRMVDmJ.js → ChatMessage-CzJ7vm4B.js} +5 -5
  12. package/web/assets/{ChatPage-Bh2srQ5Q.js → ChatPage-Bz2V_NZ9.js} +5 -5
  13. package/web/assets/{ConfigPage-CRMPpPxz.js → ConfigPage-DXTFhwnY.js} +2 -2
  14. package/web/assets/{DesktopWindowControls-QTt7BkHB.js → DesktopWindowControls-iivqpiQx.js} +1 -1
  15. package/web/assets/{FeaturePage-DEjUrI25.js → FeaturePage-BOq1shgs.js} +1 -1
  16. package/web/assets/{FileAttachmentPreview-CU3DVCec.js → FileAttachmentPreview-DV6eqgRK.js} +1 -1
  17. package/web/assets/{FloatingWidgets-DsEUT3hG.js → FloatingWidgets-VZ-Qb-wN.js} +1 -1
  18. package/web/assets/FocusRuntimeControls-C8oD9nnP.js +2 -0
  19. package/web/assets/{GitDiffViewer-BFdi1mxr.js → GitDiffViewer-CAklMpA4.js} +1 -1
  20. package/web/assets/{ManageProjectsDialog-BpsBTKv5.js → ManageProjectsDialog-Cfv6AU2u.js} +1 -1
  21. package/web/assets/{MarkdownMessage-B9Bb9VQU.js → MarkdownMessage-C47P3anj.js} +1 -1
  22. package/web/assets/{McpPage-D1onf9RA.js → McpPage-CnBIWy5m.js} +1 -1
  23. package/web/assets/{MemoryEvolution-D4d8ELda.js → MemoryEvolution-BdhNE7KR.js} +1 -1
  24. package/web/assets/{MemoryPage-BxeQ1cdR.js → MemoryPage-Cs9Gw3yR.js} +2 -2
  25. package/web/assets/{MobileNavigation-DQcTpoYc.js → MobileNavigation-C-CAVhMP.js} +1 -1
  26. package/web/assets/{MorePage-DqfRiueD.js → MorePage-CLEkoAvi.js} +1 -1
  27. package/web/assets/{NewFolderDialog-dNstknkT.js → NewFolderDialog-GIqRGkVE.js} +1 -1
  28. package/web/assets/{PageHeader-Bn_vZ-th.js → PageHeader-DRXzRG34.js} +1 -1
  29. package/web/assets/{PhoneDrawer-BnWXS2P1.js → PhoneDrawer-WHEiWgs5.js} +1 -1
  30. package/web/assets/{PhoneMenuButton-Coocnsrf.js → PhoneMenuButton-BQSaB_4t.js} +1 -1
  31. package/web/assets/{PhoneTopBar-DUJ9aeM3.js → PhoneTopBar-BCRq9xao.js} +1 -1
  32. package/web/assets/{PluginsPage-Z7Fx-eAU.js → PluginsPage-xVXkgNsr.js} +1 -1
  33. package/web/assets/{SafeModePrompt-DaxOzv7_.js → SafeModePrompt-CV0e__Tp.js} +1 -1
  34. package/web/assets/{SchedulesPage-ZGP3g3Vt.js → SchedulesPage-Bsl7a3lS.js} +1 -1
  35. package/web/assets/{SessionBrowserPane-DeOqkbLQ.js → SessionBrowserPane-feS4xeee.js} +2 -2
  36. package/web/assets/{SessionContextPanel-Co419auw.js → SessionContextPanel-aH8brkyg.js} +2 -2
  37. package/web/assets/{SessionHome-3GRisRUv.js → SessionHome-DLPkN0jf.js} +1 -1
  38. package/web/assets/{SessionInspector-KjdRXk-P.js → SessionInspector-2ar9Ti-b.js} +1 -1
  39. package/web/assets/{SessionShell-DrMljmEy.js → SessionShell-FCFBi5iD.js} +1 -1
  40. package/web/assets/{SettingsSidebar-Bfgryx3X.js → SettingsSidebar-JH87Nmo2.js} +1 -1
  41. package/web/assets/{ShortcutHelpDialog-BEv4kDZo.js → ShortcutHelpDialog-BQlkmhTE.js} +1 -1
  42. package/web/assets/{ShortcutKeys-CFnZogMX.js → ShortcutKeys-CJB8XFeA.js} +1 -1
  43. package/web/assets/{SidebarUpdateStatus-BaQLz9Ha.js → SidebarUpdateStatus-DsInXdr3.js} +1 -1
  44. package/web/assets/{SkillsPage-DiBdvo55.js → SkillsPage-wekYWAdT.js} +1 -1
  45. package/web/assets/{TaskProcessesPane-CgzN0Oqf.js → TaskProcessesPane-nhAVkTPK.js} +1 -1
  46. package/web/assets/{TaskTerminalView-E0ZkafSN.js → TaskTerminalView-QMAxGYqP.js} +1 -1
  47. package/web/assets/{TerminalPanel-KwRTV-hb.js → TerminalPanel-CtwjsJfa.js} +1 -1
  48. package/web/assets/{WebDesktopPet-CGpI6-UL.js → WebDesktopPet-CA-YJQxv.js} +1 -1
  49. package/web/assets/{WorkflowsPage-BCfAr_BN.js → WorkflowsPage-Cd86btwf.js} +1 -1
  50. package/web/assets/{WorkspacePicker-DyL_8DP0.js → WorkspacePicker-BMvjJqVo.js} +1 -1
  51. package/web/assets/{api-D1flkoh7.js → api-DvJkDxm2.js} +1 -1
  52. package/web/assets/{app-update-DWy3AK8N.js → app-update-A3wZafCD.js} +1 -1
  53. package/web/assets/{approval-confirm-CDGLUuxy.js → approval-confirm-CryF68cs.js} +1 -1
  54. package/web/assets/{assets-api-BGMZsyC4.js → assets-api-CPakJhYf.js} +1 -1
  55. package/web/assets/{board-projects-DjGBcX8k.js → board-projects-jIIRo-OH.js} +1 -1
  56. package/web/assets/{bots-store-Ck_jncK7.js → bots-store-Dc07jUzl.js} +1 -1
  57. package/web/assets/{chat-api-BqA8nXly.js → chat-api-DrjHZunL.js} +1 -1
  58. package/web/assets/{client-store-e4OXhDNK.js → client-store-vgpSLnwK.js} +1 -1
  59. package/web/assets/command-Cf3AX_Nt.js +1 -0
  60. package/web/assets/{config-search-a0xjM1yz.js → config-search-DLwaZPQ0.js} +1 -1
  61. package/web/assets/{desktop-hosts-DsTa6yr4.js → desktop-hosts-0e3KPpOY.js} +1 -1
  62. package/web/assets/{dialog-DldLiTwf.js → dialog-Cfk77z7g.js} +1 -1
  63. package/web/assets/{event-stream-DRv0u06j.js → event-stream-Viv-Ob7U.js} +1 -1
  64. package/web/assets/{events-C8OUQmIW.js → events-Wogs03GD.js} +1 -1
  65. package/web/assets/{folder-paths-CfRbR0Ik.js → folder-paths-JS7ynXVP.js} +1 -1
  66. package/web/assets/{hosts-DbXwJrWt.js → hosts-BOC6FyGx.js} +1 -1
  67. package/web/assets/{http-response-DEs9jkgT.js → http-response-CSCIVa2S.js} +1 -1
  68. package/web/assets/{http-B-XVZUum.js → http-zidLhKOq.js} +1 -1
  69. package/web/assets/i18n-DojWxWRu.js +1 -0
  70. package/web/assets/{index-j6s460ui.css → index-CrtNFCj_.css} +1 -1
  71. package/web/assets/{index-CiyAfWLi.js → index-DfZr_SBB.js} +2 -2
  72. package/web/assets/{machine-messages-CKHf8pyL.js → machine-messages-BJSM1X90.js} +1 -1
  73. package/web/assets/{machines-api-BeimiMiu.js → machines-api-C_Mtpsx-.js} +1 -1
  74. package/web/assets/{memory-api-Cu3MEsQE.js → memory-api-Bgy-5-wQ.js} +1 -1
  75. package/web/assets/{mount-app-ISo-f47e.js → mount-app-G6kgCLuV.js} +2 -2
  76. package/web/assets/{permission-rules-api-bHINce43.js → permission-rules-api-B_E6IQKz.js} +1 -1
  77. package/web/assets/{pick-system-directory-D1GGkOTf.js → pick-system-directory-LTM6ma78.js} +1 -1
  78. package/web/assets/{placements-9_rV4h0k.js → placements-C9ibKMbf.js} +2 -2
  79. package/web/assets/{popover-DGWRnOht.js → popover-CJZagMlP.js} +1 -1
  80. package/web/assets/{public-B7wKOz_X.js → public-BoVk_M9e.js} +2 -2
  81. package/web/assets/{public-lAWjPSYc.js → public-DAyGFlph.js} +1 -1
  82. package/web/assets/{public-DRF_OfnY.js → public-EyctVdZl.js} +1 -1
  83. package/web/assets/{public-Dr8_scp5.js → public-RXIeJTl_.js} +2 -2
  84. package/web/assets/{public-components-by-7di2-.js → public-components-DUyD_N-P.js} +1 -1
  85. package/web/assets/public-diff-BHHFwd2h.js +1 -0
  86. package/web/assets/public-events-CF9LX0aU.js +1 -0
  87. package/web/assets/{public-flags-DHN44K2T.js → public-flags-DRJJOuZP.js} +1 -1
  88. package/web/assets/{public-folder-dialog-Gkbm4LRI.js → public-folder-dialog-BCVCXKem.js} +1 -1
  89. package/web/assets/{public-greeting-Bdpk4piS.js → public-greeting-BWAXeejh.js} +1 -1
  90. package/web/assets/{public-session-CtusCiv8.js → public-session-DS7Ggm0I.js} +1 -1
  91. package/web/assets/{public-sidebar-DmWVSBL3.js → public-sidebar-BscZFI63.js} +1 -1
  92. package/web/assets/{runtime-capabilities-store-MtXRlSIi.js → runtime-capabilities-store-Pf6H3F8g.js} +1 -1
  93. package/web/assets/{safe-mode-instance-CpOBP8Nz.js → safe-mode-instance-DW1In7Kt.js} +1 -1
  94. package/web/assets/safe-mode-sentinel-Dj3En0LX.js +1 -0
  95. package/web/assets/{session-change-summary-api-CAkw4_-l.js → session-change-summary-api-ytql-8Mb.js} +1 -1
  96. package/web/assets/{session-home-CJcIlNWK.js → session-home-CYMA_6K8.js} +1 -1
  97. package/web/assets/{session-inspector-store-C3BluNoW.js → session-inspector-store-C8XTJKcv.js} +1 -1
  98. package/web/assets/{session-questions-BPKyVhzp.js → session-questions-DODg4dBd.js} +1 -1
  99. package/web/assets/{session-scope-ddZfvpZE.js → session-scope-UGYN3ar9.js} +1 -1
  100. package/web/assets/{session-tree-actions-_YCQsWye.js → session-tree-actions-EtL6Nf5T.js} +1 -1
  101. package/web/assets/{session-tree-summary-BLsTrwUq.js → session-tree-summary-JM5v4ugd.js} +1 -1
  102. package/web/assets/{session-web-preview-DZOVkeBU.js → session-web-preview-BsCgxxv4.js} +1 -1
  103. package/web/assets/{shortcuts-C6ddcUau.js → shortcuts-DDY3WKNk.js} +1 -1
  104. package/web/assets/{side-chat-context-C7vwSBGo.js → side-chat-context-C2I0EzIE.js} +4 -4
  105. package/web/assets/{sidebar-B7HP3-3A.js → sidebar-BTaR7jH_.js} +1 -1
  106. package/web/assets/{sidebar-store-Bv_D4lVD.js → sidebar-store-Bmpse81N.js} +1 -1
  107. package/web/assets/{speech-session-DI3T3jpW.js → speech-session-DOQkdJHS.js} +1 -1
  108. package/web/assets/{startup-queries-B2k6wlnS.js → startup-queries-D3JCr4DY.js} +1 -1
  109. package/web/assets/{use-i18n-CsOCclo6.js → use-i18n-D7gqe3X9.js} +1 -1
  110. package/web/assets/{use-open-bot-BPSaOfrG.js → use-open-bot-CKhA9NsG.js} +1 -1
  111. package/web/assets/{use-studio-actions-Cvz4jiDa.js → use-studio-actions-CvFfWXni.js} +1 -1
  112. package/web/assets/{useCatalogProjects-D3mDdYej.js → useCatalogProjects-D4S7sSAX.js} +1 -1
  113. package/web/assets/{useMachines-BwvKcPVd.js → useMachines-CGhATQIK.js} +1 -1
  114. package/web/assets/{useNewProjectPicker-DfE1or_O.js → useNewProjectPicker-BhuGTAp2.js} +2 -2
  115. package/web/assets/{useNow-CuwOIh4H.js → useNow-BHuHuBZk.js} +1 -1
  116. package/web/assets/{usePhoneShell-e-CScTJH.js → usePhoneShell-O2Livo2-.js} +1 -1
  117. package/web/assets/{useSessionRowActions-DUufel_k.js → useSessionRowActions-a38hlfs2.js} +1 -1
  118. package/web/assets/{useSidebarModel-CShQi_Fw.js → useSidebarModel-CQwUXEO7.js} +1 -1
  119. package/web/assets/{workspace-folders-Dq7V_wOF.js → workspace-folders-BrFjAGZo.js} +1 -1
  120. package/web/assets/{workspace-order-store-PI98x5sR.js → workspace-order-store-DLX9fhcf.js} +1 -1
  121. package/web/index.html +2 -2
  122. package/web/assets/FocusRuntimeControls-CoxLbl8K.js +0 -2
  123. package/web/assets/command-LVPgEdXI.js +0 -1
  124. package/web/assets/i18n-DyMZgkZI.js +0 -1
  125. package/web/assets/public-diff-pNrf0LGG.js +0 -1
  126. package/web/assets/public-events-DmLE1dVC.js +0 -1
  127. package/web/assets/safe-mode-sentinel-BGslsjrl.js +0 -1
@@ -1,2 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{i as t,n,r}from"./vendor-react-DwNgTV1j.js";import{f as i,p as a}from"./i18n-DyMZgkZI.js";import{t as o}from"./use-i18n-CsOCclo6.js";import{p as s}from"./query-DFQayLF5.js";import{t as c}from"./useQuery-DfOU-27z.js";import{t as l}from"./createLucideIcon-Cd-3GVxJ.js";import{t as u}from"./arrow-up-DST6-qVQ.js";import{t as d}from"./braces-DQcXLGFF.js";import{t as f}from"./check-2vYc6QaP.js";import{t as p}from"./chevron-right-C3t2Rckj.js";import{t as m}from"./chevrons-up-down-C2sEPdAh.js";import{t as h}from"./corner-down-left-DalpwXuX.js";import{t as g}from"./message-square-text-C5MJw0FL.js";import{t as _}from"./pencil-U08v_vV9.js";import{t as v}from"./refresh-cw-TbWxTY4K.js";import{t as y}from"./square-bHHVTT3G.js";import{t as b}from"./users-CCtFZzwl.js";import{t as x}from"./wrench-6pg6_bqI.js";import{t as S}from"./x-07u4-129.js";import{t as C}from"./dist-41X0pdUs.js";import{a as w,r as T,t as E}from"./popover-DGWRnOht.js";import{t as D}from"./slider-De8rWVNs.js";import{t as O}from"./utils-C8uzG5AZ.js";import{n as k}from"./button-CCcCN8tE.js";import{t as A}from"./kbd-CAufZTkl.js";import{s as j}from"./shortcuts-C6ddcUau.js";import{n as M,o as N,r as ee,t as te}from"./sheet-BTaIEX4w.js";import{n as ne,t as re}from"./chat-api-BqA8nXly.js";import{r as P}from"./format-DMJQzoZ7.js";import{t as ie}from"./StatusGlyph-1KgitlUg.js";import{a as ae,i as oe,n as se,o as ce,p as le,r as ue,t as de,u as fe}from"./command-LVPgEdXI.js";import{t as pe}from"./model-display-kDwvtxrW.js";var F=l(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),me=l(`square-slash`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]),I=e(t(),1);function he(e){let t=e.match(/^\/btw(?:\s+([\s\S]*))?$/);return t?(t[1]||``).trim():null}function L(e,t,n,r){return n.length?[{invocation:`/${e}`,description:t},...n.map(t=>({invocation:`/${e} ${t.value}`,description:t.label,current:t.current,run:()=>r(t.value)}))]:[]}function ge({t:e,models:t,model:n,onModel:r,thinkingLevels:i,thinkingLevel:a,thinkingLabel:o,onThinking:s,executionModes:c,executionMode:l,executionLabel:u,onExecutionMode:d,runModes:f,runMode:p,runModeLabel:m,onRunMode:h}){return[...L(`model`,e(`chat:commands.builtin.model`),t.map(e=>({value:e.key,label:e.providerName?`${e.label} · ${e.providerName}`:e.label,current:e.key===n})),r),...L(`effort`,e(`chat:commands.builtin.effort`),i.map(e=>({value:e,label:o(e),current:e===a})),s),...L(`approval`,e(`chat:commands.builtin.approval`),c.map(e=>({value:e,label:u(e),current:e===l})),d),...f.length>1?L(`run`,e(`chat:commands.builtin.run`),f.map(e=>({value:e,label:m(e),current:e===p})),h):[]]}function _e(e,t,n){let r=e=>e.toLocaleLowerCase(n),i=r(t),a=i.search(/\s/);if(a<0)return e.filter(e=>!e.invocation.includes(` `)&&r(`${e.invocation} ${e.description}`).includes(i));let o=`/${i.slice(0,a)} `,s=i.slice(a).trim();return e.filter(e=>r(e.invocation).startsWith(o)&&r(`${e.invocation} ${e.description}`).includes(s))}var ve=10485760,ye=20971520,R=new Set([`txt`,`md`,`json`,`js`,`jsx`,`ts`,`tsx`,`css`,`html`,`xml`,`yaml`,`yml`,`csv`,`log`,`py`,`java`,`go`,`rs`,`sh`,`ps1`,`toml`,`sql`]),z=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`bmp`,`svg`]),B=new Set([`pdf`,`docx`,`pptx`,`xlsx`,`odt`,`odp`,`ods`,`rtf`,`epub`]),be=[`image/*`,`text/*`,`application/json`,...[...z,...R,...B].map(e=>`.${e}`)].join(`,`);function V(e){let t=[...e?.files||[]];return t.length?t:[...e?.items||[]].filter(e=>e.kind===`file`).map(e=>e.getAsFile?.()).filter(e=>!!e)}function xe(e){return[...e?.types||[]].includes(`Files`)}function Se(e,t){return new Promise((n,r)=>{let i=new FileReader;i.onload=()=>n(String(i.result).split(`,`)[1]||``),i.onerror=()=>r(i.error||Error(t(`chat:attachments.couldNotReadFile`))),i.readAsDataURL(e)})}function Ce(e){return e.toLowerCase().split(`.`).at(-1)||``}async function we(e,t){let n=[...e].slice(0,8),r=[];for(let e of n){if(e.size>ve)throw Error(t(`chat:attachments.nameExceedsThe10MBLimit`,{name:e.name}));let n=Ce(e.name),i={id:`${e.name}-${e.lastModified}-${e.size}`,name:e.name,mimeType:e.type||`application/octet-stream`,size:e.size};if(e.type.startsWith(`image/`)||z.has(n))r.push({...i,kind:`image`,data:await Se(e,t)});else if(e.type.startsWith(`text/`)||e.type===`application/json`||R.has(n))r.push({...i,kind:`text`,text:await e.text()});else if(B.has(n))r.push({...i,kind:`document`,extension:n,data:await Se(e,t)});else throw Error(t(`chat:attachments.nameIsNotSupportedChooseAnImageOrTextCodeFile`,{name:e.name}))}return r}function Te(e){return e.split(/[\\/]/).filter(Boolean).at(-1)||e}function Ee(e){return[...e].map(e=>String(e||``).trim()).filter(Boolean).slice(0,8).map(e=>({id:`path:${e}`,kind:`path`,name:Te(e),path:e}))}function De(e=[],t,n){let r=(0,I.useCallback)((e,t)=>a(e,i(),t),[]),[o,s]=(0,I.useState)(()=>[...e]),[c,l]=(0,I.useState)(``),[u,d]=(0,I.useState)([]),f=(0,I.useRef)(new Map),p=(0,I.useRef)(0),m=(0,I.useRef)(n);m.current=n,(0,I.useEffect)(()=>{let e=f.current;return d([]),l(``),()=>{for(let t of e.values())t.cancelled=!0;e.clear()}},[n]);let h=(0,I.useRef)([...e]),g=(0,I.useCallback)(e=>{h.current=e,s(e),t?.(e)},[t]),_=(0,I.useCallback)(async e=>{let t=n,i=[...e||[]].slice(0,8).map(e=>{let t=`preparing-${++p.current}`,n={name:e.name,cancelled:!1};return f.current.set(t,n),{id:t,job:n,file:e}}),a=()=>d([...f.current].map(([e,t])=>({id:e,name:t.name})));a(),l(``);let o=!1;for(let{id:e,job:n,file:s}of i)try{let i=await we([s],r);if(n.cancelled||m.current!==t||!f.current.has(e))continue;let a=[...h.current,...i].slice(0,8);if(a.filter(e=>e.kind!==`path`).reduce((e,t)=>e+(t.size||0),0)>ye)throw Error(r(`chat:attachments.totalAttachmentSizeCannotExceed20MB`));g(a),o=!0}catch(e){!n.cancelled&&m.current===t&&l(e instanceof Error?e.message:String(e))}finally{f.current.delete(e),m.current===t&&a()}return o},[n,g,r]);return{attachments:o,attachmentError:c,preparingAttachments:u,addFiles:_,pasteFiles:(0,I.useCallback)(e=>{let t=V(e.clipboardData);t.length&&(e.preventDefault(),_(t))},[_]),dropFiles:(0,I.useCallback)(e=>{if(!xe(e.dataTransfer))return;e.preventDefault();let t=V(e.dataTransfer);t.length&&_(t)},[_]),removeAttachment:(0,I.useCallback)(e=>{let t=f.current.get(e);if(t){t.cancelled=!0,f.current.delete(e),d([...f.current].map(([e,t])=>({id:e,name:t.name})));return}g(h.current.filter(t=>t.id!==e))},[g]),clearAttachments:(0,I.useCallback)(()=>{for(let e of f.current.values())e.cancelled=!0;f.current.clear(),d([]),g([])},[g]),addAttachments:(0,I.useCallback)(e=>{if(m.current!==n)return;l(``);let t=[...h.current];for(let n of e)t.some(e=>e.id===n.id)||t.push(n);g(t.slice(0,8))},[n,g]),replaceAttachments:g,setError:(0,I.useCallback)(e=>{l(e instanceof Error?e.message:String(e||``))},[])}}var Oe=`new-task`,H=new Map,U=new Map;function ke(e,t){let n=t.match(/^\/[^\s]*(?:\s+([\s\S]*))?$/),r=(n?n[1]||``:t).trim();return`${e}${r?` ${r}`:` `}`}function Ae(e){return{text:e?.text||``,attachments:[...e?.attachments||[]]}}function W(e){return Ae(H.get(e))}function G(e,t){if(!e)return;let n={...W(e),...t};n.attachments=[...n.attachments];let r=W(e);r.text===n.text&&r.attachments.length===n.attachments.length&&r.attachments.every((e,t)=>e===n.attachments[t])||(r.text!==n.text&&U.set(e,(U.get(e)||0)+1),H.delete(e),!(!n.text&&!n.attachments.length)&&H.set(e,n))}function je(e){U.set(e,(U.get(e)||0)+1),H.delete(e)}function Me(e,t){let n=[...e.attachments],r=new Set(n.map(e=>e.id));for(let e of t.attachments){let t=e.id;if(!t||r.has(t)){let n=1;do t=`${e.id||`attachment`}-restored-${n++}`;while(r.has(t))}r.add(t),n.push({...e,id:t})}return{text:e.text&&t.text?`${e.text}\n${t.text}`:e.text||t.text,attachments:n}}function Ne(e){let t=(0,I.useRef)(e);t.current=e;let n=(0,I.useRef)(!0);(0,I.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]);let r=(0,I.useRef)(W(e)),[i,a]=(0,I.useState)(r.current.text),o=(0,I.useCallback)(t=>G(e,{attachments:t}),[e]),s=De(r.current.attachments,o,e),c=s.replaceAttachments,l=s.clearAttachments;return(0,I.useEffect)(()=>{let t=W(e);a(t.text),c(t.attachments)},[c,e]),{value:i,updateValue:(0,I.useCallback)(t=>{a(t),G(e,{text:t})},[e]),selection:s,clearDraft:(0,I.useCallback)(()=>{let r=W(e);r.text!==i||r.attachments.length!==s.attachments.length||r.attachments.some((e,t)=>e!==s.attachments[t])||(je(e),!(!n.current||t.current!==e)&&(a(``),l()))},[l,s.attachments,e,i]),restoreDraft:(0,I.useCallback)(r=>{let i=Me(W(e),r);return G(e,i),!n.current||t.current!==e?!1:(a(i.text),c(i.attachments),!0)},[c,e]),captureSubmission:(0,I.useCallback)(()=>{let r=W(e),i=U.get(e)||0,o=!1;return{accept(){if(o)return;o=!0;let s=W(e),l={text:(U.get(e)||0)===i?``:s.text,attachments:s.attachments.filter(e=>!r.attachments.includes(e))};G(e,l),!(!n.current||t.current!==e)&&(a(l.text),c(l.attachments))}}},[c,e])}}var Pe=e(n(),1);function Fe({anchor:e,menu:t,viewport:n,placement:r=`top`,align:i=`start`,maxHeight:a=1/0}){let o=n.top+8,s=Math.max(o,n.top+n.height-8),c=n.left+8,l=Math.max(c,n.left+n.width-8),u={top:Math.max(0,Math.min(e.top,s)-o-8),bottom:Math.max(0,s-Math.max(e.bottom,o)-8)},d=Math.min(t.height,a),f=r===`top`?`bottom`:`top`,p=d>u[r]&&u[f]>u[r]?f:r,m=Math.min(a,u[p]),h=Math.min(d,m),g=Math.min(t.width,l-c);return{side:p,left:Math.max(c,Math.min(i===`end`?e.right-g:e.left,l-g)),top:Math.max(o,Math.min(p===`top`?e.top-8-h:e.bottom+8,s-h)),width:g,maxHeight:m}}var K=r();function Ie({open:e,anchorRef:t,menuRef:n,placement:r=`top`,align:i=`start`,matchAnchorWidth:a=!1,maxHeight:o,id:s,className:c,role:l,ariaLabel:u,onClose:d,children:f}){return(0,I.useEffect)(()=>{if(!e||!d)return;let t=e=>{e.key===`Escape`&&(e.stopPropagation(),d())};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e,d]),(0,I.useLayoutEffect)(()=>{if(!e)return;let s=()=>{let e=n.current,s=t.current;if(!e||!s)return;let c=s.getBoundingClientRect(),l=window.visualViewport;e.style.width=a?`${c.width}px`:``;let u=Fe({anchor:c,menu:{width:e.getBoundingClientRect().width,height:e.scrollHeight},viewport:{left:l?.offsetLeft??0,top:l?.offsetTop??0,width:l?.width??window.innerWidth,height:l?.height??window.innerHeight},placement:r,align:i,maxHeight:o});e.dataset.side=u.side,e.style.maxHeight=`${u.maxHeight}px`,e.style.overflowY=`auto`,e.style.width=`${u.width}px`,e.style.top=`${u.top}px`,e.style.bottom=`auto`,e.style.right=`auto`,e.style.left=`${u.left}px`};s();let c=null,l=()=>{c===null&&(c=window.requestAnimationFrame(()=>{c=null,s()}))},u=typeof ResizeObserver>`u`?null:new ResizeObserver(l);return n.current&&u?.observe(n.current),t.current&&u?.observe(t.current),window.addEventListener(`resize`,s),window.addEventListener(`scroll`,s,!0),window.visualViewport?.addEventListener(`resize`,l),window.visualViewport?.addEventListener(`scroll`,l),()=>{u?.disconnect(),c!==null&&window.cancelAnimationFrame(c),window.removeEventListener(`resize`,s),window.removeEventListener(`scroll`,s,!0),window.visualViewport?.removeEventListener(`resize`,l),window.visualViewport?.removeEventListener(`scroll`,l)}},[e,t,n,r,i,a,o]),e?(0,Pe.createPortal)((0,K.jsx)(`div`,{ref:n,id:s,className:c,style:{position:`fixed`,zIndex:65},role:l,"aria-label":u,children:f}),document.body):null}function Le({resourceKey:e,loadCommands:t,builtinCommands:n=[],value:r,onChange:i,inputRef:a,placement:s=`top`}){let{t:c,language:l}=o(),u=(0,I.useId)(),p=(0,I.useRef)(null),m=r.match(/^\/([^\n]{0,120})$/),[h,g]=(0,I.useState)(``),[_,v]=(0,I.useState)(null),[y,b]=(0,I.useState)(!1),[x,S]=(0,I.useState)(!1),[C,w]=(0,I.useState)(0),T=m?.[1]||``,E=/\s/.test(T),D=(0,I.useRef)(t);D.current=t;let O=(0,I.useMemo)(()=>_e(n,T,l),[n,l,T]),k=!!(m&&h!==r&&(!E||O.length));(0,I.useEffect)(()=>{g(``),v(null),S(!1)},[e]),(0,I.useEffect)(()=>{if(!k||_)return;let e=!0;return b(!0),S(!1),D.current().then(t=>{e&&v(t.commands||[])}).catch(()=>{e&&(v([]),S(!0))}).finally(()=>e&&b(!1)),()=>{e=!1}},[_,k,e]);let A=(0,I.useMemo)(()=>{let e=O.map(e=>({kind:`builtin`,command:e}));if(E)return e;let t=T.toLocaleLowerCase(l),n=(_||[]).filter(e=>!t||`${e.invocation} ${e.name} ${e.description}`.toLocaleLowerCase(l).includes(t));return[...e,...n.map(e=>({kind:`resource`,command:e}))]},[E,O,_,l,T]);(0,I.useEffect)(()=>{w(0)},[T,_]);let j=()=>{g(r)},M=e=>{if(e.kind===`builtin`){let t=e.command.run?``:`${e.command.invocation} `;i(t),g(``),w(0),e.command.run&&e.command.run(),requestAnimationFrame(()=>{let e=a.current;e&&(e.focus(),e.setSelectionRange(t.length,t.length))});return}let t=ke(e.command.invocation,r);i(t),g(t),requestAnimationFrame(()=>{let e=a.current;e&&(e.focus(),e.setSelectionRange(t.length,t.length))})};(0,I.useEffect)(()=>{if(!k)return;let e=e=>{if(document.activeElement===a.current){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),j();return}A.length&&(e.key===`ArrowDown`?(e.preventDefault(),e.stopPropagation(),w(e=>(e+1)%A.length)):e.key===`ArrowUp`?(e.preventDefault(),e.stopPropagation(),w(e=>(e-1+A.length)%A.length)):(e.key===`Tab`||e.key===`Enter`&&!e.shiftKey)&&(e.preventDefault(),e.stopPropagation(),M(A[Math.min(C,A.length-1)])))}};return document.addEventListener(`keydown`,e,!0),()=>document.removeEventListener(`keydown`,e,!0)}),(0,I.useEffect)(()=>{let e=a.current;if(!k||!e)return;let t={role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":`true`,"aria-controls":u,"aria-activedescendant":A.length?`${u}-${Math.min(C,A.length-1)}`:``},n=Object.keys(t).map(t=>[t,e.getAttribute(t)]);for(let[n,r]of Object.entries(t))r?e.setAttribute(n,r):e.removeAttribute(n);return()=>{for(let[t,r]of n)t&&(r===null?e.removeAttribute(t):e.setAttribute(t,r))}},[C,a,u,k,A.length]);let N={user:c(`chat:commands.scope.user`),project:c(`chat:commands.scope.project`),package:c(`chat:commands.scope.package`),custom:c(`chat:commands.scope.custom`)};return(0,K.jsx)(Ie,{open:k,anchorRef:a,menuRef:p,placement:s,matchAnchorWidth:!0,maxHeight:330,id:u,role:`listbox`,ariaLabel:c(`chat:commands.open`),className:`permission-mode-menu composer-command-menu overflow-y-auto rounded-md bg-solid p-1 text-content shadow-float`,children:(0,K.jsxs)(`div`,{className:`chat-resource-list composer-command-list flex min-h-0 [flex:1_1_0] flex-col gap-px overflow-y-auto [overscroll-behavior:contain] [scrollbar-gutter:stable] [touch-action:pan-y] [&_>_button]:grid [&_>_button]:w-full [&_>_button]:cursor-pointer [&_>_button]:grid-cols-[28px_minmax(0,1fr)_auto] [&_>_button]:items-center [&_>_button]:gap-2 [&_>_button]:rounded-sm [&_>_button]:px-1.5 [&_>_button]:py-1 [&_>_button]:text-left [&_>_button]:text-content [&_>_button.active]:bg-surface-hover max-[650px]:[&_>_button]:min-h-11 [&_button_>_span:nth-child(2)]:flex [&_button_>_span:nth-child(2)]:min-w-0 [&_button_>_span:nth-child(2)]:flex-col [&_strong]:truncate [&_strong]:font-mono [&_strong]:text-[13px] [&_strong]:font-medium [&_small]:truncate [&_small]:font-sans [&_small]:text-xs [&_small]:font-normal [&_small]:text-content-muted [&_em]:text-xs [&_em]:whitespace-nowrap [&_em]:text-content-muted [&_em]:not-italic [&_>_p]:m-auto [&_>_p]:px-2 [&_>_p]:py-1.5 [&_>_p]:text-xs [&_>_p]:text-content-muted`,children:[A.map((e,t)=>{let{command:n}=e,r=e.kind===`builtin`?e.command.current?f:me:e.command.source===`prompt`?F:d,i=e.kind===`resource`?e.command:null;return(0,K.jsxs)(`button`,{type:`button`,role:`option`,id:`${u}-${t}`,"aria-selected":t===C,className:t===C?`active`:``,onMouseEnter:()=>w(t),onMouseDown:e=>e.preventDefault(),onClick:()=>M(e),children:[(0,K.jsx)(`span`,{className:`list-icon grid size-7 place-items-center rounded-sm bg-surface-muted text-content-secondary`,children:(0,K.jsx)(r,{size:15})}),(0,K.jsxs)(`span`,{className:`composer-command-copy`,children:[(0,K.jsxs)(`strong`,{children:[n.invocation,i?.argumentHint&&(0,K.jsxs)(`small`,{children:[` `,i.argumentHint]})]}),(0,K.jsx)(`small`,{children:n.description||c(`chat:commands.noDescription`)})]}),(0,K.jsx)(`em`,{children:i?(0,K.jsxs)(K.Fragment,{children:[i.source===`prompt`?c(`chat:commands.prompt`):c(`chat:commands.skill`),` · `,N[i.scope]]}):e.kind===`builtin`&&e.command.current?c(`chat:commands.builtin.current`):c(`chat:commands.builtin.label`)})]},`${e.kind}:${n.invocation}`)}),!A.length&&(0,K.jsx)(`p`,{children:c(y?`chat:commands.loading`:x?`chat:commands.loadError`:`chat:commands.empty`)})]})})}var q=`relative max-[650px]:after:absolute max-[650px]:after:-inset-1`,Re=`inline-flex h-7 min-w-0 shrink cursor-pointer items-center gap-1.5 rounded-sm border border-transparent px-2 text-[13px] text-content-secondary transition-colors hover:bg-surface-hover hover:text-content aria-expanded:bg-surface-hover aria-expanded:text-content max-[650px]:h-9 max-[650px]:rounded-full max-[650px]:bg-surface-muted max-[650px]:dark:bg-surface-active max-[650px]:px-3 max-[650px]:text-content min-[651px]:pointer-coarse:h-11 ${q}`,ze=`grid size-8 min-w-8 flex-none cursor-pointer place-items-center rounded-sm border-0 bg-transparent text-content-muted transition-colors hover:bg-surface-hover hover:text-content disabled:cursor-not-allowed disabled:opacity-50 max-[650px]:size-9 max-[650px]:min-w-9 min-[651px]:pointer-coarse:size-11 min-[651px]:pointer-coarse:min-w-11 ${q}`,J=`max-[650px]:size-4`;function Be(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=String(t%60).padStart(2,`0`);return n?`${n}:${String(r).padStart(2,`0`)}:${i}`:`${r}:${i}`}function Ve({startedAt:e}){let[t,n]=(0,I.useState)(()=>Date.now());(0,I.useEffect)(()=>{let e=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(e)},[]);let r=le(e,null,t);return r?(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 font-mono text-[12.5px] text-content-muted tabular-nums`,"data-tray-clock":!0,children:Be(r)}):null}var Y=`flex min-h-[34px] min-w-0 items-center gap-2 pr-1.5 pl-3 text-[13px] max-[650px]:min-h-11 max-[650px]:pr-0 pointer-coarse:min-h-11`,X=`grid size-[26px] flex-none cursor-pointer place-items-center rounded-sm text-content-muted opacity-0 transition-opacity duration-(--d-fast) group-hover/queued:opacity-100 group-focus-within/queued:opacity-100 hover:bg-surface-hover hover:text-content focus-visible:opacity-100 disabled:cursor-default disabled:opacity-40 max-[650px]:size-11 max-[650px]:opacity-100 pointer-coarse:size-11 pointer-coarse:opacity-100 [@media(hover:none)]:opacity-100`,He=`inline-flex h-[26px] shrink-0 cursor-pointer items-center gap-1.5 rounded-sm px-2 text-[13px] text-content transition-colors hover:bg-surface-hover disabled:cursor-default disabled:opacity-60 max-[650px]:h-11 max-[650px]:min-w-[72px] max-[650px]:justify-center pointer-coarse:h-11 pointer-coarse:min-w-[72px]`,Ue=`inline-block h-[18px] max-w-[40%] flex-none truncate max-[650px]:max-w-full rounded-xs border border-stroke bg-solid px-1.5 text-[11.5px] leading-4 text-content-muted`,We=3;function Ge({workspace:e,streaming:t,onDeliver:n,onDismiss:r}){let{t:i}=o(),[a,s]=(0,I.useState)(!1),c=i(`chat:chatHistoryPage.untitledChat`),{neighbours:l,messages:u}=e,d=e=>{!e||a||(s(!0),e().finally(()=>s(!1)))},f=l[0],p=f?l.length===1?i(`chat:workspaceActivity.neighbour`,{title:f.title||c,count:f.fileCount}):i(`chat:workspaceActivity.neighbours`,{count:l.length}):``,m=l.map(e=>`${e.title||c}: ${e.files.join(`, `)}`).join(`
2
- `);return(0,K.jsxs)(K.Fragment,{children:[f&&(0,K.jsxs)(`div`,{className:Y,"data-workspace-neighbours":l.length,children:[(0,K.jsx)(b,{size:14,"aria-hidden":`true`,className:`flex-none text-content-muted`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:m,children:p})]}),u.length>0&&(0,K.jsx)(`ul`,{className:`m-0 flex min-w-0 list-none flex-col p-0 [&>*+*]:border-t [&>*+*]:border-stroke-soft`,"aria-label":i(`chat:workspaceActivity.label`),"data-session-messages":u.length,children:u.slice(0,We).map((e,o)=>(0,K.jsxs)(`li`,{className:Y,children:[(0,K.jsx)(g,{size:14,"aria-hidden":`true`,className:`flex-none text-content-muted max-[650px]:hidden`}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2 max-[650px]:flex-col max-[650px]:items-start max-[650px]:gap-0.5 max-[650px]:py-1.5`,children:[(0,K.jsx)(`span`,{className:Ue,children:i(`chat:workspaceActivity.from`,{title:e.from.title||c})}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-content [overflow-wrap:anywhere] max-[650px]:line-clamp-2 max-[650px]:w-full max-[650px]:whitespace-normal`,title:e.text,children:e.text})]}),o===0&&!t&&(0,K.jsxs)(K.Fragment,{children:[n&&(0,K.jsx)(`button`,{type:`button`,className:He,disabled:a,"aria-busy":a||void 0,"data-session-messages-deliver":!0,onClick:()=>d(n),children:i(`chat:workspaceActivity.deliver`)}),r&&(0,K.jsx)(`button`,{type:`button`,className:O(X,`opacity-100`),"aria-label":i(`chat:workspaceActivity.dismiss`),title:i(`chat:workspaceActivity.dismiss`),disabled:a,"data-session-messages-dismiss":!0,onClick:()=>d(r),children:(0,K.jsx)(S,{size:14,"aria-hidden":`true`})})]})]},e.id))})]})}function Ke({streaming:e,compaction:t,startedAt:n,stopping:r=!1,onStop:i,queuedInputs:a=[],withdrawingInputIds:s=[],onEdit:c,onCancel:l,onSendNow:u,runRow:d=!0,queueList:f=!0,workspace:p=null,onDeliverSessionMessages:m,onDismissSessionMessages:g}){let{t:v}=o(),b=!!t?.active,x=!!e&&d||b,C=f?a:[];if(!x&&!C.length&&!p)return null;let w=v(`chat:focusSession.sentToTheRunningAgent`);return(0,K.jsxs)(`div`,{className:`composer-tray mx-3.5 flex min-w-0 flex-col overflow-hidden rounded-t-(--r-lg) border border-b-0 border-stroke bg-well text-content-secondary max-[650px]:mx-2 [&>*+*]:border-t [&>*+*]:border-stroke`,"data-composer-tray":!0,children:[p&&(0,K.jsx)(Ge,{workspace:p,streaming:!!e,onDeliver:m,onDismiss:g}),x&&(0,K.jsxs)(`div`,{className:Y,"data-run-bar":b?`compacting`:`running`,children:[(0,K.jsxs)(`span`,{role:`status`,className:`flex min-w-0 flex-1 items-center gap-2`,children:[b?(0,K.jsx)(k,{className:`size-3.5 flex-none text-content-secondary`}):(0,K.jsx)(ie,{status:`run`,className:`size-4`}),(0,K.jsx)(`span`,{className:`shrink-0 text-content`,children:v(b?`chat:focusSession.compactingContext`:`chat:focusSession.running`)}),e&&(0,K.jsx)(Ve,{startedAt:n})]}),e&&i&&(0,K.jsxs)(`button`,{type:`button`,className:He,"aria-label":v(r?`chat:focusSession.stopping`:`chat:focusSession.stop`),title:v(`chat:focusSession.stopRunShortcut`),"aria-busy":r||void 0,disabled:r,onClick:i,"data-run-stop":!0,children:[(0,K.jsx)(y,{size:10,fill:`currentColor`,"aria-hidden":`true`}),v(r?`chat:focusSession.stopping`:`chat:focusSession.stop`),(0,K.jsx)(A,{className:`max-[650px]:hidden pointer-coarse:hidden`,children:`Esc`})]})]}),C.length>0&&(0,K.jsx)(`ul`,{className:`m-0 flex max-h-[136px] min-w-0 list-none flex-col overflow-x-hidden overflow-y-auto overscroll-contain p-0 [&>*+*]:border-t [&>*+*]:border-stroke-soft`,"aria-label":w,"data-pisper-queue-size":C.length,tabIndex:C.length>3?0:void 0,children:C.map((e,t)=>{let n=typeof e.id==`string`?e.id:``,r=s.includes(n),i=!n||r,a=String(e.text||``);return(0,K.jsxs)(`li`,{className:O(Y,`group/queued`),"aria-busy":r||void 0,children:[(0,K.jsx)(`span`,{className:`inline-flex h-[18px] flex-none items-center rounded-xs border border-stroke bg-solid px-1.5 text-[11.5px] text-content-muted`,"data-queued-behavior":e.behavior===`steer`?`steer`:`followUp`,children:e.behavior===`steer`?v(`board:composer.queuedSteer`):v(`board:composer.queuedFollowUp`)}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-content [overflow-wrap:anywhere]`,title:a,children:a}),u&&(0,K.jsx)(`button`,{type:`button`,className:X,"aria-label":v(`board:composer.sendQueuedNow`),title:v(`board:composer.sendQueuedNow`),disabled:i,"data-queued-send-now":!0,onClick:()=>u(n),children:(0,K.jsx)(h,{size:14,"aria-hidden":`true`})}),c&&(0,K.jsx)(`button`,{type:`button`,className:X,"aria-label":v(`board:composer.editQueued`),title:v(`board:composer.editQueued`),disabled:i,"data-queued-edit":!0,onClick:()=>void c(n),children:(0,K.jsx)(_,{size:14,"aria-hidden":`true`})}),l&&(0,K.jsx)(`button`,{type:`button`,className:X,"aria-label":v(`board:composer.cancelQueued`),title:v(`board:composer.cancelQueued`),disabled:i,"data-queued-cancel":!0,onClick:()=>void l(n),children:(0,K.jsx)(S,{size:14,"aria-hidden":`true`})})]},n||`${e.behavior}-${t}`)})})]})}function qe({invocation:e,onRemove:t}){let{t:n}=o();return(0,K.jsxs)(`div`,{className:`composer-resource-chip [&.workflow]:border-success-border [&.workflow]:bg-success-soft [&.workflow]:text-success-strong [&_button]:grid [&_button]:size-6 [&_button]:place-items-center [&_button]:rounded-xs [&_button]:text-content-muted [&_button]:hover:bg-surface-hover [&_button]:hover:text-content inline-flex h-7 self-start items-center gap-1.5 rounded-sm border border-star-border bg-star-soft pr-0.5 pl-2 text-xs font-medium text-star-strong max-[650px]:h-11 max-[650px]:[&_button]:size-11 ${e.kind}`,children:[e.kind===`tool`?(0,K.jsx)(x,{size:13}):(0,K.jsx)(d,{size:13}),(0,K.jsxs)(`span`,{children:[e.kind===`skill`?`Skill`:e.kind===`tool`?n(`chat:resourcePicker.tool`):n(`chat:resourcePicker.workflow`),` `,`· `,e.resourceName]}),(0,K.jsx)(`button`,{type:`button`,"aria-label":n(`chat:resourcePicker.remove`),onClick:t,children:(0,K.jsx)(S,{size:13})})]})}function Je({streaming:e,queueing:t,submitting:n=!1,stopping:r=!1,preparing:i=!1,hasDraft:a=!1,canQueue:s=!1,blockedReason:c,disabled:l,onLongPress:d,longPressHint:f,onStop:p}){let{t:m}=o(),h=j(`sendMessage`),g=(0,I.useRef)(null),_=(0,I.useRef)(!1),b=()=>{g.current&&clearTimeout(g.current),g.current=null};(0,I.useEffect)(()=>{let e=g;return()=>{e.current&&clearTimeout(e.current)}},[]);let x=!!(p&&e&&!a),S=!!(e&&!(a&&s))&&!x,C=t||n||r||i,w=l||C||S||!!c,T=m(i?`chat:focusSession.preparingAttachments`:r?`chat:focusSession.stopping`:x?`chat:focusSession.stop`:`chat:focusSession.sendMessage`);return(0,K.jsx)(`button`,{type:x?`button`:`submit`,"data-send-mode":x?`stop`:`send`,className:`send-button grid size-8 min-w-8 flex-none cursor-pointer place-items-center rounded-full border border-transparent bg-star text-on-accent transition-[background-color,opacity] select-none [-webkit-touch-callout:none] hover:enabled:bg-star-hover active:enabled:translate-y-px disabled:cursor-not-allowed disabled:opacity-30 aria-disabled:opacity-30 max-[650px]:disabled:bg-surface-muted max-[650px]:disabled:text-content max-[650px]:disabled:opacity-100 max-[650px]:aria-disabled:bg-surface-muted max-[650px]:aria-disabled:text-content max-[650px]:aria-disabled:opacity-100 max-[650px]:dark:disabled:bg-surface-active max-[650px]:dark:aria-disabled:bg-surface-active data-[send-mode=stop]:bg-surface-muted data-[send-mode=stop]:text-content data-[send-mode=stop]:hover:enabled:bg-surface-hover dark:data-[send-mode=stop]:bg-surface-active max-[650px]:size-9 max-[650px]:min-w-9 min-[651px]:pointer-coarse:size-11 min-[651px]:pointer-coarse:min-w-11 ${q}`,title:c||(!C&&h?`${T} (${h})`:T),"aria-label":c?`${T}: ${c}`:T,"aria-busy":C||void 0,"aria-disabled":w||void 0,"aria-description":d&&!x?f:void 0,"data-long-press":d&&!x?`steer`:void 0,onPointerDown:e=>{_.current=!1,!(!d||x||w||e.pointerType===`mouse`)&&(b(),g.current=setTimeout(()=>{g.current=null,_.current=!0,d()},500))},onPointerUp:b,onPointerCancel:b,onPointerLeave:b,onContextMenu:e=>{d&&e.preventDefault()},onClick:e=>{if(_.current){_.current=!1,e.preventDefault();return}if(w){e.preventDefault();return}x&&p?.()},disabled:!c&&w,children:C?(0,K.jsx)(v,{className:`animate-spin ${J}`,size:17}):x?(0,K.jsx)(y,{size:13,fill:`currentColor`,"aria-hidden":`true`}):(0,K.jsx)(u,{size:17,strokeWidth:2.1,className:J})})}function Ye({levels:e,value:t,labelFor:n,onCommit:r,disabled:i=!1,ariaLabel:a,title:o,trailing:s,className:c}){let[l,u]=(0,I.useState)(null),[d,f]=(0,I.useState)(!1),p=(0,I.useRef)(!1),m=Math.max(0,e.indexOf(t)),h=l??m,g=n(e[h]||t),_=i||d||e.length<2,v=e.join(`|`);(0,I.useEffect)(()=>{u(null)},[t,v]);let y=async n=>{let i=e[n];if(_||p.current||!i||i===t){u(null);return}p.current=!0,f(!0);try{await r(i)}finally{p.current=!1,f(!1),u(null)}};return(0,K.jsxs)(`div`,{className:O(`min-w-0`,c),children:[(0,K.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2 px-0.5 pb-1`,children:[o&&(0,K.jsx)(`span`,{className:`text-xs font-medium text-content-muted`,children:o}),(0,K.jsxs)(`span`,{className:`ml-auto flex min-w-0 items-baseline gap-2`,children:[(0,K.jsx)(`span`,{className:`truncate text-[13px] leading-5 font-medium text-accent-fg`,"aria-live":`polite`,children:g}),s]})]}),(0,K.jsx)(D,{className:O(`h-7`,`[&_[data-slot=slider-range]]:bg-[linear-gradient(90deg,var(--star-border),var(--star))]`,`[&_[data-slot=slider-thumb]]:size-4 [&_[data-slot=slider-thumb]]:bg-[radial-gradient(circle,var(--star)_0_2px,var(--key-bg)_2.5px)]`),showSteps:!0,min:0,max:Math.max(1,e.length-1),step:1,value:[h],disabled:_,"aria-label":a,valueText:g,onValueChange:([e])=>u(e),onValueCommit:([e])=>void y(e)}),e.length>1&&(0,K.jsxs)(`div`,{className:`flex justify-between px-0.5 pt-0.5 text-xs text-content-faint`,"aria-hidden":`true`,children:[(0,K.jsx)(`span`,{children:n(e[0])}),(0,K.jsx)(`span`,{children:n(e.at(-1)||``)})]})]})}var Xe=96,Ze=.6,Qe=`10%`;function $e({onDismiss:e,className:t}){let n=(0,I.useRef)(null),r=e=>{e.sheet.style.transform=``,e.sheet.style.transition=``},i=e=>{if(e.button!==0)return;let t=e.currentTarget.closest(`[data-slot="sheet-content"]`);t&&(e.currentTarget.setPointerCapture?.(e.pointerId),t.style.transition=`none`,n.current={pointerId:e.pointerId,startY:e.clientY,startAt:performance.now(),sheet:t,offset:0})},a=e=>{let t=n.current;!t||t.pointerId!==e.pointerId||(t.offset=Math.max(0,e.clientY-t.startY),t.sheet.style.transform=`translateY(${t.offset}px)`)},o=t=>{let{sheet:n}=t;n.style.setProperty(`--tw-exit-translate-y`,`calc(${t.offset}px + ${Qe})`);let i=()=>{n.removeEventListener(`animationstart`,a),r(t),n.style.removeProperty(`--tw-exit-translate-y`)},a=e=>{e.target===n&&n.dataset.state!==`closed`&&i()};n.addEventListener(`animationstart`,a),e(),requestAnimationFrame(()=>{n.isConnected&&n.dataset.state!==`closed`&&i()})},s=e=>{let t=n.current;if(!t||t.pointerId!==e.pointerId)return;n.current=null;let i=t.offset/Math.max(1,performance.now()-t.startAt);if(t.offset>=Xe||t.offset>24&&i>=Ze){o(t);return}r(t)},c=()=>{let e=n.current;n.current=null,e&&r(e)};return(0,K.jsx)(`div`,{"aria-hidden":`true`,"data-sheet-drag-handle":!0,className:O(`flex h-8 w-full flex-none cursor-grab touch-none items-start justify-center select-none active:cursor-grabbing`,t),onPointerDown:i,onPointerMove:a,onPointerUp:s,onPointerCancel:c,onLostPointerCapture:c,children:(0,K.jsx)(`span`,{className:`mt-2.5 h-1 w-9 rounded-full bg-stroke-strong`})})}function et({sheet:e,title:t,trigger:n,children:r,open:i,onOpenChange:a,align:o,side:s,sideOffset:c,className:l,sheetClassName:u}){let[d,f]=(0,I.useState)(!1),p=i??d,m=e=>{i===void 0&&f(e),a?.(e)};return e?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(C,{"aria-haspopup":`dialog`,"aria-expanded":p,onClick:()=>m(!0),children:n}),(0,K.jsx)(te,{open:p,onOpenChange:m,children:(0,K.jsxs)(M,{side:`bottom`,showCloseButton:!1,"data-popover-sheet":!0,className:O(`max-h-[85dvh] gap-1 overflow-y-auto rounded-t-(--r-sheet) px-3 pt-1 pb-[calc(12px+var(--pisper-safe-area-bottom))]`,u),children:[(0,K.jsx)($e,{onDismiss:()=>m(!1)}),(0,K.jsx)(N,{className:`px-2 pt-1 pb-1 text-base font-semibold`,children:t}),(0,K.jsx)(ee,{className:`sr-only`,children:t}),r]})})]}):(0,K.jsxs)(E,{open:p,onOpenChange:m,children:[(0,K.jsx)(w,{asChild:!0,children:n}),(0,K.jsx)(T,{align:o,side:s,sideOffset:c,className:l,children:r})]})}var tt={system:`var(--viz-1)`,project:`var(--viz-2)`,skills:`var(--viz-3)`,tools:`var(--viz-4)`,mcp:`var(--viz-5)`,messages:`var(--viz-6)`,toolResults:`var(--viz-7)`},Z=`grid grid-cols-[8px_minmax(0,1fr)_auto_2.25rem] items-center gap-x-2 rounded-[4px] px-1 py-0.5 text-xs`;function nt({percent:e,compactAtPercent:t}){let{t:n}=o();return(0,K.jsxs)(`div`,{"aria-hidden":`true`,className:`relative h-1 rounded-full bg-surface-active`,children:[e>0&&(0,K.jsx)(`span`,{className:`absolute inset-y-0 left-0 min-w-1 rounded-full bg-content-secondary`,style:{width:`${Math.min(100,e)}%`}}),t!==null&&(0,K.jsx)(`span`,{"data-context-compact-line":!0,title:n(`board:composer.context.compactAt`,{percent:t}),className:`absolute -top-[3px] -bottom-[3px] w-[2px] -translate-x-1/2 rounded-full bg-content`,style:{left:`${t}%`}})]})}function rt({breakdown:e}){let{t}=o(),[n,r]=(0,I.useState)(null),{contextWindow:i,usedTokens:a,freeTokens:s,compactAtPercent:c}=e,l=e.categories.filter(e=>e.tokens>0),u=e.categories.filter(e=>e.tokens>0||e.id===`mcp`&&e.deferred>0),d={system:t(`board:composer.context.system`),project:t(`board:composer.context.project`),skills:t(`board:composer.context.skills`),tools:t(`board:composer.context.tools`),mcp:t(`board:composer.context.mcp`),messages:t(`board:composer.context.messages`),toolResults:t(`board:composer.context.toolResults`)},f=e=>ne(e,a),p=e=>({onMouseEnter:()=>r(e),onMouseLeave:()=>r(null)}),m=[t(`board:composer.context.free`,{tokens:P(s)}),c===null?``:t(`board:composer.context.compactAt`,{percent:c})].filter(Boolean).join(` · `);return(0,K.jsxs)(`div`,{className:`grid gap-2`,"data-context-breakdown":!0,children:[(0,K.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,K.jsx)(nt,{percent:i?a/i*100:0,compactAtPercent:c}),(0,K.jsx)(`span`,{className:`text-[11px] leading-4 text-content-muted`,"data-context-capacity":!0,children:m})]}),l.length>0&&(0,K.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-[11px] leading-4 text-content-muted`,children:t(`board:composer.context.composition`)}),(0,K.jsx)(`div`,{role:`img`,"aria-label":l.map(e=>`${d[e.id]} ${f(e.tokens)}`).join(`, `),className:`flex h-2.5 w-full gap-[2px]`,children:l.map(e=>(0,K.jsx)(`span`,{"data-context-segment":e.id,title:`${d[e.id]} · ${P(e.tokens)} · ${f(e.tokens)}`,className:O(`min-w-[3px] rounded-[2px] transition-opacity duration-(--d-fast)`,n&&n!==e.id&&`opacity-30`),style:{flexGrow:e.tokens,flexBasis:0,backgroundColor:tt[e.id]},...p(e.id)},e.id))})]}),(0,K.jsx)(`ul`,{className:`m-0 grid list-none gap-0 p-0`,children:u.map(e=>(0,K.jsxs)(`li`,{className:`contents`,children:[(0,K.jsxs)(`div`,{"data-context-row":e.id,className:O(Z,n===e.id&&`bg-surface-hover`),...p(e.id),children:[(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 rounded-[2px]`,style:{backgroundColor:tt[e.id]}}),(0,K.jsxs)(`span`,{className:`min-w-0 truncate text-content-secondary`,children:[d[e.id],e.id===`tools`&&e.count?(0,K.jsxs)(`span`,{className:`text-content-muted`,children:[` · `,e.count]}):null]}),(0,K.jsx)(`span`,{className:`font-medium text-content tabular-nums`,children:P(e.tokens)}),(0,K.jsx)(`span`,{className:`text-right text-content-muted tabular-nums`,children:f(e.tokens)})]}),e.servers.map(e=>{let n=[e.name,e.tools>0?t(`board:composer.context.toolCount`,{count:e.tools}):``,e.calls>0?t(`board:composer.context.callCount`,{count:e.calls}):``].filter(Boolean).join(` · `);return(0,K.jsxs)(`div`,{"data-context-server":e.name,className:O(Z,`py-0 text-content-muted`),children:[(0,K.jsx)(`span`,{"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`min-w-0 truncate`,title:n,children:n}),(0,K.jsx)(`span`,{className:`tabular-nums`,children:P(e.tokens)}),(0,K.jsx)(`span`,{})]},e.name)}),e.deferred>0&&(0,K.jsxs)(`div`,{"data-context-deferred":!0,className:O(Z,`py-0 text-content-muted`),children:[(0,K.jsx)(`span`,{"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`col-span-3 min-w-0`,children:t(`board:composer.context.deferred`,{count:e.deferred})})]})]},e.id))}),(0,K.jsx)(`p`,{className:`m-0 text-[11px] leading-4 text-content-muted`,"data-context-hint":!0,children:e.prefixKnown?e.totalKnown?t(`board:composer.context.estimated`):t(`board:composer.context.allEstimated`):t(`board:composer.context.prefixUnknown`)})]})}function it(e,t){let n=t.find(t=>t.key===e);return n?`${n.providerName} · ${n.label}`:e.split(`/`).at(-1)||e}function Q({label:e,value:t,wide:n=!1,usageKey:r,title:i}){return(0,K.jsxs)(`div`,{className:O(`grid min-w-0 gap-0.5 rounded-[var(--r-md)] bg-surface-subtle px-2 py-1.5 dark:bg-surface-active`,n&&`col-span-2`),"data-usage-row":r,title:i,children:[(0,K.jsx)(`span`,{className:`truncate text-[11px] leading-4 text-content-muted`,children:e}),(0,K.jsx)(`strong`,{className:`truncate text-[13px] leading-4 font-medium text-content`,children:t})]})}function at({model:e,availableModels:t,sessionUsage:n}){let{t:r,language:i}=o(),a=n?.timing&&typeof n.timing==`object`?n.timing:null,s=Math.max(0,Number(a?.firstTokenSamples)||0),c=Math.max(0,Number(a?.requests)||0),l=s>0?Number(a?.firstTokenTotalMs)/s:null,u=c>0?Number(a?.durationTotalMs)/c:null,d=!!n?.cacheReported,f=[[r(`chat:focusSession.statCurrentModel`),e?it(e,t||[]):`—`],[r(`chat:focusSession.statInputTokens`),P(n?.input)],[r(`chat:focusSession.statOutputTokens`),P(n?.output)],[r(`chat:focusSession.statCacheReadTokens`),d?P(n?.cacheRead):`—`],[r(`chat:focusSession.statCacheWriteTokens`),d?P(n?.cacheWrite):`—`],[r(`chat:focusSession.statReasoningTokens`),P(n?.reasoning)],[r(`chat:focusSession.statRequests`),String(Math.max(0,Number(n?.requests)||0))],[r(`chat:focusSession.statAvgFirstToken`),l==null?`—`:fe(l,i)],[r(`chat:focusSession.statAvgDuration`),u==null?`—`:fe(u,i)]];return(0,K.jsxs)(`div`,{className:`session-stats-panel grid grid-cols-2 gap-1`,"aria-label":r(`chat:focusSession.sessionStats`),children:[f.map(([e,t],n)=>(0,K.jsx)(Q,{label:e,value:t,wide:n===0},e)),(0,K.jsx)(`small`,{className:`col-span-2 text-[11px] leading-4 text-content-muted`,children:r(`chat:focusSession.sessionStatsHint`)})]})}function ot({sessionId:e,usage:t,sessionUsage:n,model:r,availableModels:i,onThresholdChange:a}){let{t:l}=o(),u=Number(t?.contextWindow)||0,d=t?.compactAtPercent==null?80:Number(t.compactAtPercent),f=Number.isFinite(d)?Math.round(d):80,[m,h]=(0,I.useState)(f),[g,_]=(0,I.useState)(!1),[v,y]=(0,I.useState)(``),b=(0,I.useRef)(f),x=(0,I.useRef)(void 0);(0,I.useEffect)(()=>{window.clearTimeout(x.current),h(f),b.current=f},[f]),(0,I.useEffect)(()=>()=>window.clearTimeout(x.current),[]);let S=c({queryKey:[`context-breakdown`,e,t?.tokens??null,u],queryFn:({signal:t})=>re.getContextBreakdown(String(e),t),enabled:!!e&&u>0,retry:!1,staleTime:5e3,placeholderData:s}).data,C=t?.percent!=null&&Number.isFinite(Number(t.percent))?Math.max(0,Number(t?.percent)):null,w=Math.max(0,Number(n?.processedTokens)||0),T=Number(n?.cacheHitRate),E=n?.cacheHitRate!=null&&Number.isFinite(T),O=t?.tokens==null?S?`≈${P(S.usedTokens)}`:`—`:P(t.tokens),k=u?`${O} / ${P(u)}${C==null?``:` · ${Math.round(C)}%`}`:``,A=t?.autoCompactEnabled&&t.compactionCapacityPercent!=null?l(`chat:focusSession.contextUsageToCompactionTokensPercent`,{percent:Math.round(Number(t.compactionCapacityPercent)),tokens:P(t.remainingBeforeCompaction)}):``,j=async e=>{let t=Math.min(95,Math.max(10,Math.round(e)));if(h(t),!(!a||t===b.current)){_(!0),y(``);try{await a(t),b.current=t}catch(e){y(e instanceof Error?e.message:String(e))}finally{_(!1)}}},M=e=>{window.clearTimeout(x.current),h(e),x.current=window.setTimeout(()=>void j(e),250)},N=e=>{window.clearTimeout(x.current),j(e)};return(0,K.jsxs)(`div`,{className:`context-usage-section grid gap-1.5 border-t border-stroke-soft px-2 pt-2 pb-1.5`,"data-context-usage":!0,children:[k&&(0,K.jsxs)(`div`,{className:`grid gap-1.5`,children:[((e,t,n,r)=>(0,K.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-xs`,"data-usage-row":n,title:r,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-content-muted`,children:e}),(0,K.jsx)(`strong`,{className:`min-w-0 truncate text-right font-medium text-content tabular-nums`,children:t})]}))(l(`board:composer.contextUsage`),k,`context`),S?(0,K.jsx)(rt,{breakdown:S}):(0,K.jsx)(nt,{percent:C??0,compactAtPercent:t?.autoCompactEnabled?d:null})]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-2 gap-1`,children:[(0,K.jsx)(Q,{label:l(`board:composer.sessionTokens`),value:w>0?l(`board:composer.tokens`,{tokens:P(w)}):`—`,usageKey:`tokens`}),(0,K.jsx)(Q,{label:l(`board:composer.cacheHitLabel`),value:E?`${Math.round(Math.max(0,T))}%`:`—`,usageKey:`cache`,title:E?void 0:l(`chat:focusSession.cacheHitRateUnavailable`)})]}),u>0&&(0,K.jsxs)(`details`,{className:`group/usage min-w-0 text-xs`,onToggle:e=>{let t=e.currentTarget;t.open&&requestAnimationFrame(()=>t.scrollIntoView({block:`nearest`}))},children:[(0,K.jsxs)(`summary`,{className:`flex min-h-7 cursor-pointer list-none items-center gap-1 rounded-sm text-content-secondary hover:text-content focus-visible:outline-2 focus-visible:outline-focus max-[650px]:min-h-11 [&::-webkit-details-marker]:hidden`,children:[(0,K.jsx)(p,{size:13,"aria-hidden":`true`,className:`transition-transform duration-(--d-fast) group-open/usage:rotate-90`}),l(`chat:focusSession.sessionStats`)]}),(0,K.jsxs)(`div`,{className:`grid gap-2 pt-1.5`,children:[(0,K.jsx)(at,{model:r,availableModels:i,sessionUsage:n}),A&&(0,K.jsx)(`small`,{className:`text-content-muted`,children:A}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between font-medium text-content`,children:[(0,K.jsx)(`span`,{children:l(`chat:focusSession.autoCompactionThreshold`)}),(0,K.jsxs)(`output`,{className:`tabular-nums`,children:[m,`%`]})]}),(0,K.jsx)(D,{min:10,max:95,step:1,value:[m],className:`h-5 w-full`,"aria-label":l(`chat:focusSession.autoCompactionThreshold`),valueText:`${m}%`,disabled:g,onValueChange:([e])=>M(e),onValueCommit:([e])=>N(e)}),(0,K.jsx)(`small`,{className:v?`text-danger`:`text-content-muted`,children:v||(g?l(`chat:focusSession.savingCompactionThreshold`):`\xA0`)})]})]})]})}function $(e,t){return{off:e(`chat:focusSession.thinkingLabel.off`),minimal:e(`chat:focusSession.thinkingLabel.minimal`),low:e(`chat:focusSession.thinkingLabel.low`),medium:e(`chat:focusSession.thinkingLabel.medium`),high:e(`chat:focusSession.thinkingLabel.high`),xhigh:e(`chat:focusSession.thinkingLabel.xhigh`),max:e(`chat:focusSession.thinkingLabel.max`)}[t]||t}function st({model:e,models:t,onModelChange:n,thinkingLevel:r,levels:i,status:a,message:s,onThinkingChange:c,modelDisabled:l,thinkingDisabled:u,deferred:d=!1,pendingModel:f=!1,usage:p,sheet:h=!1,side:g=`top`,thinkingIsDefault:_=!1,onThinkingReset:v,triggerClassName:y}){let{t:b}=o(),[x,S]=(0,I.useState)(!1),C=t.find(t=>t.key===e),w=t.map(e=>e.label),T=C?.label||e.split(`/`).at(-1)||``,E=T?pe(T,w):b(`chat:focusSession.toolbarModel`),D=[...t.reduce((e,t)=>{let n=e.get(t.providerName)||[];return n.push(t),e.set(t.providerName,n)},new Map)],k=a!==`unsupported`&&i.length>0,A=k?$(b,r||i[0]):`—`,j=f?b(`chat:focusSession.thinkingAfterModelSwitch`):k?A:s||b(a===`unsupported`?`chat:focusSession.thinkingLevelUnsupported`:`chat:focusSession.loadingThinkingLevels`),M=u||x||!k||i.length<2,N=`${b(`chat:focusSession.modelAndThinking`)} · ${it(e,t)} · ${j}`;return(0,K.jsxs)(et,{sheet:h,title:b(`chat:focusSession.modelAndThinking`),align:`end`,side:g,sideOffset:8,className:`model-effort-popover w-[272px] max-w-[calc(100vw_-_24px)] gap-0 p-1`,trigger:(0,K.jsxs)(`button`,{type:`button`,className:O(`model-effort-pill inline-flex h-[30px] min-w-0 max-w-[260px] cursor-pointer items-center gap-1.5 rounded-sm border border-transparent pr-1.5 pl-2.5 text-[13px] text-content transition-colors hover:bg-surface-hover disabled:cursor-default disabled:opacity-60 aria-expanded:bg-surface-hover max-[650px]:h-9 max-[650px]:gap-1 max-[650px]:rounded-full max-[650px]:bg-surface-muted max-[650px]:dark:bg-surface-active max-[650px]:px-3 max-[650px]:text-sm min-[651px]:pointer-coarse:h-11`,q,y),"aria-label":N,title:N,children:[(0,K.jsx)(`span`,{className:`min-w-0 truncate font-medium max-[650px]:hidden`,children:E}),(0,K.jsx)(`span`,{className:`hidden font-medium whitespace-nowrap max-[650px]:inline`,children:b(`chat:focusSession.modelChipShort`)}),(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`text-content-faint max-[650px]:hidden`,children:`·`}),(0,K.jsx)(`span`,{className:`shrink-0 text-content-muted max-[650px]:hidden`,children:k?$(b,r||i[0]):`—`}),(0,K.jsx)(m,{size:14,className:`shrink-0 text-content-muted max-[650px]:hidden`,"aria-hidden":`true`})]}),children:[(0,K.jsxs)(`div`,{className:`model-effort-model flex flex-col gap-1 p-1.5 pb-2`,children:[(0,K.jsx)(`span`,{className:`px-0.5 text-xs font-medium text-content-muted`,children:b(`chat:focusSession.toolbarModel`)}),(0,K.jsxs)(de,{defaultValue:e,filter:(e,t,n)=>+!![e,...n||[]].join(` `).toLowerCase().includes(t.trim().toLowerCase()),className:`rounded-sm! border border-stroke-soft bg-transparent p-0`,"aria-label":b(`chat:focusSession.currentChatModel`),children:[t.length>6&&(0,K.jsx)(oe,{placeholder:b(`chat:focusSession.searchModels`)}),(0,K.jsxs)(ce,{className:`max-h-56`,children:[(0,K.jsx)(se,{className:`py-4 text-xs text-content-muted`,children:t.length?b(`chat:focusSession.noMatchingModels`):b(`chat:focusSession.noModelsAvailable`)}),!C&&e&&(0,K.jsx)(ue,{children:(0,K.jsx)(ae,{value:e,"data-checked":!0,disabled:!0,children:(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:E})})}),D.map(([t,r])=>(0,K.jsx)(ue,{heading:t,children:r.map(t=>{let r=pe(t.label,w);return(0,K.jsx)(ae,{value:t.key,keywords:[t.label,t.providerName],"data-checked":t.key===e,disabled:l||x,onSelect:()=>{t.key!==e&&n(t.key)},children:(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-col`,title:t.label,children:[(0,K.jsx)(`span`,{className:`wrap-anywhere`,children:r}),r!==t.label&&(0,K.jsx)(`span`,{className:`truncate text-xs text-content-muted`,children:t.label})]})},t.key)})},t))]})]})]}),k&&(0,K.jsx)(Ye,{className:`border-t border-stroke-soft p-1.5 pt-2`,title:b(`chat:focusSession.thinkingLevelTitle`),levels:i,value:r,labelFor:e=>$(b,e),onCommit:async e=>{S(!0);try{await c(e)}finally{S(!1)}},disabled:M,ariaLabel:b(`chat:focusSession.currentThinkingLevel`),trailing:_?(0,K.jsx)(`span`,{className:`shrink-0 text-xs text-content-faint`,children:b(`chat:focusSession.thinkingModelDefault`)}):v?(0,K.jsx)(`button`,{type:`button`,className:`shrink-0 cursor-pointer rounded-sm text-xs text-content-muted underline-offset-2 hover:text-content hover:underline focus-visible:outline-2 focus-visible:outline-focus`,onClick:v,children:b(`chat:focusSession.thinkingReset`)}):void 0}),d&&(0,K.jsx)(`p`,{className:`px-2 pt-1 pb-2 text-xs leading-4 text-content-muted`,role:`status`,children:b(`chat:focusSession.runtimeSelectionDeferred`)}),(!k||i.length===1)&&(0,K.jsx)(`p`,{className:`border-t border-stroke-soft px-2 pt-2 pb-1.5 text-xs leading-relaxed text-content-muted`,role:`status`,children:k?b(`chat:focusSession.thinkingLevelFixed`,{level:A}):j}),p]})}export{ge as C,De as S,F as T,ke as _,$e as a,xe as b,J as c,Je as d,Ke as f,je as g,Oe as h,et as i,q as l,Le as m,st as n,Re as o,Be as p,$ as r,ze as s,ot as t,qe as u,Ne as v,he as w,Ee as x,be as y};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{i as t,r as n}from"./vendor-react-DwNgTV1j.js";import{t as r}from"./check-2vYc6QaP.js";import{t as i}from"./search-D0mqDaf_.js";import{i as a}from"./dist-41X0pdUs.js";import{c as o,n as s}from"./dist-BsRXXcSL.js";import{a as c,o as l,r as u,t as d}from"./dist-BHkR6BLP.js";import{t as f}from"./utils-C8uzG5AZ.js";import"./dialog-DldLiTwf.js";import{n as p,t as m}from"./input-group-h8z63MzW.js";function h(e){if(!(!e||typeof e!=`object`)){if(Object.hasOwn(e,`plan`))return e.plan??null;if(Object.hasOwn(e,`taskList`))return e.taskList??null}}function g(e,t){let n=h(e);return n===void 0?t:n}function _(e){return e===`plan_update`||e===`task_list_update`}function v(e){return e===`get_plan`||e===`get_task_list`}function y(e){return e===`update_plan`||e===`update_task_list`}function b(e){return v(e)||y(e)}function x(e){return h(e)}function S(e){return e===`queued`?{titleKey:`{name} 等待调度`,tone:`waiting`}:e===`starting`?{titleKey:`{name} 正在启动`,tone:`running`}:e===`running`?{titleKey:`{name} 正在运行`,tone:`running`}:e===`completed`?{titleKey:`{name} 已完成`,tone:`completed`}:e===`interrupted`?{titleKey:`{name} 已中断`,tone:`stopped`}:e===`failed`?{titleKey:`{name} 执行失败`,tone:`failed`}:{titleKey:`{name} 状态已更新`,tone:`waiting`}}function C(e){let t=typeof e==`string`||typeof e==`number`||e instanceof Date?e:0,n=new Date(t).getTime();return Number.isFinite(n)?n:0}function w(e=[]){return e.map(e=>`${e.type}:${e.id||e.agent?.id||``}:${e.status||e.stage||e.agent?.status||``}`).join(`|`)}function T(e,t=0){return e.type===`tool`?`tool:${e.id||e.name||t}`:e.type===`agent`?`agent:${e.agent?.id||e.agent?.canonicalName||t}:${e.agent?.status||e.status||``}`:e.type===`plan`?`plan:${e.id||x(e)?.updatedAt||e.updatedAt||t}`:`${e.type||`activity`}:${e.id||e.startedAt||e.createdAt||t}`}function E(e){return e?.type?e.type===`tool`?`tool:${e.id||e.name||``}`:e.type===`agent`?`agent:${e.agent?.id||e.agent?.canonicalName||``}`:e.type===`plan`?`plan:${e.updatedAt||x(e)?.updatedAt||``}`:e.type===`communication`?`communication:${e.id||``}`:e.type===`model`?`model:${e.stage||``}`:e.type===`compaction`?`compaction:${e.compaction?.status||e.compaction?.active||``}`:`${e.type}:${e.id||e.updatedAt||``}`:``}function D(e,t){let n=new Map((e?.items||[]).map(e=>[String(e.id||``),e])),r=new Map((t?.items||[]).map(e=>[String(e.id||``),e])),i=[];for(let e of r.values()){let t=n.get(String(e.id||``));t?(t.status!==e.status||t.title!==e.title||t.note!==e.note)&&i.push({id:e.id,title:e.title,status:e.status,previousStatus:t.status,kind:`updated`}):i.push({id:e.id,title:e.title,status:e.status,kind:`added`})}for(let e of n.values())r.has(String(e.id||``))||i.push({id:e.id,title:e.title,status:e.status,kind:`removed`});return i}function O(e=[],t,n=6){let r=Array.isArray(e)?e:[];if(![`tool`,`plan`,`agent`,`communication`].includes(t?.type))return r;let i=[...r];t.type===`plan`&&(i=i.filter(e=>e?.type!==`tool`||!b(e.name))),t.type===`agent`&&(i=i.filter(e=>e?.type!==`tool`||![`spawn_agent`,`list_agents`,`send_message`,`followup_task`,`wait_agent`,`interrupt_agent`].includes(e.name)));let a=E(t),o=i.findIndex(e=>E(e)===a);return o>=0?i[o]={...i[o],...t}:i.push(t),i.slice(-Math.max(1,Number(n)||6))}function k(e=[],{finishedAt:t=new Date().toISOString(),error:n=``}={}){return e.map(e=>e?.status===`running`?{...e,status:n?`error`:`done`,message:n||e.message||``,updatedAt:t,finishedAt:t}:e)}function A(e,t,n=Date.now()){let r=C(e);if(!r)return 0;let i=C(t)||n;return Math.max(0,i-r)}function j(e,t=`zh-CN`){let n=Math.max(0,Math.round(Number(e)||0));if(n<1e3)return t===`en-US`?`${n}ms`:`${n} 毫秒`;let r=Math.floor(n/1e3);if(r<60)return t===`en-US`?`${r}s`:`${r} 秒`;let i=Math.floor(r/60),a=r%60;return i<60?`${i}:${String(a).padStart(2,`0`)}`:`${Math.floor(i/60)}:${String(i%60).padStart(2,`0`)}:${String(a).padStart(2,`0`)}`}var M=e(t(),1),N=1,P=.9,F=.8,I=.17,L=.1,R=.999,z=.9999,B=.99,ee=/[\\\/_+.#"@\[\(\{&]/,te=/[\\\/_+.#"@\[\(\{&]/g,ne=/[\s-]/,re=/[\s-]/g;function V(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?N:B;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=V(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=N:ee.test(e.charAt(l-1))?(d*=F,p=e.slice(i,l-1).match(te),p&&i>0&&(d*=R**+p.length)):ne.test(e.charAt(l-1))?(d*=P,m=e.slice(i,l-1).match(re),m&&i>0&&(d*=R**+m.length)):(d*=I,i>0&&(d*=R**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=z)),(d<L&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=V(e,t,n,r,l+1,a+2,o),f*L>d&&(d=f*L)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function ie(e){return e.toLowerCase().replace(re,` `)}function ae(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,V(e,t,ie(e),ie(t),0,0,{})}var H=`[cmdk-group=""]`,U=`[cmdk-group-items=""]`,oe=`[cmdk-group-heading=""]`,se=`[cmdk-item=""]`,ce=`${se}:not([aria-disabled="true"])`,W=`cmdk-item-select`,G=`data-value`,le=(e,t,n)=>ae(e,t,n),ue=M.createContext(void 0),K=()=>M.useContext(ue),de=M.createContext(void 0),q=()=>M.useContext(de),fe=M.createContext(void 0),pe=M.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),c=X(()=>new Set),l=we(e),{label:u,children:d,value:f,onValueChange:p,filter:m,shouldFilter:h,loop:g,disablePointerSelection:_=!1,vimBindings:v=!0,...y}=e,b=s(),x=s(),S=s(),C=M.useRef(null),w=Ee();Y(()=>{if(f!==void 0){let e=f.trim();n.current.value=e,T.emit()}},[f]),Y(()=>{w(6,j)},[]);let T=M.useMemo(()=>({subscribe:e=>(c.current.add(e),()=>c.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=N()?.id,T.emit()}),r||w(5,j),l.current?.value!==void 0){let e=t??``;(o=(a=l.current).onValueChange)==null||o.call(a,e);return}}T.emit()}},emit:()=>{c.current.forEach(e=>e())}}),[]),E=M.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=N();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:()=>l.current.shouldFilter,label:u||e[`aria-label`],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:S,labelId:x,listInnerRef:C}),[]);function D(e,t){let r=l.current?.filter??le;return e?r(e,n.current.search,t):0}function O(){if(!n.current.search||l.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;P().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(U);t?t.appendChild(e.parentElement===t?e:e.closest(`${U} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${U} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=C.current?.querySelector(`${H}[${G}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function k(){let e=P().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(G);T.setState(`value`,e||void 0)}function A(){if(!n.current.search||l.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=N();t&&(t.parentElement?.firstChild===t&&((e=t.closest(H)?.querySelector(oe))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function N(){return C.current?.querySelector(`${se}[aria-selected="true"]`)}function P(){return Array.from(C.current?.querySelectorAll(ce)||[])}function F(e){let t=P()[e];t&&T.setState(`value`,t.getAttribute(G))}function I(e){var t;let n=N(),r=P(),i=r.findIndex(e=>e===n),a=r[i+e];(t=l.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(G))}function L(e){let t=N()?.closest(H),n;for(;t&&!n;)t=e>0?Se(t,H):Ce(t,H),n=t?.querySelector(ce);n?T.setState(`value`,n.getAttribute(G)):I(e)}let R=()=>F(P().length-1),z=e=>{e.preventDefault(),e.metaKey?R():e.altKey?L(1):I(1)},B=e=>{e.preventDefault(),e.metaKey?F(0):e.altKey?L(-1):I(-1)};return M.createElement(o.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&&z(e);break;case`ArrowDown`:z(e);break;case`p`:case`k`:v&&e.ctrlKey&&B(e);break;case`ArrowUp`:B(e);break;case`Home`:e.preventDefault(),F(0);break;case`End`:e.preventDefault(),R();break;case`Enter`:{e.preventDefault();let t=N();if(t){let e=new Event(W);t.dispatchEvent(e)}}}}},M.createElement(`label`,{"cmdk-label":``,htmlFor:E.inputId,id:E.labelId,style:Oe},u),Q(e,e=>M.createElement(de.Provider,{value:T},M.createElement(ue.Provider,{value:E},e))))}),me=M.forwardRef((e,t)=>{let n=s(),r=M.useRef(null),i=M.useContext(fe),c=K(),l=we(e),u=l.current?.forceMount??i?.forceMount;Y(()=>{if(!u)return c.item(n,i?.id)},[u]);let d=Te(n,r,[e.value,e.children,r],e.keywords),f=q(),p=Z(e=>e.value&&e.value===d.current),m=Z(e=>u||c.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);M.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(W,h),()=>t.removeEventListener(W,h)},[m,e.onSelect,e.disabled]);function h(){var e,t;g(),(t=(e=l.current).onSelect)==null||t.call(e,d.current)}function g(){f.setState(`value`,d.current,!0)}if(!m)return null;let{disabled:_,value:v,onSelect:y,forceMount:b,keywords:x,...S}=e;return M.createElement(o.div,{ref:a(r,t),...S,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||c.getDisablePointerSelection()?void 0:g,onClick:_?void 0:h},e.children)}),he=M.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...c}=e,l=s(),u=M.useRef(null),d=M.useRef(null),f=s(),p=K(),m=Z(e=>i||p.filter()===!1?!0:!e.search||e.filtered.groups.has(l));Y(()=>p.group(l),[]),Te(l,u,[e.value,e.heading,d]);let h=M.useMemo(()=>({id:l,forceMount:i}),[i]);return M.createElement(o.div,{ref:a(u,t),...c,"cmdk-group":``,role:`presentation`,hidden:!m||void 0},n&&M.createElement(`div`,{ref:d,"cmdk-group-heading":``,"aria-hidden":!0,id:f},n),Q(e,e=>M.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?f:void 0},M.createElement(fe.Provider,{value:h},e))))}),ge=M.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=M.useRef(null),s=Z(e=>!e.search);return!n&&!s?null:M.createElement(o.div,{ref:a(i,t),...r,"cmdk-separator":``,role:`separator`})}),_e=M.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=q(),s=Z(e=>e.search),c=Z(e=>e.selectedItemId),l=K();return M.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),M.createElement(o.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:i?e.value:s,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),ve=M.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,s=M.useRef(null),c=M.useRef(null),l=Z(e=>e.selectedItemId),u=K();return M.useEffect(()=>{if(c.current&&s.current){let e=c.current,t=s.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)}}},[]),M.createElement(o.div,{ref:a(s,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:u.listId},Q(e,e=>M.createElement(`div`,{ref:a(c,u.listInnerRef),"cmdk-list-sizer":``},e)))}),ye=M.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return M.createElement(d,{open:n,onOpenChange:r},M.createElement(l,{container:o},M.createElement(c,{"cmdk-overlay":``,className:i}),M.createElement(u,{"aria-label":e.label,"cmdk-dialog":``,className:a},M.createElement(pe,{ref:t,...s}))))}),be=M.forwardRef((e,t)=>Z(e=>e.filtered.count===0)?M.createElement(o.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),xe=M.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return M.createElement(o.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Q(e,e=>M.createElement(`div`,{"aria-hidden":!0},e)))}),J=Object.assign(pe,{List:ve,Item:me,Input:_e,Group:he,Separator:ge,Dialog:ye,Empty:be,Loading:xe});function Se(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Ce(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function we(e){let t=M.useRef(e);return Y(()=>{t.current=e}),t}var Y=typeof window>`u`?M.useEffect:M.useLayoutEffect;function X(e){let t=M.useRef();return t.current===void 0&&(t.current=e()),t}function Z(e){let t=q(),n=()=>e(t.snapshot());return M.useSyncExternalStore(t.subscribe,n,n)}function Te(e,t,n,r=[]){let i=M.useRef(),a=K();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(G,s),i.current=s}),i}var Ee=()=>{let[e,t]=M.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 De(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&&M.isValidElement(t)?M.cloneElement(De(t),{ref:t.ref},n(t.props.children)):n(t)}var Oe={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},$=n();function ke({className:e,...t}){return(0,$.jsx)(J,{"data-slot":`command`,className:f(`flex size-full flex-col overflow-hidden rounded-md! bg-popover p-1 text-popover-foreground`,e),...t})}function Ae({className:e,...t}){return(0,$.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`p-1 pb-0`,children:(0,$.jsxs)(m,{className:`h-8! rounded-sm! border-stroke bg-surface-subtle shadow-none! *:data-[slot=input-group-addon]:pl-2!`,children:[(0,$.jsx)(J.Input,{"data-slot":`command-input`,className:f(`w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t}),(0,$.jsx)(p,{children:(0,$.jsx)(i,{className:`size-4 shrink-0 opacity-50`})})]})})}function je({className:e,...t}){return(0,$.jsx)(J.List,{"data-slot":`command-list`,className:f(`no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none`,e),...t})}function Me({className:e,...t}){return(0,$.jsx)(J.Empty,{"data-slot":`command-empty`,className:f(`py-6 text-center text-sm`,e),...t})}function Ne({className:e,...t}){return(0,$.jsx)(J.Group,{"data-slot":`command-group`,className:f(`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 Pe({className:e,children:t,...n}){return(0,$.jsxs)(J.Item,{"data-slot":`command-item`,className:f(`group/command-item relative flex min-h-7.5 max-[650px]:min-h-11 pointer-coarse:min-h-11 cursor-default items-center gap-2 rounded-sm px-2 py-1 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-accent 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)(r,{className:`ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`})]})}export{y as _,Pe as a,g as b,w as c,D as d,O as f,_ as g,v as h,Ae as i,S as l,k as m,Me as n,je as o,A as p,Ne as r,T as s,ke as t,j as u,x as v,h as y};