fix: add goose execution override for h5 chat
This commit is contained in:
@@ -1136,7 +1136,7 @@ export function useTKMindChat(
|
||||
const submit = useCallback(
|
||||
async (
|
||||
text: string,
|
||||
options?: { mindspaceContext?: MindSpaceChatContext; messageId?: string },
|
||||
options?: { mindspaceContext?: MindSpaceChatContext; messageId?: string; forceGoose?: boolean },
|
||||
imageUrls?: string[],
|
||||
previewImageUrls?: string[],
|
||||
) => {
|
||||
@@ -1182,16 +1182,20 @@ export function useTKMindChat(
|
||||
}
|
||||
|
||||
try {
|
||||
const runOptions = resolveAgentRunOptions(trimmed, {
|
||||
taskType: 'h5_chat_code_task',
|
||||
userId: userRef.current?.id ?? null,
|
||||
requestId,
|
||||
mindspaceContext: options?.mindspaceContext ?? null,
|
||||
});
|
||||
const createdRun = await createAgentRun(
|
||||
activeSessionId,
|
||||
requestId,
|
||||
userMessage,
|
||||
resolveAgentRunOptions(trimmed, {
|
||||
taskType: 'h5_chat_code_task',
|
||||
userId: userRef.current?.id ?? null,
|
||||
requestId,
|
||||
mindspaceContext: options?.mindspaceContext ?? null,
|
||||
}),
|
||||
{
|
||||
...runOptions,
|
||||
...(options?.forceGoose ? { forceGoose: true } : {}),
|
||||
},
|
||||
);
|
||||
const finishedRun =
|
||||
createdRun.status === 'succeeded' ? createdRun : await waitForAgentRun(createdRun.id);
|
||||
|
||||
Reference in New Issue
Block a user