Skip to content

同步主分支#5533

Merged
LIghtJUNction merged 200 commits intofeat/optional-backendfrom
master
Feb 27, 2026
Merged

同步主分支#5533
LIghtJUNction merged 200 commits intofeat/optional-backendfrom
master

Conversation

@LIghtJUNction
Copy link
Member

Modifications / 改动点

  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果


Checklist / 检查清单

  • 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
  • 👀 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。/ My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
  • 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 requirements.txtpyproject.toml 文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
  • 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.

weijintaocode and others added 30 commits February 6, 2026 21:43
* add bocha web search tool

* Revert "add bocha web search tool"

This reverts commit 1b36d75.

* add bocha web search tool

* fix: correct temporary_cache spelling and update supported tools for web search

* ruff

---------

Co-authored-by: Soulter <905617992@qq.com>
)

* fix: messages[x] assistant content must contain at least one part

fixes: #4876

* ruff format
… audio and video processing (#4938)

* feat: implement media file handling utilities for audio and video processing

* feat: refactor file upload handling for audio and video in LarkMessageEvent

* feat: add cleanup for failed audio and video conversion outputs in media_utils

* feat: add utility methods for sending messages and uploading files in LarkMessageEvent
* perf: optimize webchat and wecom ai queue lifecycle

* perf: enhance webchat back queue management with conversation ID support
* fix: localize provider source ui

* feat: localize provider metadata keys

* chore: add provider metadata translations

* chore: format provider i18n changes

* fix: preserve metadata fields in i18n conversion

* fix: internationalize platform config and dialog

* fix: add Weixin official account platform icon

---------

Co-authored-by: Soulter <905617992@qq.com>
* feat: 添加 Provider 级别代理支持及请求失败日志

* refactor: simplify provider source configuration structure

* refactor: move env proxy fallback logic to log_connection_failure

* refactor: update client proxy handling and add terminate method for cleanup

* refactor: update no_proxy configuration to remove redundant subnet

---------

Co-authored-by: Soulter <905617992@qq.com>
…4887)

* feat(backend): add permission update api

* feat(useCommandActions): add updatePermission action and translations

* feat(dashboard): implement permission editing ui

* style: fix import sorting in command.py

* refactor(backend): extract permission update logic to service

* feat(i18n): add success and failure messages for command updates

---------

Co-authored-by: Soulter <905617992@qq.com>
* feat: 允许 LLM 预览工具返回的图片并自主决定是否发送

* 复用 send_message_to_user 替代独立的图片发送工具

* feat: implement _HandleFunctionToolsResult class for improved tool response handling

* docs: add path handling guidelines to AGENTS.md

---------

Co-authored-by: Soulter <905617992@qq.com>
* feat(telegram): 添加媒体组(相册)支持 / add media group (album) support

## 功能说明
支持 Telegram 的媒体组消息(相册),将多张图片/视频合并为一条消息处理,而不是分散成多条消息。

## 主要改动

### 1. 初始化媒体组缓存 (__init__)
- 添加 `media_group_cache` 字典存储待处理的媒体组消息
- 使用 2.5 秒超时收集媒体组消息(基于社区最佳实践)
- 最大等待时间 10 秒(防止永久等待)

### 2. 消息处理流程 (message_handler)
- 检测 `media_group_id` 判断是否为媒体组消息
- 媒体组消息走特殊处理流程,避免分散处理

### 3. 媒体组消息缓存 (handle_media_group_message)
- 缓存收到的媒体组消息
- 使用 APScheduler 实现防抖(debounce)机制
- 每收到新消息时重置超时计时器
- 超时后触发统一处理

### 4. 媒体组合并处理 (process_media_group)
- 从缓存中取出所有媒体项
- 使用第一条消息作为基础(保留文本、回复等信息)
- 依次添加所有图片、视频、文档到消息链
- 将合并后的消息发送到处理流程

## 技术方案论证

Telegram Bot API 在处理媒体组时的设计限制:
1. 将媒体组的每个消息作为独立的 update 发送
2. 每个 update 带有相同的 `media_group_id`
3. **不提供**组的总数、结束标志或一次性完整组的机制

因此,bot 必须自行收集消息,并通过硬编码超时(timeout/delay)等待可能延迟到达的消息。
这是目前唯一可靠的方案,被官方实现、主流框架和开发者社区广泛采用。

### 官方和社区证据:
- **Telegram Bot API 服务器实现(tdlib)**:明确指出缺少结束标志或总数信息
  tdlib/telegram-bot-api#643

- **Telegram Bot API 服务器 issue**:讨论媒体组处理的不便性,推荐使用超时机制
  tdlib/telegram-bot-api#339

- **Telegraf(Node.js 框架)**:专用媒体组中间件使用 timeout 控制等待时间
  https://github.com/DieTime/telegraf-media-group

- **StackOverflow 讨论**:无法一次性获取媒体组所有文件,必须手动收集
  https://stackoverflow.com/questions/50180048/telegram-api-get-all-uploaded-photos-by-media-group-id

- **python-telegram-bot 社区**:确认媒体组消息单独到达,需手动处理
  python-telegram-bot/python-telegram-bot#3143

- **Telegram Bot API 官方文档**:仅定义 `media_group_id` 为可选字段,不提供获取完整组的接口
  https://core.telegram.org/bots/api#message

## 实现细节
- 使用 2.5 秒超时收集媒体组消息(基于社区最佳实践)
- 最大等待时间 10 秒(防止永久等待)
- 采用防抖(debounce)机制:每收到新消息重置计时器
- 利用 APScheduler 实现延迟处理和任务调度

## 测试验证
- ✅ 发送 5 张图片相册,成功合并为一条消息
- ✅ 保留原始文本说明和回复信息
- ✅ 支持图片、视频、文档混合的媒体组
- ✅ 日志显示 Processing media group <media_group_id> with 5 items

## 代码变更
- 文件:astrbot/core/platform/sources/telegram/tg_adapter.py
- 新增代码:124 行
- 新增方法:handle_media_group_message(), process_media_group()

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

* refactor(telegram): 优化媒体组处理性能和可靠性

根据代码审查反馈改进:

1. 实现 media_group_max_wait 防止无限延迟
   - 跟踪媒体组创建时间,超过最大等待时间立即处理
   - 最坏情况下 10 秒内必定处理,防止消息持续到达导致无限延迟

2. 移除手动 job 查找优化性能
   - 删除 O(N) 的 get_jobs() 循环扫描
   - 依赖 replace_existing=True 自动替换任务

3. 重用 convert_message 减少代码重复
   - 统一所有媒体类型转换逻辑
   - 未来添加新媒体类型只需修改一处

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

* fix(telegram): handle missing message in media group processing and improve logging messages

---------

Co-authored-by: Ubuntu <ubuntu@localhost.localdomain>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Soulter <905617992@qq.com>
* feat: add desktop wrapper with frontend-only packaging

* docs: add desktop build docs and track dashboard lockfile

* fix: track desktop lockfile for npm ci

* fix: allow custom install directory for windows installer

* chore: migrate desktop workflow to pnpm

* fix(desktop): build AppImage only on Linux

* fix(desktop): harden packaged startup and backend bundling

* fix(desktop): adapt packaged restart and plugin dependency flow

* fix(desktop): prevent backend respawn race on quit

* fix(desktop): prefer pyproject version for desktop packaging

* fix(desktop): improve startup loading UX and reduce flicker

* ci: add desktop multi-platform release workflow

* ci: fix desktop release build and mac runner labels

* ci: disable electron-builder auto publish in desktop build

* ci: avoid electron-builder publish path in build matrix

* ci: normalize desktop release artifact names

* ci: exclude blockmap files from desktop release assets

* ci: prefix desktop release assets with AstrBot and purge blockmaps

* feat: add electron bridge types and expose backend control methods in preload script

* Update startup screen assets and styles

- Changed the icon from PNG to SVG format for better scalability.
- Updated the border color from #d0d0d0 to #eeeeee for a softer appearance.
- Adjusted the width of the startup screen from 460px to 360px for improved responsiveness.

* Update .gitignore to include package.json

* chore: remove desktop gitkeep ignore exceptions

* docs: update desktop troubleshooting for current runtime behavior

* refactor(desktop): modularize runtime and harden startup flow

---------

Co-authored-by: Soulter <905617992@qq.com>
Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>
* chore: auto fix by ruff

* refactor: 统一修正返回类型注解为 None/bool 以匹配实现

* refactor: 将 _get_next_page 改为异步并移除多余的请求错误抛出

* refactor: 将 get_client 的返回类型改为 object

* style: 为 LarkMessageEvent 的相关方法添加返回类型注解 None

---------

Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>
* Initial plan

* feat: add delete button to persona management dialog

- Added delete button to PersonaForm dialog (only visible when editing)
- Implemented deletePersona method with confirmation dialog
- Connected delete event to PersonaManager for proper handling
- Button positioned on left side of dialog actions for clear separation
- Uses existing i18n translations for delete button and messages

Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>

* fix: use finally block to ensure saving state is reset

- Moved `this.saving = false` to finally block in deletePersona
- Ensures UI doesn't stay in saving state after errors
- Follows best practices for state management

Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>
* fix: handle pip install execution in frozen runtime

* fix: harden pip subprocess fallback handling
letr007 and others added 18 commits February 25, 2026 14:54
* fix(dashboard): preserve custom GitHub proxy setting on reload

* fix(dashboard): keep github proxy selection persisted in settings
* fix: ensure tool call/response pairing in context truncation

* refactor: simplify fix_messages to single-pass state machine
fix(persona): preserve conversation persona_id and unify session/conversation resolution
- Implemented a new composable `useExtensionPage` to handle various functionalities related to plugin management, including fetching extensions, handling updates, and managing UI states.
- Added support for conflict checking, plugin installation, and custom source management.
- Integrated search and filtering capabilities for plugins in the market.
- Enhanced user experience with dialogs for confirmations and notifications.
- Included pagination and sorting features for better plugin visibility.
… Platform (#5445)

* fix: clear markdown field when sending media messages via QQ Official API

* refactor: use pop() to remove markdown key instead of setting None
…vider (#5442)

* fix(dashboard): 强化 API Key 复制临时节点清理逻辑

* fix(embedding): 自动检测改为探测 OpenAI embedding 最大可用维度

* fix: normalize openai embedding base url and add hint key

* i18n: add embedding_api_base hint translations

* i18n: localize provider embedding/proxy metadata hints

* fix: show provider-specific embedding API Base URL hint as field subtitle

* fix(embedding): cap OpenAI detect_dim probes with early short-circuit

* fix(dashboard): return generic error on provider adapter import failure

* 回退检测逻辑
* refactor: 修正 Sqlite 查询、下载回调、接口重构与类型调整

* feat: 为 OneBotClient 增加 CallAction 协议与异步调用支持
* perf: batch metadata query in KB retrieval to fix N+1 problem

Replace N sequential get_document_with_metadata() calls with a single
get_documents_with_metadata_batch() call using SQL IN clause.

Benchmark results (local SQLite):
- 10 docs: 10.67ms → 1.47ms (7.3x faster)
- 20 docs: 26.00ms → 2.68ms (9.7x faster)
- 50 docs: 63.87ms → 2.79ms (22.9x faster)

* refactor: use set[str] param type and chunk IN clause for SQLite safety

Address review feedback:
- Change doc_ids param from list[str] to set[str] to avoid unnecessary conversion
- Chunk IN clause into batches of 900 to stay under SQLite's 999 parameter limit
- Remove list() wrapping at call site, pass set directly
#5462)

* fix:fix the issue where incomplete cleanup of residual plugins occurs in the failed loading of plugins

* fix:ruff format,apply bot suggestions

* Apply suggestion from @gemini-code-assist[bot]

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

---------

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

* feat: implement follow-up message handling in ToolLoopAgentRunner

* fix: correct import path for follow-up module in InternalAgentSubStage
* feat: implement websockets transport mode selection for chat

- Added transport mode selection (SSE/WebSocket) in the chat component.
- Updated conversation sidebar to include transport mode options.
- Integrated transport mode handling in message sending logic.
- Refactored message sending functions to support both SSE and WebSocket.
- Enhanced WebSocket connection management and message handling.
- Updated localization files for transport mode labels.
- Configured Vite to support WebSocket proxying.

* feat(webchat): refactor message parsing logic and integrate new parsing function

* feat(chat): add websocket API key extraction and scope validation
Copilot AI review requested due to automatic review settings February 27, 2026 13:42
@auto-assign auto-assign bot requested review from Fridemn and Soulter February 27, 2026 13:42
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 300 files, and this pull request has 427

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Feb 27, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request synchronizes changes from the main branch into the current branch. The changes include refactoring the Star plugin architecture, improving type annotations across the codebase, standardizing temporary file handling, and updating various provider implementations.

Changes:

  • Refactored Star plugin system by extracting base class to separate module for better modularity
  • Added comprehensive return type annotations (-> None) to methods across the codebase
  • Standardized temporary file path handling using get_astrbot_temp_path() utility
  • Updated multiple provider implementations with proxy support, proper cleanup, and improved error handling

Reviewed changes

Copilot reviewed 204 out of 427 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
astrbot/core/star/base.py Extracted Star base class from init.py with improved context handling
astrbot/core/star/init.py Simplified imports by moving Star class definition to base.py
astrbot/core/provider/sources/*.py Added return type annotations, proxy support, and terminate methods
astrbot/core/utils/temp_dir_cleaner.py Added (referenced but not shown in diff)
Multiple platform adapters Added proper return type annotations to async methods
Multiple agent/tool files Improved type safety with return type hints

name: str

class _ContextLike(Protocol):
def get_config(self, umo: str | None = None) -> Any: ...
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter name umo is ambiguous and unclear. Consider renaming to a more descriptive name like unified_msg_origin or adding a docstring to clarify what this parameter represents.

Suggested change
def get_config(self, umo: str | None = None) -> Any: ...
def get_config(self, unified_msg_origin: str | None = None) -> Any: ...

Copilot uses AI. Check for mistakes.
Comment on lines +61 to +65
temp_dir = get_astrbot_temp_path()
path = os.path.join(
temp_dir,
f"whisper_selfhost_{uuid.uuid4().hex[:8]}.input",
)
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filename prefix "whisper_selfhost_" is inconsistent with "whisper_selfhosted_" used elsewhere. Consider using "whisper_selfhosted_" for consistency.

Copilot uses AI. Check for mistakes.
provider_settings,
*,
use_api_key: bool = True,
) -> None:
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use_api_key parameter appears to change initialization behavior but its purpose is unclear without documentation. Consider adding a docstring to explain when and why this parameter should be False.

Suggested change
) -> None:
) -> None:
"""
Initialize the Anthropic provider adapter.
Parameters
----------
provider_config :
Provider configuration dictionary. Typically contains keys such as
``api_base``, ``timeout``, ``anth_thinking_config``, and any proxy
settings required to reach the Anthropic API.
provider_settings :
Global or shared settings passed down from the AstrBot provider
system.
use_api_key : bool, optional
Whether to automatically initialize an authenticated Anthropic
client using the API keys managed by the base :class:`Provider`.
When ``True`` (default), :meth:`_init_api_key` is called during
construction, which selects an API key and creates an
:class:`AsyncAnthropic` client.
Set this to ``False`` when you need to defer or override client
initialization (for example, when injecting a preconfigured or
mocked client in tests, or when another component is responsible
for managing authentication and HTTP clients). In that case no
Anthropic client is created here, and you are responsible for
configuring ``self.client`` before making requests.
"""

Copilot uses AI. Check for mistakes.
Comment on lines +46 to +50
cls._instance._initialized = False
return cls._instance

def __init__(self) -> None:
if self._initialized:
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting _initialized as an instance attribute in __new__ before __init__ runs could lead to confusion. Consider using a class-level tracking mechanism or documenting this pattern clearly, as it's a non-standard singleton implementation.

Suggested change
cls._instance._initialized = False
return cls._instance
def __init__(self) -> None:
if self._initialized:
return cls._instance
def __init__(self) -> None:
if getattr(self, "_initialized", False):

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +37
def flush_pending_if_valid() -> None:
nonlocal pending_assistant, pending_tools
if pending_assistant is not None and pending_tools:
fixed_messages.append(pending_assistant)
fixed_messages.extend(pending_tools)
pending_assistant = None
pending_tools = []
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nested function flush_pending_if_valid modifies outer scope variables. While correct, consider extracting this logic to a private method or adding a comment explaining the state management pattern for better maintainability.

Copilot uses AI. Check for mistakes.
Comment on lines +194 to +197
# try:
# os.remove(local_path)
# except Exception as e:
# logger.error(f"Error removing temp file {local_path}: {e}")
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented-out code for removing temporary files should either be removed or documented with a clear reason for disabling. The comment "remove" on line 193 suggests this was intentional, but leaving cleanup code commented increases tech debt.

Copilot uses AI. Check for mistakes.
@dosubot dosubot bot added the area:core The bug / feature is about astrbot's core, backend label Feb 27, 2026
@dosubot
Copy link

dosubot bot commented Feb 27, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on upgrading the Python environment, expanding web search options, and enhancing agent stability and message processing. It introduces new features for managing active agent tasks, improves the reliability of quoted message parsing, and adds a secure API key management system. Additionally, it updates all documentation to reflect these significant changes and new deployment methods.

Highlights

  • Python Version Upgrade: The project's Python version has been upgraded from 3.10 to 3.12 across the board, including the .python-version file and the Dockerfile.
  • Enhanced Web Search Capabilities: Integrated BoCha Search API as a new web search provider, offering more options for web search functionality within the agent. Existing web search tools have been updated to support this new provider.
  • Improved Agent Control and Stability: Implemented new mechanisms for stopping active agent tasks in conversations (/stop command), preventing resource leaks and improving responsiveness. Also added robust fallback mechanisms for chat providers in case of API errors.
  • Refined Message Handling and Persistence: Enhanced quoted message parsing to extract images and text more reliably, including fallback mechanisms. Introduced a tool image cache to allow LLMs to review images before sending them to users. Messages are now saved to history more consistently, even after user interruptions.
  • Comprehensive Readme Updates: All README files (Chinese, English, French, Japanese, Russian) have been updated to reflect the latest features, deployment methods (including new Desktop App and Launcher options), supported platforms (LINE is now fully supported), and an increased plugin count (1000+).
  • Admin Permission for Computer Use Tools: Added an optional configuration (computer_use_require_admin) to restrict the use of computer tools (Python execution, shell execution, file upload/download) to admin users only, enhancing security.
  • New API Key Management: Introduced a new database table and associated API for managing API keys, enabling better security and control over external service access.
Changelog
  • .dockerignore
    • Removed 'changelogs/' from the ignore list.
  • .github/ISSUE_TEMPLATE/feature-request.yml
    • Updated the feature request template to include English translations for all fields and descriptions.
  • .gitignore
    • Added '.pnpm-store/' to the ignore list.
    • Removed 'package.json' from the ignore list.
    • Removed a trailing newline from 'GenieData/' entry.
  • .python-version
    • Updated the Python version from 3.10 to 3.12.
  • AGENTS.md
    • Added a new instruction for path handling using 'pathlib.Path' and 'astrbot.core.utils.path_utils'.
  • Dockerfile
    • Updated the base image from 'python:3.11-slim' to 'python:3.12-slim'.
    • Modified 'uv' commands to include 'uv lock' and 'uv export' for dependency management.
    • Consolidated nodejs installation steps.
  • FIRST_NOTICE.en-US.md
    • Added a new file containing an English welcome message and an important notice about AstrBot's free and open-source nature, including a warning against scams.
  • FIRST_NOTICE.md
    • Added a new file containing a Chinese welcome message and an important notice about AstrBot's free and open-source nature, including a warning against scams.
  • README.md
    • Removed an extra blank line in the header section.
    • Updated feature list numbering and plugin count from 'nearly 800' to '1000+'.
    • Updated plugin count in the feature table from '900+' to '1000+'.
    • Updated 'uv' deployment instructions from 'uvx astrbot' to 'uv tool install astrbot' and 'astrbot'.
    • Added new deployment methods: Desktop Application (Tauri) and Launcher.
    • Updated supported messaging platforms: removed 'official platform & OneBot' from QQ, added 'OneBot v11 protocol implementation', and moved LINE from 'will support' to 'supported'.
    • Added AIHubMix to the list of supported AI providers.
    • Updated contributor image URL to include '&max=200&columns=14'.
    • Added a new section for 'Open Source Project Friendly Links' with several related projects.
    • Removed the '
      Details' tag and adjusted markdown structure.
    • Added a closing '' tag.
  • README_en.md
    • Removed a duplicate 'English' link from the language selection.
    • Updated the screenshot image URL.
    • Updated the plugin count in the key features section from 'nearly 800' to '1000+'.
    • Added a feature table with the updated plugin count '1000+'.
    • Updated 'uv' deployment instructions.
    • Added new deployment methods: System Package Manager (Arch Linux), Desktop Application (Tauri), and AstrBot Launcher.
    • Updated supported messaging platforms: moved LINE from 'Coming Soon' to 'supported'.
    • Corrected a typo in the SiliconFlow URL.
    • Updated the contributor image URL.
    • Added a new philosophical statement about companionship and capability.
    • Removed the '
      Details' tag.
  • README_fr.md
    • Updated language links in the header.
    • Updated badge styles and added new badges (DeepWiki, Zread, GitCode).
    • Updated screenshot image URL.
    • Updated plugin count from 'nearly 800' to '1000+'.
    • Added a feature table with the updated plugin count '1000+'.
    • Updated 'uv' deployment instructions.
    • Added new deployment methods: Desktop Application (Tauri) and Launcher.
    • Updated supported messaging platforms: moved LINE from 'Bientôt disponible' to 'supported'.
    • Corrected a typo in the SiliconFlow URL.
    • Updated the contributor image URL.
    • Added a new philosophical statement about companionship and capability.
    • Removed the '
      Details' tag.
  • README_ja.md
    • Updated language links in the header.
    • Updated badge styles and added new badges (DeepWiki, Zread, GitCode).
    • Updated screenshot image URL.
    • Updated plugin count from '約800個' to '1000を超える'.
    • Added a feature table with the updated plugin count '1000+'.
    • Updated 'uv' deployment instructions.
    • Added new deployment methods: Desktop Application (Tauri) and Launcher.
    • Updated supported messaging platforms: moved LINE from '近日対応予定' to 'supported'.
    • Updated the contributor image URL.
    • Added a new philosophical statement about companionship and capability.
    • Removed the '
      Details' tag.
  • README_ru.md
    • Updated language links in the header.
    • Updated badge styles and added new badges (DeepWiki, Zread, GitCode).
    • Updated screenshot image URL.
    • Updated plugin count from 'почти 800' to 'более 1000'.
    • Added a feature table with the updated plugin count '1000+'.
    • Updated 'uv' deployment instructions.
    • Added new deployment methods: Desktop Application (Tauri) and Launcher.
    • Updated supported messaging platforms: moved LINE from 'Скоро' to 'supported'.
    • Corrected a typo in the SiliconFlow URL.
    • Updated the contributor image URL.
    • Added a new philosophical statement about companionship and capability.
    • Removed the '
      Details' tag.
  • astrbot/api/event/filter/init.py
    • Imported and exposed new event filters: 'on_plugin_error', 'on_plugin_loaded', and 'on_plugin_unloaded'.
  • astrbot/builtin_stars/astrbot/long_term_memory.py
    • Added '-> None' type hints to 'init', 'handle_message', 'on_req_llm', and 'after_req_llm' methods for improved type consistency.
  • astrbot/builtin_stars/astrbot/main.py
    • Added '-> None' type hints to 'decorate_llm_req', 'record_llm_resp_to_ltm', and 'after_message_sent' methods for improved type consistency.
  • astrbot/builtin_stars/builtin_commands/commands/admin.py
    • Added '-> None' type hints to 'init', 'op', 'deop', 'wl', 'dwl', and 'update_dashboard' methods for improved type consistency.
  • astrbot/builtin_stars/builtin_commands/commands/alter_cmd.py
    • Added '-> None' type hints to 'init', 'update_reset_permission', and 'alter_cmd' methods for improved type consistency.
  • astrbot/builtin_stars/builtin_commands/commands/conversation.py
    • Imported 'active_event_registry' for managing active events.
    • Added '-> None' type hints to several methods for improved type consistency.
    • Added 'active_event_registry.stop_all' calls in 'reset', 'new_conv', and 'del_conv' methods to stop active agent tasks, preventing resource leaks.
    • Introduced a new 'stop' command to explicitly stop running agent tasks in a conversation.
    • Modified the 'convs' method to resolve persona names more robustly, including handling custom rules.
  • astrbot/builtin_stars/builtin_commands/commands/help.py
    • Added '-> None' type hints to 'init', 'walk', and 'help' methods for improved type consistency.
  • astrbot/builtin_stars/builtin_commands/commands/llm.py
    • Added '-> None' type hints to 'init' and 'llm' methods for improved type consistency.
  • astrbot/builtin_stars/builtin_commands/commands/persona.py
    • Removed the 'sp' import.
    • Added '-> None' type hints to 'init' and 'persona' methods for improved type consistency.
    • Simplified persona resolution in the 'persona' command by removing direct 'sp.get_async' calls for 'force_applied_persona_id' and instead using 'resolve_selected_persona'.
  • astrbot/builtin_stars/builtin_commands/commands/plugin.py
    • Added '-> None' type hints to 'init', 'plugin_ls', 'plugin_off', 'plugin_on', 'plugin_get', and 'plugin_help' methods for improved type consistency.
  • astrbot/builtin_stars/builtin_commands/commands/provider.py
    • Added '-> None' type hints to 'init', 'provider', and 'model_ls' methods for improved type consistency.
  • astrbot/builtin_stars/builtin_commands/commands/setunset.py
    • Added '-> None' type hints to 'init', 'set_variable', and 'unset_variable' methods for improved type consistency.
  • astrbot/builtin_stars/builtin_commands/commands/sid.py
    • Added '-> None' type hints to 'init' and 'sid' methods for improved type consistency.
  • astrbot/builtin_stars/builtin_commands/commands/t2i.py
    • Added '-> None' type hints to 'init' and 't2i' methods for improved type consistency.
  • astrbot/builtin_stars/builtin_commands/commands/tts.py
    • Added '-> None' type hints to 'init' and 'tts' methods for improved type consistency.
  • astrbot/builtin_stars/builtin_commands/main.py
    • Added '-> None' type hints to several methods for improved type consistency.
  • astrbot/builtin_stars/session_controller/main.py
    • Added '-> None' type hints to 'init' and 'handle_session_control_agent' methods for improved type consistency.
  • astrbot/builtin_stars/web_searcher/engines/init.py
    • Changed '_get_next_page' from 'def' to 'async def' and added '-> str' type hint.
    • Added 'async' keyword to '_get_next_page' method.
  • astrbot/builtin_stars/web_searcher/main.py
    • Added 'web_search_bocha' to the list of exported tools.
    • Added 'bocha_key_index' and 'bocha_key_lock' attributes for managing BoCha API keys.
    • Added a new method '_get_bocha_key' for concurrent-safe retrieval and rotation of BoCha API keys.
    • Implemented '_web_search_bocha' to perform web searches using the BoCha API.
    • Implemented 'search_from_bocha' as a new LLM tool for web searching with BoCha.
    • Modified 'edit_web_search_tools' to include 'web_search_bocha' in the toolset management.
    • Corrected a typo in the SiliconFlow URL.
  • astrbot/cli/init.py
    • Updated the version number from 4.14.4 to 4.18.3.
  • astrbot/cli/commands/cmd_conf.py
    • Added '-> None' type hints to 'conf' and 'set_config' functions for improved type consistency.
  • astrbot/cli/commands/cmd_plug.py
    • Added '-> None' type hints to 'plug', 'new', and 'list' functions for improved type consistency.
  • astrbot/cli/commands/cmd_run.py
    • Added '-> None' type hints to 'run_astrbot' function for improved type consistency.
  • astrbot/cli/utils/plugin.py
    • Added '-> None' type hints to 'get_git_repo' function for improved type consistency.
  • astrbot/core/agent/context/compressor.py
    • Added '-> None' type hints to 'init' methods for improved type consistency.
  • astrbot/core/agent/context/manager.py
    • Added '-> None' type hints to 'init' methods for improved type consistency.
  • astrbot/core/agent/context/truncator.py
    • Implemented 'fix_messages' to ensure valid tool call and response pairing.
    • Added '_has_tool_calls' to check if a message contains tool calls.
  • astrbot/core/agent/handoff.py
    • Added '-> None' type hints to 'init' methods for improved type consistency.
    • Added 'image_urls' and 'background_task' to the default parameters.
  • astrbot/core/agent/hooks.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/agent/mcp_client.py
    • Added '-> None' type hints to 'init' and 'connect_to_server' methods for improved type consistency.
  • astrbot/core/agent/message.py
    • Added 'PrivateAttr' for '_no_save' to prevent it from being serialized.
    • Added a model validator to check content requirements.
  • astrbot/core/agent/runners/coze/coze_api_client.py
    • Added '-> None' type hints to 'init' and 'close' methods for improved type consistency.
  • astrbot/core/agent/runners/dashscope/dashscope_agent_runner.py
    • Added '-> None' type hints to 'reset' method for improved type consistency.
    • Added '-> bool' type hints to 'has_rag_options' method for improved type consistency.
  • astrbot/core/agent/runners/dify/dify_agent_runner.py
    • Replaced 'get_astrbot_data_path' with 'get_astrbot_temp_path' for temporary file storage.
    • Added type hints for improved code clarity and consistency.
  • astrbot/core/astr_agent_hooks.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/astr_agent_run_util.py
    • Added type hints for improved code clarity and consistency.
    • Added a new function '_watch_agent_stop_signal' to monitor and handle agent stop requests.
    • Added logic to handle aborted agent runs and preserve partial output.
    • Added a new function '_build_tool_result_status_message' to build tool result status messages.
  • astrbot/core/cli/init.py
    • Updated the version number from 4.14.4 to 4.18.3.
  • astrbot/core/cli/commands/cmd_conf.py
    • Added '-> None' type hints to 'conf' and 'set_config' functions for improved type consistency.
  • astrbot/core/cli/commands/cmd_plug.py
    • Added '-> None' type hints to 'plug', 'new', and 'list' functions for improved type consistency.
  • astrbot/core/cli/utils/plugin.py
    • Added '-> None' type hints to 'get_git_repo' function for improved type consistency.
  • astrbot/core/config/astrbot_config.py
    • Added '-> None' type hints to methods for improved type consistency.
    • Added handling for UTF-8 BOM in config files.
  • astrbot/core/config/default.py
    • Updated the version number from 4.14.4 to 4.18.3.
    • Added LINE to the list of supported messaging platforms.
    • Added AIHubMix to the list of supported AI providers.
    • Added a new configuration option 'computer_use_require_admin' to restrict computer tool usage to admin users.
    • Added a new configuration option 'max_quoted_fallback_images' to limit the number of fallback images extracted from quoted messages.
    • Added a new configuration option 'quoted_message_parser' to configure the quoted message parser.
    • Added a new configuration option 'proxy' to the OpenAI Embedding, Gemini Embedding, Anthropic, Moonshot, xAI, DeepSeek, Zhipu, AIHubMix, OpenRouter, NVIDIA, Azure OpenAI, OpenAI TTS, Genie TTS, 阿里云百炼 TTS(API), Azure TTS(API), MiniMax TTS(API), 火山引擎_TTS(API), Gemini TTS.
    • Added a new configuration option 'dashboard.ssl' to enable HTTPS for the WebUI.
    • Added a new configuration option 'temp_dir_max_size' to limit the size of the temporary directory.
  • astrbot/core/conversation_mgr.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/core_lifecycle.py
    • Added '-> None' type hints to methods for improved type consistency.
    • Added 'TempDirCleaner' to manage temporary files.
  • astrbot/core/cron/events.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/cron/manager.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/db/init.py
    • Added '-> None' type hints to methods for improved type consistency.
    • Added API key management methods (create_api_key, list_api_keys, get_api_key_by_id, get_active_api_key_by_hash, touch_api_key, revoke_api_key, delete_api_key).
  • astrbot/core/db/migration/migra_3_to_4.py
    • Added '-> None' type hints to functions for improved type consistency.
  • astrbot/core/db/migration/migra_45_to_46.py
    • Added '-> None' type hints to 'migrate_45_to_46' function for improved type consistency.
  • astrbot/core/db/migration/migra_token_usage.py
    • Added '-> None' type hints to 'migrate_token_usage' function for improved type consistency.
  • astrbot/core/db/migration/migra_webchat_session.py
    • Added '-> None' type hints to 'migrate_webchat_session' function for improved type consistency.
  • astrbot/core/db/migration/shared_preferences_v3.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/db/sqlite.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/db/vec_db/base.py
    • Added '-> None' type hints to 'initialize' method for improved type consistency.
  • astrbot/core/db/vec_db/faiss_impl/document_storage.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/db/vec_db/faiss_impl/embedding_storage.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/event_bus.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/file_token_service.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/initial_loader.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/knowledge_base/chunking/fixed_size.py
    • Added '-> None' type hints to 'init' method for improved type consistency.
  • astrbot/core/knowledge_base/chunking/recursive.py
    • Added '-> None' type hints to 'init' method for improved type consistency.
  • astrbot/core/knowledge_base/kb_db_sqlite.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/knowledge_base/kb_helper.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/persona_mgr.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/pipeline/init.py
    • Added a new function '_watch_agent_stop_signal' to monitor and handle agent stop requests.
  • astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/pipeline/rate_limit_check/stage.py
    • Added '-> None' type hints to 'init' method for improved type consistency.
  • astrbot/core/pipeline/respond/stage.py
    • Added '-> None' type hints to 'init' and 'help' methods for improved type consistency.
  • astrbot/core/platform/astr_message_event.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/manager.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/platform.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/discord/client.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/discord/components.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/discord/discord_platform_adapter.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/lark/lark_adapter.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/misskey/misskey_adapter.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/qqofficial/qqofficial_platform_adapter.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/satori/satori_adapter.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/slack/client.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/slack/slack_adapter.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/platform/sources/telegram/tg_adapter.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/umop_config_router.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/utils/active_event_registry.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/utils/astrbot_path.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/utils/io.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/utils/session_lock.py
    • Added '-> None' type hints to methods for improved type consistency.
  • astrbot/core/utils/temp_dir_cleaner.py
    • Added '-> None' type hints to methods for improved type consistency.
Ignored Files
  • Ignored by pattern: .github/workflows/** (6)
    • .github/workflows/auto_release.yml
    • .github/workflows/code-format.yml
    • .github/workflows/coverage_test.yml
    • .github/workflows/dashboard_ci.yml
    • .github/workflows/docker-image.yml
    • .github/workflows/release.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@LIghtJUNction LIghtJUNction merged commit 483048e into feat/optional-backend Feb 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core The bug / feature is about astrbot's core, backend size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.