mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 19:47:43 +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",
|
"ws://localhost:2900/ws",
|
||||||
(msg) => {
|
(msg) => {
|
||||||
console.log("msg", msg);
|
console.log("msg", msg);
|
||||||
if (msg.includes("WEBSOCKET-SESSION-ID")) {
|
if (msg.includes("websocket-session-id")) {
|
||||||
const array = msg.split(" ");
|
const array = msg.split(" ");
|
||||||
setWebsocketId(array[2]);
|
setWebsocketId(array[2]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export default function ChatAI({}: ChatAIProps) {
|
|||||||
const { messages, setMessages } = useWebSocket(
|
const { messages, setMessages } = useWebSocket(
|
||||||
"ws://localhost:2900/ws",
|
"ws://localhost:2900/ws",
|
||||||
(msg) => {
|
(msg) => {
|
||||||
if (msg.includes("WEBSOCKET-SESSION-ID")) {
|
if (msg.includes("websocket-session-id")) {
|
||||||
const array = msg.split(" ");
|
const array = msg.split(" ");
|
||||||
setWebsocketId(array[2]);
|
setWebsocketId(array[2]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user