102 Commits

Author SHA1 Message Date
andrepimenta
a156881a08 Migrate permission system from MCP file-based to stdio-based
Replace MCP permission server with stdio-based permission flow that
communicates directly with Claude CLI via stdin/stdout. This simplifies
the architecture and fixes permission expiration issues.

Key changes:
- Use --permission-prompt-tool stdio and --input-format stream-json
- Handle control_request messages for permission prompts
- Send control_response via stdin to approve/deny
- Check local permissions for auto-approval of pre-approved tools
- Only expire pending permissions when VS Code restarts, not panel close

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 18:07:45 +00:00
andrepimenta
0764bf8202 Improve process termination and update diff icon colors
- Add AbortController for clean process management
- Add _killProcessGroup() with platform-specific handling (Unix/Windows/WSL)
- Add _killClaudeProcess() with proper SIGTERM→wait→SIGKILL flow
- Update spawn options with detached and signal support
- Handle WSL specially with pkill inside the distro
- Update Open Diff button icon to pastel colors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 16:33:27 +00:00
andrepimenta
82899ebb40 Handle conversation compacting with status messages and token reset
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 00:22:47 +00:00
andrepimenta
abf81a1176 Add morphing orange dot processing indicator
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 00:07:08 +00:00
andrepimenta
da46d5e3d9 Optimize diff storage and improve Open Diff button behavior
- Stop storing full file contents in conversation history to reduce memory
- Compute and store only startLine/startLines for accurate line numbers on reload
- Open Diff button now only shows on last pending edit request
- Button uses stored diff data directly instead of re-reading file
- Hide button when edit result arrives (edit no longer pending)
- Show simple completion messages for Edit/MultiEdit/Write results
- Use virtual document scheme (claude-diff:) for read-only diff viewer
- Simplify tool result handling for Read/TodoWrite

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 23:19:04 +00:00
andrepimenta
d20d8667f3 Show full diff in Edit, MultiEdit, and Write tool use messages
Instead of showing simple previews like "Editing X lines" or "Writing X lines",
now displays the actual diff with added/removed lines during the tool request phase.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 16:29:58 +00:00
andrepimenta
6c37394015 Add Open Diff button to open VS Code's native side-by-side diff editor
- Add _openDiffEditor method using vscode.diff command
- Store temp files in extension's storageUri instead of workspace
- Clean up temp files when diff editor is closed
- Force side-by-side mode when opening diff
- Add Open Diff button with red/green icon in summary row

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 16:20:11 +00:00
andrepimenta
2b1ad70f6b Add truncation with expand button to diff display
Show first 6 lines of diff by default with a "Show X more lines"
button to expand and view the full diff when there are more lines.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 15:42:19 +00:00
andrepimenta
bf527bb922 Strip tool_use_error tags from error messages
Remove XML-like <tool_use_error> tags from error content before
displaying to users, showing only the clean error message text.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 15:39:00 +00:00
andrepimenta
df8188380d Fix auto-scroll for diff tool results
Replace incorrect scrollToBottom() calls with scrollToBottomIfNeeded()
to restore auto-scrolling functionality when new Edit, MultiEdit, and
Write tool results are displayed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 15:26:16 +00:00
andrepimenta
79a0b6b4b2 Fix diff line alignment by removing ::before pseudo-elements
Remove ::before pseudo-elements from added/removed diff lines that were
causing inconsistent margins and misaligned text. Lines now align properly
with consistent spacing across context, added, and removed lines.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 15:23:04 +00:00
andrepimenta
dd47efec04 Implement unified diff visualization for Edit, MultiEdit, and Write tools
- Add LCS-based diff algorithm with intelligent line matching
- Show proper line numbers from actual file positions
- Display color-coded additions (green), removals (red), and context lines
- Include summary statistics (+X lines added, -Y lines removed)
- Simplify tool use previews, show detailed diffs in tool results
- Parse tool result content to extract line numbers
- Update styling with monospace font and VS Code git colors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 15:09:20 +00:00
andrepimenta
d891070d9e Modify icon and name 2025-10-14 17:23:49 +01:00
andrepimenta
1be89d43a4 Added more built-in commands 2025-10-01 23:20:26 +01:00
andrepimenta
0abfab72a8 Add changelog 2025-08-26 23:48:38 +01:00
andrepimenta
1eacc6ff74 Remove priority 2025-08-26 23:44:29 +01:00
andrepimenta
031a2c5fc3 Fix typo 2025-07-31 00:03:16 +01:00
andrepimenta
73c4a38da1 Move script to another file 2025-07-30 23:27:24 +01:00
andrepimenta
53acc0a79f changelog 2025-07-30 03:36:58 +01:00
andrepimenta
62163dbc32 respect telemetry settings 2025-07-30 03:36:37 +01:00
andrepimenta
d225ff2596 Fix permission dialog when closing and opening 2025-07-30 03:26:59 +01:00
Andre Pimenta
ab5c393253 Merge pull request #87 from horatio-sans-serif/main
Remove maxlength limit for custom command prompt textarea
2025-07-29 01:03:06 +01:00
andrepimenta
d6a73a1a7f Add claude-code-chat-permissions-mcp folder 2025-07-29 00:58:20 +01:00
andrepimenta
5abb1fedd9 Save message in text box 2025-07-28 23:45:42 +01:00
andrepimenta
3b534cfce2 Always display history and new chat 2025-07-28 23:37:31 +01:00
andrepimenta
6bd906981b Fix new chat 2025-07-28 23:33:17 +01:00
andrepimenta
4f126641e4 Fix request start time isProcessing 2025-07-28 22:31:30 +01:00
andrepimenta
2d63eaac58 Fix close and open conversation 2025-07-28 22:09:22 +01:00
Old Yeller
f44dc28763 Remove maxlength limit for custom command prompt textarea
This fixes issue #86 by removing the maxlength attribute from the custom command prompt textarea in the slash commands modal. Users can now add much longer markdown content when creating custom slash commands, resolving the previous truncation at ~500 characters.
2025-07-28 20:14:13 +00:00
andrepimenta
2c47349282 fix: input overflow and flexible panel positioning 2025-07-22 21:50:56 +01:00
andrepimenta
43c1c85efb Fix permissions and add windows support 2025-07-20 00:07:02 +01:00
Andre Pimenta
b07857bf57 Update README.md 2025-07-16 00:00:06 +01:00
andrepimenta
c9677b6185 Changelog and readme 2025-07-15 22:58:59 +01:00
andrepimenta
2053e768a8 Yolo mode warning less scary 2025-07-14 23:59:22 +01:00
andrepimenta
980d19bcb2 Yolo mode a bit less subtle 2025-07-14 23:55:13 +01:00
andrepimenta
8a581908e3 Yolo mode 2025-07-14 23:46:03 +01:00
andrepimenta
2feaed600d Fix permissions on side panel 2025-07-14 23:15:40 +01:00
andrepimenta
826c25bdd6 Remove custom commands from settings 2025-07-14 22:18:29 +01:00
Andre Pimenta
3e8a9630bd Merge pull request #49 from andrepimenta/feature/mcp-support
Feature/mcp support
2025-07-14 22:12:13 +01:00
andrepimenta
00f4e272b6 Custom commands 2025-07-14 22:11:48 +01:00
andrepimenta
2aa7db86e7 custom commands init 2025-07-14 21:57:33 +01:00
andrepimenta
42a5ebf763 Remove MCP from settings 2025-07-14 21:26:55 +01:00
andrepimenta
5b671485a1 Fix panel sending multiple prompts 2025-07-14 20:47:16 +01:00
andrepimenta
6e9893e3f3 Working in windows 2025-07-12 13:24:25 +01:00
andrepimenta
5c33bc94c1 Fix expand 2025-07-12 00:10:10 +01:00
andrepimenta
1681bea37f Filter internal mcp 2025-07-12 00:02:12 +01:00
andrepimenta
b8e5c253a3 Popular MCPs 2025-07-11 23:57:55 +01:00
andrepimenta
2eceda51ed Edit MCP 2025-07-11 23:19:33 +01:00
andrepimenta
cba6138828 Add popular MCPs 2025-07-11 23:06:35 +01:00
andrepimenta
03b0eb96fe MCP Servers UI 2025-07-11 22:39:48 +01:00
andrepimenta
cf46551f00 Don't override mcp-servers.json 2025-07-09 14:48:18 +01:00
andrepimenta
857d55e8d1 change permissions mcp to claude-code-chat-permissions 2025-07-09 14:43:10 +01:00
andrepimenta
ae9ad4a794 Showing mcp servers 2025-07-09 14:39:33 +01:00
andrepimenta
83584fff60 MCP modal 2025-07-09 14:32:12 +01:00
andrepimenta
521f9a7d68 Only scroll to bottom if the user is at bottom 2025-07-09 13:56:35 +01:00
andrepimenta
4f5a4cb7ef Copy code block 2025-07-09 13:46:32 +01:00
andrepimenta
234516c1ef Parse code blocks 2025-07-09 13:36:25 +01:00
Andre Pimenta
b261f5cb8a Merge pull request #45 from andrepimenta/feature/permissions
Feature/permissions
2025-07-09 13:17:31 +01:00
andrepimenta
88a2ba71a1 Add permission text 2025-07-09 02:19:50 +01:00
andrepimenta
717284a979 Let user chose yolo mode when there is an error with permissions 2025-07-09 01:59:39 +01:00
andrepimenta
d9baf71e4a Use fs watch instead of polling 2025-07-09 01:36:24 +01:00
andrepimenta
bad8c9a0a8 yolo mode warning 2025-07-09 01:28:43 +01:00
andrepimenta
2e4c866da2 Yolo mode init 2025-07-09 00:32:38 +01:00
andrepimenta
1fa94b9c54 Ability to add permission 2025-07-09 00:19:14 +01:00
andrepimenta
3ec983188a Settings UI for permissions 2025-07-08 23:57:38 +01:00
andrepimenta
0b98538903 permission button ui 2025-07-08 23:32:55 +01:00
andrepimenta
44166defce check commands that make sense to use wildcards 2025-07-08 23:20:50 +01:00
andrepimenta
ddf83cf760 Nice always allow ui 2025-07-08 22:51:52 +01:00
andrepimenta
63acf5e7f9 Always allow 2025-07-08 22:29:57 +01:00
andrepimenta
ede4fbaf98 Permission UI 2025-07-08 22:01:33 +01:00
andrepimenta
06eb335f7b initial implementation 2025-07-08 21:04:10 +01:00
andrepimenta
f501d2ddc4 Move images to .claude folder 2025-07-08 13:16:24 +01:00
andrepimenta
586b004273 Enable sidebar view 2025-07-08 12:48:15 +01:00
andrepimenta
b2579ed0f8 Plan mode only for current message fix 2025-07-07 23:41:34 +01:00
andrepimenta
0bdb0ce30a Allow copy paste images and screenshots 2025-07-07 23:23:27 +01:00
andrepimenta
bb20bb29c5 Display unix time when message is Claude AI usage limit reached 2025-07-07 22:39:39 +01:00
Andre Pimenta
5a59d67021 Merge pull request #38 from tonydehnke/patch-2
fix/Update README.md - Fix Issues Link
2025-07-07 21:38:21 +01:00
Tony Dehnke
7649c9aaab Update README.md - Fix Issues Link
Fix Support - Issues Link so it goes the repo correctly.

https://github.com/andrepimenta/claude-code-chat/issues
2025-07-01 14:32:43 +02:00
andrepimenta
2d3c12ca38 Update expand UI 2025-06-24 22:58:35 +01:00
andrepimenta
c5486c6e26 Write UI 2025-06-24 22:45:58 +01:00
andrepimenta
5168aa0333 changelog 2025-06-24 18:00:02 +01:00
andrepimenta
581ad59ea2 Fix thinking 2025-06-24 17:57:42 +01:00
andrepimenta
4c57af4141 MultiEdit UI 2025-06-24 17:40:55 +01:00
andrepimenta
64767e3850 Update ui-styles.ts 2025-06-24 04:15:47 +01:00
andrepimenta
be8be4c700 Click on file container to open it 2025-06-24 03:46:44 +01:00
andrepimenta
f603b4a298 No completed messages 2025-06-24 03:43:53 +01:00
andrepimenta
e6bdc80946 Better colors 2025-06-24 03:42:22 +01:00
andrepimenta
dcd49458cb Label Todos 2025-06-24 03:36:15 +01:00
andrepimenta
0129cd1bc9 Changed to claude is working 2025-06-24 03:28:12 +01:00
andrepimenta
6dfdc24500 Hide result message for Read and Edit 2025-06-24 03:18:52 +01:00
andrepimenta
e97062ae03 File name better 2025-06-24 02:53:54 +01:00
andrepimenta
8b0bc2904b Diff preview 2025-06-24 02:39:00 +01:00
andrepimenta
bc7fa07e3a Update README 2025-06-24 02:19:36 +01:00
andrepimenta
cd2b563be4 Show WSL alert for windows users 2025-06-24 01:59:24 +01:00
andrepimenta
4bab912554 Thinking modal confirm button 2025-06-24 00:06:22 +01:00
andrepimenta
c3645e5d6b Update thinking mode switch name 2025-06-23 23:58:12 +01:00
andrepimenta
3bd35f0685 Change thinking mode modal to when it is enabled 2025-06-23 23:52:25 +01:00
andrepimenta
a1c2e6d139 Start new session when WSL config changes 2025-06-23 23:33:42 +01:00
andrepimenta
e6681c4ae1 Fix wsl commands 2025-06-23 23:28:11 +01:00
andrepimenta
300e569c96 Fix italic formatting 2025-06-21 00:58:24 +01:00
andrepimenta
cedde172bf version 2025-06-21 00:44:28 +01:00
andrepimenta
1dca03a3ec Always show new session button 2025-06-21 00:39:53 +01:00
18 changed files with 36589 additions and 1887 deletions

View File

@@ -9,3 +9,8 @@ vsc-extension-quickstart.md
**/*.map
**/*.ts
**/.vscode-test.*
backup
.claude
claude-code-chat-permissions-mcp/**
node_modules
mcp-permissions.js

View File

@@ -4,6 +4,225 @@ All notable changes to the "claude-code-chat" extension will be documented in th
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [1.0.7] - 2025-10-01
### 🚀 Features Added
- **Slash Commands Update**: Added 4 new slash commands to the commands modal
- `/add-dir` - Add additional working directories
- `/agents` - Manage custom AI subagents for specialized tasks
- `/rewind` - Rewind the conversation and/or code
- `/usage` - Show plan usage limits and rate limit status (subscription plans only)
### 📚 Documentation Updates
- Updated slash commands count from 19+ to 23+ built-in commands
- Enhanced command descriptions for better clarity:
- `/config` - Now specifies "Open the Settings interface (Config tab)"
- `/cost` - Added note about cost tracking guide for subscription-specific details
- `/status` - Expanded description to mention version, model, account, and connectivity
- `/terminal-setup` - Added clarification about iTerm2 and VSCode only support
## [1.0.6] - 2025-08-26
### 🐛 Bug Fixes
- Fixed typo in codebase
- Removed priority settings that were no longer needed
### 🔧 Technical Improvements
- Moved script to separate file for better code organization
## [1.0.5] - 2025-07-30
### 🚀 Features Added
- **MCP Integration**: Added claude-code-chat-permissions-mcp folder for enhanced permission management
- **Message Persistence**: Save message in text box for better user experience
- **UI Improvements**: Always display history and new chat options
- **Input Enhancement**: Removed maxlength limit for custom command prompt textarea
### 🐛 Bug Fixes
- Fixed new chat functionality
- Fixed request start time isProcessing issue
- Fixed close and open conversation behavior
### 🔄 Merged Pull Requests
- Merged PR #87 from horatio-sans-serif/main
## [1.0.4] - 2025-01-22
### 🐛 Bug Fixes
- Fixed input text area overflow issue by adding `box-sizing: border-box` to prevent padding from extending beyond container width
- Fixed command parameter handling for `claude-code-chat.openChat` to properly handle both ViewColumn and Uri parameters from different invocation contexts
### 🔧 Technical Improvements
- Enhanced `show()` method to accept optional ViewColumn parameter with ViewColumn.Two as default
- Added proper type checking for command parameters to handle context menu invocations
- Improved webview panel positioning with flexible column parameter support
### 🎨 UI/UX Improvements
- Resolved text input container sizing issues that caused visual overflow
- Better input field styling consistency across different VS Code themes
## [1.0.0] - 2025-01-15
### 🚀 Major Features Added
#### **Advanced Permissions Management System**
- Complete permissions framework with MCP integration for secure tool execution
- Interactive permission dialogs with detailed tool information and command previews
- "Always Allow" functionality with smart command pattern matching for common tools (npm, git, docker, etc.)
- YOLO mode for power users to skip all permission checks
- Comprehensive permissions settings UI with ability to add/remove specific permissions
- File system watcher for real-time permission request handling
- Workspace-specific permission storage and management
#### **MCP (Model Context Protocol) Server Management**
- Complete MCP server configuration interface
- Popular MCP servers gallery with one-click installation
- Custom MCP server creation with validation
- Server management (edit, delete, enable/disable)
- Automatic permissions server integration
- WSL path conversion for cross-platform compatibility
#### **Sidebar Integration & Multi-Panel Support**
- Native VS Code sidebar view with full chat functionality
- Smart panel management (auto-close main panel when sidebar opens)
- Persistent session state across panel switches
- Proper webview lifecycle management
- Activity bar integration with custom icon
#### **Image & Clipboard Enhancements**
- Drag-and-drop image support directly into chat
- Clipboard image paste functionality (Ctrl+V for screenshots)
- Multiple image selection with VS Code's native file picker
- Automatic image organization in `.claude/claude-code-chat-images/` folder
- Automatic `.gitignore` creation for image folders
- Support for PNG, JPG, JPEG, GIF, SVG, WebP, BMP formats
#### **Code Block & Syntax Improvements**
- Enhanced markdown parsing with proper code block detection
- Syntax highlighting for code blocks with language detection
- Copy-to-clipboard functionality for code blocks
- Improved inline code rendering
- Better handling of technical identifiers and underscores
### 🎨 UI/UX Improvements
#### **Settings & Configuration**
- Comprehensive settings modal with organized sections
- YOLO mode toggle with visual warnings and explanations
- Real-time settings synchronization between UI and VS Code config
- Better visual hierarchy and professional styling
- Smart configuration validation and error handling
#### **Message & Chat Interface**
- Improved message spacing and visual consistency
- Enhanced tool result display with better formatting
- Smart scrolling behavior (only auto-scroll if user is at bottom)
- Loading indicators and processing states
- Better error handling and user feedback
#### **YOLO Mode Visual Design**
- Less subtle YOLO mode section (increased opacity and size)
- Changed warning icon from ⚠️ to 🚀 for less intimidating appearance
- Soft tomato red styling that's noticeable but not scary
- Clear explanation of YOLO mode functionality
### 🔧 Technical Enhancements
#### **Session & State Management**
- Persistent session state across VS Code restarts
- Proper cleanup of resources and event listeners
- Better error handling for failed operations
- Improved memory management for large conversations
#### **Cross-Platform Compatibility**
- Enhanced WSL support with proper path conversion
- Windows-specific improvements and fixes
- Better handling of different operating system environments
- Improved subprocess management and cleanup
#### **Performance Optimizations**
- Reduced context usage with more efficient tool operations
- Better file search and workspace integration
- Optimized message handling and UI updates
- Improved extension activation and initialization times
#### **Developer Experience**
- Better error messages and debugging information
- Improved extension logging and troubleshooting
- Enhanced development workflow support
- Better TypeScript integration and type safety
### 🐛 Bug Fixes
- Fixed multiple permission prompts being sent simultaneously
- Resolved panel management issues with multiple webviews
- Fixed expand/collapse functionality for long content
- Corrected Unix timestamp parsing for usage limit messages
- Fixed WSL integration on Windows systems
- Resolved markdown parsing issues with underscores in code
- Fixed copy-paste functionality for images and code blocks
- Corrected file path handling across different platforms
### 🔄 Breaking Changes
- Permission system now requires explicit approval for tool execution (unless YOLO mode is enabled)
- Image files are now stored in `.claude/claude-code-chat-images/` instead of root directory
- MCP configuration moved to extension storage instead of global config
### 📚 Documentation & Community
- Updated README with comprehensive feature documentation
- Fixed GitHub issues link in repository
- Enhanced examples and usage guides
- Better onboarding experience for new users
## [0.1.3] - 2025-06-24
### 🚀 Features Added
#### **MultiEdit and Edit Tool Diff Display**
- Added comprehensive diff visualization for MultiEdit tool operations
- Shows file path with click-to-open functionality
- Displays multiple edits with numbered labels (Edit #1, Edit #2, etc.)
- Smart truncation handling - shows complete edits within line limits
- Expandable interface with "Show X more edits" button
- Visual separators between individual edits
- Consistent styling with existing Edit tool diff display
#### **Enhanced Tool Result Management**
- Added MultiEdit to hidden tool results list for cleaner interface
- Tool results for Read, Edit, TodoWrite, and MultiEdit now show loading states instead of uninteresting success messages
- Improved user experience by hiding redundant "Tool executed successfully" messages
### 🎨 UI/UX Improvements
#### **Thinking Intensity Modal Enhancement**
- Fixed bug where thinking mode toggle text changed before user confirmation
- Toggle text now only updates when user clicks "Confirm" button
- Preview selection highlighting still works during option exploration
- Improved user experience with proper confirmation workflow
#### **Consistent Message Spacing**
- Standardized spacing between tool messages and user/Claude messages
- Updated tool input padding from 12px to 8px to match message spacing
- Unified visual consistency across all message types
#### **Refined Visual Design**
- Changed MultiEdit edit number labels from purple to subtle professional styling
- Used VS Code theme colors for better integration
- Improved overall visual cohesion with more sober color palette
### 🔧 Technical Improvements
- Enhanced tool message formatting infrastructure
- Improved diff rendering performance for multiple edits
- Better error handling for malformed MultiEdit tool inputs
- Optimized truncation logic for complex multi-edit operations
## [0.1.2] - 2025-06-20
### 🐛 Bug Fixes
- Fixed markdown parsing bug where underscores in code identifiers (like "protein_id") were incorrectly converted to italic formatting
- Updated regex pattern to only apply italic formatting when underscores are surrounded by whitespace or at string boundaries
- Preserved proper formatting for code snippets and technical identifiers
- Always show New Chat button
## [0.1.0] - 2025-06-20
### 🚀 Major Features Added

View File

@@ -15,15 +15,16 @@ Ditch the command line and experience Claude Code like never before. This extens
## ✨ **Why Choose Claude Code Chat?**
🖥️ **No Terminal Required** - Beautiful chat interface replaces command-line interactions
**Restore Checkpoints** - Undo changes and restore code to any previous state
**Restore Checkpoints** - Undo changes and restore code to any previous state
🔌 **MCP Server Support** - Complete Model Context Protocol server management
💾 **Conversation History** - Automatic conversation history and session management
**Instant Access** - Claude Code integrated directly into VS Code
🎨 **VS Code Native** - Seamlessly matches your editor's theme and design
📁 **Smart File Context** - Reference any file with simple @ mentions
🛑 **Full Control** - Start, stop, and manage AI processes with ease
🎨 **VS Code Native** - Claude Code integrated directly into VS Code with native theming and sidebar support
🧠 **Plan and Thinking modes** - Plan First and configurable Thinking modes for better results
**Smart File/Image Context and Custom Commands** - Reference any file, paste images or screenshots and create custom commands
🤖 **Model Selection** - Choose between Opus, Sonnet, or Default based on your needs
🐧 **Windows/WSL Support** - Full native Windows and WSL support
![Claude Code Chat Cut](https://github.com/user-attachments/assets/d4ded28f-a4ed-4862-9766-c1ff89947775)
![Claude Code Chat 1 0 0](https://github.com/user-attachments/assets/5954a74c-eff7-4205-8482-6a1c9de6e102)
---
@@ -34,8 +35,9 @@ Ditch the command line and experience Claude Code like never before. This extens
- No terminal required - everything through the UI
- Real-time streaming responses with typing indicators
- One-click message copying with visual feedback
- Rich markdown support for code blocks and formatting
- Enhanced markdown support with syntax highlighting
- Auto-resizing input that grows with your content
- Copy-to-clipboard for code blocks
### ⏪ **Checkpoint & Session Management**
- **Restore Checkpoints** - Instantly undo changes and restore to any previous state
@@ -45,9 +47,36 @@ Ditch the command line and experience Claude Code like never before. This extens
- Real-time cost and token tracking
- Session statistics and performance metrics
### 🔌 **MCP Server Management** ⭐ **NEW IN V1.0**
- **Popular Servers Gallery** - One-click installation of common MCP servers
- **Custom Server Creation** - Build and configure your own MCP servers
- **Server Management** - Edit, delete, enable/disable servers through UI
- **Automatic Integration** - Seamless permissions and tool integration
- **Cross-platform Support** - Full WSL compatibility with path conversion
### 🔒 **Advanced Permissions System** ⭐ **NEW IN V1.0**
- **Interactive Permission Dialogs** - Detailed tool information with command previews
- **Always Allow Functionality** - Smart command pattern matching for common tools (npm, git, docker)
- **YOLO Mode** - Skip all permission checks for power users
- **Workspace Permissions** - Granular control over what tools can execute
- **Real-time Permission Management** - Add/remove permissions through intuitive UI
### 🖼️ **Image & Clipboard Support** ⭐ **NEW IN V1.0**
- **Drag & Drop Images** - Simply drag images directly into the chat
- **Clipboard Paste** - Press Ctrl+V to paste screenshots and copied images
- **Multiple Image Selection** - Choose multiple images through VS Code's file picker
- **Organized Storage** - Automatic organization in `.claude/claude-code-chat-images/`
- **Format Support** - PNG, JPG, JPEG, GIF, SVG, WebP, BMP formats
### 📱 **Sidebar Integration** ⭐ **NEW IN V1.0**
- **Native VS Code Sidebar** - Full chat functionality in the sidebar panel
- **Smart Panel Management** - Automatic switching between main and sidebar views
- **Persistent Sessions** - State maintained across panel switches
- **Activity Bar Integration** - Quick access from VS Code's activity bar
### 📁 **Smart File Integration**
- Type `@` to instantly search and reference workspace files
- Image attachments via file browser
- Image attachments via file browser and copy-paste screeshots
- Lightning-fast file search across your entire project
- Seamless context preservation for multi-file discussions
@@ -55,6 +84,7 @@ Ditch the command line and experience Claude Code like never before. This extens
- Visual dashboard showing all available Claude Code tools
- Real-time tool execution with formatted results
- Process control - start, stop, and monitor operations
- Smart permission system for secure tool execution
### 🎨 **VS Code Integration**
- Native theming that matches your editor
@@ -73,7 +103,7 @@ Ditch the command line and experience Claude Code like never before. This extens
### ⚡ **Slash Commands Integration**
- **Slash Commands Modal** - Type "/" to access all Claude Code commands instantly
- **19+ Built-in Commands** - /cost, /status, /config, /help, /memory, /review, and more
- **23+ Built-in Commands** - /agents, /cost, /config, /memory, /review, and more
- **Custom Command Support** - Execute any Claude Code command with session context
- **Session-Aware Execution** - All commands run with current conversation context
- **Terminal Integration** - Commands open directly in VS Code terminal with WSL support
@@ -214,31 +244,39 @@ Example configuration in `settings.json`:
- Type `@` followed by your search term to quickly reference files
- Use `@src/` to narrow down to specific directories
- Reference multiple files in one message for cross-file analysis
- **NEW**: Copy-paste images directly into chat for visual context
- **NEW**: Paste screenshots with Ctrl+V for instant visual communication
### ⚡ **Productivity Boosters**
- **Creates checkpoints automatically** before changes for safe experimentation
- **Restore instantly** if changes don't work out as expected
- **NEW**: Permission system prevents accidental tool execution
- **NEW**: YOLO mode for power users who want speed over safety
- Use the stop button to cancel long-running operations
- Copy message contents to reuse Claude's responses
- Open history panel to reference previous conversations
- **NEW**: Sidebar integration for multi-panel workflow
### 🎨 **Interface Customization**
- The UI automatically adapts to your VS Code theme
- Messages are color-coded: Green for you, Blue for Claude
- Hover over messages to reveal the copy button
- **NEW**: Enhanced code block rendering with syntax highlighting
- **NEW**: Copy-to-clipboard functionality for code blocks
---
## 🔧 **Advanced Features**
### 🛠️ **Tool Integration**
Claude Code Chat provides full access to all Claude Code tools:
- **Bash** - Execute shell commands
Claude Code Chat provides secure access to all Claude Code tools:
- **Bash** - Execute shell commands with permission controls
- **File Operations** - Read, write, and edit files
- **Search** - Grep and glob pattern matching
- **Search** - Grep and glob pattern matching across workspace
- **Web** - Fetch and search web content
- **Multi-edit** - Batch file modifications
- **While in Beta, all tools are enabled by default, use at your own risk!**
- **MCP Servers** - Extend functionality with Model Context Protocol servers
- **Permissions System** - Granular control over tool execution for security
### 📊 **Analytics & Monitoring**
- **Real-time cost tracking** - Monitor your API usage
@@ -296,7 +334,7 @@ See the [LICENSE](LICENSE) file for details.
Need help? We've got you covered:
- 🐛 **Issues**: [GitHub Issues](https://github.com/your-repo/claude-code-chat/issues)
- 🐛 **Issues**: [GitHub Issues](https://github.com/andrepimenta/claude-code-chat/issues)
---

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,212 @@
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
import * as fs from "fs";
import * as path from "path";
const server = new McpServer({
name: "Claude Code Permissions MCP Server",
version: "0.0.1",
});
// Get permissions directory from environment
const PERMISSIONS_PATH = process.env.CLAUDE_PERMISSIONS_PATH;
if (!PERMISSIONS_PATH) {
console.error("CLAUDE_PERMISSIONS_PATH environment variable not set");
process.exit(1);
}
interface WorkspacePermissions {
alwaysAllow: {
[toolName: string]: boolean | string[]; // true for all, or array of allowed commands/patterns
};
}
function getWorkspacePermissionsPath(): string | null {
if (!PERMISSIONS_PATH) return null;
return path.join(PERMISSIONS_PATH, 'permissions.json');
}
function loadWorkspacePermissions(): WorkspacePermissions {
const permissionsPath = getWorkspacePermissionsPath();
if (!permissionsPath || !fs.existsSync(permissionsPath)) {
return { alwaysAllow: {} };
}
try {
const content = fs.readFileSync(permissionsPath, 'utf8');
return JSON.parse(content);
} catch (error) {
console.error(`Error loading workspace permissions: ${error}`);
return { alwaysAllow: {} };
}
}
function isAlwaysAllowed(toolName: string, input: any): boolean {
const permissions = loadWorkspacePermissions();
const toolPermission = permissions.alwaysAllow[toolName];
if (!toolPermission) return false;
// If it's true, always allow
if (toolPermission === true) return true;
// If it's an array, check for specific commands (mainly for Bash)
if (Array.isArray(toolPermission)) {
if (toolName === 'Bash' && input.command) {
const command = input.command.trim();
return toolPermission.some(allowedCmd => {
// Support exact match or pattern matching
if (allowedCmd.includes('*')) {
// Handle patterns like "npm i *" to match both "npm i" and "npm i something"
const baseCommand = allowedCmd.replace(' *', '');
if (command === baseCommand) {
return true; // Exact match for base command
}
// Pattern match for command with arguments
const pattern = allowedCmd.replace(/\*/g, '.*');
return new RegExp(`^${pattern}$`).test(command);
}
return command.startsWith(allowedCmd);
});
}
}
return false;
}
function generateRequestId(): string {
return `req_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
}
async function requestPermission(tool_name: string, input: any): Promise<{approved: boolean, reason?: string}> {
if (!PERMISSIONS_PATH) {
console.error("Permissions path not available");
return { approved: false, reason: "Permissions path not configured" };
}
// Check if this tool/command is always allowed for this workspace
if (isAlwaysAllowed(tool_name, input)) {
console.error(`Tool ${tool_name} is always allowed for this workspace`);
return { approved: true };
}
const requestId = generateRequestId();
const requestFile = path.join(PERMISSIONS_PATH, `${requestId}.request`);
const responseFile = path.join(PERMISSIONS_PATH, `${requestId}.response`);
// Write request file
const request = {
id: requestId,
tool: tool_name,
input: input,
timestamp: new Date().toISOString()
};
try {
fs.writeFileSync(requestFile, JSON.stringify(request, null, 2));
// Use fs.watch to wait for response file
return new Promise<{approved: boolean, reason?: string}>((resolve) => {
const timeout = setTimeout(() => {
watcher.close();
// Clean up request file on timeout
if (fs.existsSync(requestFile)) {
fs.unlinkSync(requestFile);
}
console.error(`Permission request ${requestId} timed out`);
resolve({ approved: false, reason: "Permission request timed out" });
}, 3600000); // 1 hour timeout
const watcher = fs.watch(PERMISSIONS_PATH, (eventType, filename) => {
if (eventType === 'rename' && filename === path.basename(responseFile)) {
// Check if file exists (rename event can be for creation or deletion)
if (fs.existsSync(responseFile)) {
try {
const responseContent = fs.readFileSync(responseFile, 'utf8');
const response = JSON.parse(responseContent);
// Clean up response file
fs.unlinkSync(responseFile);
// Clear timeout and close watcher
clearTimeout(timeout);
watcher.close();
resolve({
approved: response.approved,
reason: response.approved ? undefined : "User rejected the request"
});
} catch (error) {
console.error(`Error reading response file: ${error}`);
// Continue watching in case of read error
}
}
}
});
// Handle watcher errors
watcher.on('error', (error) => {
console.error(`File watcher error: ${error}`);
clearTimeout(timeout);
watcher.close();
resolve({ approved: false, reason: "File watcher error" });
});
});
} catch (error) {
console.error(`Error requesting permission: ${error}`);
return { approved: false, reason: `Error processing permission request: ${error}` };
}
}
server.tool(
"approval_prompt",
'Request user permission to execute a tool via VS Code dialog',
{
tool_name: z.string().describe("The name of the tool requesting permission"),
input: z.object({}).passthrough().describe("The input for the tool"),
tool_use_id: z.string().optional().describe("The unique tool use request ID"),
},
async ({ tool_name, input }) => {
console.error(`Requesting permission for tool: ${tool_name}`);
const permissionResult = await requestPermission(tool_name, input);
const behavior = permissionResult.approved ? "allow" : "deny";
console.error(`Permission ${behavior}ed for tool: ${tool_name}`);
return {
content: [
{
type: "text",
text: behavior === "allow" ?
JSON.stringify({
behavior: behavior,
updatedInput: input,
})
:
JSON.stringify({
behavior: behavior,
message: permissionResult.reason || "Permission denied",
})
,
},
],
};
}
);
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error(`Permissions MCP Server running on stdio`);
console.error(`Using permissions directory: ${PERMISSIONS_PATH}`);
}
main().catch((error) => {
console.error("Fatal error in main():", error);
process.exit(1);
});

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,21 @@
{
"name": "claude-code-chat-permissions-mcp",
"version": "1.0.0",
"main": "dist/mcp-permissions.js",
"scripts": {
"start": "tsc && node dist/mcp-permissions.js",
"lint": "eslint . --ext .ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"@types/node": "^24.0.13",
"typescript": "^5.8.3"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.15.1",
"zod": "^3.25.76"
}
}

View File

@@ -0,0 +1,11 @@
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"target": "es6",
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist"
},
"lib": ["es2015"]
}

BIN
icon-bubble.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 KiB

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 689 KiB

After

Width:  |  Height:  |  Size: 689 KiB

13954
mcp-permissions.js Normal file

File diff suppressed because one or more lines are too long

14
package-lock.json generated
View File

@@ -1,17 +1,17 @@
{
"name": "claude-code-chat",
"version": "0.0.8",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "claude-code-chat",
"version": "0.0.8",
"version": "1.0.0",
"license": "SEE LICENSE IN LICENSE",
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "20.x",
"@types/vscode": "^1.95.0",
"@types/vscode": "^1.94.0",
"@typescript-eslint/eslint-plugin": "^8.31.1",
"@typescript-eslint/parser": "^8.31.1",
"@vscode/test-cli": "^0.0.10",
@@ -21,7 +21,7 @@
"typescript": "^5.8.3"
},
"engines": {
"vscode": "^1.95.0"
"vscode": "^1.94.0"
}
},
"node_modules/@azu/format-text": {
@@ -978,9 +978,9 @@
"dev": true
},
"node_modules/@types/vscode": {
"version": "1.100.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.100.0.tgz",
"integrity": "sha512-4uNyvzHoraXEeCamR3+fzcBlh7Afs4Ifjs4epINyUX/jvdk0uzLnwiDY35UKDKnkCHP5Nu3dljl2H8lR6s+rQw==",
"version": "1.101.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.101.0.tgz",
"integrity": "sha512-ZWf0IWa+NGegdW3iU42AcDTFHWW7fApLdkdnBqwYEtHVIBGbTu0ZNQKP/kX3Ds/uMJXIMQNAojHR4vexCEEz5Q==",
"dev": true,
"license": "MIT"
},

View File

@@ -1,8 +1,8 @@
{
"name": "claude-code-chat",
"displayName": "Claude Code Chat",
"displayName": "Chat for Claude Code",
"description": "Beautiful Claude Code Chat Interface for VS Code",
"version": "0.1.0",
"version": "1.0.7",
"publisher": "AndrePimenta",
"author": "Andre Pimenta",
"repository": {
@@ -11,7 +11,7 @@
},
"license": "SEE LICENSE IN LICENSE",
"engines": {
"vscode": "^1.95.0"
"vscode": "^1.94.0"
},
"categories": [
"Other",
@@ -56,7 +56,7 @@
"command": "claude-code-chat.openChat",
"title": "Open Claude Code Chat",
"category": "Claude Code Chat",
"icon": "icon.png"
"icon": "icon-bubble.png"
}
],
"keybindings": [
@@ -130,9 +130,10 @@
"claude-code-chat": [
{
"id": "claude-code-chat.chat",
"type": "webview",
"name": "Claude Code Chat",
"when": "true",
"icon": "icon.png",
"icon": "icon-bubble.png",
"contextualTitle": "Claude Code Chat"
}
]
@@ -142,7 +143,7 @@
{
"id": "claude-code-chat",
"title": "Claude Code Chat",
"icon": "icon.png"
"icon": "icon-bubble.png"
}
]
},
@@ -171,9 +172,19 @@
},
"claudeCodeChat.thinking.intensity": {
"type": "string",
"enum": ["think", "think-hard", "think-harder", "ultrathink"],
"enum": [
"think",
"think-hard",
"think-harder",
"ultrathink"
],
"default": "think",
"description": "Thinking mode intensity level. Higher levels provide more detailed reasoning but consume more tokens."
},
"claudeCodeChat.permissions.yoloMode": {
"type": "boolean",
"default": false,
"description": "Enable Yolo Mode to skip all permission checks. Use with caution as Claude can execute any command without asking."
}
}
}
@@ -189,7 +200,7 @@
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "20.x",
"@types/vscode": "^1.95.0",
"@types/vscode": "^1.94.0",
"@typescript-eslint/eslint-plugin": "^8.31.1",
"@typescript-eslint/parser": "^8.31.1",
"@vscode/test-cli": "^0.0.10",

File diff suppressed because it is too large Load Diff

3225
src/script.ts Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1853
src/ui.ts

File diff suppressed because it is too large Load Diff

View File

@@ -13,5 +13,9 @@
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
}
},
"exclude": [
"mcp-permissions.js",
"claude-code-chat-permissions-mcp"
]
}