Feat: Avoid the form sheet covering the chat sheet #3221 (#8768)

### What problem does this PR solve?

Feat: Avoid the form sheet covering the chat sheet #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-10 13:48:12 +08:00
committed by GitHub
parent cedcd13204
commit 2e0905d06a
4 changed files with 9 additions and 9 deletions

View File

@ -233,6 +233,7 @@ function AgentCanvas({ drawerVisible, hideDrawer }: IProps) {
node={clickedNode} node={clickedNode}
visible={formDrawerVisible} visible={formDrawerVisible}
hideModal={hideFormDrawer} hideModal={hideFormDrawer}
chatVisible={chatVisible}
singleDebugDrawerVisible={singleDebugDrawerVisible} singleDebugDrawerVisible={singleDebugDrawerVisible}
hideSingleDebugDrawer={hideSingleDebugDrawer} hideSingleDebugDrawer={hideSingleDebugDrawer}
showSingleDebugDrawer={showSingleDebugDrawer} showSingleDebugDrawer={showSingleDebugDrawer}

View File

@ -25,6 +25,7 @@ interface IProps {
singleDebugDrawerVisible: IModalProps<any>['visible']; singleDebugDrawerVisible: IModalProps<any>['visible'];
hideSingleDebugDrawer: IModalProps<any>['hideModal']; hideSingleDebugDrawer: IModalProps<any>['hideModal'];
showSingleDebugDrawer: IModalProps<any>['showModal']; showSingleDebugDrawer: IModalProps<any>['showModal'];
chatVisible: boolean;
} }
const EmptyContent = () => <div></div>; const EmptyContent = () => <div></div>;
@ -34,6 +35,7 @@ const FormSheet = ({
hideModal, hideModal,
node, node,
singleDebugDrawerVisible, singleDebugDrawerVisible,
chatVisible,
hideSingleDebugDrawer, hideSingleDebugDrawer,
showSingleDebugDrawer, showSingleDebugDrawer,
}: IModalProps<any> & IProps) => { }: IModalProps<any> & IProps) => {
@ -55,7 +57,9 @@ const FormSheet = ({
return ( return (
<Sheet open={visible} modal={false}> <Sheet open={visible} modal={false}>
<SheetContent <SheetContent
className={cn('top-20 p-0 flex flex-col pb-20')} className={cn('top-20 p-0 flex flex-col pb-20', {
'right-[620px]': chatVisible,
})}
closeIcon={false} closeIcon={false}
> >
<SheetHeader> <SheetHeader>

View File

@ -119,7 +119,7 @@ export function useShowDrawer({
(e, node) => { (e, node) => {
if (!ExcludedNodes.some((x) => x === node.data.label)) { if (!ExcludedNodes.some((x) => x === node.data.label)) {
hideSingleDebugDrawer(); hideSingleDebugDrawer();
hideRunOrChatDrawer(); // hideRunOrChatDrawer();
showFormDrawer(e, node); showFormDrawer(e, node);
} }
// handle single debug icon click // handle single debug icon click
@ -130,12 +130,7 @@ export function useShowDrawer({
showSingleDebugDrawer(); showSingleDebugDrawer();
} }
}, },
[ [hideSingleDebugDrawer, showFormDrawer, showSingleDebugDrawer],
hideRunOrChatDrawer,
hideSingleDebugDrawer,
showFormDrawer,
showSingleDebugDrawer,
],
); );
return { return {

View File

@ -149,7 +149,7 @@ export function LogSheet({
return ( return (
<Sheet open onOpenChange={hideModal} modal={false}> <Sheet open onOpenChange={hideModal} modal={false}>
<SheetContent className="top-20 right-[440px]"> <SheetContent className="top-20 right-[620px]">
<SheetHeader> <SheetHeader>
<SheetTitle className="flex items-center gap-1"> <SheetTitle className="flex items-center gap-1">
<NotebookText className="size-4" /> <NotebookText className="size-4" />