mirror of
https://github.com/zilliztech/claude-context.git
synced 2025-10-06 01:10:02 +03:00
3.1 KiB
3.1 KiB
Contributing to VSCode Extension
Thanks for your interest in contributing to the Code Context VSCode extension!
📖 First time contributing? Please read the main contributing guide first for general setup and workflow.
VSCode Extension Development
This guide covers development specific to the VSCode extension.
Requirements
- VSCode Version: 1.74.0 or higher
Quick Commands
# Build VSCode extension
pnpm build:vscode
# Watch mode for development
pnpm dev:vscode
# Package extension
pnpm package
Development Setup
Press F5 to launch Extension Development Host
Making Changes
- Create a new branch for your feature/fix
- Make changes in the
src/directory - Run in the Extension Development Host
- Follow commit guidelines in the main guide
Project Structure
src/extension.ts- Main extension entry pointsrc/- Extension source coderesources/- Icons and assetspackage.json- Extension manifest and commandswebpack.config.js- Build configuration
Development Workflow
- Press
F5in VSCode to open Extension Development Host - Try all commands and features
- Check the Output panel for errors
- Try with different project types
Guidelines
- Follow VSCode extension best practices
- Use TypeScript for all code
- Keep UI responsive and non-blocking
- Provide user feedback for long operations
- Handle errors gracefully with user-friendly messages
Extension Features
- Semantic code search within VSCode
- Integration with Code Context core
- Progress indicators for indexing
- Search results in sidebar
Working in VSCode
Extension Development Host
- Press
F5to open a new VSCode window with your extension loaded - Try the extension in the new window with real codebases
- Check the Developer Console (
Help > Toggle Developer Tools) for errors
Manual Verification Checklist
- Index a sample codebase successfully
- Search returns relevant results
- UI components display correctly
- Configuration settings work properly
- Commands execute without errors
Testing with .vsix Package
For a more robust pre-production test (safer than F5 development mode), you can package and install the extension locally:
# Navigate to extension directory
cd packages/vscode-extension
# Package the extension (remove existing .vsix file if present)
pnpm run package
# Uninstall any existing version
code --uninstall-extension semanticcodesearch-xxx.vsix
# Install the packaged extension
code --install-extension semanticcodesearch-xxx.vsix
After installation, the extension will be available in VSCode just like any marketplace extension. This method:
- Tests the actual packaged version
- Simulates real user installation experience
- Provides better isolation from development environment
- Recommended for final testing before production release
Publishing
Note
: Only maintainers can publish to VS Code Marketplace
Questions?
- General questions: See main contributing guide
- VSCode-specific issues: Open an issue with the
vscodelabel