当前状态:V4 tool row 通过
ToolCallBlocks渲染,聊天内联 diff 使用轻量高亮预览; 完整 Diff Viewer 仍保留完整 diff 渲染能力。
聊天区里的文件修改类 tool 之前只展示参数和原始输出,用户需要再点开 code viewer 才能看到实际 diff。
这次先做一个最小版本:
edit / patch 一类能生成 patch 预览的 tool入口在 packages/ui/src/ToolCallBlocks/renderers/edit.tsx 与
packages/ui/src/ToolCallBlocks/renderers/EditInlineDiffContent.tsx:
getToolCallCodePreview() 判断当前 tool 是否能生成 patch 预览opencode 这类 edit tool,优先解析 raw.content 里的标准 diff blockpatch 时,展开内容使用 HighlightedLightweightDiffPreview;不额外展示参数和原始 JSON 输出codeViewer 已能识别的 patch / before-after 结构input 的字符串 / command / path / prompt 派生,还没有覆盖更多工具专属字段@zcode/sharedtoolContent