Differentiate SSE reconnect from upstream recovery
This commit is contained in:
1 parent
c26dc99ef1
commit
1d5dad314a
4 files changed
+8
-3
No files matched your search
+2
-2
@@ -842,9 +842,9 @@ class RemoteOpenClawRepository(
|
||||
return@collect
|
||||
}
|
||||
streamRecoveryQueueDrainPending.add(sessionId)
|
||||
streamStatusStore = streamStatusStore + (sessionId to "reconnecting")
|
||||
streamStatusStore = streamStatusStore + (sessionId to "recovering")
|
||||
syncSessionStreamStatus(sessionId)
|
||||
// recoverable: will retry via outer while loop
|
||||
// recoverable upstream polling hiccup inside active SSE stream
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ fun ChatScreen(
|
||||
Text(
|
||||
when {
|
||||
isSending -> "消息请求已提交,正在等待 SSE 首帧…"
|
||||
streamStatus == "recovering" -> "上游消息轮询短暂异常,正在自动恢复…"
|
||||
streamStatus == "reconnecting" -> "SSE 连接中断,正在重连…"
|
||||
streamStatus == "failed" -> "SSE 已断开,请手动重试。"
|
||||
streamStatus == "connecting" -> "正在建立 SSE 连接…"
|
||||
@@ -108,6 +109,7 @@ fun ChatScreen(
|
||||
StatusPill(
|
||||
text = when {
|
||||
isLoading -> "同步中"
|
||||
streamStatus == "recovering" -> "恢复中"
|
||||
streamStatus == "reconnecting" -> "重连中"
|
||||
streamStatus == "failed" -> "已断流"
|
||||
streamStatus == "connecting" -> "连接中"
|
||||
|
||||
+2
-1
@@ -190,13 +190,14 @@ fun SessionListScreen(
|
||||
session.streamStatus?.let { streamStatus ->
|
||||
StatusPill(
|
||||
text = when (streamStatus) {
|
||||
"recovering" -> "恢复中"
|
||||
"reconnecting" -> "重连中"
|
||||
"failed" -> "已断流"
|
||||
"connecting" -> "连接中"
|
||||
"live" -> "在线"
|
||||
else -> streamStatus
|
||||
},
|
||||
highlighted = streamStatus == "live",
|
||||
highlighted = streamStatus == "live" || streamStatus == "recovering",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user