feat: rich tool views — ToolInfo view union, server-computed diffs, panel renderers #148
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab!148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/146"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fills the #145 panel's detail page with per-tool-kind rendering, per the settled #146 design.
Stacked on #147 (issue #145's tool call panel): this branch contains
origin/afk/145merged in, since the panel is the render surface. Merge #147 first — this PR's diff then reduces to the #146 work (commits4779374+1eb4e66).Server
provider.ToolView— optional provider-neutral union onToolInfo(diff|command|write), produced by each provider's chat mapper;input/outputstay populated as the raw fallback. Flows through httpapi unchanged.internal/unidiff: dependency-free line-LCS unified diff (headerless@@hunks, 3 context lines, whole-file-hunk guard above 512KB/5000 lines). Diffs are computed server-side from Edit's exact old/new strings; the client ships no diff library.Edit/NotebookEdit→ diff,Write→ write,Bash→ command. codex:apply_patch→ diff (normalizePatchtranslates the V4A***envelope to---/+++file headers inline — multi-file patches render every file;Pathcarries the first),exec_command/shell→ command (bash -lc/sh -cwrappers unwrap to the script).DetailTruncateLimit(20KB) forview.textandoutput, with an explicit in-text… truncated (N KB total)marker — never a silent cut; a cut diff keeps a valid renderable head. Chip-facingtitle/inputkeep the 2000 cap.redactChatmasksView.Path/Text/Commandbeside the existing free-form fields.Web
view.kind, provider-blind: diff = path header + prefix-colored lines (+++/---/@@precede+/-— headers never color as content); write = all-added paint with prefix test short-circuited; command = unselectable$prompt + output below; no view = the raw input/output fallback, unchanged.status=error(a successful edit's "file updated" is noise; a failure's error text must surface). Command output always shows.Verification
go build ./...,go vet ./...,gofmt -lclean;go test ./...green except the pre-existinginternal/tmuxxintegration failures (real tmux unavailable in the sandbox — identical on the base branch).npm run build(tsc + vite) green, eslint clean, provider-neutrality guard green.Closes #146
🤖 Generated with Claude Code
https://claude.ai/code/session_01ULDG5tDsA35vVqzryfztsw