Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>DSXpertNew to Visual Studio Code? Get it now.
DSXpert

DSXpert

devsimplify

|
23 installs
| (1) | Free
AI-powered data structure optimization for VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

DSXpert - AI-Powered Data Structure Optimization

DSXpert is a VS Code extension that uses AI to automatically optimize code by replacing inefficient data structures with more optimal alternatives.

https://youtu.be/y7efJvrcHQQ?feature=shared

Features

  • AI-Powered Code Optimization: Automatically detects and replaces inefficient data structures
  • Multi-Language Support: Supports Python, Java, C++, JavaScript, TypeScript, C#, Ruby, PHP, Swift, Go, and Rust
  • Syntax Validation: Validates code syntax before optimization
  • Interactive Results: View original vs optimized code with detailed explanations
  • One-Click Application: Accept or reject optimizations with a single click

Installation

Watch Youtube video for demo- https://youtu.be/y7efJvrcHQQ?feature=shared

  1. Download the .vsix file from the releases
  2. In VS Code, go to Extensions (Ctrl+Shift+X)
  3. Click the "..." menu and select "Install from VSIX..."
  4. Select the downloaded file

Usage

Optimize Code

  1. Open a file with code you want to optimize
  2. Press Ctrl+Shift+P to open the command palette
  3. Type "Optimize Code" and select the command
  4. The extension will analyze your code and show optimization results

Validate Syntax

  1. Open a file with code you want to validate
  2. Press Ctrl+Shift+P to open the command palette
  3. Type "Validate Syntax" and select the command
  4. The extension will check for syntax errors

Project Structure

dsxpert/
├── src/
│   ├── extension.js              # Main extension entry point
│   ├── webview.js                # Webview content generation
│   ├── services/
│   │   └── aiService.js          # AI-related functionality
│   └── utils/
│       └── codeFormatter.js      # Code formatting utilities
├── media/
│   ├── styles.css                # Webview styles
│   ├── script.js                 # Webview scripts
│   └── logo.png                  # Extension logo
├── package.json                  # Extension manifest
└── README.md                     # This file

Architecture

Core Modules

  • extension.js: Main extension file that registers commands and handles user interactions
  • aiService.js: Contains all AI-related functionality including language detection, code optimization, and syntax validation
  • webview.js: Generates HTML content for displaying optimization results
  • codeFormatter.js: Handles code formatting for different programming languages

Key Features

  1. Language Detection: Uses AI to automatically detect the programming language of the code
  2. Code Optimization: Analyzes code and suggests optimal data structure replacements
  3. Syntax Validation: Validates code syntax before and after optimization
  4. Interactive UI: Provides a webview interface to compare original and optimized code

Development

Prerequisites

  • Node.js (v14 or higher)
  • VS Code

Setup

  1. Clone the repository
  2. Run npm install to install dependencies
  3. Press F5 in VS Code to run the extension in debug mode

Building

npm run lint          # Run ESLint
npm run test          # Run tests

Configuration

The extension uses Google's Gemini AI API for code analysis and optimization. Make sure you have a valid API key configured.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Leave Feedback!

https://youtu.be/y7efJvrcHQQ?feature=shared Head straight to the comment section!

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

Version 1.0.7

  • Converted from TypeScript to pure JavaScript
  • Improved file organization and structure
  • Enhanced code documentation
  • Removed unused dependencies
  • Better error handling and user feedback
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft