feat: add gated h5 code run entry

This commit is contained in:
John
2026-07-02 07:19:26 +08:00
parent 0271d83756
commit ac20ac212e
6 changed files with 72 additions and 2 deletions
+4
View File
@@ -58,6 +58,7 @@ import type {
} from '../types';
import { CHAT_IMAGE_UPLOAD_MAX_INPUT_BYTES } from '../utils/imageUpload';
import { normalizeConversationMessages, normalizeUserMessageForApi } from '../utils/message';
import type { AgentRunCreateOptions } from '../utils/agentRunMode';
const API = '/api';
const DEFAULT_API_TIMEOUT_MS = 20_000;
@@ -2247,6 +2248,7 @@ export async function createAgentRun(
sessionId: string | null,
requestId: string,
userMessage: Message,
options: AgentRunCreateOptions = {},
): Promise<AgentRun> {
const result = await apiFetch<{ run: AgentRun }>(
AGENT_RUNS_PATH,
@@ -2256,6 +2258,8 @@ export async function createAgentRun(
session_id: sessionId,
request_id: requestId,
user_message: normalizeUserMessageForApi(userMessage),
...(options.toolMode ? { tool_mode: options.toolMode } : {}),
...(options.taskType ? { task_type: options.taskType } : {}),
}),
},
{ timeoutMs: AGENT_CONNECT_TIMEOUT_MS },