feat: add form input node (#2773)

* add node

* dispatch

* extract InputTypeConfig component

* question tip

* fix build

* fix

* fix
This commit is contained in:
heheer
2024-09-26 13:48:03 +08:00
committed by GitHub
parent edebfdf5ef
commit 1cf76ee7df
34 changed files with 1326 additions and 419 deletions

View File

@@ -182,6 +182,9 @@ export type DispatchNodeResponseType = {
loopInputValue?: any;
// loop end
loopOutputValue?: any;
// form input
formInputResult?: string;
};
export type DispatchNodeResultType<T = {}> = {

View File

@@ -54,6 +54,11 @@ export const getLastInteractiveValue = (histories: ChatItemType[]) => {
) {
return lastValue.interactive;
}
// Check is user input
if (lastValue.interactive.type === 'userInput' && !lastValue.interactive.params.submitted) {
return lastValue.interactive;
}
}
return null;