Commit Graph

11697 Commits

Author SHA1 Message Date
Cohee 8c07dcda24 Show experimental engine onboarding for greeting macros 2026-03-07 17:52:00 +02:00
Lucas Scala 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 Marinara 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
Copilot 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
Sanitised 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
shifusen329 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
Copilot 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 Scala 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
Copilot 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
GERNOMA 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
Brioch 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
Copilot 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
ZhenyaPav 0ba0418fac OpenRouter interleaved reasoning forwarding for tool-call continuations (#5160)
* fix(openrouter): forward reasoning across active tool-call chains

* feat(reasoning): add tool-chain forwarding toggle and honor edited reasoning

* feat(reasoning): add OpenRouter interleaved forwarding modes

* moved the reasoning forwarding dropdown into a separate line

* feat(reasoning): default tool reasoning forwarding to disabled

* refactor(openrouter): move tool reasoning mode to CC settings

Move OpenRouter tool reasoning forwarding control to response configuration and scope it to OpenRouter.

Store mode in chat completion settings (presettable), remove legacy power_user boolean/fallback, and use constants for mode values.

Preserve OpenRouter Gemini signature forwarding independently from plaintext tool reasoning mode.

* fix(openrouter): tighten active-chain reasoning forwarding

Use trailing contiguous tool-chain boundary for active-chain eligibility.

Also rename the UI control to Interleaved Thinking Forwarding and place selector on its own line.

* fix(openrouter): use adjacent assistant reasoning for tool calls

For interleaved thinking forwarding, source reasoning only from the immediately preceding assistant non-tool message.

Keep mode gating behavior unchanged and avoid history-window reasoning carryover.

* fix(openrouter): skip tool messages for reasoning source

When forwarding interleaved reasoning, ignore intervening tool result messages when resolving the preceding assistant reasoning source.

This keeps only the first tool call in a chain tied to a prior assistant reasoning block unless a later invocation carries its own reasoning.

* fix(openrouter): keep plaintext reasoning with signatures

Do not suppress forwarded tool-call reasoning when thought signatures are present.

* fix(openrouter): split interleaved thinking mode behavior

Restore distinct mode semantics: active_chain uses nearest assistant-text boundary after skipping tool/tool-call messages, while since_last_user scans for latest assistant reasoning since user.

Update UI label to Interleaved Thinking with right-aligned dropdown and explanatory tooltip.

* style(openrouter): align interleaved thinking dropdown row

Match OpenRouter interleaved thinking control layout with existing oneline-dropdown patterns.

Also update reasoning-forwarding inline comment wording for current mode behavior.

* docs(ui): clarify interleaved thinking tooltip

Use explicit API-request wording for OpenRouter interleaved thinking tooltip text.

* i18n(openrouter): localize interleaved thinking UI

Add locale keys for OpenRouter interleaved thinking label, mode options, and inline helper description.

Wire dropdown option text to data-i18n in index.html.

* fixed helper text wrapping

* fix(ui): make interleaved thinking helper text wrap

* i18n(openrouter): translate interleaved thinking labels

Replace placeholder English values for interleaved thinking keys in non-English locale files.

* fix(ui): restore interleaved thinking dropdown alignment

* Remove changes from en.json

* Type fixes

* Reworked the interleaved reasoning provider logic

* Renamed the variables in preparation for potential implementation for other providers

* Gate interleaved tool reasoning on reasoning request setting

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-22 13:15:52 +02:00
Cohee 8462cbaebb Fix duplicate image generation toast on tool call. 2026-02-20 01:09:56 +02:00