How zmy15/deepseek-for-visualstudio works
DeepSeek for Visual Studio is an IDE-native AI coding assistant. The main workflow starts in the chat panel, builds conversation context, routes work through cooperating agents and tools, calls a configured model provider, and presents results or reviewed code changes in Visual Studio. Separate branches support inline editing and Ghost Text completion. The README documents broader MCP, Skills, memory, multimodal, search, and build capabilities; links for these are shown at subsystem level where source excerpts do not establish finer wiring.
Main entry points: AgentFactory.cs Agent orchestration · DeepSeekChatControl.xaml.cs Chat panel · DeepSeekApiService.cs Chat API service · BuiltInTools IDE tools
Components 26
IDE interaction
- Chat panel
View/DeepSeekChatControl.xaml.cs - IDE commands
Commands/ShowChatWindowCommand.cs - Inline edit command
Commands/InlineAiEditCommand.cs - Ghost Text completion
CodeCompletion/InlinePredictionManager.cs
Agent workflow
- Agent orchestration
Services/Agents/AgentFactory.cs - Ask / Explore / Plan / Edit / Build
Services/Agents - Tool dispatch
Services/BuiltInToolService.cs
Context and edits
- Conversation context
Services/ConversationContextManager.cs - Context compression
Services/ContextCompressorService.cs - Inline rewrite
Services/InlineEdit/InlineEditService.cs - Patch and edit services
Services/EditPatchService.cs - Diff review
Services/DiffViewerService.cs
Models and tools
- Chat API service
Services/DeepSeekApiService.cs - Model providers
Services/Providers - IDE tools
Services/BuiltInTools - File and multimodal parsing
Services/FileParserService.cs - MCP servers
Services/McpManagerService.cs - Web search
Services/WebSearchService.cs - RAG retrieval
Services/RagService.cs
Persistence and settings
- Project memory
Services/MemoryService.cs - Reusable Skills
Services/SkillService.cs - Chat persistence
Services/ChatPersistenceService.cs - Settings and API keys
Settings/DeepSeekUnifiedSettings.cs
Other components
- Developer
- Model endpoint
- Solution and terminal
Connections 28
- Developer → Chat panel: sends prompts
- Developer → IDE commands: opens chat
- Developer → Inline edit command: requests edit
- Chat panel → Conversation context: records conversation
- Chat panel → Agent orchestration: dispatches task
- Agent orchestration → Ask / Explore / Plan / Edit / Build: selects agent
- Agent orchestration → Conversation context: uses context
- Agent orchestration → Tool dispatch: dispatches tools
- Tool dispatch → IDE tools: runs tools
- IDE tools → Solution and terminal: inspects or changes
- Conversation context → Context compression: compresses history
- Agent orchestration → Chat API service: requests completion
- Ghost Text completion → Chat API service: requests prediction
- Inline edit command → Inline rewrite: requests rewrite
- Inline rewrite → Chat API service: requests completion
- Ask / Explore / Plan / Edit / Build → Patch and edit services: applies edits
- Patch and edit services → Diff review: previews changes
- Diff review → Developer: presents review
- Chat API service → Model providers: uses provider
- Model providers → Model endpoint: sends requests
- Settings and API keys → Chat API service: configures access
- Chat panel → Chat persistence: saves sessions
- Conversation context → Project memory: injects notes
- Chat panel → Reusable Skills: routes skill requests
- IDE tools → File and multimodal parsing: parses files
- IDE tools → Web search: searches web
- Agent orchestration → RAG retrieval: retrieves context
- Tool dispatch → MCP servers: dispatches MCP tools