Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix(web): style think/retrieving blocks in floating chat widget (#18512)

chanxa7f408390beb
diff --git a/web/src/components/floating-chat-widget-markdown.module.less b/web/src/components/floating-chat-widget-markdown.module.less
index 5de0ac3af5..9fa5466354 100644
--- a/web/src/components/floating-chat-widget-markdown.module.less
+++ b/web/src/components/floating-chat-widget-markdown.module.less
@@ -59,6 +59,32 @@
line-height: 1.6;
}
+ :global(details.think),
+ :global(details.retrieving) {
+ padding-inline-start: 0px;
+ margin-bottom: 10px;
+ font-size: 12px;
+ color: rgb(var(--text-secondary));
+
+ summary {
+ cursor: pointer;
+ font-weight: 500;
+ user-select: none;
+ color: var(--text-secondary);
+ &:hover {
+ color: rgb(var(--text-secondary));
+ }
+ }
+ }
+
+ :global(details.think) {
+ border-inline-start: 2px solid var(--border-default);
+ }
+
+ :global(details.retrieving) {
+ border-inline-start: 2px solid var(--border-button);
+ }
+
/* Enhanced image styles */
img,
.ant-image,
diff --git a/web/src/components/floating-chat-widget-markdown.tsx b/web/src/components/floating-chat-widget-markdown.tsx
index 142fe4eba4..d996d85575 100644
--- a/web/src/components/floating-chat-widget-markdown.tsx
+++ b/web/src/components/floating-chat-widget-markdown.tsx
@@ -317,7 +317,7 @@ const FloatingChatWidgetMarkdown = ({
const dir = getDirAttribute(content.replace(citationMarkerReg, ''));
return (
- <div className="floating-chat-widget" dir={dir}>
+ <div className={styles['floating-chat-widget']} dir={dir}>
<Markdown
rehypePlugins={[rehypeRaw, rehypeWrapReference, rehypeKatex]}
remarkPlugins={MarkdownRemarkPlugins}