feat(desktop): export transcript as Markdown (copy + download)#3126
Open
HUQIANTAO wants to merge 1 commit into
Open
feat(desktop): export transcript as Markdown (copy + download)#3126HUQIANTAO wants to merge 1 commit into
HUQIANTAO wants to merge 1 commit into
Conversation
Many users paste Reasonix transcripts into GitHub issues, internal
wikis, or design docs when filing a bug or sharing an investigation.
There was no way to get a transcript out of the desktop app — the
data lives in the Webview's React state and the on-disk session
files are a bespoke format.
Add lib/exportSession.ts: a pure function that renders the items
array to a Markdown document. The shape matches what a reader
expects:
# <title>
- model: <ref>
- workspace: <cwd>
- started: <iso>
- ended: <iso>
- duration: 12m 34s
## User
...
## Assistant
...
### `tool_name`
```json
{ ...args }
```
**output**
```
...tool output...
```
**error** (if any)
```
...error body...
```
Sub-agent calls (parentId-bearing tool items) are rendered nested
under the parent task call. Todo panels and exit_plan_mode cards
are skipped — they were already shown live in the UI and the
plan-mode approval card itself, so re-emitting them would
duplicate. Notices are ephemeral. Compaction boundaries are
emitted as a blockquote with a collapsible summary <details>.
Two ways to use it from the topbar:
- Single click: copies the rendered Markdown to the clipboard
(the common case — paste into Slack/GitHub).
- Double click: triggers a Blob download named
reasonix-YYYY-MM-DD-HHMM.md. Works in the
Wails WebView (the OS save dialog surfaces
for the download).
A future SaveTextFile bridge binding can route to a native
SaveFileDialog without changing the rendering path.
dc98820 to
2308378
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.
Many users paste Reasonix transcripts into GitHub issues, internal wikis, or design docs. There was no way to get a transcript out of the desktop app.
Add
lib/exportSession.ts: a pure function that renders the items array to a Markdown document. Shape: title + metadata header, alternating '## User' / '## Assistant' sections, tool calls rendered as collapsible blocks, sub-agent calls nested under their parent, todo panels and exit_plan_mode cards skipped, compaction boundaries as blockquotes with collapsible summaries.Two ways to use it from the topbar: single click copies the rendered Markdown to the clipboard; double click triggers a Blob download named
reasonix-YYYY-MM-DD-HHMM.md.