Skip to content

feat(web): classify tool evidence renderers - #378

Open
seekskyworld wants to merge 2 commits into
openpi-dev:mainfrom
seekskyworld:feat/issue-345-tool-evidence-kinds
Open

feat(web): classify tool evidence renderers#378
seekskyworld wants to merge 2 commits into
openpi-dev:mainfrom
seekskyworld:feat/issue-345-tool-evidence-kinds

Conversation

@seekskyworld

Copy link
Copy Markdown

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 --check

Impact

  • User-visible behavior: no visual change unless a future stylesheet opts into the classes.
  • Model-visible context/tools: none.
  • Runtime/lifecycle: none.
  • Persisted config/data: none.
  • Compatibility/risk: unknown tools remain generic and safe.

Signed-off-by: seekskyworld <djh1813553759@gmail.com>
Signed-off-by: seekskyworld <djh1813553759@gmail.com>

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要改:关键词路由 + 叠了 #377 的全局 30s abort

这个 PR 的 commit 栈包含 #3772c6b75c)。共享 api() 的 30s abort 只该记在 #377 上,请先 rebase 掉。

自己的改动是未锚定的:

/(?:read|cat|file)/iu.test(toolName)  // 会命中 category、profile
/(?:test)/iu.test(toolName)

这是用标签猜渲染器,违反「不要做关键词路由 / 不要从标签推断」。现在只加了 CSS class,证据仍 escapeHtml,但合同已经破了。

请去掉这套 router,或改成宿主给出的明确 kind,不要猜 tool 名字。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants