DeepLifeStudio/DeepSeekAI
소개
Browser extension for invoking the DeepSeek AI large model.
AI 및 머신러닝측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original🚀 DeepSeekAI - Smart Web Assistant
📖 Introduction
DeepSeekAI is an 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. You provide your own API key (DeepSeek or any OpenAI-compatible endpoint).
Note: This extension is maintained by the community. Keys, custom endpoints, and preferences are stored only in
chrome.storage.syncon your device.
🔌 Supported API Providers
- DeepSeek (official endpoint)
- ByteDance Volcengine
- SiliconFlow
- OpenRouter
- AiHubMix
- Tencent Cloud
- IFlytek Star
- Baidu Cloud
- Aliyun
- Unlimited self-hosted/custom providers that expose an OpenAI-compatible
/chat/completionsendpoint
✨ 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
interactjsgives 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-schemeand 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.htmldocuments 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.jsglues together selection tracking, quick actions, the popup workspace, markdown renderer, theme watcher, scroll manager, and focus manager.background.jsis 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 thedistfolder. - To ship a store package, run one of:
pnpm run build:zip→extension.zippnpm run build:chrome→chrome-submission.zippnpm 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-chatdestroys and recreates the session;show-hide-chatkeeps the current context alive between invocations;close-chatis 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 buildagain to ensuredist/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.
📮 Contact
- Issues: GitHub Issues
- Email: [email protected]
- Twitter/X: @DeepLifeStudio
If this project helps you, please consider giving it a ⭐️
관련 프로젝트 살펴보기
불러오는 중…