АДРЕСНЫЙ РЕЖИМ - авторан история - базовая версия
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import type {
|
||||
AutoRunDetailResponse,
|
||||
AutoRunDialogResponse,
|
||||
AutoRunHistoryResponse,
|
||||
AssistantMessageResultState,
|
||||
AssistantConversationItem,
|
||||
ConnectionState,
|
||||
@@ -247,5 +250,36 @@ export const apiClient = {
|
||||
|
||||
async loadAssistantSession(sessionId: string): Promise<{ ok: boolean; session: { items: AssistantConversationItem[] } }> {
|
||||
return request(`/assistant/session/${sessionId}`);
|
||||
},
|
||||
|
||||
async loadAutoRunsHistory(input?: {
|
||||
from?: string;
|
||||
to?: string;
|
||||
target?: string;
|
||||
mode?: string;
|
||||
use_mock?: "any" | "true" | "false";
|
||||
prompt_contains?: string;
|
||||
limit?: number;
|
||||
scan_limit?: number;
|
||||
}): Promise<AutoRunHistoryResponse> {
|
||||
const params = new URLSearchParams();
|
||||
if (input?.from) params.set("from", input.from);
|
||||
if (input?.to) params.set("to", input.to);
|
||||
if (input?.target) params.set("target", input.target);
|
||||
if (input?.mode) params.set("mode", input.mode);
|
||||
if (input?.use_mock) params.set("use_mock", input.use_mock);
|
||||
if (input?.prompt_contains) params.set("prompt_contains", input.prompt_contains);
|
||||
if (typeof input?.limit === "number") params.set("limit", String(input.limit));
|
||||
if (typeof input?.scan_limit === "number") params.set("scan_limit", String(input.scan_limit));
|
||||
const query = params.toString();
|
||||
return request(`/autoruns/history${query ? `?${query}` : ""}`);
|
||||
},
|
||||
|
||||
async loadAutoRunDetail(runId: string): Promise<AutoRunDetailResponse> {
|
||||
return request(`/autoruns/history/${encodeURIComponent(runId)}`);
|
||||
},
|
||||
|
||||
async loadAutoRunCaseDialog(runId: string, caseId: string): Promise<AutoRunDialogResponse> {
|
||||
return request(`/autoruns/history/${encodeURIComponent(runId)}/case/${encodeURIComponent(caseId)}/dialog`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user