mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 11:37:47 +01:00
* fix: correct websocket header
* fix: correct websocket header
This commit is contained in:
@@ -54,7 +54,7 @@ const ChatAI = forwardRef<ChatAIRef, ChatAIProps>(
|
||||
"ws://localhost:2900/ws",
|
||||
(msg) => {
|
||||
console.log("msg", msg);
|
||||
if (msg.includes("WEBSOCKET-SESSION-ID")) {
|
||||
if (msg.includes("websocket-session-id")) {
|
||||
const array = msg.split(" ");
|
||||
setWebsocketId(array[2]);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export default function ChatAI({}: ChatAIProps) {
|
||||
const { messages, setMessages } = useWebSocket(
|
||||
"ws://localhost:2900/ws",
|
||||
(msg) => {
|
||||
if (msg.includes("WEBSOCKET-SESSION-ID")) {
|
||||
if (msg.includes("websocket-session-id")) {
|
||||
const array = msg.split(" ");
|
||||
setWebsocketId(array[2]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user