标题生成未正确调用模型接口

标题生成未正确调用模型接口
This commit is contained in:
zhb 2026-06-21 01:08:39 +08:00 committed by GitHub
parent 4b724ed2c9
commit f0b8236258
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1047,9 +1047,11 @@ function bindTitleSessionOutput(
if (cliMsg?.type === 'result') {
conversationService.removeOutputCallback(sessionId, callback)
const completedTurnCount = completeActiveTitleTurn(sessionId)
if (!cliMsg.is_error) {
triggerTitleGeneration(ws, sessionId, 'turn-complete', completedTurnCount ?? undefined)
}
// Always attempt AI title generation — even on error turns the user
// message (and partial assistant output) contain enough context for a
// good title. generateTitle is fire-and-forget and returns null on
// any failure, so this is safe.
triggerTitleGeneration(ws, sessionId, 'turn-complete', completedTurnCount ?? undefined)
}
}