Skip to content

docs(rfd): Add RFD D46 divergent display view for tool results - #736

Merged
JeanMertz merged 2 commits into
mainfrom
d46
Jun 3, 2026
Merged

JeanMertz merged 2 commits into
mainfrom
d46

Conversation

@JeanMertz

Copy link
Copy Markdown
Collaborator

Adds a draft RFD proposing a mechanism for local tools to author a separate display view of their result, distinct from the assistant view recorded into the conversation and replayed to the model.

The motivation is that today the user always sees a projection of the same bytes the assistant sees. Two concrete cases need divergence: fs_read_file line gutters (numbered for the assistant, clean fenced for the terminal) and terse-summary-vs-full-dump patterns.

The design introduces a third Action variant (RewriteResult) on jp_tool::Action. After a tool runs, JP invokes it once at turn time with the assistant view as input; the tool returns the display view, which is stored in tool-call event metadata and replayed from storage — mirroring the existing FormatArguments / rendered_arguments path. Divergence is opt-in via a default-off field on conversation::tool config, and scoped to local command tools only.

JeanMertz added 2 commits June 3, 2026 16:55
Adds a draft RFD proposing a mechanism for local tools to author a
separate display view of their result, distinct from the assistant view
recorded into the conversation and replayed to the model.

The motivation is that today the user always sees a projection of the
same bytes the assistant sees. Two concrete cases need divergence:
`fs_read_file` line gutters (numbered for the assistant, clean fenced
for the terminal) and terse-summary-vs-full-dump patterns.

The design introduces a third `Action` variant (`RewriteResult`) on
`jp_tool::Action`. After a tool runs, JP invokes it once at turn time
with the assistant view as input; the tool returns the display view,
which is stored in tool-call event metadata and replayed from storage —
mirroring the existing `FormatArguments` / `rendered_arguments` path.
Divergence is opt-in via a default-off field on `conversation::tool`
config, and scoped to local command tools only.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
@JeanMertz
JeanMertz merged commit 5172c55 into main Jun 3, 2026
15 checks passed
@JeanMertz
JeanMertz deleted the d46 branch June 3, 2026 15:07
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.

1 participant