Browse Source

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)
tags/v0.20.0
balibabu 4 months ago
parent
commit
40b1684c1e
No account linked to committer's email address

+ 1
- 1
web/src/app.tsx View File

@@ -78,7 +78,7 @@ function Root({ children }: React.PropsWithChildren) {
}}
locale={locale}
>
<SidebarProvider>
<SidebarProvider className="h-full">
<App>{children}</App>
</SidebarProvider>
<Sonner position={'top-right'} expand richColors closeButton></Sonner>

+ 1
- 1
web/src/pages/agent/canvas/index.less View File

@@ -1,6 +1,6 @@
.canvasWrapper {
position: relative;
height: 100%;
height: calc(100% - 64px);
:global(.react-flow__node-group) {
.commonNode();
border-radius: 0 0 10px 10px;

+ 1
- 0
web/src/pages/agent/canvas/index.tsx View File

@@ -174,6 +174,7 @@ function AgentCanvas({ drawerVisible, hideDrawer }: IProps) {
isValidConnection={isValidConnection}
onEdgeMouseEnter={onEdgeMouseEnter}
onEdgeMouseLeave={onEdgeMouseLeave}
className="h-full"
defaultEdgeOptions={{
type: 'buttonEdge',
markerEnd: 'logo',

+ 5
- 14
web/src/pages/agent/index.tsx View File

@@ -7,7 +7,6 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import { SidebarProvider } from '@/components/ui/sidebar';
import { useSetModalState } from '@/hooks/common-hooks';
import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
import { ReactFlowProvider } from '@xyflow/react';
@@ -70,7 +69,7 @@ export default function Agent() {
}, [getBeginNodeDataQuery, handleRun, showChatDrawer]);

return (
<section>
<section className="h-full">
<PageHeader back={navigateToAgentList} title={flowDetail.title}>
<div className="flex items-center gap-2">
<ButtonLoading
@@ -116,18 +115,10 @@ export default function Agent() {
</div>
</PageHeader>
<ReactFlowProvider>
<div>
<SidebarProvider>
<div className="w-full">
<div className="w-full h-full">
<AgentCanvas
drawerVisible={chatDrawerVisible}
hideDrawer={hideChatDrawer}
></AgentCanvas>
</div>
</div>
</SidebarProvider>
</div>
<AgentCanvas
drawerVisible={chatDrawerVisible}
hideDrawer={hideChatDrawer}
></AgentCanvas>
</ReactFlowProvider>
{fileUploadVisible && (
<UploadAgentDialog

Loading…
Cancel
Save