mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-23 15:59:47 +00:00
[feat] Add Partner Nodes virtual category and rename license filter (#6542)
This PR adds a 'Partner Nodes' virtual category that filters templates where OpenSource === false, and renames the 'License' filter to 'Runs on' with values 'ComfyUI' and 'Partner API'. The implementation is backward compatible and works like the existing 'Basics' category - it filters templates from any category without duplication. The filter logic now uses the explicit OpenSource field instead of heuristic detection. This change coordinates with upcoming workflow_templates repo updates that will move API templates to GENERATION TYPE categories and add the OpenSource field to all API node templates. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6542-feat-Add-Partner-Nodes-virtual-category-and-rename-license-filter-29f6d73d36508111a85bdf5017f0a100) by [Unito](https://www.unito.io) --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -114,16 +114,17 @@ export function useTemplateFiltering(
|
||||
}
|
||||
|
||||
return filteredByUseCases.value.filter((template) => {
|
||||
// Check if template has API in its tags or name (indicating it runs on external/remote API)
|
||||
const isApiTemplate =
|
||||
template.tags?.includes('API') ||
|
||||
template.name?.toLowerCase().includes('api_')
|
||||
// Use openSource field to determine where template runs
|
||||
// openSource === false -> External/Remote API
|
||||
// openSource !== false -> ComfyUI (includes true and undefined)
|
||||
const isExternalAPI = template.openSource === false
|
||||
const isComfyUI = template.openSource !== false
|
||||
|
||||
return selectedRunsOn.value.some((selectedRunsOn) => {
|
||||
if (selectedRunsOn === 'External or Remote API') {
|
||||
return isApiTemplate
|
||||
return isExternalAPI
|
||||
} else if (selectedRunsOn === 'ComfyUI') {
|
||||
return !isApiTemplate
|
||||
return isComfyUI
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user