# zhu1090093659/deepseek-pp architecture

> Architecture diagram of the GitHub repository zhu1090093659/deepseek-pp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zhu1090093659/deepseek-pp
- Repository: https://github.com/zhu1090093659/deepseek-pp

## Overview

DeepSeek++ is a local-first browser extension that turns the DeepSeek website into an agent workspace. The main flow begins with a user prompt in the side panel or an explicitly invoked page action, proceeds through runtime messaging and the DeepSeek chat client, and can iterate through tools before showing a response. The README also documents distinct workspace features—memory, projects, Skills, MCP, browser control, media analysis, exports, and scheduled automation. Several implementation links are documented at product level only; unsampled source prevents asserting finer call ownership.

Main entry points: [`entrypoints/sidepanel/App.tsx`](https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/sidepanel/App.tsx) (Side panel), [`entrypoints/background/chat-runtime-service.ts`](https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/background/chat-runtime-service.ts) (Chat service), [`core/tool/index.ts`](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/tool/index.ts) (Tool registry), [`core/persistence/indexeddb.ts`](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/persistence/indexeddb.ts) (Local persistence)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_sidepanel["Side panel<br/>[App.tsx]"]
  node_page["Page integration<br/>[content.ts]"]
  node_i18n["Chinese and English<br/>[index.ts]"]
end

subgraph group_runtime["Agent runtime"]
  node_runtime_client["Runtime client<br/>[runtime-client.ts]"]
  node_messaging["Runtime messaging"]
  node_background["Background handlers<br/>[runtime-handler.ts]"]
  node_chat_service["Chat service"]
  node_deepseek_client["DeepSeek client<br/>[active-client.ts]"]
  node_tool_loop["Tool execution loop<br/>[engine.ts]"]
end

subgraph group_capabilities["Agent capabilities"]
  node_tool_registry["Tool registry<br/>[index.ts]"]
  node_web_tools["Web search and fetch<br/>[web-search.ts]"]
  node_mcp["MCP services<br/>[client.ts]"]
  node_browser_control["Browser control<br/>[service.ts]"]
  node_multimodal["Media analysis<br/>[index.ts]"]
  node_sandbox["Code sandbox<br/>[worker-runner.ts]"]
end

subgraph group_workspace["Workspace data"]
  node_memory[("Long-term memory<br/>[injector.ts]")]
  node_project[("Project context<br/>[store.ts]")]
  node_skills[("Skills<br/>[registry.ts]")]
  node_automation["Scheduled automation<br/>[scheduler.ts]"]
  node_persistence[("Local persistence<br/>[indexeddb.ts]")]
  node_export["Conversation export<br/>[service.ts]"]
  node_artifacts["Download artifacts<br/>[tool.ts]"]
end

node_user(("User"))
node_deepseek(("DeepSeek web"))

node_user -->|"starts chat"| node_sidepanel
node_user -->|"invokes page actions"| node_page
node_sidepanel -.->|"sends requests"| node_runtime_client
node_runtime_client -->|"uses boundary"| node_messaging
node_messaging -->|"dispatches commands"| node_background
node_background -.->|"handles chat"| node_chat_service
node_chat_service -.->|"requests completion"| node_deepseek_client
node_deepseek_client -->|"streams responses"| node_deepseek
node_chat_service -->|"continues tool tasks"| node_tool_loop
node_tool_loop -.->|"runs tools"| node_tool_registry
node_tool_registry -->|"offers web tools"| node_web_tools
node_tool_registry -->|"offers MCP tools"| node_mcp
node_tool_registry -->|"offers browser actions"| node_browser_control
node_tool_registry -->|"offers code execution"| node_sandbox
node_sidepanel -->|"configures services"| node_mcp
node_sidepanel -->|"selects target tab"| node_browser_control
node_sidepanel -->|"attaches media"| node_multimodal
node_chat_service -->|"uses saved context"| node_memory
node_chat_service -->|"adds project context"| node_project
node_chat_service -->|"uses selected Skills"| node_skills
node_user -->|"schedules tasks"| node_automation
node_sidepanel -->|"requests export"| node_export
node_tool_registry -->|"creates downloads"| node_artifacts
node_sidepanel -->|"selects language"| node_i18n
node_memory -.->|"stores records"| node_persistence
node_project -.->|"stores records"| node_persistence
node_automation -.->|"stores task state"| node_persistence

click node_sidepanel "https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/sidepanel/App.tsx"
click node_page "https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/content.ts"
click node_runtime_client "https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/sidepanel/runtime-client.ts"
click node_messaging "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/messaging/runtime-boundary.ts"
click node_background "https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/background/runtime-handler.ts"
click node_chat_service "https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/background/chat-runtime-service.ts"
click node_deepseek_client "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/deepseek/active-client.ts"
click node_tool_loop "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/tool-loop/engine.ts"
click node_tool_registry "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/tool/index.ts"
click node_web_tools "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/tool/web-search.ts"
click node_mcp "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/mcp/client.ts"
click node_browser_control "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/browser-control/service.ts"
click node_multimodal "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/multimodal/index.ts"
click node_sandbox "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/sandbox/worker-runner.ts"
click node_memory "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/memory/injector.ts"
click node_project "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/project/store.ts"
click node_skills "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/skill/registry.ts"
click node_automation "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/automation/scheduler.ts"
click node_persistence "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/persistence/indexeddb.ts"
click node_export "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/export/service.ts"
click node_artifacts "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/artifact/tool.ts"
click node_i18n "https://github.com/zhu1090093659/deepseek-pp/blob/main/core/i18n/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sidepanel,node_page,node_i18n,node_user toneBlue
class node_runtime_client,node_messaging,node_background,node_chat_service,node_deepseek_client,node_tool_loop toneAmber
class node_tool_registry,node_web_tools,node_mcp,node_browser_control,node_multimodal,node_sandbox toneMint
class node_memory,node_project,node_skills,node_automation,node_persistence,node_export,node_artifacts toneRose
class node_deepseek toneIndigo
```

## Components

### User interface

- [Side panel](https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/sidepanel/App.tsx): `entrypoints/sidepanel/App.tsx`
- [Page integration](https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/content.ts): `entrypoints/content.ts`
- [Chinese and English](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/i18n/index.ts): `core/i18n/index.ts`

### Agent runtime

- [Runtime client](https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/sidepanel/runtime-client.ts): `entrypoints/sidepanel/runtime-client.ts`
- [Runtime messaging](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/messaging/runtime-boundary.ts): `core/messaging/runtime-boundary.ts`
- [Background handlers](https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/background/runtime-handler.ts): `entrypoints/background/runtime-handler.ts`
- [Chat service](https://github.com/zhu1090093659/deepseek-pp/blob/main/entrypoints/background/chat-runtime-service.ts): `entrypoints/background/chat-runtime-service.ts`
- [DeepSeek client](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/deepseek/active-client.ts): `core/deepseek/active-client.ts`
- [Tool execution loop](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/tool-loop/engine.ts): `core/tool-loop/engine.ts`

### Agent capabilities

- [Tool registry](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/tool/index.ts): `core/tool/index.ts`
- [Web search and fetch](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/tool/web-search.ts): `core/tool/web-search.ts`
- [MCP services](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/mcp/client.ts): `core/mcp/client.ts`
- [Browser control](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/browser-control/service.ts): `core/browser-control/service.ts`
- [Media analysis](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/multimodal/index.ts): `core/multimodal/index.ts`
- [Code sandbox](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/sandbox/worker-runner.ts): `core/sandbox/worker-runner.ts`

### Workspace data

- [Long-term memory](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/memory/injector.ts): `core/memory/injector.ts`
- [Project context](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/project/store.ts): `core/project/store.ts`
- [Skills](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/skill/registry.ts): `core/skill/registry.ts`
- [Scheduled automation](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/automation/scheduler.ts): `core/automation/scheduler.ts`
- [Local persistence](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/persistence/indexeddb.ts): `core/persistence/indexeddb.ts`
- [Conversation export](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/export/service.ts): `core/export/service.ts`
- [Download artifacts](https://github.com/zhu1090093659/deepseek-pp/blob/main/core/artifact/tool.ts): `core/artifact/tool.ts`

### Other components

- **User**
- **DeepSeek web**

## Connections

- User → Side panel: starts chat (evidence: `README.md`)
- User → Page integration: invokes page actions (evidence: `README.md`)
- Side panel → Runtime client: sends requests
- Runtime client → Runtime messaging: uses boundary
- Runtime messaging → Background handlers: dispatches commands
- Background handlers → Chat service: handles chat
- Chat service → DeepSeek client: requests completion
- DeepSeek client → DeepSeek web: streams responses (evidence: `README.md`)
- Chat service → Tool execution loop: continues tool tasks (evidence: `README.md`)
- Tool execution loop → Tool registry: runs tools
- Tool registry → Web search and fetch: offers web tools (evidence: `core/tool/index.ts`)
- Tool registry → MCP services: offers MCP tools (evidence: `core/tool/index.ts`)
- Tool registry → Browser control: offers browser actions (evidence: `core/tool/index.ts`)
- Tool registry → Code sandbox: offers code execution (evidence: `core/tool/index.ts`)
- Side panel → MCP services: configures services (evidence: `README.md`)
- Side panel → Browser control: selects target tab (evidence: `README.md`)
- Side panel → Media analysis: attaches media (evidence: `README.md`)
- Chat service → Long-term memory: uses saved context (evidence: `README.md`)
- Chat service → Project context: adds project context (evidence: `README.md`)
- Chat service → Skills: uses selected Skills (evidence: `README.md`)
- User → Scheduled automation: schedules tasks (evidence: `README.md`)
- Side panel → Conversation export: requests export (evidence: `README.md`)
- Tool registry → Download artifacts: creates downloads (evidence: `core/tool/index.ts`)
- Side panel → Chinese and English: selects language (evidence: `README.md`)
- Long-term memory → Local persistence: stores records
- Project context → Local persistence: stores records
- Scheduled automation → Local persistence: stores task state
