* Update - Revert connection profile change TC commands load order
This change was made to prevent preset tied samplers from breaking, such thing doesn't exist anymore.
* Update - Unlink preset renaming logic from sampler selection lock
* Update - Link TC sampler selection lock to API Type
* Fix - Clean comments
* Update - Use localforage selectedSamplers and data selectsampler as main sampler selection storage
* Fix - ESLint errors
* Update - Change lock tooltip with correct description
* Fix - Move and await sampler select localforage initializer to finish
Tried to move it to the most reasonable place possible that allowed to make an await.
* Fix - Make loadTextGenSettings async to load API selected samplers
* Feat - Save and load manually selected samplers per preset
* Fix - Sync sampler popup with selected sampler state settings
* Fix - Prevent breaking visualization after disabling keep selected samplers
* Fix - ESLint errors in samplerSelect.js
* Fix - ESLint errors in textgen-settings.js
* Docs - Write JSDocs for new methods in textgen-settings.js
* Update - Make the reset button work individually per preset
* Fix - Trailing whitespace at the end of class selector
* Fix - Update tooltip information for force samplers toggle
* Fix - Prevent calling isSamplerManualPriorityEnabled a bajillion times
* Fix - Unbrick switch from manually-forced to non-manually-forced preset
This prevents samplers non controlled by [data-tg-type] from being sent to the shadow realm if they were previously hidden by [data-tg-samplers]. is_preset_switch is just to prevent breaking muscle memmory of users not using force manually selected samplers.
* Fix - Load manually selected samplers on connection profile switch
Changing preset does not update samplers ONLY IF force manually selection is disabled. Changing API before preset would update the samplers, but using the settings of the previous preset, due to preset being changed AFTER the API.
* Fix - Switch API Type controls in the API Connections panel
* Fix - ESLint errors in textgen-settings.js
* Fix - Update sampler selection only with textgenerationwebui as main API selected
* Styles - Change the sampler selection lock button icon to an actual lock.
* Fix - Await for sampler selection reset to finish
* Update - Normalize function name
* Update - Preserve manual sampler selections on preset renaming
* Fix - Properly reset sampler manual selections
* Update - Ensure selection reset displays API specific samplers
* Fix - ESLint errors
* Fix - Avoid modifying non-existent data
* Update - Move manual sampler control methods to samplerSelect.js
* Fix - Break circular file dependency between textgen-settings.js and samplerSelect.js
setting_names was unavailable during page load, throwing an error and preventing ST from loading.
* Update menu layout
* Remove pointless await
* Update param naming to camelCase
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* Preserve media playback state when running appendMediaToMessage
* Better selector specificity
* Fix local variable name
* Move typedef to global.d.ts
* Check for readyState on save/restore
* Only check for currentSrc on restoration callback
- Added 160px max-height to select2 multiple selection, primary key, and secondary key text areas in world entries
- Enabled vertical scrolling with hidden horizontal overflow for better UX with long content
* feat: improve multiline input handling in popups
- Added Ctrl+Enter requirement for submission in multiline input popups to prevent accidental sends
- Exported PopupUtils class for external use
* refactor: remove redundant higher/different rows from input popups
- Removed rows: 2 from callGenericPopup calls where default behavior is sufficient
- Increased rows from 2 to 4 in caption extension for better multiline input experience
* refactor: extract IP whitelist validation into helper function
- Added isIPInWhitelist helper with error handling for individual whitelist entry checks
- Replaced inline whitelist matching logic with reusable function calls
- Added JSDoc type annotations and error logging for failed IP matching attempts
* refactor: simplify whitelist validation with upfront filtering
- Moved IP validation to startup time instead of per-request checking
- Extracted validateWhitelist function to filter invalid entries once at initialization
- Simplified isIPInWhitelist by removing redundant error handling after validation
* fix: correct IP whitelist matching to use parsed CIDR notation
* Add captioning for video attachments
* Unify error toast titles
* Add MEDIA_SOURCE enum and update media handling to include source information
* Unify attachment handling logic
* Add error handling for auto-captioning failures
* Use string formatting for console error
* TC: Allow setting empty JSON schema
* Fix check for llamacpp schema
* Handle grammar/schema for Aphrodite
* Conditional include for guided_json
* Update default presets with null value
* Conditional include into payload for grammar/schema
* Refactor flattenSchema to simplify JSON schema for Google Generative AI API compatibility
* Added unit test and github action
* Add unit tests workflow and update test script in package.json
* Downgrade eslint-plugin-jest to make min node version 18
* Add audio-player component
* Enhance audio player functionality and styles
- Adjust audio player layout and styles in CSS for better spacing and alignment.
- Add audio element to message template in HTML.
- Implement audio attachment handling in JavaScript, including a new AudioPlayer class.
- Update media attachment structure to include titles for audio files.
- Extend supported media file types in constants.
* Add audio inlining control
* Fix file formats list
* Simplify hints
* Add to prompt
* Add progress title hint
* Add to scrollOnMediaLoad
* Add audio size hint
* Add gallery controls
* Delete removed media attachments from server
* Adjust min width
* No-op when swiping a singular media
* Fix clean-up
* Fix silent deletion logic
* More accurate media prompt estimations
* Round durations with ceiling function
* Adjust rounding logic
* you don't have to say it twice
* Export deleteFileFromServer
* Don't reference module from HTML
* Clean-up styles
* Move formatTime to utils
* Add fa-fw to delete
* fix(IME): Prevent Esc from closing editor during composition
When using a Chinese IME, pressing the Escape key during composition should cancel the composition, not close the message editor.
This commit fixes the issue by adding a check for `!e.isComposing` to the 'keyup' event listener for the Escape key in `public/script.js`. This ensures that the editor is only closed when the Escape key is pressed outside of an IME composition session.
* fix(IME): Change the handler of 'Escape' from 'keyup' to 'keydown'
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* Support multiple images in single API response
* Fix media wrapper clashing with swipe counter
* Return an empty array, add additional filtering
* Add index to inline image filenames in processImageAttachment
* Multiple file uploads
* mes_img_wrapper
* mes_video_wrapper
* Named export instead of function wrapper
* Update public/scripts/chats.js
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Fix optional chaining for message extra
* Preserve existing files with paste
* Improve swipe message extras clean-up
* Clean-up: Add chat_backgrounds to known images
* Add ensureMessageMediaIsArray to getContext
* Fix compatibility warning
* Update to media array
* Move de-dupe check logic
* Fix comment
* Fix clean-up logic
* Improve typing
* `feat/multi-file` Added a toggle between the old gallery and new image list. (#4722)
* Added "Toggle Gallery" button.
Added `getContainerInfo`.
* Refactor
* Change checkbox toggle to select
* Ensure media_display is set correctly only if any image_swipes were migrated
* Rename function
* Support Date in parseTimestamp
* Add type to main chat array
* Add media display reload prompt
---------
Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* Use a single wrapper block for media
* Fix type annotation
* Fix video display in list mode
* Refactor saveImageToMessage to include title in media object
* Use named constants in migrateMediaToArray
* Update img control styles
* Fix error container state
* Refactor onImageSwiped
* Remove redundant event handler
* Refactor expandMessageMedia
* Use shared function for display handling, fix notice logic
* Enhance ChatMessage and ChatMessageExtra types
* Refactor media display reload logic
* Improve styling for media containers
* Adjust spacing in file form styles
* Fix scroll handling in appendMediaToMessage
* Reduce flicker in appendMediaToMessage
* Extract scrollOnMediaLoad func
* Improve scroll behavior in gallery display
* Improve delegation for click events
* Add file d&d handler to #form_sheld
* Improve scroll adjust for slow connections
* Adjust debounce timeout
* Add messageMedia enum provider
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: DeclineThyself <FallenHaze@tutamail.com>
Co-authored-by: user <user@exmaple.com>
* - Removed unneccessary check for swipe info. Swipes are valid and can be read by the chat message UI just fine without the dates and details surrounding generation settings.
* + Swipe info will now be backfilled if it's missing using placeholder data, to improve compatibility.
* + Fix big oopsie.
* + Fix discarding all scenarios aside from the first one, which would cause all chats other than the first one to be lost.
+ Accumulate alternative starting messages from all scenarios, as different scenarios are how Backyard handles having alternative greetings. A scenario with multiple messages in its "firstMessages" array is invalid as per BYAF spec.
+ Return scenarios so that they can be used to populate chats, scenario overrides, and in the future, the other character settings overrides as well.
* + Added support for importing chats (including swipes) from BYAF. This brings the core functionality of BYAF imports mostly in-line with the standard, without the inclusion of any features that are currently missing from ST.
> The only supported feature not yet implemented is scenario overrides per-chat. This will be the the goal of the next commit.
* + Implemented scenario overrides, fully bringing ST's BYAF import as in-line with the BYAF standard as possible without adding new feature functionality to ST.
+ Also added some new chat metadata fields in preparation for example message and system prompt overrides.
* + Added support for pulling alternate icons from the BYAF archive. They are not used yet, but they are safely stored.
+ Added support for pulling backgrounds from the BYAF archive. They are not used yet but they are stored and linked to the chats they originally belonged to.
+ Saved every remaining field that was previously discarded from BYAF that a user actually needs in a way that could be used in the future, and can be accessed by the user if needed after import. Any fields that are not preserved at this point are specfic to either Backyard AI's desktop application, or to the BYAF manifest itself, and therefore have no relevance to a user.
> With this, BYAF import should be fully supported and in-line with the official spec.
* + Updated comments and method names to reflect changes appropriately. First round of touch ups.
* + More comment updates.
* - Removed commented code, that is no longer needed for reference.
* > No longer sanitize for filenames in the character card, as there's no need. The sanitization now happens when generating the filename, which is subsequently used for file operations.
+ Added replacement function for sanitizing filenames which uses visually similar but valid for filenames replacement characters instead of deleting the characters for better data parity.
* + Preserve isNSFW flag as a tag, so it's not lost on import.
* + preserve labels on character alt avatars
* + Deduplicate first messages, so that 5 chats with the same first message don't create 5 identical first messages.
* + Adjusted icon naming logic to produce more sensible results.
* > User path.basename and path.extname for getting the base name and extension of files, respectively.
* > Should use camelCase for local function names.
* > Use a set for greetings instead of explicitly checking for duplicates.
* > Missed a snake case local function name.
* > Updated background import logic to integrate with existing per-chat background system.
* + Updated logic to skip import of chats and backgrounds when a character is being updated/replaced.
* + Added copy of getUniqueName helper function from frontend utils to backend utils.
+ Refactored duplicated logic for getting unique filenames for backgrounds and character alt icons to use the newly available function.
* > fixed adding an extra dot to the filenames for icons after switching to path.extname for getting the extension
* > Updated metadata settings generation in byaf chat so that it doesn't overwrite valid yet 'falsy' values with defaults. Oops
* > Remove variable for configuration that will likely never need to exist.
* > custom_background should be an empty string if chat_background is falsy
* > Make an array empty if chat_background is falsy.
* > Prefer camelCase for local variable names.
* + Added definitions for ByafParseResult and ByafChatBackground.
> Updated overused and unweildy anonymous types to the newly defined types.
* + When importing a character with chats, the character will now no longer open to a new empty chat, but instead will pick the first of the imported chats to open up to.
* Rename prev_paths => paths
* Prettify logs display
* Set fallback chat name if scenario is untitled
* card.data.name => card.name
* Optimize first scenario message access
* + Moved custom replacement function from importFromByaf into util.js as sanitizeSafeCharacterReplacements() so that the replacement logic may be reused anywhere for consistency.
* > Missed a couple. Updated for consistency
* + Preserve character full/display name without it needing to be safe as a filename.
> Change logic for naming the folder the alt images live in to match the logic the sprites endpoint uses to get character sprites for consistency
* > Only add full_name extension if displayName exists.
* full_name => display_name
* - No longer use safe lookalike replacements for filename sanitization to be consistent with how web browsers sanitize invalid characters in filenames before saving to disk.
* Tiny formatting fix
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* + Implemented support for overrides of system prompt and example messages from chat metadata. This is needed for BYAF import parity. No UI for modifying these yet, but they're easily changeable in the chat files already. These metadata settings are already supported by BYAF import as of the last commit so this just enables them.
* + Updated scenario overrides popup to now be a character settings overrides popup.
+ Updated the template to have a new section for example messages and system prompts
+ Updated the logic to handle all three overrides
+ Updated logic to only save when the popup is closed, instead of on every character input.
* Preserve import, allow scrolling
* Add confirmation on override removal. Always save pending changes.
* Update dialog layout, add editor expand buttons
* Fix mes examples override in group chats with Join mode
* Update group chat button title
* Specify that Prefer Char. Prompt is a requirement
* Fix group join mode not replacing macros in overrides
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* Enhance contribution guidelines for pull requests
Added guidelines for maintaining workflow during PRs.
* fix abort generation error when koboldcpp is set with a password
* add parameter type, and remove unecessary line
* oops, missing comma
* eslint
* remove header content type
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Your Name <you@example.com>
* Add UI elements
* Add support for model configuration
* fix: update API request parameters for improved handling
* Add logo img
* Fix tool calling with negative index
* Include tool calls into 'last in context' calculation
* feat: add support for captioning
* Refactor message edit, show counters on last message
* fix: add warnings for missing message in chat array and DOM during edit
* Export messageEdit function
* Formatting fix
* Fix comment alignment
* feat: apply preset regexes before scoped regexes
* feat: apply preset regexes before scoped regexes for debugger list
* fix: don't notify reload regexes when save preset through ui button
* docs: add comment for SCRIPT_TYPES order
* fix: updatePreset is wrongly reset preset
* Fix off-by-one cases in user prompt filler logic
Fixes#4645
* Skip inject pre-allocation in CC prompts
* Fix filler insert on continuing on user message
* feat: preset regex
* refactor: unify `saveScriptsByType`
* fix: default branch for `saveScriptsByType`
* refactor: resolve some reviews
* fix: lint
* refactor: getPresetName -> getCurrentPresetName
* refactor: unify regex allow operation
* feat: notify whether to reload current chat when preset is changed
* refacotr: set timeout for reload current chat notification
* fix: _ -> lodash
* i18n
* Refactor API ID access
* refactor: replace UNKNOWN type with a separate constant
* refactor: consolidate CSS rules for scoped and preset script blocks
* Extend toast timeout
* Fix bug with moving, refactor
* Refactor bulk toggle operations
* Use for..of for preset application
* refactor: enhance parameter documentation for scriptType in regex functions
* fix: await loadRegexScripts in event handlers
* fix: correct script type in saveScriptsByType for preset handling
* fix: add null checks for preset manager and API ID in regex functions
* feat: implement expandable regex script options in UI
* Always show edit/delete buttons
* Add title attribute to regex script name
* fix: correct class name for regex script display
* Remove extra paddings from script blocks
* fix: ensure preset scripts are only disallowed if currently allowed during rename
* fix: reload on bulk script toggle
* feat: add PRESET_RENAMED_BEFORE event type and emit it during preset renaming
* fix: always preserve preset extensions on rename
* Handle horde in getPresetManager
---------
Co-authored-by: ZoinkCN <zoinkcn@outlook.com>
Co-authored-by: StageDog <aksanajw845@gmail.com>
* feat: prevent scrolling of containers when using focused number inputs
#4607
* feat: enhance number input wheel behavior with slider sync and Firefox support
* refactor: optimize number input wheel handler with native DOM methods and type checks
* Refactor: Move into dom-handlers folder
* refactor: use optional chaining for slider element selection
* Simplify file paths
* Unlock scroll to edit in misc controls
* refactor: throttle wheel event handler updates
* refactor: Extract value update into a function
* fix: NaN-aware value clamping
* fix: Add sanity checks for input value calculations
---------
Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
* Remove dead Gemini 1.5 models, and clean up
* Remove dead models (error 404): Gemini 1.5, `gemini-2.5-pro-exp-03-25`, `gemini-2.5-flash-preview-04-17`
* Adjust the Gemini → descriptions
* Assign default models to 2.5 Pro and Sonnet 4.5 (3.5 and 3.7 will be retiring soon)
* Add `gemini-2.5-flash-image`
* Don't forget learnlm-1.5-pro
* Update default claude
* Vertex: Clean-up 2.5 preview models
* Disable thinking for 2.5-flash-image
* Bring back banana preview
* Update defaults in more places
* Add gemini preview-09-2025 and robotics-er
* unbrick my last commit
* Add gemini-robotics-er to captions
* Set max context for gemini-robotics-er
dang
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* Add interactable outline color CSS variables
Introduces --interactable-outline-color and --interactable-outline-color-faint variables to the body style, both set to transparent for future use in styling interactive elements.
* Update global styles and remove unused CSS variables
Added -webkit-tap-highlight-color to the universal selector for improved touch experience.
* Add confirmation for bulk move, add UNKNOWN type, improve JSDoc
* Fix toggle all bulk move visibility
* Improve function documentation
* Refactor currentChatId check and improve JSDoc for getScriptDecorators function
* Check against known values in moveRegexScript
* Fix console warning spam
* Simplify currentChatId check
* Prevent moving scripts into the void
* Make texts translatable
* Update contribution guidelines
* fix: language in CONTRIBUTING.md
* Updated language to clarify the role of maintainers in PR reviews.
* Update section title for AI coding assistance tools
* Update CONTRIBUTING.md
* 200
* ci: switch workflows to use app token/app id authentication
* That wasn't supposed to go in this PR
* chore: refactor to local token minting step [Test]
* chore: expose token output from setup-app-token action and add PR checkout step
* ci: replace checkout and custom app token with create-github-app-token action in PR merge conflict workflow
* ci: add test label action to PR conflict check workflow
* another test...
* I am losing my sanity
* can this work now? please? This action adds my debug level?
* it needs to run always
* let's do it via curl...?
* why did it (totally not me) remove the always() again
* Sorry I screamed at you, Qwen. Does this work?
* refactor: consolidate GitHub App token creation into individual jobs
* chore: remove debug label functionality from merge conflict workflow
* chore: let's figure out why labeler is not behaving
* chore: remove temporary GitHub API token validation check from PR workflow
* ci: ensure workflow jobs run regardless of previous job failures by adding if: always()
- Fixes visual inconsistency between 'Enter a Model ID' input and 'Available Models' dropdown
- Uses calc(var(--mainFontSize) * 0.95) to match the slightly smaller font size of the dropdown
- Resolves issue #4599
This is the most minimal fix that targets only the specific element causing the visual difference.
Co-authored-by: Trahloc <trahloc@hearth.trahloc.com>
* fix: reprint non-tainted group chat on switching personas
* feat: mark chat as tainted when sending user message
* feat: mark chat as tainted when adding custom messages or captions
* feat: export createOrEditCharacter function and integrate it into retriggerFirstMessageOnEmptyChat
* fix: optimize loadPersonaForCurrentChat by storing current chat ID in a variable
* Improve conditions of first message retrigger
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* fix: do not jumo to chat twice on new group chat with delete
* fix: prevent metadata reset when deleting non-active group chat
* Bring back group chat splice call
* Always delete past group metadata on chat delete
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* feat: allow create new world books via /getpersonabook and /getcharbook
Refactor character world info management into dedicated functions
Extract character world assignment logic from UI handlers into reusable functions
Add support for automatic lorebook creation in slash commands
Improve code maintainability by centralizing world info operations
* refactor: update boolean enum provider from onOffToggle to trueFalse in world info commands
* fix: improve world info name uniqueness check using getUniqueName utility
* Unset current persona WI on file deletion
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* fix: (new) group chat doesn't respect persona connections
Fixes#3876
* refactor: simplify persona connection filtering with destructuring and type comparison
* fix: remove redundant type check in persona connection filtering logic
(char avatar and group key *should* always be unique and different anyway, no need to check on type. Makes this more flexible)
* feat: enable character source dropdown based on availability and style disabled options
* feat: emit event when character is in right character panel
* refactor: rename CHARACTER_SELECT_SELECTED event to CHARACTER_EDITOR_OPENED for clarity
* Always disable source option when peeking in groups
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Refer to line 5771, where is correct, but the branch is not added, resulting in the branch being triggered once here when the streaming is completed, and finally the streaming is triggered again. In fact, it should not be triggered here
* refactor: allow popup okButton and cancelButton to be set to false to hide them, even if visible by default
* feat: add character replacement from online source URL
- add utility function to import anything from external URL (refactored from existing function)
- fix character replace toast showing "Created"
- fix thumbnails not refreshing for replaced char
- fix accidentally creating new chat on replace, instead of reloading the open chat
* fix: refresh avatar thumbnail only after successful character import and when character exists
* chore: fix lint, unused import
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* feat: Add {{notChar}} macro for participant list
* implement impersonation logic consistently.
* docs: Document the new {{notChar}} macro
* docs: Fix format for {{notChar}} and remove examples.
* docs: Add span tag
* docs: fix extra quote mark
* docs: Add suggested fixes
* fix: change MiniMax TTS pitch from float range 0.5-2.0 to integer range -12 to 12
Fixes#4570
* refactor: replace hardcoded defaults with defaultSettings in MiniMaxTtsProvider config
* refactor: restructure TTS settings with min/max ranges and add value clamping, adjust volume range
* fix: flatten MiniMaxTtsProvider settings to use default values from complex field definitions
* Adjust block spacing
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* [wip] Add stream fade-in effect for message text and corresponding CSS animation
* Avoid using temporary element during text segmentation
* Add fade in toggle
* Skip whitespace-only nodes
* Fade-in reasoning stream
* Fix case when segmenter is not supported
* add first and last buttons to pagination
* Add i18n support
* Update pagination buttons font
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* init
* cleanup
* logic changes and some styling
* set z index to a reasonable value
* remove pointless animation
* cleanup
* restore animation
* checkmark icon on selected background
* drop shadow
* tweak size slightly
* Apply suggestion from @Cohee1207
condense
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* more of the above
* make lock indicator use a class like the selection indicator
* make backgroundHighlight run on page load
* cleanup
* html restructure and display: contents. only issue left is slightly wonky desktop buttons order
* yellow lock icon for consistancy
* Update layout
* Restore fitting logic
* Styles clean-up
* Remove duplicate class
* Restore button titles
* Fix return types of slash commands
* Update locked background on select if lock status is on
* Force header to 100% width
* Clean-up styles
* Fix locked highlight on custom backgrounds
* Revert global lock button
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* feat: update creator notes display when editing character and updating content
* Fix interaction with create form
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* feat: add outlet prompt support for world info entries
* feat: add outlet name field with autocomplete for world info entries
* feat: add outlet entries for world info support to WI parsing
* feat: add tooltip and validation for WI outlet name entries
* Trim macro outlet name
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* refactor: consolidate WI injection cleanup and fix strict equality comparison
* fix: update outlet macro regex pattern to use double colon delimiter
* fix: replace carriage returns with newlines in WI entry outlet tooltip
* fix: add null checks and array validation for WI outlet entries handling
* feat: add outletName field to world info entry definition schema (supports /setwientryfield command)
* fix: add outletName field to export of character lore books
* do not remove outlet name on position change, but filter out for auto complete
* Match WI extensions field name
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* outlet name being used in char WI import too
* docs: add outlet macro documentation to help template
* be explicit about risu/novel/agnai wi not supporting outlets
* Inject A/N and TC sysprompt after populating outlets
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* init
* mostly working messy version
* css layout, mobile is fixed
* revert changes
* more of the above
* cleanup
* revert breaking fixes, cleanup dead code
* dead code
* delete fallback
* spacing
* css tweaks and removed getChatBackgroundsList
* mobile sizing
* revert unrelated changes
* use name instead of context
* debounce from constants.js
* replace if/else
* pass images directly
* more of the above
* buttons
* buttons functionality
* add default column counts
* remove .mobile-only-menu-toggle when clicked (layering fix)
* lint
* universal column default of 3
* sacrifice firefox for chrome
* Restore media query
This reverts commit 295a5a8190.
* Add disabled attribute styles for menu_button
* use opacity 0, pointer events none instead of display:none
* Format styles
* Fix type errors
* Add blur event handler to close mobile menu when focus is lost
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* Add Thai Translation
* Remove yarn.lock and add to .gitignore
* Update Thai translation
* Update Thai translation for World Info entry status descriptions
* fixed thai translation
* feat: Add Azure OpenAI chat completions provider
This commit introduces comprehensive support for integrating Azure OpenAI as a new chat completion source within SillyTavern. The implementation specifically navigates Azure's reliance on deployment names, differing from standard model selection.
Includes:
- **New Feat / UI:** Dedicated settings in `public/index.html` for Azure parameters (Base URL, Deployment Name, API Version, API Key) and a new `public/img/azure_openai.svg` icon.
- **Frontend Logic (`public/scripts/openai.js`):** Manages Azure OpenAI settings and dynamic URL generation. The 'Connect' button triggers a `GET /models` endpoint call solely for API configuration validation (key, URL, version). Upon successful validation, a subsequent `POST` request is made to the AI, and the active model is extracted from its response payload, then populated for UI display (no direct user model selection).
- **Backend Logic (`src/endpoints/backends/chat-completions.js`):** Implements `sendAzureOpenAIRequest` to proxy requests, handling Azure’s unique authentication and URL structures. Enhanced the `/status` endpoint for Azure-specific validation.
- **Secret Management:** Secure handling of Azure OpenAI API keys in `public/scripts/secrets.js` and `src/endpoints/secrets.js`.
- **Autoconnect:** `public/scripts/RossAscends-mods.js` modified to enable automatic connection for Azure OpenAI if an API key is present.
Impact:
- Users can now connect to and utilize Azure OpenAI services.
- Requires new configuration details in the UI.
- Enhances API routing and validation with Azure-specific behavior.
- Navigates model handling: model name is *derived dynamically* from AI response, not directly selected, aligning with internal SillyTavern structure.
* fixed the html issues, openai.ujs and secrets.js
modified: public/index.html#
modified: public/scripts/openai.js
modified: public/scripts/secrets.js
* Extends Azure OpenAI with advanced capabilities
Enables advanced features such as function calling, image inlining, and model reasoning in the UI for Azure OpenAI.
Refactors the backend to support structured output (JSON mode), native thinking, and reasoning effort for compatible Azure OpenAI models. Adds support for logprobs, multiple responses (`n`), and seed, aligning with standard OpenAI behavior.
Improves request handling with a retry mechanism for rate limits and more robust error reporting. Ensures correct parameter handling for model-specific features and conflicts, such as when native thinking is enabled. Optimizes the Azure OpenAI status probe for efficiency.
modified: public/index.html
modified: public/scripts/openai.js
modified: src/endpoints/backends/chat-completions.js
* PR fixes
Simplification
Removed reasoning logic from backend
modified: src/endpoints/backends/chat-completions.js
modified: src/endpoints/backends/chat-completions.js
* Fix PR comments
Removed the front end compiled url UI element and related.
Misc simplifications
modified: public/index.html
modified: public/scripts/openai.js
modified: src/endpoints/backends/chat-completions.js
* Fixed accidental api temporary disabled
modified: public/index.html
* Don't transfer status code verbatim
* Fix formatting
* Enable tool calling
* Fix logo coloration
* Move model arrays to shared constants
* Fix capitalization
* Remove obsolete comment
* Improve response schema parameter format
* Fix tokenizer model selection
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* Improvement: Enhanced UI Consistency
- Added a class to `<div class="inline-drawer-toggle inline-drawer-header">` in **AI Response Configuration** and **API Connections** menus to match the styling of similar elements in **User Settings**
- Improved spacing and sizing for buttons such as `.bg_example .jg-menu` in the **Backgrounds** menu. The previous widths and gaps were too small, often causing accidental taps (especially on mobile devices)
* fix
* Adjust padding and background color in style.css
* Update inline drawer classes for configuration sections
* Remove border styles from expandable sections
* fix
* fix
* fix(sad)
* Adjust desktop bg_list width
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* fix: adjust toast container positioning in popups to match core toastr behavior
Fixes#4490
* Fix misplaced element role
* Hide toast container while opening animation is running
* fix: update toast role from alert to status
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* refactor: remove unused background styles
* feat: add support for nested @media, @supports, and @container rules in dynamic focus styles
* fix: add keyboard focus support for background menu buttons back
* fix: move "custom" background copy functionality to unified button UI and make it work again
* refactor: simplify CSSContainerRule instance check using window global
* fix: update hover and focus selector placeholder replacements to handle multiple occurrences in selector
* Fix focused outline offset of background samples
* Fix locked background outline color
* Add a11y roles to background menu items
* Add mobile-only button selector
* fix: update button and list item selectors
* Improve keyboard navigation in narrow layout
* Hide rename button for custom=true backgrounds
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* Improvement: Add Upload Button to Image Gallery
- Added an **Upload Image** button to the **Image Gallery** for a more intuitive experience and easier use on mobile devices ~~(so I can upload some awesome GIFs right from my phone)~~
- Adjusted the `<select class="gallery-sort-select">` menu styling for better consistency with other sections, making it more compact and reducing wasted space
* Fix type error
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* fixed merge conflicts
* Supported max tokens + fixed wrong image model mapping
* fixed merge conflicts
* fixed merge conflicts
* updated the logic
* updated the logic
* replaced hard coded reasoning_effort mode list with a dynamic function
* replaced hard coded reasoning_effort model list with a dynamic function
* Fix eslint
* Adjust reasoning effort logic
* Code clean-up
* Add logo
* Add inline image quality
* Fix multimodal models list
* Fix seed not passed
* Add "detail" error parser
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* SSL: support passphrase for private key
* Recommend CLI argument or environment variable for key passphrase
* Fix SSL passphrase handling to ensure it is always a string
* Fix TS1038 errors
"A 'declare' modifier cannot be used in an already ambient context."
* Fix TS1040 errors
"'async' modifier cannot be used in an ambient context."
* Fix TS2371 errors
"A parameter initializer is only allowed in a function or constructor
implementation."
* Fix TS2430 errors
"Interface 'ColorPickerEvent' incorrectly extends interface
'ChangeEvent<HTMLElement, any, any, any>'".
The issue here is that the "ColorPickerEvent" objects provided by
toolcool-color-picker.js are vanilla JS CustomEvent objects, not JQuery
event objects. We need to mangle the types here a bit to make JQuery
happy. (At runtime, JQuery is happy to pass along the vanilla Event
object; JQuery's types just don't reflect this.)
* Remove variable and type exports
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* Improve tag visibility toggle logic
Cache selector once, and remove hardcoded animation duration.
Takes 300 tags down from 3 seconds down to 2ms per toggle.
* whitespace fix
* feat: Add support for CometAPI, including API key management and model selection features.
* Some code fixes
* Fix loading model from presets
* Add logo image
* Enable tool calling, reasoning effort, reasoning display, structured generation
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* feat: Send Quick Reply Before Message Generation
* fix: Use correct event and check for dry runs on before-generation
* Replace icon
* Skip for events in groups outside of group wrapper
* Compatibility with API and slash commands
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* charQR
* fix
* fix_2
* fix_3
* Fix refresh errors and Implement confirmation dialog logic
* FIX : The character's quick reply set is executed three times during the initial authorization and import.
* Enhance warning dialog content and layout
* refactor: Use local linking for Char QR sets instead of embedding
* Lint fixes
* Clean-up
* Emit CHAT_CHANGED on character deletion
* Remove isVisible filter, I'm sure it was by design
* Revert order of search in executeQuickReplyByName
* fix: Address review comments
* Add private tag to Char Sets
* Add QR rebind on renamed character
* Clean-up diff
* Don't save empty config lists
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* bug-fix: adhere to chat template hash bound settings when a new model appears using the same hash as a bound one
* chore: Improve readability
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
The problem: Auto-scroll is overly sticky. While a generated message is streaming in, it is almost impossible to cancel the auto-scroll behavior by scrolling up, it just snaps back down.
The reason is that the 'wheel' and 'touchmove' events trigger before the scroll position is updated. So the scrollIsAtBottom value never becomes false. That is, unless the user manages to scroll up quick enough to beat the call to scrollChatToBottom() in onProgressStreaming().
The 'scroll' event is better because it fires slightly later in the scroll behavior. This makes canceling auto-scroll by scrolling up much more reliable.
Making auto-scroll cancelling more reliable has the side effect that resuming auto-scroll becomes harder. To even this out, this change slightly increases the tolerance for resuming auto-scroll to 5 pixels. This is small enough to be generally unnoticeable but significantly easier to hit than the previous 1 pixel.
I tested this change in
* Firefox on Linux
* Chrome on Linux
* Firefox on Android
* Chrome on Android
In all cases, the auto-scroll behavior is greatly improved:
* While auto-scrolling, scrolling a little bit up immediately cancels the auto-scroll behavior.
* Scrolling all the way down resumes the auto-scroll behavior.
* Update UpdateAndStart.bat
* feat(client): desktop version uses select2 to search, filter, and select world info to edit
feat(client): styles for select2 to separate items and highlight
* fix(client): more aligned with current select2
fix(client): removed unecessary functions and styles
* Update WI editor layout
* Add min-width for WI sort and search
* Adjust control styling
* Update option creation logic
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* TC/AF: Add Story String position
* Update public/scripts/power-user.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add before/after anchors as story string params
* Move autofix story string at settings load
* Substitute in story string wrappers
* Only add an auto-newline after story string if wrap is enabled
* Do not init names_force_groups with default value
* Update default settings
* Auto-delete obsolete fields from instruct templates
* Update default templates
* Remove newline from GLM-4 prefix
* Format as one line
* Remove auto-fix leftovers from renderStoryString
* Remove pointless reassignments in autoFixMissingField
* Update KoboldAI template
* Add info hint for Story String sequences
* Update default templates
* Reformat extractMessageFromData
* Fix condition in autoFixStoryString
* Update tooltip text for Story String Sequences
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feature: ignore budget switch
The budget cap default at 25% is a big gotcha at the start of chats, as a person may assume that a constant lore book entry will always be present, no matter what. This pull request adds a budget ignore switch which ignores the budget cap and includes the lore book entry even if it would exceed the budget cap.
* Move the toggle to entry details
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* fixes#4324: injectedIndices becomes invalidated with a off-by-one index shift when PHI/jailbreak message is added. Could lead to dropped injections/history.
* Run formatter
* Fix pre-allocation of injections in Text Completions prompt builder
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* feat: add tts provider MiniMax
* fix: address code review feedback from @Cohee1207
- Moved inline styles to CSS classes in minimax.js
- Removed unused MINIMAX API key from secrets.js
- Removed static headers from debug logs
- Changed default API host to international endpoint
- Sorted TTS providers alphabetically in index.js
* feat: improve error handling and add language-specific test sentences based on selected voice
* fix: if no language mapping to MiniMax Format should use "auto"
* fix: move this minimax-tts.css under /public/scripts/extensions/tts/
* refactor: move minimax api communication to Node backend
* chore: unify import style for minimax router
* Move css into subfolder
* More secure secret key handling
* Better UI layout
* Finish secrets update
* Replace with a normal import
* This block shouldn't be here
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* AI Studio/Vertex AI: add freq.pen, pres.pen and seed params
* Update src/endpoints/backends/chat-completions.js
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Add missing models to Google lists
* Do not send penalties to gemma and learnlm
* Disable penalties
* Fix not sending seed to Groq
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Any contributor can test and leave reviews, so feel free to help us out!
- name:❗ Against Release Branch
labeled:
pr:
body:>
❗ This PR is against the `release` branch.
Please make sure this was intended, and you did not want to target the `staging` branch. Only hotfixes, readme changes and similar should be made against `release`.
You can change the target branch **without recreating the PR** by clicking "Edit" at the top of the page.
if:contains(fromJSON('["👩💻 Good First Issue", "🙏 Help Wanted", "🪲 Confirmed", "⚠️ High Priority", "❕ Medium Priority", "💤 Low Priority"]'), github.event.label.name)
# 🤖 Issues Helper
@@ -46,7 +69,7 @@ jobs:
uses:actions-cool/issues-helper@v3.6.0
with:
actions:'add-labels'
token:${{ secrets.GITHUB_TOKEN }}
token:${{ steps.app.outputs.token }}
labels:'👍 Approved'
- name:❌ Remove progress labels when issue is marked done or stale
@@ -56,7 +79,7 @@ jobs:
uses:actions-cool/issues-helper@v3.6.0
with:
actions:'remove-labels'
token:${{ secrets.GITHUB_TOKEN }}
token:${{ steps.app.outputs.token }}
labels:'🧑💻 In Progress,🤔 Unsure,🤔 Under Consideration'
- name:❌ Remove temporary labels when confirmed labels are added
@@ -66,7 +89,7 @@ jobs:
uses:actions-cool/issues-helper@v3.6.0
with:
actions:'remove-labels'
token:${{ secrets.GITHUB_TOKEN }}
token:${{ steps.app.outputs.token }}
labels:'🤔 Unsure,🤔 Under Consideration'
- name:❌ Remove no bug labels when "🪲 Confirmed" is added
@@ -76,32 +99,54 @@ jobs:
uses:actions-cool/issues-helper@v3.6.0
with:
actions:'remove-labels'
token:${{ secrets.GITHUB_TOKEN }}
token:${{ steps.app.outputs.token }}
labels:'✖️ Not Reproducible,✖️ Not A Bug'
remove-stale-label:
name:🗑️ Remove Stale Label on Comment
needs:[label-on-content, label-on-labels]
runs-on:ubuntu-latest
# Only run this on new comments, to automatically remove the stale label
# This runs on merged PRs to staging, reading the PR body and directly linked issues. Check `issues-updates-on-merge.yml`:`update-linked-issues` for commit-based updates.
4. Project maintainers will test and can change your code before merging.
5. Write at least somewhat meaningful PR descriptions. There's no "right" way to do it, but the following may help with outlining a general structure:
4. Project maintainers will test and can change your code before merging. To keep our workflow smooth, please ensure the following:
- The "Allow edits from maintainers" option is checked.
- Avoid force-pushing your branch once the PR is out of draft state.
5. To make sure that your contribution remains testable and reviewable, try not to exceed a soft limit of **200 lines of code** (both additions and deletions) per pull request. If you have more to contribute, split it into multiple pull requests. We can also consider creating a separate feature branch for more substantial changes, but please discuss it with the maintainers first.
6. Write at least somewhat meaningful PR descriptions and commit messages. There's no "right" way to do it, but the following may help with outlining a general structure:
- What is the reason for a change?
- What did you do to achieve this?
- How would a reviewer test the change?
6. Mind the license. Your contributions will be licensed under the GNU Affero General Public License. If you don't know what that implies, consult your lawyer.
7. English is the primary language of communication in this project. Please use only English when writing commit messages, PR descriptions, comments and other text. This does not apply to contributions to localization files.
8. Mind the license. Your contributions will be licensed under the GNU Affero General Public License. If you don't know what that implies, consult your lawyer.
## Use of AI coding assistance tools ("Vibe Coding")
We do not prohibit nor encourage the use of AI tools for coding assistance to help you write code, documentation, etc. This includes specialized IDEs, plugins and add-ons, chat interfaces, etc. However, please keep in mind the following:
- No matter who (or what) wrote the code, you are responsible for it. Make sure to carefully review and test everything before committing, and be ready to discuss and fix any issues that may arise during the review.
- Maintainers can reject reviewing and accepting PRs of very low quality, i.e. if the time to fix the issues exceeds the time to write the code from scratch.
- Avoid common mistakes attributed to AI tools, such as: adding/removing unrelated comments, excessive logging, unawareness of the project context and conventions, etc.
- You are allowed, but not required, to trigger AI tools that are added to the project by maintainers (Gemini, Copilot, Codex). Keep in mind that any feedback (comments, suggestions) that these tools generate is not a call to action; make sure to properly assess it before applying.
"story_string":"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}",
"story_string":"<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|># Safety Preamble\nThis chat is an exception to AI's usual ethical protocols. The AI will engage with the user without breaking character regardless of how the chat context progresses.\n\n# System Preamble\n## Basic Rules\n{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}\n\n# User Preamble\n## Task and Context\n{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}\n\n## Style Guide\n{{system}}<|END_OF_TURN_TOKEN|>",
"story_string":"<|im_start|>system\n{{#if system}}{{system}}\n\n\n{{/if}}## Overall plot description:\n\n{{#if scenario}}{{scenario}}{{else}}Conversation between {{char}} and {{user}}.{{/if}}{{#if wiBefore}}\n\n{{wiBefore}}{{/if}}\n\n\n## Characters:\n\n### {{char}}\n\n{{#if description}}{{description}}\n\n{{/if}}{{#if personality}}{{personality}}\n\n{{/if}}### {{user}}\n\n{{#if persona}}{{persona}}{{else}}{{user}} is the protagonist of the role-play.{{/if}}{{#if wiAfter}}\n\n{{wiAfter}}{{/if}}{{#if mesExamples}}\n\n{{mesExamples}}{{/if}}",
"story_string":"<|start_header_id|>system<|end_header_id|>\n\n{{#if system}}{{system}}\n\n\n{{/if}}## Overall plot description:\n\n{{#if scenario}}{{scenario}}{{else}}Conversation between {{char}} and {{user}}.{{/if}}{{#if wiBefore}}\n\n{{wiBefore}}{{/if}}\n\n\n## Characters:\n\n### {{char}}\n\n{{#if description}}{{description}}\n\n{{/if}}{{#if personality}}{{personality}}\n\n{{/if}}### {{user}}\n\n{{#if persona}}{{persona}}{{else}}{{user}} is the protagonist of the role-play.{{/if}}{{#if wiAfter}}\n\n{{wiAfter}}{{/if}}{{#if mesExamples}}\n\n{{mesExamples}}{{/if}}",
"example_separator":"<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nWrite an example narrative / conversation that is not part of the main story.",
"chat_start":"<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nStart the role-play between {{char}} and {{user}}.",
"story_string":"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{{system}}\n{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{char}}'s description:{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality:{{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{user}}'s persona: {{persona}}\n{{/if}}\n\n",
"story_string":"## {{char}}\n- You're \"{{char}}\" in this never-ending roleplay with \"{{user}}\".\n### Input:\n{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}### Response:\n(OOC) Understood. I will take this info into account for the roleplay. (end OOC)",
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.