SurfSense/surfsense_backend/app/tasks/chat/streaming/flows
CREDO23 21bddc73a7 refactor(chat): add streaming/flows/shared/assistant_finalize.py
Extracts finalize_assistant_message: the post-stream server-side write
of the final assistant message (with content parts + token usage)
guarded by asyncio.shield + shielded_async_session so a client
disconnect cannot abort the persist.

Add-only; legacy stream_new_chat.py keeps its inline finalize block
until cutover.
2026-05-25 21:49:31 +02:00
..
shared refactor(chat): add streaming/flows/shared/assistant_finalize.py 2026-05-25 21:49:31 +02:00