mirror of
https://github.com/langgenius/dify.git
synced 2026-02-25 05:04:25 -05:00
13 lines
482 B
TypeScript
13 lines
482 B
TypeScript
import type { CreateSubGraphSlice, SubGraphSliceShape } from '../types'
|
|
|
|
const initialState: Omit<SubGraphSliceShape, 'setParentAvailableVars' | 'setParentAvailableNodes'> = {
|
|
parentAvailableVars: [],
|
|
parentAvailableNodes: [],
|
|
}
|
|
|
|
export const createSubGraphSlice: CreateSubGraphSlice = set => ({
|
|
...initialState,
|
|
setParentAvailableVars: vars => set(() => ({ parentAvailableVars: vars })),
|
|
setParentAvailableNodes: nodes => set(() => ({ parentAvailableNodes: nodes })),
|
|
})
|