SillyTavern / SillyTavern

LLM Frontend for Power Users.
https://sillytavern.app
GNU Affero General Public License v3.0
13.83k stars 3.15k forks source link

Adds filtering to expressions to ignore labels that do not have sprites available #3725

Closed Wolfsblvt closed 1 month ago

Wolfsblvt commented 1 month ago

Closes #3696

image

Checklist:

Copilot

This pull request introduces several enhancements to the expressions module in the public/scripts/extensions/expressions/index.js file. The primary focus is on adding a filtering option for expressions, allowing users to filter expressions based on the availability of sprites.

Key changes include:

Enhancements to Expression Filtering:

User Interface and Settings:

cloak1505 commented 1 month ago

On/off works as expected. This position of the checkbox is definitely better than I had initially thought up of.

When I try /expression-list filter=true | /echo {{pipe}}, filter=true and false both return the full unfiltered list. Is something wrong?

The help for /expression-classify shows [filter=true|false]? = true, does this mean the default is true? But it acts like the default is false but does filter when I explicitly type in /expression-classify filter=true foobar.

Wolfsblvt commented 1 month ago

When I try /expression-list filter=true | /echo {{pipe}}, filter=true and false both return the full unfiltered list. Is something wrong?

The actual argument being read was different than the documentation said, still had it on filterAvailable, but later shortened it in the doc. Fixed that. Thanks for catching that.

The help for /expression-classify shows [filter=true|false]? = true, does this mean the default is true? But it acts like the default is false but does filter when I explicitly type in /expression-classify filter=true foobar.

Same here, oversight. And yes, the default is planned to be true for the slash command. I think it makes sense to set it to true. Though I am open for opinions. Not sure if the general setting/toggle should also bei initialized to true.