feat(filesystem): enhance agent filesystem API with searchSpaceId support for improved context handling

This commit is contained in:
Anish Sarkar 2026-04-27 21:00:40 +05:30
parent 86e2dc8a5d
commit 27e16231c1
10 changed files with 349 additions and 85 deletions

View file

@ -658,7 +658,7 @@ export default function NewChatPage() {
try {
const backendUrl = process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL || "http://localhost:8000";
const selection = await getAgentFilesystemSelection();
const selection = await getAgentFilesystemSelection(searchSpaceId);
if (
selection.filesystem_mode === "desktop_local_folder" &&
(!selection.local_filesystem_mounts ||
@ -1088,7 +1088,7 @@ export default function NewChatPage() {
try {
const backendUrl = process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL || "http://localhost:8000";
const selection = await getAgentFilesystemSelection();
const selection = await getAgentFilesystemSelection(searchSpaceId);
const response = await fetch(`${backendUrl}/api/v1/threads/${resumeThreadId}/resume`, {
method: "POST",
headers: {
@ -1424,7 +1424,7 @@ export default function NewChatPage() {
]);
try {
const selection = await getAgentFilesystemSelection();
const selection = await getAgentFilesystemSelection(searchSpaceId);
const response = await fetch(getRegenerateUrl(threadId), {
method: "POST",
headers: {