feat(web): classify tool evidence renderers - #378
Open
seekskyworld wants to merge 2 commits into
Open
Conversation
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
tt-a1i
requested changes
Sep 4, 2026
tt-a1i
left a comment
Collaborator
There was a problem hiding this comment.
需要改:关键词路由 + 叠了 #377 的全局 30s abort
这个 PR 的 commit 栈包含 #377(2c6b75c)。共享 api() 的 30s abort 只该记在 #377 上,请先 rebase 掉。
自己的改动是未锚定的:
/(?:read|cat|file)/iu.test(toolName) // 会命中 category、profile
/(?:test)/iu.test(toolName)这是用标签猜渲染器,违反「不要做关键词路由 / 不要从标签推断」。现在只加了 CSS class,证据仍 escapeHtml,但合同已经破了。
请去掉这套 router,或改成宿主给出的明确 kind,不要猜 tool 名字。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Adds the renderer-input slice of #345. Tool results were rendered through one undifferentiated CSS/DOM path, making specialized file, diff, test, and terminal renderers difficult to add safely.
Value
The browser now receives stable semantic classes while preserving the existing bounded raw evidence fallback.
Approach
Classify known tool-name families into file, diff, test, terminal, or generic kinds at render time. No content inference, execution status inference, or raw evidence mutation is introduced.
Validation
git diff --checkImpact