mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-16 04:37:21 +08:00
### What problem does this PR solve? Feat: Add agent operator node from agent form #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
17 lines
453 B
TypeScript
17 lines
453 B
TypeScript
import { RAGFlowNodeType } from '@/interfaces/database/flow';
|
|
import { createContext } from 'react';
|
|
import { useAddNode } from './hooks/use-add-node';
|
|
|
|
export const AgentFormContext = createContext<RAGFlowNodeType | undefined>(
|
|
undefined,
|
|
);
|
|
|
|
type AgentInstanceContextType = Pick<
|
|
ReturnType<typeof useAddNode>,
|
|
'addCanvasNode'
|
|
>;
|
|
|
|
export const AgentInstanceContext = createContext<AgentInstanceContextType>(
|
|
{} as AgentInstanceContextType,
|
|
);
|