feat: add LLM category support and corresponding icon in workflow templates

This commit is contained in:
Johnpaul
2025-08-28 19:15:52 +01:00
parent 4471c069fe
commit a3f026563a
3 changed files with 21 additions and 1 deletions

View File

@@ -577,6 +577,7 @@
"Area Composition": "Area Composition",
"3D": "3D",
"Audio": "Audio",
"LLMs": "LLMs",
"Image API": "Image API",
"Video API": "Video API",
"LLM API": "LLM API",

View File

@@ -303,6 +303,11 @@ export const useWorkflowTemplatesStore = defineStore(
(t) => t.categoryType === 'audio' && !t.isAPI
)
case 'generation-llm':
return enhancedTemplates.value.filter(
(t) => t.tags?.includes('LLM') || t.tags?.includes('Chat')
)
case 'api-nodes':
return enhancedTemplates.value.filter((t) => t.isAPI)
@@ -354,6 +359,9 @@ export const useWorkflowTemplatesStore = defineStore(
const audioCounts = enhancedTemplates.value.filter(
(t) => t.categoryType === 'audio' && !t.isAPI
).length
const llmCounts = enhancedTemplates.value.filter(
(t) => t.tags?.includes('LLM') || t.tags?.includes('Chat')
).length
const threeDCounts = enhancedTemplates.value.filter(
(t) => t.categoryType === '3d' && !t.isAPI
).length
@@ -404,7 +412,8 @@ export const useWorkflowTemplatesStore = defineStore(
imageCounts > 0 ||
videoCounts > 0 ||
threeDCounts > 0 ||
audioCounts > 0
audioCounts > 0 ||
llmCounts > 0
) {
const generationTypeItems: NavItemData[] = []
@@ -440,6 +449,14 @@ export const useWorkflowTemplatesStore = defineStore(
})
}
if (llmCounts > 0) {
generationTypeItems.push({
id: 'generation-llm',
label: st('templateWorkflows.category.LLMs', 'LLMs'),
icon: getCategoryIcon('generation-llm')
})
}
items.push({
title: st(
'templateWorkflows.category.GenerationType',

View File

@@ -16,6 +16,7 @@ export const getCategoryIcon = (categoryId: string): string => {
'3d': 'box',
'generation-audio': 'volume-2',
audio: 'volume-2',
'generation-llm': 'message-square-text',
// API and models
'api-nodes': 'hand-coins',
@@ -24,6 +25,7 @@ export const getCategoryIcon = (categoryId: string): string => {
// LLMs and AI
llm: 'message-square-text',
llms: 'message-square-text',
'llm-api': 'message-square-text',
// Performance and hardware
'small-models': 'zap',