fix(editor): Recommend Simple Vector Store even if WF has no AI nodes (#16514)

This commit is contained in:
Jaakko Husso
2025-06-19 18:12:05 +03:00
committed by GitHub
parent bb7c68f6bf
commit 7d8049b7f9

View File

@@ -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<string, NodeViewItemSection>();
const aiRootNodes = filterAiRootNodes(aiNodes);
const aiSubNodes = difference(aiNodes, aiRootNodes);