mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 05:19:51 +00:00
feat: add update variable node (#1362)
* feat: add variable update node * fix * fix * change component quote
This commit is contained in:
@@ -91,6 +91,7 @@ type Props = OutLinkChatAuthProps & {
|
||||
onStartChat?: (e: StartChatFnProps) => Promise<{
|
||||
responseText: string;
|
||||
[DispatchNodeResponseKeyEnum.nodeResponse]: ChatHistoryItemResType[];
|
||||
newVariables?: Record<string, any>;
|
||||
isNewChat?: boolean;
|
||||
}>;
|
||||
onDelMessage?: (e: { contentId: string }) => void;
|
||||
@@ -462,6 +463,7 @@ const ChatBox = (
|
||||
const {
|
||||
responseData,
|
||||
responseText,
|
||||
newVariables,
|
||||
isNewChat = false
|
||||
} = await onStartChat({
|
||||
chatList: newChatList,
|
||||
@@ -470,6 +472,7 @@ const ChatBox = (
|
||||
generatingMessage: (e) => generatingMessage({ ...e, autoTTSResponse }),
|
||||
variables
|
||||
});
|
||||
setValue('variables', newVariables || []);
|
||||
|
||||
isNewChatReplace.current = isNewChat;
|
||||
|
||||
@@ -549,6 +552,7 @@ const ChatBox = (
|
||||
resetInputVal,
|
||||
setAudioPlayingChatId,
|
||||
setChatHistories,
|
||||
setValue,
|
||||
splitText2Audio,
|
||||
startSegmentedAudio,
|
||||
t,
|
||||
|
Reference in New Issue
Block a user