fix: patch TODO (#47)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2025-10-31 15:46:19 -07:00
committed by GitHub
parent bb6a41b490
commit 63d0034fd7
2 changed files with 8 additions and 5 deletions

View File

@@ -367,10 +367,11 @@ export function onChunk(b: Buffers, chunk: LettaStreamingResponse) {
}
// if argsText is not empty, add it to the line (immutable update)
if (argsText !== undefined) {
// Skip if argsText is undefined or null (backend sometimes sends null)
if (argsText !== undefined && argsText !== null) {
const updatedLine = {
...line,
argsText: (line.argsText ?? "") + argsText,
argsText: (line.argsText || "") + argsText,
};
b.byId.set(id, updatedLine);
}