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
+10 -1
View File
@@ -20,6 +20,7 @@ import {
CHAT_IMAGE_UPLOAD_MAX_INPUT_BYTES,
} from '../utils/imageUpload';
import { buildAbsoluteAssetImageUrl } from '../utils/mindspaceCards';
import { resolveAgentRunOptions } from '../utils/agentRunMode';
import {
buildUserMessage,
normalizeConversationMessages,
@@ -339,7 +340,15 @@ export function usePageEditSubChat({
setPendingTool(null);
try {
const createdRun = await createAgentRun(currentSession.id, requestId, userMessage);
const createdRun = await createAgentRun(
currentSession.id,
requestId,
userMessage,
resolveAgentRunOptions(trimmed, {
taskType: 'page_edit_code_task',
forceCode: true,
}),
);
const finishedRun =
createdRun.status === 'succeeded' ? createdRun : await waitForAgentRun(createdRun.id);
if (!finishedRun.sessionId) {
+7 -1
View File
@@ -50,6 +50,7 @@ import {
CHAT_IMAGE_UPLOAD_MAX_INPUT_BYTES,
} from '../utils/imageUpload';
import { buildAbsoluteAssetImageUrl } from '../utils/mindspaceCards';
import { resolveAgentRunOptions } from '../utils/agentRunMode';
import {
buildUserMessage,
normalizeConversationMessages,
@@ -1168,7 +1169,12 @@ export function useTKMindChat(
}
try {
const createdRun = await createAgentRun(activeSessionId, requestId, userMessage);
const createdRun = await createAgentRun(
activeSessionId,
requestId,
userMessage,
resolveAgentRunOptions(trimmed, { taskType: 'h5_chat_code_task' }),
);
const finishedRun =
createdRun.status === 'succeeded' ? createdRun : await waitForAgentRun(createdRun.id);
activeSessionId = finishedRun.sessionId;