update pay function
This commit is contained in:
@@ -43,6 +43,10 @@ export interface UseAgentChatParams {
|
|||||||
toast: ToastFunction;
|
toast: ToastFunction;
|
||||||
/** 重新加载会话列表(发送消息成功后调用) */
|
/** 重新加载会话列表(发送消息成功后调用) */
|
||||||
loadSessions: () => Promise<void>;
|
loadSessions: () => Promise<void>;
|
||||||
|
/** 消息列表(从外部传入) */
|
||||||
|
messages: Message[];
|
||||||
|
/** 设置消息列表(从外部传入) */
|
||||||
|
setMessages: Dispatch<SetStateAction<Message[]>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -107,8 +111,9 @@ export const useAgentChat = ({
|
|||||||
clearFiles,
|
clearFiles,
|
||||||
toast,
|
toast,
|
||||||
loadSessions,
|
loadSessions,
|
||||||
|
messages,
|
||||||
|
setMessages,
|
||||||
}: UseAgentChatParams): UseAgentChatReturn => {
|
}: UseAgentChatParams): UseAgentChatReturn => {
|
||||||
const [messages, setMessages] = useState<Message[]>([]);
|
|
||||||
const [inputValue, setInputValue] = useState('');
|
const [inputValue, setInputValue] = useState('');
|
||||||
const [isProcessing, setIsProcessing] = useState(false);
|
const [isProcessing, setIsProcessing] = useState(false);
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ const AgentChat = () => {
|
|||||||
clearFiles,
|
clearFiles,
|
||||||
toast,
|
toast,
|
||||||
loadSessions,
|
loadSessions,
|
||||||
|
messages,
|
||||||
|
setMessages,
|
||||||
});
|
});
|
||||||
|
|
||||||
// ==================== 输入框引用(保留在主组件)====================
|
// ==================== 输入框引用(保留在主组件)====================
|
||||||
|
|||||||
Reference in New Issue
Block a user