This commit is contained in:
Junhui Chen 2025-08-09 13:25:56 +08:00
parent 4c4360cefc
commit 9de8c3b5c7

View File

@ -3,6 +3,7 @@ import { Message } from "@/types/ask";
import { Dispatch, SetStateAction, useCallback, useRef } from "react";
import { useTranslation } from "react-i18next";
import { View } from 'react-native';
import { createNewConversation } from "./utils";
interface AskHelloProps {
setUserMessages: Dispatch<SetStateAction<Message[]>>;
@ -37,7 +38,7 @@ export default function AskHello({ setUserMessages, setConversationId, setIsHell
// // }
// // ]);
// const sessionId = await createNewConversation(text);
const sessionId = await createNewConversation(text);
// if (!sessionId) {
// console.error("Failed to create a new conversation.");
// //
@ -45,7 +46,7 @@ export default function AskHello({ setUserMessages, setConversationId, setIsHell
// return;
// }
// setConversationId(sessionId);
setConversationId(sessionId);
// // try {
// // if (webSocketManager && typeof (webSocketManager as any).send === 'function') {
// // (webSocketManager as any).send({