Compare commits

..
627 Commits
Author SHA1 Message Date
Wolfsblvt ad29cbda62 docs: route new provider contributions before implementation (#6099)
* docs: route new provider contributions before implementation

* docs: point provider PR authors to integration guide
2026-10-03 00:05:27 +02:00
EmandWolfsblvt bc81b9f7e3 Change API button warning from credit to charge (#6049)
* Change API button warning from credit to charge

Updated the warning message for the test API button to indicate a charge instead of a credit. (you are using tokens to send the message, the provider is not giving you tokens because you sent a test)

* fix: clarify test message usage charges

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
2026-09-23 23:19:13 +02:00
EmandWolfsblvt 8901f28b01 Fix typos in property descriptions in char-data.js (#6054)
* Fix typos in property descriptions in char-data.js

Wether → Whether x6

* docs: correct character description property text

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
2026-09-23 23:16:59 +02:00
Em 9758a6cd5e Fix typo in readme regarding open source status (#6047)
Corrected 'open sourced' to 'open source' for consistency.
2026-09-23 23:08:52 +02:00
Em ca7330f1af Fix typo in comment for tool calls (#6052)
assistent → assistant
2026-09-23 23:08:18 +02:00
Em a1c7f19bac Fix typo in comment (#6053)
posible  →  possible
2026-09-23 23:07:45 +02:00
Wolfsblvt e9860754ad feat: add GPT-6 Sol and Luna, Opus 5.5, and Gemini 3.8 Flash (#6070) 2026-09-23 21:59:01 +02:00
Wolfsblvt 7c39941963 Merge pull request #6038 from SillyTavern/release
Sync npm publishing workflow to staging.
2026-09-14 21:16:18 +02:00
Wolfsblvt 06bde939fb Fix npm release publishing workflow (#6037)
Allow npm releases to be retried from an existing release tag through the trusted publishing workflow, and scope the `allow-directory` workaround to the publish command.
2026-09-14 21:01:34 +02:00
Wolfsblvt 7e8663cd9c Merge pull request #6036 from SillyTavern/staging
1.19.0
2026-09-14 19:55:46 +02:00
Wolfsblvt 61139aa9b6 Update release version number (#6035) 2026-09-14 19:44:18 +02:00
Wolfsblvt 5e8d463ed4 feat: add Claude Fable 5.1 and GPT-6 Astra (#6015) 2026-09-14 19:03:39 +02:00
F.B. c0a417b240 Add image embed for DeepSeek V4 Flash Vision Exp (#5964) (#5996)
Add deepseek-v4-flash-vision-exp to image embed whitelist.
Block image embed in non `user` msg as DS doesn't allow this.
2026-09-07 23:09:17 +02:00
X00LAandClaude Sonnet 5 cc053e8356 Fix CORS proxy forwarding raw zstd-compressed bytes to the client (#6007)
undici (Node's fetch) transparently decompresses gzip, deflate, and br,
but not zstd. When a browser's full Accept-Encoding header is forwarded
as-is to the target origin, a Cloudflare-fronted server may respond
with zstd, and corsProxyMiddleware pipes those still-compressed bytes
straight through — the client receives garbage instead of the expected
body (e.g. "SyntaxError: Unexpected token" when parsing JSON).

Cap the outgoing Accept-Encoding to the encodings undici can actually
decode, so the target always responds with something we can forward
correctly.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 23:07:13 +02:00
Siyuan ChenandWolfsblvt d6b244cd25 Fix: Avoid cpSync crash when renaming characters (#6012)
* Fix: Avoid cpSync crash when renaming characters

Add a no-op filter to fs.cpSync during character renaming.

This avoids Node.js's native copyDir fast path, which can terminate
the process on Windows with affected Node.js versions instead of
throwing a catchable filesystem error.

Refs: https://github.com/nodejs/node/issues/63970

* docs: explain character rename copy workaround

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
2026-09-07 23:05:18 +02:00
voodoohop e7c4f8ee98 fix: resolve Pollinations TTS model aliases (#6010) 2026-09-07 23:03:43 +02:00
QiuLGandQiuLG a8f7e0d900 Fix Quick Reply overwrite cancellation (#6005)
Co-authored-by: QiuLG <195722592+QiuLsG@users.noreply.github.com>
2026-09-07 23:00:44 +02:00
saitewasreset 4613abc26e Google AI Studio: Fetch all model pages (#5954)
Paginate the Gemini models endpoint before returning available
generateContent models, and reject incomplete model lists.
2026-09-01 00:58:51 +02:00
Jeremy SchoemakerandWolfsblvt dd326d244f Return a degraded preview instead of dropping a chat whose last line is unparseable (#5969)
* fix: return a degraded preview instead of {} when a chat's last line is unparseable

getChatInfo resolved an empty object when the last line of a chat .jsonl
failed to parse or lacked known fields (truncated write, external edit).
All three consumers (chat list, search, recents) drop entries without a
file_name, so an otherwise intact chat silently disappeared from the UI
while still occupying its name for uniqueness checks (#5940).

Resolve the already-built chatData instead: file_id, file_name, file_size
and mtime-based last_mes are known good from stat(), chat_items comes from
the line count, and mes falls back to the existing placeholder. Matcher
results from the intact lines are preserved for search.

Fixes #5940

* fix: exclude unreadable chat line from message count

Keep degraded previews aligned with the messages that can actually be loaded by excluding both the metadata line and broken trailing line.

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
2026-09-01 00:38:40 +02:00
Zhewen Tan ccd8287833 fix: preserve zero NovelAI Math1 temperature (#5965) 2026-08-31 23:36:06 +02:00
Em 30eaf26a43 Update TavernAI link in README (#5987)
Update TavernAI link in README
2026-08-27 01:33:51 +02:00
PeterGriffin 98af17a8a4 fix(chat): delete associated tool calls with messages (#5949) 2026-08-21 06:35:50 +02:00
primorLee 0a9ba91852 fix: parse boolean values in env migrations (#5950) 2026-08-21 06:33:08 +02:00
Christoph 814734d4af Fix duplicate tool call IDs if provider repeats id, type, name (#5948)
Before this fix, tool call IDs were duplicated repeatedly with streaming requests if the provider repeats the "id" field in each streaming chunk:

```
{
    role: 'tool',
    content: 'content',
    tool_call_id: 'chatcmpl-tool-aa62chatcmpl-tool-aa62chatcmpl-tool-aa62chatcmpl-tool-aa62'
},
```

After this fix:

```
{
    role: 'tool',
    content: 'content',
    tool_call_id: 'chatcmpl-tool-aa62'
},
```

Example of raw streaming chunks received from Fireworks AI exhibiting this behavior of repeating "id", "type", "name":

```json
{
  "id": "chatcmpl-b7de",
  "object": "chat.completion.chunk",
  "created": 1783459695,
  "model": "accounts/fireworks/models/glm-5p2",
  "choices": [
    {
      "index": 0,
      "delta": {
        "tool_calls": [
          {
            "index": 0,
            "id": "chatcmpl-tool-aa62",
            "type": "function",
            "function": {
              "name": "debug_tool",
              "arguments": ""
            },
            "name": null
          }
        ]
      },
      "finish_reason": null,
      "raw_output": null
    }
  ],
  "usage": null
}
{
  "id": "chatcmpl-b7de",
  "object": "chat.completion.chunk",
  "created": 1783459695,
  "model": "accounts/fireworks/models/glm-5p2",
  "choices": [
    {
      "index": 0,
      "delta": {
        "tool_calls": [
          {
            "index": 0,
            "id": "chatcmpl-tool-aa62",
            "type": "function",
            "function": {
              "name": null,
              "arguments": "{\"input\": \""
            },
            "name": null
          }
        ]
      },
      "finish_reason": null,
      "raw_output": null
    }
  ],
  "usage": null
}
{
  "id": "chatcmpl-b7de",
  "object": "chat.completion.chunk",
  "created": 1783459695,
  "model": "accounts/fireworks/models/glm-5p2",
  "choices": [
    {
      "index": 0,
      "delta": {
        "tool_calls": [
          {
            "index": 0,
            "id": "chatcmpl-tool-aa62",
            "type": "function",
            "function": {
              "name": null,
              "arguments": "First"
            },
            "name": null
          }
        ]
      },
      "finish_reason": null,
      "raw_output": null
    }
  ],
  "usage": null
}
```
2026-08-21 06:16:41 +02:00
Christoph 8992872765 Fireworks: Request and process reasoning (#5947)
This change enables reasoning effort selection for the Fireworks provider as documented at https://docs.fireworks.ai/guides/reasoning#using-reasoning_effort.
2026-08-19 23:47:16 +02:00
Christoph 558d72dde2 Fireworks AI: Set session affinity header for improved caching (#5826)
This change adds a chat-specific "x-session-affinity" HTTP header to requests to Fireworks that use the full prompt. Quiet requests like summarization requests that don't use the same prompt prefix are excluded.

This improves prompt caching by
1. Adding a stable "x-session-affinity" header, which Fireworks AI recommends to route requests to the same replica
2. Separating different chats into different sessions
3. Separating main LLM calls from quiet calls which have a completely different prompt prefix

See https://docs.fireworks.ai/guides/prompt-caching.

This uses an HMAC with the cookie secret instead of simply hashing the chat title to avoid leaking chat titles. Session affinity headers may not fall under zero-data retention in Fireworks or could be cached by proxies on the way. Chat titles are tiny, so the HMAC computation is instant.
2026-08-19 23:25:15 +02:00
WolfsblvtandClaude Fable 5 4ad7af3c06 fix: use provider error fields instead of statusText for HTTP 200 errors (#5945)
Providers can return an HTTP 200 response whose body carries an error
object without a message field, or the error as a plain string. The
error message fell back to response.statusText, which is 'OK' for any
200 response, producing the opaque 'Error: OK'. Error messages now fall
back to the error's code or type field, then the string form, and only
use statusText for non-2xx responses where it carries meaning. Applies
to the non-streaming request path and both streaming error toasts.

Fixes #5647

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 21:05:04 +02:00
WolfsblvtandClaude Fable 5 bcc42de2e9 Give non-ASCII chat names distinct backup keys and throttles (#5944)
* fix: give non-ASCII chat names distinct backup keys and throttles

Backup filenames replace all non-alphanumeric characters with
underscores, so names such as equal-length CJK ones collapsed to the
same key and shared a single backup quota: busy chats evicted the
backups of unrelated quiet ones. The backup key now appends a short
hash of the raw name whenever the name contains non-ASCII characters,
keeping keys distinct and stable while ASCII names keep their exact
current keys and retention.

The backup throttle was also keyed per user only, so rapid saves in
one chat deferred or swallowed the backup of another chat saved in the
same window. It is now keyed per user and chat.

Fixes #5780

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: replace stray NUL byte in backup throttle key separator

A literal 0x00 byte slipped into the template string separator, which
made Git treat the whole file as binary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: reunite backupChat docblock with its function

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 20:49:43 +02:00
WolfsblvtandClaude Fable 5 b4e162324b fix: mint a fresh integrity slug for new branches and checkpoints (#5943)
Branches and checkpoints inherited the parent chat's integrity UUID
through the chat_metadata spread in saveChat and saveGroupBookmarkChat,
so every member of a branch family shared one slug and the integrity
guard could not tell them apart. A save aimed at the wrong file within
the family would pass validation. New branches and checkpoints now get
their own slug at creation. Existing files are unaffected.

Fixes #5942

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 20:30:01 +02:00
Marcela Petra Ferraz de Novaes 2c61f3be1e fix: never resize avatars option does not work for group chat avatar (#5936)
* Check the never_resize_avatars setting to request or not cropping for group avatars.

* Change max width of thumbnail to 300px so square images are allowed.
2026-08-19 20:17:30 +02:00
48e7d605df fix(expressions): guard against null/undefined default-expression labels (#5938)
* fix(expressions): guard against null/undefined default-expression labels

Classifiers can return a falsy or literal "null"/"undefined" expression
label, and setDefaultEmojiForImage then requested the nonexistent
/img/default-expressions/null.png, producing a 404.

Fall back to DEFAULT_FALLBACK_EXPRESSION (joy) when the label is falsy,
a literal "null"/"undefined", or a custom expression without a default
asset. This is the only place the default-expressions URL is built, so the
guard covers all 404 paths.

Fixes #5863

* fix(expressions): fall back for any label without a default asset

Generalize the guard to a whitelist check against DEFAULT_EXPRESSIONS.
Every entry in that list has a matching default-expressions asset, so
any other label (falsy, literal null/undefined strings, custom
expressions, or unexpected classifier output) falls back to the
default expression instead of requesting a missing image.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 20:13:23 +02:00
WolfsblvtandClaude Fable 5 12b4fc50aa tests: set extensions enabled override for discover suite
PR #5571 added an extensionsEnabledFeatureGuard middleware that reads
extensions.enabled via getConfigValue. The test environment has no
config.yaml, so getConfig() exits the process and kills the Jest
worker, failing the extensions-discover suite. Set the env var
override so the guard resolves without touching the config file.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 20:06:43 +02:00
Yongjie Guan 742d5601be Prevent proxy access keys from triggering password-manager prompts in Chromium-based browsers (#5913)
* fix: prevent proxy keys from triggering password manager

Render reverse proxy credentials as visually masked text fields with password-neutral DOM identifiers while preserving existing settings, preset, and request field names. Align the Azure OpenAI key input and add regression coverage.

* fix: preserve masked secret clipboard protection
2026-08-19 20:05:15 +02:00
4ed1372411 fix: correct malformed multimodal caption request for oobabooga (#5915)
Closes #4448

The 'ooba' special case in the caption-image route split the correctly
structured message (a single user message with a content array
containing text + image_url) into two separate messages, moving
image_url to a top-level property with an empty content array.

oobabooga's own multimodal image handling (modules/image_utils.py)
only looks for images inside content array items with
type: 'image_url', so this transformation caused the image to be
silently dropped, producing hallucinated or "I can't see an image"
captions - even though the request appeared to contain valid image
data.

Removing the special case lets 'ooba' use the same, already-correct
message structure as every other multimodal-capable API.

Verified against a local oobabooga (llama.cpp/GGUF loader) with a
vision-capable GGUF + mmproj pair: before the fix, captions ignored
the attached image; after the fix, captions accurately describe real
photos.

Co-authored-by: bbastex <bbastex@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 03:33:13 +02:00
Christoph 86b55c8696 Fireworks: Update model fetching because /v1/models is broken (#5831)
* Fireworks AI: Fetch model list from custom URL

Fireworks provides the model list on a custom URL in a custom format, see https://docs.fireworks.ai/api-reference/list-models. The standard /v1/models endpoint no longer works correctly and returns a wrong list of models:

```
Available models: [
  'accounts/fireworks/models/deepseek-v4-pro',
  'accounts/fireworks/models/flux-1-schnell-fp8',
  'accounts/fireworks/models/glm-5p1',
  'accounts/fireworks/models/glm-5p2',
  'accounts/fireworks/models/gpt-oss-120b',
  'accounts/fireworks/models/kimi-k2p5',
  'accounts/fireworks/models/kimi-k2p6'
]
```

Many new models like Deepseek V4 Pro, Kimi K2.7 Code are missing.

* Fireworks AI: Add "fast" models

Some models have a "fast" variant. The model list endpoint does not return this information, so for now the available fast versions are listed explicitly.

Fast models have the same parameters (max context etc.) as the regular ones. They are only faster and cost more.
2026-08-17 03:30:30 +02:00
Martin TibkeandMartin Tibke 1a7f88861d fix(tags): drop filters for tags with no assigned entities (#5911)
Filter lists only print tags that are assigned to at least one entity, so a
persisted filter on an unassigned tag has no element to toggle. "Clear all
filters" cannot reset it either, since it works by clicking the printed
elements. The result is a character list that stays empty on every app start,
showing only an "N characters hidden" notice with no visible cause.

removeMissingTagFilters() already dropped filters for deleted tags and for
empty open bogus folders (#5225). Generalize that check to any tag without
assigned entities, which covers plain tags as well, and clear the matching
account storage entry so the filter does not come back on the next reload.

Co-authored-by: Martin Tibke <martin@tibke.net>
2026-08-17 03:01:40 +02:00
WolfsblvtandClaude Fable 5 800caeb9e0 fix: skip extension folders without a manifest during discovery (#5934)
A manually deleted extension often leaves a folder husk on disk, for
example when Windows fails to remove locked .git files. The discover
endpoint listed any directory, so the husk kept reporting as an
installed extension: /extension-exists and /extension-state returned
true after a fresh load and the manifest fetch produced a 404 in the
console on every load. Discovery now skips folders without a
manifest.json and logs a warning naming the exact path, and the
client drops any discovered name whose manifest could not be loaded
so state queries cannot report ghost extensions.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 02:47:08 +02:00
f91050136c fix: show full Generic textgen model list in a select (#5897)
Browsers filter datalist suggestions to the current input value, so
Generic OpenAI-compatible text completion looked like a single model
while Chat Custom's select showed the full /v1/models list. Add an
Available Models select (select2 + reconnect) matching other textgen
backends, and keep the optional free-text Model ID field.

Co-authored-by: trahloc <trahloc@proton.me>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 02:21:11 +02:00
f199580102 fix: remove GroupId requirement from MiniMax TTS (#5920)
* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension (#5778)

* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension

Added New versions and new Default model

* Add glm-5.2 option to model selection dropdown

* fix: remove GroupId requirement from MiniMax TTS

MiniMax's current API (sk-cp- keys) uses Bearer auth only. GroupId
is a legacy parameter from the pre-2025 API that the current API
tolerates/ignores. Requiring it blocks new users from setting up
MiniMax TTS.

- Backend: drop groupId from required params and URL
- Frontend: remove Group ID input field and all validation checks

Fixes #5909

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Samueras <Samueras@jackoedv.de>
Co-authored-by: chen-jiying <chen-jiying@users.noreply.github.com>
2026-08-17 01:36:56 +02:00
eaf2858e43 fix: use exact ArrayBuffer slices for BYAF imports (#5917)
* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension (#5778)

* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension

Added New versions and new Default model

* Add glm-5.2 option to model selection dropdown

* Refactor file reading to use getArrayBufferSlice

* Update util.js

* Update util-pure.test.js

* test: add real-archive regression for BYAF pooled buffer handling

Builds an actual BYAF zip in memory, embeds it at an offset inside a
larger backing buffer to simulate Node's buffer pooling, and proves
through the real parser that the exact ArrayBuffer slice parses
correctly while the raw oversized backing buffer does not.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Samueras <Samueras@jackoedv.de>
Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 01:28:15 +02:00
1cfdcd82e1 fix: skip non-image ComfyUI outputs (#5910)
* fix: skip non-image ComfyUI outputs

* test: cover ComfyUI gif fallback and no-output error paths

Extends the skip-non-image regression with the gifs fallback that
animated workflows rely on and the error path when no output node
carries images or gifs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: CaoBochun <caobochun@bytedance.com>
Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 01:19:49 +02:00
7228502f0b Add Claude Opus 5 / Sonnet 5 and Gemini 3.7 Flash / 3.6 Flash / 3.5 Flash-Lite (#5883)
* feature: add Claude Opus 5, Sonnet 5, and Gemini 3.6 Flash / 3.5 Flash-Lite

Enable adaptive thinking and strip rejected sampling/prefill fields so the new models work with Chat Completions and Image Captioning.

* feature: add Gemini 3.7 Flash

Strip rejected sampling/prefill fields and map min thinking to low so the model works with Chat Completions and Image Captioning.

* feat: refresh Claude and Gemini model lists on top of Claude 5 support

Builds on the Claude 5 and Gemini wiring in this branch: removes
retired models from the Claude and Gemini dropdowns and captioning
lists (claude-opus-4-1 verified retired with a live 404; Gemini 2.0
experimental models, 2.5 preview snapshots, and gemini-3-pro-preview
are shut down per Google's model docs), labels deprecated models
without touching option values so saved selections keep working, adds
claude-fable-5 to the captioning list, and moves new-install defaults
to claude-sonnet-5 and gemini-3.7-flash. Claude 5 generation, vision,
web search, and effort mapping verified live against the API; the
trailing-prefill test now uses a plain loop so the tests lint passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 01:10:28 +02:00
WolfsblvtandClaude Fable 5 4f6977b779 feat: verify GPT-5.6 support and refresh OpenAI model list (#5932)
Verifies Sol, Terra, and Luna live against the API: generation,
vision, effort values (none/low/xhigh), the unlisted gpt-5.6 alias,
and the sampler contract (temperature and top_p are rejected even
with reasoning off, so the strict stripping stays). Removes models
OpenAI has shut down from the model dropdowns, labels announced
deprecations without touching option values, orders groups newest
first, and moves the new-install and captioning defaults off
gpt-4-turbo, which shuts down on October 23, 2026.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 00:37:46 +02:00
6fea520309 Don't do a full chat reload from /addswipe (#5903)
* Don't reload chat from addswipe

* test: add /addswipe regression and harden e2e login helper

Covers both /addswipe modes through the real command pipeline:
swipe data, counters, visible text, and message element identity,
which a full chat reload would break. The login helper now tries
accounts from last to first so password-protected accounts don't
break local e2e runs, and the test waits out fresh-account
onboarding before measuring.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 00:13:30 +02:00
aca0684c0b Fix crash when a chat is deleted during a search/recent scan (#5871)
* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension (#5778)

* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension

Added New versions and new Default model

* Add glm-5.2 option to model selection dropdown

* Fix crash when a chat file is deleted mid-scan

getChatInfo() stats a chat file without handling ENOENT. If the file
is deleted (e.g. from the UI) while a search or the recent-chats list
is scanning the same directory, the stat throws, and since it's inside
new Promise(async (res) => {...}) with no reject wired up, it becomes
an unhandled rejection that kills the whole server process.

This catches ENOENT and resolves with { match: false } instead, same
as the fallback already used elsewhere in this function/its callers
for corrupted or unmatched entries.

* fix: handle all mid-scan chat deletion races in getChatInfo

The stat guard alone left the function unsound: it lived inside an
async promise executor, so a non-ENOENT error became an unhandled
rejection and the promise never settled. A file deleted between the
stat and the stream opening still crashed via an unhandled stream
error, which readline re-emits, and a file truncated to empty mid-scan
hung the request because the close handler never resolved.

getChatInfo now uses plain async/await up to the streaming part,
resolves a no-match sentinel when the file vanishes at either point,
resolves an empty object on truncation, and properly rejects
everything else. Comes with deterministic regression tests for each
race window.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Samueras <Samueras@jackoedv.de>
Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 23:51:08 +02:00
0x4kgi 54aedc8797 Add/enable low reasoning effort for Deepseek (#5924)
Also mapping min/minimum as low as it makes sense here.
2026-08-16 23:45:06 +02:00
b5cc683074 Update BFL generation and polling endpoints to api.bfl.ai (#5681)
* Fix BFL API endpoint and polling URL handling

* fix: send authentication header when polling BFL results

The bfl.ai API requires the x-key header on the polling request as
well; the retired bfl.ml API tolerated unauthenticated polling. Without
the header every poll returns 403 and generation never completes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 23:41:48 +02:00
WolfsblvtandClaude Fable 5 cd2c65c9d4 fix: await chat completion preset application when switching presets (#5930)
Applying a CC preset deferred the actual settings update behind an
unawaitable event continuation, so /preset resolved before the preset
was applied. A connection profile switch runs /api, /preset, /api in
sequence, and the preset's stored chat_completion_source would land
after the final /api check, reverting the source to the previous
provider. Requests then silently went to the wrong endpoint.

The preset application chain is now captured in a promise that
selectPreset awaits, so /preset resolves only when the preset is fully
applied and follow-up commands sequence correctly. The UI dropdown
path is unchanged, and callers that do not await selectPreset keep
the exact previous behavior.

Fixes #5926
Fixes #5147

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 23:21:01 +02:00
ed563cb7d8 fix: reject localhost and .localhost domains in /api/search/visit to prevent SSRF bypass (#5749)
* fix: reject localhost and .localhost domains in /api/search/visit to prevent SSRF bypass

The hostname check in /api/search/visit only validated IP addresses using
ipRegex, but did not block 'localhost' or subdomains ending in '.localhost'.
This allowed SSRF bypasses to internal services via localhost URLs.

Changes:
- Add explicit rejection of 'localhost' hostname
- Add rejection of any hostname ending in '.localhost' (RFC 6761 reserved)

Closes GHSA-wm7j-m6jm-8797

* fix: enforce SSRF boundary for /api/search/visit at connection time

The URL string checks only guard the literal input. Hostnames resolving
to private addresses, redirects into internal services, and DNS
rebinding all bypassed them. The visit endpoint now routes its outbound
request through a strict PrivateRequestAgent even when the private
request filter is disabled: the resolved IP is validated at connection
time on every hop and the connection is pinned to the validated IP.
When the private request filter is enabled its configured whitelist
keeps applying, and an enabled request proxy keeps owning routing.
Also rejects bracketed IPv6 literals, which kept their brackets and
slipped past the hostname check.

Fixes GHSA-wm7j-m6jm-8797

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 22:56:44 +02:00
WolfsblvtandClaude Fable 5 32e1966757 fix: require confirmation before overwriting chats with unparseable headers (#5928)
An existing non-empty chat file whose first line could not be parsed as a
JSON object passed the integrity check as if it were a legacy chat, so a
save silently replaced the file and only the replacement got backed up.
The check now fails closed for unparseable, truncated, or non-object
headers, routing the client into the existing overwrite confirmation
dialog. A UTF-8 BOM in front of an otherwise valid header is stripped
before parsing. Empty files, valid legacy headers, and force saves behave
as before.

Fixes #5454

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 22:23:29 +02:00
Frank Schubert 380e31e8c5 fix: fetch only current prompt from ComfyUI history endpoint (#5790)
The ComfyUI polling loop fetches /history every 100ms to check if the
current prompt has completed. This returns the entire history, which
grows unboundedly. After ~170 generations, the JSON response exceeds
Node.js's 512MB string length limit, crashing the server with:

  RangeError: Invalid string length

Fix by requesting /history/{id} instead, which returns only the single
prompt entry needed. This is a supported ComfyUI API endpoint that
returns the same data structure.
2026-07-12 00:43:10 +02:00
Tony Gies 46bd341ec1 perf(plugins): list plugin dirs without per-entry statSync (#5690)
updatePlugins called fs.statSync on every entry returned by readdirSync
just to test isDirectory(). Pass withFileTypes to readdirSync and filter
on the Dirent type instead. Symlinks are still treated as directories.
2026-07-12 00:31:20 +02:00
Tony Gies aaf12b4925 perf(util): read each file's mtime once when getImages sorts by date (#5689)
The previous date sort read file modification times while comparing
items, which meant stat'ing the same files over and over for one
listing. mtimes are now read once per file before sorting. Files that
disappear during the call (e.g. concurrent deletion) sort to the start
instead of crashing.
2026-07-12 00:25:22 +02:00
DeathStalker471andWolfsblvt c4672e953e chore: Sync NanoGPT providers: UOMI and Wafer (#5707)
* Sync Nanogpt providers again

* Sort providers alphabetically

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
2026-07-12 00:21:37 +02:00
cloak1505 4259eb7220 Sync OpenRouter providers list (#5686) 2026-07-12 00:04:43 +02:00
DragonFSKY 0168803f41 Fix whitespace-only reasoning block controls (#5636)
* Fix whitespace-only reasoning block controls

* Fix duplicate hidden reasoning editor

* Fix hidden reasoning open state cleanup

* Add reasoning message edit regression tests
2026-07-11 23:54:25 +02:00
Wolfsblvt 2463e83966 Fix: remove trailing whitespace from variable macros (#5848)
- Restore root lint compliance for the variable macro registry.
2026-07-11 23:23:19 +02:00
Wolfsblvt 0a1a746bfd Fix: ignore local third-party extensions during linting (#5847)
- Keep root lint focused on core sources.
- Ignore local .windsurf IDE settings.
2026-07-11 23:22:56 +02:00
Jason WuandWolfsblvt 902bd10382 Add Claude Opus 4.8, GPT-5.6 models, and migrate Gemini 3.1 Flash Lite and Gemini image models to stable (#5845)
* feature: support Claude Opus 4.8 model

* feature: support OpenAI GPT 5.6 models

* fix: replace deprecated Gemini preview model with stable gemini-3.1-flash-lite

* Fix GPT-5.6 Chat Completions effort mapping

- Map Maximum reasoning effort to xhigh because max is Responses-only
- Clarify model-specific OpenAI and adaptive Claude effort guidance
- Cover stable Gemini 3.1 Flash-Lite thinking-level routing

Tests:
- npm run test:unit -- --runInBand
- ESLint on all changed JavaScript files

* Fix: migrate Gemini image models to stable IDs

- Replace shut-down Gemini image preview selectors for Google AI and Vertex AI
- Migrate saved chat and caption model settings to the stable replacements
- Enable image generation for the stable model IDs
- Correct the Gemini 3.1 Flash Image context fallback to 128K
- Add regression coverage for stable Gemini 3 image thinking levels

Tests:
- npm run test:unit -- --runInBand
- ESLint on all changed JavaScript files

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
2026-07-11 16:22:04 +02:00
maxime-fleury 29ed34939c Fix translation for 'Persona Description' in French (#5830)
Fix translation in french
2026-07-08 20:34:58 +02:00
Noahandransxd 37943ea4b1 Optimize World Info entry sorting to avoid O(n^2) lookups (#5809)
* Optimize World Info entry sorting to avoid O(n^2) lookups

The comparator in checkWorldInfo called sortedEntries.indexOf() twice per
comparison, making the sort O(n^2 log n). Build an index Map once and use
it for lookups instead. Sort order is unchanged.

* Address review: build index map before sort, use -1 for unknown entries

Move sortedEntriesIndex creation to immediately before the activatedNow
sort so indices match the current sortedEntries array. Use ?? -1 so
externally force-activated (cloned) entries behave like indexOf(-1).

* Skip index map when at most one entry needs sorting

Build sortedEntriesIndex only when activatedNow.size > 1, since the
comparator is not used for zero or one activated entries.

---------

Co-authored-by: ransxd <ransxd@users.noreply.github.com>
2026-07-08 20:21:46 +02:00
Lukas Straub 29e0df4886 Openrouter: Enable logprobs if requested by user (#5804) 2026-07-07 20:24:53 +02:00
6b49e9e7d0 Add claude-fable-5 support to Claude and OpenAI-compatible request builders (#5757)
* Add claude-fable-5 support to Claude and OpenAI-compatible request builders

* Fix: request Fable thinking summaries on auto

- Request summarized adaptive thinking for claude-fable auto effort when reasoning display is enabled

- Preserve existing effort mapping and sampler stripping behavior

Verification:

- node --check src/endpoints/backends/chat-completions.js

- git diff --check

---------

Co-authored-by: TheLonelyDevil9 <TheLonelyDevil9@users.noreply.github.com>
Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
2026-07-07 20:22:32 +02:00
WolfsblvtandSamueras bba96c6fbe Update TTS model from Gemini 2.5 to 3.1 in TTS Extension (#5778) (#5824)
* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension

Added New versions and new Default model

* Add glm-5.2 option to model selection dropdown

Co-authored-by: Samueras <Samueras@jackoedv.de>
2026-07-07 19:52:38 +02:00
Samueras 8172dcd0ee Update TTS model from Gemini 2.5 to 3.1 in TTS Extension (#5778)
* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension

Added New versions and new Default model

* Add glm-5.2 option to model selection dropdown
2026-07-07 19:36:20 +02:00
Samueras 10ae84fb62 Add glm-5.2 to contextMap (#5770)
* Add glm-5.2 to contextMap

Add glm-5.2 to contextMap

* Update contextMap for glm-5.2 max value
2026-07-07 19:29:45 +02:00
RossAscends bf6f0b0c46 Merge pull request #5814 from underscorex86/patch-5
change novelai user information to be called from image.novelai.net
confirmed via Anlatan discord announcement.
2026-07-04 13:51:32 +09:00
underscore_x 3594fe224a change user information to be called from image.novelai.net
"for 3rd party API customers: GET /user/information, GET /user/data, GET /user/subscription should now be called from https://image.novelai.net. The old URL will be non-functional in a couple of hours. The old URL is currently non-functional."

from NAI devs, this change has already been implemented from NAI side, no backward compat.
2026-07-04 05:43:04 +01:00
Tosd 1ca70787f9 Add gemini-3.5-flash to Google AI Studio and Vertex model lists (#5675) 2026-05-20 13:06:50 +03:00
Cohee 691f0ce604 Temporarily comment out allow-remote setting in .npmrc due to npm bug (#5668)
https://github.com/npm/cli/issues/9347
2026-05-19 21:04:48 +03:00
Cohee fe048f6bdc Improve remote tokenizer encode validation (#5665)
* fix: handle unsupported text generation types in encode endpoint

* fix: simplify URL handling in encode endpoint by using trimV1 utility
2026-05-19 00:45:56 +03:00
Blueberry 93bd9e217e Macros: Access array and object elements (#4383) (#5649)
* Macros: Access array items by index (#4383)

* Macros: Access array and object elements (#4383)

* fix spacing

* setvarkey setvarindex

* setglobalvarindex getglobalvarindex
2026-05-19 00:13:47 +03:00
Cohee fd582be5ca Add rate limit to account reset (#5603) 2026-05-18 23:25:50 +03:00
Cohee 3a453d4cfa Enforce stricter npm source restrictions in .npmrc (#5663) 2026-05-18 22:51:39 +03:00
40ca51f4f1 Pollinations: Add API endpoint selection (#5625)
* Split Pollinations into two separate API providers: (Key) and (No Key)

- Replaces the single "Pollinations" source with two distinct entries:
  - "Pollinations (Key)": uses gen.pollinations.ai/v1 with Bearer token auth,
    supports BYOP OAuth flow with app key pk_Gu8Ta8q6QhS67hSg and manual key entry
  - "Pollinations (No Key)": uses text.pollinations.ai/v1, no authentication required
- Renames CHAT_COMPLETION_SOURCES.POLLINATIONS to POLLINATIONS_KEY/POLLINATIONS_NOKEY
  throughout the codebase (constants, endpoints, frontend scripts)
- Adds BYOP authorize button and OAuth callback handler for key-based source
- Updates all data-source attributes, secret key mappings, model selectors,
  tool-calling, reasoning, slash-commands, caption, and SD extension references

https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj

* Fix POLLINATIONS_NOKEY: exempt from API key check, fix placeholder text

- Add POLLINATIONS_NOKEY to the keyless providers exemption in the
  /generate endpoint's API key guard (was hitting the 400 check)
- Remove 'pk_...' from the key input placeholder since pk_ is the
  app key used in the BYOP auth link, not the user's secret key

https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj

* Add Pollinations anonymous/authenticated endpoint selector

Implements reviewer feedback to use a single Pollinations provider with
an endpoint dropdown (similar to Z.AI) rather than two separate sources.

- Add POLLINATIONS_ENDPOINT enum (anonymous / authenticated)
- Anonymous uses text.pollinations.ai/v1, no API key required
- Authenticated uses gen.pollinations.ai/v1, requires sk_... key with BYOP OAuth support
- Key input and BYOP button are hidden when anonymous endpoint is selected
- Backend skips key guard for anonymous requests
- Reasoning effort and JSON schema only sent for authenticated mode
- Connection status check passes for anonymous without a saved key

https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj

* Fix broken Pollinations references after resolving merge conflicts

- Replace POLLINATIONS_KEY/NOKEY in CHAT_COMPLETION_SOURCES with POLLINATIONS
- Fix SECRET_KEYS.POLLINATIONS → SECRET_KEYS.POLLINATIONS_KEY in backend
- Update all chat_completion_sources references in openai.js to use unified POLLINATIONS
- Consolidate duplicate model select/change handlers into single pollinations_model
- Keep backward compat in caption-image handler for pollinations_key/nokey multimodal API
- Fix openai.js inline handler to route pollinations to correct endpoint based on endpoint field

https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj

* Complete Pollinations unification: remove all pollinations_key/nokey splits

- Fix committed merge conflict in openai.js (Wolfsblvt review)
- Replace POLLINATIONS_KEY/NOKEY in chat_completion_source dropdown with single POLLINATIONS option
- Replace pollinations_key,pollinations_nokey in all data-source attributes with pollinations
- Merge duplicate /pollinations_key and /pollinations_nokey multimodal routes into single /pollinations
- Update caption extension: single "Pollinations" option using pollinations_endpoint from oai_settings
- Update slash-commands.js model selector to single pollinations entry
- Clean up caption-image handler (openai.js) to use only 'pollinations' api type
- Pass pollinations_endpoint in caption request body (shared.js)
- Add settings migration: pollinations_key → pollinations, pollinations_nokey → pollinations (anonymous)

https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj

* Address Cohee review: named constants, mock key, revert POLLINATIONS_KEY rename, default to authenticated

- Use POLLINATIONS_ENDPOINT named constants throughout (no magic 'anonymous' strings)
- Use mock key pattern (set key to POLLINATIONS_ENDPOINT.ANONYMOUS value) so no guard exception needed
- Revert POLLINATIONS_KEY rename back to POLLINATIONS in secrets.js files
- Default pollinations_endpoint to AUTHENTICATED so saved keys aren't bypassed
- Remove redundant isPollinationsAnon check from getReasoningEffort() (backend handles it)
- Unify tool-calling.js, caption, shared, stable-diffusion to single POLLINATIONS source

https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj

* Fix ESLint padded-blocks error in BYOP OAuth callback

https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj

* fix: regression in caption API validation

* fix: remove unneeded migration

* fix: remove duplicate keyless check in apiSourceConfig

* fix: regression in extractReasoningFromData

* refactor: simplify UI unhide logic

* fix: remove BYOP flow due to security concerns

* fix: use a string instead of a constant reference for placeholder key

* fix: reconnect when switching endpoints

* feat: support pollinations in /api-url command

* fix: remove endpoint check from image generation (it always uses authenticated)

* fix: default to authenticated

* fix: use a named constant in auto-connect logic

* fix: filter by modality in anon models list

* fix: remove bespoke model loading logic for anon endpoint

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-05-18 22:45:53 +03:00
Wolfsblvt 060f224f28 Add MessageFormatter: a structured hook system for extensions to transform message content pre-DOM (#5652)
* feat(core): add MessageFormatter pipeline for extension message hooks

Introduces a new MessageFormatter singleton class (public/scripts/message-formatter.js)
that allows extensions to transform message text at well-defined stages of the
messageFormatting() pipeline, before the result reaches the DOM.

The pipeline exposes three hook stages (all before DOMPurify sanitization):
- BEFORE_REGEX  -- raw Markdown, before custom regex rules
- AFTER_REGEX   -- plain Markdown, after regex, before showdown conversion
- AFTER_MARKDOWN -- rendered HTML, after showdown, before sanitization (default)

There is intentionally no post-sanitize stage to prevent XSS vectors.

Extensions register hooks via getContext().messageFormatter.addHook(fn, { stage, order }).
Stage and order enums (formatting_stage, hook_order) are re-exported on the
singleton instance itself so extensions need no additional imports beyond getContext().

The formatter also exposes a .format() shim over messageFormatting() for
convenience. messageFormatting() itself gains full JSDoc documentation.

* feat(core): add pipeline documentation to MessageFormatter.format()

Adds detailed JSDoc documentation to the MessageFormatter.format() method
describing the complete 11-step message formatting pipeline, from prompt-bias
stripping through DOMPurify sanitization. Clarifies that all extension hooks
(beforeRegex, afterRegex, afterMarkdown) run before sanitization to ensure
their output is always sanitised.

* feat(core): add async detection and non-string return guards to MessageFormatter

Adds runtime and registration-time safety checks to the MessageFormatter hook system:
- Throws TypeError at registration if an async function is passed to addHook()
- Emits console warning and ignores return value if a hook returns non-string at runtime
- Detects Promise returns and includes helpful hint that hook may be async
- Updates JSDoc to clarify synchronous string return requirement and error conditions

* test(frontend): add comprehensive e2e tests for MessageFormatter

Adds full test coverage for the MessageFormatter singleton class including:
- Module exports validation (formatting_stage, hook_order enums)
- Singleton instance constant re-exports
- Registration validation (rejects non-functions, async functions, unknown stages)
- Hook execution pipeline (stage isolation, order sorting, context freezing)
- Error handling (continues on throw, warns on non-string/Promise returns)
- Stage injection

* refactor(core): rename ch_name parameter to characterName in MessageFormatter

Renames the `ch_name` parameter to `characterName` throughout MessageFormatter for improved code clarity and consistency with modern naming conventions. Updates JSDoc typedef and method signatures.
2026-05-18 21:51:16 +03:00
Wolfsblvt aec9754b31 Fix: Scoped comment macro {{//}}...{{///}} not removing its content (#5643)
* fix: handle scoped comment macro closing tag tokenization edge case

The lexer greedily tokenizes '//' before '/', causing {{///}} to parse as {{// /}} instead of {{/ //}}. Added special case detection in MacroCstWalker to check if the comment macro's first argument starts with '/' and treat it as a closing block. Removed list/strictArgs flags from comment macro definition and added comprehensive e2e tests for scoped comment blocks.

* refactor: DRY, remove unneccessarily duplicated private extractMacroInfo
2026-05-18 21:48:49 +03:00
Wolfsblvt 9f8c3e156a Lorebook "Apply Current Sorting" — Order control, ascending mode, step size, and live validation feedback (#5653)
* feat: enhance world info sorting with ascending/descending modes and animation

- Add autoFocus property to popup inputs with autofocus attribute and tabIndex
- Add slide animation to setInfoBlock/clearInfoBlock with configurable animate option
- Replace simple input prompt with detailed popup for applying current sorting
- Add ascending/descending order toggle for world info entry sorting
- Add configurable step value between order assignments
- Add real-time warning when starting value is below

* fix: improve world info sorting warning to account for step value

- Update warning calculation to consider step size when detecting order collisions
- Add step input parameter to updateWarning function
- Attach input listener to step field for real-time warning updates
- Display more detailed warning message showing the calculated final order value
2026-05-18 20:14:45 +03:00
Wolfsblvt 355598bb30 fix: disable pipe/filter feature to prevent breaking macros with pipe characters in arguments (#5644)
Temporarily commented out Filter.Pipe and Filter.EscapedPipe token handling in MacroLexer to fix issue where pipe characters in argument values (e.g., {{setvar::foo::|bar}}) were incorrectly parsed as filter operators. Added regression tests for pipe handling in argument values and skipped existing output modifier tests until filter flag (>) logic is properly implemented.

Resolves: #5618
2026-05-18 19:56:38 +03:00
mekineerandCohee 45d166ff6a fix(autocomplete): guard MutationObserver against detached textarea (#5660)
When a textarea is removed from the DOM before the autocomplete
clone-positioning logic runs, parentElement is null and
MutationObserver.observe throws. This can happen when extensions
abort generation early (via generate_interceptor) and the textarea
is torn down before autocomplete finishes setup.

Add a null check so the observer is only attached when the parent
still exists.

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-05-18 19:35:36 +03:00
realyxl 69cf5571ba Update outdated readme-zh_cn.md and readme-ja_jp.md (#5659) 2026-05-18 19:33:36 +03:00
加乘 81be2c51a2 Update outdated readme-zh_tw.md (#5639) 2026-05-18 19:32:19 +03:00
DeathStalker471 a900958bef chore: Sync NanoGPT providers: Tensorix, and Xiaomi (#5646)
* Sync NanoGPT providers, Tensorix, and Xiaomi

* fix lint
2026-05-18 19:31:18 +03:00
underscore_x 56061f793c fix mislabelled popup for "Replace existing Quick Reply set" (#5662)
* fix mislabelled popup for "Replace existing Quick Reply Set"

it currently provides a popup asking for confirmation "Replace existing World Info" when user tries to create a new QR Set with an existing name.

Checked that it does not conflict/reuse anything from the actual world info screen.

* capitalisation
2026-05-18 19:30:26 +03:00
FeldherrenandCohee 77ba2c21a5 Add message indicating that the 'Request mode reasoning' checkbox controls whether reasoning is generated at the source, for Deepseek API (#5633)
* Add message indicating that the 'Request mode reasoning' checkbox
controls whether reasoning is generated at the source, for Deepseek API.

* Added zai and moonshot to conditions for showing message indicating reasoning is enabled/disabled by 'request model reasoning' toggle..

* Added new message indicating openrouter's behaviour when 'request model reasoning' setting is disabled.

* fix: grammar

* fix: duplication for openrouter

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-05-13 22:43:37 +03:00
Leandro Jofré 597517730b Feat/New features for character expressions (#5574)
* update: improve fetching of selected default expression
It includes the fallback values #emoji and #none.

* update: allow expression-list to filter custom expressions
It can allow, filter out, or only include custom expressions in the result.

* update: separate getLastExpression from the slash command to use on macros

* feat: register defaultExpression macro
It will fetch the label of the currently selected global fallback expression.

* feat: register lastExpression macro
It will return the last expression used by the selected character.

* feat: register availableExpressions macro
Returns a list of all expressions provided by the Classifier API.

* update: fix macros labels

* update: normalize return label for defaultExpression macro

* Fix - Typos

* Update - Add compatibility with old macro engine

* Fix - Remove redundant structuredClone

* Update - Consider sprite folders to fetch the last expression used

* Update - Improve last message handling when name is provided

* Fix - Update description of getLastCharacterMessage

* Update - Bring back using active character as fallback for groups
Just weighted that if no name is provided, doing fallback to the active character generating prompt is more useful for groups than grabbing the expression used by another character, after randomly removing that prev commit.
2026-05-13 22:35:45 +03:00
44af6bc169 Update persona lore on WI rename (#5637)
* Fix personal lore stale update on rename (#5628)

* Add test for rename persona lore

Co-authored-by: Copilot <copilot@github.com>

* Fix stale update on personal lore rename

Co-authored-by: Copilot <copilot@github.com>

Given the recent work to fix #5610, this is a continuation to fix a
similiar bug in the persona lore.

* Add newline for linter check

---------

Co-authored-by: Copilot <copilot@github.com>

* feat: update links for other personas

---------

Co-authored-by: Unnatural Developer <40277404+unnaturaldeveloper@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
2026-05-13 22:04:03 +03:00
RojikkuandCohee 3913dfffb9 fix(content-manager) parseChubUrl should clean URL before relying on length (#5604)
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-05-13 22:03:26 +03:00
Tantoofaaz777 d08bbb1096 Skip inactive autocomplete repositioning (#5635) 2026-05-13 20:53:50 +03:00
Manthan AwganandCohee b1f5c29921 Refactor custom header and body handling in OpenAI scripts to use substituteParams function for improved parameter substitution. (#5627)
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-05-13 20:43:58 +03:00
Cohee bfff81bbf9 fix: event type in note-position command (#5624) 2026-05-12 00:54:26 +03:00
Unnatural DeveloperandCohee d5b6b7924b Fix stale chat bound lore name after rename (#5610)
* Add test to reproduce chat lore bug

Co-authored-by: Copilot <copilot@github.com>

Given that I wanted to reliably reproduce the bug, I created a playwright Docker container as part of this commit, along with the applicable unit test. The included docker-compose includes an environment variable that is passed for use by the frontend test harness, default to the host that the playwright and the ST instance containers are running on.

* Fix stale chat bound lore name after rename

Co-authored-by: Copilot <copilot@github.com>

Given the function renameWorldInfo and the resulting call to updateWorldInfoLinks, this fix ensures that if the world_info key in the chat_metadata is still set to the old name, it will be updated to the name

Resolves: #5608

* Start to separate test runner from branch

Given the bug fix for #5608 should be separate from the test runner
compose file, this commit removes the file from the branch associated
with the bug fix.

* Fix frontend test setup to check for login page

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

* Make change to eslint configuration

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

Given the updates to the setup of frontend-utils, configure eslint to
recognize browser and jquery specific globals

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-05-12 00:27:11 +03:00
CasualAutopsyandCohee e0c1dbad8f Add expand editor button to CC quick prompts (#5607)
* Add expand editor button to quick prompts

* fix: clean-up html

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-05-12 00:25:37 +03:00
ReithanandCohee 37b3e9e461 fix /tokens command returning inflated count for OpenAI API (#5601)
* fix /tokens command returning inflated count for OpenAI API

* Apply repo owner's patch to improve token counting fix

- Remove artificial 'role: system' wrapper that caused inflated counts
- Initialize token_count to 0 instead of -1
- Simplify web tokenizer to join message content directly
- Maintains caching functionality while fixing the overhead issue

* lint

* Revert to using cached implementation

* lint 2: revenge

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-05-12 00:19:48 +03:00
Wolfsblvt 29a18ce0c6 Refactor getUniqueName utility for allowBaseName option (#5602)
* feat: add allowBaseName option to getUniqueName utility function

* feat: simplify getUniqueName by removing allowBaseName option and changing default startIndex to 0
2026-05-05 22:33:04 +03:00
Cohee 51ad27fb86 Merge pull request #5591 from SillyTavern/staging
Staging
2026-05-03 18:45:46 +03:00
Cohee 982dfec022 Update release version number (#5590) 2026-05-03 18:44:24 +03:00
Forkoz 95ca4315bd Add encode_special_tokens to tokenizers.js (#5589) 2026-05-03 18:39:36 +03:00
Cohee 97392a4ca0 Refactor extension management and assets download menu (#5583)
* feat: refactor extension and asset management

* feat: refactor name selector

* fix: make text localizable

* fix: handle abort errors in extension version checks

* fix: replace returns with throws

* fix: remove debug prefix from toast

* fix: preserve file names of imported characters
2026-05-02 20:01:44 +03:00
Cohee e5ae782705 Add option to return malformed JSON string from extractJsonFromData (#5578)
* feat: add option to return malformed JSON string from extractJsonFromData
Fixes #5569

* fix: add fallback for Perplexity case
2026-05-02 18:31:06 +03:00
Cohee 9d61bbc3ed fix: npm audit package dependencies (#5572) 2026-05-02 17:41:39 +03:00
Cohee 3eb3861596 Extension clone improvements (part 2) (#5571)
* fix: remove the cloned directory if it contains no manifest

* fix: apply feature flag guard to user extension data hosting

* fix: disable inactive controls when feature flag is off

* fix: change response status to 404
2026-05-02 17:08:57 +03:00
CoheeandCopilot c325c6d8e9 Add account version tags to cookies (#5563)
* feat: add user account version to session cookie

Co-authored-by: Copilot <copilot@github.com>

* feat: include user handle in account version hash calculation

* feat: refactor recovery code generation to use a dedicated function

* fix: don't overwrite current session version if updating another user

Co-authored-by: Copilot <copilot@github.com>

* fix: reset session version instead of nullifying the entire session

* fix: short circuit and clear cookie on request invalidation

Co-authored-by: Copilot <copilot@github.com>

* fix: update account version on recovery

---------

Co-authored-by: Copilot <copilot@github.com>
2026-05-02 17:07:57 +03:00
Leandro Jofré 91c40280ed Update/Turn expression-set-fallback into expression-fallback (#5564)
* Update - Turn expression-set-fallback into expression-fallback
Make the extension a getter and setter instead of a setter only.

* Update - Rewrite the help string and add usage examples

* Fix - Remove the alias
2026-05-01 17:04:49 +03:00
CoheeandCopilot b2fa6a0afb Add rate limit to basic auth middleware (#5504)
* feat: add rate limiting to basic auth flow

* fix: round up retry-after duration

* feat: enhance point consume logic

* fix: move unauthorized webpage reading inside response function

* refactor: move getIpAddress to express-common

* fix: check for rate limit before checking creds

* fix: use correct rate limit pattern in /recover-step2

* feat: handle CF forwarded IP header in rate limit, whitelist and access logger

* feat: add individual config toggles for forwarded headers

* feat: enhance IP address retrieval to include forwarded IP for access logging

* chore: clean-up diff

* fix: don't consume points for missing credentials

* feat: log rate limited method and URL

Co-authored-by: Copilot <copilot@github.com>

* feat: make rate limiter points configurable

Co-authored-by: Copilot <copilot@github.com>

* feat: implement retry-after header for rate limiting responses

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-05-01 00:09:24 +03:00
DeathStalker471andCohee 4ca9863f38 feat: add nanogpt provider selection (#5544)
* add nanogpt provider selection

* update payg text

* fix: resync providers from endpoint

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-30 23:55:42 +03:00
Leandro Jofré 3a9c10d680 Feat - Add expression-set-fallback slash command (#5551)
* Feat - Add expression-set-fallback slash command

* Fix ESLint

* Fix - Use proper name convention for slash command method

* Fix - Change misleading expression-set-fallback help string label

* Fix - Use normal description for expression label argument

* Update - Make expression-set-fallback case unsensitive
Also fixed array creation by removing the spread syntax and added warning.
2026-04-30 23:41:04 +03:00
Reithan 338e35fc8a Fix json schema use for openAI compat CUSTOM endpoints in several use paths (#5561)
* pass jsonSchema options through sendStreamingRequest in Generate

* translate json_schema to response_format for CUSTOM chat completion source

* pass jsonSchema through generateGroupWrapper params in group chat generation
2026-04-30 23:38:01 +03:00
CoheeandCopilot 5512473b29 Extension management improvements (#5552)
* feat: enhance asset management with extension categories

Co-authored-by: Copilot <copilot@github.com>

* fix: enhance extension name validation in server endpoints

* feat: display extension author in the extensions list

* fix: unify server error response format

Co-authored-by: Copilot <copilot@github.com>

* feat: add splash on installing third-party for the first time

* fix: add URL format validation, unify validation error messages

Co-authored-by: Copilot <copilot@github.com>

* fix: apply object freeze to EMPTY_AUTHOR value

Co-authored-by: Copilot <copilot@github.com>

* fix: typecheck extensionName in API requests

Co-authored-by: Copilot <copilot@github.com>

* feat: add feature flag guard to extensions endpoints

Co-authored-by: Copilot <copilot@github.com>

* fix: parse URL before checking

Co-authored-by: Copilot <copilot@github.com>

* fix: use case insensitive regex check

* fix: make debug log more useful

Co-authored-by: Copilot <copilot@github.com>

* fix: add pre-validation of URL format and protocol

Co-authored-by: Copilot <copilot@github.com>

* fix: leaner installation success toast

* fix: settings data loss when extensions are disabled

* fix: don't try to auto-focus elements that don't exist

Co-authored-by: Copilot <copilot@github.com>

* fix: set Popup.defaultResult to negative

Co-authored-by: Copilot <copilot@github.com>

* revert: restore undefined default result

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-30 23:31:50 +03:00
Cohee 45f2951854 fix: temperature -> maxTemperature (#5554) 2026-04-29 03:26:27 +03:00
.:bubfix:. 44f433d10b Minor adjustments to the SVG icons. (#5546)
- Created an SVG version of the SillyTavern logo
- The modified images are 4 times smaller (-43.7 KiB), with no visible loss in quality
2026-04-29 01:34:52 +03:00
Cohee 08e1ce8ec5 Merge pull request #5549 from SillyTavern/release
Backmerge release into staging
2026-04-28 19:16:00 +03:00
Cohee aa50edcf45 fix: update backup archive to ignore migration secrets files (#5548) 2026-04-28 19:14:54 +03:00
CoheeandCopilot Autofix powered by AI 2e4ca3dabf fix: improve sanitation of toasts that bypass HTML escaping (#5540)
* fix: improve sanitation of toasts that bypass HTML escaping

* fix: replace absolute lib.js import with relative

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

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-04-28 01:00:31 +03:00
.:bubfix:. bd9479fef8 Better SVG for Kobold/KoboldCpp (#5543)
- 23 times smaller than the original.
- This time with genuine transparency.
2026-04-28 00:18:47 +03:00
crsp6447 940b3722cf Fix: Prevent crash in cachingAtDepthForOpenRouterClaude on empty content from trailing tool calls (#5541)
* Prevent crash in cachingAtDepthForOpenRouterClaude when message has no text

* Apply optional chaining suggestion
2026-04-27 23:53:14 +03:00
338119ab77 Implement private IP range request host validator (#5497)
* feat: implement private IP range request host validator for server-side HTTP requests

* feat: add link-local address support

* fix: use correct config keys

* fix: if config missing use default loopback addresses

* fix: re-use resolved address for connection

* test: add unit coverage for private request filter and proxy interaction

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/1813593e-2263-45e2-aa53-74d39515f1df

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

* test: remove request-proxy.test.js

* perf: cache resolved matches

* fix: remove unused import

* fix: use proper ipv4 loopback cidr

* fix: correct raiseError comment

* test: uses tls.connect for secure endpoints

* Implement private IP range request host validator

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/e76ba122-136e-43ad-b4bc-ea48a01fcdda

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

* Revert "Implement private IP range request host validator"

This reverts commit 14e2714702.

* fix: close request without sending status in CORS forwarding when headers were sent

* fix: not enabled -> disabled

* feat: add enableKeepAlive option to PrivateRequestAgent

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
2026-04-27 01:51:18 +03:00
WolfsblvtandCohee 1bb2a5ea19 Fix missing filename sanitization on V2 JSON character import + harden getPngName as safety nee (#5538)
* fix: sanitize character filenames on V2 JSON import and harden getPngName

- Add missing sanitize() call in importFromJson V2 spec branch to match all other import paths
- Sanitize data.name before readFromV2() so the name field sync happens automatically
- Add sanitize() as defense-in-depth inside getPngName() to catch future oversights
- Refactor getPngName() to use getUniqueName() utility for consistent name generation

* fix: sanitize data.name before readFromV2 in importFromPng and importFromCharX

Same bug as importFromJson: readFromV2() overwrites the top-level name
with the unsanitized data.name, undoing any prior sanitize() call.
Fix by sanitizing data.name before readFromV2 so the sync preserves it.

* fix: sanitize top-level name field in JSON and CharX import paths

* fix: incorrect path rejection in isPathUnderParent

* fix: increase maxTries in getPngName

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-27 01:13:19 +03:00
DeathStalker471andCohee 7201d87f2e feat: Add NanoGPT credit stats UI (#5537)
* Add NanoGPT credit stats UI

* fix lint

* fix: type check

* fix: migrate inline styles to css

* feat: add sub active date display

* feat: add link to balance page

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-27 00:13:06 +03:00
d327412e29 Chat Completion: common model sorting and grouping settings, improved NanoGPT model list (#5536)
* Improve NanoGPT Model List

* Update token multiplier condition to !== 1 to support showing discounts

* Add Model Sorting

* rework sorting to be more compact

* feat: combine CC model sorting/grouping settings

Co-authored-by: Copilot <copilot@github.com>

* fix: adjust migration logic

Co-authored-by: Copilot <copilot@github.com>

* feat: implement grouping for Chutes

* fix: apply review suggestions

* fix: call reconnect instead of direct status check

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 23:25:56 +03:00
CoheeandCopilot 97dba399e4 Implement S256 challenge in OpenRouter OAuth flow (#5501)
* feat: implement S256 challenge in OpenRouter OAuth flow

* fix: add error handling for missing OpenRouter authorization code

* fix: save verifier to accountStorage

Co-authored-by: Copilot <copilot@github.com>

* fix: comment on getVerifierKey

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-26 22:32:53 +03:00
Cohee 25fb4ceb50 fix: remove legacy filter state restoration (#5535) 2026-04-26 21:06:54 +03:00
Cohee c249e5384c feat: pass koboldcpp reasoning effort (#5491)
Fixes #5489
2026-04-26 00:02:07 +03:00
CoheeandCopilot 09d72828cb feat: add gemma 4 for AI studio (#5493)
* feat: add gemma 4 for AI studio

* fix: update max context return value for gemma-3n-e4b-it model

* refactor: iterate array of [regex, number]

* gemma4: enable tool calling and sysprompt

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-25 22:22:55 +03:00
CoheeandCopilot 09bb7622ed OpenAI: Add gpt-5.5, gpt-5.4-mini/nano, gpt-image-2 (#5529)
* feat: gpt-image-2 for OpenAI image generation

* gpt-5.5

Co-authored-by: Copilot <copilot@github.com>

* fix: adjust reasoning effort mapping

Co-authored-by: Copilot <copilot@github.com>

* fix: html format

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-25 21:46:52 +03:00
CopilotandCohee1207 7948886c1d Add Tool Call Recurse Limit slider to Chat Completion settings (#5518)
* feat: add Tool Call Recurse Limit slider to Chat/Message Handling settings

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/ecbde89f-8f4d-4e91-9189-a998d12ca76b

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

* feat: move tool call recurse limit to openai_settings under Chat Completion settings

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/132e4c28-9564-47cd-92c1-e8ab50d88905

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

* refactor: use CSS :has() selector instead of JS toggle for tool_call_recurse_limit_block visibility

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/c562deb5-05ce-4ebf-84a0-9eeea9d24433

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

* fix: wrap tool_call_recurse_limit_block in range-block for correct layout

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/4d25a367-ac12-4e54-83b0-1543eb6f370a

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

* fix: data-i18n attribute

---------

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-25 21:05:39 +03:00
feg 0a493cad89 add macro support for image caption extension prompt (multimodal) (#5527)
* added macro processing to caption ext

added
`prompt = substituteParamsExtended(prompt);`
to the captionmultimodal function
(so it can use macros and stuff)

* caption ext updated from old substituteparams

* removed comment
2026-04-25 20:14:45 +03:00
Christoph 29e3136473 fix: Don't apply layout hack in Firefox Mobile while editing text (#5531)
This fixes the following bug in Firefox Mobile on Android:

**Steps to reproduce:**

1. Swipe a word into the chat input edit field in Firefox Mobile on Android, for examples "Test".
2. In GBoard (default Android keyboard), tap on a different suggestion, for examples "Rest".

**Expected behavior:** The word "Test" is replaced with "Rest".

**Actual behavior:** The word becomes "TestRest".

I confirmed with bisecting that the commit f897a4ab1a introduced the issue.

This change fixes the issue by disabling the layout hack while editing text.
Disabling the layout hack is limited to Firefox Mobile because

* I could not reproduce the bug in Chrome on Android
* This way, if it causes a new bug, only Firefox Mobile users are affected
2026-04-25 19:56:52 +03:00
DeathStalker471andCohee b1ef254f78 fix: disable HTTP keepAlive (Node 18 behavior) with a config toggle (#5519)
* implement disable keepalive, handle request-proxy and config logic

* Invert keep-alive boolean setting

* fix: clean-up server.js diff

* fix: boolean flag type

* feat: disable keep-alive by default

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-24 22:53:35 +03:00
77cbcd8774 feat: add DeepSeek V4 model support with thinking mode and reasoning effort (#5522)
* fix: align DeepSeek provider with V4 API

* Fix DeepSeek beta routing for standard chat completions

* feat: add DeepSeek V4 model support with thinking mode and reasoning effort

* Address DeepSeek review feedback

* Set DeepSeek default model to v4 flash

* fix: clean-up deprecated models, add migration

* fix: move reasoning effort mapping to resolveReasoningEffort

* fix: lint empty line

* fix: remove duplicate code

* fix: add coder model to migration logic

---------

Co-authored-by: dclef <drclef233@gmail.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-24 21:47:30 +03:00
aecbb9a2ee feat: add MiniMax as a chat completion provider (#5452)
* feat: add MiniMax as a chat completion provider

Add MiniMax (https://www.minimax.io) as a first-class chat completion
provider. MiniMax already has TTS integration in SillyTavern; this
extends support to LLM chat completions via their OpenAI-compatible API.

Supported models:
- MiniMax-M2.5 (default) — 204K context
- MiniMax-M2.5-highspeed — same capability, faster inference

Key implementation details:
- Reuses existing SECRET_KEYS.MINIMAX (shared with TTS)
- API endpoint: https://api.minimax.io/v1
- Temperature clamped to (0.0, 1.0] as required by MiniMax API
- Returns hardcoded model list since MiniMax doesn't expose /v1/models
- Full UI integration: model selector, sampler parameters, streaming

Co-Authored-By: octo-patch <octo-patch@users.noreply.github.com>

* feat: upgrade MiniMax default model to M2.7

- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to model list
- Set MiniMax-M2.7 as default model
- Keep all previous models as alternatives

* feat: independent request function, vision support, temp clamping for MiniMax

- Extract sendMinimaxRequest() following Chutes pattern (PR #4844)
  with function calling and JSON Schema structured output support
- Clamp temperature to (0.01, 1.0] on backend; limit frontend UI max to 1.0
- Enable image inlining for MiniMax M2.7 model
- Add MiniMax to slash-commands model selector and tokenizer mapping
- Add minimax_model to default preset

* feat: add VLM-based vision support for MiniMax M2.7

M2.7 does not natively accept image input. When images are detected
in messages, pre-process them via the MiniMax VLM endpoint
(/v1/coding_plan/vlm) to convert images to text descriptions before
sending to the chat completions API. Uses the same API key.

* feat: add M2-her model to MiniMax provider

M2-her is MiniMax's dialogue/roleplay-optimized model with 64K context
and 2048 max completion tokens. Text-only (no vision).

* feat: add MiniMax China endpoint (minimaxi.com) support

Add endpoint selector (Global/China) for MiniMax, mirroring the
SiliconFlow pattern. Users can now choose between api.minimax.io
(international) and api.minimaxi.com (China domestic).

* fix: merge consecutive same-role messages for MiniMax

MiniMax API rejects consecutive messages with the same role with
error 'invalid chat setting (2013)'. Merge them before sending.

* review: address PR feedback on MiniMax provider

Backend (src/endpoints/backends/chat-completions.js):
- Drop the entire MiniMax VLM image-preprocessing path; vision is no
  longer advertised for this provider, so M2.7 messages now go straight
  to /chat/completions without a separate VLM round-trip.
- Drop the json_schema -> response_format mapping (MiniMax does not
  document structured-output support; relying on it was speculative).
- Drop the backend temperature clamp; the same clamp now lives in the
  frontend so the wire payload matches what the user sees.
- Drop the MINIMAX branch in /status that returned a hard-coded model
  list; the frontend hardcodes the same list and bypasses /status via
  noValidateSources, so the round-trip was wasted.
- Add a streaming Transform + non-streaming helper that move
  <think>...</think> blocks from delta.content / message.content to
  reasoning_content. MiniMax M2.x emit chain-of-thought inline in
  content; without this transform the raw <think> tags leak into the
  rendered chat. Includes a state machine that holds back partial
  marker bytes so a marker split across SSE chunks is still detected.

Frontend:
- public/scripts/openai.js: add MINIMAX to noValidateSources so the key
  is accepted without a /models call; remove the dead saveModelList
  branch; clamp temperature to (0.0, 1.0] in createGenerationParameters.
- public/scripts/reasoning.js: add MINIMAX to the non-streaming
  reasoning_content extraction case (the backend transform now produces
  this field for MiniMax responses).
- public/scripts/slash-commands.js: add MINIMAX to the /api enum and
  add a MiniMax case to /api-url so users can switch endpoint by
  command.
- public/scripts/custom-request.js: pass minimax_endpoint through the
  override-payload merge alongside the other per-source endpoint fields.
- public/scripts/tokenizers.js: stop returning openai_model (which was
  always a MiniMax model id and thus an unknown tokenizer); fall back
  to gpt-3.5-turbo for a coarse but functional estimate.
- public/scripts/tool-calling.js: add MINIMAX to supportedSources so
  function-calling settings are exposed.
- public/index.html: drop the "-- Connect to the API --" placeholder
  option from the model select (the model list is hardcoded and always
  populated); remove minimax from the vision data-source attributes
  on the inline-media controls.
- public/img/minimax.svg: replace the multicolor brand SVG with a
  single-color currentColor version that matches the other provider
  icons in the connect panel.

* review: drop backend <think> parsing, defer to frontend

Per reviewer feedback: SillyTavern's reasoningHandler / reasoning_auto_parse
setting already extracts <think>...</think> blocks on the client side, so the
backend doesn't need to rewrite MiniMax responses. Removes the SSE Transform,
the non-streaming helper, and the corresponding case in reasoning.js.

* fix: remove isImageInliningSupported declaration for MINIMAX

* fix: remove MINIMAX from stream reasoning parsing

* fix: add to autoconnect logic

* fix: add missing MINIMAX models from docs

* fix: freq. and pres. pen aren't supported for MINIMAX

* fix: use clamp function for adjusting temperature

* fix: pass minimax_endpoint from connection profile to ChatCompletionService

* fix: update supported APIs in slash command documentation

* fix: replace bespoke merge with standard MERGE_TOOLS processing

* fix: add data-i18n attributes for headers

---------

Co-authored-by: octo-patch <octo-patch@users.noreply.github.com>
Co-authored-by: octo-patch <octo-patch@github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-24 00:43:05 +03:00
StagnatingandCohee a028bec87b Display OpenRouter credit balance in UI (#5513)
* Display OpenRouter credit balance in UI

Adds a "View Remaining Credits" click handler that fetches the
current balance from the OpenRouter /credits endpoint via a new
server-side /api/openrouter/credits route, and renders it next
to the link. The anchor still points at openrouter.ai/account
so middle-click / right-click "open in new tab" keeps working.

* Return 500 on OpenRouter credits failure

* Reduce to two decimals

* Update view credits URL

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-23 23:21:28 +03:00
柚柚子 752ae243b9 Fix KoboldCpp vector hash deletion (#5508) 2026-04-23 23:03:59 +03:00
Theros efbff34342 feat: add getWorldInfoNames() to getContext() for WorldInfo enumeration. (#5505) 2026-04-23 11:24:10 +03:00
cloak1505 6d2165149b Sync OpenRouter providers list (#5503) 2026-04-22 22:04:15 +03:00
柚柚子 ff31ca6692 feat: add Adaptive-P controls for oobabooga (#5502)
* feat: add ooba adaptive-p controls

* fix: align ooba adaptive-p sampler order
2026-04-22 21:34:52 +03:00
4df18ccb0b Add Slug Parameter to Action Loader for Programmatic Identification (#5490)
* feat: add slug parameter to action-loader for programmatic identification

Add optional `slug` parameter to ActionLoaderHandle for easier identification via code or CSS. Update all loader.show() calls across the codebase to include descriptive slugs ('app-init', 'chat-rename', 'chat-delete', 'bulk-delete', 'chat-load', 'image-generation', 'legacy-loader'). Add data attributes (data-slug, data-loader-id, data-blocking) to toast content div. Expose slug via getter and make id private with getter.

* Apply suggestions from code review

Fix slug jsdoc wording

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

* fix: Add identifier to second loader in img gen

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-20 22:29:40 +03:00
TanJeeSchuanandCohee e5d4ff5fae Enhance Vectorize All process with error handling, retries and minor improvements (#5479)
* fix (vectors): Fixed Vectorize All progress report and ETA issues

* fix (vectors): Added strip reasoning block function for extras/WebLLM summaries

* feat(vectors): Retry failed summaries with configurable attempts

* feat(vectors): Skip summarization for short messages

* feat(vectors): Skip failed messages during Vectorize All instead of aborting all

Prevents the "Vectorize All" process from stopping on single-message
errors. Failed items are now skipped and reported at the end of the
session rather than aborting the entire sync.

Summarization: Implements per-message retries; failures use the original
text as a fallback or mark for skipping.

Vector Insertion: Differentiates fatal configuration errors (abort) from
transient batch failures (skip and notify).

* Resolved: 'account_id_missing' is missing

* Resolved: Refactored out summarizeSkipOnFailure() functionality into summarize() via options parameter

* Fix eslint and type checks

* feat(vectors): add types to maps and sets, improve summarize function options

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-20 02:33:12 +03:00
Wolfsblvt 8aeda4a101 Add Persona CRUD Slash Commands with Shared Avatar Utilities (#5466)
* Add persona CRUD slash commands with enhanced utilities

- Add `/persona-create`, `/persona-update`, `/persona-delete`, `/persona-duplicate`, and `/persona-get` slash commands for programmatic persona management
- Move `persona_description_positions` enum from power-user.js to personas.js for better encapsulation
- Add position and role parsing utilities (`parsePersonaPosition`, `parsePersonaRole`) with name-to-value mapping
- Extend `initPersona()` to accept optional position, depth, role, and lorebook parameters
- Refactor `deleteUserAvatar()` to delegate to new `deletePersona

* Add NaN validation for descriptionDepth parameter in createPersonaCallback

- Add isNaN() check for depth parameter after Number() conversion
- Display warning toast when invalid depth value is provided
- Fall back to DEFAULT_DEPTH when depth is NaN
- Change depth from const to let to allow reassignment after validation

* Refactor persona lookup to support avatar key targeting and fix enum provider currying

- Refactor `autoSelectPersona()` to accept optional `personaKey` parameter for targeting specific persona when multiple share the same name
- Replace manual persona lookup loops with `findPersona()` helper calls in `autoSelectPersona()` and `setNameCallback()`
- Update `setNameCallback()` to pass both persona name and avatar key to `autoSelectPersona()` for precise targeting
- Refactor `commonEnumProviders.personas()`
2026-04-20 02:26:08 +03:00
Wolfsblvt 15a3e3f072 feat: add click-to-edit support for reasoning blocks and auto-focus reasoning textarea (#5487)
Extend click-to-edit functionality to reasoning blocks in addition to message text. When clicking on a reasoning block, automatically focus the reasoning textarea after entering edit mode.
2026-04-20 02:11:42 +03:00
WolfsblvtandCohee 53f251c52a Fix: Prevent "Show More Messages" Button from Triggering Message Edit Mode (#5486)
* fix: prevent event bubbling on show more messages button

Replace mouseup/touchend with click event and add stopPropagation/preventDefault to prevent unintended event bubbling when loading more messages.

* Add hover style to "show more messages"

* add button role to show_more_messages

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-20 01:44:33 +03:00
WolfsblvtandCohee d8b3d36a84 Refactor: Replace SD image generation indicator with ActionLoader system (#5472)
* refactor: replace custom generation indicator with action-loader

Remove custom generation tracking (activeGenerations counter, generationToast) and replace with action-loader's non-blocking stoppable toast. Import loader from action-loader.js and use loader.show() with onStop callback in generatePicture() and generateMediaSwipe(). Remove updateGenerationIndicator(), startGenerationTracking(), and endGenerationTracking() functions. Remove manual stop button show/hide logic and generation counter updates

* Remove legacy stop button, add sentinel handler value

* fix: reassign loaderHandle in generateMediaSwipe

* feat: add data attributes to action-loader toast for easier selection

Add loaderId, title, and blocking data attributes to toast content div to enable programmatic identification and filtering of active loader toasts

* Revert "feat: add data attributes to action-loader toast for easier selection"

This reverts commit e8da27b4c9.

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-20 01:10:20 +03:00
Cohee b8f2b1cfa6 fix: enhance URL validation for Z.AI image generation (#5482)
* fix: enhance URL validation for Z.AI image generation and handle potential delays
Fixes #5480

* fix: retry 404 in a loop

* fix: handle Z.AI image and video unavailability with appropriate warnings and responses
2026-04-20 00:28:55 +03:00
Cohee b44b12b527 Add 'pm-render' command to refresh prompt manager content (#5483) 2026-04-20 00:07:25 +03:00
d720605be8 Bulk extension field updates via merge-attributes with UNSET_VALUE sentinel (#5471)
* feat: add bulk extension field updates with UNSET_VALUE sentinel for key deletion

- Add `UNSET_VALUE` sentinel constant to signal complete field removal from character cards
- Add `writeExtensionFieldBulk()` function to update extension fields across multiple characters in a single API call
- Add `deleteValueByPath()` utility function to remove nested object keys by dot-path
- Update `writeExtensionField()` to support `UNSET_VALUE` for deleting extension keys
- Extend `/api/characters/merge-attributes

* Revert package-lock.json changes

* Allow null values in merge-attributes filter path validation

Change filter.path existence check to only skip on undefined, not null. This allows merging attributes when the existing value is explicitly null, treating null as a valid value rather than absence of a value.

* fix: share forbiddenRegExp between modules

* feat: add writeExtensionFieldBulk and UNSET_VALUE constant to getContext

* Update src/endpoints/characters.js

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

* fix: validate for .png extension

* Update public/scripts/extensions.js

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

* refactor: extract shouldSkip logic as a function param to avoid double parsing

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-20 00:06:28 +03:00
b436971a09 fix: correct typo in cacheScores debug log and add JSDoc to filterDataByState (#5468)
* fix: limit max-height of select[multiple] on mobile to prevent Chrome 145+ full-screen rendering (fixes #5242)

* fix: correct typo in cacheScores debug log and add JSDoc to filterDataByState (fixes #5252)

* fix: Correct jsdoc syntax

---------

Co-authored-by: octo-patch <octo-patch@github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-19 22:04:45 +03:00
Octopusandocto-patch a678299700 fix: limit max-height of select[multiple] on mobile to prevent Chrome 145+ full-screen rendering (fixes #5242) (#5467)
Co-authored-by: octo-patch <octo-patch@github.com>
2026-04-19 21:54:10 +03:00
Wolfsblvt 552936a0d8 fix: exclude other group members' reasoning from prompt context in group chats (#5473)
In group chats, only include reasoning from the currently generating character instead of all group members. This prevents reasoning from other characters being injected into the prompt context when generating responses.

- Filter reasoning in coreChat loop based on message author matching name2
- Filter reasoning in setOpenAIMessages based on message author matching name2
- Add isOtherGroupMember check before adding reasoning to messages
2026-04-19 16:08:52 +03:00
ashishch432 d1e719eb48 add claude-opus-4-7 (#5465) 2026-04-19 15:47:40 +03:00
Wolfsblvt 4003251c2f Increase Top K max value from 200 to 500 for text generation WebUI (#5474)
Raises the maximum allowed Top K sampling parameter from 200 to 500 in both the range slider and number input controls to support higher token selection limits.
2026-04-19 15:20:06 +03:00
awaaeandCohee 767746beb2 WI: Rename "New" button to "Create"
* Fix internationalization issues

* fix(i18n): update world creation key and zh-cn translations

Changes the i18n key for the world editor's "New" button to "Create" to
avoid conflict with listing filters. Updates the Chinese translation
for the "New" key to "最新" (Latest).

* fix(i18n): correct translation key for world creation button

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-16 21:12:58 +03:00
EnerccioandPeter Vanusanik 277285d30c implemented emit events for itemized-prompts.js (#5461)
* implemented emit events for itemized-prompts.js

* removed redundant ITEMIZED_PROMPTS_DELETED_ALL event and updated emit logic accordingly

---------

Co-authored-by: Peter Vanusanik <pvan@bach.cz>
2026-04-16 21:10:19 +03:00
WolfsblvtandCohee 0ac31c8fcd Enhanced /persona-sync Command with Range, Name Filter, and Quiet Mode (#5460)
* Add range and silent parameters to /persona-sync command with optional confirmation suppression

- Add optional start/end range parameters to syncUserNameToPersona() function
- Add silent parameter to suppress confirmation popup when needed
- Update /persona-sync slash command to accept range argument (index or range string) and named silent argument
- Parse range using stringToRange() utility, default to full chat if not provided
- Update confirmation message to reflect whether syncing all messages or specified

* Add `from` named argument to /persona-sync command for filtering by persona name

- Add `from` named argument to filter messages by persona name (case-insensitive)
- Rename `silent` argument to `quiet` with inverted default (true) for consistency
- Add userMessageNamesEnumProvider() to provide autocomplete for existing user message names in chat
- Update syncUserNameToPersona() to accept nameFilter parameter and filter messages accordingly
- Update confirmation message to reflect name filtering when

* Add async/await wrapper to sync_name_button click handler for proper promise handling

Function now has arguments, so using just the function as the event is shown as wrong usage

* Post-merge imports fix

* Use canonical command name in examples

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-15 23:41:10 +03:00
Cohee 3f72d3df80 Improve OpenRouter model lists in extensions (#5459)
* fix: extensions OpenRouter model lists

* fix: update JSDoc for optional mapping function parameter in fetchModelsByModality

* fix: update JSDoc to clarify return type of fetchModelsByModality function

* fix: encode output modality in fetchModelsByModality API request
2026-04-15 23:18:26 +03:00
Reithan 051346c517 Enable interleaved tool reasoning for custom OpenAI-compat endpoints (#5445)
* enable interleaved tool reasoning for custom OpenAI-compat endpoints

Add chat_completion_sources.CUSTOM to interleaved_reasoning_providers so
that local OpenAI-compatible endpoints (e.g. KoboldCPP in Chat Completions
mode) can forward reasoning context in tool-call chains when the user has
configured Interleaved Thinking.

Also expose the Interleaved Thinking UI control for the Custom source so
users can actually opt in — previously the dropdown was hidden behind a
data-source="openrouter" guard.

The custom streaming path already correctly accumulates delta.reasoning_content
from streaming chunks; this change only removes the provider gate that was
silently discarding that data before it reached the API payload.

* don't override invocation reasoning with prior-turn assistant reasoning

When an invocation already has its own reasoning captured at execution
time, preserve it instead of replacing it with previousAssistantReasoning
from the backward scan. The override was correct when invocations never
carried their own reasoning, but now that the custom/openrouter paths
capture per-invocation reasoning, the unconditional replacement caused
all tool calls in a chain to receive the same stale reasoning from an
earlier unrelated assistant turn.

Fall back to previousAssistantReasoning only when clone.reasoning is empty.
2026-04-15 23:16:39 +03:00
CasualAutopsy af7bd65f42 Impersonate with last_input_sequence (#5456) 2026-04-15 22:43:41 +03:00
CopilotandCohee1207 78628f7dbb Integrate Cloudflare Workers AI text-to-image into SD extension (#5434)
* feat: integrate Cloudflare Workers AI for text-to-image generation in SD extension

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/efc79e4d-2119-4cdb-8afb-f26e318a38ef

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

* fix: address review - use oai_settings for account ID, sort dropdown alphabetically, remove Account ID input, move debug log

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/bf0dda38-df40-44f4-8a63-0c952b48905d

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

* Clean-up diffs

* feat: add refresh models button to Workers AI section

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/ab6b5e7a-84d2-44d1-9f6e-3d330de04ef1

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

* fix: revert unrelated package-lock.json changes

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/ab6b5e7a-84d2-44d1-9f6e-3d330de04ef1

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

* Fix models loading

* refactor: update model refresh button ID and add class to select elements

* Send formData to BFL models

* fix: adjust use FormData condition

* fix: validate Workers AI account ID before proceeding with image model loading

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-04-15 22:00:08 +03:00
WolfsblvtandCohee 64c96e895c Add Streaming Display Utility and New Generation Slash Commands (/genstream, /reasoning-format) (#5438)
* Add StreamingDisplay class for live LLM generation output with floating toast panel

- Add StreamingDisplay class to show streaming reasoning and content in a floating toast panel
- Extract createModelIcon() helper from insertSVGIcon() for reusable API/model icon creation
- StreamingDisplay automatically appends inside topmost open dialog (same pattern as fixToastrForDialogs)
- Add CSS with fade-in animation, pulsating activity indicator, and separate reasoning/content sections
- Support optional model icon in header

* Add ConnectionManagerRequestService.getProfileIcon() method for retrieving profile API icons

- Add static getProfileIcon() method to ConnectionManagerRequestService
- Returns HTMLImageElement created via createModelIcon() for a given profile's API/model
- Accepts optional profileId parameter, defaults to currently selected profile
- Returns null if Connection Manager is disabled, profile not found, or profile has no API
- Import createModelIcon from script.js

* Use animation_duration directly in hide() and CSS transition instead of constant

- Remove ANIMATION_DURATION_MS constant and use animation_duration directly in hide() method
- Replace hardcoded 0.3s CSS transitions with CSS variable var(--animation-duration, 125ms)
- Read animation_duration value inline in hide() for accurate timing

* Add /genstream slash command with live streaming display and reasoning support

- Add /genstream slash command that generates text via Connection Manager with live streaming UI
- Add formatReasoning() helper function (inverse of parseReasoningFromString) to format reasoning/content into template-wrapped strings
- Add connectionProfiles enum provider for profile selection in slash commands
- StreamingDisplay: add delay parameter to hide() method (default 1000ms) to show final result before dismiss

* Add /reasoning-format slash command to format reasoning and content into template-wrapped strings

- Add /reasoning-format (alias: /format-reasoning) slash command that wraps reasoning/content using Reasoning Formatting settings
- Accept required 'reasoning' named argument and optional unnamed 'content' argument
- Validate that prefix/suffix are configured before formatting
- Return formatted string via formatReasoning() helper for use with /reasoning-parse
- Show warning toasts if prefix/suffix missing

* Rename /genstream command to /profile-genstream and move to appropriate module

* Apply messageFormatting to StreamingDisplay reasoning and content text for proper rendering

- Import messageFormatting from script.js
- Replace textContent with innerHTML using messageFormatting() in updateReasoning() and updateText()
- Pass isSystem=true for reasoning, isSystem=false for content to match formatting expectations
- Update css to utilize pre-formatted paragraphs correctly

* Strip auto-added quotes from <q> tags in StreamingDisplay and add 'mes_text' class for consistent chat message formatting

- Add CSS rules to remove browser-default quotes from <q> tags in reasoning and content sections
- Add 'mes_text' class to textContent div to match chat message formatting behavior
- Prevents double quotes when messageFormatting already adds them via <q> tags

* Add minimize/close buttons and complete state to StreamingDisplay with configurable auto-hide

- Add minimize button to collapse/restore content sections while keeping header visible
- Add close button to manually dismiss display (generation continues in background)
- Replace CSS pseudo-element with explicit LED indicator element for better state control
- Add complete() method to mark generation done: changes LED from pulsing orange to solid green
- Add configurable auto-hide delay after completion

* Add stop button to StreamingDisplay with abort support and onStop/onComplete closures for /profile-genstream

- Add stop button to StreamingDisplay when onStop handler is provided
- Add markStopped() method with solid red LED state indicator
- Add AbortController integration to /profile-genstream for request cancellation
- Add onStop and onComplete closure arguments to /profile-genstream command
- Update complete() method signature to use options object with label and delay
- Disable stop button immediately

* Position StreamingDisplay above bottom form block using CSS variable with fallback

- Change bottom positioning from fixed 20px to dynamic calculation
- Use max() to position above --bottomFormBlockSize + 5px or minimum 20px
- Ensures StreamingDisplay doesn't overlap with bottom UI elements

* Rename /profile-genstream arguments for clarity: label→generating, completedLabel→completed, hideDelay→delay

- Rename `label` argument to `generating` to better reflect its purpose as the in-progress state label
- Rename `completedLabel` to `completed` for consistency and brevity
- Rename `hideDelay` to `delay` for simpler naming
- Update all internal references and variable names to match new argument names
- Update argument descriptions and default values accordingly

* Remove variable resolution from /profile-genstream arguments: system, length, and delay

- Remove ARGUMENT_TYPE.VARIABLE_NAME from typeList for system, length, and delay arguments
- Replace resolveVariable() calls with direct argument access for system, length, and delay
- Simplify type checking to use typeof directly on args properties
- Maintain existing default values and validation logic

* Add warning toast and early return when connection profile not found in /profile-genstream

- Display toastr warning when fuzzy search fails to find matching profile
- Return empty string to prevent execution with invalid profile
- Improves user feedback for incorrect profile names or IDs

* Extract buildResultText() helper in /profile-genstream to return partial results when stopped

- Add buildResultText() helper function to centralize result formatting logic
- Return partial generated text when user stops generation instead of empty string
- Reuse buildResultText() for both stopped and completed states
- Maintains consistent reasoning formatting in both cases

* fix lint

* Update documentation to reflect argument name change from hideDelay to delay

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-15 21:38:13 +03: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
Cohee e3b866b5d2 Merge pull request #5154 from SillyTavern/staging
Staging
2026-02-14 17:46:49 +02:00
HimeHina df0e1256e6 Fix: HTTP Basic Auth fails when password contains colons (#5153)
* Fix: HTTP Basic Auth fails when password contains colons

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

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

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

* Add NanoGPT embeddings support for Vector Storage

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

* Fix models loading

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-14 00:31:30 +02:00
Cohee 266f3ade0d Fix: skip generating thumbnails for APNG
Backported from #5113
2026-02-13 01:23:44 +02:00
Cohee 1e49f3d4f1 Fix: allow serving thumbnails that start with a dot 2026-02-13 01:07:24 +02:00
Cohee 614f404390 Revert "add char-archive to whitelistImportDomains"
This reverts commit 13099c43a9.
2026-02-12 23:40:30 +02:00
TosdandTosd0 a1204a4438 Update zh-CN translations (#5145)
* fix(index.html): typo

* Update zh-CN translations

* Add missing zh-CN translation

---------

Co-authored-by: Tosd0 <65720409+Sevenyine@users.noreply.github.com>
2026-02-12 22:06:37 +02:00
Cohee 3b21f856aa Fix npm audit 2026-02-12 21:31:18 +02:00
Cohee a5aff87b1d Merge branch 'release' into staging 2026-02-12 00:41:56 +02:00
Wolfsblvt 953d9f34cb Macros 2.0 - list-supported Macros Autocomplete Improvements (#5135)
* fix(macros): prevent list-arg macros from accepting scoped content

List-arg macros now correctly reject scoped content since they only accept arbitrary inline arguments. Updated validation logic in autocomplete, scope detection, and CST walker to check for `list === null` before allowing scopes. Also improved list item hint display to show total count when typing additional items.

* feat(macros): display min/max constraints for list arguments in autocomplete hints

Add visual indication of list argument constraints by showing min/max values in autocomplete hints. List items now display "(list, min: X, max: Y)" or "(variable-length list)" when no constraints exist. Includes new CSS styling for smaller, dimmed hint text.

* feat(macros): validate list argument min/max constraints and improve warning display

Add validation for list argument constraints (min/max) with specific error messages when too few or too many list items are provided. Continue highlighting current argument position even when warnings are present (except where semantically invalid), allowing users to navigate back to valid arguments while seeing "too many arguments" warnings.
2026-02-12 00:32:17 +02:00
CopilotandCohee1207 1b5d65e34c Add GLM-5 to Z.AI model list (#5138)
* Initial plan

* Add glm-5 to Z.AI model list with 200k context

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-12 00:21:08 +02:00
CopilotandCohee1207 626b324fe0 Add "✨ Vibe Coded" label to PRs created by @Copilot (#5137)
* Initial plan

* Add label-copilot-prs job to automatically add "✨ Vibe Coded" label to PRs created by @Copilot

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-12 00:06:27 +02:00
CopilotandCohee1207 50e566ee0d Set HTML lang attribute from app locale to enable CSS hyphens: auto (#5136)
* Initial plan

* Set HTML lang attribute based on app locale to enable CSS hyphens: auto

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-11 23:58:10 +02:00
Cohee 9714374749 Preserve user input on tool call recursion (#5134)
Supersedes #5129
2026-02-11 22:49:39 +02:00
Cohee 00a61d370b Fix npm audit 2026-02-11 21:30:35 +02:00
awaaeandCohee 10e08f0e3d feat(server): make CORS middleware configurable (#5123)
* feat(server): make CORS middleware configurable

Add detailed configuration options for CORS in config.yaml, including
origin, methods, headers, credentials, and max age. Update server
initialization to apply these settings dynamically instead of using
hardcoded values.

* fix(server): Fix default value and conditional logic issues in CORS configuration

- Changed the default value of `cors.maxAge` from `null` to `0`.
- Simplified the conditional check logic for `allowedHeaders`, removing duplicate checks for `corsAllowedHeaders` being `null`.

* fix(server): Fix CORS exposed headers configuration logic

- Removed redundant conditional checks. now directly validates array length when `corsExposedHeaders` has a truthy value

* Improve types + simplify checks

* fix(cors): align maxAge default with original behavior

* Adjust default array values

* Remove debug log

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-11 21:27:45 +02:00
CopilotandCohee1207 23ba3e5bb2 Add rename buttons for ComfyUI workflows and style presets (#5124)
* Initial plan

* Add rename buttons for ComfyUI workflows and style presets

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

* Address review feedback: pencil icon, filename validation, 204 status, error prefix, frontend duplicate check, re-render styles select

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

* fix: ensure existing workflow check only considers HTMLOptionElement instances

---------

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-09 23:04:34 +02:00
thecaptain789andthecaptain789 1961fb59c0 fix: correct typo 'seperated' to 'separated' (#5121)
Co-authored-by: thecaptain789 <thecaptain789@users.noreply.github.com>
2026-02-09 20:09:39 +02:00
Cohee 8e911af031 ImgGen: default to selected style name on save click 2026-02-08 02:50:00 +02:00
Cohee bee4d9a818 fix: sync swipes only when chat is not pristine to ensure macro resolution (#5106) 2026-02-08 02:35:14 +02:00
Wolfsblvt 9f4449973b Macros 2.0 - Optional scoped content + improved closing-tag autocomplete (#5117)
* feat(macros): Add optional scope detection and improved closing tag autocomplete

- Implement `isScopeOptional()` to detect when scoped content is optional based on macro argument requirements
- Filter optional scopes from autocomplete hints unless force-triggered (Ctrl+Space)
- Add "OPTIONAL" badge styling for optional scoped content in autocomplete UI
- Show multiple closing tag suggestions (innermost to outermost) with priority ordering
- Display nesting level information for nested optional scopes

* fix(autocomplete): show original macro details when typing closing tags

Add nameOffset=2 to MacroClosingTagAutoCompleteOption to skip {{ prefix for fuzzy highlighting. When typing closing tags ({{/macroName}}), detect and show the original macro's details instead of "no match" error by looking up the macro definition and creating a non-selectable context option with no argument highlighting.
2026-02-08 02:25:21 +02:00
L 788ed3d323 Background sort feature (#5107)
* Add background sort by date added feature

* reapply search after changing sort

* overengineer it

* use sortIgnoreCaseAndAccents

* make enum for sort options
2026-02-08 02:10:48 +02:00
cloak1505 300912237d Sync OpenRouter providers list (#5110) 2026-02-06 22:48:25 +02:00
Cohee 4e5cb9c44f Prevent accidental chat overwrites when switching between characters/groups 2026-02-05 23:47:17 +02:00
DeclineThyselfanduser b64c279473 Add clearData option to clearChat function (#5091)
* Centralized `await clearChat();` and `chat.length = 0;` into `wipeChat()`

* Added `clearData` argument to `clearChat`.

---------

Co-authored-by: user <user@exmaple.com>
2026-02-05 23:39:36 +02:00
Cohee 12014a993c Fix npm audit 2026-02-05 23:16:52 +02:00
LandCohee 4550afd4ca Backgrounds metadata population and frontend colors (#5092)
* Startup and on-demand check

* Update comments, add color preload

* remove redundant metadata generation

* changed image-metadata/all from GET to POST

* move initializeAllUserMetadata to image-metadata.js, make blocking (?)

* Add type annotations

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-05 22:45:56 +02:00
Leandro JofréandCohee 992fd8f01d Feat/Allow to bulk toggle all third-party extensions from Manage Extensions (#5094)
* Feat - Allow to bulk toggle all third-party extensions from popup manager

* Fix - Prevent reloading the page if the final state is the same

* Fix - Handle bulk toggle with no extensions installed

* Update - Delete leftover debug logs

* Fix - Simplify extension toggle logic and improve readability

* Update - State that bulk toggle only affects external extensions

* Feat - Allow to restore bulk toggled extensions

* Update - Move bulk toggle to the third-party extensions header

* Uncenter section headers

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-05 22:24:44 +02:00
LumiandCohee 39c8eb343c add option for claude-opus-4-6 (#5103)
* add option for claude-opus-4-6

* fix: add claude-opus-4-6 to limited sampling and verbosity model lists

* fix: disable assistant prefill for claude-opus-4-6

* refacor: merge fixthinkingPrefill and noPrefillModel

* 1m context

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-05 21:42:27 +02:00
Kristy AureliaandCohee d6fafdd983 Add Minimal Prompt Processing option (#5095)
* Implement Minimal Prompt Processing

* Fix and rename cmd argument.

* Whitespace

* Handle processing selection with a enum

* Update processing argument description

* Fix typo in minimal prompt processing label title

* Add missing semi

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-05 01:38:55 +02:00
Wolfsblvt 34688f8493 chore(wi): Add logSlashCommandWarn utility and integrate into world-info slash commands (#5096) 2026-02-05 01:04:14 +02:00
WolfsblvtandCohee 06b77ec94c Macros 2.0 - Improve Autocomplete edge cases on completing macros (#5093)
* fix(autocomplete): handle nested macros in :: separator parsing

Track nesting depth when parsing macro parts to avoid treating :: inside nested macros as separators. Increment depth on {{ and decrement on }}, only recognizing :: as a separator when nestedDepth is 0.

* chore(autocomplete): add missing properties for non-variable macros

Add `variableNameEnd` and `variableOperatorEnd` fields to track end positions of variable components in macro parsing context.

* fix(autocomplete): stop macro parsing at newlines before first :: separator

Prevent newlines before the first :: separator from being included in macro identifier/space-arg parsing. Track separator state and break early when encountering newlines at depth 0 before any :: is seen. Only include the last part if cursor is within its bounds to avoid extending macro context across line breaks.

* fix(autocomplete): handle cursor position after closing braces in macro detection

Skip closing }} when searching backwards if cursor is immediately after them, treating them as the target macro's closing braces rather than nested braces. Skip forward search entirely when cursor is after }}, using cursor position as closePos directly.

* fix(autocomplete): show macro details when typing closing brace and add no-match indicator

Track `isTypingClosingBrace` state when cursor is after a single `}` on standalone macros (no separators/args). Strip trailing `}` from identifier in this case. Show matching macro details when typing closing brace, same as when typing args. Add "no match" error option when typing args/closing brace but identifier doesn't match any macro. Extract `AnyMacroAutoCompleteOption` typedef for cleaner type annotations

* fix(autocomplete): show variable context when typing closing brace on shorthand macros

Detect `isTypingClosingBrace` state for variable shorthands (e.g., `{{.Lila}`, `{{.Lila+=4}`). Parse value before brace detection to check for trailing `}`. Show non-selectable context options (variable name, operator, value) when typing closing brace instead of operator/value suggestions. Strip trailing `}` from value when detected. Set `resultStart` to cursor position when typing closing brace to avoid replacement

* fix(autocomplete): stop flag parsing at newlines and show context when typing closing brace on variable shorthands

Skip newlines (not just all whitespace) between flags to prevent extending macro context across line breaks. Show variable context (name, operator, value) when typing closing brace on shorthand macros by excluding `isTypingClosingBrace` from the value-typing check.

* Fix highlight of value autocomplete option

* Rename permanentMatch to forceFullNameMatch

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-05 00:20:50 +02:00
Cohee 2fda8ca003 Update chevrotain and remove dependency override 2026-02-04 00:20:26 +02:00
Leandro Jofré 925ee10560 Fix - Do not spam saveSettingsDebounced setting an item in AccountStorage (#5090) 2026-02-03 23:09:50 +02:00
LandCohee f5b5350cf4 /image-metadata (#4788)
* git push --force

Implement background management in json

lint

upload multer weirdness, fix for timestamp

* remove duplicated logic to generate backgrounds.json

* remove duplicate logic to create backgrounds.js

* remove excessive enodent eror handling

* simplify shared extension constants

* move backgrounds.json to backgrounds/index.json

* use plimit

* move user directory iteration to syncBackgroundsMetadata insetad of server main

* create and move getBackgroundThumbnailResolution

* nitpick

* typdef

* simplify checks

* use read method

* error -> regenerate

* use fileExists

* type error fix (maybe)

* add object to jsdoc returns

* typo

* use getUniqueName from util.js

* remove duplicated multer something or other

* make skipped_extensions a set

* remove strict comparison

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

* create isAnimatedWebP and use it

* use file creation date instead of server date

* actually type BackgroundImageMetadata

* use fileExists instead of try catch

* response.sendStatus(500);

* sync json to allow adding images to the folder without restart

* lint

* Generic image metadata endpoint. Remove tags and starred. No startup sync.

* lint

* Descriptive json and move to util.js

* remove folders routes

* It's a POST

* Revert file name to index.json

* Type errors fixing

* Remove p-limit

* Why?

* apply codex suggestions

* see comment

* remove unused functions

* remove path normalization for da path, not needed

* Fix dimensions shadowing issue, circular imports, and apply bg res to only bg

* move thumbnailsEnabled to the top level

* Metadata now stored at {userDataRoot}/image-metadata.json instead of per-folder index.json
Uses relative paths as keys (e.g., backgrounds/sunset.png) for easy file existence checking
Added cleanupOrphanedMetadata() function and /api/image-metadata/cleanup endpoint for data-maid integration
Simplified the API endpoint by removing folder-grouping logic

* lint

* update backgrounds.js imports

* security check, .replaceAll

* Remove useless function, pass type to cache invalidate and seperate file types

* fix: normalize file paths to use POSIX separators in metadata functions

* serve original

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-03 01:53:29 +02:00
Cohee 5c62cf4a6e fix: restore cross-message text search 2026-02-02 08:19:51 +00:00
Cohee ad88acc980 perf: Use null matcher when no query 2026-02-02 03:35:16 +02:00
Cohee e5c14af76d fix(welcome-screen): only scroll to elements not in viewport 2026-02-02 01:49:07 +02:00
Cohee 3f8acaad4e Refactor /search to use per-line async parsing (#5085)
* Refactor /search to use per-line async parsing
Supersedes #5047

* Use named type

* Cache query fragments, add file name match

* Skip invalid chat files in search

* Remove extensions from /search results

* Use file_id when appropriate

* Revert "Use file_id when appropriate"

This reverts commit aaa0274b53.

* Clean-up file extension handling

* Move extension append down for non-group
2026-02-02 01:44:15 +02:00
Cohee cf587bc766 fix(translate): update translator to use fetch for request function 2026-01-31 18:56:49 +02:00
BriochandCohee 6c864e8bb2 feat(openrouter): add model quantizations setting (#5080)
* feat(openrouter): add model quantizations setting

* Remove bogus setting

* Simplify nullish coalescing assignment

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-30 23:51:22 +02:00
Cohee bba43f3321 Merge branch 'release' into staging 2026-01-29 00:46:46 +02:00
Cohee f63399a4f9 Fix: don't overwrite group_only_greetings 2026-01-29 00:46:30 +02:00
StageDog 3ac70790ff fix: welcome depth (#5077) 2026-01-29 00:27:49 +02:00
Jay4242andCohee 12452491cb Stable diffusion.cpp server support (#5074)
* feat: Add stable-diffusion.cpp server endpoints

* feat: Add stable-diffusion.cpp server settings

* feat: Add stable-diffusion.cpp server

* Add debug log for sdcpp payload

* feat: add loadSdcppSamplers and loadSdcppSchedulers for sdcpp backend

* feat: add sdcpp to sampler and scheduler source lists

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-29 00:24:45 +02:00
Cohee 10e8e01a55 Moonshot: Map "Request reasoning" to thinking type
Fixes #5072
2026-01-28 00:55:11 +02:00
Cohee 578ef7eb6c /beep or /ding 2026-01-28 00:33:58 +02:00
Cohee 0e5b4de10c Moonshot: Pull vision flag from model data
Fixes #5068
2026-01-28 00:26:50 +02:00
Crush0andCohee eaa6a00e97 Volcengine tts (#5003)
* feat(tts): Add support for Volcengine TTS provider

* refactor: Remove the redundant comments in the Volcengine TTS-related code.

* fix(volcengine): Fix the audio data processing logic in the voice generation interface

* feat(tts): Enhance Volcengine TTS functionality and improve error handling

- Return more detailed error information when generating voice fails
- Add multiple preset voice options and support custom voice management
- Reconstruct the audio stream processing logic to enhance reliability
- Improve the UI interface, adding a voice selection dropdown menu and operation buttons

* refactor(tts): Optimize the code structure and error handling of the Volcengine TTS provider
- Remove the unused "voices" array and "model" parameter
- Improve the text processing logic, eliminating unnecessary separators
- Standardize the error handling logic, simplifying the status code checks
- Fix the DOM operation method, using "createElement" instead of string concatenation
- Ensure the existence check of the "customVoices" array

* Fix: Change the Content-Type of the audio response to audio/mpeg.

* Clean-up

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-26 20:45:38 +02:00
ef25a03650 Expose character update APIs for extensions (#5062)
* Expose character update APIs for extensions

Add getCharacterSource, importFromExternalUrl, and importTags to the
extension context (SillyTavern.getContext()). This allows extensions to:

- Get the source URL for a character (Chub, etc.)
- Import/update a character from an external URL
- Import tags from a character's embedded tag data

These functions already exist and are used internally but were not
exposed to extensions. This enables extension developers to build
features like bulk character update checking and tag synchronization.

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

* Fix review comments

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-26 20:38:23 +02:00
Cohee 5a7875ba28 Update Pollinations API (#5060)
* Upgrade Pollinations API
Done: text, caption
To do: TTS, image
Fixes #5020

* Update Pollinations TTS to new API

* Update Pollinations API for images
2026-01-26 20:31:13 +02:00
Cohee ffa01d80a6 Add macros autocomplete to alternate greetings 2026-01-23 23:51:06 +02:00
WolfsblvtandCohee 9ff9d59672 Macros 2.0 (v0.7.1) - Macro Autocomplete everywhere (#5019)
* Add macro autocomplete for free text inputs

Implements macro autocomplete (`{{`) for textareas and input fields marked with `data-macros` attribute. Extracts shared autocomplete logic into MacroAutoCompleteHelper.js for consistency between slash command and free text contexts. Includes MutationObserver for dynamic element initialization and supports variable shorthands, operators, flags, and scoped macro closing tags.

* fix annoying circular dependency again

* Add `data-macros` attribute to enable macro autocomplete on text inputs

Enables macro autocomplete (`{{`) for various textareas and input fields throughout the UI by adding the `data-macros` attribute. Includes context template fields, instruct mode sequences, character/persona descriptions, world info content, and other prompt-related inputs. Also ensures the attribute is preserved when expanding editors and creating world info entries.

* Allow macro autocomplete in editing messages

Enables macro autocomplete (`{{`) when editing messages by adding the `data-macros` attribute to the dynamically created edit textarea element.

* Add autocomplete visibility setting support for macro autocomplete

Respects the global STScript autocomplete visibility setting (`power_user.stscript.autocomplete.state`) for macro autocomplete in free text inputs. When set to "Input length > 1", macro autocomplete only activates after typing `{{` plus at least 2 characters. Also adds a tooltip to the visibility setting explaining it applies to both slash commands and macros.

* Fix unclosed div tag in STScript autocomplete visibility setting

Closes the `<div>` tag that was incorrectly left open in the autocomplete visibility setting markup.

* Add setting to control macro autocomplete visibility in non-expanded fields

Introduces a new `showInAllMacroFields` setting that controls whether macro autocomplete appears in all macro-enabled fields or only in expanded editors and when pressing Ctrl+Space. Also adds `data-macros-autocomplete` attribute support with `always` and `hide` modes for per-field override. When the setting is off, autocomplete only shows in expanded editors (which now get `data-macros-autocomplete="always"`) and the completion

* Add `data-macros-autocomplete-style` attribute to control macro autocomplete popup size

Introduces a new `data-macros-autocomplete-style` attribute with `small` (33vw, max 700px) and `expanded` (default chat width) modes to control macro autocomplete popup dimensions. The `small` style is now the default for inline fields, while `expanded` is used for expanded editors and prompt manager. Also refactors `getAutocompleteMode` to return `DEFAULT` instead of `null` and adds corresponding `getAutocompleteStyle` helper

* Fix autocomplete details panel alignment when list is constrained by viewport edge

Adjusts the details panel position to align with the actual autocomplete list position when the list is constrained by the right edge of the viewport. Previously, the panel would position based on cursor location even when the list was pushed left, causing misalignment. Now checks if the list's actual position differs from the calculated position (with 5px tolerance) and uses the list's position instead.

* Guard autocomplete details panel alignment check with `isReplaceable` condition

Prevents attempting to read the autocomplete list's bounding rect when the list is not visible. The alignment adjustment for viewport-constrained lists now only runs when `isReplaceable` is true, avoiding potential errors when the list DOM is not rendered.

* Fix macro autocomplete cursor detection to handle nested macros correctly

Updates `findMacroAtCursor` to track nesting depth when searching for opening `{{` and closing `}}` braces. Previously would incorrectly stop at the first brace pair encountered in either direction, breaking autocomplete when cursor was inside nested macros like `{{getvar::{{getvar::name}}}}`. Now properly skips over nested macro boundaries by incrementing/decrementing depth counters until finding the matching braces at depth

* gief me my comments back (and fixes, that were missed)

- Added detailed JSDoc comments to all exported functions explaining parameters, return types, and behavior
- Added inline comments throughout functions explaining logic flow, edge cases, and implementation details
- Documented parser-based vs regex-based unclosed scope detection approaches
- Clarified variable shorthand autocomplete logic including operator filtering, context display, and priority

* refactor(macros): freeze MACRO_AUTOCOMPLETE_MODE and MACRO_AUTOCOMPLETE_STYLE enums

* feat(macros): explicitly set `makeSelectable` flag for non-insertable autocomplete options

- Set `makeSelectable = true` for variable shorthand options in {{if}} conditions (already insertable)
- Set `makeSelectable = false` for already-typed operators in variable shorthand autocomplete
- Set `makeSelectable = false` for already-typed flags in macro autocomplete
- Set `makeSelectable = false` for non-selectable closing block flags when no unclosed scopes exist
- Set `makeSelectable = false` for sc

* refactor(macros): consolidate typedef imports in MacroAutoCompleteHelper

- Fixed typo in MacroDefinition typedef import (removed extra `/` from JSDoc comment)
- Replaced long-form typedef imports with short-form aliases for MacroAutoCompleteContext and MacroDefinition
- Improved code consistency by using imported typedefs throughout function signatures

* refactor(autocomplete): select first selectable item as default instead of always first item

- Extracted default item selection logic into `selectDefaultItem()` method
- Changed default selection to prioritize first selectable item over first item in list
- Falls back to last item when no selectable items exist (preserves context for info-only options)
- Added JSDoc documentation explaining selection behavior

* feat(macros): make already-typed variable names non-selectable in autocomplete

- Set `makeSelectable = false` for variable name options that match the currently typed name
- Set empty `valueProvider` for matched variables to prevent re-insertion
- Prevents redundant selection of variables that are already fully typed in the input

* feat(macros): add value context autocomplete option for variable shorthand operators

- Created `VariableValueContextAutoCompleteOption` class to display context about expected values
- Shows operator name, symbol, and description when typing variable shorthand values
- Displays currently typed value and completion hint
- Non-selectable option (context only) with priority 4
- Added to variable shorthand autocomplete when operator is typed and value is being entered

* fix lint

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-23 23:46:47 +02:00
Wolfsblvt ca60ba148c chore(macros): Allow registration of aliases for existing macros (#5053)
- Added `registerMacroAlias()` public method to register aliases for existing macros
- Extracted shared registration logic into private `#registerMacroEntry()` helper
- Refactored `registerMacro()` to use `#registerMacroEntry()` for both primary macros and aliases
- Alias registration validates name format, prevents self-aliasing, and resolves alias chains to primary definition
- Aliases inherit handler and metadata from target but has source of the registration caller
2026-01-23 23:19:07 +02:00
Cohee bf7efbf7e1 Merge branch 'release' into staging 2026-01-23 22:52:57 +02:00
Cohee 7a497421bb Add getOneCharacter to getContext 2026-01-23 22:52:17 +02:00
Wolfsblvt 42155ecebf Macros 2.0 (v0.7.3) - Variable Shorthand: Comparison Operators & Autocomplete Improvements (#5050)
* feat: Add numeric comparison operators (>, >=, <, <=) to variable shorthand syntax

- Added four new comparison operators for local and global variables
- Implemented greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual operations in MacroCstWalker
- Updated lexer to recognize >=, >, <=, < operators (longer patterns before shorter to avoid conflicts)
- Simplified parser by consolidating operator alternatives into single OR block
- Enhanced autocomplete with operator definitions, examples, and usage

* Improve autocomplete for variable shorthand operators with cursor-aware filtering

- Track `variableNameEnd` and `variableOperatorEnd` positions in parsed macro context for accurate cursor position checks
- Add `isShortOperatorPrefix()` helper to detect operators that could be prefixes of longer ones (e.g., `>` → `>=`)
- Fix operator autocomplete to show longer variants when typing short operators (typing `>` now shows both `>` and `>=`)
- Show operator suggestions immediately when variable
2026-01-23 01:05:00 +02:00
Wolfsblvt 6f5032f20e Allow reasoning edit to substitute macros on saving the reasoning (#5052)
* Apply macro substitution when editing reasoning content

- Added `substituteParams()` call to process macros in edited reasoning text
- Changed `newReasoning` from const to let to allow reassignment

* chore: Remove unnecessary double macro substitution from message edit

- Removed `substituteParams()` call for first message (index 0) in `messageEditDone()`
- Macro substitution is now handled consistently by `updateMessage()` for all messages
2026-01-23 00:45:26 +02:00
Cohee 042dd44408 Add APP_INITIALIZED to event auto-fire list 2026-01-23 00:32:43 +02:00
cc12ace48d Clarified contribution guidelines for large PRs. (#5032)
* Added guidelines for splitting large PRs.

* Added links, formatting and mentioned dot property access.

* Fixed and corrected:
https://github.com/SillyTavern/SillyTavern/pull/5032#discussion_r2707433279
https://github.com/SillyTavern/SillyTavern/pull/5032#discussion_r2707445447
https://github.com/SillyTavern/SillyTavern/pull/5032#discussion_r2707449255
https://github.com/SillyTavern/SillyTavern/pull/5032#discussion_r2707455801
https://github.com/SillyTavern/SillyTavern/pull/5032#discussion_r2707458468

* Removed and altered: https://github.com/SillyTavern/SillyTavern/pull/5032#discussion_r2710152562 https://github.com/SillyTavern/SillyTavern/pull/5032#discussion_r2710125321 https://github.com/SillyTavern/SillyTavern/pull/5032#discussion_r2710129926 https://github.com/SillyTavern/SillyTavern/pull/5032#discussion_r2707430359

* Get rid of nested lists

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-23 00:24:38 +02:00
a09c1a7a84 Added 'dot-notation': ['error'] to .eslint.cjs (#5042)
* Added 'dot-notation': ['error'], to `.eslint.cjs`

* Ran `eslint --fix` to correct `dot-notation` errors.

* Added `eslint-disable dot-notation` anywhere errors were caused.

* Allowed dot-notation for uppercase properties: 'allowPattern': '[A-Z]\\w*$'

* Check if `rule instanceof CSSStyleRule`
https://github.com/SillyTavern/SillyTavern/pull/5042#discussion_r2711827148

* Fixed `await result.json();` types.

* refactor: update dot-notation usage in CoquiTtsProvider and PresetManager

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-23 00:11:03 +02:00
Cohee 03f671ca72 Merge branch 'release' into staging 2026-01-22 23:59:08 +02:00
Cohee d6a20ba546 Fix npm audit 2026-01-22 23:58:57 +02:00
WolfsblvtandCohee 26d495f457 Add /reroll-pick command to reset {{pick}} macro (#5049)
* feat(macros): Add `/reroll-pick` command to reset `{{pick}}` macro choices

- Added `/reroll-pick` slash command to change the seed for all `{{pick}}` macros in current chat
- Command accepts optional numeric seed value, otherwise increments current seed by 1
- Updated `{{pick}}` macro to use `pick_reroll_seed` from chat metadata in seed calculation
- Updated `{{pick}}` macro description to mention reroll capability
- Added comprehensive help text with examples for `/reroll-pick` command
- Updated tests

* lint fix

* fix(macros): exclude null reroll seed from {{pick}} hash calculation

- Changed reroll seed default from 0 to null when not set
- Filter out null values from combined seed string to avoid including "-0" suffix
- Updated both core macro implementation and tests to match new behavior

* Use strict null comparison

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-22 23:52:59 +02:00
WolfsblvtandCohee f3c886fd12 Add APP_INITIALIZED event before hideLoader in initialization sequence, before APP_READY fires (#5051)
* Add APP_INIT event before hideLoader in initialization sequence

* refactor(events): rename APP_INIT to APP_INITIALIZED

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-22 23:40:48 +02:00
Forkoz b5eacfa014 Add tabby for adaptive_P (#5044) 2026-01-22 12:39:03 +02:00
san-tianandccss 865114fb1c Replace error with warn when failing to write config.yaml
* try to modify config.yaml at start instead of modify it

* replace error with warn when failing to write config.yaml

---------

Co-authored-by: ccss <ccss>
2026-01-21 14:56:23 +02:00
Cohee ff78290fd0 glm-4.7-flash 2026-01-20 23:22:29 +02:00
CoheeandPavdig 2c09d32b5b feat(docker): add robust healthcheck script (#5028)
* feat(docker): add robust healthcheck script

- Added `docker/healthcheck.cjs`: A standalone, dependency-free Node.js script for verifying server status.
- Updated `Dockerfile`: Added HEALTHCHECK instruction and script copy step.
- Features: Auto-detects port from env/config, handles IPv4/IPv6 fallback, auto-retries HTTPS on socket hangup, and sets custom User-Agent.

* feat(docker): new healthcheck with /api/health endpoint

- Added `GET /api/health` endpoint to `server.js` (unauthenticated) for lightweight status checks.
- Update `docker/healthcheck.cjs`: Rewrite
- Updated Error handle for `HEALTHCHECK`

* feat(docker): switch to heartbeat file healthcheck mechanism

- Replaced network-based check with a file-based heartbeat approach.
- Updated `src/command-line.js`: Added `heartbeatInterval` argument with explicit ENV override (`SILLYTAVERN_HEARTBEAT_INTERVAL`).
- Updated `src/server-main.js`: Added logic to write `heartbeat.json` to data directory at set intervals.
- Rewrote `docker/healthcheck.cjs`: Script now monitors the heartbeat file timestamp (zero dependencies, no config parsing required).
- Updated `Dockerfile`: Sets default heartbeat interval to 30s and ensures script availability.
- Updated `config.yaml`: Added `heartbeatInterval` defaulting to 0 (disabled) for non-Docker users.

* Fix variable names

* Convert to ESM, use serverDirectory variable

* Move file to /src

* fix: update heartbeat path to use global DATA_ROOT variable

* Pretty colors

* Move healthcheck to docker-compose.yml

* Comment fixed

* Even cleaner diff!

---------

Co-authored-by: Pavdig <101715456+Pavdig@users.noreply.github.com>
2026-01-18 16:36:37 +02:00
Cohee 1ff98e76f8 Recent Chats: Add pin functionality (#5030)
* feat: Implement pinned chat functionality in welcome screen

* Highlight pinned / unpinned blocks

* Reduce flash duration
2026-01-18 15:50:23 +02:00
a50fecee25 feat(sd): Add generation status indicator and improve abort handling (#5015)
* feat(sd): Add generation status indicator and improve abort handling

- Add persistent toast notification showing "Generating image..." during generation
- Toast displays spinner, supports multiple concurrent generations with count
- Click toast to dismiss (generation continues in background)
- Improve abort handling: show friendly "Image generation stopped" info message
  instead of error when user clicks stop button
- Handle abort in both generatePicture() and sendGenerationRequest() catch blocks

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

* Scope abort controllers for each individual button

* Use native element reference for caching button abort controller

* Update toast in paintbrush button handler

* refactor: Update abort message for image generation in sdMessageButton

* feat: Enhance generation indicator with active generation count in toast

* Move tracking after prompt generation, add toast for LLM prompt gen progress

* Add type annotation for generation toastr

* Simplify generation abort checks

* Remove unnecessary blank line in addSDGenButtons function

---------

Co-authored-by: mschienbein <mschienbein@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-18 15:03:56 +02:00
PavdigandCohee 78651bdf56 Docker: Build Optimization and Enhanced Non-Root/Volumeless Support (#5024)
* docker: optimize build layers and enhance permission handling

- Pre-created hardcoded dirs in Dockerfile to support volumeless non-root runs.
- Enhanced slightly docker-entrypoint.sh with robust volume detection and safer chown logic.
- Included legacy 'backups' directory... again.
- Added dos2unix to install list.
- Updated .dockerignore
- Updated comments
- Smaller fixes

* fix(docker): removed unnecessary comment, and the... *sighs* backups dir, again

* Exclude DS_Store everywhere

* Exclude tests and all jsconfigs from docker images

* Exclude local plugins from docker builds

* fix(docker): backups are back... yay xD

* feat(docker): add robust healthcheck script

- Added `docker/healthcheck.cjs`: A standalone, dependency-free Node.js script for verifying server status.
- Updated `Dockerfile`: Added HEALTHCHECK instruction and script copy step.
- Features: Auto-detects port from env/config, handles IPv4/IPv6 fallback, auto-retries HTTPS on socket hangup, and sets custom User-Agent.

* Fix .dockerignore permission

* Revert "feat(docker): add robust healthcheck script"

This reverts commit fa634fb088.

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-17 22:51:50 +02:00
Cohee 06691e8b9d Gemini: Add config.yaml setting for thought signatures (#5025) 2026-01-16 23:23:39 +02:00
Cohee 9d36b19ef9 Update validation for query messages and max entries 2026-01-16 23:11:07 +02:00
adventchilde / aethelandCohee 8926cdc5ce Adding Slash Commands for Vector Storage Extension (#5008)
* Add vector slash commands

* Updated vector-threshold command per feedback. Want to validate it is correct before fixing other commands.

* Added slash commands for several vector storage settings.

* Added slash commands for vector storage, updated w/dev feedback

* Fix min value of entries

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-16 22:59:24 +02:00
Beinsezii 76f70ec3c2 Add Adaptive P sampler ordering (#5022) 2026-01-16 12:41:06 +02:00
Jeff SandbergandCohee b418ec5c37 Add taxon filter controls to Group Chat member list (#5006)
* Add taxon controls to top of group member list

* Refactor/cleanup getGroupCharacters

* Fix favorites, refactor and cleanup code

* Fix clearing filters, only show relevant filters in groups

* Fix issues and add persistence

- Fix group member tag listing requiring character list to be init to display
- Fix character tag updates to actually show up in group member contexts
- Persist filter changes for group member tag controls

* Apply suggestions from code review

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

* Avoid sibling selectors

* Err on invalid tag type

* avoid hardcoded ids

* cleanup: don't use `group_member`, use `group_candidates_list`

* Support both selectors and jquery instances in getFilterHelper

* Sanitize missing tag filters before rendering

* Unscrew jsdoc formatting

* Show all tags, mark absents specially

* Improve JSDoc

* Fix tag indicator for group contexts

* Don't use deprecated fields

* Add a comment on potentially undefined group id

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-16 02:27:59 +02:00
Cohee e77c1d33a6 Fix logit bias with best match tokenizer
Fixes #5017
2026-01-15 21:43:31 +02:00
Beinsezii ede7efe52c Adaptive-P for llama.cpp llama-server (#4959)
* Enable Adaptive-P UI on llama.cpp

* Add Adaptive P sampler ordering

* Revert "Add Adaptive P sampler ordering"

This reverts commit 22d85a0e89.
2026-01-15 21:28:30 +02:00
Wolfsblvt 9b0f0dcc9a Fix legacy name prefix removal using wrong variable in bookmarks
Fixes leftover bug from #4993.
In both `getBookmarkName` and `createBranch`, the second regex replacement was incorrectly using the original `name` variable instead of the already-cleaned `cleanName` variable, causing the legacy prefix removal to fail.
2026-01-15 11:01:52 +01:00
Wolfsblvt 0b529290aa Macros 2.0 expose runtime warn log function 2026-01-15 00:32:27 +01:00
7d99540829 Improved printMessages performance on large chats by reducing DOM updates. (#4947)
* Improved printMessages performance by reducing DOM updates.
Refactored part of addOneMessage into createMessageElement.

Before: Rendered 1000 messages in 25.529199999809265 seconds.
After:  Rendered 1000 messages in 5.088 seconds.

* Fixed mistakes: https://github.com/SillyTavern/SillyTavern/pull/4947#pullrequestreview-3624592007

* Formatting fix

* Fixed scroll and last_mes order..

* Refactored printMessages logic into redisplayChat.

* Passed `fade`.

* Cleanup.

* WIP.
Removed getMessageFromTemplate
Refactored addOneMessage and updateMessageElement.

* Minor changes to better match https://github.com/SillyTavern/SillyTavern/pull/4985

* If insert is false, `newMessage` may not be new, so I renamed `newMessage` to `messageElement` and `newMessageId` to `messageId`.

I also rearranged some constants to improve readability.

* Accept 0 as valid insertAfter/insertBefore targets

* Renamed forceId to messageId for clarity.

* Change forceId to undefined by default.

* Swapped `forceId` to `messageId` in addOneMessage.

* Added adjustMediaScroll to updateMessageElement.

* Revert "Change forceId to undefined by default."

This reverts commit cbda7eb3fe.

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-15 00:30:40 +02:00
bce1372ed4 feat(sd): Add Z.AI GLM-Image model support (#5012)
* feat(sd): Add Z.AI GLM-Image model support

Add the new GLM-Image model to the Z.AI image generation source:
- Add 'glm-image' to the model dropdown with friendly display name
- Handle GLM-Image's requirement for dimensions in multiples of 32
  (vs CogView's multiples of 16)
- Show quality dropdown for GLM-Image (supports standard/hd)

The GLM-Image model uses the same API endpoint as CogView
but has different dimension constraints.

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

* feat(sd): Enhance Z.AI GLM-Image support

- Use regex for GLM-Image model detection (futureproofing)
- Skip 2^21 pixel limit for GLM-Image (CogView-specific)
- Add Z.AI recommended resolutions (1280x1280, 1568x1056, etc.)
- Add "Use Coding API" toggle for GLM Coding Plan users
- Add better error logging for image fetch debugging

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

* refactor(sd): Address PR review feedback for Z.AI GLM-Image

- Remove custom zai_coding_api setting, use existing oai_settings.zai_endpoint
- Always use Common API for image generation (avoids rate limits)
- Keep ZAI_ENDPOINT import for consistency with other extensions

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

* fix: always use Common API for Z.AI image generation

Removes conditional endpoint selection since we decided to always use
Common API for image generation (Coding API has stricter rate limits).

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

* It's not only cogview anymore

* Remove unused param from request payload

* Remove redundant debug logs

* Loosen the check on image quality data attribute

* Bring back coding API notice

---------

Co-authored-by: mschienbein <mschienbein@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-14 23:58:53 +02:00
Cohee b89ffdfece Suppress error messages when Firefox unloads the tab (#5013)
* Fix error messages when Firefox tab reopened after unload
#4989

* Export settingsReady flag
2026-01-14 23:40:52 +02:00
Cohee 206540a072 Revert "Add <svg> to list of Showdown block tags (#4998)"
This reverts commit f79ee5a1b1.
2026-01-14 03:25:54 +02:00
Cohee 26af6b10c3 Increase wait delay in chat-jump 2026-01-14 02:32:53 +02:00
Cohee 7e410b4aa8 Retry API tokenization on reconnecting to backend
Fixes #5004
2026-01-14 02:16:56 +02:00
Cohee cd3bed87c1 Merge pull request #4954 from SillyTavern/fix/docker-readonly
Update Dockerfile
2026-01-14 01:46:14 +02:00
Cohee f79ee5a1b1 Add <svg> to list of Showdown block tags (#4998)
Fixes #4898
2026-01-14 00:49:42 +02:00
3e40ac1c27 refactor/perf-printMessages #4: Renamed newMessage to messageElement and newMessageId to messageId. (#4985)
* If insert is false, `newMessage` may not be new, so I renamed `newMessage` to `messageElement` and `newMessageId` to `messageId`.

I also rearranged some constants to improve readability.

* Accept 0 as valid insertAfter/insertBefore targets

* Yeah whatever

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-14 00:20:26 +02:00
Wolfsblvt f8c373f55a Macros 2.0 (v0.7.0) -Variable Shorthand: New Operators & Lazy Evaluation (#4997)
* Add new variable shorthand operators and new variable macros

- Add `{{hasvar}}` and `{{deletevar}}` macros for local variables
- Add `{{hasglobalvar}}` and `{{deleteglobalvar}}` macros for global variables
- Implement new variable shorthand operators: `-=`, `||`, `??`, `||=`, `??=`, `==`
- Refactor variable expression evaluation to use direct variable API calls instead of routing through macro registry
- Add comprehensive operator support in lexer with proper token ordering for multi-character operators

* Implement lazy evaluation for variable shorthand value expressions

- Replace eager value evaluation with lazy evaluation pattern for variable operators
- Add `#createLazyValue()` method that caches value expression result on first call
- Change `#executeVariableOperation()` to accept `lazyValue` function instead of pre-evaluated value
- Only evaluate value expressions when actually needed (e.g., when variable is falsy for `||`, when variable doesn't exist for `??`)
- Add comprehensive e2e tests

* Update variable shorthand autocomplete with new operators and add edge case tests

- Add new operators to autocomplete definitions: `-=`, `||`, `??`, `||=`, `??=`, `==`
- Update example lists in `VariableShorthandAutoCompleteOption` and `VariableNameAutoCompleteOption`
- Add operator definitions with descriptions and `needsValue` flags to `VariableOperatorDefinitions`
- Update `parseMacroContext()` to recognize new operators with proper ordering (longer operators checked first)

* Add not equals (!=) operator to variable shorthand expressions

- Add `!=` operator to variable shorthand definitions for local and global variables
- Implement `notEquals` operation in `MacroCstWalker` that returns inverted equality comparison
- Add `NotEquals` token to lexer with pattern `/!=`
- Update parser to handle `!=` operator with value expression
- Add `!=` operator to autocomplete examples and operator definitions
- Update `parseMacroContext()` to recognize `!=` operator and...

* Tiny code review fixes

- Fix typo: "insie" → "inside" in variable shorthand operators comment
- Remove extra space in `{{getglobalvar}}` example usage

* Fix missing closing braces in hasglobalvar macro example usage

* Fix isFalsy to normalize value before checking boolean state in variable shorthand operators

- Apply `normalize()` to value before passing to `isFalseBoolean()` in `isFalsy` helper
- Ensures consistent falsy evaluation for variable shorthand operators like `||`, `??`, `||=`, `??=`

* Fix pipe character inside macro braces being treated as command separator

- Add `isInsideMacroBraces()` method to track unclosed `{{}}` macro braces
- Modify `testCommandEnd()` to only treat `|` as command end when not inside macro braces
- Scan text behind current position to calculate macro brace depth
- Skip second character when detecting `{{` or `}}` pairs
- Ensure `depth` never goes below 0 using `Math.max(0, depth - 1)`

* Add aliases for variable existence and deletion macros

- Add `varexists` alias for `hasvar` macro
- Add `flushvar` alias for `deletevar` macro
- Add `globalvarexists` alias for `hasglobalvar` macro
- Add `flushglobalvar` alias for `deleteglobalvar` macro

* Update variable shorthand operator descriptions to clarify return behavior

- Add "returns nothing" clarification to `=`, `+=`, `-=` operators in examples and definitions
- Add "returns the new value" clarification to `++`, `--` operators in examples and definitions
- Update `VariableOperatorDefinitions` descriptions to match example text
- Ensures users understand which operators return values vs perform silent mutations
2026-01-13 13:32:18 +02:00
Cohee 9e88f23382 Merge branch 'release' into staging 2026-01-13 02:25:03 +02:00
Cohee bba91e38fc Google Translate: Normalize pt-BR target language 2026-01-13 02:23:46 +02:00
Cohee 684b755826 Adjust itemized prompts on message move/delete (#5000)
* Adjust itemized prompts on message move/delete

* Sort itemized prompts on swap

* Remove itemized prompt on regeneration
2026-01-12 22:40:33 +02:00
69b7a17c77 refactor/perf-printMessages #3: Extracted updateMessageItemizedPromptButton and getMessageHTML from addOneMessage to improve readability. (#4984)
* Extracted updateMessageItemizedPromptButton and getMessageHTML from addOneMessage to improve readability.

* Fix types and function calls

* Fixed insertBefore, insertAfter and messages without extra.

* Use strict comparison operator

* Use logical OR for display text fallback

* Fixed newMessageId again.

* Faster showMoreMessages.

* removed `insertAfter` and `insertBefore` from `mes_edit_copy`,  `/message-role` and `/message-name`.

* Formatting fix

* Refactor newMessageId

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-12 21:39:47 +02:00
Cohee 372db63cd5 NanoGPT: Add reasoning effort control
Closes #4999
2026-01-12 21:05:02 +02:00
Cohee 618918535e Show a page reload prompt on EME toggle (#4994)
* Show a page reload prompt on EME toggle
#4992

* Fix lint

* Orange toast
2026-01-12 02:18:57 +02:00
a9f2d559f4 refactor/perf-printMessages #2: Removed getMessageFromTemplate (#4983)
* Reduced redundant swipe code by fully updating the swipe message.

* `getMessageFromTemplate` is an inconvenient function that requires more lines than it saves.
It cannot be used in any other function, therefore it should not exist.
This change also prevents an unnecessary call of `messageTemplate.clone` in addOneMessage when `type = 'swipe'`.

ESLint.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4983#discussion_r2680379455

* Replaced ?? with &&: https://github.com/SillyTavern/SillyTavern/pull/4983#discussion_r2680366010 and removed comments.

* Fixed bias check. "0" is falsy.

* Remove scroll adjust early bail

* Call appendMediaToMessage before updating content
Because we need to preserve chatHeight and scrollPosition according to the previous swipe, not the new one

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-12 02:12:51 +02:00
Wolfsblvt 491f2a3afd Feature: Enhanced Branch and Checkpoint Naming (#4993)
* Add customizable name builder and max tries to getUniqueName utility

- Add optional `nameBuilder` parameter to allow custom name formatting
- Add `maxTries` parameter to client-side version to prevent infinite loops
- Update JSDoc with new optional parameters
- Use nullish coalescing to set default name builder function
- Default name builder maintains existing "${baseName} (${i})" format

* Add startIndex option to getUniqueName utility for flexible name generation

* Enhance branch creation to use current chat name and ensure unique names

- Import `getCurrentChatDetails` from script.js
- Replace hardcoded branch name format with current chat name as base
- Add custom `buildBranchName` function to format branch names with suffix
- Strip existing " - Branch #N" suffixes before generating new branch name
- Use `getUniqueName` utility with `nameBuilder` to ensure unique branch names
- Remove unused `mainChat` variable and replace with `mainChatName`

* Enhance checkpoint creation to use current chat name and suggest unique names

- Import `getCurrentChatDetails` from script.js to get current chat name
- Add custom `buildCheckpointName` function to format checkpoint names with suffix
- Strip existing " - Checkpoint #N" suffixes before generating new checkpoint name
- Use `getUniqueName` utility with `nameBuilder` to ensure unique checkpoint names
- Pass `suggestedName` to template and popup input for better UX
- Replace manual loop with `getUniqueName`

* Remove automatic timestamp suffix from bookmark names

* Fix getUniqueName utility to correctly handle maxTries and return null on failure

* shut up copilot

* Strip legacy bookmark and branch name prefixes when generating unique names

- Add removal of old "Checkpoint #N - " prefix format in `buildCheckpointName`
- Add removal of old "Branch #N - " prefix format in `buildBranchName`
- Change `cleanName` from const to let to allow multiple replacements
- Ensures clean base names regardless of legacy or current naming format
2026-01-12 01:07:51 +02:00
Coheeanduser 2d1a96f91d Improve performance of printMessages (#4979)
* Improve performance of printMessages

* Add clarifying comment

* Refactor printMessages into redisplayChat.

* const https://github.com/SillyTavern/SillyTavern/pull/4981#discussion_r2675632422

* Use `toFixed(3)` instead of 17 decimals. https://github.com/SillyTavern/SillyTavern/pull/4981#discussion_r2675647691

* Removed `.find is faster than .children.` comment. https://github.com/SillyTavern/SillyTavern/pull/4981#discussion_r2675625188

* Simplified add 'last_mes'. https://github.com/SillyTavern/SillyTavern/pull/4981#discussion_r2675616734

---------

Co-authored-by: user <user@exmaple.com>
2026-01-11 18:33:23 +02:00
Cohee 1bfabd9b77 Merge branch 'release' into staging 2026-01-11 02:49:11 +02:00
Cohee f861beb244 OpenRouter: Fix fallback model request 2026-01-11 02:48:58 +02:00
Cohee d56011b60f Skip redundant scroll adjustment 2026-01-11 02:05:44 +02:00
Cohee ab164efea6 Fix: don't call append media twice on swipe (#4991) 2026-01-11 01:41:10 +02:00
Wolfsblvt 858b9e684e Enhance world duplication to use current world name as base (#4990)
- Update `getFreeWorldName()` to accept optional `worldName` parameter and `stripIndex` option
- Add JSDoc documentation for `getFreeWorldName()` parameters and return value
- Modify world duplicate handler to pass current world name to `getFreeWorldName()`
- Strip existing numbered suffix from base name before generating new numbered name
- Default to "New World" when no world name is provided
- Make "New World" translatable
2026-01-11 00:01:16 +02:00
Cohee 281c50bb52 Fix: init macros before extensions (#4988)
* Fix: init macros before extensions

* Add an anchor comment for future reference
2026-01-10 23:38:21 +02:00
Cohee 6036ff9a3c Merge branch 'release' into staging 2026-01-10 19:53:16 +02:00
Cohee eb48c5abe2 Fix: show edit textarea for messages with inline media 2026-01-10 19:53:08 +02:00
Cohee d25d97ad5d Merge branch 'release' into staging 2026-01-10 19:37:59 +02:00
Cohee c705cbe698 Fix {{summary}} with experimental engine 2026-01-10 19:37:43 +02:00
Wolfsblvt 5c2a02a128 Fix {{pick}} macro seeding inside delayed-resolution macros like {{if}} (#4986)
- Thread `contextOffset` through `MacroEngine.evaluate()` to preserve global document position
- Update `resolve()` in execution context to pass caller's `globalOffset` as `contextOffset`
- Add `offsetDelta` option to `resolve()` for additional offset customization
- Add regression tests for `{{pick}}` inside `{{if}}` blocks with `delayArgResolution`
- Ensure identical picks at different positions produce different results
2026-01-10 11:50:58 +02:00
Cohee ad860f4447 Z.AI: Add video generation models 2026-01-10 00:59:33 +02:00
Wolfsblvt 3047045d37 Macros 2.0 [Fix] - Fix macro evaluation to allow nested scoped macros in arguments (#4977)
* Fix scoped macro evaluation to allow nested scoped macros in arguments

- Refactor `#evaluateArgumentNode` to re-parse argument content for scoped macro pairs
- Create shared `#evaluateRawContent` helper method for consistent text evaluation
- Update `#evaluateScopedContent` to use the shared helper, reducing duplication
- Add 8 comprehensive test cases for nested scoped macros in arguments
- Enhance JSDoc documentation for EvaluationContext text parameter

* Fix `{{pick}}` macro to use global document offset for deterministic seeding

- Replace `range.startOffset` with `globalOffset` in pick macro handler for consistent position-based seeding
- Add `contextOffset` to EvaluationContext to track base offset from original document (starts at 0 for top-level)
- Calculate `globalOffset` as `contextOffset + range.startOffset` when building MacroCall objects
- Thread `contextOffset` through evaluation pipeline: MacroEngine → MacroCstWalker → all evaluation

* Fix typo in MacroCstWalker JSDoc comment and thread contextOffset through evaluateDocument

- Correct JSDoc typo: "rull macro text" → "full macro text"
- Destructure `contextOffset` from options in `evaluateDocument` method
- Pass `contextOffset` to EvaluationContext instead of hardcoded 0
2026-01-09 23:25:08 +02:00
Cohee 8a32b72dfe Replace $.ajax with fetch (#4978) 2026-01-09 02:28:22 +02:00
Cohee 68d4da1c83 Optimize getGroupPastChats (#4976)
* Optimize getGroupPastChats

* Add return type to getGroupPastChats
2026-01-09 02:17:18 +02:00
8372e7bf9d "gradually replacing property access with a dot operator" (#4965)
* "gradually replacing property access with a dot operator"
https://github.com/SillyTavern/SillyTavern/pull/4963#discussion_r2663003561

(?<=\w|\])\['([a-zA-Z]\w+)'\]
My regex found 593 matches across 47 files.
Also, two typos.

* Fixed chat[0].chat_metadata type error.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664275854

* Fixed `swipedElementsDiv[0]?.getAnimations().filter((a) => a.animationName` type error.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664274593

* Fixed config.MESSAGE_SANITIZE and config.MESSAGE_ALLOW_SYSTEM_UI type errors.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664266271

* Fixed group.date_last_chat type error.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664295652

* Reverted SlashCommandParser dot property access.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664310931

* LLM fixed canUseNegativeLookbehind.result; type error.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664314288

* Reverted chat-completions.js bodyParams and headers dot property access.

https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664317848
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664320088
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664324438

* Reverted openai.js data dot property access.

https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664326244

* Reverted tests/frontend/MacroEnvBuilder.e2e.js env.dynamicMacros dot property access.

https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664330990

* Partially reverted `window` dot property access.

* Reverted result.json() and settings dot property access.

* Reverted google.js headers dot property access.

* Fixed regex: `(?<=\w|\])\['([a-zA-Z]\w*)'\]`

* Swapped window to globalThis with dot property access.

* LLM fixed canUseNegativeLookbehind type.

* Refactor property access

* Consistency

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-08 23:58:21 +02:00
allen9441andCohee f6a2def403 Fix user handle naming logic (#4969)
* Fix user handle naming logic

* Extract slugify logic into a module func

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-08 19:08:37 +02:00
Cohee f797573290 Add OpenRouter headers to image generation requests 2026-01-07 12:31:06 +00:00
Cohee 908368f221 Merge branch 'release' into staging 2026-01-07 08:55:24 +00:00
Cohee bc660b8b91 Fix legacy {{authorsNote}} 2026-01-07 08:54:05 +00:00
ae5f69585b Removed 87 redundant chat[chat.length - 1] lookups. (#4963)
* Removed redundant `chat[chat.length - 1]` lookups.

* Readability.
Don't chat[chat.push({}) - 1];.

* Chat can't be empty.
https://github.com/SillyTavern/SillyTavern/pull/4963#discussion_r2663006489

* Fixed mixup: https://github.com/SillyTavern/SillyTavern/pull/4963#discussion_r2663000183

* Rename it back to item

* Add early return on empty chat.

* Fix swipe assignment to use item message instead of last message

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-07 01:17:54 +02:00
Cohee 1c6d5da1b5 Cut secret input UI messages 2026-01-07 00:26:36 +02:00
Cohee 7320aa948d Audio inlining for OpenAI and Custom-compatible (#4964)
* Audio inlining for OpenAI and Custom-compatible

* Add context sizes

* chatgpt-image-latest

* Add quality control for gpt-image
2026-01-06 13:27:13 +02:00
CoheeandWolfsblvt 7331dba056 Macros 2.0 (v0.6.6) - STscript compatibility (#4957)
* Bypass REPLACE_GETVAR with experimental parser enabled

* (wip) macro-2.0 replacer in STscript parser

* Add support for MacroDefinitionOptions format in dynamic macros

- Add DynamicMacroValue typedef supporting string, function, or MacroDefinitionOptions object
- Extract macro definition building logic into MacroRegistry.buildMacroDefFromOptions() method
- Update MacroEngine to detect and handle three dynamic macro formats:
  1. string - direct value, no args allowed
  2. function - handler function, no args allowed (legacy)
  3. MacroDefinitionOptions object - full definition with handler, args, type

* Implement dynamic macro replacers

* Remove global typedef

* Use unique closure boundary

* Add e2e tests for MacroSlashCommands

* Update public/scripts/macros/engine/MacroEngine.js

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>

* Use strict args array match

* Update public/scripts/macros/engine/MacroEngine.js

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
2026-01-06 00:57:03 +02:00
Cohee 293ee0a310 Caption: Add custom model input field (#4956) 2026-01-05 02:15:52 +02:00
WolfsblvtandCohee e40b31b06d Macros 2.0 (v0.5.2) - Onboarding for new Macro Engine (#4955)
* Macros 2.0 [Feature] - Add onboarding popup for experimental macro engine features

- Add `onbordingExperimentalMacroEngine()` function in MacroDiagnostics.js to detect and prompt users about experimental features
- Detect experimental macro features in `substituteParamsLegacy()`: {{if}}, scoped macros, macro flags, variable shorthands, nested macros
- Add feature detection in autocomplete parser for macro flags, variable shorthands, and leading whitespace

* Fix typo: rename `onbording` to `onboarding` throughout macro diagnostics system

* Add `void` operator to async onboarding calls and fix typo in comment

- Add `void` operator to all `onboardingExperimentalMacroEngine()` calls to explicitly discard Promise return values
- Fix typo in MacroDiagnostics.js comment: "hat" → "that"

* Fix typo in experimental macro engine onboarding popup: "anytime time" → "any time"

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-05 01:32:13 +02:00
WolfsblvtandCohee b453fdc5d8 Macros 2.0 [Fix] - Macro display override uses alias name if relevant + preserve whitespaces for autocomplete closing tag (#4953)
* Refactor: Move MacroBrowser.js to macros/engine directory and update import paths

* Replace macro name with alias in displayOverride for macro browser

- Import escapeRegex utility for safe regex pattern creation
- Check if macro has aliasOf property when displayOverride is present
- Replace all occurrences of the original macro name with the alias name in displayOverride text
- Use word boundary regex pattern to match macro names in {{macro}}, {{macro::}}, and {{macro }} contexts

* Add whitespace padding preservation for macro closing tag autocomplete

- Extract paddingBefore and paddingAfter from opening macro tags in MacroCstWalker
- Pass padding info through unclosed scope detection in findUnclosedScopes() and findUnclosedScopesRegex()
- Update MacroClosingTagAutoCompleteOption constructor to accept padding options
- Apply same whitespace padding to closing tags as their corresponding opening tags
- Update regex fallback to capture and preserve whitespace from opening tags

* Add replacementStartOffset to AutoCompleteOption for whitespace normalization in closing tags

- Add replacementStartOffset property to AutoCompleteOption class with JSDoc documentation
- Update AutoComplete.select() to apply per-option replacement offset when calculating effectiveStart
- Calculate replacementStartOffset in MacroClosingTagAutoCompleteOption based on currentPadding length
- Pass currentPadding from context.paddingBefore to MacroClosingTagAutoCompleteOption in SlashCommandParser

* Fix closing tag detection regex to correctly autocomplete // macro

* Add flags and fullText to EnhancedMacroAutoCompleteOption context and fix {{//}} autocomplete offset

- Add flags, currentFlag, and fullText properties to EnhancedMacroAutoCompleteOptions JSDoc
- Store options object as #options field in EnhancedMacroAutoCompleteOption for later access
- Pass flags, currentFlag, and fullText from context to macroContext in SlashCommandParser
- Fix {{//}} macro autocomplete to adjust replacementStartOffset when typed after single slash to avoid treating it as flag

* Add unnamedArgs definition to {{//}} comment macro for better documentation

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-05 01:27:06 +02:00
Wolfsblvt cd0627bfec Macros 2.0 [➕Macros] - Add {{hasExtension}} macro, and refactor extension lookup logic (#4948)
* Add {{hasExtension}} macro and refactor extension lookup logic

- Move findExtension() from extensions-slashcommands.js to extensions.js and export it
- Update findExtension() to return object with name and enabled properties instead of just name string
- Add {{hasExtension}} macro to check if an extension is enabled
- Update /extension-state and /extension-exists commands to use refactored findExtension()
- Remove duplicate findExtension() implementation from extensions-slashcommands.js

* Refactor extension action callbacks to use extension object instead of separate name and enabled properties

* fix eslint
2026-01-04 20:37:27 +02:00
Cohee e6ce84d726 Wrap reloadCurrentChat into SimpleMutex. (#4944)
Supersedes #4943
2026-01-04 19:54:25 +02:00
Cohee 2fb4ab3184 Add Adaptive-P settings (#4945)
* TC: Add Adaptive-P settings and UI elements

* Improve compatibility with sampler select
2026-01-03 22:25:16 +02:00
WolfsblvtandCohee 81414724b0 Macros 2.0 (v0.5.1) - Delayed Macro Argument Resolution for {{if}} Macro (#4934)
* Add variable shorthand syntax support for local and global variables

- Add VariableShorthandType enum and VariableShorthandDefinitions for `.` (local) and `$` (global) prefixes
- Add VariableShorthandAutoCompleteOption class for autocomplete of variable shorthand syntax
- Implement variable expression parsing in MacroCstWalker to handle `{{.varName}}` and `{{$varName}}` syntax
- Add support for variable operations: get, set (=), increment (++), decrement (--), and add (+=)
- Route variable expressions to appropriate macro via handler

* Add variable shorthand autocomplete support for variable names and operators

- Add `isValidVariableShorthandName()` helper to validate variable names against shorthand pattern
- Add `VariableNameAutoCompleteOption` class for suggesting existing and new variable names
- Add `VariableOperatorAutoCompleteOption` class for suggesting operators (=, ++, --, +=)
- Add `VariableOperatorDefinitions` map with operator metadata (symbol, name, description, needsValue)

* Add variable shorthand support to {{if}} macro condition autocomplete

- Add variable shorthand (.var, $var) support to {{if}} condition evaluation in core-macros.js
- Detect and resolve variable shorthands using getvar/getglobalvar macros before condition check
- Update {{if}} description and examples to document variable shorthand syntax
- Add variable shorthand autocomplete options when typing {{if}} condition
- Show variable prefix options (. and $) when no condition is typed yet
- Reuse #buildVariableShorthandOptions

* refactor: Add Object.freeze to lexer constants and improve JSDoc documentation

- Freeze `modes` and `Tokens` objects to prevent accidental mutations
- Convert inline comments to proper JSDoc format for better documentation
- Add JSDoc block for `Def` lexer definition object
- Improve comment clarity and formatting consistency throughout MacroLexer.js
- Remove redundant section separator comments in variable shorthand modes

* Add inversion prefix (!) autocomplete support to {{if}} macro condition

- Add SimpleAutoCompleteOption class for basic autocomplete items with name, symbol, and description
- Add ! inversion prefix as autocomplete option in {{if}} condition with 🔁 icon
- Show ! as selectable option when nothing typed, non-selectable when already present
- Fix condition parsing to handle ! prefix with whitespace (e.g., "! $myvar")
- Update identifier extraction to strip ! and whitespace before detecting variable

* fix lint

* Fix variable shorthand regex in {{if}} macro to properly capture prefix and variable name

* Expand comprehensive e2e tests for variable shorthand syntax in lexer and macro engine

- Add MacroLexer tests for variable shorthand edge cases (whitespace, numbers, underscores, operators)
- Add MacroEngine tests for variable shorthand operations (hyphens, underscores, non-existent vars, chaining)
- Add MacroEngine tests for variable shorthand in {{if}} conditions (truthy/falsy, inversion, else branches)
- Test variable names with hyphens, underscores, and numbers in both get/set and conditional contexts

* Fix macro flags not being allowed inside variable shorthand macros

- Move MANY(flags) block from macroBody to macro rule to parse flags before branching
- Fix MacroCstWalker to extract flags from children.flags instead of bodyChildren.flags
- Ensures flags are available for both variable expressions and regular macros
- Fixes flag extraction in visitMacro and visitBlockMacroClose methods

* Implement delayed argument resolution for {{if}} macro to prevent side effects in non-chosen branches

- Add `delayArgResolution` flag to MacroDefinition to control when nested macros are evaluated
- Modify MacroCstWalker to skip nested macro evaluation when delayArgResolution is true
- Update {{if}} macro to use delayArgResolution and manually resolve only the chosen branch
- Replace ELSE_MARKER splitting with `splitOnTopLevelElse()` that parses CST to find correct {{else}} at depth 0

* Fix delayed resolve on if/else macros being off when a non-scoped if macro was being used inside

- Track argument count in MacroCstWalker.extractMacroInfo() to distinguish inline vs scoped macros
- Update splitOnTopLevelElse() to only track scoped {{if}} blocks (1 arg) when finding {{else}} at depth 0
- Update findClosingMacro() to only increment depth for macros that can accept scoped content
- Add e2e tests for inline {{if::condition::content}} inside scoped {{if}}/{{else}} blocks

* Remove eslint exclusion

* Remove duplicate tests

* Regenerate package-lock.json in /tests

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-03 19:45:17 +02:00
Wolfsblvt dbc4fe611c Macros 2.0 [Fix] - Make macro name matching case-insensitive throughout the macro system (#4942)
* Make macro name matching case-insensitive throughout the macro system

- Normalize macro names and aliases to lowercase in MacroRegistry storage and lookup
- Update MacroCstWalker to use case-insensitive matching for block macro pairing
- Normalize dynamic macro keys to lowercase in MacroEnvBuilder
- Update MacroEngine to use lowercase keys when checking dynamic macros
- Preserve original casing in macro definitions for display purposes
- Add comments explaining case-insensitive matching behavior

* Make alias validation case-insensitive in MacroRegistry to prevent duplicate names

- Prevents registering aliases that differ only in casing from the macro name
2026-01-03 18:40:32 +02:00
Cohee b774a553f9 Caption: allow duplicate model ids into the list from different sources 2026-01-03 00:44:11 +02:00
Cohee 0c8d74da02 NanoGPT: Enable tool calling
Closes #4930
2026-01-03 00:20:31 +02:00
Cohee f1b11db5f8 Merge branch 'release' into staging 2026-01-02 19:36:25 +02:00
Cohee ce71ca5097 Fix npm audit 2026-01-02 19:35:50 +02:00
ZhenyaPavandCohee ef89d0f291 Added regex filter option to TTS extension (#4924)
* Add regex filter option to TTS extension

- Added checkbox to enable/disable regex filtering of TTS text
- Added text input for custom regex patterns
- Default pattern removes emojis and non-English text while preserving letters, numbers, spaces, and punctuation
- Regex is applied after asterisk removal and other text processing
- Includes error handling for invalid regex patterns
- Automatically cleans up extra spaces after regex removal

* reverted the accidental change in tts_skip_tags description
clarified the regex description

* Add regex validation warning to TTS settings

* fixed regex field in UI

* reworked the regex warning

* changed the regex event to change (input might not have worked correctly)

* Apply review comments

* Spacing fix

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-31 20:03:04 +02:00
WolfsblvtandCohee 0dcd9906bf Macros 2.0 (v0.5) - Add variable shorthand macros and variable support to {{if}} macro (#4933)
* Add variable shorthand syntax support for local and global variables

- Add VariableShorthandType enum and VariableShorthandDefinitions for `.` (local) and `$` (global) prefixes
- Add VariableShorthandAutoCompleteOption class for autocomplete of variable shorthand syntax
- Implement variable expression parsing in MacroCstWalker to handle `{{.varName}}` and `{{$varName}}` syntax
- Add support for variable operations: get, set (=), increment (++), decrement (--), and add (+=)
- Route variable expressions to appropriate macro via handler

* Add variable shorthand autocomplete support for variable names and operators

- Add `isValidVariableShorthandName()` helper to validate variable names against shorthand pattern
- Add `VariableNameAutoCompleteOption` class for suggesting existing and new variable names
- Add `VariableOperatorAutoCompleteOption` class for suggesting operators (=, ++, --, +=)
- Add `VariableOperatorDefinitions` map with operator metadata (symbol, name, description, needsValue)

* Add variable shorthand support to {{if}} macro condition autocomplete

- Add variable shorthand (.var, $var) support to {{if}} condition evaluation in core-macros.js
- Detect and resolve variable shorthands using getvar/getglobalvar macros before condition check
- Update {{if}} description and examples to document variable shorthand syntax
- Add variable shorthand autocomplete options when typing {{if}} condition
- Show variable prefix options (. and $) when no condition is typed yet
- Reuse #buildVariableShorthandOptions

* refactor: Add Object.freeze to lexer constants and improve JSDoc documentation

- Freeze `modes` and `Tokens` objects to prevent accidental mutations
- Convert inline comments to proper JSDoc format for better documentation
- Add JSDoc block for `Def` lexer definition object
- Improve comment clarity and formatting consistency throughout MacroLexer.js
- Remove redundant section separator comments in variable shorthand modes

* Add inversion prefix (!) autocomplete support to {{if}} macro condition

- Add SimpleAutoCompleteOption class for basic autocomplete items with name, symbol, and description
- Add ! inversion prefix as autocomplete option in {{if}} condition with 🔁 icon
- Show ! as selectable option when nothing typed, non-selectable when already present
- Fix condition parsing to handle ! prefix with whitespace (e.g., "! $myvar")
- Update identifier extraction to strip ! and whitespace before detecting variable

* fix lint

* Fix variable shorthand regex in {{if}} macro to properly capture prefix and variable name

* Expand comprehensive e2e tests for variable shorthand syntax in lexer and macro engine

- Add MacroLexer tests for variable shorthand edge cases (whitespace, numbers, underscores, operators)
- Add MacroEngine tests for variable shorthand operations (hyphens, underscores, non-existent vars, chaining)
- Add MacroEngine tests for variable shorthand in {{if}} conditions (truthy/falsy, inversion, else branches)
- Test variable names with hyphens, underscores, and numbers in both get/set and conditional contexts

* Fix macro flags not being allowed inside variable shorthand macros

- Move MANY(flags) block from macroBody to macro rule to parse flags before branching
- Fix MacroCstWalker to extract flags from children.flags instead of bodyChildren.flags
- Ensures flags are available for both variable expressions and regular macros
- Fixes flag extraction in visitMacro and visitBlockMacroClose methods

* Add SillyTavern global to tests eslintrc

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-31 19:38:50 +02:00
Cohee 5dee64e0bc Update description of banned macro 2025-12-29 21:14:20 +02:00
Cohee 316dfaadc7 Update macro category for charAuthorsNote 2025-12-29 21:14:07 +02:00
underscore_x 865e0a60a2 updated claude prompt caching url (#4931) 2025-12-29 13:26:13 +02:00
guoql666 efd87b4759 add new Tts adapter provider (#4915)
* add new provider: gpt-sovits-adapter

* export function getCharacters

* fixed some bugs
2025-12-28 23:55:28 +02:00
Subwolf a8eb154517 Zai moonshot reverse proxy (#4923)
* adding reverse proxy support

* update

* added handling for the image caption extension
2025-12-28 23:52:04 +02:00
WolfsblvtandCohee e9bedadc0b Macros 2.0 (v0.4) - Add scoped macros (last arg can be scoped), {{if}} macro and macro flags (baseline implementation) (#4913)
* Macros: make category optional, default to UNCATEGORIZED

* Tests: Update macro tests to match new error handling behavior

- Change MacroRegistry tests from expecting thrown errors to capturing console.error logs
- Update MacroLexer tests to expect plaintext fallback instead of lexer errors for invalid tokens
- Fix MacroEngine test to use `char` macro instead of `newline` for arity validation
- Update MacroParser test with corrected expected error message for invalid identifiers
- Remove "[Error]" prefixes from test descriptions where lexer no longer errors

* Macros: Implement macro execution flags system

- Add MacroFlags module with flag parsing and validation (!, ?, ~, /, >, ., $, #)
- Update lexer to tokenize flags as separate tokens before macro identifier
- Modify parser to capture flags in CST under 'flags' label
- Update CST walker to parse flag tokens into MacroFlags object
- Pass parsed flags to macro handlers via MacroCall and MacroContext
- Update autocomplete parser to handle flags before identifier
- Add comprehensive tests for flag parsing,

* Macros: Fix autocomplete positioning for macros with flags and whitespace

- Add identifierStart to parseMacroContext to track where identifier begins in macro text
- Update autocomplete to use identifierStart for correct range calculation
- Simplify indexMacros regex to use global flag instead of manual loop
- Use parseMacroContext in indexMacros to extract identifier (handles flags/whitespace)
- Fix autocomplete range starting at wrong position when flags or whitespace present

* Macros: Add autocomplete support for macro execution flags

- Add MacroFlagAutoCompleteOption class for rendering flag options in autocomplete
- Extend parseMacroContext to track currentFlag (flag cursor is on) and isInFlagsArea
- Track flagEndPositions to determine which flag cursor is currently typing
- Update #buildEnhancedMacroOptions to show flag options when cursor is in flags area
- Show current flag first if cursor just typed it, then show remaining available flags
- Add renderItem and renderDetails methods to MacroFlag

* Macros: Implement scoped macro syntax with opening and closing tags

- Add scoped macro processing to MacroCstWalker to find and merge opening/closing pairs
- Parse closing block flag (/) to identify closing macros and match with opening tags
- Extract content between opening and closing tags as the last unnamed argument
- Add `isScoped` property to MacroCall and MacroContext to track scoped invocations
- Implement `#processScopedMacros` to find outermost matching pairs and handle nesting

* Macros: Add autocomplete warnings, scoped content info, and closing tag suggestions

- Add arity warning banners in autocomplete details for invalid argument counts
- Show warning when using space-separated args on multi-arg or no-arg macros
- Add scoped content info banner when cursor is inside unclosed scoped macro
- Implement MacroClosingTagAutoCompleteOption to suggest closing tags for scoped macros
- Add sortPriority property to AutoCompleteOption for controlling sort order

* SlashCommands: Disable unimplemented flags and closing flag when no unclosed scopes in autocomplete

- Set closing block flag as non-selectable when no unclosed scopes exist
- Set unimplemented flags as non-selectable with empty valueProvider
- Lower sort priority (12) for non-selectable flags vs selectable flags (10)

* Autocomplete: Show scoped content info and auto-close no-arg macros

- Show scoped content info when cursor is at closing }} of unclosed scoped macro
- Auto-complete no-arg macros with closing }} using valueProvider
- Trigger autocomplete on select (isSelect) to refresh after choosing an option
- Simplify MacroFlagAutoCompleteOption to use base makeItem for consistent styling
- Change closing tag icon from '{/}' to '{/' for better visual consistency

* Macros: Add scoped trim macro to trim content inside opening/closing tags

- Add scoped usage for {{trim}}content{{/trim}} to trim whitespace from content
- Keep non-scoped {{trim}} behavior (post-processing marker) for backward compatibility
- Add optional unnamed 'content' argument for scoped usage
- Update description to explain both scoped and non-scoped behavior
- Handler checks isScoped flag to determine which behavior to use

* Autocomplete: Fix closing tag parsing to prevent `/` being treated as flag

- Add special case in parseMacroContext to detect closing tags (`/` + identifier char)
- Stop flag parsing when `/` is followed by identifier character (closing tag syntax)
- Simplify MacroClosingTagAutoCompleteOption valueProvider to return full closing tag
- Remove input-based logic since autocomplete replaces entire identifier

* Macros: Add {{if}} conditional macro with auto-resolution of macro names

- Add {{if condition}}content{{/if}} macro to conditionally show content
- Auto-resolve condition if it matches a registered macro name (0 required args)
- Support both scoped content ({{if x}}...{{/if}}) and explicit args ({{if::x::content}})
- Treat empty string, "false", "off", "0" as falsy conditions
- Inherit environment context when resolving macro names
- Update autocomplete warning to allow space-separated syntax

* Macros: Add centralized identifier validation with pattern enforcement

- Export MACRO_IDENTIFIER_PATTERN from MacroLexer for reuse across modules
- Add isIdentifierValid() helper function to validate macro names and aliases
- Enforce identifier pattern: must start with letter, followed by word chars or hyphens
- Update macro registration to validate both primary names and alias identifiers
- Improve error messages to explain identifier requirements
- Add comprehensive e2e tests for valid/invalid identifier patterns

* Macros: Add tests for scoped {{trim}} macro functionality

* SlashCommands: Fix macro indexing to properly handle nested macros with brace depth tracking

- Replace regex-based macro detection with manual brace depth tracking
- Track opening/closing brace pairs to correctly identify macro boundaries
- Ensure nested macros like {{reverse::Hey {{user}}}} are properly indexed
- Index both outer and inner macros by scanning content recursively
- Handle unclosed macros by defaulting to end of text

* Macros: Add {{else}} branch support to {{if}} conditional macro

- Add {{else}} macro as marker to split then/else branches in {{if}} blocks
- Use control character sequence (\u0000\u001FELSE\u001F\u0000) as internal marker
- Split scoped content on else marker and trim both branches independently
- Return then-branch if condition is truthy, else-branch if falsy
- Auto-suggest {{else}} in autocomplete when inside scoped {{if}} block
- Make {{else}} non-selectable in autocomplete when outside {{if}} scope

* Macros: Add negation support to {{if}} conditional macro with ! prefix

- Add ! prefix support to invert condition evaluation in {{if}} macro
- Parse original macro text to detect ! prefix before macro resolution
- Strip ! from condition after detecting inversion to avoid double-negation
- Invert isFalsy result when ! prefix is detected in original condition
- Prevent ! in resolved values from triggering inversion (only original syntax)

* Autocomplete: Add {{if}} condition autocomplete with zero-arg macro suggestions

- Add EnhancedMacroAutoCompleteOptions typedef for noBraces/paddingAfter/closeWithBraces options
- Support options object in EnhancedMacroAutoCompleteOption constructor alongside context
- Add noBraces mode to display macro names without {{ }} braces (for use as values)
- Add paddingAfter option to match opening whitespace style before closing }}

* Autocomplete: Match opening whitespace padding when auto-closing macros

* Fix `{{if}}` example usages

* Macros: Hide `comment` alias from autocomplete suggestions for `//` macro

* Macros: Simplify {{trim}} handler with destructured parameters and clearer content check

* Macros: Use MacroEngine.evaluate for zero-arg macro resolution in {{if}} condition handler

* Macros: Add auto-trim for scoped content with # flag to preserve whitespace

- Auto-trim scoped content by default in MacroCstWalker before passing to handlers
- Add preserveWhitespace flag (# symbol) to prevent auto-trimming when needed
- Rename legacyHash flag to preserveWhitespace across engine and definitions
- Update {{trim}} handler to rely on engine auto-trim for scoped content
- Update {{if}} handler to respect # flag when trimming branches around {{else}} marker

* Macros: Clarify macro name validation error message to use "alphanumeric characters" instead of "word chars"

* Add 'setspriteoverride' optional 'name' argument

* Refactor ElevenLabs TTS API key handling (#4906)

* Refactor ElevenLabs TTS API key handling #4483

* Remove unused connection button and related event handler from ElevenLabs TTS provider

* Add ElevenLabs STT endpoint

* Add caching system prompt feature for OpenRouter Gemini (#4903)

* feat: add caching system prompt for OpenRouter Gemini

* fix: resolve reviews

* Update GitHub links to llama.cpp

* Add model selection support for llama.cpp router mode (#4910)

* Add model selection support for llama.cpp router mode

- Add llamacpp_model setting to textgen-settings.js
- Implement loadLlamaCppModels() function to fetch and populate models
- Add onLlamaCppModelSelect() handler for model selection
- Update status check to load llama.cpp models when connecting
- Update getTextGenModel() to return selected llama.cpp model
- Add model dropdown to HTML UI in llama.cpp section
- Initialize event handlers and Select2 for better UX
- Add llamacpp_model to preset manager for save/load support
- Add llamacpp_model to slash commands support

This implements model selection for llama.cpp router mode, allowing
users to select from multiple models without restarting the server.
Follows the same pattern as Ollama, Tabby, and vLLM implementations.

* Correct spelling

* Fix clear selection position

---------

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

* Add glm-4.7 model option and context mapping for Z.AI

* Add select2 style for NanoGPT list
Closes #4911

* Disable macro engine init traces

* Update type annotations for instruct presets and context presets

* Fix test for new error text

* Add MacroStoryString tests

* Add trimContent utility for consistent indentation dedenting in scoped macros

- Add trimScopedContent method to MacroEngine that trims and dedents scoped content based on first non-empty line indentation
- Pass trimContent utility through evaluation context to all macro handlers
- Update {{if}} macro to use trimContent instead of direct trim() call
- Update auto-trim logic in MacroCstWalker to use trimContent for consistent dedenting
- Add trimContent to MacroExecutionContext type definitions

* Add ELSE_MARKER export and cleanup leftover markers in macro processing

* Update trimContent parameter to use options object pattern in JSDoc

* Add processor registration system to MacroEngine with priority-based execution

- Add MacroProcessor callback and RegisteredProcessor typedef for pre/post processors
- Add addPreProcessor/removePreProcessor and addPostProcessor/removePostProcessor methods with priority-based sorting
- Refactor core legacy syntax handling into registered processors with reserved priorities (0-50)
- Move legacy time syntax, marker replacements, brace unescaping, trim macro, and ELSE_MARKER cleanup to registered processors

* Split core processor registration into separate pre and post processor methods

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-28 21:36:13 +02:00
Cohee 1c0e7ea955 Merge pull request #4925 from SillyTavern/staging
Staging
2025-12-28 18:28:51 +02:00
Ngo Dinh Gia BaoandCohee 829db7f2d0 [Electron Hub] Prompt Caching Support for Claude models (#4918)
* Prompt Caching support Claude models

* Prompt Caching support Claude models

* Diff clean-up

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-28 17:05:54 +02:00
Cohee bb53da4c09 add missing zai vision models 2025-12-27 23:07:57 +02:00
Cohee 1f0c0ccff4 Add message-role command 2025-12-27 21:21:39 +02:00
SammyandCohee 9a1ded5202 Allow editing of global Worldinfo settings (#4921)
* create and export updateWorldInfoSettings

* Add WorldInfoSettings type and refactor updateWorldInfoSettings function

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-27 20:08:29 +02:00
equal-l2andCohee d46fd60a57 Fix OpenRouter compatibility for OpenAI models (#4917)
* Fix OpenRouter compatibility for OpenAI models

* Don't disable o1 streaming on OpenRouter

* Fix OpenRouter compatibility for o1 model handling

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-27 18:44:37 +02:00
Cohee 8b94180bba 1.15.0 2025-12-27 17:25:43 +02:00
Ben 3668e95d95 filter out models that don't have a valid id (#4920) 2025-12-27 02:33:25 +02:00
Cohee 11337d40ef Fix chutes status check 2025-12-27 01:39:48 +02:00
Cohee a14b0855ee Allow getting current name in message-name 2025-12-27 01:28:56 +02:00
AphidGitandCohee af495cefbd chchar slash cmd (#4916)
* Add an additional slash command to change a message's character and avatar.

* Refactor message character change command to update message sender's name

* Fix default value

* Allow setting unbound message names

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-27 01:24:00 +02:00
Cohee e7c9496a61 Fix: add missing quotes to index.html 2025-12-27 00:13:39 +02:00
9nbf7c4q6b-lgtmandCohee 3098c4c5bf Comfyui serverless runpod image generation (#4891)
* Add comfyrunpod generation endpoints.

Get a bunch of settings added.

Probably get runpod api secret stored properly.

sending to runpod.

Correct workflow wrapping for runpod.

* Reuse comfyui workflow setting block for runpod.

* Update API key url to point to runpod settings

* Remove debug print.

* Combine normal and runpod comfyui generation functions

* Remove unused server endpoints for runpod.

* Remove debug prints from server.

* Remove redundant switch case.

* Check for url to see if image generation is possible for comfy and comfy runpod.

* lint

* Correct/update doc comments.

* Make runpod serverless a sub-type under comfyui source in the UI.

* Set comfy_type in stable-diffusion defaultSettings

* Allow loading comfy workflows even if url isnt set yet.

* Change default runpod url to template example

* Rename runpod api key to comfy_runpod

* Handle default switches separately from standard now that default setting is ensured.

* Update runpod api key name on server.

* Move example runpod url to placeholder.

* lint

* Remove incorrect comment.

* Hide toasts remote models toasts

* React to key updates

* Add type annotation for data and improve workflow handling in generate endpoint

---------

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

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

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

This reverts commit 6f616767cc.

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

* Reverted changes.

---------

Co-authored-by: user <user@exmaple.com>
2025-12-24 16:38:25 +02:00
my-alt 29456b9bd2 Enhance text generation API to support model parameter for llama.cpp router mode. Update getStatusTextgen to include model in request body and improve context size handling. (#4914) 2025-12-24 16:30:45 +02:00
Cohee 432639e341 Disable macro engine init traces 2025-12-23 02:45:28 +02:00
Cohee 373da39bf4 Add select2 style for NanoGPT list
Closes #4911
2025-12-23 00:09:39 +02:00
Cohee 0539583197 Add glm-4.7 model option and context mapping for Z.AI 2025-12-22 23:14:09 +02:00
my-altandCohee 7f98e3e213 Add model selection support for llama.cpp router mode (#4910)
* Add model selection support for llama.cpp router mode

- Add llamacpp_model setting to textgen-settings.js
- Implement loadLlamaCppModels() function to fetch and populate models
- Add onLlamaCppModelSelect() handler for model selection
- Update status check to load llama.cpp models when connecting
- Update getTextGenModel() to return selected llama.cpp model
- Add model dropdown to HTML UI in llama.cpp section
- Initialize event handlers and Select2 for better UX
- Add llamacpp_model to preset manager for save/load support
- Add llamacpp_model to slash commands support

This implements model selection for llama.cpp router mode, allowing
users to select from multiple models without restarting the server.
Follows the same pattern as Ollama, Tabby, and vLLM implementations.

* Correct spelling

* Fix clear selection position

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-21 22:51:44 +02:00
Cohee 39cc1b9039 Update GitHub links to llama.cpp 2025-12-21 21:13:13 +02:00
Chanho Chung ca43796795 Add caching system prompt feature for OpenRouter Gemini (#4903)
* feat: add caching system prompt for OpenRouter Gemini

* fix: resolve reviews
2025-12-20 19:01:42 +02:00
Cohee c75df956c5 Refactor ElevenLabs TTS API key handling (#4906)
* Refactor ElevenLabs TTS API key handling #4483

* Remove unused connection button and related event handler from ElevenLabs TTS provider

* Add ElevenLabs STT endpoint
2025-12-20 18:37:59 +02:00
Cohee 0dd32775d6 Add 'setspriteoverride' optional 'name' argument 2025-12-19 20:38:29 +02:00
Cohee 83ea6e5cbf Better thonk effort for Gem 3 2025-12-18 21:40:52 +02:00
Cohee 6fccccca6d OpenRouter: add as image generation source 2025-12-18 21:17:01 +02:00
Cohee b370808753 Migrate substituteParams calls to new engine (#4901) 2025-12-18 00:01:08 +02:00
Cohee c92939e56c Z.AI: Video inlining and 'coding' captions
Closes #4899
2025-12-17 23:31:14 +02:00
Cohee 995fa10fa4 gpt-image-1.5 2025-12-17 23:06:34 +02:00
mightytribbleandCohee 2cd2bd4a4d Implement Gemini thought signatures (#4886)
* Implement Gemini thought signatures

* Implement streaming support for Gemini thought signatures

* Implement OR support for Gemini thought signatures

* Remove unnecessary extraction of thought sigs from response parts

* Update thought sig comments to remove explicit Gemini mention

* Fix thought_signature naming convention in message.extra

* Add thought_signatures to ReasoningMessageExtra typedef

* Prevent thought sigs being sent to incompatible endpoints

* Move signatures to populateChatHistory, update for consistent casing

* Code clean-up

* Only send thought signatures if target model and API match original

* Implement content-hash thought signature mapping

* Change the data model + split for text/functions

* Don't include signature to invocations if the model doesn't match

* Fix function description

* Remove misleading comment

* Handle OpenRouter signatures

* Improve message extra types

* Prevent modifying original invocations when removing signatures

* Fix return of openrouter non-streaming signatures

* Remove redundant array check

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-17 22:23:47 +02:00
Cohee 5accfbc5d8 Gemini: add media resolution select (#4775) 2025-12-17 20:46:02 +02:00
Cohee 081c3e7b1c jerma 3 flash 2025-12-17 20:35:00 +02:00
Cohee 8fa01d3df9 Update Mistral V7-Tekken
Fixes #4826
2025-12-17 00:41:04 +02:00
Cohee 48089598b6 OpenAI: gpt-image-1-mini 2025-12-17 00:17:13 +02:00
Cohee bb3ea08b5a Z.AI: Add image generation and web search (#4895)
* Z.AI: Add image generation

* Z.AI: Add web search endpoint

* Add image URL validation

* Combine validation conditions
2025-12-16 00:39:17 +02:00
Wolfsblvt 000fbccda9 Optimize {{pick}} macro by caching content hash in MacroEnv 2025-12-15 22:08:59 +01:00
6f8b6b098e Macros 2.0 (v0.3) - Replacing the existing Macro System with a new Macro Engine (#4820)
* Chevrotain lib and env setup

* First draft of the macro lexer

* fix ESLint types loading for chevrotain

* Cleaner lexer modes

* Readme link to Chevrotain & license

* Add jsconfig to tests folder

- Add jsconfig.json to tests folder, to prevent IDE errors on dynamic imports inside the page.evaluate execution.

* Slight improvements on lexer & first tests

* Add more lexer tests

* More edge cases tests

* Reorder tests

* Add macro execution modifiers + more tests

- Added macro flags (execution modifiers) to lexer
- Fixed some lexing issues
- Expanded lexer tests
- Treat lexer errors as failed test

* enable eslint for tests and run it

* Fix lexing unknown flags - treat as error

* Rewrote lexer modes/tokes to capture errors better

* Add lexing for output modifiers

* Clearer names for lexer tokens

* Increase tests default timeout

* Restructure lexer error testcases

* Allow legacy underscores in macro identifiers

* Test case for legacy single-colon syntax

* Improve lexer, removing warnings

* Basic setup for MacroParser + initial tests

* Make parser errors testable

* Add macros stuff to SillyTavern.getContext

* macros test case naming + lint

* Parser consumes basic macros

- Fix lexer mode names
- Add basic macro parsing (identifier, and arguments)
- Tests: basic macro parsing tests
- Tests: simplifyCstNode supports ignoring nodes, or flattening nodes to just plaintext

* Improve macro argument parsing to allow colons in values

Enhances separator handling by fixing separator type detection and enabling colon characters within argument values
Updates validation to require at least one argument component and adds error cases for empty arguments
Includes expanded test coverage for mixed separator scenarios and edge cases

* More nested macro tests

Add error case tests to enforce macro start position requirements
Include nested macro parsing scenarios and invalid syntax checks
Ensures parser correctly handles edge cases with embedded macros

* Unvendor chevrotain

* Add document rule

* Implement visitor, switch built-ins to new type

* Puppeteer -> playwright

* Revert "Implement visitor, switch built-ins to new type"

This reverts commit 706a94b4de.

* Converted puppeteeer tests

* File rename

* chore: reduce Playwright worker count to 4 for performance/stability

* test: add comprehensive legacy macro parser test suite

- Added 13 test cases covering legacy macro formats (roll, reverse, comment, datetime, time_UTC, banned, setvar)
- Documented parser limitations with TODO comments for whitespace separators, special characters, and empty arguments
- Tests validate parsing of various separator styles (space, colon, +/-) and argument formats (quoted, numeric, empty)

* fix: handle legacy macro syntax with colon or whitespace separator

- Modified arguments rule to support both double-colon (::) and single-colon (:) separators
- Made single-colon separator optional to allow whitespace-separated legacy macros
- Removed TODO comments as parser now correctly handles legacy macro formats

* feat: support space-separated quoted arguments in macro parser

- Added parsing support for equals signs and quotes as valid argument tokens
- Removed TODO comments for legacy macro parsing with quoted arguments

* fix: improves macro argument parsing with colon handling

Enhances parser to correctly handle double colons within legacy single-colon arguments
Introduces separate parsing rules for arguments with different colon constraints
Adds test coverage for arguments containing double colons in legacy format

* fix: allow empty macro arguments after double-colon separator

- Changed argument rule from AT_LEAST_ONE to MANY to permit zero-length arguments
- Updated tests to verify empty argument parsing (e.g., `{{something::}}`)
- Enhanced simplifyCstNode helper with default flatten/ignore keys and improved null handling

* refactor: improve test documentation with inline macro display

- Added inline comments showing the actual macro syntax being tested for better readability
- Removed duplicate comment in error test case
- Cleaned up extra whitespace in legacy macro tests

* feat: add legacy macro preprocessing for time offset format

- Implemented preProcessFixLegacyMacros method to convert {{time_UTC±N}} to {{time::UTC±N}} format
- Updated tests to use new preprocessing step for legacy time macro parsing
- Added runPreProcessFix option to test helper functions for controlled legacy macro handling

* feat: add support for comment macros with double-slash syntax

- Added `DoubleSlash` token to lexer to recognize `//` as a valid macro identifier
- Updated parser to accept either `//` or standard identifiers as macro names
- Enhanced test suite with comprehensive comment macro test cases including multiline support

* feat: implement macro evaluation engine with CST walking and registry integration

(I'm tired, let's just throw this in right now)

- Added CST walker and macro registry to engine initialization
- Enhanced parseDocument to handle empty input, legacy macro preprocessing, and error collection
- Implemented async evaluate method with full macro resolution pipeline
- Added resolveMacro callback to handle unknown macros and registry execution
- Integrated lexing/parsing error handling with console warnings
- Added support for preserving unknown macro

* refactor: improve type safety and code clarity in macro evaluation system

- Simplified typedef imports to use correct Chevrotain types (CstNode, IToken)
- Added TokenRange typedef for consistent offset handling
- Enhanced error messages with context-specific prefixes
- Replaced verbose type casts with inline JSDoc annotations
- Condensed singleton pattern declarations to single lines
- Improved null safety with optional chaining and nullish coalescing
- Extracted resolveMacro logic into private root function

* fix test macro whitespace arguments onls accepting one argument

* Fix OpenRouter embeddings URL
#4736

* Fix: Prevent data loss on bulk regex move to scoped scripts (#4760)

* Fix: Prevent data loss in regex bulk move

* prevents moving to scoped scripts with group selected for bulkedit

* Refactor: make whitelist validation a bit more robust (#4757)

* refactor: extract IP whitelist validation into helper function

- Added isIPInWhitelist helper with error handling for individual whitelist entry checks
- Replaced inline whitelist matching logic with reusable function calls
- Added JSDoc type annotations and error logging for failed IP matching attempts

* refactor: simplify whitelist validation with upfront filtering

- Moved IP validation to startup time instead of per-request checking
- Extracted validateWhitelist function to filter invalid entries once at initialization
- Simplified isIPInWhitelist by removing redundant error handling after validation

* fix: correct IP whitelist matching to use parsed CIDR notation

* Feat: Improve multiline input handling in popups (#4756)

* feat: improve multiline input handling in popups

- Added Ctrl+Enter requirement for submission in multiline input popups to prevent accidental sends
- Exported PopupUtils class for external use

* refactor: remove redundant higher/different rows from input popups

- Removed rows: 2 from callGenericPopup calls where default behavior is sufficient
- Increased rows from 2 to 4 in caption extension for better multiline input experience

* Fix npm audit

* feat: add max-height and scrolling to world entry key input fields (#4769)

- Added 160px max-height to select2 multiple selection, primary key, and secondary key text areas in world entries
- Enabled vertical scrolling with hidden horizontal overflow for better UX with long content

* Bump anti-troll tags limit
Closes #4763

* OpenAI: Add Sora 2 API (#4748)

* OpenAI: Add Sora 2 API

* Add duration control

* Support client generation abort

* Reduce poll log amount

* Simplify selector

* Simplify model-specific control handling

* Gemini: Pass non-success response content to frontend

* Vertex: Add Vertex AI-specific safety setting (#4770)

Closes #4455

* Feature: allows sorting tags by most used (#4768)

* add sorting tags by most used

* Fix whitespaces

* Code review updates

* Remove commented code

* Fix capitalization in comment

* Apply review suggestion

* Simplify template init

* Reformat

* Add documentation for appendViewTagToList and printViewTagList functions

* Reprint renamed tags regardless of sorting mode

---------

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

* Move img.swipe notice block up

* Preserve media playback state when running appendMediaToMessage (#4771)

* Preserve media playback state when running appendMediaToMessage

* Better selector specificity

* Fix local variable name

* Move typedef to global.d.ts

* Check for readyState on save/restore

* Only check for currentSrc on restoration callback

* gpt-5.1

* A 500 billion dollar startup can’t filter API payload fields

* Refactor macro argument validation to use requiredArgs and list pattern

- Replace minArgs/maxArgs/enforceArity with requiredArgs and list specification
- Add MacroListSpec typedef for flexible list argument constraints (min/max)
- Rename enforceArity to strictArgs with inverted default behavior
- Update validation logic to separately track required vs. list arguments
- Add requiredArgs and list arrays to MacroExecutionContext for easier access
- Improve error messages to clearly distinguish between required and list

* Refactor MacroRegistry.registerMacro to use options object pattern

- Move handler function into options object as required property
- Improve validation with detailed error messages for all option fields
- Add explicit type checking for requiredArgs, list, strictArgs, and description
- Consolidate name normalization and validation logic
- Simplify list option parsing with clearer conditional structure
- Update all builtin macro registrations to use new signature

* Add e2e tests for macro arity validation errors

- Test ping macro rejects calls with unexpected arguments
- Test upper macro rejects calls without required arguments
- Verify macros remain unresolved and log warnings on arity violations

* re-implement core macros as registered macros

- Create shallow frozen copy of env object before passing to macro handlers
- Add comprehensive MacroEnv typedef with nested types for names, character, system, and extra fields
- Update MacroDefinitionOptions typedef to clarify default values and mark handler as required
- Export variable manipulation functions for external use
- Fix whitespace in ifCallback JSDoc comment

* Defer slash command autocomplete initialization to firstLoadInit

- Move slash command autocomplete setup from module-level to initSlashCommandAutoComplete function
- Add null check for sendTextarea.value before accessing first character
- Import and call initSlashCommandAutoComplete in firstLoadInit sequence
- Export registerCoreMacros, registerInstructMacros, and registerVariableMacros using named export syntax
- Call registerCoreMacros from initMacros with

* Add variable manipulation functions to SillyTavern context API

- Import deleteGlobalVariable, deleteLocalVariable, addGlobalVariable, addLocalVariable, incrementGlobalVariable, incrementLocalVariable, decrementGlobalVariable, and decrementLocalVariable from variables.js
- Expose del, add, inc, and dec methods on both context.variables.local and context.variables.global objects
- Provide consistent API for variable deletion, addition, increment, and decrement operations

* Extract test setup utilities and fix trailing comma in core-macros.js

- Add testSetup utility object with goST and awaitST helper functions for Playwright tests
- Replace duplicated beforeEach setup code in MacroLexer, MacroParser, and MacroRegistry tests with testSetup.goST
- Add explanatory comments indicating tests currently run without ST context
- Fix missing trailing comma in input macro handler registration

* Refactor MacroEngine e2e tests to use real core macros instead of prototypes

- Replace prototype macros (ping, echo, upper, wrap, first) with actual core macros (newline, reverse, setvar, getvar, addvar, roll)
- Use testSetup.awaitST helper from utils.js for beforeEach setup
- Increase test timeout from 10s to 20s due to additional setup requirements
- Remove registerPrototypeMacros import and registration logic from evaluateWithEngine
- Add page.waitForTimeout(1000) to ensure macros are fully initialize
- Remove now obsolete MacroBuiltins.js

* Fix audit in tests

* Rename frontend test utils file to frontent-test-utils.js and update imports

- Rename tests/frontend/utils.js to tests/frontend/frontent-test-utils.js
- Update testSetup imports across MacroEngine, MacroLexer, MacroParser, and MacroRegistry e2e tests

* Refactor MacroRegistry for improved readability and consistency

- Reorder MacroDefinition typedef fields to match registration order (handler moved to end)
- Add inline JSDoc comments to MacroDefinitionOptions properties for clarity
- Simplify name validation logic in unregisterMacro, hasMacro, and getMacro methods using early returns
- Extract argument validation logic into dedicated isArgsValid helper function
- Refactor executeMacro to be async and use Promise.resolve for consistent promise handling

* Add returns field to MacroDefinitionOptions for documenting macro return values

- Add returns property to MacroDefinitionOptions typedef with string type and null default
- Include returns field in MacroDefinition typedef
- Store returns value in macro definition object for documentation purposes

* Add error handling to macro execution and refactor core macro handlers

- Add catch handler in MacroRegistry.executeMacro to log errors and return empty string on handler failures
- Update macro descriptions to use "index" instead of "ID" for message position macros
- Simplify reverse macro description and remove redundant null coalescing
- Add strictArgs: false to comment macro to ensure it's always removed
- Enhance time macro description with UTC offset examples
- Remove unnecessary null check

* Refactor instruct-macros.js for consistency and reduce code duplication

- Rename enabled helper to instEnabled and add sysEnabled helper for clarity
- Consolidate defaultSystemPrompt, instructSystem, and instructSystemPrompt into single registerSimple call
- Simplify systemPrompt handler by removing unnecessary null coalescing and intermediate variables
- Convert chatSeparator and chatStart macros to use registerSimple helper
- Fix JSDoc comment formatting for registerSimple helper function

* Add normalize helper to MacroExecutionContext and refactor variable macros for consistency

- Add normalizeMacroResult method to MacroEngine for converting macro results to strings
- Include normalize function in MacroExecutionContext for handler use
- Update normalizeMacroResult to handle arrays explicitly alongside objects
- Add returns field to variable macros that produce side-effects only
- Refactor variable macro handlers to use destructuring and normalize helper
- Remove redundant null checks an

* chore: Remove duplicate getglobalvar macro registration from variable-macros.js

- Remove redundant getglobalvar macro definition (already registered earlier in the file)
- Import MacroEngine in MacroRegistry for normalizeMacroResult access
- Add fallback binding for normalize in MacroExecutionContext when not provided by caller
- Update executeMacro to use executionContext.normalize instead of standalone normalizeMacroResult
- Remove normalizeMacroResult helper function from MacroRegistry (now handled by MacroEngine)

* Add core environment macros for names, character fields, system info, and deterministic pick

- Add lastGenerationType tracking with event listeners for GENERATION_STARTED and CHAT_CHANGED
- Add ensureLastGenerationTypeTracking helper to initialize event listeners once
- Register name macros: user, char, group, groupNotMuted, notChar, charIfNotGroup
- Register character card field macros: charPrompt, charInstruction, description, personality, scenario, persona, mesExamplesRaw, charDepthPrompt, cre

* Refactor core macros into separate modules by category (env, state, chat, time)

- Move name and character card field macros to new env-macros.js module
- Move system/device/runtime state macros to new state-macros.js module
- Move chat inspection macros (lastMessage, lastMessageId, etc.) to new chat-macros.js module
- Move time/date macros (time, date, weekday, isotime, etc.) to new time-macros.js module
- Remove lastGenerationType tracking logic and helper functions from core-macros.js (moved to state

* Reorganize macro system into engine and definitions directories

- Move macro engine components (MacroEngine, MacroRegistry, MacroLexer, MacroParser, MacroCstWalker) to macros/engine/ subdirectory
- Move macro definition modules (core-macros, env-macros, state-macros, chat-macros, time-macros, variable-macros, instruct-macros) to macros/definitions/ subdirectory
- Create macro-system.js as central entry point that exports engine singletons and initRegisterMacros function
- Refactor variable-macros.js to use S

* Export getGeneratingModel function and add MacroEnvBuilder to macro system exports

- Export getGeneratingModel function from script.js for external use
- Import MacroEnvBuilder in macro-system.js
- Add envBuilder singleton to macros export object alongside existing engine components

* Extract MacroEnv typedefs into separate MacroEnv.types.js file

- Create MacroEnv.types.js with MacroEnv, MacroEnvNames, MacroEnvCharacter, and MacroEnvSystem typedefs
- Remove MacroEnv typedef definitions from MacroRegistry.js
- Update MacroRegistry.js, MacroEngine.js, MacroEnvBuilder.js, and env-macros.js to import MacroEnv from MacroEnv.types.js
- Change MacroEngine.evaluate env parameter type from any to optional MacroEnv

* Add comprehensive e2e tests for MacroEnvBuilder

- Create MacroEnvBuilder.e2e.js with 13 test cases validating environment construction
- Test name override precedence (overrides vs global fallback)
- Test character field population based on replaceCharacterCard flag
- Test original value one-shot helper function behavior
- Test group override string propagation to group/group

* Add substituteParamsAsync function with experimental macro engine support

- Create substituteParamsAsync function in script.js as async alternative to substituteParams
- Use object destructuring pattern for function parameters following RO-RO convention
- Add experimental_macro_engine flag to power_user settings for feature gating
- Add MacroEnvFunctions typedef with original and postProcess function types to MacroEnv.types.js
- Add functions property to MacroEnv typedef for one-shot helpers an

* Add dynamic macro support to MacroEngine with environment-based override and postProcess execution

- Add defOverride parameter to MacroRegistry.executeMacro for temporary macro definitions
- Check env.dynamicMacros in MacroEngine#resolveMacro and create temporary macro definition when found
- Set strictArgs to true for dynamic macros to fail if called with arguments
- Execute env.functions.postProcess on macro results in MacroEngine#resolveMacro with error handling
- Update MacroEnv typedef to make

* Refactor macro handlers to assume non-null env and remove optional chaining

- Remove optional chaining (?.) from env property access in env-macros.js and instruct-macros.js
- Change MacroExecutionContext env property from optional to required in MacroRegistry.js
- Update executeMacro context parameter from optional to required
- Simplify original macro handler to call env.functions.original() directly without try-catch
- Update MacroHandler typedef to use arrow function syntax for consistency
- Remove redundant null checks an

* Refactor MacroRegistry.executeMacro to accept MacroCall object and make MacroExecutionContext properties non-optional

- Change executeMacro to accept MacroCall object instead of separate name and context parameters
- Move normalize function from context parameter to options object in executeMacro
- Construct MacroExecutionContext from MacroCall properties within executeMacro
- Set namedArgs to null in executionContext (currently unused)
- Update MacroEngine.resolveMacro to pass MacroCall directly

* Remove normalize parameter from MacroRegistry.executeMacro and bind normalizeMacroResult directly in execution context

- Remove normalize parameter from executeMacro options object in MacroRegistry.js
- Bind MacroEngine.normalizeMacroResult directly in executionContext instead of accepting override
- Remove normalize option from MacroEngine.resolveMacro call to executeMacro
- Add missing name fields (group, groupNotMuted, notChar) to MacroEnvBuilder default env object

* Make MacroEnvRawContext properties optional and change original function from required to optional in MacroEnvFunctions

- Change MacroEnvRawContext properties from required to optional with null defaults
- Change original function from required to optional in MacroEnvFunctions typedef
- Remove original function from default env object in MacroEnvBuilder (only include when provided)

* Refactor MacroEnvBuilder tests to use optional properties and add macro arity validation tests

- Remove explicit undefined/false assignments from MacroEnvRawContext test objects (now optional with defaults)
- Rename additionalMacro to dynamicMacros in MacroEnvBuilder tests and update property access from env.extra to env.dynamicMacros
- Move original function from env.extra to env.functions in test assertions
- Remove test for additionalMacro overriding original helper (no longer applicable with

* Improve macro error handling with dedicated diagnostics and runtime error propagation

- Import and use logMacroInternalError and logMacroRuntimeWarning from MacroDiagnostics in MacroEngine
- Wrap MacroRegistry.executeMacro call in try-catch to distinguish runtime vs internal errors
- Nest postProcess execution in inner try-catch with dedicated error logging
- Return raw macro syntax on execution failure instead of empty string
- Replace console.warn with logMacroRuntimeWarning for argument count

* Add macro argument type validation with positional argument definitions and runtime type checking

- Add MacroArgType and MacroPositionalArgDef typedefs for argument metadata
- Change requiredArgs option to accept number or MacroPositionalArgDef[] array
- Add requiredArgDefs property to MacroDefinition to store normalized argument definitions
- Validate requiredArgs array elements during macro registration (name, description, type fields)
- Generate default argument definitions when requiredArgs is a

* Add e2e tests for macro type validation and dynamic macro strict arity enforcement

- Add test verifying strict typed macros fail resolution when argument type is invalid
- Add test verifying non-strict typed macros execute with invalid types but log warnings
- Add test verifying dynamic macros reject arguments due to strictArgs enforcement
- Capture and assert runtime warning messages for type validation and arity violations
- Register test macros with integer type requirements and varying strict

* Add mesExamples macro with instruct mode formatting support

- Register mesExamples macro in env-macros.js to format dialogue examples
- Import parseMesExamples, main_api, power_user, and formatInstructModeExamples
- Check instruct mode enabled state and main_api to determine formatting path
- Parse raw examples using parseMesExamples with instruct mode flag
- Return empty string when raw examples are missing or parsed result is empty
- Format examples using formatInstructModeExamples when instruct mode is active

* Add URL navigation wait in test setup and increase Playwright worker count to 4

- Add waitForURL check after user selection in awaitST to ensure navigation completes before preloader check
- Increase Playwright workers from 1 to 4 for parallel test execution

* Add e2e tests for multi-line macro arguments and comment macro functionality

- Add test verifying reverse macro handles multi-line arguments with newline characters
- Add test verifying comment macro removes single-line comments with simple body
- Add test verifying comment macro accepts non-word characters immediately after //
- Add test verifying comment macro ignores additional // sequences inside comment body
- Add test verifying comment macro supports multi-line comment bodies

* Standardize JSDoc type annotations to use explicit null defaults and union types instead of nullable shorthand

* Remove individual test timeout configurations from frontend macro test files

* Add positional argument definitions with sample values and descriptions to core, env, and time macros

- Add sampleValue field to MacroPositionalArgDef typedef (optional string)
- Replace numeric requiredArgs with positional argument definition arrays in roll, banned, outlet, datetimeformat, and timeDiff macros
- Include name, sampleValue, description, and type fields for each positional argument
- Update timeDiff description to clarify absolute difference calculation
- Remove unnecessary blank lines in

* Remove async/await from macro engine evaluation and convert all macro handlers to synchronous execution

Makes me sad, but such is life

* Refactor substituteParams to use options object signature with backward compatibility for legacy positional arguments

- Rename original substituteParams to substituteParamsLegacy with unchanged positional argument signature
- Rename substituteParamsNew to substituteParams as the new primary function
- Add automatic detection and routing of legacy positional argument calls to substituteParamsLegacy
- Update substituteParamsExtended to use new options object signature and mark as deprecated

* forgor

* fix missing import, and package-lock, finally. Maybe.

* Add experimental macro engine toggle to UI settings

- Add experimental_macro_engine setting to default settings.json
- Move experimental_macro_engine property to correct position in power_user object (with other experimental settings)
- Add checkbox UI control in settings panel with flask icon and tooltip explaining nested macro resolution and logical replacement order
- Wire up checkbox event handler to save experimental_macro_engine setting
- Load experimental_macro_engine state on settings initialization

* Refactor macro pre/post-processing from parser to engine and improve error handling

- Move legacy macro pre-processing (time_UTC format) from MacroParser to MacroEngine #runPreProcessors
- Move trim macro post-processing to MacroEngine #runPostProcessors to handle cross-boundary behavior
- Remove MacroLexer import from MacroEngine (now handled by MacroParser.parseDocument)
- Update MacroParser.parseDocument to return separate lexingErrors and parserErrors arrays

* Add {{trim}} macro placeholder that defers to post-processing for cross-boundary whitespace handling

* Add eslint-plugin-playwright

* Add logMacroSyntaxWarning function for structured lexer/parser error reporting with compact human-readable payload

* Small code review fixes

- import event types from events.js
- Add chained fallback to {{input}}, just to be safe
- switched variables.js to export-per-method
- minor text adjustments in registered macro docs

* fix lexer not capturing linebreaks correctly & simplify plaintext token

- Replace alternation-based pattern with negated character class approach
- Use `(?:[^{]|\{(?!\{))+` to match non-brace chars or single braces not followed by another brace
- Add unicode flag for consistency
- Update comment to clarify intent: consume anything that is not the start of a macro '{{'

* Skip macro processing on char/group fields for env build (performance)

- Add returnRaw parameter to getCharacterCardFields to optionally return raw values without baseChatReplace
- Add returnRaw parameter to getGroupCharacterCards for consistent raw value handling
- Replace direct baseChatReplace calls with conditional transform function based on returnRaw flag
- Apply collapseNewlines when returnRaw is true and collapse_newlines setting is enabled
- Update MacroEnvBuilder to use the returnRaw as true

* Fix lexer failing to handle literal '{' before macro openers

- Add PlaintextOpenBrace token to lexer with pattern `/\{(?=\{\{)/` to match single '{' immediately before '{{'
- Update lexer mode definition to consume PlaintextOpenBrace before attempting macro start
- Update parser document rule to handle PlaintextOpenBrace as alternative to Plaintext
- Update MacroCstWalker to collect both Plaintext and Plaintext.OpenBrace tokens when building document items

* Add legacy non-curly marker pre-processing (<USER>, <BOT>, <CHAR>, <GROUP>, <CHARIFNOTGROUP>)

- Add pre-processing step in MacroEngine to rewrite legacy angle-bracket markers into their curly-brace macro equivalents
- Map <USER> → {{user}}, <BOT> → {{char}}, <CHAR> → {{char}}, <GROUP> → {{group}}, <CHARIFNOTGROUP> → {{charIfNotGroup}}
- Add e2e tests verifying legacy marker resolution through the engine pipeline
- Tests cover <USER>, <BOT>/<CHAR>, and <GROUP>/<CHARIFNOTGROUP> markers

* Add env.content to MacroEnv and use it for deterministic {{pick}} hashing

- Add content property to MacroEnv type definition and MacroEnvBuilder to expose the full original input string
- Update {{pick}} macro handler to use env.content hash instead of rawListString hash for seed generation
- Ensures deterministic behavior when the same prompt position contains different list items across evaluations
- Prevents {{pick}} from returning different values when nested macros resolve to different intermediate

* add e2e tests for env.content exposure and deterministic {{pick}} behavior

- Rename getChatIdHashCore → getChatIdHash in core-macros.js for consistency
- Add e2e test verifying env.content is exposed to macro handlers
- Add e2e test confirming {{pick}} returns stable results for same chat and content
- Tests verify deterministic behavior by comparing multiple evaluations with fixed chat_id_hash

* Rename chat macro helper functions to remove 'Core' suffix for consistency

* Add MacrosParser deprecation warnings and bridge to new macro engine when experimental flag enabled

- Import macroSystem and power_user for experimental macro engine integration
- Add @deprecated JSDoc tag to MacrosParser class
- Add #logDeprecated helper to warn about deprecated MacrosParser methods
- Add #registerMacroInNewEngine to bridge legacy macro registrations into new engine
- Add #unregisterMacroInNewEngine to bridge legacy macro unregistrations
- Log deprecation warnings in get, has, register

* Fix lint in tests

* Add comprehensive bracket handling tests and improve macro lexer/parser resilience to invalid syntax

- Add logMacroGeneralError function for non-macro-specific error logging
- Add CST validation check in MacroEngine to return original input if parser produces invalid CST
- Wrap MacroCstWalker.evaluateDocument in try-catch to gracefully handle evaluation failures
- Update MacroLexer Unknown token pattern to capture single closing braces not followed by another closing brace
- Add fallback mode exit

* Add error recovery for incomplete macros by flattening them to plaintext while preserving nested complete macros

- Enable Chevrotain error recovery in MacroParser constructor
- Add #isRecoveryToken helper to detect tokens inserted during error recovery
- Add #flattenIncompleteMacro to recursively convert incomplete macro nodes into plaintext items
- Update #collectDocumentItems to detect recovery-inserted Macro.End tokens and flatten incomplete macros
- Simplify plaintext token collection to use

* Add e2e test verifying nested macros resolve even when outer macro has invalid argument count

* Remove unused macro CST node caching mechanism from MacroCstWalker

* Add JSDoc type re-exports and register shorthand to macro-system.js for improved DX

- Re-export commonly used JSDoc types from MacroRegistry and MacroEnv modules for easier consumption by external code
- Add macros.register shorthand function bound to MacroRegistry.registerMacro for convenient macro registration
- Includes MacroDefinitionOptions, MacroHandler, MacroEnv, and related type definitions

* Migrate legacy macro registrations to new macro system API across multiple modules

- Replace MacrosParser.registerMacro calls with macros.register using object-based configuration
- Update imports from './macros.js' to './macros/macro-system.js'
- Extract macro registration into dedicated registerAuthorsNoteMacros function in authors-note.js
- Add descriptions to all macro registrations for better documentation
- Update MacrosParser iterator to yield from new registry when experimental engine is enabled

* Add MacroCategory to all macro registrations across codebase for improved organization and discoverability

- Import MacroCategory from macro-system.js in authors-note.js, memory/index.js, stable-diffusion/index.js, and macros.js
- Add category property to all macro registrations using appropriate MacroCategory values
- Assign 'legacy' category to MacrosParser auto-registered macros
- Categorize macros across chat, character, prompts, utility, random, state, time, and names categories

* fix lint

* Add MacroBrowser UI component and integrate macro help system into chat interface

- Add implementation of MacroBrowser
- Add macros.css stylesheet link to index.html
- Update core-macros.js ban macro to return empty string instead of 'Empty string' description
- Add sampleValue property to positional argument definitions in MacroRegistry
- Generate default sampleValue for numeric requiredArgs using 'arg{n}' pattern
- Set default description to '<no description>' and returns to '<empty string>' when empty

* Reorder JSDoc typedef declarations in MacroRegistry.js to have the most relevant first

* fix missing category in legacy initMacros

* Add displayOverride and exampleUsage properties to macro registration system

- Add displayOverride property to MacroDefinitionOptions for custom signature display
- Add exampleUsage property to MacroDefinitionOptions for documentation examples
- Update MacroRegistry.registerMacro to validate and process displayOverride and exampleUsage
- Add logMacroRegisterWarning function to MacroDiagnostics for registration-time warnings
- Auto-wrap displayOverride and exampleUsage in curly braces if missing

* Add error handling to MacroRegistry.registerMacro and logMacroRegisterError diagnostic function

- Add logMacroRegisterError function to MacroDiagnostics for registration failures
- Wrap MacroRegistry.registerMacro body in try-catch to handle registration errors gracefully
- Change registerMacro return type from MacroDefinition to MacroDefinition|null
- Log registration errors and return null instead of throwing, preventing macro registration failures from breaking the application

* Optimize character card field access with lazy evaluation to improve macro execution performance

* Add brace unescaping to MacroEngine post-processing to support literal curly braces in macro output

- Add regex replacement to unescape \{ and \} to { and } after macro execution
- Allows users to output literal braces by escaping them with backslashes
- Escaped sequences like \{\{ don't match MacroStart pattern and pass through as plain text

* Add alias system to macro registry with UI support for displaying and navigating macro aliases

- Add `aliases` property to MacroDefinitionOptions for defining alternative macro names
- Add `aliasOf` and `aliasVisible` properties to MacroDefinition to track alias relationships
- Update MacroRegistry.registerMacro to create alias entries pointing to primary definitions
- Add `getPrimaryMacro` method to retrieve primary definition from alias names
- Add filtering options to `getAllMacros` to exclude aliases

* Strip curly braces from MacroBrowser search query to match macro name format in search definitions

* Add enhanced macro autocomplete with argument hints and context-aware suggestions

- Add comprehensive CSS styling for enhanced macro autocomplete items with flex layout
- Add argument hint banner styling with gradient background and border
- Add current argument highlighting in details panel
- Export formatMacroSignature, createSourceIndicator, createAliasIndicator, and createTypeBadge from MacroBrowser for reuse

* Fix macro autocomplete not showing details/arguments because of trailing colons

* Change macro details CSS selectors from `.macroBrowser` to `.macro-details` for better reusability and update autocomplete to use macro enum icon

- Replace all `.macroBrowser` selectors with `.macro-details` in macros.css to allow macro details panel styling to work outside MacroBrowser context
- Change autocomplete option icon from hardcoded '{}' to `enumIcons.macro` for consistency
- Remove redundant `showCategory: false` option from renderMacroDetails call in autocomplete (now handled by default

* Add MacroArgType enum to replace string literal type union for macro argument types

- Add MacroArgType enum with STRING, INTEGER, NUMBER, and BOOLEAN values
- Replace MacroArgType typedef string literal union with enum reference
- Export MacroArgType from macro-system.js alongside MacroCategory
- Remove MacroArgType typedef re-export (now an enum, not a type)

* Add support for multiple argument types in macro definitions

- Update createTypeBadge to handle both single type and array of types, displaying as "type1 | type2" with tooltip
- Add JSDoc comments to MacroArgType enum values explaining each type
- Update MacroArgDefinition typedef to allow type property to be single MacroArgType or array
- Update MacroRegistry.registerMacro to validate array of types and default empty arrays to 'string'
- Update validateArgTypes to check if argument value matches

* Add returnType property to macro definitions with automatic type badge display in macro details panel

- Rename MacroArgType enum to MacroValueType to reflect dual use for arguments and return types
- Add returnType property to MacroDefinitionOptions (defaults to MacroValueType.STRING)
- Add returnType validation in MacroRegistry.registerMacro to ensure valid type values
- Update renderMacroDetails to always show Returns section with type badge
- Add macro-returns-content CSS class with flex layout for type

* Add detailed argument definitions, return types, and example usage to all variable macros

- Replace numeric requiredArgs with detailed argument definition objects including name, type, and description
- Add returnType property to all macros that return values (inc/dec/get variants)
- Add returns property descriptions to all macros
- Add exampleUsage arrays demonstrating typical usage patterns for each macro
- Apply changes consistently

* Add returns descriptions and return types to core macro definitions with improved documentation

* Add returns descriptions, display overrides, and example usage to time macros with improved documentation

* fix lint

* Add returns descriptions and return types to chat, environment, instruct, and state macros with improved documentation

* Add missing properties to dynamic macro definition override to match MacroDefinitionOptions structure

* Replace console logging with MacroDiagnostics logging in MacroEnvBuilder and MacroRegistry

* Add support for array-based argument types in macro autocomplete with union type display and tooltip

* Rename requiredArgs to unnamedArgs and add support for optional unnamed arguments with bracket notation in macro signatures and hints

* Add optional offset argument definition to time macro with type, sample value, and description

* Simplify example usage for random and pick macros by removing surrounding context text

* Add default value display for optional macro arguments in autocomplete and browser documentation

* Fix macro args defaultValue not being converted into the normalized values for register and display

* Allow STscript macro auto completion to still show up when typing closing braces

* Add space macro with optional count argument for inserting multiple spaces

* Add optional count argument to newline macro for inserting multiple newlines with default value of 1

* Remove MutationObserver and CTRL+F keyboard event handling from MacroBrowser

* fix lint

* Register `{{summary}}` macro for both old and new macro engines based on experimental flag

* Register `{{charPrefix}}` and `{{charNegativePrefix}}` macros for both old and new macro engines based on experimental flag

* Update hidden alias badge text to indicate deprecation status

* Simplify macro name validation and error handling in MacroRegistry

Remove redundant `macroName` variable by normalizing `name` parameter early and reusing it throughout the registration flow. Consolidate trim checks in validation condition.

* Remove exp macro engine flag checks from auto complete and help, and remove legacy macro template

Move macro registration to always use new engine regardless of experimental flag. Remove conditional logic for `experimental_macro_engine` in MacroBrowser, system messages, and slash command parser. Delete legacy `macros.html` template and associated static macro help generation. Always use MacroBrowser for macro documentation display.

* Rename macros to camelCase and add backward-compatible aliases

Rename `description`, `personality`, `scenario`, `creatorNotes` to `charDescription`, `charPersonality`, `charScenario`, `charCreatorNotes` respectively. Rename `idle_duration` to `idleDuration`. Add old names as aliases for backward compatibility. Add `comment` as visible alias for `//` macro. Mark `idle_duration` alias as hidden.

* fix `random` and `pick` macros by using list parameter directly instead of raw string

Remove `raw` parameter from `random` and `pick` macro handlers. Simplify legacy comma-separated list handling by using `list[0]` directly instead of `rawListString`. Rename `items` variable to `list` in `pick` macro for consistency.

* fix `random` and `pick` not handling all colon-separated lists as before

Extract `readSingleArgsRandomList` helper function to handle legacy comma-separated and double-colon list parsing. Reuse this helper in both `random` and `pick` macro handlers to eliminate duplicated list parsing logic.

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: bmen25124 <bmen25124@gmail.com>
2025-12-15 21:29:46 +02:00
Kexus 4f9aeac7ac Correct error message in evalBoolean (#4889) 2025-12-14 19:42:59 +02:00
Cohee 204d384d9b glm 4.6v 2025-12-13 17:41:24 +02:00
Cohee f3c963fa8e jippity 5.2 2025-12-13 17:26:31 +02:00
98dd31b7f5 Chevrons can overlap with other elements. (#4878)
* Attempt to fix overlapping chevrons.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3639322664

* Removed supports.

* swipeRightBlock now has pointer-events:none.

* Add pointer events to swipes-counter

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-12 22:02:14 +02:00
Cohee 7da38faf60 Z.AI: Add transcribe endpoint 2025-12-12 00:53:53 +02:00
Cohee f7d9dbf5ce Add speech-to-text endpoints for Chutes, Groq and Mistral 2025-12-12 00:11:14 +02:00
Cohee 9046fe8d2d Refactor CC API async route handlers (#4885)
* Improve error handling in CC /status and /generate endpoints

* Cancel pending status check on switching CC source
2025-12-11 23:31:46 +02:00
Cohee 10a2f0f740 Replace Google Translate library (#4884) 2025-12-11 22:59:51 +02:00
Cohee 8d34ad5bae Merge branch 'release' into staging 2025-12-11 08:45:40 +00:00
Cohee 088ce0e962 Fix 'send if empty'
Closes #4881
2025-12-11 08:44:39 +00:00
Cohee b9aebb369f Fix: Pass-through pointer events to swipe buttons in video container 2025-12-11 01:19:04 +02:00
Cohee f4b071e71a Fix: Prevent swipe hotkeys when focused into a video element 2025-12-11 00:59:29 +02:00
Cohee 7125ddc0c3 Fix: apply right spacing to file wrapper block 2025-12-11 00:49:47 +02:00
Cohee e7dee7f5a7 Fix: preserve attached files during file input changes (#4877)
* fix: preserve attached files during file input changes

* Reverse order of duplicate pasted files check
2025-12-10 22:02:17 +02:00
Chanho Chung 6fdeaa2cd9 fix: caching system prompt functionality for OpenRouter Claude (#4872) 2025-12-10 20:22:54 +02:00
equal-l2 cd9de2f1b0 Add docker data directories to .dockerignore (#4873)
* Add docker data directories to .dockerignore

* Remove /docker/user from .dockerignore

The folder is not in docker-compose
2025-12-10 20:15:35 +02:00
Cohee b7760ddaaa Ollama: Add reasoning content extraction 2025-12-09 00:24:52 +02:00
d5320f57cf Backported refactor of the chats endpoint from feat/chat-tree. (#4870)
* Backported cleanup and refactor of chats endpoint from `feat/chat-tree`.

* https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599941781

* Error message.
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599941796
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599941797

* chatIntegritySlug https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599958991

* /save should not hang on empty body.chat.
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599959001
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599958997

* When the backup directory does not exist, log an error instead of silently failing.

* chatData should be an array.
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599990728

* Skip body check.
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599987542

* Change integrity warning to debug.
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2600005665

* Return null on error in `tryReadFileSync`.

* Update warning message for missing chat file to clarify potential emptiness

* Rename IntegrityMismatch to IntegrityMismatchError for clarity and consistency

* Fix a type error and formatting

* Improve debug messages and documentation for integrity checks in chat saving

* Add newline before file writing function for improved readability

* Improve debug message formatting for integrity validation in checkChatIntegrity function

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-08 23:54:40 +02:00
BeinseziiandCohee b5e20f2ff9 "N" support for llama.cpp (#4869)
* llama.cpp supports 'n' now

* Fix response parsing

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-08 22:50:34 +02:00
Cohee 9aff57c9c4 Add dummy reasoning_content for deepseek-reasoner tool calls
#4857
2025-12-07 23:40:52 +02:00
Cohee 311f226be4 Fix broken entry in asset list when gallery is open 2025-12-07 23:28:39 +02:00
Cohee f26a672811 Omit content type in POST request if no body 2025-12-07 23:26:47 +02:00
DeclineThyselfanduser 7c24667f49 Fixed isModifiedKeyboardEvent order of operations. (#4866)
https://github.com/SillyTavern/SillyTavern/pull/4819#discussion_r2595641856

Co-authored-by: user <user@exmaple.com>
2025-12-07 21:37:32 +02:00
CoheeandGhostXia 0225562f4e Regex cache (#4858)
feat: optimize regex extension performance

- Implemented caching mechanism for regex scripts to improve message rendering speed.
- Added automatic cache invalidation on script updates.
- Optimized regex compilation to reduce CPU usage.

---------

Co-authored-by: GhostXia <33112711+GhostXia@users.noreply.github.com>
2025-12-04 22:21:13 +02:00
Cohee bd1583faa4 Implement chat backups browse menu (#4862)
* Implement chat backups browse menu

* Unify bytes string formatting
2025-12-04 22:05:27 +02:00
Cohee 4e4d370686 Merge branch 'release' into staging 2025-12-03 22:03:19 +02:00
Cohee fbf789fa74 Fix path to sprites construction (#4860)
* Fix path to sprites construction

* Clean-up destination sprite paths
2025-12-03 22:02:52 +02:00
kashmirmydon c40caa050f Fix Mistral's Max Temperature 2025-12-03 21:27:31 +02:00
Cohee 8ca836c3a1 custom-request: Pass api-url for Z.AI and Vertex and fix if omitted in profile (#4859) 2025-12-03 21:17:41 +02:00
Cohee 090c8ec560 feat: add function to retrieve chat completion preset from settings 2025-12-03 21:17:06 +02:00
a4cc9b3989 Facillitate extension use of ConnectionManagerRequestService (#4841)
* Separate prompt-building functionality from request-sending functionality

* removing logs and clarifying comments

* separating parameter construction functionality to allow ConnectionManagerRequestService to use all other preset parameters

* fixing chat completion issues, adding documentation to new functions.

* Improving ConnectionManagerRequestService errors. Adding parseReasoningFromString option to override reasoning template.

* Adjusting TextCompletionService prompt formatting

* linting

* Use settingsToUpdate to convert from OAI preset to OAI settings.

* lint

* throw errors when profile ID not found

* Fix missed instances of global completion settings being used (CC and TC), replaced with optional argument. Specified typing for ChatCompletionSettings and TextCompletionSettings.

* Adjusting parameters of parseReasoningFromString and adding getReasoningTemplateByName

* using messages.role as a fallback for custom requests, fixing newline removal.

* parameters => settings
I like how it sounds better

* ditto

* You know I had to do it to 'em

* Update getCustomTokenBans

* Fix calculateLogitBias

* Fix param attributes

* Fix type checks

* Less strict role type on ChatCompletionMessage

* Add missing space

* fixing getChatCompletionModel to use an arbitrary chat completion settings object

* Fixing issues with preset overriding custom data passed.

* Pass model to createGenerationParameters externally

* Unify seed param handling for CHUTES

* Fix non-existing CC source

* Use strict comparison

* Use global settings as a base for generation parameters creation

* removing unnecessary handling of preset fields

* don't pass preset prompts, use the passed payload override messages

* refactoring text generation prompt building of last line

* Pass model to getReasoningEffort

* Pass model name to canPerformToolCalls

* Pass model to createTextGenGenerationData

---------

Co-authored-by: qvink <qvink@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-03 20:09:02 +02:00
Kristian SchlikowandCohee 6c8eb4d9ac Feat: Add toggle to exclude think/reason blocks from smooth streaming (#4849)
* Feat: Add toggle to exclude think/reason blocks from smooth streaming

* Fix: Adjust new setting name to properly reflect what it does

* Sync data-i18n with text content

* Add reasoning stream flags for Mistral, Claude and Google models

* Update layout

* Fix: Enhance reasoning handling in parseStreamData function

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-03 00:20:23 +02:00
Sammy f145296a58 add optional argument to changeMainApi (#4853) 2025-12-02 14:52:42 +02:00
Cohee b6a480b329 Merge branch 'release' into staging 2025-12-02 10:45:59 +00:00
Cohee 52a0860320 Fix npm audit 2025-12-02 10:36:49 +00:00
Cohee df513868e5 Switch Dockerfile to use npm ci 2025-12-02 10:30:57 +00:00
Cohee 560d15c5bb Prevent writing package-lock.json in startup scripts 2025-12-02 10:26:35 +00:00
Cohee 43f1824309 Fix: TTS speed control binding for chutes 2025-12-01 01:56:19 +02:00
Cohee fdc9b4c949 Fix: add a case in logprobs parsing function for AIMLAPI 2025-12-01 00:26:35 +02:00
BenandCohee 55a07d445d Chutes integration (#4844)
* Chutes integration

* Fix eslint

* Fix key saving

* Fix logo coloration

* Fix tool checks

* Unhide image inlining controls

* Fix order of options

* Fix type use in TTS extension script

* Add Chutes as a vector storage source

* Change log levels to debug

* Fix streamed reasoning parsing

* Skip remote models update

* TTS: Fix API key highlight

* Sort image models A-Z

* TTS: Fixes

* Remove unused SD endpoint

* Skip setting context size if models list is not yet loaded

* remove chutes quota / balance

* Fix: streamed tool calling

* Hide reasoning effort control

* Add image request debug log

* Fix: scroll down on media load in extensions

* Unhide some samplers

* Bring back reasoning effort

* This code will never execute

* Reformat else if cases

* Add stop strings to request

* Remove conditional from reasoning_effort body param

* Preserve original pricing fields

* Unhide logit bias setting

* Pass repetition penalty and logit bias to backend

* Swap llama tokenizer for llama3

* Pass min_p, remove supported_sampling_parameters checks

* Enable logprobs

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-01 00:17:49 +02:00
dc06abb364 Added MockServer class for tests. (#4843)
* Added a mock OpenAI-compatible endpoint at /v1/chat/completions.
Disabled by default.
Intended for debugging and e2e tests.

* Fixed empty prompts.

* Add mock server and example test

* Improve test

* Added `eslint-plugin-playwright`

* Removed `Date.now()` for reproducible responses.

* Ignore ERR_SERVER_NOT_RUNNING on close.

* Use MockServer in mock-openai.js

* Fixed error check.

* Removed mock server.

* Fix test name

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-30 19:20:25 +02:00
mightytribbleandCohee 1f78094322 Convert OAI tool_choice to Gemini functionCallingConfig for Gemini requests (#4840)
* Send toolConfig block to Gemini, if defined and tools block also present.

* Convert OAI tool_choice to Gemini functionCallingConfig for Gemini requests

* Remove blank line

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-30 19:18:41 +02:00
cloak1505 cd4f37f39b Sync OpenRouter providers list (#4846)
Python script to output a .txt containing a formatted list: https://gist.github.com/cloak1505/90a96bca28b332492221691268b674fd
2025-11-30 19:06:45 +02:00
Cohee 1da6e40129 Backgrounds menu tabs (#4845)
* Add tabs for backgrounds menu

* Improve styling and layout

* Use resize observer

* Add upload to chat bg logic

* Custom BG should always lock

* Fix auto-select when deleting active chat bg

* Use frame event cancellation on rapid resize

* Allow multiple uploads

* Fix mobile tab selector

* Bypass global lock with shift key

* Update copy tooltip

* Update localization files
2025-11-30 19:04:08 +02:00
Cohee 9246ca2779 Fix: enum/readonly comment order 2025-11-30 01:53:11 +02:00
1c1f25b5c6 Backported /tests from macros-2.0. (#4842)
* Backported `/tests` from `macros-2.0`.

* Added `eslint-plugin-playwright`

* Improve formatting

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-29 20:46:54 +02:00
Cohee b2ba255be4 Fix: replace debounced with regular save chat on end of stream 2025-11-29 13:25:36 +02:00
Cohee 2eba10fa7f Gemini: Add image request settings (#4838)
* Gemini: Add image request settings

* Allow aspect ratio for 2.5 flash
2025-11-29 00:59:09 +02:00
38f6b9a119 Enhanced CharX Import with Asset Extraction (#4825)
* feat: Extract and store CharX embedded assets on import

Enhances CharX (.charx) file import to extract and store embedded assets
in accessible locations:

- Add CharXParser class in new src/charx.js module
- Extract sprites (emotion/expression) → characters/{name}/
- Extract backgrounds → backgrounds/{name}_{asset}.{ext}
- Extract misc/x-risu-asset → user/images/{name}/
- Skip user_icon assets to prevent persona conflicts
- Support SFX (self-extracting) ZIP archives
- Add extractFilesFromZipBuffer() for efficient multi-file extraction
- Add normalizeZipEntryPath() for safe path handling
- Use hyphens in sprite names for ST expression label compatibility
- Fix ArrayBuffer slicing for Node.js buffer pool issue

Tested with 34 real-world RisuAI exports (200-300MB, 1000+ assets each).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* fix: Address review feedback for CharX parser

- Add normalizeExtString() to handle dotted/uppercase extensions
  (e.g., '.PNG' or 'PNG' now correctly becomes 'png')
- Revert default avatar to path string instead of eager fs.readFileSync
- Simplify getCharXAssetBaseName regex, remove dead useHyphens branch
- Add JSDoc for persistCharXAssets documenting sync write behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* refactor: Move ensureDirectory to util.js for reuse

- Extract ensureDirectory() from charx.js to util.js as a shared helper
- Add JSDoc for getUniqueAssetPath explaining sprite naming convention
- Prepares utilities for future ZIP-based format imports (similar to BYAF)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* fix: CharX asset overwrite and folder naming

- Overwrite existing assets on re-import instead of creating duplicates
  (matches sprites.js upload behavior with deleteExistingByBaseName)
- Use character name for asset folders, not unique filename
  (ST's sprite system looks up by character name from card data)
- Strip trailing extensions from asset names to avoid file.ext.ext
- Add per-file error handling so one bad asset doesn't abort import
- Remove redundant else branch in storage category assignment
- Add comment explaining intentional 'embeded://' typo (RisuAI compat)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* fix: Address PR review feedback

- Filter out directories in deleteExistingByBaseName (Cohee1207)
- Use ISO timestamp for create_date instead of humanizedDateTime

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* fix: Store CharX backgrounds in character-specific folder

Changed background storage from global `backgrounds/` to character-specific
`characters/{charName}/backgrounds/` per maintainer feedback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* Remove unused import

* fix: Reduce CharX debug logging noise

Remove verbose per-file debug logs that create excessive console noise
for large archives. Keep only essential logging matching BYAF style:
- Entry point info log
- Final summary of imported assets
- Warnings for actual failures

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-28 23:51:09 +02:00
Cohee 3b59eae7c0 Gemini: Only register custom tools when there are no function tools 2025-11-28 20:22:05 +02:00
Cohee 068c6bdccd Gemini: Fix search tool is not supported when function tools are used 2025-11-28 20:18:02 +02:00
mightytribbleandCohee 32bbf4ec10 Support non-function native tools for Gemini
* Enable retrieval tool type for VertexAI Gemini endpoints

* Apply code suggestion

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-28 20:02:32 +02:00
Cohee 965b86da62 Add verbosity control (#4837)
* Add verbosity control

* Remove for Azure OpenAI
2025-11-28 19:49:59 +02:00
Cohee 1af87ea165 Backfill missing swipe_info (#4831)
* Backfill missing swipe_info

* Add type for SwipeInfo

* Init SwipeInfo with empty extra
2025-11-28 18:17:14 +02:00
Cohee 59ba22fa9e "Squash system messages" is back 2025-11-28 17:21:12 +02:00
Cohee d03a0b12b9 ImgGen: Preset GALLERY style for images generated with paintbrush if previously unset
Fixes https://github.com/SillyTavern/SillyTavern/pull/4833#issuecomment-3587591627
2025-11-28 02:48:42 +02:00
drake1138andCohee 765c76ea80 Return character prefixes to brush image generation (#4833)
* Return character prompt prefixes to brush image generation

Before [#4719](https://github.com/SillyTavern/SillyTavern/pull/4719), the brush tool would generate an image using the character specific prompt prefixes. This returns that functionality.

* eslint fix

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-28 02:43:56 +02:00
drake1138andCohee 05e85af3c6 Return character prefixes to brush image generation (#4833)
* Return character prompt prefixes to brush image generation

Before [#4719](https://github.com/SillyTavern/SillyTavern/pull/4719), the brush tool would generate an image using the character specific prompt prefixes. This returns that functionality.

* eslint fix

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-28 02:43:21 +02:00
Cohee 7de0307a98 Merge branch 'release' into staging 2025-11-28 02:26:30 +02:00
cd4364d311 Empty swipes are not handled by ensureSwipes. (#4828)
* Handle empty swipes.

* Add warning.

* Replace with forEach

* Replace with for loop

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-28 00:46:18 +02:00
Cohee 2b7003a6da Google Imagen: Add personGeneration setting to config.yaml 2025-11-28 00:26:31 +02:00
Cohee 0a22856faf Chat Completion: Reduce number of toggles in AI Response Configuration (#4821)
* Chat Completion: Reduce number of toggles in AI Response Configuration

* Consolidate migration logic

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

* Fix icons showing on media toggle off

* Update i18n
2025-11-28 00:16:23 +02:00
Cohee 0b5b3f089e Prompt Manager: Make main/PHI/aux injectable (#4829) 2025-11-27 23:34:25 +02:00
Cohee df865dda85 Extend caption/img gen generated text preview rows 2025-11-27 21:35:30 +02:00
Cohee da78cc6993 Fix: Google AI image generation setting
Fixes #4824
2025-11-27 21:29:03 +02:00
Cohee 3c7d81571d Fix: button visibility checks in swipe gesture handlers 2025-11-27 12:56:24 +02:00
Leandro Jofré 5f01d91e17 Fix - Check for samplers in the connections pannel (#4822) 2025-11-27 00:40:02 +02:00
Leandro Jofré 84a1403ce0 Fix - Check for samplers in the connections pannel (#4822) 2025-11-27 00:39:29 +02:00
Cohee 0fcf056352 Add chat_metadata object to Kobold Lite import header 2025-11-26 20:05:50 +02:00
Cohee cd992472d5 Add deprecated user_name and character_name fields for backward compatibility 2025-11-26 19:59:05 +02:00
Cohee 51f9590a8f Check chat_metadata in JSONL header 2025-11-26 19:32:53 +02:00
fc85b205ac Backport feat/chat-tree and fix #4709 (#4712)
* Performance improvements due to using chatElement instead of $('#chat').

* Reverts change `hideSwipeButtons()` change.

https://github.com/SillyTavern/SillyTavern/pull/4576#discussion_r2394996102

* I’ve been working on a PR for issue #1731: [Swipes on every AI message, not just the last one](https://github.com/SillyTavern/SillyTavern/issues/1731). I’d appreciate feedback to avoid unnecessary effort.

Currently, I have User and Assistant branches working.
I have not touched `/api/chats/save` or '/api/chats/get', so branches do not persist.

To keep `context.chat` unmodified (so extensions and the rest of the code remain unaffected), I’ve stored branches in `chatTree`:
```javascript
chatTree = {
  branch_id: 1,
  branch: [
    { mes: "Hi" },
    { mes: "Hello", branch_id: 0, branch: [...] },
  ]
}
```

When a message is swiped, chatTree is updated via `saveChatToTree()`, then the next branch is loaded using get`ChatFromTree()`.

Questions:
According to Cohee: [This requires reorganizations in the file format for chats, not viable in the short term.](https://github.com/SillyTavern/SillyTavern/issues/1731#issuecomment-1937845036)
I'm hesitant to proceed. May I store chatTree.json files alongside the existing .jsonl chats?
Should I create a new /save endpoint, modify the existing one, or discontinue using .jsonl for saving.

Known issues:
Branches do not persist on refresh.
Swiping multiple messages at once throws `Cannot read properties of undefined (reading 'mes')
`. This will be fixed in the UI.
Branches persist between chats/characters. This will be fixed when loading a chat.
The Swipe arrows overlap with messages.
No animation plays when swiping then editing a user message.

* Fixed bug.

Gemini:
The calculation of mesId is fragile and contains a bug. The fallback chat[chat.length - 1] is a message object, and Number(object) will result in NaN. This will break the swipe functionality if the preceding expressions are falsy. Additionally, chat.indexOf(message) will almost always point to the last message in the chat, which is incorrect when swiping on an earlier message.

A more robust approach is recommended to reliably get the message ID from the clicked element.

    const mesId = Number($(this).closest('.mes').attr('mesid'));

* Fixes swipes on long chats.

* chatTree is now persistent. Fixed bugs.

* Fixed bugs.
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2390042262
The logic to rename the chat tree file (.json) is currently in an unreachable else block. The if condition !fs.existsSync(pathToOriginalFile) || fs.existsSync(pathToRenamedFile) will almost always evaluate to true after the preceding copyFileSync and unlinkSync operations, because pathToOriginalFile will no longer exist. This prevents the chat tree file from being renamed, which breaks the persistence of message branches when a chat is renamed.

The scrollChatToMessage function is implemented incorrectly. Calling .scrollTop() without any arguments on a jQuery object retrieves the current vertical scroll position; it does not scroll the element into view. This function will not have the intended effect of scrolling the chat to the specified message.

* Fixed bugs. https://github.com/SillyTavern/SillyTavern/pull/4573#pullrequestreview-3282889120

There's a typo in the property name being deleted. It should be branch to match the data structure you've defined, not branches. This error will prevent the pruning logic from working correctly, potentially leading to corrupted or bloated chatTree data.

The modified treeData is not being saved here. Instead, the global chatTree is being sent in the request. This will cause any renames of group members within message branches to be lost upon saving. You should send treeData, which contains the modifications.

This function may have performance issues on large chats due to multiple structuredClone calls within a loop. swipelessMessage is created from a deep clone, and then it's deep-cloned again for every swipe. While this ensures data integrity, it is inefficient. Consider refactoring to reduce the number of deep-cloning operations, for instance, by creating swipelessMessage once per message and deep-cloning it only when creating a new branch for a swipe.

* Fix warning. https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2390183161

The logic for renaming the chat tree file seems to have a flaw. The condition !fs.existsSync(pathToOriginalTreeFile) || fs.existsSync(pathToRenamedTreeFile) will be true if the original tree file does not exist. In this case, a warning is logged. However, it's a valid scenario for a chat to not have a corresponding tree file, so no warning should be logged. The current logic could lead to confusing log messages.

* Refactored chatTree into `public/scripts/chat-tree.js`.

https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2390269514

* Displaying swipes on past messages and the entire chat tree functionality is now an opt-in toggle.

https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2390273599

* Only allow one concurrent swipe.
Fixed:
Swiping multiple messages at once throws Cannot read properties of undefined (reading 'mes') .

* Fixed bugs.
Now `swipe_id >= swipes.length` is set to swipes.length.

* Fixed bug.
Swiping a user message did not re-show swipe buttons after the generation finished.

* Moved `Show Swipes for All Messages` Toggle to `Chat/Message Handling`.
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2395008961

* `JSON.stringify doesn't add spaces by default`
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2395047031

* Fixed "Tree file left behind when renaming chats"

https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2395546142

* Fixed "Guard chatTree recursion in group member rename"
https://github.com/SillyTavern/SillyTavern/pull/4573#pullrequestreview-3290587129

* Re-implement: https://github.com/SillyTavern/SillyTavern/pull/4576#discussion_r2395506501

* Moved chat trees to a separate directory. https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2395045583
Enabled chat tree backups.

* Removed structuredClone() for improved performance.

* Fixed bugs.
Characters are now correctly renamed in the chatTree.
Directories are now recursively created.

* Reverts `hideSwipeButtons` to original functionality when `show_swipes_for_all_messages` is false.

https://github.com/SillyTavern/SillyTavern/pull/4576#discussion_r2395375718

* Added `refreshSwipeButtons`.
Updated `showSwipeButtons` and `hideSwipeButtons`.
Fixed bugs.

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2400143193
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2400143202

* Added `clamp` to util.js.
Refactored `swipe`.

* Fixed bugs.
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2400685914
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2400685911

* Fixed bugs.

* Fixed swipe animations.

* Fixed bug by setting ids with `Number`.

* Delete swipes, and bugfixes.

* Merged `refactor/swipe`.

* Fixed bug created in `Delete swipes, and bugfixes.`.

* Merged from origin/staging.

* Merged changes from refactor/swipe.

* Fixed bug and refactored `syncWithSwipeId`.

* Merged from `origin/staging`.

* Fixed merge.

* Fixed overlapping message generations.

* Warn user, and refresh chat.

* Added metadata to chatTree file.

* Fixed "a sacrifice for the sake of simplicity." https://github.com/SillyTavern/SillyTavern/pull/2752#issuecomment-2323512022

Gemini:
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2464165990
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2464165991

* Improved swipeGenerate's animation.

* Added `SWIPE_SOURCE` constant.

* await `switchSwipesAllMessages`.

* Added `swipeState`.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4573#issuecomment-3449690308

* Done:
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466884547
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466884547
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466894947
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466902075
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466911245
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466938169

* Removed `NEUTRAL_CHAT_TREE_KEY`

* Moved backups

* Fixed `/send` and fixed a bug in `sendMessageAs`.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466913570

* Fixes usage of `ENOENT`: https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466929980

* Removed LLM attribution.

* Updated link and warning.

* Removed debugging comments.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466905341

* Replaced `isSwipingAllowed` with `swipeState`.

* Backported many changes from feat/chat-tree.

* Refactored `showSwipeButtons` and `hideSwipeButtons` into `refreshSwipeButtons`

* Refactored `showSwipeButtons` and `hideSwipeButtons` into `refreshSwipeButtons`

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2472109888
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2472113323

* Merged from `refactor/backport-chat-tree`.

* Proposed fix for https://github.com/SillyTavern/SillyTavern/issues/4709
Reverts commit: https://github.com/SillyTavern/SillyTavern/commit/1b3db273891c1ba8c781d2f691ad2e41937ca2aa

On PR: https://github.com/SillyTavern/SillyTavern/pull/2940

* Proposed fix for https://github.com/SillyTavern/SillyTavern/issues/4709
Reverts commit: https://github.com/SillyTavern/SillyTavern/commit/1b3db273891c1ba8c781d2f691ad2e41937ca2aa

On PR: https://github.com/SillyTavern/SillyTavern/pull/2940

* Fixed regenerate and continue while editing the last message.

* Added swipesHidden.
Messages can now be designated as non-swipeable with `message.extra.swipeable`.

* Use `.hidden` and classes instead of `.css` to display swipe chevrons.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3465749700
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2476136375
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2476140043
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3465776056
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3465794330

* Fixed bug.

* Fixed broken JQuery animation.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2479003956
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2479011525
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2479014001

* Fixed active arrow transition.

* Fixed swipe shake direction.

* Fixed truthy check.

* Added temporary link to documentation PR.

* Moved `switchSwipesAllMessages`

* Fixed failed generations deleting the branch.
Fixed `forceSwipeId`.
Always call `saveChatConditional` if the `swipe_id` has changed.

* ESLint.

* Fixed bug.
Better `syncSwipeToMes` error handling.

* Backported changes from `feat/chat-tree`

Added failed swipe animation.
Fixed `newSwipeId`.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#pullrequestreview-3406878337

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2483143387

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2483143387

* Added `showSwipes: false` to `showMoreMessages`.

And a few more performance improvements.

* Fixed animations.

* Added `'.mes'` to `.children`.

* Significantly improved `animateSwipeTransition` performance on large chats.

* Improved `syncSwipeToMes` error handling.

* Significantly improved `animateSwipeTransition` performance on large chats.

* Improved `syncSwipeToMes` error handling.

* Corrected Merge.

* Corrected Merge.

* Improved: `redisplayChat`
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2484177521

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2484215469

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2484217230

* Added a temporary implementation of `branchChat`.

* Fixed bug when generating a swipe.

* Fixed bug in `branchChat`.

* Fixed Off by one error due to `chatElement.children()` selecting `show_more_messages`.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3478331073

* Fixed Off by one error due to `chatElement.children()` selecting `show_more_messages`.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3478331073

* Cleaned system messages array and moved `swipeable`

* Removed CSS nesting.

* Fixed merge.

* Improved `syncSwipeToMes` error handling.

* Matched `swipes-counter` fade to chevrons.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3478192184

* Wrapped `transition-behavior: allow-discrete;` in `@supports`.

* Fixed types.

* Improved swipeability feedback and functions.

* Improved `refreshSwipeButtons` performance again.

* Swapped `.attr` to `.prop`.

* Fixed: `@supports (transition-behavior: allow-discrete)`

* Fixed and clarified typo.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495919425
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495923036
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495927019
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495930080
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495943870
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495950927
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495954387
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495974324
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495974683

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495957181
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495960920
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495968137
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495968922
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495959430
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495924599

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495918468
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495931979
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495933092
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495939511

* Improved `refreshSwipeButtons` performance by skipping 'swipes-counter' updates by default.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2496382916
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2496379401

* Removed chevron fade-in on Cohee's request: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3493829978

* Set most system messages to `swipeable: false`.

* Implemented `OVERSWIPE_BEHAVIOR`.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3499706714

* Fix formatting, make comments IDE friendly

* IDE friendly enum comments

* Move animation frames to a dedicated file

* Do not compare with -1

* overswipeBehavior => getOverswipeBehavior

* Formatting fix

* Don't let regenerate on is_system

* Fixed canceled generations in pristine chats.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3499819670

* Fixed `AUTO_SWIPE` when `animation_duration = 0`.

* Fixed mistake in `redisplayChat`.

* Holding the swipe button speeds up `swipeDuration`.

* Fixed 'animationend' never ending.
Altered resetTime.

* Swapped from `saveChatConditional` to `saveChatDebounced` in `swipe`.

* Skip the animation if it's faster than 50ms instead of 10ms.

* Typo.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#pullrequestreview-3457198109

* Adjust duration reset cooldown

* Add quotes to selector

* Specify type for message parameter in swipe function

* Add type for swipe UI event

* Disabled fade-in during printMessages.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3539315919

* Typo.

* Added quotes to selector .

* Reduce reset time 500 -> 350

* Loops do not cause a generation so their chevrons should not have increased opacity.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3543692019

* Revert reset time

* Renamed `heldSwipes` to `recentSwipes`.

* Autofix the swipes array during `updateSwipeCounter`.

* User messages should not have swipes.

* Chevrons should always be shown on pristine greetings: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3557893373

* Improve formatting

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3559617088

* Show `pristineGreetingSwipeNotice` once.

* `clearMessageData` when swipe-regenerating a message.

* accountStorage is already imported in the module

* Removed `await`.

* Removed pristine greeting notice.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3560758598

* Removed redundant functions in `StreamingProcessor` and fixed streamed replies missing counters.

* Moved `markUIGenStopped` after `eventSource.emit`.

Swapped to `saveChatDebounced` to fix: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3567014810.

* Save a structuredClone of `chat` to prevent an invalid chat from being saved.

* Only `structuredClone` `chat` on `saveChatDebounced`.

* Revert "Only `structuredClone` `chat` on `saveChatDebounced`."

This reverts commit 49498b7aa1.

* Revert "Save a structuredClone of `chat` to prevent an invalid chat from being saved."

This reverts commit 5f137ed138.

* Prevent `saveChatDebounced` from saving while the swipe is in progress.
See: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3567077312

* Fixed animation never ending: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3567106213

* `forceMesId` and `forceSwipeId` are not objects.

* Fixed Reduced Motion causing a warning when swiping back.

* Only  hide `.mes_buttons` when generating.

* Fix eslint

* Reset duration on switching direction

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-26 17:38:31 +02:00
Cohee 5993084ee6 Unify chat timestamps format (#4806)
* Unify chat timestamps format

* Handle ISO timestamps in stats.js

* Refactor timestamp parsing on server

* Switch to ISO timestamps for character/messages creation dates

* Fix type error

* Early exist in saveGroupChat if group not found

* Remove redundant fields from temp.chat export header

* Auto-fix char creation date format on edit

* Add name to fallback chat file names

* Rename parseTimestamp server side function
2025-11-26 15:55:15 +02:00
Leandro Jofré b9cea60c02 Update - Trigger CHARACTER_RENAMED_IN_PAST_CHAT for group chats (#4818) 2025-11-26 15:54:02 +02:00
Cohee 929d377da8 Update group chat metadata format (#4805)
* Migrate group metadata to group chat files

* Skip migration if chat already has metadata

* Fix active group not being set on group conversion

* Improve types in createGroup

* Fix padding in hotswap group avatars

* Fix centering of empty hotswap avatar

* Added automatic backups of migrated data

* Fix 'OVERWRITE' for GC

* Fix metadata parsing order in migration

* Remove color accents from regular migration logs

* Always set gen_id in converted message

* Clone messages before conversion

* Reduce size of add/remove buttons

* Fix group chat file size calculation
2025-11-25 23:48:43 +02:00
Cohee 051b275795 Fix resetting the context size when switching between CC sources (#4816)
* Fix resetting the context size when switching between CC sources that load the models list dynamically

* Revert the requirement to have models list for XAI

* Revert for sources that don't load context size from endpoint
2025-11-25 23:11:01 +02:00
Cohee 999ab48972 Refactor loadOpenAISettings (#4815)
* Refactor loadOpenAISettings

* Fix migration logic

* Show external category on load

* Restore jamba migration

* Refactor saveOpenAIPreset to use dynamic settings mapping
2025-11-25 03:21:07 +02:00
Cohee 3efcfbd1a2 Add new Claude model options and update regex checks for model validation 2025-11-24 21:55:29 +02:00
Cohee 248f5aa892 NanoGPT: Expose additional samplers 2025-11-24 20:36:51 +02:00
DeclineThyselfanduser 1b196cc101 getStringHash (#4811)
cyrb53 (c) 2018 bryc https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js
License: Public domain (or MIT if needed). Attribution appreciated.

Co-authored-by: user <user@exmaple.com>
2025-11-24 11:47:24 +02:00
Cohee e5ceafddb1 Backgrounds: Restore drawer title header (#4809)
* Backgrounds: Restore drawer title header

* Change add background icon
2025-11-24 01:24:53 +02:00
Cohee c932e93988 /api-url: Add VertexAI region management (#4808)
* /api-url: Add VertexAI region management

* Remove unneeded array copy
2025-11-24 00:46:35 +02:00
Cohee 7325cc7c41 Fix data model in api/worldinfo/list 2025-11-24 00:13:02 +02:00
Cohee 8b1f2bc9f4 Merge branch 'release' into staging 2025-11-24 00:11:32 +02:00
Cohee 91d26c4b1d TC: Add a toggle for empty json schemas (#4807) 2025-11-24 00:08:18 +02:00
Cohee 9a595af55b Merge branch 'release' into staging 2025-11-23 23:20:05 +02:00
Cohee ac7076c832 TC: Fix being unable to restore null JSON schema 2025-11-23 23:17:03 +02:00
Cohee 8da417b0ea Merge branch 'release' into staging 2025-11-23 17:13:21 +02:00
Cohee 236a3b1c2d Save metadata immediately upon closing overrides dialog 2025-11-23 17:05:29 +02:00
Cohee 0bf0bc5a78 Regenerate package lock 2025-11-23 17:04:03 +02:00
Cohee 9c0588f5d5 Fix IDE resolution of absolute module paths 2025-11-23 16:54:13 +02:00
Cohee 1b5075a331 Remove nvm install from start.sh (#4804)
* Remove nvm install from start.sh

* Make it red
2025-11-23 16:37:50 +02:00
Cohee 4b77cb8583 Scroll down on swipe gen cancellation 2025-11-23 16:16:02 +02:00
Cohee 02ef1a7648 Regenerate package lock
Fixes #4793
2025-11-23 16:03:00 +02:00
Wolfsblvt a11abc4273 Add new WORLDINFO_SCAN_DONE event with mutable state for extensions (#4797)
* chore: Add WORLDINFO_SCAN_DONE event with mutable state for extensions

* Fix incorrect scan state reference in world info recursion logic

* Fix typo in world info scan state property name: 'sucessful' → 'successful'

(am i stupid)
2025-11-23 15:59:49 +02:00
Cohee 3a3d992bc3 Merge branch 'release' into staging 2025-11-23 15:55:38 +02:00
Cohee dc0deffd61 Fix npm audit in tests 2025-11-23 15:55:07 +02:00
Cohee d04aaec7cf canDeleteSwipe = power_user.confirm_message_delete
Fixes #4799
2025-11-23 15:54:27 +02:00
Cohee 28657339e3 Fix: Use nullish coalescing operator for kudos calculation in showKudos function 2025-11-23 15:50:02 +02:00
Cohee 50599a49b4 Add file_id to api/worldinfo/list 2025-11-23 13:39:22 +02:00
Cohee fad9baa587 canDeleteSwipe = power_user.confirm_message_delete
Fixes #4799
2025-11-23 01:47:45 +02:00
Cohee cdfe873984 Add /api/worldinfo/list endpoint 2025-11-22 23:04:07 +02:00
Cohee 2467688208 waitForFrame in scrollChatToBottom in sync scenarios #4791 2025-11-22 22:43:13 +02:00
Cohee a8004a9a9e Gallery: Add video uploads to gallery (#4796)
* Gallery: Add video uploads to gallery

* Improve thumbnailing logic

* Add error handling to thumnailing process

* Improve formatting in utils.js
2025-11-22 21:58:36 +02:00
Cohee 269c694bc7 Add state validation to onImageSwiped function 2025-11-22 18:57:07 +02:00
413 changed files with 58982 additions and 11970 deletions
+57 -12
View File
@@ -1,17 +1,62 @@
# --- Git & CI ---
.git
.github
.vscode
node_modules
npm-debug.log
readme*
Start.bat
/dist
/backups
cloudflared.exe
access.log
/data
/cache
.DS_Store
.gitignore
# --- Docker ---
/Dockerfile
/.dockerignore
/docker/docker-compose.yml
/docker/config
/docker/extensions
/docker/data
/docker/plugins
/docker/dist
/public/scripts/extensions/third-party
# --- Plugins (keep only package files) ---
/plugins/*
!/plugins/package.json
!/plugins/package-lock.json
# --- The Folders ---
/backups
/cache
/colab
/data
/dist
/node_modules
/tests
# --- Sensitive Info ---
**/.env*
**/*.pem
**/certs
# --- Documentation ---
readme*
*.md
Update-Instructions.txt
# --- OS & System Junk ---
**/.DS_Store
*.bat
*.cmd
*.exe
start.sh
# --- Dev Config ---
.editorconfig
.eslintrc.cjs
.eslintrc*
.vscode
**/jsconfig.json
.npmignore
.gemini
replit.nix
.replit
.nomedia
# -- Logs & Temp ---
*.log
**/tmp
+25 -1
View File
@@ -70,6 +70,7 @@ module.exports = {
'**/dist/**',
'**/.git/**',
'public/lib/**',
'public/scripts/extensions/third-party/**',
'backups/**',
'data/**',
'cache/**',
@@ -98,9 +99,32 @@ module.exports = {
'no-cond-assign': 'error',
'no-unneeded-ternary': 'error',
'no-irregular-whitespace': ['error', { skipStrings: true, skipTemplates: true }],
'dot-notation': ['error', { 'allowPattern': '[A-Z]\\w*$' }],
// 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 }],
},
};
+6
View File
@@ -1,5 +1,11 @@
<!-- Put X in the box below to confirm -->
<!--
Adding a new named external provider or service?
Read https://docs.sillytavern.app/for-contributors/provider-integrations/
before implementing or submitting it, and link the prior issue when the guide requires one.
-->
## Checklist:
- [ ] I have read the [Contribution guidelines](https://github.com/SillyTavern/SillyTavern/blob/release/CONTRIBUTING.md).
+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?
+3 -2
View File
@@ -26,7 +26,7 @@ SillyTavernは、多くのLLM API(KoboldAI/CPP、Horde、NovelAI、Ooba、Tabb
SillyTavern(略してST)は、テキスト生成LLM、画像生成エンジン、TTS音声モデルと対話するための、ローカルにインストールされるユーザーインターフェースです。
2023年2月にTavernAI 1.2.8のフォークとして始まり、SillyTavernは現在200人以上の貢献者と2年間の独立した開発を経て、知識豊富なAI愛好家のための主要なソフトウェアとして機能し続けています。
2023年2月にTavernAI 1.2.8のフォークとして始まり、SillyTavernは現在300人以上の貢献者と3年間の独立した開発を経て、知識豊富なAI愛好家のための主要なソフトウェアとして機能し続けています。
## 私たちのビジョン
@@ -36,7 +36,7 @@ SillyTavern(略してST)は、テキスト生成LLM、画像生成エンジ
## SillyTavernを実行するには強力なPCが必要ですか?
ハードウェア要件は最小限です。NodeJS 18以上を実行できるものであれば何でも動作します。ローカルマシンでLLM推論を行う場合は、少なくとも6GBのVRAMを搭載した3000シリーズのNVIDIAグラフィックスカードを推奨しますが、実際の要件は使用するモデルやバックエンドによって異なる場合があります。
ハードウェア要件は最小限です。NodeJS 20以上を実行できるものであれば何でも動作します。ローカルマシンでLLM推論を行う場合は、少なくとも6GBのVRAMを搭載した3000シリーズのNVIDIAグラフィックスカードを推奨しますが、実際の要件は使用するモデルやバックエンドによって異なる場合があります。
## 質問や提案はありますか?
@@ -79,6 +79,7 @@ SillyTavern(略してST)は、テキスト生成LLM、画像生成エンジ
* CncAnonのTavernAITurbo modの一部を許可を得て使用
* PepperTacoの作品に触発されたビジュアルノベルモード (<https://github.com/peppertaco/Tavern/>)
* GoogleによるNoto Sansフォント (OFLライセンス)
* Chevrotainによるレキサー/パーサー (Apache-2.0ライセンス) <https://github.com/chevrotain/chevrotain>
* Font Awesomeによるアイコンテーマ <https://fontawesome.com> (アイコン: CC BY 4.0, フォント: SIL OFL 1.1, コード: MITライセンス)
* @OtisAlejandroによるデフォルトコンテンツ(Seraphinaキャラクターと伝承本)と@kallmefloccによる10K Discordユーザー記念背景
* [@mrguymiah](https://github.com/mrguymiah)と[@Bronya-Rand](https://github.com/Bronya-Rand)によるDockerガイド
+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 ГБ видеопамяти, но фактические требования могут варьироваться в зависимости от модели и используемого вами бэкенда.
## Вопросы или предложения?
+3 -2
View File
@@ -26,7 +26,7 @@ SillyTavern 为众多 LLM API(KoboldAI/CPP、Horde、NovelAI、Ooba、Tabby、
SillyTavern(简称 ST)是一个本地安装的用户界面,允许您与文本生成 LLM、图像生成引擎和 TTS 语音模型进行交互。
SillyTavern 于 2023 年 2 月作为 TavernAI 1.2.8 的一个分支开始,如今已拥有超过 200 名贡献者和 2 年的独立开发经验,并继续作为资深 AI 爱好者领先的软件。
SillyTavern 于 2023 年 2 月作为 TavernAI 1.2.8 的一个分支开始,如今已拥有超过 300 名贡献者和 3 年的独立开发经验,并继续作为资深 AI 爱好者领先的软件。
## 我们的愿景
@@ -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 显卡,但实际要求可能会根据模型和您使用的后端而有所不同。
## 有问题或建议?
@@ -79,6 +79,7 @@ SillyTavern 于 2023 年 2 月作为 TavernAI 1.2.8 的一个分支开始,如
* CncAnon 的 TavernAITurbo mod 的部分内容经许可使用
* 视觉小说模式的灵感来自 PepperTaco 的工作 (<https://github.com/peppertaco/Tavern/>)
* Noto Sans 字体 by Google (OFL 许可证)
* Lexer/Parser 由 Chevrotain 提供 (Apache-2.0 许可证) <https://github.com/chevrotain/chevrotain>
* 图标主题 by Font Awesome <https://fontawesome.com> (图标: CC BY 4.0, 字体: SIL OFL 1.1, 代码: MIT 许可证)
* 默认内容由 @OtisAlejandro (Seraphina 角色和世界书) 和 @kallmeflocc (10K Discord 用户庆祝背景) 提供
* Docker 指南由 [@mrguymiah](https://github.com/mrguymiah) 和 [@Bronya-Rand](https://github.com/Bronya-Rand) 提供
+4 -3
View File
@@ -26,7 +26,7 @@ SillyTavern 提供一個統一的前端介面,整合多種大型語言模型
SillyTavern(簡稱 ST)是一款本地安裝的使用者介面,讓您能與大型語言模型(LLM)、影像生成引擎以及語音合成模型互動的前端。
SillyTavern 起源於 2023 年 2 月,作為 TavernAI 1.2.8 的分支版本發展至今。目前已有超過 200 位貢獻者,並擁有超過兩年的獨立開發歷史。如今,它已成為 AI 愛好者中備受推崇的軟體之一。
SillyTavern 起源於 2023 年 2 月,作為 TavernAI 1.2.8 的分支版本發展至今。目前已有超過 300 位貢獻者,並擁有超過三年的獨立開發歷史。如今,它已成為 AI 愛好者中備受推崇的軟體之一。
## 我們的願景
@@ -36,13 +36,13 @@ SillyTavern 起源於 2023 年 2 月,作為 TavernAI 1.2.8 的分支版本發
## 我需要高效能電腦才能運行 SillyTavern 嗎?
SillyTavern 的硬體需求相當低。任何能夠運行 NodeJS 18 或更高版本的設備都可以執行。若您打算在本地機器上進行 LLM 推理,我們建議使用擁有至少 6GB VRAM 的 3000 系列 NVIDIA 顯示卡,但實際需求可能因模型和您使用的後端而異。
SillyTavern 的硬體需求相當低。任何能夠運行 NodeJS 20 或更高版本的設備都可以執行。若您打算在本地機器上進行 LLM 推理,我們建議使用擁有至少 6GB VRAM 的 3000 系列 NVIDIA 顯示卡,但實際需求可能因模型和您使用的後端而異。
## 有任何問題或建議?
### 歡迎加入我們的 Discord 伺服器
| [![][discord-shield-badge]][discord-link] | [加入我們的 Disocrd 伺服器](https://discord.gg/sillytavern) 以獲得技術支援、分享您喜愛的角色與提示詞。 |
| [![][discord-shield-badge]][discord-link] | [加入我們的 Discord 伺服器](https://discord.gg/sillytavern) 以獲得技術支援、分享您喜愛的角色與提示詞。 |
| :---------------------------------------- | :----------------------------------------------------------------------------------------------------------------- |
或直接聯繫開發者:
@@ -79,6 +79,7 @@ SillyTavern 的硬體需求相當低。任何能夠運行 NodeJS 18 或更高版
* 經授權使用部分來自 CncAnon 的 TavernAITurbo 模組
* 視覺小說模式(Visual Novel Mode)的靈感,來源於 PepperTaco 的貢獻(<https://github.com/peppertaco/Tavern/>)
* Noto Sans 字體由 Google 提供(OFL 許可)
* Lexer/Parser 由 Chevrotain 提供 (Apache-2.0 許可) <https://github.com/chevrotain/chevrotain>
* 主題圖示由 Font Awesome <https://fontawesome.com> 提供(圖示:CC BY 4.0,字體:SIL OFL 1.1,程式碼:MIT 許可)
* 預設資源來源於 @OtisAlejandro(包含角色 Seraphina 與知識書)與 @kallmeflocc(SillyTavern 官方 Discord 伺服器成員突破 10K 的慶祝背景)
* Docker 安裝指南由 [@mrguymiah](https://github.com/mrguymiah) 和 [@Bronya-Rand](https://github.com/Bronya-Rand) 編寫
+5 -4
View File
@@ -23,17 +23,17 @@ 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
1. We aim to empower users with as much utility and control over their LLM prompts as possible. The steep learning curve is part of the fun!
2. We do not provide any online or hosted services, nor programmatically track any user data.
3. SillyTavern is a passion project brought to you by a dedicated community of LLM enthusiasts, and will always be free and open sourced.
3. SillyTavern is a passion project brought to you by a dedicated community of LLM enthusiasts, and will always be free and open source.
## 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?
@@ -75,10 +75,11 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.**
* [TavernAI](https://github.com/TavernAI/TavernAI) 1.2.8 by Humi: MIT License
* [TavernAI](https://github.com/TavernAI/TavernAI-v1) 1.2.8 by Humi: MIT License
* Portions of CncAnon's TavernAITurbo mod used with permission
* Visual Novel Mode inspired by the work of PepperTaco (<https://github.com/peppertaco/Tavern/>)
* Noto Sans font by Google (OFL license)
* Lexer/Parser by Chevrotain (Apache-2.0 license) <https://github.com/chevrotain/chevrotain>
* Icon theme by Font Awesome <https://fontawesome.com> (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Default content by @OtisAlejandro (Seraphina character and lorebook) and @kallmeflocc (10K Discord Users Celebratory Background)
* Docker guide by [@mrguymiah](https://github.com/mrguymiah) and [@Bronya-Rand](https://github.com/Bronya-Rand)
+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
+31 -12
View File
@@ -1,4 +1,4 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# Publish to npm for a new release or explicitly retry an existing release tag.
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Node.js Package
@@ -6,27 +6,46 @@ name: Node.js Package
on:
release:
types: [created]
workflow_dispatch:
inputs:
tag:
description: Existing release tag to publish
required: true
type: string
env:
PUBLISH_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.event.release.tag_name }}
PUBLISH_REF: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.tag) || github.ref }}
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
with:
node-version: 22
- run: npm ci
ref: ${{ env.PUBLISH_REF }}
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
with:
node-version: 24
- name: Verify release tag matches package version
run: test "$(node -p "require('./package.json').version")" = "$PUBLISH_TAG"
- 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
with:
node-version: 22
ref: ${{ env.PUBLISH_REF }}
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
with:
node-version: 24
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- run: npm ci --omit=dev --ignore-scripts
# https://github.com/npm/cli/issues/9755
- run: npm publish --allow-directory=all
+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 }}
+48 -95
View File
@@ -12,86 +12,10 @@ 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
needs: [label-by-branches, label-by-files, remove-stale-label, check-merge-blocking-labels, write-auto-comments]
needs: [label-by-branches, label-by-files, label-copilot-prs, remove-stale-label, check-merge-blocking-labels, write-auto-comments]
runs-on: ubuntu-latest
# Only needs to run when code is changed
if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
@@ -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,21 +108,50 @@ 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:
configuration-path: .github/pr-auto-labels-by-files.yml
repo-token: ${{ steps.app.outputs.token }}
label-copilot-prs:
name: 🏷️ Label Copilot PRs as Vibe Coded
runs-on: ubuntu-latest
# Only label once when PR is created by Copilot
if: >
github.event.action == 'opened' &&
github.event.pull_request.user.login == 'Copilot'
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Add Vibe Coded Label
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
with:
actions: 'add-labels'
token: ${{ steps.app.outputs.token }}
issue-number: ${{ github.event.pull_request.number }}
labels: '✨ Vibe Coded'
remove-stale-label:
name: 🗑️ Remove Stale Label on Comment
needs: [label-by-branches, label-by-files]
needs: [label-by-branches, label-by-files, label-copilot-prs]
runs-on: ubuntu-latest
# Only runs on comments not done by the github actions bot
if: always() && (github.event_name == 'pull_request_review_comment' && github.event.sender.type != 'Bot')
@@ -217,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 }}
@@ -227,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
@@ -236,7 +189,7 @@ jobs:
check-merge-blocking-labels:
name: 🚫 Check Merge Blocking Labels
needs: [label-by-branches, label-by-files, remove-stale-label]
needs: [label-by-branches, label-by-files, label-copilot-prs, remove-stale-label]
runs-on: ubuntu-latest
# Run, even if the previous jobs were skipped/failed
if: always()
@@ -252,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);
@@ -286,7 +239,7 @@ jobs:
write-auto-comments:
name: 💬 Post PR Comments Based on Labels
needs: [label-by-branches, label-by-files, remove-stale-label, check-merge-blocking-labels]
needs: [label-by-branches, label-by-files, label-copilot-prs, remove-stale-label, check-merge-blocking-labels]
runs-on: ubuntu-latest
# Run, even if the previous jobs were skipped/failed
if: always() && (github.event_name == 'pull_request_target')
@@ -296,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 }}
@@ -305,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 }}
@@ -336,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
+2
View File
@@ -26,6 +26,7 @@ public/stats.json
/docker/user
/docker/extensions
/docker/data
/docker/dist
.DS_Store
public/settings.json
/thumbnails
@@ -33,6 +34,7 @@ whitelist.txt
.vscode/**
!.vscode/extensions.json
.idea/
.windsurf/
secrets.json
/dist
/backups/
+8
View File
@@ -0,0 +1,8 @@
ignore-scripts=true
min-release-age=7
allow-directory=none
allow-file=none
allow-git=none
# Temporarily disabled due to an npm bug:
# https://github.com/npm/cli/issues/9347
# allow-remote=none
+4
View File
@@ -0,0 +1,4 @@
{
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
"js/ts.tsdk.path": "./node_modules/typescript/lib"
}
+65 -23
View File
@@ -12,32 +12,73 @@
2. Fork this repository under your account.
3. Clone the fork onto your machine.
4. Open the cloned repository in the code editor.
5. Create a git branch (recommended).
5. Create a git branch (recommended), review the [git book](https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control) if you haven't.
6. Make your changes and test them locally.
7. Commit the changes and push the branch to the remote repo.
8. Go to GitHub, and open a pull request, targeting the upstream branch.
8. Go to GitHub, and open a pull request, targeting the appropriate upstream branch.
## Contribution guidelines
1. Our standards are pretty low, but make sure the code is not too ugly:
- Run VS Code's autoformat when you're done.
- Check with ESLint by running `npm run lint`, then fix the errors.
- Use common sense and follow existing naming conventions.
2. Create pull requests for the staging branch, 99% of contributions should go there. That way people could test your code before the next stable release.
3. You can still send a pull request for release in the following scenarios:
- Updating README.
- Updating GitHub Actions.
- Hotfixing a critical bug.
4. Project maintainers will test and can change your code before merging. To keep our workflow smooth, please ensure the following:
- The "Allow edits from maintainers" option is checked.
- Avoid force-pushing your branch once the PR is out of draft state.
5. To make sure that your contribution remains testable and reviewable, try not to exceed a soft limit of **200 lines of code** (both additions and deletions) per pull request. If you have more to contribute, split it into multiple pull requests. We can also consider creating a separate feature branch for more substantial changes, but please discuss it with the maintainers first.
6. Write at least somewhat meaningful PR descriptions and commit messages. There's no "right" way to do it, but the following may help with outlining a general structure:
- What is the reason for a change?
- What did you do to achieve this?
- How would a reviewer test the change?
7. English is the primary language of communication in this project. Please use only English when writing commit messages, PR descriptions, comments and other text. This does not apply to contributions to localization files.
8. Mind the license. Your contributions will be licensed under the GNU Affero General Public License. If you don't know what that implies, consult your lawyer.
### Maintain code quality
Our standards are pretty low, but make sure the code is not too ugly:
- Run VS Code's autoformat when you're done.
- Check with ESLint by running `npm run lint`, then fix the errors.
- Use common sense and follow existing naming conventions.
### Use the correct target branch
Create pull requests for the `staging` branch, 99% of contributions should go there. That way people could test your code before the next stable release.
You can still send a pull request for `release` in the following scenarios:
- Updating README.
- Updating GitHub Actions.
- Hotfixing a critical bug.
Project maintainers will test and can change your code before merging. To keep our workflow smooth, please ensure the following:
- The "Allow edits from maintainers" option is checked.
- Avoid force-pushing your branch once the PR is out of draft state.
### Make contributions small and testable
To make sure that your contribution remains testable and reviewable, try not to exceed a soft limit of **200 lines of code** (both additions and deletions) per pull request. If you have more to contribute, split it into multiple pull requests.
We can also consider creating a separate feature branch for more substantial changes, but please discuss it with the maintainers first. For example:
- Leave the main larger PR as a draft so it can be used to discuss the implementation.
- Split each group of functions or features into a ~200 line PR so it can be properly reviewed and merged to staging or a feature branch.
- If there are large codependent changes that cannot be split, start with the most utilized dependencies and stub dependent functions.
- Each will be reviewed and tested one by one, merging into the feature branch as they're ready.
- Do not create all branches in advance, as subsequent changes made in previous commits as a result of test/review may create a lot of merge conflicts.
### Provide clear descriptions of your changes
Write at least somewhat meaningful PR descriptions and commit messages. There's no "right" way to do it, but the following may help with outlining a general structure:
- What is the reason for a change?
- What did you do to achieve this?
- How would a reviewer test the change?
### Discuss new provider integrations before implementing them
Do not use a completed pull request as the first product discussion for a new named external provider or service.
- Model routers, resellers, rerouters, gateways, and aggregators should use **Custom (OpenAI-compatible)** and publish provider-owned setup instructions. Provider-specific convenience may be implemented as a third-party UI extension or server plugin.
- New first-party model, TTS, speech, web search, image, vectorization, embedding, reranking, and similar integrations are exceptional and should begin with a public issue and maintainer discussion before implementation.
- Existing-provider maintenance and provider-neutral improvements to generic compatibility remain welcome.
Read [Integrating an External Provider](https://docs.sillytavern.app/for-contributors/provider-integrations/) before starting implementation.
### We (likely) don't speak your language
English is the primary language of communication in this project. Please use only English when writing commit messages, PR descriptions, comments and other text. This does not apply to contributions to localization files.
### Legal stuff
Mind the license. Your contributions will be licensed under the GNU Affero General Public License. If you don't know what that implies, consult your lawyer.
## Use of AI coding assistance tools ("Vibe Coding")
@@ -50,5 +91,6 @@ We do not prohibit nor encourage the use of AI tools for coding assistance to he
## Further reading
1. [How to write UI extensions](https://docs.sillytavern.app/for-contributors/writing-extensions/)
2. [How to write server plugins](https://docs.sillytavern.app/for-contributors/server-plugins)
1. [How to integrate an external provider](https://docs.sillytavern.app/for-contributors/provider-integrations/)
2. [How to write UI extensions](https://docs.sillytavern.app/for-contributors/writing-extensions/)
3. [How to write server plugins](https://docs.sillytavern.app/for-contributors/server-plugins)
+16 -12
View File
@@ -1,44 +1,48 @@
FROM node:lts-alpine3.22
FROM node:lts-alpine3.23
# Arguments
ARG APP_HOME=/home/node/app
# Install system dependencies
RUN apk add --no-cache gcompat tini git git-lfs
# "Don't rely on the base image for tools; if you call it, you install it." ;)
RUN apk add --no-cache gcompat tini git git-lfs su-exec shadow dos2unix
# Create app directory
# Create app directory and set ownership
WORKDIR ${APP_HOME}
RUN chown node:node ${APP_HOME}
# Set NODE_ENV to production
ENV NODE_ENV=production
# Bundle app source
COPY . ./
# Bundle app source and set ownership
COPY --chown=node:node . ./
RUN \
echo "*** Install npm packages ***" && \
npm i --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
# Create config directory and link config.yaml. Added hardcoded dirs(constants.js?)
# that must be present for Non-Root Mode and volumeless docker runs.
RUN \
rm -f "config.yaml" || true && \
ln -s "./config/config.yaml" "config.yaml" || true && \
mkdir "config" || true
mkdir -p config data plugins public/scripts/extensions/third-party backups && \
chown -R node:node config data plugins public/scripts/extensions/third-party backups && \
ln -s "./config/config.yaml" "config.yaml"
# Pre-compile public libraries
RUN \
echo "*** Run Webpack ***" && \
node "./docker/build-lib.js"
# Set the entrypoint script
# Set the entrypoint script and cleanup
RUN \
echo "*** Cleanup ***" && \
mv "./docker/docker-entrypoint.sh" "./" && \
rm -rf "./docker" && \
echo "*** Make docker-entrypoint.sh executable ***" && \
chmod +x "./docker-entrypoint.sh" && \
echo "*** Convert line endings to Unix format ***" && \
dos2unix "./docker-entrypoint.sh"
dos2unix "./docker-entrypoint.sh" && \
rm -rf "./docker"
# Fix extension repos permissions
RUN git config --global --add safe.directory "*"
+1 -1
View File
@@ -1,7 +1,7 @@
@echo off
pushd %~dp0
set NODE_ENV=production
call npm install --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-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-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
+109 -6
View File
@@ -38,6 +38,12 @@ browserLaunch:
avoidLocalhost: false
# Server port
port: 8000
# Interval in seconds to write a heartbeat file. Set to 0 to disable.
# This is used primarily for Docker healthchecks.
heartbeatInterval: 0
# Enable HTTP/HTTPS keep-alive globally.
# Disabling restores old Node 18 behavior, can help if ECONNRESET and other network errors occur.
enableKeepAlive: false
# -- SSL options --
ssl:
# Enable SSL/TLS encryption
@@ -52,7 +58,7 @@ ssl:
# -- SECURITY CONFIGURATION --
# Toggle whitelist mode
whitelistMode: true
# Whitelist will also verify IP in X-Forwarded-For / X-Real-IP headers
# When enabled, whitelist will also verify IP in headers enabled in `forwardedHeaders` section.
enableForwardedWhitelist: true
# Whitelist of allowed IP addresses
whitelist:
@@ -68,6 +74,25 @@ basicAuthUser:
password: "password"
# Enables CORS proxy middleware
enableCorsProxy: false
# CORS settings (applied to all routes)
cors:
# Enable or disable CORS middleware
enabled: true
# Allowed origins. Use "null" to match the default browser file origin.
# You can set "*" to allow any origin, or a list of allowed origins.
origin:
- "null"
# Allowed methods
methods:
- "OPTIONS"
# Allowed request headers (optional)
allowedHeaders: []
# Exposed response headers (optional)
exposedHeaders: []
# Allow credentials (cookies, authorization headers)
credentials: false
# Preflight cache max age in seconds (optional)
maxAge: null
# -- REQUEST PROXY CONFIGURATION --
requestProxy:
# If a proxy is enabled, all outgoing HTTP/HTTPS requests will be routed through it.
@@ -105,6 +130,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:
@@ -119,6 +151,26 @@ hostWhitelist:
# - .trycloudflare.com
hosts: []
# Perform whitelist checks against server-side HTTP requests that resolve to private IP addresses.
# This is an additional layer of security to prevent Server-Side Request Forgery (SSRF) attacks.
# Recommended when listen mode is enabled, or if your server is accessible by untrusted users.
privateAddressWhitelist:
# Enable private address whitelist to block requests to private IP ranges.
enabled: false
# If true, requests to hosts that cannot be resolved will be allowed instead of blocked.
allowUnresolvedHosts: false
# Log blocked and allowed requests to the console.
log:
# Log blocked requests to the console with a warning message
blockedRequests: true
# Log allowed requests to the console with an info message
allowedRequests: false
# List of allowed private IP ranges (in CIDR notation or wildcard format).
# Allows loopback IP ranges by default, but you can customize this list to fit your needs.
allowedRanges:
- '127.0.0.0/8' # Loopback (IPv4)
- '::1/128' # Loopback (IPv6)
# User session timeout *in seconds* (defaults to 24 hours).
## Set to a positive number to expire session after a certain time of inactivity
## Set to 0 to expire session when the browser is closed
@@ -137,12 +189,31 @@ logging:
minLogLevel: 0
# -- RATE LIMITING CONFIGURATION --
rateLimiting:
# Use X-Real-IP header instead of socket IP for rate limiting
# Only enable this if you are using a properly configured reverse proxy (like Nginx/traefik/Caddy)
# Use any of the enabled headers in the `forwardedHeaders` section to identify the client IP for rate limiting.
# If disabled, only the socket IP will be used, which may not work correctly if you are behind a reverse proxy.
preferRealIpHeader: false
# Set the maximum number of allowed failed basic authentication attempts before rate limiting is applied. Set to 0 to disable rate limiting for basic auth.
basicAuthMaxAttempts: 5
# Set the maximum number of allowed failed account login attempts before rate limiting is applied. Set to 0 to disable rate limiting for account logins.
accountsLoginMaxAttempts: 5
# Set the maximum number of allowed failed account recovery attempts before rate limiting is applied. Set to 0 to disable rate limiting for account recovery.
accountsRecoverMaxAttempts: 5
# Set the maximum number of allowed failed account reset attempts before rate limiting is applied. Set to 0 to disable rate limiting for account resets.
accountsResetMaxAttempts: 5
# Set to true to enable support for real IPs in certain request headers for features like IP whitelisting, rate limiting and access logging.
# Only change if you are sure that you use a correctly configured reverse proxy, otherwise this may lead to IP spoofing.
forwardedHeaders:
# X-Real-IP header (common with Nginx and Caddy)
xRealIp: true
# X-Forwarded-For header (common with many proxies, but may contain multiple IPs - only the first one will be used)
xForwardedFor: true
# CF-Connecting-IP header (used by Cloudflare Tunnels)
cfConnectingIp: false
## 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
@@ -180,6 +251,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!
@@ -200,7 +281,6 @@ whitelistImportDomains:
- cdn.discordapp.com
- files.catbox.moe
- raw.githubusercontent.com
- char-archive.evulid.cc
# API request overrides (for KoboldAI and Text Completion APIs)
## Note: host includes the port number if it's not the default (80 or 443)
## Format is an array of objects:
@@ -229,6 +309,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
@@ -265,14 +352,14 @@ ollama:
# -- ANTHROPIC CLAUDE API CONFIGURATION --
claude:
# Enables caching of the system prompt (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 only when the prompt before the chat history is static and doesn't change between requests
# (e.g {{random}} macro or lorebooks not as in-chat injections).
# 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)
@@ -283,10 +370,26 @@ 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")
apiVersion: 'v1beta'
# Adds thought signatures to requests (if available). Only for Gemini 3 and above.
thoughtSignatures: true
# Enables caching of the system prompt (if supported). Only for OpenRouter.
# -- IMPORTANT! --
# Use only when the prompt before the chat history is static and doesn't change between requests
# (e.g {{random}} macro or lorebooks not as in-chat injections).
# Otherwise, you'll just waste money on cache misses.
enableSystemPromptCache: false
# https://ai.google.dev/gemini-api/docs/imagen#imagen-configuration
image:
# Leave empty to use the API-default value.
personGeneration: 'allow_adult'
# -- SERVER PLUGIN CONFIGURATION --
enableServerPlugins: false
# Attempt to automatically update server plugins on startup
@@ -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": "",
@@ -1,6 +1,6 @@
{
"input_sequence": "[INST]",
"output_sequence": " ",
"output_sequence": "",
"last_output_sequence": "",
"system_sequence": "[SYSTEM_PROMPT]",
"stop_sequence": "</s>",
+10 -7
View File
@@ -1,13 +1,17 @@
{
"chat_completion_source": "openai",
"openai_model": "gpt-4-turbo",
"claude_model": "claude-sonnet-4-5",
"openai_model": "gpt-5.6-terra",
"claude_model": "claude-sonnet-5",
"openrouter_model": "OR_Website",
"openrouter_use_fallback": false,
"openrouter_group_models": false,
"openrouter_sort_models": "alphabetically",
"ai21_model": "jamba-large",
"mistralai_model": "mistral-large-latest",
"chutes_model": "deepseek-ai/DeepSeek-V3-0324",
"chutes_sort_models": "alphabetically",
"minimax_model": "MiniMax-M2.7",
"minimax_endpoint": "global",
"electronhub_model": "gpt-4o-mini",
"electronhub_sort_models": "alphabetically",
"electronhub_group_models": false,
@@ -16,8 +20,8 @@
"custom_include_body": "",
"custom_exclude_body": "",
"custom_include_headers": "",
"google_model": "gemini-2.5-pro",
"vertexai_model": "gemini-2.5-pro",
"google_model": "gemini-3.7-flash",
"vertexai_model": "gemini-3.7-flash",
"temperature": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
@@ -28,7 +32,6 @@
"repetition_penalty": 1,
"openai_max_context": 4095,
"openai_max_tokens": 300,
"wrap_in_quotes": false,
"names_behavior": 0,
"send_if_empty": "",
"impersonation_prompt": "[Write your next reply from the point of view of {{user}}, using the chat history so far as a guideline for the writing style of {{user}}. Don't write as {{char}} or system. Don't describe actions of {{char}}.]",
@@ -231,9 +234,9 @@
"show_external_models": false,
"assistant_prefill": "",
"assistant_impersonation": "",
"claude_use_sysprompt": false,
"use_sysprompt": false,
"squash_system_messages": false,
"image_inlining": false,
"media_inlining": true,
"bypass_status_check": false,
"continue_prefill": false,
"continue_postfix": " ",
@@ -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"
}
@@ -45,6 +45,7 @@
"negative_prompt": "",
"grammar_string": "",
"json_schema": null,
"json_schema_allow_empty": false,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
@@ -45,6 +45,7 @@
"negative_prompt": "",
"grammar_string": "",
"json_schema": null,
"json_schema_allow_empty": false,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
@@ -45,6 +45,7 @@
"negative_prompt": "",
"grammar_string": "",
"json_schema": null,
"json_schema_allow_empty": false,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
@@ -45,6 +45,7 @@
"negative_prompt": "",
"grammar_string": "",
"json_schema": null,
"json_schema_allow_empty": false,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
@@ -45,6 +45,7 @@
"negative_prompt": "",
"grammar_string": "",
"json_schema": null,
"json_schema_allow_empty": false,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
@@ -45,6 +45,7 @@
"negative_prompt": "",
"grammar_string": "",
"json_schema": null,
"json_schema_allow_empty": false,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
+5 -3
View File
@@ -191,6 +191,7 @@
"custom_stopping_strings_macro": true,
"fuzzy_search": true,
"encode_tags": false,
"experimental_macro_engine": true,
"enableLabMode": false,
"enableZenSliders": false,
"ui_mode": 1,
@@ -463,7 +464,6 @@
"stream_openai": true,
"openai_max_context": 4095,
"openai_max_tokens": 300,
"wrap_in_quotes": false,
"prompts": [
{
"name": "Main Prompt",
@@ -622,7 +622,7 @@
},
"wi_format": "{0}",
"openai_model": "gpt-4-turbo",
"claude_model": "claude-sonnet-4-5",
"claude_model": "claude-sonnet-5",
"ai21_model": "jamba-large",
"openrouter_model": "OR_Website",
"reverse_proxy": "",
@@ -632,6 +632,8 @@
"show_external_models": false,
"proxy_password": "",
"assistant_prefill": "",
"assistant_impersonation": ""
"assistant_impersonation": "",
"use_sysprompt": false,
"squash_system_messages": false
}
}
+7
View File
@@ -7,6 +7,7 @@ services:
environment:
- NODE_ENV=production
- FORCE_COLOR=1
- SILLYTAVERN_HEARTBEATINTERVAL=30
ports:
- "8000:8000"
volumes:
@@ -14,4 +15,10 @@ services:
- "./data:/home/node/app/data"
- "./plugins:/home/node/app/plugins"
- "./extensions:/home/node/app/public/scripts/extensions/third-party"
healthcheck:
test: ["CMD", "node", "src/healthcheck.js"]
interval: 30s
timeout: 10s
start_period: 20s
retries: 3
restart: unless-stopped
+95 -8
View File
@@ -1,12 +1,99 @@
#!/bin/sh
if [ ! -e "config/config.yaml" ]; then
echo "Resource not found, copying from defaults: config.yaml"
cp -r "default/config.yaml" "config/config.yaml"
# Function to handle startup logic (Config check + init + Start)
start_sillytavern() {
local PREFIX="$1"
shift # Remove the first argument (PREFIX) so $@ contains the rest
# Config Check
if [ ! -e "config/config.yaml" ]; then
echo "Resource not found, copying from defaults: config.yaml"
$PREFIX cp "default/config.yaml" "config/config.yaml"
fi
# Execute init script to auto-populate config.yaml with missing values
$PREFIX npm run init
# Start the server
exec $PREFIX node server.js --listen "$@"
}
# Dirs that MUST be present at this point (e.g for volumeless docker runs).
# Please update list, if in the future a related perm issue appear.
CORE_DIRS="config data plugins public/scripts/extensions/third-party backups"
# Mounted Volumes (External)
# Parse mounts, handling files vs directories
RAW_MOUNTS=$(awk -v app_path="/home/node/app" '$2 ~ "^" app_path {print $2}' /proc/mounts)
MOUNTED_DIRS=""
for mount in $RAW_MOUNTS; do
if [ -f "$mount" ]; then
# If it is a mounted file (e.g. cert.pem), we want to check its PARENT directory
# so that the app can write adjacent files (e.g. key.pem).
PARENT_DIR=$(dirname "$mount")
# Performance Safety: If the file is in the root of the app,
# we do NOT add the parent (App Root), or we will recursively scan the whole app.
[ "$PARENT_DIR" != "/home/node/app" ] && MOUNTED_DIRS="$MOUNTED_DIRS $PARENT_DIR" || MOUNTED_DIRS="$MOUNTED_DIRS $mount"
else
# It is a directory, add it directly
MOUNTED_DIRS="$MOUNTED_DIRS $mount"
fi
done
# Combine dirs for checks
CHECK_DIRS=$(echo "$CORE_DIRS $MOUNTED_DIRS" | tr ' ' '\n' | sort -u)
# Ensure the needed directories exist
for dir in $CHECK_DIRS; do
if [ ! -e "$dir" ]; then
echo "Creating missing directory: $dir"
mkdir -p "$dir" 2>/dev/null || echo "Warning: Could not create $dir" >&2
fi
done
# Mode Selection
if [ "$(id -u)" = "0" ]; then
# Check if PUID/PGID variables are provided
if [ -n "$PUID" ] && [ -n "$PGID" ]; then
echo "Mode: PUID/PGID (UID:$PUID GID:$PGID)"
# Update the internal 'node' user to match requested IDs
groupmod -o -g "$PGID" node
usermod -o -u "$PUID" -g "$PGID" node
for dir in $CHECK_DIRS; do
if [ -d "$dir" ]; then
# Runs chown only if there is an mismatch
DIR_UID=$(stat -c '%u' "$dir")
DIR_GID=$(stat -c '%g' "$dir")
if [ "$DIR_UID" != "$PUID" ] || [ "$DIR_GID" != "$PGID" ]; then
echo "(Detected mismatch) Adjusting permissions for: $dir."
chown -R node:node "$dir" || echo "Warning: Failed to update permissions for '$dir'." >&2
fi
fi
done
# Fix config file specifically
chown node:node "config/config.yaml" 2>/dev/null
# Set execution prefix to run as 'node' user
EXEC_PREFIX="su-exec node:node"
else
# Default: Run as Root (original behavior)
echo "Mode: Default (Root)"
EXEC_PREFIX=""
fi
else
# Non-Root Mode (Docker CLI --user flag)
echo "Mode: Strict Non-Root (UID: $(id -u))"
# We CANNOT auto-fix permissions in this mode because we lack privileges.
# Relying solely on the user configuring their host permissions correctly.
EXEC_PREFIX=""
fi
# Execute postinstall to auto-populate config.yaml with missing values
npm run postinstall
# Start the server
exec node server.js --listen "$@"
# Calling function with the determined prefix
start_sillytavern "$EXEC_PREFIX" "$@"
Vendored
+5 -1
View File
@@ -40,7 +40,11 @@ declare global {
/**
* Authenticated user handle.
*/
handle: string;
handle: string | null;
/**
* Account version tag: shake256 derivative of password hash and salt.
*/
version: string | null;
/**
* Last time the session was extended.
*/
+938 -322
View File
File diff suppressed because it is too large Load Diff
+24 -19
View File
@@ -29,12 +29,14 @@
"@mozilla/readability": "^0.6.0",
"@popperjs/core": "^2.11.8",
"@zeldafan0225/ai_horde": "^5.2.0",
"agent-base": "^7.1.3",
"archiver": "^7.0.1",
"bing-translate-api": "^4.1.0",
"body-parser": "^1.20.2",
"bowser": "^2.12.1",
"bytes": "^3.1.2",
"chalk": "^5.6.0",
"chevrotain": "^11.2.0",
"command-exists": "^1.2.9",
"compression": "^1.8.1",
"cookie-parser": "^1.4.6",
@@ -43,30 +45,33 @@
"crc": "^4.3.2",
"csrf-sync": "^4.2.1",
"diff-match-patch": "^1.0.5",
"dompurify": "^3.2.6",
"dompurify": "^3.4.2",
"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-browser": "^3.0.1",
"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",
"html-entities": "^2.6.0",
"iconv-lite": "^0.6.3",
"image-size": "^2.0.2",
"ip-matching": "^2.1.2",
"ip-regex": "^5.0.0",
"ipaddr.js": "^2.2.0",
"is-docker": "^3.0.0",
"isomorphic-git": "^1.36.3",
"js-sha256": "^0.11.1",
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"mime-types": "^3.0.1",
"lodash": "^4.18.1",
"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",
@@ -79,29 +84,26 @@
"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": {
"openai": "^4.17.0"
},
"axios": {
"follow-redirects": "^1.15.4"
},
"node-fetch": {
"whatwg-url": "^14.0.0"
}
@@ -113,8 +115,9 @@
"type": "git",
"url": "https://github.com/SillyTavern/SillyTavern.git"
},
"version": "1.14.0",
"version": "1.19.0",
"scripts": {
"init": "node src/server-init.js",
"start": "node server.js",
"debug": "node --inspect server.js",
"start:global": "node server.js --global",
@@ -122,7 +125,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",
@@ -137,6 +139,7 @@
},
"main": "server.js",
"devDependencies": {
"@chevrotain/types": "^11.2.0",
"@types/archiver": "^6.0.3",
"@types/bytes": "^3.1.5",
"@types/command-exists": "^1.2.3",
@@ -150,9 +153,9 @@
"@types/jquery-cropper": "^1.0.4",
"@types/jquery.transit": "^0.9.33",
"@types/jqueryui": "^1.12.24",
"@types/lodash": "^4.17.20",
"@types/lodash": "^4.17.24",
"@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",
@@ -164,7 +167,9 @@
"@types/yargs": "^17.0.33",
"@types/yauzl": "^2.10.3",
"eslint": "^8.57.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsdoc": "^48.10.0",
"eslint-plugin-jest": "^27.9.0"
"eslint-plugin-playwright": "^2.3.0",
"typescript": "^5.9.3"
}
}
+8 -6
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];
@@ -37,9 +39,10 @@ if (command === 'install') {
}
async function updatePlugins() {
const directories = fs.readdirSync(pluginsPath)
.filter(file => !file.startsWith('.'))
.filter(file => fs.statSync(path.join(pluginsPath, file)).isDirectory());
const directories = fs.readdirSync(pluginsPath, { withFileTypes: true })
.filter(dirent => dirent.isDirectory() || dirent.isSymbolicLink())
.filter(dirent => !dirent.name.startsWith('.'))
.map(dirent => dirent.name);
console.log(`Found ${color.cyan(directories.length)} directories in ./plugins`);
@@ -87,10 +90,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
+20
View File
@@ -132,3 +132,23 @@
overflow-y: hidden;
}
}
@keyframes slide {
0% {
transform: translateX(var(--slide-mes-x-start, 0px));
}
100% {
transform: translateX(var(--slide-mes-x-end, 0px));
}
}
@-webkit-keyframes slide {
0% {
transform: translateX(var(--slide-mes-x-start, 0px));
}
100% {
transform: translateX(var(--slide-mes-x-end, 0px));
}
}
+291 -24
View File
@@ -63,6 +63,7 @@
display: flex;
gap: 5px;
width: 100%;
align-items: baseline;
}
/* Control buttons in header */
@@ -83,14 +84,6 @@
gap: 5px;
}
#bg-scrollable-content {
flex-grow: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 0 5px 15px;
position: relative;
}
#bg_menu_content,
#bg_custom_content {
display: grid;
@@ -103,12 +96,19 @@
font-size: calc(var(--mainFontSize) * 0.95);
}
#bg-sort {
width: auto;
max-width: 6em;
flex-shrink: 0;
}
/* Thumbnails */
.bg_example:hover .BGSampleTitle {
opacity: 1;
}
.bg_example .mobile-only-menu-toggle {
.bg_example .mobile-only-menu-toggle,
.bg_folder_tile .mobile-only-menu-toggle {
display: none;
}
@@ -136,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,
@@ -162,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 {
@@ -300,3 +324,246 @@
.bg_example:focus-within .BGSampleTitle {
opacity: 1;
}
#bg_tabs {
display: flex;
flex-direction: column;
flex-grow: 1;
height: 100%;
overflow-y: hidden;
gap: 5px;
}
#bg_tabs .bg_tabs_list {
display: flex;
flex-direction: row;
gap: 5px;
background: none;
border: none;
margin: 5px 0;
padding: 0;
padding-right: 4em;
position: relative;
}
#bg_tabs .bg_tabs_list .bg_tab_button {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
min-width: 8em;
list-style: none;
color: var(--SmartThemeBodyColor);
background-color: var(--SmartThemeBlurTintColor);
border: 1px solid var(--SmartThemeBorderColor);
border-radius: 5px;
padding: 0;
cursor: pointer;
font-weight: 600;
margin: 0 !important;
filter: none;
opacity: 0.8;
transition: opacity var(--animation-duration-2x);
}
#bg_tabs .bg_tabs_list .bg_tab_button:hover {
opacity: 1;
}
#bg_tabs .bg_tabs_list .bg_tab_button.ui-tabs-active {
background-color: color-mix(in srgb, var(--SmartThemeQuoteColor) 33%, var(--SmartThemeBlurTintColor) 66%);
}
#bg_tabs.ui-widget-content {
border: none !important;
}
#bg_tabs .bg_tabs_list::before,
#bg_tabs .bg_tabs_list::after {
display: none;
}
#bg_tabs .bg_tabs_list .bg_tab_button a {
width: 100%;
height: 100%;
padding: 3px 5px;
cursor: pointer;
color: var(--SmartThemeBodyColor);
}
#bg_tabs .bg_tab_panel {
flex-grow: 1;
height: 100%;
overflow-y: auto;
padding: 10px;
}
#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;
}
+54
View File
@@ -0,0 +1,54 @@
.chatBackupsList {
display: flex;
flex-direction: column;
gap: 5px;
transition: height var(--animation-duration) ease;
max-height: min(25dvh, 250px);
overflow-y: auto;
border-radius: 10px;
border: 1px solid var(--SmartThemeBorderColor);
padding: 5px;
width: 100%;
}
.chatBackupsList:not(.open),
.chatBackupsList:empty {
display: none;
}
.chatBackupsListItem {
display: flex;
flex-wrap: wrap;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 10px;
width: 100%;
border: 1px solid var(--SmartThemeBorderColor);
border-radius: 5px;
padding: 5px 7px;
font-size: smaller;
background: var(--black30a);
}
.chatBackupsListItemName {
opacity: 0.75;
flex-grow: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.chatBackupsListItemInfo {
opacity: 0.75;
}
.chatBackupsListItemActions {
display: flex;
align-items: center;
gap: 5px;
}
.chatBackupsListItemActions .right_menu_button {
font-size: var(--mainFontSize);
}
+16 -2
View File
@@ -39,7 +39,7 @@ label[for="extensions_autoconnect"] {
text-align: left;
}
.extensions_info h3 {
.extensions_info h3:not(.margin0) {
margin-bottom: 0.5em;
}
@@ -97,13 +97,23 @@ label[for="extensions_autoconnect"] {
font-size: 1.05em;
}
.extensions_info .extension_version {
.extensions_info :is(.extension_version, .extension_author) {
opacity: 0.8;
font-size: 0.8em;
font-weight: normal;
margin-left: 2px;
}
.extensions_info :is(.extension_version, .extension_author):empty {
display: none;
}
.extensions_info .extension_author {
display: inline-flex;
gap: 2px;
align-items: baseline;
}
.extensions_info .extension_block a {
color: var(--SmartThemeBodyColor);
}
@@ -112,6 +122,10 @@ label[for="extensions_autoconnect"] {
color: limegreen;
}
.extensions_info .third_party_toolbar {
user-select: none;
}
input.extension_missing[type="checkbox"] {
opacity: 0.5;
}
+1
View File
@@ -33,6 +33,7 @@
display: flex;
flex-direction: column;
gap: 0.5em;
padding-right: var(--mes-right-spacing);
}
.mes_file_container .right_menu_button {
+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;
}
+603
View File
@@ -0,0 +1,603 @@
/**
* Macro System Styles
* Styles for the macro browser, documentation, and related UI components.
*/
/* =============================================================================
MACRO BROWSER
Dynamic documentation browser for macros, similar to SlashCommandBrowser.
============================================================================= */
.macroBrowser {
display: flex;
flex-direction: column;
gap: 0.5em;
}
/* -----------------------------------------------------------------------------
Toolbar (Search + Sort)
----------------------------------------------------------------------------- */
.macroBrowser .macro-toolbar {
display: flex;
gap: 1em;
align-items: center;
flex-wrap: wrap;
}
.macroBrowser .macro-search-label {
flex: 1 1 auto;
display: flex;
gap: 0.5em;
align-items: center;
min-width: 200px;
white-space: nowrap;
}
.macroBrowser .macro-search-input {
flex: 1 1 auto;
min-width: 100px;
}
.macroBrowser .macro-sort-btn {
flex: 0 0 auto;
white-space: nowrap;
}
.macroBrowser .macro-sort-btn.active {
background-color: var(--SmartThemeQuoteColor);
}
/* -----------------------------------------------------------------------------
Container (List + Details panels)
----------------------------------------------------------------------------- */
.macroBrowser .macro-container {
display: flex;
gap: 1em;
align-items: flex-start;
container-type: inline-size;
}
.macroBrowser .macro-list-panel {
flex: 1 1 60%;
display: flex;
flex-direction: column;
gap: 2px;
max-height: 60vh;
overflow-y: auto;
}
.macroBrowser .macro-details-panel {
flex: 0 0 40%;
position: sticky;
top: 0;
max-height: 60vh;
overflow-y: auto;
background: var(--SmartThemeBlurTintColor);
border-radius: 10px;
padding: 1em;
}
.macroBrowser .macro-details-placeholder {
opacity: 0.6;
text-align: center;
padding: 2em;
}
/* -----------------------------------------------------------------------------
Category Headers
----------------------------------------------------------------------------- */
.macroBrowser .macro-category-header {
font-weight: bold;
padding: 0.75em 0.5em 0.25em;
margin-top: 0.5em;
border-bottom: 1px solid var(--SmartThemeBorderColor);
border-radius: 10px 10px 0 0;
color: var(--SmartThemeQuoteColor);
position: sticky;
top: 0;
background: var(--SmartThemeChatTintColor);
z-index: 1;
}
.macroBrowser .macro-category-header:first-child {
margin-top: 0;
}
.macroBrowser .macro-category-header.isFiltered {
display: none;
}
/* -----------------------------------------------------------------------------
Macro List Items
Layout: [signature] [description (shrinks)] [source icon]
----------------------------------------------------------------------------- */
.macroBrowser .macro-item {
display: flex;
align-items: center;
gap: 0.5em;
padding: 0.5em;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.15s;
min-width: 0; /* Allow children to shrink */
}
.macroBrowser .macro-item:hover {
background: var(--black30a);
}
.macroBrowser .macro-item.selected {
background: var(--SmartThemeQuoteColor);
}
.macroBrowser .macro-item.isFiltered {
display: none;
}
.macroBrowser .macro-signature {
padding: 0.2em 0;
font-family: var(--monoFontFamily);
font-size: 0.9em;
color: var(--SmartThemeQuoteColor);
flex: 0 1 auto; /* Can shrink, but prefers not to */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 3em; /* Minimum before fully hidden */
}
.macroBrowser .macro-desc-preview {
flex: 1 1 0; /* Shrinks first, starts at 0 basis */
opacity: 0.7;
font-size: 0.9em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0; /* Allow shrinking to nothing */
}
.macroBrowser .macro-source {
flex: 0 0 auto; /* Never shrinks */
font-size: 0.8em;
opacity: 0.7;
}
.macroBrowser .macro-source.isExtension.isThirdParty {
color: #f0a030;
}
.macroBrowser .macro-source.isExtension.isCore {
color: #30a0f0;
}
.macroBrowser .macro-source.isCore:not(.isExtension) {
color: #50c050;
}
/* -----------------------------------------------------------------------------
Macro Details Panel
----------------------------------------------------------------------------- */
.macro-details .macro-details-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 0.5em;
margin-bottom: 0.75em;
}
.macro-details .macro-details-name {
font-family: var(--monoFontFamily);
font-size: 1.1em;
color: var(--SmartThemeQuoteColor);
background: var(--black30a);
padding: 0.15em 0.4em 0.3em;
border-radius: 4px;
word-break: break-all;
display: inline-block; /* Shrink-wrap to content */
}
.macro-details .macro-details-header > .macro-source {
flex: 0 0 auto;
font-size: 1em;
margin-top: 0.15em; /* Align with name top padding */
}
.macro-details .macro-category-badge {
display: inline-block;
font-size: 0.75em;
padding: 0.2em 0.6em;
border-radius: 10px;
background: color-mix(in srgb, var(--SmartThemeQuoteColor) 50%, transparent);
color: var(--SmartThemeBodyColor);
margin-bottom: 0.75em;
}
.macro-details .macro-details-section {
margin-bottom: 1em;
}
.macro-details .macro-details-label {
font-weight: bold;
font-size: 0.85em;
opacity: 0.8;
margin-bottom: 0.25em;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.macro-details .macro-details-text {
line-height: 1.4;
}
.macro-details .macro-returns-content {
display: flex;
align-items: baseline;
gap: 0.5em;
flex-wrap: wrap;
}
/* -----------------------------------------------------------------------------
Arguments List (in details panel)
----------------------------------------------------------------------------- */
.macro-details .macro-args-list {
list-style: none;
padding: 0;
margin: 0;
}
.macro-details .macro-arg-item {
padding: 0.4em 0;
border-bottom: 1px solid var(--black30a);
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 0.5em;
}
.macro-details .macro-arg-item:last-child {
border-bottom: none;
}
.macro-details .macro-arg-name {
font-family: var(--monoFontFamily);
font-weight: bold;
color: var(--SmartThemeQuoteColor);
}
.macro-details .macro-arg-type {
font-size: 0.75em;
padding: 0.1em 0.4em;
border-radius: 3px;
background: var(--black30a);
color: var(--SmartThemeEmColor);
}
.macro-details .macro-arg-required {
font-size: 0.8em;
color: var(--warning-color, #e8a97f);
}
.macro-details .macro-arg-desc {
flex: 1 1 100%;
font-size: 0.9em;
opacity: 0.8;
}
.macro-details .macro-arg-sample {
font-size: 0.85em;
opacity: 0.6;
font-style: italic;
}
.macro-details .macro-arg-list-info {
font-size: 0.85em;
opacity: 0.8;
}
.macro-details .macro-example-list {
list-style: disc;
padding-left: 1.5em;
margin: 0.25em 0;
}
.macro-details .macro-example-list li {
padding: 0.2em 0;
}
.macro-details .macro-example-list code {
font-family: var(--monoFontFamily);
background: var(--black30a);
padding: 0.1em 0.3em;
border-radius: 3px;
}
/* Alias indicator icon in list items */
.macro-details .macro-alias-indicator {
flex: 0 0 auto;
font-size: 0.8em;
opacity: 0.6;
margin-left: 0.5em;
transform: rotate(90deg);
}
.macro-details .macro-item.isAlias .macro-signature {
opacity: 0.85;
}
/* Alias of indicator in details panel */
.macro-details .macro-alias-of {
display: flex;
align-items: center;
gap: 0.5em;
margin: 0.5em 0;
padding: 0.4em 0.6em;
background: var(--black30a);
border-radius: 4px;
font-size: 0.9em;
opacity: 0.9;
}
.macro-details .macro-alias-of i {
transform: rotate(90deg);
font-size: 0.85em;
opacity: 0.7;
}
.macro-details .macro-alias-of code {
font-family: var(--monoFontFamily);
background: var(--black30a);
padding: 0.1em 0.4em;
border-radius: 3px;
}
/* Aliases list in details panel */
.macro-details .macro-alias-list {
list-style: none;
padding: 0;
margin: 0.25em 0;
display: flex;
flex-wrap: wrap;
gap: 0.5em;
}
.macro-details .macro-alias-item {
display: inline-flex;
align-items: center;
gap: 0.3em;
}
.macro-details .macro-alias-item code {
font-family: var(--monoFontFamily);
background: var(--black30a);
padding: 0.2em 0.5em;
border-radius: 3px;
}
.macro-details .macro-alias-item.isHidden {
opacity: 0.5;
}
.macro-details .macro-alias-item.isHidden code {
text-decoration: line-through;
text-decoration-style: dashed;
}
.macro-details .macro-alias-hidden-badge {
font-size: 0.75em;
opacity: 0.7;
font-style: italic;
}
/* ============================================
Enhanced Macro Autocomplete Styles
============================================ */
/* Fix macro items in autocomplete list - override the grid display: contents */
.autoComplete > .item.macro-ac-item {
display: flex !important;
flex-wrap: nowrap;
align-items: center;
gap: 0.5em;
grid-column: 1 / -1;
padding: 0.25em 0.5em;
min-height: 1.8em;
}
.autoComplete > .item.macro-ac-item > .type {
flex: 0 0 auto;
width: 2em;
text-align: center;
}
.autoComplete > .item.macro-ac-item > .specs {
flex: 0 0 auto;
max-width: 40%;
}
.autoComplete > .item.macro-ac-item > .specs > .name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.autoComplete > .item.macro-ac-item > .stopgap {
flex: 0 0 0.5em;
display: block !important;
}
.autoComplete > .item.macro-ac-item > .help {
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
}
.autoComplete > .item.macro-ac-item > .help > .helpContent {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
}
/* Indicator icons (alias and source) at the end */
.autoComplete > .item.macro-ac-item > .macro-ac-indicator {
flex: 0 0 auto;
font-size: 0.85em;
opacity: 0.6;
margin-left: auto;
}
.autoComplete > .item.macro-ac-item > .macro-ac-indicator:first-of-type {
margin-left: auto;
}
.autoComplete > .item.macro-ac-item > .macro-ac-indicator + .macro-ac-indicator {
margin-left: 0.25em;
}
/* Third-party source indicator */
.autoComplete > .item.macro-ac-item > .macro-source.isThirdParty {
color: #F89406;
}
/* Arity warning banner in details */
.macro-ac-warning {
display: flex;
align-items: baseline;
gap: 0.5em;
padding: 0.5em 0.75em;
background: linear-gradient(90deg, rgba(248, 148, 6, 0.2), transparent);
border-left: 3px solid #F89406;
border-radius: 0 4px 4px 0;
margin-bottom: 0.5em;
font-size: 0.9em;
color: #F89406;
}
.macro-ac-warning i {
font-size: 0.9em;
}
/* Scoped content info banner in details */
.macro-ac-scoped-info {
display: flex;
align-items: baseline;
gap: 0.5em;
padding: 0.5em 0.75em;
background: linear-gradient(90deg, rgba(91, 192, 222, 0.2), transparent);
border-left: 3px solid #5BC0DE;
border-radius: 0 4px 4px 0;
margin-bottom: 0.5em;
font-size: 0.9em;
color: #5BC0DE;
}
.macro-ac-scoped-info i {
font-size: 0.9em;
}
.macro-ac-scoped-info code {
background: rgba(91, 192, 222, 0.15);
padding: 0.1em 0.3em;
border-radius: 3px;
}
/* OPTIONAL badge for optional scoped content */
.macro-ac-optional-badge {
display: inline-block;
background: linear-gradient(135deg, #f0ad4e, #ec971f);
color: #000;
font-weight: bold;
font-size: 0.75em;
padding: 0.15em 0.5em;
border-radius: 3px;
text-transform: uppercase;
letter-spacing: 0.05em;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
/* Smaller variant for use in autocomplete list items */
.macro-ac-optional-badge-small {
font-size: 0.65em;
padding: 0.1em 0.35em;
vertical-align: middle;
color: #f0ad4e;
}
/* Closing tag autocomplete option */
.autoComplete > .item.macro-closing-tag-item > .type {
color: var(--ac-color-matchedText, var(--SmartThemeBorderColor));
}
.macro-closing-tag-details {
padding: 0.5em;
}
.macro-closing-tag-details h3 {
margin: 0 0 0.5em 0;
font-size: 1.1em;
}
.macro-closing-tag-details p {
margin: 0;
opacity: 0.9;
}
/* Current argument hint banner in details */
.macro-ac-arg-hint {
display: flex;
align-items: baseline;
gap: 0.5em;
padding: 0.5em 0.75em;
background: linear-gradient(90deg, var(--ac-color-selectedBackground, var(--SmartThemeQuoteColor)), transparent);
border-left: 3px solid var(--ac-color-matchedText, var(--SmartThemeBorderColor));
border-radius: 0 4px 4px 0;
margin-bottom: 0.5em;
font-size: 0.9em;
}
.macro-ac-arg-hint i {
color: var(--ac-color-matchedText, var(--SmartThemeBorderColor));
font-size: 0.8em;
}
.macro-ac-arg-hint .macro-ac-arg-hint-small {
font-size: 0.85em;
opacity: 0.8;
}
.macro-ac-hint-type {
font-family: var(--monoFontFamily);
font-size: 0.85em;
padding: 0.1em 0.3em;
background: var(--ac-color-hoveredBackground, var(--black30a));
border-radius: 3px;
margin-left: 0.25em;
}
.macro-ac-hint-desc {
opacity: 0.8;
}
.macro-ac-hint-sample {
opacity: 0.6;
font-style: italic;
}
/* Details panel using MacroBrowser styles - just add autocomplete context adjustments */
.autoComplete-details .macro-ac-details {
padding: 0.5em;
}
/* Highlight current argument in arguments list */
.autoComplete-details .macro-arg-item.current {
background: var(--ac-color-selectedBackground, var(--SmartThemeQuoteColor));
padding: 0.25em 0.5em;
margin: 0 -0.5em;
border-radius: 4px;
}
+85
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;
}
@@ -97,6 +147,36 @@
max-width: 100dvw;
}
#bg_tabs .bg_tabs_list .bg_tab_button {
min-width: 6em;
}
#add_background_button_top>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;
@@ -420,6 +500,11 @@
.horde_multiple_hint {
display: none;
}
select[multiple] {
max-height: 50px;
overflow-y: auto;
}
}
/*landscape mode phones and ipads*/
+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;
}
+8
View File
@@ -212,6 +212,14 @@
background-color: var(--white30a);
}
.group_select.avatar {
padding: 0;
}
.group_select.missing-avatar.inline_avatar {
justify-content: center;
}
.group_select .avatar {
flex: 0;
}
+5
View File
@@ -16,6 +16,11 @@
user-select: none;
}
.select2-container .select2-selection.select2-selection--single.select2-selection--clearable .select2-selection__clear {
top: 0;
right: 25px;
}
.select2-container .select2-selection .select2-selection__clear {
color: var(--SmartThemeBodyColor);
font-size: 20px;
+236
View File
@@ -0,0 +1,236 @@
/* ─────────────────────────────────────────────────────────────────────────────
Streaming Display — floating toast panel for live LLM generation output.
Shows reasoning (thinking) and content as they stream in.
Used by extensions that leverage ConnectionManagerRequestService streaming.
───────────────────────────────────────────────────────────────────────────── */
.streaming-display {
position: fixed;
bottom: max(calc(var(--bottomFormBlockSize) + 5px), 20px);
right: 20px;
width: min(550px, calc(100vw - 40px));
max-height: 70vh;
background: var(--SmartThemeBlurTintColor);
border: 1px solid var(--SmartThemeBorderColor);
border-radius: 10px;
padding: 14px;
z-index: 9000;
display: flex;
flex-direction: column;
gap: 10px;
opacity: 0;
transform: translateY(20px);
transition: opacity var(--animation-duration, 125ms) ease, transform var(--animation-duration, 125ms) ease;
overflow: hidden;
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
backdrop-filter: blur(12px);
}
.streaming-display-visible {
opacity: 1;
transform: translateY(0);
}
/* Header label with animated activity indicator */
.streaming-display-label {
font-weight: 600;
font-size: 0.95em;
color: var(--SmartThemeBodyColor);
display: flex;
align-items: center;
gap: 8px;
user-select: none;
}
/* LED status indicator - pulsing while streaming */
.streaming-display-led {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background: rgb(225, 138, 36);
animation: streaming-display-pulse 1.5s ease-in-out infinite;
flex-shrink: 0;
}
/* Completed state: solid green LED */
.streaming-display-complete .streaming-display-led {
background: #4caf50;
animation: none;
opacity: 1;
box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}
/* Stopped state: solid red LED */
.streaming-display-stopped .streaming-display-led {
background: #f44336;
animation: none;
opacity: 1;
box-shadow: 0 0 8px rgba(244, 67, 54, 0.6);
}
@keyframes streaming-display-pulse {
0%, 100% { opacity: 0.4; transform: scale(0.9); }
50% { opacity: 1; transform: scale(1.1); }
}
/* Label text takes available space */
.streaming-display-label-text {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Window control buttons container */
.streaming-display-controls {
display: flex;
align-items: center;
gap: 4px;
margin-left: auto;
flex-shrink: 0;
}
/* Window control buttons */
.streaming-display-btn {
width: 22px;
height: 22px;
border: none;
border-radius: 4px;
background: transparent;
color: var(--SmartThemeBodyColor);
font-size: 14px;
line-height: 1;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
opacity: 0.6;
transition: opacity 0.15s ease, background-color 0.15s ease;
}
.streaming-display-btn:hover {
opacity: 1;
background-color: rgba(255, 255, 255, 0.1);
}
.streaming-display-btn-close:hover {
background-color: rgba(244, 67, 54, 0.2);
}
.streaming-display-btn-stop {
font-size: 10px;
}
.streaming-display-btn-stop:hover {
background-color: rgba(244, 150, 36, 0.2);
color: rgb(225, 138, 36);
}
/* Content container - collapsible for minimize */
.streaming-display-content {
display: flex;
flex-direction: column;
gap: 10px;
overflow: hidden;
transition: max-height var(--animation-duration, 125ms) ease, opacity var(--animation-duration, 125ms) ease;
}
/* Minimized state - hide content sections */
.streaming-display-minimized .streaming-display-content {
max-height: 0;
opacity: 0;
}
.streaming-display-minimized {
gap: 0;
}
/* Model/API icon in the label */
.streaming-display-icon {
width: 1.1em;
height: 1.1em;
flex-shrink: 0;
}
/* Minimized state adjustments */
.streaming-display-minimized.streaming-display {
padding: 10px 14px;
}
/* Reasoning (thinking) section */
.streaming-display-reasoning {
background: color-mix(in srgb, var(--SmartThemeBodyColor) 5%, transparent);
border-radius: 6px;
padding: 8px 10px;
border-left: 3px solid color-mix(in srgb, var(--SmartThemeBodyColor) 25%, transparent);
}
.streaming-display-reasoning-label {
font-size: 0.8em;
font-weight: 600;
opacity: 0.5;
margin-bottom: 4px;
letter-spacing: 0.03em;
text-transform: uppercase;
}
.streaming-display-reasoning-content {
font-size: 0.82em;
opacity: 0.65;
max-height: 25vh;
overflow-y: auto;
word-break: break-word;
line-height: 1.45;
scrollbar-width: thin;
}
.streaming-display-reasoning-content p {
margin: 0.3em 0;
}
.streaming-display-reasoning-content p:first-child {
margin-top: 0;
}
.streaming-display-reasoning-content p:last-child {
margin-bottom: 0;
}
/* Main content section */
.streaming-display-text {
border-top: 1px solid color-mix(in srgb, var(--SmartThemeBorderColor) 50%, transparent);
padding-top: 8px;
min-height: 1.5em;
}
.streaming-display-text-content {
font-size: 0.9em;
color: var(--SmartThemeBodyColor);
max-height: 40vh;
overflow-y: auto;
word-break: break-word;
line-height: 1.5;
scrollbar-width: thin;
}
.streaming-display-text-content p {
margin: 0.4em 0;
}
.streaming-display-text-content p:first-child {
margin-top: 0;
}
.streaming-display-text-content p:last-child {
margin-bottom: 0;
}
/* Strip auto-added quotes from <q> tags, as message formatting adds them */
.streaming-display-reasoning-content q:before,
.streaming-display-reasoning-content q:after,
.streaming-display-text-content q:before,
.streaming-display-text-content q:after {
content: '';
}
+4
View File
@@ -67,6 +67,10 @@
display: none;
}
.tag.tag-absent {
text-decoration: line-through;
}
.tag.actionable {
border-radius: 50%;
aspect-ratio: 1 / 1;
+21 -5
View File
@@ -477,14 +477,11 @@ body.expandMessageActions .mes .mes_buttons .extraMesButtonsHint {
display: none !important;
}
#smooth_streaming:not(:checked)~#smooth_streaming_speed_control {
#smooth_streaming_control:has(#smooth_streaming:not(:checked))~#smooth_streaming_speed_control,
#smooth_streaming_control:has(#smooth_streaming:not(:checked))~#smooth_streaming_no_think_control {
display: none;
}
#smooth_streaming:checked~#smooth_streaming_speed_control {
display: block;
}
.mdhotkey_icon {
opacity: 0.6;
}
@@ -532,6 +529,7 @@ label[for="bind_preset_to_connection"]:has(input:checked) {
}
#openai_settings input[type="checkbox"]:not(:checked)~[data-cc-toggle],
#openai_settings input[type="checkbox"]:not(:checked)~*:has([data-cc-toggle]),
#openai_settings [data-cc-toggle="false"]>.icon-supported,
#openai_settings [data-cc-toggle="true"]>.icon-unsupported {
display: none;
@@ -562,3 +560,21 @@ label[for="bind_preset_to_connection"]:has(input:checked) {
filter: grayscale(0.5);
cursor: not-allowed;
}
#request_images_block:has(#openai_request_images:not(:checked)) #request_images_settings {
display: none;
}
#openai_settings:has(#openai_function_calling:not(:checked)) #tool_call_recurse_limit_block {
display: none;
}
#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;
}
+10
View File
@@ -17,6 +17,7 @@
.welcomePanel.recentHidden .welcomeRecent,
.welcomePanel.recentHidden .recentChatsTitle,
.welcomePanel.recentHidden .hideRecentChats,
.welcomePanel.recentHidden .recentChatsSettings,
.welcomePanel:not(.recentHidden) .showRecentChats {
display: none;
}
@@ -115,6 +116,7 @@ body.hideChatAvatars .welcomePanel .recentChatList .recentChat .avatar {
cursor: pointer;
gap: 10px;
border: 1px solid var(--SmartThemeBorderColor);
position: relative;
}
.welcomeRecent .recentChatList .recentChat .avatar {
@@ -222,6 +224,14 @@ body.big-avatars .welcomeRecent .recentChatList .recentChat .chatMessageContaine
transform: rotate(180deg);
}
.welcomeRecent .recentChatList .recentChat .recentChatPinned {
top: 1px;
left: 1px;
position: absolute;
opacity: 0.8;
color: var(--SmartThemeQuoteColor);
}
@media screen and (max-width: 1000px) {
.welcomePanel .welcomeShortcuts a span {
display: none;
+86 -5
View File
@@ -1,11 +1,14 @@
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';
import { FileAttachment } from './scripts/chats';
import { ReasoningMessageExtra } from './scripts/reasoning';
import { IGNORE_SYMBOL, OVERSWIPE_BEHAVIOR } from './scripts/constants';
import { ToolInvocation } from './scripts/tool-calling';
import { getWorldInfoSettings } from './scripts/world-info';
declare global {
// Custom types
@@ -14,7 +17,51 @@ declare global {
type ReasoningSettings = typeof power_user.reasoning;
type ChatCompletionSettings = typeof oai_settings;
type TextCompletionSettings = typeof textgenerationwebui_settings;
type WorldInfoSettings = ReturnType<typeof getWorldInfoSettings>;
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;
name: string;
members: string[];
disabled_members: string[];
chat_id: string;
chats: string[];
generation_mode?: number;
generation_mode_join_prefix?: string;
generation_mode_join_suffix?: string;
activation_strategy?: number;
auto_mode_delay?: number;
allow_self_responses?: boolean;
avatar_url?: string;
hideMutedSprites?: boolean;
fav?: boolean;
date_last_chat?: MessageTimestamp;
}
interface ChatFile extends Array<ChatMessage> {
[index: number]: ChatMessage;
0?: ChatHeader;
}
interface ChatHeader {
chat_metadata: ChatMetadata;
/** @deprecated For backward compatibility ONLY */
user_name: 'unused';
/** @deprecated For backward compatibility ONLY */
character_name: 'unused';
}
interface ChatMetadata {
tainted?: boolean;
integrity?: string;
scenario?: string;
persona?: string;
[key: string]: any;
}
interface ChatMessage {
name?: string;
@@ -28,21 +75,35 @@ declare global {
force_avatar?: string;
original_avatar?: string;
swipes?: string[];
swipe_info?: Record<string, any>;
swipe_info?: SwipeInfo[];
swipe_id?: number;
extra?: ChatMessageExtra & Partial<ReasoningMessageExtra> & Record<string, any>;
extra?: ChatMessageExtra;
};
interface ChatMessageExtra {
interface SwipeInfo {
send_date?: MessageTimestamp;
gen_started?: MessageTimestamp;
gen_finished?: MessageTimestamp;
extra?: ChatMessageExtra;
}
interface BaseMessageExtra {
api?: string;
model?: string;
type?: string;
gen_id?: number;
bias?: string;
uses_system_ui?: boolean;
memory?: string;
display_text?: string;
reasoning_display_text?: string;
tool_invocations?: any[];
tool_invocations?: ToolInvocation[];
title?: string;
isSmallSys?: boolean;
token_count?: number;
/** When false, the message cannot be swiped. */
swipeable?: boolean;
overswipe_behavior?: OVERSWIPE_BEHAVIOR;
files?: FileAttachment[];
inline_image?: boolean;
media_display?: string;
@@ -62,6 +123,8 @@ declare global {
generationType?: number;
/** @deprecated Use `MediaAttachment.negative` instead */
negative?: string;
/** Will exclude this message from prompt processing */
[IGNORE_SYMBOL]?: boolean;
}
type MediaAttachment = MediaAttachmentProps & ImageGenerationAttachmentProps & ImageCaptionAttachmentProps;
@@ -76,6 +139,8 @@ declare global {
interface ImageGenerationAttachmentProps {
generation_type?: number;
negative?: string;
width?: number;
height?: number;
}
interface ImageCaptionAttachmentProps {
@@ -93,6 +158,12 @@ declare global {
paused: boolean;
}
interface ChatCompletionMessage {
name?: string;
role: string;
content: string;
}
// Global namespace modules
interface Window {
ai: any;
@@ -165,4 +236,14 @@ declare global {
rgba: string;
}
};
type SwipeEvent = JQuery.TriggeredEvent<any, any, HTMLElement, HTMLElement>;
}
//Overrides for public/scripts/chats.js
declare module 'dompurify' {
interface Config {
MESSAGE_SANITIZE?: boolean;
MESSAGE_ALLOW_SYSTEM_UI?: boolean;
}
}
+4
View File
@@ -0,0 +1,4 @@
<svg width="246" height="153" viewBox="0 0 246 153" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M153.334 146.457C149.769 151.894 142.21 152.909 137.336 148.605L115.671 129.479C110.797 125.176 110.872 117.554 115.83 113.348L137.665 94.8248C161.939 74.232 193.912 66.2053 224.344 73.0645L240.772 76.7673C241.359 76.8995 241.902 77.1773 242.353 77.575C244.73 79.6736 243.399 83.5966 240.235 83.8175L239.884 83.842C209.831 85.9395 182.262 102.339 165.298 128.211L153.334 146.457Z" />
<path d="M61.7046 134.759C57.1727 139.455 49.5229 139.022 45.5496 133.846L2.20718 77.3823C-1.74588 72.2325 -0.220772 64.7778 5.43762 61.5919L91.8585 12.9343C119.419 -2.58324 152.212 -4.22605 180.759 8.48062L243.451 36.385C244.421 36.8168 245.268 37.4842 245.914 38.3264C249.363 42.8196 245.669 49.2399 240.048 48.5205L202.701 43.7404C172.88 39.9236 142.862 50.6695 121.491 72.8128L61.7046 134.759Z" />
</svg>

After

Width:  |  Height:  |  Size: 902 B

+5 -77
View File
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

+6 -47
View File
@@ -1,48 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.0"
width="431.92484pt"
height="430.70734pt"
viewBox="0 0 431.92484 430.70734"
preserveAspectRatio="xMidYMid"
id="svg8"
sodipodi:docname="koboldhorde.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs12" />
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="pt"
showgrid="false"
inkscape:zoom="1.5043945"
inkscape:cx="237.63713"
inkscape:cy="285.82928"
inkscape:window-width="2560"
inkscape:window-height="1377"
inkscape:window-x="5112"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg8" />
<g
transform="matrix(0.1,0,0,-0.1,-40.075165,470.78832)"
stroke="none"
id="g6">
<path
d="m 2495,4698 c -3,-7 -6,-76 -7,-153 l -3,-140 -115,-5 c -63,-3 -114,-9 -114,-14 1,-4 34,-41 74,-82 l 72,-74 -4,-125 -3,-124 -65,-67 c -74,-75 -224,-205 -257,-223 -27,-14 -54,-3 -89,38 -22,26 -24,26 -156,26 -132,0 -135,0 -172,28 -52,40 -60,67 -41,135 9,30 14,56 11,59 -7,7 -47,-16 -77,-43 l -25,-24 -18,41 c -10,23 -39,56 -68,80 -63,49 -110,53 -160,12 -58,-49 -67,-65 -68,-118 0,-49 2,-53 63,-113 62,-61 63,-62 118,-62 h 56 l 72,-80 73,-80 h 51 c 61,0 66,-3 92,-53 11,-21 46,-69 77,-105 l 58,-67 -320,-3 -321,-2 -55,26 c -47,22 -67,42 -131,125 -79,102 -128,139 -186,139 -23,0 -27,-4 -27,-28 0,-61 91,-163 177,-198 64,-27 97,-59 167,-162 36,-55 75,-107 86,-117 24,-22 80,-108 80,-123 0,-6 -15,-35 -34,-64 -18,-29 -66,-113 -106,-185 l -72,-133 h -80 -79 l 2,80 c 1,44 0,83 -4,86 -3,3 -31,-8 -63,-24 -67,-33 -197,-82 -220,-82 -9,0 -34,-13 -57,-29 -36,-25 -55,-30 -129,-36 -77,-6 -87,-9 -92,-28 -13,-48 -15,-47 157,-47 90,0 232,-3 315,-7 l 152,-6 v -39 -38 h 281 280 l 57,47 c 31,25 80,56 109,69 87,39 78,44 -89,45 -84,1 -232,4 -328,8 l -175,6 55,28 c 30,15 63,27 72,27 16,0 58,44 58,61 0,17 92,150 113,164 12,7 57,17 100,21 l 77,7 62,-43 c 49,-35 72,-45 115,-48 31,-3 53,0 53,5 0,11 -93,102 -156,152 l -42,32 -4,90 c -2,50 -9,94 -16,101 -7,7 -12,16 -12,20 0,4 56,8 123,8 68,0 212,3 319,7 l 195,6 -56,50 c -72,65 -71,63 -71,125 0,29 -7,69 -15,89 -8,19 -15,37 -15,39 0,2 28,4 61,4 57,0 65,3 110,41 l 49,41 v 69 70 l 55,51 c 106,98 95,132 95,-292 v -371 l -45,-42 -44,-42 -2,-194 c -2,-219 -6,-209 76,-210 22,-1 50,-8 62,-16 18,-13 23,-13 30,-2 5,9 33,16 71,20 35,3 66,8 69,11 3,3 8,93 11,199 l 5,194 -47,32 -46,32 v 202 c 0,111 -3,281 -7,377 l -6,174 39,-31 c 107,-86 106,-85 111,-143 7,-89 10,-96 65,-134 43,-29 62,-36 101,-36 h 48 l -5,-32 c -3,-18 -8,-64 -10,-103 l -5,-70 -56,-50 c -30,-28 -55,-53 -55,-55 0,-3 78,-3 172,-2 95,2 237,1 315,-3 l 142,-7 -14,-29 c -9,-17 -15,-56 -15,-97 0,-85 -1,-86 -161,-228 -66,-58 -118,-111 -116,-118 9,-27 130,16 213,76 45,32 47,33 164,34 l 118,2 78,-114 c 44,-62 79,-122 79,-131 0,-16 -18,-19 -205,-24 -113,-3 -238,-7 -277,-8 -40,0 -73,-5 -73,-11 0,-5 21,-18 48,-30 26,-12 81,-43 123,-70 l 75,-50 h 316 316 l 9,38 9,37 58,3 c 53,3 58,1 51,-15 -4,-10 -11,-39 -15,-66 -5,-35 -15,-57 -40,-82 -40,-41 -33,-57 13,-30 18,11 79,35 137,55 l 105,35 9,50 c 5,28 14,53 20,57 6,4 52,8 103,8 h 91 l 11,31 c 6,18 11,33 11,34 0,2 -46,4 -103,7 -96,3 -106,5 -152,36 -27,18 -67,37 -89,43 -44,12 -112,44 -136,64 -8,7 -27,15 -42,17 -27,5 -27,5 -34,-73 l -7,-79 h -89 -89 l -57,118 c -31,64 -69,137 -84,161 -22,36 -28,57 -28,102 0,56 2,60 54,116 29,32 81,98 116,147 49,69 76,96 122,125 138,84 191,138 202,204 l 7,37 h -41 c -59,0 -88,-19 -159,-104 -65,-78 -120,-127 -181,-165 -34,-20 -46,-21 -362,-21 -192,0 -328,4 -328,9 0,5 19,24 42,42 22,18 61,64 85,101 44,68 44,68 90,68 44,0 49,3 134,86 84,82 89,86 122,80 49,-9 84,7 145,67 50,49 52,53 52,105 0,65 -10,84 -62,122 -61,45 -119,42 -165,-6 -18,-20 -43,-54 -54,-75 -10,-21 -22,-39 -26,-39 -3,0 -20,9 -37,19 -17,11 -40,21 -50,23 -17,3 -19,-3 -17,-57 1,-46 -3,-68 -19,-93 -31,-51 -68,-61 -191,-55 -131,7 -152,2 -179,-42 -12,-19 -29,-35 -38,-35 -17,0 -405,306 -429,337 -7,10 -13,45 -13,80 v 63 h 89 c 53,0 93,4 96,11 4,6 -4,22 -16,36 -32,34 -134,120 -150,125 -9,3 -13,49 -13,180 -1,97 -3,178 -6,181 -3,3 -33,8 -67,12 -49,5 -64,4 -68,-7 z"
id="path2" />
<path
d="m 2166,2764 c -3,-9 -6,-59 -6,-112 v -97 l -49,-42 -50,-43 h -145 -146 v -110 -110 h -25 c -17,0 -43,-16 -75,-46 -53,-49 -96,-63 -164,-50 -30,6 -42,18 -89,89 -30,45 -61,97 -70,114 -16,30 -20,31 -83,35 -36,1 -68,0 -71,-5 -2,-4 25,-67 61,-140 36,-72 68,-150 72,-173 6,-38 3,-44 -33,-80 -21,-21 -62,-58 -91,-82 -29,-24 -61,-60 -71,-80 -26,-49 -106,-125 -161,-152 -56,-28 -116,-83 -141,-132 -36,-70 -25,-84 51,-64 48,12 64,25 154,118 149,155 126,148 509,148 174,0 317,-4 317,-8 0,-5 -14,-21 -31,-38 -17,-16 -53,-63 -81,-104 l -50,-75 -57,-6 c -54,-7 -58,-9 -122,-79 l -67,-73 -58,6 c -71,8 -88,0 -149,-71 -34,-41 -45,-62 -45,-88 0,-51 23,-98 64,-129 31,-24 43,-27 85,-23 73,7 121,50 145,130 5,16 8,16 48,-2 63,-29 69,-27 62,20 -6,34 -2,45 20,75 48,63 67,70 182,66 134,-3 172,4 180,35 13,52 26,48 147,-43 63,-49 167,-130 231,-182 l 116,-94 v -57 -57 l -86,-6 c -48,-3 -89,-8 -91,-11 -3,-3 26,-33 63,-68 136,-125 121,-89 123,-288 1,-96 4,-176 6,-179 3,-2 22,12 44,32 22,19 51,43 65,52 25,17 26,20 26,126 v 109 h 119 c 66,0 122,4 125,9 3,5 -33,46 -80,90 l -86,82 7,109 c 8,130 17,146 140,256 43,38 100,90 127,117 64,61 94,63 137,8 l 32,-40 145,-3 146,-3 30,-34 c 27,-30 30,-39 26,-82 -5,-48 -4,-49 21,-48 14,1 40,4 56,8 26,5 32,2 45,-21 8,-15 32,-46 53,-68 35,-36 44,-40 86,-40 38,0 57,7 90,30 45,33 61,63 61,116 0,27 -11,46 -52,91 -66,74 -63,73 -127,73 -53,0 -55,1 -132,75 l -79,75 h -79 c -51,0 -82,4 -89,13 -5,6 -15,38 -22,70 -8,38 -22,70 -41,92 -30,33 -30,34 -9,45 14,8 116,10 328,8 355,-3 350,-2 442,-101 150,-161 142,-154 194,-161 64,-10 75,1 51,55 -26,56 -86,105 -154,125 -45,13 -65,26 -101,67 -25,28 -75,83 -111,122 -37,38 -86,101 -109,140 l -42,69 32,56 c 40,70 140,277 140,291 0,10 -40,6 -112,-12 -30,-8 -42,-18 -59,-52 -28,-54 -75,-125 -107,-159 -49,-53 -158,-50 -221,7 -21,19 -49,38 -63,44 -21,8 -26,18 -31,63 -4,29 -7,78 -7,110 v 56 l -160,4 -159,3 -39,38 -39,38 -7,112 c -4,61 -8,113 -11,115 -8,9 -40,-21 -195,-186 -89,-95 -170,-177 -181,-183 -30,-15 -11,-34 -263,249 -60,67 -112,122 -116,122 -4,0 -11,-7 -14,-16 z m 388,-524 c 4,0 59,50 121,110 62,61 117,110 123,110 16,0 72,-75 72,-96 0,-18 -290,-304 -308,-304 -11,0 -326,287 -330,301 -4,10 41,75 65,95 10,9 38,-13 131,-102 64,-62 121,-114 126,-114 z m -759,-97 c 4,-21 7,-44 8,-52 2,-11 31,-14 143,-15 l 141,-1 69,-60 c 37,-33 128,-118 201,-190 l 133,-130 v -230 c 0,-218 -4,-275 -19,-275 -3,0 -35,24 -71,53 l -65,53 -12,79 c -6,44 -12,81 -12,81 -1,1 -17,14 -37,29 -25,20 -54,30 -93,34 -42,5 -55,10 -52,21 2,8 7,51 12,95 l 8,80 51,47 c 29,25 49,51 45,57 -4,7 -93,11 -268,12 -144,1 -295,4 -335,8 l -73,6 45,43 c 45,43 46,45 46,105 0,61 1,63 56,125 31,34 60,62 64,62 5,0 12,-17 15,-37 z m 1608,-34 47,-41 v -82 c 0,-69 3,-86 20,-104 12,-12 25,-22 31,-22 6,0 8,-4 5,-9 -3,-5 -71,-12 -150,-16 l -144,-7 -159,-148 c -87,-81 -187,-171 -223,-201 l -65,-55 -5,-66 c -3,-45 -11,-72 -24,-87 -36,-39 -125,-103 -136,-96 -6,4 -10,92 -10,254 v 248 l 103,99 c 108,106 215,206 285,267 l 42,37 h 149 c 158,0 161,1 161,51 0,29 20,23 73,-22 z"
id="path4" />
</g>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="svg8" width="431.92pt" height="430.69pt" preserveAspectRatio="xMidYMid" version="1.0" viewBox="0 0 431.92 430.69" xmlns="http://www.w3.org/2000/svg">
<g id="g3" transform="matrix(.1 0 0 -.1 -40.075 470.79)">
<path id="path1" d="m2495 4698c-9-97-8-195-10-293-65-14-170 12-229-19 45-55 96-105 146-156-3-83-5-166-7-249-102-101-201-211-322-290-27-14-54-3-89 38-65 77-439-60-369 189 45 119-53 28-91-8-51 115-151 211-246 133-124-105-64-173-5-231 48-64 103-62 174-62 48-54 96-107 145-160 66 0 107 14 143-53 37-63 87-117 135-172-289 13-616-97-827 146-162 210-213 129-213 111 0-155 182-121 344-360 77-118 166-205 166-240-69-128-143-254-212-382h-159c-6 53 16 115-2 166-102-50-248-79-340-135-92-64-208-14-221-64-13-48-15-47 157-47 156 0 311-7 467-13v-77h561c52 44 105 87 166 116 87 39 78 44-89 45-145 2-166 2-503 14 42 19 81 47 127 55 43 0 115 188 171 225 56 21 118 23 177 28 56-38 107-85 177-91 31-3 53 0 53 5-53 72-127 130-198 184l-4 90c-5 123-28 104-28 121 210 14 425 14 637 21-58 55-127 86-127 175 0 72-30 121-30 128 0 2 28 4 61 4 68-7 111 42 159 82v139l55 51c106 98 95 132 95-292v-371c-30-28-59-56-89-84l-2-194c-2-219-6-209 76-210 22-1 50-8 62-16 18-13 23-13 30-2 5 9 33 16 71 20 35 3 66 8 69 11 6 6 10 155 16 393-31 21-62 43-93 64 3 251-4 502-13 753 60-51 142-89 150-174 7-89 10-96 65-134 44-37 95-36 149-36-12-68-15-137-20-205-37-35-78-66-111-105 0-22 2 19 629-12-23-39-28-82-29-126 0-85-1-86-161-228-66-58-118-111-116-118 9-27 130 16 213 76 45 32 47 33 164 34l118 2c46-83 124-154 157-245 0-47-496-7-555-43 81-49 166-97 246-150h632l18 75c20-2 119 19 109-12-20-51-3-96-55-148-40-41-33-57 13-30 32 20 119 49 242 90 9 34 6 78 29 107 12 8 86 8 194 8 4 12 22 62 22 65 0 2-46 4-103 7-194 6-120 46-241 79-97 26-138 76-178 81-44 11-38-118-41-152h-178c-47 93-87 190-141 279-88 140 63 263 142 365 149 210 291 154 331 366-217 0-138-117-381-269-71-42-690-15-690-12 70 58 140 211 217 211 110 0 171 181 256 166 107-20 302 172 135 294-157 116-226-120-245-120-9 0-60 37-87 42-17 3-19-3-17-57 6-274-307-57-389-190-12-19-29-35-38-35-17 0-405 306-429 337-18 45-13 96-13 143h89c53 0 93 4 96 11 17 26-154 157-166 161-21 7-9 351-19 361-2 2-126 29-135 5z"/>
<path id="path3" d="m2160 2555c-33-28-66-57-99-85h-291v-220c-128 0-96-128-264-96-55 11-143 173-159 203-19 41-119 33-154 30-6-12 122-252 133-313 15-96-132-130-195-242-71-133-240-162-302-284-36-70-25-84 51-64 48 12 64 25 154 118 149 155 126 148 509 148 174 0 317-4 317-8-60-67-112-142-162-217-114 4-177-83-246-158-101 14-134 18-207-65-166-201 173-364 249-110 15 49 125-85 110 18-4 24-16 149 202 141 134-3 172 4 180 35 13 52 26 48 147-43 117-90 232-183 347-276v-114c-58-3-122-7-177-17-3-3 26-33 63-68 136-125 121-89 123-288 1-96 4-176 6-179 114 63 135 89 135 210v109c78 11 169-18 244 9-43 65-109 118-166 172-24 285 101 312 274 482 81 84 115 36 169-32l291-6c34-35 60-64 56-116-12-117 80 11 122-61 123-230 398-46 238 129-66 74-63 73-127 73-88 2-151 93-211 150h-79c-93 0-94 3-111 83-25 121-96 113-50 137 14 8 116 10 328 8 355-3 350-2 442-101 150-161 142-154 194-161 138-22 24 143-103 180-112 52-233 185-363 398 58 114 136 224 172 347 0 10-40 6-112-12-75-20-186-386-387-204-48 42-86 37-94 107-8 55-7 111-7 166-106 3-213 5-319 7l-78 76c-6 74-9 151-18 227-18 20-336-347-376-369-60-30-362 398-379 371-15-25-20-173-20-225zm394-315c12 0 229 220 244 220 16 0 72-75 72-96 0-18-290-304-308-304-11 0-326 287-330 301-4 10 41 75 65 95 23 20 239-216 257-216zm-751-149c84-11 197-15 284-16 140-120 271-251 403-380-10-256-8-257-19-505 0-5-57 42-136 106-8 53-16 107-24 160-89 89-191 52-182 84 3 11 9 61 20 175 54 50 55 51 96 104-12 21-352-1-676 26 51 48 91 72 91 148-4 72 60 129 120 187 7 7 17-43 23-89zm1647-23c1-67-10-140 20-186 6-15 39-17 36-31-5-9-121-15-294-23-146-138-294-274-447-404-8-49 3-111-29-153-36-39-125-103-136-96-8 6-10 64-10 502 141 137 282 273 430 403 299-9 306-19 310 51 16 48 96-42 120-63z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

+2
View File
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="svg1" width="329.35" height="307.64" version="1.1" viewBox="0 0 329.35 307.64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g id="layer1" transform="translate(-779.42 -7.5519)"><path id="path9" transform="translate(429.83 -2.2682)" d="m647.8 18.2-1.9 3.5-45 0.1-36.5 42.6c-20.2-12.3-43-0.7-48.7 9.8-1 1.8-1.4 1.5-5.9-3.1-14.2-15-34.2-11.1-39.7-8.4-4.7 2.3-4.9 2.3-6.6 0.5-12.3-13.8-24.3-27.7-36.4-41.5l-44.3-0.1-2-3.2c-8.1-12.9-28.1-9.2-30.9 5.7-3.4 18.1 22.4 28.1 31.1 11.8l1.8-3.2h39.3l34 39c-2.7 5.4-6 10.6-7.3 16.6-0.5 3.2-1.4 4.3-4.8 6.3-5 3-9.2 7.1-13.5 11.1-10.6 0.1-23.9 1.6-25.6-12-0.4-14.2-13.9-20.4-24.7-14.7-11.9 6.3-11.7 24.3 0.4 30.1 4.2 2 10.8 2.1 14.5 0.2 7.5-3.9 4.9 7.4 21.5 7.4 6.2 0 6.9 0.2 6.2 1.8-1 13.1-3.6 10.8-10.2 38.8l-24.5 0.6-4.2-4.4c-11.8-12.6-29.6-5.5-29.6 10.5 0 16.3 20.2 24.6 31.3 8.1l2.9-4.3 24.2 0.6c5.7 25.5 10.2 17.2 7.7 27.1-1.9 18.1-6.8 13.4-21.7 13.4l-12 8.9c-27.2-8.2-33.1 21.6-18.3 29.1 11.7 6 24.9-1.8 24.9-14.6 0-5.1 0.1-5.4 4.7-8.9 6-5.1 14.3-3.3 21.6-3 5.3 9.6 12.3 18.6 24 20.1 9.1 1.2 4.4 5.9 14.5 18l-31.9 36.4h-30.6l-2.4-3.7c-6.3-9.5-21.8-10.7-28.7 1.3-8 14 7.1 29.9 21.3 23.5 3.8-1.7 9.5-7.2 9.5-9.2 12-1.6 24.4-0.9 36.5-0.9l17.4-20.1c14.3-16.5 17.8-20 19.5-19.6 20.4 5.4 32.4 0 45.7-14.6 2.9 3.8 17 20.1 39 14.8 6.9-1.7 7-1.7 8.7 0.3 11.2 13 22.5 26 33.7 39l36.2 0.1 2.4 3.8c9 14 32.2 8.1 30.7-10.4-1.5-18.4-23.8-19.2-30.8-7.9l-2.2 3.5h-30.7l-32-37.1c4.1-4.8 7.2-10 9.2-16 1.3-4.1 17 1.6 29.6-21.9 10.6-0.2 25.6-1.4 27.1 12.4 0 12.9 13.2 20.6 24.9 14.6 14.8-7.5 11.1-39.7-18.3-29.1-10.3-8.2-9.6-8.9-21.7-8.9-14.3 1.2-9.6-5.6-12.1-15.1-2.5-8.3 1.7-1.7 7.4-25.9h25.6l1.2 3c5.8 13.9 32 13.5 32-7.1 0-19.1-23.6-21.3-30.4-9.8l-1.7 2.9c-4.7-0.4-26.5 1.8-26.9-2.3 0-10.3-7.7-17.7-9-37.7 6.7 0 12.9 0.5 18.2-4.7 5.3-4 6.3-4.5 8-3.4 12.7 7.9 33.4-9.6 21.3-25.4-9.5-12.5-31.4-5.7-30.4 11.2-0.4 12.3-14.3 11.3-23.3 11.3-4.8-4.3-9.6-8.9-15.2-12.1-8.9-4.7-2.6-7.7-12.6-21.7 11.2-13 22.3-26.1 33.5-39.1h40l2 3.2c10 15.8 35.5 5.4 30.5-13.1-4.8-18-24-15.5-30.5-4.8zm-84.2 59.5c6.4 7.1 8.3 15.9 5.5 25.2-1.5 5.1-8.2 12.6-13.3 14.9-14.8 6.7-2.7-13.1-13.5-13.1-4.8 0-5.6 2-4.1 10.1 1.1 6.4 0.4 12.6-0.5 19 2.8 0 8.7 1.8 10.5-0.2 0.3-0.5 1.8-4 4.1-4.4 21.3-3.4 27.1-26.6 28-26.6 2.1 0 24.8 17.7 13.8 37.2-6.5-1.8-21.6-21.7-24.8-7.4 0 3.7 22.3 19.3 21.5 26.5-1 9.3 5.3 9.7 7.9 7.1 1.3-1.3 1.6-3.3 1.4-10 1.4-31.4 10.3 28.3-1.6 22.5-6.4-5.6-20-8.6-24.8-5.4-3.9 2.5-4.2 10.6 3.8 9.1 7.5-1.4 15.7 3.3 19.2 11 6.5 14.3 2.4 30.5-9.1 35.7-17.5 7.9-2.6-46.6-54.6-12.9-5.9 5.2-7.2 8.1-4.8 10.6 3.8 2.7 27.5-9.9 32.5-11.9 12.3 5.4 14.8 35-7.5 42.6-12.4 4.2-25.4-1.4-31.4-13.4-2.3-4.5-2.3-5-2.6-49.3v-84c0.4-23.8 1-26.2 7.6-33.1 9.3-9.7 26-11.8 36.8 0.2zm-55.3 163.3c-0.1 5.9-9.8 17.8-24.5 17.8-16.2 0-41.9-21.7-10.9-53.5 6.7 7.1 11.7 16.1 19.9 21.6 7.5 4.7 10.5-1.9 8.1-5.6-1-1.5-10.4-12.7-16.6-19.1 0.1-6.2 0-13.1 0-19.3-0.7 0-8.7-0.2-9 0-0.3 0.3-0.5 6.1-0.5 10-0.9 9.4-21.7 8.8-25.2 34.6-1.4 9.9-16.6-1-19.1-9.4-1.5-5.2-1.5-16.4 0-21.6 3.3-10.9 17.3-15.3 21.2-16.4-2.1-2.5-4.8-4.9-5.9-8.1 0-3.8-17.3 9.8-18.6 7.8-9.4-14.6 2.1-52.8 1.1-22.2-0.3 8.2 0.7 10.2 5 10.2 3.6 0 4.9-2.4 4.2-7.6-0.6-4.3 8.7-25.5 21.1-25.5-4-19.2-24 14.8-27-0.7-3.6-18.7 15.7-30.2 16.5-30.2 0.5 0 5.3 15.4 17.5 22.5 7.8 4.6 16.2 7.4 25.2 7.4-3.8-25.1 4.9-28.9-4.2-28.9-9 0-1.8 17.9-11.8 14.5-14.2-4.9-20.9-22.1-13.8-35.6 11.6-22.2 42.9-14.1 44.8 0.6z" fill="#a11b1b"/><path id="path2" transform="translate(429.83 -2.2682)" d="m461.3 217.7c-20-1-19-0.4-19-10.1 0-4.4 0.4-7.8 0.8-7.5s11.1 0.8 23.8 1.1c27.9 0.8 26.9 1.1 26.9-9.7v-7.3h-17.5c-25.1 0-30.4-2.1-33.7-13.4-2.4-8.1-1.5-24.5 1.5-29.4 4.3-6.9 7.7-8.1 25.1-8.9 9.7-0.4 15.7-0.6 39 0.5v15.7h-18.9c-18.3 0-23.6 0.7-25.3 3.3-1.3 2-0.9 10.2 0.6 12.2 3.5 4.8 31.3-0.3 41.5 5.4 6.9 3.8 7.9 8.6 8.3 21.4 0.4 12.6-0.2 17.1-4.4 21.4-6.1 6.2-12.7 6.9-48.9 5.1zm78.9-0.7c0.5-22.6-0.3-45.2-0.4-67.8l-25.5 0.2v-17.2h72.5l0.6 16.4-25.6 0.6c-0.5 22.2 0.5 45.5-0.3 67.8-0.3 3.3-21.3 2.3-21.3 0z" fill="#fff"/></g></svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

+1
View File
@@ -0,0 +1 @@
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Minimax</title><path d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"></path></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

+2 -60
View File
@@ -1,60 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="8.2832384mm"
height="9.4351206mm"
viewBox="0 0 8.2832384 9.4351206"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:version="1.3 (0e150ed, 2023-07-21)"
sodipodi:docname="scale.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="1.0289025"
inkscape:cx="8.7471843"
inkscape:cy="8.2612296"
inkscape:window-width="1280"
inkscape:window-height="688"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" /><defs
id="defs1" /><g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-88.746886,-143.1532)"><g
id="g1"
transform="matrix(0.26458333,0,0,0.26458333,88.077577,143.1532)"><path
d="m 14.3423,8.42148 0.0218,-0.00723 2.1725,-0.51502 c 0.4642,-0.10879 0.8631,-0.40619 1.1025,-0.81965 l 0.5041,-0.87044 0.0146,-0.02902 0.0145,0.02902 0.5041,0.87044 c 0.2394,0.41346 0.6383,0.71086 1.1025,0.81965 l 2.1725,0.51502 0.0254,0.01087 H 21.9514 L 19.7789,8.94737 C 19.3147,9.0562 18.9158,9.35359 18.6764,9.76705 l -0.5041,0.87045 -0.0145,0.029 -0.0146,-0.029 -0.5041,-0.87045 C 17.3997,9.35359 17.0008,9.0562 16.5366,8.94737 L 14.3641,8.43239 14.3423,8.42512 Z"
id="path10" /><path
d="M 14.3423,2.245 14.3641,2.23775 16.5366,1.72274 C 17.0008,1.61393 17.3997,1.31653 17.6391,0.903078 L 18.1432,0.0290146 18.1578,0 18.1723,0.0290146 18.6764,0.899453 C 18.9158,1.31291 19.3147,1.61031 19.7789,1.71911 L 21.9514,2.23412 21.9768,2.245 H 21.9514 L 19.7789,2.76726 C 19.3147,2.87607 18.9158,3.17347 18.6764,3.58692 L 18.1723,4.45738 18.1578,4.48639 18.1432,4.45738 17.6391,3.58692 C 17.3997,3.17347 17.0008,2.87607 16.5366,2.76726 L 14.3641,2.25225 Z"
id="path11" /><path
d="M 18.183,15.7998 C 17.9328,13.7832 16.754,11.9807 14.9697,10.9507 11.749,9.03938 8.96364,8.82176 6.23265,6.73999 L 2.52967,8.79638 18.183,17.8344 33.8364,8.79638 30.1334,6.74359 c -2.731,2.08181 -5.5164,2.29943 -8.737,4.21071 -1.7844,1.0301 -2.9631,2.8326 -3.2134,4.8491 z"
id="path12" /><path
d="M 18.183,35.6603 C 17.824,35.653 17.4649,35.5551 17.1458,35.3701 L 2.52967,26.9269 V 8.79646 L 17.1458,17.236 c 0.3227,0.185 0.6782,0.2829 1.0372,0.2902 0.3591,-0.0073 0.7181,-0.1052 1.0373,-0.2902 L 33.8364,8.79646 V 26.9306 l -14.6161,8.4395 c -0.3228,0.185 -0.6782,0.2829 -1.0373,0.2902 z"
id="path13" /><path
d="m 18.183,35.6603 c 0.3591,-0.0073 0.7181,-0.1052 1.0373,-0.2902 l 14.616,-8.4395 V 8.79646 L 19.2203,17.236 c -0.3228,0.185 -0.6782,0.2829 -1.0373,0.2902"
id="path14" /><path
d="M 18.183,17.5262 C 17.824,17.5189 17.4649,17.421 17.1458,17.236 L 2.52967,8.79646 V 26.9306 l 14.61613,8.4395 c 0.3227,0.185 0.6782,0.2829 1.0372,0.2902"
id="path15" /><path
d="M 18.1831,17.5262 C 17.824,17.5189 17.465,17.421 17.1458,17.236 l -1.4507,-0.8378 v 18.1341 l 1.4507,0.8378 c 0.3228,0.185 0.6782,0.2829 1.0373,0.2902 0.359,-0.0073 0.7181,-0.1052 1.0372,-0.2902 l 1.4508,-0.8378 V 16.3946 l -1.4508,0.8378 c -0.3227,0.1849 -0.6782,0.2829 -1.0372,0.2901 z"
id="path16" /><path
d="M 9,5.32055 9.02174,5.31328 11.1942,4.79826 c 0.4643,-0.10879 0.8632,-0.40618 1.1026,-0.81964 l 0.5041,-0.87044 0.0145,-0.02902 0.0145,0.02902 0.5041,0.87044 c 0.2394,0.41346 0.6384,0.71085 1.1026,0.81964 l 2.1725,0.51502 0.0253,0.01087 H 16.6091 L 14.4366,5.84644 C 13.9724,5.95523 13.5734,6.25263 13.334,6.66609 L 12.8299,7.53653 12.8154,7.56555 12.8009,7.53653 12.2968,6.66609 C 12.0574,6.25263 11.6585,5.95523 11.1942,5.84644 L 9.02174,5.33142 9,5.32415 Z"
id="path17" /><path
d="m 19.6593,5.32055 0.0218,-0.00727 2.1724,-0.51502 c 0.4642,-0.10879 0.8632,-0.40618 1.1026,-0.81964 l 0.5041,-0.87044 0.0145,-0.02902 0.0145,0.02902 0.5042,0.87044 c 0.2393,0.41346 0.6383,0.71085 1.1025,0.81964 l 2.1724,0.51502 0.0255,0.01087 H 27.2683 L 25.0959,5.84644 C 24.6317,5.95523 24.2327,6.25263 23.9934,6.66609 L 23.4892,7.53653 23.4747,7.56555 23.4602,7.53653 22.9561,6.66609 C 22.7167,6.25263 22.3177,5.95523 21.8535,5.84644 L 19.6811,5.33142 19.6593,5.32415 Z"
id="path18" /></g></g></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="svg1" width="8.28mm" height="9.4349mm" version="1.1" viewBox="0 0 8.28 9.4349" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="path9" d="m4.14 0c-0.05 0.08-0.1 0.16-0.14 0.24-0.07 0.11-0.17 0.19-0.29 0.22-0.2 0.04-0.39 0.09-0.58 0.13 0.19 0.05 0.38 0.1 0.58 0.14 0.12 0.03 0.22 0.11 0.29 0.22 0.04 0.08 0.09 0.16 0.14 0.24 0.04-0.08 0.09-0.16 0.13-0.24 0.07-0.11 0.17-0.19 0.29-0.22 0.2-0.04 0.39-0.09 0.59-0.14-0.2-0.04-0.39-0.09-0.59-0.14-0.12-0.02-0.22-0.1-0.29-0.21-0.04-0.08-0.09-0.16-0.13-0.24zm-1.42 0.81c-0.04 0.08-0.09 0.16-0.14 0.24-0.06 0.11-0.16 0.19-0.29 0.22-0.19 0.05-0.38 0.09-0.58 0.14 0.19 0.05 0.39 0.09 0.58 0.14 0.12 0.03 0.23 0.11 0.29 0.22 0.05 0.08 0.09 0.16 0.14 0.24 0.05-0.09 0.09-0.17 0.14-0.25 0.06-0.11 0.17-0.18 0.29-0.21 0.19-0.05 0.39-0.1 0.58-0.14-0.19-0.05-0.39-0.09-0.58-0.14-0.12-0.03-0.23-0.11-0.29-0.22-0.05-0.08-0.09-0.16-0.14-0.24zm2.82 0c-0.04 0.08-0.09 0.16-0.14 0.24-0.06 0.11-0.16 0.19-0.29 0.22-0.19 0.05-0.38 0.09-0.58 0.14 0.19 0.05 0.39 0.09 0.58 0.14 0.12 0.03 0.23 0.11 0.29 0.22 0.05 0.08 0.09 0.16 0.14 0.24 0.05-0.09 0.09-0.17 0.14-0.25 0.06-0.11 0.17-0.18 0.29-0.21 0.19-0.05 0.39-0.1 0.58-0.14-0.19-0.05-0.39-0.09-0.58-0.14-0.12-0.03-0.23-0.11-0.29-0.22-0.05-0.08-0.09-0.16-0.14-0.24zm-1.4 0.83c-0.05 0.07-0.1 0.15-0.14 0.23-0.07 0.11-0.17 0.19-0.29 0.22-0.2 0.05-0.39 0.09-0.58 0.14 0.19 0.05 0.39 0.09 0.58 0.14 0.12 0.03 0.23 0.11 0.29 0.22 0.05 0.08 0.09 0.16 0.14 0.24 0.04-0.09 0.09-0.17 0.13-0.25 0.07-0.11 0.17-0.18 0.29-0.21 0.2-0.05 0.39-0.1 0.59-0.14-0.2-0.05-0.39-0.09-0.59-0.14-0.12-0.03-0.22-0.11-0.29-0.22-0.04-0.08-0.09-0.16-0.13-0.23zm-3.16 0.14-0.98 0.55v4.8c1.29 0.74 2.58 1.49 3.87 2.23 0.25 0.14 0.46 0.05 0.55 0 1.29-0.75 2.57-1.49 3.86-2.23v-4.8l-0.98-0.55c-1.11 0.86-2.96 0.79-3.16 2.4-0.2-1.61-2.04-1.55-3.16-2.4z"/></svg>

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

+6 -87
View File
@@ -1,88 +1,7 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="1280.000000pt" height="1217.000000pt" viewBox="0 0 1280.000000 1217.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.15, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,1217.000000) scale(0.100000,-0.100000)" stroke="none">
<path d="M7704 12160 c-84 -17 -256 -71 -307 -96 -186 -94 -274 -202 -399
-492 -32 -74 -72 -152 -90 -175 -80 -100 -141 -163 -211 -215 -41 -32 -145
-120 -232 -197 -228 -203 -324 -268 -491 -331 -160 -60 -436 -92 -899 -104
-428 -11 -478 -15 -585 -50 -499 -163 -1061 -520 -1543 -979 l-78 -75 -100 49
c-54 27 -99 52 -99 55 0 3 35 46 77 95 131 154 287 370 387 537 77 130 96 168
96 200 0 36 -2 38 -25 32 -15 -4 -39 0 -60 10 -29 14 -42 15 -77 5 -147 -39
-405 -230 -705 -523 -79 -76 -143 -136 -143 -132 0 3 37 49 81 102 45 54 132
165 195 248 64 86 132 166 159 186 95 72 107 84 129 129 13 25 33 91 45 146
12 55 29 120 38 144 22 59 11 76 -53 78 -27 0 -63 4 -80 8 -23 5 -44 0 -85
-20 -78 -39 -264 -232 -441 -455 -80 -102 -192 -243 -249 -315 -135 -171 -213
-258 -273 -306 -57 -46 -91 -50 -108 -14 -16 35 15 222 42 250 10 11 35 65 54
120 19 55 69 182 110 283 42 100 75 186 74 190 -1 4 4 25 11 46 14 39 12 113
-5 328 l-7 77 -72 6 c-80 8 -99 2 -153 -49 -101 -93 -192 -314 -302 -728 -110
-413 -138 -498 -195 -589 -13 -20 -79 -99 -145 -175 -206 -235 -338 -412 -628
-844 -188 -278 -318 -656 -353 -1020 -16 -171 -1 -459 33 -638 9 -50 15 -62
29 -60 11 2 31 -19 60 -62 60 -88 105 -118 205 -134 140 -22 189 -10 460 118
49 24 131 68 182 99 51 31 92 51 92 44 0 -7 -34 -185 -75 -396 l-74 -383 41
-67 c23 -36 53 -82 67 -101 l25 -35 -33 30 c-51 46 -34 16 56 -98 105 -132
471 -492 628 -618 130 -105 509 -381 670 -489 384 -257 905 -493 1135 -515 49
-4 137 -27 255 -65 192 -63 338 -106 475 -140 47 -11 92 -23 99 -26 23 -8 -73
-49 -282 -120 -492 -168 -840 -315 -1062 -447 -330 -197 -432 -274 -532 -403
-27 -35 -57 -53 -210 -124 -124 -57 -199 -86 -248 -95 -118 -21 -186 -60 -221
-127 -14 -28 -17 -124 -5 -168 4 -15 1 -43 -10 -70 -19 -51 -16 -70 11 -70 14
0 21 -10 25 -37 4 -21 12 -49 18 -63 21 -43 179 -193 257 -243 41 -27 134 -87
205 -133 209 -137 484 -268 770 -367 55 -19 163 -62 240 -94 77 -33 201 -81
275 -107 74 -27 191 -68 260 -93 179 -65 382 -113 721 -172 271 -47 301 -50
350 -40 36 8 116 10 239 6 276 -8 386 -41 584 -172 53 -35 153 -111 222 -169
145 -121 277 -222 384 -293 143 -96 584 -356 659 -390 42 -19 87 -40 101 -48
14 -7 41 -16 62 -20 45 -9 93 23 107 69 5 17 12 39 16 49 5 12 2 17 -8 17 -8
0 -29 21 -45 47 -30 46 -189 207 -322 326 l-65 59 63 -47 c34 -26 110 -92 168
-147 93 -89 129 -111 129 -82 0 5 4 16 9 23 7 11 -13 36 -81 100 -108 103
-189 162 -433 316 -185 117 -268 185 -336 277 -19 25 -39 60 -45 78 -10 27 -9
34 10 54 27 28 108 40 386 57 219 13 1193 2 1213 -13 27 -22 132 15 132 46 0
8 -16 33 -35 56 -19 23 -35 50 -35 60 0 18 -46 35 -55 19 -3 -4 -31 1 -63 12
-149 52 -318 76 -737 105 -235 16 -261 16 -435 1 -102 -10 -214 -17 -250 -17
-114 0 -360 70 -360 103 0 16 32 46 80 75 45 26 325 127 407 146 34 8 75 23
90 34 60 42 161 85 358 152 235 80 316 118 406 190 81 65 86 74 65 117 -9 18
-16 44 -16 57 l0 23 -162 -3 c-129 -1 -190 -7 -295 -28 -222 -44 -459 -119
-758 -238 -238 -95 -287 -112 -425 -144 -169 -38 -325 -50 -487 -36 -76 7
-160 18 -188 26 l-50 13 28 12 c16 6 30 11 32 11 12 0 345 143 470 202 332
157 506 266 675 420 l73 67 -12 55 c-7 31 -20 65 -29 76 -101 125 -621 -82
-1438 -572 -133 -80 -241 -138 -256 -138 -49 0 -615 99 -802 140 -252 56 -364
92 -411 135 -20 19 -45 37 -56 40 -21 7 -24 32 -6 56 22 29 245 92 467 133 47
8 213 36 370 61 476 76 694 134 917 244 131 65 236 136 357 244 45 40 140 120
211 178 161 132 280 255 324 339 33 62 34 65 28 156 -5 80 -10 102 -38 155
-31 58 -117 153 -186 206 -18 14 -116 65 -219 114 -243 116 -360 193 -504 333
-188 183 -293 261 -565 422 -82 48 -171 105 -198 125 l-47 38 42 5 c24 3 111
12 193 21 493 52 979 180 1545 407 263 106 500 246 735 435 126 101 364 329
502 482 101 111 328 407 426 556 40 61 57 80 53 60 -125 -518 -151 -1060 -65
-1343 25 -80 96 -214 139 -262 18 -19 27 -27 20 -17 -7 9 -10 17 -8 17 3 0 43
-25 89 -55 171 -113 412 -161 1029 -206 451 -32 470 -33 734 -14 271 19 415
17 541 -10 110 -23 118 -29 72 -51 -41 -20 -43 -23 -24 -47 10 -14 18 -14 53
-5 34 9 53 8 105 -6 90 -25 320 -118 479 -193 230 -110 431 -199 535 -238 124
-46 312 -95 385 -99 30 -2 83 -9 117 -17 61 -13 62 -13 65 -48 2 -30 7 -37 28
-39 51 -8 174 54 178 89 1 8 5 31 8 51 5 28 1 46 -16 72 -82 134 -460 330
-1014 527 -140 50 -173 65 -155 70 96 28 461 151 584 196 326 121 639 263 813
371 42 26 99 58 125 71 114 55 208 178 193 251 -9 45 -55 100 -101 121 -162
74 -676 -86 -1330 -413 -73 -37 -114 -53 -105 -42 8 11 56 66 105 124 50 58
110 130 135 160 65 82 184 203 275 280 76 64 84 74 145 194 54 107 65 136 68
190 6 87 -5 103 -73 111 -67 9 -106 -5 -219 -76 -219 -139 -550 -418 -1035
-873 l-223 -210 -114 38 c-63 20 -114 39 -114 40 0 2 14 34 31 72 18 38 61
139 96 224 36 85 80 191 98 235 19 44 41 121 50 170 9 50 25 132 36 183 10 51
19 108 19 128 0 45 -23 100 -48 113 -32 17 -92 13 -127 -9 -111 -69 -302 -428
-489 -918 -22 -56 -32 -72 -45 -68 -53 17 -275 68 -386 90 -242 47 -310 55
-500 60 -119 3 -209 10 -240 19 -107 30 -209 104 -164 119 16 5 -5 45 -43 80
-32 30 -33 46 -14 140 25 118 65 191 296 548 48 74 101 169 118 210 16 41 50
125 76 185 84 204 97 320 50 450 -40 112 -41 105 27 155 85 63 378 365 475
490 101 130 244 343 354 526 46 76 124 201 172 278 49 76 100 166 114 200 28
66 55 121 281 566 218 431 289 627 323 890 6 47 18 125 27 173 14 75 14 101 4
165 -19 128 -101 273 -210 375 -28 26 -51 50 -51 52 0 3 14 5 30 5 17 0 30 3
30 8 -1 22 -136 101 -289 167 -216 95 -278 115 -466 153 -304 63 -465 66 -712
13 -355 -76 -560 -80 -928 -16 -304 53 -410 63 -501 45z m2941 -1516 c-15 -49
-44 -132 -67 -184 -59 -140 -200 -441 -204 -437 -2 2 28 75 66 162 69 155 185
443 210 518 24 75 20 29 -5 -59z m-3225 -9228 c92 -8 187 -23 215 -32 l50 -18
-35 -7 c-87 -19 -329 -31 -406 -21 -443 60 -615 88 -588 94 48 12 586 0 764
-16z"/>
</g>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="svg1" width="1281.8pt" height="1215.8pt" preserveAspectRatio="xMidYMid" version="1.0" viewBox="0 0 1281.8 1215.8" xmlns="http://www.w3.org/2000/svg">
<metadata id="metadata1">Created by potrace 1.15, written by Peter Selinger 2001-2017</metadata>
<g id="g1" transform="matrix(.1 0 0 -.1 1.9156 1216.5)">
<path id="path1" d="m6998 11572c-96-258-333-414-533-587-370-329-494-412-1390-435-874 36-1595-534-2206-1104-62 39-142 56-199 104 0 9 262 294 464 632 74 121 192 285-66 247-417-111-1220-1151-572-305 100 137 564 539 318 683-471 46-1109-1370-1236-1102 23 505 514 977 207 1300-445 44-287-954-795-1541-1448-1651-1018-2700-654-2758 335-53 734 316 734 261 0-180-204-689-108-846 752-1155 2134-1636 3377-2057 99-35-1443-411-1876-970-121-157-587-192-679-346-256-719 2022-1610 3117-1657 812 100 1428-660 2088-1018 130-59 213-134 286 50-220 493-1110 853-956 1021 132 137 1731-15 1731 90 0 8-16 33-35 56-357 414-1665-11-1935 283 0 119 972 340 1341 597 121 97 56 186-113 194-574-4-1043-309-1478-410-184-41-447-69-725 3 83 35 240 88 530 225 448 212 563 317 748 487-10 44-16 92-41 131-101 125-621-82-1438-572-133-80-241-138-256-138-49 0-615 99-802 140-338 75-525 153-473 231 22 29 245 92 467 133 435 77 883 115 1287 305 216 102 386 272 568 422 257 211 446 400 314 650-170 319-510 265-909 653-388 377-556 379-810 585 78 10 157 17 235 26 2709 261 3344 2357 3261 1940-125-518-151-1060-65-1343 200-639 1746-555 2003-537 674 40 1167-320 1761-550 726-269 856-137 765 9-161 263-1223 582-1169 597 508 133 2142 769 1614 1010-297 136-1465-492-1435-455 91 57 965 1014 655 1059-597-178-1028-736-1477-1159-75 29-155 45-228 78 0 20 239 507 275 701 27 105 141 556-120 415-211-131-498-997-534-986-290 78-585 141-886 150-236-1-496 47-461 358 71 337 157 167 490 943 217 528-107 470 77 605 459 340 1060 1370 1115 1494 351 733 1106 1835 145 2401-1027 452-1067-31-2106 150-558 97-937 83-1207-543z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

+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

+736 -371
View File
File diff suppressed because it is too large Load Diff
+7 -1
View File
@@ -6,7 +6,13 @@
"moduleResolution": "node",
"allowUmdGlobalAccess": true,
"allowSyntheticDefaultImports": true,
"strictBindCallApply": true
"strictBindCallApply": true,
"baseUrl": ".",
"paths": {
"/*": [
"./*"
]
}
},
"exclude": [
"**/node_modules/**",
+11
View File
@@ -22,6 +22,9 @@ import morphdom from 'morphdom';
import { toggle as slideToggle } from 'slidetoggle';
import chalk from 'chalk';
import yaml from 'yaml';
import * as chevrotain from 'chevrotain';
import { gzipSync, gzip } from 'fflate';
import { sha256 } from 'js-sha256';
/**
* Expose the libraries to the 'window' object.
@@ -100,6 +103,10 @@ export default {
slideToggle,
chalk,
yaml,
chevrotain,
gzipSync,
gzip,
sha256,
};
export {
@@ -124,4 +131,8 @@ export {
slideToggle,
chalk,
yaml,
chevrotain,
gzipSync,
gzip,
sha256,
};
+24 -8
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "يجمع الرسائل المتتالية للنظام في رسالة واحدة (باستثناء الحوارات المثالية). قد يحسن التتابع لبعض النماذج.",
"Enable function calling": "تمكين استدعاء الوظيفة",
"Send inline images": "إرسال الصور المضمنة",
"image_inlining_hint_1": "يرسل الصور في المطالبات إذا كان النموذج يدعمها .",
"image_inlining_hint_1": "يرسل ملفات الوسائط في المطالبات إذا كان النموذج يدعمها .",
"image_inlining_hint_2": "الإجراء على أي رسالة أو",
"image_inlining_hint_3": "القائمة لإرفاق ملف صورة للدردشة.",
"Inline Image Quality": "جودة الصورة المضمنة",
@@ -328,7 +328,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (وضع التغليف لواجهة برمجة التطبيقات OpenAI)",
"Aphrodite API key": "مفتاح واجهة برمجة التطبيقات Aphrodite",
"Aphrodite Model": "نموذج أفروديت",
"ggerganov/llama.cpp": "ggerganov/llama.cpp (خادم إخراج)",
"ggml-org/llama.cpp": "ggml-org/llama.cpp (خادم إخراج)",
"Example: http://127.0.0.1:8080": "مثال: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "مثال: http://127.0.0.1:11434",
"Ollama Model": "نموذج Ollama",
@@ -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": "مصدر استكمال الدردشة",
@@ -394,7 +396,7 @@
"Available Models": "النماذج المتاحة",
"Prompt Post-Processing": "موجه بعد المعالجة",
"Applies additional processing to the prompt before sending it to the API.": "يطبق معالجة إضافية على الموجه قبل إرساله إلى واجهة برمجة التطبيقات.",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "تتحقق من اتصالك بواجهة برمجة التطبيقات من خلال إرسال رسالة اختبار قصيرة. كن على علم بأنك ستحصل على الفضل في ذلك!",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "يتحقق من اتصال API الخاص بك عن طريق إرسال رسالة اختبار قصيرة. قد يؤدي ذلك إلى فرض رسوم استخدام.",
"Test Message": "رسالة اختبار",
"Auto-connect to Last Server": "الاتصال التلقائي بآخر خادم",
"Missing key": "❌المفتاح مفقود",
@@ -605,7 +607,7 @@
"Model Icon": "أيقونة النموذج",
"Show sequential message numbers in the chat log": "إظهار أرقام الرسائل التسلسلية في سجل الدردشة",
"Message IDs": "معرفات الرسائل",
"Hide avatars in chat messages.": "إخفاء الصور الرمزية في رسائل الدردشة.",
"Hide avatars, only in chat messages.": "إخفاء الصور الرمزية في رسائل الدردشة.",
"Hide Chat Avatars": "إخفاء الصور الرمزية للدردشة",
"Show the number of tokens in each message in the chat log": "عرض عدد الرموز في كل رسالة في سجل الدردشة",
"Show Message Token Count": "عرض عدد الرموز في الرسالة",
@@ -739,8 +741,8 @@
"Filter": "تصفية",
"Automatically select a background based on the chat context": "تحديد خلفية تلقائيًا استنادًا إلى سياق الدردشة",
"Auto-select": "التحديد التلقائي",
"System Backgrounds": "خلفيات النظام",
"Chat Backgrounds": "خلفيات الدردشة",
"Global": "عالمي",
"Chat": "الدردشة",
"bg_chat_hint_1": "خلفيات الدردشة التي تم إنشاؤها باستخدام",
"bg_chat_hint_2": "سوف يظهر الامتداد هنا",
"Extensions": "امتدادات",
@@ -913,7 +915,7 @@
"Save": "حفظ",
"Chat History": "تاريخ الدردشة",
"Import Chat": "استيراد الدردشة",
"Copy to system backgrounds": "نسخ إلى خلفيات النظام",
"Copy to global backgrounds": "نسخ إلى الخلفيات العالمية",
"Rename background": "إعادة تسمية الخلفية",
"Lock": "قفل",
"Unlock": "الغاء القفل",
@@ -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} شخصية (شخصيات)…"
}
+24 -8
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Kombiniert aufeinanderfolgende Systemnachrichten zu einer (ausschließlich Beispiel-Dialoge ausgeschlossen). Kann die Kohärenz für einige Modelle verbessern.",
"Enable function calling": "Funktionsaufruf aktivieren",
"Send inline images": "Inline-Bilder senden",
"image_inlining_hint_1": "Sendet Bilder in Eingabeaufforderungen, wenn das Modell dies unterstützt.",
"image_inlining_hint_1": "Sendet Mediendateien in Eingabeaufforderungen, wenn das Modell dies unterstützt.",
"image_inlining_hint_2": "Aktion auf eine Nachricht oder die",
"image_inlining_hint_3": "Menü, um eine Bilddatei an den Chat anzuhängen.",
"Inline Image Quality": "Inline-Bildqualität",
@@ -328,7 +328,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Wrappermodus für OpenAI API)",
"Aphrodite API key": "Aphrodite API-Schlüssel",
"Aphrodite Model": "Aphrodite-Modell",
"ggerganov/llama.cpp": "ggerganov/llama.cpp (Output-Server)",
"ggml-org/llama.cpp": "ggml-org/llama.cpp (Output-Server)",
"Example: http://127.0.0.1:8080": "Beispiel: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "Beispiel: http://127.0.0.1:11434",
"Ollama Model": "Ollama-Modell",
@@ -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",
@@ -394,7 +396,7 @@
"Available Models": "Verfügbare Modelle",
"Prompt Post-Processing": "Zeitnahe Nachbearbeitung",
"Applies additional processing to the prompt before sending it to the API.": "Wendet zusätzliche Verarbeitungsvorgänge auf die Eingabeaufforderung an, bevor sie an die API gesendet wird.",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "Überprüft deine API-Verbindung durch Senden einer kurzen Testnachricht. Sei dir bewusst, dass du dafür gutgeschrieben wirst!",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "Überprüft deine API-Verbindung durch Senden einer kurzen Testnachricht. Dabei können Nutzungsgebühren anfallen.",
"Test Message": "Testnachricht",
"Auto-connect to Last Server": "Automatisch mit dem letzten Server verbinden",
"Missing key": "❌ Fehlender Schlüssel",
@@ -605,7 +607,7 @@
"Model Icon": "Modell-Icon",
"Show sequential message numbers in the chat log": "Zeige aufeinanderfolgende Nachrichtennummern im Chat-Log",
"Message IDs": "Nachrichten-IDs",
"Hide avatars in chat messages.": "Avatare in Chatnachrichten verbergen.",
"Hide avatars, only in chat messages.": "Avatare in Chatnachrichten verbergen.",
"Hide Chat Avatars": "Chat-Avatare ausblenden",
"Show the number of tokens in each message in the chat log": "Zeige die Anzahl der Tokens in jeder Nachricht im Chat-Log",
"Show Message Token Count": "Anzahl der Nachrichten-Token anzeigen",
@@ -739,8 +741,8 @@
"Filter": "Filter",
"Automatically select a background based on the chat context": "Automatisch einen Hintergrund basierend auf dem Chatkontext auswählen",
"Auto-select": "Automatische Auswahl",
"System Backgrounds": "Systemhintergründe",
"Chat Backgrounds": "Chat-Hintergründe",
"Global": "Global",
"Chat": "Chat",
"bg_chat_hint_1": "Chat-Hintergründe generiert mit dem",
"bg_chat_hint_2": "Die Erweiterung wird hier angezeigt.",
"Extensions": "Erweiterungen",
@@ -913,7 +915,7 @@
"Save": "Speichern",
"Chat History": "Chat-Verlauf",
"Import Chat": "Chat importieren",
"Copy to system backgrounds": "In Systemhintergründe kopieren",
"Copy to global backgrounds": "In globale Hintergründe kopieren",
"Rename background": "Hintergrund umbenennen",
"Lock": "Sperren",
"Unlock": "Freischalten",
@@ -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…"
}
+24 -8
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combina mensajes del sistema consecutivos en uno solo (excluyendo diálogos de ejemplo). Puede mejorar la coherencia para algunos modelos.",
"Enable function calling": "Habilitar llamada a función",
"Send inline images": "Enviar imágenes en línea",
"image_inlining_hint_1": "Envía imágenes en mensajes si el modelo lo admite.",
"image_inlining_hint_1": "Envía archivos multimedia en mensajes si el modelo lo admite.",
"image_inlining_hint_2": "acción sobre cualquier mensaje o el",
"image_inlining_hint_3": "menú para adjuntar un archivo de imagen al chat.",
"Inline Image Quality": "Calidad de imagen en línea",
@@ -328,7 +328,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Modo envolvente para API de OpenAI)",
"Aphrodite API key": "Clave de API de Aphrodite",
"Aphrodite Model": "Modelo Afrodita",
"ggerganov/llama.cpp": "ggerganov/llama.cpp (Servidor de salida)",
"ggml-org/llama.cpp": "ggml-org/llama.cpp (Servidor de salida)",
"Example: http://127.0.0.1:8080": "Ejemplo: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "Ejemplo: http://127.0.0.1:11434",
"Ollama Model": "Modelo Ollama",
@@ -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",
@@ -394,7 +396,7 @@
"Available Models": "Modelos disponibles",
"Prompt Post-Processing": "Postprocesamiento rápido",
"Applies additional processing to the prompt before sending it to the API.": "Aplica procesamiento adicional al mensaje antes de enviarlo a la API.",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "Verifica su conexión de API enviando un breve mensaje de prueba. ¡Tenga en cuenta que se le cobrará por ello!",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "Verifica su conexión API enviando un breve mensaje de prueba. Esto puede generar cargos de uso.",
"Test Message": "Mensaje de prueba",
"Auto-connect to Last Server": "Conexión automática al último servidor",
"Missing key": "❌ Llave faltante",
@@ -605,7 +607,7 @@
"Model Icon": "Ícono del Modelo",
"Show sequential message numbers in the chat log": "Mostrar números de mensaje secuenciales en el registro de chat",
"Message IDs": "IDs de Mensaje",
"Hide avatars in chat messages.": "Ocultar avatares en los mensajes de chat.",
"Hide avatars, only in chat messages.": "Ocultar avatares en los mensajes de chat.",
"Hide Chat Avatars": "Ocultar avatares de chat",
"Show the number of tokens in each message in the chat log": "Mostrar el número de tokens en cada mensaje en el registro de chat",
"Show Message Token Count": "Mostrar Conteo de Tokens en Mensaje",
@@ -739,8 +741,8 @@
"Filter": "Filtro",
"Automatically select a background based on the chat context": "Seleccionar automáticamente un fondo basado en el contexto del chat",
"Auto-select": "Auto-seleccionar",
"System Backgrounds": "Fondos del Sistema",
"Chat Backgrounds": "Fondos de Chat",
"Global": "Global",
"Chat": "Chat",
"bg_chat_hint_1": "Fondos de chat generados con el",
"bg_chat_hint_2": "La extensión aparecerá aquí.",
"Extensions": "Extensiones",
@@ -913,7 +915,7 @@
"Save": "Guardar",
"Chat History": "Historial de chat",
"Import Chat": "Importar chat",
"Copy to system backgrounds": "Copiar a fondos del sistema",
"Copy to global backgrounds": "Copiar a fondos globales",
"Rename background": "Cambiar nombre de fondo",
"Lock": "Cerrar",
"Unlock": "desbloquear",
@@ -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)…"
}
+31 -13
View File
@@ -227,7 +227,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combine les messages système consécutifs en un seul (à l'exclusion des dialogues d'exemple). Peut améliorer la cohérence pour certains modèles.",
"Enable function calling": "Activer l'appel de fonction",
"Send inline images": "Envoyer des images en ligne",
"image_inlining_hint_1": "Envoie des images dans les prompts si le modèle le prend en charge.",
"image_inlining_hint_1": "Envoie des fichiers multimédias dans les prompts si le modèle le prend en charge.",
"image_inlining_hint_2": "action sur n'importe quel message ou le",
"image_inlining_hint_3": "menu pour joindre un fichier image au chat.",
"Inline Image Quality": "Qualité d'image en ligne",
@@ -290,6 +290,8 @@
"View Remaining Credits": "Afficher les crédits restants",
"OpenRouter Model": "Modèle OpenRouter",
"Model Providers": "Fournisseurs de modèles",
"Model Quantizations": "Quantifications du modèle",
"Select quantizations. No selection = all quantizations.": "Sélectionnez les quantifications. Aucune sélection = toutes les quantifications.",
"InfermaticAI API Key": "Clé API InfermaticAI",
"InfermaticAI Model": "Modèle InfermaticAI",
"DreamGen API key": "Clé API DreamGen",
@@ -309,7 +311,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (mode wrapper pour l'API OpenAI)",
"Aphrodite API key": "Clé API Aphrodite",
"Aphrodite Model": "Modèle Aphrodite",
"ggerganov/llama.cpp": "ggerganov/llama.cpp",
"ggml-org/llama.cpp": "ggml-org/llama.cpp",
"Example: http://127.0.0.1:8080": "Exemple : http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "Exemple : http://127.0.0.1:11434",
"Ollama Model": "Modèle Ollama",
@@ -318,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",
@@ -372,7 +376,7 @@
"Available Models": "Modèles disponibles",
"Prompt Post-Processing": "Post-traitement de prompt",
"Applies additional processing to the prompt before sending it to the API.": "Applique un traitement supplémentaire au prompt avant de l'envoyer à l'API.",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "Vérifie votre connexion API en envoyant un court message de test. Soyez conscient que vous serez crédité pour cela !",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "Vérifie votre connexion API en envoyant un court message de test. Cela peut entraîner des frais d'utilisation.",
"Test Message": "Message de test",
"Auto-connect to Last Server": "Connexion automatique au dernier serveur",
"Missing key": "❌ Clé manquante",
@@ -554,7 +558,7 @@
"Model Icon": "Icône du modèle",
"Show sequential message numbers in the chat log": "Afficher les numéros de message séquentiels dans le journal de discussion",
"Message IDs": "Identifiants du message",
"Hide avatars in chat messages.": "Masquez les avatars dans les messages de discussion.",
"Hide avatars, only in chat messages.": "Masquez les avatars dans les messages de discussion.",
"Hide Chat Avatars": "Masquer les avatars du chat",
"Show the number of tokens in each message in the chat log": "Afficher le nombre de tokens dans chaque message dans le journal de discussion",
"Show Message Token Count": "Afficher le nombre de tokens du message",
@@ -684,8 +688,8 @@
"Filter": "Filtre",
"Automatically select a background based on the chat context": "Sélectionner automatiquement un arrière-plan en fonction du contexte de la discussion",
"Auto-select": "Sélection automatique",
"System Backgrounds": "Arrière-plans du système",
"Chat Backgrounds": "Arrière-plans de la discussion",
"Global": "Global",
"Chat": "Discussion",
"bg_chat_hint_1": "Les arrière-plans générés avec l'extension ",
"bg_chat_hint_2": " apparaîtrons ici.",
"Extensions": "Extensions",
@@ -713,7 +717,7 @@
"Click to set a new User Name": "Cliquez pour définir un nouveau nom d'utilisateur",
"Click to lock your selected persona to the current chat. Click again to remove the lock.": "Cliquez pour verrouiller votre persona sélectionnée sur la discussion actuelle. Cliquez à nouveau pour supprimer le verrou.",
"Click to set user name for all messages": "Cliquez pour définir le nom d'utilisateur pour tous les messages",
"Persona Description": "Description de la persona",
"Persona Description": "Description du persona",
"Example: [{{user}} is a 28-year-old Romanian cat girl.]": "Exemple : [{{user}} est une fille chat roumaine de 28 ans.]",
"Tokens persona description": "Description des tokens",
"Position:": "Position :",
@@ -856,7 +860,7 @@
"Save": "Enregistrer",
"Chat History": "Historique de la conversation",
"Import Chat": "Importer une discussion",
"Copy to system backgrounds": "Copier vers les arrière-plans du système",
"Copy to global backgrounds": "Copier vers les arrière-plans globaux",
"Rename background": "Renommer l'arrière-plan",
"Lock": "Verrouiller",
"Unlock": "Déverrouiller",
@@ -1514,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",
@@ -2010,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.",
@@ -2044,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)…"
}
+24 -8
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Sameinar samhliða kerfisskilaboð í eitt (sem er utan umsagna dæmum). Getur bætt samfelldni fyrir sumar módel.",
"Enable function calling": "Virkja aðgerðarkall",
"Send inline images": "Senda myndir í línu",
"image_inlining_hint_1": "Sendir myndir í skilaboðum ef líkanið styður það.",
"image_inlining_hint_1": "Sendir margmiðlunarskrár í skilaboðum ef líkanið styður það.",
"image_inlining_hint_2": "aðgerð á hvaða skilaboðum sem er eða",
"image_inlining_hint_3": "valmynd til að hengja myndskrá við spjallið.",
"Inline Image Quality": "Innbyggð myndgæði",
@@ -326,7 +326,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (OpenAI forritunargrensl)",
"Aphrodite API key": "Aphrodite API lykill",
"Aphrodite Model": "Afródíta fyrirmynd",
"ggerganov/llama.cpp": "ggerganov/llama.cpp (úttak þjónn)",
"ggml-org/llama.cpp": "ggml-org/llama.cpp (úttak þjónn)",
"Example: http://127.0.0.1:8080": "Dæmi: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "Dæmi: http://127.0.0.1:11434",
"Ollama Model": "Ollama módel",
@@ -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",
@@ -392,7 +394,7 @@
"Available Models": "Módel í boði",
"Prompt Post-Processing": "Skjót eftirvinnsla",
"Applies additional processing to the prompt before sending it to the API.": "Beitir viðbótarvinnslu á boðunina áður en hún er send í API.",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "Sannreynir API tengingu þína með því að senda stutt skilaboð til að prófa. Vertu meðvituð(ur/ur) um að þú færð fyrir það!",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "Staðfestir API tenginguna þína með því að senda stutt prufuskilaboð. Þetta gæti haft afnotagjöld í för með sér.",
"Test Message": "Prufu skilaboð",
"Auto-connect to Last Server": "Tengjast sjálfkrafa við síðustu framendurnar",
"Missing key": "❌ Vantar lykil",
@@ -603,7 +605,7 @@
"Model Icon": "Módel Tákn",
"Show sequential message numbers in the chat log": "Sýna röðuð skilaboðanúmer í spjall skránni",
"Message IDs": "Skilaboðaauðkenni",
"Hide avatars in chat messages.": "Fela avatar í spjallskilaboðum.",
"Hide avatars, only in chat messages.": "Fela avatar í spjallskilaboðum.",
"Hide Chat Avatars": "Fela spjallmyndir",
"Show the number of tokens in each message in the chat log": "Sýna fjölda tákn í hverju skilaboði í spjall skránni",
"Show Message Token Count": "Sýna fjölda tákn í skilaboðum",
@@ -737,8 +739,8 @@
"Filter": "Sía",
"Automatically select a background based on the chat context": "Velja sjálfkrafa bakgrunn út frá samhengi spjallsins",
"Auto-select": "Sjálfval",
"System Backgrounds": "Kerfis bakgrunnsmyndir",
"Chat Backgrounds": "Bakgrunnsmyndir spjalls",
"Global": "Almennt",
"Chat": "Spjall",
"bg_chat_hint_1": "Spjallbakgrunnur myndaður með",
"bg_chat_hint_2": "viðbót mun birtast hér.",
"Extensions": "Viðbætur",
@@ -911,7 +913,7 @@
"Save": "Vista",
"Chat History": "Spjall saga",
"Import Chat": "Flytja inn spjall",
"Copy to system backgrounds": "Afritaðu í kerfisbakgrunn",
"Copy to global backgrounds": "Afritaðu í alþjóðlegan bakgrunn",
"Rename background": "Endurnefna bakgrunn",
"Lock": "Læsa",
"Unlock": "Opnaðu",
@@ -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)…"
}
+24 -8
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combina i messaggi di sistema consecutivi in uno solo (escludendo i dialoghi di esempio). Potrebbe migliorare la coerenza per alcuni modelli.",
"Enable function calling": "Abilita la chiamata alla funzione",
"Send inline images": "Invia immagini inline",
"image_inlining_hint_1": "Invia immagini nei prompt se il modello lo supporta.",
"image_inlining_hint_1": "Invia file multimediali nei prompt se il modello lo supporta.",
"image_inlining_hint_2": "azione su qualsiasi messaggio o il",
"image_inlining_hint_3": "menu per allegare un file immagine alla chat.",
"Inline Image Quality": "Qualità dell'immagine in linea",
@@ -328,7 +328,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Modalità wrapper per l'API OpenAI)",
"Aphrodite API key": "Chiave API di Aphrodite",
"Aphrodite Model": "Modello di Afrodite",
"ggerganov/llama.cpp": "ggerganov/llama.cpp (Server di output)",
"ggml-org/llama.cpp": "ggml-org/llama.cpp (Server di output)",
"Example: http://127.0.0.1:8080": "Esempio: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "Esempio: http://127.0.0.1:11434",
"Ollama Model": "Modello Ollama",
@@ -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",
@@ -394,7 +396,7 @@
"Available Models": "Modelli disponibili",
"Prompt Post-Processing": "Post-elaborazione rapida",
"Applies additional processing to the prompt before sending it to the API.": "Applica un'ulteriore elaborazione al prompt prima di inviarlo all'API.",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "Verifica la tua connessione API inviando un breve messaggio di prova. Tieni presente che verrai accreditato per questo!",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "Verifica la tua connessione API inviando un breve messaggio di prova. Ciò potrebbe comportare costi di utilizzo.",
"Test Message": "Messaggio di prova",
"Auto-connect to Last Server": "Connetti automaticamente all'ultimo server",
"Missing key": "❌ Chiave mancante",
@@ -605,7 +607,7 @@
"Model Icon": "Icona del modello",
"Show sequential message numbers in the chat log": "Mostra numeri di messaggi sequenziali nel registro della chat",
"Message IDs": "ID Messaggio",
"Hide avatars in chat messages.": "Nascondi gli avatar nei messaggi di chat.",
"Hide avatars, only in chat messages.": "Nascondi gli avatar nei messaggi di chat.",
"Hide Chat Avatars": "Nascondi avatar di chat",
"Show the number of tokens in each message in the chat log": "Mostra il numero di token in ogni messaggio nel registro della chat",
"Show Message Token Count": "Mostra Conteggio Token Messaggio",
@@ -739,8 +741,8 @@
"Filter": "Filtro",
"Automatically select a background based on the chat context": "Seleziona automaticamente uno sfondo in base al contesto della chat",
"Auto-select": "Selezione automatica",
"System Backgrounds": "Sfondi di sistema",
"Chat Backgrounds": "Sfondi Chat",
"Global": "Globale",
"Chat": "Chat",
"bg_chat_hint_1": "Sfondi chat generati con",
"bg_chat_hint_2": "l'estensione apparirà qui.",
"Extensions": "Estensioni",
@@ -913,7 +915,7 @@
"Save": "Salva",
"Chat History": "Cronologia Chat",
"Import Chat": "Importa chat",
"Copy to system backgrounds": "Copia negli sfondi di sistema",
"Copy to global backgrounds": "Copia negli sfondi globali",
"Rename background": "Rinominare lo sfondo",
"Lock": "Serratura",
"Unlock": "Sbloccare",
@@ -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…"
}
+24 -8
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "連続するシステムメッセージを1つに結合します(例のダイアログを除く)。一部のモデルの一貫性を向上させる可能性があります。",
"Enable function calling": "関数呼び出しを有効にする",
"Send inline images": "インライン画像を送信",
"image_inlining_hint_1": "モデルがサポートしている場合、プロンプトで画像を送信します。",
"image_inlining_hint_1": "モデルがサポートしている場合、プロンプトでメディアファイルを送信します。",
"image_inlining_hint_2": "メッセージに対するアクションまたは",
"image_inlining_hint_3": "チャットに画像ファイルを添付するためのメニュー。",
"Inline Image Quality": "インライン画像品質",
@@ -328,7 +328,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine(OpenAI APIエンドポイントのパッケージングモード)",
"Aphrodite API key": "アフロディーテAPIキー",
"Aphrodite Model": "アフロディーテモデル",
"ggerganov/llama.cpp": "ggerganov/llama.cpp(出力サーバー)",
"ggml-org/llama.cpp": "ggml-org/llama.cpp(出力サーバー)",
"Example: http://127.0.0.1:8080": "例: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "例: http://127.0.0.1:11434",
"Ollama Model": "Ollamaモデル",
@@ -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": "チャット補完ソース",
@@ -394,7 +396,7 @@
"Available Models": "利用可能なモデル",
"Prompt Post-Processing": "迅速な後処理",
"Applies additional processing to the prompt before sending it to the API.": "プロンプトを API に送信する前に追加の処理を適用します。",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "短いテストメッセージを送信してAPI接続を検証します。それに対してクレジットが与えられることに注意してください!",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "短いテストメッセージを送信してAPI接続を検証します。これにより利用料金が発生する場合があります。",
"Test Message": "テストメッセージ",
"Auto-connect to Last Server": "前回のサーバーに自動接続",
"Missing key": "❌ キーがありません",
@@ -605,7 +607,7 @@
"Model Icon": "モデルアイコン",
"Show sequential message numbers in the chat log": "チャットログに連続したメッセージ番号を表示する",
"Message IDs": "メッセージID",
"Hide avatars in chat messages.": "チャットメッセージ内のアバターを非表示にします。",
"Hide avatars, only in chat messages.": "チャットメッセージ内のアバターを非表示にします。",
"Hide Chat Avatars": "チャットアバターを非表示",
"Show the number of tokens in each message in the chat log": "チャットログ内の各メッセージのトークン数を表示する",
"Show Message Token Count": "メッセージトークンの数を表示",
@@ -739,8 +741,8 @@
"Filter": "フィルター",
"Automatically select a background based on the chat context": "チャットのコンテキストに基づいて背景を自動選択",
"Auto-select": "自動選択",
"System Backgrounds": "システムの背景",
"Chat Backgrounds": "チャットの背景",
"Global": "グローバル",
"Chat": "チャット",
"bg_chat_hint_1": "",
"bg_chat_hint_2": "拡張機能で生成したチャットの背景はここに表示されます。",
"Extensions": "拡張機能",
@@ -913,7 +915,7 @@
"Save": "保存",
"Chat History": "チャット履歴",
"Import Chat": "チャットをインポート",
"Copy to system backgrounds": "システム背景にコピー",
"Copy to global backgrounds": "グローバル背景にコピー",
"Rename background": "背景の名前を変更",
"Lock": "ロック",
"Unlock": "ロック解除",
@@ -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}人のキャラクターを削除中…"
}
+25 -9
View File
@@ -237,7 +237,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "연속된 시스템 메시지를 하나로 결합합니다(예제 대화 제외). 일부 모델의 일관성을 향상시킬 수 있습니다.",
"Enable function calling": "함수 호출 활성화",
"Send inline images": "인라인 이미지 전송",
"image_inlining_hint_1": "모델이 지원하는 경우 메시지로 이미지를 보냅니다.",
"image_inlining_hint_1": "모델이 지원하는 경우 메시지로 미디어 파일을 보냅니다.",
"Inline Image Quality": "인라인 이미지 품질",
"openai_inline_image_quality_auto": "자동",
"openai_inline_image_quality_low": "낮은",
@@ -328,7 +328,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (OpenAI API의 래퍼 모드)",
"Aphrodite API key": "Aphrodite API 키",
"Aphrodite Model": "Aphrodite 모델",
"ggerganov/llama.cpp": "ggerganov/llama.cpp (출력 서버)",
"ggml-org/llama.cpp": "ggml-org/llama.cpp (출력 서버)",
"Example: http://127.0.0.1:8080": "예: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "예: http://127.0.0.1:11434",
"Ollama Model": "Ollama 모델",
@@ -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": "상태 확인 우회",
@@ -402,7 +404,7 @@
"Prompt Post-Processing": "신속한 후처리",
"api_no_connection": "연결이 되지 않았습니다...",
"Applies additional processing to the prompt before sending it to the API.": "API로 보내기 전에 프롬프트에 추가 처리를 적용합니다.",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "짧은 테스트 메시지를 보내어 API 연결을 확인합니다. 이에 대해 유료 크레딧이 지불될 수 있음을 인식하세요!",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "짧은 테스트 메시지를 보내 API 연결을 확인합니다. 이로 인해 사용 요금이 부과될 수 있습니다.",
"Test Message": "테스트 메시지",
"Auto-connect to Last Server": "마지막 서버에 자동으로 연결",
"Missing key": "❌ 현재 저장된 키가 존재하지 않습니다.",
@@ -613,7 +615,7 @@
"Model Icon": "모델 아이콘 표시",
"Show sequential message numbers in the chat log": "채팅 로그에 순차적인 메시지 번호 표시",
"Message IDs": "메시지 ID",
"Hide avatars in chat messages.": "채팅 메시지에서 아바타 숨김.",
"Hide avatars, only in chat messages.": "채팅 메시지에서 아바타 숨김.",
"Hide Chat Avatars": "캐릭터 프로필 숨기기",
"Show the number of tokens in each message in the chat log": "채팅 로그의 각 메시지에 토큰 수 표시",
"Show Message Token Count": "메시지 토큰 개수 표시",
@@ -752,8 +754,8 @@
"Filter": "필터",
"Automatically select a background based on the chat context": "채팅 컨텍스트를 기반으로 자동으로 배경 선택",
"Auto-select": "자동 선택",
"System Backgrounds": "시스템 배경",
"Chat Backgrounds": "채팅 배경",
"Global": "글로벌",
"Chat": "채팅",
"bg_chat_hint_1": "다음으로 생성된 채팅 배경",
"bg_chat_hint_2": "확장 프로그램이 여기에 표시됩니다.",
"Extensions": "확장",
@@ -927,7 +929,7 @@
"Save": "저장",
"Chat History": "채팅 기록",
"Import Chat": "채팅 가져오기",
"Copy to system backgrounds": "시스템 배경에 복사",
"Copy to global backgrounds": "글로벌 배경에 복사",
"Rename background": "배경 이름 바꾸기",
"Lock": "잠금",
"Unlock": "잠금 해제",
@@ -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}개 캐릭터 삭제 중…"
}
+24 -8
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combineert opeenvolgende systeemberichten tot één (exclusief voorbeeld dialogen). Kan de coherentie verbeteren voor sommige modellen.",
"Enable function calling": "Schakel functieaanroepen in",
"Send inline images": "Inline afbeeldingen verzenden",
"image_inlining_hint_1": "Verzendt afbeeldingen in prompts als het model dit ondersteunt.",
"image_inlining_hint_1": "Verzendt mediabestanden in prompts als het model dit ondersteunt.",
"Inline Image Quality": "Inline-beeldkwaliteit",
"openai_inline_image_quality_auto": "Auto",
"openai_inline_image_quality_low": "Laag",
@@ -324,7 +324,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Wrappermodus voor OpenAI API)",
"Aphrodite API key": "Aphrodite API-sleutel",
"Aphrodite Model": "Aphrodite-model",
"ggerganov/llama.cpp": "ggerganov/llama.cpp (Output-server)",
"ggml-org/llama.cpp": "ggml-org/llama.cpp (Output-server)",
"Example: http://127.0.0.1:8080": "Voorbeeld: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "Voorbeeld: http://127.0.0.1:11434",
"Ollama Model": "Ollama-model",
@@ -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",
@@ -390,7 +392,7 @@
"Available Models": "Beschikbare modellen",
"Prompt Post-Processing": "Snelle naverwerking",
"Applies additional processing to the prompt before sending it to the API.": "Past extra verwerking toe op de prompt voordat deze naar de API wordt verzonden.",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "Verifieert uw API-verbinding door een kort testbericht te verzenden. Wees ervan bewust dat u hiervoor wordt gecrediteerd!",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "Verifieert uw API-verbinding door een kort testbericht te verzenden. Hiervoor kunnen gebruikskosten in rekening worden gebracht.",
"Test Message": "Testbericht",
"Auto-connect to Last Server": "Automatisch verbinden met de laatste server",
"Missing key": "❌ Ontbrekende sleutel",
@@ -601,7 +603,7 @@
"Model Icon": "Modelpictogram",
"Show sequential message numbers in the chat log": "Toon opeenvolgende berichtnummers in het chatlogboek",
"Message IDs": "Bericht-IDs",
"Hide avatars in chat messages.": "Verberg avatars in chatberichten.",
"Hide avatars, only in chat messages.": "Verberg avatars in chatberichten.",
"Hide Chat Avatars": "Chatavatars verbergen",
"Show the number of tokens in each message in the chat log": "Toon het aantal tokens in elk bericht in het chatlogboek",
"Show Message Token Count": "Toon bericht token tellen",
@@ -735,8 +737,8 @@
"Filter": "Filter",
"Automatically select a background based on the chat context": "Automatisch een achtergrond selecteren op basis van de chatcontext",
"Auto-select": "Automatisch selecteren",
"System Backgrounds": "Systeemachtergronden",
"Chat Backgrounds": "Achtergronden chat",
"Global": "Globaal",
"Chat": "Chat",
"bg_chat_hint_1": "Chatachtergronden gegenereerd met de",
"bg_chat_hint_2": "extensie zal hier verschijnen.",
"Extensions": "Uitbreidingen",
@@ -909,7 +911,7 @@
"Save": "Opslaan",
"Chat History": "Chatgeschiedenis",
"Import Chat": "Chat importeren",
"Copy to system backgrounds": "Kopiëren naar systeemachtergronden",
"Copy to global backgrounds": "Kopiëren naar globale achtergronden",
"Rename background": "Achtergrond hernoemen",
"Lock": "Slot",
"Unlock": "Ontgrendelen",
@@ -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…"
}
+24 -8
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combina mensagens do sistema consecutivas em uma (excluindo diálogos de exemplo). Pode melhorar a coerência para alguns modelos.",
"Enable function calling": "Habilitar chamada de função",
"Send inline images": "Enviar imagens inline",
"image_inlining_hint_1": "Envia imagens em prompts se o modelo suportar.",
"image_inlining_hint_1": "Envia ficheiros multimédia em prompts se o modelo suportar.",
"Inline Image Quality": "Qualidade de imagem embutida",
"openai_inline_image_quality_auto": "Auto",
"openai_inline_image_quality_low": "Baixo",
@@ -326,7 +326,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Modo Wrapper para API OpenAI)",
"Aphrodite API key": "Chave da API Aphrodite",
"Aphrodite Model": "Modelo Afrodite",
"ggerganov/llama.cpp": "ggerganov/llama.cpp (Servidor de Saída)",
"ggml-org/llama.cpp": "ggml-org/llama.cpp (Servidor de Saída)",
"Example: http://127.0.0.1:8080": "Exemplo: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "Exemplo: http://127.0.0.1:11434",
"Ollama Model": "Modelo Ollama",
@@ -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",
@@ -392,7 +394,7 @@
"Available Models": "Modelos Disponíveis",
"Prompt Post-Processing": "Pós-processamento imediato",
"Applies additional processing to the prompt before sending it to the API.": "Aplica processamento adicional ao prompt antes de enviá-lo para a API.",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "Verifica sua conexão com a API enviando uma mensagem de teste curta. Esteja ciente de que você será creditado por isso!",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "Verifica a ligação à API ao enviar uma mensagem de teste curta. Isto pode implicar custos de utilização.",
"Test Message": "Mensagem de Teste",
"Auto-connect to Last Server": "Conectar-se automaticamente ao último servidor",
"Missing key": "❌ Chave faltando",
@@ -603,7 +605,7 @@
"Model Icon": "Ícone do Modelo",
"Show sequential message numbers in the chat log": "Mostrar números sequenciais de mensagem no registro de chat",
"Message IDs": "IDs de Mensagem",
"Hide avatars in chat messages.": "Oculte avatares em mensagens de bate-papo.",
"Hide avatars, only in chat messages.": "Oculte avatares em mensagens de bate-papo.",
"Hide Chat Avatars": "Ocultar avatares de bate-papo",
"Show the number of tokens in each message in the chat log": "Mostrar o número de tokens em cada mensagem no registro de chat",
"Show Message Token Count": "Mostrar Contagem de Tokens da Mensagem",
@@ -737,8 +739,8 @@
"Filter": "Filtro",
"Automatically select a background based on the chat context": "Selecionar automaticamente um plano de fundo com base no contexto do chat",
"Auto-select": "Seleção automática",
"System Backgrounds": "Fundos do Sistema",
"Chat Backgrounds": "Fundos de Chat",
"Global": "Global",
"Chat": "Chat",
"bg_chat_hint_1": "Planos de fundo de bate-papo gerados com o",
"bg_chat_hint_2": "a extensão aparecerá aqui.",
"Extensions": "Extensões",
@@ -911,7 +913,7 @@
"Save": "Salvar",
"Chat History": "Histórico de Chat",
"Import Chat": "Importar bate-papo",
"Copy to system backgrounds": "Copiar para planos de fundo do sistema",
"Copy to global backgrounds": "Copiar para planos de fundo globais",
"Rename background": "Renomear plano de fundo",
"Lock": "Trancar",
"Unlock": "Desbloquear",
@@ -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)…"
}
+26 -12
View File
@@ -108,7 +108,7 @@
"Register": "Зарегистрироваться",
"TogetherAI Model": "Модель TogetherAI",
"Example: http://127.0.0.1:5001": "Пример: http://127.0.0.1:5001",
"ggerganov/llama.cpp": "ggerganov/llama.cpp (сервер вывода)",
"ggml-org/llama.cpp": "ggml-org/llama.cpp (сервер вывода)",
"Example: http://127.0.0.1:8080": "Пример: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "Пример: http://127.0.0.1:11434",
"Ollama Model": "Модель Ollama",
@@ -244,7 +244,6 @@
"Always include examples": "Всегда применять примеры",
"Never include examples": "Никогда не применять примеры",
"Forbid External Media": "Запрет внешних медиа",
"System Backgrounds": "Системные фоны",
"Name": "Имя",
"Auto-connect": "Подключаться автоматически",
"First message": "Первое сообщение",
@@ -350,7 +349,7 @@
"Minimum number of blacklisted words detected to trigger an auto-swipe": "Минимальное количество обнаруженных запрещённых слов, при котором срабатывает авто-свайп.",
"User Message Blur Tint": "Ваши сообщения",
"AI Message Blur Tint": "Сообщения ИИ",
"Chat Backgrounds": "Фоны чата",
"Chat": "Чат",
"Chat Background": "Фон чата",
"UI Background": "Фон UI",
"Mad Lab Mode": "Режим безумца",
@@ -515,7 +514,7 @@
"Clear your API key": "Стереть ключ от API",
"Refresh models": "Обновить модели",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Получите свой OpenRouter API токен используя OAuth. У вас будет открыта вкладка openrouter.ai",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "Проверка работоспособности вашего соединения с API путём отправки короткого тестового сообщения. Внимание: оно будет отправлено от вашего имени.",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "Проверяет соединение с API, отправляя короткое тестовое сообщение. Это может повлечь плату за использование.",
"Edit": "Редактировать",
"Locked = World Editor will stay open": "Закреплено = Редактор мира останется открытым",
"Entries can activate other entries by mentioning their keywords": "Записи могут активировать другие записи, если в них содержатся ключевые слова",
@@ -759,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": "Введите сообщение, или /? для получения справки",
@@ -1020,7 +1021,7 @@
"The prompt to be sent.": "Текст промпта.",
"prompt_manager_forbid_overrides": "Запретить перезапись",
"This prompt cannot be overridden by character cards, even if overrides are preferred.": "Карточка персонажа не сможет перезаписать этот промпт, даже если настройки отдают приоритет именно ей.",
"image_inlining_hint_1": "Отправлять картинки как часть промпта, если позволяет модель.",
"image_inlining_hint_1": "Отправлять медиафайлы как часть промпта, если позволяет модель.",
"Contest Winners": "Победители конкурса",
"Rename Background": "Переименовать фон",
"Lock": "Закрепить",
@@ -1046,7 +1047,7 @@
"openai_inline_image_quality_high": "Высокое",
"Assistant Impersonation Prefill": "Префилл для ассистента при перевоплощении",
"Hide Chat Avatars": "Не показывать аватарки в чате",
"Hide avatars in chat messages.": "Скрыть аватарки сбоку от сообщений в чате",
"Hide avatars, only in chat messages.": "Скрыть аватарки сбоку от сообщений в чате",
"Flat": "Стандартный",
"Toggle character info panel": "Показать / скрыть инфо-панель",
"(For Chat Completion and Instruct Mode)": "(для Chat Completion и режима Instruct)",
@@ -1326,7 +1327,7 @@
"Auto Mode delay": "Auto Mode delay",
"Bulk_edit_characters": "Bulk edit characters\r\rClick to toggle characters\rShift + Click to select/deselect a range of characters\rRight-click for actions",
"Bulk select all characters": "Bulk select all characters",
"Copy to system backgrounds": "Copy to system backgrounds",
"Copy to global backgrounds": "Скопировать в глобальные фоны",
"Chat Scenario Override": "Chat Scenario Override",
"Chat Lorebook": "Chat Lorebook for",
"chat_world_template_txt": "A selected World Info will be bound to this chat. When generating an AI reply,\n it will be combined with the entries from global and character lorebooks.",
@@ -1903,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 ответы.",
@@ -2129,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": "Глобальный список",
@@ -2144,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:": "Выбранный токенайзер:",
@@ -2443,7 +2444,6 @@
"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.": "Отводит часть ответа под рассуждения (Минимальные: 10%, Обычные: 25%, Подробные: 50%, Максимальные: 95%), но минимум 1024 токена. При выборе значение Авто рассуждения не запрашиваются.",
"Use system prompt": "Включить системный промпт",
"Send inline videos": "Отправлять inline-видео",
"video_inlining_hint_1": "Отправляет модели видео, если она поддерживает такую возможность.",
"video_inlining_hint_4": "Видео должно весить не более 20 Мб и длиться не дольше 1 минуты.",
"Allocates a portion of the response length for thinking (Flash 2.5/Pro 2.5) (min: 0/128 tokens, low: 10%, medium: 25%, high: 50%, max: 24576/32768 tokens). Auto lets the model decide.": "Отводит часть ответа под рассуждения (Flash 2.5/Pro 2.5) (Минимальные: 0/128 токенов, Поверхностные: 10%, Обычные: 25%, Подробные: 50%, Максимальные: 24576/32768 токенов). При выборе значения Авто модель определяет объём самостоятельно.",
"Google Vertex AI Configuration": "Настройки Google Vertex AI",
@@ -2740,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} персонажа(ей)…"
}
+24 -8
View File
@@ -241,7 +241,7 @@
"Allows the model to return its thinking process.": "อนุญาตให้โมเดลส่งคืนกระบวนการคิดของตัวเอง",
"This setting affects visibility only.": "การตั้งค่านี้มีผลต่อการมองเห็นเท่านั้น",
"Send inline images": "ส่งรูปภาพแบบ inline",
"image_inlining_hint_1": "ส่งรูปภาพในพรอมต์หากโมเดลรองรับ",
"image_inlining_hint_1": "ส่งไฟล์สื่อในพรอมต์หากโมเดลรองรับ",
"Inline Image Quality": "คุณภาพรูปภาพ Inline",
"openai_inline_image_quality_auto": "อัตโนมัติ",
"openai_inline_image_quality_low": "ต่ำ",
@@ -330,7 +330,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine",
"Aphrodite API key": "คีย์ API ของ Aphrodite",
"Aphrodite Model": "โมเดลของ Aphrodite",
"ggerganov/llama.cpp": "ggerganov/llama.cpp",
"ggml-org/llama.cpp": "ggml-org/llama.cpp",
"Example: http://127.0.0.1:8080": "ตัวอย่าง: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "ตัวอย่าง: http://127.0.0.1:11434",
"Ollama Model": "โมเดลของ Ollama",
@@ -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",
@@ -399,7 +401,7 @@
"Available Models": "โมเดลที่สามารถใช้ได้",
"Prompt Post-Processing": "การประมวลผลพรอมต์หลังการส่ง",
"Applies additional processing to the prompt before sending it to the API.": "ใช้การประมวลผลเพิ่มเติมกับพรอมต์ก่อนส่งไปยัง API",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "ตรวจสอบการเชื่อมต่อ API โดยส่งข้อความทดสอบสั้นๆ โปรดทราบว่าคุณจะถูกเรียกเก็บเงินสำหรับการทดสอบนี้!",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "ตรวจสอบการเชื่อมต่อ API โดยส่งข้อความทดสอบสั้นๆ ซึ่งอาจมีค่าใช้จ่ายในการใช้งาน",
"Test Message": "ทดสอบการส่งข้อความ",
"Auto-connect to Last Server": "เชื่อมต่อเซิฟเวอร์อัตโนมัติ",
"Missing key": "โปรดใส่ API Key",
@@ -611,7 +613,7 @@
"Model Icon": "แสดงไอคอน Model AI ที่ตอบแชท",
"Show sequential message numbers in the chat log": "แสดงหมายเลขลำดับข้อความในประวัติแชท",
"Message IDs": "แสดงเลขจำนวนข้อความ",
"Hide avatars in chat messages.": "ซ่อนภาพ avatar ในแชทข้อความ",
"Hide avatars, only in chat messages.": "ซ่อนภาพ avatar ในแชทข้อความ",
"Hide Chat Avatars": "ซ่อนรูปโปรไฟล์แชท",
"Show the number of tokens in each message in the chat log": "แสดงจำนวนโทเค็นในแต่ละข้อความในบันทึกแชท",
"Show Message Token Count": "แสดงจำนวนโทเค็นที่ Ai ตอบแชท",
@@ -745,8 +747,8 @@
"Filter": "ตัวกรอง",
"Automatically select a background based on the chat context": "เลือกพื้นหลังโดยอัตโนมัติตามบริบทของแชท",
"Auto-select": "เลือกอัตโนมัติ",
"System Backgrounds": "พื้นหลังของระบบ",
"Chat Backgrounds": "พื้นหลังแชท",
"Global": "ทั่วโลก",
"Chat": "แชท",
"bg_chat_hint_1": "พื้นหลังของแชทที่ถูกสร้างด้วย",
"bg_chat_hint_2": "จะปรากฏที่นี่",
"Extensions": "โปรแกรมส่วนขยาย",
@@ -921,7 +923,7 @@
"Save": "บันทึก",
"Chat History": "ประวัติการแชท",
"Import Chat": "นำเข้าไฟล์แชท",
"Copy to system backgrounds": "คัดลอกไปยังพื้นหลัง",
"Copy to global backgrounds": "คัดลอกไปยังพื้นหลังทั่วโลก",
"Rename background": "เปลี่ยนชื่อพื้นหลัง",
"Lock": "ล็อค",
"Unlock": "ปลดล็อค",
@@ -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} ตัวละคร…"
}
+24 -8
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Об'єднує послідовні системні повідомлення в одне (крім прикладів діалогів). Може покращити співпрацю для деяких моделей.",
"Enable function calling": "Увімкнути виклик функцій",
"Send inline images": "Надсилати вбудовані зображення",
"image_inlining_hint_1": "Надсилає зображення у підказках, якщо модель це підтримує.",
"image_inlining_hint_1": "Надсилає медіафайли у підказках, якщо модель це підтримує.",
"Inline Image Quality": "Якість вбудованого зображення",
"openai_inline_image_quality_auto": "Авто",
"openai_inline_image_quality_low": "Низький",
@@ -326,7 +326,7 @@
"PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (режим OpenAI API)",
"Aphrodite API key": "Ключ API для Aphrodite",
"Aphrodite Model": "Модель Афродіта",
"ggerganov/llama.cpp": "ggerganov/llama.cpp (сервер виведення)",
"ggml-org/llama.cpp": "ggml-org/llama.cpp (сервер виведення)",
"Example: http://127.0.0.1:8080": "Приклад: http://127.0.0.1:8080",
"Example: http://127.0.0.1:11434": "Приклад: http://127.0.0.1:11434",
"Ollama Model": "Модель Ollama",
@@ -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",
@@ -392,7 +394,7 @@
"Available Models": "Доступні моделі",
"Prompt Post-Processing": "Швидка постобробка",
"Applies additional processing to the prompt before sending it to the API.": "Застосовує додаткову обробку запиту перед надсиланням його в API.",
"Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "Підтверджує ваше підключення до API, надсилаючи коротке тестове повідомлення. Пам'ятайте, що ви будете платити за це!",
"Verifies your API connection by sending a short test message. This may incur usage charges.": "Перевіряє підключення до API, надсилаючи коротке тестове повідомлення. За це може стягуватися плата за використання.",
"Test Message": "Тестове повідомлення",
"Auto-connect to Last Server": "Автоматичне підключення до останнього сервера",
"Missing key": "❌ Відсутній ключ",
@@ -603,7 +605,7 @@
"Model Icon": "Іконка моделі",
"Show sequential message numbers in the chat log": "Показувати послідовні номери повідомлень у журналі чату",
"Message IDs": "Ідентифікатори повідомлень",
"Hide avatars in chat messages.": "Приховати аватари в повідомленнях чату.",
"Hide avatars, only in chat messages.": "Приховати аватари в повідомленнях чату.",
"Hide Chat Avatars": "Приховати аватари чату",
"Show the number of tokens in each message in the chat log": "Показувати кількість токенів у кожному повідомленні у журналі чату",
"Show Message Token Count": "Кількість токенів у повідомленні",
@@ -737,8 +739,8 @@
"Filter": "Фільтр",
"Automatically select a background based on the chat context": "Автоматичний вибір фону на основі контексту чату",
"Auto-select": "Автовибір",
"System Backgrounds": "Системні фони",
"Chat Backgrounds": "Фони чату",
"Global": "Глобальні",
"Chat": "Чат",
"bg_chat_hint_1": "Фонове зображення чату, створене за допомогою",
"bg_chat_hint_2": "тут з’явиться розширення.",
"Extensions": "Розширення",
@@ -911,7 +913,7 @@
"Save": "Зберегти",
"Chat History": "Історія чату",
"Import Chat": "Імпорт чату",
"Copy to system backgrounds": "Скопіювати в системні фони",
"Copy to global backgrounds": "Скопіювати в глобальні фони",
"Rename background": "Перейменувати фон",
"Lock": "Замок",
"Unlock": "Розблокувати",
@@ -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} персонажа(ів)…"
}

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