mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
Bugfix/show agent messages status on sharechatbot (#3851)
fix show agent messages status on sharechatbot
This commit is contained in:
@@ -72,7 +72,15 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
|
|||||||
const [backgroundColor, setBackgroundColor] = useState(chatbotConfig?.backgroundColor ?? defaultConfig.backgroundColor)
|
const [backgroundColor, setBackgroundColor] = useState(chatbotConfig?.backgroundColor ?? defaultConfig.backgroundColor)
|
||||||
const [fontSize, setFontSize] = useState(chatbotConfig?.fontSize ?? defaultConfig.fontSize)
|
const [fontSize, setFontSize] = useState(chatbotConfig?.fontSize ?? defaultConfig.fontSize)
|
||||||
const [poweredByTextColor, setPoweredByTextColor] = useState(chatbotConfig?.poweredByTextColor ?? defaultConfig.poweredByTextColor)
|
const [poweredByTextColor, setPoweredByTextColor] = useState(chatbotConfig?.poweredByTextColor ?? defaultConfig.poweredByTextColor)
|
||||||
const [showAgentMessages, setShowAgentMessages] = useState(chatbotConfig?.showAgentMessages || (isAgentCanvas ? true : undefined))
|
|
||||||
|
const getShowAgentMessagesStatus = () => {
|
||||||
|
if (chatbotConfig?.showAgentMessages !== undefined) {
|
||||||
|
return chatbotConfig?.showAgentMessages
|
||||||
|
} else {
|
||||||
|
return isAgentCanvas ? true : undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const [showAgentMessages, setShowAgentMessages] = useState(getShowAgentMessagesStatus())
|
||||||
|
|
||||||
const [botMessageBackgroundColor, setBotMessageBackgroundColor] = useState(
|
const [botMessageBackgroundColor, setBotMessageBackgroundColor] = useState(
|
||||||
chatbotConfig?.botMessage?.backgroundColor ?? defaultConfig.botMessage.backgroundColor
|
chatbotConfig?.botMessage?.backgroundColor ?? defaultConfig.botMessage.backgroundColor
|
||||||
|
|||||||
Reference in New Issue
Block a user