mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 15:06:50 +08:00
### What problem does this PR solve? Feat: Render agent setting dialog #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -27,6 +27,7 @@ import {
|
||||
LaptopMinimalCheck,
|
||||
Logs,
|
||||
ScreenShare,
|
||||
Settings,
|
||||
Upload,
|
||||
} from 'lucide-react';
|
||||
import { ComponentPropsWithoutRef, useCallback } from 'react';
|
||||
@ -43,6 +44,7 @@ import {
|
||||
useWatchAgentChange,
|
||||
} from './hooks/use-save-graph';
|
||||
import { useShowEmbedModal } from './hooks/use-show-dialog';
|
||||
import { SettingDialog } from './setting-dialog';
|
||||
import { UploadAgentDialog } from './upload-agent-dialog';
|
||||
import { useAgentHistoryManager } from './use-agent-history-manager';
|
||||
import { VersionDialog } from './version-dialog';
|
||||
@ -92,6 +94,12 @@ export default function Agent() {
|
||||
showModal: showVersionDialog,
|
||||
} = useSetModalState();
|
||||
|
||||
const {
|
||||
visible: settingDialogVisible,
|
||||
hideModal: hideSettingDialog,
|
||||
showModal: showSettingDialog,
|
||||
} = useSetModalState();
|
||||
|
||||
const { showEmbedModal, hideEmbedModal, embedVisible, beta } =
|
||||
useShowEmbedModal();
|
||||
const { navigateToAgentLogs } = useNavigatePage();
|
||||
@ -149,11 +157,6 @@ export default function Agent() {
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
{/* <AgentDropdownMenuItem onClick={openDocument}>
|
||||
<Key />
|
||||
API
|
||||
</AgentDropdownMenuItem> */}
|
||||
{/* <DropdownMenuSeparator /> */}
|
||||
<AgentDropdownMenuItem onClick={handleImportJson}>
|
||||
<Download />
|
||||
{t('flow.import')}
|
||||
@ -163,6 +166,11 @@ export default function Agent() {
|
||||
<Upload />
|
||||
{t('flow.export')}
|
||||
</AgentDropdownMenuItem>
|
||||
<DropdownMenuSeparator />
|
||||
<AgentDropdownMenuItem onClick={showSettingDialog}>
|
||||
<Settings />
|
||||
{t('flow.setting')}
|
||||
</AgentDropdownMenuItem>
|
||||
{location.hostname !== 'demo.ragflow.io' && (
|
||||
<>
|
||||
<DropdownMenuSeparator />
|
||||
@ -201,6 +209,9 @@ export default function Agent() {
|
||||
{versionDialogVisible && (
|
||||
<VersionDialog hideModal={hideVersionDialog}></VersionDialog>
|
||||
)}
|
||||
{settingDialogVisible && (
|
||||
<SettingDialog hideModal={hideSettingDialog}></SettingDialog>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user