feat(web): classify tool evidence renderers - #378
Conversation
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
tt-a1i
left a comment
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 名字。
|
Reviewed against the React workbench on main while integrating #439 and #442. React already renders tool-specific icons using exact names and preserves bounded raw evidence. This PR only adds unconsumed classes to the removed app.js; its substring classifier also categorizes workflow_catalog as a file tool. We are retaining the current exact-name rendering rather than porting that classifier. The stacked #377 timeout contribution was preserved and credited through #439. Closing this superseded implementation while retaining the source discussion. |
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