mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 09:00:05 +00:00
feat: add LLM category support and corresponding icon in workflow templates
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user