pisper 0.6.6 → 0.6.7

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 (115) hide show
  1. package/package.json +7 -7
  2. package/web/.vite/manifest.json +481 -336
  3. package/web/assets/AppDialog-DuxuKq-0.js +1 -0
  4. package/web/assets/{AppOverlays-C_WrmeqC.js → AppOverlays-YPxRUvLN.js} +1 -1
  5. package/web/assets/{AppSelect-DNIjPL7I.js → AppSelect-DEmkrcvY.js} +1 -1
  6. package/web/assets/{AppShortcuts-V38tUYTp.js → AppShortcuts-CA7hbebL.js} +1 -1
  7. package/web/assets/{AssetsPage-BmSnyLZ5.js → AssetsPage-CkNI_8qz.js} +1 -1
  8. package/web/assets/{ChannelsPage-Da3JaYaC.js → ChannelsPage-BYfRQyV0.js} +1 -1
  9. package/web/assets/ChatAppearancePage-N_2bunil.js +2 -0
  10. package/web/assets/{ChatDockView-5Aptiph6.js → ChatDockView-B4nZfbx5.js} +1 -1
  11. package/web/assets/ChatHistoryPage-Di3epmcR.js +1 -0
  12. package/web/assets/ChatPage-IN5m7Fqh.js +4 -0
  13. package/web/assets/ConfigPage-BKTEOlQE.js +1 -0
  14. package/web/assets/{DecisionsPage-BwJ7RTAE.js → DecisionsPage-DNAUZCij.js} +1 -1
  15. package/web/assets/{DesktopWindowControls-CLVd8sg6.js → DesktopWindowControls-BAnWUUAZ.js} +1 -1
  16. package/web/assets/{FileAttachmentPreview-C6QaQFwb.js → FileAttachmentPreview-x4AORCVt.js} +1 -1
  17. package/web/assets/{FloatingWidgets-QMhElaDR.js → FloatingWidgets-CdbBMke7.js} +1 -1
  18. package/web/assets/GitDiffViewer-oJDF7l74.js +2 -0
  19. package/web/assets/{ListDetailLayout-S-IBs4f_.js → ListDetailLayout-Ctr6r0OI.js} +1 -1
  20. package/web/assets/{MarkdownMessage-bfyuGoi1.js → MarkdownMessage-D9zxSf6j.js} +1 -1
  21. package/web/assets/McpPage-DaOkWcq6.js +1 -0
  22. package/web/assets/{MemoryPage-CC37SohP.js → MemoryPage-B5sqhaYW.js} +1 -1
  23. package/web/assets/MobileContextScreen-DiM-lGec.js +2 -0
  24. package/web/assets/MobileNavigation-DZx6cE9f.js +1 -0
  25. package/web/assets/MobileShellContext-Cvv0RcjA.js +1 -0
  26. package/web/assets/MobileViewportStabilizer-BAI_nmS_.js +1 -0
  27. package/web/assets/{PageHeader-75eh-Z_A.js → PageHeader-FBipSHuW.js} +1 -1
  28. package/web/assets/{PluginsPage-za6FNr_k.js → PluginsPage-BFLnVcnm.js} +1 -1
  29. package/web/assets/{QuickPromptIdeas-CEjBwWlM.js → QuickPromptIdeas-CVcEEpAl.js} +1 -1
  30. package/web/assets/{SchedulesPage-BR1oIqzi.js → SchedulesPage-CVnoI4wZ.js} +1 -1
  31. package/web/assets/SessionContextPanel-CEmCvPx4.js +2 -0
  32. package/web/assets/SessionFilesPane-CAdkivkE.js +2 -0
  33. package/web/assets/{SidebarUpdateStatus-Chfb-00K.js → SidebarUpdateStatus-Co3QAKmb.js} +1 -1
  34. package/web/assets/{SkillsPage-DfFjecBO.js → SkillsPage-d8t6_KDS.js} +1 -1
  35. package/web/assets/{TaskProcessesPane-DJszMYjM.js → TaskProcessesPane-PRgpCplN.js} +1 -1
  36. package/web/assets/{TaskTerminalView-DyTURB64.js → TaskTerminalView-Dt8gIY5E.js} +1 -1
  37. package/web/assets/{TerminalPanel-BFqST5ja.js → TerminalPanel-BRib2LP-.js} +1 -1
  38. package/web/assets/{ThemeToggleButton-DmYU4_Nh.js → ThemeToggleButton-C1lL__80.js} +1 -1
  39. package/web/assets/{WebDesktopPet-COIAEeuY.js → WebDesktopPet-BWpgoZI3.js} +1 -1
  40. package/web/assets/WorkbenchNavigation-DmNiD2FD.js +1 -0
  41. package/web/assets/{WorkflowsPage-Heg3iqQg.js → WorkflowsPage-aRy0lYQ1.js} +1 -1
  42. package/web/assets/{WorkspacePicker-DFCZ_IJu.js → WorkspacePicker-NkoVoqez.js} +1 -1
  43. package/web/assets/{api-D8wGrWiI.js → api-CiEo53J1.js} +1 -1
  44. package/web/assets/app-update-CLhMRrNS.js +32 -0
  45. package/web/assets/calendar-clock-VIxTaqqy.js +1 -0
  46. package/web/assets/catalog-DLWnYiJc.js +1 -0
  47. package/web/assets/chat-api-CbgoP-8X.js +1 -0
  48. package/web/assets/{client-store-lT3geTlX.js → client-store-DCqgdbAp.js} +1 -1
  49. package/web/assets/{component-api-kxyOYPJN.js → component-api-BboiUuyG.js} +1 -1
  50. package/web/assets/{config-search-BThCMhnj.js → config-search-Cwglajsz.js} +1 -1
  51. package/web/assets/events-f8vVvSfH.js +1 -0
  52. package/web/assets/{floating-widgets-store-BhuWgVRT.js → floating-widgets-store-BAfPpV4Z.js} +2 -2
  53. package/web/assets/git-diff-f-zMaQOk.js +3 -0
  54. package/web/assets/{http-rQRvhTOP.js → http-Dx387MGl.js} +1 -1
  55. package/web/assets/i18n-CblgkPOp.js +1 -0
  56. package/web/assets/{index-BVIvzUyZ.js → index-BAYzSwUr.js} +2 -2
  57. package/web/assets/index-Bcpvpefn.css +2 -0
  58. package/web/assets/monitor-ORxecA9m.js +1 -0
  59. package/web/assets/mount-app-DGgK0IVe.js +9 -0
  60. package/web/assets/mutation-CEbxdVYy.js +1 -0
  61. package/web/assets/panels-top-left-K8n2CefH.js +1 -0
  62. package/web/assets/project-diff-summary-BzAMC_7C.js +1 -0
  63. package/web/assets/public-Cv_Xe2Sp.js +1 -0
  64. package/web/assets/{public-components-CS0BXa3D.js → public-components-Dfm4D7vP.js} +1 -1
  65. package/web/assets/public-navigation-zJPpUiuy.js +2 -0
  66. package/web/assets/query-Bj-DUNYq.js +1 -0
  67. package/web/assets/radio-tower-jGQwrFWB.js +1 -0
  68. package/web/assets/{runtime-capabilities-store-D5g-oC-Z.js → runtime-capabilities-store-C1lkVKpw.js} +1 -1
  69. package/web/assets/scale-pAyho3H9.js +1 -0
  70. package/web/assets/{session-change-summary-api-4_dTNU4L.js → session-change-summary-api-CqJa3Wdh.js} +1 -1
  71. package/web/assets/{session-organization-api-1F_dNhFa.js → session-organization-api-B0E2RXLS.js} +1 -1
  72. package/web/assets/session-streaming-state-DUehpyTs.js +3 -0
  73. package/web/assets/settings-navigation-BhTYSdv9.js +1 -0
  74. package/web/assets/{shortcuts-CAyIKRpZ.js → shortcuts-ChJr3RP4.js} +1 -1
  75. package/web/assets/{sidebar-CjfGBEog.js → sidebar-CERcJRog.js} +1 -1
  76. package/web/assets/{speech-session-BoAvAzPN.js → speech-session-BPNbd_CM.js} +1 -1
  77. package/web/assets/startup-queries-uKXB2KOP.js +1 -0
  78. package/web/assets/{ui-store-D-oOtKbW.js → ui-store-BM6pl-Rq.js} +1 -1
  79. package/web/assets/use-back-layer-B4dm_FZt.js +1 -0
  80. package/web/assets/{use-i18n-Dpn7lxcE.js → use-i18n-BrWBoyFl.js} +1 -1
  81. package/web/assets/use-mobile-PCHaokZZ.js +1 -0
  82. package/web/assets/{useCustomUiComponents-DzY3OjE_.js → useCustomUiComponents-IxX7wKrp.js} +1 -1
  83. package/web/assets/useQuery-DdcpUQhO.js +1 -0
  84. package/web/assets/web-preview-D1qOo-1X.js +1 -0
  85. package/web/assets/{web-preview-events-BS5O8D7_.js → web-preview-events-BMXsxTa3.js} +1 -1
  86. package/web/assets/web-preview-panel-B7JAZr2D.js +552 -0
  87. package/web/index.html +2 -2
  88. package/web/assets/ChatAppearancePage-Cjy9iir_.js +0 -2
  89. package/web/assets/ChatHistoryPage-BhXVvudL.js +0 -1
  90. package/web/assets/ChatPage-CzcvU3Tv.js +0 -4
  91. package/web/assets/ConfigPage-F1Y_oed5.js +0 -1
  92. package/web/assets/GitDiffViewer-Dv9WOiX1.js +0 -4
  93. package/web/assets/McpPage-CaUm1pYY.js +0 -1
  94. package/web/assets/MobileViewportStabilizer-OtwVmIPm.js +0 -1
  95. package/web/assets/SessionContextPanel-nvijY4R5.js +0 -2
  96. package/web/assets/WorkbenchNavigation-BBZRfeaC.js +0 -1
  97. package/web/assets/app-update-BHhqGwQp.js +0 -32
  98. package/web/assets/back-navigation-DS0YlxM8.js +0 -1
  99. package/web/assets/catalog-DpGpcvIi.js +0 -1
  100. package/web/assets/chat-api-CYidanXn.js +0 -1
  101. package/web/assets/events-By17Y3YI.js +0 -1
  102. package/web/assets/i18n-CAJMli-q.js +0 -1
  103. package/web/assets/index-Z8qQPd8t.css +0 -2
  104. package/web/assets/mount-app-Sl2T_gzZ.js +0 -9
  105. package/web/assets/mutation-Difliohy.js +0 -1
  106. package/web/assets/public-DAsd8NDM.js +0 -1
  107. package/web/assets/public-navigation-BzM_ocRb.js +0 -2
  108. package/web/assets/radio-tower-BW78Ns4R.js +0 -1
  109. package/web/assets/session-streaming-state-CX6zkOkc.js +0 -3
  110. package/web/assets/startup-queries-DItwFTRv.js +0 -1
  111. package/web/assets/use-back-layer-Cxm0-40v.js +0 -1
  112. package/web/assets/use-mobile-YXncArOq.js +0 -1
  113. package/web/assets/useQuery-Bg3cTjsY.js +0 -1
  114. package/web/assets/web-preview-C3u-dblt.js +0 -1
  115. package/web/assets/web-preview-panel-CHiIjAoR.js +0 -552
@@ -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"./use-i18n-Dpn7lxcE.js";import{n as i,t as a}from"./switch-Ci_hmu39.js";import{t as o}from"./utils-C8uzG5AZ.js";import{t as s}from"./circle-dot-nVrXgDaG.js";import{t as ee}from"./copy-DHmIFc52.js";import{t as c}from"./key-round-C29uZbsf.js";import{t as l}from"./refresh-cw-TbWxTY4K.js";import{t as u}from"./server-BgNvmqwJ.js";import{t as d}from"./trash-2-CNrPOoPR.js";import{t as f}from"./wrench-6pg6_bqI.js";import{i as p,n as m}from"./http-rQRvhTOP.js";import{t as h}from"./button-BcPDt1Ge.js";import{S as g,c as _,g as v,m as y,r as b,t as x,u as S,v as C,y as w}from"./useQuery-Bg3cTjsY.js";import{n as T}from"./mutation-Difliohy.js";import{t as E}from"./queryOptions-Dfvzj6n2.js";import{t as D}from"./alert-QoPGoIY6.js";import{a as O,i as k,o as A,r as j,s as te,t as ne}from"./dialog-CGGxREwU.js";import{r as M}from"./format-BRFKAYMT.js";import{r as N,t as P}from"./card-BdUpL1KB.js";import{t as F}from"./PageFrame-BiJUCJku.js";import{t as I}from"./usePagePrimaryAction-CWPC0C_f.js";import{t as L}from"./ListDetailLayout-S-IBs4f_.js";import{t as re}from"./textarea-bYCRTyEt.js";var R=class extends g{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),C(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&S(t.mutationKey)!==S(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??T();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){_.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},z=e(t(),1);function ie(e,t){let n=b(t);return oe({filters:{...e,status:`pending`}},n).length}function ae(e,t){return e.findAll(t.filters).map(e=>t.select?t.select(e):e.state)}function oe(e={},t){let n=b(t).getMutationCache(),r=z.useRef(e),i=z.useRef(null);return i.current===null&&(i.current=ae(n,e)),z.useEffect(()=>{r.current=e}),z.useSyncExternalStore(z.useCallback(e=>n.subscribe(()=>{let t=v(i.current,ae(n,r.current));i.current!==t&&(i.current=t,_.schedule(e))}),[n]),()=>i.current,()=>i.current)}function se(e,t){let n=b(t),[r]=z.useState(()=>new R(n,e));z.useEffect(()=>{r.setOptions(e)},[r,e]);let i=z.useSyncExternalStore(z.useCallback(e=>r.subscribe(_.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=z.useCallback((e,t)=>{r.mutate(e,t).catch(y)},[r]);if(i.error&&w(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function B(e){if(!e||typeof e!=`object`||Array.isArray(e))throw p();return Object.fromEntries(Object.entries(e))}function V(e,t=!1){if(e==null&&!t)return``;if(typeof e!=`string`||t&&!e)throw p();return e}function H(e,t=0){if(e==null)return t;if(typeof e!=`number`||!Number.isFinite(e))throw p();return e}function U(e){if(typeof e!=`boolean`)throw p();return e}function W(e,t){if(e===void 0)return[];if(!Array.isArray(e))throw p();return e.map(t)}function ce(e){let t=B(e);return{id:V(t.id,!0),name:V(t.name,!0),status:V(t.status),transport:V(t.transport),endpoint:V(t.endpoint),command:V(t.command),workingDirectory:V(t.workingDirectory),enabled:U(t.enabled),error:V(t.error),latencyMs:t.latencyMs==null?null:H(t.latencyMs),lastPingAt:V(t.lastPingAt),auth:V(t.auth),authCount:H(t.authCount)}}function le(e){let t=B(e);return{serviceId:V(t.serviceId,!0),serviceName:V(t.serviceName),name:V(t.name,!0),piName:V(t.piName,!0),description:V(t.description),enabled:U(t.enabled),serviceEnabled:U(t.serviceEnabled),risk:V(t.risk)}}function ue(e){let t=B(e);return{id:V(t.id,!0),serviceId:V(t.serviceId,!0),toolName:V(t.toolName),timestamp:V(t.timestamp),status:V(t.status),error:V(t.error),durationMs:H(t.durationMs)}}function G(e){let t=B(e);if(!Array.isArray(t.services))throw p();let n=t.metrics===void 0?{}:B(t.metrics);return{services:t.services.map(ce),tools:W(t.tools,le),calls:W(t.calls,ue),metrics:{totalServices:H(n.totalServices),onlineServices:H(n.onlineServices),availableTools:H(n.availableTools),restrictedTools:H(n.restrictedTools),errorRate:H(n.errorRate)}}}var K=e=>`/api/mcp/${encodeURIComponent(e)}`,q={dashboard:e=>m(`/api/mcp?refresh=0`,{signal:e,parse:G}),add:e=>m(`/api/mcp`,{method:`POST`,body:{spec:e},parse:G}),setServerEnabled:(e,t)=>m(K(e),{method:`PATCH`,body:{enabled:t},parse:G}),setToolEnabled:(e,t,n)=>m(`${K(e)}/tools/${encodeURIComponent(t)}`,{method:`PATCH`,body:{enabled:n},parse:G}),test:e=>m(`${K(e)}/test`,{method:`POST`,body:{},parse:G}),remove:async e=>(await m(K(e),{method:`DELETE`}),q.dashboard())};function de(e){if(!e||typeof e!=`object`||Array.isArray(e))throw p();return Object.fromEntries(Object.entries(e))}function fe(e){let t=de(e);if(typeof t.enabled!=`boolean`||typeof t.listening!=`boolean`||typeof t.host!=`string`||typeof t.port!=`number`||!Number.isInteger(t.port)||typeof t.url!=`string`||t.error!==null&&typeof t.error!=`string`)throw p();return{enabled:t.enabled,listening:t.listening,host:t.host,port:t.port,url:t.url,error:t.error}}function pe(e){let t=de(e);if(typeof t.url!=`string`||!t.url||typeof t.token!=`string`||!t.token)throw p();return{url:t.url,token:t.token}}var J={status:e=>m(`/api/mcp-host`,{signal:e,parse:fe}),setEnabled:e=>m(`/api/mcp-host`,{method:`PATCH`,body:{enabled:e},parse:fe}),credentials:e=>m(`/api/mcp-host/credentials`,{method:`POST`,body:{},signal:e,parse:pe}),rotateToken:e=>m(`/api/mcp-host/rotate-token`,{method:`POST`,body:{},signal:e,parse:pe})},Y=n(),me=[`mcp-host`,`status`];function he(e){return JSON.stringify({mcpServers:{pisper:{url:e.url,headers:{Authorization:`Bearer ${e.token}`}}}},null,2)}function ge({notify:e,requestConfirm:t}){let{t:n}=r(),o=b(),[s,d]=(0,z.useState)(!1),[f,p]=(0,z.useState)(!1),[m,g]=(0,z.useState)(!1),[_,v]=(0,z.useState)(null),[y,S]=(0,z.useState)(``),C=(0,z.useRef)(null),w=(0,z.useRef)(null),T=typeof window<`u`&&!!window.__PISPER_MOBILE_APP__,E=x({queryKey:me,queryFn:({signal:e})=>J.status(e),enabled:!T&&!s,refetchInterval:15e3});if((0,z.useEffect)(()=>()=>{C.current?.abort()},[]),T)return null;let M=E.data,N=_?he(_):``,F=()=>{C.current?.abort(),C.current=null,v(null),S(``),g(!1)},I=async()=>{C.current?.abort();let e=new AbortController;C.current=e,p(!0),v(null),S(``),g(!0);try{let t=await J.credentials(e.signal);e.signal.aborted||v(t)}catch(t){e.signal.aborted||S(t instanceof Error?t.message:n(`mcp:hostLoadFailed`))}finally{C.current===e&&(C.current=null,p(!1))}},L=async t=>{d(!0);try{let r=await J.setEnabled(t);o.setQueryData(me,r),t||F(),e(r.error||n(t?`mcp:hostEnabledNotice`:`mcp:hostDisabledNotice`),r.error?`error`:`success`)}catch(t){e(t instanceof Error?t.message:n(`mcp:hostUpdateFailed`),`error`)}finally{d(!1)}},R=async()=>{if(t&&!await t({title:n(`mcp:hostRotateTitle`),message:n(`mcp:hostRotateWarning`),confirmLabel:n(`mcp:hostRotate`),tone:`danger`}))return;C.current?.abort();let r=new AbortController;C.current=r,p(!0),S(``),v(null);try{let t=await J.rotateToken(r.signal);r.signal.aborted||(v(t),e(n(`mcp:hostRotatedNotice`),`success`))}catch(e){r.signal.aborted||S(e instanceof Error?e.message:n(`mcp:hostRotateFailed`))}finally{C.current===r&&(C.current=null,p(!1))}},ie=async()=>{try{await navigator.clipboard.writeText(N),e(n(`mcp:hostCopied`),`success`)}catch{w.current?.select(),e(n(`mcp:hostCopyManually`),`error`)}};return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(P,{className:`mb-3 gap-3 p-4 shadow-none`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-4`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,Y.jsx)(`span`,{className:`mt-0.5 rounded-lg bg-muted p-2 text-foreground`,"aria-hidden":`true`,children:(0,Y.jsx)(u,{className:`size-4`})}),(0,Y.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Y.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:n(`mcp:hostTitle`)}),M&&(0,Y.jsx)(i,{variant:`outline`,className:`font-normal text-muted-foreground`,children:M.listening?n(`mcp:hostReady`):M.enabled?n(`mcp:hostUnavailable`):n(`mcp:disabled`)})]}),(0,Y.jsx)(`p`,{className:`max-w-2xl text-xs leading-5 text-muted-foreground`,children:n(`mcp:hostDescription`)})]})]}),(0,Y.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n(`mcp:hostEnabled`)}),(0,Y.jsx)(a,{checked:!!M?.enabled,disabled:!M||s,"aria-label":n(`mcp:hostEnabled`),onCheckedChange:e=>void L(e)})]})]}),E.isPending&&(0,Y.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n(`mcp:loading`)}),E.error&&(0,Y.jsxs)(D,{className:`flex flex-wrap items-center justify-between gap-2 text-xs text-muted-foreground`,children:[(0,Y.jsx)(`span`,{children:E.error.message}),(0,Y.jsx)(h,{size:`sm`,variant:`ghost`,onClick:()=>void E.refetch(),children:n(`mcp:retry`)})]}),M?.error&&(0,Y.jsx)(D,{role:`status`,className:`text-xs text-muted-foreground`,children:M.error}),M?.listening&&(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2 border-t pt-3`,children:[(0,Y.jsx)(`code`,{className:`min-w-0 max-w-full break-all rounded-md bg-muted px-2 py-1 text-xs text-foreground`,children:M.url}),(0,Y.jsxs)(h,{size:`sm`,variant:`outline`,onClick:()=>void I(),children:[(0,Y.jsx)(c,{"data-icon":`inline-start`}),n(`mcp:hostShowConfig`)]})]})]}),(0,Y.jsx)(ne,{open:m,onOpenChange:e=>!e&&F(),children:(0,Y.jsxs)(j,{className:`min-w-0 grid-cols-[minmax(0,1fr)] sm:max-w-xl`,children:[(0,Y.jsxs)(A,{className:`min-w-0 pr-8 text-left`,children:[(0,Y.jsx)(te,{children:n(`mcp:hostConfigTitle`)}),(0,Y.jsx)(k,{className:`leading-5`,children:n(`mcp:hostConfigDescription`)})]}),f&&(0,Y.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,Y.jsx)(l,{className:`size-4 animate-spin`}),n(`mcp:hostLoadingConfig`)]}),y&&(0,Y.jsx)(D,{role:`alert`,className:`text-sm text-muted-foreground`,children:y}),_&&(0,Y.jsx)(re,{ref:w,value:N,readOnly:!0,spellCheck:!1,"aria-label":n(`mcp:hostConfigTitle`),className:`h-52 max-h-[45dvh] resize-y font-mono text-xs [overflow-wrap:anywhere]`,onFocus:e=>e.currentTarget.select()}),(0,Y.jsxs)(O,{className:`min-w-0 flex-wrap`,children:[(0,Y.jsxs)(h,{variant:`outline`,disabled:f,onClick:()=>void R(),children:[(0,Y.jsx)(l,{"data-icon":`inline-start`}),n(`mcp:hostRotate`)]}),(0,Y.jsxs)(h,{disabled:!_||f,onClick:()=>void ie(),children:[(0,Y.jsx)(ee,{"data-icon":`inline-start`}),n(`mcp:hostCopyConfig`)]})]})]})})]})}var X=[`mcp`,`dashboard`],_e=[`mcp`,`change`];function ve(){return E({queryKey:X,queryFn:({signal:e})=>q.dashboard(e),staleTime:0,retry:!1})}function ye(e){return{mutationKey:_e,scope:{id:`mcp-dashboard`},retry:!1,mutationFn:async t=>(await e.cancelQueries({queryKey:X}),t()),onSuccess:t=>e.setQueryData(X,t),onSettled:()=>e.invalidateQueries({queryKey:X})}}function be(){let e=b(),t=ie({mutationKey:_e})>0,n=x({...ve(),enabled:!t,refetchInterval:!t&&1e4}),r=se(ye(e));return{data:n.data,loading:n.isPending,error:r.error||n.error,busy:t,change:r.mutateAsync,reload:()=>(r.reset(),n.refetch())}}var xe={green:`border-[var(--success-border)] bg-[var(--success-soft)] text-[var(--success-strong)]`,amber:`border-[var(--warning-border)] bg-[var(--warning-soft)] text-[var(--warning-strong)]`,gray:`border-[var(--stroke)] bg-[var(--surface-muted)] text-[var(--text-muted)]`,red:`border-[var(--danger-border)] bg-[var(--danger-soft)] text-[var(--danger)]`};function Z({className:e,children:t}){return(0,Y.jsx)(P,{size:`sm`,className:o(`workflow-card [&_h2]:text-[16px] [&_h2]:tracking-[-.02em] [.detail-stack_>_&]:[flex:0_0_auto] [border:1px_solid_var(--stroke)] rounded-[var(--r-xs)] bg-[var(--panel)] text-[var(--text)] shadow-[0_1px_2px_var(--sh-edge),0_14px_32px_-24px_var(--shadow)] gap-0 p-3.5 py-3.5`,e),children:t})}function Q({children:e}){return(0,Y.jsx)(N,{className:`workflow-section-title [.selection-list_&]:mb-[8px] [.node-library_&]:mb-[8px] text-[var(--text-soft)] text-[13px] font-[700] leading-[1.4]`,children:e})}function $({value:e,label:t,note:n,tone:r}){return(0,Y.jsxs)(P,{size:`sm`,className:o(`workflow-card [&_h2]:text-[16px] [&_h2]:tracking-[-.02em] [.detail-stack_>_&]:[flex:0_0_auto] [border:1px_solid_var(--stroke)] rounded-[var(--r-xs)] bg-[var(--panel)] text-[var(--text)] shadow-[0_1px_2px_var(--sh-edge),0_14px_32px_-24px_var(--shadow)] metric [transition:transform_var(--d2)_var(--ease-out),_box-shadow_var(--d2)_var(--ease-out),_border-color_var(--d2)_var(--ease-out)] hover:[transform:translateY(-2px)] hover:shadow-[var(--sh-2)] hover:border-[var(--star-border)] [&_small]:[grid-column:1/-1] [&_small]:text-[var(--text-muted)] [&_small]:text-[13px] [&_strong]:mt-[5px] [&_strong]:font-[ui-monospace,_SFMono-Regular,_Consolas,_'Liberation_Mono',_monospace] [&_strong]:text-[23px] [&_span]:[align-self:end] [&_span]:text-[var(--text-muted)] [&_span]:text-[13px] [&.blue_strong]:text-[var(--star-strong)] [&.green_strong]:text-[var(--success)] [&.amber_strong]:text-[var(--amber)] grid grid-cols-[1fr_auto] [padding:12px] gap-0 p-3 py-3`,r),children:[(0,Y.jsx)(`small`,{children:t}),(0,Y.jsx)(`strong`,{children:e}),(0,Y.jsx)(`span`,{children:n})]})}function Se({children:e,tone:t}){return(0,Y.jsx)(i,{variant:`outline`,className:xe[t],children:e})}function Ce(e,t){return e===`online`?[t(`mcp:online`),`green`]:e===`connecting`?[t(`mcp:connecting`),`amber`]:e===`unauthorized`?[t(`mcp:unauthorized`),`gray`]:e===`disabled`?[t(`mcp:disabled`),`gray`]:[t(`mcp:offline`),`red`]}function we(e,t){return e===`high`||e===`高风险`?t(`mcp:highRisk`):e===`medium`||e===`中风险`?t(`mcp:mediumRisk`):e===`low`||e===`低风险`?t(`mcp:lowRisk`):String(e||``)}function Te(e,t){return e?e.auth===`headers`?t(`mcp:countRequestHeaders`,{count:e.authCount}):e.auth===`environment`?t(`mcp:configuredEnvironmentVariables`):e.auth===`local`?t(`mcp:localProcess`):t(`mcp:none`):`—`}function Ee({notify:e,query:t=``,registerPrimaryAction:n,requestText:i,requestConfirm:o}){let[ee,c]=(0,z.useState)(!1),{t:p,language:m}=r(),{data:g,busy:_,loading:v,error:y,change:b,reload:x}=be(),[S,C]=(0,z.useState)(``),w=(0,z.useCallback)(async()=>{let t=await i?.({title:p(`mcp:addMCPService`),message:p(`mcp:enterAStreamableHTTPURLAStdioCommandOrJSONContainingHeadersEnv`),inputLabel:p(`mcp:serverConfiguration`),placeholder:`https://server.example.com/mcp`,maxLength:12e3,confirmLabel:p(`mcp:continue`)});if(t?.trim()&&await o?.({title:p(`mcp:connectMCPServer`),message:p(`mcp:mcpServersCanExposeToolsThatPerformExternalActionsConnectOnlyToServersYouTrust`),confirmLabel:p(`mcp:connect`),tone:`danger`})!==!1)try{let n=await b(()=>q.add(t));C(n.services.at(-1)?.id||n.services[0]?.id||``),e(p(`mcp:mcpServerAdded`),`success`)}catch(t){e(t instanceof Error?t.message:String(t),`error`)}},[b,e,o,i,p]);I(n,w);let T=g?.services||[],E=T.filter(e=>`${e.name} ${e.endpoint}`.toLowerCase().includes(t.toLowerCase())),O=T.find(e=>e.id===S)||E[0]||T[0]||null,k=(g?.tools||[]).filter(e=>`${e.name} ${e.serviceName} ${e.description}`.toLowerCase().includes(t.toLowerCase())),A=(g?.calls||[]).filter(e=>!O||e.serviceId===O.id),j=g?.metrics||{totalServices:0,onlineServices:0,availableTools:0,restrictedTools:0,errorRate:0},te=async(t,n)=>{try{await b(()=>q.setToolEnabled(t.serviceId,t.name,n))}catch(t){e(t instanceof Error?t.message:String(t),`error`)}},ne=async t=>{if(O)try{await b(()=>q.setServerEnabled(O.id,t)),e(p(t?`mcp:mcpServerEnabled`:`mcp:mcpServerDisabled`),`success`)}catch(t){e(t instanceof Error?t.message:String(t),`error`)}},N=async()=>{if(O)try{await b(()=>q.test(O.id)),e(p(`mcp:mcpConnectionTestPassed`),`success`)}catch(t){e(t instanceof Error?t.message:String(t),`error`)}},P=async()=>{if(O&&await o?.({title:p(`mcp:deleteMCPServer`),message:p(`mcp:afterDeletionToolsFromThisServerWillBeRemovedFromSubsequentAgentRuns`),confirmLabel:p(`mcp:delete`),tone:`danger`})!==!1)try{let t=await b(()=>q.remove(O.id));C(t?.services[0]?.id||``),e(p(`mcp:mcpServerDeleted`),`success`)}catch(t){e(t instanceof Error?t.message:String(t),`error`)}};return(0,Y.jsx)(F,{variant:`list-detail`,children:(0,Y.jsx)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:(0,Y.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3`,children:[(0,Y.jsx)(ge,{notify:e,requestConfirm:o}),v&&!y&&(0,Y.jsx)(`p`,{role:`status`,children:p(`mcp:loading`)}),y&&(0,Y.jsxs)(D,{role:`status`,className:`mb-3 flex min-w-0 items-center justify-between gap-3 text-muted-foreground [overflow-wrap:anywhere]`,children:[(0,Y.jsx)(`span`,{children:y.message}),(0,Y.jsx)(h,{variant:`ghost`,disabled:_,onClick:()=>void x(),children:p(`mcp:retry`)})]}),g&&(0,Y.jsx)(Y.Fragment,{children:(0,Y.jsx)(L,{selected:ee,onBack:()=>c(!1),backLabel:p(`common:pageTemplate.backToList`),list:(0,Y.jsxs)(Z,{className:`min-w-0 border-0 bg-transparent p-0 shadow-none`,children:[(0,Y.jsx)(Q,{children:p(`mcp:services`)}),E.length?E.map(e=>{let[t,n]=Ce(e.status,p),r=e.transport===`stdio`?e.workingDirectory||e.command:e.endpoint;return(0,Y.jsxs)(`button`,{className:`service-row grid w-full grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-[9px] border-0 [border-top:1px_solid_var(--stroke-soft)] bg-transparent p-[10px_8px] text-left hover:rounded-[var(--r-sm)] hover:bg-[var(--accent-soft)] [&.active]:rounded-[var(--r-sm)] [&.active]:bg-[var(--accent-soft)] [&_>_span:nth-child(2)]:flex [&_>_span:nth-child(2)]:flex-col [&_>_span:nth-child(2)]:gap-[3px] [&_strong]:text-[13px] [&_small]:text-[var(--text-muted)] [&_small]:text-[13px] [&_small]:overflow-hidden [&_small]:text-ellipsis [&_small]:whitespace-nowrap ${O?.id===e.id?`active`:``}`,onClick:()=>{c(!0),C(e.id)},children:[(0,Y.jsx)(`span`,{className:`list-icon [.chat-resource-list_&]:grid [.chat-resource-list_&]:w-[28px] [.chat-resource-list_&]:h-[28px] [.chat-resource-list_&]:place-items-center [.chat-resource-list_&]:rounded-[var(--r-sm)] [.chat-resource-list_&]:bg-[var(--surface-subtle)] [.chat-resource-list_&]:text-[var(--star-strong)] [.session-workflow-summary_&]:grid [.session-workflow-summary_&]:w-[28px] [.session-workflow-summary_&]:h-[28px] [.session-workflow-summary_&]:place-items-center [.session-workflow-summary_&]:rounded-[var(--r-sm)] [.session-workflow-summary_&]:bg-[var(--surface-subtle)] [.session-workflow-summary_&]:text-[var(--star-strong)] grid w-[27px] h-[27px] place-items-center rounded-[var(--r-sm)] bg-[var(--accent-soft)] text-[var(--star-strong)] [.workflow-template-gallery_&]:grid [.workflow-template-gallery_&]:w-[32px] [.workflow-template-gallery_&]:h-[32px] [.workflow-template-gallery_&]:place-items-center [.workflow-template-gallery_&]:rounded-[var(--r-sm)] [.workflow-template-gallery_&]:bg-[var(--surface-subtle)] [.workflow-template-gallery_&]:text-[var(--star-strong)]`,children:(0,Y.jsx)(u,{size:15})}),(0,Y.jsxs)(`span`,{children:[(0,Y.jsx)(`strong`,{children:e.name}),(0,Y.jsx)(`small`,{title:r,children:r})]}),(0,Y.jsx)(Se,{tone:n,children:t})]},e.id)}):(0,Y.jsx)(`div`,{className:`channel-route-empty [&_strong]:mt-[9px] [&_strong]:text-[var(--text)] [&_strong]:text-[12px] [&_span]:mt-[4px] [&_span]:text-[13px] [&.compact]:min-h-[110px] [.workflow-assets-panel_&]:min-h-[150px] [.workflow-assets-panel_&]:border-0 [.workflow-assets-panel_&]:bg-transparent grid min-h-[185px] place-content-center justify-items-center text-[var(--text-muted)] text-center compact`,children:p(`mcp:noServerConfigured`)})]}),detail:(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,Y.jsxs)(`div`,{className:`metric-grid max-[650px]:grid-cols-[1fr] grid grid-cols-[repeat(3,minmax(0,1fr))] gap-[9px]`,children:[(0,Y.jsx)($,{value:String(j.onlineServices),label:p(`mcp:onlineServices`),note:p(`mcp:countServicesTotal`,{count:j.totalServices}),tone:`blue`}),(0,Y.jsx)($,{value:String(j.availableTools),label:p(`mcp:availableTools`),note:p(`mcp:countRestrictedTools`,{count:j.restrictedTools}),tone:`green`}),(0,Y.jsx)($,{value:`${j.errorRate}%`,label:p(`mcp:errorRate`),note:`24h`,tone:`amber`})]}),(0,Y.jsxs)(Z,{className:`mcp-tools-panel min-h-0 flex-1 overflow-y-auto`,children:[(0,Y.jsxs)(Q,{children:[p(`mcp:toolCapabilities`),` · `,k.length]}),k.length?k.map(e=>(0,Y.jsxs)(`div`,{className:`tool-row [&_>_span:nth-child(2)]:flex [&_>_span:nth-child(2)]:flex-col [&_>_span:nth-child(2)]:gap-[3px] [&_strong]:text-[13px] [&_small]:text-[var(--text-muted)] [&_small]:text-[13px] [&_small]:overflow-hidden [&_small]:text-ellipsis [&_small]:whitespace-nowrap grid min-h-[48px] grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-[8px] [border-top:1px_solid_var(--stroke-soft)] [padding:6px_2px]`,children:[(0,Y.jsx)(`span`,{className:`list-icon [.chat-resource-list_&]:grid [.chat-resource-list_&]:w-[28px] [.chat-resource-list_&]:h-[28px] [.chat-resource-list_&]:place-items-center [.chat-resource-list_&]:rounded-[var(--r-sm)] [.chat-resource-list_&]:bg-[var(--surface-subtle)] [.chat-resource-list_&]:text-[var(--star-strong)] [.session-workflow-summary_&]:grid [.session-workflow-summary_&]:w-[28px] [.session-workflow-summary_&]:h-[28px] [.session-workflow-summary_&]:place-items-center [.session-workflow-summary_&]:rounded-[var(--r-sm)] [.session-workflow-summary_&]:bg-[var(--surface-subtle)] [.session-workflow-summary_&]:text-[var(--star-strong)] grid w-[27px] h-[27px] place-items-center rounded-[var(--r-sm)] bg-[var(--accent-soft)] text-[var(--star-strong)] [.workflow-template-gallery_&]:grid [.workflow-template-gallery_&]:w-[32px] [.workflow-template-gallery_&]:h-[32px] [.workflow-template-gallery_&]:place-items-center [.workflow-template-gallery_&]:rounded-[var(--r-sm)] [.workflow-template-gallery_&]:bg-[var(--surface-subtle)] [.workflow-template-gallery_&]:text-[var(--star-strong)]`,children:(0,Y.jsx)(f,{size:15})}),(0,Y.jsxs)(`span`,{children:[(0,Y.jsx)(`strong`,{children:e.name}),(0,Y.jsxs)(`small`,{children:[e.serviceName,` · `,e.description]})]}),(0,Y.jsx)(Se,{tone:e.risk===`high`||e.risk===`高风险`?`red`:e.risk===`medium`||e.risk===`中风险`?`amber`:`green`,children:we(e.risk,p)}),(0,Y.jsx)(a,{checked:!!e.enabled,disabled:_||!e.serviceEnabled,"aria-label":p(`mcp:toggleToolName`,{name:e.name}),onCheckedChange:t=>void te(e,t)})]},e.piName)):(0,Y.jsx)(`div`,{className:`channel-route-empty [&_strong]:mt-[9px] [&_strong]:text-[var(--text)] [&_strong]:text-[12px] [&_span]:mt-[4px] [&_span]:text-[13px] [&.compact]:min-h-[110px] [.workflow-assets-panel_&]:min-h-[150px] [.workflow-assets-panel_&]:border-0 [.workflow-assets-panel_&]:bg-transparent grid min-h-[185px] place-content-center justify-items-center text-[var(--text-muted)] text-center compact`,children:p(`mcp:noToolsAvailable`)})]})]}),inspector:(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,Y.jsxs)(Z,{children:[(0,Y.jsx)(Q,{children:p(`mcp:currentService`)}),(0,Y.jsx)(`h2`,{children:O?.name||p(`mcp:noServerConfigured`)}),(0,Y.jsx)(`p`,{className:`muted-copy m-[8px_0_14px] text-[var(--text-muted)] text-[12px] leading-[1.55]`,children:O?.error||p(O?`mcp:thisServerExposesToolsThroughAStandardMCPTransportEnabledToolsAreRegisteredInNewAgentRuntimes`:`mcp:useTheButtonInTheUpperRightToAddAStreamableHTTPOrStdioMCPServer`)}),[[p(`mcp:transport`),O?.transport===`stdio`?`stdio`:O?.transport===`sse`?`HTTP + SSE`:`Streamable HTTP`],...O?.transport===`stdio`?[[p(`mcp:executable`),O.command||`—`],[p(`mcp:workingDirectory`),O.workingDirectory||`—`]]:[[p(`mcp:serverAddress`),O?.endpoint||`—`]],[p(`mcp:latency`),O?.latencyMs==null?`—`:`${O.latencyMs} ms`],[p(`mcp:lastPing`),O?.lastPingAt?M(O.lastPingAt,m):`—`],[p(`mcp:authentication`),Te(O,p)]].map(e=>(0,Y.jsxs)(`div`,{className:`key-value [&:first-of-type]:mt-[7px] [&_span]:text-[var(--text-muted)] [&_button]:flex [&_button]:items-center [&_button]:gap-[4px] [&_button]:border-0 [&_button]:bg-transparent [&_button]:text-[var(--text-soft)] [&_button]:text-[12px] [&_strong]:min-w-0 [&_strong]:overflow-hidden [&_strong]:text-[13px] [&_strong]:text-ellipsis [&_strong]:whitespace-nowrap flex min-h-[31px] items-center justify-between gap-[10px] [border-top:1px_solid_var(--stroke-soft)] text-[13px]`,children:[(0,Y.jsx)(`span`,{children:e[0]}),(0,Y.jsx)(`strong`,{title:e[1],children:e[1]})]},e[0])),(0,Y.jsxs)(`div`,{className:`toggle-line [&_>_span]:flex [&_>_span]:items-center [&_>_span]:gap-[7px] [&_>_span]:text-[12px] flex min-h-[34px] items-center justify-between [border-top:1px_solid_var(--stroke-soft)]`,children:[(0,Y.jsx)(`span`,{children:p(`mcp:serverEnabled`)}),(0,Y.jsx)(a,{checked:!!O?.enabled,disabled:!O||_,"aria-label":p(`mcp:toggleMCPServer`),onCheckedChange:e=>void ne(e)})]}),(0,Y.jsxs)(`div`,{className:`mt-[15px] flex gap-2 max-[650px]:flex-wrap`,children:[(0,Y.jsxs)(h,{size:`sm`,variant:`secondary`,disabled:!O?.enabled||_,onClick:N,children:[(0,Y.jsx)(l,{className:_?`animate-spin`:``,"data-icon":`inline-start`}),p(`mcp:testConnection`)]}),(0,Y.jsxs)(h,{size:`sm`,variant:`destructive`,disabled:!O||_,onClick:P,children:[(0,Y.jsx)(d,{"data-icon":`inline-start`}),p(`mcp:delete`)]})]})]}),(0,Y.jsxs)(Z,{className:`mcp-calls-panel min-h-0 flex-1 overflow-y-auto`,children:[(0,Y.jsx)(Q,{children:p(`mcp:recentCalls`)}),A.length?A.slice(0,8).map(e=>(0,Y.jsxs)(`div`,{className:`activity-row [&_span]:flex [&_span]:min-w-0 [&_span]:flex-col [&_span]:gap-[3px] [&_strong]:text-[13px] [&_small]:text-[var(--text-muted)] [&_small]:text-[13px] [&_span]:text-[var(--text)] [&.failed]:text-[var(--danger)] [&.running]:text-[var(--star-strong)] grid grid-cols-[auto_minmax(0,1fr)] items-center gap-[9px] [border-top:1px_solid_var(--stroke-soft)] [padding:9px_2px] text-[var(--success)]`,children:[(0,Y.jsx)(s,{size:14}),(0,Y.jsxs)(`span`,{children:[(0,Y.jsx)(`strong`,{children:e.toolName}),(0,Y.jsxs)(`small`,{children:[M(e.timestamp,m),` ·`,` `,e.status===`ok`?p(`mcp:callSucceeded`):e.error||p(`mcp:callFailed`),` `,`· `,e.durationMs,` ms`]})]})]},e.id)):(0,Y.jsx)(`div`,{className:`channel-route-empty [&_strong]:mt-[9px] [&_strong]:text-[var(--text)] [&_strong]:text-[12px] [&_span]:mt-[4px] [&_span]:text-[13px] [&.compact]:min-h-[110px] [.workflow-assets-panel_&]:min-h-[150px] [.workflow-assets-panel_&]:border-0 [.workflow-assets-panel_&]:bg-transparent grid min-h-[185px] place-content-center justify-items-center text-[var(--text-muted)] text-center compact`,children:p(`mcp:noRecentCalls`)})]})]})})})]})})})}export{Ee as McpPage};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{i as t}from"./vendor-react-DwNgTV1j.js";var n=e(t(),1);function r({enabled:e,shellRef:t}){return(0,n.useEffect)(()=>{if(!e)return;let n=t.current;if(!n)return;let r=window.visualViewport,i=0,a=0,o=0,s=Math.max(window.innerHeight,r?.height??0),c=`[data-mobile-composer-input]`,l=()=>{o&&window.clearTimeout(o),o=0},u=e=>{l(),n.dataset.mobileKeyboardTransition=e,e===`opening`&&(o=window.setTimeout(()=>{n.dataset.mobileKeyboard||delete n.dataset.mobileKeyboardTransition,o=0},500))},d=e=>{!(e instanceof Element)||!e.closest(c)||u(`opening`)},f=e=>d(e.target),p=e=>d(e.target),m=e=>{let t=e.target;!(t instanceof Element)||!t.closest(c)||window.requestAnimationFrame(()=>{let e=document.activeElement;e instanceof Element&&e.closest(c)||(u(`closing`),o=window.setTimeout(()=>{delete n.dataset.mobileKeyboardTransition,o=0},240))})},h=e=>{if(!n.dataset.mobileKeyboard&&!n.dataset.mobileKeyboardTransition)return;let t=e.target;!(t instanceof Element)||!t.closest(`.agent-welcome button`)||(e.preventDefault(),e.stopPropagation())},g=()=>{i=0;let e=Math.max(1,Math.round(r?.height??window.innerHeight)),t=Math.max(0,Math.round(r?.offsetTop??0));s=Math.max(s,window.innerHeight,e+t),Math.max(0,s-e-t)>=s*.2?(n.style.height=`${e}px`,n.style.transform=t?`translate3d(0, ${t}px, 0)`:``,n.dataset.mobileKeyboard=`open`,l()):(n.style.height=``,n.style.transform=``,delete n.dataset.mobileKeyboard,n.dataset.mobileKeyboardTransition===`opening`&&u(`closing`))},_=()=>{i&&window.cancelAnimationFrame(i),i=window.requestAnimationFrame(g)},v=()=>{window.clearTimeout(a),a=window.setTimeout(()=>{s=0,_()},150)};return g(),r?.addEventListener(`resize`,_),r?.addEventListener(`scroll`,_),window.addEventListener(`resize`,_),window.addEventListener(`orientationchange`,v),document.addEventListener(`touchstart`,f,!0),document.addEventListener(`pointerdown`,f,!0),document.addEventListener(`focusin`,p,!0),document.addEventListener(`focusout`,m,!0),document.addEventListener(`click`,h,!0),()=>{i&&window.cancelAnimationFrame(i),window.clearTimeout(a),l(),r?.removeEventListener(`resize`,_),r?.removeEventListener(`scroll`,_),window.removeEventListener(`resize`,_),window.removeEventListener(`orientationchange`,v),document.removeEventListener(`touchstart`,f,!0),document.removeEventListener(`pointerdown`,f,!0),document.removeEventListener(`focusin`,p,!0),document.removeEventListener(`focusout`,m,!0),document.removeEventListener(`click`,h,!0),delete n.dataset.mobileKeyboard,delete n.dataset.mobileKeyboardTransition}},[e,t]),null}export{r as MobileViewportStabilizer};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GitDiffViewer-Dv9WOiX1.js","assets/rolldown-runtime-B0Z9INg1.js","assets/vendor-react-DwNgTV1j.js","assets/use-i18n-Dpn7lxcE.js","assets/i18n-CAJMli-q.js","assets/vendor-router-CZg2bCPV.js","assets/index-BVIvzUyZ.js","assets/index-Z8qQPd8t.css","assets/storage-BpAqa-YY.js","assets/vendor-state-GkUciC5H.js","assets/file-diff-GxOMJkLj.js","assets/createLucideIcon-Cd-3GVxJ.js","assets/x-07u4-129.js","assets/button-BcPDt1Ge.js","assets/vendor-ui-DvrYggeS.js","assets/dist-Cfh4kzCK.js","assets/utils-C8uzG5AZ.js","assets/events-By17Y3YI.js","assets/TaskTerminalView-DyTURB64.js","assets/square-terminal-BVG6cUT1.js","assets/square-bHHVTT3G.js","assets/terminal-context-aIsIJPn8.js","assets/PageState-CzlR-lkL.js","assets/loader-circle-BOwQzHB-.js","assets/TaskTerminalView-BrP-ENHg.css","assets/TaskProcessesPane-DJszMYjM.js","assets/chevron-right-C3t2Rckj.js","assets/FileAttachmentPreview-C6QaQFwb.js","assets/tabs-DQYVDdOp.js","assets/dist-B_a0oV4U.js","assets/dist-DAs5KRGl.js","assets/download-BCfIiuaL.js","assets/file-Bllajneu.js","assets/refresh-cw-TbWxTY4K.js","assets/api-D8wGrWiI.js","assets/http-rQRvhTOP.js","assets/abort-signal-f4JsiYKX.js","assets/dialog-CGGxREwU.js","assets/dist-BdkTa5R3.js","assets/es2015-0QT3KgdC.js","assets/format-BRFKAYMT.js","assets/MarkdownMessage-bfyuGoi1.js","assets/vendor-markdown-plugins-DisoihU3.js","assets/vendor-shiki-runtime-UFMr0O-Q.js","assets/vendor-markdown-plugins-DEcVZfaU.css","assets/vendor-markdown-Ck4Y_w0n.js","assets/check-2vYc6QaP.js","assets/copy-DHmIFc52.js","assets/route-context-DvWDul4T.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{p as t}from"./vendor-router-CZg2bCPV.js";import{i as n,r}from"./vendor-react-DwNgTV1j.js";import{t as i}from"./use-i18n-Dpn7lxcE.js";import{a}from"./popover-BBuzaBfd.js";import{t as o}from"./activity-BCxvXCG3.js";import{t as s}from"./arrow-left-B8oVrQ2S.js";import{t as c}from"./check-2vYc6QaP.js";import{t as l}from"./chevron-right-C3t2Rckj.js";import{t as u}from"./earth-Ddy13fHh.js";import{t as d}from"./external-link-CEQqPcqc.js";import{t as f}from"./file-diff-GxOMJkLj.js";import{t as p}from"./file-Bllajneu.js";import{I as m,L as h,P as g,_,d as v,f as ee,g as y,h as b,i as x,m as S,n as C,p as w,r as T,t as E}from"./session-streaming-state-CX6zkOkc.js";import{t as D}from"./image-BY_c3FYU.js";import{t as O}from"./link-2-mgasYn21.js";import{t as k}from"./loader-circle-BOwQzHB-.js";import{t as A}from"./message-square-SKjZyY3v.js";import{t as j}from"./web-preview-C3u-dblt.js";import{t as M}from"./plus-fQbSqB1n.js";import{t as N}from"./refresh-cw-TbWxTY4K.js";import{t as P}from"./square-terminal-BVG6cUT1.js";import{t as F}from"./square-bHHVTT3G.js";import{t as I}from"./x-07u4-129.js";import{t as L}from"./button-BcPDt1Ge.js";import{t as R}from"./useQuery-Bg3cTjsY.js";import{i as z,t as B}from"./runtime-capabilities-store-D5g-oC-Z.js";import{t as V}from"./input-CvjGYteF.js";import{t as H}from"./chat-api-CYidanXn.js";import{r as U,s as W}from"./shortcuts-CAyIKRpZ.js";import{s as G}from"./events-By17Y3YI.js";import{r as K}from"./GitDiffViewer-Dv9WOiX1.js";import{a as q,i as J,n as te,t as Y}from"./sheet-CAEHyJHI.js";import{n as ne}from"./terminal-context-aIsIJPn8.js";import{n as re,t as ie}from"./web-preview-C-4r6kgm.js";import{n as X}from"./session-change-summary-api-4_dTNU4L.js";import{r as ae}from"./side-chat-context-Dr2QLUJA.js";var Z=e(n(),1),Q=r(),oe=(0,Z.lazy)(()=>t(()=>import(`./GitDiffViewer-Dv9WOiX1.js`).then(e=>e.n).then(e=>({default:e.InlineGitDiff})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])));function se({sessionId:e,path:t,scope:n,revision:r=0,position:a,onReading:o}){let{t:s}=i(),c=R({queryKey:[`task-file-diff`,e,n,t,r],queryFn:({signal:r})=>n===`project`?H.getFileDiff(e,t,{signal:r}):H.getSessionFileChangeDiff(e,t,{signal:r})});return c.isPending?(0,Q.jsx)(`p`,{role:`status`,className:`p-3 text-xs text-content-muted`,children:s(`chat:focusSession.gitLoading`)}):c.isError?(0,Q.jsxs)(`div`,{className:`p-3`,children:[(0,Q.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:c.error.message}),(0,Q.jsx)(L,{variant:`ghost`,size:`sm`,onClick:()=>void c.refetch(),children:s(`chat:chatMessage.filePreviewRetry`)})]}):(0,Q.jsx)(Z.Suspense,{fallback:null,children:(0,Q.jsx)(oe,{position:a,onReading:o,diff:c.data.diff,truncated:c.data.diffTruncated})})}function ce({sessionId:e,cwd:t,streaming:n,view:r,onViewChange:a}){let{t:o}=i(),s=R({queryKey:[`task-project-changes`,e,t,n],queryFn:({signal:t})=>H.getVcsChanges(e,{signal:t})}),c=K(r.reading?.list,e=>a({reading:{...r.reading,list:e}})),u=(0,Z.useMemo)(()=>w(s.data?.diff||``,s.data?.files.map(e=>e.path)||[],s.data?.diffTruncated),[s.data]),d=r.expandedFiles.filter(e=>s.data&&!s.data.files.some(t=>t.path===e)),f=s.error?.message||s.data?.error,p=s.data?.files||[];return(0,Q.jsxs)(`section`,{"aria-label":o(`chat:workbench.projectChanges`),className:`flex min-h-0 flex-1 flex-col gap-3 p-3`,children:[(0,Q.jsxs)(`header`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(`h2`,{className:`flex-1 text-sm font-medium`,children:o(`chat:workbench.projectChanges`)}),(0,Q.jsx)(L,{variant:`ghost`,size:`icon-sm`,"aria-label":o(`chat:focusSession.gitRefresh`),disabled:s.isFetching,onClick:()=>void s.refetch(),children:(0,Q.jsx)(N,{size:15})})]}),(0,Q.jsx)(`p`,{className:`text-xs text-content-muted`,children:o(`chat:workbench.projectScope`)}),(0,Q.jsxs)(`p`,{className:`truncate text-xs text-content-muted`,title:t,children:[s.data?.branch?`${s.data.branch} · `:``,t]}),(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Q.jsx)(L,{variant:`outline`,size:`sm`,disabled:!p.length||!!f,onClick:()=>a({expandedFiles:p.map(e=>e.path)}),children:o(`chat:workbench.expandAll`)}),(0,Q.jsx)(L,{variant:`ghost`,size:`sm`,onClick:()=>a({expandedFiles:[]}),children:o(`chat:workbench.collapseAll`)})]}),!s.isFetching&&!f&&d.map(e=>(0,Q.jsx)(`p`,{role:`status`,className:`break-all text-xs text-content-muted`,children:o(`chat:workbench.fileNoLongerChanged`,{path:e})},e)),s.isPending?(0,Q.jsx)(`p`,{role:`status`,className:`text-sm text-content-muted`,children:o(`chat:focusSession.gitLoading`)}):f?(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:f}):s.data?.isRepo?p.length?(0,Q.jsx)(`div`,{ref:c.ref,className:`min-h-0 flex-1 overflow-y-auto`,children:p.map(t=>{let n=r.expandedFiles.includes(t.path);return(0,Q.jsxs)(`article`,{className:`border-b border-border/60`,children:[(0,Q.jsxs)(`button`,{"aria-expanded":n,title:t.path,className:`flex min-h-11 w-full min-w-0 items-center gap-2 text-left text-sm`,onClick:()=>a({expandedFiles:n?r.expandedFiles.filter(e=>e!==t.path):[...r.expandedFiles,t.path]}),children:[(0,Q.jsx)(l,{size:15,className:n?`shrink-0 rotate-90`:`shrink-0`}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t.path}),(0,Q.jsx)(`span`,{className:`shrink-0 text-xs text-content-muted`,children:t.status}),Object.hasOwn(u.files,t.path)&&(0,Q.jsxs)(`span`,{className:`shrink-0 text-xs text-content-muted`,children:[`+`,u.files[t.path].added,` −`,u.files[t.path].removed]})]}),n&&(0,Q.jsx)(`p`,{className:`break-all p-2 text-xs text-content-muted`,children:t.path}),n&&(0,Q.jsx)(se,{sessionId:e,path:t.path,scope:`project`,position:r.reading?.[t.path],onReading:e=>a({reading:{...r.reading,[t.path]:e}}),revision:s.dataUpdatedAt})]},t.path)})}):(0,Q.jsx)(`p`,{className:`text-sm text-content-muted`,children:o(`chat:focusSession.fileChangesEmpty`)}):(0,Q.jsx)(`p`,{className:`text-sm text-content-muted`,children:o(`chat:workbench.notRepository`)})]})}var le=(0,Z.lazy)(()=>t(()=>import(`./GitDiffViewer-Dv9WOiX1.js`).then(e=>e.n).then(e=>({default:e.GitDiffDialog})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))),$=100;function ue(e){return e instanceof Error?e.message:String(e)}function de({sessionId:e,streaming:t,requestConfirm:n,view:r,onViewChange:a}){let{t:o}=i(),s=K(r?.reading?.list,e=>a?.({reading:{...r?.reading,list:e}})),[u,d]=(0,Z.useState)([]),p=r?.expandedFiles||u,m=e=>a?a({expandedFiles:e}):d(e),[h,_]=(0,Z.useState)(0),[v,ee]=(0,Z.useState)(0),[y,b]=(0,Z.useState)(null),[x,S]=(0,Z.useState)(!0),[C,w]=(0,Z.useState)(``),[T,E]=(0,Z.useState)(``),[D,O]=(0,Z.useState)(``),[k,A]=(0,Z.useState)(null),[j,M]=(0,Z.useState)(null),[P,F]=(0,Z.useState)(null),I=(0,Z.useRef)(!1),R=(0,Z.useRef)(0),z=(0,Z.useRef)(0),B=(0,Z.useRef)(!0),V=(0,Z.useRef)(!1),U=(0,Z.useRef)(t);(0,Z.useLayoutEffect)(()=>{U.current=t},[t]),(0,Z.useLayoutEffect)(()=>(I.current=!0,()=>{I.current=!1,R.current+=1,z.current+=1}),[]),(0,Z.useEffect)(()=>{let t=++R.current;return z.current+=1,M(null),F(null),B.current=!0,S(!0),w(``),H.getSessionFileChanges(e).then(e=>{I.current&&t===R.current&&(b(e),ee(e=>e+1))},e=>{I.current&&t===R.current&&w(ue(e))}).finally(()=>{I.current&&t===R.current&&(B.current=!1,S(!1))}),()=>{R.current+=1}},[h,e,t]);let W=async t=>{if(V.current||B.current)return;let n=++z.current;F(t),E(``);try{let r=await H.getSessionFileChangeDiff(e,t);if(!I.current||n!==z.current)return;if(!r.diff?.trim()){E(o(`chat:focusSession.fileChangesNoSnapshot`));return}M({diff:r.diff,truncated:!!r.diffTruncated})}catch(e){I.current&&n===z.current&&E(ue(e))}finally{I.current&&n===z.current&&F(null)}},G=async t=>{if(!I.current||V.current||B.current||U.current||!y||C||!y.files.filter(e=>t.kind===`approve`?e.pending&&!e.approved&&!e.reverted:e.canRevert&&!e.reverted).some(e=>t.path===void 0||e.path===t.path))return;V.current=!0,A(t),E(``),O(``);let r=++R.current;z.current+=1,M(null),F(null);let i=!1;try{if(t.kind===`revert`&&!await n({title:t.path?o(`chat:focusSession.fileChangesRevertFile`):o(`chat:focusSession.fileChangesRevertAll`),message:t.path?o(`chat:focusSession.fileChangesRevertFileDescription`,{path:t.path}):o(`chat:focusSession.fileChangesRevertAllDescription`),confirmLabel:o(`chat:focusSession.fileChangesConfirmRevert`),tone:`danger`})||!I.current||U.current||B.current||r!==R.current)return;i=!0;let a=t.kind===`approve`?await H.approveSessionFileChanges(e,t.path):await H.revertSessionFileChanges(e,t.path);if(X(e),!I.current||r!==R.current)return;b(a),t.kind===`approve`?O(t.path?o(`chat:focusSession.fileChangesApproved`):o(`chat:focusSession.fileChangesApproveDone`)):a.reverted?t.path===void 0&&a.files.some(e=>e.pending)?O(o(`chat:focusSession.fileChangesRevertPartial`,{count:a.reverted})):O(o(`chat:focusSession.fileChangesRevertDone`)):O(o(`chat:focusSession.fileChangesRevertUnavailable`))}catch(e){I.current&&r===R.current&&E(ue(e))}finally{V.current=!1,I.current&&(A(null),i&&(B.current=!0,S(!0),_(e=>e+1)))}},q=x||t||!!k||!!C||!y,J=y?.summary.pending||0,te=y?.files.filter(e=>e.canRevert&&!e.reverted).length||0,Y=T||C;return(0,Q.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col gap-3 p-3`,"aria-label":o(`chat:focusSession.fileChanges`),"aria-busy":x||!!k,children:[(0,Q.jsxs)(`div`,{className:`flex flex-none flex-wrap items-center justify-between gap-2`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`p`,{className:`text-[length:var(--app-font-size)] font-medium`,children:o(`chat:focusSession.fileChanges`)}),y&&(0,Q.jsxs)(`p`,{className:`text-[length:var(--app-small-size)] text-[var(--text-muted)]`,children:[o(`chat:focusSession.fileChangesCount`,{count:y.summary.files}),` · `,`+`,y.summary.added,` −`,y.summary.removed,J>0&&` · ${o(`chat:focusSession.fileChangesPending`,{count:J})}`]})]}),(0,Q.jsxs)(`div`,{className:`ml-auto flex flex-wrap items-center justify-end gap-1.5`,children:[(0,Q.jsxs)(L,{type:`button`,variant:`outline`,size:`sm`,className:`min-h-11 sm:min-h-9`,disabled:q||J===0,title:t?o(`chat:focusSession.gitWaitForRunToFinish`):void 0,onClick:()=>void G({kind:`approve`}),children:[k?.kind===`approve`&&!k.path?(0,Q.jsx)(N,{className:`animate-spin`,size:14}):(0,Q.jsx)(c,{size:14}),o(`chat:focusSession.fileChangesApproveAll`)]}),(0,Q.jsxs)(L,{type:`button`,variant:`outline`,size:`sm`,className:`min-h-11 sm:min-h-9`,disabled:q||te===0,title:o(t?`chat:focusSession.gitWaitForRunToFinish`:`chat:focusSession.fileChangesRevertAllDescription`),onClick:()=>void G({kind:`revert`}),children:[k?.kind===`revert`&&!k.path?(0,Q.jsx)(N,{className:`animate-spin`,size:14}):(0,Q.jsx)(g,{size:14}),o(`chat:focusSession.fileChangesRevertAll`)]}),(0,Q.jsx)(L,{type:`button`,variant:`ghost`,size:`icon`,className:`size-11 sm:size-9`,"aria-label":o(`chat:focusSession.gitRefresh`),title:o(`chat:focusSession.gitRefresh`),disabled:x||!!k,onClick:()=>{B.current=!0,S(!0),E(``),_(e=>e+1)},children:(0,Q.jsx)(N,{className:x?`animate-spin`:``,size:16})})]})]}),(0,Q.jsx)(`p`,{className:`text-xs text-content-muted`,children:o(`chat:workbench.taskSnapshotScope`)}),(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Q.jsx)(L,{variant:`outline`,size:`sm`,disabled:x||!y?.files.length,onClick:()=>m(y?.files.slice(0,$).map(e=>e.path)||[]),children:o(`chat:workbench.expandAll`)}),(0,Q.jsx)(L,{variant:`ghost`,size:`sm`,onClick:()=>m([]),children:o(`chat:workbench.collapseAll`)})]}),Y&&(0,Q.jsx)(`p`,{role:`alert`,className:`text-[length:var(--app-small-size)] text-[var(--text-secondary)]`,children:Y}),D&&!Y&&(0,Q.jsx)(`p`,{role:`status`,className:`text-[length:var(--app-small-size)] text-[var(--text-secondary)]`,children:D}),x&&!y?(0,Q.jsx)(`p`,{role:`status`,className:`text-[length:var(--app-font-size)] text-[var(--text-muted)]`,children:o(`chat:focusSession.gitLoading`)}):y?.files.length?(0,Q.jsxs)(`ul`,{ref:s.ref,className:`min-h-0 flex-1 space-y-1 overflow-y-auto`,"aria-label":o(`chat:focusSession.fileChanges`),children:[y.files.slice(0,$).map(t=>(0,Q.jsxs)(`li`,{className:`min-w-0 rounded-md border-b border-border/60`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 px-2 py-1`,children:[(0,Q.jsxs)(`button`,{type:`button`,className:`flex min-h-11 min-w-0 flex-1 items-center gap-2 rounded-md text-left text-[length:var(--app-small-size)] outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand-blue)] disabled:opacity-60`,title:t.path,disabled:x||!!k,"aria-busy":P===t.path,"aria-expanded":p.includes(t.path),onClick:()=>m(p.includes(t.path)?p.filter(e=>e!==t.path):[...p,t.path]),children:[(0,Q.jsx)(l,{size:14,className:p.includes(t.path)?`rotate-90 shrink-0`:`shrink-0`}),P===t.path?(0,Q.jsx)(N,{size:14,className:`flex-none animate-spin`}):(0,Q.jsx)(f,{size:14,className:`flex-none text-[var(--star-strong)]`}),(0,Q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`span`,{className:`block truncate`,children:t.path}),(0,Q.jsxs)(`span`,{className:`block text-[var(--text-muted)]`,children:[`+`,t.added,` −`,t.removed,t.reverted?` · ${o(`chat:focusSession.fileChangesReverted`)}`:t.approved?` · ${o(`chat:focusSession.fileChangesApproved`)}`:``]})]})]}),(0,Q.jsx)(L,{type:`button`,variant:`ghost`,size:`icon`,className:`size-11 sm:size-9`,title:o(`chat:focusSession.fileChangesApproveFile`),"aria-label":`${o(`chat:focusSession.fileChangesApproveFile`)} ${t.path}`,disabled:q||!t.pending||t.approved||t.reverted,onClick:()=>void G({kind:`approve`,path:t.path}),children:(0,Q.jsx)(c,{size:14})}),(0,Q.jsx)(L,{type:`button`,variant:`ghost`,size:`icon`,className:`size-11 sm:size-9`,title:o(`chat:focusSession.fileChangesRevertFile`),"aria-label":`${o(`chat:focusSession.fileChangesRevertFile`)} ${t.path}`,disabled:q||t.reverted||!t.canRevert,onClick:()=>void G({kind:`revert`,path:t.path}),children:(0,Q.jsx)(g,{size:14})})]}),p.includes(t.path)&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(se,{sessionId:e,path:t.path,scope:`task`,position:r?.reading?.[t.path],onReading:e=>a?.({reading:{...r?.reading,[t.path]:e}}),revision:v}),(0,Q.jsx)(L,{variant:`ghost`,size:`sm`,onClick:()=>void W(t.path),children:o(`chat:workbench.fullDiff`)})]})]},t.path)),y.files.length>$&&(0,Q.jsx)(`li`,{className:`px-2 py-1 text-[length:var(--app-small-size)] text-[var(--text-muted)]`,children:o(`chat:focusSession.gitMoreFiles`,{count:y.files.length-$})})]}):!Y&&(0,Q.jsx)(`p`,{className:`text-[length:var(--app-font-size)] text-[var(--text-muted)]`,children:o(`chat:focusSession.fileChangesEmpty`)}),j&&(0,Q.jsx)(Z.Suspense,{fallback:null,children:(0,Q.jsx)(le,{diff:j.diff,truncated:j.truncated,onClose:()=>M(null)})})]})}var fe=(0,Z.lazy)(()=>t(()=>import(`./TaskTerminalView-DyTURB64.js`).then(e=>({default:e.TaskTerminalView})),__vite__mapDeps([18,1,2,3,4,5,6,7,8,9,19,11,20,13,14,15,16,21,22,23,24]))),pe=(0,Z.lazy)(()=>t(()=>import(`./TaskProcessesPane-DJszMYjM.js`).then(e=>({default:e.TaskProcessesPane})),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,26,11,19,20,13,14,15,16,21,22,23]))),me=(0,Z.lazy)(()=>t(()=>import(`./FileAttachmentPreview-C6QaQFwb.js`).then(e=>e.n).then(e=>({default:e.FileAttachmentPreview})),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,28,14,29,15,30,16,31,11,32,23,33,12,34,35,36,13,37,38,39,40,41,42,43,44,45,46,47,48])));function he({sources:e,view:t,onViewChange:n}){let{t:r}=i(),a=K(t.reading?.list,e=>n({reading:{...t.reading,list:e}})),o=(0,Z.useContext)(S),[s,c]=(0,Z.useState)(``),u=(0,Z.useRef)(null),d=e.find(e=>e.id===s),f=e.filter(e=>(!t.filter||e.kind===t.filter)&&e.name.toLocaleLowerCase().includes(t.query.toLocaleLowerCase()));return(0,Q.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col gap-3 p-3`,"aria-label":r(`chat:workbench.sources`),children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`h2`,{className:`flex-1 text-sm font-medium`,children:r(`chat:workbench.sources`)}),(0,Q.jsx)(`span`,{className:`text-xs text-content-muted`,children:r(`chat:workbench.addSource`)}),(0,Q.jsx)(`div`,{ref:o?.setSourceActionHost,className:`grid size-9 place-items-center`})]}),(0,Q.jsx)(`p`,{className:`text-xs text-content-muted`,children:r(`chat:workbench.sourcesScope`)}),(0,Q.jsx)(V,{"aria-label":r(`chat:workbench.searchSources`),placeholder:r(`chat:workbench.searchSources`),value:t.query,onChange:e=>n({query:e.target.value})}),(0,Q.jsxs)(`select`,{"aria-label":r(`chat:workbench.sourceType`),className:`h-9 rounded-md border border-border bg-background px-2 text-sm`,value:t.filter,onChange:e=>n({filter:e.target.value}),children:[(0,Q.jsx)(`option`,{value:``,children:r(`chat:workbench.allTypes`)}),(0,Q.jsx)(`option`,{value:`image`,children:r(`chat:workbench.images`)}),(0,Q.jsx)(`option`,{value:`text`,children:r(`chat:workbench.text`)}),(0,Q.jsx)(`option`,{value:`file`,children:r(`chat:workbench.files`)})]}),(0,Q.jsxs)(`div`,{ref:a.ref,className:`min-h-0 flex-1 overflow-y-auto`,children:[!f.length&&(0,Q.jsx)(`p`,{className:`p-3 text-sm text-content-muted`,children:e.length?r(`chat:workbench.noMatches`):r(`chat:workbench.noSources`)}),f.map(e=>{let i=t.selectedSourceId===e.id,a=e.kind===`image`?D:e.method===`path`?O:p;return(0,Q.jsxs)(`article`,{className:`border-b border-border/60`,children:[(0,Q.jsxs)(`button`,{className:`flex min-h-12 w-full min-w-0 items-center gap-2 px-2 text-left`,"aria-expanded":i,onClick:()=>n({selectedSourceId:i?``:e.id}),children:[(0,Q.jsx)(l,{size:14,className:i?`rotate-90 shrink-0`:`shrink-0`}),(0,Q.jsx)(a,{className:`size-4 shrink-0 text-content-muted`}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:e.name||r(`chat:chatMessage.fileAttachment`)})]}),i&&(0,Q.jsxs)(`div`,{className:`space-y-2 bg-surface-subtle p-3 text-xs text-content-muted`,children:[(0,Q.jsx)(`p`,{className:`break-all`,children:e.attachment.path||e.attachment.id||r(`chat:workbench.unavailable`)}),(0,Q.jsx)(`p`,{children:e.attachment.mimeType||`application/octet-stream`}),(0,Q.jsx)(`p`,{children:e.method===`asset`?r(`chat:workbench.registeredAsset`):e.method===`path`?r(`chat:workbench.pathReference`):r(`chat:workbench.invalidReference`)}),(0,Q.jsx)(L,{variant:`outline`,size:`sm`,disabled:!e.available,onClick:t=>{u.current=t.currentTarget,c(e.id)},children:r(`chat:chatMessage.fileActionPreview`)})]})]},e.id)})]}),d&&(0,Q.jsx)(Z.Suspense,{fallback:null,children:(0,Q.jsx)(me,{attachment:d.attachment,onClose:()=>c(``),onRestoreFocus:()=>u.current?.focus(),onDownload:()=>{typeof d.attachment.downloadUrl==`string`&&window.open(d.attachment.downloadUrl,`_blank`,`noopener,noreferrer`)}})})]})}function ge({tools:e,onSelect:t,onOpenUrl:n}){let{t:r}=i(),[a,o]=(0,Z.useState)(``),[s,c]=(0,Z.useState)(!1);return(0,Q.jsxs)(`section`,{className:`@container/new-tab flex min-h-0 flex-1 flex-col overflow-y-auto bg-surface-subtle/40 p-5`,children:[(0,Q.jsx)(`h2`,{className:`mb-4 text-sm font-medium`,children:r(`chat:workbench.newTab`)}),(0,Q.jsxs)(`form`,{className:`mb-5 flex gap-2`,onSubmit:e=>{e.preventDefault();let t=j(a,window.location.href);c(!t),t&&n(t)},children:[(0,Q.jsx)(V,{className:`h-10 rounded-full bg-background px-4`,"aria-label":r(`common:webPreview.url`),placeholder:r(`common:webPreview.urlPlaceholder`),value:a,maxLength:2048,onChange:e=>o(e.target.value)}),(0,Q.jsx)(L,{type:`submit`,variant:`outline`,children:r(`chat:sessionContext.openUrl`)})]}),s&&(0,Q.jsx)(`p`,{role:`alert`,className:`mb-3 text-sm text-destructive`,children:r(`chat:sessionContext.invalidUrl`)}),(0,Q.jsx)(`div`,{className:`grid grid-cols-1 gap-2 @min-[420px]/new-tab:grid-cols-2`,children:e.map(({id:e,label:n,icon:r,disabled:i})=>(0,Q.jsxs)(L,{disabled:i,variant:`outline`,className:`h-12 min-w-0 justify-start gap-3 rounded-xl border-transparent bg-background px-3 font-normal shadow-none`,onClick:()=>t(e),children:[(0,Q.jsx)(r,{className:`size-4 shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:n})]},e))})]})}function _e({parentId:e,active:t}){let{t:n}=i(),{entry:r,runtime:o,load:s,setDraft:c}=ae(e),l=r.session?.id??``,u=(0,Z.useMemo)(()=>e=>o.subscribeSessionState(l,e),[o,l]),d=(0,Z.useMemo)(()=>()=>o.getSessionState(l),[o,l]),f=(0,Z.useSyncExternalStore)(u,d),[p,m]=(0,Z.useState)(!1),[h,g]=(0,Z.useState)(!1),[_,v]=(0,Z.useState)(``),y=(0,Z.useRef)(!1),b=(0,Z.useRef)(!1),S=(0,Z.useRef)(r.draft);S.current=r.draft;let w=(0,Z.useRef)(null),D=W(e=>e.bindings),O=E(f,r.session);(0,Z.useEffect)(()=>{t&&s(e)},[t,s,e]);let j=async t=>{t.preventDefault();let n=S.current.trim();if(!(!n||y.current||O||r.expired)){y.current=!0,m(!0),v(``);try{let t=await s(e,!r.session);if(!t?.session)return;let i=t.session.id;if(o.getSessionState(i).streaming)return;S.current.trim()===n&&c(e,``),m(!1),await o.send(i,n),await s(e)}catch(e){v(x(e))}finally{y.current=!1,m(!1)}}},M=(0,Z.useCallback)(async()=>{if(!(!l||o.getSessionState(l).streaming)){v(``);try{await o.retry(l),await s(e)}catch(e){v(x(e))}}},[s,e,o,l]),N=async()=>{if(!(!l||h)){g(!0);try{v(``),await o.abort(l)}catch(e){v(x(e))}finally{g(!1)}}},P=(0,Q.jsxs)(`div`,{className:`grid h-full min-h-36 place-content-center justify-items-center gap-3 px-3 text-center text-sm text-muted-foreground`,children:[(0,Q.jsx)(A,{size:22,"aria-hidden":`true`}),(0,Q.jsx)(`p`,{className:`max-w-64 leading-relaxed`,children:r.expired?n(`chat:sideChat.expired`):n(`chat:sideChat.empty`)}),r.expired&&(0,Q.jsxs)(L,{variant:`outline`,size:`sm`,disabled:r.loading,onClick:async()=>{(await s(e,!0))?.session&&w.current?.focus()},children:[r.loading&&(0,Q.jsx)(k,{className:`size-4 animate-spin`}),n(`chat:sideChat.restart`)]})]}),I=_||r.error||f.error;return(0,Q.jsxs)(`section`,{"data-side-chat-parent":e,"aria-label":n(`chat:sideChat.title`),className:`flex h-full min-h-0 min-w-0 flex-1 flex-col [container-type:inline-size]`,children:[(0,Q.jsx)(`p`,{className:`shrink-0 border-b border-border/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground`,children:n(`chat:sideChat.retention`)}),l?(0,Q.jsx)(T,{sessionId:l,messages:f.messages,transcriptLoadState:f.loaded?`ready`:f.error?`error`:`loading`,emptyState:P,messageStart:f.messageStart,hasOlder:f.hasOlder,loadingOlder:f.loadingOlder,olderError:f.olderError,activityFeed:f.activityFeed,tools:f.tools,thinkingText:f.thinkingText,currentActivity:f.currentActivity,compaction:f.compaction,streaming:O,runStartedAt:f.runStartedAt,lastActivityAt:f.lastActivityAt,runFinishedAt:f.runFinishedAt,runStopped:f.runStopped,runNotice:f.runNotice,error:f.error,cwd:r.session?.cwd,onLoadOlder:()=>o.loadOlderMessages(l),onRetryLastTurn:M}):(0,Q.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:P}),(0,Q.jsxs)(`form`,{className:`flex shrink-0 flex-col gap-2 border-t border-border/50 p-3`,onSubmit:j,children:[I&&(0,Q.jsx)(ee,{error:I,onRetry:r.error||!f.loaded?async()=>{await s(e)}:M}),(0,Q.jsx)(C,{approvals:f.approvals,onResolve:async(e,t)=>{try{await o.approve(l,e,t)}catch{}}}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-end gap-2 rounded-xl border border-border/70 bg-muted/40 p-2 focus-within:border-ring/50`,children:[(0,Q.jsx)(`textarea`,{ref:w,rows:2,value:r.draft,"aria-label":n(`chat:sideChat.message`),placeholder:n(`chat:sideChat.placeholder`),className:`max-h-40 min-h-14 min-w-0 flex-1 resize-y border-0 bg-transparent px-1 py-1 text-sm leading-relaxed text-foreground outline-none placeholder:text-muted-foreground`,onChange:t=>c(e,t.target.value),onCompositionStart:()=>{b.current=!0},onCompositionEnd:()=>{b.current=!1},onKeyDown:e=>{!b.current&&!e.nativeEvent.isComposing&&e.nativeEvent.keyCode!==229&&U(e.nativeEvent,D.sendMessage)&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())}}),(0,Q.jsx)(L,{type:O?`button`:`submit`,size:`icon`,className:`size-9 shrink-0 rounded-full`,"aria-label":n(O?`chat:sideChat.stop`:`chat:sideChat.send`),disabled:O?h:p||r.loading||r.expired||!r.draft.trim(),onClick:O?()=>void N():void 0,children:p||h?(0,Q.jsx)(k,{className:`size-4 animate-spin`}):O?(0,Q.jsx)(F,{size:13,fill:`currentColor`}):(0,Q.jsx)(a,{size:17})})]})]})]})}function ve({page:e,onChange:t}){let{t:n}=i(),{draft:r,url:a}=e,[o,s]=(0,Z.useState)(!1);return(0,Q.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col gap-2 p-3`,"aria-label":n(`common:webPreview.title`),children:[(0,Q.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault();let n=j(r,window.location.href);s(!n),n&&t({url:n})},children:[(0,Q.jsx)(`input`,{"aria-label":n(`common:webPreview.url`),className:`min-w-0 flex-1 rounded-md border border-[var(--stroke)] bg-[var(--solid)] px-2 text-[length:var(--app-font-size)]`,value:r,onChange:e=>t({draft:e.target.value}),placeholder:n(`common:webPreview.urlPlaceholder`),maxLength:2048}),(0,Q.jsx)(L,{type:`submit`,variant:`outline`,size:`sm`,children:n(`chat:sessionContext.openUrl`)})]}),o&&(0,Q.jsx)(`p`,{role:`alert`,className:`text-[length:var(--app-small-size)] text-[var(--text-secondary)]`,children:n(`chat:sessionContext.invalidUrl`)}),a?(0,Q.jsx)(ie,{className:`min-h-0 flex-1 overflow-hidden rounded-md`,defaultUrl:a,children:(0,Q.jsx)(re,{src:a,title:n(`common:webPreview.title`)})},a):(0,Q.jsxs)(`div`,{className:`grid min-h-0 flex-1 place-content-center justify-items-center gap-2 rounded-md border border-dashed border-[var(--stroke-soft)] text-center text-[length:var(--app-font-size)] text-[var(--text-muted)]`,children:[(0,Q.jsx)(u,{size:24,"aria-hidden":`true`}),(0,Q.jsx)(`p`,{children:n(`chat:sessionContext.browserEmpty`)})]}),a&&(0,Q.jsxs)(L,{type:`button`,variant:`ghost`,size:`sm`,className:`self-start`,onClick:()=>window.open(a,`_blank`,`noopener,noreferrer`),children:[(0,Q.jsx)(d,{size:14}),n(`common:webPreview.openExternal`)]}),(0,Q.jsx)(`p`,{className:`text-[length:var(--app-small-size)] text-[var(--text-muted)]`,children:n(`common:webPreview.embedNotice`)})]})}function ye({panelId:e,compact:t,embedded:n=!1,active:r=!0,sessionId:a,cwd:c=``,sources:l=[],tab:d,plan:p,streaming:g,plansAvailable:ee,requestConfirm:x,onTabChange:S,onClose:C,onBack:w}){let{t:T}=i(),E=ne(),D=B(e=>e.capabilities),k=[{id:`terminal`,icon:P,label:T(`terminal:workspace.terminal`)},{id:`processes`,icon:o,label:T(`terminal:workspace.processes`)},{id:`changes`,icon:f,label:T(`chat:workbench.projectChanges`)},{id:`sources`,icon:O,label:T(`chat:workbench.sources`)},{id:`files`,icon:h,label:T(`chat:workbench.taskSnapshots`)},...ee?[{id:`plan`,icon:m,label:T(`chat:sessionContext.plan`)}]:[],{id:`browser`,icon:u,label:T(`common:webPreview.title`)},{id:`side-chat`,icon:A,label:T(`chat:sideChat.title`)}],j=(0,Z.useMemo)(()=>y(d),[d]),N=b(e=>Object.prototype.hasOwnProperty.call(e.sessions,a)?e.sessions[a]:void 0)??j,F=(0,Z.useRef)(null),R=N.pages.find(e=>e.id===N.activeId)??N.pages[0],V=e=>e.kind===`new`?{id:`new`,icon:M,label:T(`chat:workbench.newTab`)}:k.find(t=>t.id===e.kind)??k[0],H=t=>requestAnimationFrame(()=>document.getElementById(`${e}-${t}-tab`)?.focus()),U=(0,Z.useEffectEvent)(()=>{r&&document.getElementById(`${e}-${N.activeId}-tab`)?.focus()});(0,Z.useEffect)(()=>{let e=requestAnimationFrame(()=>U());return()=>cancelAnimationFrame(e)},[e,N.activeId]);let W=e=>{if(e.type===`view`&&!b.getState().sessions[a])return;[`add`,`open`,`select`,`close`,`kind`].includes(e.type)&&window.dispatchEvent(new Event(G));let t=_(N,e);b.getState().update(a,d,e);let n=t.pages.find(e=>e.id===t.activeId);n&&S(n.kind),(e.type===`add`||e.type===`select`||e.type===`close`)&&H(t.activeId),e.type===`close`&&N.pages.length===1&&C()},K=T(`chat:sessionContext.addPage`),re=T(`chat:sessionContext.pageLimit`),ie=(0,Q.jsx)(L,{variant:`ghost`,size:`icon`,disabled:N.pages.length>=12,"aria-label":K,title:N.pages.length>=12?re:K,onClick:()=>W({type:`add`,kind:`new`}),children:(0,Q.jsx)(M,{size:15})}),X=(0,Q.jsxs)(`div`,{"data-session-context-panel":!0,className:`flex h-full min-h-0 min-w-0 flex-col bg-background text-foreground`,children:[(0,Q.jsxs)(`header`,{"data-window-drag-region":!0,className:`auxiliary-page-header flex h-14 shrink-0 items-center gap-0.5 border-b border-border/60 px-1.5`,children:[w&&(0,Q.jsx)(L,{variant:`ghost`,size:`icon`,"aria-label":T(`chat:workbench.backToConversation`),title:T(`chat:workbench.backToConversation`),onClick:w,children:(0,Q.jsx)(s,{size:16})}),(0,Q.jsx)(`div`,{ref:F,className:`flex min-w-0 flex-1 items-center overflow-x-auto`,role:`tablist`,"aria-label":T(`chat:sessionContext.title`),onKeyDown:e=>{if(!(e.target instanceof HTMLElement)||e.target.getAttribute(`role`)!==`tab`)return;if(e.key===`Delete`){e.preventDefault(),W({type:`close`,id:R.id});return}if(![`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key))return;e.preventDefault();let t=N.pages.findIndex(e=>e.id===R.id),n=e.key===`Home`?0:e.key===`End`?N.pages.length-1:(t+(e.key===`ArrowRight`?1:-1)+N.pages.length)%N.pages.length;W({type:`select`,id:N.pages[n].id})},children:N.pages.map(t=>{let{icon:n,label:r}=V(t);return(0,Q.jsxs)(`div`,{className:`group flex max-w-40 min-w-20 shrink-0 items-center rounded-md ${t.id===R.id?`bg-muted`:`text-muted-foreground`}`,children:[(0,Q.jsxs)(`button`,{id:`${e}-${t.id}-tab`,type:`button`,role:`tab`,"aria-selected":t.id===R.id,"aria-controls":`${e}-${t.id}-content`,tabIndex:t.id===R.id?0:-1,className:`flex h-8 min-w-0 flex-1 items-center gap-1.5 px-2 text-xs`,onClick:()=>W({type:`select`,id:t.id}),children:[(0,Q.jsx)(n,{size:13,className:`shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:r})]}),(0,Q.jsx)(`button`,{type:`button`,className:`mr-0.5 grid size-5 shrink-0 place-items-center rounded hover:bg-foreground/10`,"aria-label":`${T(`chat:sessionContext.closePage`)} · ${r}`,onClick:()=>W({type:`close`,id:t.id}),children:(0,Q.jsx)(I,{size:11})})]},t.id)})}),ie]}),N.pages.map(t=>{let n=V(t),r=R.id===t.id;return(0,Q.jsx)(`div`,{id:`${e}-${t.id}-content`,role:`tabpanel`,"aria-labelledby":`${e}-${t.id}-tab`,className:r?`flex min-h-0 flex-1 flex-col`:`hidden`,hidden:!r,children:n.id===`new`?r&&(0,Q.jsx)(ge,{tools:k.map(e=>({...e,disabled:e.id===`terminal`||e.id===`processes`?!E||!z(D,`terminal`):e.id===`changes`&&!z(D,`vcs`)})),onOpenUrl:e=>{W({type:`open`,kind:`browser`,replaceId:t.id}),b.getState().update(a,`browser`,{type:`browser`,id:t.id,url:e,draft:e})},onSelect:e=>W({type:`open`,kind:e,replaceId:t.id})}):n.id===`changes`?r&&(0,Q.jsx)(ce,{sessionId:a,cwd:c,streaming:g,view:t.view,onViewChange:e=>W({type:`view`,id:t.id,patch:e})}):n.id===`sources`?r&&(0,Q.jsx)(he,{sources:l,view:t.view,onViewChange:e=>W({type:`view`,id:t.id,patch:e})}):n.id===`terminal`?r&&(0,Q.jsx)(fe,{sessionId:a,cwd:c,terminalId:t.resourceId||void 0,onCreated:e=>b.getState().update(a,d,{type:`resource`,id:t.id,resourceId:e})}):n.id===`processes`?r&&(0,Q.jsx)(pe,{view:t.view,onViewChange:e=>W({type:`view`,id:t.id,patch:e}),sessionId:a,onOpenTerminal:e=>W({type:`open`,kind:`terminal`,resourceId:e})}):n.id===`side-chat`?(0,Q.jsx)(_e,{parentId:a,active:r}):n.id===`browser`?(0,Q.jsx)(ve,{page:t,onChange:e=>W({type:`browser`,id:t.id,...e})}):r&&(n.id===`files`?(0,Q.jsx)(de,{view:t.view,onViewChange:e=>W({type:`view`,id:t.id,patch:e}),sessionId:a,streaming:g,requestConfirm:x}):(0,Q.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-3`,children:p?.items?.length?(0,Q.jsx)(v,{plan:p}):(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:T(`chat:sessionContext.planEmpty`)})}))},t.id)})]});return t?(0,Q.jsx)(Y,{open:!0,onOpenChange:e=>!e&&C(),children:(0,Q.jsxs)(te,{id:e,side:`right`,showCloseButton:!1,className:`gap-0 overflow-hidden p-0`,style:{top:`var(--pisper-safe-area-top)`,right:`var(--pisper-safe-area-right)`,bottom:`var(--pisper-safe-area-bottom)`,height:`auto`,width:`min(calc(100vw - var(--pisper-safe-area-left) - var(--pisper-safe-area-right)), 420px)`,maxWidth:`none`},children:[(0,Q.jsx)(J,{className:`sr-only`,children:(0,Q.jsx)(q,{children:T(`chat:sessionContext.title`)})}),X]})}):(0,Q.jsx)(`aside`,{id:e,tabIndex:n?-1:void 0,className:`h-full min-h-0 w-full overflow-hidden border-l border-border/60`,"aria-label":T(`chat:sessionContext.title`),children:X})}export{ye as SessionContextPanel};
@@ -1 +0,0 @@
1
- import{r as e}from"./vendor-react-DwNgTV1j.js";import{t}from"./use-i18n-Dpn7lxcE.js";import{i as n,l as r,n as i,r as a,t as o}from"./dropdown-menu-LKlOCZsZ.js";import{t as s}from"./utils-C8uzG5AZ.js";import{t as c}from"./activity-BCxvXCG3.js";import{t as l}from"./blocks-Olsdp5Lp.js";import{t as u}from"./brain-qxhnKqYP.js";import{n as d,t as f}from"./radio-tower-BW78Ns4R.js";import{t as p}from"./earth-Ddy13fHh.js";import{t as m}from"./file-diff-GxOMJkLj.js";import{t as h}from"./folder-open-FIShC5Qk.js";import{t as g}from"./link-2-mgasYn21.js";import{t as _}from"./message-square-SKjZyY3v.js";import{t as v}from"./plug-BsIeHRwC.js";import{t as y}from"./rotate-ccw-clock-CO6Bw-sF.js";import{t as b}from"./server-BgNvmqwJ.js";import{a as x,i as S,r as C}from"./public-workspace-D_-I7fA7.js";import{t as w}from"./sparkles-S_eeuqn9.js";import{t as T}from"./square-terminal-BVG6cUT1.js";import{t as E}from"./workflow-Bg94dy8I.js";import{t as D}from"./button-BcPDt1Ge.js";import{a as O,i as k,n as A,t as j}from"./runtime-capabilities-store-D5g-oC-Z.js";var M=e();function N({groups:e,activeId:t,onSelect:c,footer:l,label:u}){return(0,M.jsxs)(`nav`,{"aria-label":u,"data-testid":`activity-rail`,className:`relative z-20 flex h-full w-(--activity-rail-width) shrink-0 flex-col items-center bg-[var(--app-chrome)] py-2`,children:[(0,M.jsx)(`div`,{className:`flex min-h-0 w-full flex-1 flex-col items-center gap-2 overflow-y-auto`,children:e.map(e=>{let l=e.items.some(e=>e.id===t);return(0,M.jsxs)(o,{modal:!1,children:[(0,M.jsx)(r,{asChild:!0,children:(0,M.jsx)(D,{variant:`ghost`,className:s(`relative size-11 shrink-0 rounded-xl text-muted-foreground`,l&&`bg-surface-hover text-content`),"aria-label":e.label,title:e.label,children:(0,M.jsx)(e.icon,{className:`size-5`})})}),(0,M.jsxs)(i,{side:`right`,align:`start`,sideOffset:8,className:`w-56 max-w-[calc(100vw-60px)]`,children:[(0,M.jsx)(n,{children:e.label}),e.items.map(e=>(0,M.jsxs)(a,{disabled:e.disabled,onSelect:()=>c(e.id),"aria-current":e.id===t?`page`:void 0,children:[(0,M.jsx)(e.icon,{}),(0,M.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label})]},e.id))]})]},e.id)})}),(0,M.jsx)(`div`,{className:`flex w-full shrink-0 flex-col items-center gap-1 pt-2`,children:l})]})}function P(e=e=>e,t=A){return[[`workspace`,e(`navigation:rail.workspace`),_,[[`chat`,e(`navigation:navigation.chat`),_],[`chatHistory`,e(`navigation:navigation.chatHistory`),y]]],[`resources`,e(`navigation:rail.resources`),h,[[`assets`,e(`navigation:navigation.assets`),h],[`memory`,e(`navigation:navigation.memory`),u]]],[`automation`,e(`navigation:rail.automation`),E,[[`workflows`,e(`navigation:navigation.workflows`),E],[`schedules`,e(`navigation:navigation.schedules`),d],[`channels`,e(`navigation:navigation.channels`),f]]],[`extensions`,e(`navigation:rail.extensions`),l,[[`plugins`,e(`navigation:navigation.plugins`),v],[`skills`,e(`navigation:navigation.skills`),w],[`mcp`,e(`navigation:navigation.mcp`),b],[`components`,e(`navigation:navigation.components`),l]]]].map(([e,n,r,i])=>({id:e,label:n,icon:r,items:i.filter(([e])=>O(t,e)).map(([e,t,n])=>({id:e,label:t,icon:n}))})).filter(e=>e.items.length>0)}function F({page:e,activeSessionId:n,installedTools:r,onSelect:i,onSettings:a}){let{t:o}=t(),s=j(e=>e.capabilities),u=P(o,s).map(t=>t.id===`extensions`?{...t,items:[...t.items,...r.map(e=>({id:`component:${e.id}`,label:e.name,icon:l}))]}:t.id===`resources`?{...t,items:[...t.items,{id:`task:changes`,label:o(`chat:workbench.projectChanges`),icon:m,disabled:e!==`chat`||!n||!k(s,`vcs`)},{id:`task:terminal`,label:o(`terminal:workspace.terminal`),icon:T,disabled:e!==`chat`||!n||!window.pisperDesktop?.terminalCreate||!k(s,`terminal`)},{id:`task:processes`,label:o(`terminal:workspace.processes`),icon:c,disabled:e!==`chat`||!n||!window.pisperDesktop?.terminalCreate},{id:`task:sources`,label:o(`chat:workbench.sources`),icon:g,disabled:e!==`chat`||!n},{id:`task:browser`,label:o(`common:webPreview.title`),icon:p,disabled:e!==`chat`||!n}]}:t);return(0,M.jsx)(N,{label:o(`navigation:appSidebar.mainNavigation`),groups:u,activeId:e===`workflowCreate`?`workflows`:e,onSelect:e=>{let t=S.find(t=>e===`task:${t}`);t?C(t):i(e)},footer:(0,M.jsx)(D,{variant:`ghost`,className:`size-11`,"aria-label":o(`navigation:navigation.settings`),title:o(`navigation:navigation.settings`),onClick:a,children:(0,M.jsx)(x,{className:`size-5`})})})}export{F as WorkbenchNavigation};
@@ -1,32 +0,0 @@
1
- import{t as e}from"./createLucideIcon-Cd-3GVxJ.js";var t=e(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),n=e(`monitor-smartphone`,[[`path`,{d:`M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8`,key:`10dyio`}],[`path`,{d:`M10 19v-3.96 3.15`,key:`1irgej`}],[`path`,{d:`M7 19h5`,key:`qswx4l`}],[`rect`,{width:`6`,height:`10`,x:`16`,y:`12`,rx:`2`,key:`1egngj`}]]),r=e(`scale`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]);function i(e){let t=String(e||``).trim().replace(/^#/,``);return/^[0-9a-fA-F]{6}$/.test(t)?`#${t.toLowerCase()}`:null}function a(e){return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}function o({r:e,g:t,b:n}){let r=e=>Math.round(Math.min(255,Math.max(0,e))).toString(16).padStart(2,`0`);return`#${r(e)}${r(t)}${r(n)}`}function s(e,t,n){return o({r:e.r+(t.r-e.r)*n,g:e.g+(t.g-e.g)*n,b:e.b+(t.b-e.b)*n})}var c={r:255,g:255,b:255},l={r:24,g:24,b:27};function u({r:e,g:t,b:n},r){return`rgba(${e}, ${t}, ${n}, ${r})`}function d(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function f({r:e,g:t,b:n}){return .2126*d(e)+.7152*d(t)+.0722*d(n)}function p(e,t){let n=f(e),r=f(t),i=Math.max(n,r),a=Math.min(n,r);return(i+.05)/(a+.05)}function m(e){return p(e,c)>=4.5?`#ffffff`:p(e,l)>=4.5?`#18181b`:`#000000`}function h(e,t,n){let r=a(t);return s(e,p(r,c)>p(r,l)?c:l,n)}function g(e){for(let t=.22;t<=1;t+=.04){let n=s(e,l,t);if(p(a(n),c)>=4.5)return n}return`#18181b`}function _(e){for(let t=.46;t<=1;t+=.04){let n=s(e,c,t);if(p(a(n),l)>=4.5)return n}return`#fff`}function v(e){let t=a(e),n=m(t),r=h(t,n,.12),i=g(t),o=s(t,c,.93),l=s(t,c,.72),d=s(t,c,.22),f=_(t),p=a(d),v=m(p),y=h(p,v,.14);return`:root[data-accent='custom'] {
2
- --star: ${e};
3
- --star-hover: ${r};
4
- --star-strong: ${i};
5
- --star-soft: ${o};
6
- --star-border: ${l};
7
- --on-accent: ${n};
8
- --brand-blue: ${e};
9
- --brand-blue-hover: ${r};
10
- --brand-blue-strong: ${i};
11
- --brand-blue-soft: ${o};
12
- --brand-blue-border: ${l};
13
- --accent-ring: ${u(t,.16)};
14
- --focus: ${i};
15
- --focus-ring: ${u(t,.18)};
16
- }
17
- :root[data-theme='dark'][data-accent='custom'] {
18
- --star: ${d};
19
- --star-hover: ${y};
20
- --star-strong: ${f};
21
- --star-soft: ${u(p,.15)};
22
- --star-border: ${u(p,.38)};
23
- --on-accent: ${v};
24
- --brand-blue: ${d};
25
- --brand-blue-hover: ${y};
26
- --brand-blue-strong: ${f};
27
- --brand-blue-soft: ${u(p,.15)};
28
- --brand-blue-border: ${u(p,.34)};
29
- --accent-ring: ${u(p,.22)};
30
- --focus: ${f};
31
- --focus-ring: ${u(p,.26)};
32
- }`}function y(){return window.__TAURI__?.core?.invoke??window.__TAURI_INTERNALS__?.invoke}function b(){return typeof window<`u`&&!!y()}function x(e,t){let n=y();return n?n(e,t):Promise.reject(Error(`Tauri IPC is unavailable.`))}async function S(){return x(`plugin:notification|is_permission_granted`)}async function C(){return x(`plugin:notification|request_permission`)}async function w(e,t){return x(`plugin:notification|notify`,{options:{title:e,body:t}})}var T=`https://github.com/ling-kong-ran/pisper/releases`,E=`release`;export{w as a,i as c,t as d,S as i,r as l,T as n,C as o,b as r,v as s,E as t,n as u};
@@ -1 +0,0 @@
1
- function e(){let e=0,t=new Map;return{register(n,r){let i=++e;return t.set(i,{priority:n,close:r}),()=>{t.delete(i)}},dismiss(){let e=[...t.entries()].sort(([e,t],[n,r])=>r.priority-t.priority||n-e)[0];return e?(e[1].close(),!0):!1}}}var t=e();export{t};
@@ -1 +0,0 @@
1
- import"./floating-widgets-store-BhuWgVRT.js";import{i as e}from"./useCustomUiComponents-DzY3OjE_.js";export{e as listCustomUiComponents};
@@ -1 +0,0 @@
1
- import{n as e,r as t}from"./http-rQRvhTOP.js";import{i as n}from"./api-D8wGrWiI.js";import{r,t as i}from"./startup-queries-DItwFTRv.js";var a=e=>`/api/sessions/${encodeURIComponent(e)}`;async function o(t,n={}){let i=await e(t,n);return n.method&&n.method!==`GET`&&(/^\/api\/sessions(?:$|\/[^/]+(?:\/(?:derive|model|cwd|execution-mode|run-mode|thinking-level|goal|tree\/navigate))?$)/.test(t)&&r(`sessions`),t===`/api/settings/compaction`&&r(`config`)),i}var s={listSessions:({refresh:e=!0}={})=>i(`sessions`,e),searchSessionTreeLabels:(e,t=20)=>o(`/api/session-labels?${new URLSearchParams({query:e,limit:String(t)})}`),listSessionTreeLabels:(e=500)=>o(`/api/session-labels?limit=${e}`),createSession:(e,t=``)=>o(`/api/sessions`,{method:`POST`,data:{name:e,...t?{cwd:t}:{}}}),deriveSession:(e,t,n)=>o(`${a(e)}/derive`,{method:`POST`,data:{boundaryEntryId:t,name:n}}),getSessionTree:e=>o(`${a(e)}/tree`),navigateSessionTree:(e,t,n)=>o(`${a(e)}/tree/navigate`,{method:`POST`,data:{targetEntryId:t,summarize:n},timeout:18e4}),navigateSessionTreeTarget:(e,t)=>o(`${a(e)}/tree/navigate`,{method:`POST`,data:{targetEntryId:t,summarize:!1,includeTree:!1},timeout:18e4}),setSessionTreeLabel:(e,t,n)=>o(`${a(e)}/tree/labels/${encodeURIComponent(t)}`,{method:`PUT`,data:{label:n}}),getSessionCommands:e=>o(`${a(e)}/commands`),getConfig:({refresh:e=!1}={})=>i(`config`,e),updateCompactionPreference:e=>o(`/api/settings/compaction`,{method:`PATCH`,data:{thresholdPercent:e}}),getLiveSession:(e,t={})=>o(`${a(e)}/live`,t),getMessages:(e,t)=>{let n=new URLSearchParams({limit:String(t.limit)});return t.before&&n.set(`before`,t.before),o(`${a(e)}/messages?${n}`)},openStream:async(e,r)=>{await n({open:async()=>(await t(),fetch(`/api/chat`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})),resume:async(e,n)=>(await t(),fetch(`/api/runs/${encodeURIComponent(e)}/events?after=${n}`)),onEvent:r})},retryLastTurn:async(e,r)=>{await n({open:async()=>(await t(),fetch(`${a(e)}/retry`,{method:`POST`})),resume:async(e,n)=>(await t(),fetch(`/api/runs/${encodeURIComponent(e)}/events?after=${n}`)),onEvent:r})},queueInput:(e,t,n,r)=>o(`${a(e)}/input`,{method:`POST`,data:{message:t,attachments:n,behavior:r}}),withdrawQueuedInput:(e,t)=>o(`${a(e)}/input/${encodeURIComponent(t)}`,{method:`DELETE`}),compactSession:e=>o(`${a(e)}/compact`,{method:`POST`,data:{},timeout:18e4}),getSessionWorkflowRuns:e=>o(`${a(e)}/workflow-runs`),resolveWorkflowApproval:(e,t,n)=>o(`/api/workflow-runs/${encodeURIComponent(e)}/approvals/${encodeURIComponent(t)}`,{method:`POST`,data:{approved:n}}),stopWorkflowRun:e=>o(`/api/workflow-runs/${encodeURIComponent(e)}/stop`,{method:`POST`,data:{}}),abort:e=>o(`${a(e)}/abort`,{method:`POST`,data:{}}),resolveMobileOperation:(e,t,n)=>o(`${a(e)}/mobile-operations/${encodeURIComponent(t)}`,{method:`POST`,data:n}),pauseGoal:e=>o(`${a(e)}/goal`,{method:`PATCH`,data:{action:`pause`}}),setGoalBudget:(e,t)=>o(`${a(e)}/goal`,{method:`PATCH`,data:{action:`set-budget`,tokenBudget:t}}),getGitChanges:e=>o(`${a(e)}/git/changes`),commitGitChanges:(e,t)=>o(`${a(e)}/git/commit`,{method:`POST`,data:{message:t},timeout:6e4}),pushGitChanges:e=>o(`${a(e)}/git/push`,{method:`POST`,data:{},timeout:15e4}),revertGitChanges:e=>o(`${a(e)}/git/revert`,{method:`POST`,data:{},timeout:6e4}),getVcsChanges:(e,t={})=>o(`${a(e)}/vcs/changes`,t),getFileDiff:(e,t,n={})=>o(`${a(e)}/vcs/file-diff?path=${encodeURIComponent(t)}`,n),commitVcsChanges:(e,t)=>o(`${a(e)}/vcs/commit`,{method:`POST`,data:{message:t},timeout:15e4}),pushVcsChanges:e=>o(`${a(e)}/vcs/push`,{method:`POST`,data:{},timeout:15e4}),revertVcsChanges:e=>o(`${a(e)}/vcs/revert`,{method:`POST`,data:{},timeout:6e4}),getSessionFileChanges:(e,t={})=>o(`${a(e)}/file-changes`,t),getSessionFileChangeDiff:(e,t,n={})=>o(`${a(e)}/file-changes/diff?path=${encodeURIComponent(t)}`,n),revertSessionFileChanges:(e,t=``)=>o(`${a(e)}/file-changes/revert`,{method:`POST`,data:{path:t},timeout:6e4}),approveSessionFileChanges:(e,t=``)=>o(`${a(e)}/file-changes/approve`,{method:`POST`,data:{path:t}}),updateModel:(e,t,n)=>o(`${a(e)}/model`,{method:`PUT`,data:{provider:t,model:n}}),getThinkingLevel:e=>o(`${a(e)}/thinking-level`),setThinkingLevel:(e,t)=>o(`${a(e)}/thinking-level`,{method:`PUT`,data:{level:t}}),updateExecutionMode:(e,t)=>o(`${a(e)}/execution-mode`,{method:`PUT`,data:{mode:t}}),updateRunMode:(e,t)=>o(`${a(e)}/run-mode`,{method:`PUT`,data:{mode:t}}),resolveApproval:(e,t,n)=>o(`${a(e)}/approvals/${encodeURIComponent(t)}`,{method:`POST`,data:{approved:n}}),updateCwd:(e,t)=>o(`${a(e)}/cwd`,{method:`PUT`,data:{cwd:t}}),renameSession:(e,t)=>o(a(e),{method:`PATCH`,data:{name:t}})};export{s as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./index-BVIvzUyZ.js";import{t}from"./storage-BpAqa-YY.js";var n=Object.freeze([`open`,`left`,`right`,`above`,`below`]),r=`session:`;function i(e){let t=f(e);return{layout:t,writable:e==null||e===``||!!t}}function a({sessionId:e,visibleIds:t,focusedId:n,disposition:r,width:i,height:a}){return t.includes(e)?{kind:`focus`}:r===`open`?n?{kind:`replace`,replacedId:n}:{kind:`add`}:{kind:(r===`left`||r===`right`?i>=600:a>=480)?`split`:`unavailable`}}function o(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function s(e){return e?`${r}${e}`:``}function c(e){let t=typeof e==`object`&&e?e.params?.sessionId:void 0;if(typeof t==`string`&&t)return t;let n=typeof e==`string`?e:e?.id;return typeof n==`string`&&n.startsWith(r)?n.slice(8):``}function l(e){if(!o(e)||!o(e.panels))return[];let t=[],n=new Set;for(let[r,i]of Object.entries(e.panels)){let e=c(r)||c(i);e&&!n.has(e)&&(n.add(e),t.push(e))}return t}function u(e,t,n){let r=e.indexOf(t);if(r<0)return{tabIds:e,activeId:n};let i=e.filter(e=>e!==t);return n===t?{tabIds:i,activeId:i[Math.min(r,i.length-1)]||``}:{tabIds:i,activeId:n}}function d(e,t=``){return{version:1,engine:`dockview`,activePanelId:typeof t==`string`?t:``,layout:e}}function f(e){if(!e)return null;try{let t=typeof e==`string`?JSON.parse(e):e;return!o(t)||t.version!==1||t.engine!==`dockview`||!o(t.layout)||!o(t.layout.grid)||!o(t.layout.panels)?null:{version:1,engine:`dockview`,activePanelId:typeof t.activePanelId==`string`?t.activePanelId:``,layout:t.layout}}catch{return null}}function p(e){return e===`above`?`top`:e===`below`?`bottom`:e}function m(e,t=`open`,r=``){return!e||!n.includes(t)?null:{sessionId:e,disposition:t,...r?{targetEntryId:r}:{}}}function h(e){if(!e)return null;try{let t=typeof e==`string`?JSON.parse(e):e;return o(t)?m(typeof t.sessionId==`string`?t.sessionId:``,typeof t.disposition==`string`?t.disposition:`open`,typeof t.targetEntryId==`string`?t.targetEntryId:``):null}catch{return null}}function g({activeSessionId:e=``,validSessionIds:t=[]}={}){return e&&t.includes(e)?[e]:t[0]?[t[0]]:[]}var _=`pisper:task-view-will-change`,v=`pisper:session-navigation-will-change`,y=`pisper:session-selected`,b=`pisper:session-create-requested`,x=`pisper:active-session-changed`,S=`pisper:sessions-updated`,C=`pisper:command-palette-requested`;function w(e){if(!e||typeof e!=`object`)return null;let{cwd:t,prompt:n}=e;if(t!==void 0&&typeof t!=`string`)return null;let r=typeof n==`string`&&n.trim()?n.trim():void 0;return{cwd:typeof t==`string`?t:``,...r?{prompt:r}:{}}}function T(e){if(!e)return null;try{return w(JSON.parse(e))}catch{return null}}function E(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.sessionId==`string`&&typeof t.entryId==`string`?{sessionId:t.sessionId,entryId:t.entryId}:null}catch{return null}}function D(){window.dispatchEvent(new Event(C))}function O(e,n){let r=w({cwd:e,prompt:n});return r?(localStorage.setItem(t.sessionCreateRequest,JSON.stringify(r)),window.dispatchEvent(new CustomEvent(b,{detail:r})),!0):!1}function k(){let e=T(localStorage.getItem(t.sessionCreateRequest));return localStorage.removeItem(t.sessionCreateRequest),e}function A(n,r=`open`,i=``){let a=m(n,r,i);a&&(window.dispatchEvent(new Event(v)),e.setItem(t.activeSession,n),localStorage.setItem(t.sessionOpenRequest,JSON.stringify(a)),i?localStorage.setItem(t.sessionMessageTarget,JSON.stringify({sessionId:n,entryId:i})):localStorage.removeItem(t.sessionMessageTarget),window.dispatchEvent(new CustomEvent(y,{detail:a})))}function j(e){let n=E(localStorage.getItem(t.sessionMessageTarget));return n?.sessionId===e?n.entryId:``}function M(e,n){let r=E(localStorage.getItem(t.sessionMessageTarget));r?.sessionId===e&&r.entryId===n&&localStorage.removeItem(t.sessionMessageTarget)}function N(){let e=h(localStorage.getItem(t.sessionOpenRequest));return localStorage.removeItem(t.sessionOpenRequest),e}function P(e,t=``){window.dispatchEvent(new CustomEvent(x,{detail:{id:e||``,model:t||``}}))}function F(e){window.dispatchEvent(e?new CustomEvent(S,{detail:e}):new Event(S))}function I(e){let t=`detail`in e?e.detail:null;if(!t||typeof t!=`object`)return null;let{id:n,pinned:r,archived:i,unread:a,needsAttention:o,attentionReason:s}=t;return typeof n!=`string`||!n||typeof r!=`boolean`||typeof i!=`boolean`||typeof a!=`boolean`||typeof o!=`boolean`||s!==null&&s!==`approval`&&s!==`failure`?null:{id:n,pinned:r,archived:i,unread:a,needsAttention:o,attentionReason:s}}function L(e,t){let n=e=>{let n=I(e);n&&t(n)};return e.addEventListener(S,n),()=>e.removeEventListener(S,n)}function R(e){let t=`detail`in e?e.detail:null;if(!t||typeof t!=`object`)return null;let{id:n,name:r}=t;return typeof n==`string`&&n.length>0&&typeof r==`string`?{id:n,name:r}:null}function z(e,t){let n=e=>{let n=R(e);n&&t(n)};return e.addEventListener(S,n),()=>e.removeEventListener(S,n)}function B(e){let t=`detail`in e?e.detail:null;if(!t||typeof t!=`object`)return null;let{deletedIds:n}=t;return!Array.isArray(n)||!n.length||!n.every(e=>typeof e==`string`&&e.length>0)?null:{deletedIds:[...new Set(n)]}}function V(e,t){let n=e=>{let n=B(e);n&&t(n)};return e.addEventListener(S,n),()=>e.removeEventListener(S,n)}export{l as A,u as C,s as D,g as E,a as O,i as S,p as T,B as _,v as a,L as b,P as c,k as d,N as f,A as g,O as h,b as i,c as k,F as l,D as m,C as n,y as o,j as p,S as r,_ as s,x as t,M as u,I as v,d as w,z as x,V as y};