Răsfoiți Sursa

fix(demo): fixed-layout agent node dragable (#525)

xiamidaxia 6 luni în urmă
părinte
comite
6c3feadb42

+ 1 - 0
apps/demo-fixed-layout/src/nodes/agent/memory.ts

@@ -21,6 +21,7 @@ export const MemoryNodeRegistry: FlowNodeRegistry = {
     deleteDisable: true, // memory 不能单独删除,只能通过 agent
     copyDisable: true,
     draggable: false,
+    selectable: false,
   },
   formMeta: defaultFormMeta,
   onAdd() {

+ 1 - 1
apps/demo-fixed-layout/src/nodes/agent/tool.ts

@@ -18,9 +18,9 @@ export const ToolNodeRegistry: FlowNodeRegistry = {
   },
   meta: {
     addDisable: true,
-    deleteDisable: true, // memory 不能单独删除,只能通过 agent
     copyDisable: true,
     draggable: false,
+    selectable: false,
   },
   formMeta: defaultFormMeta,
   onAdd() {

+ 7 - 0
apps/demo-free-layout/src/hooks/use-editor-props.tsx

@@ -159,6 +159,13 @@ export function useEditorProps(
       selectBox: {
         SelectorBoxPopover,
       },
+      scroll: {
+        /**
+         * Whether to restrict the node from rolling out of the canvas needs to be closed because there is a running results pane
+         * 是否限制节点不能滚出画布,由于有运行结果面板,所以需要关闭
+         */
+        enableScrollLimit: false,
+      },
       materials: {
         /**
          * Render Node