Skip to content

Core Overview

MyDeskBot is a powerful AI-assisted development platform that provides comprehensive development support.

Core Concepts

AI Assistant

The core of MyDeskBot is an intelligent AI assistant that can:

  • 🧠 Understand Code - Deeply understand your codebase
  • 📝 Generate Code - Intelligently generate high-quality code
  • 🔍 Code Review - Real-time code quality checking
  • 💡 Provide Suggestions - Recommendations based on best practices
  • 🎯 Context Awareness - Understand the entire project context

Model Providers

MyDeskBot supports multiple AI model providers:

  • OpenAI - GPT-4, GPT-3.5 Turbo
  • Anthropic - Claude 3 Opus, Sonnet, Haiku
  • Google - Gemini Pro
  • Open Source Models - Use local models through Ollama

Tools and Plugins

Rich ecosystem of tools and plugins:

  • MCP Tools - Model Context Protocol integration
  • IDE Plugins - Integration with your favorite editors
  • Desktop Application - Standalone AI assistant application
  • Command Line Tools - AI assistance in the terminal

Architecture Overview

┌─────────────────────────────────────────────────┐
│               User Interface                     │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐     │
│  │ IDE Plugin│  │ Desktop  │  │ CLI Tool │     │
│  │           │  │  App     │  │          │     │
│  └──────────┘  └──────────┘  └──────────┘     │
└─────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────┐
│               MyDeskBot Core                     │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐     │
│  │ Context  │  │ Prompt   │  │ Rules    │     │
│  │ Engine   │  │ System   │  │ System   │     │
│  └──────────┘  └──────────┘  └──────────┘     │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐     │
│  │ Model    │  │ Cache    │  │ Error    │     │
│  │ Adapter  │  │ Manager  │  │ Handler  │     │
│  └──────────┘  └──────────┘  └──────────┘     │
└─────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────┐
│              Model Providers                     │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐     │
│  │  OpenAI  │  │ Anthropic│  │ Other    │     │
│  │          │  │          │  │ Providers│     │
│  └──────────┘  └──────────┘  └──────────┘     │
└─────────────────────────────────────────────────┘

Main Components

1. Context Engine

Responsible for understanding and analyzing your codebase:

mermaid
graph LR
    A[Code Scanning] --> B[Syntax Analysis]
    B --> C[Symbol Extraction]
    C --> D[Dependency Analysis]
    D --> E[Pattern Recognition]
    E --> F[Knowledge Graph]

Features:

  • Index codebase
  • Understand code structure
  • Identify code patterns
  • Maintain dependency relationships

2. Prompt System

Intelligently generates and manages prompts:

Features:

  • Automatic prompt generation
  • Prompt template management
  • Context injection
  • Prompt optimization

3. Rules System

Configurable rules and constraints:

Features:

  • Code style rules
  • Security rules
  • Performance rules
  • Custom rules

4. Model Adapter

Unified model interface:

Supports:

  • OpenAI API
  • Anthropic API
  • Azure OpenAI
  • Local models (Ollama)
  • Custom endpoints

5. MCP Tool Integration

Model Context Protocol tool integration:

Integrated Tools:

  • GitHub
  • Notion
  • Supabase
  • Sentry
  • Netlify
  • And more...

Workflows

1. Code Completion Workflow

User Input

Context Collection

Prompt Generation

Model Inference

Result Filtering

Display Suggestions

2. Code Review Workflow

Select Code

Static Analysis

Rule Checking

AI Review

Generate Report

Display Suggestions

3. Plan Mode Workflow

Describe Task

Requirement Analysis

Generate Plan

User Confirmation

Step-by-step Execution

Result Verification

Core Features

Intelligent Awareness

  • Project Awareness - Understands entire project structure
  • Pattern Learning - Learns your coding style
  • Context Relevance - Based on the entire codebase

Highly Configurable

  • Model Selection - Supports multiple AI models
  • Custom Rules - Configurable rule system
  • Plugin Extension - Rich plugin ecosystem

Privacy & Security

  • Local Processing - Sensitive operations can be done locally
  • Data Encryption - Encrypted transmission and storage
  • Controlled Scope - Control what data is sent

High Performance

  • Intelligent Caching - Reduces duplicate requests
  • Streaming Output - Fast response to users
  • Incremental Indexing - Efficient codebase indexing

Use Cases

Daily Development

  • Code completion
  • Quick fixes
  • Code explanation
  • Documentation generation

Code Review

  • Quality checking
  • Security review
  • Performance optimization
  • Best practices

Learning Assistance

  • Technical learning
  • Code examples
  • Concept explanation
  • Best practices

Automation

  • Script generation
  • CI/CD configuration
  • Test generation
  • Documentation automation

Technology Stack

Backend

  • Node.js - Runtime
  • TypeScript - Primary language
  • Rust - Performance-critical components

Frontend

  • React - UI framework
  • Electron - Desktop application
  • Tauri - Next-generation desktop application

AI/ML

  • OpenAI API - Model services
  • Anthropic API - Claude models
  • LangChain - AI application framework

Extensibility

Plugin System

  • IDE plugins (IntelliJ, VS Code, Neovim)
  • MCP tool integration
  • Custom rules

API Integration

  • REST API
  • GraphQL API
  • WebSocket (real-time communication)

Local Deployment

  • Docker support
  • Kubernetes support
  • Private deployment

Configuration Management

Configuration File

yaml
# config.yaml
name: My MyDeskBot Configuration
version: 0.0.1
schema: v1

models:
  - name: "gpt-4"
    provider: "openai"
    model: "gpt-4"
    apiKey: "${{ secrets.OPENAI_API_KEY }}"
    roles:
      - chat
      - edit
      - apply

  - name: "claude-3-sonnet"
    provider: "anthropic"
    model: "claude-3-sonnet"
    apiKey: "${{ secrets.ANTHROPIC_API_KEY }}"
    roles:
      - chat
      - autocomplete

  - name: "local-llama"
    provider: "ollama"
    model: "llama2"
    apiBase: "http://localhost:11434"
    roles:
      - chat

Environment Variables

bash
# ~/.mydeskbot/.env
OPENAI_API_KEY=your-openai-key
ANTHROPIC_API_KEY=your-anthropic-key