@allbluecn/web-app 0.27.22 → 0.27.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -106,7 +106,10 @@ function HarnessConnection({ children }: { children: React.ReactNode }) {
|
|
|
106
106
|
const { activeThreadId, sidebarChatRef } = useSidebarBody()
|
|
107
107
|
const fallbackThreadIdRef = useRef(crypto.randomUUID());
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
// 只用「真实会话 id」连接 harness(workbench-connection 同款):空态兜底 UUID
|
|
110
|
+
// 会让 harness client 对假 id 开真实连接 → 400/404 重连循环 → 假故障横幅。
|
|
111
|
+
// fallbackThreadIdRef 保留给 legacy 连接路径,harness 空态传 '' 不连接。
|
|
112
|
+
const session = useHarnessSession({ threadId: activeThreadId ?? '' })
|
|
110
113
|
const chat = useHarnessChatAdapter(session)
|
|
111
114
|
const workbenchChat = chat as unknown as WorkbenchChat
|
|
112
115
|
sidebarChatRef.current = workbenchChat
|
|
@@ -125,7 +125,15 @@ function LegacyConnection({ children }: { children: React.ReactNode }) {
|
|
|
125
125
|
function HarnessConnection({ children }: { children: React.ReactNode }) {
|
|
126
126
|
const { threadId, chatRef, pendingSend, setPendingSend, activeConversationId, setRetryDismissed, setConversations } = useWorkbenchBody()
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
// 只用「真实会话 id」连接 harness:body 的 threadId 在空态兜底为 mount 级稳定
|
|
129
|
+
// UUID(legacy 孤儿线程修复的载体),harness 对假 id 建 client 会开真实连接,
|
|
130
|
+
// events/快照全 400/404 → 重连退避耗尽 → 「连接已断开 + 重试上限」假故障
|
|
131
|
+
// (桌面真机 CDP 实测,#652 的无-threadId 短路因兜底 UUID 恒真而永不触发)。
|
|
132
|
+
// 空态传 ''(falsy)→ use-harness-session 不建 client/view;首条发送经 Provider
|
|
133
|
+
// 建会话 → setActiveConversationId 置真实 id → 本 hook 以新 id 重建并连接。
|
|
134
|
+
// legacy 连接保持用兜底 threadId(ChatClient hydrate 语义,行为不变)。
|
|
135
|
+
const harnessThreadId = activeConversationId ?? ''
|
|
136
|
+
const session = useHarnessSession({ threadId: harnessThreadId })
|
|
129
137
|
const chat = useHarnessChatAdapter(session)
|
|
130
138
|
const workbenchChat = toWorkbenchChat(chat)
|
|
131
139
|
chatRef.current = workbenchChat
|
|
@@ -112,7 +112,7 @@ export const SDK_GROUPS: SdkGroup[] = [
|
|
|
112
112
|
"items": [
|
|
113
113
|
{
|
|
114
114
|
"name": "@allbluecn/web-app",
|
|
115
|
-
"version": "v0.27.
|
|
115
|
+
"version": "v0.27.23",
|
|
116
116
|
"lastUpdate": "Nov 10, 2026",
|
|
117
117
|
"source": "apps/web/package.json",
|
|
118
118
|
"docsUrl": "https://github.com/allbluecn/allblue"
|