import { apiFetch } from '@/api/client';

export function assembleContext(query: string, budget?: number, subsystems?: string[]) {
  return apiFetch<unknown>('/api/context/assemble', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ query, budget, subsystems }),
  });
}

export function routeQuery(query: string) {
  const params = new URLSearchParams({ query });
  return apiFetch<unknown>(`/api/context/route?${params.toString()}`);
}
