Commit Graph

108 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
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
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 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
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
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
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
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 63e7139a81 Clean-up i18n 2025-04-30 22:00:09 +03:00
Cohee 775ae0f557 TC sysprompt: Add Post-History Instructions control
Closes #3920
2025-04-28 00:14:57 +03:00
Cohee c7ce0fe66a Fix localized API URL examples
Fixes #3807
2025-04-04 10:57:22 +00:00
Sevenyine b1acfec825 Supplemented translations 2025-03-02 16:44:53 +08:00
Sevenyine 6e6d1b24eb Delete unused i18n keys 2025-03-02 16:33:54 +08:00
Sevenyine 6e15e4875d Update i18n keys in other languages due to changes in index.html 2025-03-02 16:31:40 +08:00
Peter Dave Hello 01b0a84b70 Improve zh-TW Traditional Chinese locale a bit
Fix some terms converted from Simplified Chinese, and also improve the
consistency and some spaces.
2025-02-24 22:59:19 +08:00
Rivelle 26c9c7e56b Update zh-tw.json 2025-02-23 17:57:27 +08:00
Rivelle 810bca46a0 Update zh-tw.json 2025-02-23 13:08:36 +08:00
Wolfsblvt 5a22e64466 Improve tooltip for never_resize_avatars 2025-02-23 02:26:36 +01:00
Cohee 1adde74f38 Merge branch 'staging' into support-multiple-expressions 2025-02-21 21:06:20 +02:00
Wolfsblvt c12f26441e Merge branch 'staging' into support-multiple-expressions 2025-02-19 20:22:02 +01:00
Cohee e4269f5d1d Update i18n 2025-02-19 21:17:03 +02:00
Yokayo 2e77171137 Change key 2025-02-17 16:32:40 +07:00
Cohee 6e4a51b37f Update i18n 2025-02-08 23:15:11 +02:00
Wolfsblvt 25ffc4ac4a Merge branch 'staging' into support-multiple-expressions 2025-02-01 04:47:48 +01:00
Cohee 0c121ee95a Clarify think toggle label 2025-01-30 21:40:22 +02:00
Wolfsblvt 73393a5d5e yoink talkinghead - goodbye extras dependency 2025-01-30 01:44:27 +01:00
Cohee a5a8f6057b Merge branch 'staging' into woo-yeah 2025-01-27 20:56:04 +02:00