Commit Graph

242 Commits

Author SHA1 Message Date
Cohee 4d1619ba47 Chore: enable brace-style eslint check (#5159)
* eslint: enable brace-style check

* Fix jsdoc and color

* fix: correct CSS color syntax in CreateZenSliders function
2026-02-15 01:46:32 +02:00
Cohee 357da3219b Chore: Add code formatting conventions as eslint rules (#5158)
* Add code formatting conventions as eslint rules

* Improve formatting in addQuickReply
2026-02-15 01:16:34 +02:00
Cohee 0dd32775d6 Add 'setspriteoverride' optional 'name' argument 2025-12-19 20:38:29 +02:00
Cohee f26a672811 Omit content type in POST request if no body 2025-12-07 23:26:47 +02:00
Cohee 1a92157643 Refactor generateRaw/generateQuietPrompt calls (#4277)
* generateQuietPrompt: Update to object arguments

* generateRaw: Update to object arguments

* Fix jsdoc

* Fix lint

* Unwrap JSON schema options

* Remove default args from gen call
2025-07-15 23:11:31 +03:00
Cohee 96bdc13937 Replace ajax with fetch (#4241)
* Replace ajax with fetch
Fix type errors in power-user / group-chats modules

* Fix single sprite upload

* Return empty object on failed upload
2025-07-06 23:27:53 +03:00
Wolfsblvt b1887a0cc2 Fix default emojis expression setting resetting (#4206)
Adjusts conditions to properly enforce mutual exclusivity between fallback expression and default emoji settings

- Ensures "[ No fallback ]" option only appears when both settings are inactive
- Updates migration logic to ONLY reset default emoji setting when fallback is active

Fixes #4205
2025-06-26 09:47:16 +03:00
kingbri 525b46daa0 Expressions: Change tooltip for LLM prompt
JSON schemas might need coercion from the user, so indicate that the
LLM prompt is appended in addition to the JSON schema.

Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
2025-06-14 18:24:12 -04:00
kingbri cc9f095aa7 Expressions: Set additionalProperties to false in JSON schema
Some backends use grammar constraints that allow additional properties
with the generated JSON schema, resulting in an incoherent and extremely
long JSON.

Set this to false so the model can generate what we need and nothing else.

Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
2025-06-14 18:17:55 -04:00
Cohee 9efd40980f Add prompt type selection for LLM expressions in settings 2025-06-14 20:01:59 +03:00
kingbri e43e771cc5 Emotions: Use the full context for main API
To prevent prompt reprocessing per turn, use the full context
when prompting with the main API. Doing so keeps the preserved
prefix while adding an extra sentence rather than providing two
different prompts for each turn.

In addition, JSON schemas might need a prompt to coerce a proper
schema return from the model.

Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
2025-06-13 21:55:02 -04:00
Cohee 1cbc4ac65b Fix HTML syntax errors by @Dakraid
Original commit: https://github.com/SillyTavern/SillyTavern/commit/fd4babab31c420e94df7d355db2d32c478b853c7
2025-05-29 21:38:55 +03:00
Cohee f4eb32c71c Merge pull request #3760 from SillyTavern/feat/expressions-none-default-option
Add 'none' expression classifier API option and set as default
2025-03-26 11:10:13 +02:00
Azariel Del Carmen b96bed7240 chore: make layer updates exportable 2025-03-25 20:09:48 -05:00
Wolfsblvt cbfc1f7a0e Add 'none' classifier API option and set as default
Introduces a no-op API selection to disable expression classification
Shows warnings when no valid API is selected to prevent silent failures
Updates migration logic and settings UI to use new default value

This allows users to explicitly opt-out of automatic expression detection
while maintaining backwards compatibility with existing configurations
2025-03-26 01:50:26 +01:00
Wolfsblvt d70c346b12 Expression API on new install defaults to 'local' 2025-03-25 05:17:06 +01:00
Cohee 6bfa54e9b4 Merge pull request #3725 from SillyTavern/feat/expressions-filter-available
Adds filtering to expressions to ignore labels that do not have sprites available
2025-03-19 19:18:02 +02:00
Cohee f5ecd1fa5f Reduce warning level to debug 2025-03-19 19:15:07 +02:00
Wolfsblvt 2e936e804a Fix default value for filter argument 2025-03-19 10:17:08 +01:00
Cohee d5d3516e18 Merge pull request #3724 from SillyTavern/fix/expressions-upload-new
Fix not being able to upload sprite when no sprite existed for an expression
2025-03-19 09:51:45 +02:00
Wolfsblvt a8899f7d81 Clean reasoning from classify response
- If a reasoning model is used (via LLM, or R1 distill via webLLM), it'll likely return reasoning. That should not be used for the search of classification inside the response
2025-03-19 03:30:53 +01:00
Wolfsblvt 5a6058d319 Adds sprite-based filtering for expressions
- Functionality only available for LLM/webLLM
- New toggle to filter expressions on availalbe sprites
- `getExpressionsList` filters cached expressions when checked (using sprite folder name/override)
- `/expression-list` slash command has "filter" arg to filter list
- `/expression-classify` slash command has "filter" arg now, to use filtered list for classification
- `getExpressionLabel` uses filtered expressions when LLM/webLLM
2025-03-19 03:06:50 +01:00
Wolfsblvt 0be952b9a0 Fix sprite upload on empty expression
- When no sprite was defined before, it falsely tried to derive the filename from the existing filename when "allow multiple" was not enabled. It now correctly just utilizes the expression name, not relying on filename anymore.
2025-03-19 02:17:17 +01:00
Wolfsblvt 5585220d0a Fix Expression Override not resetting if empty
- When switching chars, override field gets correctly loaded. The display value won't be reset when the override was empty. This was likely unintended.
2025-03-17 23:23:58 +01:00
Cohee 1aae08be5b Fix char A/N and expressions folder for first in the list 2025-02-28 09:12:22 +00:00
Cohee 3cf4be8e85 Remove unused import 2025-02-22 20:12:19 +02:00
Cohee f2cac8e7f7 Revert "Return fallback expression if no group message found" 2025-02-22 20:02:34 +02:00
Cohee d21b0f1b5e Add default fallback expression 2025-02-22 13:45:54 +02:00
Cohee db988411fd Return fallback expression if no group message found 2025-02-22 13:40:43 +02:00
Wolfsblvt afbe21b6b4 Make sendExpressionCall exportable
- For compatibility with existing extensions
2025-02-22 01:44:42 +01:00
Cohee a7d7b6fb0f Fix group VN updates on switching to chat 2025-02-21 22:05:08 +02:00
Cohee cb6adc30ce Fix null confrimation when no custom expressions 2025-02-21 02:05:43 +02:00
Cohee bdbcf8623e Fix force set emote in group 2025-02-21 01:46:10 +02:00
Cohee e35217e7e3 Fix image loading resolve 2025-02-21 01:32:13 +02:00
Cohee aca1cb7f99 Fix first reorder of group VN with reduced motion 2025-02-21 01:19:19 +02:00
Cohee 07160e0e60 Fix group VN mode not updating on kicking group members 2025-02-21 01:01:30 +02:00
Cohee 179153ae67 Fix group VN mode with reduced motion 2025-02-21 00:51:17 +02:00
Cohee 94f53835f4 Forbid custom expressions to be prefixed with defaults 2025-02-21 00:29:05 +02:00
Wolfsblvt 3574527780 fade "reroll if same" if no multi sprites enabled 2025-02-20 19:28:54 +01:00
Wolfsblvt 2834681a4b Fix sprite upload replace existing
- Also fix form not resetting on cancel of replace popup
2025-02-20 19:25:20 +01:00
Wolfsblvt 19e2a2f7d2 safety check on upload on sprite name 2025-02-20 19:05:20 +01:00
Wolfsblvt a58e026a40 Don't show del popup on placeholder sprite 2025-02-20 19:02:29 +01:00
Wolfsblvt a40f568409 Fix sprite deletion 'no' option 2025-02-20 18:51:44 +01:00
Cohee 135bf8a55b Add progress toast for sprite ZIP upload 2025-02-20 00:12:40 +02:00
Wolfsblvt bd6da695c8 cleanup examples for multi sprites 2025-02-19 22:30:51 +01:00
Wolfsblvt 531999dc04 Ensure unique suggested sprite names 2025-02-19 22:12:29 +01:00
Cohee 58bbfc0d4e Add types for global translation function 2025-02-19 22:18:09 +02:00
Wolfsblvt c12f26441e Merge branch 'staging' into support-multiple-expressions 2025-02-19 20:22:02 +01:00
Cohee f83dccda39 Mark 'Extras' option as deprecated in built-in extensions 2025-02-08 21:56:54 +02:00
Wolfsblvt e5e931356b Remove forceEnum from char args in slash commands
- This precented people from actually using the characterKey inside the chatbox to go to a character
2025-02-02 03:43:20 +01:00