feat: add VS Code extension with terminal launcher and custom theme
Agent-Logs-Url: https://github.com/devNull-bootloader/openclaude/sessions/5c0e9230-42be-4cce-a5d6-e85d665ea72a Co-authored-by: devNull-bootloader <189463177+devNull-bootloader@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3353101e83
commit
43ba2cbfae
@@ -104,6 +104,11 @@ Best if you want local inference on Apple Silicon with Atomic Chat. See [Advance
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
## VS Code Extension
|
||||||
|
|
||||||
|
Want a native VS Code experience? Use the in-repo extension at `vscode-extension/openclaude-vscode` for one-command terminal launch and the `OpenClaude Terminal Black` theme.
|
||||||
|
|
||||||
## What Works
|
## What Works
|
||||||
|
|
||||||
- **All tools**: Bash, FileRead, FileWrite, FileEdit, Glob, Grep, WebFetch, WebSearch, Agent, MCP, LSP, NotebookEdit, Tasks
|
- **All tools**: Bash, FileRead, FileWrite, FileEdit, Glob, Grep, WebFetch, WebSearch, Agent, MCP, LSP, NotebookEdit, Tasks
|
||||||
|
|||||||
40
vscode-extension/openclaude-vscode/README.md
Normal file
40
vscode-extension/openclaude-vscode/README.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# OpenClaude VS Code Extension
|
||||||
|
|
||||||
|
A sleek, terminal-first VS Code companion for OpenClaude.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- **Launch OpenClaude instantly** in the integrated terminal via `OpenClaude: Launch in Terminal`
|
||||||
|
- **Open repository/docs quickly** via `OpenClaude: Open Repository`
|
||||||
|
- **Built-in dark theme**: `OpenClaude Terminal Black` (terminal-inspired, low-glare, neon accents)
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- VS Code `1.95+`
|
||||||
|
- `openclaude` available in your terminal PATH (`npm install -g @gitlawb/openclaude`)
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
- `OpenClaude: Launch in Terminal`
|
||||||
|
- `OpenClaude: Open Repository`
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
- `openclaude.launchCommand` (default: `openclaude`)
|
||||||
|
- `openclaude.terminalName` (default: `OpenClaude`)
|
||||||
|
- `openclaude.useOpenAIShim` (default: `true`)
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
From this folder:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run lint
|
||||||
|
```
|
||||||
|
|
||||||
|
To package (optional):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run package
|
||||||
|
```
|
||||||
|
|
||||||
76
vscode-extension/openclaude-vscode/package.json
Normal file
76
vscode-extension/openclaude-vscode/package.json
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
{
|
||||||
|
"name": "openclaude-vscode",
|
||||||
|
"displayName": "OpenClaude",
|
||||||
|
"description": "Sleek terminal-first VS Code extension for launching OpenClaude and using a matching dark hacker-style theme.",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"publisher": "devnull-bootloader",
|
||||||
|
"engines": {
|
||||||
|
"vscode": "^1.95.0"
|
||||||
|
},
|
||||||
|
"categories": [
|
||||||
|
"Themes",
|
||||||
|
"Other"
|
||||||
|
],
|
||||||
|
"activationEvents": [
|
||||||
|
"onCommand:openclaude.start",
|
||||||
|
"onCommand:openclaude.openDocs"
|
||||||
|
],
|
||||||
|
"main": "./src/extension.js",
|
||||||
|
"contributes": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"command": "openclaude.start",
|
||||||
|
"title": "OpenClaude: Launch in Terminal",
|
||||||
|
"category": "OpenClaude"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "openclaude.openDocs",
|
||||||
|
"title": "OpenClaude: Open Repository",
|
||||||
|
"category": "OpenClaude"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration": {
|
||||||
|
"title": "OpenClaude",
|
||||||
|
"properties": {
|
||||||
|
"openclaude.launchCommand": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "openclaude",
|
||||||
|
"description": "Command run in the integrated terminal when launching OpenClaude."
|
||||||
|
},
|
||||||
|
"openclaude.terminalName": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "OpenClaude",
|
||||||
|
"description": "Integrated terminal tab name for OpenClaude sessions."
|
||||||
|
},
|
||||||
|
"openclaude.useOpenAIShim": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "Set CLAUDE_CODE_USE_OPENAI=1 in launched OpenClaude terminals."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"themes": [
|
||||||
|
{
|
||||||
|
"label": "OpenClaude Terminal Black",
|
||||||
|
"uiTheme": "vs-dark",
|
||||||
|
"path": "./themes/OpenClaude-Terminal-Black.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"lint": "node --check ./src/extension.js",
|
||||||
|
"package": "npx @vscode/vsce package --no-dependencies"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"openclaude",
|
||||||
|
"terminal",
|
||||||
|
"theme",
|
||||||
|
"cli",
|
||||||
|
"llm"
|
||||||
|
],
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/devNull-bootloader/openclaude"
|
||||||
|
},
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
||||||
35
vscode-extension/openclaude-vscode/src/extension.js
Normal file
35
vscode-extension/openclaude-vscode/src/extension.js
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
const vscode = require('vscode');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {vscode.ExtensionContext} context
|
||||||
|
*/
|
||||||
|
function activate(context) {
|
||||||
|
const startCommand = vscode.commands.registerCommand('openclaude.start', async () => {
|
||||||
|
const configured = vscode.workspace.getConfiguration('openclaude');
|
||||||
|
const launchCommand = configured.get('launchCommand', 'openclaude');
|
||||||
|
const terminalName = configured.get('terminalName', 'OpenClaude');
|
||||||
|
|
||||||
|
const terminal = vscode.window.createTerminal({
|
||||||
|
name: terminalName,
|
||||||
|
env: {
|
||||||
|
CLAUDE_CODE_USE_OPENAI: configured.get('useOpenAIShim', true) ? '1' : undefined,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
terminal.show(true);
|
||||||
|
terminal.sendText(launchCommand, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
const openDocsCommand = vscode.commands.registerCommand('openclaude.openDocs', async () => {
|
||||||
|
await vscode.env.openExternal(vscode.Uri.parse('https://github.com/devNull-bootloader/openclaude'));
|
||||||
|
});
|
||||||
|
|
||||||
|
context.subscriptions.push(startCommand, openDocsCommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
function deactivate() {}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
activate,
|
||||||
|
deactivate,
|
||||||
|
};
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
{
|
||||||
|
"$schema": "vscode://schemas/color-theme",
|
||||||
|
"name": "OpenClaude Terminal Black",
|
||||||
|
"type": "dark",
|
||||||
|
"colors": {
|
||||||
|
"editor.background": "#090B10",
|
||||||
|
"editor.foreground": "#D6E2FF",
|
||||||
|
"editorCursor.foreground": "#66D9EF",
|
||||||
|
"editorLineNumber.foreground": "#3D4458",
|
||||||
|
"editorLineNumber.activeForeground": "#7F8AA3",
|
||||||
|
"editor.selectionBackground": "#1C2333",
|
||||||
|
"editor.inactiveSelectionBackground": "#141A27",
|
||||||
|
"editor.wordHighlightBackground": "#1C233344",
|
||||||
|
"editor.wordHighlightStrongBackground": "#24304B66",
|
||||||
|
"editorIndentGuide.background1": "#131825",
|
||||||
|
"editorIndentGuide.activeBackground1": "#2A3350",
|
||||||
|
"editorBracketMatch.background": "#25304B66",
|
||||||
|
"editorBracketMatch.border": "#66D9EF",
|
||||||
|
"terminal.background": "#090B10",
|
||||||
|
"terminal.foreground": "#D6E2FF",
|
||||||
|
"terminalCursor.background": "#66D9EF",
|
||||||
|
"terminalCursor.foreground": "#66D9EF",
|
||||||
|
"terminal.ansiBlack": "#090B10",
|
||||||
|
"terminal.ansiRed": "#FF6B6B",
|
||||||
|
"terminal.ansiGreen": "#89DD7C",
|
||||||
|
"terminal.ansiYellow": "#F2C14E",
|
||||||
|
"terminal.ansiBlue": "#5CA9FF",
|
||||||
|
"terminal.ansiMagenta": "#C792EA",
|
||||||
|
"terminal.ansiCyan": "#66D9EF",
|
||||||
|
"terminal.ansiWhite": "#D6E2FF",
|
||||||
|
"terminal.ansiBrightBlack": "#4A5165",
|
||||||
|
"terminal.ansiBrightRed": "#FF8787",
|
||||||
|
"terminal.ansiBrightGreen": "#A4EFA0",
|
||||||
|
"terminal.ansiBrightYellow": "#FFD479",
|
||||||
|
"terminal.ansiBrightBlue": "#86C1FF",
|
||||||
|
"terminal.ansiBrightMagenta": "#D8B0F5",
|
||||||
|
"terminal.ansiBrightCyan": "#9DE9FF",
|
||||||
|
"terminal.ansiBrightWhite": "#E8F0FF",
|
||||||
|
"statusBar.background": "#0F1420",
|
||||||
|
"statusBar.foreground": "#D6E2FF",
|
||||||
|
"activityBar.background": "#0D111B",
|
||||||
|
"activityBar.foreground": "#D6E2FF",
|
||||||
|
"sideBar.background": "#0B0F18",
|
||||||
|
"sideBar.foreground": "#B3BDD4",
|
||||||
|
"titleBar.activeBackground": "#0B0F18",
|
||||||
|
"titleBar.activeForeground": "#D6E2FF"
|
||||||
|
},
|
||||||
|
"tokenColors": [
|
||||||
|
{
|
||||||
|
"scope": ["comment", "punctuation.definition.comment"],
|
||||||
|
"settings": { "foreground": "#5A637B", "fontStyle": "italic" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"scope": ["keyword", "storage.type", "storage.modifier"],
|
||||||
|
"settings": { "foreground": "#C792EA" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"scope": ["string", "constant.other.symbol"],
|
||||||
|
"settings": { "foreground": "#89DD7C" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"scope": ["constant.numeric", "constant.language"],
|
||||||
|
"settings": { "foreground": "#F2C14E" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"scope": ["entity.name.function", "support.function"],
|
||||||
|
"settings": { "foreground": "#5CA9FF" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"scope": ["variable", "entity.name.variable"],
|
||||||
|
"settings": { "foreground": "#D6E2FF" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"scope": ["entity.name.type", "support.type", "entity.name.class"],
|
||||||
|
"settings": { "foreground": "#66D9EF" }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user