From a44c67da978720cabd8ed873bf840edf408a8e70 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Mon, 13 Jul 2026 22:39:29 +0200 Subject: [PATCH] docs(chat): tighten engine comments to intent --- surfsense_web/lib/chat/stream-engine/engine.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/surfsense_web/lib/chat/stream-engine/engine.ts b/surfsense_web/lib/chat/stream-engine/engine.ts index a4a0c02a7..57ff47f61 100644 --- a/surfsense_web/lib/chat/stream-engine/engine.ts +++ b/surfsense_web/lib/chat/stream-engine/engine.ts @@ -80,10 +80,9 @@ const tokenUsageStore = chatStreamStore.tokenUsage; const toolsWithUI = TOOLS_WITH_UI_ALL; /** - * Display-only setters the page provides while it is mounted. After the chat - * page unmounts (in-app navigation) these are stale but harmless — the stream - * keeps writing to the module {@link chatStreamStore}, and the page re-derives - * its thread from the URL when it remounts. + * Display-only setters, valid only while the page is mounted. The stream drives + * durable state through {@link chatStreamStore}; these just sync the mounted + * page's local view and are ignored once it unmounts. */ export interface EngineView { setThreadId: Dispatch>; @@ -101,7 +100,7 @@ export interface EngineContext { } // --------------------------------------------------------------------------- -// Error handling (relocated from the chat page) +// Error handling // --------------------------------------------------------------------------- async function persistAssistantErrorMessage({