You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

context.ts 453B

12345678910111213141516
  1. import { RAGFlowNodeType } from '@/interfaces/database/flow';
  2. import { createContext } from 'react';
  3. import { useAddNode } from './hooks/use-add-node';
  4. export const AgentFormContext = createContext<RAGFlowNodeType | undefined>(
  5. undefined,
  6. );
  7. type AgentInstanceContextType = Pick<
  8. ReturnType<typeof useAddNode>,
  9. 'addCanvasNode'
  10. >;
  11. export const AgentInstanceContext = createContext<AgentInstanceContextType>(
  12. {} as AgentInstanceContextType,
  13. );