fix(session): ensure agent exists before processing title in session summary (#8662)

pull/8732/head^2
Qunhong Zeng 2026-01-16 05:24:13 +08:00 committed by GitHub
parent ea643f1e3f
commit b14622352e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -77,6 +77,7 @@ export namespace SessionSummary {
const textPart = msgWithParts.parts.find((p) => p.type === "text" && !p.synthetic) as MessageV2.TextPart
if (textPart && !userMsg.summary?.title) {
const agent = await Agent.get("title")
if (!agent) return
const stream = await LLM.stream({
agent,
user: userMsg,