Commit Graph

11634 Commits

Author SHA1 Message Date
Cohee 5ec635aa40 fix npm audit in src/electron (#5405) 2026-04-06 00:46:27 +03:00
Tony Gies 700fc05411 feat: add Cloudflare Workers AI provider (#5385)
* feat: add Cloudflare Workers AI provider

Adds support for Cloudflare Workers AI using its OpenAI-compatible API.

Workers AI-specific stuff includes:
- Model list fetching and capabilities detection
- Tokenizer auto-detection for typical hosted model families
- Streaming not supported when using structured output

Closes #5305

* Make the entire header clickable

* Add missing samplers

* Fix non-streaming reasoning parsing

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-06 00:24:47 +03:00
KKTsN c9c652eece fix: improve streaming error propagation and forwarded response logging (#5317)
* Fix: Improve streaming error handling and forwarded response logging

* Fix: fix ESLint error  Strings must use singlequote  quotes

* fix: preserve and log forwarded stream errors

* chore: narrow forwarded stream error fix scope

* fix: make forwardFetchResponse awaitable and forward upstream error text

* Restore original happy path handling

* Remove redundant checks in forwardFetchResponse function

* Don't send anything on parsing error end

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-05 23:01:47 +03:00
Cohee d96d1451ab Add IP whitelist for SSO authentication headers (#5404)
* feat: add trusted proxies configuration for SSO authentication

* Refactor check to accept IP address directly

* Refactor IP patterns validation

* Unify warning message format
2026-04-05 22:20:39 +03:00
Tony Gies a45ec30cf0 Add tests for Cache, MemoryLimitedMap, and other util.js coverage gaps (#5365) 2026-04-05 21:05:08 +03:00
Tony Gies 8d8e3833f6 Add unit tests for TavernCardValidator (#5366)
* Add unit tests for TavernCardValidator
2026-04-05 21:03:18 +03:00
Tony Gies 760263b78a Add unit tests for prompt-converters.js (#5364)
* Add unit tests for prompt-converters.js

* fix: add type annotation for prompt-converters module

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-05 20:54:38 +03:00
Tony Gies 128888f605 Skip TTS for voices explicitly set to disabled (fixes #4970) (#5367)
* Skip TTS for voices explicitly set to disabled (fixes #4970)

* Always show disabled message in commands and fix restoring voice map UI

* Always show a message on manual TTS trigger

* Fix null current job on disabled

* Adjust type annotation

* Force update worker when disabled play is attempted

* Treat audio control queue as manual

* Update TTS message processing to include manual flag

* Don't show toast if was already shown by manual playback

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-05 20:25:26 +03:00
Cohee 8e8f501279 Immutable public and global content management (#5390)
* Use custom init script instead of postinstall

* Revert changes to start scripts in src\electron

* Add global data to content manager

* Add migration for public overrides and user.css location update

* Update npm publish workflow to use 'omit=dev' flag in npm ci commands

* Rename user.css readme file

* Fix indentation in userCssMiddleware function

* Add directory creation for content target

* Restore template compile location

* Move stylesheet up in index.json

* Use path.resolve for user.css file path in userCssMiddleware

* Correct capitalization in "Not Found" error page title and heading

* Remove init run from startup scripts

* Simplify user CSS file path resolution

* Update userCssMiddleware comment
2026-04-05 19:32:28 +03:00
Lumi 9e0ecefd64 Add Gemma 4 instruct, context, and reasoning presets (#5403)
* Add Gemma 4 context preset

* Add new instruction preset for Gemma 4

* Add Gemma 4 reasoning preset

* Add to index.json

* Disable wrapping, fix story string

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-05 19:25:11 +03:00
Cohee 0f4a0147fd Add VSCode settings for TypeScript SDK configuration (#5394)
* Add VSCode settings for TypeScript SDK configuration

* Install typescript as a dev dependency
2026-04-02 23:47:31 +03:00
Cohee 21e8cf9060 glm-5v-turbo (#5393)
* glm-5v-turbo

* Add support for image and video inlining
2026-04-02 20:19:01 +03:00
Cohee e2d8c0200f Use custom init script instead of postinstall (#5384)
* Use custom init script instead of postinstall

* Revert changes to start scripts in src\electron

* feat: add --ignore-scripts flag to npm install commands in batch and shell scripts

* feat: add --ignore-scripts flag to npm ci in Dockerfile
2026-04-01 23:34:00 +03:00
Cohee 04ef0632ee Save chat before emitting event for user message (#5389)
Fixes #5388
2026-04-01 23:19:56 +03:00
Cohee d2b2b1b4a6 fix: require long press to open swipe picker on phones (#5382)
* fix: require long press to open swipe picker on phones

* fix: clarify parameter description in assignLorebookToChat function

* fix: update event parameter type in onSwipeCounterClick to include TouchEvent

* fix: update event parameter types in onSwipeCounterClick and addLongPressEvent
2026-03-31 20:08:56 +03:00
Claude a8021ee6e1 Fix /genraw user instruct format not applied and unwanted system newline (#5372)
* Initial plan

* Fix /genraw user instruct format and system newline bugs

- Fix Bug #1: Change default role for string prompts from 'system' to 'user'
  to ensure user instruct formatting is properly applied
- Fix Bug #2: Remove unconditional newline after system prompt when using
  instruct mode, respecting the actual system instruct format

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/7bfd62eb-2898-468d-9ea9-42d694a394b9

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

* fix: add runtime string type check for substituteParams content

* Add fallback wrap for story string

---------

Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-03-31 01:02:31 +03:00
Copilot 63feac9423 feat: swipe picker expand/collapse, copy button, and left-align text (#5380)
* Initial plan

* feat: add expand/collapse, copy button, and left-align text in swipe picker

Addresses user feedback for swipe picker (added in 1.17.0):
1. Left-align swipe text (was inheriting centered alignment)
2. Add expand/collapse toggle using hidden checkbox + CSS :has
3. Add copy-to-clipboard button using shared copyText utility

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/90892f1c-3c75-404b-a93b-2abe672cc0e3

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

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

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/90892f1c-3c75-404b-a93b-2abe672cc0e3

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

* fix: address review feedback - hide checkbox, use chevron icons, align buttons with fa-fw

- Fix checkbox visibility by using !important to override input[type=checkbox] grid display
- Change expand icon to fa-chevron-down and collapse to fa-chevron-up
- Add fa-fw class to all action buttons (copy, expand/collapse, branch, delete) for even sizing
- Add align-items: baseline to the actions container

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/c8ca349f-3579-442a-baa1-fc138ba1d7a6

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

* revert unintended package-lock.json changes

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/c8ca349f-3579-442a-baa1-fc138ba1d7a6

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

* fix: update class names for chat action elements in swipe picker

* fix: prevent chevron layout shift and swap button order

- Use single label element as icon (fa-chevron-down) instead of two
  child <i> elements toggling visibility, preventing layout shift
- Override ::before content to chevron-up when expanded via CSS
- Swap chevron and copy button order (chevron first, then copy)

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/284283b1-6c7f-4371-bc4a-94d841513879

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

* style: add comment for FA unicode value in CSS

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/284283b1-6c7f-4371-bc4a-94d841513879

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

* Rotate the chevron instead of changing content

* Make the ui full height

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-03-31 00:41:03 +03:00
Copilot c918f4f36d Add opt-in toggle to keep hidden messages in chat vector index (#5378)
* Initial plan

* Add opt-in toggle to keep hidden messages in chat vector index

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/eadc80a1-a417-40df-a374-76d7c4a46ce3

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

* Revert package-lock changes

* Fix: Remove 'vectorized' class from chat messages before adding it

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-03-30 23:39:19 +03:00
Xiangzhe b89293418d fix: return Error objects from invokeFunctionTool and create error invocations (#5351)
* fix: return Error objects from invokeFunctionTool and create error invocations

invokeFunctionTool previously called .toString() on caught errors,
converting them to plain strings. This made the instanceof Error
check in invokeFunctionTools dead code.

Changes:
- Return Error objects directly from invokeFunctionTool
- Create error invocations with error: true flag when tools fail
- Record failed stealth tools in stealthCalls
- Preserve signature/reasoning on error invocations
- Add error field to ToolInvocation typedef

* fix: use Error.toString to avoid behavioral changes

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-30 23:26:48 +03:00
lunar sheep ff1ca1412a feat(secrets): update readSecret function to accept optional secret ID (#5356)
* feat(secrets): update readSecret function to accept optional secret ID

* add secret_id to ConnectionManagerRequestService payload

* fix: pass secret_id for Text Completion types

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-30 22:30:45 +03:00
Cohee 6bd766f857 CI: Update node to 24, run ci without scripts (#5376) (#5377) 2026-03-30 20:50:24 +03:00
Cohee 004f1336e6 CI: Update node to 24, run ci without scripts (#5376) 2026-03-30 20:49:12 +03:00
Cohee b4c721d7bc Fix npm audit in /tests (#5370) 2026-03-28 19:59:42 +02:00
Cohee e3f41666c6 Merge pull request #5368 from SillyTavern/staging
1.17.0
2026-03-28 19:22:41 +02:00
Tony Gies 271c1e22ca Fix async file deletion bugs in assets endpoint (#5363)
The delete handler had a missing `return` before `sendStatus(400)`,
causing execution to fall through to `sendStatus(200)`, a double-send
that triggers ERR_HTTP_HEADERS_SENT, which the catch block then
compounds by attempting a third `sendStatus(500)`.

Both the delete and download handlers used callback-based `fs.unlink()`
without awaiting completion. In the download handler, this caused a race
with `createWriteStream({ flags: 'wx' })` (which fails if the file
still exists). In both handlers, `throw err` inside the callback was an
unhandled exception that could never be caught by the outer try/catch.

Replace callback-based `fs.unlink()` with `await fs.promises.unlink()`
and add missing `return` statements to prevent response cascades.
2026-03-28 15:39:29 +02:00
Cohee bef7b39cbe Add glm-5.1 to models list (#5361) 2026-03-28 02:08:28 +02:00
Cohee c78f978ede fix: conditionally include secrets in user data backup (#5360)
* fix: conditionally include secrets in user data backup

* feat: add full data backup toggle

* 418 -> 403
I'm not a teapot

* Distinguish fails from disabled
2026-03-28 01:52:03 +02:00
Cohee b06a62952d Merge pull request #5359 from SillyTavern/chore/release-1.17.0
Update release version to 1.17.0 and fix audit in dependencies
2026-03-28 00:34:07 +02:00
Cohee f205128cc0 Restore typescript version 2026-03-28 00:14:45 +02:00
Cohee 16f6787aa9 Merge branch 'release' into chore/release-1.17.0 2026-03-28 00:07:37 +02:00
Cohee 322c9f03e1 Fix npm audit for path-to-regexp 2026-03-28 00:07:16 +02:00
Cohee 4371574b7f Fix npm audit for handlebars 2026-03-28 00:06:34 +02:00
Cohee f41127a0f9 Update version to 1.17.0 2026-03-28 00:04:27 +02:00
Cohee b3f1114a68 CI: SHA hash pin dependencies in Actions (#5358)
* Add Renovate configuration file

* Delete .github/workflows/update-i18n.yaml

* chore(deps): pin dependencies (#1)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update codelytv/pr-size-labeler action to v1.10.3 (#2)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Delete renovate.json

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-27 23:57:35 +02:00
awaae b04c974407 feat(ui): add interface to manage message swipe history (#5304)
* feat(ui): add popup to jump to a specific swipe

Adds a new "Jump to swipe history" button to message actions and makes
the swipe counter clickable on the latest message. This opens a
searchable popup allowing users to quickly find and jump to a
specific alternate swipe without having to click through them
sequentially.

- Adds a searchable swipe picker popup menu
- Makes the swipe counter interactive when multiple swipes exist
- Adds a dedicated swipe picker button to message controls

* fix(ui): hide swipe picker when there are no swipes

Ensures the newly added swipe picker button is only shown when a
message has multiple swipes available. It explicitly hides the
button for non-swipeable messages or messages with a single swipe.

* feat(ui): redesign swipe picker with direct id input

Replace text-based search with a numeric input for direct swipe navigation.
Update popup layout with a sticky header and improved scrolling behavior.
Sync input value with the currently selected swipe in the list.
Refactor styling to align with chat selection components.

* feat(ui): allow branching from specific swipes via picker

- Enable swipe picker for historical messages to inspect alternate swipes
- Add branch button to picker entries to create new chats from specific swipes
- Update saveChat and createBranch to accept chat snapshots
- Restrict swipe jumping to the active message only

* refactor(logic): consolidate swipe sync logic and simplify helpers

Update `syncSwipeToMes` to accept a target message object, enabling its
use in the bookmarks module and removing the duplicate
`applySwipeToSnapshot` function.

Also simplify `canOpenSwipePickerForMessage` and
`canJumpToSwipeForMessage` signatures by removing the redundant message
parameter.

* refactor(a11y): support dynamic roles via classes

Introduce a managed role system in the accessibility script to handle
elements that dynamically gain or lose interactive states. The mutation
observer now watches for class attribute changes and automatically
applies or clears roles (e.g., `role="button"`) using active selectors.

Updated the swipe counter to rely on this centralized system by toggling
an `.interactable` class instead of manually modifying tabindex and role
attributes. Removed the redundant 'Enter' keydown handler for the swipe
counter to prevent duplicate trigger events.

* fix(ui): compute missing token counts in swipe picker

Update renderSwipeList to asynchronously calculate token counts when
missing from swipe metadata. Introduce SWIPE_SOURCE.SWIPE_PICKER to
correctly identify swipes triggered from the picker and bypass
generation checks.

* feat(ui): enable deleting specific swipes via swipe picker

- Adds a delete button to swipe picker entries, allowing removal of specific message versions.
- Refactors deletion logic to handle removing non-current swipes without triggering animations and correctly updates indices.
- Includes confirmation dialogs and improves input focus behavior.

* refactor:Delete process inline to button click processor

* feat: universal swipe inspection and picker improvements

- Permit opening the swipe browser on any chat entry to review past generations.
- Parallelize the retrieval of token statistics to speed up list rendering.
- Format message metrics (length and tokens) into a single, concise string.
- Update the `getBranchChatSnapshot` API to accept an options object.
- Register swipe list items as interactable elements for keyboard control.
- Apply styling to prevent text highlighting on picker entries.

* fix:remove unused CSS

* fix: fix disabled styling for swipe delete button

Remove tooltips and prevent hover animations or glow effects when the
delete button is disabled in the swipe picker. Update CSS to enforce
default cursor and fixed opacity on hover for the disabled state.

* remove: Unused CSS

* Extract swipe-picker.js module

* Revert to manual ARIA role management

* Avoid scrollIntoView and scroll on open

* Fix keyboard interaction in past chats menu

* Fix a11y attribute

* fix: call refreshSwipeButtons when deleting not selected swipe

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-26 02:28:48 +02:00
Xiangzhe 94139f465e feat: add finalizeIntermediaryMessage for StreamingProcessor (#5333)
* feat: add finalizeIntermediaryMessage for streaming tool call chains

Add a lighter finalization method on StreamingProcessor that runs
before tool invocation. This ensures CHARACTER_MESSAGE_RENDERED is
emitted for streamed text messages before the tool call chain
continues, allowing extensions (TTS, image forwarding, etc.) to
process intermediary messages.

finalizeIntermediaryMessage performs essential processing:
- Code block styling (addCopyToCodeBlocks)
- Reasoning handler finalization
- Logprobs saving
- Image attachment processing
- Reasoning signature storage
- MESSAGE_RECEIVED and CHARACTER_MESSAGE_RENDERED events

Without the heavier onFinishStreaming operations:
- UI unlock (markUIGenStopped)
- Auto-swipe
- Sound playback
- Chat saving
- Swipe counter update

* fix: return Error objects from invokeFunctionTool and create error invocations

invokeFunctionTool previously called .toString() on caught errors,
converting them to plain strings. This made the 'instanceof Error'
check in invokeFunctionTools dead code - errors silently became
successful invocations, showToolCallError never fired, and the
result.errors array was always empty.

Changes:
- Return Error objects directly from invokeFunctionTool
- Create error invocations with error: true flag when tools fail
- Add error field to ToolInvocation typedef

* fix: record failed stealth tools in stealthCalls and preserve signature/reasoning on error invocations

When a stealth tool errors, its name was not added to stealthCalls, causing
shouldStopGeneration to evaluate as false. This led to an incorrect recursive
Generate('normal') call instead of stopping generation as the stealth tool
contract requires ('no follow-up generation').

Also preserve toolCall.signature and reasoningText on error invocations to
match the success path, preventing Gemini/OpenRouter multi-turn tool context
from breaking when a tool call fails.

* Clarify method comments

* fix: initialize error property in ToolInvocation to false

* Apply review suggestions

* Make options object required

* fix: remove unnecessary return statement in updateSwipeCounter method

* refactor: split tool call error handling into separate PR (#5351)

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-26 00:26:39 +02:00
Cohee 6f61bc8d95 Fix npm audit (yaml, picomatch) (#5354) 2026-03-26 00:18:49 +02:00
Copilot 319c647e13 Fix vLLM vector embeddings URL construction to preserve custom API path prefixes (#5350)
* Initial plan

* fix: use trimV1 and url-join for vLLM vector embeddings URL construction

Fixes URL path construction in vllm-vectors.js to preserve custom API
path prefixes (e.g. /compatible-mode/v1). Previously url.pathname
assignment would overwrite the entire path, stripping any prefix.

Now uses the same trimV1 + urlJoin pattern as llamacpp-vectors.js.

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/f708dd66-8961-4c23-8b8b-3ab868bf676a

* Revert package-lock

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-03-25 00:12:52 +02:00
SoniaNvm a794a3780a Renaming a lorebook now re-links itself to cards using it (with a confirmation prompt) (#5323)
* renaming a lorebook prompts to update existing links

* used suggested api and logic

* add world property to shallow function

* Fix type error in assignLorebookToChat invoke

* Remove debug console logs

* Fix activeCharacterUpdated

* Extract updateWorldInfoLinks into a func

* Invert if for an early return

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-24 23:48:43 +02:00
Raymond Flanagan 4839c76fb5 Handle port conflicts during server startup (#5349)
* Handle port conflicts during server startup

* Fix return type of startHTTPorHTTPS

* Update language in getAddressInUseMessage

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-24 23:29:25 +02:00
Wolfsblvt e52c035fcd Add allowEscapeClose option to popup class for Escape key behavior override (#5340)
* feat(popup): add allowEscapeClose option to override default escape key behavior

Add `allowEscapeClose` parameter to PopupOptions to explicitly control whether Escape key closes the popup, overriding the default logic that checks for visible cancel/close buttons. When null (default), uses existing behavior; when true, allows escape even without buttons; when false, prevents escape even with buttons present.

* feat(popup): enable Escape key closing for informational popups

Add `allowEscapeClose: true` option to TEXT-type popups in export preset, persona lore, sampler select, stats, and world info assignment dialogs to allow users to dismiss these informational popups with the Escape key.

* Improve Escape key interaction in popups

* Adjust jsdoc for allowEscapeClose

* Always return CANCELLED on Escape

* fix(popup): correct jsdoc for allowEscapeClose property description

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-24 01:11:38 +02:00
allo- d306194c51 Fix missing model name in tokenize requests for llama.cpp (fixes #4962) (#5344)
* Fix missing model name in tokenize requests for llama.cpp (fixes #4962)

The new router mode of llama.cpp allows to switch models on the fly,
what is already supported by SillyTavern. The call to the `/tokenize`
endpoint did not contain the model name, and failed in router mode.
This patch adds the `model` parameter similar to the implementation
for other backends.

* fix: migrate vllm and aphrodite to new payload field

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-23 23:12:02 +02:00
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
DeclineThyself 0e5928b13a Filter out inapplicable stop strings for Chat Completion (#5337)
* Stop strings apply to Chat Completions and should not be greyed out.

* Revert "Stop strings apply to Chat Completions and should not be greyed out."

This reverts commit 51e5cfee41e1298b0005ff9df5d783c08820ed9a.

* Stopping strings should only apply to Text Completions https://github.com/SillyTavern/SillyTavern/pull/5337#pullrequestreview-3987164461

* Custom stop strings still apply

* Also apply to non-streaming message clean-up

* This comment is now misplaced

* Oops, wrong file

* Revert package-lock change

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-22 03:05:14 +02:00
Xiangzhe 2cb1861db6 feat: add SiliconFlow.cn chat completion and embedding support (#5316)
* feat: add SiliconFlow.cn endpoint support and embedding vectors

Chat completion:
- Add endpoint selection dropdown (Global/.com vs China/.cn) to existing
  SiliconFlow provider, following the Z.AI endpoint pattern
- Backend switches API URL based on selected endpoint
- Add /api-url slash command support for endpoint switching

Embeddings:
- Add SiliconFlow as a vector/embedding source (OpenAI-compatible)
- Support both .com and .cn endpoints via siliconflow_endpoint setting
  borrowed from the main connection panel (Vertex AI pattern)
- Superset model list with platform attribution (.cn) markers
- Models: Qwen3-Embedding (0.6B/4B/8B) + BGE/BCE models (.cn only)

* Add filter by models type

* Load embedding models from endpoint

* Improve api-url command declaration

* Support endpoint override in custom-request service

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-22 00:52:03 +02:00
Wolfsblvt 7766d41c42 Fix: Prevent Escape Key from Closing Non-Dismissable Popups (#5327)
* fix(popup): prevent Escape key from closing popups when both cancel and close buttons are hidden

Add validation in cancel listener to check visibility of cancel and close buttons before allowing Escape key to close popup. Set isClosingPrevented flag to block subsequent close events when neither button is visible.

* feat(popup): add double-escape force-close mechanism for blocking popups

Add double-escape detection (within 500ms) to allow force-closing blocking popups that have both cancel and close buttons hidden. Show confirmation dialog warning about potential inconsistent state before allowing force-close. Track last escape press timestamp and confirmation popup state to prevent duplicate dialogs. Gracefully cancel force-close confirmation if main popup closes naturally.
2026-03-22 00:09:17 +02:00
cloak1505 e3fbc8510a Correct input_video to video_url in embedOpenRouterMedia() (#5331) 2026-03-21 23:55:42 +02:00
Xiangzhe 67f97dbe73 fix: remove deprecated xAI grok-2-image-1212 model (#5334)
The grok-2-image-1212 model was deprecated on 2026-02-24 and is no
longer available. Only grok-imagine-image and grok-imagine-image-pro
remain as valid xAI image generation models.
2026-03-21 23:45:50 +02:00
Cohee 963786758b feat(slash-commands): add stringify option to /array-wrap command for JSON primitive handling 2026-03-20 01:29:30 +02:00
Wolfsblvt 240e9ca907 Extend Popup System with Placeholder, Tooltip, and Icon Support (+ those in slash commands) (#5322)
* feat: add placeholder and tooltip support to popup system with icon buttons

Add `placeholder` and `tooltip` options to main popup configuration. For INPUT type popups, placeholder applies to input field; for other types, tooltip applies to content area. Enhance custom buttons with optional `icon` parameter for Font Awesome icons and `tooltip` for hover text. Add tooltip support to custom inputs (placeholder for text/textarea, tooltip icon for checkboxes).

* fix: preserve default toastClass when applying custom cssClass in /echo command

Modify cssClass argument handling in echoCallback to append custom class to existing toastClass instead of replacing it. Use filter(Boolean).join(' ') to combine default and custom classes while handling undefined values.

* feat: add placeholder, tooltip, and icon support to popup system slash commands

Add `placeholder` and `tooltip` named arguments to /input command for input field customization. Add `tooltip` argument to /popup command for content area hover text. Enhance /buttons command to support button objects with `text`, `tooltip`, and `icon` (Font Awesome) properties alongside simple string labels. Update help text and examples for all three commands. Normalize button labels to ButtonLabel format internally

* Fix jsdoc wording

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

* fix: add validation for button labels in /buttons command

Add validation check to ensure each button entry is either a string or an object with a non-empty string `text` property. Return empty string and log warning if validation fails. Fix capitalization of 'Popup' in /popup command return value description.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-20 01:14:49 +02:00