How edgetype/better-deepseek works
Better DeepSeek is a browser extension (with an Android WebView host) that augments DeepSeek chat. The main workflow is user interaction in the injected chat UI, request interception to add configured prompt, memory, and skills, then parsing responses into interactive tools, files, and follow-up actions. Separate branches cover project/codebase work, MCP tools, voice, and API exploration. Paths for major unsampled capabilities use their existing enclosing directories; wiring not established by the excerpts is omitted.
Main entry points: App.svelte Extension UI · files File and web readers · index.js Tag parser · message-processor.svelte.js Message processor
Components 26
Chat Integration
- Content entry
src/content/index.js - Extension UI
src/content/ui/App.svelte - App state
src/content/state.js - Page bridge
src/content/bridge.js - Request interception
src/injected/index.js - Settings drawer
src/content/ui/Drawer.svelte
Conversation Features
- Project manager
src/content/project-manager.js - Project manager UI
src/content/ui/ProjectsManager.svelte - DeepCode mode
src/content/deep-code.js - File and web readers
src/content/files - Code retrieval
src/lib/rag-engine.js - MCP dispatch
src/background/index.js - Prompt queue
src/content/queue-manager.svelte.js - Voice support
src/content/vad-processor.js - API playground
src/content/api-playground/ApiPlayground.svelte
Tools and Output
- Message processor
src/content/message-processor.svelte.js - Tag parser
src/content/parser/index.js - Document sandbox
src/sandbox/index.js - Rendered tool output
src/content/ui
Platform Services
- Settings storage
src/content/storage.js - Background services
src/background/index.js - Android host
android/app/src/main/java/com/betterdeepseek/app/MainActivity.kt
Other components
- Chat user
- DeepSeek chat
- MCP servers
- Web and GitHub
Connections 25
- Chat user → DeepSeek chat: enters prompt
- Content entry → Extension UI: mounts UI
- Extension UI → Settings drawer: opens settings
- Settings drawer → App state: edits configuration
- Settings storage → App state: loads settings
- Settings storage → Page bridge: pushes config
- Page bridge → Request interception: sends config
- Request interception → DeepSeek chat: patches requests
- DeepSeek chat → Message processor: delivers responses
- Message processor → Tag parser: parses tool tags
- Tag parser → Rendered tool output: renders results
- Project manager UI → Project manager: manages projects
- Project manager → App state: updates project state
- DeepCode mode → File and web readers: requests inspection
- File and web readers → Code retrieval: provides files
- File and web readers → Web and GitHub: fetches content
- Background services → MCP dispatch: dispatches tools
- MCP dispatch → MCP servers: calls server
- Prompt queue → Message processor: checks generation
- Prompt queue → DeepSeek chat: sends queued prompt
- Voice support → Extension UI: supports dictation
- Extension UI → API playground: opens playground
- Tag parser → Document sandbox: requests generation
- Document sandbox → Rendered tool output: returns files
- Android host → Extension UI: hosts extension