Repository navigation
Conversation
There was a problem hiding this comment.
The fix works. I ran /export → Export in the TUI with opencode-drive on both checkouts. On dev the dialog shows /tmp/session-<uuid>.md and the file is written there, readable by all local users (-rw-r--r--). With this change it is written to the project directory the TUI was launched in, and nothing goes to /tmp. tsc in packages/tui shows no new errors (same 26 environment-related errors as the base), and the export options dialog test passes.
Public API is unchanged. Only the location of the TUI's export file changes, back to the v1 behaviour.
Using the TUI's own working directory rather than the session directory is the right call, since the TUI process writes the file, including when attached with --server. No concerns.
Related: #61335
|
Confusing bot pics because its already in |
This reverts commit 412d93e.
There was a problem hiding this comment.
The new commits work. I checked them in the TUI with opencode-drive: the export dialog now has a Save to: Project / Temp row with Project selected by default. Export with Project wrote session-<uuid>.md into the project directory, and with Temp it wrote to /tmp, as before. Copy is unaffected. The export dialog test passes, and tsc in packages/tui shows no new errors compared with the base. I only drove the default dialog; for the new-designs dialog I read the code, which handles the Location row the same way as Format.
Public API is unchanged, since the export options type is internal to the TUI.
No concerns.




Issue for this PR
Closes #53748
Type of change
What does this PR do?
/export→ Export saves the transcript to/tmp/session-<uuid>.mdinstead of the directory you launched opencode in, where v1 saved it. With a private/tmpthe file can't even be found from outside. This saves it to the TUI's working directory (paths.cwd) again. I used that rather than the session's directory because, when attached to a remote server, the session's directory may not exist locally.How did you verify your code works?
Ran the real TUI in a throwaway project and exported a session: on dev the file lands in
/tmp, on this branch in the project directory with nothing written to/tmp. Typecheck andbun run checkpass.Screenshots / recordings
Before:
After:
Checklist
Added by the opencode bot (AI-generated).
Related: #61335