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
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>
* 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
* 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>
* 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.
* 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>
* 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>
* feat: add allowBaseName option to getUniqueName utility function
* feat: simplify getUniqueName by removing allowBaseName option and changing default startIndex to 0
* 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
* 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>
* 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
* 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.
* 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
* 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>
* 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>
* 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>
* 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>
* 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
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