Merge pull request #719 from voideditor/mcp

temp fixes
This commit is contained in:
Andrew Pareles 2025-06-06 01:37:06 -07:00 committed by GitHub
commit 2f283b503a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 13 deletions

View file

@ -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.

View file

@ -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)

View file

@ -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 {

View file

@ -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)