fix: 从ask页面返回闪退的问题

This commit is contained in:
Junhui Chen 2025-08-09 15:09:06 +08:00
parent 30d22715fd
commit c89b1df10a

View File

@ -3,7 +3,6 @@ import { Message } from "@/types/ask";
import * as FileSystem from 'expo-file-system';
import * as MediaLibrary from 'expo-media-library';
import { TFunction } from "i18next";
import { useCallback } from "react";
import { Alert } from 'react-native';
// 实现一个函数,从两个数组中轮流插入新数组
@ -19,12 +18,12 @@ export const mergeArrays = (arr1: any[], arr2: any[]) => {
// 创建新对话并获取消息
export const createNewConversation = useCallback(async (user_text: string) => {
export const createNewConversation = async (user_text: string) => {
const data = await fetchApi<string>("/chat/new", {
method: "POST",
});
return data
}, []);
};
// 获取对话信息
export const getConversation = async ({