We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e457f8 commit fbdc9d4Copy full SHA for fbdc9d4
src/services/nodeSearchService.ts
@@ -121,7 +121,14 @@ export class NodeSearchService {
121
includeScore: true,
122
threshold: 0.3,
123
shouldSort: true,
124
- useExtendedSearch: true
+ useExtendedSearch: true,
125
+ // Sort by score, then by length of the display name, then by index
126
+ // Source: https://github.com/Comfy-Org/ComfyUI_frontend/issues/562#issuecomment-2303239027
127
+ sortFn: (a, b) =>
128
+ Math.min(a.score, b.score) < 0.0001 ||
129
+ Math.abs(a.score - b.score) > 0.01
130
+ ? a.score - b.score
131
+ : a.item[1]['v']['length'] - b.item[1]['v']['length'] || a.idx - b.idx
132
})
133
134
const filterSearchOptions = {
0 commit comments