feat(web): connect new chat UI to agent filesystem APIs

This commit is contained in:
Anish Sarkar 2026-04-23 15:46:39 +05:30
parent 5c3a327a0c
commit 4899588cd7
5 changed files with 209 additions and 1 deletions

View file

@ -1,4 +1,5 @@
import type { ZodType } from "zod";
import { getClientPlatform } from "../agent-filesystem";
import { getBearerToken, handleUnauthorized, refreshAccessToken } from "../auth-utils";
import {
AbortedError,
@ -75,6 +76,8 @@ class BaseApiService {
const defaultOptions: RequestOptions = {
headers: {
Authorization: `Bearer ${this.bearerToken || ""}`,
"X-SurfSense-Client-Platform":
typeof window === "undefined" ? "web" : getClientPlatform(),
},
method: "GET",
responseType: ResponseType.JSON,