mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 11:01:22 +03:00
@@ -88,12 +88,12 @@ const ChatbotFull = () => {
|
||||
parsedConfig = { ...parsedConfig, ...JSON.parse(chatflowData.chatbotConfig) }
|
||||
setChatbotTheme(parsedConfig)
|
||||
if (parsedConfig.overrideConfig) {
|
||||
// Generate new sessionId
|
||||
if (parsedConfig.overrideConfig.generateNewSession) {
|
||||
parsedConfig.overrideConfig.sessionId = Date.now().toString()
|
||||
}
|
||||
setChatbotOverrideConfig(parsedConfig.overrideConfig)
|
||||
}
|
||||
|
||||
if (parsedConfig.generateNewSession) {
|
||||
localStorage.removeItem(`${chatflowData.id}_EXTERNAL`)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
setChatbotTheme(parsedConfig)
|
||||
|
||||
@@ -111,8 +111,7 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
|
||||
userMessage: {
|
||||
showAvatar: false
|
||||
},
|
||||
textInput: {},
|
||||
overrideConfig: {}
|
||||
textInput: {}
|
||||
}
|
||||
if (title) obj.title = title
|
||||
if (titleAvatarSrc) obj.titleAvatarSrc = titleAvatarSrc
|
||||
@@ -137,7 +136,7 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
|
||||
if (textInputPlaceholder) obj.textInput.placeholder = textInputPlaceholder
|
||||
if (textInputSendButtonColor) obj.textInput.sendButtonColor = textInputSendButtonColor
|
||||
|
||||
if (isSessionMemory) obj.overrideConfig.generateNewSession = generateNewSession
|
||||
if (isSessionMemory) obj.generateNewSession = generateNewSession
|
||||
|
||||
if (renderHTML) {
|
||||
obj.renderHTML = true
|
||||
@@ -145,8 +144,6 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
|
||||
obj.renderHTML = false
|
||||
}
|
||||
|
||||
if (chatbotConfig?.starterPrompts) obj.starterPrompts = chatbotConfig.starterPrompts
|
||||
|
||||
if (isAgentCanvas) {
|
||||
// if showAgentMessages is undefined, default to true
|
||||
if (showAgentMessages === undefined || showAgentMessages === null) {
|
||||
@@ -156,9 +153,10 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (chatbotConfig?.fullFileUpload) obj.fullFileUpload = chatbotConfig?.fullFileUpload
|
||||
|
||||
return obj
|
||||
return {
|
||||
...chatbotConfig,
|
||||
...obj
|
||||
}
|
||||
}
|
||||
|
||||
const onSave = async () => {
|
||||
|
||||
Reference in New Issue
Block a user