-
Notifications
You must be signed in to change notification settings - Fork 498
Update Search Box IO filters to support multitype #7542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -35,15 +35,18 @@ export class NodeSearchService { | |||||||||
| name: 'Input Type', | ||||||||||
| invokeSequence: 'i', | ||||||||||
| getItemOptions: (node) => | ||||||||||
| Object.values(node.inputs ?? []).map((input) => input.type), | ||||||||||
| Object.values(node.inputs ?? []).flatMap((input) => | ||||||||||
| input.type.split(',') | ||||||||||
| ), | ||||||||||
| fuseOptions | ||||||||||
| }) | ||||||||||
|
|
||||||||||
| this.outputTypeFilter = new FuseFilter<ComfyNodeDefImpl, string>(data, { | ||||||||||
| id: 'output', | ||||||||||
| name: 'Output Type', | ||||||||||
| invokeSequence: 'o', | ||||||||||
| getItemOptions: (node) => node.outputs.map((output) => output.type), | ||||||||||
| getItemOptions: (node) => | ||||||||||
| node.outputs.flatMap((output) => output.type.split(',')), | ||||||||||
|
Comment on lines
+48
to
+49
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trim whitespace and filter empty strings when splitting output types. Consistent with the input type handling, output types should also trim whitespace and filter empty strings after splitting. Apply this diff: getItemOptions: (node) =>
- node.outputs.flatMap((output) => output.type.split(',')),
+ node.outputs.flatMap((output) => output.type.split(',').map(t => t.trim()).filter(t => t.length > 0)),📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| fuseOptions | ||||||||||
| }) | ||||||||||
|
|
||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trim whitespace and filter empty strings when splitting input types.
The same whitespace and empty string issues from
FuseFilter.matchesapply here. If input types contain spaces after commas (e.g.,'IMAGE, MASK') or trailing commas (e.g.,'IMAGE,'), the split results will contain malformed values.Apply this diff:
📝 Committable suggestion
🤖 Prompt for AI Agents