forked from chatboxai/chatbox
-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Description
Current Behavior
Sessions are stored in electron-store and are only accessible within the application. There is no functionality to export sessions to external files.
Reproduction Steps:
- Launch the Chatbox application
- Create several chat sessions with message history
- Look in the session list sidebar for export options
- Right-click or open the menu for a session (the three-dot menu)
- Observe: No "Export" or "Save" option exists
Expected Behavior
Users should be able to export individual sessions to JSON files through the session context menu. The export should open a native file save dialog and create a well-formatted, human-readable JSON file containing all session data.
Acceptance Criteria:
- An "Export" option is added to the session context menu (three-dot menu) for individual sessions
- Clicking Export opens a native save file dialog with a suggested filename (e.g., "session-name.json")
- The save dialog defaults to an appropriate location (e.g., user's Documents or Downloads folder)
- The exported JSON file is properly formatted with indentation for readability
- The exported JSON includes all session data: id, name, and all messages
- Each message in the export includes: id, role, and content fields
- The export uses Electron's dialog API and IPC for file operations
- A success notification appears after successful export (using the existing toast system)
- Appropriate error handling if the save operation fails
Steps To Test
- Start the application and create a test chat session with at least 5 messages
- Include different message types: user messages, assistant responses, and optionally a system message
- Name the session "Test Export Session"
- Right-click or open the three-dot menu for this session
- Verify an "Export" option is present in the menu
- Click Export and verify a native save file dialog appears
- Verify the suggested filename is based on the session name
- Save the session to your desktop as "test-session.json"
- Verify a success notification appears (e.g., "Session exported successfully")
- Open the JSON file in a text editor and verify it contains:
- The session ID and name at the top level
- A messages array with all messages from the session
- Each message has id, role, and content fields
- The JSON is properly formatted with indentation (not minified)
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx
Metadata
Metadata
Assignees
Labels
No labels