38 Commits
1.0.3 ... 1.1.0

Author SHA1 Message Date
andrepimenta
2f792e7158 Bump version to 1.1.0
- Update changelog with all new features since 1.0.7
- Add Inline Diff Viewer section to README
- Update package.json version

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 12:56:15 +00:00
andrepimenta
97920395d1 Add WSL support for usage terminal commands
Run ccusage commands through bash -ic in WSL to properly load shell environment.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 12:55:44 +00:00
andrepimenta
2e640fa20a Use --permission-mode plan flag for plan mode
Replace message prepending with native CLI flag for cleaner implementation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 12:32:25 +00:00
andrepimenta
5136985474 Add Umami analytics events to install flow
Track user journey through installation:
- Install modal shown
- Install started
- Install success/failed

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 11:19:23 +00:00
andrepimenta
683148c4cf Add install modal for users without Claude Code CLI
Shows a clean modal when Claude Code is not installed, with one-click
installation that auto-detects platform (npm if node>=18, otherwise
curl/PowerShell). Runs silently in background with progress indicator.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 10:58:44 +00:00
andrepimenta
e18fa5e261 Improve terminal and UI experience
- Open all terminals in editor area (first column) instead of panel
- Update login message to mention Claude plan (Pro/Max) and API key
- Hide "Claude Code Chat" title when window is very small (<350px)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 00:41:53 +00:00
andrepimenta
63299008d0 Add subscription detection and usage badge to status bar
- Detect user subscription type (Pro/Max) via CLI initialize request
- Cache subscription type in globalState for persistence
- Show clickable usage badge with chart icon in status bar
- Plan users: show "Max Plan" badge, opens live usage view
- API users: show cost badge, opens recent usage history
- Badge opens terminal in editor with ccusage command

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 00:29:08 +00:00
andrepimenta
14ac46018f Run /compact command in chat instead of spawning terminal
The /compact command now executes through the chat interface using
the existing Claude process, providing a seamless user experience
instead of opening a separate terminal window.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 18:12:46 +00:00
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
16 changed files with 20325 additions and 3290 deletions

View File

@@ -10,4 +10,7 @@ vsc-extension-quickstart.md
**/*.ts
**/.vscode-test.*
backup
.claude
.claude
claude-code-chat-permissions-mcp/**
node_modules
mcp-permissions.js

View File

@@ -4,6 +4,95 @@ 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.1.0] - 2025-12-06
### 🚀 Features Added
- **Install Modal**: Added installation flow for users without Claude Code CLI
- Auto-detects when Claude Code is not installed
- One-click installation with progress indicator
- Platform-specific installation commands
- **Diff Viewer Improvements**:
- Show full diff in Edit, MultiEdit, and Write tool use messages
- Add "Open Diff" button to open VS Code's native side-by-side diff editor
- Add truncation with expand button for long diffs
- Optimize diff storage and improve Open Diff button behavior
- **Processing Indicator**: New morphing orange dot animation while Claude is working
- **Subscription Detection**: Added usage badge to status bar showing plan type (Pro, Max) or API cost
- **Conversation Compacting**: Handle `/compact` command in chat with status messages and token reset
- **Permission System**: Migrated from MCP file-based to stdio-based permission prompts
- **Plan Mode**: Now uses native `--permission-mode plan` CLI flag for cleaner implementation
### 🐛 Bug Fixes
- Fixed diff line alignment by removing ::before pseudo-elements
- Fixed auto-scroll for diff tool results
- Strip tool_use_error tags from error messages
- Improved process termination handling
### 🔧 Technical Improvements
- Run /compact command in chat instead of spawning terminal
- Improved terminal and UI experience
- Updated diff icon colors
### 📊 Analytics
- Added Umami analytics events to track install flow (modal shown, started, success/failed)
## [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

View File

@@ -20,9 +20,9 @@ Ditch the command line and experience Claude Code like never before. This extens
💾 **Conversation History** - Automatic conversation history and session management
🎨 **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, copy images or screenshots, and create custom commands
**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 Windows support and Windows Subsystem for Linux integration and compatibility
🐧 **Windows/WSL Support** - Full native Windows and WSL support
![Claude Code Chat 1 0 0](https://github.com/user-attachments/assets/5954a74c-eff7-4205-8482-6a1c9de6e102)
@@ -47,6 +47,13 @@ Ditch the command line and experience Claude Code like never before. This extens
- Real-time cost and token tracking
- Session statistics and performance metrics
### 📝 **Inline Diff Viewer** ⭐ **NEW IN V1.1**
- **Full Diff Display** - See complete file changes directly in Edit, MultiEdit, and Write messages
- **Open in VS Code Diff** - One-click button to open VS Code's native side-by-side diff editor
- **Smart Truncation** - Long diffs are truncated with an expand button for better readability
- **Syntax Highlighting** - Proper code highlighting in diff views
- **Visual Change Indicators** - Clear green/red highlighting for additions and deletions
### 🔌 **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
@@ -103,7 +110,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

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

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": "1.0.3",
"version": "1.1.0",
"publisher": "AndrePimenta",
"author": "Andre Pimenta",
"repository": {
@@ -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": [
@@ -133,7 +133,7 @@
"type": "webview",
"name": "Claude Code Chat",
"when": "true",
"icon": "icon.png",
"icon": "icon-bubble.png",
"contextualTitle": "Claude Code Chat"
}
]
@@ -143,7 +143,7 @@
{
"id": "claude-code-chat",
"title": "Claude Code Chat",
"icon": "icon.png"
"icon": "icon-bubble.png"
}
]
},

File diff suppressed because it is too large Load Diff

3336
src/script.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -28,6 +28,12 @@ const styles = `
letter-spacing: -0.3px;
}
@media (max-width: 385px) {
.header h2 {
display: none;
}
}
.controls {
display: flex;
gap: 6px;
@@ -302,6 +308,12 @@ const styles = `
border: 1px solid rgba(231, 76, 60, 0.3);
}
.permission-decision.expired {
background-color: rgba(128, 128, 128, 0.15);
color: var(--vscode-descriptionForeground);
border: 1px solid rgba(128, 128, 128, 0.3);
}
.permission-decided {
opacity: 0.7;
pointer-events: none;
@@ -321,6 +333,11 @@ const styles = `
background-color: var(--vscode-inputValidation-errorBackground);
}
.permission-decided.expired {
border-color: var(--vscode-panel-border);
background-color: rgba(128, 128, 128, 0.05);
}
/* Permissions Management */
.permissions-list {
max-height: 300px;
@@ -1076,34 +1093,25 @@ const styles = `
.diff-line {
padding: 2px 12px;
white-space: pre-wrap;
word-break: break-word;
white-space: pre;
font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
font-size: 12px;
line-height: 1.5;
}
.diff-line.context {
color: var(--vscode-editor-foreground);
opacity: 0.8;
}
.diff-line.removed {
background-color: rgba(244, 67, 54, 0.1);
border-left: 3px solid rgba(244, 67, 54, 0.6);
color: var(--vscode-foreground);
color: var(--vscode-gitDecoration-deletedResourceForeground, rgba(244, 67, 54, 0.9));
}
.diff-line.added {
background-color: rgba(76, 175, 80, 0.1);
border-left: 3px solid rgba(76, 175, 80, 0.6);
color: var(--vscode-foreground);
}
.diff-line.removed::before {
content: '';
color: rgba(244, 67, 54, 0.8);
font-weight: 600;
margin-right: 8px;
}
.diff-line.added::before {
content: '';
color: rgba(76, 175, 80, 0.8);
font-weight: 600;
margin-right: 8px;
color: var(--vscode-gitDecoration-addedResourceForeground, rgba(76, 175, 80, 0.9));
}
.diff-expand-container {
@@ -1159,7 +1167,39 @@ const styles = `
margin: 12px 0;
}
.diff-summary-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-top: 8px;
padding: 6px 12px;
border-top: 1px solid var(--vscode-panel-border);
background-color: var(--vscode-editor-background);
}
.diff-summary {
color: var(--vscode-descriptionForeground);
font-size: 11px;
font-weight: 500;
}
.diff-preview {
padding: 4px 12px;
color: var(--vscode-descriptionForeground);
font-size: 12px;
font-style: italic;
opacity: 0.9;
}
/* File path display styles */
.diff-file-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.diff-file-path {
padding: 8px 12px;
border: 1px solid var(--vscode-panel-border);
@@ -1167,6 +1207,7 @@ const styles = `
font-size: 12px;
cursor: pointer;
transition: all 0.2s ease;
flex: 1;
}
.diff-file-path:hover {
@@ -1178,6 +1219,35 @@ const styles = `
transform: translateY(1px);
}
.diff-open-btn {
display: inline-flex;
align-items: center;
gap: 5px;
background: transparent;
border: 1px solid var(--vscode-button-secondaryBorder, var(--vscode-panel-border));
color: var(--vscode-foreground);
padding: 4px 10px;
border-radius: 3px;
font-size: 11px;
cursor: pointer;
transition: all 0.2s ease;
white-space: nowrap;
}
.diff-open-btn svg {
flex-shrink: 0;
}
.diff-open-btn:hover {
background: var(--vscode-button-secondaryHoverBackground, rgba(255, 255, 255, 0.1));
border-color: var(--vscode-focusBorder);
opacity: 1;
}
.diff-open-btn:active {
transform: translateY(1px);
}
.file-path-short,
.file-path-truncated {
font-family: var(--vscode-editor-font-family);
@@ -1350,13 +1420,14 @@ const styles = `
.input-field {
width: 100%;
box-sizing: border-box;
background-color: transparent;
color: var(--vscode-input-foreground);
border: none;
padding: 12px;
outline: none;
font-family: var(--vscode-editor-font-family);
min-height: 20px;
min-height: 68px;
line-height: 1.4;
overflow-y: hidden;
resize: none;
@@ -2367,6 +2438,34 @@ const styles = `
flex: 1;
}
.status-text .usage-badge {
display: inline-flex;
align-items: center;
gap: 4px;
color: inherit;
text-decoration: none;
background: rgba(255, 255, 255, 0.08);
padding: 2px 8px 2px 8px;
border-radius: 10px;
cursor: pointer;
transition: background 0.15s, transform 0.1s;
}
.status-text .usage-badge:hover {
background: rgba(255, 255, 255, 0.15);
transform: translateY(-1px);
}
.status-text .usage-badge:active {
transform: translateY(0);
}
.status-text .usage-icon {
width: 12px;
height: 12px;
flex-shrink: 0;
}
pre {
white-space: pre-wrap;
word-wrap: break-word;
@@ -2873,6 +2972,272 @@ const styles = `
overflow: hidden;
text-overflow: ellipsis;
}
/* Processing indicator - morphing orange dot */
.processing-indicator {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
padding: 12px 0;
margin-top: 8px;
}
.processing-indicator .morph-dot {
width: 8px;
height: 8px;
background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
box-shadow: 0 0 8px rgba(255, 149, 0, 0.5);
animation: morphShape 3s ease-in-out infinite;
}
@keyframes morphShape {
0%, 100% {
border-radius: 50%;
transform: scale(1) rotate(0deg);
}
15% {
border-radius: 50%;
transform: scale(1.3) rotate(0deg);
}
25% {
border-radius: 20%;
transform: scale(1) rotate(45deg);
}
40% {
border-radius: 20%;
transform: scale(1.2) rotate(90deg);
}
50% {
border-radius: 50% 50% 50% 0%;
transform: scale(1) rotate(135deg);
}
65% {
border-radius: 0%;
transform: scale(1.3) rotate(180deg);
}
75% {
border-radius: 50% 0% 50% 0%;
transform: scale(1) rotate(270deg);
}
85% {
border-radius: 30%;
transform: scale(1.2) rotate(315deg);
}
}
/* Install Modal Styles */
.install-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
}
.install-modal-backdrop {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(2px);
}
.install-modal-content {
position: relative;
background: var(--vscode-editor-background);
border: 1px solid var(--vscode-widget-border, var(--vscode-panel-border));
border-radius: 12px;
width: 320px;
padding: 32px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
animation: installFadeIn 0.2s ease-out;
}
@keyframes installFadeIn {
from { opacity: 0; transform: scale(0.95) translateY(-8px); }
to { opacity: 1; transform: scale(1) translateY(0); }
}
.install-close-btn {
position: absolute;
top: 16px;
right: 16px;
width: 28px;
height: 28px;
background: none;
border: none;
color: var(--vscode-descriptionForeground);
cursor: pointer;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
opacity: 0.6;
transition: all 0.15s;
}
.install-close-btn:hover {
background: var(--vscode-toolbar-hoverBackground);
opacity: 1;
}
.install-body {
text-align: center;
}
.install-main {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
.install-icon-wrapper {
width: 64px;
height: 64px;
border-radius: 16px;
background: var(--vscode-button-background);
display: flex;
align-items: center;
justify-content: center;
}
.install-icon {
color: var(--vscode-button-foreground);
}
.install-text {
display: flex;
flex-direction: column;
gap: 6px;
}
.install-title {
margin: 0;
font-size: 18px;
font-weight: 600;
color: var(--vscode-foreground);
}
.install-desc {
margin: 0;
font-size: 13px;
color: var(--vscode-descriptionForeground);
line-height: 1.4;
}
.install-btn {
width: 100%;
padding: 12px 24px;
font-size: 14px;
font-weight: 500;
background: var(--vscode-button-background);
color: var(--vscode-button-foreground);
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.15s;
}
.install-btn:hover {
background: var(--vscode-button-hoverBackground);
transform: translateY(-1px);
}
.install-btn:active {
transform: translateY(0);
}
.install-link {
font-size: 13px;
color: var(--vscode-textLink-foreground);
text-decoration: none;
opacity: 0.9;
}
.install-link:hover {
text-decoration: underline;
opacity: 1;
}
.install-progress {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
padding: 20px 0;
}
.install-spinner {
width: 32px;
height: 32px;
border: 2.5px solid var(--vscode-widget-border, var(--vscode-panel-border));
border-top-color: var(--vscode-button-background);
border-radius: 50%;
animation: installSpin 0.8s linear infinite;
}
@keyframes installSpin {
to { transform: rotate(360deg); }
}
.install-progress-text {
margin: 0;
font-size: 14px;
font-weight: 500;
color: var(--vscode-foreground);
}
.install-progress-hint {
margin: 0;
font-size: 12px;
color: var(--vscode-descriptionForeground);
}
.install-success {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
padding: 20px 0;
}
.install-success-icon {
width: 56px;
height: 56px;
border-radius: 50%;
background: rgba(78, 201, 176, 0.15);
display: flex;
align-items: center;
justify-content: center;
}
.install-check {
width: 28px;
height: 28px;
color: var(--vscode-testing-iconPassed, #4ec9b0);
}
.install-success-text {
margin: 0;
font-size: 16px;
font-weight: 600;
color: var(--vscode-foreground);
}
.install-success-hint {
margin: 0;
font-size: 13px;
color: var(--vscode-descriptionForeground);
}
</style>`
export default styles

3007
src/ui.ts

File diff suppressed because it is too large Load Diff

View File

@@ -15,6 +15,7 @@
// "noUnusedParameters": true, /* Report errors on unused parameters. */
},
"exclude": [
"mcp-permissions.js"
"mcp-permissions.js",
"claude-code-chat-permissions-mcp"
]
}