Commit Graph

1922 Commits

Author SHA1 Message Date
Cohee 8da417b0ea Merge branch 'release' into staging 2025-11-23 17:13:21 +02:00
Cohee 236a3b1c2d Save metadata immediately upon closing overrides dialog 2025-11-23 17:05:29 +02:00
Cohee 4b77cb8583 Scroll down on swipe gen cancellation 2025-11-23 16:16:02 +02:00
Cohee d04aaec7cf canDeleteSwipe = power_user.confirm_message_delete
Fixes #4799
2025-11-23 15:54:27 +02:00
Cohee fad9baa587 canDeleteSwipe = power_user.confirm_message_delete
Fixes #4799
2025-11-23 01:47:45 +02:00
Cohee 2467688208 waitForFrame in scrollChatToBottom in sync scenarios #4791 2025-11-22 22:43:13 +02:00
DeclineThyself ffe17bb870 Fixed layout thrashing when Stream Fade-In and Auto-scroll Chat are enabled. (#4791)
* Scheduling scrollChatToBottom after the animation frame prevents layout thrashing.

https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame#return_value
https://gist.github.com/paulirish/5d52fb081b3570c81e3a#file-what-forces-layout-md

* Make frame request optional

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-22 15:58:23 +02:00
Cohee 9f7677c04b Check for message being edited in beforeunload 2025-11-21 15:47:00 +00:00
Leandro Jofré e8a75c3329 Feat/Link sampler selection lock to TC API Type (#4782)
* 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
2025-11-21 01:57:23 +02:00
Cohee 2d9b0ad0a9 Don't parse inline images from reasoning blocks 2025-11-20 21:46:21 +02:00
Cohee b10f680371 Preserve media playback state when running appendMediaToMessage (#4771)
* 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
2025-11-16 21:56:53 +02:00
Wolfsblvt 81367629fe Feat: Improve multiline input handling in popups (#4756)
* 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
2025-11-12 21:20:13 +02:00
Cohee 38679897c6 Add captioning for video attachments (#4749)
* 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
2025-11-08 02:07:28 +02:00
Cohee 2577e35c0b Audio media attachments (#4741)
* 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
2025-11-05 00:53:23 +02:00
Cohee 447c271b36 Fix type error in escape key handler 2025-11-03 22:57:44 +02:00
fathom0324 73c1bc2d03 Prevent Esc from closing editor during composition (#4738)
* 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>
2025-11-03 21:26:17 +02:00
Cohee c04be57f84 Support multiple images in single API response (#4734)
* 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
2025-11-03 00:30:36 +02:00
Cohee c14fba8829 Add scroll behavior options for media appending 2025-11-02 23:27:34 +02:00
Cohee a47b371702 Fix scrolling behavior 2025-11-02 23:03:11 +02:00
DeclineThyself d1035336a8 Fixed bug in syncMesToSwipe. "" is falsy and a valid message. (#4733)
* Fixed bug in `syncMesToSwipe`.

* Use strict inequality operator

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-02 20:16:09 +02:00
Cohee de7c113346 Multiple attachments (#4719)
* 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>
2025-11-02 20:10:43 +02:00
Cohee 60a8b51951 Unblock textarea send during edit (#4714) 2025-10-30 19:43:53 +02:00
docfail 5f35a38963 Remove unnecessary check for swipe info to fix #4717 (#4718)
* - 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.
2025-10-30 00:27:30 +02:00
docfail dd758161bd Add Full Support for BYAF Archives (#4701)
* + 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>
2025-10-29 20:06:53 +02:00
docfail 47f744dfdf Character settings overrides UI (#4707)
* + 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>
2025-10-28 21:57:52 +02:00
DeclineThyself 6757a0375b Refactored mes_edit_up and mes_edit_down into messageEditMove. (#4704)
* Refactored `mes_edit_up` and `mes_edit_down` into `messageEditMove`.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4704#pullrequestreview-3385227819

* Fixed https://github.com/SillyTavern/SillyTavern/pull/4704#pullrequestreview-3385647876 and refactored `updateEditArrowClasses`.

* Update this_edit_mes_id in messageEditMove

* Don't set this_edit_mes_id if unset

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-28 20:31:06 +02:00
Cohee 4add4f0090 Add official GLM API as CC provider (#4678)
* 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
2025-10-21 22:37:27 +03:00
Cohee 3e7b511af2 fix: return debounced save in deleteMessage 2025-10-21 20:16:30 +03:00
Cohee 593fba5700 Refactor message edit function (#4679)
* 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
2025-10-20 21:16:38 +03:00
DeclineThyself 20556aa3dd Refactored swipe and moved messageEdit to a separate function. (#4610)
* Extracted `messageEdit` and `messageEditCancel` from `.mes_edit` and `.mes_edit_cancel`

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4633#discussion_r241505
https://github.com/SillyTavern/SillyTavern/pull/4633#pullrequestreview-3316588180

* Refactored `swipe` and moved `messageEdit` to a separate function.
Also, a few more minor changes.

* Fixed bug.
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2404789035
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2404789038

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408682277
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408689706
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408690772
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408697066
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408705156
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408708088
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408725971
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408726241
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408740050
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408745918
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408753165
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408761262
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408764531
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408781694
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408784426
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408794672
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408802366
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408803433

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408702506

https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408805635

https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2410368443

https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408791120

* Bugfixes. Incomplete.

* Fix formatting

* Use scrollTop because scrollIntoView breaks layout on phones.

* Only show '?' in `formaSwipeCounter` if something is wrong.
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2412169005

* Respect animation_duration if it's >= 0.

* Disabled expandNewMessage's animation on Cohee's request. https://github.com/SillyTavern/SillyTavern/pull/4610/files#r2408731744

* Only hide the swipe counter when a generation is ongoing.
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2440588779

* refreshSwipeButtons

* Adjust swipeDuration constant

* feat: add refreshSwipeButtons and isSwipingAllowed to context

* Fixed image swipes.

https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2442489827

https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2442490042

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4610#issuecomment-3418657967

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2442480238

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2442536011

* Minor refactor.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2443359660 https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2443359435

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2443357913

* Fix registration of click events

* Fix passing data to swipe events

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-20 20:51:33 +03:00
Cohee 5c62c3a90d feat: add move up/down functionality for alternate greetings (#4676)
* feat: add move up/down functionality for alternate greetings

* Remove disabled cursor style
2025-10-19 16:46:19 +03:00
Cohee 5eb43e45b6 fix: set metadata tainted flag on swipe deletion 2025-10-18 19:15:43 +03:00
Cohee 94ba7bcf2d fix: /cut of the first displayed message 2025-10-18 17:14:55 +03:00
Cohee ea3c5029c6 fix: prevent swipe deletion from /del command 2025-10-18 16:33:27 +03:00
bmen25124 dcab740b99 Added deleteMessage method (#4666)
* Added deleteMessage

* Simpler swipeDeletion param

* Added to context

* Fix review comments

* Only offer swipe deletion if count of swipes > 1

* Improve array check

* Fix generation broken after message deleted

* Use named constant for confirmation result

* Save chat immediately

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-17 22:08:46 +03:00
Cohee d08f3a2eef Allow blockquotes with encoded tags (#4662)
* Allow blockquotes with encoded tags
Fixes #4634

* Cache canUseNegativeLookbehind result

* Optimize regex allocation
2025-10-17 19:42:10 +03:00
Cohee 41c048ed35 Fix formatting in messageEditCancel 2025-10-16 23:30:15 +03:00
DeclineThyself 37271ddad4 Extracted messageEdit and messageEditCancel from .mes_edit and .mes_edit_cancel (#4633)
* Extracted `messageEdit` and `messageEditCancel` from `.mes_edit` and `.mes_edit_cancel`

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4633#discussion_r241505
https://github.com/SillyTavern/SillyTavern/pull/4633#pullrequestreview-3316588180

* Fixed..
https://github.com/SillyTavern/SillyTavern/pull/4633#issuecomment-3383321321
https://github.com/SillyTavern/SillyTavern/pull/4633#pullrequestreview-3316602505

* Fixed...

* Fixed....
https://github.com/SillyTavern/SillyTavern/pull/4633#discussion_r2415124843
https://github.com/SillyTavern/SillyTavern/pull/4633#discussion_r2415124845

* Fix type conversion errors

* Fix type error

* Fix being unable to close message edit on first message with escape

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4633#issuecomment-3412364573

Another bug found (sorry):
Open edit on the last message, move it up, then move it back down. Swipe buttons appear, as far as I understand your intention, they shan't.

* showSwipeButtons: return early if message edit is open

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-16 23:20:47 +03:00
Cohee 87d33b4d0b Highlight just imported chats in the list 2025-10-15 01:12:29 +03:00
Cohee 3234045d64 Add bulk and drag&drop to chats import (#4652)
* Add bulk and drag-drop to chats import

* Perform list refresh only once
2025-10-15 00:43:30 +03:00
Cohee 0748af59e3 Fix missing swipe_info on first messages 2025-10-13 01:16:06 +03:00
Cohee a559f45ad4 Fix off-by-one cases in user prompt filler logic (#4648)
* 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
2025-10-12 23:36:17 +03:00
Cohee df8f2a477a feat: prevent scrolling of containers when using focused number inputs (#4629)
* 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>
2025-10-10 21:42:44 +03:00
Wolfsblvt 74ff23ec0c fix: remove focus call before keyup event dispatch that traps cursor (#4607) 2025-10-06 23:25:49 +03:00
Wolfsblvt 9463d1a152 Reprint non-tainted group chat on switching personas (#4603)
* 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>
2025-10-06 22:45:26 +03:00
DeclineThyself befb2ffb78 deleteSwipe now emits the deleted message Id. (#4609)
* deleteSwipe now emits the deleted message Id.

* Fixed:

this_edit_mes_id can be a string (don't ask). Either wrap it in parseInt or Number function
https://github.com/SillyTavern/SillyTavern/pull/4609#discussion_r2405534766

I think it's better to use messageId in naming. Most of weirdly abbreviated params and variables come way back from TavernAI code.
https://github.com/SillyTavern/SillyTavern/pull/4609#discussion_r2405537550

* Revert outside number conversions

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-06 22:10:13 +03:00
StageDog aa699a3f93 feat: emit dryRun when GENERATE_AFTER_DATA (#4614) 2025-10-06 22:04:04 +03:00
Wolfsblvt 39fd16fe86 Fix not jumping twice to group chat when creating a new group chat with deleting the old one (#4602)
* 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>
2025-10-06 11:25:38 +03:00
Wolfsblvt a65f708fd8 Allow create new world books via /getpersonabook and /getcharbook (#4597)
* 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>
2025-10-05 16:41:54 +03:00
Wolfsblvt 23b1360204 fix: add optional chaining to prevent undefined error when accessing first_mes (#4601) 2025-10-05 01:41:04 +03:00