Skip to content

Commit 029ad04

Browse files
authored
Merge pull request #356 from FlowiseAI/feature/Enable-Input-History
Feat/enable disable input history
2 parents 5e23e32 + 2c6445a commit 029ad04

7 files changed

Lines changed: 8 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ You can also customize chatbot with different configuration
189189
sendButtonColor: '#3B81F6',
190190
maxChars: 50,
191191
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
192+
enableInputHistory: false,
192193
autoFocus: true, // If not used, autofocus is disabled on mobile and enabled on desktop. true enables it on both, false disables it on both.
193194
sendMessageSound: true,
194195
// sendSoundLocation: "send_message.mp3", // If this is not used, the default sound effect will be played if sendSoundMessage is true.

dist/features/bubble/types.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export type TextInputTheme = {
2525
sendSoundLocation?: string;
2626
receiveMessageSound?: boolean;
2727
receiveSoundLocation?: string;
28+
enableInputHistory?: boolean;
2829
};
2930
export type UserMessageTheme = {
3031
backgroundColor?: string;

dist/features/bubble/types.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/web.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/web.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Bot.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ export const Bot = (botProps: BotProps & { class?: string }) => {
11891189
chatId: chatId(),
11901190
};
11911191

1192-
if (startInputType() === 'formInput') {
1192+
if (startInputType() === 'formInput' && Object.keys(formData).length > 0) {
11931193
body.form = formData;
11941194
delete body.question;
11951195
}
@@ -2752,7 +2752,7 @@ export const Bot = (botProps: BotProps & { class?: string }) => {
27522752
handleFileChange={handleFileChange}
27532753
sendMessageSound={props.textInput?.sendMessageSound}
27542754
sendSoundLocation={props.textInput?.sendSoundLocation}
2755-
enableInputHistory={true}
2755+
enableInputHistory={props.textInput?.enableInputHistory ?? true}
27562756
maxHistorySize={10}
27572757
isLoading={loading()}
27582758
showAbortButton={loading() && hasAgentFlowExecutedData()}

src/features/bubble/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export type TextInputTheme = {
2828
sendSoundLocation?: string;
2929
receiveMessageSound?: boolean;
3030
receiveSoundLocation?: string;
31+
enableInputHistory?: boolean;
3132
};
3233

3334
export type UserMessageTheme = {

0 commit comments

Comments
 (0)