/**
 * WebUI error reporting stub.
 *
 * `@sentry/node` is intentionally not used in the Next.js app: importing it
 * (even lazily via `instrumentation.ts`) pulled OpenTelemetry into the build
 * graph and broke page-data collection with
 * `TypeError: createContext is not a function`. Bot-side Sentry remains in
 * `apps/bot`. Capture here stays a structured console fallback so call sites
 * can keep using one API.
 */
export async function initWebuiSentry(): Promise<void> {
  // no-op in WebUI
}

export async function captureWebuiException(
  error: unknown,
  context?: Record<string, unknown>
): Promise<void> {
  console.error('[webui]', error, context ?? {});
}
