Skip to content

Conversation

@Hi7cl4w
Copy link
Owner

@Hi7cl4w Hi7cl4w commented Nov 3, 2025

Summary

This PR adds support for VS Code's Language Model API (GitHub Copilot) as an alternative AI provider and migrates the project from ESLint to Biome for faster linting and formatting.

Features

VS Code Language Model Integration

  • ✨ Add VsCodeLlmService implementing AIService interface
  • 🔧 Add configuration options for dual AI provider support:
    • aiServiceProvider: Choose between openai or vscode-lm
    • vscodeLmModel: Select between copilot-gpt-4o or copilot-gpt-3.5-turbo
  • 🎯 Support for GitHub Copilot users without requiring OpenAI API key
  • 💾 Implement caching and comprehensive error handling for LLM requests

Biome Migration

  • 🚀 Replace ESLint and Prettier with Biome for unified, faster tooling
  • ⚙️ Configure Biome with TypeScript-friendly rules
  • 🔍 Add type checking to CI pipeline
  • �� Update VS Code settings to use Biome as default formatter

Changes

Added

  • src/service/VsCodeLlmService.ts - VS Code LLM service implementation
  • Configuration options for AI provider selection
  • Type checking script and CI integration
  • Biome configuration files

Changed

  • Updated VS Code engine requirement to ^1.90.0
  • Improved singleton patterns in service classes
  • Modernized imports with node: protocol
  • Enhanced type safety across the codebase
  • Updated documentation with setup instructions for both providers

Removed

  • ESLint and related dependencies (70 packages)
  • Prettier configuration
  • .eslintrc.json

Version

  • Bumped from 1.0.17 to 1.1.0 (minor version for new feature)

Testing

  • ✅ Biome linting passes
  • ✅ Type checking passes
  • ✅ All existing functionality maintained
  • ✅ Backward compatible with OpenAI integration

Documentation

  • Updated README with dual provider setup instructions
  • Updated CHANGELOG with comprehensive release notes
  • Added inline documentation for new features

Breaking Changes

None - fully backward compatible. OpenAI remains the default provider.

Dependencies

  • Added: @biomejs/biome (2.3.2)
  • Updated: @types/vscode (^1.105.0)
  • Removed: ESLint packages and Prettier

Closes #

- Add VsCodeLlmService class implementing AIService interface
- Integrate VS Code's built-in Language Model API (GitHub Copilot)
- Add configuration options for aiServiceProvider and vscodeLmModel
- Support both OpenAI API and VS Code LM API as AI service providers
- Implement caching and error handling for LLM requests
- Update Diffy class to use selected AI service provider
- Fix singleton constructor pattern in OpenAiService and WorkspaceService
- Use type imports for better tree-shaking
- Improve code formatting and consistency
- Fix unused variable warnings (_gitCmd prefix)
- Simplify conditional expressions with optional chaining
- Change void[] to undefined[] in EventEmitter to fix confusing void type
- Improve formatting consistency in type definitions
- Fix trailing comma formatting in git.d.ts interfaces
- Use node:path and node:assert imports with node: protocol
- Update code formatting to match project style (2 spaces, double quotes)
- Remove unused error parameter in catch block
- Improve code consistency across test files
- Format VS Code launch and tasks config files
- Use node: protocol in webpack.config.js
- Improve JSON formatting consistency (arrays, indentation)
- Fix trailing comma issues
- Add documentation for dual AI provider support (OpenAI and GitHub Copilot)
- Update configuration instructions for both providers
- Add note about GitHub Copilot subscription requirement
- Improve formatting and clarity of setup instructions
- Minor version bump for VS Code Language Model integration feature
- Adds dual AI provider support (OpenAI and GitHub Copilot)
- Document VS Code Language Model API integration
- List new configuration options for AI provider selection
- Note improvements to singleton patterns and type safety
- Add documentation updates section
- Remove .prettierrc configuration file
- Set Biome as default formatter in VS Code settings
- Enable format on save with Biome
- Normalize line endings and formatting across project
- Format configuration files (.biomeignore, workflows, VS Code settings)
- Format documentation files (README, CHANGELOG)
- Ensure consistent code style throughout codebase
- Add explicit permissions block with 'contents: read'
- Follow principle of least privilege for workflow security
- Prevents unnecessary token access to repository resources
- Replace .then().catch() with try/catch in OpenAiService for cleaner async handling
- Make VS Code command handlers async and await promises to prevent unhandled rejections
- Ensure all async operations are properly awaited in command handlers
- Improve error handling consistency across services
- Remove deprecated activationEvents (auto-generated by VS Code)
- Use type-only imports in git.d.ts for better tree-shaking
- Fix unused expression in GitService.ts (convert ternary to if-else)
- Verify all VS Code Language Model API calls are compatible with v1.90.0
- Replace 'any' with 'unknown' in catch blocks for safer error handling
- Add proper type guards for error handling in VsCodeLlmService and OpenAiService
- Update CacheService to use specific types (string | OpenAI.Chat.Completions.ChatCompletion)
- Replace 'any' type for _windowsService with WindowService | null
- Improve type safety across the codebase following TypeScript best practices
- Make constructors private to enforce singleton pattern
- Remove conditional logic from constructors that could skip initialization
- Remove definite assignment assertions (!) and use proper initialization
- Apply consistent singleton pattern across services
- Ensures all properties are always initialized correctly
- Fix Mocha constructor usage with proper type casting
- Add explicit type annotations for callback parameters
- Remove unused variable in OpenAiService
- Ensure proper return types for Promise callbacks
- Fix glob import to use named import syntax
- Use TypeScript import = require syntax for CommonJS Mocha module
- Remove unsafe any type casting for Mocha constructor
- Maintains full type safety while working with CommonJS exports
- Based on Mocha documentation and best practices
- Replace unsafe 'as Error' cast with proper type guard
- Enable noImplicitReturns and useUnknownInCatchVariables for stricter type checking
- Fixes TypeScript ESLint prefer-promise-reject-errors rule compliance
- Convert async command handlers to synchronous functions returning promises directly
- Eliminates 'async arrow function has no await expression' linting errors
- Maintains VS Code command handler compatibility (accepts Promise<void> or void)
- Keep async/await for generateCommitMessage due to withProgress complexity
- Add file exclusion patterns to filter irrelevant files from diff analysis
- Implement customizable commit message formats (conventional/gitmoji)
- Add configurable commit body inclusion with detailed explanations
- Add maximum subject line length configuration (50-200 chars)
- Enhance VsCodeLlmService with dynamic prompt generation based on settings
- Implement smart diff filtering in GitService to reduce token usage
- Add comprehensive configuration options in WorkspaceService
- Update README with advanced configuration documentation

This improves commit message quality by:
- Filtering out lock files, images, and generated files automatically
- Supporting team-specific commit conventions
- Reducing AI token usage through intelligent file selection
- Providing consistent formatting following Conventional Commits spec
Hi7cl4w and others added 2 commits November 3, 2025 15:08
…ng or encoding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ntation

- Add release.yml workflow for automated extension publishing
- Implement intelligent version bumping based on conventional commits
- Auto-generate categorized release notes
- Create GitHub releases with VSIX artifacts
- Add comprehensive release documentation (RELEASE.md)
- Add quick release guide for maintainers
- Update .gitignore to exclude macOS and editor files
- Update README with contributing section
@Hi7cl4w Hi7cl4w merged commit 98fbeb4 into main Nov 3, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants