Feat: Delete the operator node and hide the corresponding sheet #3221 (#9142)

### What problem does this PR solve?

Feat: Delete the operator node and hide the corresponding sheet #3221
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-08-01 09:38:48 +08:00
committed by GitHub
parent 89c2067a16
commit 0aa160a990
8 changed files with 55 additions and 19 deletions

View File

@ -32,7 +32,11 @@ import { useAddNode } from '../hooks/use-add-node';
import { useBeforeDelete } from '../hooks/use-before-delete';
import { useCacheChatLog } from '../hooks/use-cache-chat-log';
import { useMoveNote } from '../hooks/use-move-note';
import { useShowDrawer, useShowLogSheet } from '../hooks/use-show-drawer';
import {
useHideFormSheetOnNodeDeletion,
useShowDrawer,
useShowLogSheet,
} from '../hooks/use-show-drawer';
import { LogSheet } from '../log-sheet';
import RunSheet from '../run-sheet';
import { ButtonEdge } from './edge';
@ -160,6 +164,9 @@ function AgentCanvas({ drawerVisible, hideDrawer }: IProps) {
setLastSendLoading(false);
}
};
useHideFormSheetOnNodeDeletion({ hideFormDrawer });
return (
<div className={styles.canvasWrapper}>
<svg

View File

@ -33,7 +33,7 @@ function InnerBeginNode({ data, id, selected }: NodeProps<IBeginNode>) {
id={NodeHandleId.Start}
></CommonHandle>
<section className="flex items-center justify-center gap-2">
<section className="flex items-center gap-2">
<OperatorIcon name={data.label as Operator}></OperatorIcon>
<div className="truncate text-center font-semibold text-sm">
{t(`flow.begin`)}

View File

@ -56,7 +56,7 @@ function NoteNode({ data, id, selected }: NodeProps<INoteNode>) {
<section className="px-1 py-2 flex gap-2 bg-background-highlight items-center note-drag-handle rounded-s-md">
<NotebookPen className="size-4" />
<Form {...nameForm}>
<form>
<form className="flex-1">
<FormField
control={nameForm.control}
name="name"