fix(session): ensure agent exists before processing title in session summary (#8662)
This commit is contained in:
parent
ea643f1e3f
commit
b14622352e
1 changed files with 1 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ export namespace SessionSummary {
|
||||||
const textPart = msgWithParts.parts.find((p) => p.type === "text" && !p.synthetic) as MessageV2.TextPart
|
const textPart = msgWithParts.parts.find((p) => p.type === "text" && !p.synthetic) as MessageV2.TextPart
|
||||||
if (textPart && !userMsg.summary?.title) {
|
if (textPart && !userMsg.summary?.title) {
|
||||||
const agent = await Agent.get("title")
|
const agent = await Agent.get("title")
|
||||||
|
if (!agent) return
|
||||||
const stream = await LLM.stream({
|
const stream = await LLM.stream({
|
||||||
agent,
|
agent,
|
||||||
user: userMsg,
|
user: userMsg,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue