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
anthropic 1.0.0 renamed the bundled ``_base_client.httpx`` module to
``_base_client.httpx2``. The previous ``getattr(_base_client, "httpx",
httpx)`` fallback silently reverted to the global httpx import, which can
break the SDK's isinstance validation when a proxy client is used. Resolve
the SDK's own module in version-agnostic order (httpx → httpx2 → global)
and update the corresponding unit test to assert against the same
resolution.
* fix: stop preloading entire preferences table into memory
PR #9649 fixed an event-loop deadlock by preloading every row of the
preferences table into an in-memory mirror at startup. The table can
hold gigabytes of plugin KV data, so this can OOM the process.
- initialize() no longer performs an unfiltered get_preferences();
the in-memory cache becomes a write overlay for read-after-write
visibility only
- get_async() falls back to an async point query on overlay miss and
never backfills the overlay
- deprecated sync get() falls back to a point query through a
dedicated synchronous SQLite connection (the new
SQLiteDatabase.get_preference_sync), so it never blocks on or
deadlocks against the async pool; failures warn and return the
default instead of raising
- sync range_get() now only covers values written by this process
(no internal callers remain); full scans stay available via
range_get_async()
- FIFO write queue semantics are unchanged
* fix: preserve synchronous preference range reads
Keep model reasoning capability metadata out of provider request configuration, sanitize legacy source-backed records, preserve standalone provider fields, and add a reasoning_effort request-body preset.