Commit Graph
453 Commits
Author SHA1 Message Date
SXP-Simon 0e3778ff55 fix: _get_orchestrator 使用 platform_id (如 "lulouch") 来创建适配器,但应该使用 platform_name (如 "discord") 来确定适配器类型 2026-02-08 19:48:12 +08:00
SXP-Simon df28aa1076 fix: 修复 Discord 适配器客户端访问问题
问题:self.bot 是 DiscordPlatformAdapter 对象,没有 get_channel 方法。

修复:

添加 _get_discord_client() 辅助方法来正确获取 Discord 客户端(通过 DiscordPlatformAdapter.client)
将所有方法中的 self.bot.xxx 替换为 self._discord_client.xxx
2026-02-08 19:44:16 +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 d56f2e0dbc feat: 添加 raw_message 和 user_id 字段以增强消息兼容性 2026-02-08 19:05:00 +08:00
SXP-Simon 0d34a9df3a feat: 添加发送者字段填充,确保向后兼容旧分析器 2026-02-08 19:04:51 +08:00
SXP-Simon 46356d1c19 feat: 添加分析编排器和日志过滤器,优化群聊分析功能 2026-02-08 18:55:26 +08:00
SXP-Simon b4d50c2571 refactor: fully implement cross-platform support (UMO, adapter usage, OneBot compat format) 2026-02-08 18:38:26 +08:00
SXP-Simon 310860708d feat: 优化消息获取逻辑,支持通过适配器获取群聊消息并兼容旧逻辑 2026-02-08 18:36:15 +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 5a4418654e fix: robust metadata retrieval in BotManager to support Discord platform 2026-02-08 17:59:48 +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 5a8f41e081 feat: 优化 BotManager 中平台名称检测逻辑,增强对平台元数据的支持 2026-02-08 17:24:26 +08:00
SXP-Simon c8f98618e8 fix: 自动修复配置格式以支持旧版本字符串配置 2026-02-08 17:07:35 +08:00
SXP-Simon 25391380b5 feat: enhance BotManager to support lazy loading of platform adapters 2026-02-08 17:07:29 +08:00
SXP-Simon b8c1481ec1 fix: solve race condition in BotManager initialization for Discord 2026-02-08 16:55:28 +08:00
SXP-Simon 4a5f9ff4fb feat: implement DiscordAdapter with py-cord integration 2026-02-08 16:47:01 +08:00
SXP-Simon a2adfe6561 docs: add platform integration guide and unit tests 2026-02-08 16:24:08 +08:00
SXP-Simon 8e09a9e1cf feat: add DiscordAdapter skeleton and register in factory 2026-02-08 16:23:57 +08:00
SXP-Simon e0d81ec5c5 feat: add convert_to_raw_format to PlatformAdapter and update OneBotAdapter 2026-02-08 16:23:41 +08:00
SXP-Simon e8833be891 refactor: translate comments to Chinese and fix hardcoded OneBot format 2026-02-08 16:23:32 +08:00
SXP-Simon 8960484bc9 docs: 更新 DDD 实施状态文档至 Phase 2 完成 (100%)
- 更新版本至 v2.1,状态更新为 Phase 2 完成 (100%)
- 添加新的领域分析器服务到架构文档
- 更新下一步计划,标记已完成的任务
- 添加 Docker 容器内验证记录
2026-02-08 15:14:22 +08:00
SXP-Simon 39cc318d9b feat: 完善 DDD 架构 - 添加领域分析器服务适配层
- 添加 src/__init__.py 作为源码包入口
- 添加 domain/services 分析器适配层:
  - topic_analyzer.py: 话题分析领域服务
  - user_title_analyzer.py: 用户称号分析领域服务
  - golden_quote_analyzer.py: 金句分析领域服务
- 更新 domain/entities/__init__.py 导出更多实体类
- 更新 shared/constants.py 添加枚举类 (Platform, TaskStatus, ContentType, ReportFormat)
- 所有新代码使用中文注释
2026-02-08 15:12:52 +08:00
SXP-Simon 39e5d6169d chore: 注释 2026-02-08 15:06:33 +08:00
SXP-Simon cbc98f8cfd docs: update DDD implementation status to Phase 2 complete (~90%) 2026-02-08 14:43:10 +08:00
SXP-Simon 7ef58f9d53 feat: complete DDD Phase 2 - add domain services, infrastructure layers, and shared components
- domain/value_objects: Add Topic, UserTitle, GoldenQuote, Statistics value objects
- domain/services: Add StatisticsCalculator, ReportGenerator domain services
- domain/exceptions: Add comprehensive domain exception hierarchy
- infrastructure/persistence: Add HistoryRepository for data storage
- infrastructure/llm: Add LLMClient wrapper for AstrBot providers
- infrastructure/config: Add ConfigManager for centralized configuration
- infrastructure/resilience: Add CircuitBreaker, RateLimiter, retry utilities
- application: Add SchedulingService, ReportingService application services
- shared: Add constants and TraceContext for request tracing

All imports verified in Docker container.
2026-02-08 14:39:19 +08:00
SXP-Simon 8f1878356d docs: update DDD implementation status to Phase 1 complete
- Added BotManager integration section (2.4)
- Updated git commit history
- Marked Phase 1 as complete
- Updated next steps
2026-02-08 14:25:05 +08:00
SXP-Simon 62a91a914a refactor: integrate PlatformAdapterFactory into BotManager
- BotManager now creates PlatformAdapter alongside bot instances
- Added get_adapter(), has_adapter(), can_analyze() methods for DDD access
- Added _detect_platform_name() for automatic platform detection
- Fixed incorrect relative imports in message_handler.py and helpers.py
- Updated get_status_info() to include adapter information
2026-02-08 14:22:48 +08:00
SXP-Simon 59ab291d53 chore: simplify .gitignore with glob pattern for __pycache__ 2026-02-08 14:16:08 +08:00
SXP-Simon 8d5d95ac5a docs: add DDD implementation status and architecture decisions
- Document ADR-001: progressive integration vs full refactor
- Record implemented layers and their status
- Note differences from original design documents
- Include verification status and usage guide
2026-02-08 14:14:50 +08:00
SXP-Simon c1d3bf5ece feat: add DDD architecture layers (domain, infrastructure, application)
- Domain layer: UnifiedMessage, PlatformCapabilities, repository interfaces
- Infrastructure layer: PlatformAdapter base, OneBotAdapter, factory
- Application layer: AnalysisOrchestrator, MessageConverter

This provides cross-platform abstraction for group analysis plugin.
2026-02-08 14:13:09 +08:00
SXP-Simon a3c6ea737a docs: code structure for improved readability and scalability 2026-02-08 14:01:18 +08:00
SXP-Simon 9534d4ea68 feat: implement sub-daily history tracking for analysis results 2026-02-08 00:24:09 +08:00
SXP-Simon 19a6214f17 feat: Add documentation for log quick reference and viewing research. 2026-02-08 00:02:41 +08:00
SXP-Simon 4477c8b862 style: apply ruff linting and pyupgrade fixes 2026-02-07 23:58:41 +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 0c9c20f537 docs: remove legacy PDF guide from root 2026-02-07 23:51:04 +08:00
SXP-Simon 3b59321b11 test: add verification and Docker test suite 2026-02-07 23:50:13 +08:00
SXP-Simon 5ebe211791 docs: update documentation and project structure 2026-02-07 23:50:13 +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 b551abd2db refactor: update ConfigManager with provider selection logic 2026-02-07 23:49:33 +08:00
SXP-Simon 1c317b16df refactor: use AstrBot native APScheduler in AutoScheduler 2026-02-07 23:49:18 +08:00
SXP-Simon 5930cfd804 feat: extract ReportDispatcher for report delivery 2026-02-07 23:49:03 +08:00
SXP-Simon 7e0455c454 feat: extract MessageSender for multi-platform message handling 2026-02-07 23:49:03 +08:00
SXP-Simon 22dc0bf59f feat: add trace context and resilience utilities for LLM calls 2026-02-07 23:48:34 +08:00
SXP-Simon df4236baa9 fix(RetryManager): 'RetryManager' object has no attribute '_notify_failure' 2026-02-05 23:15:19 +08:00