fix: type

This commit is contained in:
lyzno1 2025-10-30 17:24:36 +08:00
parent 0de8596afe
commit b9b9f8eae3
No known key found for this signature in database
1 changed files with 9 additions and 0 deletions

View File

@ -1,10 +1,15 @@
import type { StateCreator } from 'zustand'
import type { ToolWithProvider } from '../../types'
export type ToolSliceShape = {
toolPublished: boolean
setToolPublished: (toolPublished: boolean) => void
lastPublishedHasUserInput: boolean
setLastPublishedHasUserInput: (hasUserInput: boolean) => void
buildInTools?: ToolWithProvider[]
customTools?: ToolWithProvider[]
workflowTools?: ToolWithProvider[]
mcpTools?: ToolWithProvider[]
}
export const createToolSlice: StateCreator<ToolSliceShape> = set => ({
@ -12,4 +17,8 @@ export const createToolSlice: StateCreator<ToolSliceShape> = set => ({
setToolPublished: toolPublished => set(() => ({ toolPublished })),
lastPublishedHasUserInput: false,
setLastPublishedHasUserInput: hasUserInput => set(() => ({ lastPublishedHasUserInput: hasUserInput })),
buildInTools: undefined,
customTools: undefined,
workflowTools: undefined,
mcpTools: undefined,
})