feat(tui): /export writes the transcript to a file, p quotes a block into the prompt - #237
Merged
Max17190 merged 2 commits intoAug 27, 2026
Merged
Conversation
Max17190
marked this pull request as ready for review
August 27, 2026 03:53
Max17190
force-pushed
the
tui-transcript-escape-hatches
branch
from
August 27, 2026 03:55
0f21955 to
95be57f
Compare
Max17190
force-pushed
the
tui-transcript-escape-hatches
branch
2 times, most recently
from
August 27, 2026 05:19
b0b81cf to
dfe1ac9
Compare
…into the prompt The transcript lived only on screen: folded tool cards, an 80-line raw cap, and clipboard copy of one block at a time were the only ways out. /export [path] writes the whole conversation as readable markdown with every tool's full uncapped output as indented code (indentation, not a fence, so output containing backticks cannot break the document), and fold state never changes the file. In scrollback, p drops the selected block's source into the composer for quoting output back at the model without a clipboard round-trip.
Inserting at the composer cursor spliced the draft's suffix onto the quoted block (hello| world became hello, then quoted world on one line). Composer::append_block moves to the end and goes through the normal splice path, because rebuilding via text() would expand collapsed paste markers on the way.
Max17190
force-pushed
the
tui-transcript-escape-hatches
branch
from
August 27, 2026 08:01
dfe1ac9 to
1ec3db4
Compare
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.
Why
The transcript lives only on screen: folded cards, an 80-line raw cap, and one-block clipboard copy are the only ways out. A file-shaped escape hatch and a quote-into-prompt gesture are cheap and repeatedly asked for in comparable tools.
Summary
/export [path]writes the whole conversation as readable markdown, with every tool's full uncapped output as indented code (indentation, not a fence, so output containing backticks cannot break the document); fold state never changes the file. In scrollback,pdrops the selected block's source into the composer for quoting output back at the model without a clipboard round-trip.Test Plan
export_covers_the_full_output_regardless_of_fold_and_screen_caps(incl. past-the-cap line and fold invariance).slash_export_writes_the_transcript_file,p_in_scrollback_quotes_the_block_into_the_prompt.Greptile Summary
This change adds Markdown transcript export, scrollback-to-composer quoting, and collapsed handling for large pasted drafts. The earlier quote-suffix issue is resolved: the keyboard path now keeps
hello worldintact and appends quoted text on a new line. One blocking composer failure remains: editing a visible collapsed-paste marker can silently omit the original pasted content when the message is sent.Confidence Score: 4/5
The change is not safe to merge until collapsed paste markers no longer allow ordinary edits to silently discard the hidden pasted payload.
One verified non-security blocking failure remains in the draft composer.
Files Needing Attention: crates/tui/src/input.rs
What T-Rex did
Comments Outside Diff (2)
crates/tui/src/input.rs, line 288-289 (link)Large pastes keep their contents outside the visible draft and restore them only when this exact marker string is still present. Editing a single character of
[pasted #N: …]makes the lookup fail, so pressing Enter submits the altered marker while silently omitting the entire pasted payload. Preserve marker identity independently from its rendered text, expand the paste before allowing marker-internal edits, or prevent those edits with a clear warning.Artifacts
Focused paste-marker submission harness source
Observed output with intact paste marker
Observed output after editing one marker character
Prompt To Fix With AI
General comment
[pasted #1: 12 lines], while its bytes are stored separately. A normal one-character edit to that visible marker prevents exact matching, so Enter submits only the edited marker and omits all hidden pasted content without warning or recovery.expand_pastes()reconstructs payloads by exact marker-string lookup (text.find(&marker)). Any marker-internal edit makes the lookup fail.handle_key(Enter)then submitsself.text(), which contains the edited marker but no stored payload. The code documents this as intended atinput.rs:121-126, and the existingan_edited_marker_never_expandstest asserts it at lines1310-1320.Prompt To Fix All With AI
Reviews (4): Last reviewed commit: "fix(tui): the p quote lands at the end o..." | Re-trigger Greptile