F4: verify task recovery and document Prompt background jobs

This commit is contained in:
Xin Wang
2026-10-23 16:27:00 +08:00
parent 9a4d48a86e
commit 8ac75a1873
14 changed files with 654 additions and 46 deletions
+1
View File
@@ -1004,6 +1004,7 @@ export type BackgroundTask = {
};
};
export const backgroundTasksApi = {
refresh: (id: string) => request<BackgroundTask>(`/api/background-tasks/${encodeURIComponent(id)}/refresh`, { method: "POST" }),
list: (assistantId: string) => request<BackgroundTask[]>(`/api/background-tasks?assistant_id=${encodeURIComponent(assistantId)}`),
cancel: (id: string) => request<BackgroundTask>(`/api/background-tasks/${encodeURIComponent(id)}/cancel`, { method: "POST" }),
input: (id: string, value: { reply?: string; answers?: string[][] }) => request<BackgroundTask>(`/api/background-tasks/${encodeURIComponent(id)}/input`, { method: "POST", body: JSON.stringify(value) }),