Commit Graph

1808 Commits

Author SHA1 Message Date
柚柚子 ff31ca6692 feat: add Adaptive-P controls for oobabooga (#5502)
* feat: add ooba adaptive-p controls

* fix: align ooba adaptive-p sampler order
2026-04-22 21:34:52 +03:00
ashishch432 d1e719eb48 add claude-opus-4-7 (#5465) 2026-04-19 15:47:40 +03:00
Wolfsblvt 4003251c2f Increase Top K max value from 200 to 500 for text generation WebUI (#5474)
Raises the maximum allowed Top K sampling parameter from 200 to 500 in both the range slider and number input controls to support higher token selection limits.
2026-04-19 15:20:06 +03:00
awaae 767746beb2 WI: Rename "New" button to "Create"
* Fix internationalization issues

* fix(i18n): update world creation key and zh-cn translations

Changes the i18n key for the world editor's "New" button to "Create" to
avoid conflict with listing filters. Updates the Chinese translation
for the "New" key to "最新" (Latest).

* fix(i18n): correct translation key for world creation button

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-16 21:12:58 +03:00
Reithan 051346c517 Enable interleaved tool reasoning for custom OpenAI-compat endpoints (#5445)
* enable interleaved tool reasoning for custom OpenAI-compat endpoints

Add chat_completion_sources.CUSTOM to interleaved_reasoning_providers so
that local OpenAI-compatible endpoints (e.g. KoboldCPP in Chat Completions
mode) can forward reasoning context in tool-call chains when the user has
configured Interleaved Thinking.

Also expose the Interleaved Thinking UI control for the Custom source so
users can actually opt in — previously the dropdown was hidden behind a
data-source="openrouter" guard.

The custom streaming path already correctly accumulates delta.reasoning_content
from streaming chunks; this change only removes the provider gate that was
silently discarding that data before it reached the API payload.

* don't override invocation reasoning with prior-turn assistant reasoning

When an invocation already has its own reasoning captured at execution
time, preserve it instead of replacing it with previousAssistantReasoning
from the backward scan. The override was correct when invocations never
carried their own reasoning, but now that the custom/openrouter paths
capture per-invocation reasoning, the unconditional replacement caused
all tool calls in a chain to receive the same stale reasoning from an
earlier unrelated assistant turn.

Fall back to previousAssistantReasoning only when clone.reasoning is empty.
2026-04-15 23:16:39 +03:00
CasualAutopsy af7bd65f42 Impersonate with last_input_sequence (#5456) 2026-04-15 22:43:41 +03:00
Tony Gies 700fc05411 feat: add Cloudflare Workers AI provider (#5385)
* feat: add Cloudflare Workers AI provider

Adds support for Cloudflare Workers AI using its OpenAI-compatible API.

Workers AI-specific stuff includes:
- Model list fetching and capabilities detection
- Tokenizer auto-detection for typical hosted model families
- Streaming not supported when using structured output

Closes #5305

* Make the entire header clickable

* Add missing samplers

* Fix non-streaming reasoning parsing

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-06 00:24:47 +03:00
Cohee 21e8cf9060 glm-5v-turbo (#5393)
* glm-5v-turbo

* Add support for image and video inlining
2026-04-02 20:19:01 +03:00
Copilot 63feac9423 feat: swipe picker expand/collapse, copy button, and left-align text (#5380)
* Initial plan

* feat: add expand/collapse, copy button, and left-align text in swipe picker

Addresses user feedback for swipe picker (added in 1.17.0):
1. Left-align swipe text (was inheriting centered alignment)
2. Add expand/collapse toggle using hidden checkbox + CSS :has
3. Add copy-to-clipboard button using shared copyText utility

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/90892f1c-3c75-404b-a93b-2abe672cc0e3

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

* revert unintended package-lock.json changes from npm install

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/90892f1c-3c75-404b-a93b-2abe672cc0e3

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

* fix: address review feedback - hide checkbox, use chevron icons, align buttons with fa-fw

- Fix checkbox visibility by using !important to override input[type=checkbox] grid display
- Change expand icon to fa-chevron-down and collapse to fa-chevron-up
- Add fa-fw class to all action buttons (copy, expand/collapse, branch, delete) for even sizing
- Add align-items: baseline to the actions container

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/c8ca349f-3579-442a-baa1-fc138ba1d7a6

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

* revert unintended package-lock.json changes

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/c8ca349f-3579-442a-baa1-fc138ba1d7a6

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

* fix: update class names for chat action elements in swipe picker

* fix: prevent chevron layout shift and swap button order

- Use single label element as icon (fa-chevron-down) instead of two
  child <i> elements toggling visibility, preventing layout shift
- Override ::before content to chevron-up when expanded via CSS
- Swap chevron and copy button order (chevron first, then copy)

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/284283b1-6c7f-4371-bc4a-94d841513879

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

* style: add comment for FA unicode value in CSS

Agent-Logs-Url: https://github.com/SillyTavern/SillyTavern/sessions/284283b1-6c7f-4371-bc4a-94d841513879

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

* Rotate the chevron instead of changing content

* Make the ui full height

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Cohee1207 <18619528+Cohee1207@users.noreply.github.com>
2026-03-31 00:41:03 +03:00
Cohee bef7b39cbe Add glm-5.1 to models list (#5361) 2026-03-28 02:08:28 +02:00
awaae b04c974407 feat(ui): add interface to manage message swipe history (#5304)
* feat(ui): add popup to jump to a specific swipe

Adds a new "Jump to swipe history" button to message actions and makes
the swipe counter clickable on the latest message. This opens a
searchable popup allowing users to quickly find and jump to a
specific alternate swipe without having to click through them
sequentially.

- Adds a searchable swipe picker popup menu
- Makes the swipe counter interactive when multiple swipes exist
- Adds a dedicated swipe picker button to message controls

* fix(ui): hide swipe picker when there are no swipes

Ensures the newly added swipe picker button is only shown when a
message has multiple swipes available. It explicitly hides the
button for non-swipeable messages or messages with a single swipe.

* feat(ui): redesign swipe picker with direct id input

Replace text-based search with a numeric input for direct swipe navigation.
Update popup layout with a sticky header and improved scrolling behavior.
Sync input value with the currently selected swipe in the list.
Refactor styling to align with chat selection components.

* feat(ui): allow branching from specific swipes via picker

- Enable swipe picker for historical messages to inspect alternate swipes
- Add branch button to picker entries to create new chats from specific swipes
- Update saveChat and createBranch to accept chat snapshots
- Restrict swipe jumping to the active message only

* refactor(logic): consolidate swipe sync logic and simplify helpers

Update `syncSwipeToMes` to accept a target message object, enabling its
use in the bookmarks module and removing the duplicate
`applySwipeToSnapshot` function.

Also simplify `canOpenSwipePickerForMessage` and
`canJumpToSwipeForMessage` signatures by removing the redundant message
parameter.

* refactor(a11y): support dynamic roles via classes

Introduce a managed role system in the accessibility script to handle
elements that dynamically gain or lose interactive states. The mutation
observer now watches for class attribute changes and automatically
applies or clears roles (e.g., `role="button"`) using active selectors.

Updated the swipe counter to rely on this centralized system by toggling
an `.interactable` class instead of manually modifying tabindex and role
attributes. Removed the redundant 'Enter' keydown handler for the swipe
counter to prevent duplicate trigger events.

* fix(ui): compute missing token counts in swipe picker

Update renderSwipeList to asynchronously calculate token counts when
missing from swipe metadata. Introduce SWIPE_SOURCE.SWIPE_PICKER to
correctly identify swipes triggered from the picker and bypass
generation checks.

* feat(ui): enable deleting specific swipes via swipe picker

- Adds a delete button to swipe picker entries, allowing removal of specific message versions.
- Refactors deletion logic to handle removing non-current swipes without triggering animations and correctly updates indices.
- Includes confirmation dialogs and improves input focus behavior.

* refactor:Delete process inline to button click processor

* feat: universal swipe inspection and picker improvements

- Permit opening the swipe browser on any chat entry to review past generations.
- Parallelize the retrieval of token statistics to speed up list rendering.
- Format message metrics (length and tokens) into a single, concise string.
- Update the `getBranchChatSnapshot` API to accept an options object.
- Register swipe list items as interactable elements for keyboard control.
- Apply styling to prevent text highlighting on picker entries.

* fix:remove unused CSS

* fix: fix disabled styling for swipe delete button

Remove tooltips and prevent hover animations or glow effects when the
delete button is disabled in the swipe picker. Update CSS to enforce
default cursor and fixed opacity on hover for the disabled state.

* remove: Unused CSS

* Extract swipe-picker.js module

* Revert to manual ARIA role management

* Avoid scrollIntoView and scroll on open

* Fix keyboard interaction in past chats menu

* Fix a11y attribute

* fix: call refreshSwipeButtons when deleting not selected swipe

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-26 02:28:48 +02:00
Xiangzhe 2cb1861db6 feat: add SiliconFlow.cn chat completion and embedding support (#5316)
* feat: add SiliconFlow.cn endpoint support and embedding vectors

Chat completion:
- Add endpoint selection dropdown (Global/.com vs China/.cn) to existing
  SiliconFlow provider, following the Z.AI endpoint pattern
- Backend switches API URL based on selected endpoint
- Add /api-url slash command support for endpoint switching

Embeddings:
- Add SiliconFlow as a vector/embedding source (OpenAI-compatible)
- Support both .com and .cn endpoints via siliconflow_endpoint setting
  borrowed from the main connection panel (Vertex AI pattern)
- Superset model list with platform attribution (.cn) markers
- Models: Qwen3-Embedding (0.6B/4B/8B) + BGE/BCE models (.cn only)

* Add filter by models type

* Load embedding models from endpoint

* Improve api-url command declaration

* Support endpoint override in custom-request service

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-22 00:52:03 +02:00
Cohee bae4fd9f98 glm-5-turbo 2026-03-17 22:49:42 +02:00
Stardust bf91d9afc9 Chat lorebook click unify (#5246)
* Unify chat lorebook button click behavior with character lorebook button

* Update locale strings for chat lorebook button

* Unify chat lorebook button click behavior with character lorebook button

* Update locale strings for chat lorebook button

* Also unify character lorebook button to support Alt modifier

* Update locale strings for character lorebook button

* Update public/locales/fr-fr.json

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

* Add long-press support for lorebook buttons on mobile

* Update locale strings for lorebook button long-press

* Fix long-press to use event delegation for dynamic elements

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-15 20:14:32 +02:00
Cohee 92dd9ecab2 gpt-5.4 2026-03-07 20:39:34 +02:00
Lucas Scala 90892fd236 Group add to background folder (#5237)
* group add

* make button not wide

* make single and batch add to folder use the same style popup

* prevent stuck UI, allow scrolling, prevent ::after conflicts

* extremely large commit, beware

* clear everything after performing bulk actions

* Unify bulk selection design language

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-03-07 17:41:28 +02:00
equal-l2 e834d3724b Remove xAI web search capability (#5255)
With web search on, the API now returns 410 Gone.
2026-03-07 16:58:56 +02:00
Spicy Marinara f20aed95d0 Add gpt-5.3-chat-latest model support (#5241)
* Add gpt-5.3-chat-latest model support

- Add to OpenAI model dropdown (index.html)
- Add to captioning multimodal model list (caption/settings.html)
- Add to OPENAI_REASONING_EFFORT_MODELS (constants.js)
- Add OPENAI_FIXED_REASONING_EFFORT map to clamp effort to 'medium' (the only value this model accepts)
- Apply fixed effort override in both Azure and general OpenAI request paths (chat-completions.js)
- Update frontend gpt-5.x regex for parameter handling (openai.js)

* Update public/scripts/openai.js

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-04 20:04:04 +02:00
Cohee 04df80d907 thy gemini-3.1-flash-lite consumed 2026-03-03 20:04:36 +02:00
Cohee 63fa9c1d07 Claude: map Reasoning Effort to adaptive thinking config (#5219)
Supersedes #5105
2026-03-01 17:11:22 +02:00
Cohee 744ce7705d gemini-3.1-flash-image-preview 2026-02-27 20:26:22 +02:00
Lucas Scala 54bba07420 Background Folders (#5187)
* backend, frontend, bugfixes

* Mobile button and sizing

* lint

* clear folder thumbnailFile on delete, rename thumbnailFile on rename

* use filteredImages when changing sort option

* Address all the review comments

* Fix friendly title generation to handle empty strings

* Move add folder button to the header

* instead of search filtering the backgrounds in a folder and showing the folder if the results > 0, search the folder names.

* Trade button places

* Adjust button text

* feat: restrict folder creation to the Global tab

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-24 21:27:03 +02:00
GERNOMA 8f5c8f0a8e Open router provider filter (#5208)
* Added filter for OpenRouter models provider selection

Now if a model is selected, only available providers for that model will show. Wanted to do the same for the quants, but I think the API is not returning the quants available for each model at the moment. Used existing API that for some reason was not consumed.

* Added filter for OpenRouter providers

Now if a model is selected, only the providers available show. Wanted to do the same with the quants but it seems the OpenRouter API is not giving the available quants list at the moment for each model.

* gua

* Now it also works on chat completion and only disables options

* detail

* Warning added

* eslint

* Move inline styles to CSS

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-24 20:40:42 +02:00
Brioch 0cef10f63f feat(openrouter): disable reasoning if Request model reasoning is off and effort is minimum (#5079)
* feat(openrouter): disable reasoning if "Request model reasoning" is disabled

* feat(openrouter): map minimum reasoning to none if request reasoning is off

* Add hint how to disable reasoning

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-23 21:19:04 +02:00
ZhenyaPav 0ba0418fac OpenRouter interleaved reasoning forwarding for tool-call continuations (#5160)
* fix(openrouter): forward reasoning across active tool-call chains

* feat(reasoning): add tool-chain forwarding toggle and honor edited reasoning

* feat(reasoning): add OpenRouter interleaved forwarding modes

* moved the reasoning forwarding dropdown into a separate line

* feat(reasoning): default tool reasoning forwarding to disabled

* refactor(openrouter): move tool reasoning mode to CC settings

Move OpenRouter tool reasoning forwarding control to response configuration and scope it to OpenRouter.

Store mode in chat completion settings (presettable), remove legacy power_user boolean/fallback, and use constants for mode values.

Preserve OpenRouter Gemini signature forwarding independently from plaintext tool reasoning mode.

* fix(openrouter): tighten active-chain reasoning forwarding

Use trailing contiguous tool-chain boundary for active-chain eligibility.

Also rename the UI control to Interleaved Thinking Forwarding and place selector on its own line.

* fix(openrouter): use adjacent assistant reasoning for tool calls

For interleaved thinking forwarding, source reasoning only from the immediately preceding assistant non-tool message.

Keep mode gating behavior unchanged and avoid history-window reasoning carryover.

* fix(openrouter): skip tool messages for reasoning source

When forwarding interleaved reasoning, ignore intervening tool result messages when resolving the preceding assistant reasoning source.

This keeps only the first tool call in a chain tied to a prior assistant reasoning block unless a later invocation carries its own reasoning.

* fix(openrouter): keep plaintext reasoning with signatures

Do not suppress forwarded tool-call reasoning when thought signatures are present.

* fix(openrouter): split interleaved thinking mode behavior

Restore distinct mode semantics: active_chain uses nearest assistant-text boundary after skipping tool/tool-call messages, while since_last_user scans for latest assistant reasoning since user.

Update UI label to Interleaved Thinking with right-aligned dropdown and explanatory tooltip.

* style(openrouter): align interleaved thinking dropdown row

Match OpenRouter interleaved thinking control layout with existing oneline-dropdown patterns.

Also update reasoning-forwarding inline comment wording for current mode behavior.

* docs(ui): clarify interleaved thinking tooltip

Use explicit API-request wording for OpenRouter interleaved thinking tooltip text.

* i18n(openrouter): localize interleaved thinking UI

Add locale keys for OpenRouter interleaved thinking label, mode options, and inline helper description.

Wire dropdown option text to data-i18n in index.html.

* fixed helper text wrapping

* fix(ui): make interleaved thinking helper text wrap

* i18n(openrouter): translate interleaved thinking labels

Replace placeholder English values for interleaved thinking keys in non-English locale files.

* fix(ui): restore interleaved thinking dropdown alignment

* Remove changes from en.json

* Type fixes

* Reworked the interleaved reasoning provider logic

* Renamed the variables in preparation for potential implementation for other providers

* Gate interleaved tool reasoning on reasoning request setting

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-02-22 13:15:52 +02:00
Spicy Marinara a923b0eefe Add gemini-3.1-pro-preview to Google AI Studio and Vertex model lists with thinking support (#5188) 2026-02-19 14:28:48 +02:00
Cohee 3bd1034639 claude-sonnet-4-6 2026-02-17 21:33:19 +02:00
Leandro Jofré 9383b3ab13 Fix - Remove non-samplers from sampler selection popup (#5163)
Removed OR's fallback providers checkbox and the generic model and URL inputs for Custom Endpoint.
2026-02-15 02:14:05 +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
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
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
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
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 10e8e01a55 Moonshot: Map "Request reasoning" to thinking type
Fixes #5072
2026-01-28 00:55:11 +02:00
Cohee 5a7875ba28 Update Pollinations API (#5060)
* Upgrade Pollinations API
Done: text, caption
To do: TTS, image
Fixes #5020

* Update Pollinations TTS to new API

* Update Pollinations API for images
2026-01-26 20:31:13 +02:00
Cohee ffa01d80a6 Add macros autocomplete to alternate greetings 2026-01-23 23:51:06 +02:00
Wolfsblvt 9ff9d59672 Macros 2.0 (v0.7.1) - Macro Autocomplete everywhere (#5019)
* Add macro autocomplete for free text inputs

Implements macro autocomplete (`{{`) for textareas and input fields marked with `data-macros` attribute. Extracts shared autocomplete logic into MacroAutoCompleteHelper.js for consistency between slash command and free text contexts. Includes MutationObserver for dynamic element initialization and supports variable shorthands, operators, flags, and scoped macro closing tags.

* fix annoying circular dependency again

* Add `data-macros` attribute to enable macro autocomplete on text inputs

Enables macro autocomplete (`{{`) for various textareas and input fields throughout the UI by adding the `data-macros` attribute. Includes context template fields, instruct mode sequences, character/persona descriptions, world info content, and other prompt-related inputs. Also ensures the attribute is preserved when expanding editors and creating world info entries.

* Allow macro autocomplete in editing messages

Enables macro autocomplete (`{{`) when editing messages by adding the `data-macros` attribute to the dynamically created edit textarea element.

* Add autocomplete visibility setting support for macro autocomplete

Respects the global STScript autocomplete visibility setting (`power_user.stscript.autocomplete.state`) for macro autocomplete in free text inputs. When set to "Input length > 1", macro autocomplete only activates after typing `{{` plus at least 2 characters. Also adds a tooltip to the visibility setting explaining it applies to both slash commands and macros.

* Fix unclosed div tag in STScript autocomplete visibility setting

Closes the `<div>` tag that was incorrectly left open in the autocomplete visibility setting markup.

* Add setting to control macro autocomplete visibility in non-expanded fields

Introduces a new `showInAllMacroFields` setting that controls whether macro autocomplete appears in all macro-enabled fields or only in expanded editors and when pressing Ctrl+Space. Also adds `data-macros-autocomplete` attribute support with `always` and `hide` modes for per-field override. When the setting is off, autocomplete only shows in expanded editors (which now get `data-macros-autocomplete="always"`) and the completion

* Add `data-macros-autocomplete-style` attribute to control macro autocomplete popup size

Introduces a new `data-macros-autocomplete-style` attribute with `small` (33vw, max 700px) and `expanded` (default chat width) modes to control macro autocomplete popup dimensions. The `small` style is now the default for inline fields, while `expanded` is used for expanded editors and prompt manager. Also refactors `getAutocompleteMode` to return `DEFAULT` instead of `null` and adds corresponding `getAutocompleteStyle` helper

* Fix autocomplete details panel alignment when list is constrained by viewport edge

Adjusts the details panel position to align with the actual autocomplete list position when the list is constrained by the right edge of the viewport. Previously, the panel would position based on cursor location even when the list was pushed left, causing misalignment. Now checks if the list's actual position differs from the calculated position (with 5px tolerance) and uses the list's position instead.

* Guard autocomplete details panel alignment check with `isReplaceable` condition

Prevents attempting to read the autocomplete list's bounding rect when the list is not visible. The alignment adjustment for viewport-constrained lists now only runs when `isReplaceable` is true, avoiding potential errors when the list DOM is not rendered.

* Fix macro autocomplete cursor detection to handle nested macros correctly

Updates `findMacroAtCursor` to track nesting depth when searching for opening `{{` and closing `}}` braces. Previously would incorrectly stop at the first brace pair encountered in either direction, breaking autocomplete when cursor was inside nested macros like `{{getvar::{{getvar::name}}}}`. Now properly skips over nested macro boundaries by incrementing/decrementing depth counters until finding the matching braces at depth

* gief me my comments back (and fixes, that were missed)

- Added detailed JSDoc comments to all exported functions explaining parameters, return types, and behavior
- Added inline comments throughout functions explaining logic flow, edge cases, and implementation details
- Documented parser-based vs regex-based unclosed scope detection approaches
- Clarified variable shorthand autocomplete logic including operator filtering, context display, and priority

* refactor(macros): freeze MACRO_AUTOCOMPLETE_MODE and MACRO_AUTOCOMPLETE_STYLE enums

* feat(macros): explicitly set `makeSelectable` flag for non-insertable autocomplete options

- Set `makeSelectable = true` for variable shorthand options in {{if}} conditions (already insertable)
- Set `makeSelectable = false` for already-typed operators in variable shorthand autocomplete
- Set `makeSelectable = false` for already-typed flags in macro autocomplete
- Set `makeSelectable = false` for non-selectable closing block flags when no unclosed scopes exist
- Set `makeSelectable = false` for sc

* refactor(macros): consolidate typedef imports in MacroAutoCompleteHelper

- Fixed typo in MacroDefinition typedef import (removed extra `/` from JSDoc comment)
- Replaced long-form typedef imports with short-form aliases for MacroAutoCompleteContext and MacroDefinition
- Improved code consistency by using imported typedefs throughout function signatures

* refactor(autocomplete): select first selectable item as default instead of always first item

- Extracted default item selection logic into `selectDefaultItem()` method
- Changed default selection to prioritize first selectable item over first item in list
- Falls back to last item when no selectable items exist (preserves context for info-only options)
- Added JSDoc documentation explaining selection behavior

* feat(macros): make already-typed variable names non-selectable in autocomplete

- Set `makeSelectable = false` for variable name options that match the currently typed name
- Set empty `valueProvider` for matched variables to prevent re-insertion
- Prevents redundant selection of variables that are already fully typed in the input

* feat(macros): add value context autocomplete option for variable shorthand operators

- Created `VariableValueContextAutoCompleteOption` class to display context about expected values
- Shows operator name, symbol, and description when typing variable shorthand values
- Displays currently typed value and completion hint
- Non-selectable option (context only) with priority 4
- Added to variable shorthand autocomplete when operator is typed and value is being entered

* fix lint

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-23 23:46:47 +02:00
Forkoz b5eacfa014 Add tabby for adaptive_P (#5044) 2026-01-22 12:39:03 +02:00
Cohee ff78290fd0 glm-4.7-flash 2026-01-20 23:22:29 +02:00
Jeff Sandberg b418ec5c37 Add taxon filter controls to Group Chat member list (#5006)
* Add taxon controls to top of group member list

* Refactor/cleanup getGroupCharacters

* Fix favorites, refactor and cleanup code

* Fix clearing filters, only show relevant filters in groups

* Fix issues and add persistence

- Fix group member tag listing requiring character list to be init to display
- Fix character tag updates to actually show up in group member contexts
- Persist filter changes for group member tag controls

* Apply suggestions from code review

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

* Avoid sibling selectors

* Err on invalid tag type

* avoid hardcoded ids

* cleanup: don't use `group_member`, use `group_candidates_list`

* Support both selectors and jquery instances in getFilterHelper

* Sanitize missing tag filters before rendering

* Unscrew jsdoc formatting

* Show all tags, mark absents specially

* Improve JSDoc

* Fix tag indicator for group contexts

* Don't use deprecated fields

* Add a comment on potentially undefined group id

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-16 02:27:59 +02:00
Beinsezii ede7efe52c Adaptive-P for llama.cpp llama-server (#4959)
* Enable Adaptive-P UI on llama.cpp

* Add Adaptive P sampler ordering

* Revert "Add Adaptive P sampler ordering"

This reverts commit 22d85a0e89954dfaf58264059ab0fec61a038c40.
2026-01-15 21:28:30 +02:00
Cohee 372db63cd5 NanoGPT: Add reasoning effort control
Closes #4999
2026-01-12 21:05:02 +02:00
Cohee 7320aa948d Audio inlining for OpenAI and Custom-compatible (#4964)
* Audio inlining for OpenAI and Custom-compatible

* Add context sizes

* chatgpt-image-latest

* Add quality control for gpt-image
2026-01-06 13:27:13 +02:00
Cohee 2fb4ab3184 Add Adaptive-P settings (#4945)
* TC: Add Adaptive-P settings and UI elements

* Improve compatibility with sampler select
2026-01-03 22:25:16 +02:00
Cohee 0c8d74da02 NanoGPT: Enable tool calling
Closes #4930
2026-01-03 00:20:31 +02:00
Subwolf a8eb154517 Zai moonshot reverse proxy (#4923)
* adding reverse proxy support

* update

* added handling for the image caption extension
2025-12-28 23:52:04 +02:00
Cohee bb53da4c09 add missing zai vision models 2025-12-27 23:07:57 +02:00
Cohee e7c9496a61 Fix: add missing quotes to index.html 2025-12-27 00:13:39 +02:00
DeclineThyself 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 6f616767cce4aa2c27a3a53543687d6eaf379758.

* 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
Cohee 0539583197 Add glm-4.7 model option and context mapping for Z.AI 2025-12-22 23:14:09 +02:00