RC-CHN
9eafd7b44a
feat: add features for chunked upload and backup file management to the backup section ( #4237 )
...
* feat: 添加分片上传备份文件功能
* feat: 为上传备份文件添加异步并发以提升速度
* feat: 使用浏览器原生下载方式以显示进度条
* feat: 添加从已上传备份列表恢复的功能
* feat: 允许重命名备份文件
* feat: 在后端校验可用备份文件后在前端部分显示备份版本号,添加手动上传提示
* style: format code
* fix: 更新备份部分测试
* fix: 修复浏览器原生下载鉴权问题,通过url传参的方式完成认证
* feat(backup): 改进备份系统的分片上传和下载鉴权
- 修复浏览器原生下载鉴权问题,支持 URL 参数传递 token
- 修复上传会话过期判断,使用 last_activity 避免活跃上传被清理
- 延迟启动后台清理任务,避免 asyncio 事件循环问题
- 统一由后端计算 chunk_size 和 total_chunks,避免前后端不一致
- 更新 generate_unique_filename 文档注释与实际行为一致
- 更新测试用例以验证 origin 字段
修复问题:
- 浏览器下载时显示"需要授权"
- 大文件上传可能因会话过期失败
- __init__ 中 asyncio.create_task 可能失败
* style: format code
2025-12-29 12:30:59 +08:00
RC-CHN
aa38fe776a
feat: supports data backup ( #4105 )
...
* feat: 添加数据迁移功能
* test: 添加迁移相关测试
* feat: 备份插件及相关持久化目录
* fix: 修复版本号比较逻辑,添加相关测试
* fix: 清洗文件名,添加相关测试
* fix: 修复安全文件名测试用例断言
* refactor: 优化代码,为备份模块提取公用常量
* feat: 修改备份版本校验逻辑,允许强制小版本间导入
* fix: 修复备份创建时间读取,修复备份相关i18n
* refactor(backup): 使用 astrbot_path 统一管理备份目录路径
* fix(backup): 清理备份模块中未使用的导入
* refactor(backup): 统一备份路径与参数并移除未用附件目录
- 通过 astrbot_path 动态获取备份/知识库/数据相关路径
- 移除 exporter/importer 未使用的 attachments_dir/data_root 传参
- 更新备份路由与测试用例的构造参数
* fix(dashboard): alias mermaid to dist entry for Vite prebundle
* fix(backup): 放行start-time接口到白名单以处理备份导入后jwt token变化导致无法自动刷新webui的问题
* chore(backup): 统一配置路径以使用动态数据目录
* refactor(backup): 使用 VersionComparator 替代重复的版本比较函数
* style(backup test): format code
---------
Co-authored-by: Soulter <905617992@qq.com >
2025-12-26 15:47:50 +08:00
Oscar Shaw
80b89fd2ea
feat: implements command management and improve webui feature structure ( #3904 )
...
move mcp management to plugin managemanet page
* feat: 新增命令配置数据库模型
* feat: 实现核心命令管理系统
* feat: 将命令管理集成到 Star 框架
* feat: 新增命令管理后台 API
* feat: 新增命令管理界面页面
* feat: 新增命令管理国际化支持
* test: 新增命令管理相关测试
* refactor(command): 移除指令重命名时的别名功能
* fix(command): 修正指令冲突检测逻辑
* fix(command): 排除已禁用指令的冲突检测
- 只有 `effective_command` 存在且 `enabled` 为 `True` 的指令才会被纳入冲突检测范围。
* feat(command): 优化指令冲突显示与提示
- 【功能】新增指令冲突警告提示,当检测到冲突时显示详细信息及解决方案。
- 【优化】调整指令列表排序逻辑,将冲突指令优先显示并分组。
- 【样式】为冲突指令行添加专属高亮样式,提升视觉识别度。
- 【国际化】更新英文和中文多语言文件,增加指令冲突警告相关的翻译文本。
* chore(command-page): 禁用命令表格部分列的排序功能
* style(command-page): 调整命令页面表格样式和图标大小
* refactor(command): 优化指令页面布局并更新冲突警告
- 【布局优化】重新组织指令管理页面布局,将筛选器移至顶部独立行
- 【信息展示】将搜索栏与总指令数、已禁用指令数合并显示,提升页面空间利用率
- 【视觉更新】更新指令冲突警告样式
* style: UI 细节
* refactor(command): 调整指令管理中的成员权限显示与筛选
- 更新指令筛选逻辑,当选择“所有人”权限筛选时,将同时包含 `everyone` 和 `member` 权限的指令。
* feat(command-management): 新增指令层级管理与UI展示
- 【后端】
- `CommandDescriptor` 新增 `parent_group_handler` 和 `sub_commands` 字段,支持指令层级结构定义。
- `list_commands` 函数重构,实现指令的层级收集与构建,将子指令正确挂载到其父指令组下。
- 新增 `_collect_all_descriptors` 和 `_find_parent_group_handler` 辅助函数,用于全面收集指令并定位父指令组。
- `_build_descriptor` 优化指令类型判断逻辑,明确区分普通指令、指令组和子指令。
- `_descriptor_to_dict` 递归处理子指令,确保 API 返回完整的指令层级数据。
- 【前端】
- 指令管理页面 (`CommandPage.vue`) 增加指令类型筛选器,并支持指令组的展开/折叠功能。
- 表格展示优化,为指令组和子指令添加不同的样式和缩进,提升层级结构的视觉可读性。
- 指令详情对话框新增指令类型、所属指令组和子指令列表的展示。
- 更新 `CommandItem` 接口,以适配后端提供的层级数据结构。
- 【i18n】
- 新增指令类型(指令、指令组、子指令)的国际化文本。
- 更新指令管理相关 UI 文本,包括表格头部、详情对话框字段和筛选器选项。
* style(command): 优化指令组子指令数量显示UI
* refactor(command): 修改指令列表排序逻辑
* style(command-page): 优化命令列表UI
* feat(command): 添加系统插件指令过滤与冲突处理
* refactor(command): 更新指令数展示逻辑
* style(command): 更新空状态描述
* feat(extension): 添加插件指令冲突检测与提示
- 在插件安装或启用后,自动检测并提示指令冲突。
- 当检测到指令冲突时,显示警告对话框,告知用户冲突数量及可能的影响。
* refactor(command): 移除指令表格内部加载指示器
* style(extension): 文案修改
* refactor(command): 模块化指令管理面板前端代码
* refactor(commandPanel): 重命名指令模块目录为 commandPanel
* style(commandPanel): 微调指令面板UI
* fix(command): 确保新命令配置的事务提交
* fix(sidebar): 补全新增侧边栏项后的侧边栏位追加逻辑
* refactor(commands): 重构/help指令以动态显示实际命令并补充部分命令描述
* style(builtin_commands): 补充命令描述
* refactor(commandPanel): 移除未使用的 filterState 常量
* perf(dashboard): 删除多余的CommandPage.vue文件(已被模块化引用)
* perf(command): 优化命令冲突计数逻辑
* perf(command): 优化指令管理辅助函数和配置绑定逻辑
* perf(db): 优化重构command相关数据库操作
* refactor(sidebar): 提取侧边栏项目解析逻辑到工具函数复用
* refactor: move mcp and command page to extension page
* refactor: remove unused imports in component panel
* fix: update terminology for handler management in extension localization
---------
Co-authored-by: Soulter <905617992@qq.com >
2025-12-16 20:24:57 +08:00
Dt8333
f624971613
chore: fix bunches of type checking errors ( #3213 )
...
* chore(core.utils): 🚨 修正错误Lint
* chore(core.provider): 🚨 修复基类错误Lint
* chore(core.utils): 补全session_get()的重载
* chore(core.provider): 🚨 修正实现错误Lint
* chore(core.platform): 🚨 修正platform基类和webchat的错误Lint
* chore(core.platform): 修正错误实现Lint
* fix(core.provider): 修复循环调用和错误assert
* chore(core.platform): 修复部分实现Lint
* chore(core.provider): 补充Dify.text_chat_stream的参数类型
* chore(core.pipeline): 🚨 修复错误Lint
* fix(core.slack): 补充遗漏导入
* chore(core.utils): 修复错误的session_get声明
* chore(core.platform): 移除Lark adapter import中的wildcard
* chore(core.db): 修复声明和部分逻辑
* chore(core.db): 添加typings,使faiss参数能被正确识别。
* chore(core): 修复声明
* chore(core): 修改声明
* chore: 补充faiss声明
* chore(dashboard): 修改实现,减少报错
* chore(package): 修改部分声明与实现,减少报错
* chore(core): 添加Handler的overload,以去除部分assert同时通过类型检查
* chore(core.pipeline): 修改Pipeline Scheduler的execute,将判断属性改为判断类型,通过静态类型检查
* chore(core.config): 添加类型标注,通过类型检查
* chore(core.message): 为File._download_file添加检查,通过类型检查
* fix: 将断言改为条件判断以实现优雅关闭的容错性
* refactor: 移除 discord 客户端中的 assert,改用 if None 判断并抛出异常
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* fix: DiscordPlatformAdapter 对 self.client.user 为 None 做日志并返回,移除断言
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* fix: 增强 Lark 相关空值/异常检查并完善日志输出
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* refactor: 将断言替换为条件检查并加入日志与错误处理
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* chore: 移除LLM生成的无用注释
* refactor: 使用 File.get_file 替换下载逻辑并移除 assert,提供默认 filename
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* fix: Slack Socket 未初始化抛出运行时异常,图片 URL 判空改为非空判断
* refactor: 将 WeChatPadProAdapter 的断言改为空值判断并添加日志
* refactor: 使用 isinstance 替代断言实现类型判断,便于静态检查
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* fix: 去除cast,直接使用字段与字典访问,修正端口解析
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* refactor: 使用 match-case 重构 ProviderManager 加载并通过类型检查抛出 TypeError
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* fix: group_name_display 时若 group 对象为空则记录错误并返回
* fix: 将 _get_current_persona_id 的 assert 替换成 if guard 并返回 None
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* fix: 优化插件目录存在性检查及图片URL非空验证,更新JSON排序配置
* fix: 将 datetime_str 的 assert 替换为显式检查并抛出异常
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* refactor: 移除 cast,改为运行时检查并在找不到调度器时跳过
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* refactor: 移除 cast,改用 isinstance 检查 FaissVecDB 并警告
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* fix: 删除 typing.cast 导入,并在获取文件绝对路径前校验 file_
* refactor: 移除 typing.cast,简化内容安全检查调用
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* refactor: 将 PlatformMetadata.id 设为必填并在注册时传入 id,移除 cast
* refactor: 移除 cast,改用 HasInitialize 与 isinstance 进行初始化
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* fix: 为 ProviderManager.initialize 增加ID类型判断,避免 None 导致 get 失败
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* refactor: 为 OTTSProvider 与 AzureNativeProvider 引入 _client 与 client 属性改进上下文管理
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* fix: 为 Whisper 自托管源添加模型未初始化校验并直接调用 transcribe
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* refactor: 移除未使用的 cast 导入并简化 platform_name 赋值
* refactor: 引入 cast 并对 id 使用 cast(str, ...) 提升类型安全
* fix: 将 _id_to_sid 返回改为 str,空值返回空串;对 id 与 message_id 使用 cast
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* refactor: 重构 Discord 处理逻辑:强制 类型转换、优先斜杠指令并优化提及判断
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* fix: 统一对 id 获取执行 cast,并在微信消息解析失败时抛错
* Revert "fix: 去除cast,直接使用字段与字典访问,修正端口解析"
This reverts commit 1cbfdf9d1b .
* fix: 百炼 Rerank 会话关闭时返回空结果;初始化 request.prompt 避免空值拼接
* fix: 统一处理搜索结果链接为字符串,新增 _get_url 助手并适配 Bing/Sogo
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
* refactor: 调整 call_handler 泛型、Discord 通道注解及 FishAudioTTS API 请求类型
* refactor: 使用 col(...) 替代列引用并对结果进行 CursorResult 强转
* chore: ruff format
---------
Co-authored-by: aider (openai/gemini-3-pro-high) <aider@aider.chat >
Co-authored-by: Soulter <905617992@qq.com >
2025-12-09 14:13:47 +08:00
Soulter
5714944eef
feat: unified platform webhook url ( #3889 )
...
* feat: unified platform webhook url
* chore: ruff format
* fix: 修复 Telegram 语音使用 Whisper API 报错 (#3884 )
* Update whisper_api_source.py
* chore: ruff format
---------
Co-authored-by: Soulter <905617992@qq.com >
* Update astrbot/dashboard/routes/platform.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_adapter.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* chore: ruff format
* fix: update webhook dialog descriptions for clarity in English and Chinese locales
* fix: update webhook URL paths to include '/api' prefix for consistency across the application
---------
Co-authored-by: 易推倒白毛 <zhaixingbi@gmail.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-12-03 15:44:52 +08:00
Copilot
e190bbeeed
Optimize string concatenation in loops: replace += with list.join() ( #3246 )
...
* Initial plan
* Fix string concatenation performance issues in loops
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Address code review feedback: Fix plugin list logic and add comment
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Improve comment clarity for at_parts accumulation
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
2025-11-02 13:00:59 +08:00
Copilot
c8e34ff26f
[WIP] Translate mixed English comments to Chinese ( #3256 )
...
* Initial plan
* Changes before error encountered
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
2025-11-02 12:52:46 +08:00
LIghtJUNction
0b7fc29ac4
style: add ruff lint module of isort and pyupgrade, and some ruff check fix ( #3214 )
...
Co-authored-by: Dt8333 <25431943+Dt8333@users.noreply.github.com >
Co-authored-by: Soulter <905617992@qq.com >
2025-11-01 13:26:19 +08:00
Soulter
51246ea31b
fix: apply configuration option to enable/disable WebUI in AstrBotDashboard ( #3152 )
2025-10-26 17:29:04 +08:00
lxfight
99cf0a1522
feat: 添加知识库 Dashboard API 路由
...
- 实现知识库管理 API(创建、删除、列表、更新)
- 实现文档管理 API(上传、删除、列表、分块信息)
- 实现知识库检索测试 API(支持调试和验证)
- 实现会话配置 API(绑定/解绑知识库、配置检索参数)
- 实现全局配置 API(启用/禁用、模型选择、检索参数)
- 在 Dashboard 服务器中注册知识库路由
2025-10-19 18:41:54 +08:00
shangxue
d24902c66d
feat: 添加 --webui-dir 启动参数以支持指定 WebUI 构建文件目录 ( #2680 )
...
* Update main.py
* Update server.py
* Update main.py
* Update main.py
* Update main.py
* Update initial_loader.py
* Update server.py
* Update main.py
* chore: update webui_dir type hint and improve dashboard file check logic
---------
Co-authored-by: Soulter <905617992@qq.com >
2025-09-12 15:15:29 +08:00
RC-CHN
b31b520c7c
feat: 支持管理 T2I 模版 ( #2638 )
...
* feat:添加t2i模板管理后端api,移除config.py中重复功能
* feat: 添加T2I模板管理功能前端,支持模板的创建、应用和重置
* refactor: 修复错误的保存逻辑,将t2i注册时打印路由信息部分移到基类实现
* remove:移除了路由注册时的打印
* chore: format code
* fix: update input variant from solo to outlined for better UI consistency
---------
Co-authored-by: Soulter <905617992@qq.com >
2025-09-07 00:14:28 +08:00
Soulter
b1e3018b6b
Improve: 引入全新的人格管理模式以及重构函数工具管理器 ( #2305 )
...
* feat: add persona management
* refactor: 重构函数工具管理器,引入 ToolSet,并让 Persona 支持绑定 Tools
* feat: 更新 Persona 工具选择逻辑,支持全选和指定工具的切换
* feat: 更新 BaseDatabase 中的 persona 方法返回类型,支持返回 None
2025-08-04 00:56:26 +08:00
Raven95676
4dace7c5d8
chore: format code
2025-07-11 11:23:53 +08:00
advent259141
f536f24833
astrbot/core/pipeline/process_stage/method/llm_request.py
...
astrbot/core/pipeline/result_decorate/stage.py
astrbot/core/star/session_llm_manager.py
astrbot/core/star/session_tts_manager.py
astrbot/dashboard/routes/session_management.py
astrbot/dashboard/server.py
dashboard/src/views/SessionManagementPage.vue
packages/astrbot/main.py
2025-06-27 17:08:05 +08:00
Gao Jinzhe
e24225c828
Merge branch 'master' into master
2025-06-23 15:21:08 +08:00
Soulter
d03e9fb90a
fix: jwt secret
2025-06-23 12:36:11 +08:00
Gao Jinzhe
dae745d925
Update server.py
2025-06-16 10:03:18 +08:00
Soulter
6fecfd1a0e
Merge pull request #1800 from AstrBotDevs/feat-weixinkefu-record
...
feat: 微信客服支持语音的收发
2025-06-13 03:52:15 +08:00
Soulter
900f14d37c
🐛 fix: fixed a potential vulnerability in /api/chat/get_file endpoint.
...
I have fixed a potential vulnerability in the `/api/chat/get_file` endpoint that could allow unauthorized access to files by ensuring the request has a jwt token.
2025-05-29 19:17:31 +08:00
Soulter
43a45f18ce
perf: knowledgebase delete
2025-05-23 15:50:10 +08:00
Soulter
ad51381063
perf: 动态路由注册
2025-05-23 15:18:16 +08:00
Soulter
10270b5595
feat: alkaid framework and supports to customize webapi endpoint
2025-05-17 15:38:51 +08:00
Soulter
42c7034fb2
🐛 fix: 修复路径
2025-05-11 18:17:06 +08:00
Soulter
060c7e0145
🐛 fix: 修复 CLI 模式下路径问题导致 WebUI 和 MCP Server 无法加载的问题
2025-05-11 18:09:36 +08:00
渡鸦95676
e1a20d3c22
Merge branch 'master' into feature/cli
2025-05-09 20:22:33 +08:00
Soulter
790b924e57
refactor: QQ 采用 http 回调的方式上报文件消息段中的文件信息。
...
fix: 修复 Lagrange 下合并转发消息失败的问题
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-05-09 03:47:19 -04:00
Raven95676
ccb1f87a20
feat: cli支持插件自动热重载;cli支持插件管理;cli支持指定Dashboard端口
2025-05-06 17:56:56 +08:00
Soulter
125fc3a622
✨ feat: 支持 WebUI 对话管理
2025-03-25 19:44:46 +08:00
Soulter
046f5e645e
✨ feat: 完善 MCP 管理和实现 WebUI MCP 相关的页面
2025-03-23 16:33:44 +08:00
Soulter
c610719a44
✨ feat: 为各平台适配器支持优雅关闭
2025-03-22 19:02:49 +08:00
Soulter
82dc37de50
style: format codes
2025-03-18 22:21:47 +08:00
Soulter
b6fa7f62dc
chore: 添加安全提示信息
2025-03-18 22:18:01 +08:00
Soulter
f9e0a95c5e
chore: 默认地址改回 0.0.0.0
2025-03-18 22:15:22 +08:00
pre-commit-ci[bot]
9d87009216
🎈 auto fixes by pre-commit hooks
2025-03-15 03:16:51 +00:00
Soulter
35468233f8
🎈 perf: supports for customizing webui host, wecom webhook server host, qq official webhook server host #821
2025-03-15 01:21:36 +08:00
Soulter
cf08e52a92
style: cleanup
2025-03-06 23:52:15 +08:00
Soulter
c15b13a107
Merge branch 'master' into master
2025-03-03 17:11:49 +08:00
Soulter
bc06acdd25
chore: cleanup
2025-03-03 17:10:47 +08:00
Soulter
5252870733
style: cleanup
2025-03-03 15:17:42 +08:00
Soulter
49bba9bf98
style: format codes
2025-03-03 13:30:55 +08:00
inori-333
f4d12e4e5e
将Flask初始化时允许的最大文件体积设置为128MB
2025-03-03 13:19:17 +08:00
崔永亮
837111b17e
perf: 填加具体占用进程显示
2025-02-22 16:23:50 +08:00
崔永亮
a6b363b433
🎈 perf: 启动时检查端口占用
2025-02-22 16:10:46 +08:00
Soulter
45f380b1f6
✨ feat: add configuable port for dashboard and improve the method of getting local ip address
2025-02-11 23:00:24 +08:00
Soulter
d0fe59631c
perf: 优化更新项目时重启可能会导致Address already in use的问题
2025-01-22 20:57:15 +08:00
Soulter
a20446aeb9
🎉 chore: bump to v3.4.6
2025-01-13 02:17:23 +08:00
Soulter
97b58965f2
feat: webchat可显示Provider状态
2025-01-11 19:31:56 +08:00
Soulter
480dffb51b
feat: 初步实现 webchat 页面
2025-01-10 21:48:15 +08:00
Soulter
d787a28c40
feat: 支持使用 /dashboard update 更新管理面板
2025-01-09 00:59:28 +08:00