diff --git a/.voidrules b/.voidrules index fe8403df..55ab5af6 100644 --- a/.voidrules +++ b/.voidrules @@ -13,4 +13,4 @@ Never modify files outside src/vs/workbench/contrib/void without consulting with All types that map from a value A to B should be called bOfA. For example, if you create a hashmap that goes from toolId to toolName, it should be called toolNameOfToolId, etc. -No need to check that it compiles by running compile, just stop. +Do not run anything to validate your changes; tell the user what to do instead. diff --git a/src/vs/workbench/contrib/void/browser/voidSCMService.ts b/src/vs/workbench/contrib/void/browser/voidSCMService.ts index dfe49e1d..5b90d871 100644 --- a/src/vs/workbench/contrib/void/browser/voidSCMService.ts +++ b/src/vs/workbench/contrib/void/browser/voidSCMService.ts @@ -1,3 +1,8 @@ +/*-------------------------------------------------------------------------------------- + * Copyright 2025 Glass Devtools, Inc. All rights reserved. + * Licensed under the Apache License, Version 2.0. See LICENSE.txt for more information. + *--------------------------------------------------------------------------------------*/ + import { ThemeIcon } from '../../../../base/common/themables.js' import { localize2 } from '../../../../nls.js' import { Action2, MenuId, registerAction2 } from '../../../../platform/actions/common/actions.js' @@ -20,9 +25,6 @@ import { createDecorator, ServicesAccessor } from '../../../../platform/instanti import { Disposable } from '../../../../base/common/lifecycle.js' import { INotificationService } from '../../../../platform/notification/common/notification.js' -// this is OK, it's just a type -import type { ISCMRepository } from '../../scm/common/scm.js' - interface ModelOptions { modelSelection: ModelSelection | null modelSelectionOptions?: ModelSelectionOptions @@ -58,7 +60,7 @@ class GenerateCommitMessageService extends Disposable implements IGenerateCommit ) { super() this.loadingContextKey = this.contextKeyService.createKey(loadingContextKey, false) - this.voidSCM = ProxyChannel.toService(mainProcessService.getChannel('void-channel-scm')); + this.voidSCM = ProxyChannel.toService(mainProcessService.getChannel('void-channel-scm')) } override dispose() { @@ -104,7 +106,7 @@ class GenerateCommitMessageService extends Disposable implements IGenerateCommit if (!this.isCurrentRequest(requestId)) { throw new CancellationError() } - this.setCommitMessage(repo, commitMessage) + repo.input.setValue(commitMessage, false) } catch (error) { this.onError(error) } finally { @@ -172,10 +174,6 @@ class GenerateCommitMessageService extends Disposable implements IGenerateCommit /** UI Functions */ - private setCommitMessage(repo: ISCMRepository, commitMessage: string) { - repo.input.setValue(commitMessage, false) - } - private onError(error: any) { if (!isCancellationError(error)) { console.error(error) diff --git a/src/vs/workbench/contrib/void/common/voidSCMTypes.ts b/src/vs/workbench/contrib/void/common/voidSCMTypes.ts index 8aaba15c..e9e6bbb2 100644 --- a/src/vs/workbench/contrib/void/common/voidSCMTypes.ts +++ b/src/vs/workbench/contrib/void/common/voidSCMTypes.ts @@ -1,3 +1,8 @@ +/*-------------------------------------------------------------------------------------- + * Copyright 2025 Glass Devtools, Inc. All rights reserved. + * Licensed under the Apache License, Version 2.0. See LICENSE.txt for more information. + *--------------------------------------------------------------------------------------*/ + import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js'; export interface IVoidSCMService { diff --git a/src/vs/workbench/contrib/void/electron-main/voidSCMMainService.ts b/src/vs/workbench/contrib/void/electron-main/voidSCMMainService.ts index c32fcb08..2c8d2dd9 100644 --- a/src/vs/workbench/contrib/void/electron-main/voidSCMMainService.ts +++ b/src/vs/workbench/contrib/void/electron-main/voidSCMMainService.ts @@ -1,4 +1,8 @@ -import { registerSingleton, InstantiationType } from '../../../../platform/instantiation/common/extensions.js' +/*-------------------------------------------------------------------------------------- + * Copyright 2025 Glass Devtools, Inc. All rights reserved. + * Licensed under the Apache License, Version 2.0. See LICENSE.txt for more information. + *--------------------------------------------------------------------------------------*/ + import { promisify } from 'util' import { exec as _exec } from 'child_process' import { IVoidSCMService } from '../common/voidSCMTypes.js' @@ -76,5 +80,3 @@ export class VoidSCMService implements IVoidSCMService { return git('git log --pretty=format:"%h|%s|%ad" --date=short --no-merges -n 5', path) } } - -registerSingleton(IVoidSCMService, VoidSCMService, InstantiationType.Delayed)