Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 2.36 KB

README.md

File metadata and controls

59 lines (43 loc) · 2.36 KB

Features Added

  1. Data Structure Analysis - The tool now understands your specific JSON schema with conversations, chat_messages, and content elements.

  2. Message Content Extraction - It extracts message text from both the text field and the nested content[].text structure.

  3. Empty Message Detection - Added functionality to identify and filter conversations with empty messages, which could be helpful for data cleanup.

  4. Message Distribution Chart - A visual bar chart showing the distribution of messages by role (human/assistant), message length categories, and monthly activity.

  5. Export to Markdown - Export any conversation to a readable Markdown file with proper formatting of messages by role.

  6. Improved Statistics - Enhanced statistics including empty message counts, message length distribution, and time-based analysis.

How to Use

  1. Install dependencies:
npm install blessed blessed-contrib moment chalk
  1. Run the explorer with your JSON file:
node conversation-explorer.js path/to/your/conversations.json
  1. Navigation:

    • Use arrow keys to navigate
    • Enter to view conversation details
    • Backspace to return to the main list
  2. Specialized views:

    • Press 1 for all conversations
    • Press 2 for conversations with messages
    • Press 3 for statistics
    • Press f to filter for conversations with empty messages
    • Press d to show message distribution chart
  3. Actions:

    • Press e to export the current conversation to Markdown
    • Press / to search
    • Press t to filter by date range
    • Press s to change sort method
    • Press r to reverse sort order
  4. Command mode (press :):

    • :load file.json - Load a different file
    • :filter 2024-01-01 to 2024-02-01 - Filter by date range
    • :search keyword - Search for text
    • :export output.md - Export current conversation

Additional Notes

  • The tool handles empty messages and content gracefully
  • It processes the nested structure of your conversations
  • It tracks conversation and message timestamps
  • It shows metadata like UUIDs when viewing details

This should give you a powerful interface for exploring and managing your conversation data, similar to how ncdu works for disk usage but specialized for your JSON structure. Would you like any additional features or modifications to better suit your needs?