Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: webapp answer icon (#9654)

zxhlyh3ae05a672d88
diff --git a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx
index ea68953fffd..e632b14969f 100644
--- a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx
+++ b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx
@@ -15,6 +15,7 @@ import {
getUrl,
stopChatMessageResponding,
} from '@/service/share'
+import AnswerIcon from '@/app/components/base/answer-icon'
const ChatWrapper = () => {
const {
@@ -87,7 +88,6 @@ const ChatWrapper = () => {
)
}, [
chatListRef,
- appConfig,
currentConversationId,
currentConversationItem,
handleSend,
@@ -150,6 +150,15 @@ const ChatWrapper = () => {
isMobile,
])
+ const answerIcon = (appData?.site && appData.site.use_icon_as_answer_icon)
+ ? <AnswerIcon
+ iconType={appData.site.icon_type}
+ icon={appData.site.icon}
+ background={appData.site.icon_background}
+ imageUrl={appData.site.icon_url}
+ />
+ : null
+
return (
<div
className='h-full bg-chatbot-bg overflow-hidden'
@@ -171,6 +180,7 @@ const ChatWrapper = () => {
allToolIcons={appMeta?.tool_icons || {}}
onFeedback={handleFeedback}
suggestedQuestions={suggestedQuestions}
+ answerIcon={answerIcon}
hideProcessDetail
themeBuilder={themeBuilder}
/>