Skip to content

AI Sidekick is a minimalist, "Arc-style" Chrome Extension that brings multi-LLM chat (Gemini & DeepSeek) and contextual analysis to your browser side panel.

License

Notifications You must be signed in to change notification settings

miziodel/ai-sidekick

Repository files navigation

AI Sidekick - Chrome Extension

License Status GitHub release (latest by date)

AI Sidekick is a minimalist, "Arc-style" Chrome Extension that brings multi-LLM chat (Gemini & DeepSeek) and contextual analysis to your browser side panel.

🟢 Status: v1.0.2 | Beta - Core features largely implemented and stable.

🚀 Quick Install

Non-technical user?

  1. Download the latest .zip from the Releases page.
  2. Follow the 30-second Setup Guide to load it into your browser.

🎯 Key Features

  • Multi-Model: Switch between Gemini 2.5 (Pro/Flash) and DeepSeek (V3/R1 Reasoner).
  • Conversation Memory: Maintains chat history across sessions with a "Sliding Window" (keeps last 10 messages) to manage token usage.
  • Secure Vault: Client-side encryption (PBKDF2 + AES-GCM) for API keys.
    • Session Persistence: Keys stay unlocked for the browser session.
    • Auto-Lock: Automatically locks after 15 minutes of inactivity.
  • Contextual Actions:
    • Right-click to Explain, Summarize, or Analyze pages.
    • Summarize Button: One-click summary of the current conversation.
  • Accessibility: Tooltips and persistent, high-visibility notifications for status changes.
  • Streaming: Real-time text generation.

🛠 Architecture Decisions

  • Manifest V3: Compliant with latest Chrome standards.
  • No Backend: Privacy-first. All calls go directly from browser to LLM APIs.
  • Vendor-ing: marked.js is included locally to respect CSP (Content Security Policy).
  • Testing: Pure logic (formatting, crypto) is separated from UI logic for easy Node.js testing.

🏁 Setup

  1. Get the Code:

  2. Open chrome://extensions.

  3. Enable "Developer Mode".

  4. Click "Load Unpacked" -> Select this folder.

🛠 Development

To ensure code quality and prevent regressions, this project uses ESLint and Prettier.

# Install dependencies
npm install

# Run Static Analysis (Linting)
npm run lint

# Auto-fix Lint errors
npm run lint:fix

# Format Code
npm run format

⚙️ Configuration

  1. Click the extension icon -> Options.
  2. Paste Keys (Stored locally or encrypted in Cloud Vault):
  3. Arc Browser Setup:
    • Pin the Extension: Hover over the URL bar -> Click Puzzle Piece 🧩 -> Pin 📌 AI Sidekick.
    • Toolbar Icon: Clicking the icon opens Options/Config.
    • Open Chat: Use Right Click -> AI Sidekick -> Open Sidekick Here (or Summarize/Explain).
    • Split View: To use alongside a page, open Sidekick, then click the External Link Icon (top right) to open in a tab -> Drag to Split View.

🧪 Testing

Manual Verification:

  1. Select "Gemini Web (Free)" -> Type "Hello" -> Verify it opens gemini.google.com.
  2. Select text on a page -> Right Click -> "Explain This".

Automated Tests: Run pure logic tests:

node tests/run_tests.js

Configurable Prompts

You can customize the prompts used for context menu actions and page analysis in the Options page (Right-click extension icon -> Options).

Automatic Content Extraction

AI Sidekick uses Mozilla Readability.js to automatically extract the main content of the active page. This includes:

  • Link Preservation: Links are preserved in the text as Text [URL].
  • Whitespace Cleaning: Noise and excessive whitespace are removed for a cleaner prompt.
  • Smart Logic: Boilerplate (menus, ads) is automatically filtered out.

Available Variables

Use these placeholders to insert dynamic content into your prompts:

Variable Description Context
{{selection}} The text currently selected by the user. Select Menu Actions
{{content}} The full text content of the active page (including links). Analyze Page
{{url}} The URL of the active page. All Actions
{{title}} The title of the active page. All Actions

Examples

  • Summarize Selection: Summarize this in 3 bullet points: {{selection}}
  • Explain Selection: Explain this to a 5-year-old: {{selection}}
  • Analyze Page: Find any deadlines mentioned in this page: {{content}}

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines on how to get started.

🔒 Security & Privacy

  • Privacy: API Keys are stored locally on your device. If you use the Cloud Vault feature, they are encrypted with a Master Password using your Google Account for sync, but we cannot see your keys. No usage data is collected.
  • Security: If you find a vulnerability, please see SECURITY.md.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Third-party libraries are listed in THIRD-PARTY-NOTICES.txt.

About

AI Sidekick is a minimalist, "Arc-style" Chrome Extension that brings multi-LLM chat (Gemini & DeepSeek) and contextual analysis to your browser side panel.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks