feat: feishu_doc 智能截断 + read_blocks 按需读取 - #126
Conversation
- read action: 超过 2000 行自动截断,附带文档目录和 read_blocks 提示 (阈值与 Claude Code 的 Read 工具一致) - 新增 read_blocks action: 按 block_id 读取指定 block 及其子块内容, 支持逗号分隔多个 block_id - list_blocks 优化: 返回精简 tab 分隔目录 (block_id/type/preview), 替代原始 JSON dump,大幅降低 token 消耗 - 工具描述注入高效读取工作流指引,引导 agent 按需读取 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @lishuceo's task in 1m 22s —— View job PR Review: feishu_doc 智能截断 + read_blocks 按需读取
✅ Approved — Clean, well-designed PRThis is a solid PR. The core design principle — forcing truncation at the tool level rather than relying on the agent to be token-efficient — is pragmatic and effective. The code is clean, follows existing patterns, and has thorough test coverage. What's good
Minor observations (not blocking)
No bugs, security issues, or architectural concerns found. The test plan in the PR description is thorough and all cases are covered in the test file. |
feat: feishu_doc 智能截断 + read_blocks 按需读取
Summary
read_blocks获取详情(阈值与 Claude Code 的 Read 工具一致)read → list_blocks → read_blocks路径核心设计思路
不依赖 agent 主动省 token(自定义 MCP 工具没有后训练肌肉记忆),而是让工具本身强制截断,让高效路径成为唯一路径。
Test plan
🤖 Generated with Claude Code