A comprehensive VS Code extension for adding and managing code comments.
Description
Comment Companion is a powerful utility that enables users to easily add annotations to their local files. This tool streamlines the process of commenting on code or documents with features including comment management, and GitLab Merge Request integration.
Features
🔧 Core Comment Management
Add Comments: Create inline comments on any line in your code files
Edit Comments: Modify existing comments with in-place editing
Delete Comments: Remove individual comments or comment threads
Comment Persistence: Automatically save and restore comments between VS Code sessions
Comment Navigation: Expand/collapse all comments for better code visibility
🤖 AI Integration
Language Model Tool: Provides add_file_comments tool for AI models to add comments to specific code segments
Intelligent Code Commenting: AI can automatically find and comment on specific code patterns or functions
Batch Comment Operations: Add multiple comments to different parts of a file in a single operation
⚙️ Configuration & Management
Flexible Configuration: Customize AI settings, GitLab credentials, and other preferences
Workspace-Specific Settings: Comments are saved per workspace in .comment-companion/ directory
Extension Activation Control: Enable/disable comment functionality as needed
File Watching: Automatic synchronization when comment files are modified externally
Available Commands
Access these commands through the VS Code Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
Comment Companion: Remove All Comments - Clear all comments from workspace
Comment Companion: Collapse All Comments - Collapse all comment threads
Comment Companion: Expand All Comments - Expand all comment threads
Comment Companion: Submit comments to Gitlab MR - Send comments to GitLab Merge Request
Getting Started
Install the Extension: Install Comment Companion from the VS Code marketplace
Activate Comments: Run Comment Companion: Activate from the command palette
Add Your First Comment: Right-click on any line and select "Comment" or use the comment icon in the editor
Use with AI Models: The extension provides tools for AI models to add comments automatically to specific code segments
Usage
Adding Comments
Place your cursor on the line you want to comment
Click the "+" icon in the gutter
Type your comment and save
Comment Storage
Comments are stored locally in your workspace under .comment-companion/comments.json and can be exported to XML format for sharing or documentation purposes.