๐ DeepSeekAI - Smart Web Assistant

[](https://chromewebstore.google.com/detail/bjjobdlpgglckcmhgmmecijpfobmcpap)
[](LICENSE)
[](https://github.com/DeepLifeStudio/DeepSeekAI/stargazers)
[English](/DeepSeekAI/) | [็ฎไฝไธญๆ](/DeepSeekAI/README.zh-CN.html)
๐ Introduction
DeepSeekAI is an unofficial, open-source browser extension that lets you summon a private DeepSeek-powered co-pilot anywhere on the web. Highlight text, tap a quick action, or press a shortcut to open a floating chat workspace that streams answers, shows reasoning traces, and remembers your preferred layout. The project is independent from DeepSeek, and you must provide your own API key (DeepSeek or any OpenAI-compatible endpoint).
Note: This extension is a community project and is not affiliated with DeepSeek. Keys, custom endpoints, and preferences are stored only in chrome.storage.sync on your device.
๐ Supported API Providers
โจ Feature Overview
๐ช Inline Assistants
- Rich quick-action bubble appears beside any text selection with Chat, Copy, Translate (19 languages), Explain, Summarize, Email, and Analyze templates.
- SelectionPreservationManager keeps the DOM range alive so the bubble never steals your highlight during double/triple clicks or context-menu usage.
- Right-click context menu entry and toolbar popup both reuse the same flow, so highlighted text, manual prompts, and keyboard shortcuts share the session logic.
๐ช Floating Workspace
interactjs gives the chat window magnetic drag + resize handles, snap animations, and a persistent minimize icon whose position is saved per user.
- Toggle โRemember window sizeโ to keep the workspace dimensions across sites, and โPin windowโ to prevent accidental closes when clicking outside.
- Minimized state, popup visibility, and icon location are tracked by
popupStateManager, ensuring state survives selection changes.
- Built-in input container includes auto-expanding textarea, send icon, abort/stop square, and smart focus rules so existing form inputs retain priority.
- Each answer provides inline copy + regenerate controls; DeepSeek-R1/openrouter reasoning is rendered above the final response with a collapsible panel.
- Auto-scroll follows the stream until you scroll manually. Scroll momentum + cooldown logic prevent janky jumps.
๐ง Provider & Model Controls
- Popup UI (English/Chinese) manages API keys per provider, preferred language (auto-detect or force output), and whether the selection bubble is enabled.
- Add, rename, hide, or delete custom providers with their own base URL, display name, default model, and placeholder API-key links.
- ModelManager stores multiple custom models per provider. Dropdowns support inline delete buttons, and forms auto-save via TempStateManager so unfinished entries survive popup reloads.
- Configure a global custom system prompt used for every conversation, or override per quick action via templated prompts.
๐ Rendering, Safety & UX Polishing
- Markdown-It + highlight.js + KaTeX + DOMPurify ensure rich formatting, syntax highlighting, math rendering, and sanitized HTML.
- Code blocks gain reusable โCopyโ controls, while each AI block also exposes regenerate + share-ready text copy actions.
- Streaming is proxied through the background service worker using modern
fetch + AbortController, so stop/regenerate/shortcut commands instantly cut network traffic.
- ThemeManager listens to
prefers-color-scheme and toggles CSS variables to keep the popover and quick buttons readable in both modes.
โจ๏ธ Shortcuts & Invocation Options
- Two Chrome commands ship by default:
Ctrl/Cmd + Shift + Y โ toggle chat (new session)
Ctrl/Cmd + Shift + U โ show/hide chat (preserve session)
- Use
chrome://extensions/shortcuts (or the โShortcut Settingsโ link inside the popup) to rebind commands.
- Context menu entry (โDeepSeek AIโ) sends the selected text directly, and the icon in the toolbar opens the configuration popup.
๐ Privacy & Onboarding
- On first install we open
src/Instructions/Instructions.html, an offline-friendly Apple-style guide covering every screen.
PRIVACY.html documents exactly what is stored (API keys + user preferences in local browser storage) and reminds you that no remote server is involved.
- DOMPurify sanitizes all rendered HTML, and no telemetry or analytics is collected.
๐ How It Works
sequenceDiagram
participant User
participant Content as Content Script
participant Background
participant Provider
User->>Content: Select text / press shortcut
Content->>Background: chrome.runtime.sendMessage({ action: "proxyRequest" | "getSettings" })
Background->>Provider: fetch(OpenAI-compatible endpoint)
Provider-->>Background: SSE / JSON chunks
Background-->>Content: streamResponse events (AbortController aware)
Content-->>User: Renders markdown, reasoning, quick actions
content/content.js glues together selection tracking, quick actions, the popup workspace, markdown renderer, theme watcher, scroll manager, and focus manager.
background.js is the single network surface: it loads provider settings, streams responses, parses errors, handles aborts, manages commands/context menus, and opens onboarding tabs.
popup/ houses the modular settings UI (ApiKeyManager, ProviderManager, ModelManager, SystemPromptManager, etc.) with i18n + autosave.
Instructions/ exposes the offline guide viewed after installation.
๐ Installation & Build
1. Install from the store (recommended)
- Chrome: Chrome Web Store
- Microsoft Edge: enable โAllow extensions from other stores,โ then install via the same Chrome Web Store listing above.
2. Manual installation / development flow
# Requirements: Node.js 18+, pnpm (or npm), and a Chromium-based browser
pnpm install
pnpm run build # outputs the production bundle into dist/
- Open
chrome://extensions โ enable Developer mode โ Load unpacked โ pick the dist folder.
- To ship a store package, run one of:
pnpm run build:zip โ extension.zip
pnpm run build:chrome โ chrome-submission.zip
pnpm run build:edge โ edge-submission.zip
- Upload the generated ZIP to the respective store dashboards.
๐งฉ Setup & Daily Use
- Click the extension icon to open the popup.
- Choose a provider (or create a custom one with a name + base URL + default model) and paste its API key. Each provider keeps its own key and optional custom API URL.
- Pick or add a model. Non-DeepSeek providers require an explicit model ID; the UI will auto-prompt you to add one if missing.
- Configure behavior:
- Enable/disable the selection quick-action bubble.
- Choose automatic language detection or force a language from the dropdown (20+ locales).
- Toggle Save Window Size, Pin Window, and Custom System Prompt.
- Use the Shortcut Settings link to jump to Chromeโs command editor.
- Highlight text (or open the chat via shortcut) โ the quick-action bubble appears โ select Chat or a template. You can also open the floating window first and paste custom prompts.
- While streaming, use the stop square icon to abort. Each answer ends with copy + regenerate icons; reasoning blocks collapse/expand with one click.
- Need a refresher? Open the in-extension usage guide or switch to the Simplified Chinese README linked at the top.
โจ๏ธ Shortcuts & Quick Actions
- Quick actions:
Chat โ sends selection verbatim.
Copy โ copies selection without opening chat.
Translate โ language picker drives a prompt that asks DeepSeek to translate into your chosen target language.
Explain, Summarize, Email, Analyze โ curated prompts (with MBTI-flavored tone) for instant structured answers.
- Window commands:
toggle-chat destroys and recreates the session; show-hide-chat keeps the current context alive between invocations; close-chat is exposed internally for context menu cleanup.
- Context menu: right-click โ โDeepSeek AIโ to push highlighted text directly into a new chat with a contextual greeting (morning/afternoon/evening).
๐๏ธ Project Layout & Stack
.
โโโ src/
โ โโโ manifest.json # MV3 metadata & permissions
โ โโโ background.js # service worker + proxy + commands
โ โโโ content/ # selection bubble, popup workspace, services, utils, styles
โ โโโ popup/ # settings UI (managers, i18n, HTML)
โ โโโ Instructions/ # onboarding guide (HTML + JS)
โโโ dist/ # build output (loaded during development/packaging)
โโโ extension.zip # generated via build:zip / build:chrome / build:edge
โโโ webpack.config.js # bundler config (Babel, CSS loader, copy plugin, terser)
โโโ PRIVACY.html # privacy policy
โโโ README*.md # documentation (English + ็ฎไฝไธญๆ)
Key dependencies: interactjs, markdown-it, highlight.js, DOMPurify, katex, clipboard, perfect-scrollbar, and openai (for payload typing) plus the MV3 APIs exposed by Chrome/Edge.
๐ Privacy & Security
- API keys, preferences, quick-action states, and minimized icon positions live only inside
chrome.storage.sync.
- Text is sent solely to the provider endpoint you configure. There are no intermediary servers, analytics calls, or remote logs.
- The offline privacy policy inside the repo details data handling, and DOMPurify removes any potentially unsafe markup before rendering.
๐ค Contributing
Contributions are welcomeโbug reports, documentation fixes, and feature proposals all help the community.
- Fork the repo and create a branch (
git checkout -b feature/my-update).
- Install deps + build once (
pnpm install && pnpm run build).
- Make your changes, keep them focused, and run
pnpm run build again to ensure dist/ refreshes.
- Submit a Pull Request describing the change, affected files, and any verification notes.
๐ License
This project is licensed under the MIT License - see LICENSE for details.
If this project helps you, please consider giving it a โญ๏ธ