feat: add gated h5 code run entry
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user