Repository navigation
Conversation
A conversation's record lives in the history store, and until now the only way out of it was the screen. Keeping a transcript, sharing it with someone who was not in it, or filing it beside the work it produced all needed something this app had no button for. The export reads the conversation's durable history fresh, through the same readThreadMessages the transcript restores with, on a longer deadline: a mount must not stall behind a slow store, but an export is asked for deliberately, by a person waiting on a button. The transcript on screen is untouched; a turn still streaming when Export is pressed can be missing from the file, and pressing it again once the Bot has finished takes the record whole. The file is built from the transcript's own projection (toVisibleChatItems), so an export shows exactly what the conversation shows: tool calls paired with the results that answered them, every file a person attached, and malformed rows skipped rather than losing the file. Unreadable turns are counted at the head of the file rather than quietly absent. Results are fenced with a fence one backtick longer than any run the content holds, so a page of Markdown a tool read cannot close its own fence and pour itself into the document; long results are cut at a budget that keeps the file readable, with a line saying they were cut. The button sits in the conversation header beside the Bot's settings, with the same waiting state as every other control, and a refusal is one sentence under the header where the click happened, cleared by the next attempt. The file name is the conversation's name made safe for a download dialog: separators and control characters become spaces, and the name is capped rather than left to the platform.
Ayush7614
requested review from
MikeRyanDev,
davidmckayv,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 5, 2026 15:28
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
A person can export a conversation as a Markdown file, from a new download button in the conversation's header.
A conversation's record lives in the history store, and until now the only way out of it was the screen. Keeping a transcript, sharing it with someone who was not in it, or filing it beside the work it produced all needed something the app had no button for.
How it works:
readThreadMessagesthe transcript restores with, on a longer deadline (10s vs the mount's 1.5s): a mount must not stall behind a slow store, but an export is asked for deliberately, by a person waiting on a button. A turn still streaming when Export is pressed can be missing from the file; pressing it again once the Bot has finished takes the record whole. The transcript on screen is untouched.toVisibleChatItems), so an export shows exactly what the conversation shows: tool calls paired with the results that answered them, every file a person attached, malformed rows skipped rather than losing the file. An export that re-read the messages would be a second opinion about all of that, and the two would drift.> 2 turns in this conversation could not be read…) rather than quietly absent — the same rule the transcript's footer follows.Where it runs
Boundary and audit
isReadableMessage,isReadablePart,isReadableToolCall) rather than by any new trust.Changelog
A line added under
Unreleased.Proof
All run on this branch, on macOS:
The ten new tests cover: question and answer order, a tool call with its paired result, a call still in flight (no result section), attached files with names and image marking, the unreadable-turns note (singular and plural), an empty conversation, a result containing its own ``` fence (the fence around it grows), a result over budget saying it was cut, a malformed row skipped without losing the conversation, and file-name safety (path separators, control characters, whitespace collapse, empty fallback, length cap).