chore(chat): support isNewChat payload flag and fix any casts

This commit is contained in:
yiling
2026-07-11 21:05:47 +08:00
parent c5ce4d07e9
commit b57a3e0239
5 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ export async function agentChat(task: WorkflowTask): Promise<void> {
const teamId = asset.project.teamId
// 4. Initialize Session if missing
let isNewChat = !payload.agent?.sessionId
let isNewChat = !payload.agent?.sessionId || payload.agent?.isNewChat === true
if (!sessionId) {
if (!userCommentId) {
throw ApplicationFailure.create({