mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Recommend Simple Vector Store even if WF has no AI nodes (#16514)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user