From a691951f6de76210bc0738b0851898ec9d07f6ea Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 10:18:38 +0000 Subject: [PATCH] Fix: Update plugin configuration - add history plugin and configure minimap size - Changed plugins to function returning array - Added createHistoryNodePlugin for undo/redo support - Configured minimap with smaller size (150x100px) - Updated createPanelManagerPlugin with factories and layerProps - All plugin creation functions now receive proper parameters Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --- package.json | 1 + pnpm-lock.yaml | 3 +++ .../scenario/flowgram/hooks/use-editor-props.tsx | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 925948d8..1ff0b727 100644 --- a/package.json +++ b/package.json @@ -112,6 +112,7 @@ "@flowgram.ai/free-node-panel-plugin": "1.0.2", "@flowgram.ai/free-snap-plugin": "1.0.2", "@flowgram.ai/free-stack-plugin": "1.0.2", + "@flowgram.ai/history-node-plugin": "1.0.2", "@flowgram.ai/minimap-plugin": "1.0.2", "@flowgram.ai/panel-manager-plugin": "1.0.2", "@flowgram.ai/runtime-interface": "1.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bbf8d838..e58bf943 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -171,6 +171,9 @@ devDependencies: '@flowgram.ai/free-stack-plugin': specifier: 1.0.2 version: 1.0.2(react-dom@18.3.1)(react@18.3.1) + '@flowgram.ai/history-node-plugin': + specifier: 1.0.2 + version: 1.0.2(react-dom@18.3.1)(react@18.3.1) '@flowgram.ai/minimap-plugin': specifier: 1.0.2 version: 1.0.2(react-dom@18.3.1)(react@18.3.1) diff --git a/src/pages/scenario/flowgram/hooks/use-editor-props.tsx b/src/pages/scenario/flowgram/hooks/use-editor-props.tsx index 9d8264f9..74293cbb 100644 --- a/src/pages/scenario/flowgram/hooks/use-editor-props.tsx +++ b/src/pages/scenario/flowgram/hooks/use-editor-props.tsx @@ -5,6 +5,7 @@ import { createFreeLinesPlugin } from '@flowgram.ai/free-lines-plugin'; import { createFreeNodePanelPlugin } from '@flowgram.ai/free-node-panel-plugin'; import { createMinimapPlugin } from '@flowgram.ai/minimap-plugin'; import { createPanelManagerPlugin } from '@flowgram.ai/panel-manager-plugin'; +import { createHistoryNodePlugin } from '@flowgram.ai/history-node-plugin'; import { FlowNodeRegistry } from '../nodes/http'; export function useEditorProps( @@ -25,8 +26,19 @@ export function useEditorProps( createFreeSnapPlugin({}), createFreeLinesPlugin({}), createFreeNodePanelPlugin({}), - createMinimapPlugin({}), - createPanelManagerPlugin({}), + createHistoryNodePlugin(), + createMinimapPlugin({ + style: { + width: '150px', + height: '100px', + bottom: '20px', + right: '20px', + }, + }), + createPanelManagerPlugin({ + factories: [], + layerProps: {}, + }), ], onChange: (data) => { console.log('Workflow changed:', data);