* 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>
* 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.
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.
* 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>
* 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>
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.
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).
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>