@openork/cli 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/commands/doctor.d.ts +12 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +110 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/gateway/start.d.ts +7 -0
- package/dist/commands/gateway/start.d.ts.map +1 -1
- package/dist/commands/gateway/start.js +64 -6
- package/dist/commands/gateway/start.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +19 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +51 -31
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/lib/doctor.d.ts +28 -0
- package/dist/lib/doctor.d.ts.map +1 -0
- package/dist/lib/doctor.js +227 -0
- package/dist/lib/doctor.js.map +1 -0
- package/dist/openapi.yml +770 -0
- package/dist/prisma/migrations/20260401085053_schema_sync/migration.sql +178 -0
- package/dist/prisma/migrations/20260401135027_add_auth_rbac_multitenancy/migration.sql +211 -0
- package/dist/prisma/schema.prisma +101 -0
- package/dist/server.js +74899 -175525
- package/dist/server.js.map +1 -1
- package/dist/web/assets/{activity-feed-D_eonDKG.js → activity-feed-CNgi7Qb_.js} +1 -1
- package/dist/web/assets/agent-edit-CgbnHiT5.js +98 -0
- package/dist/web/assets/agent-sessions-Bpay1_ZH.js +1 -0
- package/dist/web/assets/agent-use-BaBxQ2fx.js +1 -0
- package/dist/web/assets/agents-Dwbd6TQx.js +1 -0
- package/dist/web/assets/api-DNWoqIPN.js +1 -0
- package/dist/web/assets/arrow-down-upU5tcpi.js +1 -0
- package/dist/web/assets/arrow-left-BiNeYcK0.js +1 -0
- package/dist/web/assets/auth-client-ys1jC854.js +1 -0
- package/dist/web/assets/chat-BP5H9CWl.js +4 -0
- package/dist/web/assets/{chat-input-BepRPV_L.js → chat-input-CKAtAtgG.js} +2 -2
- package/dist/web/assets/{chat-message-CbcDeDcb.js → chat-message-CW-HnO3f.js} +3 -3
- package/dist/web/assets/chat-new-BQp9Bn7Q.js +1 -0
- package/dist/web/assets/chat-sessions-D3bS5vba.js +1 -0
- package/dist/web/assets/chats-DJolHH4e.js +1 -0
- package/dist/web/assets/{circle-alert-W8QX9LOG.js → circle-alert-D040vPU_.js} +1 -1
- package/dist/web/assets/circle-check-CW3adL8A.js +1 -0
- package/dist/web/assets/{circle-x-D_8Tcgt1.js → circle-x-34c-1fVL.js} +1 -1
- package/dist/web/assets/code-BFUT4gGT.js +1 -0
- package/dist/web/assets/{code-editor-x9L6nkh4.js → code-editor-I6vK5q_W.js} +1 -1
- package/dist/web/assets/commands-DBI4Bb2N.js +8 -0
- package/dist/web/assets/{copy-C87mjn_Y.js → copy-DI5qjA1p.js} +1 -1
- package/dist/web/assets/credentials-D8VN8A5M.js +1 -0
- package/dist/web/assets/{crown-BJEsQkh4.js → crown-DWB5bSnq.js} +1 -1
- package/dist/web/assets/dashboard-Cc6KWs62.js +1 -0
- package/dist/web/assets/{database-BohjTljV.js → database-5jczNGML.js} +1 -1
- package/dist/web/assets/debug-DewdHeoW.js +1 -0
- package/dist/web/assets/{download-B2UOiYAS.js → download-CwO6xusv.js} +1 -1
- package/dist/web/assets/{eye-DN-Km5vf.js → eye-BQGasWwb.js} +1 -1
- package/dist/web/assets/{file-plus-B8qWemgt.js → file-plus-kHgvf9P8.js} +1 -1
- package/dist/web/assets/file-tree-CTe61XCg.js +1 -0
- package/dist/web/assets/{folder-plus-DsmP6Mur.js → folder-plus-mZAz-QpJ.js} +1 -1
- package/dist/web/assets/{globe-fwFSeXZn.js → globe-C0WHVFW_.js} +1 -1
- package/dist/web/assets/{grip-vertical-Djo-yR-o.js → grip-vertical-CdhrWSnV.js} +1 -1
- package/dist/web/assets/{history-CyBBboEp.js → history-w7qYglj5.js} +1 -1
- package/dist/web/assets/index-9X_UIor3.css +2 -0
- package/dist/web/assets/index-DWNLSHpo.js +4 -0
- package/dist/web/assets/key-DJEQ_jUi.js +1 -0
- package/dist/web/assets/{layers-ephyCrDm.js → layers-KZu6CpGE.js} +1 -1
- package/dist/web/assets/{layout-grid-DCVGg8ZA.js → layout-grid-U17jhSjz.js} +1 -1
- package/dist/web/assets/login-DoSA7KtI.js +1 -0
- package/dist/web/assets/mcp-setup-Cyj1YAiY.js +17 -0
- package/dist/web/assets/memory-DWZU2Tfl.js +1 -0
- package/dist/web/assets/new-chat-BRS3DM8Z.js +1 -0
- package/dist/web/assets/play-BzkxV_O-.js +1 -0
- package/dist/web/assets/{refresh-cw-RFYUf5GB.js → refresh-cw-D3_GZ86i.js} +1 -1
- package/dist/web/assets/register-BS5OkCgS.js +1 -0
- package/dist/web/assets/rotate-ccw-CkJIdGxi.js +1 -0
- package/dist/web/assets/{save-Dewm93H6.js → save-BXEZF80P.js} +1 -1
- package/dist/web/assets/search-BmZSwFnA.js +1 -0
- package/dist/web/assets/{send-FWvygYFQ.js → send-CNiXC6KO.js} +1 -1
- package/dist/web/assets/server-C5bKQLDi.js +1 -0
- package/dist/web/assets/settings-CBAhSOZM.js +1 -0
- package/dist/web/assets/shield-CMMTdOiM.js +1 -0
- package/dist/web/assets/{shield-check-Dt7sXtBF.js → shield-check-BmphmMlD.js} +1 -1
- package/dist/web/assets/{shuffle-DjvBJ7XV.js → shuffle-Dv_-PFl5.js} +1 -1
- package/dist/web/assets/src-CaF63bXY.js +24 -0
- package/dist/web/assets/sse-url-qohTy4Sw.js +1 -0
- package/dist/web/assets/team-edit-BW1bePKn.js +1 -0
- package/dist/web/assets/team-sessions-GspGc7zN.js +1 -0
- package/dist/web/assets/team-use-BVC7nt9K.js +3 -0
- package/dist/web/assets/terminal-CjSFIwMK.js +1 -0
- package/dist/web/assets/{timer-C9X20mTO.js → timer-3siC9tpd.js} +1 -1
- package/dist/web/assets/{useMutation-BlOHt3MR.js → useMutation-DA8-TvTt.js} +1 -1
- package/dist/web/assets/{utils-DHTPP40O.js → utils-D1nRmcA6.js} +1 -1
- package/dist/web/assets/workflow-edit-DkmsARCv.js +4 -0
- package/dist/web/assets/workflow-runs-DcJPL7Bo.js +1 -0
- package/dist/web/assets/workflows-Dnx0dwJn.js +1 -0
- package/dist/web/assets/{wrench-DZBtSPP8.js → wrench-u8B_fDwT.js} +1 -1
- package/dist/web/assets/{zap-CbT5plGA.js → zap-hOn7wkXe.js} +1 -1
- package/dist/web/index.html +9 -7
- package/package.json +1 -1
- package/dist/web/assets/agent-edit-CblZItU5.js +0 -98
- package/dist/web/assets/agent-sessions-COpCcffa.js +0 -1
- package/dist/web/assets/agent-use-F4pOt3KJ.js +0 -1
- package/dist/web/assets/agents-Av7w2wHE.js +0 -1
- package/dist/web/assets/arrow-down-XHN5PD1k.js +0 -1
- package/dist/web/assets/arrow-left-wtNmm6Le.js +0 -1
- package/dist/web/assets/chat-CQvfLy7Y.js +0 -4
- package/dist/web/assets/chat-new-BOtDuYij.js +0 -1
- package/dist/web/assets/chat-sessions-CaCaK_PC.js +0 -1
- package/dist/web/assets/chats-64IReeGV.js +0 -1
- package/dist/web/assets/circle-check-DLl9fl65.js +0 -1
- package/dist/web/assets/code-Brz4KHlI.js +0 -1
- package/dist/web/assets/commands-DT9K8bae.js +0 -8
- package/dist/web/assets/credentials-DC-HOVxW.js +0 -1
- package/dist/web/assets/dashboard-OfnNUjFX.js +0 -1
- package/dist/web/assets/debug-Et9rgBM8.js +0 -1
- package/dist/web/assets/file-tree-DkLQ1z0I.js +0 -1
- package/dist/web/assets/index-YgjFlLLv.css +0 -2
- package/dist/web/assets/index-dc8HGqTp.js +0 -2
- package/dist/web/assets/mcp-setup-BfMdYdsI.js +0 -17
- package/dist/web/assets/memory-DAQ474-p.js +0 -1
- package/dist/web/assets/new-chat-DtMw6FMg.js +0 -1
- package/dist/web/assets/play-DXJMtO-K.js +0 -1
- package/dist/web/assets/search-Ww0msJQz.js +0 -1
- package/dist/web/assets/settings-Auyn4Z5T.js +0 -1
- package/dist/web/assets/src-DUhGoAQb.js +0 -24
- package/dist/web/assets/team-edit-DO-RX3lC.js +0 -1
- package/dist/web/assets/team-sessions-DSw8MTtZ.js +0 -1
- package/dist/web/assets/team-use-BfNvsFcO.js +0 -3
- package/dist/web/assets/terminal-CIapYonS.js +0 -1
- package/dist/web/assets/workflow-edit-D0FNyl64.js +0 -4
- package/dist/web/assets/workflow-runs-CPVvaVzN.js +0 -1
- package/dist/web/assets/workflows-C9jurJiE.js +0 -1
- /package/dist/web/assets/{api-docs-BQzn4-6U.js → api-docs-DgRFxVfh.js} +0 -0
- /package/dist/web/assets/{bi-gM8sIAZV.js → bi-Da3wz7XD.js} +0 -0
- /package/dist/web/assets/{cron-COUPKvGu.js → cron-3VyztcE9.js} +0 -0
- /package/dist/web/assets/{vendor-editor-BORFA-rZ.js → vendor-editor-Cx3Ogh9u.js} +0 -0
- /package/dist/web/assets/{vendor-ui-Dpw9mBc-.js → vendor-ui-DnL9d3od.js} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/workflows-C9jurJiE.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/vendor-react-BJ8SIkmN.js","assets/src-DUhGoAQb.js","assets/vendor-ui-Dpw9mBc-.js","assets/vendor-ui-CHpVij2M.css","assets/cron-COUPKvGu.js","assets/utils-DHTPP40O.js","assets/useQuery-DvovkaPT.js","assets/copy-C87mjn_Y.js","assets/history-CyBBboEp.js","assets/layout-grid-DCVGg8ZA.js","assets/play-DXJMtO-K.js","assets/commands-DT9K8bae.js","assets/code-editor-x9L6nkh4.js","assets/vendor-editor-BORFA-rZ.js","assets/file-tree-DkLQ1z0I.js","assets/folder-plus-DsmP6Mur.js","assets/arrow-left-wtNmm6Le.js","assets/file-plus-B8qWemgt.js","assets/save-Dewm93H6.js","assets/terminal-CIapYonS.js","assets/new-chat-DtMw6FMg.js","assets/dashboard-OfnNUjFX.js","assets/zap-CbT5plGA.js","assets/circle-check-DLl9fl65.js","assets/circle-x-D_8Tcgt1.js","assets/timer-C9X20mTO.js","assets/workflow-edit-D0FNyl64.js","assets/code-Brz4KHlI.js","assets/globe-fwFSeXZn.js","assets/grip-vertical-Djo-yR-o.js","assets/search-Ww0msJQz.js","assets/wrench-DZBtSPP8.js","assets/workflow-runs-CPVvaVzN.js","assets/activity-feed-D_eonDKG.js","assets/chats-64IReeGV.js","assets/chat-sessions-CaCaK_PC.js","assets/chat-CQvfLy7Y.js","assets/chat-input-BepRPV_L.js","assets/chat-message-CbcDeDcb.js","assets/arrow-down-XHN5PD1k.js","assets/chat-new-BOtDuYij.js","assets/credentials-DC-HOVxW.js","assets/api-docs-BQzn4-6U.js","assets/mcp-setup-BfMdYdsI.js","assets/useMutation-BlOHt3MR.js","assets/settings-Auyn4Z5T.js","assets/circle-alert-W8QX9LOG.js","assets/refresh-cw-RFYUf5GB.js","assets/bi-gM8sIAZV.js","assets/debug-Et9rgBM8.js","assets/eye-DN-Km5vf.js","assets/agents-Av7w2wHE.js","assets/shuffle-DjvBJ7XV.js","assets/download-B2UOiYAS.js","assets/shield-check-Dt7sXtBF.js","assets/agent-edit-CblZItU5.js","assets/database-BohjTljV.js","assets/team-edit-DO-RX3lC.js","assets/crown-BJEsQkh4.js","assets/agent-use-F4pOt3KJ.js","assets/send-FWvygYFQ.js","assets/team-use-BfNvsFcO.js","assets/team-sessions-DSw8MTtZ.js","assets/layers-ephyCrDm.js","assets/agent-sessions-COpCcffa.js","assets/memory-DAQ474-p.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{a as t,c as n,f as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,s as d,t as f,u as p}from"./vendor-react-BJ8SIkmN.js";import{C as m,T as h,_ as g,a as _,b as v,c as y,d as b,f as x,g as S,h as C,i as w,l as ee,m as T,n as te,o as E,p as ne,r as D,s as re,t as O,u as k,v as A,w as j,y as M}from"./useQuery-DvovkaPT.js";import{A as ie,C as ae,D as oe,F as N,K as P,N as se,O as ce,P as le,S as ue,T as F,U as de,V as I,W as L,a as R,i as fe,j as pe,k as me,n as he,p as z,q as B,r as V,t as ge,w as _e,x as ve}from"./src-DUhGoAQb.js";import{t as ye}from"./terminal-CIapYonS.js";import"./utils-DHTPP40O.js";import{n as be,t as xe}from"./bi-gM8sIAZV.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function Se(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ee(e,()=>t.signal,()=>n=!0)},u=x(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?b:k;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?H:Ce,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ce(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Ce(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function H(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var we=class extends _{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Te(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=E({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),y.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Te(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ee=class extends h{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new we({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=De(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=De(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=De(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=De(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){y.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>S(t,e))}findAll(e={}){return this.getAll().filter(t=>S(e,t))}notify(e){y.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return y.batch(()=>Promise.all(e.map(e=>e.continue().catch(A))))}};function De(e){return e.options.scope?.id}var Oe=class extends h{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??C(r,t),a=this.get(i);return a||(a=new w({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){y.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>g(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>g(e,t)):t}notify(e){y.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){y.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){y.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ke=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Oe,this.#t=e.mutationCache||new Ee,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=re.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(v(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=ne(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return y.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;y.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return y.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=y.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(A).catch(A)}invalidateQueries(e,t={}){return y.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=y.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(A)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(A)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(v(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(A).catch(A)}fetchInfiniteQuery(e){return e.behavior=Se(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(A).catch(A)}ensureInfiniteQueryData(e){return e.behavior=Se(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return re.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(T(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{M(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(T(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{M(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=C(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===m&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},U=e(i(),1),Ae=u(),W={nodeStatus:e=>[`workflow-node-status`,e],logs:e=>[`workflow-live-logs`,e],pendingActions:()=>[`workflow-pending-actions`],allEvents:()=>[`workflow-all-events`],connectionStatus:()=>[`workflow-sse-status`]},G=null,K=null,je=0,Me=0,Ne=null,Pe=0,Fe=`connecting`,q=new Map,Ie=new Map,J=new Map,Le=[],Re=200;function ze(e){G=e}function Be(e){G?.setQueryData(W.nodeStatus(e),new Map(q.get(e)??new Map))}function Ve(e){G?.setQueryData(W.logs(e),[...Ie.get(e)??[]])}function He(){G?.setQueryData(W.pendingActions(),Array.from(J.values()))}function Ue(){G?.setQueryData(W.allEvents(),[...Le])}function We(){G?.setQueryData(W.connectionStatus(),Fe)}async function Ge(){try{let e=await B.workflows.getPendingActions();for(let t of e){let e=`${t.workflowRunId}:${t.actionId}`;J.has(e)||J.set(e,{runId:t.workflowRunId,actionId:t.actionId,prompt:t.action.prompt??`Approval required`,workflowId:t.workflowRun.workflowId,workflowName:t.workflowRun.workflow.name,timestamp:new Date(t.startedAt).getTime(),full:t})}let t=new Set(e.map(e=>`${e.workflowRunId}:${e.actionId}`));for(let e of J.keys())t.has(e)||J.delete(e);He()}catch{}}function Ke(e,t,n){let r=q.get(t);r||(r=new Map,q.set(t,r)),r.set(n,{status:e.status??`pending`,output:e.output??e.error,prompt:e.prompt});let i=`${t}:${n}`;e.status===`waiting`?(J.set(i,{runId:t,actionId:n,prompt:e.prompt??`Approval required`,workflowId:e.workflowId,workflowName:e.workflowName,timestamp:Date.now()}),He(),G?.invalidateQueries({queryKey:[`recent-workflow-runs`]})):J.has(i)&&(J.delete(i),He()),Be(t)}function qe(e){let t=!1;for(let n of J.keys())n.startsWith(`${e}:`)&&(J.delete(n),t=!0);t&&He(),Be(e),G?.invalidateQueries({queryKey:[`recent-workflow-runs`]})}function Je(e){let t;try{t=JSON.parse(e.data)}catch{return}Le.unshift({...t,_timestamp:Date.now(),_id:++Pe}),Le.length>Re&&(Le.length=Re),Ue();let{type:n,runId:r,actionId:i}=t;if(n===`node-status`&&r&&i&&Ke(t,r,i),n===`log-output`&&r&&i){let e=Ie.get(r);e||(e=[],Ie.set(r,e)),e.push({id:`live-${Date.now()}-${Math.random()}`,agentRunId:``,actionId:i,stream:t.stream??`stdout`,text:t.text??``,timestamp:new Date().toISOString()}),Ve(r)}n===`workflow-started`&&r&&(q.set(r,new Map),Ie.set(r,[]),Be(r),Ve(r)),(n===`workflow-completed`||n===`workflow-failed`)&&r&&qe(r)}function Ye(){if(K)return;Fe=`connecting`,We();let e=new EventSource(`/api/events/workflows`);K=e,e.onopen=()=>{if(K!==e){e.close();return}Fe=`connected`,Me=0,We(),Ge()},e.addEventListener(`workflow-event`,t=>{K===e&&Je(t)}),e.onerror=()=>{if(K!==e){e.close();return}if(e.close(),K=null,Fe=`error`,We(),je>0&&Me<15){Me++;let e=Math.min(1e3*2**Me,3e4);Ne=setTimeout(Ye,e)}}}function Xe(){Ne&&=(clearTimeout(Ne),null),K&&=(K.close(),null),Fe=`connecting`}function Ze(){je++,je===1&&Ye()}function Qe(){je=Math.max(0,je-1),je===0&&Xe()}function $e(e){return q.get(e)??new Map}function et(e){return Ie.get(e)??[]}function tt(){return Array.from(J.values())}function nt(){return Le}function rt(){return Fe}function it(e){q.delete(e),Ie.delete(e)}function at(e,t,n){J.delete(`${e}:${t}`),He();let r=q.get(e);r||(r=new Map,q.set(e,r));let i=r.get(t);r.set(t,{...i,status:n,output:i?.output??(n===`approved`?`Approved`:`Rejected`)}),Be(e),G?.invalidateQueries({queryKey:[`recent-workflow-runs`]})}var ot=N(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),st=N(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),ct=N(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),lt=N(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),ut=N(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),dt=N(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),ft=N(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),pt=N(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),mt=N(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),ht=N(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),gt=N(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),_t=N(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),vt=N(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),yt=N(`hand`,[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1fvzgz`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`1kc0my`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`,key:`10h0bg`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`1s1gnw`}]]),bt=N(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),xt=N(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),St=N(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Ct=N(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),wt=N(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Tt=N(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),Et=N(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Dt=N(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Ot=N(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),kt=N(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),At=N(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),jt=N(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),Mt=N(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Nt=N(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Pt=N(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ft=N(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),It=N(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Lt=N(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Rt=N(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),zt=N(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Bt=N(`user-check`,[[`path`,{d:`m16 11 2 2 4-4`,key:`9rsbq5`}],[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Vt=N(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Ht=N(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Ut=N(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Wt=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Gt=(e=>e?Wt(e):Wt),Kt=e=>e;function qt(e,t=Kt){let n=U.useSyncExternalStore(e.subscribe,U.useCallback(()=>t(e.getState()),[e,t]),U.useCallback(()=>t(e.getInitialState()),[e,t]));return U.useDebugValue(n),n}var Jt=e=>{let t=Gt(e),n=e=>qt(t,e);return Object.assign(n,t),n},Yt=(e=>e?Jt(e):Jt);function Xt(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var Zt=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return Zt(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return Zt(t)(e)}}}},Qt=(e,t)=>(n,r,i)=>{let a={storage:Xt(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return Zt(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},$t={en:{"common.cancel":`Cancel`,"common.delete":`Delete`,"common.create":`Create`,"common.error":`Error`,"common.name":`Name`,"common.nameRequired":`Name is required`,"common.new":`New`,"common.saving":`Saving...`,"common.update":`Update`,"common.creating":`Creating...`,"common.deleting":`Deleting...`,"common.back":`Back`,"common.save":`Save`,"common.search":`Search...`,"common.refresh":`Refresh`,"common.sideBySide":`Side by side`,"common.stacked":`Stacked`,"common.running":`Running`,"common.done":`Done`,"common.thinking":`Thinking...`,"common.stopRun":`Stop run`,"common.saved":`Saved`,"common.failedToSave":`Failed to save`,"common.deleteSession":`Delete session`,"common.newFile":`New file`,"common.newFolder":`New folder`,"common.edit":`Edit`,"pagination.rangeOfTotal":`{start}–{end} of {total}`,"pagination.firstPage":`First page`,"pagination.previousPage":`Previous page`,"pagination.nextPage":`Next page`,"pagination.lastPage":`Last page`,"nodeConfig.noCredential":`None (no authentication)`,"nodeConfig.credentialHelp":`Credentials are configurable in the Credentials page`,"nodeConfig.selectAgent":`Select an agent…`,"nodeConfig.selectTeam":`Select a team…`,"nodeConfig.agentPromptPlaceholder":`Additional instructions for the agent...`,"nodeConfig.teamPromptPlaceholder":`Instructions for the team...`,"nodeConfig.bypassPermissionsHelp":`Allows the agent to execute shell commands without confirmation`,"nodeConfig.timeoutDescription":`Execution time limit`,"nodeConfig.durationMinutes":`Duration (minutes)`,"nodeConfig.actionNamePlaceholder":`Action name`,"nodeConfig.reviewerCheckPlaceholder":`What should the reviewer check or approve?`,"nodeConfig.subWorkflowPromptPlaceholder":`Optional prompt to pass to the sub-workflow...`,"nodeConfig.deleteNode":`Delete Node`,"commands.invalidName":`Invalid name. Letters, numbers, hyphens and underscores only.`,"commands.createError":`Error during creation`,"commands.deleteConfirm":`Delete command "{name}"?`,"commands.noCustom":`No custom commands.`,"commands.createCommand":`Create a command`,"commands.createSkill":`create a skill`,"commands.noWorkspace":`No commands found in workspaces.`,"commands.customTab":`Custom commands ({count})`,"commands.availableTab":`Available commands ({count})`,"commands.newCommand":`New command`,"commands.skillHelp":`Creates .local/skills/{slug}/ with SKILL.md, techniques/, scripts/`,"commands.commandHelp":`Creates .local/commands/{slug}.md`,"commands.createAndEdit":`Create & Edit`,"commands.skillCreated":`Skill "{name}" created`,"commands.commandCreated":`Command "{name}" created`,"credentials.description":`Manage your credentials to use in HTTP Request nodes`,"credentials.noCredentials":`No credentials configured`,"credentials.createHelp":`Create a credential to authenticate your HTTP requests`,"credentials.updatedAt":`Updated on {date}`,"credentials.editTitle":`Edit credential`,"credentials.newTitle":`New credential`,"credentials.username":`Username`,"credentials.password":`Password`,"credentials.parameterName":`Parameter name`,"credentials.value":`Value`,"credentials.addTo":`Add to`,"credentials.addHeader":`Add a header`,"credentials.deleteTitle":`Delete credential?`,"credentials.deleteWarning":`Nodes using this credential will no longer be authenticated.`,"credentials.loadError":`Unable to load credential`,"credentials.updated":`Credential updated`,"credentials.created":`Credential created`,"credentials.deleted":`Credential deleted`,"debug.activeCount":`{count} active`,"debug.watcherDescription":`Native watchers (FSEvents / inotify) — 1 file descriptor per directory, zero CPU.`,"debug.noWatchers":`No active watchers. Visit the Commands & Skills page to initialize the cache.`,"debug.updatedAt":`Updated: {time}`,"memory.title":`Memory`,"memory.description":`Manage persistent agent memory — search, promotion, tiers`,"memory.rebuildIndex":`Rebuild index`,"memory.newMemory":`New memory`,"memory.searchPlaceholder":`Semantic search in memory...`,"memory.allTiers":`All tiers`,"memory.allCategories":`All categories`,"memory.all":`All`,"memory.pending":`Pending`,"memory.noMemories":`No memories found`,"memory.tryFilters":`Try changing your search filters`,"memory.autoCreate":`Memories will be created automatically during agent runs`,"memory.noPending":`No pending promotions`,"memory.pendingHelp":`Memories classified above the threshold will appear here for approval`,"memory.content":`Content`,"memory.contentPlaceholder":`Memory content to store...`,"memory.agentIdPlaceholder":`Agent ID`,"memory.teamIdPlaceholder":`Team ID`,"memory.category":`Category`,"memory.importance":`Importance ({value}%)`,"memory.tagsLabel":`Tags (comma separated)`,"memory.deleteTitle":`Delete this memory?`,"memory.deleteWarning":`This action is irreversible. The memory will be permanently deleted.`,"memory.promoteToLongTerm":`Promote to long-term`,"memory.demoteToShortTerm":`Demote to short-term`,"memory.pendingApproval":`Pending approval`,"memory.approve":`Approve`,"memory.accessCount":`{count} access(es)`,"memory.created":`Memory created`,"memory.deleted":`Memory deleted`,"memory.promoted":`Memory promoted to long-term`,"memory.demoted":`Memory demoted to short-term`,"memory.indexRebuilt":`Index rebuilt`,"agentEdit.agentCreated":`Agent created`,"agentEdit.agentSaved":`Agent saved`,"agentEdit.agentDeleted":`Agent deleted`,"agentEdit.exportedToClipboard":`Exported to clipboard`,"agentEdit.failedToExport":`Failed to export`,"agentEdit.folderAlreadyAdded":`Folder already added`,"agentEdit.couldNotOpenFolder":`Could not open folder picker`,"agentEdit.namePlaceholder":`Agent name`,"agentEdit.descriptionPlaceholder":`What does this agent do?`,"agentEdit.noCliAgents":`No CLI agents detected`,"agentEdit.memoryEnabled":`Memory`,"agentEdit.memoryEnabledHelp":`Store outputs to the memory system and inject relevant memories into prompts`,"agentUse.failedToStart":`Failed to start agent session`,"agentUse.agentNotFound":`Agent not found`,"agentUse.backToAgents":`Back to Agents`,"agentUse.interactiveSession":`Interactive Session`,"agentUse.startConversation":`Start a conversation`,"agentUse.sendMessageTo":`Send a message to interact with {name}`,"agents.teamDeleted":`Team deleted`,"agents.soulMdCopied":`SOUL.md copied to clipboard`,"agents.noAgentsYet":`No agents yet`,"agents.createFirstAgent":`Create your first agent with a SOUL to define its personality`,"agents.noTeamsYet":`No teams yet`,"agents.createAgentsFirst":`Create some agents first`,"agents.noMembersYet":`No members yet`,"agents.exportSoulMd":`Export SOUL.md`,"chatSessions.title":`Chat Sessions`,"chatSessions.deleteConfirm":`Delete session "{name}"?`,"chatSessions.noSessions":`No chat sessions found for this workspace.`,"chat.deleteConfirm":`Delete this session?`,"chat.noMessages":`No messages yet`,"chat.watchingLive":`Watching live — messages appear as they arrive from the IDE`,"chat.resumeSession":`Resume this IDE session via CLI agent`,"chat.openWorkspaceEditor":`Open workspace editor`,"chat.openInCursor":`Open in Cursor`,"chat.failedToSend":`Failed to send`,"chats.title":`Chats`,"chats.description":`All workspaces with chat history`,"chats.noHistory":`No chat history found`,"chatInput.placeholder":`Type a message... (/ for commands, Enter to send)`,"skills.newSkill":`New Skill`,"skills.skillCreated":`Skill "{name}" created`,"skills.failedToCreate":`Failed to create skill`,"skills.deleteConfirm":`Delete {label} "{name}"?`,"skills.deleted":`{label} deleted`,"skills.failedToDelete":`Failed to delete {label}`,"skills.noResults":`No results`,"skills.noSkillsFound":`No skills found`,"skills.createOne":`Create one`,"skills.selectToEdit":`Select a skill or command to edit`,"skills.sourcesDescription":`Skills are shown from all sources: ~/.cursor, ~/.claude, workspace, and local`,"skillSelect.searchPlaceholder":`Search skills...`,"teamEdit.teamCreated":`Team created`,"teamEdit.teamSaved":`Team saved`,"teamEdit.noAgentsYet":`No agents created yet`,"teamEdit.namePlaceholder":`Team name...`,"teamEdit.descriptionPlaceholder":`Description...`,"teamEdit.tagsPlaceholder":`Tags...`,"teamEdit.agentDetails":`Agent Details`,"teamEdit.memoryEnabled":`Team Memory`,"teamEdit.memoryEnabledHelp":`Store team run outputs to shared memory`,"teamUse.failedToStart":`Failed to start {name}`,"teamUse.teamRunStarted":`Team run started`,"teamUse.failedToStartRun":`Failed to start team run: {error}`,"teamUse.teamRunCancelled":`Team run cancelled`,"teamUse.failedToCancel":`Failed to cancel: {error}`,"teamUse.teamNotFound":`Team not found`,"teamUse.backToTeams":`Back to Teams`,"teamSessions.title":`Team Sessions`,"workflowEdit.workflowSaved":`Workflow saved`,"workflowEdit.namePlaceholder":`Workflow name...`,"workflowEdit.descriptionPlaceholder":`Description...`,"workflowRuns.runWorkflow":`Run Workflow`,"workflowRuns.promptPlaceholder":`Optional prompt / instructions...`,"workflowRuns.responsePlaceholder":`Add a response or reason...`,"workflowRuns.stopping":`Stopping…`,"workflows.runWorkflow":`Run Workflow`,"workflows.newWorkflow":`New Workflow`,"workflows.createOne":`Create one`,"workflows.promptPlaceholder":`Optional prompt / instructions...`,"workflows.gridView":`Grid view`,"workflows.listView":`List view`,"mcp.deleteConfirm":`Delete MCP server "{name}"?`,"mcp.noConfigFiles":`No supported CLI config files detected on this system.`,"mcp.searchPlaceholder":`Search tools by name, path, or method...`,"fileEditor.failedToOpen":`Failed to open file`,"fileEditor.failedToCreate":`Failed to create {type}`,"fileEditor.movedTo":`Moved to {folder}/`,"fileEditor.failedToMove":`Failed to move file`,"fileEditor.unsavedChanges":`"{name}" has unsaved changes. Close anyway?`,"fileEditor.deleteConfirm":`Delete this {label}? {path}`,"sidebar.deleteConfirm":`Delete session "{name}"?`,"sidebar.failedToSummarize":`Failed to generate summary.`,"sidebar.noPendingEvents":`No pending events`,"sidebar.noRecentRuns":`No recent runs`,"sidebar.workflowRuns":`Workflow Runs`,"sidebar.newMessages":`New messages`,"sidebar.renameSession":`Rename session`,"sidebar.newCliSession":`New CLI session`,"sidebar.expandActivityPanel":`Expand activity panel`,"sidebar.collapseSessions":`Collapse sessions panel`,"sessionCard.newChat":`New chat`,"newChat.title":`New Chat`,"dashboard.runsToday":`Runs Today`,"dashboard.successRate":`Success Rate`,"dashboard.avgDuration":`Avg Duration`,"dashboard.estCost":`Est. Cost (7d)`,"dashboard.noWorkflowRuns":`No workflow runs this week`,"dashboard.noRecentErrors":`No recent errors`,"dashboard.noTokenData":`No token data available`,"dashboard.noDataAvailable":`No data available`,"dashboard.noData24h":`No data in the last 24 hours`,"dashboard.noTokenData14d":`No token data in the last 14 days`,"dashboard.noData14d":`No data in the last 14 days`,"dashboard.sessions":`Sessions`,"dashboard.noTeamSessions":`No team sessions yet`,"settings.title":`Settings`,"settings.description":`Configure your agents orchestrator`,"settings.general":`General`,"settings.generalDescription":`General application settings`,"settings.language":`Language`,"settings.languageDescription":`Choose the display language for the interface`,"settings.appearance":`Appearance`,"settings.colorTheme":`Color Theme`,"settings.colorThemeDescription":`Choose a color theme for the interface`,"settings.cliAgents":`CLI Agents`,"settings.cliAgentsDescription":`Verify that your CLI agents are installed and accessible`,"settings.agentsDetected":`{installed} of {total} agents detected`,"nav.analytics":`Analytics`,"nav.newChat":`New Chat`,"nav.chats":`Chats`,"nav.workflows":`Workflows`,"nav.agents":`Agents`,"nav.sessions":`Team Sessions`,"nav.agentSessions":`Agent Sessions`,"nav.memory":`Memory`,"nav.credentials":`Credentials`,"nav.skillsAndCommands":`Skills & Commands`,"nav.activity":`Activity`,"nav.apiDocs":`API Docs`,"nav.mcp":`MCP`,"nav.settings":`Settings`,"nav.debug":`Debug`,"nav.collapse":`Collapse`,"nav.expandSidebar":`Expand sidebar`,"nav.collapseSidebar":`Collapse sidebar`,"nav.light":`Light`,"nav.dark":`Dark`,"nav.system":`System`,"credentials.namePlaceholder":`Ex: API OpenAI, Token GitHub...`,"credentials.type":`Type`,"credentials.bearerToken":`Bearer Token`,"credentials.basicAuth":`Basic Auth`,"credentials.apiKey":`API Key`,"credentials.customHeaders":`Custom Headers`,"credentials.token":`Token`,"credentials.headerName":`Header name`,"credentials.header":`Header`,"credentials.queryParameter":`Query Parameter`,"credentials.headers":`Headers`,"dashboard.title":`Analytics`,"dashboard.subtitle":`Execution metrics, token consumption, and cost overview`,"dashboard.thisWeek":`{count} this week`,"dashboard.thisWeekPercent":`{value}% this week`,"dashboard.today":`today`,"dashboard.tokens":`{count} tokens`,"dashboard.runsPerHour":`Runs per Hour`,"dashboard.last24h":`Last 24 hours`,"dashboard.tokenConsumption":`Token Consumption`,"dashboard.dailyTokens14d":`Daily input/output tokens (14 days)`,"dashboard.dailyRunsTrend":`Daily Runs Trend`,"dashboard.last14d":`Last 14 days`,"dashboard.tokenBreakdown":`Token Breakdown`,"dashboard.model":`Model`,"dashboard.source":`Source`,"dashboard.llmUsage7d":`LLM usage distribution (7d)`,"dashboard.byCli7d":`By CLI / runtime (7d)`,"dashboard.tokenDistribution":`Token Distribution`,"dashboard.workflow":`Workflow`,"dashboard.project":`Project`,"dashboard.perWorkflow7d":`Per workflow (7d)`,"dashboard.perProject14d":`Per project (14d)`,"dashboard.efficiency":`Efficiency`,"dashboard.tokenEfficiency7d":`Token usage efficiency (7d)`,"dashboard.outputInputRatio":`Output / Input Ratio`,"dashboard.higherOutput":`Higher = more output per input token`,"dashboard.cacheHitRate":`Cache Hit Rate`,"dashboard.avgTokensPerTeamRun":`Avg Tokens per Team Run`,"dashboard.teamSessions":`Team Sessions`,"dashboard.last7d":`Last 7 days`,"dashboard.viewAll":`View all`,"dashboard.totalTokens":`Total Tokens`,"dashboard.estCostLabel":`Est. Cost`,"dashboard.teamsActive":`Teams Active`,"dashboard.topTeams":`Top teams`,"dashboard.topAgents":`Top Agents`,"dashboard.byTokenConsumption7d":`By token consumption (7d)`,"dashboard.topWorkflows":`Top Workflows`,"dashboard.mostActiveThisWeek":`Most active this week`,"dashboard.recentErrors":`Recent Errors`,"dashboard.latestFailures":`Latest failures`,"dashboard.input":`Input`,"dashboard.output":`Output`,"dashboard.successPercent":`{value}% success`,"mcp.manageMcps":`Manage MCPs`,"mcp.mcpSetup":`Agent Orchestrator MCP Set-up`,"mcp.description":`Manage MCP servers across your CLI tools and configure the Agents Orchestrator MCP endpoint.`,"mcp.serverCount":`{count} MCP server(s) configured`,"mcp.addMcpServer":`Add MCP Server`,"mcp.editMcpServer":`Edit MCP Server`,"mcp.serverName":`Server Name`,"mcp.projectPath":`Project Path`,"mcp.transport":`Transport`,"mcp.command":`Command`,"mcp.arguments":`Arguments`,"mcp.onePerLine":`one per line`,"mcp.envVars":`Environment Variables`,"mcp.add":`Add`,"mcp.noServers":`No MCP servers configured.`,"mcp.noServersProject":`No MCP servers configured in any Claude Code project.`,"mcp.serversPerProject":`MCP servers per project in`,"mcp.tableHeaderName":`Name`,"mcp.tableHeaderType":`Type`,"mcp.tableHeaderCommand":`Command / URL`,"mcp.tableHeaderActions":`Actions`,"mcp.streamableHttp":`Streamable HTTP`,"mcp.tools":`{count} tools`,"mcp.endpoint":`Endpoint`,"mcp.endpointHelp":`Supports POST (tool calls), GET (SSE streaming), and DELETE (session teardown). Sessions are managed via the {header} header.`,"mcp.quickSetup":`Quick Setup`,"mcp.addToCursor":`Add to {file} in your project root:`,"mcp.addToClaude":`Add to {file}:`,"mcp.addViaCli":`Add via CLI:`,"mcp.usesRemote":`Uses {tool} to bridge HTTP Streamable → stdio (required by Claude Desktop).`,"mcp.parameters":`Parameters`,"mcp.noToolsMatching":`No tools matching "{search}"`,"mcp.availableTools":`Available Tools`,"mcp.testConnection":`Test Connection`,"mcp.verifyEndpoint":`Verify the MCP endpoint is reachable:`,"memory.scope":`Scope`,"memory.scopeGlobal":`Global`,"memory.scopeAgent":`Agent`,"memory.scopeTeam":`Team`,"memory.tier":`Tier`,"memory.tierWorking":`Working`,"memory.tierShortTerm":`Short-term`,"memory.tierLongTerm":`Long-term`,"memory.agentIdLabel":`Agent ID`,"memory.teamIdLabel":`Team ID`,"memory.categoryInsight":`Insight`,"memory.categoryDecision":`Decision`,"memory.categoryFact":`Fact`,"memory.categoryPreference":`Preference`,"memory.categoryErrorPattern":`Error Pattern`,"memory.categorySummary":`Summary`,"memory.categoryOther":`Other`,"memory.sourceTeamRun":`Team Run`,"memory.sourceAgent":`Agent`,"memory.sourceHuman":`Human`,"memory.sourceSystem":`System`,"memory.sourceExternal":`External`,"memory.score":`Score: {value}%`,"workflowEdit.trigger":`Trigger:`,"workflowEdit.manual":`Manual`,"workflowEdit.workflow":`Workflow`,"workflowEdit.event":`Event`,"workflowEdit.cron":`Cron`,"workflowEdit.select":`Select...`,"workflowEdit.eventNamePlaceholder":`event name`,"workflowEdit.aiSummary":`AI Summary`,"workflowEdit.delete":`Delete`,"agentEdit.precise":`Precise`,"agentEdit.creative":`Creative`,"agentEdit.temperature":`Temperature ({value})`,"agentEdit.tags":`Tags`,"agentEdit.tagsPlaceholder":`coding, review, ...`,"agentEdit.setWorkspace":`Set Workspace`,"agentEdit.addFolder":`Add Folder`,"settings.version":`Version:`,"settings.active":`Active`,"settings.notFound":`Not found`,"settings.notFoundError":`CLI binary not found in PATH`,"newChat.selectWorkspace":`Select a workspace to start a conversation`,"newChat.selectFolder":`Select a folder...`,"newChat.selecting":`Selecting...`,"newChat.recentWorkspaces":`Recent Workspaces`,"newChat.noHistory":`No workspace history yet`,"newChat.viewPastSessions":`View past sessions`,"newChat.sessionCount":`{count} session(s)`,"teamEdit.role":`Role`,"teamEdit.rolePlaceholder":`e.g. leader, coder, reviewer`,"sidebar.activity":`Activity`,"sidebar.filterBySource":`Filter by source`,"sidebar.all":`All`,"sidebar.sessionsPerPage":`Number of sessions per page`,"sidebar.noSessions":`No sessions`,"activityTab.chats":`Chats`,"activityTab.agents":`Agents`,"activityTab.teams":`Teams`,"activityTab.workflows":`Workflows`,"activityTab.noAgentSessions":`No agent sessions`,"activityTab.noTeamSessions":`No team sessions`,"activityTab.attention":`Needs attention`,"activityTab.pendingApprovals":`{type} · {count} pending`,"activityTab.runningItems":`{type} · {count} running`,"activityTab.failedItems":`{type} · {count} failed`,"activityTab.countRunning":`{count} running`,"activityTab.countFailed":`{count} failed`,"activityTab.rounds":`{current}/{max} rounds`,"activityTab.agents_count":`{count} agents`,"activityTab.tokens":`{count} tokens`},fr:{"common.cancel":`Annuler`,"common.delete":`Supprimer`,"common.create":`Créer`,"common.error":`Erreur`,"common.name":`Nom`,"common.nameRequired":`Le nom est requis`,"common.new":`Nouveau`,"common.saving":`Enregistrement...`,"common.update":`Mettre à jour`,"common.creating":`Création...`,"common.deleting":`Suppression...`,"common.back":`Retour`,"common.save":`Enregistrer`,"common.search":`Rechercher...`,"common.refresh":`Actualiser`,"common.sideBySide":`Côte à côte`,"common.stacked":`Empilé`,"common.running":`En cours`,"common.done":`Terminé`,"common.thinking":`Réflexion...`,"common.stopRun":`Arrêter`,"common.saved":`Enregistré`,"common.failedToSave":`Échec de l'enregistrement`,"common.deleteSession":`Supprimer la session`,"common.newFile":`Nouveau fichier`,"common.newFolder":`Nouveau dossier`,"common.edit":`Modifier`,"pagination.rangeOfTotal":`{start}–{end} sur {total}`,"pagination.firstPage":`Première page`,"pagination.previousPage":`Page précédente`,"pagination.nextPage":`Page suivante`,"pagination.lastPage":`Dernière page`,"nodeConfig.noCredential":`Aucun (pas d'authentification)`,"nodeConfig.credentialHelp":`Les credentials sont configurables dans la page Credentials`,"nodeConfig.selectAgent":`Sélectionner un agent…`,"nodeConfig.selectTeam":`Sélectionner une team…`,"nodeConfig.agentPromptPlaceholder":`Instructions supplémentaires pour l'agent...`,"nodeConfig.teamPromptPlaceholder":`Instructions pour la team...`,"nodeConfig.bypassPermissionsHelp":`Autorise l'agent à exécuter des commandes shell sans confirmation`,"nodeConfig.timeoutDescription":`Limite de temps d'exécution`,"nodeConfig.durationMinutes":`Durée (minutes)`,"nodeConfig.actionNamePlaceholder":`Nom de l'action`,"nodeConfig.reviewerCheckPlaceholder":`Que doit vérifier ou approuver le relecteur ?`,"nodeConfig.subWorkflowPromptPlaceholder":`Prompt optionnel pour le sous-workflow...`,"nodeConfig.deleteNode":`Supprimer le nœud`,"commands.invalidName":`Nom invalide. Lettres, chiffres, tirets et underscores uniquement.`,"commands.createError":`Erreur lors de la création`,"commands.deleteConfirm":`Supprimer la commande "{name}" ?`,"commands.noCustom":`Aucune commande personnalisée.`,"commands.createCommand":`Créer une commande`,"commands.createSkill":`créer un skill`,"commands.noWorkspace":`Aucune commande trouvée dans les workspaces.`,"commands.customTab":`Commandes personnalisées ({count})`,"commands.availableTab":`Commandes disponibles ({count})`,"commands.newCommand":`Nouvelle commande`,"commands.skillHelp":`Crée .local/skills/{slug}/ avec SKILL.md, techniques/, scripts/`,"commands.commandHelp":`Crée .local/commands/{slug}.md`,"commands.createAndEdit":`Créer & Éditer`,"commands.skillCreated":`Skill "{name}" créé`,"commands.commandCreated":`Commande "{name}" créée`,"credentials.description":`Gérez vos credentials pour les utiliser dans les nœuds HTTP Request`,"credentials.noCredentials":`Aucun credential configuré`,"credentials.createHelp":`Créez un credential pour authentifier vos requêtes HTTP`,"credentials.updatedAt":`Mis à jour le {date}`,"credentials.editTitle":`Modifier le credential`,"credentials.newTitle":`Nouveau credential`,"credentials.username":`Nom d'utilisateur`,"credentials.password":`Mot de passe`,"credentials.parameterName":`Nom du paramètre`,"credentials.value":`Valeur`,"credentials.addTo":`Ajouter dans`,"credentials.addHeader":`Ajouter un header`,"credentials.deleteTitle":`Supprimer le credential ?`,"credentials.deleteWarning":`Les nœuds utilisant ce credential ne seront plus authentifiés.`,"credentials.loadError":`Impossible de charger le credential`,"credentials.updated":`Credential mis à jour`,"credentials.created":`Credential créé`,"credentials.deleted":`Credential supprimé`,"debug.activeCount":`{count} actif(s)`,"debug.watcherDescription":`Watchers natifs (FSEvents / inotify) — 1 file descriptor par directory, zéro CPU.`,"debug.noWatchers":`Aucun watcher actif. Visitez la page Commands & Skills pour initialiser le cache.`,"debug.updatedAt":`Mis à jour : {time}`,"memory.title":`Mémoire`,"memory.description":`Gérez la mémoire persistante des agents — recherche, promotion, tiers`,"memory.rebuildIndex":`Reconstruire l'index`,"memory.newMemory":`Nouvelle mémoire`,"memory.searchPlaceholder":`Recherche sémantique dans la mémoire...`,"memory.allTiers":`Tous les tiers`,"memory.allCategories":`Toutes catégories`,"memory.all":`Tout`,"memory.pending":`En attente`,"memory.noMemories":`Aucune mémoire trouvée`,"memory.tryFilters":`Essayez de modifier vos filtres de recherche`,"memory.autoCreate":`Les mémoires seront créées automatiquement lors des runs d'agents`,"memory.noPending":`Aucune promotion en attente`,"memory.pendingHelp":`Les mémoires classifiées au-dessus du seuil apparaîtront ici pour approbation`,"memory.content":`Contenu`,"memory.contentPlaceholder":`Le contenu de la mémoire à stocker...`,"memory.agentIdPlaceholder":`ID de l'agent`,"memory.teamIdPlaceholder":`ID de l'équipe`,"memory.category":`Catégorie`,"memory.importance":`Importance ({value}%)`,"memory.tagsLabel":`Tags (séparés par des virgules)`,"memory.deleteTitle":`Supprimer cette mémoire ?`,"memory.deleteWarning":`Cette action est irréversible. La mémoire sera définitivement supprimée.`,"memory.promoteToLongTerm":`Promouvoir en long-term`,"memory.demoteToShortTerm":`Rétrograder en short-term`,"memory.pendingApproval":`En attente d'approbation`,"memory.approve":`Approuver`,"memory.accessCount":`{count} accès`,"memory.created":`Mémoire créée`,"memory.deleted":`Mémoire supprimée`,"memory.promoted":`Mémoire promue en long-term`,"memory.demoted":`Mémoire rétrogradée en short-term`,"memory.indexRebuilt":`Index reconstruit`,"agentEdit.agentCreated":`Agent créé`,"agentEdit.agentSaved":`Agent enregistré`,"agentEdit.agentDeleted":`Agent supprimé`,"agentEdit.exportedToClipboard":`Exporté dans le presse-papiers`,"agentEdit.failedToExport":`Échec de l'export`,"agentEdit.folderAlreadyAdded":`Dossier déjà ajouté`,"agentEdit.couldNotOpenFolder":`Impossible d'ouvrir le sélecteur de dossier`,"agentEdit.namePlaceholder":`Nom de l'agent`,"agentEdit.descriptionPlaceholder":`Que fait cet agent ?`,"agentEdit.noCliAgents":`Aucun agent CLI détecté`,"agentEdit.memoryEnabled":`Mémoire`,"agentEdit.memoryEnabledHelp":`Stocker les sorties dans le système de mémoire et injecter les mémoires pertinentes dans les prompts`,"agentUse.failedToStart":`Échec du démarrage de la session agent`,"agentUse.agentNotFound":`Agent introuvable`,"agentUse.backToAgents":`Retour aux Agents`,"agentUse.interactiveSession":`Session interactive`,"agentUse.startConversation":`Démarrer une conversation`,"agentUse.sendMessageTo":`Envoyez un message pour interagir avec {name}`,"agents.teamDeleted":`Team supprimée`,"agents.soulMdCopied":`SOUL.md copié dans le presse-papiers`,"agents.noAgentsYet":`Aucun agent pour le moment`,"agents.createFirstAgent":`Créez votre premier agent avec un SOUL pour définir sa personnalité`,"agents.noTeamsYet":`Aucune team pour le moment`,"agents.createAgentsFirst":`Créez d'abord des agents`,"agents.noMembersYet":`Aucun membre pour le moment`,"agents.exportSoulMd":`Exporter SOUL.md`,"chatSessions.title":`Sessions de chat`,"chatSessions.deleteConfirm":`Supprimer la session "{name}" ?`,"chatSessions.noSessions":`Aucune session de chat trouvée pour ce workspace.`,"chat.deleteConfirm":`Supprimer cette session ?`,"chat.noMessages":`Aucun message pour le moment`,"chat.watchingLive":`En direct — les messages apparaissent au fur et à mesure depuis l'IDE`,"chat.resumeSession":`Reprendre cette session IDE via l'agent CLI`,"chat.openWorkspaceEditor":`Ouvrir l'éditeur de workspace`,"chat.openInCursor":`Ouvrir dans Cursor`,"chat.failedToSend":`Échec de l'envoi`,"chats.title":`Chats`,"chats.description":`Tous les workspaces avec un historique de chat`,"chats.noHistory":`Aucun historique de chat trouvé`,"chatInput.placeholder":`Tapez un message... (/ pour les commandes, Entrée pour envoyer)`,"skills.newSkill":`Nouveau Skill`,"skills.skillCreated":`Skill "{name}" créé`,"skills.failedToCreate":`Échec de la création du skill`,"skills.deleteConfirm":`Supprimer {label} "{name}" ?`,"skills.deleted":`{label} supprimé`,"skills.failedToDelete":`Échec de la suppression de {label}`,"skills.noResults":`Aucun résultat`,"skills.noSkillsFound":`Aucun skill trouvé`,"skills.createOne":`En créer un`,"skills.selectToEdit":`Sélectionnez un skill ou une commande à modifier`,"skills.sourcesDescription":`Les skills proviennent de toutes les sources : ~/.cursor, ~/.claude, workspace et local`,"skillSelect.searchPlaceholder":`Rechercher des skills...`,"teamEdit.teamCreated":`Team créée`,"teamEdit.teamSaved":`Team enregistrée`,"teamEdit.noAgentsYet":`Aucun agent créé pour le moment`,"teamEdit.namePlaceholder":`Nom de la team...`,"teamEdit.descriptionPlaceholder":`Description...`,"teamEdit.tagsPlaceholder":`Tags...`,"teamEdit.agentDetails":`Détails de l'agent`,"teamEdit.memoryEnabled":`Mémoire d'équipe`,"teamEdit.memoryEnabledHelp":`Stocker les sorties des runs d'équipe dans la mémoire partagée`,"teamUse.failedToStart":`Échec du démarrage de {name}`,"teamUse.teamRunStarted":`Exécution de la team lancée`,"teamUse.failedToStartRun":`Échec du lancement : {error}`,"teamUse.teamRunCancelled":`Exécution de la team annulée`,"teamUse.failedToCancel":`Échec de l'annulation : {error}`,"teamUse.teamNotFound":`Team introuvable`,"teamUse.backToTeams":`Retour aux Teams`,"teamSessions.title":`Sessions de team`,"workflowEdit.workflowSaved":`Workflow enregistré`,"workflowEdit.namePlaceholder":`Nom du workflow...`,"workflowEdit.descriptionPlaceholder":`Description...`,"workflowRuns.runWorkflow":`Exécuter le workflow`,"workflowRuns.promptPlaceholder":`Prompt / instructions optionnels...`,"workflowRuns.responsePlaceholder":`Ajoutez une réponse ou une raison...`,"workflowRuns.stopping":`Arrêt en cours…`,"workflows.runWorkflow":`Exécuter le workflow`,"workflows.newWorkflow":`Nouveau Workflow`,"workflows.createOne":`En créer un`,"workflows.promptPlaceholder":`Prompt / instructions optionnels...`,"workflows.gridView":`Vue grille`,"workflows.listView":`Vue liste`,"mcp.deleteConfirm":`Supprimer le serveur MCP "{name}" ?`,"mcp.noConfigFiles":`Aucun fichier de configuration CLI supporté détecté sur ce système.`,"mcp.searchPlaceholder":`Rechercher des outils par nom, chemin ou méthode...`,"fileEditor.failedToOpen":`Échec de l'ouverture du fichier`,"fileEditor.failedToCreate":`Échec de la création de {type}`,"fileEditor.movedTo":`Déplacé vers {folder}/`,"fileEditor.failedToMove":`Échec du déplacement du fichier`,"fileEditor.unsavedChanges":`"{name}" a des modifications non enregistrées. Fermer quand même ?`,"fileEditor.deleteConfirm":`Supprimer ce {label} ? {path}`,"sidebar.deleteConfirm":`Supprimer la session "{name}" ?`,"sidebar.failedToSummarize":`Échec de la génération du résumé.`,"sidebar.noPendingEvents":`Aucun événement en attente`,"sidebar.noRecentRuns":`Aucune exécution récente`,"sidebar.workflowRuns":`Exécutions de workflow`,"sidebar.newMessages":`Nouveaux messages`,"sidebar.renameSession":`Renommer la session`,"sidebar.newCliSession":`Nouvelle session CLI`,"sidebar.expandActivityPanel":`Développer le panneau d'activité`,"sidebar.collapseSessions":`Réduire le panneau de sessions`,"sessionCard.newChat":`Nouveau chat`,"newChat.title":`Nouveau Chat`,"dashboard.runsToday":`Exécutions aujourd'hui`,"dashboard.successRate":`Taux de succès`,"dashboard.avgDuration":`Durée moyenne`,"dashboard.estCost":`Coût est. (7j)`,"dashboard.noWorkflowRuns":`Aucune exécution de workflow cette semaine`,"dashboard.noRecentErrors":`Aucune erreur récente`,"dashboard.noTokenData":`Aucune donnée de tokens disponible`,"dashboard.noDataAvailable":`Aucune donnée disponible`,"dashboard.noData24h":`Aucune donnée dans les dernières 24 heures`,"dashboard.noTokenData14d":`Aucune donnée de tokens dans les 14 derniers jours`,"dashboard.noData14d":`Aucune donnée dans les 14 derniers jours`,"dashboard.sessions":`Sessions`,"dashboard.noTeamSessions":`Aucune session de team pour le moment`,"settings.title":`Paramètres`,"settings.description":`Configurer l'orchestrateur d'agents`,"settings.general":`Général`,"settings.generalDescription":`Paramètres généraux de l'application`,"settings.language":`Langue`,"settings.languageDescription":`Choisir la langue d'affichage de l'interface`,"settings.appearance":`Apparence`,"settings.colorTheme":`Thème de couleur`,"settings.colorThemeDescription":`Choisir un thème de couleur pour l'interface`,"settings.cliAgents":`Agents CLI`,"settings.cliAgentsDescription":`Vérifier que vos agents CLI sont installés et accessibles`,"settings.agentsDetected":`{installed} sur {total} agents détectés`,"nav.analytics":`Analytique`,"nav.newChat":`Nouveau Chat`,"nav.chats":`Chats`,"nav.workflows":`Workflows`,"nav.agents":`Agents`,"nav.sessions":`Sessions Teams`,"nav.agentSessions":`Sessions Agents`,"nav.memory":`Mémoire`,"nav.credentials":`Credentials`,"nav.skillsAndCommands":`Skills & Commandes`,"nav.activity":`Activité`,"nav.apiDocs":`Docs API`,"nav.mcp":`MCP`,"nav.settings":`Paramètres`,"nav.debug":`Debug`,"nav.collapse":`Réduire`,"nav.expandSidebar":`Développer la sidebar`,"nav.collapseSidebar":`Réduire la sidebar`,"nav.light":`Clair`,"nav.dark":`Sombre`,"nav.system":`Système`,"credentials.namePlaceholder":`Ex : API OpenAI, Token GitHub...`,"credentials.type":`Type`,"credentials.bearerToken":`Bearer Token`,"credentials.basicAuth":`Basic Auth`,"credentials.apiKey":`Clé API`,"credentials.customHeaders":`Headers personnalisés`,"credentials.token":`Token`,"credentials.headerName":`Nom du header`,"credentials.header":`Header`,"credentials.queryParameter":`Paramètre de requête`,"credentials.headers":`Headers`,"dashboard.title":`Analytique`,"dashboard.subtitle":`Métriques d'exécution, consommation de tokens et aperçu des coûts`,"dashboard.thisWeek":`{count} cette semaine`,"dashboard.thisWeekPercent":`{value}% cette semaine`,"dashboard.today":`aujourd'hui`,"dashboard.tokens":`{count} tokens`,"dashboard.runsPerHour":`Exécutions par heure`,"dashboard.last24h":`Dernières 24 heures`,"dashboard.tokenConsumption":`Consommation de tokens`,"dashboard.dailyTokens14d":`Tokens entrée/sortie quotidiens (14 jours)`,"dashboard.dailyRunsTrend":`Tendance des exécutions quotidiennes`,"dashboard.last14d":`14 derniers jours`,"dashboard.tokenBreakdown":`Répartition des tokens`,"dashboard.model":`Modèle`,"dashboard.source":`Source`,"dashboard.llmUsage7d":`Distribution d'utilisation LLM (7j)`,"dashboard.byCli7d":`Par CLI / runtime (7j)`,"dashboard.tokenDistribution":`Distribution des tokens`,"dashboard.workflow":`Workflow`,"dashboard.project":`Projet`,"dashboard.perWorkflow7d":`Par workflow (7j)`,"dashboard.perProject14d":`Par projet (14j)`,"dashboard.efficiency":`Efficacité`,"dashboard.tokenEfficiency7d":`Efficacité d'utilisation des tokens (7j)`,"dashboard.outputInputRatio":`Ratio sortie / entrée`,"dashboard.higherOutput":`Plus élevé = plus de sortie par token d'entrée`,"dashboard.cacheHitRate":`Taux de cache hit`,"dashboard.avgTokensPerTeamRun":`Tokens moyens par exécution de team`,"dashboard.teamSessions":`Sessions de team`,"dashboard.last7d":`7 derniers jours`,"dashboard.viewAll":`Voir tout`,"dashboard.totalTokens":`Total tokens`,"dashboard.estCostLabel":`Coût est.`,"dashboard.teamsActive":`Teams actives`,"dashboard.topTeams":`Top teams`,"dashboard.topAgents":`Top Agents`,"dashboard.byTokenConsumption7d":`Par consommation de tokens (7j)`,"dashboard.topWorkflows":`Top Workflows`,"dashboard.mostActiveThisWeek":`Les plus actifs cette semaine`,"dashboard.recentErrors":`Erreurs récentes`,"dashboard.latestFailures":`Derniers échecs`,"dashboard.input":`Entrée`,"dashboard.output":`Sortie`,"dashboard.successPercent":`{value}% succès`,"mcp.manageMcps":`Gérer les MCP`,"mcp.mcpSetup":`Configuration MCP Agent Orchestrator`,"mcp.description":`Gérez les serveurs MCP de vos outils CLI et configurez le endpoint MCP Agents Orchestrator.`,"mcp.serverCount":`{count} serveur(s) MCP configuré(s)`,"mcp.addMcpServer":`Ajouter un serveur MCP`,"mcp.editMcpServer":`Modifier le serveur MCP`,"mcp.serverName":`Nom du serveur`,"mcp.projectPath":`Chemin du projet`,"mcp.transport":`Transport`,"mcp.command":`Commande`,"mcp.arguments":`Arguments`,"mcp.onePerLine":`un par ligne`,"mcp.envVars":`Variables d'environnement`,"mcp.add":`Ajouter`,"mcp.noServers":`Aucun serveur MCP configuré.`,"mcp.noServersProject":`Aucun serveur MCP configuré dans les projets Claude Code.`,"mcp.serversPerProject":`Serveurs MCP par projet dans`,"mcp.tableHeaderName":`Nom`,"mcp.tableHeaderType":`Type`,"mcp.tableHeaderCommand":`Commande / URL`,"mcp.tableHeaderActions":`Actions`,"mcp.streamableHttp":`Streamable HTTP`,"mcp.tools":`{count} outils`,"mcp.endpoint":`Endpoint`,"mcp.endpointHelp":`Supporte POST (appels d'outils), GET (streaming SSE) et DELETE (fin de session). Les sessions sont gérées via le header {header}.`,"mcp.quickSetup":`Configuration rapide`,"mcp.addToCursor":`Ajoutez dans {file} à la racine de votre projet :`,"mcp.addToClaude":`Ajoutez dans {file} :`,"mcp.addViaCli":`Ajoutez via CLI :`,"mcp.usesRemote":`Utilise {tool} pour relier HTTP Streamable → stdio (requis par Claude Desktop).`,"mcp.parameters":`Paramètres`,"mcp.noToolsMatching":`Aucun outil correspondant à "{search}"`,"mcp.availableTools":`Outils disponibles`,"mcp.testConnection":`Test de connexion`,"mcp.verifyEndpoint":`Vérifiez que le endpoint MCP est joignable :`,"memory.scope":`Portée`,"memory.scopeGlobal":`Global`,"memory.scopeAgent":`Agent`,"memory.scopeTeam":`Team`,"memory.tier":`Tier`,"memory.tierWorking":`Working`,"memory.tierShortTerm":`Court-terme`,"memory.tierLongTerm":`Long-terme`,"memory.agentIdLabel":`ID de l'agent`,"memory.teamIdLabel":`ID de l'équipe`,"memory.categoryInsight":`Insight`,"memory.categoryDecision":`Décision`,"memory.categoryFact":`Fait`,"memory.categoryPreference":`Préférence`,"memory.categoryErrorPattern":`Pattern d'erreur`,"memory.categorySummary":`Résumé`,"memory.categoryOther":`Autre`,"memory.sourceTeamRun":`Exécution team`,"memory.sourceAgent":`Agent`,"memory.sourceHuman":`Humain`,"memory.sourceSystem":`Système`,"memory.sourceExternal":`Externe`,"memory.score":`Score : {value}%`,"workflowEdit.trigger":`Déclencheur :`,"workflowEdit.manual":`Manuel`,"workflowEdit.workflow":`Workflow`,"workflowEdit.event":`Événement`,"workflowEdit.cron":`Cron`,"workflowEdit.select":`Sélectionner...`,"workflowEdit.eventNamePlaceholder":`nom de l'événement`,"workflowEdit.aiSummary":`Résumé IA`,"workflowEdit.delete":`Supprimer`,"agentEdit.precise":`Précis`,"agentEdit.creative":`Créatif`,"agentEdit.temperature":`Température ({value})`,"agentEdit.tags":`Tags`,"agentEdit.tagsPlaceholder":`coding, review, ...`,"agentEdit.setWorkspace":`Définir le workspace`,"agentEdit.addFolder":`Ajouter un dossier`,"settings.version":`Version :`,"settings.active":`Actif`,"settings.notFound":`Introuvable`,"settings.notFoundError":`Binaire CLI introuvable dans le PATH`,"newChat.selectWorkspace":`Sélectionnez un workspace pour démarrer une conversation`,"newChat.selectFolder":`Sélectionner un dossier...`,"newChat.selecting":`Sélection...`,"newChat.recentWorkspaces":`Workspaces récents`,"newChat.noHistory":`Aucun historique de workspace`,"newChat.viewPastSessions":`Voir les sessions passées`,"newChat.sessionCount":`{count} session(s)`,"teamEdit.role":`Rôle`,"teamEdit.rolePlaceholder":`ex : leader, codeur, relecteur`,"sidebar.activity":`Activité`,"sidebar.filterBySource":`Filtrer par source`,"sidebar.all":`Tous`,"sidebar.sessionsPerPage":`Nombre de sessions par page`,"sidebar.noSessions":`Aucune session`,"activityTab.chats":`Chats`,"activityTab.agents":`Agents`,"activityTab.teams":`Équipes`,"activityTab.workflows":`Workflows`,"activityTab.noAgentSessions":`Aucune session agent`,"activityTab.noTeamSessions":`Aucune session d'équipe`,"activityTab.attention":`Attention requise`,"activityTab.pendingApprovals":`{type} · {count} en attente`,"activityTab.runningItems":`{type} · {count} en cours`,"activityTab.failedItems":`{type} · {count} échoué(s)`,"activityTab.countRunning":`{count} en cours`,"activityTab.countFailed":`{count} échoué(s)`,"activityTab.rounds":`{current}/{max} rounds`,"activityTab.agents_count":`{count} agents`,"activityTab.tokens":`{count} tokens`},zh:{"common.cancel":`取消`,"common.delete":`删除`,"common.create":`创建`,"common.error":`错误`,"common.name":`名称`,"common.nameRequired":`名称为必填项`,"common.new":`新建`,"common.saving":`保存中...`,"common.update":`更新`,"common.creating":`创建中...`,"common.deleting":`删除中...`,"common.back":`返回`,"common.save":`保存`,"common.search":`搜索...`,"common.refresh":`刷新`,"common.sideBySide":`并排显示`,"common.stacked":`堆叠显示`,"common.running":`运行中`,"common.done":`完成`,"common.thinking":`思考中...`,"common.stopRun":`停止运行`,"common.saved":`已保存`,"common.failedToSave":`保存失败`,"common.deleteSession":`删除会话`,"common.newFile":`新建文件`,"common.newFolder":`新建文件夹`,"common.edit":`编辑`,"pagination.rangeOfTotal":`{start}–{end} / 共 {total}`,"pagination.firstPage":`第一页`,"pagination.previousPage":`上一页`,"pagination.nextPage":`下一页`,"pagination.lastPage":`最后一页`,"nodeConfig.noCredential":`无(不需要认证)`,"nodeConfig.credentialHelp":`凭据可在凭据页面中配置`,"nodeConfig.selectAgent":`选择一个智能体…`,"nodeConfig.selectTeam":`选择一个团队…`,"nodeConfig.agentPromptPlaceholder":`给智能体的额外指令...`,"nodeConfig.teamPromptPlaceholder":`给团队的指令...`,"nodeConfig.bypassPermissionsHelp":`允许智能体无需确认即可执行 shell 命令`,"nodeConfig.timeoutDescription":`执行时间限制`,"nodeConfig.durationMinutes":`时长(分钟)`,"nodeConfig.actionNamePlaceholder":`操作名称`,"nodeConfig.reviewerCheckPlaceholder":`审核者需要检查或批准什么?`,"nodeConfig.subWorkflowPromptPlaceholder":`传递给子工作流的可选提示...`,"nodeConfig.deleteNode":`删除节点`,"commands.invalidName":`名称无效。仅允许字母、数字、连字符和下划线。`,"commands.createError":`创建时出错`,"commands.deleteConfirm":`删除命令 "{name}"?`,"commands.noCustom":`暂无自定义命令。`,"commands.createCommand":`创建命令`,"commands.createSkill":`创建技能`,"commands.noWorkspace":`在工作区中未找到命令。`,"commands.customTab":`自定义命令 ({count})`,"commands.availableTab":`可用命令 ({count})`,"commands.newCommand":`新建命令`,"commands.skillHelp":`创建 .local/skills/{slug}/,包含 SKILL.md、techniques/、scripts/`,"commands.commandHelp":`创建 .local/commands/{slug}.md`,"commands.createAndEdit":`创建并编辑`,"commands.skillCreated":`技能 "{name}" 已创建`,"commands.commandCreated":`命令 "{name}" 已创建`,"credentials.description":`管理用于 HTTP 请求节点的凭据`,"credentials.noCredentials":`暂无配置的凭据`,"credentials.createHelp":`创建凭据以验证您的 HTTP 请求`,"credentials.updatedAt":`更新于 {date}`,"credentials.editTitle":`编辑凭据`,"credentials.newTitle":`新建凭据`,"credentials.username":`用户名`,"credentials.password":`密码`,"credentials.parameterName":`参数名称`,"credentials.value":`值`,"credentials.addTo":`添加到`,"credentials.addHeader":`添加请求头`,"credentials.deleteTitle":`删除凭据?`,"credentials.deleteWarning":`使用此凭据的节点将不再进行身份验证。`,"credentials.loadError":`无法加载凭据`,"credentials.updated":`凭据已更新`,"credentials.created":`凭据已创建`,"credentials.deleted":`凭据已删除`,"debug.activeCount":`{count} 个活跃`,"debug.watcherDescription":`原生监视器 (FSEvents / inotify) — 每个目录 1 个文件描述符,零 CPU 占用。`,"debug.noWatchers":`没有活跃的监视器。请访问命令与技能页面以初始化缓存。`,"debug.updatedAt":`更新时间:{time}`,"memory.title":`记忆`,"memory.description":`管理智能体持久化记忆 — 搜索、提升、层级`,"memory.rebuildIndex":`重建索引`,"memory.newMemory":`新建记忆`,"memory.searchPlaceholder":`在记忆中语义搜索...`,"memory.allTiers":`所有层级`,"memory.allCategories":`所有分类`,"memory.all":`全部`,"memory.pending":`待处理`,"memory.noMemories":`未找到记忆`,"memory.tryFilters":`请尝试更改搜索过滤条件`,"memory.autoCreate":`记忆将在智能体运行过程中自动创建`,"memory.noPending":`没有待提升的记忆`,"memory.pendingHelp":`超过阈值的记忆将显示在这里等待审批`,"memory.content":`内容`,"memory.contentPlaceholder":`要存储的记忆内容...`,"memory.agentIdPlaceholder":`智能体 ID`,"memory.teamIdPlaceholder":`团队 ID`,"memory.category":`分类`,"memory.importance":`重要性 ({value}%)`,"memory.tagsLabel":`标签(逗号分隔)`,"memory.deleteTitle":`删除此记忆?`,"memory.deleteWarning":`此操作不可逆。记忆将被永久删除。`,"memory.promoteToLongTerm":`提升为长期记忆`,"memory.demoteToShortTerm":`降为短期记忆`,"memory.pendingApproval":`待审批`,"memory.approve":`批准`,"memory.accessCount":`{count} 次访问`,"memory.created":`记忆已创建`,"memory.deleted":`记忆已删除`,"memory.promoted":`记忆已提升为长期记忆`,"memory.demoted":`记忆已降为短期记忆`,"memory.indexRebuilt":`索引已重建`,"agentEdit.agentCreated":`智能体已创建`,"agentEdit.agentSaved":`智能体已保存`,"agentEdit.agentDeleted":`智能体已删除`,"agentEdit.exportedToClipboard":`已导出到剪贴板`,"agentEdit.failedToExport":`导出失败`,"agentEdit.folderAlreadyAdded":`文件夹已添加`,"agentEdit.couldNotOpenFolder":`无法打开文件夹选择器`,"agentEdit.namePlaceholder":`智能体名称`,"agentEdit.descriptionPlaceholder":`这个智能体做什么?`,"agentEdit.noCliAgents":`未检测到 CLI 智能体`,"agentEdit.memoryEnabled":`记忆`,"agentEdit.memoryEnabledHelp":`将输出存储到记忆系统,并在提示中注入相关记忆`,"agentUse.failedToStart":`启动智能体会话失败`,"agentUse.agentNotFound":`未找到智能体`,"agentUse.backToAgents":`返回智能体列表`,"agentUse.interactiveSession":`交互式会话`,"agentUse.startConversation":`开始对话`,"agentUse.sendMessageTo":`发送消息与 {name} 进行交互`,"agents.teamDeleted":`团队已删除`,"agents.soulMdCopied":`SOUL.md 已复制到剪贴板`,"agents.noAgentsYet":`暂无智能体`,"agents.createFirstAgent":`创建您的第一个智能体并定义其 SOUL 个性`,"agents.noTeamsYet":`暂无团队`,"agents.createAgentsFirst":`请先创建一些智能体`,"agents.noMembersYet":`暂无成员`,"agents.exportSoulMd":`导出 SOUL.md`,"chatSessions.title":`聊天会话`,"chatSessions.deleteConfirm":`删除会话 "{name}"?`,"chatSessions.noSessions":`未找到此工作区的聊天会话。`,"chat.deleteConfirm":`删除此会话?`,"chat.noMessages":`暂无消息`,"chat.watchingLive":`实时监控中 — 消息将从 IDE 实时显示`,"chat.resumeSession":`通过 CLI 智能体恢复此 IDE 会话`,"chat.openWorkspaceEditor":`打开工作区编辑器`,"chat.openInCursor":`在 Cursor 中打开`,"chat.failedToSend":`发送失败`,"chats.title":`聊天`,"chats.description":`所有具有聊天记录的工作区`,"chats.noHistory":`未找到聊天记录`,"chatInput.placeholder":`输入消息...(/ 打开命令,Enter 发送)`,"skills.newSkill":`新建技能`,"skills.skillCreated":`技能 "{name}" 已创建`,"skills.failedToCreate":`创建技能失败`,"skills.deleteConfirm":`删除 {label} "{name}"?`,"skills.deleted":`{label} 已删除`,"skills.failedToDelete":`删除 {label} 失败`,"skills.noResults":`无结果`,"skills.noSkillsFound":`未找到技能`,"skills.createOne":`创建一个`,"skills.selectToEdit":`选择一个技能或命令进行编辑`,"skills.sourcesDescription":`技能来自所有来源:~/.cursor、~/.claude、工作区和本地`,"skillSelect.searchPlaceholder":`搜索技能...`,"teamEdit.teamCreated":`团队已创建`,"teamEdit.teamSaved":`团队已保存`,"teamEdit.noAgentsYet":`暂无已创建的智能体`,"teamEdit.namePlaceholder":`团队名称...`,"teamEdit.descriptionPlaceholder":`描述...`,"teamEdit.tagsPlaceholder":`标签...`,"teamEdit.agentDetails":`智能体详情`,"teamEdit.memoryEnabled":`团队记忆`,"teamEdit.memoryEnabledHelp":`将团队运行输出存储到共享记忆中`,"teamUse.failedToStart":`启动 {name} 失败`,"teamUse.teamRunStarted":`团队运行已启动`,"teamUse.failedToStartRun":`启动团队运行失败:{error}`,"teamUse.teamRunCancelled":`团队运行已取消`,"teamUse.failedToCancel":`取消失败:{error}`,"teamUse.teamNotFound":`未找到团队`,"teamUse.backToTeams":`返回团队列表`,"teamSessions.title":`团队会话`,"workflowEdit.workflowSaved":`工作流已保存`,"workflowEdit.namePlaceholder":`工作流名称...`,"workflowEdit.descriptionPlaceholder":`描述...`,"workflowRuns.runWorkflow":`运行工作流`,"workflowRuns.promptPlaceholder":`可选的提示 / 指令...`,"workflowRuns.responsePlaceholder":`添加回复或原因...`,"workflowRuns.stopping":`停止中…`,"workflows.runWorkflow":`运行工作流`,"workflows.newWorkflow":`新建工作流`,"workflows.createOne":`创建一个`,"workflows.promptPlaceholder":`可选的提示 / 指令...`,"workflows.gridView":`网格视图`,"workflows.listView":`列表视图`,"mcp.deleteConfirm":`删除 MCP 服务器 "{name}"?`,"mcp.noConfigFiles":`未检测到支持的 CLI 配置文件。`,"mcp.searchPlaceholder":`按名称、路径或方法搜索工具...`,"fileEditor.failedToOpen":`打开文件失败`,"fileEditor.failedToCreate":`创建 {type} 失败`,"fileEditor.movedTo":`已移至 {folder}/`,"fileEditor.failedToMove":`移动文件失败`,"fileEditor.unsavedChanges":`"{name}" 有未保存的更改。仍然关闭?`,"fileEditor.deleteConfirm":`删除此 {label}?{path}`,"sidebar.deleteConfirm":`删除会话 "{name}"?`,"sidebar.failedToSummarize":`生成摘要失败。`,"sidebar.noPendingEvents":`没有待处理的事件`,"sidebar.noRecentRuns":`没有最近的运行`,"sidebar.workflowRuns":`工作流运行`,"sidebar.newMessages":`新消息`,"sidebar.renameSession":`重命名会话`,"sidebar.newCliSession":`新建 CLI 会话`,"sidebar.expandActivityPanel":`展开活动面板`,"sidebar.collapseSessions":`折叠会话面板`,"sessionCard.newChat":`新建聊天`,"newChat.title":`新建聊天`,"dashboard.runsToday":`今日运行次数`,"dashboard.successRate":`成功率`,"dashboard.avgDuration":`平均时长`,"dashboard.estCost":`预估费用 (7天)`,"dashboard.noWorkflowRuns":`本周无工作流运行`,"dashboard.noRecentErrors":`无近期错误`,"dashboard.noTokenData":`无可用的 Token 数据`,"dashboard.noDataAvailable":`无可用数据`,"dashboard.noData24h":`过去 24 小时内无数据`,"dashboard.noTokenData14d":`过去 14 天内无 Token 数据`,"dashboard.noData14d":`过去 14 天内无数据`,"dashboard.sessions":`会话`,"dashboard.noTeamSessions":`暂无团队会话`,"settings.title":`设置`,"settings.description":`配置您的智能体编排器`,"settings.general":`通用`,"settings.generalDescription":`应用程序通用设置`,"settings.language":`语言`,"settings.languageDescription":`选择界面显示语言`,"settings.appearance":`外观`,"settings.colorTheme":`颜色主题`,"settings.colorThemeDescription":`选择界面颜色主题`,"settings.cliAgents":`CLI 智能体`,"settings.cliAgentsDescription":`验证您的 CLI 智能体是否已安装且可访问`,"settings.agentsDetected":`已检测到 {installed} / {total} 个智能体`,"nav.analytics":`数据分析`,"nav.newChat":`新建聊天`,"nav.chats":`聊天`,"nav.workflows":`工作流`,"nav.agents":`智能体`,"nav.sessions":`团队会话`,"nav.agentSessions":`代理会话`,"nav.memory":`记忆`,"nav.credentials":`凭据`,"nav.skillsAndCommands":`技能与命令`,"nav.activity":`活动`,"nav.apiDocs":`API 文档`,"nav.mcp":`MCP`,"nav.settings":`设置`,"nav.debug":`调试`,"nav.collapse":`折叠`,"nav.expandSidebar":`展开侧栏`,"nav.collapseSidebar":`折叠侧栏`,"nav.light":`浅色`,"nav.dark":`深色`,"nav.system":`跟随系统`,"credentials.namePlaceholder":`例:API OpenAI、Token GitHub...`,"credentials.type":`类型`,"credentials.bearerToken":`Bearer Token`,"credentials.basicAuth":`Basic Auth`,"credentials.apiKey":`API Key`,"credentials.customHeaders":`自定义请求头`,"credentials.token":`Token`,"credentials.headerName":`请求头名称`,"credentials.header":`请求头`,"credentials.queryParameter":`查询参数`,"credentials.headers":`请求头`,"dashboard.title":`数据分析`,"dashboard.subtitle":`执行指标、Token 消耗和费用概览`,"dashboard.thisWeek":`本周 {count}`,"dashboard.thisWeekPercent":`本周 {value}%`,"dashboard.today":`今日`,"dashboard.tokens":`{count} 个 Token`,"dashboard.runsPerHour":`每小时运行次数`,"dashboard.last24h":`过去 24 小时`,"dashboard.tokenConsumption":`Token 消耗`,"dashboard.dailyTokens14d":`每日输入/输出 Token(14 天)`,"dashboard.dailyRunsTrend":`每日运行趋势`,"dashboard.last14d":`过去 14 天`,"dashboard.tokenBreakdown":`Token 分布`,"dashboard.model":`模型`,"dashboard.source":`来源`,"dashboard.llmUsage7d":`LLM 使用分布(7 天)`,"dashboard.byCli7d":`按 CLI / 运行时(7 天)`,"dashboard.tokenDistribution":`Token 分配`,"dashboard.workflow":`工作流`,"dashboard.project":`项目`,"dashboard.perWorkflow7d":`按工作流(7 天)`,"dashboard.perProject14d":`按项目(14 天)`,"dashboard.efficiency":`效率`,"dashboard.tokenEfficiency7d":`Token 使用效率(7 天)`,"dashboard.outputInputRatio":`输出 / 输入比率`,"dashboard.higherOutput":`越高 = 每个输入 Token 产出越多`,"dashboard.cacheHitRate":`缓存命中率`,"dashboard.avgTokensPerTeamRun":`每次团队运行的平均 Token`,"dashboard.teamSessions":`团队会话`,"dashboard.last7d":`过去 7 天`,"dashboard.viewAll":`查看全部`,"dashboard.totalTokens":`总 Token`,"dashboard.estCostLabel":`预估费用`,"dashboard.teamsActive":`活跃团队`,"dashboard.topTeams":`排名靠前的团队`,"dashboard.topAgents":`排名靠前的智能体`,"dashboard.byTokenConsumption7d":`按 Token 消耗排序(7 天)`,"dashboard.topWorkflows":`排名靠前的工作流`,"dashboard.mostActiveThisWeek":`本周最活跃`,"dashboard.recentErrors":`最近错误`,"dashboard.latestFailures":`最近的失败`,"dashboard.input":`输入`,"dashboard.output":`输出`,"dashboard.successPercent":`{value}% 成功`,"mcp.manageMcps":`管理 MCP`,"mcp.mcpSetup":`智能体编排器 MCP 配置`,"mcp.description":`管理各 CLI 工具的 MCP 服务器,并配置智能体编排器 MCP 端点。`,"mcp.serverCount":`已配置 {count} 个 MCP 服务器`,"mcp.addMcpServer":`添加 MCP 服务器`,"mcp.editMcpServer":`编辑 MCP 服务器`,"mcp.serverName":`服务器名称`,"mcp.projectPath":`项目路径`,"mcp.transport":`传输方式`,"mcp.command":`命令`,"mcp.arguments":`参数`,"mcp.onePerLine":`每行一个`,"mcp.envVars":`环境变量`,"mcp.add":`添加`,"mcp.noServers":`未配置 MCP 服务器。`,"mcp.noServersProject":`所有 Claude Code 项目中均未配置 MCP 服务器。`,"mcp.serversPerProject":`每个项目的 MCP 服务器位于`,"mcp.tableHeaderName":`名称`,"mcp.tableHeaderType":`类型`,"mcp.tableHeaderCommand":`命令 / URL`,"mcp.tableHeaderActions":`操作`,"mcp.streamableHttp":`Streamable HTTP`,"mcp.tools":`{count} 个工具`,"mcp.endpoint":`端点`,"mcp.endpointHelp":`支持 POST(工具调用)、GET(SSE 流)和 DELETE(会话终止)。会话通过 {header} 头管理。`,"mcp.quickSetup":`快速配置`,"mcp.addToCursor":`添加到项目根目录的 {file}:`,"mcp.addToClaude":`添加到 {file}:`,"mcp.addViaCli":`通过 CLI 添加:`,"mcp.usesRemote":`使用 {tool} 桥接 HTTP Streamable → stdio(Claude Desktop 需要)。`,"mcp.parameters":`参数`,"mcp.noToolsMatching":`没有匹配 "{search}" 的工具`,"mcp.availableTools":`可用工具`,"mcp.testConnection":`测试连接`,"mcp.verifyEndpoint":`验证 MCP 端点是否可达:`,"memory.scope":`范围`,"memory.scopeGlobal":`全局`,"memory.scopeAgent":`智能体`,"memory.scopeTeam":`团队`,"memory.tier":`层级`,"memory.tierWorking":`工作`,"memory.tierShortTerm":`短期`,"memory.tierLongTerm":`长期`,"memory.agentIdLabel":`智能体 ID`,"memory.teamIdLabel":`团队 ID`,"memory.categoryInsight":`洞察`,"memory.categoryDecision":`决策`,"memory.categoryFact":`事实`,"memory.categoryPreference":`偏好`,"memory.categoryErrorPattern":`错误模式`,"memory.categorySummary":`摘要`,"memory.categoryOther":`其他`,"memory.sourceTeamRun":`团队运行`,"memory.sourceAgent":`智能体`,"memory.sourceHuman":`人工`,"memory.sourceSystem":`系统`,"memory.sourceExternal":`外部`,"memory.score":`分数:{value}%`,"workflowEdit.trigger":`触发器:`,"workflowEdit.manual":`手动`,"workflowEdit.workflow":`工作流`,"workflowEdit.event":`事件`,"workflowEdit.cron":`定时任务`,"workflowEdit.select":`选择...`,"workflowEdit.eventNamePlaceholder":`事件名称`,"workflowEdit.aiSummary":`AI 摘要`,"workflowEdit.delete":`删除`,"agentEdit.precise":`精确`,"agentEdit.creative":`创意`,"agentEdit.temperature":`温度 ({value})`,"agentEdit.tags":`标签`,"agentEdit.tagsPlaceholder":`coding, review, ...`,"agentEdit.setWorkspace":`设置工作区`,"agentEdit.addFolder":`添加文件夹`,"settings.version":`版本:`,"settings.active":`活跃`,"settings.notFound":`未找到`,"settings.notFoundError":`在 PATH 中未找到 CLI 程序`,"newChat.selectWorkspace":`选择一个工作区以开始对话`,"newChat.selectFolder":`选择文件夹...`,"newChat.selecting":`选择中...`,"newChat.recentWorkspaces":`最近的工作区`,"newChat.noHistory":`暂无工作区历史`,"newChat.viewPastSessions":`查看历史会话`,"newChat.sessionCount":`{count} 个会话`,"teamEdit.role":`角色`,"teamEdit.rolePlaceholder":`例:leader、coder、reviewer`,"sidebar.activity":`活动`,"sidebar.filterBySource":`按来源过滤`,"sidebar.all":`全部`,"sidebar.sessionsPerPage":`每页会话数`,"sidebar.noSessions":`暂无会话`,"activityTab.chats":`聊天`,"activityTab.agents":`智能体`,"activityTab.teams":`团队`,"activityTab.workflows":`工作流`,"activityTab.noAgentSessions":`暂无智能体会话`,"activityTab.noTeamSessions":`暂无团队会话`,"activityTab.attention":`需要关注`,"activityTab.pendingApprovals":`{type} · {count}个待审批`,"activityTab.runningItems":`{type} · {count}个运行中`,"activityTab.failedItems":`{type} · {count}个失败`,"activityTab.countRunning":`{count}个运行中`,"activityTab.countFailed":`{count}个失败`,"activityTab.rounds":`{current}/{max}轮`,"activityTab.agents_count":`{count}个智能体`,"activityTab.tokens":`{count}令牌`},ja:{"common.cancel":`キャンセル`,"common.delete":`削除`,"common.create":`作成`,"common.error":`エラー`,"common.name":`名前`,"common.nameRequired":`名前は必須です`,"common.new":`新規`,"common.saving":`保存中...`,"common.update":`更新`,"common.creating":`作成中...`,"common.deleting":`削除中...`,"common.back":`戻る`,"common.save":`保存`,"common.search":`検索...`,"common.refresh":`更新`,"common.sideBySide":`横並び`,"common.stacked":`縦並び`,"common.running":`実行中`,"common.done":`完了`,"common.thinking":`考え中...`,"common.stopRun":`実行停止`,"common.saved":`保存しました`,"common.failedToSave":`保存に失敗しました`,"common.deleteSession":`セッションを削除`,"common.newFile":`新規ファイル`,"common.newFolder":`新規フォルダ`,"common.edit":`編集`,"pagination.rangeOfTotal":`{start}–{end} / {total}件`,"pagination.firstPage":`最初のページ`,"pagination.previousPage":`前のページ`,"pagination.nextPage":`次のページ`,"pagination.lastPage":`最後のページ`,"nodeConfig.noCredential":`なし(認証不要)`,"nodeConfig.credentialHelp":`認証情報は認証情報ページで設定できます`,"nodeConfig.selectAgent":`エージェントを選択…`,"nodeConfig.selectTeam":`チームを選択…`,"nodeConfig.agentPromptPlaceholder":`エージェントへの追加指示...`,"nodeConfig.teamPromptPlaceholder":`チームへの指示...`,"nodeConfig.bypassPermissionsHelp":`エージェントが確認なしでシェルコマンドを実行できるようにする`,"nodeConfig.timeoutDescription":`実行時間制限`,"nodeConfig.durationMinutes":`時間(分)`,"nodeConfig.actionNamePlaceholder":`アクション名`,"nodeConfig.reviewerCheckPlaceholder":`レビュアーが確認・承認すべき内容は?`,"nodeConfig.subWorkflowPromptPlaceholder":`サブワークフローへの任意のプロンプト...`,"nodeConfig.deleteNode":`ノードを削除`,"commands.invalidName":`無効な名前です。英字、数字、ハイフン、アンダースコアのみ使用可能です。`,"commands.createError":`作成中にエラーが発生しました`,"commands.deleteConfirm":`コマンド "{name}" を削除しますか?`,"commands.noCustom":`カスタムコマンドはありません。`,"commands.createCommand":`コマンドを作成`,"commands.createSkill":`スキルを作成`,"commands.noWorkspace":`ワークスペースにコマンドが見つかりません。`,"commands.customTab":`カスタムコマンド ({count})`,"commands.availableTab":`利用可能なコマンド ({count})`,"commands.newCommand":`新規コマンド`,"commands.skillHelp":`.local/skills/{slug}/ を作成(SKILL.md、techniques/、scripts/ 含む)`,"commands.commandHelp":`.local/commands/{slug}.md を作成`,"commands.createAndEdit":`作成して編集`,"commands.skillCreated":`スキル "{name}" を作成しました`,"commands.commandCreated":`コマンド "{name}" を作成しました`,"credentials.description":`HTTP リクエストノードで使用する認証情報を管理`,"credentials.noCredentials":`認証情報が設定されていません`,"credentials.createHelp":`HTTP リクエストの認証に使用する認証情報を作成`,"credentials.updatedAt":`{date} に更新`,"credentials.editTitle":`認証情報を編集`,"credentials.newTitle":`新規認証情報`,"credentials.username":`ユーザー名`,"credentials.password":`パスワード`,"credentials.parameterName":`パラメータ名`,"credentials.value":`値`,"credentials.addTo":`追加先`,"credentials.addHeader":`ヘッダーを追加`,"credentials.deleteTitle":`認証情報を削除しますか?`,"credentials.deleteWarning":`この認証情報を使用しているノードは認証されなくなります。`,"credentials.loadError":`認証情報を読み込めません`,"credentials.updated":`認証情報を更新しました`,"credentials.created":`認証情報を作成しました`,"credentials.deleted":`認証情報を削除しました`,"debug.activeCount":`{count} 個アクティブ`,"debug.watcherDescription":`ネイティブウォッチャー (FSEvents / inotify) — ディレクトリごとに 1 ファイルディスクリプタ、CPU 使用率ゼロ。`,"debug.noWatchers":`アクティブなウォッチャーがありません。コマンド&スキルページでキャッシュを初期化してください。`,"debug.updatedAt":`更新: {time}`,"memory.title":`メモリ`,"memory.description":`エージェントの永続メモリを管理 — 検索、昇格、ティア`,"memory.rebuildIndex":`インデックスを再構築`,"memory.newMemory":`新規メモリ`,"memory.searchPlaceholder":`メモリ内をセマンティック検索...`,"memory.allTiers":`全ティア`,"memory.allCategories":`全カテゴリ`,"memory.all":`すべて`,"memory.pending":`保留中`,"memory.noMemories":`メモリが見つかりません`,"memory.tryFilters":`検索フィルターを変更してみてください`,"memory.autoCreate":`メモリはエージェント実行中に自動的に作成されます`,"memory.noPending":`保留中の昇格はありません`,"memory.pendingHelp":`閾値を超えたメモリがここに承認待ちとして表示されます`,"memory.content":`コンテンツ`,"memory.contentPlaceholder":`保存するメモリの内容...`,"memory.agentIdPlaceholder":`エージェント ID`,"memory.teamIdPlaceholder":`チーム ID`,"memory.category":`カテゴリ`,"memory.importance":`重要度 ({value}%)`,"memory.tagsLabel":`タグ(カンマ区切り)`,"memory.deleteTitle":`このメモリを削除しますか?`,"memory.deleteWarning":`この操作は取り消せません。メモリは完全に削除されます。`,"memory.promoteToLongTerm":`長期メモリに昇格`,"memory.demoteToShortTerm":`短期メモリに降格`,"memory.pendingApproval":`承認待ち`,"memory.approve":`承認`,"memory.accessCount":`{count} 回アクセス`,"memory.created":`メモリを作成しました`,"memory.deleted":`メモリを削除しました`,"memory.promoted":`長期メモリに昇格しました`,"memory.demoted":`短期メモリに降格しました`,"memory.indexRebuilt":`インデックスを再構築しました`,"agentEdit.agentCreated":`エージェントを作成しました`,"agentEdit.agentSaved":`エージェントを保存しました`,"agentEdit.agentDeleted":`エージェントを削除しました`,"agentEdit.exportedToClipboard":`クリップボードにエクスポートしました`,"agentEdit.failedToExport":`エクスポートに失敗しました`,"agentEdit.folderAlreadyAdded":`フォルダは既に追加されています`,"agentEdit.couldNotOpenFolder":`フォルダ選択を開けませんでした`,"agentEdit.namePlaceholder":`エージェント名`,"agentEdit.descriptionPlaceholder":`このエージェントの役割は?`,"agentEdit.noCliAgents":`CLI エージェントが検出されませんでした`,"agentEdit.memoryEnabled":`メモリ`,"agentEdit.memoryEnabledHelp":`出力をメモリシステムに保存し、関連するメモリをプロンプトに注入する`,"agentUse.failedToStart":`エージェントセッションの開始に失敗しました`,"agentUse.agentNotFound":`エージェントが見つかりません`,"agentUse.backToAgents":`エージェント一覧に戻る`,"agentUse.interactiveSession":`インタラクティブセッション`,"agentUse.startConversation":`会話を開始`,"agentUse.sendMessageTo":`{name} にメッセージを送信して対話する`,"agents.teamDeleted":`チームを削除しました`,"agents.soulMdCopied":`SOUL.md をクリップボードにコピーしました`,"agents.noAgentsYet":`エージェントがまだありません`,"agents.createFirstAgent":`SOUL を定義して最初のエージェントを作成しましょう`,"agents.noTeamsYet":`チームがまだありません`,"agents.createAgentsFirst":`まずエージェントを作成してください`,"agents.noMembersYet":`メンバーがまだいません`,"agents.exportSoulMd":`SOUL.md をエクスポート`,"chatSessions.title":`チャットセッション`,"chatSessions.deleteConfirm":`セッション "{name}" を削除しますか?`,"chatSessions.noSessions":`このワークスペースにチャットセッションが見つかりません。`,"chat.deleteConfirm":`このセッションを削除しますか?`,"chat.noMessages":`メッセージはまだありません`,"chat.watchingLive":`ライブ監視中 — IDE からのメッセージがリアルタイムで表示されます`,"chat.resumeSession":`CLI エージェント経由でこの IDE セッションを再開`,"chat.openWorkspaceEditor":`ワークスペースエディタを開く`,"chat.openInCursor":`Cursor で開く`,"chat.failedToSend":`送信に失敗しました`,"chats.title":`チャット`,"chats.description":`チャット履歴のあるすべてのワークスペース`,"chats.noHistory":`チャット履歴が見つかりません`,"chatInput.placeholder":`メッセージを入力...(/ でコマンド、Enter で送信)`,"skills.newSkill":`新規スキル`,"skills.skillCreated":`スキル "{name}" を作成しました`,"skills.failedToCreate":`スキルの作成に失敗しました`,"skills.deleteConfirm":`{label} "{name}" を削除しますか?`,"skills.deleted":`{label} を削除しました`,"skills.failedToDelete":`{label} の削除に失敗しました`,"skills.noResults":`結果なし`,"skills.noSkillsFound":`スキルが見つかりません`,"skills.createOne":`作成する`,"skills.selectToEdit":`編集するスキルまたはコマンドを選択`,"skills.sourcesDescription":`スキルはすべてのソースから表示されます:~/.cursor、~/.claude、ワークスペース、ローカル`,"skillSelect.searchPlaceholder":`スキルを検索...`,"teamEdit.teamCreated":`チームを作成しました`,"teamEdit.teamSaved":`チームを保存しました`,"teamEdit.noAgentsYet":`エージェントがまだ作成されていません`,"teamEdit.namePlaceholder":`チーム名...`,"teamEdit.descriptionPlaceholder":`説明...`,"teamEdit.tagsPlaceholder":`タグ...`,"teamEdit.agentDetails":`エージェント詳細`,"teamEdit.memoryEnabled":`チームメモリ`,"teamEdit.memoryEnabledHelp":`チーム実行の出力を共有メモリに保存`,"teamUse.failedToStart":`{name} の開始に失敗しました`,"teamUse.teamRunStarted":`チーム実行を開始しました`,"teamUse.failedToStartRun":`チーム実行の開始に失敗しました:{error}`,"teamUse.teamRunCancelled":`チーム実行をキャンセルしました`,"teamUse.failedToCancel":`キャンセルに失敗しました:{error}`,"teamUse.teamNotFound":`チームが見つかりません`,"teamUse.backToTeams":`チーム一覧に戻る`,"teamSessions.title":`チームセッション`,"workflowEdit.workflowSaved":`ワークフローを保存しました`,"workflowEdit.namePlaceholder":`ワークフロー名...`,"workflowEdit.descriptionPlaceholder":`説明...`,"workflowRuns.runWorkflow":`ワークフローを実行`,"workflowRuns.promptPlaceholder":`任意のプロンプト / 指示...`,"workflowRuns.responsePlaceholder":`回答または理由を追加...`,"workflowRuns.stopping":`停止中…`,"workflows.runWorkflow":`ワークフローを実行`,"workflows.newWorkflow":`新規ワークフロー`,"workflows.createOne":`作成する`,"workflows.promptPlaceholder":`任意のプロンプト / 指示...`,"workflows.gridView":`グリッド表示`,"workflows.listView":`リスト表示`,"mcp.deleteConfirm":`MCP サーバー "{name}" を削除しますか?`,"mcp.noConfigFiles":`サポートされている CLI 設定ファイルが検出されませんでした。`,"mcp.searchPlaceholder":`名前、パス、メソッドでツールを検索...`,"fileEditor.failedToOpen":`ファイルを開けませんでした`,"fileEditor.failedToCreate":`{type} の作成に失敗しました`,"fileEditor.movedTo":`{folder}/ に移動しました`,"fileEditor.failedToMove":`ファイルの移動に失敗しました`,"fileEditor.unsavedChanges":`"{name}" に未保存の変更があります。閉じますか?`,"fileEditor.deleteConfirm":`この {label} を削除しますか?{path}`,"sidebar.deleteConfirm":`セッション "{name}" を削除しますか?`,"sidebar.failedToSummarize":`要約の生成に失敗しました。`,"sidebar.noPendingEvents":`保留中のイベントはありません`,"sidebar.noRecentRuns":`最近の実行はありません`,"sidebar.workflowRuns":`ワークフロー実行`,"sidebar.newMessages":`新着メッセージ`,"sidebar.renameSession":`セッション名を変更`,"sidebar.newCliSession":`新規 CLI セッション`,"sidebar.expandActivityPanel":`アクティビティパネルを展開`,"sidebar.collapseSessions":`セッションパネルを折りたたむ`,"sessionCard.newChat":`新規チャット`,"newChat.title":`新規チャット`,"dashboard.runsToday":`本日の実行数`,"dashboard.successRate":`成功率`,"dashboard.avgDuration":`平均所要時間`,"dashboard.estCost":`推定コスト (7日間)`,"dashboard.noWorkflowRuns":`今週のワークフロー実行はありません`,"dashboard.noRecentErrors":`最近のエラーはありません`,"dashboard.noTokenData":`トークンデータがありません`,"dashboard.noDataAvailable":`利用可能なデータがありません`,"dashboard.noData24h":`過去 24 時間のデータがありません`,"dashboard.noTokenData14d":`過去 14 日間のトークンデータがありません`,"dashboard.noData14d":`過去 14 日間のデータがありません`,"dashboard.sessions":`セッション`,"dashboard.noTeamSessions":`チームセッションはまだありません`,"settings.title":`設定`,"settings.description":`エージェントオーケストレーターの設定`,"settings.general":`一般`,"settings.generalDescription":`アプリケーションの一般設定`,"settings.language":`言語`,"settings.languageDescription":`インターフェースの表示言語を選択`,"settings.appearance":`外観`,"settings.colorTheme":`カラーテーマ`,"settings.colorThemeDescription":`インターフェースのカラーテーマを選択`,"settings.cliAgents":`CLI エージェント`,"settings.cliAgentsDescription":`CLI エージェントがインストールされアクセス可能か確認`,"settings.agentsDetected":`{total} 個中 {installed} 個のエージェントを検出`,"nav.analytics":`分析`,"nav.newChat":`新規チャット`,"nav.chats":`チャット`,"nav.workflows":`ワークフロー`,"nav.agents":`エージェント`,"nav.sessions":`チームセッション`,"nav.agentSessions":`エージェントセッション`,"nav.memory":`メモリ`,"nav.credentials":`認証情報`,"nav.skillsAndCommands":`スキル&コマンド`,"nav.activity":`アクティビティ`,"nav.apiDocs":`API ドキュメント`,"nav.mcp":`MCP`,"nav.settings":`設定`,"nav.debug":`デバッグ`,"nav.collapse":`折りたたむ`,"nav.expandSidebar":`サイドバーを展開`,"nav.collapseSidebar":`サイドバーを折りたたむ`,"nav.light":`ライト`,"nav.dark":`ダーク`,"nav.system":`システム`,"credentials.namePlaceholder":`例:API OpenAI、Token GitHub...`,"credentials.type":`タイプ`,"credentials.bearerToken":`Bearer Token`,"credentials.basicAuth":`Basic Auth`,"credentials.apiKey":`API Key`,"credentials.customHeaders":`カスタムヘッダー`,"credentials.token":`トークン`,"credentials.headerName":`ヘッダー名`,"credentials.header":`ヘッダー`,"credentials.queryParameter":`クエリパラメータ`,"credentials.headers":`ヘッダー`,"dashboard.title":`分析`,"dashboard.subtitle":`実行メトリクス、トークン消費、コスト概要`,"dashboard.thisWeek":`今週 {count}`,"dashboard.thisWeekPercent":`今週 {value}%`,"dashboard.today":`本日`,"dashboard.tokens":`{count} トークン`,"dashboard.runsPerHour":`1時間あたりの実行数`,"dashboard.last24h":`過去24時間`,"dashboard.tokenConsumption":`トークン消費`,"dashboard.dailyTokens14d":`日別入出力トークン(14日間)`,"dashboard.dailyRunsTrend":`日別実行トレンド`,"dashboard.last14d":`過去14日間`,"dashboard.tokenBreakdown":`トークン内訳`,"dashboard.model":`モデル`,"dashboard.source":`ソース`,"dashboard.llmUsage7d":`LLM 使用分布(7日間)`,"dashboard.byCli7d":`CLI / ランタイム別(7日間)`,"dashboard.tokenDistribution":`トークン分配`,"dashboard.workflow":`ワークフロー`,"dashboard.project":`プロジェクト`,"dashboard.perWorkflow7d":`ワークフロー別(7日間)`,"dashboard.perProject14d":`プロジェクト別(14日間)`,"dashboard.efficiency":`効率`,"dashboard.tokenEfficiency7d":`トークン使用効率(7日間)`,"dashboard.outputInputRatio":`出力 / 入力比率`,"dashboard.higherOutput":`高い = 入力トークンあたりの出力が多い`,"dashboard.cacheHitRate":`キャッシュヒット率`,"dashboard.avgTokensPerTeamRun":`チーム実行あたりの平均トークン数`,"dashboard.teamSessions":`チームセッション`,"dashboard.last7d":`過去7日間`,"dashboard.viewAll":`すべて表示`,"dashboard.totalTokens":`合計トークン`,"dashboard.estCostLabel":`推定コスト`,"dashboard.teamsActive":`アクティブなチーム`,"dashboard.topTeams":`上位チーム`,"dashboard.topAgents":`上位エージェント`,"dashboard.byTokenConsumption7d":`トークン消費順(7日間)`,"dashboard.topWorkflows":`上位ワークフロー`,"dashboard.mostActiveThisWeek":`今週最もアクティブ`,"dashboard.recentErrors":`最近のエラー`,"dashboard.latestFailures":`最新の失敗`,"dashboard.input":`入力`,"dashboard.output":`出力`,"dashboard.successPercent":`{value}% 成功`,"mcp.manageMcps":`MCP 管理`,"mcp.mcpSetup":`エージェントオーケストレーター MCP 設定`,"mcp.description":`CLI ツールの MCP サーバーを管理し、エージェントオーケストレーター MCP エンドポイントを設定します。`,"mcp.serverCount":`{count} 個の MCP サーバーが設定済み`,"mcp.addMcpServer":`MCP サーバーを追加`,"mcp.editMcpServer":`MCP サーバーを編集`,"mcp.serverName":`サーバー名`,"mcp.projectPath":`プロジェクトパス`,"mcp.transport":`トランスポート`,"mcp.command":`コマンド`,"mcp.arguments":`引数`,"mcp.onePerLine":`1行に1つ`,"mcp.envVars":`環境変数`,"mcp.add":`追加`,"mcp.noServers":`MCP サーバーが設定されていません。`,"mcp.noServersProject":`Claude Code プロジェクトに MCP サーバーが設定されていません。`,"mcp.serversPerProject":`プロジェクトごとの MCP サーバー(`,"mcp.tableHeaderName":`名前`,"mcp.tableHeaderType":`タイプ`,"mcp.tableHeaderCommand":`コマンド / URL`,"mcp.tableHeaderActions":`操作`,"mcp.streamableHttp":`Streamable HTTP`,"mcp.tools":`{count} ツール`,"mcp.endpoint":`エンドポイント`,"mcp.endpointHelp":`POST(ツール呼び出し)、GET(SSE ストリーミング)、DELETE(セッション終了)をサポート。セッションは {header} ヘッダーで管理されます。`,"mcp.quickSetup":`クイックセットアップ`,"mcp.addToCursor":`プロジェクトルートの {file} に追加:`,"mcp.addToClaude":`{file} に追加:`,"mcp.addViaCli":`CLI で追加:`,"mcp.usesRemote":`{tool} を使用して HTTP Streamable → stdio をブリッジ(Claude Desktop に必要)。`,"mcp.parameters":`パラメータ`,"mcp.noToolsMatching":`"{search}" に一致するツールがありません`,"mcp.availableTools":`利用可能なツール`,"mcp.testConnection":`接続テスト`,"mcp.verifyEndpoint":`MCP エンドポイントに到達可能か確認:`,"memory.scope":`スコープ`,"memory.scopeGlobal":`グローバル`,"memory.scopeAgent":`エージェント`,"memory.scopeTeam":`チーム`,"memory.tier":`ティア`,"memory.tierWorking":`ワーキング`,"memory.tierShortTerm":`短期`,"memory.tierLongTerm":`長期`,"memory.agentIdLabel":`エージェント ID`,"memory.teamIdLabel":`チーム ID`,"memory.categoryInsight":`インサイト`,"memory.categoryDecision":`判断`,"memory.categoryFact":`事実`,"memory.categoryPreference":`好み`,"memory.categoryErrorPattern":`エラーパターン`,"memory.categorySummary":`要約`,"memory.categoryOther":`その他`,"memory.sourceTeamRun":`チーム実行`,"memory.sourceAgent":`エージェント`,"memory.sourceHuman":`人間`,"memory.sourceSystem":`システム`,"memory.sourceExternal":`外部`,"memory.score":`スコア:{value}%`,"workflowEdit.trigger":`トリガー:`,"workflowEdit.manual":`手動`,"workflowEdit.workflow":`ワークフロー`,"workflowEdit.event":`イベント`,"workflowEdit.cron":`Cron`,"workflowEdit.select":`選択...`,"workflowEdit.eventNamePlaceholder":`イベント名`,"workflowEdit.aiSummary":`AI サマリー`,"workflowEdit.delete":`削除`,"agentEdit.precise":`精確`,"agentEdit.creative":`クリエイティブ`,"agentEdit.temperature":`Temperature ({value})`,"agentEdit.tags":`タグ`,"agentEdit.tagsPlaceholder":`coding, review, ...`,"agentEdit.setWorkspace":`ワークスペースを設定`,"agentEdit.addFolder":`フォルダを追加`,"settings.version":`バージョン:`,"settings.active":`アクティブ`,"settings.notFound":`見つかりません`,"settings.notFoundError":`CLI バイナリが PATH に見つかりません`,"newChat.selectWorkspace":`ワークスペースを選択して会話を開始`,"newChat.selectFolder":`フォルダを選択...`,"newChat.selecting":`選択中...`,"newChat.recentWorkspaces":`最近のワークスペース`,"newChat.noHistory":`ワークスペース履歴がありません`,"newChat.viewPastSessions":`過去のセッションを表示`,"newChat.sessionCount":`{count} セッション`,"teamEdit.role":`役割`,"teamEdit.rolePlaceholder":`例:leader、coder、reviewer`,"sidebar.activity":`アクティビティ`,"sidebar.filterBySource":`ソースでフィルター`,"sidebar.all":`すべて`,"sidebar.sessionsPerPage":`ページあたりのセッション数`,"sidebar.noSessions":`セッションなし`,"activityTab.chats":`チャット`,"activityTab.agents":`エージェント`,"activityTab.teams":`チーム`,"activityTab.workflows":`ワークフロー`,"activityTab.noAgentSessions":`エージェントセッションなし`,"activityTab.noTeamSessions":`チームセッションなし`,"activityTab.attention":`対応が必要`,"activityTab.pendingApprovals":`{type} · {count}件保留中`,"activityTab.runningItems":`{type} · {count}件実行中`,"activityTab.failedItems":`{type} · {count}件失敗`,"activityTab.countRunning":`{count}件実行中`,"activityTab.countFailed":`{count}件失敗`,"activityTab.rounds":`{current}/{max}ラウンド`,"activityTab.agents_count":`{count}エージェント`,"activityTab.tokens":`{count}トークン`}},en=`en`,tn=new Set;function nn(){tn.forEach(e=>e())}function rn(e){en!==e&&(en=e,nn())}function an(){return{en:`en-US`,fr:`fr-FR`,zh:`zh-CN`,ja:`ja-JP`}[en]}function on(e,t){let n=$t[en][e]??$t.en[e]??e;if(t)for(let[e,r]of Object.entries(t))n=n.split(`{${e}}`).join(String(r));return n}function Y(){return(0,U.useSyncExternalStore)(e=>(tn.add(e),()=>{tn.delete(e)}),()=>en),{t:on,locale:en,setLocale:rn,getDateLocale:an}}var X=Yt()(Qt((e,t)=>({groupByWorkspace:!0,sessionsLimit:10,sidebarCollapsed:!1,sessionsPanelCollapsed:!1,activityTab:`chats`,workflowView:`grid`,theme:`system`,colorTheme:`default`,locale:`en`,lastSeenAt:{},sessionNames:{},setGroupByWorkspace:t=>e({groupByWorkspace:t}),toggleGroupByWorkspace:()=>e(e=>({groupByWorkspace:!e.groupByWorkspace})),setWorkflowView:t=>e({workflowView:t}),setTheme:t=>e({theme:t}),setColorTheme:t=>e({colorTheme:t}),setLocale:t=>{rn(t),e({locale:t})},cycleTheme:()=>e(e=>{let t=[`light`,`dark`,`system`];return{theme:t[(t.indexOf(e.theme)+1)%t.length]}}),setSessionsLimit:t=>e({sessionsLimit:t}),setActivityTab:t=>e({activityTab:t}),toggleSidebar:()=>e(e=>({sidebarCollapsed:!e.sidebarCollapsed})),toggleSessionsPanel:()=>e(e=>({sessionsPanelCollapsed:!e.sessionsPanelCollapsed})),markSeen:(t,n)=>e(e=>({lastSeenAt:{...e.lastSeenAt,[`${t}/${n}`]:Date.now()}})),hasUnseen:(e,n,r)=>{let i=`${e}/${n}`,a=t().lastSeenAt[i];return a?r>a:r>Date.now()-1440*60*1e3},getSessionName:(e,n)=>t().sessionNames[`${e}/${n}`],setSessionName:(t,n,r)=>e(e=>({sessionNames:{...e.sessionNames,[`${t}/${n}`]:r}})),clearSessionName:(t,n)=>e(e=>{let{[`${t}/${n}`]:r,...i}=e.sessionNames;return{sessionNames:i}})}),{name:`ui-preferences`,onRehydrateStorage:()=>e=>{e?.locale&&rn(e.locale)}}));function sn(){let e=X(e=>e.theme),t=X(e=>e.colorTheme);(0,U.useEffect)(()=>{let t=document.documentElement;function n(e){t.classList.toggle(`dark`,e)}if(e!==`system`){n(e===`dark`);return}let r=window.matchMedia(`(prefers-color-scheme: dark)`);n(r.matches);let i=e=>n(e.matches);return r.addEventListener(`change`,i),()=>r.removeEventListener(`change`,i)},[e]),(0,U.useEffect)(()=>{L(t)},[t])}function cn(){(0,U.useEffect)(()=>(Ze(),()=>{Qe()}),[])}function ln(e){cn();let{data:t=new Map}=O({queryKey:W.nodeStatus(e??``),queryFn:()=>new Map($e(e??``)),enabled:!!e,staleTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1});return{liveStatus:t,clearStatus:(0,U.useCallback)(()=>{e&&it(e)},[e])}}function un(e){cn();let{data:t=[]}=O({queryKey:W.logs(e??``),queryFn:()=>[...et(e??``)],enabled:!!e,staleTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1});return{logEntries:t}}function dn(){cn();let{data:e=[]}=O({queryKey:W.allEvents(),queryFn:()=>[...nt()],staleTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),{data:t=`connecting`}=O({queryKey:W.connectionStatus(),queryFn:()=>rt(),staleTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1});return{events:e,connectionStatus:t}}function fn(){cn();let{data:e=[]}=O({queryKey:W.pendingActions(),queryFn:()=>tt(),staleTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1});return{pendingActions:e,resolveAction:(0,U.useCallback)((e,t,n=`approved`)=>{at(e,t,n)},[])}}function pn(e,t){let n=D();cn(),(0,U.useEffect)(()=>{if(!e)return;let r=0,i=n.getQueryCache().subscribe(n=>{if(n.type!==`updated`||n.query.queryKey[0]!==W.allEvents()[0])return;let i=nt();for(let n of i){if(n._id<=r)break;(n.type===`workflow-started`||n.type===`workflow-completed`||n.type===`workflow-failed`)&&n.workflowId===e&&t(n)}i.length>0&&(r=i[0]._id)});return()=>{i()}},[e,n,t])}var Z=f();function mn({page:e,totalPages:t,total:n,pageSize:r,onPageChange:i,className:a,compact:o}){let{t:s}=Y();if(t<=1)return null;let c=(e-1)*r+1,l=Math.min(e*r,n);return(0,Z.jsxs)(`div`,{className:P(`flex items-center justify-between gap-4`,a),children:[!o&&(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground whitespace-nowrap`,children:s(`pagination.rangeOfTotal`,{start:c,end:l,total:n})}),(0,Z.jsxs)(`div`,{className:P(`flex items-center gap-1`,o&&`w-full justify-center`),children:[(0,Z.jsx)(I,{variant:`outline`,size:`icon-xs`,onClick:()=>i(1),disabled:e<=1,title:s(`pagination.firstPage`),children:(0,Z.jsx)(pt,{className:`h-3 w-3`})}),(0,Z.jsx)(I,{variant:`outline`,size:`icon-xs`,onClick:()=>i(e-1),disabled:e<=1,title:s(`pagination.previousPage`),children:(0,Z.jsx)(dt,{className:`h-3 w-3`})}),o?(0,Z.jsxs)(`span`,{className:`text-xs text-muted-foreground px-2`,children:[e,`/`,t]}):(0,Z.jsx)(hn,{page:e,totalPages:t,onPageChange:i}),(0,Z.jsx)(I,{variant:`outline`,size:`icon-xs`,onClick:()=>i(e+1),disabled:e>=t,title:s(`pagination.nextPage`),children:(0,Z.jsx)(ft,{className:`h-3 w-3`})}),(0,Z.jsx)(I,{variant:`outline`,size:`icon-xs`,onClick:()=>i(t),disabled:e>=t,title:s(`pagination.lastPage`),children:(0,Z.jsx)(mt,{className:`h-3 w-3`})})]}),!o&&(0,Z.jsx)(`div`,{className:`w-20`})]})}function hn({page:e,totalPages:t,onPageChange:n}){let r=[];for(let n=1;n<=t;n++)n===1||n===t||n>=e-1&&n<=e+1?r.push(n):r[r.length-1]!==`...`&&r.push(`...`);return(0,Z.jsx)(Z.Fragment,{children:r.map((t,r)=>t===`...`?(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground px-1`,children:`...`},`dots-${r}`):(0,Z.jsx)(I,{variant:t===e?`secondary`:`outline`,size:`icon-xs`,onClick:()=>n(t),className:`min-w-6 text-xs`,children:t},t))})}var gn=new Map,_n=new Map,vn=new Set,yn=new Map;function bn(e){for(let e of vn)e();if(e){let t=yn.get(e);if(t)for(let e of t)e()}}function xn(e){return vn.add(e),()=>vn.delete(e)}function Sn(e,t){let n=yn.get(e);return n||(n=new Set,yn.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&yn.delete(e)}}function Cn(e){let t=gn.get(e);if(t)return{streamId:t.streamId,sessionKey:t.sessionKey,content:t.content,thinking:t.thinking,isStreaming:t.isStreaming,error:t.error,toolCalls:t.toolCalls}}function wn(e){let t=_n.get(e);if(t)return Cn(t)}function Tn(){return Array.from(_n.keys()).filter(e=>{let t=_n.get(e);return gn.get(t)?.isStreaming})}function En(e,t){let n;if(t.toolCallId)n=e.toolCalls.find(e=>e.id===t.toolCallId);else for(let t=e.toolCalls.length-1;t>=0;t--)if(e.toolCalls[t].pending){n=e.toolCalls[t];break}n&&(n.pending=!1,t.content&&(n.output=t.content))}function Dn(e,t){if(!t.toolCallId)return;let n=e.toolCalls.find(e=>e.id===t.toolCallId&&e.pending);n&&t.toolInput&&(n.input=t.toolInput)}function On(e,t,n,r){if(t.type===`text-snapshot`&&t.content)e.content=t.content;else if(t.type===`text-delta`&&t.content)e.content+=t.content;else if(t.type===`thinking`&&t.content)e.thinking=t.content;else if(t.type===`tool-input`)Dn(e,t);else if(t.type===`tool-use`&&t.toolName)e.toolCalls.push({id:t.toolCallId??`tool-${Date.now()}-${e.toolCalls.length}`,name:t.toolName,input:t.toolInput,pending:!0});else if(t.type===`tool-result`)En(e,t);else if(t.type===`done`||t.type===`error`)e.doneReceived=!0,e.isStreaming=!1,t.type===`error`&&(e.error=t.content??`Agent error`),n.close(),e.eventSource=null;else return;bn(r)}function kn(e,t){let n=_n.get(t);if(n&&n!==e&&An(n),gn.has(e))return;let r={streamId:e,sessionKey:t,content:``,thinking:``,isStreaming:!0,error:null,eventSource:null,doneReceived:!1,toolCalls:[]},i=new EventSource(`/api/chat/stream/${e}`);r.eventSource=i,i.addEventListener(`chat-chunk`,e=>{try{On(r,JSON.parse(e.data),i,t)}catch{}}),i.onerror=()=>{!r.doneReceived&&!r.content&&r.toolCalls.length===0&&(r.error=`Stream connection lost`),r.isStreaming=!1,i.close(),r.eventSource=null,bn(t)},gn.set(e,r),_n.set(t,e),bn(t)}function An(e){let t=gn.get(e);t&&(t.eventSource&&=(t.eventSource.close(),null),t.isStreaming=!1,bn(t.sessionKey))}function jn(e){let t=gn.get(e);if(!t)return;let n={streamId:t.streamId,sessionKey:t.sessionKey,content:t.content,thinking:t.thinking,isStreaming:t.isStreaming,error:t.error,toolCalls:t.toolCalls},r=t.sessionKey;return t.eventSource&&t.eventSource.close(),gn.delete(e),_n.get(r)===e&&_n.delete(r),bn(r),n}function Mn(e){let t=(0,U.useSyncExternalStore)(t=>e?Sn(e,t):()=>{},()=>e?wn(e):void 0),n=(0,U.useCallback)(t=>{e&&kn(t,e)},[e]),r=(0,U.useCallback)(()=>{t&&An(t.streamId)},[t]),i=(0,U.useCallback)(()=>{if(t)return jn(t.streamId)},[t]);return{streamingContent:t?.content??``,streamingThinking:t?.thinking??``,streamingToolCalls:t?.toolCalls??[],isStreaming:t?.isStreaming??!1,error:t?.error??null,streamId:t?.streamId??null,startStream:n,stopStream:r,consumeStream:i}}function Nn(){let[e,t]=(0,U.useState)(Tn);return(0,U.useEffect)(()=>xn(()=>{t(Tn())}),[]),e}function Pn({count:e=6,className:t}){return(0,Z.jsx)(`div`,{className:P(`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,t),children:Array.from({length:e}).map((e,t)=>(0,Z.jsxs)(`div`,{className:`rounded-xl border p-4 space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(z,{className:`h-4 w-32`}),(0,Z.jsx)(z,{className:`h-5 w-16 rounded-full`})]}),(0,Z.jsx)(z,{className:`h-3 w-48`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(z,{className:`h-3 w-20`}),(0,Z.jsx)(z,{className:`h-3 w-12`})]})]},t))})}function Fn({count:e=8,large:t}){return(0,Z.jsx)(`div`,{className:`flex flex-col`,children:Array.from({length:e}).map((e,n)=>(0,Z.jsxs)(`div`,{className:P(`flex items-center border-b border-border/50`,t?`gap-2.5 px-4 py-3`:`gap-1.5 px-3 py-1.5`),children:[(0,Z.jsx)(z,{className:P(`rounded-full shrink-0`,t?`h-4.5 w-4.5`:`h-3 w-3`)}),(0,Z.jsx)(`div`,{className:`flex-1 min-w-0 space-y-1`,children:(0,Z.jsx)(z,{className:P(t?`h-4 w-3/4`:`h-3 w-2/3`)})}),(0,Z.jsx)(z,{className:`h-3 w-10 shrink-0`})]},n))})}function In({count:e=6}){return(0,Z.jsx)(`div`,{className:`divide-y flex flex-col`,children:Array.from({length:e}).map((e,t)=>(0,Z.jsxs)(`div`,{className:`px-4 py-3 space-y-1.5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(z,{className:`h-3 w-16`}),(0,Z.jsx)(z,{className:`h-4 w-14 rounded-full`})]}),(0,Z.jsxs)(`div`,{className:`flex justify-between`,children:[(0,Z.jsx)(z,{className:`h-3 w-24`}),(0,Z.jsx)(z,{className:`h-3 w-12`})]})]},t))})}function Ln(){return(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col`,children:[(0,Z.jsxs)(`div`,{className:`px-4 py-3 border-b flex items-center gap-3`,children:[(0,Z.jsx)(z,{className:`h-5 w-20 rounded-full`}),(0,Z.jsx)(z,{className:`h-3 w-32`}),(0,Z.jsx)(z,{className:`h-3 w-24`})]}),(0,Z.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-8`,children:(0,Z.jsx)(`div`,{className:`space-y-6 w-full max-w-md`,children:Array.from({length:3}).map((e,t)=>(0,Z.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,Z.jsx)(z,{className:`h-12 w-12 rounded-lg shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,Z.jsx)(z,{className:`h-4 w-3/4`}),(0,Z.jsx)(z,{className:`h-3 w-1/2`})]})]},t))})})]})}function Rn({count:e=4}){return(0,Z.jsx)(`div`,{className:`flex flex-col gap-3 p-4`,children:Array.from({length:e}).map((e,t)=>{let n=t%2==0;return(0,Z.jsx)(`div`,{className:P(`flex`,n?`justify-end`:`justify-start`),children:(0,Z.jsxs)(`div`,{className:P(`space-y-2 rounded-lg px-4 py-3`,n?`bg-primary/10 max-w-[60%]`:`bg-muted max-w-[80%]`),children:[(0,Z.jsx)(z,{className:`h-3 w-48`}),!n&&(0,Z.jsx)(z,{className:`h-3 w-64`}),!n&&(0,Z.jsx)(z,{className:`h-3 w-36`})]})},t)})})}function zn(){return(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,Z.jsx)(z,{className:`h-8 w-48`}),(0,Z.jsx)(z,{className:`h-8 w-48`})]}),(0,Z.jsx)(Pn,{count:3})]})}function Bn({count:e=4}){return(0,Z.jsx)(`div`,{className:`space-y-1`,children:Array.from({length:e}).map((e,t)=>(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border px-3 py-2.5`,children:[(0,Z.jsx)(z,{className:`h-4 w-4 shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex-1 min-w-0 space-y-1`,children:[(0,Z.jsx)(z,{className:`h-4 w-40`}),(0,Z.jsx)(z,{className:`h-3 w-56`})]}),(0,Z.jsx)(z,{className:`h-3 w-16 shrink-0`})]},t))})}function Vn(){return(0,Z.jsx)(`div`,{className:`py-1 space-y-1`,children:Array.from({length:4}).map((e,t)=>(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 px-3 py-1.5`,children:[(0,Z.jsx)(z,{className:`h-3 w-20 shrink-0`}),(0,Z.jsx)(z,{className:`h-3 flex-1`})]},t))})}function Hn({count:e=6}){return(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:Array.from({length:e}).map((e,t)=>(0,Z.jsxs)(`div`,{className:`rounded-xl border p-4 space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(z,{className:`h-9 w-9 rounded-lg`}),(0,Z.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Z.jsx)(z,{className:`h-4 w-28`}),(0,Z.jsx)(z,{className:`h-3 w-36`})]})]}),(0,Z.jsx)(z,{className:`h-3 w-full`}),(0,Z.jsx)(z,{className:`h-3 w-3/4`}),(0,Z.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,Z.jsx)(z,{className:`h-5 w-14 rounded-full`}),(0,Z.jsx)(z,{className:`h-5 w-16 rounded-full`}),(0,Z.jsx)(z,{className:`h-5 w-12 rounded-full`})]})]},t))})}function Un({count:e=4}){return(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:Array.from({length:e}).map((e,t)=>(0,Z.jsxs)(`div`,{className:`rounded-xl border p-4 space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(z,{className:`h-9 w-9 rounded-lg`}),(0,Z.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Z.jsx)(z,{className:`h-4 w-32`}),(0,Z.jsx)(z,{className:`h-3 w-20`})]})]}),(0,Z.jsx)(z,{className:`h-3 w-full`}),(0,Z.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,Z.jsx)(z,{className:`h-6 w-24 rounded-full`}),(0,Z.jsx)(z,{className:`h-6 w-20 rounded-full`}),(0,Z.jsx)(z,{className:`h-6 w-22 rounded-full`})]})]},t))})}function Wn(){return(0,Z.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,Z.jsxs)(`div`,{className:`shrink-0 border-b px-6 py-3 flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(z,{className:`h-8 w-8 rounded`}),(0,Z.jsx)(z,{className:`h-9 w-9 rounded`}),(0,Z.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Z.jsx)(z,{className:`h-5 w-36`}),(0,Z.jsx)(z,{className:`h-3 w-48`})]})]}),(0,Z.jsx)(z,{className:`h-9 w-20 rounded-md`})]}),(0,Z.jsxs)(`div`,{className:`flex-1 flex overflow-hidden`,children:[(0,Z.jsxs)(`div`,{className:`w-[280px] shrink-0 border-r p-4 space-y-4`,children:[(0,Z.jsx)(z,{className:`h-12 w-20`}),(0,Z.jsx)(z,{className:`h-9 w-full`}),(0,Z.jsx)(z,{className:`h-9 w-full`}),(0,Z.jsx)(z,{className:`h-px w-full`}),(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(z,{className:`h-3 w-16`}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-1.5`,children:[(0,Z.jsx)(z,{className:`h-10 w-full rounded-md`}),(0,Z.jsx)(z,{className:`h-10 w-full rounded-md`})]})]}),(0,Z.jsx)(z,{className:`h-9 w-full`}),(0,Z.jsx)(z,{className:`h-9 w-full`})]}),(0,Z.jsxs)(`div`,{className:`w-[180px] shrink-0 border-r py-2 space-y-1`,children:[(0,Z.jsx)(z,{className:`h-3 w-20 mx-3 mb-2`}),Array.from({length:7}).map((e,t)=>(0,Z.jsx)(z,{className:`h-9 w-full rounded-none`},t))]}),(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col`,children:[(0,Z.jsxs)(`div`,{className:`px-6 py-3 border-b space-y-1.5`,children:[(0,Z.jsx)(z,{className:`h-4 w-24`}),(0,Z.jsx)(z,{className:`h-3 w-48`})]}),(0,Z.jsx)(`div`,{className:`flex-1 p-4`,children:(0,Z.jsx)(z,{className:`h-full w-full rounded-lg`})})]})]})]})}function Gn(){return(0,Z.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,Z.jsxs)(`div`,{className:`shrink-0 border-b px-6 py-3 flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(z,{className:`h-8 w-8 rounded`}),(0,Z.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Z.jsx)(z,{className:`h-5 w-36`}),(0,Z.jsx)(z,{className:`h-3 w-48`})]})]}),(0,Z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Z.jsx)(z,{className:`h-9 w-24 rounded-md`}),(0,Z.jsx)(z,{className:`h-9 w-20 rounded-md`})]})]}),(0,Z.jsxs)(`div`,{className:`flex-1 flex overflow-hidden`,children:[(0,Z.jsxs)(`div`,{className:`w-[280px] shrink-0 border-r p-4 space-y-4`,children:[(0,Z.jsx)(z,{className:`h-9 w-full`}),(0,Z.jsx)(z,{className:`h-9 w-full`}),(0,Z.jsx)(z,{className:`h-px w-full`}),(0,Z.jsx)(z,{className:`h-3 w-16`}),(0,Z.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:4}).map((e,t)=>(0,Z.jsx)(z,{className:`h-10 w-full rounded-md`},t))}),(0,Z.jsx)(z,{className:`h-px w-full`}),(0,Z.jsx)(z,{className:`h-3 w-20`}),(0,Z.jsx)(`div`,{className:`space-y-1.5`,children:Array.from({length:3}).map((e,t)=>(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(z,{className:`h-8 w-8 rounded`}),(0,Z.jsxs)(`div`,{className:`flex-1 space-y-1`,children:[(0,Z.jsx)(z,{className:`h-3 w-24`}),(0,Z.jsx)(z,{className:`h-2.5 w-16`})]})]},t))})]}),(0,Z.jsx)(`div`,{className:`flex-1 bg-muted/30`})]})]})}function Kn(){return(0,Z.jsx)(`div`,{className:`flex items-center justify-center h-screen`,children:(0,Z.jsxs)(`div`,{className:`space-y-4 w-full max-w-md px-8`,children:[(0,Z.jsx)(z,{className:`h-6 w-48 mx-auto`}),(0,Z.jsx)(z,{className:`h-4 w-64 mx-auto`}),(0,Z.jsxs)(`div`,{className:`space-y-3 pt-4`,children:[(0,Z.jsx)(z,{className:`h-10 w-full rounded-lg`}),(0,Z.jsx)(z,{className:`h-10 w-full rounded-lg`}),(0,Z.jsx)(z,{className:`h-10 w-full rounded-lg`})]})]})})}function qn(){return(0,Z.jsxs)(`div`,{className:`p-6`,children:[(0,Z.jsxs)(`div`,{className:`mb-6 flex items-center gap-3`,children:[(0,Z.jsx)(z,{className:`h-8 w-16`}),(0,Z.jsx)(z,{className:`h-7 w-40`}),(0,Z.jsx)(z,{className:`h-5 w-8 rounded-full`})]}),(0,Z.jsx)(Pn,{count:6})]})}var Jn={cursor:xe,claude:be,"claude-code":be};function Yn(e){return e?Jn[e]??ye:ye}var Xn={"claude-code":`Claude Code`,cursor:`Cursor`,claude:`Claude Code`};function Zn(e){return e?Xn[e]??e:`CLI`}function Qn({composer:e}){return e?(0,Z.jsxs)(Z.Fragment,{children:[e.hasBlockingPendingActions&&(0,Z.jsx)(`span`,{className:`text-[10px] text-amber-500 shrink-0`,title:`Waiting for approval`,children:(0,Z.jsx)(ht,{className:`h-3 w-3`})}),e.filesChangedCount>0&&(0,Z.jsxs)(`span`,{className:`text-[10px] text-emerald-500 shrink-0`,title:`${e.totalLinesAdded} added, ${e.totalLinesRemoved} removed in ${e.filesChangedCount} files`,children:[`+`,e.totalLinesAdded,` -`,e.totalLinesRemoved]}),e.contextUsagePercent>0&&(0,Z.jsxs)(`span`,{className:P(`text-[10px] shrink-0`,e.contextUsagePercent>80?`text-red-500`:`text-muted-foreground`),title:`Context: ${e.contextUsagePercent.toFixed(0)}%`,children:[e.contextUsagePercent.toFixed(0),`%`]})]}):null}function $n({cli:e,className:t}){return(0,Z.jsx)(Yn(e),{className:t})}function er(e){return e===`completed`?`text-emerald-500`:e===`running`?`text-blue-500`:e===`failed`?`text-destructive`:`text-muted-foreground`}function tr(e){return e===`completed`?`bg-emerald-500`:e===`running`?`bg-blue-500 animate-pulse`:e===`failed`?`bg-destructive`:`bg-muted-foreground`}function nr(e){let t=Math.floor((Date.now()-e)/1e3);if(t<60)return`just now`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function rr(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}var ir=(0,U.memo)(function({session:e,isActive:t,isWorking:n,hasUnseen:r,indented:i,large:a,onNavigate:o,onDelete:s}){let{t:c}=Y(),{getSessionName:l,setSessionName:u,clearSessionName:d}=X(),f=l(e.projectHash,e.sessionId),[p,m]=(0,U.useState)(!1),[h,g]=(0,U.useState)(``),_=(0,U.useRef)(null),v=e=>{e.stopPropagation(),g(f??``),m(!0),setTimeout(()=>_.current?.focus(),0)},y=()=>{let t=h.trim();t?u(e.projectHash,e.sessionId,t):d(e.projectHash,e.sessionId),m(!1)},b=e=>{e.key===`Enter`&&y(),e.key===`Escape`&&m(!1)},x=P(`shrink-0`,a?`h-4.5 w-4.5`:`h-3 w-3`),S;S=n?(0,Z.jsx)(St,{className:P(x,`text-blue-500 animate-spin`)}):e.source===`ide`?(0,Z.jsx)(Et,{className:P(x,`text-muted-foreground`)}):(0,Z.jsx)($n,{cli:e.cli,className:P(x,`text-muted-foreground`)});let C;return i&&(C=a?`pl-8`:`pl-6`),(0,Z.jsxs)(`button`,{onClick:()=>o(`/chat/${e.projectHash}/${e.sessionId}`),className:P(`group flex items-center w-full text-left transition-colors hover:bg-accent border-b border-border/50`,a?`gap-2.5 px-4 py-3 text-sm`:`gap-1.5 px-3 py-1.5 text-xs`,C,t&&`bg-accent`),children:[S,p?(0,Z.jsx)(`input`,{ref:_,value:h,onChange:e=>g(e.target.value),onBlur:y,onKeyDown:b,onClick:e=>e.stopPropagation(),className:P(`min-w-0 flex-1 bg-transparent border-b border-foreground/30 outline-none font-medium px-0 py-0`,a?`text-sm`:`text-xs`),placeholder:e.name}):(0,Z.jsxs)(`span`,{className:P(`min-w-0 flex-1 truncate`,n&&`text-blue-500`),children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:f??e.name}),f&&(0,Z.jsx)(`span`,{className:P(`ml-1.5 text-muted-foreground/60 font-normal`,a?`text-xs`:`text-[10px]`),children:e.name})]}),(0,Z.jsx)(Qn,{composer:e.composer}),r&&!t&&(0,Z.jsx)(`span`,{className:P(`rounded-full bg-blue-500 shrink-0`,a?`h-2.5 w-2.5`:`h-2 w-2`),title:c(`sidebar.newMessages`)}),(0,Z.jsx)(`span`,{className:`text-muted-foreground shrink-0`,children:nr(e.updatedAt)}),(0,Z.jsx)(`button`,{onClick:v,className:`text-muted-foreground hover:text-foreground transition-colors opacity-0 group-hover:opacity-100 shrink-0`,title:c(`sidebar.renameSession`),children:(0,Z.jsx)(Mt,{className:P(a?`h-4 w-4`:`h-3 w-3`)})}),(0,Z.jsx)(`button`,{onClick:t=>s(t,e),className:`text-muted-foreground hover:text-destructive transition-colors opacity-0 group-hover:opacity-100 shrink-0`,title:c(`common.deleteSession`),children:(0,Z.jsx)(zt,{className:P(a?`h-4 w-4`:`h-3 w-3`)})})]})});function ar({items:e}){if(e.length===0)return null;let t={amber:`bg-amber-500/15 text-amber-500 hover:bg-amber-500/25`,blue:`bg-blue-500/15 text-blue-500 hover:bg-blue-500/25`,red:`bg-destructive/15 text-destructive hover:bg-destructive/25`};return(0,Z.jsx)(`div`,{className:`flex items-center gap-1.5 px-3 py-1.5 border-b bg-muted/30 flex-wrap`,children:e.map((e,n)=>(0,Z.jsxs)(`button`,{onClick:e.onClick,className:P(`flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-medium transition-colors`,t[e.color]),children:[(0,Z.jsx)(e.icon,{className:`h-3 w-3`}),e.label]},n))})}function or({activeSessionId:e,large:t}){let{t:n}=Y(),r=o(),i=D(),{sessionsLimit:a,setSessionsLimit:s,hasUnseen:c}=X(),l=Nn(),u=(0,U.useMemo)(()=>new Set(l),[l]),[d,f]=(0,U.useState)(1),[p,m]=(0,U.useState)(`all`),{data:h,isLoading:g}=O({queryKey:[`recent-sessions`,d,a],queryFn:()=>B.chat.getRecent({page:d,pageSize:a}),refetchInterval:1e4,staleTime:5e3}),_=(0,U.useMemo)(()=>h?.data??[],[h?.data]),v=(0,U.useMemo)(()=>{let e=new Map;for(let t of _){let n=t.workspaceName??t.projectHash.slice(0,8),r=e.get(n);if(r||(r={name:n,path:t.workspacePath,ide:[],cliByType:new Map},e.set(n,r)),!r.path&&t.workspacePath&&(r.path=t.workspacePath),t.source===`ide`)r.ide.push(t);else{let e=t.cli??`cli`,n=r.cliByType.get(e);n||(n=[],r.cliByType.set(e,n)),n.push(t)}}return[...e.values()]},[_]),y=(0,U.useMemo)(()=>{let e=new Set;for(let t of v)t.path&&e.add(t.path);return[...e]},[v]),{data:b={}}=O({queryKey:[`git-branches`,y],queryFn:()=>B.chat.getGitBranches(y),enabled:y.length>0,refetchInterval:3e4,staleTime:15e3}),x=(0,U.useCallback)(e=>r(e),[r]),S=(0,U.useCallback)((t,o)=>{t.stopPropagation(),confirm(n(`sidebar.deleteConfirm`,{name:o.name}))&&(i.setQueryData([`recent-sessions`,d,a],e=>e&&{...e,data:e.data.filter(e=>e.sessionId!==o.sessionId),total:e.total-1}),e===o.sessionId&&r(`/new`),B.chat.deleteSession(o.projectHash,o.sessionId).catch(()=>{i.invalidateQueries({queryKey:[`recent-sessions`]})}))},[i,d,a,e,r,n]),C=(n,r,i)=>i.length===0?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:P(`flex items-center gap-1.5 px-3 py-1 text-[10px] font-semibold uppercase tracking-wider text-foreground/50 border-b border-border/50`,t?`pl-6`:`pl-5`),children:[(0,Z.jsx)(r,{className:`h-3 w-3 shrink-0`}),(0,Z.jsx)(`span`,{children:n}),(0,Z.jsx)(`span`,{className:`text-muted-foreground/60 ml-auto`,children:i.length})]}),i.map(n=>(0,Z.jsx)(ir,{session:n,isActive:e===n.sessionId,isWorking:u.has(`${n.projectHash}/${n.sessionId}`)||n.isLive,hasUnseen:c(n.projectHash,n.sessionId,n.updatedAt),indented:!0,large:t,onNavigate:x,onDelete:S},`${n.projectHash}-${n.sessionId}`))]});return(0,Z.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b`,children:[(0,Z.jsxs)(`select`,{value:p,onChange:e=>m(e.target.value),className:`h-7 rounded-md border border-input bg-background px-2 text-xs text-foreground`,title:n(`sidebar.filterBySource`),children:[(0,Z.jsx)(`option`,{value:`all`,children:n(`sidebar.all`)}),(0,Z.jsx)(`option`,{value:`ide`,children:`IDE`}),(0,Z.jsx)(`option`,{value:`cli`,children:`CLI`})]}),(0,Z.jsx)(_e,{type:`number`,min:1,max:100,value:a,onChange:e=>{let t=parseInt(e.target.value,10);t>0&&t<=100&&(s(t),f(1))},className:`w-16 h-7 text-xs text-center`,title:n(`sidebar.sessionsPerPage`)})]}),(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto`,children:[g&&(0,Z.jsx)(Fn,{count:6,large:t}),!g&&_.length===0&&(0,Z.jsx)(`div`,{className:`p-4 text-xs text-muted-foreground text-center`,children:n(`sidebar.noSessions`)}),!g&&_.length>0&&(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[v.map(e=>{let i=p!==`cli`&&e.ide.length>0,a=p!==`ide`&&e.cliByType.size>0;if(!i&&!a)return null;let o=e.path?b[e.path]:null;return(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:P(`flex items-center font-semibold uppercase tracking-wider text-foreground/70 bg-background border-b border-border/50 sticky z-[5]`,t?`gap-2 px-4 py-2.5 text-xs top-0`:`gap-1.5 px-3 py-1.5 text-[10px] top-0`),children:[(0,Z.jsx)(_t,{className:P(`shrink-0`,t?`h-4 w-4`:`h-3 w-3`)}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.name}),o&&(0,Z.jsxs)(`span`,{className:`flex items-center gap-0.5 text-[10px] font-medium normal-case tracking-normal text-emerald-500 shrink-0`,title:`Branch: ${o}`,children:[(0,Z.jsx)(vt,{className:`h-3 w-3`}),o]}),(0,Z.jsx)(`span`,{className:`flex-1`}),e.path&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`button`,{onClick:()=>r(`/chat/new?workspace=${encodeURIComponent(e.path)}`),className:`text-muted-foreground hover:text-foreground transition-colors shrink-0`,title:n(`sidebar.newCliSession`),children:(0,Z.jsx)(Pt,{className:`h-3.5 w-3.5`})}),(0,Z.jsx)(`button`,{onClick:()=>window.open(`cursor://file/${e.path}`,`_blank`),className:`text-blue-500 hover:text-blue-400 transition-colors shrink-0`,title:n(`chat.openInCursor`),children:(0,Z.jsx)(gt,{className:`h-3 w-3`})})]})]}),i&&C(`Cursor IDE`,Et,e.ide),a&&[...e.cliByType.entries()].map(([e,t])=>C(Zn(e),Yn(e),t))]},e.name)}),h&&(0,Z.jsx)(mn,{page:h.page,totalPages:h.totalPages,total:h.total,pageSize:h.pageSize,onPageChange:f,compact:!0,className:`py-2 border-b`})]})]})]})}function sr(){let{t:e}=Y(),t=o(),[n,r]=(0,U.useState)(1),{data:i,isLoading:a}=O({queryKey:[`agent-sessions-sidebar`,n,20],queryFn:()=>B.agentSessions.list({limit:20,offset:(n-1)*20}),refetchInterval:1e4,staleTime:5e3}),s=i?.data??[],c=i?.total??0,l=Math.ceil(c/20);return(0,Z.jsxs)(`div`,{className:`flex flex-col h-full overflow-y-auto`,children:[a&&(0,Z.jsx)(Fn,{count:6}),!a&&s.length===0&&(0,Z.jsx)(`div`,{className:`p-4 text-xs text-muted-foreground text-center`,children:e(`activityTab.noAgentSessions`)}),!a&&s.length>0&&(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[s.map(e=>(0,Z.jsx)(cr,{session:e,onClick:()=>t(`/agent-sessions/${e.id}`)},e.id)),l>1&&(0,Z.jsx)(mn,{page:n,totalPages:l,total:c,pageSize:20,onPageChange:r,compact:!0,className:`py-2 border-b`})]})]})}var cr=(0,U.memo)(function({session:e,onClick:t}){let n=e.status===`running`||!e.completedAt&&e.status!==`failed`,r=e.inputTokens+e.outputTokens;return(0,Z.jsxs)(`button`,{onClick:t,className:`group flex items-center gap-1.5 w-full px-3 py-2 text-left text-xs transition-colors hover:bg-accent border-b border-border/50`,children:[n?(0,Z.jsx)(St,{className:`h-3.5 w-3.5 text-blue-500 animate-spin shrink-0`}):(0,Z.jsx)(`span`,{className:P(`h-2 w-2 rounded-full shrink-0`,tr(e.status))}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(`span`,{className:`font-medium truncate`,children:e.agentName}),e.model&&(0,Z.jsx)(`span`,{className:`text-[10px] text-muted-foreground/60 shrink-0`,children:e.model})]}),(0,Z.jsx)(`p`,{className:`text-muted-foreground truncate mt-0.5`,children:e.prompt})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-end gap-0.5 shrink-0`,children:[(0,Z.jsx)(`span`,{className:P(`text-[10px]`,er(e.status)),children:e.status}),(0,Z.jsx)(`span`,{className:`text-muted-foreground text-[10px]`,children:nr(new Date(e.startedAt).getTime())}),r>0&&(0,Z.jsx)(`span`,{className:`text-[10px] text-muted-foreground/60`,children:rr(r)})]})]})});function lr(){let{t:e}=Y(),t=o(),[n,r]=(0,U.useState)(1),{data:i,isLoading:a}=O({queryKey:[`team-sessions-sidebar`,n,20],queryFn:()=>B.teamSessions.list({limit:20,offset:(n-1)*20}),refetchInterval:1e4,staleTime:5e3}),s=i?.data??[],c=i?.total??0,l=Math.ceil(c/20);return(0,Z.jsxs)(`div`,{className:`flex flex-col h-full overflow-y-auto`,children:[a&&(0,Z.jsx)(Fn,{count:6}),!a&&s.length===0&&(0,Z.jsx)(`div`,{className:`p-4 text-xs text-muted-foreground text-center`,children:e(`activityTab.noTeamSessions`)}),!a&&s.length>0&&(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[s.map(e=>(0,Z.jsx)(ur,{session:e,onClick:()=>t(`/team-sessions/${e.id}`)},e.id)),l>1&&(0,Z.jsx)(mn,{page:n,totalPages:l,total:c,pageSize:20,onPageChange:r,compact:!0,className:`py-2 border-b`})]})]})}var ur=(0,U.memo)(function({session:e,onClick:t}){let n=e.status===`running`,r=e.inputTokens+e.outputTokens,i=e.agents?.length??0;return(0,Z.jsxs)(`button`,{onClick:t,className:`group flex items-center gap-1.5 w-full px-3 py-2 text-left text-xs transition-colors hover:bg-accent border-b border-border/50`,children:[n?(0,Z.jsx)(St,{className:`h-3.5 w-3.5 text-blue-500 animate-spin shrink-0`}):(0,Z.jsx)(`span`,{className:P(`h-2 w-2 rounded-full shrink-0`,tr(e.status))}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(`span`,{className:`font-medium truncate`,children:e.teamName}),(0,Z.jsx)(de,{variant:`outline`,className:`text-[9px] px-1 py-0 h-4 shrink-0`,children:e.strategy})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mt-0.5 text-muted-foreground`,children:[(0,Z.jsxs)(`span`,{className:`flex items-center gap-0.5`,children:[(0,Z.jsx)(Vt,{className:`h-2.5 w-2.5`}),i]}),(0,Z.jsxs)(`span`,{children:[e.totalRounds,`/`,e.maxRounds,` rounds`]}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.prompt})]})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-end gap-0.5 shrink-0`,children:[(0,Z.jsx)(`span`,{className:P(`text-[10px]`,er(e.status)),children:e.status}),(0,Z.jsx)(`span`,{className:`text-muted-foreground text-[10px]`,children:nr(new Date(e.startedAt).getTime())}),r>0&&(0,Z.jsx)(`span`,{className:`text-[10px] text-muted-foreground/60`,children:rr(r)})]})]})});function dr(){let{t:e}=Y(),t=o(),n=D(),{pendingActions:r,resolveAction:i}=fn(),{data:a}=O({queryKey:[`recent-workflow-runs`],queryFn:()=>B.workflows.getRecentRuns({page:1,pageSize:20}),refetchInterval:1e4,staleTime:5e3}),s=a?.data??[],[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(``),[f,p]=(0,U.useState)(!1),[m,h]=(0,U.useState)(null),[g,_]=(0,U.useState)(!1),[v,y]=(0,U.useState)(!0),b=e=>{l({runId:e.runId,actionId:e.actionId,prompt:e.prompt,workflowName:e.workflowName??`Workflow`,workflowId:e.workflowId}),d(``),h(null),_(!1)},x=()=>{c&&(_(!0),h(null),B.workflows.getRunSummary(c.runId,c.actionId).then(e=>h(e.summary)).catch(()=>h(`Failed to generate summary.`)).finally(()=>_(!1)))},S=async(e,t,r)=>{p(!0),i(e,t,`approved`);try{await B.workflows.approveHumanAction(e,t,r||void 0),l(null)}finally{p(!1),n.invalidateQueries({queryKey:[`recent-workflow-runs`]})}},C=async(e,t,r)=>{p(!0),i(e,t,`rejected`);try{await B.workflows.rejectHumanAction(e,t,r||void 0),l(null)}finally{p(!1),n.invalidateQueries({queryKey:[`recent-workflow-runs`]})}};return(0,Z.jsxs)(`div`,{className:`flex flex-col h-full overflow-y-auto`,children:[r.length>0&&(0,Z.jsxs)(`div`,{className:`border-b`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5 px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-amber-500 bg-amber-500/5`,children:[(0,Z.jsx)(yt,{className:`h-3 w-3`}),(0,Z.jsx)(`span`,{children:`Pending Approvals`}),(0,Z.jsx)(`span`,{className:`ml-auto`,children:r.length})]}),r.map(e=>(0,Z.jsxs)(`button`,{onClick:()=>b(e),className:`flex flex-col gap-1 px-3 py-2 border-b border-border/50 w-full text-left hover:bg-accent transition-colors`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(yt,{className:`h-3 w-3 text-amber-500 shrink-0`}),(0,Z.jsx)(`span`,{className:`text-xs font-medium truncate flex-1`,children:e.workflowName??`Workflow`}),(0,Z.jsx)(`span`,{className:`text-[10px] text-amber-500 shrink-0`,children:`review`}),(0,Z.jsx)(ft,{className:`h-3 w-3 text-muted-foreground shrink-0`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground pl-[18px] line-clamp-2`,children:e.prompt})]},`${e.runId}:${e.actionId}`))]}),s.length===0&&r.length===0?(0,Z.jsx)(`div`,{className:`p-3 text-xs text-muted-foreground text-center`,children:e(`sidebar.noRecentRuns`)}):s.map(n=>{let r=n.hasWaitingAction?`waiting action`:n.status,i=n.hasWaitingAction?`text-amber-500`:er(n.status);return(0,Z.jsxs)(`button`,{onClick:()=>t(`/workflows/${n.workflowId}/runs?run=${n.id}`),className:`group flex items-center gap-1.5 w-full px-3 py-1.5 text-left text-xs transition-colors hover:bg-accent border-b border-border/50`,children:[(0,Z.jsx)(`span`,{className:P(`h-2 w-2 rounded-full shrink-0`,n.hasWaitingAction?`bg-amber-500 animate-pulse`:tr(n.status))}),(0,Z.jsx)(`span`,{className:`font-medium truncate min-w-0 flex-1`,children:n.workflow?.name??n.workflowId.slice(0,8)}),n.status===`running`&&!n.hasWaitingAction&&(0,Z.jsx)(`span`,{role:`button`,onClick:e=>{e.stopPropagation(),B.workflows.cancelRun(n.id).catch(()=>{})},className:`text-destructive hover:text-destructive/80 transition-colors shrink-0`,title:e(`common.stopRun`),children:(0,Z.jsx)(Lt,{className:`h-3 w-3`})}),(0,Z.jsx)(`span`,{className:P(`text-[10px] shrink-0`,i),children:r}),(0,Z.jsx)(`span`,{className:`text-muted-foreground shrink-0`,children:nr(new Date(n.startedAt).getTime())})]},n.id)}),(0,Z.jsx)(F,{open:!!c,onOpenChange:e=>{e||l(null)},children:(0,Z.jsxs)(oe,{className:`sm:max-w-lg max-h-[85vh] flex flex-col`,children:[(0,Z.jsx)(me,{children:(0,Z.jsxs)(ie,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`div`,{className:`h-8 w-8 rounded-full bg-orange-500/15 flex items-center justify-center`,children:(0,Z.jsx)(Bt,{className:`h-4 w-4 text-orange-400`})}),(0,Z.jsx)(`div`,{children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[`Approval Required`,(0,Z.jsx)(de,{variant:`outline`,className:`text-[10px] border-orange-500/30 text-orange-400 font-normal`,children:c?.workflowName})]})})]})}),(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto space-y-4`,children:[(0,Z.jsxs)(`div`,{className:`rounded-md border bg-muted/30 p-3`,children:[(0,Z.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground mb-1`,children:`Instructions`}),(0,Z.jsx)(`p`,{className:`text-sm`,children:c?.prompt})]}),!m&&!g&&(0,Z.jsxs)(I,{variant:`outline`,size:`sm`,className:`gap-1.5 text-purple-400 border-purple-500/30 hover:bg-purple-500/10 hover:text-purple-300`,onClick:x,children:[(0,Z.jsx)(It,{className:`h-3.5 w-3.5`}),`Generate AI Summary`]}),g&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 py-3 justify-center text-xs text-muted-foreground rounded-md border border-purple-500/20 bg-purple-500/5`,children:[(0,Z.jsx)(St,{className:`h-3.5 w-3.5 animate-spin text-purple-400`}),`Generating summary via Cursor (gpt-5-mini)...`]}),m&&!g&&(0,Z.jsxs)(`div`,{className:`rounded-md border border-purple-500/20 bg-purple-500/5`,children:[(0,Z.jsxs)(`button`,{onClick:()=>y(!v),className:`w-full flex items-center gap-2 p-3 text-left hover:bg-purple-500/10 transition-colors rounded-t-md`,children:[(0,Z.jsx)(It,{className:`h-3.5 w-3.5 text-purple-400 shrink-0`}),(0,Z.jsx)(`span`,{className:`text-xs font-medium text-purple-400 flex-1`,children:`AI Summary`}),(0,Z.jsx)(se,{className:P(`h-3.5 w-3.5 text-purple-400 transition-transform`,v&&`rotate-180`)})]}),v&&(0,Z.jsx)(`div`,{className:`px-3 pb-3 border-t border-purple-500/10`,children:(0,Z.jsx)(`div`,{className:`text-sm text-foreground/90 whitespace-pre-wrap pt-2 leading-relaxed`,children:m})})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:`Response (optional)`}),(0,Z.jsx)(ge,{placeholder:e(`workflowRuns.responsePlaceholder`),value:u,onChange:e=>d(e.target.value),rows:3,onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&c&&(e.preventDefault(),S(c.runId,c.actionId,u.trim()))},disabled:f,className:`mt-1`})]})]}),(0,Z.jsxs)(ce,{className:`flex-row gap-2 sm:gap-2`,children:[(0,Z.jsxs)(I,{variant:`destructive`,className:`flex-1 gap-1.5`,onClick:()=>c&&C(c.runId,c.actionId,u.trim()),disabled:f,children:[(0,Z.jsx)(pe,{className:`h-3.5 w-3.5`}),`Reject`]}),(0,Z.jsxs)(I,{className:`flex-1 gap-1.5 bg-emerald-600 hover:bg-emerald-700`,onClick:()=>c&&S(c.runId,c.actionId,u.trim()),disabled:f,children:[(0,Z.jsx)(le,{className:`h-3.5 w-3.5`}),`Approve`]})]})]})})]})}function fr({activeSessionId:e,className:t,large:n}){let{t:r}=Y(),{activityTab:i,setActivityTab:a}=X(),{pendingActions:o}=fn(),{data:s}=O({queryKey:[`recent-workflow-runs`],queryFn:()=>B.workflows.getRecentRuns({page:1,pageSize:20}),refetchInterval:1e4,staleTime:5e3}),c=s?.data??[],l=c.filter(e=>e.status===`running`).length,u=c.filter(e=>e.status===`failed`).length,{data:d}=O({queryKey:[`recent-sessions`,1,10],queryFn:()=>B.chat.getRecent({page:1,pageSize:10}),refetchInterval:1e4,staleTime:5e3}),{data:f}=O({queryKey:[`agent-sessions-sidebar`,1,20],queryFn:()=>B.agentSessions.list({limit:20,offset:0}),refetchInterval:1e4,staleTime:5e3}),{data:p}=O({queryKey:[`team-sessions-sidebar`,1,20],queryFn:()=>B.teamSessions.list({limit:20,offset:0}),refetchInterval:1e4,staleTime:5e3}),m=d?.total??0,h=f?.total??0,g=p?.total??0,_=c.length,v=f?.data??[],y=p?.data??[],b=v.filter(e=>e.status===`running`||!e.completedAt&&e.status!==`failed`).length,x=v.filter(e=>e.status===`failed`).length,S=y.filter(e=>e.status===`running`).length,C=y.filter(e=>e.status===`failed`).length,w=(0,U.useMemo)(()=>{let e=[],t=r(`activityTab.workflows`),n=r(`activityTab.agents`),i=r(`activityTab.teams`);return o.length>0&&e.push({icon:yt,label:r(`activityTab.pendingApprovals`,{type:t,count:String(o.length)}),color:`amber`,onClick:()=>a(`workflows`)}),l>0&&e.push({icon:Ut,label:r(`activityTab.runningItems`,{type:t,count:String(l)}),color:`blue`,onClick:()=>a(`workflows`)}),b>0&&e.push({icon:ct,label:r(`activityTab.runningItems`,{type:n,count:String(b)}),color:`blue`,onClick:()=>a(`agents`)}),S>0&&e.push({icon:Vt,label:r(`activityTab.runningItems`,{type:i,count:String(S)}),color:`blue`,onClick:()=>a(`teams`)}),u>0&&e.push({icon:Ut,label:r(`activityTab.failedItems`,{type:t,count:String(u)}),color:`red`,onClick:()=>a(`workflows`)}),x>0&&e.push({icon:ct,label:r(`activityTab.failedItems`,{type:n,count:String(x)}),color:`red`,onClick:()=>a(`agents`)}),C>0&&e.push({icon:Vt,label:r(`activityTab.failedItems`,{type:i,count:String(C)}),color:`red`,onClick:()=>a(`teams`)}),e},[o.length,l,b,S,u,x,C,a,r]);return(0,Z.jsxs)(`div`,{className:P(`flex flex-col h-full`,t),children:[(0,Z.jsx)(ar,{items:w}),(0,Z.jsxs)(he,{value:i,onValueChange:e=>a(e),children:[(0,Z.jsxs)(fe,{variant:`line`,className:`w-full px-2 shrink-0`,children:[(0,Z.jsxs)(R,{value:`chats`,className:`gap-1 text-xs`,children:[(0,Z.jsx)(wt,{className:`h-3 w-3`}),r(`activityTab.chats`),m>0&&(0,Z.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:m})]}),(0,Z.jsxs)(R,{value:`agents`,className:`gap-1 text-xs`,children:[(0,Z.jsx)(ct,{className:`h-3 w-3`}),r(`activityTab.agents`),h>0&&(0,Z.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:h}),b>0&&(0,Z.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse`})]}),(0,Z.jsxs)(R,{value:`teams`,className:`gap-1 text-xs`,children:[(0,Z.jsx)(Vt,{className:`h-3 w-3`}),r(`activityTab.teams`),g>0&&(0,Z.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:g}),S>0&&(0,Z.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse`})]}),(0,Z.jsxs)(R,{value:`workflows`,className:`gap-1 text-xs`,children:[(0,Z.jsx)(Ut,{className:`h-3 w-3`}),r(`activityTab.workflows`),_>0&&(0,Z.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:_}),o.length>0&&(0,Z.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-amber-500 animate-pulse`})]})]}),(0,Z.jsx)(V,{value:`chats`,className:`flex-1 min-h-0`,children:(0,Z.jsx)(or,{activeSessionId:e,large:n})}),(0,Z.jsx)(V,{value:`agents`,className:`flex-1 min-h-0`,children:(0,Z.jsx)(sr,{})}),(0,Z.jsx)(V,{value:`teams`,className:`flex-1 min-h-0`,children:(0,Z.jsx)(lr,{})}),(0,Z.jsx)(V,{value:`workflows`,className:`flex-1 min-h-0`,children:(0,Z.jsx)(dr,{})})]})]})}function pr({activeSessionId:e}){let{t}=Y(),n=o(),{sessionsLimit:r,toggleSessionsPanel:i,activityTab:a,setActivityTab:s}=X(),c=Nn(),l=new Set(c),{data:u}=O({queryKey:[`recent-sessions`,1,r],queryFn:()=>B.chat.getRecent({page:1,pageSize:r}),refetchInterval:1e4,staleTime:5e3}),d=u?.data??[],{data:f}=O({queryKey:[`recent-workflow-runs`],queryFn:()=>B.workflows.getRecentRuns({page:1,pageSize:20}),refetchInterval:1e4,staleTime:5e3}),p=f?.data??[],m=p.filter(e=>e.status===`running`).length,h=p.filter(e=>e.status===`failed`).length,{data:g}=O({queryKey:[`agent-sessions-sidebar`,1,20],queryFn:()=>B.agentSessions.list({limit:20,offset:0}),refetchInterval:1e4,staleTime:5e3}),_=g?.data??[],v=_.filter(e=>e.status===`running`||!e.completedAt&&e.status!==`failed`).length,{data:y}=O({queryKey:[`team-sessions-sidebar`,1,20],queryFn:()=>B.teamSessions.list({limit:20,offset:0}),refetchInterval:1e4,staleTime:5e3}),b=y?.data??[],x=b.filter(e=>e.status===`running`).length,{pendingActions:S}=fn(),C=e=>{s(e),i()};return(0,Z.jsxs)(`div`,{className:`shrink-0 border-l w-11 flex flex-col items-center bg-background overflow-y-auto`,children:[(0,Z.jsxs)(`button`,{onClick:i,className:`relative p-2 mt-1 mb-1 text-muted-foreground hover:text-foreground transition-colors`,title:t(`sidebar.expandActivityPanel`),children:[(0,Z.jsx)(At,{className:`h-4 w-4`}),S.length>0&&(0,Z.jsx)(`span`,{className:`absolute top-1 right-1 h-2 w-2 rounded-full bg-amber-500 animate-pulse`})]}),(0,Z.jsx)(`div`,{className:`w-full border-t`}),(0,Z.jsxs)(ve,{children:[(0,Z.jsxs)(ae,{render:(0,Z.jsx)(`button`,{type:`button`}),openOnHover:!0,delay:200,closeDelay:150,onClick:()=>C(`chats`),className:P(`flex flex-col items-center gap-0.5 py-2 w-full hover:bg-accent transition-colors border-b border-border/50`,a===`chats`&&`bg-accent`),children:[(0,Z.jsx)(wt,{className:`h-3.5 w-3.5 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`text-[9px] text-muted-foreground`,children:d.length})]}),(0,Z.jsxs)(ue,{side:`left`,sideOffset:8,className:`w-64 p-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-border/50`,children:[(0,Z.jsx)(wt,{className:`h-3.5 w-3.5 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`text-sm font-medium`,children:t(`activityTab.chats`)}),(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground ml-auto`,children:d.length})]}),(0,Z.jsx)(`div`,{className:`flex flex-col max-h-48 overflow-y-auto`,children:d.slice(0,5).map(t=>{let r=e===t.sessionId,i=l.has(`${t.projectHash}/${t.sessionId}`)||t.isLive,a;return a=i?(0,Z.jsx)(St,{className:`h-3 w-3 text-blue-500 animate-spin shrink-0`}):t.source===`ide`?(0,Z.jsx)(Et,{className:`h-3 w-3 text-muted-foreground shrink-0`}):(0,Z.jsx)(Yn(t.cli),{className:`h-3 w-3 text-muted-foreground shrink-0`}),(0,Z.jsxs)(`button`,{onClick:()=>n(`/chat/${t.projectHash}/${t.sessionId}`),className:P(`flex items-center gap-1.5 px-3 py-1.5 text-xs hover:bg-accent border-b border-border/50`,r&&`bg-accent`),children:[a,(0,Z.jsx)(`span`,{className:`truncate flex-1`,children:t.name}),(0,Z.jsx)(`span`,{className:`text-muted-foreground text-[10px] shrink-0`,children:nr(t.updatedAt)})]},`${t.projectHash}-${t.sessionId}`)})})]})]}),(0,Z.jsxs)(ve,{children:[(0,Z.jsxs)(ae,{render:(0,Z.jsx)(`button`,{type:`button`}),openOnHover:!0,delay:200,closeDelay:150,onClick:()=>C(`agents`),className:P(`relative flex flex-col items-center gap-0.5 py-2 w-full hover:bg-accent transition-colors border-b border-border/50`,a===`agents`&&`bg-accent`),children:[(0,Z.jsx)(ct,{className:`h-3.5 w-3.5 text-muted-foreground`}),_.length>0&&(0,Z.jsx)(`span`,{className:`text-[9px] text-muted-foreground`,children:_.length}),v>0&&(0,Z.jsx)(`span`,{className:`absolute top-1 right-1 h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse`})]}),(0,Z.jsxs)(ue,{side:`left`,sideOffset:8,className:`w-64 p-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-border/50`,children:[(0,Z.jsx)(ct,{className:`h-3.5 w-3.5 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`text-sm font-medium`,children:t(`activityTab.agents`)}),v>0&&(0,Z.jsx)(`span`,{className:`text-[10px] text-blue-500`,children:t(`activityTab.countRunning`,{count:String(v)})})]}),(0,Z.jsx)(`div`,{className:`flex flex-col max-h-48 overflow-y-auto`,children:_.slice(0,5).map(e=>(0,Z.jsxs)(`button`,{onClick:()=>n(`/agent-sessions/${e.id}`),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs hover:bg-accent border-b border-border/50`,children:[(0,Z.jsx)(`span`,{className:P(`h-2 w-2 rounded-full shrink-0`,tr(e.status))}),(0,Z.jsx)(`span`,{className:`truncate flex-1 font-medium`,children:e.agentName}),(0,Z.jsx)(`span`,{className:P(`text-[10px] shrink-0`,er(e.status)),children:e.status})]},e.id))})]})]}),(0,Z.jsxs)(ve,{children:[(0,Z.jsxs)(ae,{render:(0,Z.jsx)(`button`,{type:`button`}),openOnHover:!0,delay:200,closeDelay:150,onClick:()=>C(`teams`),className:P(`relative flex flex-col items-center gap-0.5 py-2 w-full hover:bg-accent transition-colors border-b border-border/50`,a===`teams`&&`bg-accent`),children:[(0,Z.jsx)(Vt,{className:`h-3.5 w-3.5 text-muted-foreground`}),b.length>0&&(0,Z.jsx)(`span`,{className:`text-[9px] text-muted-foreground`,children:b.length}),x>0&&(0,Z.jsx)(`span`,{className:`absolute top-1 right-1 h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse`})]}),(0,Z.jsxs)(ue,{side:`left`,sideOffset:8,className:`w-64 p-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-border/50`,children:[(0,Z.jsx)(Vt,{className:`h-3.5 w-3.5 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`text-sm font-medium`,children:t(`activityTab.teams`)}),x>0&&(0,Z.jsx)(`span`,{className:`text-[10px] text-blue-500`,children:t(`activityTab.countRunning`,{count:String(x)})})]}),(0,Z.jsx)(`div`,{className:`flex flex-col max-h-48 overflow-y-auto`,children:b.slice(0,5).map(e=>(0,Z.jsxs)(`button`,{onClick:()=>n(`/team-sessions/${e.id}`),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs hover:bg-accent border-b border-border/50`,children:[(0,Z.jsx)(`span`,{className:P(`h-2 w-2 rounded-full shrink-0`,tr(e.status))}),(0,Z.jsx)(`span`,{className:`truncate flex-1 font-medium`,children:e.teamName}),(0,Z.jsx)(de,{variant:`outline`,className:`text-[8px] px-1 py-0 h-3.5 shrink-0`,children:e.strategy}),(0,Z.jsx)(`span`,{className:P(`text-[10px] shrink-0`,er(e.status)),children:e.status})]},e.id))})]})]}),(0,Z.jsxs)(ve,{children:[(0,Z.jsxs)(ae,{render:(0,Z.jsx)(`button`,{type:`button`}),openOnHover:!0,delay:200,closeDelay:150,onClick:()=>C(`workflows`),className:P(`relative flex flex-col items-center gap-0.5 py-2 w-full hover:bg-accent transition-colors border-b border-border/50`,a===`workflows`&&`bg-accent`),children:[(0,Z.jsx)(Ut,{className:`h-3.5 w-3.5 text-muted-foreground`}),p.length>0&&(0,Z.jsx)(`span`,{className:`text-[9px] text-muted-foreground`,children:p.length}),S.length>0&&(0,Z.jsx)(`span`,{className:`absolute top-1 right-1 h-2 w-2 rounded-full bg-amber-500 animate-pulse`}),m>0&&!S.length&&(0,Z.jsx)(`span`,{className:`absolute top-1 right-1 h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse`})]}),(0,Z.jsxs)(ue,{side:`left`,sideOffset:8,className:`w-64 p-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 border-b border-border/50`,children:[(0,Z.jsx)(Ut,{className:`h-3.5 w-3.5 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`text-sm font-medium`,children:t(`sidebar.workflowRuns`)}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5 ml-auto`,children:[m>0&&(0,Z.jsx)(`span`,{className:`text-[10px] text-blue-500`,children:t(`activityTab.countRunning`,{count:String(m)})}),h>0&&(0,Z.jsx)(`span`,{className:`text-[10px] text-destructive`,children:t(`activityTab.countFailed`,{count:String(h)})})]})]}),(0,Z.jsx)(`div`,{className:`flex flex-col max-h-48 overflow-y-auto`,children:p.slice(0,5).map(e=>(0,Z.jsxs)(`button`,{onClick:()=>n(`/workflows/${e.workflowId}/runs?run=${e.id}`),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs hover:bg-accent border-b border-border/50`,children:[(0,Z.jsx)(`span`,{className:P(`h-2 w-2 rounded-full shrink-0`,e.hasWaitingAction?`bg-amber-500 animate-pulse`:tr(e.status))}),(0,Z.jsx)(`span`,{className:`truncate flex-1 font-medium`,children:e.workflow?.name??e.workflowId.slice(0,8)}),(0,Z.jsx)(`span`,{className:P(`text-[10px] shrink-0`,e.hasWaitingAction?`text-amber-500`:er(e.status)),children:e.hasWaitingAction?`waiting`:e.status})]},e.id))})]})]})]})}function mr({activeSessionId:e}){let{t}=Y(),{sessionsPanelCollapsed:n,toggleSessionsPanel:r}=X();return n?(0,Z.jsx)(pr,{activeSessionId:e}):(0,Z.jsxs)(`div`,{className:`shrink-0 border-l w-[480px] flex flex-col`,children:[(0,Z.jsx)(`div`,{className:`flex items-center justify-end px-1 pt-1`,children:(0,Z.jsx)(`button`,{onClick:r,className:`p-1 text-muted-foreground hover:text-foreground transition-colors`,title:t(`sidebar.collapseSessions`),children:(0,Z.jsx)(jt,{className:`h-4 w-4`})})}),(0,Z.jsx)(fr,{activeSessionId:e,className:`flex-1 min-h-0`})]})}var hr={"/workflows":{preload:()=>r(()=>import(`./workflows-C9jurJiE.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),prefetch:e=>{e.prefetchQuery({queryKey:[`workflows`,1,12],queryFn:()=>B.workflows.list({page:1,pageSize:12}),staleTime:3e4}),e.prefetchQuery({queryKey:[`workflows`,`active-counts`],queryFn:()=>B.workflows.getActiveCounts(),staleTime:1e4})}},"/commands":{preload:()=>r(()=>import(`./commands-DT9K8bae.js`),__vite__mapDeps([13,1,2,14,15,16,3,4,5,7,8,17,18,19,20,21])),prefetch:e=>{e.prefetchQuery({queryKey:[`commands`,`custom`],queryFn:()=>B.commands.list({page:1,pageSize:100}),staleTime:3e4}),e.prefetchQuery({queryKey:[`commands`,`all`],queryFn:()=>B.chat.getCommands(),staleTime:3e4})}}},gr=[{to:`/dashboard`,labelKey:`nav.analytics`,icon:xt},{to:`/new`,labelKey:`nav.newChat`,icon:Ct},{to:`/chats`,labelKey:`nav.chats`,icon:Tt},{to:`/workflows`,labelKey:`nav.workflows`,icon:Ut},{to:`/agents`,labelKey:`nav.agents`,icon:ct},{to:`/memory`,labelKey:`nav.memory`,icon:lt},{to:`/credentials`,labelKey:`nav.credentials`,icon:bt},{to:`/commands`,labelKey:`nav.skillsAndCommands`,icon:Ht},{to:`/activity`,labelKey:`nav.activity`,icon:ot},{to:`/docs`,labelKey:`nav.apiDocs`,icon:st},{to:`/mcp`,labelKey:`nav.mcp`,icon:Nt},{to:`/settings`,labelKey:`nav.settings`,icon:Ft},{to:`/debug`,labelKey:`nav.debug`,icon:ut}];function _r(){let{t:e}=Y(),{sessionId:t}=p(),{sidebarCollapsed:n,toggleSidebar:r}=X(),i=X(e=>e.theme),o=X(e=>e.setTheme);sn();let s=D(),c=(0,U.useCallback)(e=>{let t=hr[e];t&&(t.preload(),t.prefetch(s))},[s]);return(0,Z.jsxs)(`div`,{className:`flex h-screen`,children:[(0,Z.jsxs)(`nav`,{className:P(`shrink-0 border-r bg-sidebar flex flex-col transition-all duration-200`,n?`w-14`:`w-48`),children:[(0,Z.jsx)(`div`,{className:P(`border-b flex items-center`,n?`justify-center p-3`:`p-4`),children:n?(0,Z.jsx)(`span`,{className:`text-sm font-bold text-sidebar-foreground`,children:`AO`}):(0,Z.jsx)(`h1`,{className:`text-sm font-bold text-sidebar-foreground`,children:`Agents Orchestrator`})}),(0,Z.jsx)(`div`,{className:P(`flex-1 space-y-1`,n?`p-1`:`p-2`),children:gr.map(t=>{let r=e(t.labelKey);return(0,Z.jsxs)(a,{to:t.to,title:n?r:void 0,onMouseEnter:()=>c(t.to),className:({isActive:e})=>P(`flex items-center gap-2 rounded-md text-sm transition-colors hover:bg-sidebar-accent`,n?`justify-center p-2`:`px-3 py-2`,e?`bg-sidebar-accent text-sidebar-accent-foreground font-medium`:`text-sidebar-foreground/70`),children:[(0,Z.jsx)(t.icon,{className:`h-4 w-4 shrink-0`}),!n&&(0,Z.jsx)(`span`,{children:r})]},t.to)})}),(0,Z.jsxs)(`div`,{className:P(`border-t space-y-1`,n?`p-1`:`p-2`),children:[(0,Z.jsx)(`div`,{className:P(`flex items-center rounded-md border bg-muted/30 p-0.5`,n?`flex-col`:`justify-center`),children:[{value:`light`,icon:Rt,labelKey:`nav.light`},{value:`dark`,icon:Dt,labelKey:`nav.dark`},{value:`system`,icon:Et,labelKey:`nav.system`}].map(({value:t,icon:n,labelKey:r})=>(0,Z.jsx)(`button`,{onClick:()=>o(t),className:P(`rounded-sm p-1.5 transition-colors`,i===t?`bg-background shadow-sm text-sidebar-foreground`:`text-sidebar-foreground/50 hover:text-sidebar-foreground/70`),title:e(r),children:(0,Z.jsx)(n,{className:`h-3.5 w-3.5`})},t))}),(0,Z.jsx)(`button`,{onClick:r,className:`flex items-center gap-2 rounded-md px-3 py-2 text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent transition-colors w-full justify-center`,title:e(n?`nav.expandSidebar`:`nav.collapseSidebar`),children:n?(0,Z.jsx)(kt,{className:`h-4 w-4`}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ot,{className:`h-4 w-4`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:e(`nav.collapse`)})]})})]})]}),(0,Z.jsx)(`main`,{className:`flex-1 overflow-auto min-w-0`,children:(0,Z.jsx)(l,{})}),(0,Z.jsx)(mr,{activeSessionId:t})]})}var vr=e(s(),1);function yr(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var br=e=>{switch(e){case`success`:return Cr;case`info`:return Tr;case`warning`:return wr;case`error`:return Er;default:return null}},xr=Array(12).fill(0),Sr=({visible:e,className:t})=>U.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},U.createElement(`div`,{className:`sonner-spinner`},xr.map((e,t)=>U.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Cr=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},U.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),wr=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},U.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Tr=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},U.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Er=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},U.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Dr=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},U.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),U.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),Or=()=>{let[e,t]=U.useState(document.hidden);return U.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},kr=1,Q=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:kr++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],U.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(jr(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||kr++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ar=(e,t)=>{let n=t?.id||kr++;return Q.addToast({title:e,...t,id:n}),n},jr=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Mr=Object.assign(Ar,{success:Q.success,info:Q.info,warning:Q.warning,error:Q.error,custom:Q.custom,message:Q.message,promise:Q.promise,dismiss:Q.dismiss,loading:Q.loading},{getHistory:()=>Q.toasts,getToasts:()=>Q.getActiveToasts()});yr(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function Nr(e){return e.label!==void 0}var Pr=3,Fr=`24px`,Ir=`16px`,Lr=4e3,Rr=356,zr=14,Br=45,Vr=200;function $(...e){return e.filter(Boolean).join(` `)}function Hr(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Ur=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:ee=`Close toast`}=e,[T,te]=U.useState(null),[E,ne]=U.useState(null),[D,re]=U.useState(!1),[O,k]=U.useState(!1),[A,j]=U.useState(!1),[M,ie]=U.useState(!1),[ae,oe]=U.useState(!1),[N,P]=U.useState(0),[se,ce]=U.useState(0),le=U.useRef(n.duration||y||Lr),ue=U.useRef(null),F=U.useRef(null),de=c===0,I=c+1<=o,L=n.type,R=n.dismissible!==!1,fe=n.className||``,pe=n.descriptionClassName||``,me=U.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),he=U.useMemo(()=>n.closeButton??p,[n.closeButton,p]),z=U.useMemo(()=>n.duration||y||Lr,[n.duration,y]),B=U.useRef(0),V=U.useRef(0),ge=U.useRef(0),_e=U.useRef(null),[ve,ye]=b.split(`-`),be=U.useMemo(()=>s.reduce((e,t,n)=>n>=me?e:e+t.height,0),[s,me]),xe=Or(),Se=n.invert||t,Ce=L===`loading`;V.current=U.useMemo(()=>me*x+be,[me,be]),U.useEffect(()=>{le.current=z},[z]),U.useEffect(()=>{re(!0)},[]),U.useEffect(()=>{let e=F.current;if(e){let t=e.getBoundingClientRect().height;return ce(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),U.useLayoutEffect(()=>{if(!D)return;let e=F.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ce(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[D,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let H=U.useCallback(()=>{k(!0),P(V.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Vr)},[n,d,a,V]);U.useEffect(()=>{if(n.promise&&L===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||xe?(()=>{if(ge.current<B.current){let e=new Date().getTime()-B.current;le.current-=e}ge.current=new Date().getTime()})():le.current!==1/0&&(B.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),H()},le.current)),()=>clearTimeout(e)},[u,i,n,L,xe,H]),U.useEffect(()=>{n.delete&&(H(),n.onDismiss==null||n.onDismiss.call(n,n))},[H,n.delete]);function we(){return w?.loading?U.createElement(`div`,{className:$(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":L===`loading`},w.loading):U.createElement(Sr,{className:$(C?.loader,n?.classNames?.loader),visible:L===`loading`})}let Te=n.icon||w?.[L]||br(L);return U.createElement(`li`,{tabIndex:0,ref:F,className:$(_,fe,C?.toast,n?.classNames?.toast,C?.default,C?.[L],n?.classNames?.[L]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":D,"data-promise":!!n.promise,"data-swiped":ae,"data-removed":O,"data-visible":I,"data-y-position":ve,"data-x-position":ye,"data-index":c,"data-front":de,"data-swiping":A,"data-dismissible":R,"data-type":L,"data-invert":Se,"data-swipe-out":M,"data-swipe-direction":E,"data-expanded":!!(u||S&&D),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${O?N:V.current}px`,"--initial-height":S?`auto`:`${se}px`,...m,...n.style},onDragEnd:()=>{j(!1),te(null),_e.current=null},onPointerDown:e=>{e.button!==2&&(Ce||!R||(ue.current=new Date,P(V.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(j(!0),_e.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(M||!R)return;_e.current=null;let e=Number(F.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(F.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ue.current?.getTime(),i=T===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=Br||a>.11){P(V.current),n.onDismiss==null||n.onDismiss.call(n,n),ne(T===`x`?e>0?`right`:`left`:t>0?`down`:`up`),H(),ie(!0);return}else{var o,s;(o=F.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=F.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}oe(!1),j(!1),te(null)},onPointerMove:t=>{var n,r;if(!_e.current||!R||window.getSelection()?.toString().length>0)return;let i=t.clientY-_e.current.y,a=t.clientX-_e.current.x,o=e.swipeDirections??Hr(b);!T&&(Math.abs(a)>1||Math.abs(i)>1)&&te(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(T===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(T===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&oe(!0),(n=F.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=F.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},he&&!n.jsx&&L!==`loading`?U.createElement(`button`,{"aria-label":ee,"data-disabled":Ce,"data-close-button":!0,onClick:Ce||!R?()=>{}:()=>{H(),n.onDismiss==null||n.onDismiss.call(n,n)},className:$(C?.closeButton,n?.classNames?.closeButton)},w?.close??Dr):null,(L||n.icon||n.promise)&&n.icon!==null&&(w?.[L]!==null||n.icon)?U.createElement(`div`,{"data-icon":``,className:$(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||we():null,n.type===`loading`?null:Te):null,U.createElement(`div`,{"data-content":``,className:$(C?.content,n?.classNames?.content)},U.createElement(`div`,{"data-title":``,className:$(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?U.createElement(`div`,{"data-description":``,className:$(v,pe,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),U.isValidElement(n.cancel)?n.cancel:n.cancel&&Nr(n.cancel)?U.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{Nr(n.cancel)&&R&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),H())},className:$(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,U.isValidElement(n.action)?n.action:n.action&&Nr(n.action)?U.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{Nr(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&H())},className:$(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Wr(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function Gr(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?Ir:Fr;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var Kr=U.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=Pr,toastOptions:g,dir:_=Wr(),gap:v=zr,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=U.useState([]),C=U.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=U.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[ee,T]=U.useState([]),[te,E]=U.useState(!1),[ne,D]=U.useState(!1),[re,O]=U.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),k=U.useRef(null),A=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),j=U.useRef(null),M=U.useRef(!1),ie=U.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||Q.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return U.useEffect(()=>Q.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{vr.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),U.useEffect(()=>{if(d!==`system`){O(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?O(`dark`):O(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{O(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{O(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),U.useEffect(()=>{x.length<=1&&E(!1)},[x]),U.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;E(!0),(t=k.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===k.current||k.current?.contains(document.activeElement))&&E(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),U.useEffect(()=>{if(k.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,M.current=!1)}},[k.current]),U.createElement(`section`,{ref:t,"aria-label":`${b} ${A}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?U.createElement(`ol`,{key:t,dir:_===`auto`?Wr():_,tabIndex:-1,ref:k,className:c,"data-sonner-toaster":!0,"data-sonner-theme":re,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${ee[0]?.height||0}px`,"--width":`${Rr}px`,"--gap":`${v}px`,...m,...Gr(l,u)},onBlur:e=>{M.current&&!e.currentTarget.contains(e.relatedTarget)&&(M.current=!1,j.current&&=(j.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M.current||(M.current=!0,j.current=e.relatedTarget)},onMouseEnter:()=>E(!0),onMouseMove:()=>E(!0),onMouseLeave:()=>{ne||E(!1)},onDragEnd:()=>E(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||D(!0)},onPointerUp:()=>D(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>U.createElement(Ur,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:ne,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:ie,toasts:C.filter(e=>e.position==n.position),heights:ee.filter(e=>e.position==n.position),setHeights:T,expandByDefault:o,gap:v,expanded:te,swipeDirections:e.swipeDirections}))):null}))}),qr=(0,U.lazy)(()=>r(()=>import(`./new-chat-DtMw6FMg.js`).then(e=>({default:e.NewChat})),__vite__mapDeps([22,1,2,3,4,5,8]))),Jr=(0,U.lazy)(()=>r(()=>import(`./dashboard-OfnNUjFX.js`).then(e=>({default:e.Dashboard})),__vite__mapDeps([23,1,2,3,4,5,8,24,25,26,27]))),Yr=(0,U.lazy)(()=>r(()=>import(`./workflows-C9jurJiE.js`).then(e=>({default:e.Workflows})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),Xr=(0,U.lazy)(()=>r(()=>import(`./workflow-edit-D0FNyl64.js`).then(e=>({default:e.WorkflowEdit})),__vite__mapDeps([28,1,2,14,15,3,4,5,6,7,8,18,29,30,31,11,20,32,21,33]))),Zr=(0,U.lazy)(()=>r(()=>import(`./workflow-runs-CPVvaVzN.js`).then(e=>({default:e.WorkflowRuns})),__vite__mapDeps([34,1,2,3,4,5,7,18,25,26,29,30,12,21]))),Qr=(0,U.lazy)(()=>r(()=>import(`./activity-feed-D_eonDKG.js`).then(e=>({default:e.ActivityFeed})),__vite__mapDeps([35,1,2,3,4,5]))),$r=(0,U.lazy)(()=>r(()=>import(`./chats-64IReeGV.js`).then(e=>({default:e.Chats})),__vite__mapDeps([36,1,2,3,4,5,8]))),ei=(0,U.lazy)(()=>r(()=>import(`./chat-sessions-CaCaK_PC.js`).then(e=>({default:e.ChatSessions})),__vite__mapDeps([37,1,2,3,4,5,8,21]))),ti=(0,U.lazy)(()=>r(()=>import(`./chat-CQvfLy7Y.js`).then(e=>({default:e.Chat})),__vite__mapDeps([38,1,2,39,3,4,5,7,40,19,33,14,15,16,8,17,41,20]))),ni=(0,U.lazy)(()=>r(()=>import(`./chat-new-BOtDuYij.js`).then(e=>({default:e.ChatNew})),__vite__mapDeps([42,1,2,39,3,4,5,7,40,19,33,8]))),ri=(0,U.lazy)(()=>r(()=>import(`./credentials-DC-HOVxW.js`).then(e=>({default:e.Credentials})),__vite__mapDeps([43,1,2,3,4,5,8]))),ii=(0,U.lazy)(()=>r(()=>import(`./commands-DT9K8bae.js`).then(e=>({default:e.Commands})),__vite__mapDeps([13,1,2,14,15,16,3,4,5,7,8,17,18,19,20,21]))),ai=(0,U.lazy)(()=>r(()=>import(`./api-docs-BQzn4-6U.js`).then(e=>({default:e.ApiDocs})),__vite__mapDeps([44,1,2]))),oi=(0,U.lazy)(()=>r(()=>import(`./mcp-setup-BfMdYdsI.js`).then(e=>({default:e.McpSetup})),__vite__mapDeps([45,1,2,3,4,5,8,46,9,30,32,21]))),si=(0,U.lazy)(()=>r(()=>import(`./settings-Auyn4Z5T.js`).then(e=>({default:e.Settings})),__vite__mapDeps([47,2,1,3,4,5,8,48,25,26,30,49,21,50]))),ci=(0,U.lazy)(()=>r(()=>import(`./debug-Et9rgBM8.js`).then(e=>({default:e.Debug})),__vite__mapDeps([51,2,1,3,4,5,8,52,49]))),li=(0,U.lazy)(()=>r(()=>import(`./agents-Av7w2wHE.js`).then(e=>({default:e.Agents})),__vite__mapDeps([53,1,2,3,4,5,8,46,54,55,56,30,10,12,32,27]))),ui=(0,U.lazy)(()=>r(()=>import(`./agent-edit-CblZItU5.js`).then(e=>({default:e.AgentEdit})),__vite__mapDeps([57,1,2,14,15,3,4,5,7,8,46,18,48,58,55,52,56,17,30,20,21,27]))),di=(0,U.lazy)(()=>r(()=>import(`./team-edit-DO-RX3lC.js`).then(e=>({default:e.TeamEdit})),__vite__mapDeps([59,1,2,3,4,5,7,8,46,18,54,60,31,11,20]))),fi=(0,U.lazy)(()=>r(()=>import(`./agent-use-F4pOt3KJ.js`).then(e=>({default:e.AgentUse})),__vite__mapDeps([61,1,2,40,3,4,5,7,19,33,8,41,18,56,10,62,27]))),pi=(0,U.lazy)(()=>r(()=>import(`./team-use-BfNvsFcO.js`).then(e=>({default:e.TeamUse})),__vite__mapDeps([63,1,2,40,3,4,5,7,19,33,8,18,60,10,62,12]))),mi=(0,U.lazy)(()=>r(()=>import(`./team-sessions-DSw8MTtZ.js`).then(e=>({default:e.TeamSessions})),__vite__mapDeps([64,1,2,3,4,5,18,24,65,12]))),hi=(0,U.lazy)(()=>r(()=>import(`./agent-sessions-COpCcffa.js`).then(e=>({default:e.AgentSessions})),__vite__mapDeps([66,1,2,3,4,5,18,24,65,12,21]))),gi=(0,U.lazy)(()=>r(()=>import(`./memory-DAQ474-p.js`).then(e=>({default:e.Memory})),__vite__mapDeps([67,1,2,3,4,5,8,46,48,25,58,30,49,32]))),_i=new ke({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}});ze(_i),(0,Ae.createRoot)(document.getElementById(`root`)).render((0,Z.jsx)(U.StrictMode,{children:(0,Z.jsxs)(te,{client:_i,children:[(0,Z.jsx)(c,{children:(0,Z.jsx)(U.Suspense,{fallback:(0,Z.jsx)(Kn,{}),children:(0,Z.jsxs)(n,{children:[(0,Z.jsx)(d,{path:`/`,element:(0,Z.jsx)(t,{to:`/dashboard`,replace:!0})}),(0,Z.jsxs)(d,{element:(0,Z.jsx)(_r,{}),children:[(0,Z.jsx)(d,{path:`/new`,element:(0,Z.jsx)(qr,{})}),(0,Z.jsx)(d,{path:`/dashboard`,element:(0,Z.jsx)(Jr,{})}),(0,Z.jsx)(d,{path:`/workflows`,element:(0,Z.jsx)(Yr,{})}),(0,Z.jsx)(d,{path:`/workflows/new`,element:(0,Z.jsx)(Xr,{})}),(0,Z.jsx)(d,{path:`/workflows/:id`,element:(0,Z.jsx)(Xr,{})}),(0,Z.jsx)(d,{path:`/workflows/:id/runs`,element:(0,Z.jsx)(Zr,{})}),(0,Z.jsx)(d,{path:`/credentials`,element:(0,Z.jsx)(ri,{})}),(0,Z.jsx)(d,{path:`/commands`,element:(0,Z.jsx)(ii,{})}),(0,Z.jsx)(d,{path:`/activity`,element:(0,Z.jsx)(Qr,{})}),(0,Z.jsx)(d,{path:`/docs`,element:(0,Z.jsx)(ai,{})}),(0,Z.jsx)(d,{path:`/mcp`,element:(0,Z.jsx)(oi,{})}),(0,Z.jsx)(d,{path:`/agents`,element:(0,Z.jsx)(li,{})}),(0,Z.jsx)(d,{path:`/agents/new`,element:(0,Z.jsx)(ui,{})}),(0,Z.jsx)(d,{path:`/agents/:id`,element:(0,Z.jsx)(ui,{})}),(0,Z.jsx)(d,{path:`/agents/:id/use`,element:(0,Z.jsx)(fi,{})}),(0,Z.jsx)(d,{path:`/agents/:id/use/:sessionId`,element:(0,Z.jsx)(fi,{})}),(0,Z.jsx)(d,{path:`/agents/teams/new`,element:(0,Z.jsx)(di,{})}),(0,Z.jsx)(d,{path:`/agents/teams/:id`,element:(0,Z.jsx)(di,{})}),(0,Z.jsx)(d,{path:`/agents/teams/:id/use`,element:(0,Z.jsx)(pi,{})}),(0,Z.jsx)(d,{path:`/agents/teams/:id/use/:sessionId`,element:(0,Z.jsx)(pi,{})}),(0,Z.jsx)(d,{path:`/team-sessions`,element:(0,Z.jsx)(mi,{})}),(0,Z.jsx)(d,{path:`/team-sessions/:id`,element:(0,Z.jsx)(mi,{})}),(0,Z.jsx)(d,{path:`/agent-sessions`,element:(0,Z.jsx)(hi,{})}),(0,Z.jsx)(d,{path:`/agent-sessions/:id`,element:(0,Z.jsx)(hi,{})}),(0,Z.jsx)(d,{path:`/memory`,element:(0,Z.jsx)(gi,{})}),(0,Z.jsx)(d,{path:`/settings`,element:(0,Z.jsx)(si,{})}),(0,Z.jsx)(d,{path:`/debug`,element:(0,Z.jsx)(ci,{})}),(0,Z.jsx)(d,{path:`/chats`,element:(0,Z.jsx)($r,{})}),(0,Z.jsx)(d,{path:`/chat/new`,element:(0,Z.jsx)(ni,{})}),(0,Z.jsx)(d,{path:`/chat/:projectHash`,element:(0,Z.jsx)(ei,{})}),(0,Z.jsx)(d,{path:`/chat/:projectHash/:sessionId`,element:(0,Z.jsx)(ti,{})})]}),(0,Z.jsx)(d,{path:`*`,element:(0,Z.jsx)(t,{to:`/dashboard`,replace:!0})})]})})}),(0,Z.jsx)(Kr,{richColors:!0,position:`bottom-right`,closeButton:!0,toastOptions:{style:{background:`rgba(24, 24, 27, 0.75)`,backdropFilter:`blur(8px)`,border:`1px solid rgba(255, 255, 255, 0.1)`,color:`#fff`,padding:`8px 12px`}}})]})}));export{Lt as A,vt as B,X as C,Vt as D,Ht as E,Et as F,lt as G,gt as H,wt as I,ot as J,ct as K,Ct as L,Pt as M,Nt as N,Bt as O,Mt as P,St as R,ln as S,Ut as T,ht as U,_t as V,ft as W,at as X,it as Y,Te as Z,kn as _,Wn as a,pn as b,zn as c,In as d,Vn as f,Mn as g,Bn as h,Hn as i,It as j,zt as k,Rn as l,Gn as m,Yn as n,Pn as o,Un as p,st as q,Zn as r,qn as s,Mr as t,Ln as u,mn as v,Y as w,un as x,dn as y,bt as z};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{h as t,t as n}from"./vendor-react-BJ8SIkmN.js";import{r,t as i}from"./useQuery-DvovkaPT.js";import{t as a}from"./useMutation-BlOHt3MR.js";import{A as o,B as s,D as c,E as l,F as u,I as d,J as f,L as p,N as m,O as h,P as g,T as ee,U as _,V as v,a as y,c as b,d as x,i as S,k as te,l as C,n as w,o as T,q as E,r as D,s as O,t as ne,u as k,w as A,z as j}from"./src-DUhGoAQb.js";import{t as M}from"./copy-C87mjn_Y.js";import{t as N}from"./globe-fwFSeXZn.js";import{t as P}from"./search-Ww0msJQz.js";import{t as F}from"./terminal-CIapYonS.js";import{H as I,M as L,N as R,P as z,V as B,W as V,k as H,w as U}from"./index-dc8HGqTp.js";var W=u(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),G=e(t(),1),K=n();function q({value:e,onChange:t,keyPlaceholder:n=`Key`,valuePlaceholder:r=`Value`}){let i=Object.entries(e),a=(n,r)=>{let i={};for(let[t,a]of Object.entries(e))i[t===n?r:t]=a;t(i)},o=(n,r)=>{t({...e,[n]:r})},s=n=>{let r={...e};delete r[n],t(r)};return(0,K.jsxs)(`div`,{className:`space-y-1.5`,children:[i.map(([e,t])=>(0,K.jsxs)(`div`,{className:`flex gap-1.5 items-center`,children:[(0,K.jsx)(A,{className:`flex-1 h-8 text-xs font-mono`,placeholder:n,value:e,onChange:t=>a(e,t.target.value)}),(0,K.jsx)(A,{className:`flex-1 h-8 text-xs font-mono`,placeholder:r,value:t,onChange:t=>o(e,t.target.value)}),(0,K.jsx)(v,{type:`button`,variant:`ghost`,size:`icon-xs`,onClick:()=>s(e),children:(0,K.jsx)(H,{className:`h-3.5 w-3.5 text-muted-foreground`})})]},e)),(0,K.jsxs)(v,{type:`button`,variant:`outline`,size:`sm`,className:`text-xs h-7`,onClick:()=>{let n=0,r=``;for(;r===``||r in e;)r=`KEY_${n++}`;t({...e,[r]:``})},children:[(0,K.jsx)(L,{className:`h-3 w-3 mr-1`}),`Add`]})]})}function re(){let{t:e}=U(),{data:t,isLoading:n}=i({queryKey:[`mcp-clis`],queryFn:()=>E.mcpConfigs.detectClis()}),r=t?.clis.filter(e=>e.detected)??[];return n?(0,K.jsx)(`div`,{className:`space-y-2 pt-4`,children:Array.from({length:3}).map((e,t)=>(0,K.jsx)(`div`,{className:`h-10 bg-muted animate-pulse rounded-md`},t))}):r.length===0?(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground py-8 text-center`,children:e(`mcp.noConfigFiles`)}):(0,K.jsxs)(w,{defaultValue:r[0].id,className:`pt-2`,children:[(0,K.jsx)(S,{variant:`line`,children:r.map(e=>(0,K.jsx)(y,{value:e.id,children:e.label},e.id))}),r.map(e=>(0,K.jsx)(D,{value:e.id,children:(0,K.jsx)(J,{cli:e})},e.id))]})}function J({cli:e}){let{t}=U(),n=r(),{data:o,isLoading:s}=i({queryKey:[`mcp-servers`,e.id],queryFn:()=>E.mcpConfigs.getServers(e.id)}),c=a({mutationFn:({name:t,projectPath:n})=>E.mcpConfigs.deleteServer(e.id,t,n),onSuccess:()=>n.invalidateQueries({queryKey:[`mcp-servers`,e.id]})}),[l,u]=(0,G.useState)(!1),[d,f]=(0,G.useState)(null),p=e=>{f(e?{name:``,entry:{command:``,args:[]},projectPath:e}:null),u(!0)},m=(e,t,n)=>{f({name:e,entry:t,projectPath:n}),u(!0)},h=(e,n)=>{confirm(t(`mcp.deleteConfirm`,{name:e}))&&c.mutate({name:e,projectPath:n})};if(s)return(0,K.jsx)(`div`,{className:`space-y-2 pt-4`,children:Array.from({length:3}).map((e,t)=>(0,K.jsx)(`div`,{className:`h-10 bg-muted animate-pulse rounded-md`},t))});if(e.id===`claude-code`){let n=o?.projects??{};return(0,K.jsxs)(`div`,{className:`pt-4 space-y-4`,children:[(0,K.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,K.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[t(`mcp.serversPerProject`),` `,(0,K.jsx)(`code`,{className:`text-xs bg-muted px-1 rounded`,children:`~/.claude.json`})]})}),Object.keys(n).length===0&&(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground text-center py-8`,children:t(`mcp.noServersProject`)}),Object.entries(n).map(([e,t])=>(0,K.jsx)(Y,{projectPath:e,servers:t,onEdit:(t,n)=>m(t,n,e),onDelete:t=>h(t,e),onAdd:()=>p(e)},e)),(0,K.jsx)(Z,{open:l,onOpenChange:u,cliId:e.id,initialName:d?.name??``,initialEntry:d?.entry,projectPath:d?.projectPath,isClaudeCode:!0})]})}let g=o?.servers??{};return(0,K.jsxs)(`div`,{className:`pt-4 space-y-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t(`mcp.serverCount`,{count:Object.keys(g).length})}),(0,K.jsxs)(v,{size:`sm`,className:`text-xs h-7`,onClick:()=>p(),children:[(0,K.jsx)(L,{className:`h-3 w-3 mr-1`}),t(`mcp.addMcpServer`)]})]}),(0,K.jsx)(X,{servers:g,onEdit:(e,t)=>m(e,t),onDelete:e=>h(e)}),(0,K.jsx)(Z,{open:l,onOpenChange:u,cliId:e.id,initialName:d?.name??``,initialEntry:d?.entry})]})}function Y({projectPath:e,servers:t,onEdit:n,onDelete:r,onAdd:i}){let{t:a}=U(),[o,s]=(0,G.useState)(!0),c=e.split(`/`).filter(Boolean).slice(-2).join(`/`);return(0,K.jsxs)(`div`,{className:`border rounded-md`,children:[(0,K.jsxs)(`button`,{onClick:()=>s(!o),className:`w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-muted/50 transition-colors`,children:[o?(0,K.jsx)(m,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}):(0,K.jsx)(V,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,K.jsx)(B,{className:`h-3.5 w-3.5 text-muted-foreground`}),(0,K.jsx)(`span`,{className:`text-sm font-medium truncate`,children:c}),(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground truncate hidden sm:inline`,children:e}),(0,K.jsx)(_,{variant:`secondary`,className:`ml-auto text-[10px]`,children:Object.keys(t).length})]}),o&&(0,K.jsxs)(`div`,{className:`px-3 pb-3 pt-1 border-t space-y-2`,children:[(0,K.jsx)(`div`,{className:`flex justify-end`,children:(0,K.jsxs)(v,{size:`sm`,variant:`outline`,className:`text-xs h-7`,onClick:i,children:[(0,K.jsx)(L,{className:`h-3 w-3 mr-1`}),a(`mcp.add`)]})}),(0,K.jsx)(X,{servers:t,onEdit:n,onDelete:r})]})]})}function X({servers:e,onEdit:t,onDelete:n}){let{t:r}=U();return Object.keys(e).length===0?(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground text-center py-4`,children:r(`mcp.noServers`)}):(0,K.jsxs)(T,{children:[(0,K.jsx)(k,{children:(0,K.jsxs)(x,{children:[(0,K.jsx)(C,{className:`text-xs`,children:r(`mcp.tableHeaderName`)}),(0,K.jsx)(C,{className:`text-xs`,children:r(`mcp.tableHeaderType`)}),(0,K.jsx)(C,{className:`text-xs`,children:r(`mcp.tableHeaderCommand`)}),(0,K.jsx)(C,{className:`text-xs w-[80px]`,children:r(`mcp.tableHeaderActions`)})]})}),(0,K.jsx)(O,{children:Object.entries(e).map(([e,r])=>{let i=f(r);return(0,K.jsxs)(x,{children:[(0,K.jsx)(b,{className:`font-mono text-xs`,children:e}),(0,K.jsx)(b,{children:(0,K.jsxs)(_,{variant:`outline`,className:`text-[10px] gap-1`,children:[i?(0,K.jsx)(N,{className:`h-3 w-3`}):(0,K.jsx)(F,{className:`h-3 w-3`}),i?`http`:`stdio`]})}),(0,K.jsx)(b,{className:`font-mono text-xs text-muted-foreground truncate max-w-[300px]`,children:i?r.url:`${r.command} ${(r.args??[]).join(` `)}`}),(0,K.jsx)(b,{children:(0,K.jsxs)(`div`,{className:`flex gap-1`,children:[(0,K.jsx)(v,{variant:`ghost`,size:`icon-xs`,onClick:()=>t(e,r),children:(0,K.jsx)(z,{className:`h-3.5 w-3.5`})}),(0,K.jsx)(v,{variant:`ghost`,size:`icon-xs`,onClick:()=>n(e),children:(0,K.jsx)(H,{className:`h-3.5 w-3.5 text-destructive`})})]})})]},e)})})]})}function Z({open:e,onOpenChange:t,cliId:n,initialName:i,initialEntry:s,projectPath:u,isClaudeCode:d}){let{t:p}=U(),m=!!i,g=r(),[_,y]=(0,G.useState)(i),[b,x]=(0,G.useState)(s&&f(s)?`http`:`stdio`),[S,C]=(0,G.useState)(s?.command??``),[w,T]=(0,G.useState)((s?.args??[]).join(`
|
|
2
|
-
`)),[D,O]=(0,G.useState)(s?.env??{}),[k,j]=(0,G.useState)(s?.url??``),[M,P]=(0,G.useState)(s?.headers??{}),[I,L]=(0,G.useState)(u??``),R=()=>{y(i),x(s&&f(s)?`http`:`stdio`),C(s?.command??``),T((s?.args??[]).join(`
|
|
3
|
-
`)),O(s?.env??{}),j(s?.url??``),P(s?.headers??{}),L(u??``)},z=e=>{e&&R(),t(e)},B=a({mutationFn:()=>{let e=b===`http`?{url:k,...Object.keys(M).length>0?{headers:M}:{}}:{command:S,args:w.split(`
|
|
4
|
-
`).map(e=>e.trim()).filter(Boolean),...Object.keys(D).length>0?{env:D}:{}};return d&&(e.projectPath=I,b===`stdio`&&(e.type=`stdio`)),E.mcpConfigs.putServer(n,_,e)},onSuccess:()=>{g.invalidateQueries({queryKey:[`mcp-servers`,n]}),t(!1)}}),V=_.trim()!==``&&(b===`http`?k.trim()!==``:S.trim()!==``)&&(!d||I.trim()!==``),H;return H=B.isPending?p(`common.saving`):p(m?`common.update`:`mcp.add`),(0,K.jsx)(ee,{open:e,onOpenChange:z,children:(0,K.jsxs)(c,{className:`max-w-lg`,children:[(0,K.jsx)(te,{children:(0,K.jsx)(o,{children:p(m?`mcp.editMcpServer`:`mcp.addMcpServer`)})}),(0,K.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`text-xs font-medium mb-1 block`,children:p(`mcp.serverName`)}),(0,K.jsx)(A,{placeholder:`my-mcp-server`,value:_,onChange:e=>y(e.target.value),disabled:m,className:`font-mono text-sm`})]}),d&&(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`text-xs font-medium mb-1 block`,children:p(`mcp.projectPath`)}),(0,K.jsx)(A,{placeholder:`/Users/me/my-project`,value:I,onChange:e=>L(e.target.value),disabled:m,className:`font-mono text-sm`})]}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`text-xs font-medium mb-1 block`,children:p(`mcp.transport`)}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsxs)(v,{type:`button`,variant:b===`stdio`?`default`:`outline`,size:`sm`,className:`text-xs`,onClick:()=>x(`stdio`),children:[(0,K.jsx)(F,{className:`h-3 w-3 mr-1`}),`stdio`]}),(0,K.jsxs)(v,{type:`button`,variant:b===`http`?`default`:`outline`,size:`sm`,className:`text-xs`,onClick:()=>x(`http`),children:[(0,K.jsx)(N,{className:`h-3 w-3 mr-1`}),`http`]})]})]}),b===`stdio`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`text-xs font-medium mb-1 block`,children:p(`mcp.command`)}),(0,K.jsx)(A,{placeholder:`npx`,value:S,onChange:e=>C(e.target.value),className:`font-mono text-sm`})]}),(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`label`,{className:`text-xs font-medium mb-1 block`,children:[p(`mcp.arguments`),` `,(0,K.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:p(`mcp.onePerLine`)})]}),(0,K.jsx)(ne,{placeholder:`-y
|
|
5
|
-
@namespace/server@latest`,value:w,onChange:e=>T(e.target.value),className:`font-mono text-sm min-h-[80px]`})]}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`text-xs font-medium mb-1 block`,children:p(`mcp.envVars`)}),(0,K.jsx)(q,{value:D,onChange:O,keyPlaceholder:`ENV_VAR`,valuePlaceholder:`value`})]})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`text-xs font-medium mb-1 block`,children:`URL`}),(0,K.jsx)(A,{placeholder:`https://mcp.example.com/mcp`,value:k,onChange:e=>j(e.target.value),className:`font-mono text-sm`})]}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`text-xs font-medium mb-1 block`,children:p(`credentials.headers`)}),(0,K.jsx)(q,{value:M,onChange:P,keyPlaceholder:`Header-Name`,valuePlaceholder:`value`})]})]})]}),(0,K.jsxs)(h,{children:[(0,K.jsx)(l,{children:(0,K.jsx)(v,{variant:`outline`,size:`sm`,children:p(`common.cancel`)})}),(0,K.jsx)(v,{size:`sm`,disabled:!V||B.isPending,onClick:()=>B.mutate(),children:H})]})]})})}var Q=`${window.location.protocol}//${window.location.hostname}:3001/mcp`;function $({value:e,label:t}){let[n,r]=(0,G.useState)(!1);return(0,K.jsxs)(`div`,{className:`relative group`,children:[t&&(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground mb-1`,children:t}),(0,K.jsx)(`pre`,{className:`bg-muted rounded-md p-3 pr-10 text-sm overflow-x-auto whitespace-pre-wrap break-all`,children:e}),(0,K.jsx)(v,{size:`icon`,variant:`ghost`,className:`absolute top-1 right-1 h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity`,onClick:()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)},children:n?(0,K.jsx)(g,{className:`h-3.5 w-3.5 text-green-500`}):(0,K.jsx)(M,{className:`h-3.5 w-3.5`})})]})}var ie={GET:`bg-blue-500/10 text-blue-600 dark:text-blue-400`,POST:`bg-green-500/10 text-green-600 dark:text-green-400`,PUT:`bg-amber-500/10 text-amber-600 dark:text-amber-400`,PATCH:`bg-orange-500/10 text-orange-600 dark:text-orange-400`,DELETE:`bg-red-500/10 text-red-600 dark:text-red-400`};function ae({tool:e}){let{t}=U(),[n,r]=(0,G.useState)(!1),i=Object.keys(e.inputSchema.properties??{}),a=new Set(e.inputSchema.required??[]);return(0,K.jsxs)(`div`,{className:`border rounded-md`,children:[(0,K.jsxs)(`button`,{onClick:()=>r(!n),className:`w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-muted/50 transition-colors`,children:[n?(0,K.jsx)(m,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}):(0,K.jsx)(V,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,K.jsx)(`span`,{className:`text-[10px] font-mono font-bold px-1.5 py-0.5 rounded ${ie[e.method]??`bg-muted`}`,children:e.method}),(0,K.jsx)(`code`,{className:`text-xs text-muted-foreground font-mono truncate`,children:e.path}),(0,K.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground shrink-0`,children:e.name})]}),n&&(0,K.jsxs)(`div`,{className:`px-3 pb-3 pt-1 border-t space-y-2`,children:[(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.description}),i.length>0&&(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-xs font-medium mb-1`,children:t(`mcp.parameters`)}),(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:i.map(e=>(0,K.jsxs)(_,{variant:a.has(e)?`default`:`outline`,className:`text-[10px] font-mono`,children:[e,a.has(e)&&` *`]},e))})]})]})]})}var oe=e=>JSON.stringify({mcpServers:{"agents-orchestrator":{url:e}}},null,2),se=e=>JSON.stringify({mcpServers:{"agents-orchestrator":{command:`npx`,args:[`mcp-remote`,e]}}},null,2);function ce(){let{t:e}=U();return(0,K.jsxs)(`div`,{className:`p-6 max-w-4xl`,children:[(0,K.jsxs)(`div`,{className:`mb-6`,children:[(0,K.jsx)(`h1`,{className:`text-2xl font-bold mb-1`,children:`MCP`}),(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`mcp.description`)})]}),(0,K.jsxs)(w,{defaultValue:`manage`,children:[(0,K.jsxs)(S,{children:[(0,K.jsx)(y,{value:`manage`,children:e(`mcp.manageMcps`)}),(0,K.jsx)(y,{value:`setup`,children:e(`mcp.mcpSetup`)})]}),(0,K.jsx)(D,{value:`manage`,children:(0,K.jsx)(re,{})}),(0,K.jsx)(D,{value:`setup`,children:(0,K.jsx)(le,{})})]})]})}function le(){let{t:e}=U(),[t,n]=(0,G.useState)(``),{data:r=[],isLoading:a}=i({queryKey:[`mcp-tools`],queryFn:async()=>{let e=await fetch(`/api/mcp/tools`);if(!e.ok)throw Error(`Failed to fetch tools`);return e.json()}}),o=t?r.filter(e=>e.name.toLowerCase().includes(t.toLowerCase())||e.path.toLowerCase().includes(t.toLowerCase())||e.method.toLowerCase().includes(t.toLowerCase())):r,c=o.reduce((e,t)=>{let n=t.path.split(`/`).filter(Boolean)[0]??`other`;return e[n]||(e[n]=[]),e[n].push(t),e},{});return(0,K.jsxs)(`div`,{className:`pt-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-4`,children:[(0,K.jsx)(_,{variant:`secondary`,children:e(`mcp.streamableHttp`)}),(0,K.jsx)(_,{variant:`outline`,children:e(`mcp.tools`,{count:r.length})})]}),(0,K.jsxs)(d,{className:`mb-6`,children:[(0,K.jsx)(j,{children:(0,K.jsxs)(s,{className:`flex items-center gap-2 text-base`,children:[(0,K.jsx)(W,{className:`h-4 w-4`}),e(`mcp.endpoint`)]})}),(0,K.jsxs)(p,{children:[(0,K.jsx)($,{value:Q}),(0,K.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-2`,children:[`Supports POST (tool calls), GET (SSE streaming), and DELETE (session teardown). Sessions are managed via the`,` `,(0,K.jsx)(`code`,{className:`text-xs bg-muted px-1 rounded`,children:`mcp-session-id`}),` `,`header.`]})]})]}),(0,K.jsx)(`h2`,{className:`text-lg font-semibold mb-3`,children:e(`mcp.quickSetup`)}),(0,K.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3 mb-6`,children:[(0,K.jsxs)(d,{children:[(0,K.jsx)(j,{children:(0,K.jsxs)(s,{className:`flex items-center gap-2 text-base`,children:[(0,K.jsx)(R,{className:`h-4 w-4`}),`Cursor`]})}),(0,K.jsxs)(p,{className:`space-y-3`,children:[(0,K.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Add to`,` `,(0,K.jsx)(`code`,{className:`text-xs bg-muted px-1 rounded`,children:`.cursor/mcp.json`}),` `,`in your project root:`]}),(0,K.jsx)($,{value:oe(Q)}),(0,K.jsx)(`div`,{className:`flex gap-2`,children:(0,K.jsxs)(v,{variant:`outline`,size:`sm`,className:`text-xs`,onClick:()=>window.open(`https://docs.cursor.com/context/model-context-protocol`,`_blank`,`noopener,noreferrer`),children:[(0,K.jsx)(I,{className:`h-3 w-3 mr-1`}),`Cursor MCP Docs`]})})]})]}),(0,K.jsxs)(d,{children:[(0,K.jsx)(j,{children:(0,K.jsxs)(s,{className:`flex items-center gap-2 text-base`,children:[(0,K.jsx)(F,{className:`h-4 w-4`}),`Claude Desktop`]})}),(0,K.jsxs)(p,{className:`space-y-3`,children:[(0,K.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Add to`,` `,(0,K.jsx)(`code`,{className:`text-xs bg-muted px-1 rounded`,children:`~/Library/Application Support/Claude/claude_desktop_config.json`}),`:`]}),(0,K.jsx)($,{value:se(Q)}),(0,K.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Uses`,` `,(0,K.jsx)(`code`,{className:`text-xs bg-muted px-1 rounded`,children:`mcp-remote`}),` `,`to bridge HTTP Streamable → stdio (required by Claude Desktop).`]}),(0,K.jsx)(`div`,{className:`flex gap-2`,children:(0,K.jsxs)(v,{variant:`outline`,size:`sm`,className:`text-xs`,onClick:()=>window.open(`https://modelcontextprotocol.io/quickstart/user`,`_blank`,`noopener,noreferrer`),children:[(0,K.jsx)(I,{className:`h-3 w-3 mr-1`}),`Claude Desktop MCP Docs`]})})]})]}),(0,K.jsxs)(d,{children:[(0,K.jsx)(j,{children:(0,K.jsxs)(s,{className:`flex items-center gap-2 text-base`,children:[(0,K.jsx)(F,{className:`h-4 w-4`}),`Claude Code`]})}),(0,K.jsxs)(p,{className:`space-y-3`,children:[(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Add via CLI:`}),(0,K.jsx)($,{value:`claude mcp add agents-orchestrator --transport http ${Q}`}),(0,K.jsx)(`div`,{className:`flex gap-2`,children:(0,K.jsxs)(v,{variant:`outline`,size:`sm`,className:`text-xs`,onClick:()=>window.open(`https://docs.anthropic.com/en/docs/claude-code/mcp`,`_blank`,`noopener,noreferrer`),children:[(0,K.jsx)(I,{className:`h-3 w-3 mr-1`}),`Claude Code MCP Docs`]})})]})]})]}),(0,K.jsx)(`h2`,{className:`text-lg font-semibold mb-3`,children:e(`mcp.availableTools`)}),(0,K.jsxs)(`div`,{className:`relative mb-3`,children:[(0,K.jsx)(P,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground`}),(0,K.jsx)(A,{placeholder:e(`mcp.searchPlaceholder`),value:t,onChange:e=>n(e.target.value),className:`pl-9`})]}),a?(0,K.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:5}).map((e,t)=>(0,K.jsx)(`div`,{className:`h-10 bg-muted animate-pulse rounded-md`},t))}):(0,K.jsxs)(`div`,{className:`space-y-4`,children:[Object.entries(c).map(([e,t])=>(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,K.jsx)(`h3`,{className:`text-sm font-medium capitalize`,children:e}),(0,K.jsx)(_,{variant:`secondary`,className:`text-[10px]`,children:t.length})]}),(0,K.jsx)(`div`,{className:`space-y-1`,children:t.map(e=>(0,K.jsx)(ae,{tool:e},e.name))})]},e)),o.length===0&&(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground text-center py-8`,children:e(`mcp.noToolsMatching`,{search:t})})]}),(0,K.jsx)(`h2`,{className:`text-lg font-semibold mt-6 mb-3`,children:e(`mcp.testConnection`)}),(0,K.jsx)(d,{children:(0,K.jsxs)(p,{className:`pt-6`,children:[(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground mb-2`,children:e(`mcp.verifyEndpoint`)}),(0,K.jsx)($,{value:`curl -X POST ${Q} \\
|
|
6
|
-
-H "Content-Type: application/json" \\
|
|
7
|
-
-H "Accept: application/json, text/event-stream" \\
|
|
8
|
-
-d '{
|
|
9
|
-
"jsonrpc": "2.0",
|
|
10
|
-
"id": 1,
|
|
11
|
-
"method": "initialize",
|
|
12
|
-
"params": {
|
|
13
|
-
"protocolVersion": "2025-03-26",
|
|
14
|
-
"capabilities": {},
|
|
15
|
-
"clientInfo": { "name": "test", "version": "1.0.0" }
|
|
16
|
-
}
|
|
17
|
-
}'`})]})})]})}export{ce as McpSetup};
|