mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
Feature/add rendering html tags for share chatbot (#3343)
add rendering html tags for share chatbot
This commit is contained in:
@@ -56,6 +56,7 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
|
||||
|
||||
const [isPublicChatflow, setChatflowIsPublic] = useState(chatflow.isPublic ?? false)
|
||||
const [generateNewSession, setGenerateNewSession] = useState(chatbotConfig?.generateNewSession ?? false)
|
||||
const [renderHTML, setRenderHTML] = useState(chatbotConfig?.renderHTML ?? false)
|
||||
|
||||
const [title, setTitle] = useState(chatbotConfig?.title ?? '')
|
||||
const [titleAvatarSrc, setTitleAvatarSrc] = useState(chatbotConfig?.titleAvatarSrc ?? '')
|
||||
@@ -138,6 +139,12 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
|
||||
|
||||
if (isSessionMemory) obj.overrideConfig.generateNewSession = generateNewSession
|
||||
|
||||
if (renderHTML) {
|
||||
obj.overrideConfig.renderHTML = true
|
||||
} else {
|
||||
obj.overrideConfig.renderHTML = false
|
||||
}
|
||||
|
||||
if (chatbotConfig?.starterPrompts) obj.starterPrompts = chatbotConfig.starterPrompts
|
||||
|
||||
if (isAgentCanvas) {
|
||||
@@ -312,6 +319,9 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
|
||||
case 'showAgentMessages':
|
||||
setShowAgentMessages(value)
|
||||
break
|
||||
case 'renderHTML':
|
||||
setRenderHTML(value)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -480,6 +490,13 @@ const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
|
||||
{textField(textInputPlaceholder, 'textInputPlaceholder', 'TextInput Placeholder', 'string', `Type question..`)}
|
||||
{colorField(textInputSendButtonColor, 'textInputSendButtonColor', 'TextIntput Send Button Color')}
|
||||
|
||||
<>
|
||||
<Typography variant='h4' sx={{ mb: 1, mt: 2 }}>
|
||||
Render HTML
|
||||
</Typography>
|
||||
{booleanField(renderHTML, 'renderHTML', 'Render HTML on the chat')}
|
||||
</>
|
||||
|
||||
{/*Session Memory Input*/}
|
||||
{isSessionMemory && (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user