Commit Graph

11472 Commits

Author SHA1 Message Date
Cohee 9ec9a5c51c Merge commit from fork 2026-02-14 17:43:36 +02:00
Cohee 232cf6d825 Merge commit from fork 2026-02-14 17:42:02 +02:00
Cohee 734ef7d939 1.16.0 2026-02-14 16:27:02 +02:00
Copilot 5832cb8b07 Add NanoGPT embeddings support for Vector Storage (#5150)
* Initial plan

* Add NanoGPT embeddings support for Vector Storage

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

* Fix models loading

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-14 00:31:30 +02:00
Cohee 266f3ade0d Fix: skip generating thumbnails for APNG
Backported from #5113
2026-02-13 01:23:44 +02:00
Cohee 1e49f3d4f1 Fix: allow serving thumbnails that start with a dot 2026-02-13 01:07:24 +02:00
Cohee 614f404390 Revert "add char-archive to whitelistImportDomains"
This reverts commit 13099c43a9.
2026-02-12 23:40:30 +02:00
Tosd a1204a4438 Update zh-CN translations (#5145)
* fix(index.html): typo

* Update zh-CN translations

* Add missing zh-CN translation

---------

Co-authored-by: Tosd0 <65720409+Sevenyine@users.noreply.github.com>
2026-02-12 22:06:37 +02:00
Cohee 3b21f856aa Fix npm audit 2026-02-12 21:31:18 +02:00
Cohee a5aff87b1d Merge branch 'release' into staging 2026-02-12 00:41:56 +02:00
Wolfsblvt 953d9f34cb Macros 2.0 - list-supported Macros Autocomplete Improvements (#5135)
* fix(macros): prevent list-arg macros from accepting scoped content

List-arg macros now correctly reject scoped content since they only accept arbitrary inline arguments. Updated validation logic in autocomplete, scope detection, and CST walker to check for `list === null` before allowing scopes. Also improved list item hint display to show total count when typing additional items.

* feat(macros): display min/max constraints for list arguments in autocomplete hints

Add visual indication of list argument constraints by showing min/max values in autocomplete hints. List items now display "(list, min: X, max: Y)" or "(variable-length list)" when no constraints exist. Includes new CSS styling for smaller, dimmed hint text.

* feat(macros): validate list argument min/max constraints and improve warning display

Add validation for list argument constraints (min/max) with specific error messages when too few or too many list items are provided. Continue highlighting current argument position even when warnings are present (except where semantically invalid), allowing users to navigate back to valid arguments while seeing "too many arguments" warnings.
2026-02-12 00:32:17 +02:00
Copilot 1b5d65e34c Add GLM-5 to Z.AI model list (#5138)
* Initial plan

* Add glm-5 to Z.AI model list with 200k context

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-12 00:21:08 +02:00
Copilot 626b324fe0 Add " Vibe Coded" label to PRs created by @Copilot (#5137)
* Initial plan

* Add label-copilot-prs job to automatically add " Vibe Coded" label to PRs created by @Copilot

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-12 00:06:27 +02:00
Copilot 50e566ee0d Set HTML lang attribute from app locale to enable CSS hyphens: auto (#5136)
* Initial plan

* Set HTML lang attribute based on app locale to enable CSS hyphens: auto

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-11 23:58:10 +02:00
Cohee 9714374749 Preserve user input on tool call recursion (#5134)
Supersedes #5129
2026-02-11 22:49:39 +02:00
Cohee 00a61d370b Fix npm audit 2026-02-11 21:30:35 +02:00
awaae 10e08f0e3d feat(server): make CORS middleware configurable (#5123)
* feat(server): make CORS middleware configurable

Add detailed configuration options for CORS in config.yaml, including
origin, methods, headers, credentials, and max age. Update server
initialization to apply these settings dynamically instead of using
hardcoded values.

* fix(server): Fix default value and conditional logic issues in CORS configuration

- Changed the default value of `cors.maxAge` from `null` to `0`.
- Simplified the conditional check logic for `allowedHeaders`, removing duplicate checks for `corsAllowedHeaders` being `null`.

* fix(server): Fix CORS exposed headers configuration logic

- Removed redundant conditional checks. now directly validates array length when `corsExposedHeaders` has a truthy value

* Improve types + simplify checks

* fix(cors): align maxAge default with original behavior

* Adjust default array values

* Remove debug log

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-11 21:27:45 +02:00
Copilot 23ba3e5bb2 Add rename buttons for ComfyUI workflows and style presets (#5124)
* Initial plan

* Add rename buttons for ComfyUI workflows and style presets

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

* Address review feedback: pencil icon, filename validation, 204 status, error prefix, frontend duplicate check, re-render styles select

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

* fix: ensure existing workflow check only considers HTMLOptionElement instances

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-02-09 23:04:34 +02:00
thecaptain789 1961fb59c0 fix: correct typo 'seperated' to 'separated' (#5121)
Co-authored-by: thecaptain789 <thecaptain789@users.noreply.github.com>
2026-02-09 20:09:39 +02:00
Cohee 8e911af031 ImgGen: default to selected style name on save click 2026-02-08 02:50:00 +02:00
Cohee bee4d9a818 fix: sync swipes only when chat is not pristine to ensure macro resolution (#5106) 2026-02-08 02:35:14 +02:00
Wolfsblvt 9f4449973b Macros 2.0 - Optional scoped content + improved closing-tag autocomplete (#5117)
* feat(macros): Add optional scope detection and improved closing tag autocomplete

- Implement `isScopeOptional()` to detect when scoped content is optional based on macro argument requirements
- Filter optional scopes from autocomplete hints unless force-triggered (Ctrl+Space)
- Add "OPTIONAL" badge styling for optional scoped content in autocomplete UI
- Show multiple closing tag suggestions (innermost to outermost) with priority ordering
- Display nesting level information for nested optional scopes

* fix(autocomplete): show original macro details when typing closing tags

Add nameOffset=2 to MacroClosingTagAutoCompleteOption to skip {{ prefix for fuzzy highlighting. When typing closing tags ({{/macroName}}), detect and show the original macro's details instead of "no match" error by looking up the macro definition and creating a non-selectable context option with no argument highlighting.
2026-02-08 02:25:21 +02:00
L 788ed3d323 Background sort feature (#5107)
* Add background sort by date added feature

* reapply search after changing sort

* overengineer it

* use sortIgnoreCaseAndAccents

* make enum for sort options
2026-02-08 02:10:48 +02:00
cloak1505 300912237d Sync OpenRouter providers list (#5110) 2026-02-06 22:48:25 +02:00
Cohee 4e5cb9c44f Prevent accidental chat overwrites when switching between characters/groups 2026-02-05 23:47:17 +02:00
DeclineThyself b64c279473 Add clearData option to clearChat function (#5091)
* Centralized `await clearChat();` and `chat.length = 0;` into `wipeChat()`

* Added `clearData` argument to `clearChat`.

---------

Co-authored-by: user <user@exmaple.com>
2026-02-05 23:39:36 +02:00
Cohee 12014a993c Fix npm audit 2026-02-05 23:16:52 +02:00
L 4550afd4ca Backgrounds metadata population and frontend colors (#5092)
* Startup and on-demand check

* Update comments, add color preload

* remove redundant metadata generation

* changed image-metadata/all from GET to POST

* move initializeAllUserMetadata to image-metadata.js, make blocking (?)

* Add type annotations

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-05 22:45:56 +02:00
Leandro Jofré 992fd8f01d Feat/Allow to bulk toggle all third-party extensions from Manage Extensions (#5094)
* Feat - Allow to bulk toggle all third-party extensions from popup manager

* Fix - Prevent reloading the page if the final state is the same

* Fix - Handle bulk toggle with no extensions installed

* Update - Delete leftover debug logs

* Fix - Simplify extension toggle logic and improve readability

* Update - State that bulk toggle only affects external extensions

* Feat - Allow to restore bulk toggled extensions

* Update - Move bulk toggle to the third-party extensions header

* Uncenter section headers

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-05 22:24:44 +02:00
Lumi 39c8eb343c add option for claude-opus-4-6 (#5103)
* add option for claude-opus-4-6

* fix: add claude-opus-4-6 to limited sampling and verbosity model lists

* fix: disable assistant prefill for claude-opus-4-6

* refacor: merge fixthinkingPrefill and noPrefillModel

* 1m context

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-05 21:42:27 +02:00
Kristy Aurelia d6fafdd983 Add Minimal Prompt Processing option (#5095)
* Implement Minimal Prompt Processing

* Fix and rename cmd argument.

* Whitespace

* Handle processing selection with a enum

* Update processing argument description

* Fix typo in minimal prompt processing label title

* Add missing semi

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-05 01:38:55 +02:00
Wolfsblvt 34688f8493 chore(wi): Add logSlashCommandWarn utility and integrate into world-info slash commands (#5096) 2026-02-05 01:04:14 +02:00
Wolfsblvt 06b77ec94c Macros 2.0 - Improve Autocomplete edge cases on completing macros (#5093)
* fix(autocomplete): handle nested macros in :: separator parsing

Track nesting depth when parsing macro parts to avoid treating :: inside nested macros as separators. Increment depth on {{ and decrement on }}, only recognizing :: as a separator when nestedDepth is 0.

* chore(autocomplete): add missing properties for non-variable macros

Add `variableNameEnd` and `variableOperatorEnd` fields to track end positions of variable components in macro parsing context.

* fix(autocomplete): stop macro parsing at newlines before first :: separator

Prevent newlines before the first :: separator from being included in macro identifier/space-arg parsing. Track separator state and break early when encountering newlines at depth 0 before any :: is seen. Only include the last part if cursor is within its bounds to avoid extending macro context across line breaks.

* fix(autocomplete): handle cursor position after closing braces in macro detection

Skip closing }} when searching backwards if cursor is immediately after them, treating them as the target macro's closing braces rather than nested braces. Skip forward search entirely when cursor is after }}, using cursor position as closePos directly.

* fix(autocomplete): show macro details when typing closing brace and add no-match indicator

Track `isTypingClosingBrace` state when cursor is after a single `}` on standalone macros (no separators/args). Strip trailing `}` from identifier in this case. Show matching macro details when typing closing brace, same as when typing args. Add "no match" error option when typing args/closing brace but identifier doesn't match any macro. Extract `AnyMacroAutoCompleteOption` typedef for cleaner type annotations

* fix(autocomplete): show variable context when typing closing brace on shorthand macros

Detect `isTypingClosingBrace` state for variable shorthands (e.g., `{{.Lila}`, `{{.Lila+=4}`). Parse value before brace detection to check for trailing `}`. Show non-selectable context options (variable name, operator, value) when typing closing brace instead of operator/value suggestions. Strip trailing `}` from value when detected. Set `resultStart` to cursor position when typing closing brace to avoid replacement

* fix(autocomplete): stop flag parsing at newlines and show context when typing closing brace on variable shorthands

Skip newlines (not just all whitespace) between flags to prevent extending macro context across line breaks. Show variable context (name, operator, value) when typing closing brace on shorthand macros by excluding `isTypingClosingBrace` from the value-typing check.

* Fix highlight of value autocomplete option

* Rename permanentMatch to forceFullNameMatch

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-05 00:20:50 +02:00
Cohee 2fda8ca003 Update chevrotain and remove dependency override 2026-02-04 00:20:26 +02:00
Leandro Jofré 925ee10560 Fix - Do not spam saveSettingsDebounced setting an item in AccountStorage (#5090) 2026-02-03 23:09:50 +02:00
L f5b5350cf4 /image-metadata (#4788)
* git push --force

Implement background management in json

lint

upload multer weirdness, fix for timestamp

* remove duplicated logic to generate backgrounds.json

* remove duplicate logic to create backgrounds.js

* remove excessive enodent eror handling

* simplify shared extension constants

* move backgrounds.json to backgrounds/index.json

* use plimit

* move user directory iteration to syncBackgroundsMetadata insetad of server main

* create and move getBackgroundThumbnailResolution

* nitpick

* typdef

* simplify checks

* use read method

* error -> regenerate

* use fileExists

* type error fix (maybe)

* add object to jsdoc returns

* typo

* use getUniqueName from util.js

* remove duplicated multer something or other

* make skipped_extensions a set

* remove strict comparison

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

* create isAnimatedWebP and use it

* use file creation date instead of server date

* actually type BackgroundImageMetadata

* use fileExists instead of try catch

* response.sendStatus(500);

* sync json to allow adding images to the folder without restart

* lint

* Generic image metadata endpoint. Remove tags and starred. No startup sync.

* lint

* Descriptive json and move to util.js

* remove folders routes

* It's a POST

* Revert file name to index.json

* Type errors fixing

* Remove p-limit

* Why?

* apply codex suggestions

* see comment

* remove unused functions

* remove path normalization for da path, not needed

* Fix dimensions shadowing issue, circular imports, and apply bg res to only bg

* move thumbnailsEnabled to the top level

* Metadata now stored at {userDataRoot}/image-metadata.json instead of per-folder index.json
Uses relative paths as keys (e.g., backgrounds/sunset.png) for easy file existence checking
Added cleanupOrphanedMetadata() function and /api/image-metadata/cleanup endpoint for data-maid integration
Simplified the API endpoint by removing folder-grouping logic

* lint

* update backgrounds.js imports

* security check, .replaceAll

* Remove useless function, pass type to cache invalidate and seperate file types

* fix: normalize file paths to use POSIX separators in metadata functions

* serve original

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-03 01:53:29 +02:00
Cohee 5c62cf4a6e fix: restore cross-message text search 2026-02-02 08:19:51 +00:00
Cohee ad88acc980 perf: Use null matcher when no query 2026-02-02 03:35:16 +02:00
Cohee e5c14af76d fix(welcome-screen): only scroll to elements not in viewport 2026-02-02 01:49:07 +02:00
Cohee 3f8acaad4e Refactor /search to use per-line async parsing (#5085)
* Refactor /search to use per-line async parsing
Supersedes #5047

* Use named type

* Cache query fragments, add file name match

* Skip invalid chat files in search

* Remove extensions from /search results

* Use file_id when appropriate

* Revert "Use file_id when appropriate"

This reverts commit aaa0274b53da6a677183b6f923163053cfd6d569.

* Clean-up file extension handling

* Move extension append down for non-group
2026-02-02 01:44:15 +02:00
Cohee cf587bc766 fix(translate): update translator to use fetch for request function 2026-01-31 18:56:49 +02:00
Brioch 6c864e8bb2 feat(openrouter): add model quantizations setting (#5080)
* feat(openrouter): add model quantizations setting

* Remove bogus setting

* Simplify nullish coalescing assignment

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-30 23:51:22 +02:00
Cohee bba43f3321 Merge branch 'release' into staging 2026-01-29 00:46:46 +02:00
Cohee f63399a4f9 Fix: don't overwrite group_only_greetings 2026-01-29 00:46:30 +02:00
StageDog 3ac70790ff fix: welcome depth (#5077) 2026-01-29 00:27:49 +02:00
Jay4242 12452491cb Stable diffusion.cpp server support (#5074)
* feat: Add stable-diffusion.cpp server endpoints

* feat: Add stable-diffusion.cpp server settings

* feat: Add stable-diffusion.cpp server

* Add debug log for sdcpp payload

* feat: add loadSdcppSamplers and loadSdcppSchedulers for sdcpp backend

* feat: add sdcpp to sampler and scheduler source lists

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-29 00:24:45 +02:00
Cohee 10e8e01a55 Moonshot: Map "Request reasoning" to thinking type
Fixes #5072
2026-01-28 00:55:11 +02:00
Cohee 578ef7eb6c /beep or /ding 2026-01-28 00:33:58 +02:00
Cohee 0e5b4de10c Moonshot: Pull vision flag from model data
Fixes #5068
2026-01-28 00:26:50 +02:00
Crush0 eaa6a00e97 Volcengine tts (#5003)
* feat(tts): Add support for Volcengine TTS provider

* refactor: Remove the redundant comments in the Volcengine TTS-related code.

* fix(volcengine): Fix the audio data processing logic in the voice generation interface

* feat(tts): Enhance Volcengine TTS functionality and improve error handling

- Return more detailed error information when generating voice fails
- Add multiple preset voice options and support custom voice management
- Reconstruct the audio stream processing logic to enhance reliability
- Improve the UI interface, adding a voice selection dropdown menu and operation buttons

* refactor(tts): Optimize the code structure and error handling of the Volcengine TTS provider
- Remove the unused "voices" array and "model" parameter
- Improve the text processing logic, eliminating unnecessary separators
- Standardize the error handling logic, simplifying the status code checks
- Fix the DOM operation method, using "createElement" instead of string concatenation
- Ensure the existence check of the "customVoices" array

* Fix: Change the Content-Type of the audio response to audio/mpeg.

* Clean-up

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-26 20:45:38 +02:00