Files
deepseek-harness/docs/rfc/rejected/simplification/2026-06-20-generic-tool-rendering.md
Tianyi Cui 605587e79c docs(rfc): classify RFCs by kind via path-encoded subdirectories
Add a second axis to every RFC — its class (feature, bug-fix,
simplification, architecture, process, testing) — encoded in the path
as docs/rfc/{lifecycle}/{class}/file.md. The folder is the label, so
the closed set is enforced by structure rather than a parsed field.

Two new doc-sync gates back it:
- verify-rfc-classification: every RFC sits in a valid class folder and
  the README index lists it under the matching lifecycle→class heading.
- verify-doc-refs: every docs/*.md path cited in a packages|examples TS
  comment resolves — closes a drift class verify-md-links can't see, and
  catches the four comment refs this reorg moved.

The README gains a Classification section explaining the taxonomy and
per-class index sub-sections. A self-referential process RFC records why
the scheme is path-encoded and gated.
2026-06-20 22:29:45 +08:00

2.6 KiB

RFC: Collapse tool-owned UI presentation

Status: rejected — tool-owned presentation should wait for more real tools before being generalized or deleted. Bash and ACP currently need the existing richer presentation path.

Problem

Tools can define presentCall() and presentResult() callbacks that return ToolCallPresentation, ToolResultPresentation, and optional ToolTerminal fields. The code itself flags the design as muddy: title, kind, raw input, content, terminal cwd, terminal output, exit code, and signal grew incrementally into a bag of optional fields. ACP then maintains pending call state to pair a result with the original args, creates replay-only presenters on session/load, and maps terminal subfields into Zed-specific _meta. dsh-tool-bash even parses exit status back out of rendered text because the pure replay-safe presenter no longer has the structured BashRunResult.

The real first-party use is bash presentation for ACP. That is too little evidence to freeze a cross-package UI presentation API.

Proposal

Remove tool-owned UI presentation callbacks for now. The canonical tool events already carry the tool name, raw argument string, result content, and error state. UIs render a generic tool card from those fields. Tool-specific rich rendering can return later as a tagged render-intent union after there are at least two real tools and two real consumers to validate the vocabulary.

As a smaller alternative, replace the current optional-field bag with one explicit union in a single PR; but if the goal is simplification, the stronger move is to delete the callbacks and keep the generic path.

Acceptance criteria

  • ToolDefinition drops presentCall and presentResult.
  • ToolCallPresentation, ToolResultPresentation, ToolTerminal, and ToolCallKind disappear unless a minimal generic UI type still needs one.
  • ACP no longer keeps presenter pending state or calls tool callbacks during live streaming/load replay.
  • dsh-tool-bash no longer parses rendered text to recover exit status for a UI pill.
  • Snapshot goldens show generic tool cards and text results.

What we give up

Bash loses its custom terminal-looking card and model-written description placement. The fallback remains reasonable: the command appears as tool input, and the output appears as text. Rich rendering should be designed when the product has enough UI/tool variety to justify a stable presentation contract.

This is the broad version of dropping ACP terminal metadata. If this RFC is accepted, that narrower RFC becomes unnecessary.