Documentation
Performance and Security/Data Privacy

Data Privacy

ThinkCode is designed with data privacy as a core principle. This document outlines the privacy features available in ThinkCode and provides guidance on configuring privacy settings to match your requirements.

Data Privacy Principles

ThinkCode follows these key principles for data privacy:

  1. Transparency: Clear communication about what data is collected and how it's used
  2. Control: User control over what data is shared and processed
  3. Minimization: Collection of only necessary data for functionality
  4. Security: Strong protection of all collected data
  5. Compliance: Adherence to applicable privacy regulations

Data Collection Overview

ThinkCode may collect different types of data depending on your settings:

Code Content

  • Project Files: Source code and project-related files
  • Code Context: Information about code structure and dependencies
  • Execution Data: Results from code execution (when using debugging features)

User Behavior

  • Feature Usage: Which features you use and how frequently
  • Settings: Your configuration preferences
  • Extension Usage: Which extensions you install and use

System Information

  • Environment Data: Operating system, hardware specifications
  • Performance Metrics: Resource usage and application performance
  • Error Reports: Information about crashes and errors

Privacy Settings

ThinkCode provides extensive privacy settings to control data collection and processing:

General Privacy Settings

Configure basic privacy options:

{
  "thinkcode.privacy": {
    "telemetryLevel": "minimal", // Options: "off", "minimal", "full"
    "crashReporting": false,
    "updateCheck": true,
    "usageStatistics": false
  }
}

AI Data Privacy

Control how data is used with AI features:

{
  "thinkcode.ai.privacy": {
    "dataCollection": "essential", // Options: "off", "essential", "enhanced"
    "modelPersistence": false, // Whether to store personalized models locally
    "improvementProgram": false, // Opt in/out of AI improvement program
    "sensitiveDataFiltering": true // Filter sensitive data from AI requests
  }
}

Workspace Privacy

Configure privacy settings for workspaces:

{
  "thinkcode.workspace.privacy": {
    "scanningExclusions": ["**/.env*", "**/credentials.json", "**/*secret*"],
    "gitDataSharing": false,
    "projectAnalytics": false,
    "restrictExtensionAccess": true
  }
}

Data Storage and Retention

ThinkCode stores different types of data in various locations:

Local Storage

  • Settings: Stored in user profile directory
  • Cached Data: Temporary data stored in the system cache
  • Workspace State: Information about open workspaces
  • Local AI Models: Downloaded models for offline use

View and manage local storage:

  1. Open Command Palette
  2. Type "ThinkCode: Open Data Directory"
  3. Browse stored data files

Cloud Storage (if enabled)

When using cloud features, some data may be stored in the cloud:

  • Sync Data: Settings and state for synchronization
  • AI Usage Data: Information for improving AI models (if opted in)
  • Profile Information: User account details

Control cloud storage:

{
  "thinkcode.sync": {
    "enabled": true,
    "scope": "settings", // Options: "settings", "extensions", "all"
    "excludedItems": ["workspaceState", "keyboardShortcuts"]
  }
}

Data Transmission Security

All data transmitted by ThinkCode is protected:

  • TLS Encryption: All connections use TLS 1.3+
  • Secure Endpoints: Communication only with verified endpoints
  • Authentication: Secure token-based authentication
  • Data Minimization: Only essential data is transmitted

AI Privacy Features

ThinkCode includes special privacy features for AI functionality:

Context Filtering

The AI context filtering system prevents sensitive data from being included in AI requests:

  • Pattern-Based Filtering: Identifies and removes API keys, passwords, etc.
  • File-Based Exclusion: Excludes sensitive files like .env or secrets.json
  • Custom Patterns: Define your own patterns for filtering

Configure context filtering:

{
  "thinkcode.ai.contextFiltering": {
    "enabled": true,
    "sensitivePatterns": [
      "api_?key",
      "auth_?token",
      "password",
      "secret",
      "credential"
    ],
    "excludedFiles": [
      "**/.env*",
      "**/secrets.*",
      "**/config/credentials.*"
    ],
    "excludedFolders": [
      "**/node_modules",
      "**/.git"
    ]
  }
}

Local Processing

For sensitive projects, ThinkCode supports local AI processing:

  • On-Device Models: AI models run entirely on your machine
  • Offline Operation: No data sent to external services
  • Resource Management: Controls for CPU and memory usage

Enable local processing:

{
  "thinkcode.ai.processing": {
    "mode": "local", // Options: "cloud", "local", "hybrid"
    "localModelSettings": {
      "modelSize": "medium", // Options: "small", "medium", "large"
      "maxMemoryUsage": 4096, // Maximum memory in MB
      "prioritizePerformance": false // True for speed, false for quality
    }
  }
}

Privacy Best Practices

Follow these recommendations for optimal data privacy:

  1. Review Settings: Regularly audit privacy settings
  2. Use Context Filtering: Enable AI context filtering
  3. Consider Local Processing: Use local AI processing for sensitive projects
  4. Limit Telemetry: Reduce telemetry to minimal or off if concerned
  5. Exclude Sensitive Files: Use .thinkcodeignore to exclude sensitive files
  6. Update Regularly: Keep ThinkCode updated for latest privacy features
  7. Use Workspace Trust: Be cautious with untrusted workspaces
  8. Check Extensions: Review extension privacy policies and permissions

Further Resources