This commit is contained in:
Archer
2023-10-23 15:05:13 +08:00
committed by GitHub
parent d37433eacd
commit bf6dbfb245
9 changed files with 61 additions and 38 deletions

View File

@@ -83,6 +83,7 @@ export type ComponentRef = {
resetVariables: (data?: Record<string, any>) => void;
resetHistory: (history: ChatSiteItemType[]) => void;
scrollToBottom: (behavior?: 'smooth' | 'auto') => void;
sendPrompt: (question: string) => void;
};
enum FeedbackTypeEnum {
@@ -452,7 +453,8 @@ const ChatBox = (
setVariableInputFinish(!!e.length);
setChatHistory(e);
},
scrollToBottom
scrollToBottom,
sendPrompt: (question: string) => handleSubmit((item) => sendPrompt(item, question))()
}));
/* style start */