Compare commits

...
Author SHA1 Message Date
copilot-swe-agent[bot]andCohee1207 5da9808a4d Revert unrelated package-lock.json changes
Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/24ce521f-29ee-4569-9930-65f75afe6800

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-04-15 18:32:56 +00:00
copilot-swe-agent[bot]andCohee1207 c345b65853 Fix silent chat overwrite when file first line is unparseable
When a chat file exists but its first line cannot be parsed as JSON
(due to corruption, encoding issues like BOM, or truncation),
checkChatIntegrity() previously returned true, silently allowing the
file to be overwritten without user confirmation.

Now it returns false in this case, which triggers the existing
IntegrityMismatchError and shows the OVERWRITE confirmation dialog,
preventing silent data loss.

The legitimate upgrade path (old format files without integrity
metadata) is preserved: files with valid JSON but no integrity
field still pass the check.

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/24ce521f-29ee-4569-9930-65f75afe6800

Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-04-15 18:32:26 +00:00
copilot-swe-agent[bot] ebbb8057c2 Initial plan 2026-04-15 18:22:32 +00:00
CopilotandCohee1207 4d67a6986b fix: missing closing bracket in jQuery selector in setInContextMessages() (#5451)
* Initial plan

* fix: add missing closing bracket in jQuery selector in setInContextMessages()

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/756522d8-8fe8-4c14-bcea-31d520619fb5

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-04-15 21:21:32 +03:00
WolfsblvtandCohee d72f4b6fcb Emit PERSONA_CREATED event on persona duplication (#5448)
* feat: emit PERSONA_CREATED event when duplicating a persona

Adds PERSONA_CREATED event emission in duplicatePersona() to notify listeners when a persona is duplicated. Includes the new avatarId, name, and duplicatedFromAvatarId in the event payload.

* fix: event data and execution order

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-14 00:19:02 +03:00
WolfsblvtandCohee 737cb95adb Add clean extension lifecycle hook for optional data cleanup (#5449)
* Add 'clean' extension hook support with optional cleanup on delete

- Add hasExtensionHook() helper to check if an extension defines a specific manifest hook
- Add 'clean' hook type to callExtensionHook() JSDoc
- Add clean button to extension UI when 'clean' hook is present
- Add onCleanClick() handler to run clean hook with confirmation
- Add cleanExtension() function to execute clean hook and reload page
- Modify deleteExtension() to optionally run clean hook before deletion
- Show cleanup checkbox on extension delete popup

* fix lint

Remove unused `callGenericPopup` import from extensions.js

* Force save settings before page reload in extension clean and delete operations

Add explicit saveSettings() calls in cleanExtension() and deleteExtension() to prevent race conditions where clean/delete hooks might update settings that get lost during the subsequent page reload.

* Remove admin permission check from extension clean operation

The clean hook is extension-defined and may not require admin privileges. Permission checks should be handled by the extension's clean hook implementation if needed, rather than enforcing a blanket restriction at the UI level.

* fix: show clean button for built-ins

* Update hasExtensionHook to support built-in extensions

* Revert "Update hasExtensionHook to support built-in extensions"

This reverts commit 31be55ea66.

* Revert "fix: show clean button for built-ins"

This reverts commit 5f86fec70c.

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-14 00:18:43 +03:00
ReithanandCohee 1a561f3bb0 KoboldCpp: Allow grammar to keep place during continue (#5444)
* allow grammar to keep place during continue

* lint

* fix: require kai flag for grammar to be set

* fix: don't retain if grammar is empty

* fix: default to undefined if not retain

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-13 20:57:47 +03:00
WolfsblvtandCohee f4f390f325 Fix: Missing signature and toolSignatures fields in ChatCompletionService streaming state (#5439)
* Fix: Add signature and toolSignatures fields to ChatCompletionService streaming state object

* fix: pass images array to getStreamingReply

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-13 20:19:02 +03:00
Wolfsblvt 6a325d2b22 Add disabled property support to all popup input types (#5441)
Adds optional `disabled` boolean property to PopupInputConfiguration JSDoc and implements it across all input types (checkbox, text, textarea, number). When set to true, the input element will be rendered in a disabled state.
2026-04-13 19:39:16 +03:00
Wolfsblvt a7f144f28b feat: add getExtensionManifest() to extensions.js and expose via getContext() (#5442)
Returns a structuredClone of the loaded manifest for the given extension name.
Accepts either the short name or full internal key (third-party/...).
Returns null if the extension is not registered.
2026-04-13 19:27:56 +03:00
WolfsblvtandCohee 7d3d1231a9 Chore: Add persona lifecycle events (PERSONA_CREATED, PERSONA_UPDATED, PERSONA_RENAMED, PERSONA_DELETED) (#5443)
* Add persona lifecycle events (created, updated, renamed, deleted) and emit them throughout persona management functions

* fix: await event emissions

* fix: await event in convertCharacterToPersona

* fix: await PERSONA_UPDATED in callbacks

* fix: delete multiple personas without reloading the chat

* fix: add CHAT_RENAMED event and adjust welcome screen pin update logic

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-13 19:24:38 +03:00
Cohee 24379db88d Gemma 4 reasoning: drop newline there (#5433)
https://github.com/SillyTavern/SillyTavern/commit/9e0ecefd6456c2103fd3b195a7cefebd7e01cf67#r181874666
2026-04-10 21:31:40 +03:00
CopilotandCohee1207 ff10249ab5 Add configurable welcome screen recent chats, fix pin loss on rename, and add popup number input validation (#5436)
* Add configurable recent chats settings and fix pin loss on chat rename

- Add gear icon button to welcome screen header for settings
- Settings popup with Max recent chats (default: 15) and Collapsed recent chats (default: 3) options
- Settings stored in accountStorage as 'recentChatsSettings'
- Add PinnedChatsManager.rename() to migrate pin state when chats are renamed
- Call rename() from both character and group chat rename functions

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/99fa84c4-a82b-4253-96ff-a0621fb63f5c

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

* Fix pin rename: use file_name with .jsonl extension to match stored pin keys

The data-file attribute contains chat_name (without .jsonl), but PinnedChatsManager
stores keys using file_name (with .jsonl). Append .jsonl to both old and new names
when calling PinnedChatsManager.rename() in character and group chat rename functions.

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/c8e4f720-1d0b-49ef-b57b-ba9d85c42d4f

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

* Refactor to support number inputs

* Restore package-lock

* Use clamp() from utils.js instead of manual Math.min/Math.max

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/1669884c-1bd3-4b60-808d-5610f24838e6

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/1669884c-1bd3-4b60-808d-5610f24838e6

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

* Use input values instead of magic numbers

* Add auto-clamping on number inputs in popups and range placeholders in welcome-screen settings

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/9af8ad07-77bc-46db-9ec6-0030fecf0f8d

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

* Use constants for min/max chat limits to avoid hardcoded duplication in tooltips

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/9af8ad07-77bc-46db-9ec6-0030fecf0f8d

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

* Improve input validation by using Number.isFinite for min/max values in Popup class

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-04-10 21:30:43 +03:00
CopilotandCohee1207 64e8c8d964 Refactor repetitive vectorization model loading into a generic data-driven function (#5425)
* refactor: replace 12 individual load/populate functions with generic loadRemoteEmbeddingModels

Replaced 6 pairs of load+populate functions (Chutes, NanoGPT, ElectronHub,
OpenRouter, SiliconFlow, WorkersAI) with a single data-driven generic
function and a configuration map, following the pattern used by the
caption extension's processEndpoint helper.

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/29bd42f8-b35b-442f-91fe-bd6c1092436e

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

* address review: always include body, use typeof check, remove omitContentType

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/ccfc6ba8-57fd-4411-8e12-106b5e11be86

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-04-09 23:50:32 +03:00
WolfsblvtandCohee f3521e7007 Migrate built-in extensions to use manifest-based activate hooks (#5435)
* Convert jQuery/IIFE wrappers to exported init() functions and register activate hooks in 8 extension manifests

* Convert remaining extensions to exported init() with activate hooks and await initExtensions()

- Convert jQuery/IIFE wrappers to exported init() functions in expressions, memory, quick-reply, regex, stable-diffusion, translate, tts, and vectors extensions

- Register init functions as activate hooks in extension manifests

- Properly await async initExtensions() in firstLoadInit()

* Fix eslint

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-09 23:49:55 +03:00
Wolfsblvt fb915b4321 Add /regex-state slash command to check regex script status (#5428)
* feat: add /regex-state command to check script enabled status

Adds a new slash command that returns 'on' or 'off' to indicate whether a regex script is currently enabled or disabled.

* refactor: change /regex-state return values from 'on'/'off' to 'true'/'false'

Updates the /regex-state slash command to return boolean string values ('true'/'false') instead of ('on'/'off') for better consistency with standard boolean conventions.
2026-04-09 23:27:36 +03:00
Alex DillsandCohee fa9a28c6f3 Fix stable-diffusion.cpp model routing and URL path handling (#5427)
* fix: include model field in sd.cpp SDAPI requests and preserve URL path

The sd.cpp integration overwrites the URL pathname when constructing
requests, which breaks proxy servers like llama-swap that use path-based
routing (e.g. /upstream/model-name). Additionally, the model field was
never included in SDAPI requests, which is required by llama-swap to
route requests to the correct backend.

Changes:
- Server: Append to URL pathname instead of overwriting (same pattern as #5178)
- Server: Pass model field through to sd-server payload
- Client: Add model name text input for sd.cpp source settings
- Client: Send model name in generate request payload

* fix: fetch models from server and populate standard Model dropdown

Instead of a separate text input for the model name, fetch the model
list from the sd.cpp server's /v1/models endpoint and populate the
standard Model dropdown. This provides a seamless experience where
users just pick a model from the dropdown like any other source.

Works with both standalone sd-server and proxy servers like llama-swap
that expose multiple models via the OpenAI-compatible models endpoint.

* fix: don't send clip_skip=1 to sd.cpp, it produces blank images

sd-server generates blank white images when clip_skip is set to 1.
Since clip_skip=1 means 'use all CLIP layers' (the default behavior),
only send the parameter when it's > 1.

* Fix eslint

* Replace string appends with urlJoin

* fix: convert URL strings to URL objects in sdcpp routes

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-09 23:12:21 +03:00
Wolfsblvt ff4c6fa1bb chore: add arguments logging to deprecated MacrosParser method warnings (#5429)
Extends the #logDeprecated helper to accept and log the arguments passed to deprecated methods, providing better debugging context for migration. Updates all deprecated method calls (get, has, registerMacro, unregisterMacro) to forward their arguments to the deprecation logger.
2026-04-09 22:33:54 +03:00
Wolfsblvt 81c85f8049 fix: skip pseudo-elements when generating focus-visible styles (#5430)
Prevents invalid CSS by skipping rules containing `::` (pseudo-elements like `::before`, `::after`, `::-webkit-scrollbar`) when converting `:hover` to `:focus-visible`, as pseudo-elements cannot receive focus.
2026-04-09 22:28:39 +03:00
Wolfsblvt 67eba1b472 fix: treat all English locale variants as supported fallback language (#5431)
Previously only exact 'en' was accepted as fallback when a language wasn't found. Now accepts any English variant (en-US, en-AU, etc.) to prevent spurious warnings for valid English locales.
2026-04-09 22:24:29 +03:00
Wolfsblvt df27574247 Fix: Remove unused ComfyUI RunPod API key input mapping (#5432) 2026-04-09 22:20:34 +03:00
Tony GiesandCohee a9c377c3c8 feat: add Workers AI text embeddings and multimodal captioning (#5414)
* feat: add Workers AI text embeddings and multimodal captioning

Extends the Cloudflare Workers AI integration to the vectors and
caption extensions.

Embeddings: adds workers_ai source to the vectors extension using the
OpenAI-compatible /v1/embeddings endpoint, with dynamic model listing
from the Cloudflare model search API.

Captioning: adds workers_ai as a multimodal caption API with dynamic
vision model discovery via the multimodal-models endpoint.

* Add logo svg

* Refactor caption dropdown population

* Fix order of sources

* feat: add error handling for missing Workers AI account ID

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-08 23:43:21 +03:00
bumpratandCohee 94a5773412 refactor(tts): remove redundant 4-space codeblock filter (#5406)
* refactor(tts): remove redundant 4-space codeblock filter

- Deleted the regex that removed lines starting with four spaces.
- Original intent was to strip "indented code blocks" (Markdown legacy syntax).
- In practice, SillyTavern already handles explicit code fences (```...``` and ~~~...~~~).
- Indented code blocks are rarely used and the regex caused unnecessary text loss in normal messages.
- Simplifies codeblock skipping logic and avoids accidental removal of valid content.

* Remove commented out code

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-08 22:11:21 +03:00
WolfsblvtandCohee 5e68410d4e Add Entry Preview to World Info Deletion Confirmation Dialog (#5423)
* feat: add entry preview to world info deletion confirmation dialog

Displays entry comment or first two lines of content in the deletion confirmation popup to help users verify they're deleting the correct entry.

* fix: sanitize world info entry preview text in deletion confirmation dialog

Adds DOMPurify sanitization to the entry preview text displayed in the deletion confirmation popup to prevent potential XSS vulnerabilities from unsanitized user content.

* DOMPurify -> escapeHtml

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-08 20:31:00 +03:00
Cohee 5ec635aa40 fix npm audit in src/electron (#5405) 2026-04-06 00:46:27 +03:00
Tony GiesandCohee 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
KKTsNandCohee 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 GiesandCohee 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 GiesandCohee 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
LumiandCohee 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
ClaudeandCohee1207 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
CopilotandCohee1207 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
CopilotandCohee1207 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
XiangzheandCohee 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 sheepandCohee 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
Coheeandrenovate[bot] 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
awaaeandCohee 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
XiangzheandCohee 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
CopilotandCohee1207 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
SoniaNvmandCohee 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 FlanaganandCohee 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
WolfsblvtandCohee 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-andCohee 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
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
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 51e5cfee41.

* 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
XiangzheandCohee 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
WolfsblvtandCopilot Autofix powered by AI 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
WolfsblvtandCohee a6486d7f08 Add Action Loader Module with Stacking Support and STscript Commands (#5311)
* Add action loader utility with stoppable toast notifications

* Add slash commands for action loader control (/loader-wrap, /loader-show, /loader-hide, /loader-stop)

* Refactor action loader to support stacking multiple loaders with individual toast management

- Convert action loader from singleton to class-based handle system (ActionLoaderHandle)
- Support multiple concurrent loaders with single overlay and stacked toasts
- Add unique ID generation and tracking for each loader instance
- Implement onHide callback alongside existing onStop callback
- Add getActiveLoaderHandles() and getLoaderHandleById() utility functions
- Refactor hideActionLoader() to accept...

* Improve action loader overlay and toast handling with better state checks and cleanup timing

- Check isLoaderDisplayed() before showing overlay to prevent conflicts with existing loaders
- Use toastr.options.hideDuration for toast removal timing instead of hardcoded 250ms
- Simplify hideActionLoader() by using getActiveLoaderHandles() helper
- Remove redundant empty check in hideActionLoader()
- Add clarifying comment for intentional error throw in createClosureHandler()
- Remove redundant 'onStop' default

* fix stop button toast removal issue by using toastr.clear force option instead of manual removal with timeout

* Fix isLoaderDisplayed() by using double negation operator instead of null comparison

* Add non-blocking loader support with `blocking` parameter for toast-only action loaders

- Add `blocking` option to ActionLoaderHandle (default: true)
- Implement hasBlockingLoaders() helper to check for active blocking loaders
- Show/hide overlay only when blocking loaders are active
- Add `blocking` named argument to /loader-wrap and /loader-show commands
- Update help strings with non-blocking usage examples
- Import commonEnumProviders for boolean enum and isFalseBoolean utility

* Add optional title parameter to action loader toast notifications and reorder constructor parameters for consistency

- Add `title` parameter to ActionLoaderOptions and ActionLoaderHandle constructor
- Pass title to toastr.info() for toast notifications
- Reorder parameters: blocking, toastMode, message, title, stopTooltip (grouped by importance)
- Add warning when creating non-blocking loader without toast (invisible to user)
- Update /loader-wrap and /loader-show commands with title argument

* Add loader utility API to action-loader and expose it in ST context for convenient programmatic access

- Create `loader` object with show/hide/active/get methods and ToastMode/Handle exports
- Add JSDoc examples for basic usage, non-blocking tasks, and hiding all loaders
- Import and expose `loader` in ST context alongside existing loader functions

* Split slash command and functional modules

* Create abort controller on app init

* Remove HTML tags from "returns" declaration

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-20 01:04:39 +02:00
Cohee bdaadd17dd Fix npm audit 2026-03-20 00:28:06 +02:00
XiangzheandCohee e4ad489448 feat(tts): emit events and track messageId for third-party integrations (#5309)
* feat(tts): add event signals and messageId tracking for third-party integrations

* feat(tts): move events to core, centralize clone and id tracking

* Apply review suggestions

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-20 00:24:34 +02:00
Wolfsblvt 2a00253937 Fix description and firstMessage in /char-create command being optional
Make description and firstMessage optional parameters in createCharacterCallback, allowing character creation with only a name. Remove validation checks that previously required these fields to be non-empty strings.
2026-03-18 22:43:23 +01:00
276a0c2125 Remove long deprecated STscript commands and parameters (#5312)
* Remove deprecated 'format' argument from /listinjects and /listvars commands

* Remove deprecated /lock command and add as alias to /persona-lock

* Add 'bind' as an alias for /persona-lock command (#5321)

* Initial plan

* Add 'bind' as an alias for /persona-lock command

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>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-03-18 18:30:53 +02:00
DN2331 c3f36b2b9f fix(openrouter): respect enableThoughtSignatures setting for message signatures (#5318)
The addOpenRouterSignatures function was previously converting and appending message.signature to reasoning_details unconditionally, ignoring the `enableThoughtSignatures` setting.

This change adds a check for `enableThoughtSignatures` before converting message.signature, while still ensuring the original signature property is deleted to prevent API schema validation errors (HTTP 400).
2026-03-18 18:20:40 +02:00
WolfsblvtandCopilot Autofix powered by AI f9c42a32dd Character CRUD Slash Commands (#5306)
* feat: add character CRUD slash commands (char-create, char-update, char-get, char-delete)

Implement comprehensive character management commands allowing programmatic creation, modification, retrieval, and deletion of characters without UI interaction. All commands support named arguments with proper validation and error handling.

* feat: enhance char CRUD commands with favorite, avatar, and improved defaults

Add `favorite` and `avatar` named arguments to char-create and char-update commands. Make `char` argument optional in char-delete (defaults to current character). Improve documentation with clarifications on card tags vs ST tags, avatar URL sources, and usage examples. Add `fav` field to char-get output.

* feat: add /tag-import slash command for programmatic character tag import

Implement /tag-import command with `name` (defaults to {{char}}) and `mode` arguments (all/existing/none/ask). Command imports character card tags as ST tags for filtering/organizing. Returns 'true' if tags were imported, 'false' otherwise. Mode argument maps to existing tag_import_setting enum values.

* feat: enhance char-create and char-update with avatar upload and tag parsing

Add avatar resolution and upload support for char-create and char-update commands. Implement resolveAvatarData() to handle URLs, base64 data URLs, and local paths. Add uploadCharacterAvatar() to upload resolved images via /api/characters/edit-avatar. Parse tags argument as comma-separated array. Refresh side panel after char-update when modifying current character. Add char-get2 alias for testing.

* feat: enhance avatar argument in char CRUD commands with file picker and local path support

Add `prompt` value to avatar argument to open file picker dialog. Implement promptForAvatarFile() to handle image selection with validation. Add folderEnumMatchProvider() for autocomplete matching of folder paths. Update avatar enumList with common ST paths (characters/, backgrounds/, User Avatars/, assets/, user/images/). Remove external URL support from resolveAvatarData() - now only accepts "prompt", base

* feat: add /char-duplicate slash command with avatar resize support and enhanced avatar upload handling

Implement /char-duplicate command with `char` and `select` named arguments. Add `avatarPromptResize` argument to char-create and char-update for optional resize/crop dialog. Refactor duplicateCharacter() to accept avatar and silent parameters, returning the new avatar key. Enhance uploadCharacterAvatar() to handle resize prompts and return success status. Add cache busting and DOM refresh for avatar thumbnails

* refactor: optimize avatar refresh after upload by using cache busting and DOM query

Replace message-specific avatar refresh logic with generic image refresh targeting all thumbnails using the updated avatar URL. Remove unnecessary delay and character name matching. Add cache busting for both thumbnail and full character image. Use querySelectorAll to find and refresh all affected img elements in one pass.

* refactor: rename char-get alias from char-get2 to char-data

* refactor: move /dupe command to alias of /char-duplicate and fix characterIndex type

Move standalone /dupe command to alias of /char-duplicate for consistency with character CRUD commands. Cast characterIndex to String in char-update to match expected type.

* docs: clarify /imagine command integration with avatar argument in char CRUD commands

Update avatar argument descriptions and examples to explicitly mention /imagine command return value support. Reorder piped /imagine example to show correct command flow (generate image first, then update character).

* feat: add i18n support to char-create and char-update command error messages

Wrap validation error toastr messages in t`` template literals for translation support in /char-create and /char-update commands.

* feat: add group chat validation to /tag-import command

Add early validation check to prevent tag import in group chats. Display warning toastr message and return 'false' when selected_group is not null.

* Fix char update world property

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

* Fix help text documentation to match arg name

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

* fix: return empty string instead of throwing errors in char-create and char-update commands

Replace `throw error` with `return ''` in error handlers for /char-create and /char-update commands to prevent unhandled promise rejections while still displaying error toastr messages.

* refactor: make deleteCharacter return boolean success status and update char-delete command to use it

Change deleteCharacter to return boolean indicating success/failure instead of void. Return false on user cancellation or failed chat close, true when character is successfully deleted. Update /char-delete command to use returned success value instead of always returning 'true'.

* refactor: make description and firstMessage optional in /char-create command

Remove description and firstMessage from required fields array, allowing character creation with only a name. Update help text to reflect that only name is required.

* refactor: extract external URL check to utility function and add same-origin URL support for avatar resolution

Extract external URL check into `isExternalUrl` utility function in utils.js. Update `resolveAvatarData` to use new utility and add support for same-origin URLs by converting them to pathname before fetching.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-18 18:14:21 +02:00
Cohee bae4fd9f98 glm-5-turbo 2026-03-17 22:49:42 +02:00
GentleBurrandCohee c4024fe208 Fix AICC direct link import parsing (#5307)
* Fix AICC direct link import parsing

Update parseAICC in src/endpoints/content-manager.js to dynamically extract the author and character name from the end of the URL path. This resolves a 404 import error caused by AICC adding category subfolders and changing their base URL structure from /character-cards/ to /charactercards/.

* Clean up whitespace in content-manager.js

Remove unnecessary whitespace in URL path processing.

* Use isValidUrl for URL validation

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-17 20:35:22 +02:00
Cohee 4ab4fca89d Merge branch 'release' into staging 2026-03-16 00:14:59 +02:00
Cohee 30e66f0ea0 Fix npm audit 2026-03-15 23:39:42 +02:00
Cohee dbf15b335e Add /docker/dist to ignore files 2026-03-15 23:35:22 +02:00
Cohee 645b8063e1 Intellectual Webpack cache management (#5295)
* Intellectual Webpack cache management

* Check if webpackRoot exists.

* Wrap webpack directory reading in try-catch

* Enhance cache pruning console output
2026-03-15 23:30:57 +02:00
Cohee f868e9ed68 Merge branch 'release' into staging 2026-03-15 22:00:13 +02:00
Cohee 9917935248 ci: Split PR checks and PR manager workflows 2026-03-15 21:55:28 +02:00
CopilotandCohee1207 2e476bc742 Add reasoning-collapse, reasoning-expand, reasoning-toggle slash commands with range support (#5296)
* Initial plan

* Add reasoning-collapse, reasoning-expand, reasoning-toggle slash commands

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

* Add message range support to reasoning commands and allChatRange macro

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-03-15 20:22:25 +02:00
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 5e3c7570fa Update default reasoning config to match added template 2026-03-15 17:47:24 +02:00
Cohee b2c320dc0b Reasoning: Add template with <think> without newlines
Fixes #4932
2026-03-15 15:32:09 +02:00
CopilotandCohee1207 6d9d715948 Fix typo in KoboldAI.json: "OUPUT" → "OUTPUT" (#5282)
* Initial plan

* Fix typo in KoboldAI.json: "OUPUT" → "OUTPUT"

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-03-13 23:37:19 +02:00
Cohee 9bce79f797 Claude: fix non-streaming multipart text block parsing (#5278) 2026-03-13 21:12:46 +02:00
Cohee b259c975a3 Claude: disable adaptive thonk by default 2026-03-13 21:10:29 +02:00
CoheeandCopilot Autofix powered by AI db07c4a120 feat: add array-wrap and array-unwrap commands (#5277)
* feat: add array-wrap and array-unwrap commands

* Add LIST as available argument type

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

* Throw when trying to wrap a closure

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

* Throw on closure in array-unwrap

* Add the rest of argument types for array-unwrap

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

* Add Python-friendly aliases

* Don't filter out just strings

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

* Proper primitive value unwrapping

* Throw on multiple unnamed arguments

* Enhance parsed object wrapping

* Update comment to clarify boolean support in value wrapping

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-13 20:45:54 +02:00
MaksimandMaksim Sharkov c0a4682dcc feat: Add gemini-embedding-2-preview in google vectorization models (#5274)
Co-authored-by: Maksim Sharkov <msharkov@nobilis.team>
2026-03-13 19:58:06 +02:00
PavdigandCohee 8879272a6b fix: prioritize UI memory content for {{summary}} macro resolution (#5268)
* fix(extensions/Summarize): prioritize UI memory content for {{summary}} macro

The {{summary}} macro previously relied solely on history-based metadata, causing it to return empty when starting a new chat if 'None (not injected)' was selected as the injection position.

This change prioritizes the #memory_contents UI value to ensure the macro resolves immediately, even before the first history-based summary is generated.

* Implement for legacy macro

* Restore original trim call

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-11 22:57:53 +02:00
Cohee e0ed67357c Use string byte length for token guesstimation (#5267)
* Use string byte length for token guesstimation

* Use Buffer.byteLength on backend

* Preserve TextEncoder instance
2026-03-11 01:28:23 +02:00
1c5091539c feat: optionally gzip large save uploads with fallback (#5259)
* feat: optionally gzip large save uploads with fallback

* fix: replace Safari-prone save compression with fflate fallback

* refactor: align save upload compression with review feedback

* refactor: use compressRequest wrapper for save uploads

* Refactor request compression settings

* Fix default value

* Avoid null in bytes parsing result

* fix: switch request compression to fflate gzip

* fix: add request compression maxBytes cap and clarify timeout semantics

* Refresh package-lock.json

* Unify payload limit setting names

* Expose compression termination function

* Add compression to group chat saves

---------

Co-authored-by: Roland4396 <Roland4396@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-10 23:32:36 +02:00
Cohee dbf9bc1a54 Merge branch 'release' into staging 2026-03-10 22:43:14 +02:00
Cohee 0cb193c119 Update webpack dependency 2026-03-10 22:42:35 +02:00
Cohee a187c34638 Fix npm audit 2026-03-10 22:28:11 +02:00
Cohee ae5c65c3cf Baka-proofing OpenRouter OAuth flow 2026-03-09 20:46:46 +02:00
CopilotandCohee1207 3ad9b05e27 Implement extension manifest hooks for lifecycle events (#5261)
* Initial plan

* Implement extension manifest hooks for install, delete, enable, disable

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>

* Address review: use Object.hasOwn, add activate hook, simplify await, return folderName from backend

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

* Add 'update' hook that triggers on extension update

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

* Revert package-lock

* Add 5-second timeout for extension hook calls using delay and Promise.race

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>

* Add timeout warning log when extension hook exceeds 5 seconds

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

* Refactor extension hook call to handle synchronous results

* Refactor callExtensionHook to use constants for timeout results

---------

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-08 13:10:28 +02:00
Cohee 92dd9ecab2 gpt-5.4 2026-03-07 20:39:34 +02:00
7418d272a7 Split generateRaw into two functions exposing generateRawData (#5249)
* Split generateRaw into two functions exposing generateRawData

* Concise types

* Improve comments

* Update public/script.js

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

* Update public/script.js

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

* Update public/script.js

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

* Add GenerateRawParams typedef for improved documentation and clarity

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-07 19:56:30 +02:00
Cohee 7a9483efba Remove BOS from KoboldCpp token encoding
Fixes #4663
2026-03-07 18:28:20 +02:00
Cohee e19c4f7e19 Remove BOS token from Tabby encoding
Fixes #5254
2026-03-07 18:25:58 +02:00
HaochenandCohee 2415e6bc86 add Slash commands regenerate and swipe (#5243)
* add Slash commands regenerate and swipe

* Update /swipe slash command direction handling

* Fix await not working in groups

* Add SLASH_COMMAND source to swipe functionality and update constants

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-07 18:16:49 +02:00
Cohee 8c07dcda24 Show experimental engine onboarding for greeting macros 2026-03-07 17:52:00 +02:00
Lucas ScalaandCohee 90892fd236 Group add to background folder (#5237)
* group add

* make button not wide

* make single and batch add to folder use the same style popup

* prevent stuck UI, allow scrolling, prevent ::after conflicts

* extremely large commit, beware

* clear everything after performing bulk actions

* Unify bulk selection design language

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-07 17:41:28 +02:00
Cohee 764e9ddec0 Fix npm audit 2026-03-07 17:07:21 +02:00
Cohee a608b3451b Require Node 20 and up 2026-03-07 17:04:31 +02:00
equal-l2 e834d3724b Remove xAI web search capability (#5255)
With web search on, the API now returns 410 Gone.
2026-03-07 16:58:56 +02:00
Spicy MarinaraandCopilot f20aed95d0 Add gpt-5.3-chat-latest model support (#5241)
* Add gpt-5.3-chat-latest model support

- Add to OpenAI model dropdown (index.html)
- Add to captioning multimodal model list (caption/settings.html)
- Add to OPENAI_REASONING_EFFORT_MODELS (constants.js)
- Add OPENAI_FIXED_REASONING_EFFORT map to clamp effort to 'medium' (the only value this model accepts)
- Apply fixed effort override in both Azure and general OpenAI request paths (chat-completions.js)
- Update frontend gpt-5.x regex for parameter handling (openai.js)

* Update public/scripts/openai.js

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-04 20:04:04 +02:00
Cohee 83a16d144c Add path validation for chat directory operations 2026-03-03 23:43:23 +02:00
Cohee ff8b029c9d Fortify user data path checks 2026-03-03 22:00:44 +02:00
Cohee 2abade3f80 Add sanitize of chat import names 2026-03-03 21:55:47 +02:00
Cohee 5600c2067b Fix priority of movingDivs closing 2026-03-03 21:46:24 +02:00
Cohee 8e10051100 Gallery: Add wand menu item 2026-03-03 21:26:58 +02:00
Cohee 3070cf26cd Add config for adaptive thinking
Fixes #5236
2026-03-03 20:10:39 +02:00
Cohee 04df80d907 thy gemini-3.1-flash-lite consumed 2026-03-03 20:04:36 +02:00
Cohee b9efb12d4d Fix type error in createLazyFields 2026-03-03 15:48:45 +00:00
Cohee 552cb948ed Merge branch 'release' into staging 2026-03-03 15:46:36 +00:00
Cohee e41bcf0cce Fix npm audit 2026-03-03 15:46:13 +00:00
Wolfsblvt f5b1f913f9 Enable experimental macro engine by default (#5234) 2026-03-03 17:18:45 +02:00
b5a1d227fd Implement {{charFirstMessage}} / {{greeting}} macro with alternate greeting indexing and substitution (#5220)
* Initial plan

* Implement {{firstMessage}} / {{greeting}} macro for character's first message

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

* Simplify firstMessage resolver to use || instead of ?? for consistency

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

* Remove {{firstMessage}} alias, add 0-based greeting index for alternate greetings

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

* Add alternateGreetings to env, apply substitution to greetings

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

* Remove legacy greeting macro, keep only new engine implementation

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>
Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
2026-03-01 17:44:29 +02:00
Cohee 63fa9c1d07 Claude: map Reasoning Effort to adaptive thinking config (#5219)
Supersedes #5105
2026-03-01 17:11:22 +02:00
3db508a759 Support for isomorphic-git as an alternative git backend, part 1 (#5229)
* Initial version of git adapter for alternate backend. Only clone is
implemented.

* Regenerate package-lock.json

* Clarify comments in config.yaml regarding git backend options

---------

Co-authored-by: Sanitised <sanitised@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-01 17:08:07 +02:00
Tony Gies 15e2f24046 fix: skip system messages in OpenRouter cacheAtDepth calculation (#5230)
System messages in the OpenRouter messages array were being counted
toward depth and could receive cache_control breakpoints. Since
OpenRouter hoists system messages into Claude's separate system
parameter, this misplaced breakpoints and could prevent caching
entirely if the hoisted content fell below minimum cache size.

Closes #5227
2026-03-01 16:58:51 +02:00
Cohee c138bbd3d7 Merge branch 'release' into staging 2026-03-01 16:49:21 +02:00
Cohee b7bb8be35a Fix npm audit 2026-03-01 16:48:45 +02:00
Tony Gies 994234e557 Add unit tests for pure functions in src/util.js (#5231)
77 tests covering 24 pure functions: keyToEnv, getBasicAuthHeader,
getHexString, normalizeZipEntryPath, deepMerge, uuidv4,
humanizedDateTime, tryParse, clientRelativePath, getUniqueName,
removeFileExtension, removeColorFormatting, getSeparator, isValidUrl,
urlHostnameToIPv6, toBoolean, stringToBool, trimV1, trimTrailingSlash,
mutateJsonString, isPathUnderParent, isFileURL, getRequestURL, and
formatBytes (via getBasicAuthHeader pattern).

These are all deterministic, side-effect-free functions tested without
any mocking. Placed in a separate file from the existing util.test.js
to keep concerns separated.
2026-03-01 16:39:24 +02:00
Cohee d552be8484 Merge branch 'release' into staging 2026-02-27 20:34:17 +02:00
Cohee c536bfc7f5 Fix npm audit 2026-02-27 20:33:23 +02:00
Cohee 744ce7705d gemini-3.1-flash-image-preview 2026-02-27 20:26:22 +02:00
Cohee 649b4a5280 Merge branch 'release' into staging 2026-02-26 21:27:02 +02:00
Cohee 96aa970604 Fix npm audit 2026-02-26 21:26:40 +02:00
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
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
CopilotandCohee1207 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 ScalaandCohee 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
CopilotandCohee1207 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
GERNOMAandCohee 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
BriochandCohee 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
CopilotandCohee1207 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
ZhenyaPavandCohee 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 BrunaandCohee 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 ScalaandCohee 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
TosdandTosd0 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
CopilotandCohee1207 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
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
CopilotandCohee1207 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
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 CandCohee 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
CopilotandCohee1207 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
282 changed files with 14951 additions and 3733 deletions
+1
View File
@@ -11,6 +11,7 @@
/docker/extensions
/docker/data
/docker/plugins
/docker/dist
/public/scripts/extensions/third-party
# --- Plugins (keep only package files) ---
+23
View File
@@ -102,5 +102,28 @@ module.exports = {
// These rules should eventually be enabled.
'no-async-promise-executor': 'off',
'no-inner-declarations': 'off',
// Additional formatting rules based on codebase conventions
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'array-bracket-spacing': ['error', 'never'],
'computed-property-spacing': ['error', 'never'],
'block-spacing': ['error', 'always'],
'keyword-spacing': ['error', { before: true, after: true }],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', { anonymous: 'always', named: 'never', asyncArrow: 'always' }],
'space-in-parens': ['error', 'never'],
'comma-spacing': ['error', { before: false, after: true }],
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
'func-call-spacing': ['error', 'never'],
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 0 }],
'padded-blocks': ['error', 'never'],
'no-whitespace-before-property': 'error',
'space-unary-ops': ['error', { words: true, nonwords: false }],
'arrow-spacing': ['error', { before: true, after: true }],
'template-curly-spacing': ['error', 'never'],
'rest-spread-spacing': ['error', 'never'],
'generator-star-spacing': ['error', { before: false, after: true }],
'yield-star-spacing': ['error', { before: false, after: true }],
'template-tag-spacing': ['error', 'never'],
'switch-colon-spacing': ['error', { after: true, before: false }],
},
};
+1 -1
View File
@@ -36,7 +36,7 @@ Angefangen im Februar 2023 als Fork von TavernAI 1.2.8 hat SillyTavern nun über
## Brauche ich einen leistungsstarken PC, um SillyTavern auszuführen?
Die Hardwareanforderungen sind minimal: Es läuft auf allem, was NodeJS 18 oder höher ausführen kann. Wenn du LLM-Inferenz auf deinem lokalen Rechner durchführen möchtest, empfehlen wir eine NVIDIA-Grafikkarte der 3000er-Serie mit mindestens 6 GB VRAM, aber die tatsächlichen Anforderungen können je nach Modell und Backend, das du verwendest, variieren.
Die Hardwareanforderungen sind minimal: Es läuft auf allem, was NodeJS 20 oder höher ausführen kann. Wenn du LLM-Inferenz auf deinem lokalen Rechner durchführen möchtest, empfehlen wir eine NVIDIA-Grafikkarte der 3000er-Serie mit mindestens 6 GB VRAM, aber die tatsächlichen Anforderungen können je nach Modell und Backend, das du verwendest, variieren.
## Fragen oder Vorschläge?
+1 -1
View File
@@ -36,7 +36,7 @@ SillyTavern(略してST)は、テキスト生成LLM、画像生成エンジ
## SillyTavernを実行するには強力なPCが必要ですか?
ハードウェア要件は最小限です。NodeJS 18以上を実行できるものであれば何でも動作します。ローカルマシンでLLM推論を行う場合は、少なくとも6GBのVRAMを搭載した3000シリーズのNVIDIAグラフィックスカードを推奨しますが、実際の要件は使用するモデルやバックエンドによって異なる場合があります。
ハードウェア要件は最小限です。NodeJS 20以上を実行できるものであれば何でも動作します。ローカルマシンでLLM推論を行う場合は、少なくとも6GBのVRAMを搭載した3000シリーズのNVIDIAグラフィックスカードを推奨しますが、実際の要件は使用するモデルやバックエンドによって異なる場合があります。
## 質問や提案はありますか?
+1 -1
View File
@@ -36,7 +36,7 @@ SillyTavern(짧게는 ST)은 텍스트 생성 LLM, 이미지 생성 엔진, TTS
## SillyTavern을 위해서 좋은 성능의 PC가 필요한가요?
하드웨어 요구 사항은 거의 없습니다: NodeJS 18 이상을 실행할 수 있는 모든 환경에서 작동합니다. 다만 로컬 LLM 모델을 사용할 경우, 최소 6GB VRAM 이상의 3000번대 NVIDIA 그래픽 카드를 권장하지만, 실제 요구 사항은 사용하는 모델과 백엔드에 따라 달라질 수 있습니다.
하드웨어 요구 사항은 거의 없습니다: NodeJS 20 이상을 실행할 수 있는 모든 환경에서 작동합니다. 다만 로컬 LLM 모델을 사용할 경우, 최소 6GB VRAM 이상의 3000번대 NVIDIA 그래픽 카드를 권장하지만, 실제 요구 사항은 사용하는 모델과 백엔드에 따라 달라질 수 있습니다.
## 질문이나 제안이 있으신가요?
+1 -1
View File
@@ -36,7 +36,7 @@ SillyTavern (или сокращенно ST) - это локально уста
## Нужен ли мне мощный компьютер для запуска SillyTavern?
Требования к оборудованию минимальны: он будет работать на всем, что может запустить NodeJS 18 или выше. Если вы собираетесь выполнять инференс LLM на своем локальном компьютере, мы рекомендуем видеокарту NVIDIA 3000-й серии с не менее чем 6 ГБ видеопамяти, но фактические требования могут варьироваться в зависимости от модели и используемого вами бэкенда.
Требования к оборудованию минимальны: он будет работать на всем, что может запустить NodeJS 20 или выше. Если вы собираетесь выполнять инференс LLM на своем локальном компьютере, мы рекомендуем видеокарту NVIDIA 3000-й серии с не менее чем 6 ГБ видеопамяти, но фактические требования могут варьироваться в зависимости от модели и используемого вами бэкенда.
## Вопросы или предложения?
+1 -1
View File
@@ -36,7 +36,7 @@ SillyTavern 于 2023 年 2 月作为 TavernAI 1.2.8 的一个分支开始,如
## 我需要一台性能强大的电脑来运行 SillyTavern 吗?
硬件要求很低:任何可以运行 NodeJS 18 或更高版本的设备都可以运行它。如果您打算在本地计算机上进行 LLM 推理,我们建议使用至少具有 6GB VRAM 的 3000 系列 NVIDIA 显卡,但实际要求可能会根据模型和您使用的后端而有所不同。
硬件要求很低:任何可以运行 NodeJS 20 或更高版本的设备都可以运行它。如果您打算在本地计算机上进行 LLM 推理,我们建议使用至少具有 6GB VRAM 的 3000 系列 NVIDIA 显卡,但实际要求可能会根据模型和您使用的后端而有所不同。
## 有问题或建议?
+1 -1
View File
@@ -36,7 +36,7 @@ SillyTavern 起源於 2023 年 2 月,作為 TavernAI 1.2.8 的分支版本發
## 我需要高效能電腦才能運行 SillyTavern 嗎?
SillyTavern 的硬體需求相當低。任何能夠運行 NodeJS 18 或更高版本的設備都可以執行。若您打算在本地機器上進行 LLM 推理,我們建議使用擁有至少 6GB VRAM 的 3000 系列 NVIDIA 顯示卡,但實際需求可能因模型和您使用的後端而異。
SillyTavern 的硬體需求相當低。任何能夠運行 NodeJS 20 或更高版本的設備都可以執行。若您打算在本地機器上進行 LLM 推理,我們建議使用擁有至少 6GB VRAM 的 3000 系列 NVIDIA 顯示卡,但實際需求可能因模型和您使用的後端而異。
## 有任何問題或建議?
+2 -2
View File
@@ -23,7 +23,7 @@ We have a [Documentation website](https://docs.sillytavern.app/) to answer most
SillyTavern (or ST for short) is a locally installed user interface that allows you to interact with text generation LLMs, image generation engines, and TTS voice models.
Beginning in February 2023 as a fork of TavernAI 1.2.8, SillyTavern now has over 200 contributors and 2 years of independent development under its belt, and continues to serve as a leading software for savvy AI hobbyists.
Beginning in February 2023 as a fork of TavernAI 1.2.8, SillyTavern now has over 300 contributors and 3 years of independent development under its belt, and continues to serve as a leading software for savvy AI hobbyists.
## Our Vision
@@ -33,7 +33,7 @@ Beginning in February 2023 as a fork of TavernAI 1.2.8, SillyTavern now has over
## Do I need a powerful PC to run SillyTavern?
The hardware requirements are minimal: it will run on anything that can run NodeJS 18 or higher. If you intend to do LLM inference on your local machine, we recommend a 3000-series NVIDIA graphics card with at least 6GB of VRAM, but actual requirements may vary depending on the model and backend you choose to use.
The hardware requirements are minimal: it will run on anything that can run NodeJS 20 or higher. If you intend to do LLM inference on your local machine, we recommend a 3000-series NVIDIA graphics card with at least 6GB of VRAM, but actual requirements may vary depending on the model and backend you choose to use.
## Questions or suggestions?
+7 -7
View File
@@ -35,13 +35,13 @@ jobs:
# It's currently not possible to have `branches` under the `schedule` trigger
- name: Checkout the release branch (on release)
if: ${{ github.event_name == 'release' || github.event_name == 'push' }}
uses: actions/checkout@v4.1.2
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
ref: "release"
- name: Checkout the staging branch
if: ${{ github.event_name == 'schedule' }}
uses: actions/checkout@v4.1.2
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
ref: "staging"
@@ -55,13 +55,13 @@ jobs:
# Setting up QEMU for multi-arch image build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Extract metadata (tags, labels) for the image
uses: docker/metadata-action@v5.5.1
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
id: metadata
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
@@ -74,7 +74,7 @@ jobs:
# Login into package repository as the person who created the release
- name: Log in to the Container registry
uses: docker/login-action@v3
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
@@ -84,7 +84,7 @@ jobs:
# Tag it with branch name
# Assumes branch name is the version number
- name: Build and push
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
context: .
platforms: linux/amd64,linux/arm64
+13 -13
View File
@@ -22,7 +22,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -31,7 +31,7 @@ jobs:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Auto-Label Issues (Based on Issue Content)
# only auto label based on issue content once, on open (to prevent re-labeling removed labels)
@@ -39,7 +39,7 @@ jobs:
# Issue Labeler
# https://github.com/marketplace/actions/regex-issue-labeler
uses: github/issue-labeler@v3.4
uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
with:
configuration-path: .github/issues-auto-labels.yml
enable-versioned-regex: 0
@@ -56,7 +56,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -66,7 +66,7 @@ jobs:
if: contains(fromJSON('["👩‍💻 Good First Issue", "🙏 Help Wanted", "🪲 Confirmed", "⚠️ High Priority", "❕ Medium Priority", "💤 Low Priority"]'), github.event.label.name)
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
with:
actions: 'add-labels'
token: ${{ steps.app.outputs.token }}
@@ -76,7 +76,7 @@ jobs:
if: contains(fromJSON('["✅ Done", "✅ Done (staging)", "⚰️ Stale", "❌ wontfix"]'), github.event.label.name)
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
with:
actions: 'remove-labels'
token: ${{ steps.app.outputs.token }}
@@ -86,7 +86,7 @@ jobs:
if: contains(fromJSON('["❌ wontfix","👍 Approved","👩‍💻 Good First Issue"]'), github.event.label.name)
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
with:
actions: 'remove-labels'
token: ${{ steps.app.outputs.token }}
@@ -96,7 +96,7 @@ jobs:
if: github.event.label.name == '🪲 Confirmed'
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
with:
actions: 'remove-labels'
token: ${{ steps.app.outputs.token }}
@@ -114,7 +114,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -123,7 +123,7 @@ jobs:
- name: Remove Stale Label
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
with:
actions: 'remove-labels'
token: ${{ steps.app.outputs.token }}
@@ -141,7 +141,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -150,12 +150,12 @@ jobs:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Post Issue Comments Based on Labels
# Label Commenter
# https://github.com/marketplace/actions/label-commenter
uses: peaceiris/actions-label-commenter@v1.10.0
uses: peaceiris/actions-label-commenter@f0dbbef043eb1b150b566db36b0bdc8b7f505579 # v1.10.0
with:
config_file: .github/issues-auto-comments.yml
github_token: ${{ steps.app.outputs.token }}
@@ -22,7 +22,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -31,7 +31,7 @@ jobs:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Extract Linked Issues from Commit Message
id: extract_issues
+6 -6
View File
@@ -22,7 +22,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -31,7 +31,7 @@ jobs:
- name: Mark Issues/PRs without Activity
# Close Stale Issues and PRs
# https://github.com/marketplace/actions/close-stale-issues
uses: actions/stale@v9.1.0
uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
with:
repo-token: ${{ steps.app.outputs.token }}
days-before-stale: 183
@@ -67,7 +67,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -76,7 +76,7 @@ jobs:
- name: Mark Issues/PRs Awaiting User Response
# Close Stale Issues and PRs
# https://github.com/marketplace/actions/close-stale-issues
uses: actions/stale@v9.1.0
uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
with:
repo-token: ${{ steps.app.outputs.token }}
days-before-stale: 7
@@ -105,7 +105,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -114,7 +114,7 @@ jobs:
- name: Mark Issues with Alternative Exists
# Close Stale Issues and PRs
# https://github.com/marketplace/actions/close-stale-issues
uses: actions/stale@v9.1.0
uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
with:
repo-token: ${{ steps.app.outputs.token }}
days-before-stale: 7
+12 -10
View File
@@ -7,26 +7,28 @@ on:
release:
types: [created]
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
with:
node-version: 22
- run: npm ci
node-version: 24
- run: npm ci --omit=dev --ignore-scripts
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
with:
node-version: 22
node-version: 24
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm ci --omit=dev --ignore-scripts
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
+2 -2
View File
@@ -22,7 +22,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -31,7 +31,7 @@ jobs:
- name: Remove Pending Labels on Close
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
with:
actions: remove-labels
token: ${{ steps.app.outputs.token }}
+2 -2
View File
@@ -22,7 +22,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -31,7 +31,7 @@ jobs:
- name: Label if Author is a Repo Maintainer
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
with:
actions: 'add-labels'
token: ${{ steps.app.outputs.token }}
+17 -93
View File
@@ -12,82 +12,6 @@ permissions:
pull-requests: write
jobs:
run-eslint:
name: ✅ Check ESLint on PR
runs-on: ubuntu-latest
# Only needs to run when code is changed
if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
# Override permissions, linter likely needs write access to issues
permissions:
contents: read
issues: write
pull-requests: write
steps:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup Node.js
# Setup Node.js environment
# https://github.com/marketplace/actions/setup-node-js-environment
uses: actions/setup-node@v4.3.0
with:
node-version: 20
- name: Run npm install
run: npm ci
- name: Run ESLint
# Action ESLint
# https://github.com/marketplace/actions/action-eslint
uses: sibiraj-s/action-eslint@v3.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }} # ESLint can run with the original permissions
eslint-args: '--ignore-path=.gitignore --quiet'
extensions: 'js'
annotations: true
ignore-patterns: |
dist/
lib/
run-tests:
name: ✅ Run Unit Tests on PR
runs-on: ubuntu-latest
# Only needs to run when code is changed
if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
steps:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup Node.js
# Setup Node.js environment
# https://github.com/marketplace/actions/setup-node-js-environment
uses: actions/setup-node@v4.3.0
with:
node-version: 20
cache: 'npm'
- name: Install root dependencies
run: npm ci
- name: Install test dependencies
run: npm ci --prefix tests
- name: Run unit tests
run: npm run test:unit --prefix tests
label-by-size:
name: 🏷️ Label PR by Size
# This job should run after all others, to prevent possible concurrency issues
@@ -107,7 +31,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -116,7 +40,7 @@ jobs:
- name: Label PR Size
# Pull Request Size Labeler
# https://github.com/marketplace/actions/pull-request-size-labeler
uses: codelytv/pr-size-labeler@v1.10.2
uses: codelytv/pr-size-labeler@4ec67706cd878fbc1c8db0a5dcd28b6bb412e85a # v1.10.3
with:
GITHUB_TOKEN: ${{ steps.app.outputs.token }}
xs_label: '🟩 ⬤○○○○'
@@ -144,7 +68,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -153,12 +77,12 @@ jobs:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Apply Labels Based on Branch Name and Target Branch
# Pull Request Labeler
# https://github.com/marketplace/actions/labeler
uses: actions/labeler@v5.0.0
uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
with:
configuration-path: .github/pr-auto-labels-by-branch.yml
repo-token: ${{ steps.app.outputs.token }}
@@ -175,7 +99,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -184,12 +108,12 @@ jobs:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Apply Labels Based on Changed Files
# Pull Request Labeler
# https://github.com/marketplace/actions/labeler
uses: actions/labeler@v5.0.0
uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
env:
GITHUB_TOKEN: ${{ steps.app.outputs.token }} # labeler action needs some handholding
with:
@@ -209,7 +133,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -218,7 +142,7 @@ jobs:
- name: Add Vibe Coded Label
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
with:
actions: 'add-labels'
token: ${{ steps.app.outputs.token }}
@@ -246,7 +170,7 @@ jobs:
# This action runs on comments, which will not receive the env vars for this
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -256,7 +180,7 @@ jobs:
if: always()
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
with:
actions: 'remove-labels'
token: ${{ steps.app.outputs.token || github.token }} # Use fallback to GITHUB_TOKEN if app token is not available
@@ -281,7 +205,7 @@ jobs:
# GitHub Script
# https://github.com/marketplace/actions/github-script
id: label-check
uses: actions/github-script@v7.0.1
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const prLabels = context.payload.pull_request.labels.map(label => label.name);
@@ -325,7 +249,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -334,12 +258,12 @@ jobs:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Post PR Comments Based on Labels
# Label Commenter for PRs
# https://github.com/marketplace/actions/label-commenter
uses: peaceiris/actions-label-commenter@v1.10.0
uses: peaceiris/actions-label-commenter@f0dbbef043eb1b150b566db36b0bdc8b7f505579 # v1.10.0
with:
config_file: .github/pr-auto-comments.yml
github_token: ${{ steps.app.outputs.token }}
@@ -365,7 +289,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -22,7 +22,7 @@ jobs:
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
@@ -31,7 +31,7 @@ jobs:
- name: Check Merge Conflicts
# Label Conflicting Pull Requests
# https://github.com/marketplace/actions/label-conflicting-pull-requests
uses: eps1lon/actions-label-merge-conflict@v3.0.3
uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
with:
dirtyLabel: '🚫 Merge Conflicts'
repoToken: ${{ steps.app.outputs.token }}
+84
View File
@@ -0,0 +1,84 @@
name: ✅ Pull Request Checks
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
run-eslint:
name: ✅ Check ESLint on PR
runs-on: ubuntu-latest
# Only needs to run when code is changed
if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
# Override permissions, linter likely needs write access to issues
permissions:
contents: read
issues: write
pull-requests: write
steps:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup Node.js
# Setup Node.js environment
# https://github.com/marketplace/actions/setup-node-js-environment
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
node-version: 24
- name: Run npm install
run: npm ci --ignore-scripts
- name: Run ESLint
# Action ESLint
# https://github.com/marketplace/actions/action-eslint
uses: sibiraj-s/action-eslint@bcf41bb9abce43cdbad51ab9b3da2eddaa17eab3 # v3.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }} # ESLint can run with the original permissions
eslint-args: '--ignore-path=.gitignore --quiet'
extensions: 'js'
annotations: true
ignore-patterns: |
dist/
lib/
run-tests:
name: ✅ Run Unit Tests on PR
runs-on: ubuntu-latest
# Only needs to run when code is changed
if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
steps:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup Node.js
# Setup Node.js environment
# https://github.com/marketplace/actions/setup-node-js-environment
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
node-version: 24
- name: Install root dependencies
run: npm ci --ignore-scripts
- name: Install test dependencies
run: npm ci --ignore-scripts --prefix tests
- name: Run unit tests
run: npm run test:unit --prefix tests
-32
View File
@@ -1,32 +0,0 @@
name: Update i18n data
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
permissions: # Job-level permissions configuration starts here
contents: write # 'write' access to repository contents
steps:
- name: disable auto crlf
uses: steve02081504/disable-autocrlf@v1
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Create local changes
run: |
aria2c https://raw.githubusercontent.com/SillyTavern/SillyTavern-i18n/main/generate.py
aria2c https://raw.githubusercontent.com/SillyTavern/SillyTavern-i18n/main/requirements.txt
pip install -r ./requirements.txt
python ./generate.py "" --sort-keys
rm -f ./generate.py ./requirements.txt
- name: add all
run: git add -A
- name: push
uses: actions-go/push@master
with:
author-email: 41898282+github-actions[bot]@users.noreply.github.com
author-name: github-actions[bot]
commit-message: 'i18n changes'
remote: origin
+1
View File
@@ -26,6 +26,7 @@ public/stats.json
/docker/user
/docker/extensions
/docker/data
/docker/dist
.DS_Store
public/settings.json
/thumbnails
+2
View File
@@ -0,0 +1,2 @@
ignore-scripts=true
min-release-age=7
+4
View File
@@ -0,0 +1,4 @@
{
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
"js/ts.tsdk.path": "./node_modules/typescript/lib"
}
+1 -1
View File
@@ -19,7 +19,7 @@ COPY --chown=node:node . ./
RUN \
echo "*** Install npm packages ***" && \
npm ci --no-audit --no-fund --loglevel=error --no-progress --omit=dev && npm cache clean --force
npm ci --no-audit --no-fund --loglevel=error --no-progress --omit=dev --ignore-scripts && npm cache clean --force
# Create config directory and link config.yaml. Added hardcoded dirs(constants.js?)
# that must be present for Non-Root Mode and volumeless docker runs.
+1 -1
View File
@@ -1,7 +1,7 @@
@echo off
pushd %~dp0
set NODE_ENV=production
call npm install --no-save --no-audit --no-fund --loglevel=error --no-progress --omit=dev
call npm install --no-save --no-audit --no-fund --loglevel=error --no-progress --omit=dev --ignore-scripts
node server.js %*
pause
popd
+1 -1
View File
@@ -20,7 +20,7 @@ if %errorlevel% neq 0 (
)
)
set NODE_ENV=production
call npm install --no-save --no-audit --no-fund --loglevel=error --no-progress --omit=dev
call npm install --no-save --no-audit --no-fund --loglevel=error --no-progress --omit=dev --ignore-scripts
node server.js %*
:end
pause
+1 -1
View File
@@ -102,7 +102,7 @@ if %errorlevel% neq 0 (
echo Installing npm packages and starting server
set NODE_ENV=production
call npm install --no-save --no-audit --no-fund --loglevel=error --no-progress --omit=dev
call npm install --no-save --no-audit --no-fund --loglevel=error --no-progress --omit=dev --ignore-scripts
node server.js %*
:end
+31 -1
View File
@@ -127,6 +127,13 @@ sso:
# as that used for authentik. (Ensure the username in authentik
# is an exact match in lowercase with that in sillytavern).
authentikAuth: false
# List of trusted proxy IPs for SSO authentication.
# Supports wildcards or CIDR notation for subnets.
# Example: ['127.0.0.1', '192.168.1.1']
# Set to ['*'] to trust all proxies (NOT RECOMMENDED unless you have other security measures in place)
trustedProxies:
- ::1
- 127.0.0.1
# Host whitelist configuration. Recommended if you're using a listen mode
hostWhitelist:
@@ -165,6 +172,8 @@ rateLimiting:
## BACKUP CONFIGURATION
backups:
# Allow users to create a full backup archive of their data
allowFullDataBackup: true
# Common settings for all backup types
common:
# Number of backups to keep for each chat and settings file
@@ -202,6 +211,16 @@ performance:
memoryCacheCapacity: '100mb'
# Enables disk caching for character cards. Improves performances with large card libraries.
useDiskCache: true
# Configures gzip compression for client requests with large payloads (e.g. settings or chat saves).
requestCompression:
# Enable request compression.
enabled: false
# Minimum payload size to trigger compression. Set to 0 to compress all requests regardless of size.
minPayloadSize: '256kb'
# Hard upper payload size limit for compression. Set to 0 to allow compression of any size.
maxPayloadSize: '8mb'
# Timeout for request compression in milliseconds.
timeout: 4000
# CACHE BUSTER CONFIGURATION
# IMPORTANT: Requires localhost or a domain with HTTPS, otherwise will not work!
@@ -250,6 +269,13 @@ extensions:
speechToText: Xenova/whisper-small
textToSpeech: Xenova/speecht5_tts
# Git backend for plugin/extension repository operations.
# - Use "auto" to prefer system git, falling back to the integrated backend
# - Use "system" to force system backend
# - Use "builtin" to force integrated backend
git:
backend: auto
# Additional model tokenizers can be downloaded on demand.
# Disabling will fallback to another locally available tokenizer.
enableDownloadableTokenizers: true
@@ -293,7 +319,7 @@ claude:
# Otherwise, you'll just waste money on cache misses.
enableSystemPromptCache: false
# Enables caching of the message history at depth (if supported).
# https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
# https://platform.claude.com/docs/en/build-with-claude/prompt-caching
# -- IMPORTANT! --
# Use with caution. Behavior may be unpredictable and no guarantees can or will be made.
# Set to an integer to specify the desired depth. 0 (which does NOT include the prefill)
@@ -304,6 +330,10 @@ claude:
## 5m: base price x 1.25
## 1h: base price x 2
extendedTTL: false
# Enables adaptive thinking for supported models (Opus 4.6+).
# Disable to enforce legacy thinking mode (with thinking budget).
# https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking
enableAdaptiveThinking: false
# -- GOOGLE GEMINI API CONFIGURATION --
gemini:
# API endpoint version ("v1beta" or "v1alpha")
@@ -2,11 +2,11 @@
<html>
<head>
<title>Not found</title>
<title>Not Found</title>
</head>
<body>
<h1>Not found</h1>
<h1>Not Found</h1>
<p>
The requested URL was not found on this server.
</p>
+36
View File
@@ -638,5 +638,41 @@
{
"filename": "presets/reasoning/OpenAI Harmony.json",
"type": "reasoning"
},
{
"filename": "presets/reasoning/Think XML.json",
"type": "reasoning"
},
{
"filename": "presets/reasoning/Gemma 4.json",
"type": "reasoning"
},
{
"filename": "presets/instruct/Gemma 4.json",
"type": "instruct"
},
{
"filename": "presets/context/Gemma 4.json",
"type": "context"
},
{
"filename": "user.css",
"type": "stylesheet"
},
{
"filename": "errors/forbidden-by-whitelist.html",
"type": "error_page"
},
{
"filename": "errors/host-not-allowed.html",
"type": "error_page"
},
{
"filename": "errors/unauthorized.html",
"type": "error_page"
},
{
"filename": "errors/url-not-found.html",
"type": "error_page"
}
]
@@ -0,0 +1,14 @@
{
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
"name": "Gemma 4"
}
@@ -0,0 +1,25 @@
{
"input_sequence": "<|turn>user\n",
"output_sequence": "<|turn>model\n",
"last_output_sequence": "",
"system_sequence": "<|turn>system\n",
"stop_sequence": "<turn|>",
"wrap": false,
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<turn|>\n",
"input_suffix": "<turn|>\n",
"system_suffix": "<turn|>\n",
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|turn>system\n",
"story_string_suffix": "<turn|>\n",
"name": "Gemma 4"
}
@@ -1,6 +1,6 @@
{
"input_sequence": "{{[INPUT]}}",
"output_sequence": "{{[OUPUT]}}",
"output_sequence": "{{[OUTPUT]}}",
"last_output_sequence": "",
"system_sequence": "{{[SYSTEM]}}",
"stop_sequence": "",
@@ -0,0 +1,6 @@
{
"name": "Gemma 4",
"prefix": "<|channel>thought\n",
"suffix": "<channel|>",
"separator": "\n\n"
}
@@ -0,0 +1,6 @@
{
"name": "Think XML",
"prefix": "<think>",
"suffix": "</think>",
"separator": "\n"
}
+1 -1
View File
@@ -191,7 +191,7 @@
"custom_stopping_strings_macro": true,
"fuzzy_search": true,
"encode_tags": false,
"experimental_macro_engine": false,
"experimental_macro_engine": true,
"enableLabMode": false,
"enableZenSliders": false,
"ui_mode": 1,
+3 -3
View File
@@ -1,6 +1,6 @@
#!/bin/sh
# Function to handle startup logic (Config check + Postinstall + Start)
# Function to handle startup logic (Config check + init + Start)
start_sillytavern() {
local PREFIX="$1"
shift # Remove the first argument (PREFIX) so $@ contains the rest
@@ -11,8 +11,8 @@ start_sillytavern() {
$PREFIX cp "default/config.yaml" "config/config.yaml"
fi
# Execute postinstall to auto-populate config.yaml with missing values
$PREFIX npm run postinstall
# Execute init script to auto-populate config.yaml with missing values
$PREFIX npm run init
# Start the server
exec $PREFIX node server.js --listen "$@"
Vendored
+1 -1
View File
@@ -40,7 +40,7 @@ declare global {
/**
* Authenticated user handle.
*/
handle: string;
handle: string | null;
/**
* Last time the session was extended.
*/
+510 -118
View File
@@ -1,13 +1,12 @@
{
"name": "sillytavern",
"version": "1.16.0",
"version": "1.17.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sillytavern",
"version": "1.16.0",
"hasInstallScript": true,
"version": "1.17.0",
"license": "AGPL-3.0",
"dependencies": {
"@adobe/css-tools": "^4.4.4",
@@ -58,10 +57,11 @@
"droll": "^0.2.1",
"env-paths": "^3.0.0",
"express": "^4.21.0",
"fflate": "^0.8.2",
"form-data": "^4.0.4",
"fuse.js": "^7.1.0",
"google-translate-api-x": "^10.7.2",
"handlebars": "^4.7.8",
"handlebars": "^4.7.9",
"helmet": "^8.1.0",
"highlight.js": "^11.11.1",
"host-validation-middleware": "^0.1.1",
@@ -72,12 +72,13 @@
"ip-regex": "^5.0.0",
"ipaddr.js": "^2.2.0",
"is-docker": "^3.0.0",
"isomorphic-git": "^1.36.3",
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"mime-types": "^3.0.2",
"moment": "^2.30.1",
"morphdom": "^2.7.7",
"multer": "^2.0.2",
"multer": "^2.1.1",
"node-fetch": "^3.3.2",
"node-persist": "^4.0.4",
"open": "^10.2.0",
@@ -90,18 +91,18 @@
"seedrandom": "^3.0.5",
"showdown": "^2.1.0",
"sillytavern-transformers": "2.14.6",
"simple-git": "^3.28.0",
"simple-git": "^3.33.0",
"slidetoggle": "^4.0.0",
"tiktoken": "^1.0.22",
"url-join": "^5.0.0",
"vectra": "^0.2.2",
"wavefile": "^11.0.0",
"webpack": "^5.98.0",
"webpack": "^5.105.4",
"write-file-atomic": "^5.0.1",
"ws": "^8.18.3",
"yaml": "^2.8.1",
"yaml": "^2.8.3",
"yargs": "^17.7.1",
"yauzl": "^3.2.0"
"yauzl": "^3.2.1"
},
"bin": {
"sillytavern": "src/server-global.js"
@@ -123,7 +124,7 @@
"@types/jqueryui": "^1.12.24",
"@types/lodash": "^4.17.20",
"@types/mime-types": "^3.0.1",
"@types/multer": "^2.0.0",
"@types/multer": "^2.1.0",
"@types/node": "^18.19.84",
"@types/node-persist": "^3.1.8",
"@types/png-chunk-text": "^1.0.3",
@@ -137,10 +138,11 @@
"eslint": "^8.57.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsdoc": "^48.10.0",
"eslint-plugin-playwright": "^2.3.0"
"eslint-plugin-playwright": "^2.3.0",
"typescript": "^5.9.3"
},
"engines": {
"node": ">= 18"
"node": ">= 20"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@@ -2043,9 +2045,9 @@
"license": "MIT"
},
"node_modules/@types/multer": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/multer/-/multer-2.0.0.tgz",
"integrity": "sha512-C3Z9v9Evij2yST3RSBktxP9STm6OdMc5uR1xF1SGr98uv8dUlAL2hqwrZ3GVB3uyMyiegnscEK6PGtYvNrjTjw==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@types/multer/-/multer-2.1.0.tgz",
"integrity": "sha512-zYZb0+nJhOHtPpGDb3vqPjwpdeGlGC157VpkqNQL+UU2qwoacoQ7MpsAmUptI/0Oa127X32JzWDqQVEXp2RcIA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2606,9 +2608,9 @@
}
},
"node_modules/acorn": {
"version": "8.15.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"version": "8.16.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
"integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
"license": "MIT",
"peer": true,
"bin": {
@@ -2662,9 +2664,9 @@
}
},
"node_modules/ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"version": "6.14.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz",
"integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2696,9 +2698,9 @@
}
},
"node_modules/ajv-formats/node_modules/ajv": {
"version": "8.17.1",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
"integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3",
@@ -2826,12 +2828,12 @@
}
},
"node_modules/archiver-utils/node_modules/minimatch": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"version": "9.0.9",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz",
"integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==",
"license": "ISC",
"dependencies": {
"brace-expansion": "^2.0.1"
"brace-expansion": "^2.0.2"
},
"engines": {
"node": ">=16 || 14 >=14.17"
@@ -2982,12 +2984,33 @@
"resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz",
"integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg=="
},
"node_modules/async-lock": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz",
"integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==",
"license": "MIT"
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
},
"node_modules/available-typed-arrays": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
"integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
"license": "MIT",
"dependencies": {
"possible-typed-array-names": "^1.0.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/await-to-js": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/await-to-js/-/await-to-js-3.0.0.tgz",
@@ -3060,9 +3083,9 @@
}
},
"node_modules/basic-ftp": {
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz",
"integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==",
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.2.0.tgz",
"integrity": "sha512-VoMINM2rqJwJgfdHq6RiUudKt2BV+FY5ZFezP/ypmwayk68+NzzAQy4XXLlqsGD4MCzq3DrmNFD/uUmBJuGoXw==",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
@@ -3334,6 +3357,24 @@
"node": ">=8"
}
},
"node_modules/call-bind": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
"integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.0",
"es-define-property": "^1.0.0",
"get-intrinsic": "^1.2.4",
"set-function-length": "^1.2.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/call-bind-apply-helpers": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
@@ -3484,6 +3525,12 @@
"node": ">=6.0"
}
},
"node_modules/clean-git-ref": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz",
"integrity": "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==",
"license": "Apache-2.0"
},
"node_modules/cliui": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
@@ -4109,6 +4156,23 @@
"node": ">=10"
}
},
"node_modules/define-data-property": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
"license": "MIT",
"dependencies": {
"es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"gopd": "^1.0.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/define-lazy-prop": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
@@ -4169,6 +4233,12 @@
"integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==",
"license": "Apache-2.0"
},
"node_modules/diff3": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz",
"integrity": "sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==",
"license": "MIT"
},
"node_modules/digest-fetch": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/digest-fetch/-/digest-fetch-1.3.0.tgz",
@@ -4252,10 +4322,13 @@
}
},
"node_modules/dompurify": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.6.tgz",
"integrity": "sha512-/2GogDQlohXPZe6D6NOgQvXLPSYBqIWMnZ8zzOhn09REE4eyAzb+Hed3jhoM9OkuaJ8P6ZGTTVWQKAi8ieIzfQ==",
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.2.tgz",
"integrity": "sha512-6obghkliLdmKa56xdbLOpUZ43pAR6xFy1uOrxBaIDjT+yaRuuybLjGS9eVBoSR/UPU5fq3OXClEHLJNGvbxKpQ==",
"license": "(MPL-2.0 OR Apache-2.0)",
"engines": {
"node": ">=20"
},
"optionalDependencies": {
"@types/trusted-types": "^2.0.7"
}
@@ -4351,9 +4424,9 @@
}
},
"node_modules/enhanced-resolve": {
"version": "5.19.0",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.19.0.tgz",
"integrity": "sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg==",
"version": "5.20.0",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.20.0.tgz",
"integrity": "sha512-/ce7+jQ1PQ6rVXwe+jKEg5hW5ciicHwIQUagZkp6IufBoY3YDgdTTY1azVs0qoRgVmvsNB+rbjLJxDAeHHtwsQ==",
"license": "MIT",
"dependencies": {
"graceful-fs": "^4.2.4",
@@ -5023,6 +5096,12 @@
"node": "^12.20 || >= 14.13"
}
},
"node_modules/fflate": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz",
"integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==",
"license": "MIT"
},
"node_modules/file-entry-cache": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@@ -5123,9 +5202,9 @@
"license": "SEE LICENSE IN LICENSE.txt"
},
"node_modules/flatted": {
"version": "3.2.9",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz",
"integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==",
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz",
"integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==",
"dev": true,
"license": "ISC"
},
@@ -5149,6 +5228,21 @@
}
}
},
"node_modules/for-each": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz",
"integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==",
"license": "MIT",
"dependencies": {
"is-callable": "^1.2.7"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/foreground-child": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
@@ -5545,9 +5639,9 @@
"license": "ISC"
},
"node_modules/handlebars": {
"version": "4.7.8",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz",
"integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==",
"version": "4.7.9",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz",
"integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==",
"license": "MIT",
"dependencies": {
"minimist": "^1.2.5",
@@ -5574,6 +5668,18 @@
"node": ">=8"
}
},
"node_modules/has-property-descriptors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
"license": "MIT",
"dependencies": {
"es-define-property": "^1.0.0"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-symbols": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
@@ -5827,7 +5933,6 @@
"version": "5.2.4",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
"integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 4"
@@ -5955,6 +6060,18 @@
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
"license": "MIT"
},
"node_modules/is-callable": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
"integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-docker": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
@@ -6057,6 +6174,21 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-typed-array": {
"version": "1.1.15",
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",
"integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==",
"license": "MIT",
"dependencies": {
"which-typed-array": "^1.1.16"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-wsl": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz",
@@ -6114,6 +6246,88 @@
}
}
},
"node_modules/isomorphic-git": {
"version": "1.37.2",
"resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.37.2.tgz",
"integrity": "sha512-HCQBBKmXIMPdHgYGstSBNp6MNmVcMQBbUqJF8xfywFmlpNseO4KKex59YlXqNxhRxmv3fUZwvNWvMyOdc1VvhA==",
"license": "MIT",
"dependencies": {
"async-lock": "^1.4.1",
"clean-git-ref": "^2.0.1",
"crc-32": "^1.2.0",
"diff3": "0.0.3",
"ignore": "^5.1.4",
"minimisted": "^2.0.0",
"pako": "^1.0.10",
"pify": "^4.0.1",
"readable-stream": "^4.0.0",
"sha.js": "^2.4.12",
"simple-get": "^4.0.1"
},
"bin": {
"isogit": "cli.cjs"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/isomorphic-git/node_modules/crc-32": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",
"license": "Apache-2.0",
"bin": {
"crc32": "bin/crc32.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/isomorphic-git/node_modules/readable-stream": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
"license": "MIT",
"dependencies": {
"abort-controller": "^3.0.0",
"buffer": "^6.0.3",
"events": "^3.3.0",
"process": "^0.11.10",
"string_decoder": "^1.3.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/isomorphic-git/node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT"
},
"node_modules/isomorphic-git/node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"license": "MIT",
"dependencies": {
"safe-buffer": "~5.2.0"
}
},
"node_modules/jackspeak": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
@@ -6590,9 +6804,9 @@
}
},
"node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
"integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -6611,6 +6825,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/minimisted": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/minimisted/-/minimisted-2.0.1.tgz",
"integrity": "sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA==",
"license": "MIT",
"dependencies": {
"minimist": "^1.2.5"
}
},
"node_modules/minipass": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
@@ -6642,33 +6865,22 @@
"license": "MIT"
},
"node_modules/multer": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz",
"integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/multer/-/multer-2.1.1.tgz",
"integrity": "sha512-mo+QTzKlx8R7E5ylSXxWzGoXoZbOsRMpyitcht8By2KHvMbf3tjwosZ/Mu/XYU6UuJ3VZnODIrak5ZrPiPyB6A==",
"license": "MIT",
"dependencies": {
"append-field": "^1.0.0",
"busboy": "^1.6.0",
"concat-stream": "^2.0.0",
"mkdirp": "^0.5.6",
"object-assign": "^4.1.1",
"type-is": "^1.6.18",
"xtend": "^4.0.2"
"type-is": "^1.6.18"
},
"engines": {
"node": ">= 10.16.0"
}
},
"node_modules/multer/node_modules/mkdirp": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
"license": "MIT",
"dependencies": {
"minimist": "^1.2.6"
},
"bin": {
"mkdirp": "bin/cmd.js"
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/natural-compare": {
@@ -7243,9 +7455,9 @@
}
},
"node_modules/path-to-regexp": {
"version": "0.1.12",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",
"integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==",
"license": "MIT"
},
"node_modules/path-type": {
@@ -7296,9 +7508,9 @@
"license": "ISC"
},
"node_modules/picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
"integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7308,6 +7520,15 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/platform": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
@@ -7338,6 +7559,15 @@
"node": ">=14.19.0"
}
},
"node_modules/possible-typed-array-names": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
"integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
@@ -7540,15 +7770,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
"license": "MIT",
"dependencies": {
"safe-buffer": "^5.1.0"
}
},
"node_modules/range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
@@ -7714,9 +7935,10 @@
}
},
"node_modules/readdir-glob/node_modules/minimatch": {
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"version": "5.1.9",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz",
"integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==",
"license": "ISC",
"dependencies": {
"brace-expansion": "^2.0.1"
},
@@ -7899,9 +8121,9 @@
}
},
"node_modules/schema-utils/node_modules/ajv": {
"version": "8.17.1",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
"integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
"license": "MIT",
"peer": true,
"dependencies": {
@@ -7991,15 +8213,6 @@
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"license": "MIT"
},
"node_modules/serialize-javascript": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
"integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
"license": "BSD-3-Clause",
"dependencies": {
"randombytes": "^2.1.0"
}
},
"node_modules/serve-static": {
"version": "1.16.2",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
@@ -8015,12 +8228,69 @@
"node": ">= 0.8.0"
}
},
"node_modules/set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
"license": "MIT",
"dependencies": {
"define-data-property": "^1.1.4",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
"gopd": "^1.0.1",
"has-property-descriptors": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/setprototypeof": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
"license": "ISC"
},
"node_modules/sha.js": {
"version": "2.4.12",
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz",
"integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==",
"license": "(MIT AND BSD-3-Clause)",
"dependencies": {
"inherits": "^2.0.4",
"safe-buffer": "^5.2.1",
"to-buffer": "^1.2.0"
},
"bin": {
"sha.js": "bin.js"
},
"engines": {
"node": ">= 0.10"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/sha.js/node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT"
},
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -8191,10 +8461,55 @@
"regenerator-runtime": "^0.13.3"
}
},
"node_modules/simple-concat": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT"
},
"node_modules/simple-get": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
"integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT",
"dependencies": {
"decompress-response": "^6.0.0",
"once": "^1.3.1",
"simple-concat": "^1.0.0"
}
},
"node_modules/simple-git": {
"version": "3.28.0",
"resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.28.0.tgz",
"integrity": "sha512-Rs/vQRwsn1ILH1oBUy8NucJlXmnnLeLCfcvbSehkPzbv3wwoFWIdtfd6Ndo6ZPhlPsCZ60CPI4rxurnwAa+a2w==",
"version": "3.33.0",
"resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.33.0.tgz",
"integrity": "sha512-D4V/tGC2sjsoNhoMybKyGoE+v8A60hRawKQ1iFRA1zwuDgGZCBJ4ByOzZ5J8joBbi4Oam0qiPH+GhzmSBwbJng==",
"license": "MIT",
"dependencies": {
"@kwsites/file-exists": "^1.1.1",
@@ -8557,15 +8872,14 @@
}
},
"node_modules/terser-webpack-plugin": {
"version": "5.3.16",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz",
"integrity": "sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==",
"version": "5.3.17",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.17.tgz",
"integrity": "sha512-YR7PtUp6GMU91BgSJmlaX/rS2lGDbAF7D+Wtq7hRO+MiljNmodYvqslzCFiYVAgW+Qoaaia/QUIP4lGXufjdZw==",
"license": "MIT",
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.25",
"jest-worker": "^27.4.5",
"schema-utils": "^4.3.0",
"serialize-javascript": "^6.0.2",
"terser": "^5.31.1"
},
"engines": {
@@ -8615,6 +8929,46 @@
"integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==",
"license": "MIT"
},
"node_modules/to-buffer": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz",
"integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==",
"license": "MIT",
"dependencies": {
"isarray": "^2.0.5",
"safe-buffer": "^5.2.1",
"typed-array-buffer": "^1.0.3"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/to-buffer/node_modules/isarray": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
"license": "MIT"
},
"node_modules/to-buffer/node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT"
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -8763,6 +9117,20 @@
"node": ">= 0.6"
}
},
"node_modules/typed-array-buffer": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
"integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==",
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.3",
"es-errors": "^1.3.0",
"is-typed-array": "^1.1.14"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
@@ -8981,9 +9349,9 @@
}
},
"node_modules/webpack": {
"version": "5.105.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.105.0.tgz",
"integrity": "sha512-gX/dMkRQc7QOMzgTe6KsYFM7DxeIONQSui1s0n/0xht36HvrgbxtM1xBlgx596NbpHuQU8P7QpKwrZYwUX48nw==",
"version": "5.105.4",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.105.4.tgz",
"integrity": "sha512-jTywjboN9aHxFlToqb0K0Zs9SbBoW4zRUlGzI2tYNxVYcEi/IPpn+Xi4ye5jTLvX2YeLuic/IvxNot+Q1jMoOw==",
"license": "MIT",
"dependencies": {
"@types/eslint-scope": "^3.7.7",
@@ -8992,11 +9360,11 @@
"@webassemblyjs/ast": "^1.14.1",
"@webassemblyjs/wasm-edit": "^1.14.1",
"@webassemblyjs/wasm-parser": "^1.14.1",
"acorn": "^8.15.0",
"acorn": "^8.16.0",
"acorn-import-phases": "^1.0.3",
"browserslist": "^4.28.1",
"chrome-trace-event": "^1.0.2",
"enhanced-resolve": "^5.19.0",
"enhanced-resolve": "^5.20.0",
"es-module-lexer": "^2.0.0",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
@@ -9008,9 +9376,9 @@
"neo-async": "^2.6.2",
"schema-utils": "^4.3.3",
"tapable": "^2.3.0",
"terser-webpack-plugin": "^5.3.16",
"terser-webpack-plugin": "^5.3.17",
"watchpack": "^2.5.1",
"webpack-sources": "^3.3.3"
"webpack-sources": "^3.3.4"
},
"bin": {
"webpack": "bin/webpack.js"
@@ -9029,9 +9397,9 @@
}
},
"node_modules/webpack-sources": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz",
"integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==",
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.4.tgz",
"integrity": "sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q==",
"license": "MIT",
"engines": {
"node": ">=10.13.0"
@@ -9111,6 +9479,27 @@
"node": ">= 8"
}
},
"node_modules/which-typed-array": {
"version": "1.1.20",
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz",
"integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==",
"license": "MIT",
"dependencies": {
"available-typed-arrays": "^1.0.7",
"call-bind": "^1.0.8",
"call-bound": "^1.0.4",
"for-each": "^0.3.5",
"get-proto": "^1.0.1",
"gopd": "^1.2.0",
"has-tostringtag": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/wordwrap": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
@@ -9266,15 +9655,18 @@
}
},
"node_modules/yaml": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz",
"integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==",
"version": "2.8.3",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz",
"integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
"license": "ISC",
"bin": {
"yaml": "bin.mjs"
},
"engines": {
"node": ">= 14.6"
},
"funding": {
"url": "https://github.com/sponsors/eemeli"
}
},
"node_modules/yargs": {
@@ -9305,9 +9697,9 @@
}
},
"node_modules/yauzl": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.2.0.tgz",
"integrity": "sha512-Ow9nuGZE+qp1u4JIPvg+uCiUr7xGQWdff7JQSk5VGYTAZMDe2q8lxJ10ygv10qmSj031Ty/6FNJpLO4o1Sgc+w==",
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.2.1.tgz",
"integrity": "sha512-k1isifdbpNSFEHFJ1ZY4YDewv0IH9FR61lDetaRMD3j2ae3bIXGV+7c+LHCqtQGofSd8PIyV4X6+dHMAnSr60A==",
"license": "MIT",
"dependencies": {
"buffer-crc32": "~0.2.3",
+14 -11
View File
@@ -48,10 +48,11 @@
"droll": "^0.2.1",
"env-paths": "^3.0.0",
"express": "^4.21.0",
"fflate": "^0.8.2",
"form-data": "^4.0.4",
"fuse.js": "^7.1.0",
"google-translate-api-x": "^10.7.2",
"handlebars": "^4.7.8",
"handlebars": "^4.7.9",
"helmet": "^8.1.0",
"highlight.js": "^11.11.1",
"host-validation-middleware": "^0.1.1",
@@ -62,12 +63,13 @@
"ip-regex": "^5.0.0",
"ipaddr.js": "^2.2.0",
"is-docker": "^3.0.0",
"isomorphic-git": "^1.36.3",
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"mime-types": "^3.0.2",
"moment": "^2.30.1",
"morphdom": "^2.7.7",
"multer": "^2.0.2",
"multer": "^2.1.1",
"node-fetch": "^3.3.2",
"node-persist": "^4.0.4",
"open": "^10.2.0",
@@ -80,21 +82,21 @@
"seedrandom": "^3.0.5",
"showdown": "^2.1.0",
"sillytavern-transformers": "2.14.6",
"simple-git": "^3.28.0",
"simple-git": "^3.33.0",
"slidetoggle": "^4.0.0",
"tiktoken": "^1.0.22",
"url-join": "^5.0.0",
"vectra": "^0.2.2",
"wavefile": "^11.0.0",
"webpack": "^5.98.0",
"webpack": "^5.105.4",
"write-file-atomic": "^5.0.1",
"ws": "^8.18.3",
"yaml": "^2.8.1",
"yaml": "^2.8.3",
"yargs": "^17.7.1",
"yauzl": "^3.2.0"
"yauzl": "^3.2.1"
},
"engines": {
"node": ">= 18"
"node": ">= 20"
},
"overrides": {
"vectra": {
@@ -111,8 +113,9 @@
"type": "git",
"url": "https://github.com/SillyTavern/SillyTavern.git"
},
"version": "1.16.0",
"version": "1.17.0",
"scripts": {
"init": "node src/server-init.js",
"start": "node server.js",
"debug": "node --inspect server.js",
"start:global": "node server.js --global",
@@ -120,7 +123,6 @@
"start:deno": "deno run --allow-run --allow-net --allow-read --allow-write --allow-sys --allow-env server.js",
"start:bun": "bun server.js",
"start:no-csrf": "node server.js --disableCsrf",
"postinstall": "node post-install.js",
"lint": "eslint \"src/**/*.js\" \"public/**/*.js\" ./*.js",
"lint:fix": "eslint \"src/**/*.js\" \"public/**/*.js\" ./*.js --fix",
"plugins:update": "node plugins update",
@@ -151,7 +153,7 @@
"@types/jqueryui": "^1.12.24",
"@types/lodash": "^4.17.20",
"@types/mime-types": "^3.0.1",
"@types/multer": "^2.0.0",
"@types/multer": "^2.1.0",
"@types/node": "^18.19.84",
"@types/node-persist": "^3.1.8",
"@types/png-chunk-text": "^1.0.3",
@@ -165,6 +167,7 @@
"eslint": "^8.57.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsdoc": "^48.10.0",
"eslint-plugin-playwright": "^2.3.0"
"eslint-plugin-playwright": "^2.3.0",
"typescript": "^5.9.3"
}
}
+4 -3
View File
@@ -9,11 +9,13 @@ import process from 'node:process';
import { fileURLToPath } from 'node:url';
import { default as git, CheckRepoActions } from 'simple-git';
import { createGitClient } from './src/git/client.js';
import { color } from './src/util.js';
const __dirname = import.meta.dirname ?? path.dirname(fileURLToPath(import.meta.url));
process.chdir(__dirname);
const pluginsPath = './plugins';
const gitBackend = process.env.SILLYTAVERN_GIT_BACKEND || 'auto';
const command = process.argv[2];
@@ -87,10 +89,9 @@ async function installPlugin(pluginName) {
return console.log(color.yellow(`Directory already exists at ${pluginPath}`));
}
await git().clone(pluginName, pluginPath, { '--depth': 1 });
await createGitClient({ backend: gitBackend }).clone(pluginName, pluginPath, { depth: 1 });
console.log(`Plugin ${color.green(pluginName)} installed to ${color.cyan(pluginPath)}`);
}
catch (error) {
} catch (error) {
console.error(color.red(`Failed to install plugin ${pluginName}`), error);
}
}
-114
View File
@@ -1,114 +0,0 @@
/**
* Scripts to be done before starting the server for the first time.
*/
import fs from 'node:fs';
import path from 'node:path';
import process from 'node:process';
import yaml from 'yaml';
import chalk from 'chalk';
import { createRequire } from 'node:module';
import { addMissingConfigValues } from './src/config-init.js';
/**
* Colorizes console output.
*/
const color = chalk;
/**
* Converts the old config.conf file to the new config.yaml format.
*/
function convertConfig() {
if (fs.existsSync('./config.conf')) {
if (fs.existsSync('./config.yaml')) {
console.log(color.yellow('Both config.conf and config.yaml exist. Please delete config.conf manually.'));
return;
}
try {
console.log(color.blue('Converting config.conf to config.yaml. Your old config.conf will be renamed to config.conf.bak'));
fs.renameSync('./config.conf', './config.conf.cjs'); // Force loading as CommonJS
const require = createRequire(import.meta.url);
const config = require(path.join(process.cwd(), './config.conf.cjs'));
fs.copyFileSync('./config.conf.cjs', './config.conf.bak');
fs.rmSync('./config.conf.cjs');
fs.writeFileSync('./config.yaml', yaml.stringify(config));
console.log(color.green('Conversion successful. Please check your config.yaml and fix it if necessary.'));
} catch (error) {
console.error(color.red('FATAL: Config conversion failed. Please check your config.conf file and try again.'), error);
return;
}
}
}
/**
* Creates the default config files if they don't exist yet.
*/
function createDefaultFiles() {
/**
* @typedef DefaultItem
* @type {object}
* @property {'file' | 'directory'} type - Whether the item should be copied as a single file or merged into a directory structure.
* @property {string} defaultPath - The path to the default item (typically in `default/`).
* @property {string} productionPath - The path to the copied item for production use.
*/
/** @type {DefaultItem[]} */
const defaultItems = [
{
type: 'file',
defaultPath: './default/config.yaml',
productionPath: './config.yaml',
},
{
type: 'directory',
defaultPath: './default/public/',
productionPath: './public/',
},
];
for (const defaultItem of defaultItems) {
try {
if (defaultItem.type === 'file') {
if (!fs.existsSync(defaultItem.productionPath)) {
fs.copyFileSync(
defaultItem.defaultPath,
defaultItem.productionPath,
);
console.log(
color.green(`Created default file: ${defaultItem.productionPath}`),
);
}
} else if (defaultItem.type === 'directory') {
fs.cpSync(defaultItem.defaultPath, defaultItem.productionPath, {
force: false, // Don't overwrite existing files!
recursive: true,
});
console.log(
color.green(`Synchronized missing files: ${defaultItem.productionPath}`),
);
} else {
throw new Error(
'FATAL: Unexpected default file format in `post-install.js#createDefaultFiles()`.',
);
}
} catch (error) {
console.error(
color.red(
`FATAL: Could not write default ${defaultItem.type}: ${defaultItem.productionPath}`,
),
error,
);
}
}
}
try {
// 0. Convert config.conf to config.yaml
convertConfig();
// 1. Create default config files
createDefaultFiles();
// 2. Add missing config values
addMissingConfigValues(path.join(process.cwd(), './config.yaml'));
} catch (error) {
console.error(error);
}
+7
View File
@@ -0,0 +1,7 @@
# Looking for user.css?
user.css is now located under your data root directory in the "_css" folder.
Example for the default data root:
/data/_css/user.css
+207 -16
View File
@@ -107,7 +107,8 @@
opacity: 1;
}
.bg_example .mobile-only-menu-toggle {
.bg_example .mobile-only-menu-toggle,
.bg_folder_tile .mobile-only-menu-toggle {
display: none;
}
@@ -135,19 +136,32 @@
outline-offset: 0;
}
.bg_example.locked-background::after {
content: '\f023';
.bg_example.locked-background::after,
.bg_example.selected-background::before,
#Backgrounds.bg-selection-mode #bg_menu_content .bg_example.folder-group-selected::before {
font-family: 'Font Awesome 6 Free';
font-weight: 900;
position: absolute;
z-index: 4;
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
pointer-events: none;
}
.bg_example.selected-background::before,
#Backgrounds.bg-selection-mode #bg_menu_content .bg_example.folder-group-selected::before {
content: '\f00c';
top: 5px;
color: var(--white100);
font-size: calc(var(--mainFontSize) * 0.9);
}
.bg_example.locked-background::after {
content: '\f023';
bottom: 5px;
right: 5px;
z-index: 4;
color: var(--golden);
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
font-size: calc(var(--mainFontSize) * 0.8);
pointer-events: none;
}
.bg_example:not(.locked-background) .jg-unlock,
@@ -161,17 +175,28 @@
}
.bg_example.selected-background::before {
content: '\f00c';
font-family: 'Font Awesome 6 Free';
font-weight: 900;
position: absolute;
top: 5px;
left: 5px;
z-index: 4;
color: var(--white100);
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
font-size: calc(var(--mainFontSize) * 0.9);
pointer-events: none;
}
#bg_selection_mode_button.active {
color: var(--golden);
}
#bg_group_select_count {
font-weight: 700;
}
#Backgrounds.bg-selection-mode #bg_menu_content .bg_example .jg-menu {
display: none;
}
#Backgrounds.bg-selection-mode #bg_menu_content .bg_example.folder-group-selected {
outline: 2px solid var(--interactable-outline-color);
outline-offset: 0;
}
#Backgrounds.bg-selection-mode #bg_menu_content .bg_example.folder-group-selected::before {
right: 5px;
}
.bg_example .jg-menu {
@@ -376,3 +401,169 @@
#bg_custom_content:not(:empty)~#bg_chat_hint {
display: none;
}
.bg_folder_grid.bg_list {
display: grid;
gap: 5px;
width: 100%;
grid-template-columns: repeat(calc(var(--bg-thumb-columns, 5) + 2), 1fr);
margin-bottom: 10px;
}
.bg_folder_grid:empty {
display: none;
}
.bg_folder_tile {
cursor: pointer;
position: relative;
overflow: hidden;
border-radius: 8px;
height: auto;
aspect-ratio: 1 / 1;
outline: 2px solid var(--SmartThemeBorderColor);
outline-offset: -1px;
box-shadow: 0 0 7px var(--black50a);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: var(--SmartThemeBlurTintColor);
transition: filter var(--animation-duration) ease;
}
.bg_folder_tile:hover {
filter: brightness(1.1);
}
.bg_folder_tile_cover {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-size: cover;
background-position: center;
border-radius: inherit;
}
.bg_folder_tile_overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
color: var(--SmartThemeBodyColor);
padding: 6px 8px 4px;
display: flex;
align-items: center;
gap: 5px;
font-size: 0.85em;
font-weight: 600;
pointer-events: none;
border-radius: 0 0 8px 8px;
}
.bg_folder_tile_overlay i {
font-size: 0.9em;
opacity: 0.8;
}
.bg_folder_tile_name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Folder tile action menu */
.bg_folder_tile .bg_folder_tile_menu {
display: flex;
position: absolute;
top: 2px;
right: 2px;
background-color: rgba(0, 0, 0, 0.5);
border-radius: 5px;
padding: 3px;
z-index: 3;
backdrop-filter: blur(4px);
border: 1px solid var(--SmartThemeBorderColor);
align-items: center;
opacity: 0;
visibility: hidden;
transform: scale(0.9);
transform-origin: center;
transition: opacity var(--animation-duration) ease-out, visibility var(--animation-duration) ease-out, transform var(--animation-duration) ease-out;
}
.bg_folder_tile:hover .bg_folder_tile_menu,
.bg_folder_tile:focus-within .bg_folder_tile_menu {
opacity: 1;
visibility: visible;
transform: scale(1);
}
.bg_folder_tile .jg-button {
display: flex;
width: 24px;
height: 24px;
align-items: center;
justify-content: center;
color: white;
padding: 5px;
font-size: 1.1em;
border-radius: 5px;
transition: background-color var(--animation-duration) ease;
}
.bg_folder_tile .jg-button:hover {
background-color: rgba(255, 255, 255, 0.2);
}
/* New Folder placeholder tile */
.bg_new_folder_tile {
border: 2px dashed var(--SmartThemeBorderColor);
outline: none;
color: var(--SmartThemeBodyColor);
opacity: 0.6;
gap: 6px;
font-size: 0.85em;
font-weight: 600;
}
.bg_new_folder_tile:hover {
opacity: 1;
transform: scale(1.03);
}
/* Breadcrumb bar */
.bg_folder_breadcrumb {
display: flex;
align-items: center;
gap: 8px;
padding: 5px 0;
margin-bottom: 5px;
}
.bg_current_folder_name {
font-weight: 600;
font-size: 1em;
color: var(--SmartThemeBodyColor);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#Backgrounds:not(.in-folder-view) .jg-set-cover {
display: none !important;
}
#Backgrounds.in-folder-view .jg-set-cover {
display: flex !important;
}
/* Hide folder actions on custom (chat-specific) backgrounds */
.bg_example[custom="true"] .jg-folder,
.bg_example[custom="true"] .jg-set-cover {
display: none !important;
}
+57
View File
@@ -29,3 +29,60 @@
align-items: center;
justify-content: center;
}
/* Action loader toast styles */
.action-loader-toast {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
}
.action-loader-message {
flex: 1;
}
.action-loader-stop {
cursor: pointer;
font-size: 1.2em;
opacity: 0.8;
transition: opacity 0.15s ease, color 0.15s ease;
}
.action-loader-stop:hover {
opacity: 1;
color: color-mix(in srgb, currentColor 40%, #e74c3c 60%);
}
/* Splash screen styles for branded loading */
#loader.splash-screen {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4rem;
width: 100%;
height: 100%;
transition: all var(--animation-duration-2x) ease-out;
}
#loader.splash-screen #load-spinner {
position: static;
top: unset;
left: unset;
}
.splash-logo {
/* max original px, or 50% on mobile */
width: min(150px, 50%);
height: auto;
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}
.splash-message {
margin: 0;
font-size: 1.25rem;
font-weight: 500;
opacity: 0.9;
letter-spacing: 0.02em;
}
+72 -1
View File
@@ -38,6 +38,56 @@
grid-template-columns: repeat(var(--bg-thumb-columns, 3), 1fr);
}
.bg_folder_grid {
grid-template-columns: repeat(var(--bg-thumb-columns, 3), 1fr);
}
.bg_folder_tile .bg_folder_tile_menu {
opacity: 0;
visibility: hidden;
transform: scale(0.9);
}
.bg_folder_tile:hover .bg_folder_tile_menu,
.bg_folder_tile:focus-within .bg_folder_tile_menu {
display: none;
}
.bg_folder_tile.mobile-menu-open .bg_folder_tile_menu {
display: flex;
opacity: 1;
visibility: visible;
transform: scale(1);
z-index: 4;
}
.bg_folder_tile.mobile-menu-open .mobile-only-menu-toggle {
opacity: 0;
pointer-events: none;
}
.bg_folder_tile .mobile-only-menu-toggle {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 5px;
right: 5px;
width: 30px;
height: 30px;
background-color: rgba(0, 0, 0, 0.4);
color: white;
border-radius: 6px;
z-index: 3;
cursor: pointer;
backdrop-filter: blur(2px);
}
.bg_folder_tile .jg-button {
width: 30px;
height: 30px;
}
.bg_list {
width: unset;
}
@@ -102,10 +152,31 @@
}
#add_background_button_top>span,
#auto_background>span {
#auto_background>span,
#bg_add_folder_button>span,
#bg_selection_mode_button>span:not(#bg_group_select_count),
#bg_group_add_to_folder_button>span,
#bg_folder_remove_selected_button>span {
display: none;
}
#bg_group_select_count:not(:empty) {
display: inline !important;
}
.bg_folder_breadcrumb {
gap: 5px;
}
.bg_folder_breadcrumb .expander {
min-width: 0;
}
#bg_current_folder_name {
min-width: 0;
flex: 1 1 auto;
}
#extensions_settings,
#extensions_settings2 {
width: 100% !important;
+4
View File
@@ -161,6 +161,10 @@ body.no-blur .popup[open]::backdrop {
.popup-inputs {
margin-top: 10px;
font-size: smaller;
}
.popup-inputs label span {
/* Make the title of the custom inputs a bit darker, but keep their text at default opacity. */
opacity: 0.7;
}
+6
View File
@@ -568,3 +568,9 @@ label[for="bind_preset_to_connection"]:has(input:checked) {
#adaptive_p_block:has([data-tg-samplers="adaptive_target"][style*="display: none"]):has([data-tg-samplers="adaptive_decay"][style*="display: none"]) {
display: none;
}
#openrouter_provider_warning_text,
#openrouter_provider_warning_chat {
color: var(--warning);
margin-left: 5px;
}
+1
View File
@@ -17,6 +17,7 @@
.welcomePanel.recentHidden .welcomeRecent,
.welcomePanel.recentHidden .recentChatsTitle,
.welcomePanel.recentHidden .hideRecentChats,
.welcomePanel.recentHidden .recentChatsSettings,
.welcomePanel:not(.recentHidden) .showRecentChats {
display: none;
}
+4 -1
View File
@@ -1,6 +1,6 @@
import libs from './lib';
import getContext from './scripts/st-context';
import { power_user } from './scripts/power-user';
import { power_user, getThemeObject } from './scripts/power-user';
import { QuickReplyApi } from './scripts/extensions/quick-reply/api/QuickReplyApi';
import { oai_settings } from './scripts/openai';
import { textgenerationwebui_settings } from './scripts/textgen-settings';
@@ -21,6 +21,7 @@ declare global {
type MessageTimestamp = string | number | Date;
type Character = import('./scripts/char-data').v1CharData;
type ChatMessageExtra = BaseMessageExtra & Partial<ReasoningMessageExtra> & Record<string, any>;
type Theme = ReturnType<typeof getThemeObject>;
interface Group {
id: string;
@@ -138,6 +139,8 @@ declare global {
interface ImageGenerationAttachmentProps {
generation_type?: number;
negative?: string;
width?: number;
height?: number;
}
interface ImageCaptionAttachmentProps {
+9
View File
@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="64" height="64">
<path d="M8.16 23h21.177v-5.86l-4.023-2.307-.694-.3-16.46.113z" fill="none" />
<path
d="M22.012 22.222c.197-.675.122-1.294-.206-1.754-.3-.422-.807-.666-1.416-.694l-11.545-.15c-.075 0-.14-.038-.178-.094s-.047-.13-.028-.206c.038-.113.15-.197.272-.206l11.648-.15c1.38-.066 2.88-1.182 3.404-2.55l.666-1.735a.38.38 0 0 0 .02-.225c-.75-3.395-3.78-5.927-7.4-5.927-3.34 0-6.17 2.157-7.184 5.15-.657-.488-1.5-.75-2.392-.666-1.604.16-2.9 1.444-3.048 3.048a3.58 3.58 0 0 0 .084 1.191A4.84 4.84 0 0 0 0 22.1c0 .234.02.47.047.703.02.113.113.197.225.197H21.58a.29.29 0 0 0 .272-.206l.16-.572z"
/>
<path
d="M25.688 14.803l-.32.01c-.075 0-.14.056-.17.13l-.45 1.566c-.197.675-.122 1.294.206 1.754.3.422.807.666 1.416.694l2.457.15c.075 0 .14.038.178.094s.047.14.028.206c-.038.113-.15.197-.272.206l-2.56.15c-1.388.066-2.88 1.182-3.404 2.55l-.188.478c-.038.094.028.188.13.188h8.797a.23.23 0 0 0 .225-.169A6.41 6.41 0 0 0 32 21.106a6.32 6.32 0 0 0-6.312-6.302"
/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+165 -21
View File
@@ -697,7 +697,7 @@
</span>
</div>
</div>
<div class="range-block" data-source="openai,claude,aimlapi,openrouter,ai21,makersuite,vertexai,mistralai,custom,cohere,perplexity,groq,siliconflow,electronhub,chutes,nanogpt,deepseek,xai,pollinations,moonshot,fireworks,cometapi,azure_openai,zai">
<div class="range-block" data-source="openai,claude,aimlapi,openrouter,ai21,makersuite,vertexai,mistralai,custom,cohere,perplexity,groq,siliconflow,electronhub,chutes,nanogpt,deepseek,xai,pollinations,moonshot,fireworks,cometapi,azure_openai,zai,workers_ai">
<div class="range-block-title" data-i18n="Temperature">
Temperature
</div>
@@ -710,7 +710,7 @@
</div>
</div>
</div>
<div class="range-block" data-source="openai,aimlapi,openrouter,custom,cohere,perplexity,groq,siliconflow,mistralai,electronhub,nanogpt,deepseek,xai,pollinations,moonshot,fireworks,cometapi,azure_openai,chutes">
<div class="range-block" data-source="openai,aimlapi,openrouter,custom,cohere,perplexity,groq,siliconflow,mistralai,electronhub,nanogpt,deepseek,xai,pollinations,moonshot,fireworks,cometapi,azure_openai,chutes,workers_ai">
<div class="range-block-title" data-i18n="Frequency Penalty">
Frequency Penalty
</div>
@@ -723,7 +723,7 @@
</div>
</div>
</div>
<div class="range-block" data-source="openai,aimlapi,openrouter,custom,cohere,perplexity,groq,siliconflow,mistralai,electronhub,nanogpt,deepseek,xai,pollinations,moonshot,fireworks,cometapi,azure_openai,chutes">
<div class="range-block" data-source="openai,aimlapi,openrouter,custom,cohere,perplexity,groq,siliconflow,mistralai,electronhub,nanogpt,deepseek,xai,pollinations,moonshot,fireworks,cometapi,azure_openai,chutes,workers_ai">
<div class="range-block-title" data-i18n="Presence Penalty">
Presence Penalty
</div>
@@ -736,7 +736,7 @@
</div>
</div>
</div>
<div class="range-block" data-source="claude,aimlapi,openrouter,makersuite,vertexai,cohere,perplexity,electronhub,chutes,nanogpt">
<div class="range-block" data-source="claude,aimlapi,openrouter,makersuite,vertexai,cohere,perplexity,electronhub,chutes,nanogpt,workers_ai">
<div class="range-block-title" data-i18n="Top K">
Top K
</div>
@@ -749,7 +749,7 @@
</div>
</div>
</div>
<div class="range-block" data-source="openai,claude,aimlapi,openrouter,ai21,makersuite,vertexai,mistralai,custom,cohere,perplexity,groq,siliconflow,electronhub,chutes,nanogpt,deepseek,xai,pollinations,moonshot,fireworks,cometapi,azure_openai,zai">
<div class="range-block" data-source="openai,claude,aimlapi,openrouter,ai21,makersuite,vertexai,mistralai,custom,cohere,perplexity,groq,siliconflow,electronhub,chutes,nanogpt,deepseek,xai,pollinations,moonshot,fireworks,cometapi,azure_openai,zai,workers_ai">
<div class="range-block-title" data-i18n="Top P">
Top P
</div>
@@ -762,7 +762,7 @@
</div>
</div>
</div>
<div class="range-block" data-source="openrouter,nanogpt,chutes">
<div class="range-block" data-source="openrouter,nanogpt,chutes,workers_ai">
<div class="range-block-title" data-i18n="Repetition Penalty">
Repetition Penalty
</div>
@@ -986,7 +986,7 @@
</div>
</div>
</div>
<div class="range-block" data-source="openai,openrouter,mistralai,custom,cohere,groq,electronhub,chutes,nanogpt,xai,pollinations,aimlapi,makersuite,vertexai,azure_openai">
<div class="range-block" data-source="openai,openrouter,mistralai,custom,cohere,groq,electronhub,chutes,nanogpt,xai,pollinations,aimlapi,makersuite,vertexai,azure_openai,workers_ai">
<div class="range-block-title justifyLeft" data-i18n="Seed">
Seed
</div>
@@ -1982,7 +1982,7 @@
</span>
</div>
</div>
<div class="range-block" data-source="makersuite,vertexai,aimlapi,openrouter,claude,xai,electronhub,chutes,nanogpt">
<div class="range-block" data-source="makersuite,vertexai,aimlapi,openrouter,claude,electronhub,chutes,nanogpt">
<label for="openai_enable_web_search" class="checkbox_label flexWrap widthFreeExpand">
<input id="openai_enable_web_search" type="checkbox" />
<span data-i18n="Enable web search">Enable web search</span>
@@ -1996,7 +1996,7 @@
</b>
</div>
</div>
<div class="range-block" data-source="openai,cohere,mistralai,custom,claude,aimlapi,openrouter,groq,siliconflow,deepseek,makersuite,vertexai,ai21,xai,pollinations,moonshot,fireworks,cometapi,electronhub,chutes,azure_openai,zai,nanogpt">
<div class="range-block" data-source="openai,cohere,mistralai,custom,claude,aimlapi,openrouter,groq,siliconflow,deepseek,makersuite,vertexai,ai21,xai,pollinations,moonshot,fireworks,cometapi,electronhub,chutes,azure_openai,zai,nanogpt,workers_ai">
<label for="openai_function_calling" class="checkbox_label flexWrap widthFreeExpand">
<input id="openai_function_calling" type="checkbox" />
<span data-i18n="Enable function calling">Enable function calling</span>
@@ -2011,7 +2011,31 @@
<strong data-i18n="enable_functions_desc_4">Not supported when Prompt Post-Processing with "no tools" is used!</strong>
</div>
</div>
<div class="range-block" data-source="openai,aimlapi,openrouter,mistralai,makersuite,vertexai,claude,custom,xai,pollinations,moonshot,cohere,cometapi,nanogpt,electronhub,azure_openai,zai,siliconflow,chutes">
<div class="range-block" data-source="openrouter">
<div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10">
<div class="flex-container oneline-dropdown">
<label for="tool_reasoning_mode" data-i18n="Interleaved Thinking">
Interleaved Thinking
</label>
<select id="tool_reasoning_mode">
<option data-i18n="Disabled" value="disabled">Disabled</option>
<option data-i18n="Since Last User Message" value="since_last_user">Since Last User Message</option>
<option data-i18n="Active Tool Chain" value="active_chain">Active Tool Chain</option>
</select>
</div>
</div>
<div class="toggle-description justifyLeft">
<span data-i18n="openrouter_interleaved_thinking_hint">
Sends reasoning from preceding assistant turns with tool-call requests to maintain interleaved thinking context.
</span>
</div>
<div id="openrouter_interleaved_thinking_disabled_hint" class="toggle-description justifyLeft" style="display:none;">
<em data-i18n="Enable &quot;Request model reasoning&quot; to use Interleaved Thinking.">
Enable "Request model reasoning" to use Interleaved Thinking.
</em>
</div>
</div>
<div class="range-block" data-source="openai,aimlapi,openrouter,mistralai,makersuite,vertexai,claude,custom,xai,pollinations,moonshot,cohere,cometapi,nanogpt,electronhub,azure_openai,zai,siliconflow,chutes,workers_ai">
<label for="openai_media_inlining" class="checkbox_label flexWrap widthFreeExpand">
<input id="openai_media_inlining" type="checkbox" />
<span data-i18n="Send inline media">Send inline media</span>
@@ -2035,7 +2059,7 @@
<strong data-source="makersuite,vertexai" data-i18n="video_inlining_hint_4">Videos must be less than 20 MB and under 1 minute long.</strong>
<strong data-source="makersuite,vertexai" data-i18n="audio_inlining_hint_2">Audio must be less than 20 MB.</strong>
</div>
<div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom,xai,pollinations,cohere,cometapi,nanogpt,moonshot,aimlapi,openrouter,mistralai,electronhub,azure_openai,zai,siliconflow,chutes,makersuite,vertexai">
<div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom,xai,pollinations,cohere,cometapi,nanogpt,moonshot,aimlapi,openrouter,mistralai,electronhub,azure_openai,zai,siliconflow,chutes,makersuite,vertexai,workers_ai">
<div class="flex-container oneline-dropdown">
<label for="openai_inline_image_quality" data-i18n="Inline Image Quality">
Inline Image Quality
@@ -2096,7 +2120,7 @@
</div>
</div>
</div>
<div class="range-block" data-source="deepseek,aimlapi,openrouter,custom,claude,xai,makersuite,vertexai,pollinations,moonshot,mistralai,fireworks,cometapi,electronhub,chutes,azure_openai,nanogpt,zai">
<div class="range-block" data-source="deepseek,aimlapi,openrouter,custom,claude,xai,makersuite,vertexai,pollinations,moonshot,mistralai,fireworks,cometapi,electronhub,chutes,azure_openai,nanogpt,zai,workers_ai">
<label for="openai_show_thoughts" class="checkbox_label widthFreeExpand">
<input id="openai_show_thoughts" type="checkbox" />
<span data-i18n="Request model reasoning">Request model reasoning</span>
@@ -2105,7 +2129,7 @@
<span data-i18n="Allows the model to return its thinking process.">
Allows the model to return its thinking process.
</span>
<strong data-i18n="This setting affects visibility only." data-source-mode="except" data-source="zai,moonshot">
<strong data-i18n="This setting affects visibility only." data-source-mode="except" data-source="zai,moonshot,openrouter">
This setting affects visibility only.
</strong>
</div>
@@ -2127,6 +2151,9 @@
<div class="toggle-description justifyLeft marginBot5" data-source="openai,custom,xai,aimlapi,openrouter,pollinations,perplexity,cometapi,electronhub,azure_openai,chutes" data-i18n="OpenAI-style options: low, medium, high. Minimum and maximum are aliased to low and high. Auto does not send an effort level.">
OpenAI-style options: low, medium, high. Minimum and maximum are aliased to low and high. Auto does not send an effort level.
</div>
<strong class="toggle-description justifyLeft marginBot5" data-source="openrouter">
Request model reasoning = Off with Reasoning Effort = Minimum disables reasoning entirely on models that support that, but can cause errors with some models.
</strong>
<div class="toggle-description justifyLeft marginBot5" data-source="claude" data-i18n="Allocates a portion of the response length for thinking (min: 1024 tokens, low: 10%, medium: 25%, high: 50%, max: 95%), but minimum 1024 tokens. Auto does not request thinking.">
Allocates a portion of the response length for thinking (min: 1024 tokens, low: 10%, medium: 25%, high: 50%, max: 95%), but minimum 1024 tokens. Auto does not request thinking.
</div>
@@ -2155,6 +2182,9 @@
<div class="toggle-description justifyLeft marginBot5" data-i18n="Constrains the verbosity of the model's response.">
Constrains the verbosity of the model's response.
</div>
<strong class="toggle-description justifyLeft marginBot5" data-source="claude">
On Opus 4.6 / Sonnet 4.6, a non-automatic Reasoning Effort takes precedence over Verbosity.
</strong>
</div>
</div>
<div class="range-block" data-source="claude">
@@ -2433,10 +2463,13 @@
</select>
</div>
<div>
<h4 data-i18n="Model Providers">Model Providers</h4>
<h4>
<span data-i18n="Model Providers">Model Providers</span>
<i id="openrouter_provider_warning_text" class="fa-solid fa-circle-exclamation displayNone" title="Deselect inapplicable provider(s) or select an applicable provider to avoid a 404 error."></i>
</h4>
<select id="openrouter_providers_text" class="openrouter_providers" multiple>
</select>
<label class="checkbox_label" data-tg-samplers="openrouter_allow_fallbacks" data-i18n="[title]Automatically chooses an alternative provider if chosen providers can't serve your request." for="openrouter_allow_fallbacks_textgenerationwebui" title="Automatically chooses an alternative provider if chosen providers can't serve your request.">
<label class="checkbox_label" data-i18n="[title]Automatically chooses an alternative provider if chosen providers can't serve your request." for="openrouter_allow_fallbacks_textgenerationwebui" title="Automatically chooses an alternative provider if chosen providers can't serve your request.">
<input id="openrouter_allow_fallbacks_textgenerationwebui" type="checkbox" />
<span data-i18n="Allow fallback providers">Allow fallback providers</span>
</label>
@@ -2861,6 +2894,7 @@
<option value="azure_openai">Azure OpenAI</option>
<option value="chutes">Chutes</option>
<option value="claude">Claude</option>
<option value="workers_ai">Cloudflare Workers AI</option>
<option value="cohere">Cohere</option>
<!-- Temporarily disabled. -->
<!-- <option value="cometapi">CometAPI</option> -->
@@ -2995,6 +3029,12 @@
<div>
<h4 data-i18n="OpenAI Model">OpenAI Model</h4>
<select id="model_openai_select">
<optgroup label="GPT-5.4">
<option value="gpt-5.4">gpt-5.4</option>
</optgroup>
<optgroup label="GPT-5.3">
<option value="gpt-5.3-chat-latest">gpt-5.3-chat-latest</option>
</optgroup>
<optgroup label="GPT-5.2">
<option value="gpt-5.2">gpt-5.2</option>
<option value="gpt-5.2-2025-12-11">gpt-5.2-2025-12-11</option>
@@ -3107,6 +3147,7 @@
<option value="claude-opus-4-6">claude-opus-4-6</option>
<option value="claude-opus-4-5">claude-opus-4-5</option>
<option value="claude-opus-4-5-20251101">claude-opus-4-5-20251101</option>
<option value="claude-sonnet-4-6">claude-sonnet-4-6</option>
<option value="claude-sonnet-4-5">claude-sonnet-4-5</option>
<option value="claude-sonnet-4-5-20250929">claude-sonnet-4-5-20250929</option>
<option value="claude-haiku-4-5">claude-haiku-4-5</option>
@@ -3186,7 +3227,10 @@
</div>
</div>
<div>
<h4 data-i18n="Model Providers">Model Providers</h4>
<h4>
<span data-i18n="Model Providers">Model Providers</span>
<i id="openrouter_provider_warning_chat" class="fa-solid fa-circle-exclamation displayNone" title="Deselect inapplicable provider(s) or select an applicable provider to avoid a 404 error."></i>
</h4>
<select id="openrouter_providers_chat" class="openrouter_providers" multiple>
</select>
<label class="checkbox_label marginTopBot5" for="openrouter_allow_fallbacks" data-i18n="[title]Automatically chooses an alternative provider if chosen providers can't serve your request." title="Automatically chooses an alternative provider if chosen providers can't serve your request.">
@@ -3259,6 +3303,11 @@
<div>
<h4 data-i18n="Google Model">Google Model</h4>
<select id="model_google_select">
<optgroup label="Gemini 3.1">
<option value="gemini-3.1-pro-preview">gemini-3.1-pro-preview</option>
<option value="gemini-3.1-flash-lite-preview">gemini-3.1-flash-lite-preview</option>
<option value="gemini-3.1-flash-image-preview">gemini-3.1-flash-image-preview</option>
</optgroup>
<optgroup label="Gemini 3.0">
<option value="gemini-3-pro-preview">gemini-3-pro-preview</option>
<option value="gemini-3-pro-image-preview">gemini-3-pro-image-preview</option>
@@ -3432,6 +3481,11 @@
<h4 data-i18n="Google Model">Google Model</h4>
<select id="model_vertexai_select">
<!-- data-mode="full" is for models that require a service account -->
<optgroup label="Gemini 3.1">
<option value="gemini-3.1-pro-preview">gemini-3.1-pro-preview</option>
<option value="gemini-3.1-flash-lite-preview">gemini-3.1-flash-lite-preview</option>
<option value="gemini-3.1-flash-image-preview">gemini-3.1-flash-image-preview</option>
</optgroup>
<optgroup label="Gemini 3.0">
<option value="gemini-3-pro-preview">gemini-3-pro-preview</option>
<option value="gemini-3-pro-image-preview">gemini-3-pro-image-preview</option>
@@ -3503,6 +3557,11 @@
<div data-for="api_key_siliconflow" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you click 'Connect'.">
For privacy reasons, your API key will be hidden after you click 'Connect'.
</div>
<h4 data-i18n="SiliconFlow Endpoint">SiliconFlow Endpoint</h4>
<select id="siliconflow_endpoint">
<option value="global" data-i18n="Global (siliconflow.com)">Global (siliconflow.com)</option>
<option value="cn" data-i18n="China (siliconflow.cn)">China (siliconflow.cn)</option>
</select>
<h4>SiliconFlow Model</h4>
<select id="model_siliconflow_select">
<option value="" data-i18n="-- Connect to the API --">-- Connect to the API --</option>
@@ -3613,6 +3672,26 @@
</select>
</div>
</div>
<div id="workers_ai_form" data-source="workers_ai">
<h4><a href="https://dash.cloudflare.com/?to=/:account/ai/workers-ai/api-quick-start" target="_blank" rel="noopener noreferrer" data-i18n="Cloudflare Workers AI API Key">Cloudflare Workers AI API Key</a></h4>
<div class="flex-container">
<input id="api_key_workers_ai" name="api_key_workers_ai" class="text_pole flex1" value="" type="text" autocomplete="off">
<div title="Manage API keys" data-i18n="[title]Manage API keys" class="menu_button fa-solid fa-key fa-fw manage-api-keys" data-key="api_key_workers_ai"></div>
</div>
<div data-for="api_key_workers_ai" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you click 'Connect'.">
For privacy reasons, your API key will be hidden after you click 'Connect'.
</div>
<h4><a href="https://dash.cloudflare.com/?to=/:account/workers-and-pages" target="_blank" rel="noopener noreferrer" data-i18n="Cloudflare Account ID">Cloudflare Account ID</a></h4>
<div class="flex-container">
<input id="workers_ai_account_id" class="text_pole flex1" value="" type="text" autocomplete="off" placeholder="e.g. 023e105f4ecef8ad9ca31a8372d0c353" data-i18n="[placeholder]e.g. 023e105f4ecef8ad9ca31a8372d0c353">
</div>
<div>
<h4 data-i18n="Workers AI Model">Workers AI Model</h4>
<select id="model_workers_ai_select">
<option value="" data-i18n="-- Connect to the API --">-- Connect to the API --</option>
</select>
</div>
</div>
<div id="deepseek_form" data-source="deepseek">
<h4 data-i18n="DeepSeek API Key">DeepSeek API Key</h4>
<div class="flex-container">
@@ -3865,6 +3944,9 @@
</select>
<h4 data-i18n="Z.AI Model">Z.AI Model</h4>
<select id="model_zai_select">
<option value="glm-5-turbo">glm-5-turbo</option>
<option value="glm-5v-turbo">glm-5v-turbo</option>
<option value="glm-5.1">glm-5.1</option>
<option value="glm-5">glm-5</option>
<option value="glm-4.7">glm-4.7</option>
<option value="glm-4.7-flash">glm-4.7-flash</option>
@@ -5557,6 +5639,10 @@
<i class="fa-solid fa-wand-magic"></i>
<span data-i18n="Auto-select">Auto-select</span>
</div>
<button id="bg_add_folder_button" class="menu_button menu_button_icon" data-i18n="[title]New Folder" title="New Folder">
<i class="fa-solid fa-folder-plus"></i>
<span data-i18n="New Folder">New Folder</span>
</button>
<label for="add_bg_button" id="add_background_button_top" class="menu_button menu_button_icon" data-i18n="[title]Add a new background" title="Add a new background">
<i class="fa-solid fa-upload"></i>
<span data-i18n="Add Background">Add Background</span>
@@ -5581,6 +5667,14 @@
<a href="#bg_chat_tab" data-i18n="Chat">Chat</a>
</li>
<div class="heading-controls">
<button id="bg_group_add_to_folder_button" class="menu_button menu_button_icon" style="display:none;" data-i18n="[title]Add selected backgrounds to folder" title="Add selected backgrounds to folder">
<i class="fa-solid fa-folder-tree"></i>
<span data-i18n="Add to Folder">Add to Folder</span>
</button>
<button id="bg_selection_mode_button" class="menu_button menu_button_icon" data-i18n="[title]Select backgrounds for bulk folder actions" title="Select backgrounds for bulk folder actions">
<i class="fa-solid fa-edit"></i>
<span id="bg_group_select_count" style="display:none;"></span>
</button>
<button id="bg_thumb_zoom_out" class="menu_button menu_button_icon" title="Make thumbnails smaller" data-i18n="[title]Make thumbnails smaller">
<i class="fa-solid fa-minus"></i>
</button>
@@ -5590,6 +5684,19 @@
</div>
</ul>
<div id="bg_global_tab" class="bg_tab_panel">
<div id="bg_folder_breadcrumb" class="bg_folder_breadcrumb" style="display:none;">
<button id="bg_back_to_folders" class="menu_button menu_button_icon">
<i class="fa-solid fa-arrow-left"></i>
<span data-i18n="Back">Back</span>
</button>
<span id="bg_current_folder_name" class="bg_current_folder_name"></span>
<span class="expander"></span>
<button id="bg_folder_remove_selected_button" class="menu_button menu_button_icon" style="display:none;" data-i18n="[title]Remove selected backgrounds from this folder" title="Remove selected backgrounds from this folder">
<i class="fa-solid fa-folder-minus"></i>
<span data-i18n="Remove from Folder">Remove from Folder</span>
</button>
</div>
<div id="bg_folder_grid" class="bg_list bg_folder_grid"></div>
<div id="bg_menu_content" class="bg_list"></div>
</div>
<div id="bg_chat_tab" class="bg_tab_panel">
@@ -5754,12 +5861,18 @@
<div class="persona_controls_buttons_block buttons_block">
<div id="persona_rename_button" class="menu_button fa-solid fa-pencil" title="Rename Persona" data-i18n="[title]Rename Persona"></div>
<div id="sync_name_button" class="menu_button fa-solid fa-sync" title="Click to set user name for all messages" data-i18n="[title]Click to set user name for all messages"></div>
<div id="persona_lore_button" class="menu_button fa-solid fa-globe" title="Persona Lore&#10;Alt+Click to open the lorebook" data-i18n="[title]Persona Lore Alt+Click to open the lorebook"></div>
<div id="persona_lore_button" class="menu_button fa-solid fa-globe" title="Persona Lore&#10;&#10;Click to load&#10;Shift/Alt-click or long-press to open 'Link to Persona Lorebook' popup" data-i18n="[title]persona_lore_button_title"></div>
<div id="persona_set_image_button" class="menu_button fa-solid fa-image" title="Change Persona Image" data-i18n="[title]Change Persona Image"></div>
<div id="persona_duplicate_button" class="menu_button fa-solid fa-clone" title="Duplicate Persona" data-i18n="[title]Duplicate Persona"></div>
<div id="persona_delete_button" class="menu_button fa-solid fa-skull red_button" title="Delete Persona" data-i18n="[title]Delete Persona"></div>
</div>
<label class="flex1 height100p" for="persona-management-dropdown">
<select id="persona-management-dropdown" class="text_pole">
<option value="default" disabled selected data-i18n="More...">More...</option>
<option id="persona_lorebook_link" data-i18n="Link to Persona Lorebook">Link to Persona Lorebook</option>
</select>
</label>
</div>
<h4 class="flex-container alignItemsBaseline">
@@ -5925,8 +6038,8 @@
<div id="favorite_button" class="menu_button fa-solid fa-star" title="Add to Favorites" data-i18n="[title]Add to Favorites"></div>
<input type="hidden" id="fav_checkbox" name="fav" />
<div id="advanced_div" class="menu_button fa-solid fa-book " title="Advanced Definitions" data-i18n="[title]Advanced Definition"></div>
<div id="world_button" class="menu_button fa-solid fa-globe" title="Character Lore&#10;&#10;Click to load&#10;Shift-click to open 'Link to World Info' popup" data-i18n="[title]world_button_title"></div>
<div class="chat_lorebook_button menu_button fa-solid fa-passport" title="Chat Lore&#10;Alt+Click to open the lorebook" data-i18n="[title]Chat Lore Alt+Click to open the lorebook"></div>
<div id="world_button" class="menu_button fa-solid fa-globe" title="Character Lore&#10;&#10;Click to load&#10;Shift/Alt-click or long-press to open 'Link to World Info' popup" data-i18n="[title]world_button_title"></div>
<div class="chat_lorebook_button menu_button fa-solid fa-passport" title="Chat Lore&#10;&#10;Click to load&#10;Shift/Alt-click or long-press to open 'Link to Chat Lorebook' popup" data-i18n="[title]chat_lorebook_button_title"></div>
<div id="char_connections_button" class="menu_button fa-solid fa-face-smile" title="Connected Personas" data-i18n="[title]Connected Personas"></div>
<div id="export_button" class="menu_button fa-solid fa-file-export " title="Export and Download" data-i18n="[title]Export and Download"></div>
<!-- <div id="set_chat_character_settings" class="menu_button fa-solid fa-scroll" title="Set a chat scenario override"></div> -->
@@ -6077,8 +6190,14 @@
<div id="group-metadata-controls" class="marginTopBot5">
<div class="flex-container wide100p">
<input id="rm_group_chat_name" class="text_pole flex1" type="text" name="chat_name" data-i18n="[placeholder]Chat Name (Optional)" placeholder="Chat Name (Optional)" />
<div class="chat_lorebook_button menu_button fa-solid fa-passport" title="Chat Lore" data-i18n="[title]Chat Lore"></div>
<div class="chat_lorebook_button menu_button fa-solid fa-passport" title="Chat Lore&#10;&#10;Click to load&#10;Shift/Alt-click or long-press to open 'Link to Chat Lorebook' popup" data-i18n="[title]chat_lorebook_button_title"></div>
</div>
<label class="flex1 height100p" for="group-chat-lorebook-dropdown">
<select id="group-chat-lorebook-dropdown" class="text_pole">
<option value="default" disabled selected data-i18n="More...">More...</option>
<option id="group_chat_lorebook_link" data-i18n="Link to Chat Lorebook">Link to Chat Lorebook</option>
</select>
</label>
<div id="group_tags_div" class="wide100p">
<div class="tag_controls">
<input id="groupTagInput" class="text_pole textarea_compact tag_input flex1 margin0" data-i18n="[placeholder]Search / Create Tags" placeholder="Search / Create tags" />
@@ -6558,10 +6677,34 @@
<div data-action="copy" class="jg-button jg-copy fa-solid fa-file-arrow-up" data-i18n="[title]Copy to global backgrounds" title="Copy to global backgrounds"></div>
<div data-action="edit" class="jg-button jg-edit fa-solid fa-pen-to-square fa-fw pointer" data-i18n="[title]Rename Background" title="Rename Background"></div>
<div data-action="delete" class="jg-button jg-delete fa-solid fa-trash-can fa-fw pointer" data-i18n="[title]Delete Background" title="Delete Background"></div>
<div data-action="folder" class="jg-button jg-folder fa-solid fa-folder fa-fw pointer" data-i18n="[title]Add to folder" title="Add to folder"></div>
<div data-action="set-cover" class="jg-button jg-set-cover fa-solid fa-image fa-fw pointer" data-i18n="[title]Set as folder cover" title="Set as folder cover"></div>
</div>
<div class="BGSampleTitle"></div>
</div>
</div>
<div id="bg_folder_tile_template" class="template_element">
<div class="bg_folder_tile" data-folder-id="">
<div class="bg_folder_tile_cover"></div>
<div class="bg_folder_tile_overlay">
<i class="fa-solid fa-folder"></i>
<span class="bg_folder_tile_name"></span>
</div>
<div class="mobile-only-menu-toggle">
<i class="fa-solid fa-ellipsis-vertical"></i>
</div>
<div class="bg_folder_tile_menu jg-menu">
<div data-action="rename-folder" class="jg-button fa-solid fa-pen-to-square fa-fw pointer" data-i18n="[title]Rename folder" title="Rename folder"></div>
<div data-action="delete-folder" class="jg-button fa-solid fa-trash-can fa-fw pointer" data-i18n="[title]Delete folder" title="Delete folder"></div>
</div>
</div>
</div>
<div id="bg_new_folder_template" class="template_element">
<div class="bg_folder_tile bg_new_folder_tile">
<i class="fa-solid fa-folder-plus fa-2x"></i>
<span data-i18n="New Folder">New Folder</span>
</div>
</div>
<!-- templates for JS to reuse when needed -->
<div id="character_world_template" class="template_element">
<div class="character_world range-block flexFlowColumn flex-container">
@@ -6612,7 +6755,7 @@
<small class="chat_file_size select_chat_block_filename_item"></small>
<small class="chat_messages_num select_chat_block_filename_item"></small>
</div>
<div class="flex-container gap10px">
<div class="select_chat_actions flex-container gap10px">
<div title="Export JSONL chat file" data-format="jsonl" class="exportRawChatButton opacity50p hoverglow fa-solid fa-file-export" data-i18n="[title]Export JSONL chat file"></div>
<div title="Download chat as plain text document" data-format="txt" class="exportChatButton opacity50p hoverglow fa-solid fa-file-lines" data-i18n="[title]Download chat as plain text document"></div>
<div title="Delete chat file" file_name="" class="PastChat_cross opacity50p hoverglow fa-solid fa-skull" data-i18n="[title]Delete chat file"></div>
@@ -7245,6 +7388,7 @@
<div title="Toggle media display style" class="mes_button mes_media_gallery fa-solid fa-photo-film" data-i18n="[title]Toggle media display style"></div>
<div title="Toggle media display style" class="mes_button mes_media_list fa-solid fa-table-cells-large" data-i18n="[title]Toggle media display style"></div>
<div title="Embed file or image" class="mes_button mes_embed fa-solid fa-paperclip" data-i18n="[title]Embed file or image"></div>
<div title="Jump to swipe history" class="mes_button mes_swipe_picker fa-solid fa-bookmark" data-i18n="[title]Jump to swipe history" style="display: none;"></div>
<div title="Create checkpoint" class="mes_button mes_create_bookmark fa-regular fa-solid fa-flag-checkered" data-i18n="[title]Create checkpoint"></div>
<div title="Create branch" class="mes_button mes_create_branch fa-regular fa-code-branch" data-i18n="[title]Create Branch"></div>
<div title="Copy" class="mes_button mes_copy fa-solid fa-copy " data-i18n="[title]Copy"></div>
+5
View File
@@ -23,6 +23,7 @@ import { toggle as slideToggle } from 'slidetoggle';
import chalk from 'chalk';
import yaml from 'yaml';
import * as chevrotain from 'chevrotain';
import { gzipSync, gzip } from 'fflate';
/**
* Expose the libraries to the 'window' object.
@@ -102,6 +103,8 @@ export default {
chalk,
yaml,
chevrotain,
gzipSync,
gzip,
};
export {
@@ -127,4 +130,6 @@ export {
chalk,
yaml,
chevrotain,
gzipSync,
gzip,
};
+17 -1
View File
@@ -337,6 +337,8 @@
"koboldcpp API key (optional)": "مفتاح koboldcpp API (اختياري)",
"Example: http://127.0.0.1:5001": "مثال: http://127.0.0.1:5001",
"Authorize": "تفويض",
"OpenRouter API key already exists": "مفتاح API OpenRouter موجود بالفعل",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "هل تريد حقاً إنشاء مفتاح OpenRouter جديد؟ لن يتم حذف مفتاحك الموجود.",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "احصل على رمز واجهة برمجة التطبيقات الخاص بك لموزع الاتصالات باستخدام تدفق OAuth. سيتم توجيهك إلى openrouter.ai",
"Bypass status check": "تجاوز فحص الحالة",
"Chat Completion Source": "مصدر استكمال الدردشة",
@@ -1438,5 +1440,19 @@
"Still have questions?": "هل ما زالت لديك اسئلة؟",
"Join the SillyTavern Discord": "انضم إلى ديسكورد SillyTavern",
"Post a GitHub issue": "نشر مشكلة على GitHub",
"Contact the developers": "الاتصال بالمطورين"
"Contact the developers": "الاتصال بالمطورين",
"Interleaved Thinking": "التفكير المتداخل",
"Since Last User Message": "منذ آخر رسالة من المستخدم",
"Active Tool Chain": "سلسلة الأدوات النشطة",
"openrouter_interleaved_thinking_hint": "يرسل الاستدلال من رسائل المساعد السابقة مع طلبات استدعاء الأدوات للحفاظ على سياق التفكير المتداخل.",
"SillyTavern Logo": "شعار SillyTavern",
"Initializing…": "جارٍ التهيئة…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "الاسم غير مقبول، لأنه نفسه كما كان من قبل (تجاهل حالة الأحرف والنبرات).",
"Rename Chat": "إعادة تسمية المحادثة",
"Renaming chat…": "جارٍ إعادة تسمية المحادثة…",
"Delete Chat": "حذف المحادثة",
"Deleting chat…": "جارٍ حذف المحادثة…",
"Loading chat…": "جارٍ تحميل المحادثة…",
"Bulk Delete": "حذف جماعي",
"Deleting ${0} character(s)…": "جارٍ حذف ${0} شخصية (شخصيات)…"
}
+17 -1
View File
@@ -337,6 +337,8 @@
"koboldcpp API key (optional)": "koboldcpp API-Schlüssel (optional)",
"Example: http://127.0.0.1:5001": "Beispiel: http://127.0.0.1:5001",
"Authorize": "Autorisieren",
"OpenRouter API key already exists": "OpenRouter API-Schlüssel existiert bereits",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "Möchten Sie wirklich einen neuen OpenRouter API-Schlüssel erstellen? Ihr vorhandener Schlüssel wird nicht gelöscht.",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Hole dein OpenRouter-API-Token mit OAuth-Fluss. Du wirst zu openrouter.ai weitergeleitet",
"Bypass status check": "Umgehe Statusüberprüfung",
"Chat Completion Source": "Quelle für Chat-Vervollständigung",
@@ -1438,5 +1440,19 @@
"Still have questions?": "Hast du immer noch Fragen?",
"Join the SillyTavern Discord": "Trete dem SillyTavern Discord bei",
"Post a GitHub issue": "Veröffentliche ein GitHub-Problem",
"Contact the developers": "Kontaktiere die Entwickler"
"Contact the developers": "Kontaktiere die Entwickler",
"Interleaved Thinking": "Verschränktes Denken",
"Since Last User Message": "Seit letzter Nutzernachricht",
"Active Tool Chain": "Aktive Tool-Kette",
"openrouter_interleaved_thinking_hint": "Sendet Begründungen aus vorherigen Assistentennachrichten mit Tool-Aufrufen, um den Kontext für verschränktes Denken zu erhalten.",
"SillyTavern Logo": "SillyTavern-Logo",
"Initializing…": "Initialisierung…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "Name nicht akzeptiert, da er derselbe wie zuvor ist (Groß-/Kleinschreibung und Akzente ignoriert).",
"Rename Chat": "Chat umbenennen",
"Renaming chat…": "Chat wird umbenannt…",
"Delete Chat": "Chat löschen",
"Deleting chat…": "Chat wird gelöscht…",
"Loading chat…": "Chat wird geladen…",
"Bulk Delete": "Massenlöschung",
"Deleting ${0} character(s)…": "${0} Charakter(e) werden gelöscht…"
}
+17 -1
View File
@@ -337,6 +337,8 @@
"koboldcpp API key (optional)": "Clave API de koboldcpp (opcional)",
"Example: http://127.0.0.1:5001": "Ejemplo: http://127.0.0.1:5001",
"Authorize": "Autorizar",
"OpenRouter API key already exists": "La clave de API de OpenRouter ya existe",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "¿Realmente deseas crear una nueva clave de API de OpenRouter? Tu clave existente no será eliminada.",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Obtenga su token de API de OpenRouter utilizando el flujo OAuth. Será redirigido a openrouter.ai",
"Bypass status check": "Saltar la verificación del estado",
"Chat Completion Source": "Fuente de Completado de Chat",
@@ -1545,5 +1547,19 @@
"Toggles sharing world tint with character sprites (This will override Character Tint)": "Alterna el tinte mundial compartido con los sprites de personajes (esto anulará el tinte de personajes)",
"Sets the expression of the user sprite": "Establece la expresión del sprite de usuario",
"Sets the user sprite set to use for the user sprite": "Establece el conjunto de sprites de usuario para usar en el sprite de usuario",
"Toggles the user sprite on the VN UI": "Alterna el sprite de usuario en la interfaz VN"
"Toggles the user sprite on the VN UI": "Alterna el sprite de usuario en la interfaz VN",
"Interleaved Thinking": "Razonamiento intercalado",
"Since Last User Message": "Desde el último mensaje del usuario",
"Active Tool Chain": "Cadena de herramientas activa",
"openrouter_interleaved_thinking_hint": "Envía razonamiento de turnos anteriores del asistente junto con solicitudes de herramientas para mantener el contexto del razonamiento intercalado.",
"SillyTavern Logo": "Logo de SillyTavern",
"Initializing…": "Inicializando…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "Nombre no aceptado, ya que es el mismo que antes (ignorando mayúsculas y acentos).",
"Rename Chat": "Renombrar chat",
"Renaming chat…": "Renombrando chat…",
"Delete Chat": "Eliminar chat",
"Deleting chat…": "Eliminando chat…",
"Loading chat…": "Cargando chat…",
"Bulk Delete": "Eliminación masiva",
"Deleting ${0} character(s)…": "Eliminando ${0} personaje(s)…"
}
+21 -5
View File
@@ -320,6 +320,8 @@
"koboldcpp API key (optional)": "Clé API koboldcpp (facultatif)",
"Example: http://127.0.0.1:5001": "Exemple : http://127.0.0.1:5001",
"Authorize": "Autoriser",
"OpenRouter API key already exists": "La clé API OpenRouter existe déjà",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "Voulez-vous vraiment créer une nouvelle clé OpenRouter ? Votre clé existante ne sera pas supprimée.",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Obtenez votre jeton API OpenRouter en utilisant le flux OAuth. Vous serez redirigé vers openrouter.ai",
"Bypass status check": "Contourner la vérification de l'état",
"Chat Completion Source": "Source de complétion de chat",
@@ -1516,10 +1518,10 @@
"Contain": "Contenir",
"Stretch": "Étirer",
"Center": "Centrer",
"Persona Lore Alt+Click to open the lorebook": "Lore de persona\nAlt+Click pour ouvrir le lorebook",
"persona_lore_button_title": "Lore de persona\n\nCliquer pour charger\nMajuscule/Alt-clic ou appui long pour ouvrir la fenêtre contextuelle « Lien vers le Lorebook de persona ».",
"None (disabled)": "Aucun (désactivé)",
"world_button_title": "Lore de personnage\n\nCliquer pour charger\nMajuscule-clic pour ouvrir la fenêtre contextuelle « Lien vers le Wold Info ».",
"Chat Lore Alt+Click to open the lorebook": "Lore du chat\nAlt+Click pour ouvrir le lorebook",
"world_button_title": "Lore de personnage\n\nCliquer pour charger\nMajuscule/Alt-clic ou appui long pour ouvrir la fenêtre contextuelle « Lien vers le World Info ».",
"chat_lorebook_button_title": "Lore du chat\n\nCliquer pour charger\nMajuscule/Alt-clic ou appui long pour ouvrir la fenêtre contextuelle « Lien vers le Lorebook du chat ».",
"Manual": "Manuel",
"Duplicate persona": "Dupliquer la persona",
"popup-button-crop": "Recadrer",
@@ -2012,7 +2014,7 @@
"Downloader Options": "Options de téléchargement",
"Extra parameters for downloading/HuggingFace API": "Paramètres supplémentaires pour le téléchargement/HuggingFace API.\rSi vous n'êtes pas sûr, laissez ces paramètres vides.",
"Revision": "Révision",
"Folder Name": "Nom du dossier de sortie",
"Output Folder Name": "Nom du dossier de sortie",
"HF Token": "Token HF",
"Include Patterns": "Inclure les patterns",
"Glob patterns of files to include in the download.": "Patterns globaux de fichiers à inclure dans le téléchargement.\rSéparer chaque pattern par une nouvelle ligne.",
@@ -2046,5 +2048,19 @@
"System Prompt Name": "Nom du prompt système:",
"Instruct Mode": "Mode Instruction:",
"Save and Update": "Sauvegarder et mettre à jour",
"Don't ask again for this URL": "Ne plus demander pour cette URL"
"Don't ask again for this URL": "Ne plus demander pour cette URL",
"Interleaved Thinking": "Raisonnement intercalé",
"Since Last User Message": "Depuis le dernier message utilisateur",
"Active Tool Chain": "Chaîne d'outils active",
"openrouter_interleaved_thinking_hint": "Envoie le raisonnement des tours précédents de l'assistant avec les requêtes d'outils pour conserver le contexte du raisonnement intercalé.",
"SillyTavern Logo": "Logo SillyTavern",
"Initializing…": "Initialisation…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "Nom non accepté, car il est identique à l'ancien (en ignorant la casse et les accents).",
"Rename Chat": "Renommer la discussion",
"Renaming chat…": "Renommage de la discussion…",
"Delete Chat": "Supprimer la discussion",
"Deleting chat…": "Suppression de la discussion…",
"Loading chat…": "Chargement de la discussion…",
"Bulk Delete": "Suppression groupée",
"Deleting ${0} character(s)…": "Suppression de ${0} personnage(s)…"
}
+17 -1
View File
@@ -335,6 +335,8 @@
"koboldcpp API key (optional)": "koboldcpp API lykill (valfrjálst)",
"Example: http://127.0.0.1:5001": "Dæmi: http://127.0.0.1:5001",
"Authorize": "Heimild",
"OpenRouter API key already exists": "OpenRouter API lykill er þegar til",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "Viltu virkilega búa til nýjan OpenRouter lykil? Núverandi lykill þinn verður ekki eytt.",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Fáðu API lykilinn þinn fyrir OpenRouter með því að nota OAuth strauminn. Þú verður endurvísað(ð/ur) á openrouter.ai",
"Bypass status check": "Hlaupa framhjá stöðutík",
"Chat Completion Source": "Heimild að fullvirkni spjalls",
@@ -1436,5 +1438,19 @@
"Still have questions?": "Ertu enn með spurningar?",
"Join the SillyTavern Discord": "Skráðu þig í SillyTavern Discord",
"Post a GitHub issue": "Senda inn GitHub málefni",
"Contact the developers": "Hafa samband við þróunaraðila"
"Contact the developers": "Hafa samband við þróunaraðila",
"Interleaved Thinking": "Fléttuð hugsun",
"Since Last User Message": "Frá síðustu notandaskilaboðum",
"Active Tool Chain": "Virk verkfærakeðja",
"openrouter_interleaved_thinking_hint": "Sendir röksemdir úr fyrri aðstoðarskilaboðum með verkfæraköllum til að viðhalda samhengi fléttaðrar hugsunar.",
"SillyTavern Logo": "SillyTavern merki",
"Initializing…": "Ræsir…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "Nafn ekki samþykkt, því það er það sama og áður (hunsar há-/lágstafi og brottmerki).",
"Rename Chat": "Endurnefna spjall",
"Renaming chat…": "Endurnefni spjall…",
"Delete Chat": "Eyða spjalli",
"Deleting chat…": "Eyði spjalli…",
"Loading chat…": "Hleð spjalli…",
"Bulk Delete": "Fjöldaeyðing",
"Deleting ${0} character(s)…": "Eyði ${0} persónu(m)…"
}
+17 -1
View File
@@ -337,6 +337,8 @@
"koboldcpp API key (optional)": "Chiave API koboldcpp (opzionale)",
"Example: http://127.0.0.1:5001": "Esempio: http://127.0.0.1:5001",
"Authorize": "Autorizzare",
"OpenRouter API key already exists": "La chiave API di OpenRouter esiste già",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "Desideri veramente creare una nuova chiave API di OpenRouter? La tua chiave esistente non verrà eliminata.",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Ottieni il tuo token API di OpenRouter utilizzando il flusso OAuth. Sarai reindirizzato su openrouter.ai",
"Bypass status check": "Ignora controllo stato",
"Chat Completion Source": "Fonte di Completamento della Chat",
@@ -1438,5 +1440,19 @@
"Still have questions?": "Hai ancora domande?",
"Join the SillyTavern Discord": "Unisciti al SillyTavern Discord",
"Post a GitHub issue": "Pubblica un problema su GitHub",
"Contact the developers": "Contatta gli sviluppatori"
"Contact the developers": "Contatta gli sviluppatori",
"Interleaved Thinking": "Ragionamento intercalato",
"Since Last User Message": "Dall'ultimo messaggio utente",
"Active Tool Chain": "Catena di strumenti attiva",
"openrouter_interleaved_thinking_hint": "Invia il ragionamento dai turni precedenti dell'assistente con le richieste di strumenti per mantenere il contesto del ragionamento intercalato.",
"SillyTavern Logo": "Logo SillyTavern",
"Initializing…": "Inizializzazione…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "Nome non accettato, poiché è lo stesso di prima (ignorando maiuscole e accenti).",
"Rename Chat": "Rinomina chat",
"Renaming chat…": "Rinominazione chat…",
"Delete Chat": "Elimina chat",
"Deleting chat…": "Eliminazione chat…",
"Loading chat…": "Caricamento chat…",
"Bulk Delete": "Eliminazione multipla",
"Deleting ${0} character(s)…": "Eliminazione di ${0} personaggio/i…"
}
+17 -1
View File
@@ -337,6 +337,8 @@
"koboldcpp API key (optional)": "koboldcpp API キー (オプション)",
"Example: http://127.0.0.1:5001": "例: http://127.0.0.1:5001",
"Authorize": "承認",
"OpenRouter API key already exists": "OpenRouter API キーは既に存在します",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "新しい OpenRouter キーを作成してもよろしいですか?既存のキーは削除されません。",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "OAuthフローを使用してOpenRouter APIトークンを取得します。 openrouter.aiにリダイレクトされます",
"Bypass status check": "ステータスのチェックをバイパスする",
"Chat Completion Source": "チャット補完ソース",
@@ -1443,5 +1445,19 @@
"Contact the developers": "開発者に連絡",
"Stop Inspecting": "検査を停止",
"Inspect Prompts": "プロンプトを検査",
"Toggle prompt inspection": "プロンプト検査の切り替え"
"Toggle prompt inspection": "プロンプト検査の切り替え",
"Interleaved Thinking": "インターリーブ思考",
"Since Last User Message": "直前のユーザーメッセージ以降",
"Active Tool Chain": "アクティブなツールチェーン",
"openrouter_interleaved_thinking_hint": "インターリーブ思考の文脈を維持するため、直前のアシスタントターンの推論をツール呼び出しリクエストとともに送信します。",
"SillyTavern Logo": "SillyTavernロゴ",
"Initializing…": "初期化中…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "名前が受け入れられませんでした。以前と同じです(大文字小文字とアクセントを無視)。",
"Rename Chat": "チャット名を変更",
"Renaming chat…": "チャット名を変更中…",
"Delete Chat": "チャットを削除",
"Deleting chat…": "チャットを削除中…",
"Loading chat…": "チャットを読み込み中…",
"Bulk Delete": "一括削除",
"Deleting ${0} character(s)…": "${0}人のキャラクターを削除中…"
}
+18 -2
View File
@@ -337,6 +337,8 @@
"koboldcpp API key (optional)": "koboldcpp API 키(선택사항)",
"Example: http://127.0.0.1:5001": "예: http://127.0.0.1:5001",
"Authorize": "승인하기",
"OpenRouter API key already exists": "OpenRouter API 키가 이미 존재합니다",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "정말 새로운 OpenRouter 키를 만들기를 원하십니까? 기존 키는 삭제되지 않습니다.",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "OAuth 플로우를 사용하여 OpenRouter API 토큰을 가져옵니다. openrouter.ai로 리디렉션됩니다.",
"Legacy API (pre-OAI, no streaming)": "레거시 API (OAI 이전, 스트리밍 없음)",
"Bypass status check": "상태 확인 우회",
@@ -1533,7 +1535,7 @@
"Only apply color as accent": "색상은 오직 강조로써만 적용됩니다",
"qr--colorClear": "색상 지우기",
"Color": "색상",
"world_button_title": "캐릭터 로어. 클릭하여 로드하세요. Shift를 클릭하면 '월드 인포 링크' 팝업이 열립니다.",
"world_button_title": "캐릭터 로어. 클릭하여 로드하세요. Shift/Alt+클릭 또는 길게 누르면 '월드 인포 링크' 팝업이 열립니다.",
"Select TTS Provider": "TTS 공급자 선택",
"tts_enabled": "활성화",
"Narrate user messages": "사용자 메시지 나레이션",
@@ -1617,5 +1619,19 @@
"to install additional features.": "으로 가세요.",
"Master Import": "마스터 불러오기",
"Master Export": "마스터 내보내기",
"Chat Quick Reply Sets": "채팅 빠른 답장 세트들"
"Chat Quick Reply Sets": "채팅 빠른 답장 세트들",
"Interleaved Thinking": "인터리브드 사고",
"Since Last User Message": "마지막 사용자 메시지 이후",
"Active Tool Chain": "활성 도구 체인",
"openrouter_interleaved_thinking_hint": "인터리브드 사고 컨텍스트를 유지하기 위해 이전 어시스턴트 턴의 추론을 도구 호출 요청과 함께 전송합니다.",
"SillyTavern Logo": "SillyTavern 로고",
"Initializing…": "초기화 중…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "이름이 승인되지 않았습니다. 이전과 동일합니다(대소문자 및 악센트 무시).",
"Rename Chat": "채팅 이름 변경",
"Renaming chat…": "채팅 이름 변경 중…",
"Delete Chat": "채팅 삭제",
"Deleting chat…": "채팅 삭제 중…",
"Loading chat…": "채팅 불러오는 중…",
"Bulk Delete": "대량 삭제",
"Deleting ${0} character(s)…": "${0}개 캐릭터 삭제 중…"
}
+17 -1
View File
@@ -333,6 +333,8 @@
"koboldcpp API key (optional)": "koboldcpp API-sleutel (optioneel)",
"Example: http://127.0.0.1:5001": "Voorbeeld: http://127.0.0.1:5001",
"Authorize": "Toestemming geven",
"OpenRouter API key already exists": "OpenRouter API-sleutel bestaat al",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "Wilt u echt een nieuwe OpenRouter API-sleutel maken? Uw bestaande sleutel wordt niet verwijderd.",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Haal uw OpenRouter API-token op met behulp van OAuth-flow. U wordt doorgestuurd naar openrouter.ai",
"Bypass status check": "Omzeil statuscontrole",
"Chat Completion Source": "Bron voor Chatvoltooiing",
@@ -1434,5 +1436,19 @@
"Still have questions?": "Heb je nog vragen?",
"Join the SillyTavern Discord": "Word lid van de SillyTavern Discord",
"Post a GitHub issue": "Plaats een GitHub-probleem",
"Contact the developers": "Neem contact op met de ontwikkelaars"
"Contact the developers": "Neem contact op met de ontwikkelaars",
"Interleaved Thinking": "Verweven redenering",
"Since Last User Message": "Sinds laatste gebruikersbericht",
"Active Tool Chain": "Actieve toolketen",
"openrouter_interleaved_thinking_hint": "Verstuurt redenering uit eerdere assistentbeurten met tool-aanvragen om de context van verweven redenering te behouden.",
"SillyTavern Logo": "SillyTavern-logo",
"Initializing…": "Initialiseren…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "Naam niet geaccepteerd, omdat deze hetzelfde is als voorheen (hoofdletters en accenten genegeerd).",
"Rename Chat": "Chat hernoemen",
"Renaming chat…": "Chat hernoemen…",
"Delete Chat": "Chat verwijderen",
"Deleting chat…": "Chat verwijderen…",
"Loading chat…": "Chat laden…",
"Bulk Delete": "Bulkverwijdering",
"Deleting ${0} character(s)…": "${0} personage(s) verwijderen…"
}
+17 -1
View File
@@ -335,6 +335,8 @@
"koboldcpp API key (optional)": "Chave API koboldcpp (opcional)",
"Example: http://127.0.0.1:5001": "Exemplo: http://127.0.0.1:5001",
"Authorize": "Autorizar",
"OpenRouter API key already exists": "A chave de API do OpenRouter já existe",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "Você realmente deseja criar uma nova chave OpenRouter? Sua chave existente não será excluída.",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Obtenha seu token da API do OpenRouter usando o fluxo OAuth. Você será redirecionado para openrouter.ai",
"Bypass status check": "Ignorar verificação de status",
"Chat Completion Source": "Fonte de conclusão de chat",
@@ -1436,5 +1438,19 @@
"Still have questions?": "Ainda tem perguntas?",
"Join the SillyTavern Discord": "Junte-se ao Discord do SillyTavern",
"Post a GitHub issue": "Publicar um problema no GitHub",
"Contact the developers": "Contatar os desenvolvedores"
"Contact the developers": "Contatar os desenvolvedores",
"Interleaved Thinking": "Raciocínio intercalado",
"Since Last User Message": "Desde a última mensagem do utilizador",
"Active Tool Chain": "Cadeia de ferramentas ativa",
"openrouter_interleaved_thinking_hint": "Envia o raciocínio de turnos anteriores do assistente com pedidos de ferramentas para manter o contexto de raciocínio intercalado.",
"SillyTavern Logo": "Logótipo do SillyTavern",
"Initializing…": "A inicializar…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "Nome não aceite, pois é o mesmo que antes (ignorando maiúsculas e acentos).",
"Rename Chat": "Renomear chat",
"Renaming chat…": "A renomear chat…",
"Delete Chat": "Eliminar chat",
"Deleting chat…": "A eliminar chat…",
"Loading chat…": "A carregar chat…",
"Bulk Delete": "Eliminação em massa",
"Deleting ${0} character(s)…": "A eliminar ${0} personagem(ns)…"
}
+20 -4
View File
@@ -758,6 +758,8 @@
"Doesn't work? Try adding": "Не работает? Попробуйте добавить в конце",
"at the end!": "!",
"Authorize": "Авторизоваться",
"OpenRouter API key already exists": "Ключ API OpenRouter уже существует",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "Вы действительно хотите создать новый ключ OpenRouter? Ваш существующий ключ не будет удален.",
"No persona description": "[Нет описания]",
"Not connected to API!": "Нет соединения с API!",
"Type a message, or /? for help": "Введите сообщение, или /? для получения справки",
@@ -1902,7 +1904,7 @@
"Save": "Сохранить",
"Chat Lorebook": "Лорбук для чата",
"chat_world_template_txt": "Выбранный мир будет привязан к этому чату. Будет работать наряду с глобальным лорбуком и лором персонажа.",
"world_button_title": "Лор персонажа\n\nНажмите, чтобы загрузить\nShift + ЛКМ, чтобы открыть диалог привязки мира",
"world_button_title": "Лор персонажа\n\nНажмите, чтобы загрузить\nShift / Alt + ЛКМ или долгое нажатие, чтобы открыть диалог привязки мира",
"No auxillary Lorebooks set. Click here to select.": "Вспомогательный лорбук не выбран. Нажмите, чтобы выбрать.",
"ext_regex_user_input_desc": "Отправленные вами сообщения.",
"ext_regex_ai_input_desc": "Полученные от API ответы.",
@@ -2128,7 +2130,7 @@
"openai_reasoning_effort_low": "Поверхностные",
"openai_reasoning_effort_medium": "Обычные",
"openai_reasoning_effort_high": "Подробные",
"Persona Lore Alt+Click to open the lorebook": "Лорбук данной персоны\nAlt + ЛКМ чтобы открыть лорбук",
"persona_lore_button_title": "Лорбук данной персоны\n\nНажмите, чтобы открыть\nShift / Alt + ЛКМ или долгое нажатие, чтобы открыть диалог привязки лорбука",
"Persona Lorebook for": "Лорбук для персоны",
"persona_world_template_txt": "Выбранный мир будет привязан к этой персоне. Будет работать вместе с глобальным лорбуком и лорбуками персонажа и чата.",
"Global list": "Глобальный список",
@@ -2143,7 +2145,7 @@
"Enter a valid API URL": "Введите корректный адрес API",
"No Ollama model selected.": "Не выбрана модель Ollama",
"Background Fitting": "Способ подгонки фона под разрешение",
"Chat Lore Alt+Click to open the lorebook": "Лорбук данного чата\nAlt + ЛКМ чтобы открыть лорбук",
"chat_lorebook_button_title": "Лорбук данного чата\n\nНажмите, чтобы открыть\nShift / Alt + ЛКМ или долгое нажатие, чтобы открыть диалог привязки лорбука",
"Token Counter": "Подсчитать токены",
"Type / paste in the box below to see the number of tokens in the text.": "Введите или вставьте текст в окошко ниже, чтобы подсчитать количество токенов в нём.",
"Selected tokenizer:": "Выбранный токенайзер:",
@@ -2738,5 +2740,19 @@
"Uses the voices provided by your operating system": "Используем стандартные голоса вашей ОС",
"Your browser or operating system doesn't support speech synthesis": "Ваш браузер либо ОС не поддерживают синтез речи",
"Works best when: Pass Asterisks to TTS Engine is enabled, and both Only narrate quotes and Ignore *text, even 'quotes', inside asterisks* are disabled.": "Работает лучше всего, когда: одновременно включена опция \"Передавать звёздочки TTS-движку\", а также отключены обе опции: \"Не озвучивать *текст, даже \"в кавычках\", если он внутри звёздочек*\", и \"Озвучивать только текст \"в кавычках\"\"",
"Available voices": "Доступные голоса"
"Available voices": "Доступные голоса",
"Interleaved Thinking": "Чередующееся рассуждение",
"Since Last User Message": "С момента последнего сообщения пользователя",
"Active Tool Chain": "Активная цепочка инструментов",
"openrouter_interleaved_thinking_hint": "Отправляет рассуждение из предыдущих ходов ассистента вместе с запросами вызова инструментов, чтобы сохранять контекст чередующегося рассуждения.",
"SillyTavern Logo": "Логотип SillyTavern",
"Initializing…": "Инициализация…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "Имя не принято, так как оно совпадает с предыдущим (игнорируя регистр и акценты).",
"Rename Chat": "Переименовать чат",
"Renaming chat…": "Переименование чата…",
"Delete Chat": "Удалить чат",
"Deleting chat…": "Удаление чата…",
"Loading chat…": "Загрузка чата…",
"Bulk Delete": "Массовое удаление",
"Deleting ${0} character(s)…": "Удаление ${0} персонажа(ей)…"
}
+17 -1
View File
@@ -339,6 +339,8 @@
"koboldcpp API key (optional)": "คีย์ API ของ koboldcpp (เพิ่มเติม)",
"Example: http://127.0.0.1:5001": "ตัวอย่าง: http://127.0.0.1:5001",
"Authorize": "อนุญาต",
"OpenRouter API key already exists": "คีย์ API ของ OpenRouter มีอยู่แล้ว",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "คุณต้องการสร้างคีย์ OpenRouter ใหม่จริง ๆ หรือไม่ คีย์ที่มีอยู่ของคุณจะไม่ถูกลบ",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "โปรดเข้าสู่ระบบเพื่อรับ OpenRouter API Token โดยใช้ OAuth Flow จากนั้นคุณจะถูกเปลี่ยนเส้นทางไปยังเว็บไซต์ของ openrouter.ai",
"Bypass status check": "ข้ามการตรวจสอบสถานะ",
"Chat Completion Source": "แหล่งที่มาของ Chat Completion",
@@ -1455,5 +1457,19 @@
"Contact the developers": "ติดต่อผู้พัฒนา",
"Stop Inspecting": "Stop Inspecting",
"Inspect Prompts": "ตรวจสอบ Prompt",
"Toggle prompt inspection": "สลับการตรวจสอบ Prompt"
"Toggle prompt inspection": "สลับการตรวจสอบ Prompt",
"Interleaved Thinking": "การคิดแบบสลับขั้น",
"Since Last User Message": "ตั้งแต่ข้อความล่าสุดของผู้ใช้",
"Active Tool Chain": "สายโซ่เครื่องมือที่ใช้งานอยู่",
"openrouter_interleaved_thinking_hint": "ส่งเหตุผลจากเทิร์นก่อนหน้าของผู้ช่วยไปพร้อมกับคำขอเรียกใช้เครื่องมือ เพื่อคงบริบทการคิดแบบสลับขั้นไว้",
"SillyTavern Logo": "โลโก้ SillyTavern",
"Initializing…": "กำลังเริ่มต้น…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "ชื่อไม่ได้รับการยอมรับ เนื่องจากเหมือนกับก่อนหน้านี้ (ไม่สนใจตัวพิมพ์ใหญ่เล็กและเครื่องหมายเสียง)",
"Rename Chat": "เปลี่ยนชื่อแชท",
"Renaming chat…": "กำลังเปลี่ยนชื่อแชท…",
"Delete Chat": "ลบแชท",
"Deleting chat…": "กำลังลบแชท…",
"Loading chat…": "กำลังโหลดแชท…",
"Bulk Delete": "ลบจำนวนมาก",
"Deleting ${0} character(s)…": "กำลังลบ ${0} ตัวละคร…"
}
+17 -1
View File
@@ -335,6 +335,8 @@
"koboldcpp API key (optional)": "API-ключ koboldcpp (необов’язково)",
"Example: http://127.0.0.1:5001": "Приклад: http://127.0.0.1:5001",
"Authorize": "Авторизувати",
"OpenRouter API key already exists": "API ключ OpenRouter вже існує",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "Ви дійсно бажаєте створити новий ключ OpenRouter API? Ваш існуючий ключ не буде видалено.",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Отримайте свій токен API OpenRouter за допомогою OAuth. Вас буде перенаправлено на openrouter.ai",
"Bypass status check": "Обійти перевірку статусу",
"Chat Completion Source": "Джерело Chat Completion",
@@ -1436,5 +1438,19 @@
"Still have questions?": "Все ще є питання?",
"Join the SillyTavern Discord": "Приєднуйтесь до SillyTavern Discord",
"Post a GitHub issue": "Опублікуйте проблему на GitHub",
"Contact the developers": "Зв'яжіться з розробниками"
"Contact the developers": "Зв'яжіться з розробниками",
"Interleaved Thinking": "Черговане мислення",
"Since Last User Message": "Від останнього повідомлення користувача",
"Active Tool Chain": "Активний ланцюжок інструментів",
"openrouter_interleaved_thinking_hint": "Надсилає міркування з попередніх ходів асистента разом із запитами виклику інструментів, щоб зберегти контекст чергованого мислення.",
"SillyTavern Logo": "Логотип SillyTavern",
"Initializing…": "Ініціалізація…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "Ім'я не прийнято, оскільки воно збігається з попереднім (ігноруючи регістр та акценти).",
"Rename Chat": "Перейменувати чат",
"Renaming chat…": "Перейменування чату…",
"Delete Chat": "Видалити чат",
"Deleting chat…": "Видалення чату…",
"Loading chat…": "Завантаження чату…",
"Bulk Delete": "Масове видалення",
"Deleting ${0} character(s)…": "Видалення ${0} персонажа(ів)…"
}
+17 -1
View File
@@ -335,6 +335,8 @@
"koboldcpp API key (optional)": "Key API koboldcpp (tùy chọn)",
"Example: http://127.0.0.1:5001": "Ví dụ: http://127.0.0.1:5001",
"Cho phép": "Ủy quyền",
"OpenRouter API key already exists": "Key API OpenRouter đã tồn tại",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "Bạn có thực sự muốn tạo khóa OpenRouter mới không? Khóa hiện có của bạn sẽ không bị xóa.",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Nhận mã thông báo API OpenRouter của bạn bằng cách sử dụng luồng OAuth. Bạn sẽ được chuyển hướng đến openrouter.ai",
"Bypass status check": "Bỏ qua check trạng thái",
"Chat Completion Source": "Nguồn cho Chat Completion",
@@ -1436,5 +1438,19 @@
"Still have questions?": "Bạn còn thắc mắc?",
"Join the SillyTavern Discord": "Tham gia Kênh Discord của SillyTavern",
"Post a GitHub issue": "Đăng một vấn đề trên GitHub",
"Contact the developers": "Liên hệ với Devs"
"Contact the developers": "Liên hệ với Devs",
"Interleaved Thinking": "Lập luận xen kẽ",
"Since Last User Message": "Kể từ tin nhắn người dùng gần nhất",
"Active Tool Chain": "Chuỗi công cụ đang hoạt động",
"openrouter_interleaved_thinking_hint": "Gửi lập luận từ các lượt trợ lý trước đó cùng với yêu cầu gọi công cụ để duy trì ngữ cảnh lập luận xen kẽ.",
"SillyTavern Logo": "Logo SillyTavern",
"Initializing…": "Đang khởi tạo…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "Tên không được chấp nhận vì giống như trước đó (bỏ qua chữ hoa/thường và dấu).",
"Rename Chat": "Đổi tên cuộc trò chuyện",
"Renaming chat…": "Đang đổi tên cuộc trò chuyện…",
"Delete Chat": "Xóa cuộc trò chuyện",
"Deleting chat…": "Đang xóa cuộc trò chuyện…",
"Loading chat…": "Đang tải cuộc trò chuyện…",
"Bulk Delete": "Xóa hàng loạt",
"Deleting ${0} character(s)…": "Đang xóa ${0} nhân vật…"
}
+1813 -482
View File
File diff suppressed because it is too large Load Diff
+21 -5
View File
@@ -334,6 +334,8 @@
"koboldcpp API key (optional)": "KoboldCpp API 金鑰(可選)",
"Example: http://127.0.0.1:5001": "範例:http://127.0.0.1:5001",
"Authorize": "授權",
"OpenRouter API key already exists": "OpenRouter API 密鑰已存在",
"Do you really wish to create a new OpenRouter key? Your existing key will not be deleted.": "您確定要建立新的 OpenRouter API 金鑰嗎?您現有的金鑰不會被刪除。",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "使用 OAuth 流程取得您的 OpenRouter API 符元。您將被重新導向到 openrouter.ai",
"Bypass status check": "繞過狀態檢查",
"Chat Completion Source": "聊天補全來源",
@@ -1541,7 +1543,7 @@
"When enabled, nodes that have swipes splitting off of them will appear subtly larger, in addition to having the double border.": "啟用後,具分支滑動的節點將顯示雙重邊框,還會略微放大。",
"WI Entry Status:🔵 Constant🟢 Normal🔗 Vectorized": "世界資訊條目狀態:\\r🔵 恆定\\r🟢 正常\\r🔗 向量化",
"Width of a node, in pixels at zoom level 1.0.": "縮放等級為 1.0 時,節點的像素寬度。",
"world_button_title": "角色背景設定\n「Shift+點選」可開啟「連結至世界資訊」彈窗",
"world_button_title": "角色背景設定\n「Shift/Alt+點選」或長按可開啟「連結至世界資訊」彈窗",
"# of Beams": "# of Beams",
"Additional Parameters": "其他參數",
"All": "全部",
@@ -2093,7 +2095,7 @@
"Downloader Options": "下載選項",
"Extra parameters for downloading/HuggingFace API": "下載/使用 HuggingFace API 的額外參數。\r若不確定,請留空。",
"Revision": "修訂",
"Folder Name": "輸出資料夾名稱",
"Output Folder Name": "輸出資料夾名稱",
"HF Token": "HF 符元",
"Include Patterns": "包含模式",
"Glob patterns of files to include in the download.": "要包含於下載中文件的全域模式。\r每行輸入一個模式。",
@@ -2365,8 +2367,8 @@
"Contain": "自適應",
"Stretch": "拉伸",
"Center": "置中",
"Persona Lore Alt+Click to open the lorebook": "「Alt+點選」可開啟角色知識書",
"Chat Lore Alt+Click to open the lorebook": "「Alt+點選」可開啟聊天知識書",
"persona_lore_button_title": "人設知識書\n\n點選以載入\nShift/Alt+點選或長按開啟「連結人設知識書」彈窗",
"chat_lorebook_button_title": "聊天知識書\n\n點選以載入\nShift/Alt+點選或長按開啟「連結聊天知識書」彈窗",
"Function Tool": "功能工具",
"Functions in this category are for advanced users only. Don't click anything if you're not sure about the consequences.": "此類功能僅供高階使用者使用。若不確定後果,請勿點選任何內容。",
"Are you sure you want to delete this user?": "確定要刪除該使用者嗎?",
@@ -2758,5 +2760,19 @@
"[title]Create a new": "新增",
"[title]Delete a ": "刪除 ",
"[title]Rename a ": "重新命名 ",
"completions note prefix": "完成提示前綴"
"completions note prefix": "完成提示前綴",
"Interleaved Thinking": "交錯思維",
"Since Last User Message": "自上一則使用者訊息起",
"Active Tool Chain": "使用中的工具鏈",
"openrouter_interleaved_thinking_hint": "會在工具呼叫請求中附帶先前助理回合的推理,以維持交錯思維的上下文。",
"SillyTavern Logo": "SillyTavern 標誌",
"Initializing…": "正在初始化…",
"Name not accepted, as it is the same as before (ignoring case and accents).": "名稱不被接受,因為它與之前相同(忽略大小寫和重音)。",
"Rename Chat": "重新命名聊天",
"Renaming chat…": "正在重新命名聊天…",
"Delete Chat": "刪除聊天",
"Deleting chat…": "正在刪除聊天…",
"Loading chat…": "正在載入聊天…",
"Bulk Delete": "批次刪除",
"Deleting ${0} character(s)…": "正在刪除 ${0} 個角色…"
}
+445 -283
View File
File diff suppressed because it is too large Load Diff
+10 -9
View File
@@ -14,10 +14,11 @@ import {
} from '../script.js';
import { favsToHotswap } from './RossAscends-mods.js';
import { hideLoader, showLoader } from './loader.js';
import { loader } from './action-loader.js';
import { convertCharacterToPersona } from './personas.js';
import { callGenericPopup, POPUP_TYPE } from './popup.js';
import { createTagInput, getTagKeyForEntity, getTagsList, printTagList, tag_map, compareTagsForSort, removeTagFromMap, importTags, tag_import_setting } from './tags.js';
import { t } from './i18n.js';
/**
* Static object representing the actions of the
@@ -101,7 +102,7 @@ class CharacterContextMenu {
* @param {number} characterId
* @returns {Promise<void>}
*/
static persona = async (characterId) => void(await convertCharacterToPersona(characterId));
static persona = async (characterId) => void (await convertCharacterToPersona(characterId));
/**
* Delete one or more characters,
@@ -754,7 +755,7 @@ class BulkEditOverlay {
handleContextMenuShow = (event) => {
event.preventDefault();
const [x,y] = this.#getContextMenuPosition(event);
const [x, y] = this.#getContextMenuPosition(event);
CharacterContextMenu.show(x, y);
this.#contextMenuOpen = true;
};
@@ -846,15 +847,15 @@ class BulkEditOverlay {
const deleteChats = checkbox.prop('checked') ?? false;
showLoader();
const toast = toastr.info('We\'re deleting your characters, please wait...', 'Working on it');
const loaderHandle = loader.show({
title: t`Bulk Delete`,
message: t`Deleting ${characterIds.length} character(s)…`,
toastMode: loader.ToastMode.STATIC,
});
const avatarList = characterIds.map(id => characters[id]?.avatar).filter(a => a);
return CharacterContextMenu.delete(avatarList, deleteChats)
.then(() => this.browseState())
.finally(() => {
toastr.clear(toast);
hideLoader();
});
.finally(() => loaderHandle.hide());
});
// At this moment the popup is already changed in the dom, but not yet closed/resolved. We build the avatar list here
+1 -3
View File
@@ -986,7 +986,6 @@ class PromptManager {
* @returns {void}
*/
addPrompt(prompt, identifier) {
if (typeof prompt !== 'object' || prompt === null) throw new Error('Object is not a prompt');
const newPrompt = {
@@ -1301,7 +1300,7 @@ class PromptManager {
const prompt = this.getPromptById(identifier);
const textareaIdentifier = `${identifier}_prompt_quick_edit_textarea`;
const html = `<div class="range-block m-t-1">
<div class="justifyLeft" data-i18n="${title}">${title}</div>
<div class="justifyLeft">${title}</div>
<div class="wide100p">
<textarea id="${textareaIdentifier}" class="text_pole textarea_compact" rows="6" placeholder="">${prompt.content}</textarea>
</div>
@@ -1318,7 +1317,6 @@ class PromptManager {
this.updatePromptByIdentifier(identifier, prompt);
debouncedSaveServiceSettings().then(() => this.render());
});
}
/**
+18 -21
View File
@@ -101,7 +101,6 @@ observer.observe(document.documentElement, observerConfig);
* @returns {string} - A human-readable string that represents the time spent generating characters.
*/
export function humanizeGenTime(total_gen_time) {
//convert time_spent to humanized format of "_ Hours, _ Minutes, _ Seconds" from milliseconds
let time_spent = total_gen_time || 0;
time_spent = Math.floor(time_spent / 1000);
@@ -380,8 +379,7 @@ function RA_autoconnect(PrevApi) {
|| (textgen_settings.type === textgen_types.FEATHERLESS && secret_state[SECRET_KEYS.FEATHERLESS])
) {
$('#api_button_textgenerationwebui').trigger('click');
}
else if (isValidUrl(getTextGenServer())) {
} else if (isValidUrl(getTextGenServer())) {
$('#api_button_textgenerationwebui').trigger('click');
}
break;
@@ -409,6 +407,7 @@ function RA_autoconnect(PrevApi) {
|| (secret_state[SECRET_KEYS.COMETAPI] && oai_settings.chat_completion_source == chat_completion_sources.COMETAPI)
|| (secret_state[SECRET_KEYS.ZAI] && oai_settings.chat_completion_source == chat_completion_sources.ZAI)
|| (secret_state[SECRET_KEYS.POLLINATIONS] && oai_settings.chat_completion_source === chat_completion_sources.POLLINATIONS)
|| (secret_state[SECRET_KEYS.WORKERS_AI] && oai_settings.chat_completion_source == chat_completion_sources.WORKERS_AI)
|| (isValidUrl(oai_settings.custom_url) && oai_settings.chat_completion_source == chat_completion_sources.CUSTOM)
|| (secret_state[SECRET_KEYS.AZURE_OPENAI] && oai_settings.chat_completion_source == chat_completion_sources.AZURE_OPENAI)
) {
@@ -1054,8 +1053,7 @@ export function initRossMods() {
$('#send_textarea').trigger('focus');
reasoningMesDone.trigger('click');
return;
}
else if (is_send_press == false) {
} else if (is_send_press == false) {
const skipConfirmKey = 'RegenerateWithCtrlEnter';
const skipConfirm = accountStorage.getItem(skipConfirmKey) === 'true';
function doRegenerate() {
@@ -1228,6 +1226,16 @@ export function initRossMods() {
return;
}
if ($('#logprobsViewer').is(':visible')) {
$('#logprobsViewerClose').trigger('click');
return;
}
if ($('#cfgConfig').is(':visible')) {
$('#CFGClose').trigger('click');
return;
}
if ($('#floatingPrompt').is(':visible')) {
$('#ANClose').trigger('click');
return;
@@ -1238,22 +1246,13 @@ export function initRossMods() {
return;
}
if ($('#cfgConfig').is(':visible')) {
$('#CFGClose').trigger('click');
return;
}
if ($('#logprobsViewer').is(':visible')) {
$('#logprobsViewerClose').trigger('click');
return;
}
$('#movingDivs > div').each(function () {
if ($(this).is(':visible')) {
$('#movingDivs > div .floating_panel_close').trigger('click');
const movingDivs = $('#movingDivs > div').toArray().reverse();
for (const div of movingDivs) {
if ($(div).is(':visible')) {
$(div).find('.floating_panel_close, .dragClose').trigger('click');
return;
}
});
}
if ($('#left-nav-panel').is(':visible') &&
$(LPanelPin).prop('checked') === false) {
@@ -1274,8 +1273,6 @@ export function initRossMods() {
}
if (event.ctrlKey && /^[1-9]$/.test(event.key)) {
// This will eventually be to trigger quick replies
// event.preventDefault();
@@ -0,0 +1,355 @@
import { ActionLoaderToastMode, getActiveLoaderHandles, getLoaderHandleById, hideActionLoader, showActionLoader } from './action-loader.js';
import { t } from './i18n.js';
import { SlashCommand } from './slash-commands/SlashCommand.js';
import { SlashCommandNamedArgument, ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashCommandArgument.js';
import { SlashCommandClosure } from './slash-commands/SlashCommandClosure.js';
import { commonEnumProviders, enumIcons } from './slash-commands/SlashCommandCommonEnumsProvider.js';
import { SlashCommandEnumValue, enumTypes } from './slash-commands/SlashCommandEnumValue.js';
import { SlashCommandParser } from './slash-commands/SlashCommandParser.js';
import { isFalseBoolean } from './utils.js';
/**
* Registers slash commands for the action loader module.
*/
export function registerActionLoaderSlashCommands() {
/**
* Helper to create a closure-based handler from a SlashCommandClosure argument.
* Allows all possible slash command arg types to be passed in, but only closure is accepted.
* @param {string | SlashCommandClosure | (string | SlashCommandClosure)[]} closure - The closure argument
* @param {Object} options - Configuration options
* @param {string} [options.argName='onStop'] - Name of the argument for error messages
* @param {boolean} [options.throwInvalid=true] - Whether to throw an error for invalid input
* @returns {(() => Promise<void>)|null} The handler function, or null if no closure
*/
function createClosureHandler(closure, { argName = 'onStop', throwInvalid = true } = {}) {
if (!(closure instanceof SlashCommandClosure)) {
if (closure && throwInvalid) {
// Throw error on purpose. This is defined as a syntax error.
throw new Error(t`Invalid argument for ${argName} provided. This is not a closure.`);
}
return null;
}
return async () => {
try {
const localClosure = closure.getCopy();
localClosure.onProgress = () => { };
await localClosure.execute();
} catch (e) {
console.error('Error executing closure handler', e);
}
};
}
// Shared loader enum providers
const loaderEnumProviders = {
toastModeEnumProvider: () => [
new SlashCommandEnumValue(ActionLoaderToastMode.NONE, 'No toast displayed', enumTypes.enum, enumIcons.disabled),
new SlashCommandEnumValue(ActionLoaderToastMode.STATIC, 'Static toast without stop button', enumTypes.enum, enumIcons.spinner),
new SlashCommandEnumValue(ActionLoaderToastMode.STOPPABLE, 'Toast with stop button (default)', enumTypes.enum, enumIcons.stop),
],
loaderHandleProvider: () => getActiveLoaderHandles().map(
handle => new SlashCommandEnumValue(handle.id, `Active loader: ${handle.id}`, enumTypes.enum, enumIcons.spinner),
).concat(
new SlashCommandEnumValue('Temporary loader handle', 'Any loader handle saved in variables or similar', 'enum', '📄', () => true, () => ''),
),
};
// /loader-wrap command - wraps a closure with loader display
SlashCommandParser.addCommandObject(SlashCommand.fromProps({
name: 'loader-wrap',
returns: 'result of the closure execution',
helpString: `
<div>
Wraps a closure execution with an action loader overlay and optional toast notification.
By default, the loader blocks UI interaction until the closure completes.
Multiple loaders can be stacked - each gets its own toast, but the overlay stays single.
</div>
<div>
<strong>Toast modes:</strong>
<ul>
<li><code>stoppable</code> - Shows toast with a stop button (default)</li>
<li><code>static</code> - Shows toast without stop button</li>
<li><code>none</code> - No toast, only loader overlay</li>
</ul>
</div>
<div>
Set <code>blocking=false</code> to show only a toast without blocking the UI.
Useful for background operations like image captioning or generation.
</div>
<div>
The default stop behavior is calling <code>stopGeneration()</code>.
If the wrapped action is doing something different than generating, a custom stop closure can be provided.
</div>
<div>
<strong>Examples:</strong>
<ul>
<li><pre><code class="language-stscript">/loader-wrap message="Generating summary..." {: /gen Summary of the last message | /echo Done :}</code></pre></li>
<li><pre><code class="language-stscript">/loader-wrap blocking=false message="Captioning..." {: /caption :}</code></pre></li>
<li><pre><code class="language-stscript">/loader-wrap toast=stoppable onStop={: /echo "Stopped by user" :} {: /delay 10000 :}</code></pre></li>
</ul>
</div>
`,
namedArgumentList: [
SlashCommandNamedArgument.fromProps({
name: 'blocking',
description: 'Whether to show blocking overlay. Set to false for non-blocking toast-only loaders.',
typeList: [ARGUMENT_TYPE.BOOLEAN],
defaultValue: 'true',
enumList: commonEnumProviders.boolean()(),
}),
SlashCommandNamedArgument.fromProps({
name: 'toast',
description: 'Toast display mode: stoppable (with stop button), static (no stop button), or none',
typeList: [ARGUMENT_TYPE.STRING],
defaultValue: ActionLoaderToastMode.STOPPABLE,
enumList: loaderEnumProviders.toastModeEnumProvider(),
}),
SlashCommandNamedArgument.fromProps({
name: 'message',
description: 'Message to display in the toast notification',
typeList: [ARGUMENT_TYPE.STRING],
defaultValue: 'Generating...',
}),
SlashCommandNamedArgument.fromProps({
name: 'title',
description: 'Optional title for the toast notification',
typeList: [ARGUMENT_TYPE.STRING],
}),
SlashCommandNamedArgument.fromProps({
name: 'stopTooltip',
description: 'Tooltip text for the stop button (only used when toast=stoppable)',
typeList: [ARGUMENT_TYPE.STRING],
defaultValue: 'Stop',
}),
SlashCommandNamedArgument.fromProps({
name: 'onStop',
description: 'Closure to execute when the stop button is clicked. If not provided, uses default stop behavior.',
typeList: [ARGUMENT_TYPE.CLOSURE],
}),
],
unnamedArgumentList: [
SlashCommandArgument.fromProps({
description: 'Closure to execute while the loader is displayed',
typeList: [ARGUMENT_TYPE.CLOSURE],
isRequired: true,
}),
],
callback: async (args, value) => {
if (!(value instanceof SlashCommandClosure)) {
// Throw error on purpose. This is defined as a syntax error.
throw new Error(t`Invalid argument for unnamed argument provided. This is not a closure.`);
}
const blocking = !isFalseBoolean(String(args.blocking));
const toastMode = Object.values(ActionLoaderToastMode).includes(String(args.toast))
? String(args.toast)
: ActionLoaderToastMode.STOPPABLE;
const message = String(args.message ?? t`Generating...`);
const title = args.title ? String(args.title) : '';
const stopTooltip = String(args.stopTooltip ?? t`Stop`);
const loader = showActionLoader({
blocking,
toastMode,
message,
title,
stopTooltip,
onStop: createClosureHandler(args.onStop),
});
try {
const closureCopy = value.getCopy();
const result = await closureCopy.execute();
return result.pipe;
} finally {
await loader.hide();
}
},
}));
// /loader-show command - manually show a loader, returns handle ID
SlashCommandParser.addCommandObject(SlashCommand.fromProps({
name: 'loader-show',
returns: 'loader handle ID (use with /loader-hide)',
helpString: `
<div>
Manually shows an action loader. Returns a handle ID that can be used with <code>/loader-hide</code> to hide it.
Use this for fine-grained control when you need to show/hide the loader at specific points.
Multiple loaders can be stacked - each gets its own toast, but the overlay stays single.
</div>
<div>
<strong>Toast modes:</strong>
<ul>
<li><code>stoppable</code> - Shows toast with a stop button (default)</li>
<li><code>static</code> - Shows toast without stop button</li>
<li><code>none</code> - No toast, only loader overlay</li>
</ul>
</div>
<div>
Set <code>blocking=false</code> to show only a toast without blocking the UI.
Useful for background operations like image captioning or generation.
</div>
<div>
The default stop behavior is calling <code>stopGeneration()</code>.
If the wrapped action is doing something different than generating, a custom stop closure can be provided.
</div>
<div>
<strong>Example:</strong>
<pre>
<code class="language-stscript">
/loader-show message="Loading..." |
/setvar key=myLoader |
/some-operation |
/loader-hide handle={{getvar::myLoader}}
</code>
</pre>
</div>
`,
namedArgumentList: [
SlashCommandNamedArgument.fromProps({
name: 'blocking',
description: 'Whether to show blocking overlay. Set to false for non-blocking toast-only loaders.',
typeList: [ARGUMENT_TYPE.BOOLEAN],
defaultValue: 'true',
enumList: commonEnumProviders.boolean()(),
}),
SlashCommandNamedArgument.fromProps({
name: 'toast',
description: 'Toast display mode: stoppable (with stop button), static (no stop button), or none',
typeList: [ARGUMENT_TYPE.STRING],
defaultValue: ActionLoaderToastMode.STOPPABLE,
enumList: loaderEnumProviders.toastModeEnumProvider(),
}),
SlashCommandNamedArgument.fromProps({
name: 'message',
description: 'Message to display in the toast notification',
typeList: [ARGUMENT_TYPE.STRING],
defaultValue: 'Generating...',
}),
SlashCommandNamedArgument.fromProps({
name: 'title',
description: 'Optional title for the toast notification',
typeList: [ARGUMENT_TYPE.STRING],
}),
SlashCommandNamedArgument.fromProps({
name: 'stopTooltip',
description: 'Tooltip text for the stop button (only used when toast=stoppable)',
typeList: [ARGUMENT_TYPE.STRING],
defaultValue: 'Stop',
}),
SlashCommandNamedArgument.fromProps({
name: 'onStop',
description: 'Closure to execute when the stop button is clicked',
typeList: [ARGUMENT_TYPE.CLOSURE],
}),
SlashCommandNamedArgument.fromProps({
name: 'onHide',
description: 'Closure to execute when the loader is hidden (not stopped)',
typeList: [ARGUMENT_TYPE.CLOSURE],
}),
],
unnamedArgumentList: [],
callback: async (args) => {
const blocking = !isFalseBoolean(String(args.blocking));
const toastMode = Object.values(ActionLoaderToastMode).includes(String(args.toast))
? String(args.toast)
: ActionLoaderToastMode.STOPPABLE;
const message = String(args.message ?? t`Generating...`);
const title = args.title ? String(args.title) : '';
const stopTooltip = String(args.stopTooltip ?? t`Stop`);
const handle = showActionLoader({
blocking,
toastMode,
message,
title,
stopTooltip,
onStop: createClosureHandler(args.onStop),
onHide: createClosureHandler(args.onHide, { argName: 'onHide' }),
});
return handle.id;
},
}));
// /loader-hide command - manually hide a loader by handle ID
SlashCommandParser.addCommandObject(SlashCommand.fromProps({
name: 'loader-hide',
returns: 'true if an active loader was hidden, otherwise false',
helpString: `
<div>
Hides an action loader that was shown with <code>/loader-show</code>.
If no handle is provided, hides <strong>all</strong> active loaders.
</div>
<div>
<strong>Example:</strong>
<pre><code class="language-stscript">/loader-hide handle={{getvar::myLoader}}</code></pre>
</div>
`,
namedArgumentList: [
SlashCommandNamedArgument.fromProps({
name: 'handle',
description: 'Loader handle ID returned by /loader-show. If not provided, hides all active loaders.',
typeList: [ARGUMENT_TYPE.STRING],
enumProvider: loaderEnumProviders.loaderHandleProvider,
}),
],
callback: async (args) => {
const handleId = args.handle ? String(args.handle) : null;
if (handleId) {
const handle = getLoaderHandleById(handleId);
if (handle && handle.isActive) {
await handle.hide();
return 'true';
}
return 'false';
}
// No handle provided - hide all active loaders
const result = await hideActionLoader();
return result ? 'true' : 'false';
},
}));
// /loader-stop command - trigger the stop action on a loader
SlashCommandParser.addCommandObject(SlashCommand.fromProps({
name: 'loader-stop',
returns: 'true if an active loader was stopped, otherwise false',
helpString: `
<div>
Triggers the stop action on a specific action loader, as if the user clicked the stop button.
Unlike <code>/loader-hide</code>, this command requires a handle - you must specify which loader to stop.
</div>
<div>
<strong>Example:</strong>
<pre><code class="language-stscript">/loader-stop handle={{getvar::myLoader}}</code></pre>
</div>
`,
namedArgumentList: [
SlashCommandNamedArgument.fromProps({
name: 'handle',
description: 'Loader handle ID returned by /loader-show.',
typeList: [ARGUMENT_TYPE.STRING],
isRequired: true,
enumProvider: loaderEnumProviders.loaderHandleProvider,
}),
],
callback: async (args) => {
const handleId = args.handle ? String(args.handle) : null;
if (!handleId) {
toastr.warning(t`No handle provided. You must specify which loader to stop.`);
return 'false';
}
const handle = getLoaderHandleById(handleId);
if (handle && handle.isActive) {
await handle.stop();
return 'true';
}
return 'false';
},
}));
}
+572
View File
@@ -0,0 +1,572 @@
/**
* Unified action loader system - shows loader overlay with optional toast notifications.
* Designed to be flexible and reusable for various long-running operations.
*
* Features:
* - Stacking multiple loaders - overlay stays single, but toasts can stack
* - Blocking and non-blocking modes
* - Stoppable or static toasts
* - Class-based handle system for fine-grained control
*
* @module action-loader
*/
import { t } from './i18n.js';
import { stopGeneration } from '../script.js';
import { Popup, POPUP_RESULT, POPUP_TYPE } from './popup.js';
/**
* Enum representing the toast display mode for the action loader.
* @readonly
* @enum {string}
*/
export const ActionLoaderToastMode = {
/** No toast is displayed */
NONE: 'none',
/** Toast is displayed without stop button (non-interactable) */
STATIC: 'static',
/** Toast is displayed with stop button (default) */
STOPPABLE: 'stoppable',
};
/**
* @typedef {object} ActionLoaderOptions
* @property {boolean} [blocking=true] - Whether to show the blocking overlay. Set to false for non-blocking toast-only loaders.
* @property {ActionLoaderToastMode} [toastMode='stoppable'] - Toast display mode
* @property {string} [message='Generating...'] - The message to display in the toast
* @property {string} [title] - Optional title for the toast notification
* @property {string} [stopTooltip='Stop'] - Tooltip text for the stop button
* @property {HTMLElement|string|null} [overlayContent=null] - Custom content for the overlay (replaces default spinner)
* @property {(() => void)|null} [onStop=null] - Custom stop handler. If null, calls `stopGeneration()`
* @property {(() => void)|null} [onHide=null] - Custom hide handler. Called when the loader is hidden (not stopped).
*/
/** Counter for generating unique loader IDs */
let loaderIdCounter = 0;
/** @type {Set<ActionLoaderHandle>} Set of all active loader handles */
const activeHandles = new Set();
/**
* Generates a unique loader ID.
* @returns {string} Unique loader ID
*/
function generateLoaderId() {
return `loader_${++loaderIdCounter}`;
}
/**
* Checks if there are any active blocking loaders.
* @returns {boolean} True if at least one blocking loader is active
*/
function hasBlockingLoaders() {
for (const handle of activeHandles) {
if (handle.isBlocking && handle.isActive) {
return true;
}
}
return false;
}
/**
* Class representing an action loader handle.
* Manages its own toast, stop handler, and lifecycle.
*/
export class ActionLoaderHandle {
/** @type {string} Unique identifier for this handle */
id;
/** @type {JQuery<HTMLElement>|null} The toast element for this loader */
#toast = null;
/** @type {(() => void)|null} Custom stop handler */
#onStop = null;
/** @type {(() => void)|null} Custom hide handler */
#onHide = null;
/** @type {boolean} Whether this loader blocks the UI with an overlay */
#blocking = true;
/** @type {boolean} Whether this handle has been disposed */
#disposed = false;
/**
* Creates a new ActionLoaderHandle.
* @param {object} options - Configuration options
* @param {boolean} [options.blocking=true] - Whether to show blocking overlay
* @param {ActionLoaderToastMode} [options.toastMode] - Toast display mode
* @param {string} [options.message='Generating...'] - Message to display in the toast
* @param {string} [options.title] - Title for the toast notification
* @param {string} [options.stopTooltip='Stop'] - Tooltip for the stop button
* @param {HTMLElement|string|null} [options.overlayContent] - Custom content for the overlay (replaces default spinner)
* @param {(() => void)|null} [options.onStop] - Custom stop handler
* @param {(() => void)|null} [options.onHide] - Custom hide handler
*/
constructor({
blocking = true,
toastMode = ActionLoaderToastMode.STOPPABLE,
message = t`Generating...`,
title = '',
stopTooltip = t`Stop`,
overlayContent = null,
onStop = null,
onHide = null,
} = {}) {
this.id = generateLoaderId();
this.#blocking = blocking;
this.#onStop = onStop;
this.#onHide = onHide;
// Warn if non-blocking loader has no toast - it won't be visible to the user
if (!blocking && toastMode === ActionLoaderToastMode.NONE && !overlayContent) {
console.warn('[ActionLoader] Non-blocking loader created without a toast. This loader will not be visible to the user.');
}
// Show the blocking loader overlay if this is the first blocking handle
if (blocking && !hasBlockingLoaders() && !isOverlayDisplayed()) {
showOverlay(overlayContent);
}
// Register this handle
activeHandles.add(this);
// Create toast if needed
if (toastMode !== ActionLoaderToastMode.NONE) {
this.#createToast(message, title, toastMode, stopTooltip);
}
}
/**
* Creates the toast element for this loader.
* @param {string} message - Message to display
* @param {string} title - Title for the toast
* @param {ActionLoaderToastMode} toastMode - Toast mode
* @param {string} stopTooltip - Tooltip for stop button
*/
#createToast(message, title, toastMode, stopTooltip) {
const toastContent = document.createElement('div');
toastContent.className = 'action-loader-toast';
const messageSpan = document.createElement('span');
messageSpan.className = 'action-loader-message';
messageSpan.textContent = message;
toastContent.appendChild(messageSpan);
// Add stop button if mode is STOPPABLE
if (toastMode === ActionLoaderToastMode.STOPPABLE) {
const stopButton = document.createElement('i');
stopButton.className = 'fa-solid fa-stop-circle action-loader-stop interactable';
stopButton.title = stopTooltip;
stopButton.addEventListener('click', (e) => {
e.preventDefault();
e.stopPropagation();
this.stop();
});
toastContent.appendChild(stopButton);
}
// Show toast with no timeout (sticky)
this.#toast = toastr.info($(toastContent), title, {
timeOut: 0,
extendedTimeOut: 0,
tapToDismiss: false,
escapeHtml: false,
});
}
/**
* Clears the toast element for this loader.
*/
#clearToast() {
if (this.#toast) {
toastr.clear(this.#toast, { force: true }); // Need to force as the toast might have focus/hover
this.#toast = null;
}
}
/**
* Disposes this handle, removing it from active handles and hiding overlay if last.
*/
async #dispose() {
if (this.#disposed) return;
this.#disposed = true;
this.#clearToast();
activeHandles.delete(this);
// Hide the overlay if this was the last blocking handle
if (this.#blocking && !hasBlockingLoaders()) {
await hideOverlay();
}
}
/**
* Whether this handle is still active (not disposed).
* @returns {boolean}
*/
get isActive() {
return !this.#disposed;
}
/**
* Whether this loader blocks the UI with an overlay.
* @returns {boolean}
*/
get isBlocking() {
return this.#blocking;
}
/**
* Triggers the stop action on this loader.
* Calls the custom onStop handler if provided, otherwise calls stopGeneration().
* Then hides this loader.
*/
async stop() {
if (this.#disposed) return;
// Call custom stop handler or default
if (this.#onStop) {
try {
await this.#onStop();
} catch (e) {
console.error('Error executing onStop handler', e);
}
} else {
stopGeneration();
}
// Dispose without calling onHide (stop is different from hide)
await this.#dispose();
}
/**
* Hides this loader and clears its toast.
* Calls the custom onHide handler if provided.
*/
async hide() {
if (this.#disposed) return;
// Call custom hide handler if provided
if (this.#onHide) {
try {
await this.#onHide();
} catch (e) {
console.error('Error executing onHide handler', e);
}
}
await this.#dispose();
}
}
/**
* Action loader utility API.
* Provides a convenient interface for showing and managing loading indicators.
*
* Read the functions documentation for more details.
*
* @example
* // Basic usage
* const handle = loader.show({ message: 'Loading...' });
* await someOperation();
* handle.hide();
*
* @example
* // Non-blocking background task
* const handle = loader.show({ blocking: false, message: 'Processing...' });
*
* @example
* // Hide all active loaders
* loader.hide();
*/
export const loader = {
/**
* Shows an action loader with optional toast notification.
* Returns a handle to control the loader.
* @type {typeof showActionLoader}
*/
show: showActionLoader,
/**
* Hides a specific loader by handle, or all loaders if no handle provided.
* @type {typeof hideActionLoader}
*/
hide: hideActionLoader,
/**
* Gets all currently active loader handles.
* @type {typeof getActiveLoaderHandles}
*/
active: getActiveLoaderHandles,
/**
* Gets a loader handle by its ID.
* @type {typeof getLoaderHandleById}
*/
get: getLoaderHandleById,
/**
* Checks if any blocking loader overlay is currently displayed.
* @returns {boolean} True if a blocking overlay is shown
*/
isBlocking: isOverlayDisplayed,
/**
* Toast display mode constants.
* @type {typeof ActionLoaderToastMode}
*/
ToastMode: ActionLoaderToastMode,
/**
* The ActionLoaderHandle class.
* @type {typeof ActionLoaderHandle}
*/
Handle: ActionLoaderHandle,
/**
* Creates a fresh default loader overlay element.
* @type {typeof createDefaultLoaderOverlay}
*/
createOverlay: createDefaultLoaderOverlay,
};
/**
* Shows an action loader with an optional stoppable toast notification.
* Multiple loaders can be stacked - the overlay stays single, but each gets its own toast.
* When the last loader is hidden, the overlay is removed.
*
* With default arguments, will function as a generation loader / wrapper.
*
* @param {ActionLoaderOptions} [options={}] - Configuration options
* @returns {ActionLoaderHandle} Handle to control the loader
*
* @example
* // Basic usage
* const loader = showActionLoader({ message: 'Generating title...' });
* try {
* const result = await generateRaw({ prompt });
* // process result
* } finally {
* await loader.hide();
* }
*
* @example
* // With custom stop and hide handlers
* const loader = showActionLoader({
* message: 'Downloading...',
* stopTooltip: 'Cancel download',
* onStop: () => myCustomCancelFunction(),
* onHide: () => console.log('Loader hidden'),
* });
*
* @example
* // Stacking multiple loaders
* const loader1 = showActionLoader({ message: 'Task 1...' });
* const loader2 = showActionLoader({ message: 'Task 2...' });
* await loader1.hide(); // Overlay stays, loader2 still active
* await loader2.hide(); // Now overlay hides
*
* @example
* // Non-blocking loader (toast only, no overlay)
* const loader = showActionLoader({
* message: 'Captioning image...',
* blocking: false,
* onStop: () => abortCaptioning(),
* });
*/
export function showActionLoader(options = {}) {
return new ActionLoaderHandle(options);
}
/**
* Hides a specific action loader by handle, or all active loaders if no handle provided.
* @param {ActionLoaderHandle|null} [handle=null] - Specific handle to hide, or undefined to hide all
* @returns {Promise<boolean>} Whether any loader was hidden
*/
export async function hideActionLoader(handle = null) {
if (handle instanceof ActionLoaderHandle) {
if (handle.isActive) {
await handle.hide();
return true;
}
return false;
}
// No handle provided - hide all active loaders
const handles = getActiveLoaderHandles();
for (const h of handles) {
await h.hide();
}
return handles.length > 0;
}
/**
* Gets all currently active loader handles.
* @returns {ActionLoaderHandle[]} Array of active handles
*/
export function getActiveLoaderHandles() {
return Array.from(activeHandles);
}
/**
* Gets a loader handle by its ID.
* @param {string} id - The handle ID
* @returns {ActionLoaderHandle|undefined} The handle, or undefined if not found
*/
export function getLoaderHandleById(id) {
for (const handle of activeHandles) {
if (handle.id === id) {
return handle;
}
}
return undefined;
}
// ============================================================================
// Internal overlay management
// ============================================================================
/** @type {Popup|null} The current loader overlay popup */
let loaderPopup = null;
/** Whether the initial HTML preloader has been removed */
let preloaderYoinked = false;
/**
* Creates the default loader overlay element.
* Always returns a fresh element instance.
*
* @returns {HTMLDivElement} A new loader overlay element
*/
export function createDefaultLoaderOverlay() {
const loaderElement = document.createElement('div');
loaderElement.id = 'loader';
const spinnerElement = document.createElement('div');
spinnerElement.id = 'load-spinner';
spinnerElement.className = 'fa-solid fa-gear fa-spin fa-3x';
loaderElement.appendChild(spinnerElement);
return loaderElement;
}
/**
* Normalizes custom overlay content into a value supported by Popup.
* @param {string|HTMLElement|null} customContent - Custom overlay content
* @returns {string|HTMLElement} Content for Popup
*/
function getOverlayContent(customContent) {
if (typeof customContent === 'string') {
return customContent;
}
if (customContent instanceof HTMLElement) {
return customContent;
}
return createDefaultLoaderOverlay();
}
/**
* Checks if the loader overlay is currently displayed.
* @returns {boolean} True if overlay is shown
*/
function isOverlayDisplayed() {
return !!loaderPopup;
}
/**
* Shows the blocking loader overlay.
* Internal function - use showActionLoader() instead.
* @param {HTMLElement|string|null} [customContent] - Custom content for the overlay
*/
function showOverlay(customContent = null) {
// Two loaders don't make sense. Don't await, we can overlay the old loader while it closes
if (loaderPopup) loaderPopup.complete(POPUP_RESULT.CANCELLED);
const content = getOverlayContent(customContent);
loaderPopup = new Popup(content, POPUP_TYPE.DISPLAY, null, {
allowEscapeClose: false,
transparent: true,
animation: 'none',
wide: true,
large: true,
});
// No close button, loaders are not closable
loaderPopup.closeButton.style.display = 'none';
loaderPopup.show();
}
/**
* Hides the blocking loader overlay with animation.
* Internal function - use hideActionLoader() instead.
* @returns {Promise<void>}
*/
async function hideOverlay() {
if (!loaderPopup) {
return Promise.resolve();
}
return new Promise((resolve) => {
const loaderElement = $('#loader');
const spinner = $('#load-spinner');
if (!loaderElement.length) {
console.warn('Loader element not found, skipping animation');
cleanup();
return;
}
// Check if transitions are enabled on spinner (which has the transition property)
const transitionDuration = spinner.length && spinner[0] ? getComputedStyle(spinner[0]).transitionDuration : '0s';
const hasTransitions = parseFloat(transitionDuration) > 0;
if (hasTransitions) {
Promise.race([
new Promise((r) => setTimeout(r, 500)), // Fallback timeout
new Promise((r) => loaderElement.one('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', r)),
]).finally(cleanup);
} else {
cleanup();
}
function cleanup() {
loaderElement.remove();
// Yoink preloader entirely; it only exists to cover up unstyled content while loading JS
// If it's present, we remove it once and then it's gone.
yoinkPreloader();
loaderPopup.complete(POPUP_RESULT.AFFIRMATIVE)
.catch((err) => console.error('Error completing loaderPopup:', err))
.finally(() => {
loaderPopup = null;
resolve();
});
}
// Apply the blur styles to the entire loader element
loaderElement.css({
'filter': 'blur(15px)',
'opacity': '0',
});
});
}
/**
* Removes the initial HTML preloader element.
* Called once after the first loader hide.
*/
function yoinkPreloader() {
if (preloaderYoinked) return;
document.getElementById('preloader')?.remove();
preloaderYoinked = true;
}
// ============================================================================
// End internal overlay management
// ============================================================================
+2 -4
View File
@@ -231,11 +231,9 @@ function onExtensionFloatingCharaPromptInput() {
!existingCharaNote.useChara
) {
extension_settings.note.chara.splice(existingCharaNoteIndex, 1);
}
else if (extension_settings.note.chara && existingCharaNote) {
} else if (extension_settings.note.chara && existingCharaNote) {
Object.assign(existingCharaNote, tempCharaNote);
}
else if (avatarName && tempPrompt.length > 0) {
} else if (avatarName && tempPrompt.length > 0) {
if (!extension_settings.note.chara) {
extension_settings.note.chara = [];
}
@@ -80,8 +80,6 @@ export class AutoComplete {
}
/**
* @param {HTMLTextAreaElement|HTMLInputElement} textarea The textarea to receive autocomplete.
* @param {() => boolean} checkIfActivate Function should return true only if under the current conditions, autocomplete should display (e.g., for slash commands: autoComplete.text[0] == '/')
@@ -414,7 +412,6 @@ export class AutoComplete {
});
if (this.isForceHidden) {
// hidden with escape
return this.hide();
@@ -465,7 +462,6 @@ export class AutoComplete {
}
/**
* Create updated DOM.
*/
@@ -514,7 +510,6 @@ export class AutoComplete {
}
/**
* Update position of DOM.
*/
@@ -1,6 +1,3 @@
export class AutoCompleteFuzzyScore {
/**@type {number}*/ start;
/**@type {number}*/ longestConsecutive;
@@ -2,7 +2,6 @@ import { AutoCompleteNameResultBase } from './AutoCompleteNameResultBase.js';
import { AutoCompleteSecondaryNameResult } from './AutoCompleteSecondaryNameResult.js';
export class AutoCompleteNameResult extends AutoCompleteNameResultBase {
/**
*
@@ -1,14 +1,13 @@
import { AutoCompleteOption } from './AutoCompleteOption.js';
export class AutoCompleteNameResultBase {
/**@type {string} */ name;
/**@type {number} */ start;
/**@type {AutoCompleteOption[]} */ optionList = [];
/**@type {boolean} */ canBeQuoted = false;
/**@type {()=>string} */ makeNoMatchText = ()=>`No matches found for "${this.name}"`;
/**@type {()=>string} */ makeNoOptionsText = ()=>'No options';
/**@type {()=>string} */ makeNoMatchText = () => `No matches found for "${this.name}"`;
/**@type {()=>string} */ makeNoOptionsText = () => 'No options';
/**
@@ -1,7 +1,6 @@
import { AutoCompleteFuzzyScore } from './AutoCompleteFuzzyScore.js';
export class AutoCompleteOption {
/** @type {string} */ name;
/** @type {string} */ typeIcon;
@@ -72,7 +71,7 @@ export class AutoCompleteOption {
name.classList.add('name');
name.classList.add('monospace');
name.textContent = noSlash ? '' : '/';
key.split('').forEach(char=>{
key.split('').forEach(char => {
const span = document.createElement('span'); {
span.textContent = char;
name.append(span);
File diff suppressed because it is too large Load Diff
+58 -16
View File
@@ -2,6 +2,7 @@ import {
characters,
saveChat,
system_message_types,
syncSwipeToMes,
this_chid,
openCharacterChat,
chat_metadata,
@@ -25,7 +26,7 @@ import {
saveGroupBookmarkChat,
selected_group,
} from './group-chats.js';
import { hideLoader, showLoader } from './loader.js';
import { loader } from './action-loader.js';
import { getLastMessageId } from './macros.js';
import { Popup } from './popup.js';
import { SlashCommand } from './slash-commands/SlashCommand.js';
@@ -34,6 +35,7 @@ import { commonEnumProviders } from './slash-commands/SlashCommandCommonEnumsPro
import { SlashCommandParser } from './slash-commands/SlashCommandParser.js';
import { createTagMapFromList } from './tags.js';
import { renderTemplateAsync } from './templates.js';
import { compressRequest } from './request-compression.js';
import { t } from './i18n.js';
import {
@@ -111,12 +113,10 @@ function getMainChatName() {
if (chat_metadata) {
if (chat_metadata.main_chat) {
return chat_metadata.main_chat;
}
// groups didn't support bookmarks before chat metadata was introduced
else if (selected_group) {
} else if (selected_group) {
// groups didn't support bookmarks before chat metadata was introduced
return null;
}
else if (characters[this_chid].chat && characters[this_chid].chat.includes(bookmarkNameToken)) {
} else if (characters[this_chid].chat && characters[this_chid].chat.includes(bookmarkNameToken)) {
const tokenIndex = characters[this_chid].chat.lastIndexOf(bookmarkNameToken);
chat_metadata.main_chat = characters[this_chid].chat.substring(0, tokenIndex).trim();
return chat_metadata.main_chat;
@@ -146,8 +146,7 @@ export function showBookmarksButtons() {
$('#option_back_to_main').hide();
$('#option_new_bookmark').show();
}
}
catch {
} catch {
$('#option_back_to_main').hide();
$('#option_new_bookmark').hide();
$('#option_convert_to_group').hide();
@@ -163,8 +162,28 @@ async function saveBookmarkMenu() {
return await createNewBookmark(chat.length - 1);
}
/**
* Builds the branch chat snapshot, optionally selecting a specific swipe for the target message.
* @param {number} mesId
* @param {{swipeId?: number|null}} [options={}]
* @returns {ChatMessage[]|null}
*/
function getBranchChatSnapshot(mesId, { swipeId = null } = {}) {
const snapshot = structuredClone(chat.slice(0, Number(mesId) + 1));
if (swipeId === null) {
return snapshot;
}
if (!syncSwipeToMes(null, swipeId, snapshot[mesId])) {
return null;
}
return snapshot;
}
// Export is used by Timelines extension. Do not remove.
export async function createBranch(mesId) {
export async function createBranch(mesId, { swipeId = null } = {}) {
if (!chat.length) {
toastr.warning('The chat is empty.', 'Branch creation failed');
return;
@@ -178,6 +197,12 @@ export async function createBranch(mesId) {
const lastMes = chat[mesId];
const mainChatName = (getCurrentChatDetails()).sessionName;
const newMetadata = { main_chat: mainChatName };
const selectedSwipeId = swipeId === null ? null : Number(swipeId);
if (selectedSwipeId !== null && (!Number.isInteger(selectedSwipeId) || selectedSwipeId < 0 || selectedSwipeId >= (lastMes?.swipes?.length ?? 0))) {
toastr.warning('Invalid swipe ID.', 'Branch creation failed');
return;
}
function buildBranchName(name, i) {
// Strip off existing suffixes, then build new name
@@ -194,10 +219,16 @@ export async function createBranch(mesId) {
return;
}
const branchChatSnapshot = getBranchChatSnapshot(mesId, { swipeId: selectedSwipeId });
if (!branchChatSnapshot) {
toastr.warning('Could not prepare the selected swipe for branching.', 'Branch creation failed');
return;
}
if (selected_group) {
await saveGroupBookmarkChat(selected_group, name, newMetadata, mesId);
await saveGroupBookmarkChat(selected_group, name, newMetadata, mesId, branchChatSnapshot);
} else {
await saveChat({ chatName: name, withMetadata: newMetadata, mesId });
await saveChat({ chatName: name, withMetadata: newMetadata, mesId, chatData: branchChatSnapshot });
}
// append to branches list if it exists
// otherwise create it
@@ -389,11 +420,12 @@ export async function convertSoloToGroupChat() {
}
// Save group chat
const createChatResponse = await fetch('/api/chats/group/save', {
const createChatRequest = await compressRequest({
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify({ id: chatName, chat: [chatHeader, ...groupChat] }),
});
const createChatResponse = await fetch('/api/chats/group/save', createChatRequest);
if (!createChatResponse.ok) {
console.error('Group chat creation unsuccessful');
@@ -411,15 +443,20 @@ export async function convertSoloToGroupChat() {
/**
* Creates a new branch from the message with the given ID
* @param {number} mesId Message ID
* @param {{swipeId?: number|null}} [options={}] Branch options
* @returns {Promise<string?>} Branch file name
*/
export async function branchChat(mesId) {
export async function branchChat(mesId, { swipeId = null } = {}) {
if (this_chid === undefined && !selected_group) {
toastr.info('No character selected.', 'Create Branch');
return null;
}
const fileName = await createBranch(mesId);
const fileName = await createBranch(mesId, { swipeId });
if (!fileName) {
return null;
}
await saveItemizedPrompts(fileName);
if (selected_group) {
@@ -662,15 +699,20 @@ export function initBookmarks() {
return;
}
const loaderHandle = loader.show({
title: t`Chat History`,
message: t`Loading chat…`,
toastMode: loader.ToastMode.STATIC,
});
try {
showLoader();
if (selected_group) {
await openGroupChat(selected_group, fileName);
} else {
await openCharacterChat(fileName);
}
} finally {
await hideLoader();
await loaderHandle.hide();
}
$('#shadow_select_chat_popup').css('display', 'none');
+1 -1
View File
@@ -55,7 +55,7 @@ function onSelectAllButtonClick() {
if (!atLeastOneSelected) {
// If none was selected, trigger click on all to deselect all of them
for(const character of characters) {
for (const character of characters) {
const checked = $(character).find('.bulk_select_checkbox:checked') ?? false;
if (checked && character instanceof HTMLElement) {
characterGroupOverlay.toggleSingleCharacter(character);
-1
View File
@@ -150,7 +150,6 @@ function onCfgMenuItemClick() {
setTimeout(function () {
$('#cfgConfig').hide();
}, animation_duration);
}
//duplicate options menu close handler from script.js
//because this listener takes priority
+1 -1
View File
@@ -199,7 +199,7 @@ class BackupsBrowser {
const deleteButton = document.createElement('div');
deleteButton.classList.add('right_menu_button', 'fa-solid', 'fa-trash');
deleteButton.title = t`Delete backup`;
deleteButton.addEventListener('click',async () => {
deleteButton.addEventListener('click', async () => {
const isDeleted = await this.deleteBackup(backup.file_name);
if (isDeleted) {
listItem.remove();
+3 -6
View File
@@ -832,11 +832,9 @@ async function openExternalMediaOverridesDialog() {
if (power_user.external_media_allowed_overrides.includes(entityId)) {
template.find('#forbid_media_override_allowed').prop('checked', true);
}
else if (power_user.external_media_forbidden_overrides.includes(entityId)) {
} else if (power_user.external_media_forbidden_overrides.includes(entityId)) {
template.find('#forbid_media_override_forbidden').prop('checked', true);
}
else {
} else {
template.find('#forbid_media_override_global').prop('checked', true);
}
@@ -1678,8 +1676,7 @@ async function runScraper(scraperId, target, callback) {
toastr.success(t`Scraped ${files.length} files from ${scraperId} to ${target}.`, t`Data Bank`);
callback();
}
catch (error) {
} catch (error) {
console.error('Scraping failed', error);
toastr.error(t`Check browser console for details.`, t`Scraping failed`);
}
+2
View File
@@ -175,6 +175,8 @@ export const SWIPE_SOURCE = {
KEYBOARD: 'keyboard',
BACK: 'back',
AUTO_SWIPE: 'auto_swipe',
SLASH_COMMAND: 'slash_command',
SWIPE_PICKER: 'swipe_picker',
};
/**
+2 -2
View File
@@ -505,7 +505,7 @@ export class ChatCompletionService {
return async function* streamData() {
let text = '';
const swipes = [];
const state = { reasoning: '', image: '' };
const state = { reasoning: '', images: [], signature: '', toolSignatures: {} };
while (true) {
const { done, value } = await reader.read();
if (done) return;
@@ -591,7 +591,7 @@ export class ChatCompletionService {
}
// Ensure api-url is properly applied for all sources that accept it
['custom_url', 'vertexai_region', 'zai_endpoint'].forEach(field => {
['custom_url', 'vertexai_region', 'zai_endpoint', 'siliconflow_endpoint'].forEach(field => {
// The order is: connection profile => CC preset => CC settings
overridePayload[field] = overridePayload[field] || settings[field] || oai_settings[field];
});
-1
View File
@@ -251,7 +251,6 @@ class DataMaidDialog {
categoryElement.remove();
this.displayEmptyPlaceholder();
});
});
categoryElement.querySelectorAll('.dataMaidItemDelete').forEach(button => {
button.addEventListener('click', async () => {
+7 -2
View File
@@ -73,8 +73,7 @@ function applyDynamicFocusStyles(styleSheet, { fromExtension = false } = {}) {
const isHover = selector.includes(':hover'), isFocus = selector.includes(':focus');
if (isHover && isFocus) {
// We currently do nothing here. Rules containing both hover and focus are very specific and should never be automatically touched
}
else if (isHover) {
} else if (isHover) {
const baseSelector = selector.replace(/:hover/g, PLACEHOLDER).trim();
hoverRules.push({ baseSelector, rule, wrappers: [...wrappers] });
} else if (isFocus) {
@@ -127,6 +126,12 @@ function applyDynamicFocusStyles(styleSheet, { fromExtension = false } = {}) {
// If something like :focus-within or a more specific selector like `.blah:has(:focus-visible)` for elements inside,
// it should be manually defined in CSS.
const focusSelector = rule.selectorText.replace(/:hover/g, ':focus-visible');
// Skip pseudo-elements (::before, ::after, ::-webkit-scrollbar, etc.)
// as they cannot have :focus-visible appended (invalid CSS syntax)
if (focusSelector.includes('::')) {
return;
}
let focusRule = `${focusSelector} { ${rule.style.cssText} }`;
// Wrap the generated rule into the same @media/@supports/@container chain (if any)
+9
View File
@@ -50,6 +50,7 @@ export const event_types = {
FORCE_SET_BACKGROUND: 'force_set_background',
CHAT_DELETED: 'chat_deleted',
CHAT_CREATED: 'chat_created',
CHAT_RENAMED: 'chat_renamed',
GROUP_CHAT_DELETED: 'group_chat_deleted',
GROUP_CHAT_CREATED: 'group_chat_created',
GENERATE_BEFORE_COMBINE_PROMPTS: 'generate_before_combine_prompts',
@@ -96,6 +97,14 @@ export const event_types = {
WORLDINFO_ENTRIES_LOADED: 'worldinfo_entries_loaded',
WORLDINFO_SCAN_DONE: 'worldinfo_scan_done',
MEDIA_ATTACHMENT_DELETED: 'media_attachment_deleted',
PERSONA_CHANGED: 'persona_changed',
PERSONA_CREATED: 'persona_created',
PERSONA_UPDATED: 'persona_updated',
PERSONA_RENAMED: 'persona_renamed',
PERSONA_DELETED: 'persona_deleted',
TTS_JOB_STARTED: 'tts_job_started',
TTS_AUDIO_READY: 'tts_audio_ready',
TTS_JOB_COMPLETE: 'tts_job_complete',
};
export const eventSource = new EventEmitter([event_types.APP_READY, event_types.APP_INITIALIZED]);
+176 -15
View File
@@ -1,8 +1,7 @@
import { DOMPurify, Popper } from '../lib.js';
import { eventSource, event_types, saveSettings, saveSettingsDebounced, getRequestHeaders, animation_duration, CLIENT_VERSION } from '../script.js';
import { showLoader } from './loader.js';
import { POPUP_RESULT, POPUP_TYPE, Popup, callGenericPopup } from './popup.js';
import { POPUP_RESULT, POPUP_TYPE, Popup } from './popup.js';
import { renderTemplate, renderTemplateAsync } from './templates.js';
import { delay, equalsIgnoreCaseAndAccents, isSubsetOf, sanitizeSelector, setValueByPath, versionCompare } from './utils.js';
import { getContext } from './st-context.js';
@@ -278,12 +277,10 @@ async function discoverExtensions() {
if (response.ok) {
const extensions = await response.json();
return extensions;
}
else {
} else {
return [];
}
}
catch (err) {
} catch (err) {
console.error(err);
return [];
}
@@ -357,12 +354,99 @@ function onToggleAllExtensions(extensionsToToggle, toggleContainer) {
return extensionsToToggle;
}
/**
* Checks whether an extension has a specific hook defined in its manifest.
* @param {string} name Extension name (with or without 'third-party' prefix)
* @param {'install' | 'update' | 'delete' | 'clean' | 'enable' | 'disable' | 'activate'} hookName The hook to check
* @returns {boolean}
*/
function hasExtensionHook(name, hookName) {
const fullName = name.startsWith('third-party') ? name : `third-party${name}`;
const manifest = manifests[fullName];
if (!manifest || !manifest.hooks || typeof manifest.hooks !== 'object') {
return false;
}
const hookFunctionName = manifest.hooks[hookName];
return typeof hookFunctionName === 'string' && hookFunctionName.length > 0;
}
/**
* Calls a manifest hook for an extension.
* Hooks are optional function names exported from the extension's JS entry point module.
* The hook function can optionally return a Promise that will be awaited.
* @param {string} name Extension name
* @param {'install' | 'update' | 'delete' | 'clean' | 'enable' | 'disable' | 'activate'} hookName The hook to call
* @returns {Promise<void>}
*/
async function callExtensionHook(name, hookName) {
const manifest = manifests[name];
if (!manifest) {
console.debug(`callExtensionHook: Extension "${name}" has no manifest, skipping hook "${hookName}"`);
return;
}
if (!manifest.hooks || typeof manifest.hooks !== 'object') {
return;
}
if (!Object.hasOwn(manifest.hooks, hookName)) {
return;
}
const hookFunctionName = manifest.hooks[hookName];
if (typeof hookFunctionName !== 'string' || !hookFunctionName) {
console.warn(`callExtensionHook: Extension "${name}" hook "${hookName}" is not a valid string`);
return;
}
if (!manifest.js) {
console.warn(`callExtensionHook: Extension "${name}" has hook "${hookName}" but no JS entry point defined in manifest`);
return;
}
const url = `/scripts/extensions/${name}/${manifest.js}`;
console.debug(`callExtensionHook: Calling hook "${hookName}" (function "${hookFunctionName}") for extension "${name}"`);
try {
const module = await import(url);
if (typeof module[hookFunctionName] !== 'function') {
console.warn(`callExtensionHook: Extension "${name}" hook "${hookName}" references "${hookFunctionName}" which is not an exported function`);
return;
}
const hookCallResult = module[hookFunctionName]();
const HOOK_TIMEOUT = 5000;
const HOOK_RESULT = {
OK: 'ok',
TIMEOUT: 'timeout',
};
const result = await Promise.race([
(hookCallResult instanceof Promise ? hookCallResult : Promise.resolve(hookCallResult)).then(() => HOOK_RESULT.OK),
delay(HOOK_TIMEOUT).then(() => HOOK_RESULT.TIMEOUT),
]);
if (result === HOOK_RESULT.TIMEOUT) {
console.warn(`callExtensionHook: Hook "${hookName}" for extension "${name}" timed out after ${HOOK_TIMEOUT}ms`);
} else {
console.debug(`callExtensionHook: Hook "${hookName}" completed for extension "${name}"`);
}
} catch (error) {
console.error(`callExtensionHook: Error calling hook "${hookName}" for extension "${name}":`, error);
}
}
/**
* Enables an extension by name.
* @param {string} name Extension name
* @param {boolean} [reload=true] If true, reload the page after enabling the extension
*/
export async function enableExtension(name, reload = true) {
await callExtensionHook(name, 'enable');
extension_settings.disabledExtensions = extension_settings.disabledExtensions.filter(x => x !== name);
stateChanged = true;
await saveSettings();
@@ -379,6 +463,7 @@ export async function enableExtension(name, reload = true) {
* @param {boolean} [reload=true] If true, reload the page after disabling the extension
*/
export async function disableExtension(name, reload = true) {
await callExtensionHook(name, 'disable');
extension_settings.disabledExtensions.push(name);
stateChanged = true;
await saveSettings();
@@ -404,6 +489,21 @@ export function findExtension(name) {
return { name: internalExtensionName, enabled: isEnabled };
}
/**
* Returns a deep clone of the manifest for the given extension name.
* Accepts either the short name (e.g. `SillyTavern-MyExtension`) or the full internal key
* (e.g. `third-party/SillyTavern-MyExtension`). Returns null if the extension is not found.
* @param {string} name - Extension name or internal key
* @returns {object|null} Cloned manifest object, or null if not found
*/
export function getExtensionManifest(name) {
const found = extensionNames.find(extName =>
equalsIgnoreCaseAndAccents(extName, name) || equalsIgnoreCaseAndAccents(extName, `third-party/${name}`),
);
const manifest = found ? manifests[found] : null;
return manifest ? structuredClone(manifest) : null;
}
/**
* Loads manifest.json files for extensions.
* @param {string[]} names Array of extension names
@@ -507,7 +607,10 @@ async function activateExtensions() {
Promise.all([addExtensionScript(name, manifest), addExtensionStyle(name, manifest)]),
);
await promise
.then(() => activeExtensions.add(name))
.then(() => {
activeExtensions.add(name);
return callExtensionHook(name, 'activate');
})
.catch(err => {
console.log('Could not activate extension', name, err);
extensionLoadErrors.add(t`Extension "${displayName}" failed to load: ${err}`);
@@ -627,8 +730,7 @@ async function connectToApi(baseUrl) {
}
updateStatus(getExtensionsResult.ok);
}
catch {
} catch {
updateStatus(false);
}
}
@@ -793,6 +895,7 @@ function generateExtensionHtml(name, manifest, isActive, isDisabled, isExternal,
let updateButton = isExternal ? `<button class="btn_update menu_button displayNone" data-name="${externalId}" title="Update available"><i class="fa-solid fa-download fa-fw"></i></button>` : '';
let moveButton = isExternal && isUserAdmin ? `<button class="btn_move menu_button" data-name="${externalId}" data-i18n="[title]Move" title="Move"><i class="fa-solid fa-folder-tree fa-fw"></i></button>` : '';
let branchButton = isExternal && isUserAdmin ? `<button class="btn_branch menu_button" data-name="${externalId}" data-i18n="[title]Switch branch" title="Switch branch"><i class="fa-solid fa-code-branch fa-fw"></i></button>` : '';
let cleanButton = isExternal && hasExtensionHook(externalId, 'clean') ? `<button class="btn_clean menu_button" data-name="${externalId}" data-i18n="[title]Clean extension data" title="Clean extension data"><i class="fa-fw fa-solid fa-broom"></i></button>` : '';
let modulesInfo = '';
if (isActive && Array.isArray(manifest.optional)) {
@@ -833,6 +936,7 @@ function generateExtensionHtml(name, manifest, isActive, isDisabled, isExternal,
<div class="extension_actions flex-container alignItemsCenter">
${updateButton}
${cleanButton}
${branchButton}
${moveButton}
${deleteButton}
@@ -1086,7 +1190,6 @@ async function showExtensionsDetails() {
abortController.abort();
}
if (requiresReload) {
showLoader();
location.reload();
}
}
@@ -1150,6 +1253,8 @@ async function updateExtension(extensionName, quiet, timeout = null) {
toastr.success('Extension is already up to date');
}
} else {
const fullExtensionName = extensionName.startsWith('third-party') ? extensionName : `third-party${extensionName}`;
await callExtensionHook(fullExtensionName, 'update');
toastr.success(t`Extension ${extensionName} updated to ${data.shortCommitHash}`, t`Reload the page to apply updates`);
}
} catch (error) {
@@ -1162,6 +1267,7 @@ async function updateExtension(extensionName, quiet, timeout = null) {
* This function makes a POST request to '/api/extensions/delete' with the extension's name.
* If the extension is deleted, it displays a success message.
* Creates a popup for the user to confirm before delete.
* If the extension has a 'clean' hook, an optional checkbox to also run the cleanup is shown.
*/
async function onDeleteClick() {
const extensionName = $(this).data('name');
@@ -1172,13 +1278,50 @@ async function onDeleteClick() {
return;
}
// use callPopup to create a popup for the user to confirm before delete
const confirmation = await callGenericPopup(t`Are you sure you want to delete ${extensionName}?`, POPUP_TYPE.CONFIRM, '', {});
const hasCleanHook = hasExtensionHook(extensionName, 'clean');
/** @type {import('./popup.js').CustomPopupInput[]} */
const customInputs = hasCleanHook ? [{ id: 'extension_delete_cleanup', label: t`Also clean up extension data`, defaultState: false }] : null;
const popup = new Popup(t`Are you sure you want to delete ${extensionName}?`, POPUP_TYPE.CONFIRM, '', { customInputs });
const confirmation = await popup.show();
if (confirmation === POPUP_RESULT.AFFIRMATIVE) {
await deleteExtension(extensionName);
const shouldClean = hasCleanHook && Boolean(popup.inputResults?.get('extension_delete_cleanup'));
await deleteExtension(extensionName, shouldClean);
}
}
/**
* Handles the click event for the clean button of an extension.
* Runs the extension's 'clean' hook after user confirmation, then reloads the page.
*/
async function onCleanClick() {
const extensionName = $(this).data('name');
const confirmation = await Popup.show.confirm(t`Clean extension data`, t`Are you sure you want to clean up data for ${extensionName}? This action cannot be undone.`);
if (!confirmation) {
return;
}
await cleanExtension(extensionName);
}
/**
* Runs the 'clean' hook for an extension and reloads the page.
* @param {string} extensionName Extension name (without 'third-party' prefix)
* @returns {Promise<void>}
*/
async function cleanExtension(extensionName) {
const fullExtensionName = extensionName.startsWith('third-party') ? extensionName : `third-party${extensionName}`;
await callExtensionHook(fullExtensionName, 'clean');
// Clean might have updated settings, which could race with the page reload, so we'll force save here
await saveSettings();
toastr.success(t`Extension ${extensionName} data cleaned`);
delay(1000).then(() => location.reload());
}
async function onBranchClick() {
const extensionName = $(this).data('name');
const isCurrentUserAdmin = isAdmin();
@@ -1281,8 +1424,17 @@ async function moveExtension(extensionName, source, destination) {
/**
* Deletes an extension via the API.
* @param {string} extensionName Extension name to delete
* @param {boolean} [shouldClean=false] Whether to also run the 'clean' hook before deleting
*/
export async function deleteExtension(extensionName) {
export async function deleteExtension(extensionName, shouldClean = false) {
const fullExtensionName = extensionName.startsWith('third-party') ? extensionName : `third-party${extensionName}`;
if (shouldClean) {
await callExtensionHook(fullExtensionName, 'clean');
}
await callExtensionHook(fullExtensionName, 'delete');
try {
await fetch('/api/extensions/delete', {
method: 'POST',
@@ -1296,6 +1448,9 @@ export async function deleteExtension(extensionName) {
console.error('Error:', error);
}
// Delete or clean might have updated settings, which could race with the page reload, so we'll force save here
await saveSettings();
toastr.success(t`Extension ${extensionName} deleted`);
delay(1000).then(() => location.reload());
}
@@ -1390,7 +1545,7 @@ async function switchExtensionBranch(extensionName, isGlobal, branch) {
return;
}
toastr.success(t`Extension ${extensionName} switched to ${branch}`);
toastr.success(t`Extension ${extensionName} switched to ${branch}`, t`Reload the page to apply updates`);
await loadExtensionSettings({}, false, false);
void showExtensionsDetails();
} catch (error) {
@@ -1431,6 +1586,11 @@ export async function installExtension(url, global, branch = '') {
console.debug(`Extension "${response.display_name}" has been installed successfully at ${response.extensionPath}`);
await loadExtensionSettings({}, false, false);
await eventSource.emit(event_types.EXTENSION_SETTINGS_LOADED, response);
if (response.folderName) {
const extensionName = `third-party/${response.folderName}`;
await callExtensionHook(extensionName, 'install');
}
}
/**
@@ -1786,6 +1946,7 @@ export async function initExtensions() {
$(document).on('click', '.extensions_info .extension_block .toggle_enable', onEnableExtensionClick);
$(document).on('click', '.extensions_info .extension_block .btn_update', onUpdateClick);
$(document).on('click', '.extensions_info .extension_block .btn_delete', onDeleteClick);
$(document).on('click', '.extensions_info .extension_block .btn_clean', onCleanClick);
$(document).on('click', '.extensions_info .extension_block .btn_move', onMoveClick);
$(document).on('click', '.extensions_info .extension_block .btn_branch', onBranchClick);
+9 -16
View File
@@ -82,8 +82,7 @@ function getAuthorFromUrl(url) {
result.name = pathSegments[0];
result.url = `${parsedUrl.protocol}//${parsedUrl.hostname}/${result.name}`;
}
}
catch (error) {
} catch (error) {
console.debug(DEBUG_PREFIX, 'Error parsing URL:', error);
}
@@ -94,8 +93,7 @@ async function downloadAssetsList(url) {
updateCurrentAssets().then(async function () {
fetch(url, { cache: 'no-cache' })
.then(response => response.json())
.then(async function(json) {
.then(async function (json) {
availableAssets = {};
$('#assets_menu').empty();
@@ -200,8 +198,7 @@ async function downloadAssetsList(url) {
label.removeClass('fa-trash');
label.removeClass('redOverlayGlow');
});
}
else {
} else {
console.debug(DEBUG_PREFIX, 'not installed, unchecked');
element.prop('checked', false);
element.on('click', assetInstall);
@@ -347,8 +344,7 @@ async function installAsset(url, assetType, filename) {
console.debug(DEBUG_PREFIX, 'Character downloaded.');
}
}
}
catch (err) {
} catch (err) {
console.log(err);
return [];
}
@@ -374,8 +370,7 @@ async function deleteAsset(assetType, filename) {
if (result.ok) {
console.debug(DEBUG_PREFIX, 'Deletion success.');
}
}
catch (err) {
} catch (err) {
console.log(err);
return [];
}
@@ -428,8 +423,7 @@ async function updateCurrentAssets() {
headers: getRequestHeaders({ omitContentType: true }),
});
currentAssets = result.ok ? (await result.json()) : {};
}
catch (err) {
} catch (err) {
console.log(err);
}
console.debug(DEBUG_PREFIX, 'Current assets found:', currentAssets);
@@ -441,7 +435,7 @@ async function updateCurrentAssets() {
//#############################//
// This function is called when the extension is loaded
jQuery(async () => {
export async function init() {
// This is an example of loading HTML from a file
const windowTemplate = await renderExtensionTemplateAsync(MODULE_NAME, 'window', {});
const windowHtml = $(windowTemplate);
@@ -491,8 +485,7 @@ jQuery(async () => {
connectButton.addClass('fa-plug-circle-exclamation');
connectButton.removeClass('redOverlayGlow');
}
}
else {
} else {
console.debug(DEBUG_PREFIX, 'Connection refused by user');
}
});
@@ -503,4 +496,4 @@ jQuery(async () => {
eventSource.on(event_types.OPEN_CHARACTER_LIBRARY, async (forceDefault) => {
openCharacterBrowser(forceDefault);
});
});
}
@@ -7,5 +7,8 @@
"css": "style.css",
"author": "Keij#6799",
"version": "0.1.0",
"homePage": "https://github.com/SillyTavern/SillyTavern"
"homePage": "https://github.com/SillyTavern/SillyTavern",
"hooks": {
"activate": "init"
}
}
@@ -243,7 +243,7 @@ function handleCharacterRename(oldAvatar, newAvatar) {
}
}
jQuery(async () => {
export async function init() {
eventSource.on(event_types.APP_READY, cleanUpAttachments);
eventSource.on(event_types.CHARACTER_DELETED, cleanUpCharacterAttachments);
eventSource.on(event_types.CHARACTER_RENAMED, handleCharacterRename);
@@ -407,4 +407,4 @@ jQuery(async () => {
}),
],
}));
});
}

Some files were not shown because too many files have changed in this diff Show More