mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 03:16:51 +08:00
Feat/attachments (#9526)
Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: JzoNg <jzongcode@gmail.com>
This commit is contained in:
@@ -109,6 +109,8 @@ type Shape = {
|
||||
setEnvSecrets: (envSecrets: Record<string, string>) => void
|
||||
showChatVariablePanel: boolean
|
||||
setShowChatVariablePanel: (showChatVariablePanel: boolean) => void
|
||||
showGlobalVariablePanel: boolean
|
||||
setShowGlobalVariablePanel: (showGlobalVariablePanel: boolean) => void
|
||||
conversationVariables: ConversationVariable[]
|
||||
setConversationVariables: (conversationVariables: ConversationVariable[]) => void
|
||||
selection: null | { x1: number; y1: number; x2: number; y2: number }
|
||||
@@ -167,6 +169,12 @@ type Shape = {
|
||||
}
|
||||
|
||||
export const createWorkflowStore = () => {
|
||||
const hideAllPanel = {
|
||||
showDebugAndPreviewPanel: false,
|
||||
showEnvPanel: false,
|
||||
showChatVariablePanel: false,
|
||||
showGlobalVariablePanel: false,
|
||||
}
|
||||
return createStore<Shape>(set => ({
|
||||
appId: '',
|
||||
panelWidth: localStorage.getItem('workflow-node-panel-width') ? parseFloat(localStorage.getItem('workflow-node-panel-width')!) : 420,
|
||||
@@ -227,6 +235,13 @@ export const createWorkflowStore = () => {
|
||||
setEnvSecrets: envSecrets => set(() => ({ envSecrets })),
|
||||
showChatVariablePanel: false,
|
||||
setShowChatVariablePanel: showChatVariablePanel => set(() => ({ showChatVariablePanel })),
|
||||
showGlobalVariablePanel: false,
|
||||
setShowGlobalVariablePanel: showGlobalVariablePanel => set(() => {
|
||||
if (showGlobalVariablePanel)
|
||||
return { ...hideAllPanel, showGlobalVariablePanel: true }
|
||||
else
|
||||
return { showGlobalVariablePanel: false }
|
||||
}),
|
||||
conversationVariables: [],
|
||||
setConversationVariables: conversationVariables => set(() => ({ conversationVariables })),
|
||||
selection: null,
|
||||
|
||||
Reference in New Issue
Block a user