エイカク
a7e580407c
feat: supports electron app ( #4952 )
...
* 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 >
2026-02-08 21:49:54 +08:00
Soulter
8bd1565696
fix: correct height attribute to max-height for dialog component
2026-02-08 21:13:38 +08:00
Soulter
03e0949067
feat: add welcome feature with localized content and onboarding steps
2026-02-08 21:11:34 +08:00
DD斩首
dbe8e33c4b
feat(telegram): 添加媒体组(相册)支持 / add media group (album) support ( #4893 )
...
* 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)**:明确指出缺少结束标志或总数信息
https://github.com/tdlib/telegram-bot-api/issues/643
- **Telegram Bot API 服务器 issue**:讨论媒体组处理的不便性,推荐使用超时机制
https://github.com/tdlib/telegram-bot-api/issues/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 社区**:确认媒体组消息单独到达,需手动处理
https://github.com/python-telegram-bot/python-telegram-bot/discussions/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 >
2026-02-08 13:22:45 +08:00
Gao Jinzhe
952023db30
feat: 允许 LLM 预览工具返回的图片并自主决定是否发送 ( #4895 )
...
* 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 >
2026-02-08 13:16:16 +08:00
Helian Nuits
4e0b5063c6
feat(ComponentPanel): implement permission management for dashboard ( #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 >
2026-02-08 12:27:32 +08:00
搁浅
30d1d55e3c
feat: add provider-souce-level proxy ( #4949 )
...
* 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 >
2026-02-08 12:22:01 +08:00
Soulter
1e9026d44c
chore: bump version to 4.14.6
2026-02-08 10:43:25 +08:00
letr
e48950d260
fix: localize provider source config UI ( #4933 )
...
* 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 >
2026-02-08 10:40:26 +08:00
Soulter
5e5207da95
perf: optimize webchat and wecom ai queue lifecycle ( #4941 )
...
* perf: optimize webchat and wecom ai queue lifecycle
* perf: enhance webchat back queue management with conversation ID support
2026-02-07 14:03:33 +08:00
Soulter
def8b730b7
fix: correct spelling of 'temporary' in SharedPreferences class
2026-02-07 14:01:08 +08:00
Soulter
22a109c2ae
feat: implement feishu / lark media file handling utilities for file, 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
2026-02-07 12:40:05 +08:00
Soulter
6416707e35
chore: bump version to 4.14.5 ( #4930 )
v4.14.5
2026-02-07 00:55:16 +08:00
Soulter
4658998b85
fix: messages[x] assistant content must contain at least one part ( #4928 )
...
* fix: messages[x] assistant content must contain at least one part
fixes : #4876
* ruff format
2026-02-07 00:33:07 +08:00
can
d233fb8b1e
feat: add bocha web search tool ( #4902 )
...
* add bocha web search tool
* Revert "add bocha web search tool"
This reverts commit 1b36d75a17 .
* 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 >
2026-02-06 21:43:42 +08:00
Soulter
fc2a67188f
docs: update watashiwakoseinodesukara
...
Removed duplicate text and added a new image.
2026-02-05 23:08:14 +08:00
boushi1111
d69592aaa8
fix: TypeError when MCP schema type is a list ( #4867 )
...
* Fix TypeError when MCP schema type is a list
Fixes crash in Gemini native tools with VRChat MCP.
* Refactor: avoid modifying schema in place per feedback
* Fix formatting and cleanup comments
2026-02-05 22:51:29 +08:00
Dt8333
f3397f6f08
fix: pyright lint ( #4874 )
...
* feat: 将 MessageSession 的 platform_id 改为 init=False,实例化时无需传入
Co-authored-by: aider (openai/gpt-5.2) <aider@aider.chat >
* refactor: 将 isinstance 检查改为元组、将默认模型值设为空字符串、将类型注解改为 Any 并导入
* refactor: 为 _serialize_job 增加返回类型注解 dict
* fix: 使用 cast 获取百度 AIP 的 msg 并对 psutil_addr 引入 type: ignore
Co-authored-by: aider (openai/gpt-5.2) <aider@aider.chat >
* refactor: 引入 _AddrWithPort 协议并替换 conn.laddr 的 cast
Co-authored-by: aider (openai/gpt-5.2) <aider@aider.chat >
* fix: 在构建 AstrBotMessage 时对 ctx.channel 可能为 None 进行兜底处理
Co-authored-by: aider (openai/gpt-5.2) <aider@aider.chat >
---------
Co-authored-by: aider (openai/gpt-5.2) <aider@aider.chat >
2026-02-05 21:54:12 +08:00
LIghtJUNction
be92e4f395
feat: systemd support ( #4880 )
2026-02-05 21:52:21 +08:00
Soulter
912e40e7f0
chore: delete unused file
2026-02-05 10:40:53 +08:00
Xican
2876c43387
fix: 修复特定提供商导致的定时任务执行失败的问题 ( #4872 )
...
* fix: 修复特定提供商导致的定时任务执行失败的问题
* ruff format
---------
Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com >
2026-02-05 10:14:31 +08:00
Soulter
464882f206
chore: bump version to 4.14.4
v4.14.4
2026-02-04 23:21:08 +08:00
Soulter
6736fb85c2
fix: conversation token usage calculate wrongly and fix tool call infinitely ( #4869 )
2026-02-04 23:18:32 +08:00
Soulter
1f75255950
chore: bump version to 4.14.3
v4.14.3
2026-02-04 20:31:19 +08:00
Soulter
a954e75547
fix: add apply_reset parameter to build_main_agent and handle coroutine reset in InternalAgentSubStage
2026-02-04 20:25:31 +08:00
advent259141
d2b9997620
chore: bump version to 4.14.2
v4.14.2
2026-02-04 17:42:41 +08:00
Gao Jinzhe
36432c4361
fix: 修复插件热重载时平台适配器未清理导致注册冲突的问题 ( #4859 )
2026-02-04 15:06:03 +08:00
圣达生物多
36f0d1f0f9
feat: add debug hint to console page and localization files ( #4852 )
2026-02-04 15:02:15 +08:00
Anima-IGCenter
f65b268bb2
chore: create robots.txt ( #4847 )
2026-02-04 15:00:08 +08:00
Raven95676
fe06dfcca3
fix: update ruff version to 0.15.0 and add ASYNC240 to ignore list
2026-02-04 11:45:59 +08:00
Soulter
bc9043bc3f
fix: update ruff exclude list to include tests directory
2026-02-04 10:08:48 +08:00
Soulter
430694aae9
chore: update readme
2026-02-04 10:05:35 +08:00
Soulter
c643e3c093
chore: ruff format
2026-02-03 23:40:23 +08:00
Soulter
ff46eef3b2
chore: bump version to 4.14.1
v4.14.1
2026-02-03 23:35:21 +08:00
Soulter
a0c364aa81
fix: active reply function does not work caused by event.request_llm() outdated
2026-02-03 23:34:42 +08:00
Anima-IGCenter
0e0f923a49
chore(seo): prevent indexing with noindex, nofollow ( #4844 )
2026-02-03 23:19:25 +08:00
Soulter
f2d637b935
fix: downgrade monaco-editor to version 0.52.2
v4.14.0
2026-02-03 22:12:29 +08:00
Soulter
96e61a4a92
chore: bump version to 4.14.0
2026-02-03 22:08:29 +08:00
香草味的纳西妲喵
e42c1b6da8
fix: add error handling to avoid ghost plugins ( #4836 )
...
* fix: add error handling to avoid ghost plugins
Add null checks to filter out incomplete plugin metadata objects that would appear as ghost plugins in the API response.
This fix ensures that plugins with all null key fields (name, author, desc, version, display_name) are not included in the plugin list response, preventing ghost plugins from appearing in the UI.
Issue: #4833
* fix: improve ghost plugin detection logic for better accuracy
---------
Co-authored-by: Soulter <905617992@qq.com >
2026-02-03 20:40:47 +08:00
Soulter
387bba093e
fix: missing 2 required positional arguments: 'filter1' and 'filter2' ( #4840 )
...
fixes : #4777
2026-02-03 20:37:18 +08:00
Soulter
123cf9cb11
docs: revise README.md for clarity and feature updates ( #4839 )
...
Updated project description and added details about deployment and features.
2026-02-03 20:24:10 +08:00
Soulter
93277ffac9
fix: improve skills bundle extraction process to prevent overwriting existing files
2026-02-03 16:54:53 +08:00
Soulter
c091053ea8
fix: skills bundle unzip failed in sandbox
2026-02-03 16:34:07 +08:00
Soulter
8b9f2f1e70
feat: enhance user experience with runtime hints and improved UI elements in skills management
2026-02-03 16:28:17 +08:00
Soulter
25ca7bd71e
fix: add missing newline for code readability in _apply_local_env_tools function
2026-02-03 16:09:17 +08:00
Soulter
093b37e04b
feat: add computer use runtime config and handling for skills execution ( #4831 )
...
* feat: add computer use runtime configuration and handling for skills execution
* fix: improve user notification for disabled Computer Use feature in skills execution
2026-02-03 16:08:15 +08:00
Soulter
a12e27f9ab
feat: implement theme customization with primary and secondary color options
2026-02-03 14:41:48 +08:00
Soulter
ae6e0db053
perf: webui
...
Co-authored-by: IGCrystal <IGCrystal@wenturc.com >
2026-02-03 14:40:45 +08:00
SJ
cd6bef4d78
fix: MCP tools being filtered out when a specific plugin set is configured in the WebUI ( #4825 )
...
* fix: preserve MCP tools in _plugin_tool_fix filter
Tools without handler_module_path (such as MCP tools and built-in tools)
were being incorrectly skipped during plugin-based tool filtering.
This fix ensures that tools without plugin association are preserved,
as they should not be affected by plugin-level filtering logic.
* fix: retain MCP tools in _plugin_tool_fix function
---------
Co-authored-by: idiotsj <idiotsj@users.noreply.github.com >
Co-authored-by: Soulter <905617992@qq.com >
2026-02-03 10:53:20 +08:00
Copilot
de1304dc6a
feat: add edit button to persona selector dialog ( #4826 )
...
* Initial plan
* feat: add edit persona functionality in chatui selector dialog
Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com >
* fix: address code review feedback - improve null checks and i18n consistency
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 >
2026-02-03 10:32:20 +08:00