11718 Commits

Author SHA1 Message Date
Cohee d8f39269b9 Remove open bogus folder tags that don't have any entities assigned (#5225)
Fixes #5222
2026-02-25 23:51:52 +02:00
shifusen329 d789efba07 Use Ollama /api/embed endpoint for vector embeddings (#5221)
* Use Ollama /api/embed endpoint for vector embeddings

The deprecated /api/embeddings endpoint does not properly support the
truncate parameter, causing "input length exceeds context length" errors
when vectorizing files. Migrate to /api/embed which correctly handles
truncation and supports native batch input.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Wrap single Ollama vector calculation into batch
Fixes https://github.com/SillyTavern/SillyTavern/pull/5221/changes#r2850052729

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-25 23:44:12 +02:00
Copilot 4fa37e52f7 Fix tag hide/show toggle in Tag Management not persisting (#5226)
* Initial plan

* Fix tag hide/show in Tag Management: pass original tag refs instead of copies, fix inverted tooltip

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Revert unrelated package-lock.json changes

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Revert tooltip change: tooltip shows current state, not action after click

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Pre-calculate tag counts into a Map and pass to sortTags for sort-by-usage

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Revert unintended package-lock.json changes from npm install

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Use instanceof Map for counts checks, add missing JSDoc param for sortTags

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Revert unintended package-lock.json changes

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Remove legacy `count` field

* Improve readability (marginally)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-25 23:34:43 +02:00
Cohee 4dbdd06d6d Add reload prompt to extension branch switch success message 2026-02-25 00:41:54 +02:00
Cohee 8422d2d0c7 Merge branch 'release' into staging 2026-02-24 23:45:47 +02:00
Cohee b7f0040831 Fix npm audit in /tests 2026-02-24 23:45:41 +02:00
Cohee 57386347ee Merge branch 'release' into staging 2026-02-24 23:44:39 +02:00
Cohee e678d24a39 Fix npm audit 2026-02-24 23:44:32 +02:00
Cohee 3f8b9998ca gork-imagine
Closes #5216
2026-02-24 23:35:21 +02:00
Lucas Scala 54bba07420 Background Folders (#5187)
* backend, frontend, bugfixes

* Mobile button and sizing

* lint

* clear folder thumbnailFile on delete, rename thumbnailFile on rename

* use filteredImages when changing sort option

* Address all the review comments

* Fix friendly title generation to handle empty strings

* Move add folder button to the header

* instead of search filtering the backgrounds in a folder and showing the folder if the results > 0, search the folder names.

* Trade button places

* Adjust button text

* feat: restrict folder creation to the Global tab

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-24 21:27:03 +02:00
Cohee 537f0559ab fix: enhance IP addresses hostname validation 2026-02-24 20:55:11 +02:00
Copilot ccf8ce7a06 Add PERSONA_CHANGED event (#5218)
* Initial plan

* Add PERSONA_CHANGED event emission when active user avatar changes

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-24 20:52:04 +02:00
GERNOMA 8f5c8f0a8e Open router provider filter (#5208)
* Added filter for OpenRouter models provider selection

Now if a model is selected, only available providers for that model will show. Wanted to do the same for the quants, but I think the API is not returning the quants available for each model at the moment. Used existing API that for some reason was not consumed.

* Added filter for OpenRouter providers

Now if a model is selected, only the providers available show. Wanted to do the same with the quants but it seems the OpenRouter API is not giving the available quants list at the moment for each model.

* gua

* Now it also works on chat completion and only disables options

* detail

* Warning added

* eslint

* Move inline styles to CSS

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-24 20:40:42 +02:00
Cohee 334635ce74 Create data root if not exists in standalone mode
Supersedes #5217
2026-02-24 20:29:44 +02:00
Cohee 46f1d211e1 fix: ensure input results are a Map before processing in refinePrompt 2026-02-24 00:40:09 +02:00
Brioch 0cef10f63f feat(openrouter): disable reasoning if Request model reasoning is off and effort is minimum (#5079)
* feat(openrouter): disable reasoning if "Request model reasoning" is disabled

* feat(openrouter): map minimum reasoning to none if request reasoning is off

* Add hint how to disable reasoning

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-23 21:19:04 +02:00
Cohee 496b3570e6 fix: Preserve saved resolution 2026-02-23 20:54:05 +02:00
Copilot a93fc0443e Preserve image dimensions when generating swipe images (#5205)
* Initial plan

* feat: preserve image width/height when generating swipe images

Save width and height in ImageGenerationAttachmentProps when creating
MediaAttachment objects, and apply saved dimensions when generating
image swipes. Falls back to current extension settings if not specified.

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* fix: validate dimension override with Number.isInteger and skip setTypeSpecificDimensions when override is present

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* fix: call restoreOriginalDimensions when setTypeSpecificDimensions was used

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Contain the logic to setTypeSpecificDimensions

* Diff clean-up

* feat: enhance prompt refinement with negative input and saved resolution options

* fix: Only save image dimensions when running from command

* Fix wording in refine prompt dialog

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-23 20:51:25 +02:00
Cohee 7ffb28f753 Numbers must go up 📈
Updated contributor count and years of development in the README.
2026-02-22 15:49:28 +02:00
ZhenyaPav 0ba0418fac OpenRouter interleaved reasoning forwarding for tool-call continuations (#5160)
* fix(openrouter): forward reasoning across active tool-call chains

* feat(reasoning): add tool-chain forwarding toggle and honor edited reasoning

* feat(reasoning): add OpenRouter interleaved forwarding modes

* moved the reasoning forwarding dropdown into a separate line

* feat(reasoning): default tool reasoning forwarding to disabled

* refactor(openrouter): move tool reasoning mode to CC settings

Move OpenRouter tool reasoning forwarding control to response configuration and scope it to OpenRouter.

Store mode in chat completion settings (presettable), remove legacy power_user boolean/fallback, and use constants for mode values.

Preserve OpenRouter Gemini signature forwarding independently from plaintext tool reasoning mode.

* fix(openrouter): tighten active-chain reasoning forwarding

Use trailing contiguous tool-chain boundary for active-chain eligibility.

Also rename the UI control to Interleaved Thinking Forwarding and place selector on its own line.

* fix(openrouter): use adjacent assistant reasoning for tool calls

For interleaved thinking forwarding, source reasoning only from the immediately preceding assistant non-tool message.

Keep mode gating behavior unchanged and avoid history-window reasoning carryover.

* fix(openrouter): skip tool messages for reasoning source

When forwarding interleaved reasoning, ignore intervening tool result messages when resolving the preceding assistant reasoning source.

This keeps only the first tool call in a chain tied to a prior assistant reasoning block unless a later invocation carries its own reasoning.

* fix(openrouter): keep plaintext reasoning with signatures

Do not suppress forwarded tool-call reasoning when thought signatures are present.

* fix(openrouter): split interleaved thinking mode behavior

Restore distinct mode semantics: active_chain uses nearest assistant-text boundary after skipping tool/tool-call messages, while since_last_user scans for latest assistant reasoning since user.

Update UI label to Interleaved Thinking with right-aligned dropdown and explanatory tooltip.

* style(openrouter): align interleaved thinking dropdown row

Match OpenRouter interleaved thinking control layout with existing oneline-dropdown patterns.

Also update reasoning-forwarding inline comment wording for current mode behavior.

* docs(ui): clarify interleaved thinking tooltip

Use explicit API-request wording for OpenRouter interleaved thinking tooltip text.

* i18n(openrouter): localize interleaved thinking UI

Add locale keys for OpenRouter interleaved thinking label, mode options, and inline helper description.

Wire dropdown option text to data-i18n in index.html.

* fixed helper text wrapping

* fix(ui): make interleaved thinking helper text wrap

* i18n(openrouter): translate interleaved thinking labels

Replace placeholder English values for interleaved thinking keys in non-English locale files.

* fix(ui): restore interleaved thinking dropdown alignment

* Remove changes from en.json

* Type fixes

* Reworked the interleaved reasoning provider logic

* Renamed the variables in preparation for potential implementation for other providers

* Gate interleaved tool reasoning on reasoning request setting

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-22 13:15:52 +02:00
Cohee 8462cbaebb Fix duplicate image generation toast on tool call. 2026-02-20 01:09:56 +02:00
Wagner Bruna ab8d7e5184 build llama.cpp embedding url path by appending instead of overwriting (#5178)
* build llama.cpp embedding url path by appending instead of overwriting

When using a llama-swap frontend, this allows choosing the embedding model
by path; for instance, with the secondary embedding endpoint URL configured
to http://127.0.0.1:5001/upstream/emb-model to pick the "emb-model" model.
With this approach, the same llama-swap instance can be used to serve both
the main LLM and the embedding model from local llama-server commands.

* Trim trailing v1 from URL

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-19 23:39:58 +02:00
Leandro Jofré 162d45a241 Feat - Export SlashCommandEnumValue for extensions through getContext (#5191) 2026-02-19 23:11:30 +02:00
Lucas Scala 8aaaab37b7 Fix APNG thumbnail handling and improve animated format detection (#5113)
* check png for apng headers

* isAnimated flag

* refactor: centralize background animation extension checks

* refactor: scope animated extension dedupe to backgrounds

* remove precompute from startup

* Fix animation preference not being loaded, fix type-check of customInputs

* Fix eslint

* Fix sort on removal type

* Update metadata before returning from endpoint on CRUD operations

* Remove race condition in metadata load

* Load metadata after loading the list

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-19 22:46:21 +02:00
Tosd 45bf3a402a Update zh-CN translations (#5180)
* Update zh-CN translations

* i18n(zh-CN): sort keys

* Update translations

---------

Co-authored-by: Tosd0 <65720409+Sevenyine@users.noreply.github.com>
2026-02-19 20:48:28 +02:00
Spicy Marinara 31f4d5dbfe Add gemini-3.1-pro-preview to caption settings (#5190) 2026-02-19 15:00:24 +02:00
Spicy Marinara a923b0eefe Add gemini-3.1-pro-preview to Google AI Studio and Vertex model lists with thinking support (#5188) 2026-02-19 14:28:48 +02:00
Copilot eeda4d377e Add {{maxContext}}, {{maxResponse}} macros and {{maxPromptTokens}} alias (#5176)
* Initial plan

* Add maxContext, maxResponse macros and maxPromptTokens alias

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Refactor getMaxContextSize to use getMaxContextTokens/getMaxResponseTokens and remove maxReply aliases

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Align aliases in single line

* Rename getMaxPromptTokens

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-17 21:47:51 +02:00
Cohee 3bd1034639 claude-sonnet-4-6 2026-02-17 21:33:19 +02:00
bal-spec 3a952293b4 Add gallery argument to /imagine command (#5168)
* Add gallery argument to /imagine to skip character gallery save

Adds a `gallery` named argument (default: true) to the /imagine slash
command. When `gallery=false`, the generated image is saved to the
generic images directory instead of the character-specific gallery
folder, while still returning a usable image URL.

This is useful for extensions that manage their own image display
(e.g. inline in chat messages) and don't need gallery copies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Can't assign to a constant

* Update help string to clarify image saving behavior in generation requests

* Fix file name template if no char name provided

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-16 21:22:43 +02:00
YKDZ 966ab8336b Merge pull request #5171 from YKDZ/release
i18n: Comprehensive update and refactor for Simplified Chinese (zh-CN)
2026-02-16 21:00:26 +02:00
Cohee 1b0417824f Merge pull request #5173 from SillyTavern/release
Guard `isValidImageUrl` against nullish `avatar_url` inputs (#5172)
2026-02-16 17:02:31 +02:00
Copilot 3efe809d27 Guard isValidImageUrl against nullish avatar_url inputs (#5172)
* Initial plan

* fix: guard isValidImageUrl against nullish input

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-16 17:01:41 +02:00
Wolfsblvt 87a0ac7cd1 Add textarea support to popup custom inputs (#5167)
- Add 'textarea' as a valid input type alongside 'checkbox' and 'text'
- Add optional `rows` property to control textarea height (default: 1)
- Implement textarea rendering with proper label, placeholder, and styling
- Update result collection logic to handle textarea values like text inputs
- Update warning message to include textarea in supported types
2026-02-15 23:55:20 +02:00
Preston Farr 56e995c320 feat: add prefers-reduced-motion and prefers-contrast media queries (#5122)
* feat: add prefers-reduced-motion and prefers-contrast media queries

- Integrate OS prefers-reduced-motion into existing JS toggle system:
  when OS preference is active, force reduced_motion on and disable
  the UI checkbox with an explanatory tooltip
- Add body.reduced-motion CSS rules for hardcoded animations that
  bypass the --animation-duration variable (text_segment fade-in,
  dragover pulse)
- Add prefers-contrast: more media query for enhanced focus outlines

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Support translating title text

* Use duration variable

* Removed stream fade-in override

* Combine hi-contrast selectors

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-15 19:45:24 +02:00
Malformed C b44a67b7e7 Fix koboldcpp dry sequence stringification (#5156)
* Add DRY sequence parsing

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-15 17:11:17 +02:00
Copilot f687bc95e9 Overhaul /bgcol: Oklch color space, full palette generation, save as new theme (#5162)
* Initial plan

* Overhaul /bgcol command: Oklab color space, dominant color extraction, full theme palette generation

- Create ThemeGenerator module in public/scripts/util/ with:
  - Oklab color space conversions (sRGB ↔ Oklab ↔ LCH)
  - Chroma-weighted dominant color extraction (vivid over muddy averages)
  - Color theory palette: complementary, analogous, triadic hue relationships
  - WCAG contrast ratio enforcement (≥3.5:1 for all text colors)
- Replace old setAvgBG with new implementation using ThemeGenerator
- Save generated theme as "Generated - <background name>" instead of overwriting
- Update command help string to reflect production-ready status

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Extract hue shift constants for clarity (code review feedback)

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Add name and bg arguments to /bgcol command

- Add `name` named argument to override the generated theme name
- Add `bg` named argument with enum provider listing available backgrounds
  from /api/backgrounds/all to override the current background

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Improve types, add enum provider, reduce transparency

* Adjust alpha channel for better readability

* Refactor ThemeGenerator to work directly in Oklch, removing intermediate Oklab conversions

Replaced srgbToOklab/oklabToSrgb + oklabToLCH/lchToOklab with direct
srgbToOklch/oklchToSrgb functions. All color manipulations now use
{L, C, h} directly without converting through {a, b} intermediates.
The ensureContrast function now takes (L, C, h) parameters instead of
an Oklab object.

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Add custom background URL check and enhance theme generation logic

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-15 16:39:55 +02:00
Cohee 46ea79bab5 Merge branch 'release' into staging 2026-02-15 15:57:51 +02:00
SenatusSPQR1 4672647293 Fix NanoGPT Claude cache detection for prefixed model IDs (#5164) 2026-02-15 15:57:14 +02:00
Leandro Jofré 9383b3ab13 Fix - Remove non-samplers from sampler selection popup (#5163)
Removed OR's fallback providers checkbox and the generic model and URL inputs for Custom Endpoint.
2026-02-15 02:14:05 +02:00
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 d118eee014 Update npm workflow for trusted publishing
Updated Node.js version from 22 to 24 and added permissions for OIDC.
2026-02-14 18:01:17 +02:00
Cohee e3b866b5d2 Merge pull request #5154 from SillyTavern/staging
Staging
2026-02-14 17:46:49 +02:00
HimeHina df0e1256e6 Fix: HTTP Basic Auth fails when password contains colons (#5153)
* Fix: HTTP Basic Auth fails when password contains colons

The credentials in HTTP Basic Auth are formatted as base64(username:password).
Per RFC 7617, the username must not contain a colon, but the password can.
The previous code used `.split(':')` which splits on all colons, truncating
passwords that contain ':' characters. Fix by splitting only on the first colon.

* Use spread syntax for credential parsing
2026-02-14 17:44:54 +02:00
Cohee 843c572154 Merge commit from fork
* Add file name sanitation to background upload

* Add file name sanitation to chat export
2026-02-14 17:44:09 +02:00
Cohee 9ec9a5c51c Merge commit from fork 2026-02-14 17:43:36 +02:00
Cohee 232cf6d825 Merge commit from fork 2026-02-14 17:42:02 +02:00
Cohee 734ef7d939 1.16.0 2026-02-14 16:27:02 +02:00
Copilot 5832cb8b07 Add NanoGPT embeddings support for Vector Storage (#5150)
* Initial plan

* Add NanoGPT embeddings support for Vector Storage

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Fix models loading

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-14 00:31:30 +02:00