feat: add task artifact validation for code runs

This commit is contained in:
Your Name
2026-07-02 12:31:29 +08:00
parent 201cc5fb7a
commit 7a47dc6a98
5 changed files with 251 additions and 14 deletions
+4 -2
View File
@@ -24,6 +24,7 @@ import {
syncUserMemory,
updateProvider,
} from '../api/client';
import type { AgentRun } from '../api/client';
import { appConfig } from '../config';
import {
clearStoredSessionId,
@@ -74,8 +75,8 @@ const FINISH_SYNC_RETRY_DELAYS_MS = [500, 1500, 3000];
const ACTIVE_REQUEST_MISSING_GRACE_MS = 2500;
export { INSUFFICIENT_BALANCE_NOTICE };
async function waitForAgentRun(runId: string) {
return await new Promise((resolve, reject) => {
async function waitForAgentRun(runId: string): Promise<AgentRun> {
return await new Promise<AgentRun>((resolve, reject) => {
const unsubscribe = subscribeAgentRunEvents(
runId,
(run) => {
@@ -1177,6 +1178,7 @@ export function useTKMindChat(
taskType: 'h5_chat_code_task',
userId: userRef.current?.id ?? null,
requestId,
mindspaceContext: options?.mindspaceContext ?? null,
}),
);
const finishedRun =