Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Restore useLabelStore mistakenly removed in commit 403e2d58 (#24052)

Yongtao Huangff52a54fef8d
diff --git a/web/app/components/tools/labels/store.ts b/web/app/components/tools/labels/store.ts
new file mode 100644
index 00000000000..c19991dfd4e
--- /dev/null
+++ b/web/app/components/tools/labels/store.ts
@@ -0,0 +1,15 @@
+import { create } from 'zustand'
+import type { Label } from './constant'
+
+type State = {
+ labelList: Label[]
+}
+
+type Action = {
+ setLabelList: (labelList?: Label[]) => void
+}
+
+export const useStore = create<State & Action>(set => ({
+ labelList: [],
+ setLabelList: labelList => set(() => ({ labelList })),
+}))