mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Fix: Changed 'HightLightMarkdown' to 'HighLightMarkdown', and replaced the private component with a public component. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
34 lines
1001 B
TypeScript
34 lines
1001 B
TypeScript
import { IModalProps } from '@/interfaces/common';
|
|
import { IFeedbackRequestBody } from '@/interfaces/request/chat';
|
|
import HighLightMarkdown from './highlight-markdown';
|
|
import SvgIcon from './svg-icon';
|
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from './ui/dialog';
|
|
|
|
type PromptDialogProps = IModalProps<IFeedbackRequestBody> & {
|
|
prompt?: string;
|
|
};
|
|
|
|
export function PromptDialog({
|
|
visible,
|
|
hideModal,
|
|
prompt,
|
|
}: PromptDialogProps) {
|
|
return (
|
|
<Dialog open={visible} onOpenChange={hideModal}>
|
|
<DialogContent className="max-w-[80vw]">
|
|
<DialogHeader>
|
|
<DialogTitle>
|
|
<div className="space-x-2">
|
|
<SvgIcon name={`prompt`} width={18}></SvgIcon>
|
|
<span> Prompt</span>
|
|
</div>
|
|
</DialogTitle>
|
|
</DialogHeader>
|
|
<section className="max-h-[80vh] overflow-auto">
|
|
<HighLightMarkdown>{prompt}</HighLightMarkdown>
|
|
</section>
|
|
</DialogContent>
|
|
</Dialog>
|
|
);
|
|
}
|