mirror of
https://github.com/langgenius/dify.git
synced 2026-05-01 06:06:35 +08:00
fix: type
This commit is contained in:
parent
0de8596afe
commit
b9b9f8eae3
@ -1,10 +1,15 @@
|
|||||||
import type { StateCreator } from 'zustand'
|
import type { StateCreator } from 'zustand'
|
||||||
|
import type { ToolWithProvider } from '../../types'
|
||||||
|
|
||||||
export type ToolSliceShape = {
|
export type ToolSliceShape = {
|
||||||
toolPublished: boolean
|
toolPublished: boolean
|
||||||
setToolPublished: (toolPublished: boolean) => void
|
setToolPublished: (toolPublished: boolean) => void
|
||||||
lastPublishedHasUserInput: boolean
|
lastPublishedHasUserInput: boolean
|
||||||
setLastPublishedHasUserInput: (hasUserInput: boolean) => void
|
setLastPublishedHasUserInput: (hasUserInput: boolean) => void
|
||||||
|
buildInTools?: ToolWithProvider[]
|
||||||
|
customTools?: ToolWithProvider[]
|
||||||
|
workflowTools?: ToolWithProvider[]
|
||||||
|
mcpTools?: ToolWithProvider[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export const createToolSlice: StateCreator<ToolSliceShape> = set => ({
|
export const createToolSlice: StateCreator<ToolSliceShape> = set => ({
|
||||||
@ -12,4 +17,8 @@ export const createToolSlice: StateCreator<ToolSliceShape> = set => ({
|
|||||||
setToolPublished: toolPublished => set(() => ({ toolPublished })),
|
setToolPublished: toolPublished => set(() => ({ toolPublished })),
|
||||||
lastPublishedHasUserInput: false,
|
lastPublishedHasUserInput: false,
|
||||||
setLastPublishedHasUserInput: hasUserInput => set(() => ({ lastPublishedHasUserInput: hasUserInput })),
|
setLastPublishedHasUserInput: hasUserInput => set(() => ({ lastPublishedHasUserInput: hasUserInput })),
|
||||||
|
buildInTools: undefined,
|
||||||
|
customTools: undefined,
|
||||||
|
workflowTools: undefined,
|
||||||
|
mcpTools: undefined,
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user