-
Notifications
You must be signed in to change notification settings - Fork 898
feat: export local and view exported & project sessions in web UI #466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
f24c237
to
4ab58b8
Compare
Fixed conflicts with the new SDKs. |
- Commented out invalid Session.Export SDK call in TUI - Added httpExportSession helper function with direct HTTP calls to localhost:4096 - Encapsulated HTTP logic for easy removal when SDK is regenerated
Added a small POC in a separate branch with added Streaming support for messages API and allowing to invoke the agent from the Web UI: Screen.Recording.2025-06-28.at.15.56.43.mp4To view the diff with this PR click here It's still rough and first draft, didn't want to modify the Would love your opinion on this whole direction @thdxr @adamdotdevin 🙏🏻 |
…ypes, normalize messages from V1 format
…ionality - Refactor SessionsList to use CSS modules and component structure - Add project path subheader and search bar in title area - Add "Last Updated" column with default sorting - Implement column resizing functionality - Apply design system width and styling improvements - Add title text clamping for better display - Clean up component structure and improve table styling
Draft PR: Session Export and Local Viewing
Looking For Feedback
Note
This is a draft PR looking for feedback on the implementation approach and user experience.
Current Draft Limitation:
opencode serve
.bun --cwd packages/web dev
.bun
Screen.Recording.2025-06-27.at.18.12.03-720.mp4
Summary
This PR adds the ability to export chat sessions to local storage and view them through a local web interface. Users can now:
http://localhost:4321/local/{sessionId}
)Key Changes
Server
New API endpoints (
packages/opencode/src/server/server.ts
):POST /session/:id/export
- Export a session to local storageGET /session/export
- List all exported sessionsGET /session/:id/export
- Retrieve specific exported session dataSession export functionality (
packages/opencode/src/session/index.ts
):~/.config/opencode/session-exports/
TUI
packages/tui/internal/commands/command.go
):SessionExportCommand
with trigger "export"packages/tui/internal/tui/tui.go
):User Experience
export
command in active sessionhttp://localhost:4321/local/{sessionId}
) copied to clipboardTechnical Details
~/.config/opencode/session-exports/{sessionId}.json