246 Commits

Author SHA1 Message Date
Wolfsblvt 45009cd0e4 Deprecate legacy loader and migrate all callsites to action-loader system with informative toasts (#5326)
* Refactor loader.js to use action-loader system and move overlay management into action-loader module

- Deprecate showLoader() and hideLoader() in favor of action-loader API
- Implement legacy functions as thin wrappers around ActionLoaderHandle
- Move overlay management (showOverlay, hideOverlay, isOverlayDisplayed) into action-loader.js
- Move Popup-based loader implementation and preloader cleanup to action-loader
- Add loader.isBlocking() method to check for active blocking overlays

* Migrate from legacy loader functions to action-loader API throughout codebase

- Replace showLoader()/hideLoader() imports with loader from action-loader.js
- Update firstLoadInit() to use loader.show() with title, message, and ToastMode.STATIC
- Pass initLoaderHandle to getSettings() for early hide during onboarding flow
- Refactor renameGroupOrCharacterChat() to use loader.show() instead of boolean flag
- Wrap handleDeleteChat() with loader.show() and proper error handling
- Update BulkEditOver...

* Update loader titles and remove redundant reload notification

- Change bookmark loader title from "Bookmark" to "Chat History" for clarity
- Remove loader notification before extensions reload (redundant with browser reload)

* lint fix

* Add splash screen support to action loader with custom overlay content

- Add `overlayContent` option to ActionLoaderOptions for custom HTML in overlay
- Implement splash screen styles with centered logo, spinner, and message
- Update firstLoadInit() to use custom splash screen instead of static toast
- Pass custom content through showOverlay() to replace default spinner
- Adjust non-blocking loader warning to account for custom overlay content

* Refactor loader overlay to use DOM elements instead of HTML strings

- Add createDefaultLoaderOverlay() function to generate fresh loader overlay elements
- Export createOverlay() method on loader utility API for external use
- Change overlayContent parameter type from string-only to string|HTMLElement|null
- Add getOverlayContent() helper to normalize custom content for Popup
- Update firstLoadInit() to build splash screen using DOM manipulation instead of template literals
- Add splash-logo class and

* Use a true ellipsis

* Adjust sizing for desktop

* Even truer ellipsis

* Add transition to splash screen and fix blur animation on hideOverlay (#5338)

* Initial plan

* Blur entire splash screen on hideOverlay, not just spinner

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/eee6c06d-7c9d-4363-bc8f-2647ed390368

* Add transition to splash-screen and fix transition detection

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/9368bc36-31a0-4a58-aebd-7b569696ff2e

---------

Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>

* Add translations to supported locales

* Localize logo alt on welcome screen

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Claude <242468646+Claude@users.noreply.github.com>
2026-03-22 03:30:23 +02:00
Stardust bf91d9afc9 Chat lorebook click unify (#5246)
* Unify chat lorebook button click behavior with character lorebook button

* Update locale strings for chat lorebook button

* Unify chat lorebook button click behavior with character lorebook button

* Update locale strings for chat lorebook button

* Also unify character lorebook button to support Alt modifier

* Update locale strings for character lorebook button

* Update public/locales/fr-fr.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add long-press support for lorebook buttons on mobile

* Update locale strings for lorebook button long-press

* Fix long-press to use event delegation for dynamic elements

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-15 20:14:32 +02:00
Cohee ae5c65c3cf Baka-proofing OpenRouter OAuth flow 2026-03-09 20:46:46 +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
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
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
Tosd a1204a4438 Update zh-CN translations (#5145)
* fix(index.html): typo

* Update zh-CN translations

* Add missing zh-CN translation

---------

Co-authored-by: Tosd0 <65720409+Sevenyine@users.noreply.github.com>
2026-02-12 22:06:37 +02:00
Brioch 6c864e8bb2 feat(openrouter): add model quantizations setting (#5080)
* feat(openrouter): add model quantizations setting

* Remove bogus setting

* Simplify nullish coalescing assignment

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-30 23:51:22 +02:00
DeclineThyself bff6ab3cb7 Updated Avatar Style and Hide Chat Avatars title text. (#4908)
* Added an option to hide message avatars in `User Settings > UI Theme`.

* Deprecated the `Hide Chat Avatars` toggle.
Moved the option to hide message avatars to `User Settings > UI Theme > Avatars`.

* Revert "Deprecated the `Hide Chat Avatars` toggle."

This reverts commit 6f616767cce4aa2c27a3a53543687d6eaf379758.

* Moved `Hide Chat Avatars` next to `Avatar Style`, added title text.

* Reverted changes.

---------

Co-authored-by: user <user@exmaple.com>
2025-12-24 16:38:25 +02:00
Cohee 39cc1b9039 Update GitHub links to llama.cpp 2025-12-21 21:13:13 +02:00
Cohee 1da6e40129 Backgrounds menu tabs (#4845)
* Add tabs for backgrounds menu

* Improve styling and layout

* Use resize observer

* Add upload to chat bg logic

* Custom BG should always lock

* Fix auto-select when deleting active chat bg

* Use frame event cancellation on rapid resize

* Allow multiple uploads

* Fix mobile tab selector

* Bypass global lock with shift key

* Update copy tooltip

* Update localization files
2025-11-30 19:04:08 +02:00
Cohee 0a22856faf Chat Completion: Reduce number of toggles in AI Response Configuration (#4821)
* Chat Completion: Reduce number of toggles in AI Response Configuration

* Consolidate migration logic

* Don't enable media inlining if image inlining was disabled

* Fix icons showing on media toggle off

* Update i18n
2025-11-28 00:16:23 +02:00
Serena e7af479427 Feature: allows sorting tags by most used (#4768)
* add sorting tags by most used

* Fix whitespaces

* Code review updates

* Remove commented code

* Fix capitalization in comment

* Apply review suggestion

* Simplify template init

* Reformat

* Add documentation for appendViewTagToList and printViewTagList functions

* Reprint renamed tags regardless of sorting mode

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-16 21:16:15 +02:00
Cohee 2577e35c0b Audio media attachments (#4741)
* Add audio-player component

* Enhance audio player functionality and styles

- Adjust audio player layout and styles in CSS for better spacing and alignment.
- Add audio element to message template in HTML.
- Implement audio attachment handling in JavaScript, including a new AudioPlayer class.
- Update media attachment structure to include titles for audio files.
- Extend supported media file types in constants.

* Add audio inlining control

* Fix file formats list

* Simplify hints

* Add to prompt

* Add progress title hint

* Add to scrollOnMediaLoad

* Add audio size hint

* Add gallery controls

* Delete removed media attachments from server

* Adjust min width

* No-op when swiping a singular media

* Fix clean-up

* Fix silent deletion logic

* More accurate media prompt estimations

* Round durations with ceiling function

* Adjust rounding logic

* you don't have to say it twice

* Export deleteFileFromServer

* Don't reference module from HTML

* Clean-up styles

* Move formatTime to utils

* Add fa-fw to delete
2025-11-05 00:53:23 +02:00
Cohee df7f046912 Preset Regex: add preset type for script regexes (#4642)
* feat: preset regex

* refactor: unify `saveScriptsByType`

* fix: default branch for `saveScriptsByType`

* refactor: resolve some reviews

* fix: lint

* refactor: getPresetName -> getCurrentPresetName

* refactor: unify regex allow operation

* feat: notify whether to reload current chat when preset is changed

* refacotr: set timeout for reload current chat notification

* fix: _ -> lodash

* i18n

* Refactor API ID access

* refactor: replace UNKNOWN type with a separate constant

* refactor: consolidate CSS rules for scoped and preset script blocks

* Extend toast timeout

* Fix bug with moving, refactor

* Refactor bulk toggle operations

* Use for..of for preset application

* refactor: enhance parameter documentation for scriptType in regex functions

* fix: await loadRegexScripts in event handlers

* fix: correct script type in saveScriptsByType for preset handling

* fix: add null checks for preset manager and API ID in regex functions

* feat: implement expandable regex script options in UI

* Always show edit/delete buttons

* Add title attribute to regex script name

* fix: correct class name for regex script display

* Remove extra paddings from script blocks

* fix: ensure preset scripts are only disallowed if currently allowed during rename

* fix: reload on bulk script toggle

* feat: add PRESET_RENAMED_BEFORE event type and emit it during preset renaming

* fix: always preserve preset extensions on rename

* Handle horde in getPresetManager

---------

Co-authored-by: ZoinkCN <zoinkcn@outlook.com>
Co-authored-by: StageDog <aksanajw845@gmail.com>
2025-10-11 22:10:06 +03:00
StageDog f15c91fa8e Preset Regex: refactor regex scope detection (#4618)
* refactor: explicit type for regex scope + feat: bulk move regex

* fix: eslint

* i18n: polish

* refactor: jsdoc + use object type for option

* fix: default return type for `getScriptsByType`

* refactor: simplify

* refactor: share default options

* refactor: remove unrequired css

* fix: move regexes to global + refactor: make regex operation interfaces more consistant

---------

Co-authored-by: ZoinkCN <zoinkcn@outlook.com>
2025-10-07 22:30:11 +03:00
Cohee ab66a9fed1 Caption: Rename Anthropic => Claude 2025-09-17 07:58:13 +00:00
Ngo Dinh Gia Bao 07a4007363 feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Se… (#4528)
* feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Search for model list

* feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Search for model list

* Update public/scripts/extensions/tts/electronhub.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update public/scripts/openai.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update public/scripts/openai.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Search for model list

* feat: [Electron Hub] Show model capabilities

* Support logit_bias

* Small tweaks

* Added tokenizer selection logic

* Added tokenizer selection logic

* Fixed ESLint

* Small tweaks

* Split localization tags

* Fix formatting

* Refactor icons, add tool icon

* Support newer oai model tokenizers

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-16 22:22:27 +03:00
Yokayo 1e05eac7df Update ru-ru locale (#4522)
* Work on tl

* eslint fix

* Update data-i18n attribute for expand view button

* Add data-i18n to button

---------

Co-authored-by: Yokayo <nonameutubecomm@gmail.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-14 20:57:33 +03:00
Cohee 345660503f Format lang.json file 2025-09-13 18:25:06 +03:00
Rawi1005 a6c3e4c444 Add Thai Translation (#4513)
* Add Thai Translation

* Remove yarn.lock and add to .gitignore

* Update Thai translation

* Update Thai translation for World Info entry status descriptions

* fixed thai translation
2025-09-12 19:20:14 +03:00
Tosd 57e363cae6 feat: Regex Presets (#4468)
* Work in progress

* feat: save confirmation

* Fix eslint, add typedef

* Add slash command and compatibility with profiles

* Move UI label up

* Null safety

* Fix duplicate block title

* i18n: zh-CN translation

* Adjust debugger styles

* Move presets block down

* Do not generate id twice for new entries

* Add missing translations

* Simplify settings migration logic

* Fix type comment

* Add missing keys

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-08 12:35:14 +03:00
Ngo Dinh Gia Bao 8687bb99f3 Add Electron Hub as Chat Completions Provider (#4458)
* fixed merge conflicts

* Supported max tokens + fixed wrong image model mapping

* fixed merge conflicts

* fixed merge conflicts

* updated the logic

* updated the logic

* replaced hard coded reasoning_effort mode list with a dynamic function

* replaced hard coded reasoning_effort model list with a dynamic function

* Fix eslint

* Adjust reasoning effort logic

* Code clean-up

* Add logo

* Add inline image quality

* Fix multimodal models list

* Fix seed not passed

* Add "detail" error parser

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-04 21:25:31 +03:00
Tosd c46e1a46aa Update zh-CN translations (#4466)
* Update zh-CN translations

* Update zh-CN translations

* Add missing translations

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-31 16:06:31 +03:00
Yokayo e9e14001e3 Update ru-ru locale (#4449)
* Work on tl

* Small fix

* Fix formatting

---------

Co-authored-by: Yokayo <nonameutubecomm@gmail.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-26 20:37:55 +03:00
Yokayo d262d39ab2 Update ru-ru locale (#4401)
* Work on tl

* Small fix

---------

Co-authored-by: Yokayo <nonameutubecomm@gmail.com>
2025-08-18 20:49:13 +03:00
buzz 0e5b509dc3 Drop Soulkyn import (#4372)
* Fix Soulkyn import

Generate and supply necessary headers to Soulkyn API request.
Fixes #4323

* Drop soulkyn import

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-13 22:25:21 +03:00
kallewoof c8612e2ab6 feature: ignore budget switch (#4354)
* feature: ignore budget switch

The budget cap default at 25% is a big gotcha at the start of chats, as a person may assume that a constant lore book entry will always be present, no matter what. This pull request adds a budget ignore switch which ignores the budget cap and includes the lore book entry even if it would exceed the budget cap.

* Move the toggle to entry details

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-06 21:30:42 +03:00
Cohee f81e14a2e8 Add copy option to move WI entry (#4335)
* Add copy option to move WI entry
Closes #4334

* Update moveWorldInfoEntry log to indicate copy or move action
2025-08-02 19:45:51 +03:00
Cohee 0b7f9451f4 Adjust addl. params YAML placeholders
Fixes #4333
2025-07-31 01:18:04 +03:00
Cohee 086f873f2f Deprecate 01.ai chat completion source (#4327) 2025-07-28 21:29:01 +03:00
Cohee d641cbecc4 Remove Scale Spellbook from CC sources (#4293) 2025-07-24 22:02:45 +03:00
Cohee 7429726eb1 Remove Window AI from CC sources (#4294) 2025-07-22 19:45:54 +03:00
Marcela Petra Ferraz de Novaes 34118bbdc2 Feature/Perchance AI Character Chat import (#4211)
* Adding ZLib and Jimp imports.

* Adding checks to see if UUID or URL are from Perchance.

* Adding conversion for Perchance cards and avatar.

* Adding label and example for Perchance character import.

* Adding localization of Perchance import option.

* Lint dangling comma fix.

* Simplifying one liner arrow function.

* Checking .gz at the end of Perchance url.

* Refactoring.

* Handling Base64 avatars.

* Fixing issue with UUID and refactoring.

* Adding char name to Perchance UUID example.

* Undoing unwanted variable name change of avatarBuffer to defaultAvatarBuffer

* Adding null check.

* Minor adjustments: renaming variable and organizing imports.

* Simple refactoring and reducing level of console messages.

* Add character source for perchance

* Add null check

* Use slug for source

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-06-28 16:18:26 +03:00
qvink b37b4d0357 removing zh-tw translations specific to the qvink memory extension 2025-06-23 15:12:01 -06:00
Rivelle 5a62fc29f1 Update zh-tw.json 2025-06-14 01:13:35 +08:00
Rivelle 0af655b2f7 Improve and Add Traditional Chinese Translations
- Added missing Traditional Chinese translations for the latest version
- Improved existing Traditional Chinese translations for clarity, professionalism, and neutrality
- Also fixed an obvious error in the Simplified Chinese translation
2025-06-14 01:10:53 +08:00
Cohee 8b82325d30 Localization improvements 2025-06-12 20:54:55 +03:00
Yokayo 5b4198957a Work on tl 2025-06-13 00:37:21 +07:00
buzz 4bec90abb5 Import character card from Soulkyn (#4042) 2025-05-27 22:30:15 +03:00
Cohee edf307aa9c claude 4 2025-05-22 21:14:13 +03:00
Cohee b0f82b0348 Clean-up image inlining hint 2025-05-22 00:09:45 +03:00
aalizelau 77f5ef3424 Hide tag for character (#4019)
* Add tagOptions parameter to printTagList for character-specific filtering

* Add toggle functionality to hide tags in tag management popup

* Add translations for "Hide on character card" in multiple locale files

* Add is_hidden_on_character_card property to newTag function

* applied linter

* revert back `DEFAULT_TAGS_LIMIT`

* Remove debug logs

* Adjust HTML

* Render list and save settings on toggle change

* Make tag manager wide

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-05-20 20:41:03 +03:00
Kristian Schlikow 8100a542e2 Implement a priority for prompt injections in CC (#3978)
* Implement a priority for prompt injections in CC

Adds a numeric order for injected prompts, 0 being default and placed at the top, and higher numbers placing further down. If two messages have the same priority, then order is determined by role as was before.

* Update data-i18n for new setting field

* Rename priority to order, sort higher first/lower last

* Hide order when position is relative, adjust hint text

* Fix type error

* Fix capitalization

* Cut UI texts

* Reposition text labels

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-05-12 23:59:54 +03:00
Rivelle 78b42905f4 Update zh-tw.json 2025-05-05 21:21:44 +08:00
Rivelle 7b777fb803 Update zh-tw.json 2025-05-05 20:24:12 +08:00
Cohee bb9fe64652 Merge pull request #3930 from Yokayo/staging
Update ru-ru translation
2025-05-04 14:10:12 +03:00
Yokayo 1822c4f91b More work on tl 2025-05-03 18:12:18 +07:00
Cohee 63e7139a81 Clean-up i18n 2025-04-30 22:00:09 +03:00