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(web): copy button visible at chat page normally (#4005)

Rhon Joe0704fe9695e1
diff --git a/web/app/components/app/chat/answer/index.tsx b/web/app/components/app/chat/answer/index.tsx
index f96c91d57b3..49dd817255b 100644
--- a/web/app/components/app/chat/answer/index.tsx
+++ b/web/app/components/app/chat/answer/index.tsx
@@ -362,7 +362,7 @@ const Answer: FC<IAnswerProps> = ({
{!item.isOpeningStatement && (
<CopyBtn
value={content}
- className={cn(s.copyBtn, 'mr-1')}
+ className='mr-1'
/>
)}
{((isShowPromptLog && !isResponding) || (!item.isOpeningStatement && isShowTextToSpeech)) && (
diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsx
index be1a45476a2..054ae04f6f8 100644
--- a/web/app/components/base/markdown.tsx
+++ b/web/app/components/base/markdown.tsx
@@ -12,7 +12,6 @@ import cn from 'classnames'
import CopyBtn from '@/app/components/app/chat/copy-btn'
import SVGBtn from '@/app/components/app/chat/svg'
import Flowchart from '@/app/components/app/chat/mermaid'
-import s from '@/app/components/app/chat/style.module.css'
// Available language https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/master/AVAILABLE_LANGUAGES_HLJS.MD
const capitalizationLanguageNameMap: Record<string, string> = {
@@ -113,7 +112,7 @@ export function Markdown(props: { content: string; className?: string }) {
/>
}
<CopyBtn
- className={cn(s.copyBtn, 'mr-1')}
+ className='mr-1'
value={String(children).replace(/\n$/, '')}
isPlain
/>