[PR #275] [CLOSED] [Feature] Wildcard model name search. #293

Closed
opened 2026-10-30 21:22:04 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/pull/275
Author: @Symbiomatrix
Created: 3/2/2024
Status: ❌ Closed

Base: main ← Head: wildcard


📝 Commits (10+)

📊 Changes

6 files changed (+54 additions, -12 deletions)

View changed files

📝 javascript/ext_chants.js (+9 -2)
📝 javascript/ext_embeddings.js (+9 -2)
📝 javascript/ext_hypernets.js (+9 -2)
📝 javascript/ext_loras.js (+9 -2)
📝 javascript/ext_lycos.js (+9 -2)
📝 javascript/ext_styles.js (+9 -2)

📄 Description

This changes all the simple filterCondition .includes type checks to regex, and escapes all regex chars (probably) except for asterisks to simulate a simple wildcard search. I don't know of a better way in js.

Additional notes:

  • Haven't implemented changing ? to ., could be nice but I don't generally use that.
  • The double includes + replaceAll calls have been copied verbatim, but would be slightly more efficient to add those as [ _] replacements in regex instead. And case insensitive.
  • The escapeRegex function could probably be moved to BaseTagParser to remove some copypasta. Maybe filterCondition as well though the different sources look like more effort (overriding with a super call on the right property?). Up to your discretion, dom.
  • I think period replacement isn't working quite right, the first one I type (ie <. or <bla*.) still seems to be ignored, only the second time filters. Might be some other part of the code though, other chars doing fine in the same format.
  • Wildcard's method is a bit above my level, but if it's just supposed to be "allow partial matches before slashes" to get to specific subdirectories as I understand from the docs, a simple \ -> .*\ pattern should do that cleanly.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/pull/275 **Author:** [@Symbiomatrix](https://github.com/Symbiomatrix) **Created:** 3/2/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `wildcard` --- ### 📝 Commits (10+) - [`c4d5dfb`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/c4d5dfbd419354d84522b0aac0c8836d84e640b5) Update ext_loras.js - [`2f6f25b`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/2f6f25b14cef9587c2e7364379c51d66410c9e49) Update ext_lycos.js - [`5eacec1`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/5eacec187cf88de4339d67b465a49ff5edffa9b7) Update ext_styles.js - [`aa0a0c7`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/aa0a0c764e920a1beee97a3c452721c6a497c5bb) Update ext_lycos.js - [`353e58d`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/353e58d9f8adf5a67b03f53dbb85594b8f11ad15) Update ext_styles.js - [`79045a9`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/79045a9784cb7996795a6d81ee646c5f43aa6f15) Update ext_embeddings.js - [`45e874a`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/45e874ae8df34f4800b2ae61808b40f7ca0765e2) Update ext_hypernets.js - [`298091f`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/298091fe57163043dc7f3cfbaa966d1999e87e67) Update ext_chants.js - [`4c29e1d`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/4c29e1d8fd3c282abf3a5e3fff9a805e8d5b8c90) Update ext_chants.js - [`e0cf39e`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/e0cf39e5578122c4c56c5b20457a7e9e3212dfed) Update ext_embeddings.js ### 📊 Changes **6 files changed** (+54 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `javascript/ext_chants.js` (+9 -2) 📝 `javascript/ext_embeddings.js` (+9 -2) 📝 `javascript/ext_hypernets.js` (+9 -2) 📝 `javascript/ext_loras.js` (+9 -2) 📝 `javascript/ext_lycos.js` (+9 -2) 📝 `javascript/ext_styles.js` (+9 -2) </details> ### 📄 Description This changes all the simple `filterCondition .includes` type checks to regex, and escapes all regex chars (probably) except for asterisks to simulate a simple wildcard search. I don't know of a better way in js. Additional notes: - Haven't implemented changing `?` to `.`, could be nice but I don't generally use that. - The double includes + replaceAll calls have been copied verbatim, but would be slightly more efficient to add those as `[ _]` replacements in regex instead. And case insensitive. - The escapeRegex function could probably be moved to BaseTagParser to remove some copypasta. Maybe filterCondition as well though the different sources look like more effort (overriding with a super call on the right property?). Up to your discretion, dom. - I think period replacement isn't working quite right, the first one I type (ie `<.` or `<bla*.`) still seems to be ignored, only the second time filters. Might be some other part of the code though, other chars doing fine in the same format. - Wildcard's method is a bit above my level, but if it's just supposed to be "allow partial matches before slashes" to get to specific subdirectories as I understand from the docs, a simple `\ -> .*\` pattern should do that cleanly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-30 21:22:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DominikDoom/a1111-sd-webui-tagcomplete#293
No description provided.