* fix: expand common language syntax highlighting
* fix: wire limited Shiki languages into ChatUI
* fix: register bundled aliases for chat code blocks
* fix: include Go grammar in T2I Shiki runtime
* fix(i18n): add missing en-US dashboard translations
Fill 26 keys present in zh-CN but missing from en-US locale files:
- tool-use: the whole dialogs.syncProvider subtree (MCP server sync
dialog showed untranslated keys in English UI)
- config-metadata: section hints for knowledgebase and websearch
- provider: vllm_rerank description
- subagent: personaPreview label
Verified all en-US locale files now have full key parity with zh-CN.
* fix(i18n): move syncProvider keys to the tooluse namespace root
McpServersSection.vue resolves features.tooluse.syncProvider.* (the
subtree must sit at the file root); the previous commit had mirrored
zh-CN's placement under dialogs, which the namespace lookup never
reaches. Also drop form.personaPreview: the component consumes
cards.personaPreview (already present); form.personaPreview is an
unused key.
* fix(provider): exclude cached tokens from Gemini input usage accounting
Gemini's prompt_token_count already includes tokens served from cache.
_extract_usage was passing it straight to TokenUsage.input_other while also
setting input_cached to cached_content_token_count, so usage.input double
counted cached tokens and inflated context-occupancy stats. Subtract cached
tokens from input_other, matching the OpenAI provider's accounting.
* docs(provider): clarify _extract_usage reads response usage metadata
Address Sourcery review: the method receives GenerateContentResponseUsageMetadata,
not a candidate, so correct the docstring's opening line.
Anthropic's input_tokens only covers tokens after the last cache breakpoint;
cache_creation_input_tokens (tokens written into a new cache entry) were
dropped entirely from TokenUsage, so usage.input/total undercounted requests
that create a fresh cache entry. Fold cache_creation_input_tokens into
input_other in both _extract_usage and the streaming _update_usage, matching
the OpenAI provider's accounting where input_other holds all non-cache-read
input (including cache writes).
Official formula: total_input = cache_read + cache_creation + input_tokens.
* feat: automatically record UMO names
* refactor: record UMO names only after wake
* refactor: record UMO names during wake checks
* refactor: extract UMO auto-name recorder
* feat(platform): enrich group metadata across adapters
* perf(platform): make group member lookup opt-in
* Revert "perf(platform): make group member lookup opt-in"
This reverts commit 896b4b895b.
Legacy plugins installed before install-source persistence (PR #9037) have
no plugin_install_sources record, so the backend falls back to an implicit
source record. The frontend update check skipped implicit sources entirely,
so these plugins never showed available updates until the user manually
re-bound or reinstalled the plugin.
Include implicit sources in the update check: they resolve to the default
registry, so match them against the default market by repo/name. Only
matched plugins surface an update; unmatched ones stay silent, so this
cannot introduce false positives. Also fix the misspelled online_vesion
field name so the backend payload matches what the frontend reads.
AstrBotConfig._write_config_snapshot calls tempfile.mkstemp(dir=directory)
without verifying the directory exists. When a config profile is created
for the first time (e.g. create_conf instantiates AstrBotConfig with a
brand-new path), __init__ calls save_config before the directory is
guaranteed to exist, and mkstemp raises FileNotFoundError.
Add os.makedirs(directory, exist_ok=True) before mkstemp. This is the
standard defensive pattern for atomic-write helpers.
Fixes three intermittently-failing dashboard tests:
- test_t2i_set_active_template_syncs_all_configs
- test_t2i_reset_default_template_syncs_all_configs
- test_t2i_update_active_template_reloads_all_schedulers
Closes#9855.
Copy non-empty buffered text elements before clearing them when an image is inserted, and avoid emitting empty blocks for image-first messages.
Co-authored-by: liruihan <liruihan@example.com>
* fix(dashboard): make skill editor dialog responsive on small screens
- Enable fullscreen mode for skill editor dialog on mdAndDown breakpoints
- Switch skill-editor grid to single-column stacked layout on mobile
- Constrain files panel height and enforce monaco editor min-height
* fix(dashboard): override skill editor dialog max-height on small screens
Address Sourcery-ai broader_impact finding on PR #9873: the base
`.skill-editor-dialog { max-height: min(88vh, 980px); overflow: hidden; }`
remains active in fullscreen mode on short mobile viewports (e.g.
landscape phones), where the stacked 20vh file tree + 40vh editor plus
title and action bar can exceed 88vh. Combined with `overflow: hidden`,
content gets clipped and the save/cancel buttons become unreachable.
Override `.skill-editor-dialog` within the existing
`@media (max-width: 860px)` block to lift the 88vh cap and allow
vertical scrolling when content overflows the viewport.
This is a minimal fix for the temporary solution; the 860-960px gap
between the media query and Vuetify's `mdAndDown` (960px) breakpoint is
accepted as a known limitation.
Preserve structured conversation history for cron and background-task wakeups so normal context truncation can process it.
Refs #9763
Co-authored-by: liruihan <liruihan@example.com>
On small screens, the sidebar is hidden (d-none d-md-flex), so the
"create folder" entry in the toolbar dropdown is the only way for
mobile users to create folders. The current v-if="!hasFolders"
condition prevents it from showing when folders already exist.
* fix: apply max_agent_step config to cron and background task agents
The cron (scheduled task) and background task wake-up paths hardcoded
step_until_done(30) since the "extract main agent" refactor (0c5308a),
ignoring provider_settings.max_agent_step.
Read the value via coerce_int_config so invalid values fall back to the
default with a warning instead of crashing or silently degrading.
Fixes#9800
* test: cover max_agent_step propagation in cron and background wake-ups
Add parametrized tests asserting step_until_done receives the configured
max_agent_step on both the cron and background task agent paths, with
fallback coverage for missing, boolean-polluted, and numeric-string
config values.
* fix: clamp max_agent_step to a minimum of 1 in cron and background wake-ups
Non-positive provider_settings.max_agent_step values previously reached
step_until_done as-is: the local runner skipped all steps and forced a
final response, while the DeerFlow runner raised ValueError. Pass
min_value=1 to coerce_int_config so zero/negative values are clamped to
a usable minimum, and cover the zero case in both unit test suites.
* fix(logging): make console and root logger follow configured log level
The console loguru sink and root logger were hardcoded to DEBUG, so the log_level config had no effect on terminal output. Sync them to the configured level during configure_logger().
* fix(logging): create console sink before removing old one
Create the replacement loguru console sink first and only remove the old sink after success, so terminal logging is never left without a sink if sink creation fails. Also apply ruff formatting.
* fix: gray out commands of disabled plugins in behavior manager
Show inactive-plugin commands as 未启用, dim the whole row with
theme on-surface colors, and disable row actions.
Fixes#9562
* fix: address review comments on disabled-plugin commands
Keep the stored command enabled flag unchanged and expose plugin
activation separately. Allow viewing details, keep hover tooltips,
and cover serialized plugin_activated in unit tests.
* fix: preserve tooltips for disabled command actions
---------
Co-authored-by: Soulter <905617992@qq.com>
Optimize Dockerfile build order to leverage layer caching
Reorder instructions:
- Move COPY . /AstrBot/ from before the first RUN to after it
- Keep apt dependencies, NodeSource setup, Node.js installation,
and Python dependency installation steps unchanged
Reason:
- Application code changes more frequently than system dependencies
- Previously, COPY before dependency installation caused all
subsequent layers to invalidate on every code change
- After reordering, system dependency and Node.js layers can be
reused from cache; only later layers rebuild on code or
Python dependency changes
Impact:
- Build output remains unchanged
- No difference on first build; subsequent builds significantly
reduce redundant download and installation time
优化 Dockerfile 构建顺序以利用 Docker 层缓存
调整指令顺序:
- 将 COPY . /AstrBot/ 从第一个 RUN 之前移至其后
- 保持 apt 依赖安装、NodeSource 配置、Node.js 安装、
Python 依赖安装等步骤不变
原因:
- 应用代码变更频率高于系统依赖
- 原先 COPY 在依赖安装之前,会导致代码变更时后续所有层缓存失效
- 调整后,系统依赖和 Node.js 安装层可被缓存复用,
仅在代码或 Python 依赖变更时重新构建后续层
影响:
- 构建结果不变
- 首次构建无差异,后续构建显著减少重复下载和安装耗时
Co-authored-by: 落秋枫叶 <gitea-lqfy@lqfy.top>
* fix: remove open-on-hover attribute from menu components
Removed the open-on-hover of the Chat UI part of the AstrBot Web UI, and fixed the issue that the mobile end could not open the secondary menu of Transport Mode and Language.
* fix: add touch device detection for menu interaction
* fix: simplify touch device detection logic
* fix: update touch device detection for menu interaction
* fix: improve touch device detection with media query listener