Skip to content

[全库] 重构:Agent工具接口整合、Trading仓储拆分、RAG PDF处理模块化 - #28

Merged
MayueCif merged 1 commit into
mainfrom
feature/refactor-agents-trading-rag
Aug 31, 2026
Merged

MayueCif merged 1 commit into
mainfrom
feature/refactor-agents-trading-rag

Conversation

@MayueCif

Copy link
Copy Markdown
Member

概述

本轮重构覆盖 Agents 契约层、App.Services 业务层与 RAG 层,目标为收敛重复抽象、拆分过大的文件,并保持 DI 与分层结构不变。

主要变更

Agents 工具接口整合

  • 删除市场前缀的细粒度接口(IShareBasicTools / ICryptoBasicTools / IShareFinancialTools / ICryptoMetricsTools / ICryptoSentimentTools 等),统一收敛到 IBasicDataToolsIFinancialToolsISentimentToolsITechnicalDataTools 等通用抽象,市场差异由 Keyed Service 实现承担
  • 删除零调用的 AssetQuoteInfo 模型与 Applications/MarketServiceRegistry

Trading 仓储拆分

  • 将原集中式交易存储拆分为 TradingRepositoryBase + 独立仓储:PositionRepositoryTradeRecordRepositoryTradingStrategyRepositoryAccountSnapshotRepositoryDailyStatsRepositoryRiskConfigRepository
  • 新增 TradingSchemaInitializerTradingEnvironmentKeys 统一建表与环境键管理
  • 新增 IRealtimeQuoteService 抽象及 CryptoRealtimeQuoteService / NoopRealtimeQuoteService 实现

RAG PDF 处理模块化

  • 将 PDF → Markdown 流水线拆分为职责单一的模块:PdfTextUtilityPdfHeadingDetectorPdfImageProcessorPdfTableExtractorPdfListFormatterPdfMarkdownPostProcessorPdfMarkdownModels
  • 新增 DocumentVectorizationService 到 App.Services

其他

  • SettingsPageViewModel 按职责拆分 partial(Documents / Models
  • 清理过期文档与计划文件,新增 docs/plan/alert-center-refactor-plan.md
  • 删除不再维护的 tests/Trading/TradeFailurePolicyTest.cs.vscode/tasks.json

影响

  • 纯重构,不改对外行为;依赖方向与 DI 注册入口不变
  • 建议合并前跑一次 dotnet build MarketAssistant.slnx -c Debug 验证

@MayueCif
MayueCif merged commit 8beb1a8 into main Aug 31, 2026
3 checks passed
@MayueCif
MayueCif deleted the feature/refactor-agents-trading-rag branch August 31, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant