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
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,
|
||||
};
|
||||
Reference in New Issue
Block a user