mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: Fixed the issue that the top toolbar disappears when opening the agent operator form #3221 (#8579)
### What problem does this PR solve? Feat: Fixed the issue that the top toolbar disappears when opening the agent operator form #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -78,7 +78,7 @@ function Root({ children }: React.PropsWithChildren) {
|
|||||||
}}
|
}}
|
||||||
locale={locale}
|
locale={locale}
|
||||||
>
|
>
|
||||||
<SidebarProvider>
|
<SidebarProvider className="h-full">
|
||||||
<App>{children}</App>
|
<App>{children}</App>
|
||||||
</SidebarProvider>
|
</SidebarProvider>
|
||||||
<Sonner position={'top-right'} expand richColors closeButton></Sonner>
|
<Sonner position={'top-right'} expand richColors closeButton></Sonner>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
.canvasWrapper {
|
.canvasWrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: calc(100% - 64px);
|
||||||
:global(.react-flow__node-group) {
|
:global(.react-flow__node-group) {
|
||||||
.commonNode();
|
.commonNode();
|
||||||
border-radius: 0 0 10px 10px;
|
border-radius: 0 0 10px 10px;
|
||||||
|
|||||||
@ -174,6 +174,7 @@ function AgentCanvas({ drawerVisible, hideDrawer }: IProps) {
|
|||||||
isValidConnection={isValidConnection}
|
isValidConnection={isValidConnection}
|
||||||
onEdgeMouseEnter={onEdgeMouseEnter}
|
onEdgeMouseEnter={onEdgeMouseEnter}
|
||||||
onEdgeMouseLeave={onEdgeMouseLeave}
|
onEdgeMouseLeave={onEdgeMouseLeave}
|
||||||
|
className="h-full"
|
||||||
defaultEdgeOptions={{
|
defaultEdgeOptions={{
|
||||||
type: 'buttonEdge',
|
type: 'buttonEdge',
|
||||||
markerEnd: 'logo',
|
markerEnd: 'logo',
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import {
|
|||||||
DropdownMenuSeparator,
|
DropdownMenuSeparator,
|
||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
} from '@/components/ui/dropdown-menu';
|
} from '@/components/ui/dropdown-menu';
|
||||||
import { SidebarProvider } from '@/components/ui/sidebar';
|
|
||||||
import { useSetModalState } from '@/hooks/common-hooks';
|
import { useSetModalState } from '@/hooks/common-hooks';
|
||||||
import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
|
import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
|
||||||
import { ReactFlowProvider } from '@xyflow/react';
|
import { ReactFlowProvider } from '@xyflow/react';
|
||||||
@ -70,7 +69,7 @@ export default function Agent() {
|
|||||||
}, [getBeginNodeDataQuery, handleRun, showChatDrawer]);
|
}, [getBeginNodeDataQuery, handleRun, showChatDrawer]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section>
|
<section className="h-full">
|
||||||
<PageHeader back={navigateToAgentList} title={flowDetail.title}>
|
<PageHeader back={navigateToAgentList} title={flowDetail.title}>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<ButtonLoading
|
<ButtonLoading
|
||||||
@ -116,18 +115,10 @@ export default function Agent() {
|
|||||||
</div>
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
<ReactFlowProvider>
|
<ReactFlowProvider>
|
||||||
<div>
|
<AgentCanvas
|
||||||
<SidebarProvider>
|
drawerVisible={chatDrawerVisible}
|
||||||
<div className="w-full">
|
hideDrawer={hideChatDrawer}
|
||||||
<div className="w-full h-full">
|
></AgentCanvas>
|
||||||
<AgentCanvas
|
|
||||||
drawerVisible={chatDrawerVisible}
|
|
||||||
hideDrawer={hideChatDrawer}
|
|
||||||
></AgentCanvas>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</SidebarProvider>
|
|
||||||
</div>
|
|
||||||
</ReactFlowProvider>
|
</ReactFlowProvider>
|
||||||
{fileUploadVisible && (
|
{fileUploadVisible && (
|
||||||
<UploadAgentDialog
|
<UploadAgentDialog
|
||||||
|
|||||||
Reference in New Issue
Block a user