diff --git a/src/components/searchbox/NodeSearchBox.vue b/src/components/searchbox/NodeSearchBox.vue
index b918a0df5..7f899673c 100644
--- a/src/components/searchbox/NodeSearchBox.vue
+++ b/src/components/searchbox/NodeSearchBox.vue
@@ -36,7 +36,7 @@
:python_module="option.python_module"
/>
-
+
{{ option.category.replaceAll('/', ' > ') }}
@@ -70,6 +70,9 @@ const settingStore = useSettingStore()
const enableNodePreview = computed(() =>
settingStore.get('Comfy.NodeSearchBoxImpl.NodePreview')
)
+const showCategory = computed(() =>
+ settingStore.get('Comfy.NodeSearchBoxImpl.ShowCategory')
+)
const props = defineProps({
filters: {
diff --git a/src/stores/settingStore.ts b/src/stores/settingStore.ts
index 0030edfdb..98550ba81 100644
--- a/src/stores/settingStore.ts
+++ b/src/stores/settingStore.ts
@@ -95,6 +95,15 @@ export const useSettingStore = defineStore('setting', {
defaultValue: true
})
+ app.ui.settings.addSetting({
+ id: 'Comfy.NodeSearchBoxImpl.ShowCategory',
+ category: ['Comfy', 'Node Search Box', 'ShowCategory'],
+ name: 'Show node category in search results',
+ tooltip: 'Only applies to the default implementation',
+ type: 'boolean',
+ defaultValue: true
+ })
+
app.ui.settings.addSetting({
id: 'Comfy.Sidebar.Location',
category: ['Comfy', 'Sidebar', 'Location'],
diff --git a/src/types/apiTypes.ts b/src/types/apiTypes.ts
index 6ce36155e..250ec8813 100644
--- a/src/types/apiTypes.ts
+++ b/src/types/apiTypes.ts
@@ -417,6 +417,7 @@ const zSettings = z.record(z.any()).and(
]),
'Comfy.NodeSearchBoxImpl.NodePreview': z.boolean(),
'Comfy.NodeSearchBoxImpl': z.enum(['default', 'simple']),
+ 'Comfy.NodeSearchBoxImpl.ShowCategory': z.boolean(),
'Comfy.NodeSuggestions.number': z.number(),
'Comfy.PreviewFormat': z.string(),
'Comfy.PromptFilename': z.boolean(),