mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-16 23:01:06 +02:00
docs(chat): tighten ActiveChatStreamRunner comment to intent
This commit is contained in:
parent
768bc8cfde
commit
9879306ccc
1 changed files with 6 additions and 12 deletions
|
|
@ -4,19 +4,13 @@ import { useEffect } from "react";
|
||||||
import { chatStreamStore } from "@/lib/chat/stream-engine/store";
|
import { chatStreamStore } from "@/lib/chat/stream-engine/store";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Persistent, render-null host for app-wide chat-stream lifecycle.
|
* Persistent, render-null host that scopes the in-flight chat turn's lifetime
|
||||||
|
* to the workspace shell, not the chat page.
|
||||||
*
|
*
|
||||||
* Mounted in the workspace shell (``LayoutDataProvider``), it persists across
|
* Mounted in ``LayoutDataProvider``, it survives in-app navigation between
|
||||||
* in-app navigation between workspace routes (``/new-chat`` -> ``/chats`` ->
|
* workspace routes and aborts the single active turn only on workspace/app
|
||||||
* ``/automations`` and doc-tab switches) and only unmounts on real teardown
|
* teardown, so ordinary navigation disconnects the view without stopping the
|
||||||
* (workspace change / app teardown). On that teardown it aborts the single
|
* stream.
|
||||||
* in-flight turn — this replaces the old chat-page unmount abort, which was
|
|
||||||
* what killed streams on ordinary navigation.
|
|
||||||
*
|
|
||||||
* NOTE: the ``hitl-decision`` bridge and ``useChatSessionStateSync`` stay in
|
|
||||||
* the chat page: both need the currently-viewed thread id (HITL resume can
|
|
||||||
* only be triggered from the page's approval UI), which the shell-level runner
|
|
||||||
* does not cleanly have.
|
|
||||||
*/
|
*/
|
||||||
export function ActiveChatStreamRunner() {
|
export function ActiveChatStreamRunner() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue