Commit Graph

11683 Commits

Author SHA1 Message Date
Cohee bdaadd17dd Fix npm audit 2026-03-20 00:28:06 +02:00
Xiangzhe 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
Wolfsblvt 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
Wolfsblvt 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
GentleBurr 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
Copilot 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
Stardust 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
Copilot 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
Cohee 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
Maksim 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
Pavdig 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
Roland4396 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
Copilot 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
Kristy Aurelia 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
Haochen 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 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