Commit Graph

11697 Commits

Author SHA1 Message Date
Wagner Bruna 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 Scala 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
Tosd 45bf3a402a Update zh-CN translations (#5180)
* Update zh-CN translations

* i18n(zh-CN): sort keys

* Update translations

---------

Co-authored-by: Tosd0 <65720409+Sevenyine@users.noreply.github.com>
2026-02-19 20:48:28 +02:00
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
Copilot 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
bal-spec 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
Copilot 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
Preston Farr 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 C 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
Copilot 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
Copilot 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
Tosd a1204a4438 Update zh-CN translations (#5145)
* fix(index.html): typo

* Update zh-CN translations

* Add missing zh-CN translation

---------

Co-authored-by: Tosd0 <65720409+Sevenyine@users.noreply.github.com>
2026-02-12 22:06:37 +02:00
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
Copilot 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
Copilot 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
Copilot 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
awaae 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
Copilot 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
thecaptain789 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