Skip to content

realcarsonterry/ChatArchive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatArchive

A powerful browser extension for archiving and managing conversations from multiple AI platforms.

Features

  • 🤖 Multi-Platform Support: Works with ChatGPT, Claude, Gemini, Bing Chat, and more
  • 💾 One-Click Save: Save complete conversations with a single click
  • 📊 Smart Extraction: Automatically identifies user messages and AI responses, filters out UI elements
  • 🗂️ Conversation Management: View, export, and delete saved conversations from the extension popup
  • 📤 Data Export: Export conversations as JSON files for backup and analysis
  • 🎨 Beautiful Interface: Modern gradient design with smooth animations
  • 🔒 Privacy First: All data stored locally in your browser, never uploaded to any server

Supported Platforms

  • ChatGPT (chat.openai.com)
  • Claude (claude.ai)
  • Google Gemini (gemini.google.com)
  • Bing Chat (www.bing.com)
  • Other AI platforms (generic selectors)

Installation

Chrome/Edge Browser

  1. Download or clone this repository to your local machine
  2. Open your browser and navigate to the extensions page:
    • Chrome: chrome://extensions/
    • Edge: edge://extensions/
  3. Enable "Developer mode" in the top right corner
  4. Click "Load unpacked"
  5. Select the ai-chat-saver folder
  6. Extension installed successfully!

Usage

Saving Conversations

  1. Visit any supported AI chat platform
  2. Have a conversation with the AI
  3. Click the "💾 Save Chat" button in the top right corner of the page
  4. You'll see a success notification when the conversation is saved

Managing Conversations

  1. Click the extension icon in your browser toolbar
  2. View all saved conversations in the popup
  3. You can:
    • View conversation titles, message counts, and save timestamps
    • Export conversations as JSON files
    • Delete conversations you no longer need

Exporting Data

  • Click the "Export" button next to any conversation
  • The conversation will download as a JSON file
  • Filename format: chat-{id}-{title}.json

Data Storage

  • All conversation data is stored locally in your browser (Chrome Storage API)
  • Maximum of 100 conversations stored (older conversations automatically removed)
  • No data is uploaded to any server - completely local and private

Technical Architecture

  • Manifest V3: Uses the latest Chrome extension standard
  • Content Scripts: Injected into AI platform pages to extract conversation content
  • Chrome Storage API: Local storage for conversation data
  • DOM Parsing: Intelligently identifies message structures across different platforms

Project Structure

ai-chat-saver/
├── manifest.json       # Extension configuration
├── content.js          # Content script (message extraction logic)
├── content.css         # Save button and notification styles
├── popup.html          # Extension popup interface
├── popup.js            # Popup logic (conversation management)
├── LICENSE             # MIT License
└── README.md           # Project documentation

Development

Core Classes

ChatExtractor (content.js)

  • Detects the current AI platform
  • Extracts conversation messages from the page
  • Filters out UI elements and duplicate messages
  • Saves conversations to local storage

PopupManager (popup.js)

  • Loads and displays saved conversations
  • Handles export and delete operations
  • Manages the extension popup UI

Adding New Platform Support

Add a new platform configuration in the siteConfigs object in content.js:

'example.com': {
  messageSelector: '.message',      // Message container selector
  userSelector: '.user-message',    // User message selector
  assistantSelector: '.ai-message', // AI response selector
  contentSelector: '.message-text'  // Message content selector
}

Contributing

Issues and Pull Requests are welcome!

License

MIT License

About

A browser extension for archiving conversations from ChatGPT, Claude, and Gemini

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors