| 233 | } |
| 234 | |
| 235 | export const getOffers = async (): Promise<OffersResponse | ServiceError> => { |
| 236 | const url = new URL("/api/offers", window.location.origin); |
| 237 | |
| 238 | const result = await fetch(url, { |
| 239 | method: "GET", |
| 240 | headers: { |
| 241 | "X-Sourcebot-Client-Source": "sourcebot-web-client", |
| 242 | }, |
| 243 | }).then(response => response.json()); |
| 244 | |
| 245 | return result as OffersResponse | ServiceError; |
| 246 | } |
| 247 | |
| 248 | export const connectMcpToAsk = async (body: { serverId: string; returnTo?: string }): Promise<ConnectMcpResponse | ServiceError> => { |
| 249 | const result = await fetch('/api/ee/askmcp/connect', { |