Skip to content

Commit 66f8759

Browse files
committed
Fix misleading UpdateMessage doc comment
UpdateMessage is invoked on every streaming delta (and once more to finalize), not only to finalize completed messages. Assisted-By: docker-agent
1 parent 01a8b20 commit 66f8759

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/session/store.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ type Store interface {
9292
AddMessage(ctx context.Context, sessionID string, msg *Message) (int64, error)
9393

9494
// UpdateMessage updates an existing message by its ID.
95-
// This is used to finalize streaming messages with complete content.
95+
// This is called on each streaming delta to keep the persisted message
96+
// in sync with the in-progress content, and once more with the final
97+
// payload when the message completes.
9698
UpdateMessage(ctx context.Context, messageID int64, msg *Message) error
9799

98100
// AddSubSession creates a sub-session and links it to the parent.

0 commit comments

Comments
 (0)