fix: handle chatId encoding in reconnectToStream (#4670)

* fix: handle chatId encoding in reconnectToStream

* fix: ensure chatId is always encoded in reconnectToStream
This commit is contained in:
Whitewater 2025-11-07 17:15:09 +08:00 committed by GitHub
parent 520ea60f2a
commit 26d7e3cb1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -132,4 +132,11 @@ class ExtendChatTransport extends HttpChatTransport<BizUIMessage> {
console.error("Failed to persist generated title:", error)
}
}
override reconnectToStream(
options: Parameters<HttpChatTransport<BizUIMessage>["reconnectToStream"]>[0],
) {
options.chatId = encodeURIComponent(options.chatId)
return super.reconnectToStream(options)
}
}