mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 23:16:58 +08:00
### What problem does this PR solve? Feat: Share agent dialog box externally #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -27,6 +27,7 @@ interface IProps {
|
||||
showLikeButton: boolean;
|
||||
audioBinary?: string;
|
||||
showLoudspeaker?: boolean;
|
||||
showLog?: boolean;
|
||||
}
|
||||
|
||||
export const AssistantGroupButton = ({
|
||||
@ -36,6 +37,7 @@ export const AssistantGroupButton = ({
|
||||
audioBinary,
|
||||
showLikeButton,
|
||||
showLoudspeaker = true,
|
||||
showLog = true,
|
||||
}: IProps) => {
|
||||
const { visible, hideModal, showModal, onFeedbackOk, loading } =
|
||||
useSendFeedback(messageId);
|
||||
@ -91,9 +93,11 @@ export const AssistantGroupButton = ({
|
||||
<PromptIcon style={{ fontSize: '16px' }} />
|
||||
</Radio.Button>
|
||||
)}
|
||||
<ToggleGroupItem value="f" onClick={handleShowLogSheet}>
|
||||
<NotebookText className="size-4" />
|
||||
</ToggleGroupItem>
|
||||
{showLog && (
|
||||
<ToggleGroupItem value="f" onClick={handleShowLogSheet}>
|
||||
<NotebookText className="size-4" />
|
||||
</ToggleGroupItem>
|
||||
)}
|
||||
</ToggleGroup>
|
||||
{visible && (
|
||||
<FeedbackModal
|
||||
|
||||
@ -49,6 +49,7 @@ interface IProps
|
||||
index: number;
|
||||
showLikeButton?: boolean;
|
||||
showLoudspeaker?: boolean;
|
||||
showLog?: boolean;
|
||||
}
|
||||
|
||||
function MessageItem({
|
||||
@ -65,6 +66,7 @@ function MessageItem({
|
||||
showLoudspeaker = true,
|
||||
visibleAvatar = true,
|
||||
children,
|
||||
showLog,
|
||||
}: IProps) {
|
||||
const { theme } = useTheme();
|
||||
const isAssistant = item.role === MessageType.Assistant;
|
||||
@ -141,6 +143,7 @@ function MessageItem({
|
||||
showLikeButton={showLikeButton}
|
||||
audioBinary={item.audio_binary}
|
||||
showLoudspeaker={showLoudspeaker}
|
||||
showLog={showLog}
|
||||
></AssistantGroupButton>
|
||||
) : (
|
||||
<UserGroupButton
|
||||
|
||||
Reference in New Issue
Block a user