import{c as a,m as f,ak as y,al as m}from"./index-oE_2MbI2.js";import{u as T}from"./useQuery-B63y3s7J.js";import{K as n}from"./constants-uA8MqaDa.js";async function p(o){if(!o.getServerCapabilities()?.resources)return{resources:[]};try{return await o.listResources()}catch(s){if(s instanceof y&&s.code===m.MethodNotFound)return{resources:[]};throw s}}async function R(o,e){return await o.readResource({uri:e})}function L(o){const e=a.c(12);let s,t;e[0]!==o?({client:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let r;e[3]!==s?(r=n.mcpResourcesList(s),e[3]=s,e[4]=r):r=e[4];let i;e[5]!==s?(i=()=>p(s),e[5]=s,e[6]=i):i=e[6];const l=t.staleTime??3e4;let c;return e[7]!==t||e[8]!==r||e[9]!==i||e[10]!==l?(c={...t,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=t,e[8]=r,e[9]=i,e[10]=l,e[11]=c):c=e[11],f(c)}function O(o){const e=a.c(12);let s,t;e[0]!==o?({client:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let r;e[3]!==s?(r=n.mcpResourcesList(s),e[3]=s,e[4]=r):r=e[4];let i;e[5]!==s?(i=()=>p(s),e[5]=s,e[6]=i):i=e[6];const l=t.staleTime??3e4;let c;return e[7]!==t||e[8]!==r||e[9]!==i||e[10]!==l?(c={...t,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=t,e[8]=r,e[9]=i,e[10]=l,e[11]=c):c=e[11],T(c)}function C(o){const e=a.c(15);let s,t,r;e[0]!==o?({client:s,uri:r,...t}=o,e[0]=o,e[1]=s,e[2]=t,e[3]=r):(s=e[1],t=e[2],r=e[3]);let i;e[4]!==s||e[5]!==r?(i=n.mcpReadResource(s,r),e[4]=s,e[5]=r,e[6]=i):i=e[6];let l;e[7]!==s||e[8]!==r?(l=()=>R(s,r),e[7]=s,e[8]=r,e[9]=l):l=e[9];const c=t.staleTime??3e4;let u;return e[10]!==t||e[11]!==i||e[12]!==l||e[13]!==c?(u={...t,queryKey:i,queryFn:l,staleTime:c,retry:!1},e[10]=t,e[11]=i,e[12]=l,e[13]=c,e[14]=u):u=e[14],f(u)}const E={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},P=Object.values(E);export{P as A,E as D,L as a,O as b,p as l,R as r,C as u};
