Compare commits

..
504 Commits
Author SHA1 Message Date
Cohee 1c0e7ea955 Merge pull request #4925 from SillyTavern/staging
Staging
2025-12-28 18:28:51 +02:00
Ngo Dinh Gia BaoandCohee 829db7f2d0 [Electron Hub] Prompt Caching Support for Claude models (#4918)
* Prompt Caching support Claude models

* Prompt Caching support Claude models

* Diff clean-up

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-28 17:05:54 +02:00
Cohee bb53da4c09 add missing zai vision models 2025-12-27 23:07:57 +02:00
Cohee 1f0c0ccff4 Add message-role command 2025-12-27 21:21:39 +02:00
SammyandCohee 9a1ded5202 Allow editing of global Worldinfo settings (#4921)
* create and export updateWorldInfoSettings

* Add WorldInfoSettings type and refactor updateWorldInfoSettings function

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-27 20:08:29 +02:00
equal-l2andCohee d46fd60a57 Fix OpenRouter compatibility for OpenAI models (#4917)
* Fix OpenRouter compatibility for OpenAI models

* Don't disable o1 streaming on OpenRouter

* Fix OpenRouter compatibility for o1 model handling

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-27 18:44:37 +02:00
Cohee 8b94180bba 1.15.0 2025-12-27 17:25:43 +02:00
Ben 3668e95d95 filter out models that don't have a valid id (#4920) 2025-12-27 02:33:25 +02:00
Cohee 11337d40ef Fix chutes status check 2025-12-27 01:39:48 +02:00
Cohee a14b0855ee Allow getting current name in message-name 2025-12-27 01:28:56 +02:00
AphidGitandCohee af495cefbd chchar slash cmd (#4916)
* Add an additional slash command to change a message's character and avatar.

* Refactor message character change command to update message sender's name

* Fix default value

* Allow setting unbound message names

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-27 01:24:00 +02:00
Cohee e7c9496a61 Fix: add missing quotes to index.html 2025-12-27 00:13:39 +02:00
9nbf7c4q6b-lgtmandCohee 3098c4c5bf Comfyui serverless runpod image generation (#4891)
* Add comfyrunpod generation endpoints.

Get a bunch of settings added.

Probably get runpod api secret stored properly.

sending to runpod.

Correct workflow wrapping for runpod.

* Reuse comfyui workflow setting block for runpod.

* Update API key url to point to runpod settings

* Remove debug print.

* Combine normal and runpod comfyui generation functions

* Remove unused server endpoints for runpod.

* Remove debug prints from server.

* Remove redundant switch case.

* Check for url to see if image generation is possible for comfy and comfy runpod.

* lint

* Correct/update doc comments.

* Make runpod serverless a sub-type under comfyui source in the UI.

* Set comfy_type in stable-diffusion defaultSettings

* Allow loading comfy workflows even if url isnt set yet.

* Change default runpod url to template example

* Rename runpod api key to comfy_runpod

* Handle default switches separately from standard now that default setting is ensured.

* Update runpod api key name on server.

* Move example runpod url to placeholder.

* lint

* Remove incorrect comment.

* Hide toasts remote models toasts

* React to key updates

* Add type annotation for data and improve workflow handling in generate endpoint

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-24 23:37:57 +02:00
DeclineThyselfanduser bff6ab3cb7 Updated Avatar Style and Hide Chat Avatars title text. (#4908)
* Added an option to hide message avatars in `User Settings > UI Theme`.

* Deprecated the `Hide Chat Avatars` toggle.
Moved the option to hide message avatars to `User Settings > UI Theme > Avatars`.

* Revert "Deprecated the `Hide Chat Avatars` toggle."

This reverts commit 6f616767cc.

* Moved `Hide Chat Avatars` next to `Avatar Style`, added title text.

* Reverted changes.

---------

Co-authored-by: user <user@exmaple.com>
2025-12-24 16:38:25 +02:00
my-alt 29456b9bd2 Enhance text generation API to support model parameter for llama.cpp router mode. Update getStatusTextgen to include model in request body and improve context size handling. (#4914) 2025-12-24 16:30:45 +02:00
Cohee 432639e341 Disable macro engine init traces 2025-12-23 02:45:28 +02:00
Cohee 373da39bf4 Add select2 style for NanoGPT list
Closes #4911
2025-12-23 00:09:39 +02:00
Cohee 0539583197 Add glm-4.7 model option and context mapping for Z.AI 2025-12-22 23:14:09 +02:00
my-altandCohee 7f98e3e213 Add model selection support for llama.cpp router mode (#4910)
* Add model selection support for llama.cpp router mode

- Add llamacpp_model setting to textgen-settings.js
- Implement loadLlamaCppModels() function to fetch and populate models
- Add onLlamaCppModelSelect() handler for model selection
- Update status check to load llama.cpp models when connecting
- Update getTextGenModel() to return selected llama.cpp model
- Add model dropdown to HTML UI in llama.cpp section
- Initialize event handlers and Select2 for better UX
- Add llamacpp_model to preset manager for save/load support
- Add llamacpp_model to slash commands support

This implements model selection for llama.cpp router mode, allowing
users to select from multiple models without restarting the server.
Follows the same pattern as Ollama, Tabby, and vLLM implementations.

* Correct spelling

* Fix clear selection position

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-21 22:51:44 +02:00
Cohee 39cc1b9039 Update GitHub links to llama.cpp 2025-12-21 21:13:13 +02:00
Chanho Chung ca43796795 Add caching system prompt feature for OpenRouter Gemini (#4903)
* feat: add caching system prompt for OpenRouter Gemini

* fix: resolve reviews
2025-12-20 19:01:42 +02:00
Cohee c75df956c5 Refactor ElevenLabs TTS API key handling (#4906)
* Refactor ElevenLabs TTS API key handling #4483

* Remove unused connection button and related event handler from ElevenLabs TTS provider

* Add ElevenLabs STT endpoint
2025-12-20 18:37:59 +02:00
Cohee 0dd32775d6 Add 'setspriteoverride' optional 'name' argument 2025-12-19 20:38:29 +02:00
Cohee 83ea6e5cbf Better thonk effort for Gem 3 2025-12-18 21:40:52 +02:00
Cohee 6fccccca6d OpenRouter: add as image generation source 2025-12-18 21:17:01 +02:00
Cohee b370808753 Migrate substituteParams calls to new engine (#4901) 2025-12-18 00:01:08 +02:00
Cohee c92939e56c Z.AI: Video inlining and 'coding' captions
Closes #4899
2025-12-17 23:31:14 +02:00
Cohee 995fa10fa4 gpt-image-1.5 2025-12-17 23:06:34 +02:00
mightytribbleandCohee 2cd2bd4a4d Implement Gemini thought signatures (#4886)
* Implement Gemini thought signatures

* Implement streaming support for Gemini thought signatures

* Implement OR support for Gemini thought signatures

* Remove unnecessary extraction of thought sigs from response parts

* Update thought sig comments to remove explicit Gemini mention

* Fix thought_signature naming convention in message.extra

* Add thought_signatures to ReasoningMessageExtra typedef

* Prevent thought sigs being sent to incompatible endpoints

* Move signatures to populateChatHistory, update for consistent casing

* Code clean-up

* Only send thought signatures if target model and API match original

* Implement content-hash thought signature mapping

* Change the data model + split for text/functions

* Don't include signature to invocations if the model doesn't match

* Fix function description

* Remove misleading comment

* Handle OpenRouter signatures

* Improve message extra types

* Prevent modifying original invocations when removing signatures

* Fix return of openrouter non-streaming signatures

* Remove redundant array check

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-17 22:23:47 +02:00
Cohee 5accfbc5d8 Gemini: add media resolution select (#4775) 2025-12-17 20:46:02 +02:00
Cohee 081c3e7b1c jerma 3 flash 2025-12-17 20:35:00 +02:00
Cohee 8fa01d3df9 Update Mistral V7-Tekken
Fixes #4826
2025-12-17 00:41:04 +02:00
Cohee 48089598b6 OpenAI: gpt-image-1-mini 2025-12-17 00:17:13 +02:00
Cohee bb3ea08b5a Z.AI: Add image generation and web search (#4895)
* Z.AI: Add image generation

* Z.AI: Add web search endpoint

* Add image URL validation

* Combine validation conditions
2025-12-16 00:39:17 +02:00
Wolfsblvt 000fbccda9 Optimize {{pick}} macro by caching content hash in MacroEnv 2025-12-15 22:08:59 +01:00
6f8b6b098e Macros 2.0 (v0.3) - Replacing the existing Macro System with a new Macro Engine (#4820)
* Chevrotain lib and env setup

* First draft of the macro lexer

* fix ESLint types loading for chevrotain

* Cleaner lexer modes

* Readme link to Chevrotain & license

* Add jsconfig to tests folder

- Add jsconfig.json to tests folder, to prevent IDE errors on dynamic imports inside the page.evaluate execution.

* Slight improvements on lexer & first tests

* Add more lexer tests

* More edge cases tests

* Reorder tests

* Add macro execution modifiers + more tests

- Added macro flags (execution modifiers) to lexer
- Fixed some lexing issues
- Expanded lexer tests
- Treat lexer errors as failed test

* enable eslint for tests and run it

* Fix lexing unknown flags - treat as error

* Rewrote lexer modes/tokes to capture errors better

* Add lexing for output modifiers

* Clearer names for lexer tokens

* Increase tests default timeout

* Restructure lexer error testcases

* Allow legacy underscores in macro identifiers

* Test case for legacy single-colon syntax

* Improve lexer, removing warnings

* Basic setup for MacroParser + initial tests

* Make parser errors testable

* Add macros stuff to SillyTavern.getContext

* macros test case naming + lint

* Parser consumes basic macros

- Fix lexer mode names
- Add basic macro parsing (identifier, and arguments)
- Tests: basic macro parsing tests
- Tests: simplifyCstNode supports ignoring nodes, or flattening nodes to just plaintext

* Improve macro argument parsing to allow colons in values

Enhances separator handling by fixing separator type detection and enabling colon characters within argument values
Updates validation to require at least one argument component and adds error cases for empty arguments
Includes expanded test coverage for mixed separator scenarios and edge cases

* More nested macro tests

Add error case tests to enforce macro start position requirements
Include nested macro parsing scenarios and invalid syntax checks
Ensures parser correctly handles edge cases with embedded macros

* Unvendor chevrotain

* Add document rule

* Implement visitor, switch built-ins to new type

* Puppeteer -> playwright

* Revert "Implement visitor, switch built-ins to new type"

This reverts commit 706a94b4de.

* Converted puppeteeer tests

* File rename

* chore: reduce Playwright worker count to 4 for performance/stability

* test: add comprehensive legacy macro parser test suite

- Added 13 test cases covering legacy macro formats (roll, reverse, comment, datetime, time_UTC, banned, setvar)
- Documented parser limitations with TODO comments for whitespace separators, special characters, and empty arguments
- Tests validate parsing of various separator styles (space, colon, +/-) and argument formats (quoted, numeric, empty)

* fix: handle legacy macro syntax with colon or whitespace separator

- Modified arguments rule to support both double-colon (::) and single-colon (:) separators
- Made single-colon separator optional to allow whitespace-separated legacy macros
- Removed TODO comments as parser now correctly handles legacy macro formats

* feat: support space-separated quoted arguments in macro parser

- Added parsing support for equals signs and quotes as valid argument tokens
- Removed TODO comments for legacy macro parsing with quoted arguments

* fix: improves macro argument parsing with colon handling

Enhances parser to correctly handle double colons within legacy single-colon arguments
Introduces separate parsing rules for arguments with different colon constraints
Adds test coverage for arguments containing double colons in legacy format

* fix: allow empty macro arguments after double-colon separator

- Changed argument rule from AT_LEAST_ONE to MANY to permit zero-length arguments
- Updated tests to verify empty argument parsing (e.g., `{{something::}}`)
- Enhanced simplifyCstNode helper with default flatten/ignore keys and improved null handling

* refactor: improve test documentation with inline macro display

- Added inline comments showing the actual macro syntax being tested for better readability
- Removed duplicate comment in error test case
- Cleaned up extra whitespace in legacy macro tests

* feat: add legacy macro preprocessing for time offset format

- Implemented preProcessFixLegacyMacros method to convert {{time_UTC±N}} to {{time::UTC±N}} format
- Updated tests to use new preprocessing step for legacy time macro parsing
- Added runPreProcessFix option to test helper functions for controlled legacy macro handling

* feat: add support for comment macros with double-slash syntax

- Added `DoubleSlash` token to lexer to recognize `//` as a valid macro identifier
- Updated parser to accept either `//` or standard identifiers as macro names
- Enhanced test suite with comprehensive comment macro test cases including multiline support

* feat: implement macro evaluation engine with CST walking and registry integration

(I'm tired, let's just throw this in right now)

- Added CST walker and macro registry to engine initialization
- Enhanced parseDocument to handle empty input, legacy macro preprocessing, and error collection
- Implemented async evaluate method with full macro resolution pipeline
- Added resolveMacro callback to handle unknown macros and registry execution
- Integrated lexing/parsing error handling with console warnings
- Added support for preserving unknown macro

* refactor: improve type safety and code clarity in macro evaluation system

- Simplified typedef imports to use correct Chevrotain types (CstNode, IToken)
- Added TokenRange typedef for consistent offset handling
- Enhanced error messages with context-specific prefixes
- Replaced verbose type casts with inline JSDoc annotations
- Condensed singleton pattern declarations to single lines
- Improved null safety with optional chaining and nullish coalescing
- Extracted resolveMacro logic into private root function

* fix test macro whitespace arguments onls accepting one argument

* Fix OpenRouter embeddings URL
#4736

* Fix: Prevent data loss on bulk regex move to scoped scripts (#4760)

* Fix: Prevent data loss in regex bulk move

* prevents moving to scoped scripts with group selected for bulkedit

* Refactor: make whitelist validation a bit more robust (#4757)

* 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

* 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

* Fix npm audit

* feat: add max-height and scrolling to world entry key input fields (#4769)

- 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

* Bump anti-troll tags limit
Closes #4763

* OpenAI: Add Sora 2 API (#4748)

* OpenAI: Add Sora 2 API

* Add duration control

* Support client generation abort

* Reduce poll log amount

* Simplify selector

* Simplify model-specific control handling

* Gemini: Pass non-success response content to frontend

* Vertex: Add Vertex AI-specific safety setting (#4770)

Closes #4455

* Feature: allows sorting tags by most used (#4768)

* add sorting tags by most used

* Fix whitespaces

* Code review updates

* Remove commented code

* Fix capitalization in comment

* Apply review suggestion

* Simplify template init

* Reformat

* Add documentation for appendViewTagToList and printViewTagList functions

* Reprint renamed tags regardless of sorting mode

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>

* Move img.swipe notice block up

* 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

* gpt-5.1

* A 500 billion dollar startup can’t filter API payload fields

* Refactor macro argument validation to use requiredArgs and list pattern

- Replace minArgs/maxArgs/enforceArity with requiredArgs and list specification
- Add MacroListSpec typedef for flexible list argument constraints (min/max)
- Rename enforceArity to strictArgs with inverted default behavior
- Update validation logic to separately track required vs. list arguments
- Add requiredArgs and list arrays to MacroExecutionContext for easier access
- Improve error messages to clearly distinguish between required and list

* Refactor MacroRegistry.registerMacro to use options object pattern

- Move handler function into options object as required property
- Improve validation with detailed error messages for all option fields
- Add explicit type checking for requiredArgs, list, strictArgs, and description
- Consolidate name normalization and validation logic
- Simplify list option parsing with clearer conditional structure
- Update all builtin macro registrations to use new signature

* Add e2e tests for macro arity validation errors

- Test ping macro rejects calls with unexpected arguments
- Test upper macro rejects calls without required arguments
- Verify macros remain unresolved and log warnings on arity violations

* re-implement core macros as registered macros

- Create shallow frozen copy of env object before passing to macro handlers
- Add comprehensive MacroEnv typedef with nested types for names, character, system, and extra fields
- Update MacroDefinitionOptions typedef to clarify default values and mark handler as required
- Export variable manipulation functions for external use
- Fix whitespace in ifCallback JSDoc comment

* Defer slash command autocomplete initialization to firstLoadInit

- Move slash command autocomplete setup from module-level to initSlashCommandAutoComplete function
- Add null check for sendTextarea.value before accessing first character
- Import and call initSlashCommandAutoComplete in firstLoadInit sequence
- Export registerCoreMacros, registerInstructMacros, and registerVariableMacros using named export syntax
- Call registerCoreMacros from initMacros with

* Add variable manipulation functions to SillyTavern context API

- Import deleteGlobalVariable, deleteLocalVariable, addGlobalVariable, addLocalVariable, incrementGlobalVariable, incrementLocalVariable, decrementGlobalVariable, and decrementLocalVariable from variables.js
- Expose del, add, inc, and dec methods on both context.variables.local and context.variables.global objects
- Provide consistent API for variable deletion, addition, increment, and decrement operations

* Extract test setup utilities and fix trailing comma in core-macros.js

- Add testSetup utility object with goST and awaitST helper functions for Playwright tests
- Replace duplicated beforeEach setup code in MacroLexer, MacroParser, and MacroRegistry tests with testSetup.goST
- Add explanatory comments indicating tests currently run without ST context
- Fix missing trailing comma in input macro handler registration

* Refactor MacroEngine e2e tests to use real core macros instead of prototypes

- Replace prototype macros (ping, echo, upper, wrap, first) with actual core macros (newline, reverse, setvar, getvar, addvar, roll)
- Use testSetup.awaitST helper from utils.js for beforeEach setup
- Increase test timeout from 10s to 20s due to additional setup requirements
- Remove registerPrototypeMacros import and registration logic from evaluateWithEngine
- Add page.waitForTimeout(1000) to ensure macros are fully initialize
- Remove now obsolete MacroBuiltins.js

* Fix audit in tests

* Rename frontend test utils file to frontent-test-utils.js and update imports

- Rename tests/frontend/utils.js to tests/frontend/frontent-test-utils.js
- Update testSetup imports across MacroEngine, MacroLexer, MacroParser, and MacroRegistry e2e tests

* Refactor MacroRegistry for improved readability and consistency

- Reorder MacroDefinition typedef fields to match registration order (handler moved to end)
- Add inline JSDoc comments to MacroDefinitionOptions properties for clarity
- Simplify name validation logic in unregisterMacro, hasMacro, and getMacro methods using early returns
- Extract argument validation logic into dedicated isArgsValid helper function
- Refactor executeMacro to be async and use Promise.resolve for consistent promise handling

* Add returns field to MacroDefinitionOptions for documenting macro return values

- Add returns property to MacroDefinitionOptions typedef with string type and null default
- Include returns field in MacroDefinition typedef
- Store returns value in macro definition object for documentation purposes

* Add error handling to macro execution and refactor core macro handlers

- Add catch handler in MacroRegistry.executeMacro to log errors and return empty string on handler failures
- Update macro descriptions to use "index" instead of "ID" for message position macros
- Simplify reverse macro description and remove redundant null coalescing
- Add strictArgs: false to comment macro to ensure it's always removed
- Enhance time macro description with UTC offset examples
- Remove unnecessary null check

* Refactor instruct-macros.js for consistency and reduce code duplication

- Rename enabled helper to instEnabled and add sysEnabled helper for clarity
- Consolidate defaultSystemPrompt, instructSystem, and instructSystemPrompt into single registerSimple call
- Simplify systemPrompt handler by removing unnecessary null coalescing and intermediate variables
- Convert chatSeparator and chatStart macros to use registerSimple helper
- Fix JSDoc comment formatting for registerSimple helper function

* Add normalize helper to MacroExecutionContext and refactor variable macros for consistency

- Add normalizeMacroResult method to MacroEngine for converting macro results to strings
- Include normalize function in MacroExecutionContext for handler use
- Update normalizeMacroResult to handle arrays explicitly alongside objects
- Add returns field to variable macros that produce side-effects only
- Refactor variable macro handlers to use destructuring and normalize helper
- Remove redundant null checks an

* chore: Remove duplicate getglobalvar macro registration from variable-macros.js

- Remove redundant getglobalvar macro definition (already registered earlier in the file)
- Import MacroEngine in MacroRegistry for normalizeMacroResult access
- Add fallback binding for normalize in MacroExecutionContext when not provided by caller
- Update executeMacro to use executionContext.normalize instead of standalone normalizeMacroResult
- Remove normalizeMacroResult helper function from MacroRegistry (now handled by MacroEngine)

* Add core environment macros for names, character fields, system info, and deterministic pick

- Add lastGenerationType tracking with event listeners for GENERATION_STARTED and CHAT_CHANGED
- Add ensureLastGenerationTypeTracking helper to initialize event listeners once
- Register name macros: user, char, group, groupNotMuted, notChar, charIfNotGroup
- Register character card field macros: charPrompt, charInstruction, description, personality, scenario, persona, mesExamplesRaw, charDepthPrompt, cre

* Refactor core macros into separate modules by category (env, state, chat, time)

- Move name and character card field macros to new env-macros.js module
- Move system/device/runtime state macros to new state-macros.js module
- Move chat inspection macros (lastMessage, lastMessageId, etc.) to new chat-macros.js module
- Move time/date macros (time, date, weekday, isotime, etc.) to new time-macros.js module
- Remove lastGenerationType tracking logic and helper functions from core-macros.js (moved to state

* Reorganize macro system into engine and definitions directories

- Move macro engine components (MacroEngine, MacroRegistry, MacroLexer, MacroParser, MacroCstWalker) to macros/engine/ subdirectory
- Move macro definition modules (core-macros, env-macros, state-macros, chat-macros, time-macros, variable-macros, instruct-macros) to macros/definitions/ subdirectory
- Create macro-system.js as central entry point that exports engine singletons and initRegisterMacros function
- Refactor variable-macros.js to use S

* Export getGeneratingModel function and add MacroEnvBuilder to macro system exports

- Export getGeneratingModel function from script.js for external use
- Import MacroEnvBuilder in macro-system.js
- Add envBuilder singleton to macros export object alongside existing engine components

* Extract MacroEnv typedefs into separate MacroEnv.types.js file

- Create MacroEnv.types.js with MacroEnv, MacroEnvNames, MacroEnvCharacter, and MacroEnvSystem typedefs
- Remove MacroEnv typedef definitions from MacroRegistry.js
- Update MacroRegistry.js, MacroEngine.js, MacroEnvBuilder.js, and env-macros.js to import MacroEnv from MacroEnv.types.js
- Change MacroEngine.evaluate env parameter type from any to optional MacroEnv

* Add comprehensive e2e tests for MacroEnvBuilder

- Create MacroEnvBuilder.e2e.js with 13 test cases validating environment construction
- Test name override precedence (overrides vs global fallback)
- Test character field population based on replaceCharacterCard flag
- Test original value one-shot helper function behavior
- Test group override string propagation to group/group

* Add substituteParamsAsync function with experimental macro engine support

- Create substituteParamsAsync function in script.js as async alternative to substituteParams
- Use object destructuring pattern for function parameters following RO-RO convention
- Add experimental_macro_engine flag to power_user settings for feature gating
- Add MacroEnvFunctions typedef with original and postProcess function types to MacroEnv.types.js
- Add functions property to MacroEnv typedef for one-shot helpers an

* Add dynamic macro support to MacroEngine with environment-based override and postProcess execution

- Add defOverride parameter to MacroRegistry.executeMacro for temporary macro definitions
- Check env.dynamicMacros in MacroEngine#resolveMacro and create temporary macro definition when found
- Set strictArgs to true for dynamic macros to fail if called with arguments
- Execute env.functions.postProcess on macro results in MacroEngine#resolveMacro with error handling
- Update MacroEnv typedef to make

* Refactor macro handlers to assume non-null env and remove optional chaining

- Remove optional chaining (?.) from env property access in env-macros.js and instruct-macros.js
- Change MacroExecutionContext env property from optional to required in MacroRegistry.js
- Update executeMacro context parameter from optional to required
- Simplify original macro handler to call env.functions.original() directly without try-catch
- Update MacroHandler typedef to use arrow function syntax for consistency
- Remove redundant null checks an

* Refactor MacroRegistry.executeMacro to accept MacroCall object and make MacroExecutionContext properties non-optional

- Change executeMacro to accept MacroCall object instead of separate name and context parameters
- Move normalize function from context parameter to options object in executeMacro
- Construct MacroExecutionContext from MacroCall properties within executeMacro
- Set namedArgs to null in executionContext (currently unused)
- Update MacroEngine.resolveMacro to pass MacroCall directly

* Remove normalize parameter from MacroRegistry.executeMacro and bind normalizeMacroResult directly in execution context

- Remove normalize parameter from executeMacro options object in MacroRegistry.js
- Bind MacroEngine.normalizeMacroResult directly in executionContext instead of accepting override
- Remove normalize option from MacroEngine.resolveMacro call to executeMacro
- Add missing name fields (group, groupNotMuted, notChar) to MacroEnvBuilder default env object

* Make MacroEnvRawContext properties optional and change original function from required to optional in MacroEnvFunctions

- Change MacroEnvRawContext properties from required to optional with null defaults
- Change original function from required to optional in MacroEnvFunctions typedef
- Remove original function from default env object in MacroEnvBuilder (only include when provided)

* Refactor MacroEnvBuilder tests to use optional properties and add macro arity validation tests

- Remove explicit undefined/false assignments from MacroEnvRawContext test objects (now optional with defaults)
- Rename additionalMacro to dynamicMacros in MacroEnvBuilder tests and update property access from env.extra to env.dynamicMacros
- Move original function from env.extra to env.functions in test assertions
- Remove test for additionalMacro overriding original helper (no longer applicable with

* Improve macro error handling with dedicated diagnostics and runtime error propagation

- Import and use logMacroInternalError and logMacroRuntimeWarning from MacroDiagnostics in MacroEngine
- Wrap MacroRegistry.executeMacro call in try-catch to distinguish runtime vs internal errors
- Nest postProcess execution in inner try-catch with dedicated error logging
- Return raw macro syntax on execution failure instead of empty string
- Replace console.warn with logMacroRuntimeWarning for argument count

* Add macro argument type validation with positional argument definitions and runtime type checking

- Add MacroArgType and MacroPositionalArgDef typedefs for argument metadata
- Change requiredArgs option to accept number or MacroPositionalArgDef[] array
- Add requiredArgDefs property to MacroDefinition to store normalized argument definitions
- Validate requiredArgs array elements during macro registration (name, description, type fields)
- Generate default argument definitions when requiredArgs is a

* Add e2e tests for macro type validation and dynamic macro strict arity enforcement

- Add test verifying strict typed macros fail resolution when argument type is invalid
- Add test verifying non-strict typed macros execute with invalid types but log warnings
- Add test verifying dynamic macros reject arguments due to strictArgs enforcement
- Capture and assert runtime warning messages for type validation and arity violations
- Register test macros with integer type requirements and varying strict

* Add mesExamples macro with instruct mode formatting support

- Register mesExamples macro in env-macros.js to format dialogue examples
- Import parseMesExamples, main_api, power_user, and formatInstructModeExamples
- Check instruct mode enabled state and main_api to determine formatting path
- Parse raw examples using parseMesExamples with instruct mode flag
- Return empty string when raw examples are missing or parsed result is empty
- Format examples using formatInstructModeExamples when instruct mode is active

* Add URL navigation wait in test setup and increase Playwright worker count to 4

- Add waitForURL check after user selection in awaitST to ensure navigation completes before preloader check
- Increase Playwright workers from 1 to 4 for parallel test execution

* Add e2e tests for multi-line macro arguments and comment macro functionality

- Add test verifying reverse macro handles multi-line arguments with newline characters
- Add test verifying comment macro removes single-line comments with simple body
- Add test verifying comment macro accepts non-word characters immediately after //
- Add test verifying comment macro ignores additional // sequences inside comment body
- Add test verifying comment macro supports multi-line comment bodies

* Standardize JSDoc type annotations to use explicit null defaults and union types instead of nullable shorthand

* Remove individual test timeout configurations from frontend macro test files

* Add positional argument definitions with sample values and descriptions to core, env, and time macros

- Add sampleValue field to MacroPositionalArgDef typedef (optional string)
- Replace numeric requiredArgs with positional argument definition arrays in roll, banned, outlet, datetimeformat, and timeDiff macros
- Include name, sampleValue, description, and type fields for each positional argument
- Update timeDiff description to clarify absolute difference calculation
- Remove unnecessary blank lines in

* Remove async/await from macro engine evaluation and convert all macro handlers to synchronous execution

Makes me sad, but such is life

* Refactor substituteParams to use options object signature with backward compatibility for legacy positional arguments

- Rename original substituteParams to substituteParamsLegacy with unchanged positional argument signature
- Rename substituteParamsNew to substituteParams as the new primary function
- Add automatic detection and routing of legacy positional argument calls to substituteParamsLegacy
- Update substituteParamsExtended to use new options object signature and mark as deprecated

* forgor

* fix missing import, and package-lock, finally. Maybe.

* Add experimental macro engine toggle to UI settings

- Add experimental_macro_engine setting to default settings.json
- Move experimental_macro_engine property to correct position in power_user object (with other experimental settings)
- Add checkbox UI control in settings panel with flask icon and tooltip explaining nested macro resolution and logical replacement order
- Wire up checkbox event handler to save experimental_macro_engine setting
- Load experimental_macro_engine state on settings initialization

* Refactor macro pre/post-processing from parser to engine and improve error handling

- Move legacy macro pre-processing (time_UTC format) from MacroParser to MacroEngine #runPreProcessors
- Move trim macro post-processing to MacroEngine #runPostProcessors to handle cross-boundary behavior
- Remove MacroLexer import from MacroEngine (now handled by MacroParser.parseDocument)
- Update MacroParser.parseDocument to return separate lexingErrors and parserErrors arrays

* Add {{trim}} macro placeholder that defers to post-processing for cross-boundary whitespace handling

* Add eslint-plugin-playwright

* Add logMacroSyntaxWarning function for structured lexer/parser error reporting with compact human-readable payload

* Small code review fixes

- import event types from events.js
- Add chained fallback to {{input}}, just to be safe
- switched variables.js to export-per-method
- minor text adjustments in registered macro docs

* fix lexer not capturing linebreaks correctly & simplify plaintext token

- Replace alternation-based pattern with negated character class approach
- Use `(?:[^{]|\{(?!\{))+` to match non-brace chars or single braces not followed by another brace
- Add unicode flag for consistency
- Update comment to clarify intent: consume anything that is not the start of a macro '{{'

* Skip macro processing on char/group fields for env build (performance)

- Add returnRaw parameter to getCharacterCardFields to optionally return raw values without baseChatReplace
- Add returnRaw parameter to getGroupCharacterCards for consistent raw value handling
- Replace direct baseChatReplace calls with conditional transform function based on returnRaw flag
- Apply collapseNewlines when returnRaw is true and collapse_newlines setting is enabled
- Update MacroEnvBuilder to use the returnRaw as true

* Fix lexer failing to handle literal '{' before macro openers

- Add PlaintextOpenBrace token to lexer with pattern `/\{(?=\{\{)/` to match single '{' immediately before '{{'
- Update lexer mode definition to consume PlaintextOpenBrace before attempting macro start
- Update parser document rule to handle PlaintextOpenBrace as alternative to Plaintext
- Update MacroCstWalker to collect both Plaintext and Plaintext.OpenBrace tokens when building document items

* Add legacy non-curly marker pre-processing (<USER>, <BOT>, <CHAR>, <GROUP>, <CHARIFNOTGROUP>)

- Add pre-processing step in MacroEngine to rewrite legacy angle-bracket markers into their curly-brace macro equivalents
- Map <USER> → {{user}}, <BOT> → {{char}}, <CHAR> → {{char}}, <GROUP> → {{group}}, <CHARIFNOTGROUP> → {{charIfNotGroup}}
- Add e2e tests verifying legacy marker resolution through the engine pipeline
- Tests cover <USER>, <BOT>/<CHAR>, and <GROUP>/<CHARIFNOTGROUP> markers

* Add env.content to MacroEnv and use it for deterministic {{pick}} hashing

- Add content property to MacroEnv type definition and MacroEnvBuilder to expose the full original input string
- Update {{pick}} macro handler to use env.content hash instead of rawListString hash for seed generation
- Ensures deterministic behavior when the same prompt position contains different list items across evaluations
- Prevents {{pick}} from returning different values when nested macros resolve to different intermediate

* add e2e tests for env.content exposure and deterministic {{pick}} behavior

- Rename getChatIdHashCore → getChatIdHash in core-macros.js for consistency
- Add e2e test verifying env.content is exposed to macro handlers
- Add e2e test confirming {{pick}} returns stable results for same chat and content
- Tests verify deterministic behavior by comparing multiple evaluations with fixed chat_id_hash

* Rename chat macro helper functions to remove 'Core' suffix for consistency

* Add MacrosParser deprecation warnings and bridge to new macro engine when experimental flag enabled

- Import macroSystem and power_user for experimental macro engine integration
- Add @deprecated JSDoc tag to MacrosParser class
- Add #logDeprecated helper to warn about deprecated MacrosParser methods
- Add #registerMacroInNewEngine to bridge legacy macro registrations into new engine
- Add #unregisterMacroInNewEngine to bridge legacy macro unregistrations
- Log deprecation warnings in get, has, register

* Fix lint in tests

* Add comprehensive bracket handling tests and improve macro lexer/parser resilience to invalid syntax

- Add logMacroGeneralError function for non-macro-specific error logging
- Add CST validation check in MacroEngine to return original input if parser produces invalid CST
- Wrap MacroCstWalker.evaluateDocument in try-catch to gracefully handle evaluation failures
- Update MacroLexer Unknown token pattern to capture single closing braces not followed by another closing brace
- Add fallback mode exit

* Add error recovery for incomplete macros by flattening them to plaintext while preserving nested complete macros

- Enable Chevrotain error recovery in MacroParser constructor
- Add #isRecoveryToken helper to detect tokens inserted during error recovery
- Add #flattenIncompleteMacro to recursively convert incomplete macro nodes into plaintext items
- Update #collectDocumentItems to detect recovery-inserted Macro.End tokens and flatten incomplete macros
- Simplify plaintext token collection to use

* Add e2e test verifying nested macros resolve even when outer macro has invalid argument count

* Remove unused macro CST node caching mechanism from MacroCstWalker

* Add JSDoc type re-exports and register shorthand to macro-system.js for improved DX

- Re-export commonly used JSDoc types from MacroRegistry and MacroEnv modules for easier consumption by external code
- Add macros.register shorthand function bound to MacroRegistry.registerMacro for convenient macro registration
- Includes MacroDefinitionOptions, MacroHandler, MacroEnv, and related type definitions

* Migrate legacy macro registrations to new macro system API across multiple modules

- Replace MacrosParser.registerMacro calls with macros.register using object-based configuration
- Update imports from './macros.js' to './macros/macro-system.js'
- Extract macro registration into dedicated registerAuthorsNoteMacros function in authors-note.js
- Add descriptions to all macro registrations for better documentation
- Update MacrosParser iterator to yield from new registry when experimental engine is enabled

* Add MacroCategory to all macro registrations across codebase for improved organization and discoverability

- Import MacroCategory from macro-system.js in authors-note.js, memory/index.js, stable-diffusion/index.js, and macros.js
- Add category property to all macro registrations using appropriate MacroCategory values
- Assign 'legacy' category to MacrosParser auto-registered macros
- Categorize macros across chat, character, prompts, utility, random, state, time, and names categories

* fix lint

* Add MacroBrowser UI component and integrate macro help system into chat interface

- Add implementation of MacroBrowser
- Add macros.css stylesheet link to index.html
- Update core-macros.js ban macro to return empty string instead of 'Empty string' description
- Add sampleValue property to positional argument definitions in MacroRegistry
- Generate default sampleValue for numeric requiredArgs using 'arg{n}' pattern
- Set default description to '<no description>' and returns to '<empty string>' when empty

* Reorder JSDoc typedef declarations in MacroRegistry.js to have the most relevant first

* fix missing category in legacy initMacros

* Add displayOverride and exampleUsage properties to macro registration system

- Add displayOverride property to MacroDefinitionOptions for custom signature display
- Add exampleUsage property to MacroDefinitionOptions for documentation examples
- Update MacroRegistry.registerMacro to validate and process displayOverride and exampleUsage
- Add logMacroRegisterWarning function to MacroDiagnostics for registration-time warnings
- Auto-wrap displayOverride and exampleUsage in curly braces if missing

* Add error handling to MacroRegistry.registerMacro and logMacroRegisterError diagnostic function

- Add logMacroRegisterError function to MacroDiagnostics for registration failures
- Wrap MacroRegistry.registerMacro body in try-catch to handle registration errors gracefully
- Change registerMacro return type from MacroDefinition to MacroDefinition|null
- Log registration errors and return null instead of throwing, preventing macro registration failures from breaking the application

* Optimize character card field access with lazy evaluation to improve macro execution performance

* Add brace unescaping to MacroEngine post-processing to support literal curly braces in macro output

- Add regex replacement to unescape \{ and \} to { and } after macro execution
- Allows users to output literal braces by escaping them with backslashes
- Escaped sequences like \{\{ don't match MacroStart pattern and pass through as plain text

* Add alias system to macro registry with UI support for displaying and navigating macro aliases

- Add `aliases` property to MacroDefinitionOptions for defining alternative macro names
- Add `aliasOf` and `aliasVisible` properties to MacroDefinition to track alias relationships
- Update MacroRegistry.registerMacro to create alias entries pointing to primary definitions
- Add `getPrimaryMacro` method to retrieve primary definition from alias names
- Add filtering options to `getAllMacros` to exclude aliases

* Strip curly braces from MacroBrowser search query to match macro name format in search definitions

* Add enhanced macro autocomplete with argument hints and context-aware suggestions

- Add comprehensive CSS styling for enhanced macro autocomplete items with flex layout
- Add argument hint banner styling with gradient background and border
- Add current argument highlighting in details panel
- Export formatMacroSignature, createSourceIndicator, createAliasIndicator, and createTypeBadge from MacroBrowser for reuse

* Fix macro autocomplete not showing details/arguments because of trailing colons

* Change macro details CSS selectors from `.macroBrowser` to `.macro-details` for better reusability and update autocomplete to use macro enum icon

- Replace all `.macroBrowser` selectors with `.macro-details` in macros.css to allow macro details panel styling to work outside MacroBrowser context
- Change autocomplete option icon from hardcoded '{}' to `enumIcons.macro` for consistency
- Remove redundant `showCategory: false` option from renderMacroDetails call in autocomplete (now handled by default

* Add MacroArgType enum to replace string literal type union for macro argument types

- Add MacroArgType enum with STRING, INTEGER, NUMBER, and BOOLEAN values
- Replace MacroArgType typedef string literal union with enum reference
- Export MacroArgType from macro-system.js alongside MacroCategory
- Remove MacroArgType typedef re-export (now an enum, not a type)

* Add support for multiple argument types in macro definitions

- Update createTypeBadge to handle both single type and array of types, displaying as "type1 | type2" with tooltip
- Add JSDoc comments to MacroArgType enum values explaining each type
- Update MacroArgDefinition typedef to allow type property to be single MacroArgType or array
- Update MacroRegistry.registerMacro to validate array of types and default empty arrays to 'string'
- Update validateArgTypes to check if argument value matches

* Add returnType property to macro definitions with automatic type badge display in macro details panel

- Rename MacroArgType enum to MacroValueType to reflect dual use for arguments and return types
- Add returnType property to MacroDefinitionOptions (defaults to MacroValueType.STRING)
- Add returnType validation in MacroRegistry.registerMacro to ensure valid type values
- Update renderMacroDetails to always show Returns section with type badge
- Add macro-returns-content CSS class with flex layout for type

* Add detailed argument definitions, return types, and example usage to all variable macros

- Replace numeric requiredArgs with detailed argument definition objects including name, type, and description
- Add returnType property to all macros that return values (inc/dec/get variants)
- Add returns property descriptions to all macros
- Add exampleUsage arrays demonstrating typical usage patterns for each macro
- Apply changes consistently

* Add returns descriptions and return types to core macro definitions with improved documentation

* Add returns descriptions, display overrides, and example usage to time macros with improved documentation

* fix lint

* Add returns descriptions and return types to chat, environment, instruct, and state macros with improved documentation

* Add missing properties to dynamic macro definition override to match MacroDefinitionOptions structure

* Replace console logging with MacroDiagnostics logging in MacroEnvBuilder and MacroRegistry

* Add support for array-based argument types in macro autocomplete with union type display and tooltip

* Rename requiredArgs to unnamedArgs and add support for optional unnamed arguments with bracket notation in macro signatures and hints

* Add optional offset argument definition to time macro with type, sample value, and description

* Simplify example usage for random and pick macros by removing surrounding context text

* Add default value display for optional macro arguments in autocomplete and browser documentation

* Fix macro args defaultValue not being converted into the normalized values for register and display

* Allow STscript macro auto completion to still show up when typing closing braces

* Add space macro with optional count argument for inserting multiple spaces

* Add optional count argument to newline macro for inserting multiple newlines with default value of 1

* Remove MutationObserver and CTRL+F keyboard event handling from MacroBrowser

* fix lint

* Register `{{summary}}` macro for both old and new macro engines based on experimental flag

* Register `{{charPrefix}}` and `{{charNegativePrefix}}` macros for both old and new macro engines based on experimental flag

* Update hidden alias badge text to indicate deprecation status

* Simplify macro name validation and error handling in MacroRegistry

Remove redundant `macroName` variable by normalizing `name` parameter early and reusing it throughout the registration flow. Consolidate trim checks in validation condition.

* Remove exp macro engine flag checks from auto complete and help, and remove legacy macro template

Move macro registration to always use new engine regardless of experimental flag. Remove conditional logic for `experimental_macro_engine` in MacroBrowser, system messages, and slash command parser. Delete legacy `macros.html` template and associated static macro help generation. Always use MacroBrowser for macro documentation display.

* Rename macros to camelCase and add backward-compatible aliases

Rename `description`, `personality`, `scenario`, `creatorNotes` to `charDescription`, `charPersonality`, `charScenario`, `charCreatorNotes` respectively. Rename `idle_duration` to `idleDuration`. Add old names as aliases for backward compatibility. Add `comment` as visible alias for `//` macro. Mark `idle_duration` alias as hidden.

* fix `random` and `pick` macros by using list parameter directly instead of raw string

Remove `raw` parameter from `random` and `pick` macro handlers. Simplify legacy comma-separated list handling by using `list[0]` directly instead of `rawListString`. Rename `items` variable to `list` in `pick` macro for consistency.

* fix `random` and `pick` not handling all colon-separated lists as before

Extract `readSingleArgsRandomList` helper function to handle legacy comma-separated and double-colon list parsing. Reuse this helper in both `random` and `pick` macro handlers to eliminate duplicated list parsing logic.

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: bmen25124 <bmen25124@gmail.com>
2025-12-15 21:29:46 +02:00
Kexus 4f9aeac7ac Correct error message in evalBoolean (#4889) 2025-12-14 19:42:59 +02:00
Cohee 204d384d9b glm 4.6v 2025-12-13 17:41:24 +02:00
Cohee f3c963fa8e jippity 5.2 2025-12-13 17:26:31 +02:00
98dd31b7f5 Chevrons can overlap with other elements. (#4878)
* Attempt to fix overlapping chevrons.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3639322664

* Removed supports.

* swipeRightBlock now has pointer-events:none.

* Add pointer events to swipes-counter

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-12 22:02:14 +02:00
Cohee 7da38faf60 Z.AI: Add transcribe endpoint 2025-12-12 00:53:53 +02:00
Cohee f7d9dbf5ce Add speech-to-text endpoints for Chutes, Groq and Mistral 2025-12-12 00:11:14 +02:00
Cohee 9046fe8d2d Refactor CC API async route handlers (#4885)
* Improve error handling in CC /status and /generate endpoints

* Cancel pending status check on switching CC source
2025-12-11 23:31:46 +02:00
Cohee 10a2f0f740 Replace Google Translate library (#4884) 2025-12-11 22:59:51 +02:00
Cohee 8d34ad5bae Merge branch 'release' into staging 2025-12-11 08:45:40 +00:00
Cohee 088ce0e962 Fix 'send if empty'
Closes #4881
2025-12-11 08:44:39 +00:00
Cohee b9aebb369f Fix: Pass-through pointer events to swipe buttons in video container 2025-12-11 01:19:04 +02:00
Cohee f4b071e71a Fix: Prevent swipe hotkeys when focused into a video element 2025-12-11 00:59:29 +02:00
Cohee 7125ddc0c3 Fix: apply right spacing to file wrapper block 2025-12-11 00:49:47 +02:00
Cohee e7dee7f5a7 Fix: preserve attached files during file input changes (#4877)
* fix: preserve attached files during file input changes

* Reverse order of duplicate pasted files check
2025-12-10 22:02:17 +02:00
Chanho Chung 6fdeaa2cd9 fix: caching system prompt functionality for OpenRouter Claude (#4872) 2025-12-10 20:22:54 +02:00
equal-l2 cd9de2f1b0 Add docker data directories to .dockerignore (#4873)
* Add docker data directories to .dockerignore

* Remove /docker/user from .dockerignore

The folder is not in docker-compose
2025-12-10 20:15:35 +02:00
Cohee b7760ddaaa Ollama: Add reasoning content extraction 2025-12-09 00:24:52 +02:00
d5320f57cf Backported refactor of the chats endpoint from feat/chat-tree. (#4870)
* Backported cleanup and refactor of chats endpoint from `feat/chat-tree`.

* https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599941781

* Error message.
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599941796
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599941797

* chatIntegritySlug https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599958991

* /save should not hang on empty body.chat.
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599959001
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599958997

* When the backup directory does not exist, log an error instead of silently failing.

* chatData should be an array.
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599990728

* Skip body check.
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2599987542

* Change integrity warning to debug.
https://github.com/SillyTavern/SillyTavern/pull/4870#discussion_r2600005665

* Return null on error in `tryReadFileSync`.

* Update warning message for missing chat file to clarify potential emptiness

* Rename IntegrityMismatch to IntegrityMismatchError for clarity and consistency

* Fix a type error and formatting

* Improve debug messages and documentation for integrity checks in chat saving

* Add newline before file writing function for improved readability

* Improve debug message formatting for integrity validation in checkChatIntegrity function

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-08 23:54:40 +02:00
BeinseziiandCohee b5e20f2ff9 "N" support for llama.cpp (#4869)
* llama.cpp supports 'n' now

* Fix response parsing

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-08 22:50:34 +02:00
Cohee 9aff57c9c4 Add dummy reasoning_content for deepseek-reasoner tool calls
#4857
2025-12-07 23:40:52 +02:00
Cohee 311f226be4 Fix broken entry in asset list when gallery is open 2025-12-07 23:28:39 +02:00
Cohee f26a672811 Omit content type in POST request if no body 2025-12-07 23:26:47 +02:00
DeclineThyselfanduser 7c24667f49 Fixed isModifiedKeyboardEvent order of operations. (#4866)
https://github.com/SillyTavern/SillyTavern/pull/4819#discussion_r2595641856

Co-authored-by: user <user@exmaple.com>
2025-12-07 21:37:32 +02:00
CoheeandGhostXia 0225562f4e Regex cache (#4858)
feat: optimize regex extension performance

- Implemented caching mechanism for regex scripts to improve message rendering speed.
- Added automatic cache invalidation on script updates.
- Optimized regex compilation to reduce CPU usage.

---------

Co-authored-by: GhostXia <33112711+GhostXia@users.noreply.github.com>
2025-12-04 22:21:13 +02:00
Cohee bd1583faa4 Implement chat backups browse menu (#4862)
* Implement chat backups browse menu

* Unify bytes string formatting
2025-12-04 22:05:27 +02:00
Cohee 4e4d370686 Merge branch 'release' into staging 2025-12-03 22:03:19 +02:00
Cohee fbf789fa74 Fix path to sprites construction (#4860)
* Fix path to sprites construction

* Clean-up destination sprite paths
2025-12-03 22:02:52 +02:00
kashmirmydon c40caa050f Fix Mistral's Max Temperature 2025-12-03 21:27:31 +02:00
Cohee 8ca836c3a1 custom-request: Pass api-url for Z.AI and Vertex and fix if omitted in profile (#4859) 2025-12-03 21:17:41 +02:00
Cohee 090c8ec560 feat: add function to retrieve chat completion preset from settings 2025-12-03 21:17:06 +02:00
a4cc9b3989 Facillitate extension use of ConnectionManagerRequestService (#4841)
* Separate prompt-building functionality from request-sending functionality

* removing logs and clarifying comments

* separating parameter construction functionality to allow ConnectionManagerRequestService to use all other preset parameters

* fixing chat completion issues, adding documentation to new functions.

* Improving ConnectionManagerRequestService errors. Adding parseReasoningFromString option to override reasoning template.

* Adjusting TextCompletionService prompt formatting

* linting

* Use settingsToUpdate to convert from OAI preset to OAI settings.

* lint

* throw errors when profile ID not found

* Fix missed instances of global completion settings being used (CC and TC), replaced with optional argument. Specified typing for ChatCompletionSettings and TextCompletionSettings.

* Adjusting parameters of parseReasoningFromString and adding getReasoningTemplateByName

* using messages.role as a fallback for custom requests, fixing newline removal.

* parameters => settings
I like how it sounds better

* ditto

* You know I had to do it to 'em

* Update getCustomTokenBans

* Fix calculateLogitBias

* Fix param attributes

* Fix type checks

* Less strict role type on ChatCompletionMessage

* Add missing space

* fixing getChatCompletionModel to use an arbitrary chat completion settings object

* Fixing issues with preset overriding custom data passed.

* Pass model to createGenerationParameters externally

* Unify seed param handling for CHUTES

* Fix non-existing CC source

* Use strict comparison

* Use global settings as a base for generation parameters creation

* removing unnecessary handling of preset fields

* don't pass preset prompts, use the passed payload override messages

* refactoring text generation prompt building of last line

* Pass model to getReasoningEffort

* Pass model name to canPerformToolCalls

* Pass model to createTextGenGenerationData

---------

Co-authored-by: qvink <qvink@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-03 20:09:02 +02:00
Kristian SchlikowandCohee 6c8eb4d9ac Feat: Add toggle to exclude think/reason blocks from smooth streaming (#4849)
* Feat: Add toggle to exclude think/reason blocks from smooth streaming

* Fix: Adjust new setting name to properly reflect what it does

* Sync data-i18n with text content

* Add reasoning stream flags for Mistral, Claude and Google models

* Update layout

* Fix: Enhance reasoning handling in parseStreamData function

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-03 00:20:23 +02:00
Sammy f145296a58 add optional argument to changeMainApi (#4853) 2025-12-02 14:52:42 +02:00
Cohee b6a480b329 Merge branch 'release' into staging 2025-12-02 10:45:59 +00:00
Cohee 52a0860320 Fix npm audit 2025-12-02 10:36:49 +00:00
Cohee df513868e5 Switch Dockerfile to use npm ci 2025-12-02 10:30:57 +00:00
Cohee 560d15c5bb Prevent writing package-lock.json in startup scripts 2025-12-02 10:26:35 +00:00
Cohee 43f1824309 Fix: TTS speed control binding for chutes 2025-12-01 01:56:19 +02:00
Cohee fdc9b4c949 Fix: add a case in logprobs parsing function for AIMLAPI 2025-12-01 00:26:35 +02:00
BenandCohee 55a07d445d Chutes integration (#4844)
* Chutes integration

* Fix eslint

* Fix key saving

* Fix logo coloration

* Fix tool checks

* Unhide image inlining controls

* Fix order of options

* Fix type use in TTS extension script

* Add Chutes as a vector storage source

* Change log levels to debug

* Fix streamed reasoning parsing

* Skip remote models update

* TTS: Fix API key highlight

* Sort image models A-Z

* TTS: Fixes

* Remove unused SD endpoint

* Skip setting context size if models list is not yet loaded

* remove chutes quota / balance

* Fix: streamed tool calling

* Hide reasoning effort control

* Add image request debug log

* Fix: scroll down on media load in extensions

* Unhide some samplers

* Bring back reasoning effort

* This code will never execute

* Reformat else if cases

* Add stop strings to request

* Remove conditional from reasoning_effort body param

* Preserve original pricing fields

* Unhide logit bias setting

* Pass repetition penalty and logit bias to backend

* Swap llama tokenizer for llama3

* Pass min_p, remove supported_sampling_parameters checks

* Enable logprobs

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-01 00:17:49 +02:00
dc06abb364 Added MockServer class for tests. (#4843)
* Added a mock OpenAI-compatible endpoint at /v1/chat/completions.
Disabled by default.
Intended for debugging and e2e tests.

* Fixed empty prompts.

* Add mock server and example test

* Improve test

* Added `eslint-plugin-playwright`

* Removed `Date.now()` for reproducible responses.

* Ignore ERR_SERVER_NOT_RUNNING on close.

* Use MockServer in mock-openai.js

* Fixed error check.

* Removed mock server.

* Fix test name

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-30 19:20:25 +02:00
mightytribbleandCohee 1f78094322 Convert OAI tool_choice to Gemini functionCallingConfig for Gemini requests (#4840)
* Send toolConfig block to Gemini, if defined and tools block also present.

* Convert OAI tool_choice to Gemini functionCallingConfig for Gemini requests

* Remove blank line

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-30 19:18:41 +02:00
cloak1505 cd4f37f39b Sync OpenRouter providers list (#4846)
Python script to output a .txt containing a formatted list: https://gist.github.com/cloak1505/90a96bca28b332492221691268b674fd
2025-11-30 19:06:45 +02:00
Cohee 1da6e40129 Backgrounds menu tabs (#4845)
* Add tabs for backgrounds menu

* Improve styling and layout

* Use resize observer

* Add upload to chat bg logic

* Custom BG should always lock

* Fix auto-select when deleting active chat bg

* Use frame event cancellation on rapid resize

* Allow multiple uploads

* Fix mobile tab selector

* Bypass global lock with shift key

* Update copy tooltip

* Update localization files
2025-11-30 19:04:08 +02:00
Cohee 9246ca2779 Fix: enum/readonly comment order 2025-11-30 01:53:11 +02:00
1c1f25b5c6 Backported /tests from macros-2.0. (#4842)
* Backported `/tests` from `macros-2.0`.

* Added `eslint-plugin-playwright`

* Improve formatting

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-29 20:46:54 +02:00
Cohee b2ba255be4 Fix: replace debounced with regular save chat on end of stream 2025-11-29 13:25:36 +02:00
Cohee 2eba10fa7f Gemini: Add image request settings (#4838)
* Gemini: Add image request settings

* Allow aspect ratio for 2.5 flash
2025-11-29 00:59:09 +02:00
38f6b9a119 Enhanced CharX Import with Asset Extraction (#4825)
* feat: Extract and store CharX embedded assets on import

Enhances CharX (.charx) file import to extract and store embedded assets
in accessible locations:

- Add CharXParser class in new src/charx.js module
- Extract sprites (emotion/expression) → characters/{name}/
- Extract backgrounds → backgrounds/{name}_{asset}.{ext}
- Extract misc/x-risu-asset → user/images/{name}/
- Skip user_icon assets to prevent persona conflicts
- Support SFX (self-extracting) ZIP archives
- Add extractFilesFromZipBuffer() for efficient multi-file extraction
- Add normalizeZipEntryPath() for safe path handling
- Use hyphens in sprite names for ST expression label compatibility
- Fix ArrayBuffer slicing for Node.js buffer pool issue

Tested with 34 real-world RisuAI exports (200-300MB, 1000+ assets each).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Address review feedback for CharX parser

- Add normalizeExtString() to handle dotted/uppercase extensions
  (e.g., '.PNG' or 'PNG' now correctly becomes 'png')
- Revert default avatar to path string instead of eager fs.readFileSync
- Simplify getCharXAssetBaseName regex, remove dead useHyphens branch
- Add JSDoc for persistCharXAssets documenting sync write behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: Move ensureDirectory to util.js for reuse

- Extract ensureDirectory() from charx.js to util.js as a shared helper
- Add JSDoc for getUniqueAssetPath explaining sprite naming convention
- Prepares utilities for future ZIP-based format imports (similar to BYAF)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: CharX asset overwrite and folder naming

- Overwrite existing assets on re-import instead of creating duplicates
  (matches sprites.js upload behavior with deleteExistingByBaseName)
- Use character name for asset folders, not unique filename
  (ST's sprite system looks up by character name from card data)
- Strip trailing extensions from asset names to avoid file.ext.ext
- Add per-file error handling so one bad asset doesn't abort import
- Remove redundant else branch in storage category assignment
- Add comment explaining intentional 'embeded://' typo (RisuAI compat)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Address PR review feedback

- Filter out directories in deleteExistingByBaseName (Cohee1207)
- Use ISO timestamp for create_date instead of humanizedDateTime

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Store CharX backgrounds in character-specific folder

Changed background storage from global `backgrounds/` to character-specific
`characters/{charName}/backgrounds/` per maintainer feedback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove unused import

* fix: Reduce CharX debug logging noise

Remove verbose per-file debug logs that create excessive console noise
for large archives. Keep only essential logging matching BYAF style:
- Entry point info log
- Final summary of imported assets
- Warnings for actual failures

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-28 23:51:09 +02:00
Cohee 3b59eae7c0 Gemini: Only register custom tools when there are no function tools 2025-11-28 20:22:05 +02:00
Cohee 068c6bdccd Gemini: Fix search tool is not supported when function tools are used 2025-11-28 20:18:02 +02:00
mightytribbleandCohee 32bbf4ec10 Support non-function native tools for Gemini
* Enable retrieval tool type for VertexAI Gemini endpoints

* Apply code suggestion

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-28 20:02:32 +02:00
Cohee 965b86da62 Add verbosity control (#4837)
* Add verbosity control

* Remove for Azure OpenAI
2025-11-28 19:49:59 +02:00
Cohee 1af87ea165 Backfill missing swipe_info (#4831)
* Backfill missing swipe_info

* Add type for SwipeInfo

* Init SwipeInfo with empty extra
2025-11-28 18:17:14 +02:00
Cohee 59ba22fa9e "Squash system messages" is back 2025-11-28 17:21:12 +02:00
Cohee d03a0b12b9 ImgGen: Preset GALLERY style for images generated with paintbrush if previously unset
Fixes https://github.com/SillyTavern/SillyTavern/pull/4833#issuecomment-3587591627
2025-11-28 02:48:42 +02:00
drake1138andCohee 765c76ea80 Return character prefixes to brush image generation (#4833)
* Return character prompt prefixes to brush image generation

Before [#4719](https://github.com/SillyTavern/SillyTavern/pull/4719), the brush tool would generate an image using the character specific prompt prefixes. This returns that functionality.

* eslint fix

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-28 02:43:56 +02:00
drake1138andCohee 05e85af3c6 Return character prefixes to brush image generation (#4833)
* Return character prompt prefixes to brush image generation

Before [#4719](https://github.com/SillyTavern/SillyTavern/pull/4719), the brush tool would generate an image using the character specific prompt prefixes. This returns that functionality.

* eslint fix

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-28 02:43:21 +02:00
Cohee 7de0307a98 Merge branch 'release' into staging 2025-11-28 02:26:30 +02:00
cd4364d311 Empty swipes are not handled by ensureSwipes. (#4828)
* Handle empty swipes.

* Add warning.

* Replace with forEach

* Replace with for loop

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-28 00:46:18 +02:00
Cohee 2b7003a6da Google Imagen: Add personGeneration setting to config.yaml 2025-11-28 00:26:31 +02:00
Cohee 0a22856faf Chat Completion: Reduce number of toggles in AI Response Configuration (#4821)
* Chat Completion: Reduce number of toggles in AI Response Configuration

* Consolidate migration logic

* Don't enable media inlining if image inlining was disabled

* Fix icons showing on media toggle off

* Update i18n
2025-11-28 00:16:23 +02:00
Cohee 0b5b3f089e Prompt Manager: Make main/PHI/aux injectable (#4829) 2025-11-27 23:34:25 +02:00
Cohee df865dda85 Extend caption/img gen generated text preview rows 2025-11-27 21:35:30 +02:00
Cohee da78cc6993 Fix: Google AI image generation setting
Fixes #4824
2025-11-27 21:29:03 +02:00
Cohee 3c7d81571d Fix: button visibility checks in swipe gesture handlers 2025-11-27 12:56:24 +02:00
Leandro Jofré 5f01d91e17 Fix - Check for samplers in the connections pannel (#4822) 2025-11-27 00:40:02 +02:00
Leandro Jofré 84a1403ce0 Fix - Check for samplers in the connections pannel (#4822) 2025-11-27 00:39:29 +02:00
Cohee 0fcf056352 Add chat_metadata object to Kobold Lite import header 2025-11-26 20:05:50 +02:00
Cohee cd992472d5 Add deprecated user_name and character_name fields for backward compatibility 2025-11-26 19:59:05 +02:00
Cohee 51f9590a8f Check chat_metadata in JSONL header 2025-11-26 19:32:53 +02:00
fc85b205ac Backport feat/chat-tree and fix #4709 (#4712)
* Performance improvements due to using chatElement instead of $('#chat').

* Reverts change `hideSwipeButtons()` change.

https://github.com/SillyTavern/SillyTavern/pull/4576#discussion_r2394996102

* I’ve been working on a PR for issue #1731: [Swipes on every AI message, not just the last one](https://github.com/SillyTavern/SillyTavern/issues/1731). I’d appreciate feedback to avoid unnecessary effort.

Currently, I have User and Assistant branches working.
I have not touched `/api/chats/save` or '/api/chats/get', so branches do not persist.

To keep `context.chat` unmodified (so extensions and the rest of the code remain unaffected), I’ve stored branches in `chatTree`:
```javascript
chatTree = {
  branch_id: 1,
  branch: [
    { mes: "Hi" },
    { mes: "Hello", branch_id: 0, branch: [...] },
  ]
}
```

When a message is swiped, chatTree is updated via `saveChatToTree()`, then the next branch is loaded using get`ChatFromTree()`.

Questions:
According to Cohee: [This requires reorganizations in the file format for chats, not viable in the short term.](https://github.com/SillyTavern/SillyTavern/issues/1731#issuecomment-1937845036)
I'm hesitant to proceed. May I store chatTree.json files alongside the existing .jsonl chats?
Should I create a new /save endpoint, modify the existing one, or discontinue using .jsonl for saving.

Known issues:
Branches do not persist on refresh.
Swiping multiple messages at once throws `Cannot read properties of undefined (reading 'mes')
`. This will be fixed in the UI.
Branches persist between chats/characters. This will be fixed when loading a chat.
The Swipe arrows overlap with messages.
No animation plays when swiping then editing a user message.

* Fixed bug.

Gemini:
The calculation of mesId is fragile and contains a bug. The fallback chat[chat.length - 1] is a message object, and Number(object) will result in NaN. This will break the swipe functionality if the preceding expressions are falsy. Additionally, chat.indexOf(message) will almost always point to the last message in the chat, which is incorrect when swiping on an earlier message.

A more robust approach is recommended to reliably get the message ID from the clicked element.

    const mesId = Number($(this).closest('.mes').attr('mesid'));

* Fixes swipes on long chats.

* chatTree is now persistent. Fixed bugs.

* Fixed bugs.
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2390042262
The logic to rename the chat tree file (.json) is currently in an unreachable else block. The if condition !fs.existsSync(pathToOriginalFile) || fs.existsSync(pathToRenamedFile) will almost always evaluate to true after the preceding copyFileSync and unlinkSync operations, because pathToOriginalFile will no longer exist. This prevents the chat tree file from being renamed, which breaks the persistence of message branches when a chat is renamed.

The scrollChatToMessage function is implemented incorrectly. Calling .scrollTop() without any arguments on a jQuery object retrieves the current vertical scroll position; it does not scroll the element into view. This function will not have the intended effect of scrolling the chat to the specified message.

* Fixed bugs. https://github.com/SillyTavern/SillyTavern/pull/4573#pullrequestreview-3282889120

There's a typo in the property name being deleted. It should be branch to match the data structure you've defined, not branches. This error will prevent the pruning logic from working correctly, potentially leading to corrupted or bloated chatTree data.

The modified treeData is not being saved here. Instead, the global chatTree is being sent in the request. This will cause any renames of group members within message branches to be lost upon saving. You should send treeData, which contains the modifications.

This function may have performance issues on large chats due to multiple structuredClone calls within a loop. swipelessMessage is created from a deep clone, and then it's deep-cloned again for every swipe. While this ensures data integrity, it is inefficient. Consider refactoring to reduce the number of deep-cloning operations, for instance, by creating swipelessMessage once per message and deep-cloning it only when creating a new branch for a swipe.

* Fix warning. https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2390183161

The logic for renaming the chat tree file seems to have a flaw. The condition !fs.existsSync(pathToOriginalTreeFile) || fs.existsSync(pathToRenamedTreeFile) will be true if the original tree file does not exist. In this case, a warning is logged. However, it's a valid scenario for a chat to not have a corresponding tree file, so no warning should be logged. The current logic could lead to confusing log messages.

* Refactored chatTree into `public/scripts/chat-tree.js`.

https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2390269514

* Displaying swipes on past messages and the entire chat tree functionality is now an opt-in toggle.

https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2390273599

* Only allow one concurrent swipe.
Fixed:
Swiping multiple messages at once throws Cannot read properties of undefined (reading 'mes') .

* Fixed bugs.
Now `swipe_id >= swipes.length` is set to swipes.length.

* Fixed bug.
Swiping a user message did not re-show swipe buttons after the generation finished.

* Moved `Show Swipes for All Messages` Toggle to `Chat/Message Handling`.
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2395008961

* `JSON.stringify doesn't add spaces by default`
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2395047031

* Fixed "Tree file left behind when renaming chats"

https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2395546142

* Fixed "Guard chatTree recursion in group member rename"
https://github.com/SillyTavern/SillyTavern/pull/4573#pullrequestreview-3290587129

* Re-implement: https://github.com/SillyTavern/SillyTavern/pull/4576#discussion_r2395506501

* Moved chat trees to a separate directory. https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2395045583
Enabled chat tree backups.

* Removed structuredClone() for improved performance.

* Fixed bugs.
Characters are now correctly renamed in the chatTree.
Directories are now recursively created.

* Reverts `hideSwipeButtons` to original functionality when `show_swipes_for_all_messages` is false.

https://github.com/SillyTavern/SillyTavern/pull/4576#discussion_r2395375718

* Added `refreshSwipeButtons`.
Updated `showSwipeButtons` and `hideSwipeButtons`.
Fixed bugs.

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2400143193
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2400143202

* Added `clamp` to util.js.
Refactored `swipe`.

* Fixed bugs.
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2400685914
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2400685911

* Fixed bugs.

* Fixed swipe animations.

* Fixed bug by setting ids with `Number`.

* Delete swipes, and bugfixes.

* Merged `refactor/swipe`.

* Fixed bug created in `Delete swipes, and bugfixes.`.

* Merged from origin/staging.

* Merged changes from refactor/swipe.

* Fixed bug and refactored `syncWithSwipeId`.

* Merged from `origin/staging`.

* Fixed merge.

* Fixed overlapping message generations.

* Warn user, and refresh chat.

* Added metadata to chatTree file.

* Fixed "a sacrifice for the sake of simplicity." https://github.com/SillyTavern/SillyTavern/pull/2752#issuecomment-2323512022

Gemini:
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2464165990
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2464165991

* Improved swipeGenerate's animation.

* Added `SWIPE_SOURCE` constant.

* await `switchSwipesAllMessages`.

* Added `swipeState`.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4573#issuecomment-3449690308

* Done:
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466884547
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466884547
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466894947
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466902075
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466911245
https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466938169

* Removed `NEUTRAL_CHAT_TREE_KEY`

* Moved backups

* Fixed `/send` and fixed a bug in `sendMessageAs`.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466913570

* Fixes usage of `ENOENT`: https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466929980

* Removed LLM attribution.

* Updated link and warning.

* Removed debugging comments.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4573#discussion_r2466905341

* Replaced `isSwipingAllowed` with `swipeState`.

* Backported many changes from feat/chat-tree.

* Refactored `showSwipeButtons` and `hideSwipeButtons` into `refreshSwipeButtons`

* Refactored `showSwipeButtons` and `hideSwipeButtons` into `refreshSwipeButtons`

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2472109888
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2472113323

* Merged from `refactor/backport-chat-tree`.

* Proposed fix for https://github.com/SillyTavern/SillyTavern/issues/4709
Reverts commit: https://github.com/SillyTavern/SillyTavern/commit/1b3db273891c1ba8c781d2f691ad2e41937ca2aa

On PR: https://github.com/SillyTavern/SillyTavern/pull/2940

* Proposed fix for https://github.com/SillyTavern/SillyTavern/issues/4709
Reverts commit: https://github.com/SillyTavern/SillyTavern/commit/1b3db273891c1ba8c781d2f691ad2e41937ca2aa

On PR: https://github.com/SillyTavern/SillyTavern/pull/2940

* Fixed regenerate and continue while editing the last message.

* Added swipesHidden.
Messages can now be designated as non-swipeable with `message.extra.swipeable`.

* Use `.hidden` and classes instead of `.css` to display swipe chevrons.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3465749700
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2476136375
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2476140043
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3465776056
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3465794330

* Fixed bug.

* Fixed broken JQuery animation.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2479003956
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2479011525
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2479014001

* Fixed active arrow transition.

* Fixed swipe shake direction.

* Fixed truthy check.

* Added temporary link to documentation PR.

* Moved `switchSwipesAllMessages`

* Fixed failed generations deleting the branch.
Fixed `forceSwipeId`.
Always call `saveChatConditional` if the `swipe_id` has changed.

* ESLint.

* Fixed bug.
Better `syncSwipeToMes` error handling.

* Backported changes from `feat/chat-tree`

Added failed swipe animation.
Fixed `newSwipeId`.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#pullrequestreview-3406878337

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2483143387

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2483143387

* Added `showSwipes: false` to `showMoreMessages`.

And a few more performance improvements.

* Fixed animations.

* Added `'.mes'` to `.children`.

* Significantly improved `animateSwipeTransition` performance on large chats.

* Improved `syncSwipeToMes` error handling.

* Significantly improved `animateSwipeTransition` performance on large chats.

* Improved `syncSwipeToMes` error handling.

* Corrected Merge.

* Corrected Merge.

* Improved: `redisplayChat`
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2484177521

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2484215469

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2484217230

* Added a temporary implementation of `branchChat`.

* Fixed bug when generating a swipe.

* Fixed bug in `branchChat`.

* Fixed Off by one error due to `chatElement.children()` selecting `show_more_messages`.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3478331073

* Fixed Off by one error due to `chatElement.children()` selecting `show_more_messages`.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3478331073

* Cleaned system messages array and moved `swipeable`

* Removed CSS nesting.

* Fixed merge.

* Improved `syncSwipeToMes` error handling.

* Matched `swipes-counter` fade to chevrons.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3478192184

* Wrapped `transition-behavior: allow-discrete;` in `@supports`.

* Fixed types.

* Improved swipeability feedback and functions.

* Improved `refreshSwipeButtons` performance again.

* Swapped `.attr` to `.prop`.

* Fixed: `@supports (transition-behavior: allow-discrete)`

* Fixed and clarified typo.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495919425
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495923036
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495927019
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495930080
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495943870
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495950927
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495954387
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495974324
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495974683

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495957181
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495960920
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495968137
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495968922
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495959430
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495924599

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495918468
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495931979
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495933092
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2495939511

* Improved `refreshSwipeButtons` performance by skipping 'swipes-counter' updates by default.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2496382916
https://github.com/SillyTavern/SillyTavern/pull/4712#discussion_r2496379401

* Removed chevron fade-in on Cohee's request: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3493829978

* Set most system messages to `swipeable: false`.

* Implemented `OVERSWIPE_BEHAVIOR`.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3499706714

* Fix formatting, make comments IDE friendly

* IDE friendly enum comments

* Move animation frames to a dedicated file

* Do not compare with -1

* overswipeBehavior => getOverswipeBehavior

* Formatting fix

* Don't let regenerate on is_system

* Fixed canceled generations in pristine chats.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3499819670

* Fixed `AUTO_SWIPE` when `animation_duration = 0`.

* Fixed mistake in `redisplayChat`.

* Holding the swipe button speeds up `swipeDuration`.

* Fixed 'animationend' never ending.
Altered resetTime.

* Swapped from `saveChatConditional` to `saveChatDebounced` in `swipe`.

* Skip the animation if it's faster than 50ms instead of 10ms.

* Typo.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4712#pullrequestreview-3457198109

* Adjust duration reset cooldown

* Add quotes to selector

* Specify type for message parameter in swipe function

* Add type for swipe UI event

* Disabled fade-in during printMessages.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3539315919

* Typo.

* Added quotes to selector .

* Reduce reset time 500 -> 350

* Loops do not cause a generation so their chevrons should not have increased opacity.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3543692019

* Revert reset time

* Renamed `heldSwipes` to `recentSwipes`.

* Autofix the swipes array during `updateSwipeCounter`.

* User messages should not have swipes.

* Chevrons should always be shown on pristine greetings: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3557893373

* Improve formatting

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3559617088

* Show `pristineGreetingSwipeNotice` once.

* `clearMessageData` when swipe-regenerating a message.

* accountStorage is already imported in the module

* Removed `await`.

* Removed pristine greeting notice.
https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3560758598

* Removed redundant functions in `StreamingProcessor` and fixed streamed replies missing counters.

* Moved `markUIGenStopped` after `eventSource.emit`.

Swapped to `saveChatDebounced` to fix: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3567014810.

* Save a structuredClone of `chat` to prevent an invalid chat from being saved.

* Only `structuredClone` `chat` on `saveChatDebounced`.

* Revert "Only `structuredClone` `chat` on `saveChatDebounced`."

This reverts commit 49498b7aa1.

* Revert "Save a structuredClone of `chat` to prevent an invalid chat from being saved."

This reverts commit 5f137ed138.

* Prevent `saveChatDebounced` from saving while the swipe is in progress.
See: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3567077312

* Fixed animation never ending: https://github.com/SillyTavern/SillyTavern/pull/4712#issuecomment-3567106213

* `forceMesId` and `forceSwipeId` are not objects.

* Fixed Reduced Motion causing a warning when swiping back.

* Only  hide `.mes_buttons` when generating.

* Fix eslint

* Reset duration on switching direction

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-26 17:38:31 +02:00
Cohee 5993084ee6 Unify chat timestamps format (#4806)
* Unify chat timestamps format

* Handle ISO timestamps in stats.js

* Refactor timestamp parsing on server

* Switch to ISO timestamps for character/messages creation dates

* Fix type error

* Early exist in saveGroupChat if group not found

* Remove redundant fields from temp.chat export header

* Auto-fix char creation date format on edit

* Add name to fallback chat file names

* Rename parseTimestamp server side function
2025-11-26 15:55:15 +02:00
Leandro Jofré b9cea60c02 Update - Trigger CHARACTER_RENAMED_IN_PAST_CHAT for group chats (#4818) 2025-11-26 15:54:02 +02:00
Cohee 929d377da8 Update group chat metadata format (#4805)
* Migrate group metadata to group chat files

* Skip migration if chat already has metadata

* Fix active group not being set on group conversion

* Improve types in createGroup

* Fix padding in hotswap group avatars

* Fix centering of empty hotswap avatar

* Added automatic backups of migrated data

* Fix 'OVERWRITE' for GC

* Fix metadata parsing order in migration

* Remove color accents from regular migration logs

* Always set gen_id in converted message

* Clone messages before conversion

* Reduce size of add/remove buttons

* Fix group chat file size calculation
2025-11-25 23:48:43 +02:00
Cohee 051b275795 Fix resetting the context size when switching between CC sources (#4816)
* Fix resetting the context size when switching between CC sources that load the models list dynamically

* Revert the requirement to have models list for XAI

* Revert for sources that don't load context size from endpoint
2025-11-25 23:11:01 +02:00
Cohee 999ab48972 Refactor loadOpenAISettings (#4815)
* Refactor loadOpenAISettings

* Fix migration logic

* Show external category on load

* Restore jamba migration

* Refactor saveOpenAIPreset to use dynamic settings mapping
2025-11-25 03:21:07 +02:00
Cohee 3efcfbd1a2 Add new Claude model options and update regex checks for model validation 2025-11-24 21:55:29 +02:00
Cohee 248f5aa892 NanoGPT: Expose additional samplers 2025-11-24 20:36:51 +02:00
DeclineThyselfanduser 1b196cc101 getStringHash (#4811)
cyrb53 (c) 2018 bryc https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js
License: Public domain (or MIT if needed). Attribution appreciated.

Co-authored-by: user <user@exmaple.com>
2025-11-24 11:47:24 +02:00
Cohee e5ceafddb1 Backgrounds: Restore drawer title header (#4809)
* Backgrounds: Restore drawer title header

* Change add background icon
2025-11-24 01:24:53 +02:00
Cohee c932e93988 /api-url: Add VertexAI region management (#4808)
* /api-url: Add VertexAI region management

* Remove unneeded array copy
2025-11-24 00:46:35 +02:00
Cohee 7325cc7c41 Fix data model in api/worldinfo/list 2025-11-24 00:13:02 +02:00
Cohee 8b1f2bc9f4 Merge branch 'release' into staging 2025-11-24 00:11:32 +02:00
Cohee 91d26c4b1d TC: Add a toggle for empty json schemas (#4807) 2025-11-24 00:08:18 +02:00
Cohee 9a595af55b Merge branch 'release' into staging 2025-11-23 23:20:05 +02:00
Cohee ac7076c832 TC: Fix being unable to restore null JSON schema 2025-11-23 23:17:03 +02:00
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 0bf0bc5a78 Regenerate package lock 2025-11-23 17:04:03 +02:00
Cohee 9c0588f5d5 Fix IDE resolution of absolute module paths 2025-11-23 16:54:13 +02:00
Cohee 1b5075a331 Remove nvm install from start.sh (#4804)
* Remove nvm install from start.sh

* Make it red
2025-11-23 16:37:50 +02:00
Cohee 4b77cb8583 Scroll down on swipe gen cancellation 2025-11-23 16:16:02 +02:00
Cohee 02ef1a7648 Regenerate package lock
Fixes #4793
2025-11-23 16:03:00 +02:00
Wolfsblvt a11abc4273 Add new WORLDINFO_SCAN_DONE event with mutable state for extensions (#4797)
* chore: Add WORLDINFO_SCAN_DONE event with mutable state for extensions

* Fix incorrect scan state reference in world info recursion logic

* Fix typo in world info scan state property name: 'sucessful' → 'successful'

(am i stupid)
2025-11-23 15:59:49 +02:00
Cohee 3a3d992bc3 Merge branch 'release' into staging 2025-11-23 15:55:38 +02:00
Cohee dc0deffd61 Fix npm audit in tests 2025-11-23 15:55:07 +02:00
Cohee d04aaec7cf canDeleteSwipe = power_user.confirm_message_delete
Fixes #4799
2025-11-23 15:54:27 +02:00
Cohee 28657339e3 Fix: Use nullish coalescing operator for kudos calculation in showKudos function 2025-11-23 15:50:02 +02:00
Cohee 50599a49b4 Add file_id to api/worldinfo/list 2025-11-23 13:39:22 +02:00
Cohee fad9baa587 canDeleteSwipe = power_user.confirm_message_delete
Fixes #4799
2025-11-23 01:47:45 +02:00
Cohee cdfe873984 Add /api/worldinfo/list endpoint 2025-11-22 23:04:07 +02:00
Cohee 2467688208 waitForFrame in scrollChatToBottom in sync scenarios #4791 2025-11-22 22:43:13 +02:00
Cohee a8004a9a9e Gallery: Add video uploads to gallery (#4796)
* Gallery: Add video uploads to gallery

* Improve thumbnailing logic

* Add error handling to thumnailing process

* Improve formatting in utils.js
2025-11-22 21:58:36 +02:00
Cohee 269c694bc7 Add state validation to onImageSwiped function 2025-11-22 18:57:07 +02:00
Cohee 9c9be90821 Merge pull request #4794 from SillyTavern/staging
Staging
2025-11-22 17:27:11 +02:00
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 a668012138 Z.AI: Add endpoint selection (#4789)
* Z.AI: Add endpoint selection
Closes #4778

* Add i18n support for Z.AI endpoint options

* Update message for captioning ext.

* Remove unused imports

* Add api-url autoconnect guard
2025-11-22 00:44:27 +02:00
Cohee c31d92c909 1.14.0 2025-11-21 23:29:20 +02:00
Cohee 9e0a1c7d73 Horde: Try get shared key info
Fixes #4787
2025-11-21 23:12:00 +02:00
Cohee 45931a334f QR: Add handler for group chat creation event 2025-11-21 22:34:42 +02:00
Cohee 9f7677c04b Check for message being edited in beforeunload 2025-11-21 15:47:00 +00:00
Cohee 1a061321fd Handle empty chat directories in /api/characters/chats 2025-11-21 02:45:47 +02:00
Cohee e092088ad9 Add extension in /api/chats/delete if missing 2025-11-21 02:33:41 +02: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 35949cac01 Add dummy signatures to image and empty text parts 2025-11-20 22:18:56 +02:00
Cohee 2d9b0ad0a9 Don't parse inline images from reasoning blocks 2025-11-20 21:46:21 +02:00
Cohee 70e569f0ef google bonanza pro 2025-11-20 21:33:40 +02:00
Cohee 04f844577c Filter recent chats from deleted entities on welcome screen 2025-11-20 20:53:51 +02:00
Cohee 621b27063a Add root chat files to /recent 2025-11-20 20:52:59 +02:00
Cohee b55dd49746 Add server endpoint to call prompt processing on demand 2025-11-20 20:37:26 +02:00
Leandro JofréandCohee 0d9a72becc Add option to keep manually selected samplers on API Type switch (#4692)
* 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>
2025-11-19 22:56:15 +02:00
Cohee 945d727132 Hide "visibility only" notice for ZAI reasoning toggle 2025-11-19 22:23:19 +02:00
Cohee ef3996cbea Restyle "Image Swipe Behavior" block 2025-11-19 22:14:50 +02:00
QiyuanChenandCohee 5c974bd148 feat: add siliconflow chat provider (#4764)
* feat: add siliconflow chat provider

* fix: remove siliconflow seed handling

* fix: enable SiliconFlow image inlining from shared vision list

* fix: handle SiliconFlow model context limits and sizing

* fix: drop SiliconFlow reasoning effort handling since controls are hidden

* fix: parse SiliconFlow reasoning in streaming and non-streaming

* fix: add missing comma in supported models list

* Remove seed from HTML template

* Combine streamed reasoning parsing blocks

* Update logo image

* Unhide image inlining controls

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-19 22:10:29 +02:00
Cohee 05a963a637 Add metadata flag to api/chats/recent 2025-11-19 20:36:52 +02:00
Cohee 69de212cc3 Add extensionless file name to /chats endpoints 2025-11-19 20:34:12 +02:00
equal-l2 62bcfd3de0 Add Gemini 3 for Vertex AI (#4777) 2025-11-19 17:35:08 +02:00
Cohee 73cedc115d Image swipe is back 🗣️🔥 2025-11-19 09:08:58 +00:00
Cohee 6c43ab64b5 Add metadata flag to api/characters/chats 2025-11-19 00:02:52 +02:00
Cohee 7448094f1b Add /edit-avatar endpoint 2025-11-18 21:46:29 +02:00
Cohee 9d9a8f1dd1 Jeremiah the Third 2025-11-18 20:19:04 +02:00
Cohee dc2624cdf5 Fix npm audit 2025-11-18 19:50:13 +02:00
Cohee af0cdec110 A 500 billion dollar startup can’t filter API payload fields 2025-11-17 20:08:29 +02:00
Cohee 1c4a918e43 gpt-5.1 2025-11-16 23:18:10 +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
Cohee c7040d2be4 Move img.swipe notice block up 2025-11-16 21:26:53 +02:00
SerenaandCohee e7af479427 Feature: allows sorting tags by most used (#4768)
* add sorting tags by most used

* Fix whitespaces

* Code review updates

* Remove commented code

* Fix capitalization in comment

* Apply review suggestion

* Simplify template init

* Reformat

* Add documentation for appendViewTagToList and printViewTagList functions

* Reprint renamed tags regardless of sorting mode

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-16 21:16:15 +02:00
Cohee 1baaa26729 Vertex: Add Vertex AI-specific safety setting (#4770)
Closes #4455
2025-11-16 18:26:03 +02:00
Cohee 306fc3f408 Gemini: Pass non-success response content to frontend 2025-11-16 17:55:53 +02:00
Cohee b99ccc3f0c OpenAI: Add Sora 2 API (#4748)
* OpenAI: Add Sora 2 API

* Add duration control

* Support client generation abort

* Reduce poll log amount

* Simplify selector

* Simplify model-specific control handling
2025-11-16 17:49:21 +02:00
Cohee f8c4795b4a Bump anti-troll tags limit
Closes #4763
2025-11-16 15:57:30 +02:00
Wolfsblvt 19ae4e7cc1 feat: add max-height and scrolling to world entry key input fields (#4769)
- 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
2025-11-16 15:42:07 +02:00
Cohee 3af1622b38 Fix npm audit 2025-11-16 15:30:29 +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
Wolfsblvt bc06f3e3e0 Refactor: make whitelist validation a bit more robust (#4757)
* 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
2025-11-12 21:13:58 +02:00
Wolfsblvt 6963f5cdd7 chore: add test-results directory to gitignore 2025-11-12 00:12:21 +01:00
Serena a0bff84e4e Fix: Prevent data loss on bulk regex move to scoped scripts (#4760)
* Fix: Prevent data loss in regex bulk move

* prevents moving to scoped scripts with group selected for bulkedit
2025-11-11 15:20:16 +02:00
Cohee dc4e0270e7 Fix OpenRouter embeddings URL
#4736
2025-11-11 13:16:04 +00:00
Wolfsblvt b0dd267b9e feat: enhance HTML escaping to include single quotes (#4755) 2025-11-10 00:33:01 +02:00
Madobe Ichika eb0706d294 Raise max response length to 128k for GPT-5 models (#4753) 2025-11-09 13:30:23 +02:00
Cohee 94b95013bc Add audio/video inlining for OpenRouter (#4751)
* Add OpenRouter inlining support for video and audio

* Refactor modality checks
2025-11-08 17:39:31 +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 4fcdec47f4 Fix PPP for audio attachments 2025-11-08 01:04:05 +02:00
Cohee 5837f28599 TC: Allow setting null JSON schema (#4746)
* 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
2025-11-07 23:39:52 +02:00
Cohee 09b8d59f4d Moonshot: Load models list from endpoint 2025-11-06 22:51:40 +02:00
105b436a66 fix #3199: firefox using cached images instead of new images. (#4743)
* Fixed: https://github.com/SillyTavern/SillyTavern/issues/3199#issue-2745917391

* Wrap header set in isFirefox

* Only invalidate Firefox caches. Also invalidate thumbnail caches.

* Skip `mime.lookup` on non-Firefox browsers.

* Improve param comments

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-06 20:11:21 +02:00
Cohee ad72fa806e Google: Add Veo models (#4742)
* Google: Add Veo models

* Combine retry into a singe loop

* Improve error logging and reporting

* Add client abort handling for video generation endpoint
2025-11-06 19:58:01 +02:00
StageDog 5a2b325ff7 fix: reorder regex import target popup (#4744) 2025-11-06 10:57:06 +02:00
Cohee a06a033a71 OpenRouter: Fix embeddings endpoint #4736 2025-11-06 08:55:40 +00:00
bmen25124 a728d30c99 Refactor flattenSchema to simplify JSON schema for Google Generative … (#4711)
* 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
2025-11-06 00:08:58 +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
Cohee 845bd8c999 OpenRouter: Add as vector storage provider (#4736)
* OpenRouter: Add as vector storage provider

* Better array filtering
2025-11-03 21:53:17 +02:00
fathom0324andgoogle-labs-jules[bot] 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
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
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
Cohee fc2aefa5be Claude: Fix image inlining for haiku-4-5 2025-10-30 04:17:33 +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
Cohee 36557dc1f6 Add Start Reply With to master import/export (#4716) 2025-10-29 21:14:57 +02:00
docfailandCohee 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
Cohee 5e033a9db9 Change window resize log level to debug 2025-10-28 23:27:31 +02:00
docfailandCohee 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
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 f3ec2483ac Sync OpenRouter providers 2025-10-28 20:14:18 +02:00
Cohee 2175ccbf1e Don't split multiswipes unless requested (#4703) 2025-10-28 00:58:30 +02:00
DeclineThyselfanduser 0cb4f79c36 Fixed a bug in sendMessageAs. (#4706)
Co-authored-by: user <user@exmaple.com>
2025-10-28 00:06:13 +02:00
Cohee 1de4f30775 Prefer const in variable definition 2025-10-26 15:19:41 +02:00
db315ecf0f Fix koboldcpp abort generation error (#4693)
* 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>
2025-10-26 15:19:10 +02:00
Cohee 256398f607 Merge branch 'release' into staging 2025-10-26 15:15:02 +02:00
Kristian SchlikowandCohee b5083c7b23 fix: Enhances model display for Fal.ai image gen source (#4694)
* fix: Enhances model display for Fal.ai image gen source

* Move text processing to backend

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-26 15:14:28 +02:00
Cohee 133ad15a83 Prevent propagation and editing of 'json_data' field in character data (#4690) 2025-10-24 15:44:50 +03:00
2df8e52d48 If the world-info has no comment, show it's keys in the placeholder. (#4681)
* Show keys in commentInput's placeholder.

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4681#discussion_r2450822592
https://github.com/SillyTavern/SillyTavern/pull/4681#discussion_r2450827302
https://github.com/SillyTavern/SillyTavern/pull/4681#discussion_r2450834282
https://github.com/SillyTavern/SillyTavern/pull/4681#discussion_r2450844011

* Update comment backfill logic

* Don't update placeholder with secondary keys

* Fix MAX_COMMENT_LENGTH to enforce a limit of 100 characters

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-23 22:10:08 +03:00
Cohee 55969bc96e Chat Completion: Streamline settings and API key handling (#4687)
* refactor: streamline CC settings and API key handling

* Add types for API settings

* Allow keyless custom source connection
2025-10-23 21:28:37 +03:00
DreamGenX 4e428c938d update dreamgen presets (#4683)
* update dreamgen presets

* remove dreamgen presets

* remove dreamgen presets
2025-10-23 21:07:08 +03:00
Cohee e9cd32a123 Enhance contribution guidelines for pull requests
Added guidelines for maintaining workflow during PRs.
2025-10-23 12:35:15 +03:00
Cohee da2fbbbb15 Ollama: Always truncate embedding inputs
https://docs.ollama.com/api#parameters-8
2025-10-23 00:58:00 +03:00
Cohee d32ac6c018 Unbrick preset saving 2025-10-23 00:50:42 +03:00
Cohee 860e80fe0a Update default sampler presets for Text Completion and AI Horde / Kobold Classic (#4686)
* Update default sampler presets for Text Completion and AI Horde / Kobold Classic

* do_sample = true

* Add missing fields to TC presets

* Consolidate Default and RecoveredRuins

* Fix rep.pen in Kobold presets

* Adjust TC samplers in default settings.json
2025-10-22 23:01:48 +03:00
f0ceba43e9 feat: [Electron Hub] Support Vector Storage, Better searching for image engine (#4540)
* feat: [Electron Hub] Add Vector Storage, Better searching for image model list

* feat: [Electron Hub] Add quality parameter for Image Engine

* fixed ESLint

* Update public/scripts/extensions/vectors/index.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* small tweaks

* Use default getOpenAIVector

* Refactor and clean-up code

* Move endpoint filtering logic to backend

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-21 23:38:12 +03: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 c0e84aaa16 Merge branch 'release' into staging 2025-10-21 20:56:09 +03:00
Cohee 46cb4b5fcb fix: freshChat detection on group chat load.
This breaks persona refresh on untainted group chats. I have no better solution for that yet.
2025-10-21 20:55:55 +03:00
Cohee 3e7b511af2 fix: return debounced save in deleteMessage 2025-10-21 20:16:30 +03:00
DeclineThyselfanduser 19c4aea25a Fixed crash when top_logprobs is empty. (#4680)
Co-authored-by: user <user@exmaple.com>
2025-10-20 23:12:29 +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
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 743c26a9f8 fix: nanogpt and deepseek models not saving to presets 2025-10-19 23:36:45 +03:00
Cohee 034a5f3aa4 fix: timeout git process after 5 minutes of inactivity (#4673)
* fix: timeout git process after 10 seconds of inactivity

* fix: increase git process timeout to 10 minutes

* 10->5 min, remove timeout from install
2025-10-19 22:03:19 +03:00
Cohee ba79e7d94c Fix event handlers in cosyvoice.js
Fixes #4668
2025-10-19 16:50:55 +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
StageDog 4bda4444e4 feat: Apply preset regexes before scoped regexes + avoid unnecessary popping up (#4672)
* 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
2025-10-18 19:08:11 +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
StageDog 7dda524284 feat: set sortable handle for regex (#4667) 2025-10-17 22:13:18 +03:00
bmen25124andCohee 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 47765b6205 CC: Add advanced formatting null settings notice (#4661) 2025-10-16 23:41:08 +03:00
Cohee 41c048ed35 Fix formatting in messageEditCancel 2025-10-16 23:30:15 +03:00
Cohee 59a80fb0a0 getContext: export showSwipeButtons/hideSwipeButtons 2025-10-16 23:22:34 +03:00
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 74c158bd2e Merge pull request #4656 from SillyTavern/staging
Staging
2025-10-16 20:31:22 +03:00
Cohee 91112362af Fix isClaude3or4 for OR caching 2025-10-15 22:59:41 +03:00
Cohee bd30a31815 Forgor context size 2025-10-15 21:30:52 +03:00
Cohee 23a59f27f1 claude-haiku-4-5 2025-10-15 21:27:46 +03:00
Cohee 10ebf09438 Fix control binds in gpt-sovits provider
Fixes #4655
2025-10-15 20:10:26 +03:00
Cohee 87d33b4d0b Highlight just imported chats in the list 2025-10-15 01:12:29 +03:00
Cohee b2c3f749d2 1.13.5 2025-10-15 00:56:03 +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
IceFog72 2ef9b3977b groupMemberListPopout placement (#4649)
`$('body').append(newElement);` -> `$('#movingDivs').append(newElement);`
2025-10-12 22:53:01 +03:00
LandCohee b7f93b3594 expose openThirdPartyExtensionMenu for Video Avatar extension (#4646)
* init

* Use less egregious export method

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-11 22:13:18 +03:00
df7f046912 Preset Regex: add preset type for script regexes (#4642)
* 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>
2025-10-11 22:10:06 +03:00
Cohee e4d779d450 NanoGPT: Add reasoning content display
Fixes #4643
2025-10-11 00:26:45 +03:00
CoheeandWolfsblvt 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
Cohee aaad129d1b Add missing props to ConnectionProfile typedef 2025-10-10 20:43:11 +03:00
bmen25124 d48a3639ed Added "custom_prompt_post_processing" to custom-request (#4639) 2025-10-10 20:37:23 +03:00
Mijyuoon 7944b7c7ff Add required icon sizes for PWAs on Firefox for Android (#4641) 2025-10-10 20:35:29 +03:00
cloak1505andCohee bc40d93b49 Remove dead Gemini 1.5 models, and clean up (#4636)
* 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>
2025-10-10 20:11:04 +03:00
Wolfsblvt 5fd64bef2e fix: improve bot detection and event filtering in GitHub workflow conditions 2025-10-09 00:24:04 +02:00
Cohee 20c7286ea1 Webpack: Only serve lib.js under root path 2025-10-09 01:22:10 +03:00
Wolfsblvt 59d4c7f5d7 fix: restrict app token generation to internal PRs and add fallback auth token (on PR comments) 2025-10-09 00:02:39 +02:00
Cohee 780633e05a text-embedding-005 2025-10-08 21:24:55 +03:00
Rivelle a418ad0f14 Add -webkit-tap-highlight-color for smoother touch experience (#4630)
* 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.
2025-10-08 19:46:43 +03:00
Cohee 2929ae66ad Remove recursive subtitution in getOutletPrompt 2025-10-08 10:49:49 +00:00
Cohee 21eee36eb3 Regex: Re-export getRegexScripts for legacy extensions 2025-10-08 09:26:06 +00:00
Cohee 9dddbbb04a Regex: Code clean-up (#4628)
* 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
2025-10-07 23:49:20 +03:00
StageDogandZoinkCN f15c91fa8e Preset Regex: refactor regex scope detection (#4618)
* refactor: explicit type for regex scope + feat: bulk move regex

* fix: eslint

* i18n: polish

* refactor: jsdoc + use object type for option

* fix: default return type for `getScriptsByType`

* refactor: simplify

* refactor: share default options

* refactor: remove unrequired css

* fix: move regexes to global + refactor: make regex operation interfaces more consistant

---------

Co-authored-by: ZoinkCN <zoinkcn@outlook.com>
2025-10-07 22:30:11 +03:00
Cohee 7296d89b58 Update PR template 2025-10-07 21:58:29 +03:00
Cohee 96ae49a89f Update contribution guidelines (#4613)
* 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
2025-10-07 21:57:42 +03:00
Wolfsblvt 01e3880587 refactor: add has() and get() to MacrosParser (#4626) 2025-10-07 21:19:24 +03:00
Wolfsblvt 806726d737 Workflows Switch all to use app token/app for any PR/issue labeling/commenting action (#4624)
* 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()
2025-10-07 20:49:32 +03:00
Cohee 9a56a2ba2e Workflow: Update private key secret for GitHub app token 2025-10-07 17:01:28 +03:00
WolfsblvtandCohee f88ba369dd Workflows: Replace ISSUES_BOT_TOKEN with GitHub App for labeling + 'against release' auto comment (#4621)
* ci: replace ISSUES_BOT_TOKEN with GitHub App authentication for PR auto-labeling workflow

* Update PR auto comments for target branch guidance

Added note about changing target branch for PRs.

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-07 16:55:15 +03:00
TrahlocandTrahloc c14d88dbe0 Fix font size difference in API Connections dropdowns (#4620)
- 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>
2025-10-07 16:11:18 +03:00
StageDogandZoinkCN 72f91bcf83 Preset Regex: event change (#4616)
* feat: PRESET_RENAMED event

* fix: emit PRESET_DELETED only when the deletion successes

---------

Co-authored-by: ZoinkCN <zoinkcn@outlook.com>
2025-10-07 15:27:10 +03:00
IceFog72 d3019c7d49 Summarize Popout placement (#4615)
$('body').append(newElement); -> $('#movingDivs').append(newElement);
2025-10-07 00:13:34 +03:00
Wolfsblvt 74ff23ec0c fix: remove focus call before keyup event dispatch that traps cursor (#4607) 2025-10-06 23:25:49 +03:00
WolfsblvtandCohee 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
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 c4cb0b783a security: update GitHub workflows to use ISSUES_BOT_TOKEN instead of GITHUB_TOKEN (#4606) 2025-10-06 11:33:38 +03:00
WolfsblvtandCohee 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
WolfsblvtandCohee 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
Jakub JędrzejczykandCohee e68f9e482e Authentik automatic login support (#4600)
* feat: authentik auto login

* refactor: move SSO login configuration under sso section in config

* Migrate SSO config keys read

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-04 23:47:43 +03:00
Wolfsblvt d56c649d86 style: hide self-responses label when activation strategy is not natural (#4593) 2025-10-04 13:30:11 +03:00
Wolfsblvt 08f48a9867 fix: enable character source (open link) when group is selected (#4592) 2025-10-04 13:26:13 +03:00
Wolfsblvt 06f5cea402 Fix group chat on new chat not respecting saved persona connections (#4594)
* 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)
2025-10-04 13:24:49 +03:00
Cohee 334a5409a0 Persona description editor expand (#4591)
* Enhance persona description section with expandable editor icon

* Fix selector for persona description update to use data attribute
2025-10-04 13:15:32 +03:00
Cohee 326d1c34c8 Emit event on message swipe deletion (#4590)
Closes #4567
2025-10-03 21:20:29 +03:00
WolfsblvtandCohee df2dee8482 Fix make /profile await the for an actual successful API connection (#4589)
* fix: add connection status check after profile switch in connection manager

Fixes #4262

* feat: add timeout parameter to connection manager await functionality & catch timout error

* Add rejectOnTimeout option to waitUntilCondition

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-03 20:43:35 +03:00
Cohee 654ddb1608 Emit prompt events in generateRaw (#4587)
Closes https://github.com/SillyTavern/Extension-PromptInspector/issues/4
2025-10-03 19:50:01 +03:00
WolfsblvtandCohee 3e3dfbe05e Small change, (visually) disable "Link to Source" on characters that weren't downloaded from a source (#4588)
* 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>
2025-10-03 19:48:13 +03:00
Wolfsblvt c9e022a790 gitignore vscode workspaces 2025-10-03 08:16:00 +02:00
shanmaocc 58a294639a Fix duplicate CHARACTER_MESSAGE_RENDERED events during streaming (#4584)
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
2025-10-02 23:56:45 +03:00
WolfsblvtandCohee 7bedaed92c Extend Update/Replace character function to replace directly from URL + Fixes on cached thumbnail (#4581)
* 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>
2025-10-02 23:05:19 +03:00
Wolfsblvt 1d1b606f72 fix: prevent duplicate tag imports by filtering already assigned tags, fixing an unintended error toast (#4582) 2025-10-02 21:30:39 +03:00
Cohee 1d279e500e Allow saving empty secrets via secret manager and slash command (#4580)
* Allow saving empty secrets via secret manager and slash command
Closes #4577

* Fix logic on cancel

* Fix /secrets-read with empty secret value
2025-10-02 21:23:42 +03:00
Quairon-Nailo 8a5531b4ec feat: Add {{notChar}} macro for participant list (#4579)
* 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
2025-10-02 21:05:52 +03:00
WolfsblvtandCohee d2f3a85742 Fix MiniMax (TTS) pitch on API calls being the wrong range (#4578)
* 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>
2025-10-02 21:03:22 +03:00
DeclineThyselfanduser 9415185a89 Performance improvements due to using chatElement instead of $('#chat'). (#4576)
* Performance improvements due to using chatElement instead of $('#chat').

* Reverts change `hideSwipeButtons()` change.

https://github.com/SillyTavern/SillyTavern/pull/4576#discussion_r2394996102

---------

Co-authored-by: user <user@exmaple.com>
2025-10-01 22:49:13 +03:00
LandCohee 7f9cbb04c6 Scroll to top button (#4569)
* init

* implement review suggestions

* remove unnecessary css variables

* respect reduced motion

* simplify setupScrollToTop call

* power_user flag fix

* simplify, more of above

* remove remove button when drawer is closed logic

* throttle scroll checker

* Fix review comments

* Make scrollToTop a shared function

* Refactor logic

* Replace on hover color

* Prefer theme colors for button

* Increase hover brightness for scroll-to-top button

* Clean-up diff

* Fix type annotation

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-01 19:47:00 +03:00
Cohee 873868389c Use textContent for copy from codeblocks 2025-09-30 00:15:37 +03:00
Cohee d3774fec96 Check if messages is array before applying cache setting
Fixes #4564
2025-09-29 23:58:05 +03:00
Cohee dd2011f5be Streaming fade-in animation (#4568)
* [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
2025-09-29 23:32:41 +03:00
Cohee c4cc6f611e claude-sonnet-4-5 2025-09-29 23:22:12 +03:00
Cohee d73fd1a0e5 Merge branch 'release' into staging 2025-09-25 22:20:30 +03:00
dependabot[bot] 8f7b6b43c3 Bump tar-fs from 3.0.9 to 3.1.1 in /tests (#4561)
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.9 to 3.1.1.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.9...v3.1.1)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 3.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-25 22:19:56 +03:00
André M PivaandCohee 0f49a059e3 Feat: add first and last buttons to pagination component (#4560)
* add first and last buttons to pagination

* Add i18n support

* Update pagination buttons font

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-25 20:42:47 +03:00
Cohee a3e47ce0a6 Remove bg lock/unlock toasts 2025-09-25 20:13:44 +03:00
LandCohee 4127b688c9 Update BG header layout (#4519)
* 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>
2025-09-25 20:12:12 +03:00
WolfsblvtandCohee c9419a383e Fix creator notes display field (in char panel) not updating when changed in Advanced Definitions (#4552)
* 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>
2025-09-23 21:58:20 +03:00
Cohee 45a7c6b2aa Assets: Display extension author in the list (#4551)
* Assets: Display extension author in the list

* Fix overflow of long text
2025-09-23 15:00:11 +03:00
Cohee f838d5c88d Fix WI AN position, break outlets in AN
Fixes #4554
2025-09-23 10:53:38 +00:00
Cohee 85fc7fe971 Fix: Close chat before performing deletion (#4545) 2025-09-22 00:59:46 +03:00
equal-l2 2679020ecd Add new Grok models (#4541)
* Add new Grok models

* Fix xAI request fields filtering

* Fetch xAI model lists from API
2025-09-21 17:41:39 +03:00
Cohee 8d19a6e77f Firefox: Fix parsing of style tags in creators notes 2025-09-21 01:37:33 +03:00
Cohee 64d7865837 Caption: Add refresh models button 2025-09-21 00:50:40 +03:00
Cohee 00cd7f8180 Mistral: Remove hard coded model lists 2025-09-20 20:42:14 +03:00
Cohee 3246d2960c Gemini: Fix parsing multiple tool calls in one response
Fixes #4537
2025-09-20 20:24:42 +03:00
Cohee 068ddd7c94 Mistral: Load caption models from endpoint 2025-09-20 00:22:12 +03:00
Cohee deec251f09 Return newline at the end of styles 2025-09-18 21:20:55 +03:00
Cohee 4e01c9c0dc Use variable for mobile jumbo list button 2025-09-18 21:19:44 +03:00
7cba4e88ab Add new WI position 'outlet' to expose WI entries triggered to be placed as macros literally anywhere (#4523)
* 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>
2025-09-18 21:12:14 +03:00
RossAscends 1fe8d96ab2 revert mobile char panel autoclose 2025-09-18 07:53:28 +09:00
RossAscends 97e4b41bc2 mobile: only autoclose char panel if it's actually open 2025-09-18 03:42:20 +09:00
RossAscends 1e7309fa17 i forgor one of em 2025-09-17 20:46:49 +09:00
RossAscends 2c25b5f012 completely ignore panel pins on mobile 2025-09-17 20:44:11 +09:00
RossAscends 136ddbc079 vert center mobile char list back button 2025-09-17 19:29:02 +09:00
RossAscends a0b2b740c9 Merge branch 'staging' of github.com-RA:sillytavern/sillytavern into staging 2025-09-17 18:19:59 +09:00
RossAscends 9298a34fea mobile fixes: close charlist on char select, hide L/R panel locks, larger charlist back button 2025-09-17 18:19:55 +09:00
Cohee ab66a9fed1 Caption: Rename Anthropic => Claude 2025-09-17 07:58:13 +00:00
07a4007363 feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Se… (#4528)
* feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Search for model list

* feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Search for model list

* Update public/scripts/extensions/tts/electronhub.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update public/scripts/openai.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update public/scripts/openai.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Search for model list

* feat: [Electron Hub] Show model capabilities

* Support logit_bias

* Small tweaks

* Added tokenizer selection logic

* Added tokenizer selection logic

* Fixed ESLint

* Small tweaks

* Split localization tags

* Fix formatting

* Refactor icons, add tool icon

* Support newer oai model tokenizers

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-16 22:22:27 +03:00
LandCohee eec837cee6 Layout Update (#4514)
* 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>
2025-09-16 13:20:06 +03:00
RossAscends 33458b86b0 Merge branch 'staging' of github.com-RA:sillytavern/sillytavern into staging 2025-09-16 00:44:52 +09:00
RossAscends 76d48bf8f8 nomnalize TGWebUI grammar string HTML nest 2025-09-16 00:44:48 +09:00
L 9b0e84832f div id="logo block" update (#4524) 2025-09-15 10:06:52 +03:00
L 5170984446 Backgrounds Drawer Max Height (#4515)
* init

* lint

* shrink drawer, plus why is css messy

* put questionable hint back in

* copy other drawers
2025-09-15 09:50:29 +03:00
GoldenglowMeow e0edd57653 fix(perf): disable periodic expired item check in node-persist (#4521) 2025-09-14 21:00:17 +03:00
RossAscends 4d366e463d Merge branch 'staging' of github.com-RA:sillytavern/sillytavern into staging 2025-09-15 02:59:31 +09:00
RossAscends b814e29d40 show grammar string input in tabby API samplers list 2025-09-15 02:59:24 +09:00
1e05eac7df Update ru-ru locale (#4522)
* Work on tl

* eslint fix

* Update data-i18n attribute for expand view button

* Add data-i18n to button

---------

Co-authored-by: Yokayo <nonameutubecomm@gmail.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-14 20:57:33 +03:00
Cohee 23e5a7ca38 Fix prompt cost block showing when switching API type to TC and type is not OpenRouter 2025-09-14 20:46:53 +03:00
RossAscends f1dd51867d standardize ooba logit bias HTML nest 2025-09-15 02:27:57 +09:00
RossAscends 5c0e2e7c96 more TGWebUI sampler HTML nest cleanup 2025-09-15 01:53:52 +09:00
RossAscends 0795e397a6 standardize TGwebui sampler toggle HTML nests 2025-09-15 00:23:51 +09:00
Cohee aec8b8db2a Docker: Update base image to node:lts-alpine3.22 2025-09-13 23:21:16 +03:00
Cohee 8f68b2cae9 Actions: Update Node version in npm publish workflow 2025-09-13 23:13:00 +03:00
Cohee f53f039452 Fix toast position on app init 2025-09-13 21:23:11 +03:00
Cohee 6dabf12ed7 Merge pull request #4516 from SillyTavern/staging
Staging
2025-09-13 20:48:26 +03:00
Cohee 98e2d3fa28 Bump package version 2025-09-13 18:25:15 +03:00
Cohee 345660503f Format lang.json file 2025-09-13 18:25:06 +03:00
Rawi1005 a6c3e4c444 Add Thai Translation (#4513)
* 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
2025-09-12 19:20:14 +03:00
Cohee 60bcbe3b4f Merge branch 'release' into staging 2025-09-12 12:33:44 +03:00
Cohee f852b7c4ea Fix npm audit in tests 2025-09-12 12:33:28 +03:00
Cohee 2f3b55d863 Groq: Update caption models list
Fixes #4507
2025-09-12 12:30:48 +03:00
Cohee b7890bfe34 Merge branch 'release' into staging 2025-09-12 12:23:53 +03:00
Cohee 2c5229e382 Fix npm audit 2025-09-12 12:23:36 +03:00
cloak1505 8656dd3a7a Sync OpenRouter providers list (#4509) 2025-09-10 17:30:16 +03:00
nfuller286andCohee 1147507d06 feat: Add Azure OpenAI chat completions provider (#4456)
* 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>
2025-09-10 11:44:30 +03:00
RivelleandCohee 5aa1c8fbac Improvement: Enhanced UI Consistency (#4499)
* 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>
2025-09-09 23:23:34 +03:00
Wolfsblvt 862c2b7ba3 Implement robust quote extraction for TTS narration with support for nested quotes (#4502)
* feat: implement robust quote extraction for TTS narration with multi-language support

* refactor: simplify quote matching definition, remove dead code
2025-09-09 22:22:00 +03:00
WolfsblvtandCohee f62eeb76a6 Fix toast positioning inside popups to align with the "Notifications" positioning option (#4506)
* 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>
2025-09-09 22:00:02 +03:00
Wolfsblvt d1349b10bb feat: add ctrl+enter handling for non-empty text input during regeneration (#4504)
Closes #4497
2025-09-09 16:15:27 +03:00
WolfsblvtandCohee dcc6ddf7ad Fix/cleanup and background interactability (keyboard navigation, focus/hover) (#4503)
* 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>
2025-09-09 15:57:16 +03:00
RivelleandCohee 40a46bee9d Improvement: Add Upload Button to Image Gallery (#4500)
* 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>
2025-09-08 19:35:06 +03:00
Cohee 9a5235efcd Do not replace newlines inside of pre blocks (#4498)
Fixes #4475
2025-09-08 13:37:41 +03:00
TosdandCohee 57e363cae6 feat: Regex Presets (#4468)
* Work in progress

* feat: save confirmation

* Fix eslint, add typedef

* Add slash command and compatibility with profiles

* Move UI label up

* Null safety

* Fix duplicate block title

* i18n: zh-CN translation

* Adjust debugger styles

* Move presets block down

* Do not generate id twice for new entries

* Add missing translations

* Simplify settings migration logic

* Fix type comment

* Add missing keys

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-08 12:35:14 +03:00
Cohee 6221c540e4 Reasoning: Support auto-parse for impersonation results (#4489) 2025-09-06 18:16:06 +03:00
Rivelle 8709162df3 Add: id="PersonaManagement" to Persona Management div (#4495)
Adds a missing id for the Persona Management div to align with other panels. If another naming convention is preferred, feel free to update.
2025-09-06 17:22:34 +03:00
L b793e3e19b Fix Backgrounds Borders (#4491) 2025-09-05 09:41:32 +03:00
Ngo Dinh Gia BaoandCohee 8687bb99f3 Add Electron Hub as Chat Completions Provider (#4458)
* 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>
2025-09-04 21:25:31 +03:00
CoheeandCopilot d134abd50e Server: Add host whitelisting (#4476)
* Add host whitelisting middleware

* Add prompt to enable hostWhitelist

* perf: Freeze config array

* Update src/middleware/hostWhitelist.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* perf: Add max known hosts limit

* Add validation warning disable hint

* Add conditional host whitelist middleware based on SSL configuration

* Check for cache exhaustion before logging

* Revert "Add conditional host whitelist middleware based on SSL configuration"

This reverts commit 968104c6f4.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-04 20:52:23 +03:00
Cohee 680e61d1a0 Fix npm audit 2025-09-04 19:11:07 +03:00
Cohee e871886b13 Server: Support passphrase for SSL private key (#4488)
* 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
2025-09-04 19:02:48 +03:00
LandCohee 0ba317a318 More modern backgrounds buttons and filename (#4484)
* init

* move background styles, enlarge and clip image to get rid of antialising bug

* move styles from style.css to backgrounds.css

* Reformat backgrounds.css

* Improve selector specificity, fix type errors, increase font size on thumbnails, decrease mobile toggle size

* Fix webp chat backgrounds thumbnails

* Respect reduced motion preference

* Remove transition delay

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-04 18:13:35 +03:00
Cohee 4d98b48956 Unlock Inline Image Quality control for OAI-compatible sources 2025-09-03 14:32:42 +03:00
Cohee 2bc503ec00 Fix eslint 2025-09-03 14:12:23 +03:00
Cohee 13db803bc6 CC: Remove auto-retry on code 429 2025-09-02 14:32:56 +03:00
Cohee 005a062fe7 Fix context size setting for 🤏🍌 2025-09-01 23:02:28 +03:00
Cohee ff8d7d64fc a11y: Setup observers for element roles (#4469)
* a11y: Setup observers for element roles

* Reuse a function

* Add error handling
2025-09-01 17:24:13 +03:00
fe8ebedeb2 fix: Resolve streaming output for Vertex AI Express Mode (#4474)
* fix(api): Resolve streaming output for Vertex AI Express Mode

* chore: Remove unused 'util' variable

* chore: Restore original debug log

* Even cleaner diff

---------

Co-authored-by: AliceRabbit <b290627396@gmail.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-01 16:49:55 +03:00
Cohee 285b09ceb7 NanoGPT: Add as captioning source 2025-08-31 19:00:27 +03:00
Cohee 5eea41d315 NanoGPT: Pull max context and vision capability from endpoint 2025-08-31 18:23:39 +03:00
Cohee 57cd001221 NanoGPT: Enable prompt cache for Claude models 2025-08-31 16:57:03 +03:00
Cohee bc2d3300df DeepSeek: Apply semi-strict PPP for reasoner 2025-08-31 16:45:57 +03:00
Cohee 2694ad47f3 DeepSeek: Unlock sampling params for reasoner 2025-08-31 16:45:36 +03:00
epylliaandCohee 9f257b602f Fix compiler errors in public/global.d.ts (#4464)
* 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>
2025-08-31 16:30:38 +03:00
TosdandCohee c46e1a46aa Update zh-CN translations (#4466)
* Update zh-CN translations

* Update zh-CN translations

* Add missing translations

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-31 16:06:31 +03:00
LandCohee e1af2fb47d Header change (#4465)
* header changes

* new line, comments

* Simplify styling targets

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-31 14:28:12 +03:00
Cohee ddb97d78d3 Chat Completion: Adjust depth of 0-depth injects on continue with prefill (#4452) 2025-08-30 06:25:09 +03:00
as-gh2andas-gh2 26a67b9afe Avoid consuming fetch response twice (#4460)
Fixes #4459

Co-authored-by: as-gh2 <->
2025-08-29 19:43:05 +03:00
Cohee 80fa7f96f1 Caption: Improve Ollama models handling 2025-08-27 00:45:24 +03:00
Cohee 5e4bb0415e OpenRouter: Add Google image output parsing 2025-08-26 22:01:38 +03:00
Cohee 0d84fa67bd gemini-2.5-flash-image-preview 2025-08-26 21:34:02 +03:00
e9e14001e3 Update ru-ru locale (#4449)
* Work on tl

* Small fix

* Fix formatting

---------

Co-authored-by: Yokayo <nonameutubecomm@gmail.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-26 20:37:55 +03:00
MAX-TABandCohee f9d1279a69 fix: Slash command descriptions and argument help text are not translated (#4434)
* fix: Slash command descriptions and argument help text are not translated #4428

* fix

* fix: Refine slash command translation scope per review

* fix

* Join split multiline strings

* Revert error name

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-26 20:25:52 +03:00
Cohee f81088f2e0 Update third-party npm dependencies (#4447) 2025-08-25 21:51:54 +03:00
MAX-TABandCohee 176825bdb8 feat: Advanced Regex Chain Debugger and Testing Panel (#4418)
* feat: Advanced Regex Chain Debugger and Testing Panel

* fix

* fix_2

* fix_3

* Address code review suggestions for debugger feature

* feat: Add match statistics to debugger

* ESLint

* feat: Enhance debugger with diff view and nav popup

* ESLint

* Fix styles and full results expand

* Diff clean-up

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-25 21:44:01 +03:00
Cohee 12ac171979 Temporarily disable cometapi provider 2025-08-25 20:41:26 +03:00
Cohee 1a1f57e00e Merge pull request #4444 from SillyTavern/staging
Staging
2025-08-25 18:12:02 +03:00
Cohee adfbc3555c eslint fix 2025-08-25 17:36:55 +03:00
Cohee 4102c6af18 Update version to 1.13.3 2025-08-25 16:49:22 +03:00
Cohee e37b709e96 Add Harmony template (#4431)
* Add Harmony template

* Add Thinking instruct variant and reasoning template

* Specify template hash from unsloth

* Add ggml-org template hash
2025-08-24 20:36:49 +03:00
Cohee 76326344b0 Deep clone of duplicate WI entry
Fixes #4438
2025-08-24 20:13:18 +03:00
Cohee dec25d1288 Remove continue prompt "clean-up" function (#4422)
* Remove continue prompt "clean-up" function
Fixes #4415

* Simplify generatedPromptCache handling
2025-08-24 18:03:22 +03:00
Cohee a3f52dc424 Add request type to CC generate event data 2025-08-24 00:12:00 +03:00
DepFA 6166348ec8 Improve tag visibility toggle logic (#4425)
* 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
2025-08-23 16:16:14 +03:00
TensorNullandCohee 41c74fd142 Add CometAPI as a model provider in "Chat Completion" (#4402)
* 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>
2025-08-22 20:30:42 +03:00
sirius422andsirius422 4d9f229383 Add Variety Boost option for NovelAI image generation. (#4417)
Co-authored-by: sirius422 <sirius42@gfw.moe>
2025-08-22 20:27:17 +03:00
RossAscends c53803730a allow topbar overlap during MUI element resizing 2025-08-22 11:57:34 +09:00
Cohee ad960197b7 Captioning: Load external model lists for OpenRouter, AIML and Pollinations 2025-08-21 22:09:13 +03:00
Cohee ad516c864a Improve model capability checks for AIMLAPI 2025-08-21 21:34:23 +03:00
MAX-TABandCohee 63dcda8609 feat: Send Quick Reply Before Message Generation (#4407)
* 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>
2025-08-21 20:39:16 +03:00
Cohee 40f4792b32 OpenRouter/MistralAI: Improve capability checks for tool calling and image inlining 2025-08-21 19:50:15 +03:00
Cohee 622b0885a9 Update DeepSeek context sizes 2025-08-21 19:33:15 +03:00
RendalandCohee 982b254d01 Add support for maximizing alternate greeting editor (#4413)
* Add support for maximizing alternate greeting editor.

* Use a common style class

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-21 19:30:20 +03:00
MAX-TABandCohee f107df8ca6 feat: Add Character Quick Reply Sets (#4215)
* 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>
2025-08-20 20:53:21 +03:00
cloak1505 deb07bd6cb Add a comment regarding hidden OpenRouter providers (#4406) 2025-08-20 10:00:18 +03:00
Cohee 1bc0a1ca79 MistralAI: Add new models to the list 2025-08-19 21:59:06 +03:00
Cohee 6be8a1608b Fix loading fireworks model to/from preset 2025-08-19 21:51:11 +03:00
Cohee c1c1942f9a Sync openrouter providers list
Closes #4405
2025-08-19 21:39:29 +03:00
zenglsandCohee fd00b5a5b8 Add support for named regex capture groups. (#4397)
* Update UpdateAndStart.bat

* regex named capture group

* Add row to replace with textarea

* Move checkbox up

* Revert toggle and syntax preferences

* Remove comment

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-18 21:27:36 +03:00
Cohee edacdcb0d3 Merge branch 'release' into staging 2025-08-18 20:53:19 +03:00
YokayoandYokayo d262d39ab2 Update ru-ru locale (#4401)
* Work on tl

* Small fix

---------

Co-authored-by: Yokayo <nonameutubecomm@gmail.com>
2025-08-18 20:49:13 +03:00
Cohee fe1b5d0b06 Fix eslint 2025-08-18 20:25:13 +03:00
kallewoofandCohee b6a055c766 bug-fix: adhere to chat template hash bound settings when a new model appears using the same hash as a bound one (#4393)
* 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>
2025-08-18 10:22:37 +03:00
Cohee d944581690 Save chat immediately in hide 2025-08-16 22:21:19 +03:00
Cohee 0d1bd413b6 Disallow activated on hidden continue in group 2025-08-16 00:07:27 +03:00
Cohee ff39671018 Allow activating chars with last message hidden on continue and quiet 2025-08-15 22:31:49 +03:00
Cohee 1856237202 /gen: Don't look for quiet names if argument is not provided 2025-08-15 22:30:22 +03:00
Cohee bfba070f56 /gen: "name" actually work in groups?
Fixes #4377
2025-08-15 22:21:16 +03:00
Cohee 8ae915517d Sort /api enum list alphabetically 2025-08-15 22:07:35 +03:00
bmen25124andCohee 6d4be9116d Added saveMetadataDebounced to context, fixed 0 values for custom-req… (#4386)
* Added saveMetadataDebounced to context, fixed 0 values for custom-request payloads, fixed system role prefix

* Update filtering logic

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-15 21:39:49 +03:00
Christoph 667116f4ff Fix overly sticky auto-scroll behavior (#4382)
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.
2025-08-14 23:53:26 +03:00
Cohee c03fd6a867 CC: Add model support indicators for function calling, image, and video inlining 2025-08-14 21:24:34 +03:00
ershang-fireworksandCohee e9be0f1c64 Add Fireworks AI Provider Support (#4374)
* add fireworks provider

* fix

* add context length

* Fireworks fixes

* Add logo image

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-14 20:52:46 +03:00
Cohee 659930d5ba Persist actionable tag states on reload (#4368)
* Persist actionable tag states on reload
Closes #3666

* Remove unneeded simulated clicks
2025-08-14 01:23:13 +03:00
Cohee 979fe60ebc Fix #4312 mostly functional chub import 2025-08-13 23:24:27 +03:00
buzzandCohee 0e5b509dc3 Drop Soulkyn import (#4372)
* Fix Soulkyn import

Generate and supply necessary headers to Soulkyn API request.
Fixes #4323

* Drop soulkyn import

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-13 22:25:21 +03:00
André M PivaandCohee 5cc0ae526d feat: Add close all reasonings button (#4375)
* feat: Add close all reasonings button

* Move to actions block, change icon

* Remove unneded styles

* Ditto

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-13 21:23:44 +03:00
Ni-co-la-sandCohee e71cfee4b8 Add multiple voice per character in TTS extension (#4367)
* Add multiple voice per character in TTS extension

* Reformat settings template

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-11 23:11:05 +03:00
Cohee a88afde22e Do not delete tool call messages containing just the reasoning 2025-08-11 20:34:23 +03:00
Cohee 733bf1ecd9 Skip empty tool calls returned by gpt-5 on OpenRouter
Fixes #4370
2025-08-11 20:24:22 +03:00
Cohee cc169fffc2 Tags: Add unused tags pruning to tags management 2025-08-10 23:41:50 +03:00
Cohee 3c05fb1456 Clone metadata with JSON conversion
Fixes #4366
2025-08-10 22:38:24 +03:00
Cohee 39d99eb09a Add missing fields in convert to group creation 2025-08-10 18:50:56 +03:00
Cohee c8b02dfd68 Fix duplicateQrSet
Fixes #4364
2025-08-10 16:10:41 +03:00
Cohee 5366175109 STscript syntax highlight: Fix quoted shorthand run regex
Fixes #4365
2025-08-10 15:29:43 +03:00
Cohee fb058816e8 Add trim argument to /gen and /sysgen. Closes #4361 2025-08-10 15:14:45 +03:00
Anh Tri PhamandCohee 35b1801e6e feat(client): desktop version uses select2 to search, filter, and select (#4359)
* 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>
2025-08-10 14:39:25 +03:00
CoheeandCopilot b0820c4517 Text Completion: Inject Story String @ depth (#4362)
* 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>
2025-08-09 20:33:04 +03:00
Cohee 394fc508ee Move margin from reasoning buttons to actions block 2025-08-09 19:02:29 +03:00
Cohee 69d256bd64 Prevent server crash when trying to backup settings of a deleted user 2025-08-09 17:09:58 +03:00
Cohee 5935aedb2e gpt5 thonking effort 2025-08-07 22:23:31 +03:00
Cohee 24e2564e45 chat-latest is special 2025-08-07 22:02:12 +03:00
Cohee deb417197d jippity 5 2025-08-07 21:52:10 +03:00
Cohee 25e965f717 Instruct: Add Sequences as Stop Strings control (#4355)
* Instruct: Add Sequences as Stop Strings control

* lint fix
2025-08-07 10:27:16 +03:00
Cohee d407848e0a Substitute macro params in 4o character instructions 2025-08-06 23:36:44 +03:00
Ni-co-la-sandCohee 894f3e986e Add gpt-4o-mini-tts model with character voice instructions #3879 (#4352)
* Add gpt-4o-mini-tts model with character voice instructions

* Restyle instructions block

* Add debug log for tts request

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-06 21:52:21 +03:00
kallewoofandCohee c8612e2ab6 feature: ignore budget switch (#4354)
* 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>
2025-08-06 21:30:42 +03:00
Cohee f1fcd68c99 WTF Anthropic??? 2025-08-06 08:35:01 +00:00
Cohee fb8150a8fd clopus 4.1 2025-08-05 21:14:59 +03:00
5865a1a85b Allow extensions to specify minimum ST client version (#4350)
* allow extensions to specify minimum client version

* using existing version compare function

* Move versionCompare to utils module

---------

Co-authored-by: qvink <qvink@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-08-05 00:31:05 +03:00
Cohee 00121b281a Merge pull request #4347 from crimeragames/release
Fix duplication of multi-line example message separators in instruct mode
2025-08-03 14:10:42 +03:00
Cohee 4db44af110 Support gzip compression for tokenizer downloads (#4348)
* Support gzip compression for tokenizer downloads

* Use Uint8Array for buffer conversion

* Add gunzip support for manually downloaded tokenizer files

* Remove underlying buffer access

* Remove additional buffer allocations
2025-08-03 13:38:41 +03:00
Cohee 2e3dff73a1 Update UpdateAndStart.bat 2025-08-03 00:59:55 +03:00
angry bird 8b5d1e9610 Update script.js 2025-08-02 19:55:15 +02:00
angry bird 2a96d622fb Fix duplication of multi-line example message separators in instruct mode 2025-08-02 19:45:43 +02:00
Cohee f81e14a2e8 Add copy option to move WI entry (#4335)
* Add copy option to move WI entry
Closes #4334

* Update moveWorldInfoEntry log to indicate copy or move action
2025-08-02 19:45:51 +03:00
Cohee 4d883fec26 Add static container for dice extension settings 2025-08-01 23:16:36 +03:00
Cohee d21afa1ae5 Fix Magistral latest reasoning extraction
Fixes #4339
2025-08-01 19:58:09 +03:00
equal-l2 a848bc3803 Add command-a-vision support (#4340)
* Add command-a-vision support

* Fix image is not inlined

* Add image captioning support
2025-08-01 10:55:28 +03:00
Cohee 0b7f9451f4 Adjust addl. params YAML placeholders
Fixes #4333
2025-07-31 01:18:04 +03:00
Cohee 0e38bfbf05 Feat/moonshot api (#4330)
* moonshot

* Partial mode + JSON schema

* Add logo image

* Limit max temp to 1

* Add to captioning extension
2025-07-31 00:01:04 +03:00
Cohee dd4dae1dc6 Don't display welcome assistant hint for non-default greeting 2025-07-30 10:40:07 +00:00
Cohee eeb37a6f94 Fix auto-load chat when opening from welcome screen 2025-07-29 23:35:17 +03:00
Cohee c63dc41887 Fix type errors in samplerSelect 2025-07-28 23:05:47 +03:00
Cohee 02b137c8e2 Fix type errors in BulkEditOverlay 2025-07-28 22:46:41 +03:00
Cohee 0c0582b139 Fix type errors in extensions-slashcommands 2025-07-28 22:30:47 +03:00
Cohee a28a33cb02 Fix type errors in Ross-mods.js 2025-07-28 22:26:01 +03:00
Aleks L.TandCohee e712ededc9 fixes #4324: injectedIndices becomes invalidated with a off-by-one in… (#4325)
* 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>
2025-07-28 21:54:32 +03:00
Cohee 086f873f2f Deprecate 01.ai chat completion source (#4327) 2025-07-28 21:29:01 +03:00
Cohee 7d40ec1acd Disable autocomplete on send_textarea
Closes #4318
2025-07-28 00:25:25 +03:00
Cohee 21d4c37846 Do not attempt to DNS resolve localhost
Fixes #4290
2025-07-27 21:42:45 +03:00
Cohee c9d2064304 fix: update button titles to use proper capitalization 2025-07-27 20:04:59 +03:00
An5w1randCohee c283025b15 feat: add tts provider MiniMax (#4309)
* 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>
2025-07-27 15:56:26 +03:00
Coheeandgemini-code-assist[bot] 29815fbdda AI Studio/Vertex AI: add seed param (#4314)
* 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>
2025-07-27 15:10:19 +03:00
Cohee 0755be22e6 Pollinations: Show "Request model reasoning" 2025-07-27 15:03:52 +03:00
Cohee 7b67769c92 Fix convert to persona with unusual names (#4319)
* Fix convert to persona with unusual names

* Fix picking new persona on current persona deletion

* Prefer actual path on page reload
2025-07-27 14:16:15 +03:00
Cohee 432286ae3a Add micro-readme for repo root 2025-07-27 14:13:53 +03:00
413 changed files with 38232 additions and 13249 deletions
+4
View File
@@ -15,3 +15,7 @@ access.log
/public/scripts/extensions/third-party
/colab
.gemini
/docker/config
/docker/extensions
/docker/data
/docker/plugins
+10
View File
@@ -41,6 +41,16 @@ labels:
🔬 This PR needs testing!
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.
- name: 🟥 ⬤⬤⬤⬤⬤
labeled:
pr:
+1 -1
View File
@@ -2,4 +2,4 @@
## Checklist:
- [ ] I have read the [Contributing guidelines](https://github.com/SillyTavern/SillyTavern/blob/release/CONTRIBUTING.md).
- [ ] I have read the [Contribution guidelines](https://github.com/SillyTavern/SillyTavern/blob/release/CONTRIBUTING.md).
+1
View File
@@ -79,6 +79,7 @@ GNU Affero General Public License for more details.**
* Portions of CncAnon's TavernAITurbo mod used with permission
* Visual Novel Mode inspired by the work of PepperTaco (<https://github.com/peppertaco/Tavern/>)
* Noto Sans font by Google (OFL license)
* Lexer/Parser by Chevrotain (Apache-2.0 license) <https://github.com/chevrotain/chevrotain>
* Icon theme by Font Awesome <https://fontawesome.com> (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Default content by @OtisAlejandro (Seraphina character and lorebook) and @kallmeflocc (10K Discord Users Celebratory Background)
* Docker guide by [@mrguymiah](https://github.com/mrguymiah) and [@Bronya-Rand](https://github.com/Bronya-Rand)
+54 -9
View File
@@ -15,8 +15,19 @@ jobs:
label-on-content:
name: 🏷️ Label Issues by Content
runs-on: ubuntu-latest
if: always()
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
@@ -32,13 +43,25 @@ jobs:
with:
configuration-path: .github/issues-auto-labels.yml
enable-versioned-regex: 0
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token: ${{ steps.app.outputs.token }}
label-on-labels:
name: 🏷️ Label Issues by Labels
needs: [label-on-content]
runs-on: ubuntu-latest
if: always()
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: ✅ Add "👍 Approved" for relevant labels
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
if: github.event_name == 'issue_comment' && github.actor != 'github-actions[bot]'
if: always() && (github.event_name == 'issue_comment' && github.event.sender.type != 'Bot')
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Remove Stale Label
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ steps.app.outputs.token }}
issue-number: ${{ github.event.issue.number }}
labels: '⚰️ Stale,🕸️ Inactive,🚏 Awaiting User Response,🛑 No Response'
write-auto-comments:
name: 💬 Post Issue Comments Based on Labels
needs: [label-on-content, label-on-labels]
needs: [label-on-content, label-on-labels, remove-stale-label]
runs-on: ubuntu-latest
if: always()
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
@@ -113,4 +158,4 @@ jobs:
uses: peaceiris/actions-label-commenter@v1.10.0
with:
config_file: .github/issues-auto-comments.yml
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ steps.app.outputs.token }}
+12 -1
View File
@@ -15,8 +15,19 @@ jobs:
update-linked-issues:
name: 🔗 Mark Linked Issues Done on Push
runs-on: ubuntu-latest
if: always()
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
@@ -31,7 +42,7 @@ jobs:
- name: Label Linked Issues
id: label_linked_issues
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.app.outputs.token }}
run: |
for ISSUE in $(echo $issues | jq -r '.[]'); do
if [ "${{ github.ref }}" == "refs/heads/staging" ]; then
+38 -5
View File
@@ -15,14 +15,25 @@ jobs:
mark-inactivity:
name: ⏳ Mark Issues/PRs without Activity
runs-on: ubuntu-latest
if: always()
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Mark Issues/PRs without Activity
# Close Stale Issues and PRs
# https://github.com/marketplace/actions/close-stale-issues
uses: actions/stale@v9.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token: ${{ steps.app.outputs.token }}
days-before-stale: 183
days-before-close: 7
operations-per-run: 30
@@ -47,16 +58,27 @@ jobs:
await-user-response:
name: ⚠️ Mark Issues/PRs Awaiting User Response
needs: [mark-inactivity]
runs-on: ubuntu-latest
needs: mark-inactivity
if: always()
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Mark Issues/PRs Awaiting User Response
# Close Stale Issues and PRs
# https://github.com/marketplace/actions/close-stale-issues
uses: actions/stale@v9.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token: ${{ steps.app.outputs.token }}
days-before-stale: 7
days-before-close: 7
operations-per-run: 30
@@ -74,16 +96,27 @@ jobs:
alternative-exists:
name: 🔄 Mark Issues with Alternative Exists
needs: [mark-inactivity, await-user-response]
runs-on: ubuntu-latest
needs: await-user-response
if: always()
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Mark Issues with Alternative Exists
# Close Stale Issues and PRs
# https://github.com/marketplace/actions/close-stale-issues
uses: actions/stale@v9.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token: ${{ steps.app.outputs.token }}
days-before-stale: 7
days-before-close: 7
operations-per-run: 30
+2 -2
View File
@@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 22
- run: npm ci
publish-npm:
@@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 22
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
+12 -1
View File
@@ -15,14 +15,25 @@ jobs:
remove-labels:
name: 🗑️ Remove Pending Labels on Close
runs-on: ubuntu-latest
if: always()
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Remove Pending Labels on Close
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
with:
actions: remove-labels
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ steps.app.outputs.token }}
issue-number: ${{ github.event.issue.number || github.event.pull_request.number }}
labels: '🚏 Awaiting User Response,🧑‍💻 In Progress,📌 Keep Open,🚫 Merge Conflicts,🔬 Needs Testing,🔨 Needs Work,⚰️ Stale,⛔ Waiting For External/Upstream'
+12 -2
View File
@@ -15,15 +15,25 @@ jobs:
label-maintainer:
name: 🏷️ Label if Author is a Repo Maintainer
runs-on: ubuntu-latest
if: contains(fromJson('["Cohee1207", "RossAscends", "Wolfsblvt"]'), github.actor)
if: always() && contains(fromJson('["Cohee1207", "RossAscends", "Wolfsblvt"]'), github.actor)
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Label if Author is a Repo Maintainer
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ steps.app.outputs.token }}
issue-number: ${{ github.event.issue.number || github.event.pull_request.number }}
labels: '👷 Maintainer'
+120 -16
View File
@@ -16,7 +16,7 @@ jobs:
name: ✅ Check ESLint on PR
runs-on: ubuntu-latest
# Only needs to run when code is changed
if: github.event.action == 'opened' || github.event.action == 'synchronize'
if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
# Override permissions, linter likely needs write access to issues
permissions:
@@ -48,7 +48,7 @@ jobs:
# https://github.com/marketplace/actions/action-eslint
uses: sibiraj-s/action-eslint@v3.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }} # ESLint can run with the original permissions
eslint-args: '--ignore-path=.gitignore --quiet'
extensions: 'js'
annotations: true
@@ -56,6 +56,38 @@ jobs:
dist/
lib/
run-tests:
name: ✅ Run Unit Tests on PR
runs-on: ubuntu-latest
# Only needs to run when code is changed
if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
steps:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup Node.js
# Setup Node.js environment
# https://github.com/marketplace/actions/setup-node-js-environment
uses: actions/setup-node@v4.3.0
with:
node-version: 20
cache: 'npm'
- name: Install root dependencies
run: npm ci
- name: Install test dependencies
run: npm ci --prefix tests
- name: Run unit tests
run: npm run test:unit --prefix tests
label-by-size:
name: 🏷️ Label PR by Size
# This job should run after all others, to prevent possible concurrency issues
@@ -71,12 +103,22 @@ jobs:
pull-requests: write
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Label PR Size
# Pull Request Size Labeler
# https://github.com/marketplace/actions/pull-request-size-labeler
uses: codelytv/pr-size-labeler@v1.10.2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app.outputs.token }}
xs_label: '🟩 ⬤○○○○'
xs_max_size: '20'
s_label: '🟩 ⬤⬤○○○'
@@ -95,9 +137,19 @@ jobs:
name: 🏷️ Label PR by Branches
runs-on: ubuntu-latest
# Only label once when PR is created or when base branch is changed, to allow manual label removal
if: github.event.action == 'opened' || (github.event.action == 'synchronize' && github.event.changes.base)
if: always() && (github.event.action == 'opened' || (github.event.action == 'synchronize' && github.event.changes.base))
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
@@ -109,15 +161,26 @@ jobs:
uses: actions/labeler@v5.0.0
with:
configuration-path: .github/pr-auto-labels-by-branch.yml
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token: ${{ steps.app.outputs.token }}
label-by-files:
name: 🏷️ Label PR by Files
needs: [label-by-branches]
runs-on: ubuntu-latest
# Only needs to run when code is changed
if: github.event.action == 'opened' || github.event.action == 'synchronize'
if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
@@ -127,15 +190,18 @@ jobs:
# Pull Request Labeler
# https://github.com/marketplace/actions/labeler
uses: actions/labeler@v5.0.0
env:
GITHUB_TOKEN: ${{ steps.app.outputs.token }} # labeler action needs some handholding
with:
configuration-path: .github/pr-auto-labels-by-files.yml
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token: ${{ steps.app.outputs.token }}
remove-stale-label:
name: 🗑️ Remove Stale Label on Comment
needs: [label-by-branches, label-by-files]
runs-on: ubuntu-latest
# Only runs on comments not done by the github actions bot
if: github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]'
if: always() && (github.event_name == 'pull_request_review_comment' && github.event.sender.type != 'Bot')
# Override permissions, issue labeler needs issues write access
permissions:
@@ -144,19 +210,33 @@ jobs:
pull-requests: write
steps:
- name: Mint App Token
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
id: app
# Only run if the PR is from the same repository
# This action runs on comments, which will not receive the env vars for this
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Remove Stale Label
if: always()
# 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3.6.0
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ steps.app.outputs.token || github.token }} # Use fallback to GITHUB_TOKEN if app token is not available
issue-number: ${{ github.event.pull_request.number }}
labels: '⚰️ Stale'
check-merge-blocking-labels:
name: 🚫 Check Merge Blocking Labels
needs: [label-by-branches, label-by-files]
needs: [label-by-branches, label-by-files, remove-stale-label]
runs-on: ubuntu-latest
# Run, even if the previous jobs were skipped/failed
if: always()
@@ -206,12 +286,22 @@ jobs:
write-auto-comments:
name: 💬 Post PR Comments Based on Labels
needs: [label-by-branches, label-by-files]
needs: [label-by-branches, label-by-files, remove-stale-label, check-merge-blocking-labels]
runs-on: ubuntu-latest
# Run, even if the previous jobs were skipped/failed
if: always()
if: always() && (github.event_name == 'pull_request_target')
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
@@ -223,13 +313,17 @@ jobs:
uses: peaceiris/actions-label-commenter@v1.10.0
with:
config_file: .github/pr-auto-comments.yml
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ steps.app.outputs.token }}
# 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.
update-linked-issues:
name: 🔗 Mark Linked Issues Done on Staging Merge
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'staging'
if: >
always() &&
github.event_name == 'pull_request_target' &&
github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'staging'
# Override permissions, We need to be able to write to issues
permissions:
@@ -238,6 +332,16 @@ jobs:
pull-requests: write
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Extract Linked Issues From PR Description
id: extract_issues
run: |
@@ -250,7 +354,7 @@ jobs:
PR_NUMBER=${{ github.event.pull_request.number }}
REPO=${{ github.repository }}
API_URL="https://api.github.com/repos/$REPO/pulls/$PR_NUMBER/issues"
ISSUES=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$API_URL" | jq -r '.[].number' | jq -R -s -c 'split("\n")[:-1]')
ISSUES=$(curl -s -H "Authorization: token ${{ steps.app.outputs.token }}" "$API_URL" | jq -r '.[].number' | jq -R -s -c 'split("\n")[:-1]')
echo "linked_issues=$ISSUES" >> $GITHUB_ENV
- name: Merge Issue Lists
@@ -262,7 +366,7 @@ jobs:
- name: Label Linked Issues
id: label_linked_issues
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.app.outputs.token }}
run: |
for ISSUE in $(echo $final_issues | jq -r '.[]'); do
gh issue edit $ISSUE -R ${{ github.repository }} --add-label "✅ Done (staging)" --remove-label "🧑‍💻 In Progress"
@@ -15,14 +15,25 @@ jobs:
check-merge-conflicts:
name: ⚔️ Check Merge Conflicts
runs-on: ubuntu-latest
if: always()
steps:
- name: Mint App Token
id: app
# Create a GitHub App token
# https://github.com/marketplace/actions/create-github-app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.ST_BOT_APP_ID }}
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Check Merge Conflicts
# Label Conflicting Pull Requests
# https://github.com/marketplace/actions/label-conflicting-pull-requests
uses: eps1lon/actions-label-merge-conflict@v3.0.3
with:
dirtyLabel: '🚫 Merge Conflicts'
repoToken: ${{ secrets.GITHUB_TOKEN }}
repoToken: ${{ steps.app.outputs.token }}
commentOnDirty: >
⚠️ This PR has conflicts that need to be resolved before it can be merged.
+3 -1
View File
@@ -54,4 +54,6 @@ public/scripts/extensions/third-party
.aider*
.env
/StartDev.bat
yarn.lock
*.code-workspace
test-results/
+17 -4
View File
@@ -9,7 +9,7 @@
## Getting the code ready
1. Register a GitHub account.
2. Fork this repository under your account.
2. Fork this repository under your account.
3. Clone the fork onto your machine.
4. Open the cloned repository in the code editor.
5. Create a git branch (recommended).
@@ -28,12 +28,25 @@
- Updating README.
- Updating GitHub Actions.
- Hotfixing a critical bug.
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.
## Further reading
+2 -2
View File
@@ -1,4 +1,4 @@
FROM node:lts-alpine3.21
FROM node:lts-alpine3.22
# Arguments
ARG APP_HOME=/home/node/app
@@ -17,7 +17,7 @@ COPY . ./
RUN \
echo "*** Install npm packages ***" && \
npm i --no-audit --no-fund --loglevel=error --no-progress --omit=dev && npm cache clean --force
npm ci --no-audit --no-fund --loglevel=error --no-progress --omit=dev && npm cache clean --force
# Create config directory and link config.yaml
RUN \
+14
View File
@@ -0,0 +1,14 @@
# SillyTavern
LLM Frontend for Power Users
## Resources
- GitHub: <https://github.com/SillyTavern/SillyTavern>
- Docs: <https://docs.sillytavern.app/>
- Discord: <https://discord.gg/sillytavern>
- Reddit: <https://reddit.com/r/SillyTavernAI>
## License
AGPL-3.0
+1 -1
View File
@@ -1,7 +1,7 @@
@echo off
pushd %~dp0
set NODE_ENV=production
call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev
call npm install --no-save --no-audit --no-fund --loglevel=error --no-progress --omit=dev
node server.js %*
pause
popd
+2 -2
View File
@@ -15,12 +15,12 @@ if %errorlevel% neq 0 (
if %errorlevel% neq 0 (
REM incase there is still something wrong
echo There were errors while updating.
echo See the update FAQ at https://docs.sillytavern.app/usage/update/#common-update-problems
echo See the update FAQ at https://docs.sillytavern.app/installation/updating/
goto end
)
)
set NODE_ENV=production
call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev
call npm install --no-save --no-audit --no-fund --loglevel=error --no-progress --omit=dev
node server.js %*
:end
pause
+1 -1
View File
@@ -102,7 +102,7 @@ if %errorlevel% neq 0 (
echo Installing npm packages and starting server
set NODE_ENV=production
call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev
call npm install --no-save --no-audit --no-fund --loglevel=error --no-progress --omit=dev
node server.js %*
:end
+48 -8
View File
@@ -40,9 +40,15 @@ browserLaunch:
port: 8000
# -- SSL options --
ssl:
# Enable SSL/TLS encryption
enabled: false
# Path to certificate (relative to server root)
certPath: "./certs/cert.pem"
# Path to private key (relative to server root)
keyPath: "./certs/privkey.pem"
# Private key passphrase (leave empty if not needed)
# For better security, use a CLI argument or an environment variable (SILLYTAVERN_SSL_KEYPASSPHRASE)
keyPassphrase: ""
# -- SECURITY CONFIGURATION --
# Toggle whitelist mode
whitelistMode: true
@@ -76,19 +82,43 @@ requestProxy:
enableUserAccounts: false
# Enable discreet login mode: hides user list on the login screen
enableDiscreetLogin: false
# Enable's authlia based auto login. Only enable this if you
# have setup and installed Authelia as a middle-ware on your
# reverse proxy
# https://www.authelia.com/
# This will use auto login to an account with the same username
# as that used for authlia. (Ensure the username in authlia
# is an exact match in lowercase with that in sillytavern)
autheliaAuth: false
# If `basicAuthMode` and this are enabled then
# the username and passwords for basic auth are the same as those
# for the individual accounts
perUserBasicAuth: false
# -- SSO LOGIN CONFIGURATION --
sso:
# Enable's authlia based auto login. Only enable this if you
# have setup and installed Authelia as a middle-ware on your
# reverse proxy
# https://www.authelia.com/
# This will use auto login to an account with the same username
# as that used for authlia. (Ensure the username in authlia
# is an exact match in lowercase with that in sillytavern)
autheliaAuth: false
# Enable's authentik based auto login. Only enable this if you
# have setup and installed Authentik as a middle-ware on your
# reverse proxy.
# https://goauthentik.io/
# This will use auto login to an account with the same username
# as that used for authentik. (Ensure the username in authentik
# is an exact match in lowercase with that in sillytavern).
authentikAuth: false
# Host whitelist configuration. Recommended if you're using a listen mode
hostWhitelist:
# Enable or disable host whitelisting
enabled: false
# Scan incoming requests for potential host header spoofing
scan: true
# List of allowed hosts. Do not include localhost or IPs, these are safe.
# Use a dot to create subdomain patterns.
# Examples:
# - example.com
# - .trycloudflare.com
hosts: []
# User session timeout *in seconds* (defaults to 24 hours).
## Set to a positive number to expire session after a certain time of inactivity
## Set to 0 to expire session when the browser is closed
@@ -257,6 +287,16 @@ claude:
gemini:
# API endpoint version ("v1beta" or "v1alpha")
apiVersion: 'v1beta'
# Enables caching of the system prompt (if supported). Only for OpenRouter.
# -- IMPORTANT! --
# Use only when the prompt before the chat history is static and doesn't change between requests
# (e.g {{random}} macro or lorebooks not as in-chat injections).
# Otherwise, you'll just waste money on cache misses.
enableSystemPromptCache: false
# https://ai.google.dev/gemini-api/docs/imagen#imagen-configuration
image:
# Leave empty to use the API-default value.
personGeneration: 'allow_adult'
# -- SERVER PLUGIN CONFIGURATION --
enableServerPlugins: false
# Attempt to automatically update server plugins on startup
+18 -218
View File
@@ -139,98 +139,18 @@
"filename": "Char_Avatar_Comfy_Workflow.json",
"type": "workflow"
},
{
"filename": "presets/kobold/Ace of Spades.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Basic Coherence.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Best Guess.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Coherent Creativity.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Deterministic.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Genesis.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Godlike.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Good Winds.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Liminal Drift.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Low Rider.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Luna Moth.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Mayday.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Miro Bronze.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Miro Gold.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Miro Silver.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Ouroboros.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Pleasing Results.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Pro Writer.json",
"filename": "presets/kobold/Neutral.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/RecoveredRuins.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Space Alien.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Storywriter.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/TFS-with-Top-A.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Titanic.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Universal-Creative.json",
"type": "kobold_preset"
@@ -243,10 +163,6 @@
"filename": "presets/kobold/Universal-Super-Creative.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/simple-proxy-for-tavern.json",
"type": "kobold_preset"
},
{
"filename": "presets/novel/Asper-Kayra.json",
"type": "novel_preset"
@@ -343,22 +259,6 @@
"filename": "presets/novel/Erato-Zany Scribe.json",
"type": "novel_preset"
},
{
"filename": "presets/textgen/Asterism.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Beam Search.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Big O.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Contrastive Search.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Default.json",
"type": "textgen_preset"
@@ -368,99 +268,7 @@
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Divine Intellect.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Kobold (Godlike).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Kobold (Liminal Drift).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/LLaMa-Precise.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Midnight Enigma.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Miro Bronze.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Miro Gold.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Miro Silver.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Mirostat.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Naive.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Best Guess).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Decadence).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Genesis).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Lycaenidae).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Ouroboros).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Pleasing Results).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Sphinx Moth).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Storywriter).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Shortwave.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Simple-1.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Space Alien.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/StarChat.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/TFS-with-Top-A.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Titanic.json",
"filename": "presets/textgen/Neutral.json",
"type": "textgen_preset"
},
{
@@ -475,14 +283,6 @@
"filename": "presets/textgen/Universal-Super-Creative.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Yara.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/simple-proxy-for-tavern.json",
"type": "textgen_preset"
},
{
"filename": "presets/openai/Default.json",
"type": "openai_preset"
@@ -507,14 +307,6 @@
"filename": "presets/context/Default.json",
"type": "context"
},
{
"filename": "presets/context/DreamGen Role-Play V1 ChatML.json",
"type": "context"
},
{
"filename": "presets/context/DreamGen Role-Play V1 Llama3.json",
"type": "context"
},
{
"filename": "presets/context/Libra-32B.json",
"type": "context"
@@ -587,14 +379,6 @@
"filename": "presets/instruct/ChatML.json",
"type": "instruct"
},
{
"filename": "presets/instruct/DreamGen Role-Play V1 ChatML.json",
"type": "instruct"
},
{
"filename": "presets/instruct/DreamGen Role-Play V1 Llama3.json",
"type": "instruct"
},
{
"filename": "presets/instruct/Koala.json",
"type": "instruct"
@@ -838,5 +622,21 @@
{
"filename": "presets/context/Moonshot AI.json",
"type": "context"
},
{
"filename": "presets/context/OpenAI Harmony.json",
"type": "context"
},
{
"filename": "presets/instruct/OpenAI Harmony.json",
"type": "instruct"
},
{
"filename": "presets/instruct/OpenAI Harmony (Thinking).json",
"type": "instruct"
},
{
"filename": "presets/reasoning/OpenAI Harmony.json",
"type": "reasoning"
}
]
@@ -1,8 +1,12 @@
{
"story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": false,
"trim_sentences": false,
"single_line": true,
@@ -1,8 +1,12 @@
{
"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": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": false,
"trim_sentences": false,
"single_line": false,
+5 -1
View File
@@ -1,8 +1,12 @@
{
"story_string": "{{#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}}\n\n",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "<|im_start|>system\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}}{{trim}}<|im_end|>",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
+5 -1
View File
@@ -1,8 +1,12 @@
{
"story_string": "<|im_start|>system\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}}{{trim}}<|im_end|>",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"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": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>New Roleplay:<|END_OF_TURN_TOKEN|>",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "{{#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}}{{trim}}\n",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
+5 -1
View File
@@ -1,8 +1,12 @@
{
"story_string": "{{#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": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "***",
"chat_start": "***",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
+5 -2
View File
@@ -1,11 +1,14 @@
{
"story_string": "<|system|>\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}}{{trim}}<|endofsystem|>",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
"name": "Dots1"
}
}
@@ -1,10 +0,0 @@
{
"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}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"always_force_name2": false,
"trim_sentences": true,
"single_line": false,
"name": "DreamGen Role-Play V1 ChatML"
}
@@ -1,10 +0,0 @@
{
"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}}.",
"use_stop_strings": false,
"always_force_name2": false,
"trim_sentences": true,
"single_line": false,
"name": "DreamGen Role-Play V1 Llama3"
}
+5 -1
View File
@@ -1,8 +1,12 @@
{
"story_string": "[gMASK]<sop>{{#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}}{{trim}}\n",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
+5 -1
View File
@@ -1,8 +1,12 @@
{
"story_string": "<start_of_turn>user\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}}{{trim}}<end_of_turn>",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "### Instruction:\n{{#if system}}{{system}}\n\n{{/if}}### Character Sheet:\n{{#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": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "### Example:",
"chat_start": "### START ROLEPLAY:",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"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": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "Example of an interaction:\n",
"chat_start": "This is the history of the roleplay:\n",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "[INST] <<SYS>>\n{{#if system}}{{system}}\n<</SYS>>\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}}{{trim}} [/INST]",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "<|start_header_id|>system<|end_header_id|>\n\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}}{{trim}}<|eot_id|>",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "<|begin_of_text|><|header_start|>system<|header_end|>\n\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}}{{trim}}<|eot|>",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "<|start_header_id|>system<|end_header_id|>\n\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}}{{trim}}<|eot_id|>",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "{{#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": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": " [INST] {{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}} [/INST] Understood.</s>",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "[INST] {{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}}[/INST] Understood.</s>",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "[INST]{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}}[/INST]Understood.</s>",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "[SYSTEM_PROMPT]{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}}[/SYSTEM_PROMPT]",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "[SYSTEM_PROMPT] {{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}}[/SYSTEM_PROMPT]",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,11 +1,14 @@
{
"story_string": "<|im_system|>system<|im_middle|>{{#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}}{{trim}}<|im_end|>",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
"name": "Moonshot AI"
}
}
+5 -1
View File
@@ -1,8 +1,12 @@
{
"story_string": "{{#if system}}{{system}}{{/if}}\n{{#if wiBefore}}{{wiBefore}}{{/if}}\n{{#if persona}}{{persona}}{{/if}}\n{{#if description}}{{description}}{{/if}}\n{{#if personality}}Personality: {{personality}}{{/if}}\n{{#if scenario}}Scenario: {{scenario}}{{/if}}\n{{#if wiAfter}}{{wiAfter}}{{/if}}",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "***",
"chat_start": "***",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"story_string": "{{#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}}Circumstances and context of the dialogue: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#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}}Circumstances and context of the dialogue: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}",
"example_separator": "This is how {{char}} should talk",
"chat_start": "\nThen the roleplay chat between {{user}} and {{char}} begins.\n",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -0,0 +1,14 @@
{
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
"name": "OpenAI Harmony"
}
+5 -1
View File
@@ -1,8 +1,12 @@
{
"story_string": "<|system|>\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}}{{trim}}<|end|>\n",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
+5 -1
View File
@@ -1,8 +1,12 @@
{
"story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
+5 -1
View File
@@ -1,8 +1,12 @@
{
"story_string": "{{#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": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
+5 -1
View File
@@ -1,8 +1,12 @@
{
"story_string": "<|system|>\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}}{{trim}}\n",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -1,8 +1,12 @@
{
"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)",
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#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}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}",
"example_separator": "### New Roleplay:",
"chat_start": "### New Roleplay:",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": true,
"trim_sentences": false,
"single_line": false,
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "none",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "",
"story_string_suffix": "",
"name": "Adventure"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "<START OF CHAT>",
"skip_examples": false,
"output_suffix": "",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:",
"story_string_suffix": "\n",
"name": "Alpaca-Single-Turn"
}
+5 -2
View File
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "\n\n",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "",
"story_string_suffix": "\n\n",
"name": "Alpaca"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "none",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|im_end|>\n",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|im_start|>system",
"story_string_suffix": "<|im_end|>\n",
"name": "ChatML-Names"
}
+5 -2
View File
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|im_end|>\n",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|im_start|>system",
"story_string_suffix": "<|im_end|>\n",
"name": "ChatML"
}
@@ -1,22 +1,25 @@
{
"input_sequence": "<|START_OF_TURN_TOKEN|><|USER_TOKEN|>",
"output_sequence": "<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>",
"first_output_sequence": "",
"last_output_sequence": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"system_sequence": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>",
"stop_sequence": "<|END_OF_TURN_TOKEN|>",
"wrap": false,
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|END_OF_TURN_TOKEN|>",
"input_suffix": "<|END_OF_TURN_TOKEN|>",
"system_sequence": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>",
"system_suffix": "<|END_OF_TURN_TOKEN|>",
"user_alignment_message": "",
"last_system_sequence": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>",
"story_string_suffix": "<|END_OF_TURN_TOKEN|>",
"name": "Command R"
}
@@ -1,22 +1,25 @@
{
"input_sequence": "<|User|>",
"output_sequence": "<|Assistant|>",
"first_output_sequence": "",
"last_output_sequence": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"system_sequence": "",
"stop_sequence": "",
"wrap": false,
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|end▁of▁sentence|>",
"input_suffix": "",
"system_sequence": "",
"system_suffix": "",
"user_alignment_message": "",
"last_system_sequence": "",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "",
"story_string_suffix": "",
"name": "DeepSeek-V2.5"
}
+3 -2
View File
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|endofresponse|>\n",
@@ -20,5 +18,8 @@
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|system|>",
"story_string_suffix": "<|endofsystem|>\n",
"name": "Dots1"
}
@@ -1,22 +0,0 @@
{
"input_sequence": "\n<|im_start|>text names= {{name}}\n",
"output_sequence": "\n<|im_start|>text names= {{name}}\n",
"last_output_sequence": "",
"system_sequence": "",
"stop_sequence": "\n<|im_start|>",
"wrap": false,
"macro": true,
"names_behavior": "none",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|im_end|>",
"input_suffix": "<|im_end|>",
"system_suffix": "",
"user_alignment_message": "",
"system_same_as_user": true,
"last_system_sequence": "",
"name": "DreamGen Role-Play V1 ChatML"
}
@@ -1,16 +0,0 @@
{
"input_sequence": "<|eot_id|>\n<|start_header_id|>writer character: {{user}}<|end_header_id|>\n\n",
"output_sequence": "<|eot_id|>\n<|start_header_id|>writer character: {{char}}<|end_header_id|>\n\n",
"first_output_sequence": "",
"last_output_sequence": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"stop_sequence": "",
"separator_sequence": "",
"wrap": false,
"macro": true,
"names_behavior": "none",
"activation_regex": "",
"skip_examples": false,
"name": "DreamGen Role-Play V1 Llama3"
}
+8 -5
View File
@@ -1,22 +1,25 @@
{
"input_sequence": "<|user|>\n",
"output_sequence": "<|assistant|>\n",
"first_output_sequence": "",
"last_output_sequence": "",
"system_sequence_prefix": "<|system|>\n",
"system_sequence_suffix": "",
"system_sequence": "",
"stop_sequence": "",
"wrap": false,
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "",
"input_suffix": "",
"system_sequence": "",
"system_suffix": "",
"user_alignment_message": "",
"last_system_sequence": "",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "[gMASK]<sop>",
"story_string_suffix": "\n",
"name": "GLM-4"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<end_of_turn>\n",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<start_of_turn>user",
"story_string_suffix": "<end_of_turn>\n",
"name": "Gemma 2"
}
+6 -3
View File
@@ -8,15 +8,18 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "BEGINNING OF CONVERSATION: ",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "</s>",
"input_suffix": "",
"input_suffix": " ",
"system_suffix": "",
"user_alignment_message": "",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "BEGINNING OF CONVERSATION: ",
"story_string_suffix": "\n",
"name": "Koala"
}
@@ -4,12 +4,10 @@
"last_output_sequence": "",
"system_sequence": "{{[SYSTEM]}}",
"stop_sequence": "",
"wrap": true,
"wrap": false,
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "{{[OUTPUT_END]}}",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "{{[SYSTEM]}}",
"story_string_suffix": "{{[SYSTEM_END]}}",
"name": "KoboldAI"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "always",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "### Instruction:",
"story_string_suffix": "",
"name": "Libra-32B"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "\n\n",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:",
"story_string_suffix": "\n\n",
"name": "Lightning 1.1"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "\n",
@@ -18,5 +16,10 @@
"user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "[INST] <<SYS>>\n",
"story_string_suffix": "\n<</SYS>> Understood. [/INST]",
"name": "Llama 2 Chat"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|eot_id|>",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|start_header_id|>system<|end_header_id|>\n\n",
"story_string_suffix": "<|eot_id|>",
"name": "Llama 3 Instruct"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|eot|>",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|begin_of_text|><|header_start|>system<|header_end|>\n\n",
"story_string_suffix": "<|eot|>",
"name": "Llama 4 Instruct"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "none",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|eot_id|>",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|start_header_id|>system<|end_header_id|>\n\n",
"story_string_suffix": "<|eot_id|>",
"name": "Llama-3-Instruct-Names"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "<|system|>",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|system|>",
"story_string_suffix": "",
"name": "Metharme"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "</s>",
@@ -18,5 +16,10 @@
"user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": " [INST] ",
"story_string_suffix": " [/INST] Understood.</s>",
"name": "Mistral V1"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "</s>",
@@ -18,5 +16,10 @@
"user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "[INST] ",
"story_string_suffix": "[/INST] Understood.</s>",
"name": "Mistral V2 & V3"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "</s>",
@@ -18,5 +16,10 @@
"user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "[INST]",
"story_string_suffix": "[/INST]Understood.</s>",
"name": "Mistral V3-Tekken"
}
@@ -1,6 +1,6 @@
{
"input_sequence": "[INST]",
"output_sequence": " ",
"output_sequence": "",
"last_output_sequence": "",
"system_sequence": "[SYSTEM_PROMPT]",
"stop_sequence": "</s>",
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "</s>",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "[SYSTEM_PROMPT]",
"story_string_suffix": "[/SYSTEM_PROMPT]",
"name": "Mistral V7-Tekken"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "</s>",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "[SYSTEM_PROMPT] ",
"story_string_suffix": "[/SYSTEM_PROMPT]",
"name": "Mistral V7"
}
@@ -6,9 +6,8 @@
"stop_sequence": "<|im_end|>",
"wrap": false,
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|im_end|>",
@@ -19,6 +18,8 @@
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"names_behavior": "force",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|im_system|>system<|im_middle|>",
"story_string_suffix": "<|im_end|>",
"name": "Moonshot AI"
}
@@ -0,0 +1,25 @@
{
"input_sequence": "<|start|>user<|message|>",
"output_sequence": "<|start|>assistant<|channel|>final<|message|>",
"last_output_sequence": "{{noop}}",
"system_sequence": "<|start|>developer<|message|>",
"stop_sequence": "",
"wrap": false,
"macro": true,
"activation_regex": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|end|>",
"input_suffix": "<|end|>",
"system_suffix": "<|end|>",
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"names_behavior": "force",
"sequences_as_stop_strings": false,
"story_string_prefix": "<|start|>system<|message|>",
"story_string_suffix": "<|end|>",
"name": "OpenAI Harmony (Thinking)"
}
@@ -0,0 +1,25 @@
{
"input_sequence": "<|start|>user<|message|>",
"output_sequence": "<|start|>assistant<|channel|>final<|message|>",
"last_output_sequence": "",
"system_sequence": "<|start|>developer<|message|>",
"stop_sequence": "",
"wrap": false,
"macro": true,
"activation_regex": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|end|>",
"input_suffix": "<|end|>",
"system_suffix": "<|end|>",
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"names_behavior": "force",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|start|>system<|message|>",
"story_string_suffix": "<|end|>",
"name": "OpenAI Harmony"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|end_of_turn|>",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "",
"story_string_suffix": "",
"name": "OpenOrca-OpenChat"
}
+8 -5
View File
@@ -1,22 +1,25 @@
{
"input_sequence": "<|user|>\n",
"output_sequence": "<|assistant|>\n",
"first_output_sequence": "",
"last_output_sequence": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"system_sequence": "<|system|>\n",
"stop_sequence": "<|end|>",
"wrap": false,
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|end|>\n",
"input_suffix": "<|end|>\n",
"system_sequence": "<|system|>\n",
"system_suffix": "<|end|>\n",
"user_alignment_message": "",
"last_system_sequence": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|system|>\n",
"story_string_suffix": "<|end|>\n",
"name": "Phi"
}
+5 -2
View File
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "none",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "",
"story_string_suffix": "",
"name": "Story"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "SYSTEM: ",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "\n",
@@ -18,5 +16,10 @@
"user_alignment_message": "Let's get started. Please respond based on the information and instructions provided above.",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "SYSTEM: ",
"story_string_suffix": "\n",
"name": "Synthia"
}
+8 -5
View File
@@ -1,22 +1,25 @@
{
"input_sequence": "<|user|>\n",
"output_sequence": "<|assistant|>\n",
"first_output_sequence": "",
"last_output_sequence": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"system_sequence": "<|system|>\n",
"stop_sequence": "<|end_of_text|>",
"wrap": false,
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|end_of_text|>\n",
"input_suffix": "\n",
"system_sequence": "<|system|>\n",
"system_suffix": "\n",
"user_alignment_message": "",
"last_system_sequence": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|system|>\n",
"story_string_suffix": "\n",
"name": "Tulu"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "",
"story_string_suffix": "",
"name": "Vicuna 1.0"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "BEGINNING OF CONVERSATION:",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "</s>",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "BEGINNING OF CONVERSATION: ",
"story_string_suffix": "",
"name": "Vicuna 1.1"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "",
"story_string_suffix": "",
"name": "WizardLM-13B"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "force",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "</s>",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "",
"story_string_suffix": "",
"name": "WizardLM"
}
@@ -8,8 +8,6 @@
"macro": true,
"names_behavior": "none",
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "",
@@ -18,5 +16,10 @@
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "## {{char}}\n- You're \"{{char}}\" in this never-ending roleplay with \"{{user}}\".\n### Input:",
"story_string_suffix": "### Response:\n(OOC) Understood. I will take this info into account for the roleplay. (end OOC)\n",
"name": "simple-proxy-for-tavern"
}
@@ -1,24 +0,0 @@
{
"temp": 1.15,
"rep_pen": 1.05,
"rep_pen_range": 2048,
"top_p": 0.95,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 0.8,
"rep_pen_slope": 7,
"sampler_order": [
6,
3,
2,
0,
5,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.59,
"rep_pen": 1.1,
"rep_pen_range": 2048,
"top_p": 1,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 0.87,
"rep_pen_slope": 0.3,
"sampler_order": [
6,
5,
0,
2,
3,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.8,
"rep_pen": 1.15,
"rep_pen_range": 2048,
"top_p": 0.9,
"top_a": 0,
"top_k": 100,
"typical": 1,
"tfs": 1,
"rep_pen_slope": 3.4,
"sampler_order": [
6,
5,
0,
2,
3,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.51,
"rep_pen": 1.2,
"rep_pen_range": 2048,
"top_p": 1,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 0.99,
"rep_pen_slope": 0,
"sampler_order": [
6,
5,
0,
2,
3,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,8 +1,9 @@
{
"temp": 0,
"rep_pen": 1.18,
"rep_pen_range": 2048,
"rep_pen": 1,
"rep_pen_range": 0,
"top_p": 0,
"min_p": 0,
"top_a": 0,
"top_k": 1,
"typical": 1,
@@ -20,5 +21,6 @@
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"use_default_badwordsids": false,
"grammar": ""
}
}

Some files were not shown because too many files have changed in this diff Show More