From 7d8049b7f9ea9ea1500034ec3483d1c63d9a5136 Mon Sep 17 00:00:00 2001 From: Jaakko Husso Date: Thu, 19 Jun 2025 18:12:05 +0300 Subject: [PATCH] fix(editor): Recommend Simple Vector Store even if WF has no AI nodes (#16514) --- .../Node/NodeCreator/composables/useViewStacks.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/frontend/editor-ui/src/components/Node/NodeCreator/composables/useViewStacks.ts b/packages/frontend/editor-ui/src/components/Node/NodeCreator/composables/useViewStacks.ts index 327171f399..0b9fdb0caa 100644 --- a/packages/frontend/editor-ui/src/components/Node/NodeCreator/composables/useViewStacks.ts +++ b/packages/frontend/editor-ui/src/components/Node/NodeCreator/composables/useViewStacks.ts @@ -241,8 +241,12 @@ export const useViewStacks = defineStore('nodeCreatorViewStacks', () => { ) { const aiNodes = items.filter((node): node is NodeCreateElement => isAINode(node)); const canvasHasAINodes = useCanvasStore().aiNodes.length > 0; + const isVectorStoresCategory = stackCategory === AI_CATEGORY_VECTOR_STORES; - if (aiNodes.length > 0 && (canvasHasAINodes || isAiRootView(getLastActiveStack()))) { + if ( + aiNodes.length > 0 && + (canvasHasAINodes || isAiRootView(getLastActiveStack()) || isVectorStoresCategory) + ) { const sectionsMap = new Map(); const aiRootNodes = filterAiRootNodes(aiNodes); const aiSubNodes = difference(aiNodes, aiRootNodes);