Feat: Click the edit tool button of the agent form to open the corresponding form #3221 (#9071)

### What problem does this PR solve?

Feat: Click the edit tool button of the agent form to open the
corresponding form #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-28 16:48:59 +08:00
committed by GitHub
parent 381f9df941
commit 35b1a5b7e0
6 changed files with 72 additions and 23 deletions

View File

@ -116,6 +116,7 @@ function AgentCanvas({ drawerVisible, hideDrawer }: IProps) {
runVisible,
hideRunOrChatDrawer,
showChatModal,
showFormDrawer,
} = useShowDrawer({
drawerVisible,
hideDrawer,
@ -175,7 +176,7 @@ function AgentCanvas({ drawerVisible, hideDrawer }: IProps) {
</marker>
</defs>
</svg>
<AgentInstanceContext.Provider value={{ addCanvasNode }}>
<AgentInstanceContext.Provider value={{ addCanvasNode, showFormDrawer }}>
<ReactFlow
connectionMode={ConnectionMode.Loose}
nodes={nodes}
@ -228,7 +229,9 @@ function AgentCanvas({ drawerVisible, hideDrawer }: IProps) {
ref={ref}
></NotebookPen>
{formDrawerVisible && (
<AgentInstanceContext.Provider value={{ addCanvasNode }}>
<AgentInstanceContext.Provider
value={{ addCanvasNode, showFormDrawer }}
>
<FormSheet
node={clickedNode}
visible={formDrawerVisible}