diff --git a/package.json b/package.json index 4f01afb8..42951c59 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node --target=es2020", "esbuild": "yarn esbuild-base --sourcemap", "esbuild-watch": "yarn esbuild-base -- --sourcemap --watch", - "test-compile": "tsc -p ./", + "compile": "tsc -p ./", "deploy": "vsce publish --yarn", "clean": "node ./utilities/scripts/clean.js" }, diff --git a/src/commands/ICommand.ts b/src/commands/ICommand.ts new file mode 100644 index 00000000..22bf2267 --- /dev/null +++ b/src/commands/ICommand.ts @@ -0,0 +1,5 @@ +export interface ICommand { + readonly id: string + + execute(...args: any[]): void | Promise +} diff --git a/src/commands/commandManager.ts b/src/commands/commandManager.ts index aa29dead..e09523ef 100644 --- a/src/commands/commandManager.ts +++ b/src/commands/commandManager.ts @@ -1,10 +1,5 @@ import { commands, Disposable } from 'vscode' - -export interface Command { - readonly id: string - - execute(...args: any[]): void -} +import { ICommand } from '@app/commands' export class CommandManager { private readonly _commands = new Map() @@ -16,7 +11,7 @@ export class CommandManager { this._commands.clear() } - public register(command: T): Disposable { + public register(command: T): Disposable { this._registerCommand(command.id, command.execute, command) return new Disposable(() => { this._commands.delete(command.id) diff --git a/src/commands/configuration/showQuickpick.ts b/src/commands/configuration/showQuickpick.ts index 7c28318c..fbe0e7b9 100644 --- a/src/commands/configuration/showQuickpick.ts +++ b/src/commands/configuration/showQuickpick.ts @@ -1,8 +1,8 @@ import { ExtensionContext } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { ConfigurationQuickPickProvider } from '@app/providers' -export default class SettingsCommand implements Command { +export default class SettingsCommand implements ICommand { public readonly id = 'vscode-openai.configuration.show.quickpick' private _configurationQuickPick: ConfigurationQuickPickProvider public constructor(context: ExtensionContext) { @@ -10,7 +10,7 @@ export default class SettingsCommand implements Command { ConfigurationQuickPickProvider.getInstance(context) } - public async execute(): Promise { - await this._configurationQuickPick.execute() + public async execute() { + this._configurationQuickPick.execute() } } diff --git a/src/commands/conversation/copyClipboardSummary.ts b/src/commands/conversation/copyClipboardSummary.ts index 63c614bf..024c6d93 100644 --- a/src/commands/conversation/copyClipboardSummary.ts +++ b/src/commands/conversation/copyClipboardSummary.ts @@ -1,10 +1,10 @@ import { env } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { showMessageWithTimeout } from '@app/apis/vscode' import { IConversation } from '@app/interfaces' export default class ClipboardCopyConversationSummaryCommand - implements Command + implements ICommand { public readonly id = '_vscode-openai.conversation.clipboard-copy.summary' diff --git a/src/commands/conversation/delete.ts b/src/commands/conversation/delete.ts index 23c14999..61fd3e69 100644 --- a/src/commands/conversation/delete.ts +++ b/src/commands/conversation/delete.ts @@ -1,9 +1,9 @@ import { window } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { IConversation } from '@app/interfaces' import { ConversationStorageService } from '@app/services' -export default class DeleteConversationCommand implements Command { +export default class DeleteConversationCommand implements ICommand { public readonly id = '_vscode-openai.conversation.delete' public execute(args: { data: IConversation }) { diff --git a/src/commands/conversation/newPersona.ts b/src/commands/conversation/newPersona.ts index a0c9fcc6..f4dcc653 100644 --- a/src/commands/conversation/newPersona.ts +++ b/src/commands/conversation/newPersona.ts @@ -1,12 +1,12 @@ import { ExtensionContext } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { quickPickCreateConversation } from '@app/utilities/quickPicks' -export default class NewConversationPersonaCommand implements Command { +export default class NewConversationPersonaCommand implements ICommand { public readonly id = 'vscode-openai.conversation.new.persona' public constructor(private _context: ExtensionContext) {} - public async execute(): Promise { - await quickPickCreateConversation(this._context) + public async execute() { + quickPickCreateConversation(this._context) } } diff --git a/src/commands/conversation/newStandard.ts b/src/commands/conversation/newStandard.ts index f9abadaf..89ed3e2c 100644 --- a/src/commands/conversation/newStandard.ts +++ b/src/commands/conversation/newStandard.ts @@ -1,13 +1,13 @@ -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { IConversation } from '@app/interfaces' import { getSystemPersonas } from '@app/models' import { ConversationStorageService } from '@app/services' import { VSCODE_OPENAI_QP_PERSONA } from '@app/constants' -export default class NewConversationStandardCommand implements Command { +export default class NewConversationStandardCommand implements ICommand { public readonly id = 'vscode-openai.conversation.new.standard' - public async execute(): Promise { + public async execute() { const persona = getSystemPersonas().find( (a) => a.roleName === VSCODE_OPENAI_QP_PERSONA.GENERAL )! diff --git a/src/commands/conversation/openJson.ts b/src/commands/conversation/openJson.ts index a934e1e0..5ea354df 100644 --- a/src/commands/conversation/openJson.ts +++ b/src/commands/conversation/openJson.ts @@ -1,8 +1,8 @@ import { ViewColumn, window, workspace } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { IConversation } from '@app/interfaces' -export default class ShowConversationJsonCommand implements Command { +export default class ShowConversationJsonCommand implements ICommand { public readonly id = '_vscode-openai.conversation.show.json' public execute(args: { data: IConversation }) { diff --git a/src/commands/conversation/openMarkdown.ts b/src/commands/conversation/openMarkdown.ts index d33b3b55..8bac6e49 100644 --- a/src/commands/conversation/openMarkdown.ts +++ b/src/commands/conversation/openMarkdown.ts @@ -1,8 +1,8 @@ import { ViewColumn, window, workspace } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { IConversation } from '@app/interfaces' -export default class ShowConversationMarkdownCommand implements Command { +export default class ShowConversationMarkdownCommand implements ICommand { public readonly id = '_vscode-openai.conversation.show.markdown' public execute(args: { data: IConversation }) { diff --git a/src/commands/conversation/openWebview.ts b/src/commands/conversation/openWebview.ts index 3113d258..3869c6ac 100644 --- a/src/commands/conversation/openWebview.ts +++ b/src/commands/conversation/openWebview.ts @@ -1,8 +1,8 @@ -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { IConversation } from '@app/interfaces' import { ConversationStorageService } from '@app/services' -export default class OpenConversationWebviewCommand implements Command { +export default class OpenConversationWebviewCommand implements ICommand { public readonly id = '_vscode-openai.conversation.open.webview' public execute(args: { data: IConversation }) { diff --git a/src/commands/conversations/deleteAll.ts b/src/commands/conversations/deleteAll.ts index 5e4fa155..a8aa5331 100644 --- a/src/commands/conversations/deleteAll.ts +++ b/src/commands/conversations/deleteAll.ts @@ -1,11 +1,11 @@ import { window } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { ConversationStorageService } from '@app/services' -export default class DeleteAllConversationsCommand implements Command { +export default class DeleteAllConversationsCommand implements ICommand { public readonly id = '_vscode-openai.conversations.delete-all' - public async execute(): Promise { + public async execute() { window .showInformationMessage( 'Are you sure you want to delete ALL conversation?', diff --git a/src/commands/conversations/refresh.ts b/src/commands/conversations/refresh.ts index 71eaf2ca..e09423d4 100644 --- a/src/commands/conversations/refresh.ts +++ b/src/commands/conversations/refresh.ts @@ -1,10 +1,10 @@ -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { ConversationStorageService } from '@app/services' -export default class RefreshConversationsCommand implements Command { +export default class RefreshConversationsCommand implements ICommand { public readonly id = '_vscode-openai.conversations.refresh' - public async execute(): Promise { + public async execute() { ConversationStorageService.instance.refresh() } } diff --git a/src/commands/conversations/settings.ts b/src/commands/conversations/settings.ts index ea5109eb..14e6c4ef 100644 --- a/src/commands/conversations/settings.ts +++ b/src/commands/conversations/settings.ts @@ -1,10 +1,10 @@ import { commands } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' -export default class SettingsConversationsCommand implements Command { +export default class SettingsConversationsCommand implements ICommand { public readonly id = '_vscode-openai.conversations.settings' - public async execute(): Promise { + public async execute() { commands.executeCommand( 'workbench.action.openSettings', 'vscode-openai.conversation-configuration' diff --git a/src/commands/editor/codeBounty.ts b/src/commands/editor/codeBounty.ts index 4bc2c2e2..592a46ea 100644 --- a/src/commands/editor/codeBounty.ts +++ b/src/commands/editor/codeBounty.ts @@ -1,4 +1,4 @@ -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { getSystemPersonas } from '@app/models' import { compareResultsToClipboard, @@ -6,10 +6,10 @@ import { } from '@app/utilities/editor' import { VSCODE_OPENAI_QP_PERSONA } from '@app/constants' -export default class CodeBountyCommand implements Command { +export default class CodeBountyCommand implements ICommand { public readonly id = '_vscode-openai.editor.code.bounty' - public async execute(): Promise { + public async execute() { const prompt = await getEditorPrompt('editor.code.bounty') const persona = getSystemPersonas().find( (a) => a.roleName === VSCODE_OPENAI_QP_PERSONA.DEVELOPER diff --git a/src/commands/editor/codeComment.ts b/src/commands/editor/codeComment.ts index 58f5743e..a6b8da93 100644 --- a/src/commands/editor/codeComment.ts +++ b/src/commands/editor/codeComment.ts @@ -1,4 +1,4 @@ -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { getSystemPersonas } from '@app/models' import { compareResultsToClipboard, @@ -6,14 +6,14 @@ import { } from '@app/utilities/editor' import { VSCODE_OPENAI_QP_PERSONA } from '@app/constants' -export default class CodeCommentCommand implements Command { +export default class CodeCommentCommand implements ICommand { public readonly id = '_vscode-openai.editor.code.comment' - public async execute(): Promise { + public async execute() { const prompt = await getEditorPrompt('editor.code.comment') const persona = getSystemPersonas().find( (a) => a.roleName === VSCODE_OPENAI_QP_PERSONA.DEVELOPER ) - await compareResultsToClipboard(persona, prompt) + compareResultsToClipboard(persona, prompt) } } diff --git a/src/commands/editor/codeExplain.ts b/src/commands/editor/codeExplain.ts index 48ad9c2c..e26e5bd6 100644 --- a/src/commands/editor/codeExplain.ts +++ b/src/commands/editor/codeExplain.ts @@ -1,4 +1,4 @@ -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { getSystemPersonas } from '@app/models' import { compareResultsToClipboard, @@ -6,14 +6,14 @@ import { } from '@app/utilities/editor' import { VSCODE_OPENAI_QP_PERSONA } from '@app/constants' -export default class CodeExplainCommand implements Command { +export default class CodeExplainCommand implements ICommand { public readonly id = '_vscode-openai.editor.code.explain' - public async execute(): Promise { + public async execute() { const prompt = await getEditorPrompt('editor.code.explain') const persona = getSystemPersonas().find( (a) => a.roleName === VSCODE_OPENAI_QP_PERSONA.DEVELOPER ) - await compareResultsToClipboard(persona, prompt) + compareResultsToClipboard(persona, prompt) } } diff --git a/src/commands/editor/codeOptimize.ts b/src/commands/editor/codeOptimize.ts index fc5792ee..333c1357 100644 --- a/src/commands/editor/codeOptimize.ts +++ b/src/commands/editor/codeOptimize.ts @@ -1,4 +1,4 @@ -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { getSystemPersonas } from '@app/models' import { compareResultsToClipboard, @@ -6,14 +6,14 @@ import { } from '@app/utilities/editor' import { VSCODE_OPENAI_QP_PERSONA } from '@app/constants' -export default class CodeOptimizeCommand implements Command { +export default class CodeOptimizeCommand implements ICommand { public readonly id = '_vscode-openai.editor.code.optimize' - public async execute(): Promise { + public async execute() { const prompt = await getEditorPrompt('editor.code.optimize') const persona = getSystemPersonas().find( (a) => a.roleName === VSCODE_OPENAI_QP_PERSONA.DEVELOPER ) - await compareResultsToClipboard(persona, prompt) + compareResultsToClipboard(persona, prompt) } } diff --git a/src/commands/editor/codePatterns.ts b/src/commands/editor/codePatterns.ts index db92e955..401f98a8 100644 --- a/src/commands/editor/codePatterns.ts +++ b/src/commands/editor/codePatterns.ts @@ -1,4 +1,4 @@ -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { getSystemPersonas } from '@app/models' import { compareResultsToClipboard, @@ -6,14 +6,14 @@ import { } from '@app/utilities/editor' import { VSCODE_OPENAI_QP_PERSONA } from '@app/constants' -export default class CodePatternsCommand implements Command { +export default class CodePatternsCommand implements ICommand { public readonly id = '_vscode-openai.editor.code.pattern' - public async execute(): Promise { + public async execute() { const prompt = await getEditorPrompt('editor.code.pattern') const persona = getSystemPersonas().find( (a) => a.roleName === VSCODE_OPENAI_QP_PERSONA.DEVELOPER ) - await compareResultsToClipboard(persona, prompt) + compareResultsToClipboard(persona, prompt) } } diff --git a/src/commands/editor/settings.ts b/src/commands/editor/settings.ts index 37639cdb..339485fb 100644 --- a/src/commands/editor/settings.ts +++ b/src/commands/editor/settings.ts @@ -1,11 +1,11 @@ import { commands } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' -export default class SettingsCommand implements Command { +export default class SettingsCommand implements ICommand { public readonly id = '_vscode-openai.editor.settings' - public async execute(): Promise { - await commands.executeCommand( + public async execute() { + commands.executeCommand( 'workbench.action.openSettings', 'vscode-openai.editor.code' ) diff --git a/src/commands/embeddings/delete.ts b/src/commands/embeddings/delete.ts index 6059c3f8..328a5322 100644 --- a/src/commands/embeddings/delete.ts +++ b/src/commands/embeddings/delete.ts @@ -1,9 +1,9 @@ import { window } from 'vscode' import { EmbeddingTreeDataProvider, EmbeddingTreeItem } from '@app/providers' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { EmbeddingStorageService } from '@app/services' -export default class RefreshCommand implements Command { +export default class RefreshCommand implements ICommand { public readonly id = '_vscode-openai.embeddings.delete.resource' public constructor(private _instance: EmbeddingTreeDataProvider) {} diff --git a/src/commands/embeddings/newConversationEmbedding.ts b/src/commands/embeddings/newConversationEmbedding.ts index f73c44dd..e32f4081 100644 --- a/src/commands/embeddings/newConversationEmbedding.ts +++ b/src/commands/embeddings/newConversationEmbedding.ts @@ -1,10 +1,10 @@ -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { IConversation } from '@app/interfaces' import { ConversationStorageService } from '@app/services' import { EmbeddingTreeItem } from '@app/providers' import { getQueryResourcePersona } from '@app/models' -export default class NewConversationEmbeddingCommand implements Command { +export default class NewConversationEmbeddingCommand implements ICommand { public readonly id = 'vscode-openai.embeddings.new.conversation' public async execute(node: EmbeddingTreeItem) { diff --git a/src/commands/embeddings/newConversationEmbeddingAll.ts b/src/commands/embeddings/newConversationEmbeddingAll.ts index 27d87023..bef4a995 100644 --- a/src/commands/embeddings/newConversationEmbeddingAll.ts +++ b/src/commands/embeddings/newConversationEmbeddingAll.ts @@ -1,13 +1,13 @@ -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { IConversation } from '@app/interfaces' import { ConversationStorageService } from '@app/services' import { getQueryResourcePersona } from '@app/models' import { VSCODE_OPENAI_EMBEDDING } from '@app/constants' -export default class NewConversationEmbeddingAllCommand implements Command { +export default class NewConversationEmbeddingAllCommand implements ICommand { public readonly id = 'vscode-openai.embeddings.new.conversation-all' - public async execute(): Promise { + public async execute() { const persona = getQueryResourcePersona() const conversation: IConversation = await ConversationStorageService.instance.create( diff --git a/src/commands/embeddings/newEmbeddingFile.ts b/src/commands/embeddings/newEmbeddingFile.ts index 0d784f35..6dd43c87 100644 --- a/src/commands/embeddings/newEmbeddingFile.ts +++ b/src/commands/embeddings/newEmbeddingFile.ts @@ -1,5 +1,5 @@ import { OpenDialogOptions, window } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { EmbeddingStorageService } from '@app/services' import { createDebugNotification, @@ -7,10 +7,10 @@ import { } from '@app/apis/node' import { embeddingResource } from '@app/apis/embedding' -export default class NewEmbeddingFileCommand implements Command { +export default class NewEmbeddingFileCommand implements ICommand { public readonly id = '_vscode-openai.embeddings.new.file' - public async execute(): Promise { + public async execute() { // Define the options for the open dialog const options: OpenDialogOptions = { canSelectMany: true, diff --git a/src/commands/embeddings/newEmbeddingFolder.ts b/src/commands/embeddings/newEmbeddingFolder.ts index e27f6aaa..a32c71b9 100644 --- a/src/commands/embeddings/newEmbeddingFolder.ts +++ b/src/commands/embeddings/newEmbeddingFolder.ts @@ -1,13 +1,13 @@ import { OpenDialogOptions, Uri, window, workspace } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { EmbeddingStorageService } from '@app/services' import { createDebugNotification } from '@app/apis/node' import { embeddingResource } from '@app/apis/embedding' -export default class NewEmbeddingFolderCommand implements Command { +export default class NewEmbeddingFolderCommand implements ICommand { public readonly id = '_vscode-openai.embeddings.new.folder' - public async execute(): Promise { + public async execute() { const options: OpenDialogOptions = { canSelectMany: false, openLabel: 'vscode-openai index folder', @@ -15,7 +15,7 @@ export default class NewEmbeddingFolderCommand implements Command { canSelectFolders: true, } - await window.showOpenDialog(options).then((folders) => { + window.showOpenDialog(options).then((folders) => { if (folders != null && folders.length > 0) { const uriFolders = folders[0] if (!uriFolders) return diff --git a/src/commands/embeddings/refresh.ts b/src/commands/embeddings/refresh.ts index e4ecfd09..b9c74400 100644 --- a/src/commands/embeddings/refresh.ts +++ b/src/commands/embeddings/refresh.ts @@ -1,11 +1,11 @@ import { EmbeddingTreeDataProvider } from '@app/providers' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' -export default class RefreshCommand implements Command { +export default class RefreshCommand implements ICommand { public readonly id = '_vscode-openai.embeddings.refresh' public constructor(private _instance: EmbeddingTreeDataProvider) {} - public async execute(): Promise { + public async execute() { this._instance.refresh() } } diff --git a/src/commands/embeddings/settings.ts b/src/commands/embeddings/settings.ts index 78dbf924..7620b8a0 100644 --- a/src/commands/embeddings/settings.ts +++ b/src/commands/embeddings/settings.ts @@ -1,11 +1,11 @@ import { commands } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' -export default class SettingsCommand implements Command { +export default class SettingsCommand implements ICommand { public readonly id = '_vscode-openai.embeddings.settings' - public async execute(): Promise { - await commands.executeCommand( + public async execute() { + commands.executeCommand( 'workbench.action.openSettings', 'vscode-openai.embedding-configuration' ) diff --git a/src/commands/explorer/copyClipboardFolderMarkdown.ts b/src/commands/explorer/copyClipboardFolderMarkdown.ts index 4f47ce4f..ed5f129e 100644 --- a/src/commands/explorer/copyClipboardFolderMarkdown.ts +++ b/src/commands/explorer/copyClipboardFolderMarkdown.ts @@ -1,8 +1,8 @@ import { window, Uri, FileType, workspace, ProgressLocation, env } from 'vscode' import { showMessageWithTimeout } from '@app/apis/vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' -export default class ClipboardCopyFolderMarkdownCommand implements Command { +export default class ClipboardCopyFolderMarkdownCommand implements ICommand { public readonly id = '_vscode-openai.explorer.copy.markdown' private readonly maxContentSize = 1024 * 1024 // 1 MB @@ -59,10 +59,7 @@ export default class ClipboardCopyFolderMarkdownCommand implements Command { // Copy the collected content to the clipboard await env.clipboard.writeText(finalContent) - showMessageWithTimeout( - `Source code copied to clipboard.`, - 2500 - ) + showMessageWithTimeout(`Source code copied to clipboard.`, 2500) } catch (error) { if ( error instanceof Error && diff --git a/src/commands/index.ts b/src/commands/index.ts index 06c732a1..ff4a22f9 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -1,5 +1,6 @@ import { ExtensionContext, Disposable } from 'vscode' import { CommandManager } from './commandManager' + import { NewConversationStandardCommand, NewConversationPersonaCommand, @@ -38,7 +39,8 @@ import { import { ClipboardCopyMessagesMessageCommand } from './messages' import { ClipboardCopyFolderMarkdownCommand } from './explorer' -export { Command, CommandManager } from './commandManager' +export { CommandManager } from '@app/commands/commandManager' +export { ICommand } from '@app/commands/ICommand' export function registerVscodeOpenAICommands( context: ExtensionContext, commandManager: CommandManager, diff --git a/src/commands/messages/copyClipboardMessage.ts b/src/commands/messages/copyClipboardMessage.ts index 9ee38764..239509e9 100644 --- a/src/commands/messages/copyClipboardMessage.ts +++ b/src/commands/messages/copyClipboardMessage.ts @@ -1,9 +1,9 @@ import { env } from 'vscode' -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { showMessageWithTimeout } from '@app/apis/vscode' import { IChatCompletion } from '@app/interfaces' -export default class ClipboardCopyMessagesMessageCommand implements Command { +export default class ClipboardCopyMessagesMessageCommand implements ICommand { public readonly id = '_vscode-openai.messages.clipboard-copy.message' public execute(args: { data: IChatCompletion }) { diff --git a/src/commands/scm/generateComments.ts b/src/commands/scm/generateComments.ts index fbbdc8b7..6c6dc18e 100644 --- a/src/commands/scm/generateComments.ts +++ b/src/commands/scm/generateComments.ts @@ -1,14 +1,14 @@ -import { Command } from '@app/commands' +import { ICommand } from '@app/commands' import { GitService, getComments, getGitDifferences } from '@app/apis/git' import { createErrorNotification, createDebugNotification, } from '@app/apis/node' -export default class GenerateCommentsCommand implements Command { +export default class GenerateCommentsCommand implements ICommand { public readonly id = '_vscode-openai.scm.generate.comments' - public async execute(): Promise { + public async execute() { const gitService = new GitService() if (!gitService.isAvailable()) {