Files
openchamber/packages/vscode/webview/api/vscode.ts
T

14 lines
463 B
TypeScript
Raw Normal View History

2026-01-06 21:31:04 +02:00
import type { VSCodeAPI } from '@openchamber/ui/lib/api/types';
2026-01-03 22:11:16 +01:00
import { executeVSCodeCommand } from './bridge';
export const createVSCodeActionsAPI = (): VSCodeAPI => ({
async executeCommand(command: string, ...args: unknown[]): Promise<unknown> {
const result = await executeVSCodeCommand(command, args);
return result.result;
},
async openAgentManager(): Promise<void> {
await executeVSCodeCommand('openchamber.openAgentManager');
},
});