import{c as l,m as u,aB as m,aC as f}from"./index-DAmbTOxS.js";import{u as y}from"./useQuery-B4nMPmUe.js";import{K as n}from"./constants-xmw1fMHh.js";async function c(r){if(!r.getServerCapabilities()?.prompts)return{prompts:[]};try{return await r.listPrompts()}catch(e){if(e instanceof m&&e.code===f.MethodNotFound)return{prompts:[]};throw e}}async function d(r,t,e){if(!r.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await r.getPrompt({name:t,arguments:e??{}})}function b(r){const t=l.c(12);let e,s;t[0]!==r?({client:e,...s}=r,t[0]=r,t[1]=e,t[2]=s):(e=t[1],s=t[2]);let i;t[3]!==e?(i=n.mcpPromptsList(e),t[3]=e,t[4]=i):i=t[4];let o;t[5]!==e?(o=()=>c(e),t[5]=e,t[6]=o):o=t[6];const p=s.staleTime??3e4;let a;return t[7]!==s||t[8]!==i||t[9]!==o||t[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},t[7]=s,t[8]=i,t[9]=o,t[10]=p,t[11]=a):a=t[11],u(a)}function C(r){const t=l.c(12);let e,s;t[0]!==r?({client:e,...s}=r,t[0]=r,t[1]=e,t[2]=s):(e=t[1],s=t[2]);let i;t[3]!==e?(i=n.mcpPromptsList(e),t[3]=e,t[4]=i):i=t[4];let o;t[5]!==e?(o=()=>c(e),t[5]=e,t[6]=o):o=t[6];const p=s.staleTime??3e4;let a;return t[7]!==s||t[8]!==i||t[9]!==o||t[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},t[7]=s,t[8]=i,t[9]=o,t[10]=p,t[11]=a):a=t[11],y(a)}const P={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},L=Object.values(P);export{L as A,P as D,C as a,d as g,c as l,b as u};
