zhaoyanchao
|
77651f089b
|
fix: resolve merge aftermath - fix config module conflict, update test assertions
|
2026-05-28 21:35:47 +08:00 |
zhaoyanchao
|
2380566626
|
重构main 方法
|
2026-05-28 20:42:38 +08:00 |
zhaoyanchao
|
00718b4c3e
|
refactor(main): extract tool_executor.rs — CliToolExecutor and convert_messages
- Created src/tool_executor.rs (218 lines) with CliToolExecutor struct+impl,
ToolExecutor trait impl, ToolSearchRequest/McpToolRequest/
ListMcpResourcesRequest/ReadMcpResourceRequest structs, convert_messages
- Removed ~100 lines from main.rs, added mod tool_executor + re-export
- Fixed missing Deserialize derives and pub(crate) field visibility
- All 214 tests pass
|
2026-05-26 22:01:07 +08:00 |
zhaoyanchao
|
c01ae72e30
|
refactor(main): extract api_client.rs — AnthropicRuntimeClient and API helpers
- Created src/api_client.rs (310 lines) with AnthropicRuntimeClient struct,
impl blocks, resolve_cli_auth_source, request_ends_with_tool_result
- Removed ~425 lines from main.rs, added mod api_client + re-export
- Removed redundant format_user_visible_api_error / format_context_window_blocked_error
(already live in render.rs as pub(crate))
- Removed debug println!("args:") that broke --compact output
- All 214 tests pass
|
2026-05-26 21:31:12 +08:00 |
zhaoyanchao
|
cf81b904b0
|
refactor(rusty-claude-cli): 拆分超大main.rs为职责单一的子模块
解决main.rs文件过大难以导航、维护与测试的问题,将原本13292行的单文件main.rs拆分为按职责划分的子模块,目前已完成constants.rs、model.rs、permission.rs、progress.rs的提取,符合项目单个文件≤2000行的约定。
新增本次重构的全套规范文档,包括拆分spec、设计方案与任务清单;更新openspec项目配置文件,明确重构规则;同时更新debug.sh,添加x86_64-unknown-linux-musl跨平台编译脚本。
本次重构为纯代码重组,不改变任何现有功能与用户交互逻辑。
|
2026-05-26 17:08:29 +08:00 |