chore(frontend): 补充状态与服务边界注释

This commit is contained in:
2026-08-30 22:59:58 +08:00
parent 629a6bda9c
commit 49c856a69c
11 changed files with 31 additions and 2 deletions
+3
View File
@@ -54,6 +54,7 @@ export class SseClient {
this.connected = true
onOpen?.()
// 一个 UTF-8 字符或 SSE 行可能横跨多个网络分片,必须累积后再按空行派发。
const decoder = new TextDecoder('utf-8')
let eventName = 'message'
let dataLines: string[] = []
@@ -117,6 +118,8 @@ export class SseClient {
this.controller.abort()
}
// TODO(streaming): Agent 事件持久化后,增加 Last-Event-ID 与指数退避重连。
isConnected() {
return this.connected
}