mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 15:06:50 +08:00
Feat: Make the agent dialog window exposed to the outside world fill in the begin form #3221 (#9124)
### What problem does this PR solve? Feat: Make the agent dialog window exposed to the outside world fill in the begin form #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -18,7 +18,6 @@ import {
|
||||
import { SharedFrom } from '@/constants/chat';
|
||||
import { useSetModalState } from '@/hooks/common-hooks';
|
||||
import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
|
||||
import { useFetchUserInfo } from '@/hooks/user-setting-hooks';
|
||||
import { ReactFlowProvider } from '@xyflow/react';
|
||||
import {
|
||||
ChevronDown,
|
||||
@ -37,10 +36,7 @@ import AgentCanvas from './canvas';
|
||||
import EmbedDialog from './embed-dialog';
|
||||
import { useHandleExportOrImportJsonFile } from './hooks/use-export-json';
|
||||
import { useFetchDataOnMount } from './hooks/use-fetch-data';
|
||||
import {
|
||||
useGetBeginNodeDataInputs,
|
||||
useGetBeginNodeDataQueryIsSafe,
|
||||
} from './hooks/use-get-begin-query';
|
||||
import { useGetBeginNodeDataInputs } from './hooks/use-get-begin-query';
|
||||
import {
|
||||
useSaveGraph,
|
||||
useSaveGraphBeforeOpeningDebugDrawer,
|
||||
@ -69,7 +65,6 @@ export default function Agent() {
|
||||
showModal: showChatDrawer,
|
||||
} = useSetModalState();
|
||||
const { t } = useTranslation();
|
||||
const { data: userInfo } = useFetchUserInfo();
|
||||
|
||||
// const openDocument = useOpenDocument();
|
||||
const {
|
||||
@ -99,7 +94,6 @@ export default function Agent() {
|
||||
const { showEmbedModal, hideEmbedModal, embedVisible, beta } =
|
||||
useShowEmbedModal();
|
||||
const { navigateToAgentLogs } = useNavigatePage();
|
||||
const isBeginNodeDataQuerySafe = useGetBeginNodeDataQueryIsSafe();
|
||||
|
||||
return (
|
||||
<section className="h-full">
|
||||
@ -165,13 +159,7 @@ export default function Agent() {
|
||||
{location.hostname !== 'demo.ragflow.io' && (
|
||||
<>
|
||||
<DropdownMenuSeparator />
|
||||
<AgentDropdownMenuItem
|
||||
onClick={showEmbedModal}
|
||||
disabled={
|
||||
!isBeginNodeDataQuerySafe ||
|
||||
userInfo.nickname !== agentDetail.nickname
|
||||
}
|
||||
>
|
||||
<AgentDropdownMenuItem onClick={showEmbedModal}>
|
||||
<ScreenShare />
|
||||
{t('common.embedIntoSite')}
|
||||
</AgentDropdownMenuItem>
|
||||
|
||||
Reference in New Issue
Block a user