mirror of
https://github.com/voideditor/void
synced 2026-05-24 01:48:25 +00:00
commit
2f283b503a
4 changed files with 18 additions and 13 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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<IVoidSCMService>(mainProcessService.getChannel('void-channel-scm'));
|
||||
this.voidSCM = ProxyChannel.toService<IVoidSCMService>(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)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue