Commit Graph
75 Commits
Author SHA1 Message Date
clown145 66f198d4f0 fix: 修复TG注册并发写覆盖并优化消息分页拉取 2026-02-12 15:41:07 +08:00
clown145 aa5752d179 fix: TG通过KV回退群列表并增加临时调试日志 2026-02-12 15:41:07 +08:00
clown145 926e0df095 fix: 统一test权限判定并支持TG话题父级匹配 2026-02-12 15:41:07 +08:00
clown145 bd46b932e6 fix: 对齐QQ逻辑并去重Telegram文本中的@ 2026-02-12 15:41:07 +08:00
clown145 ce65350d60 fix: 修复 Telegram 昵称解析与@消息入库 2026-02-12 15:41:07 +08:00
SXP-Simon 8401283314 style(pre-commit) 2026-02-11 13:33:43 +08:00
SXP-Simon 5969f9bad0 fix(_run_initialization): 确保无论是在“Bot 启动”还是“插件热重载”时任务都能准时挂载 2026-02-11 13:21:48 +08:00
SXP-Simon ced38e6a9e fix: 修复了导致增量分析报告发送失败的几个核心问题:
修复报告分发器初始化错误:
在 AutoScheduler 中,初始化 ReportDispatcher 时漏传了 report_generator,导致在尝试生成报告(图片或文本)时出现 'NoneType' object has no attribute 'generate_image_report' 错误。
已更新 AutoScheduler 的构造函数并正确传递 report_generator。
修复 LLM 分析器在增量模式下的数据结构错误:UserTitleAnalyzer 报错:在增量模式下,用户活动数据被简化存储,导致 UserTitleAnalyzer 找不到 'hours' 键(Error: 'hours')。
补全数据维度:更新了 AnalysisApplicationService 的增量数据转换逻辑,保留了完整的每小时活跃分布 (hours) 和回复数 (reply_count)。
统一字段名:增量模式下使用了 nickname 字段以匹配分析器的预期(之前被错误转为了 name)。
增强容错性:优化了 UserTitleAnalyzer 的逻辑,现在它能安全地处理 hours 缺失或旧版本数据 schema,不再会因为找不到键而崩溃。
修复增量数据合并逻辑:
更新了 IncrementalMergeService,现在它能正确合并多个批次中的每小时发言统计和回复数统计,确保最终生成的报告数据准确。
2026-02-11 12:54:02 +08:00
SXP-Simon 43c42722ec fix: 白名单使用 UMO 无法分析 2026-02-11 00:40:39 +08:00
SXP-Simon 2cd97a73b7 fix(debug): 增加每次增量分析完成后发送的配置,用于调试 2026-02-10 23:16:07 +08:00
SXP-Simon 9d4b925400 fix: 获取名称逻辑 2026-02-10 23:00:48 +08:00
SXP-Simon 83b82de2bb refactor(增量分析): 从按天存储改为滑动窗口批次架构
- IncrementalBatch: 独立批次实体,每次增量分析产生一个,按批次独立存储到KV
- IncrementalState: 聚合视图,不再持久化,报告时由merge_batches合并产生
- IncrementalStore: 批次索引+数据KV持久化,支持按时间窗口查询和过期清理
- IncrementalMergeService: 新增merge_batches方法,负责批次合并和话题/金句去重
- AnalysisApplicationService: 增量分析存独立批次,最终报告按窗口查询合并
- AutoScheduler: 报告发送后清理2×窗口外的过期批次
- main.py: /增量状态命令改为滑动窗口查询展示
- 消除天然日期隔离问题,24h图表展示完整数据
2026-02-10 18:15:46 +08:00
SXP-Simon 8d1cfb24e4 feat(增量分析): 接线增量组件到main.py并添加增量状态命令 2026-02-10 15:21:15 +08:00
SXP-Simon 64d768c972 feat: 利用 AstrBot context 尝试实现 telegram 接入 2026-02-09 21:56:31 +08:00
SXP-Simon f8412559ef fix: 分析器和消息处理 2026-02-09 14:15:43 +08:00
SXP-Simon 2005f0633f refactor(DDD): 整理架构 2026-02-09 12:47:43 +08:00
SXP-Simon 0b096351d5 fix(docs): 完善注释 2026-02-09 02:14:43 +08:00
SXP-Simon 80d74577e7 fix(pre-commit): style 2026-02-09 01:39:13 +08:00
SXP-Simon b8ea7adf5a feat: 使用 Adapter 进行规范抽象,优先使用 Adapter 接口,方便后期扩展 2026-02-08 23:18:08 +08:00
SXP-Simon cbfb1cc844 fix(AnalysisConfig): 创建编排器时没有正确配置 max_messages 2026-02-08 21:33:53 +08:00
SXP-Simon c3cc2fd1f4 fix: complete the migration of the group_list configuration to use AstrBot Unified Message Origins (UMOs).
Changes Implemented:
Configuration: group_list now supports UMOs (e.g., qq_123456:GroupMessage:123456) while maintaining backward compatibility for simple group IDs.
Logic: ConfigManager and AutoScheduler were updated to handle UMOs for permission checking and group fetching.
Commands: The /分析设置 command now uses the full UMO when enabling/disabling analysis for a group.
2026-02-08 20:19:07 +08:00
SXP-Simon 94fdc42abb fix: 报告生成器硬编码了 QQ 头像 API (qlogo.cn),导致 Discord 用户显示默认/错误的 QQ 头像。
修复:

修改 ReportGenerator,允许传入自定义的 avatar_getter 回调。
2026-02-08 20:02:46 +08:00
SXP-Simon bdcd876663 fix: 手动触发,编排器首先尝试从 event 直接提取 bot 客户端 2026-02-08 19:54:30 +08:00
SXP-Simon 0e3778ff55 fix: _get_orchestrator 使用 platform_id (如 "lulouch") 来创建适配器,但应该使用 platform_name (如 "discord") 来确定适配器类型 2026-02-08 19:48:12 +08:00
SXP-Simon e780e3cbe9 fix: 修复平台ID提取
问题:_get_platform_id_from_event 方法使用了错误的属性访问方式,导致 platform_id=None。

修复:改为使用正确的 AstrMessageEvent API
2026-02-08 19:41:39 +08:00
SXP-Simon 6f7b20d962 fix: 正确注册命令 2026-02-08 19:39:50 +08:00
SXP-Simon 38f0cb26df fix: 修复 main.py 文件结构损坏,支持跨平台命令 2026-02-08 19:27:42 +08:00
SXP-Simon e9eda2571e fix: 导入必要模块 2026-02-08 19:09:58 +08:00
SXP-Simon 46356d1c19 feat: 添加分析编排器和日志过滤器,优化群聊分析功能 2026-02-08 18:55:26 +08:00
SXP-Simon ce640e61f4 fix: resolve AttributeError by using context.get_config() to access plugin_set (仅测试,后期需要纠正) 2026-02-08 18:27:25 +08:00
SXP-Simon 00060eb0d4 fix: remove platform check and support generic event for Discord compatibility 2026-02-08 18:08:43 +08:00
SXP-Simon 7fc961df31 fix: use stacked decorators for command aliases to support Discord 2026-02-08 17:42:47 +08:00
SXP-Simon d24baa4261 feat: add English command aliases for Discord compatibility 2026-02-08 17:37:45 +08:00
SXP-Simon 9534d4ea68 feat: implement sub-daily history tracking for analysis results 2026-02-08 00:24:09 +08:00
SXP-Simon 031c91940e fix: resolve code duplication and on_platform_loaded signature in main.py 2026-02-07 23:54:34 +08:00
SXP-Simon 58c27f9136 feat: integrate with AstrBot lifecycle events and update config schema 2026-02-07 23:49:51 +08:00
SXP-Simon 2438ab5b98 fix(pdf): 迁移为 playwright 2026-01-20 20:26:20 +08:00
SXP-Simon e13907949c fix(群分析): 解决在 NTQQ 内核尝试上传图片并将其推送到腾讯服务器时,超过了预设的时间限制(通常是 120 毫秒或更久),导致连接断开。的 aiocqhttp.exceptions.ActionFailed 问题
如果手动命令 /群分析 发送图片失败(例如遇到你之前遇到的 Timeout 超时错误),插件现在会捕获此错误,而不会直接崩溃或无响应。自动触发重试 (Automatic Retry)一旦捕获到发送失败的错误,系统会立即将该任务添加到 RetryManager(重试管理器)中。Base64 备选方案 (Base64 Fallback)
RetryManager 会接管该任务,并改用我们刚刚实现的 Base64 方法重新发送图片。在原始 URL 方法失败的情况下,这种方式的成功率极高。
2026-01-18 00:52:19 +08:00
SXP-Simon 7e70a6532c [v4.6.2] 新增图片报告重试机制并优化调度稳定性 2026-01-17 23:54:39 +08:00
SXP-Simon e78c827857 feat(RetryManager): 新增图片报告重试机制并优化调度稳定性
新增重试管理器 (src/scheduler/retry.py):
实现基于内存的延迟队列与死信队列,支持指数退避 + 随机抖动 (Jitter) 重试策略。
增强容错性:处理渲染服务宕机、网络超时及 Bot API 逻辑错误 (如 retcode=1200)。
兼容性优化:使用 call_action 通用接口适配 OneBot v11。
生命周期管理:增加自动启动保护,防止任务丢失。
2026-01-17 23:39:17 +08:00
SXP-Simon 7450d76178 fix(pre-commit): code quality 2026-01-16 23:59:45 +08:00
SXP-Simon 5b72997a28 refactor: 全局变量重构,受保护成员访问修复,同步 I/O 操作异步化 2026-01-06 23:07:03 +08:00
clown145 5f8309f461 跑pre-commit 2026-01-03 01:24:51 +08:00
clown145 a52a9afa4f feat: 回退对群分析指令的更改 2026-01-03 01:24:51 +08:00
clown145 92142b4b9f feat: 优化查看模板的显示 2026-01-03 01:24:51 +08:00
clown145 094dbfe2ad feat: 优化查看模板信息显示 2026-01-03 01:24:51 +08:00
clown145 9fef747b46 feat: 添加查看模板指令 2026-01-03 01:24:51 +08:00
Helian Nuits 03c35f49d0 Fix(bot manager): _get_platform_id_for_group 是一个异步方法(async def),但在 main.py 中调用时忘记加 await (#54)
* fix(bot-manager): 正确处理实例获取

* fix(import); AiocqhttpAdapter 导入

* fix: 通过 meta 实现 aiocqhttp 判断

* fix(_get_platform_id_for_group): _get_platform_id_for_group 是一个异步方法(async def),但在 main.py 中调用时忘记加 await 了,导致它返回了一个协程对象而不是字符串 ID

* fix(pre-commit)
2025-11-25 23:37:13 +08:00
SXP-Simon 41f49ee6b3 fix(cr): pre-commit 2025-11-25 20:55:33 +08:00
SXP-Simon 150f6c37a9 feat(mutli-templates): 适配多套排版选择 2025-11-25 20:55:33 +08:00