File tree 2 files changed +10
-12
lines changed
2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,12 @@ const ChatbotFull = () => {
88
88
parsedConfig = { ...parsedConfig , ...JSON . parse ( chatflowData . chatbotConfig ) }
89
89
setChatbotTheme ( parsedConfig )
90
90
if ( parsedConfig . overrideConfig ) {
91
- // Generate new sessionId
92
- if ( parsedConfig . overrideConfig . generateNewSession ) {
93
- parsedConfig . overrideConfig . sessionId = Date . now ( ) . toString ( )
94
- }
95
91
setChatbotOverrideConfig ( parsedConfig . overrideConfig )
96
92
}
93
+
94
+ if ( parsedConfig . generateNewSession ) {
95
+ localStorage . removeItem ( `${ chatflowData . id } _EXTERNAL` )
96
+ }
97
97
} catch ( e ) {
98
98
console . error ( e )
99
99
setChatbotTheme ( parsedConfig )
Original file line number Diff line number Diff line change @@ -111,8 +111,7 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
111
111
userMessage : {
112
112
showAvatar : false
113
113
} ,
114
- textInput : { } ,
115
- overrideConfig : { }
114
+ textInput : { }
116
115
}
117
116
if ( title ) obj . title = title
118
117
if ( titleAvatarSrc ) obj . titleAvatarSrc = titleAvatarSrc
@@ -137,16 +136,14 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
137
136
if ( textInputPlaceholder ) obj . textInput . placeholder = textInputPlaceholder
138
137
if ( textInputSendButtonColor ) obj . textInput . sendButtonColor = textInputSendButtonColor
139
138
140
- if ( isSessionMemory ) obj . overrideConfig . generateNewSession = generateNewSession
139
+ if ( isSessionMemory ) obj . generateNewSession = generateNewSession
141
140
142
141
if ( renderHTML ) {
143
142
obj . renderHTML = true
144
143
} else {
145
144
obj . renderHTML = false
146
145
}
147
146
148
- if ( chatbotConfig ?. starterPrompts ) obj . starterPrompts = chatbotConfig . starterPrompts
149
-
150
147
if ( isAgentCanvas ) {
151
148
// if showAgentMessages is undefined, default to true
152
149
if ( showAgentMessages === undefined || showAgentMessages === null ) {
@@ -156,9 +153,10 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
156
153
}
157
154
}
158
155
159
- if ( chatbotConfig ?. fullFileUpload ) obj . fullFileUpload = chatbotConfig ?. fullFileUpload
160
-
161
- return obj
156
+ return {
157
+ ...chatbotConfig ,
158
+ ...obj
159
+ }
162
160
}
163
161
164
162
const onSave = async ( ) => {
You can’t perform that action at this time.
0 commit comments