mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
rename scm to match void convention
This commit is contained in:
parent
e2863d3002
commit
b50079709d
5 changed files with 16 additions and 14 deletions
|
|
@ -130,8 +130,8 @@ import { IVoidUpdateService } from '../../workbench/contrib/void/common/voidUpda
|
|||
import { MetricsMainService } from '../../workbench/contrib/void/electron-main/metricsMainService.js';
|
||||
import { VoidMainUpdateService } from '../../workbench/contrib/void/electron-main/voidUpdateMainService.js';
|
||||
import { LLMMessageChannel } from '../../workbench/contrib/void/electron-main/sendLLMMessageChannel.js';
|
||||
import { IVoidSCM } from '../../workbench/contrib/void/common/voidSCM.js';
|
||||
import { VoidSCM } from '../../workbench/contrib/void/electron-main/voidSCM.js';
|
||||
import { VoidSCMService } from '../../workbench/contrib/void/electron-main/voidSCMMain.js';
|
||||
import { IVoidSCMService } from '../../workbench/contrib/void/common/voidSCMTypes.js';
|
||||
/**
|
||||
* The main VS Code application. There will only ever be one instance,
|
||||
* even if the user starts many instances (e.g. from the command line).
|
||||
|
|
@ -1103,7 +1103,7 @@ export class CodeApplication extends Disposable {
|
|||
// Void main process services (required for services with a channel for comm between browser and electron-main (node))
|
||||
services.set(IMetricsService, new SyncDescriptor(MetricsMainService, undefined, false));
|
||||
services.set(IVoidUpdateService, new SyncDescriptor(VoidMainUpdateService, undefined, false));
|
||||
services.set(IVoidSCM, new SyncDescriptor(VoidSCM, undefined, false));
|
||||
services.set(IVoidSCMService, new SyncDescriptor(VoidSCMService, undefined, false));
|
||||
|
||||
// Default Extensions Profile Init
|
||||
services.set(IExtensionsProfileScannerService, new SyncDescriptor(ExtensionsProfileScannerService, undefined, true));
|
||||
|
|
@ -1245,7 +1245,7 @@ export class CodeApplication extends Disposable {
|
|||
const sendLLMMessageChannel = new LLMMessageChannel(accessor.get(IMetricsService));
|
||||
mainProcessElectronServer.registerChannel('void-channel-llmMessage', sendLLMMessageChannel);
|
||||
|
||||
const voidSCMChannel = ProxyChannel.fromService(accessor.get(IVoidSCM), disposables);
|
||||
const voidSCMChannel = ProxyChannel.fromService(accessor.get(IVoidSCMService), disposables);
|
||||
mainProcessElectronServer.registerChannel('void-channel-scm', voidSCMChannel);
|
||||
|
||||
// Extension Host Debug Broadcasting
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ import './miscWokrbenchContrib.js'
|
|||
import './fileService.js'
|
||||
|
||||
// register source control management
|
||||
import './voidSCM.js'
|
||||
import './voidSCMService.js'
|
||||
|
||||
// ---------- common (unclear if these actually need to be imported, because they're already imported wherever they're used) ----------
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { Action2, MenuId, registerAction2 } from '../../../../platform/actions/c
|
|||
import { ContextKeyExpr, IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js'
|
||||
import { ISCMService } from '../../scm/common/scm.js'
|
||||
import { ProxyChannel } from '../../../../base/parts/ipc/common/ipc.js'
|
||||
import { IVoidSCM } from '../common/voidSCM.js'
|
||||
import { IVoidSCMService } from '../common/voidSCMTypes.js'
|
||||
import { IMainProcessService } from '../../../../platform/ipc/common/mainProcessService.js'
|
||||
import { IVoidSettingsService } from '../common/voidSettingsService.js'
|
||||
import { IConvertToLLMMessageService } from './convertToLLMMessageService.js'
|
||||
|
|
@ -12,7 +12,6 @@ import { ILLMMessageService } from '../common/sendLLMMessageService.js'
|
|||
import { ModelSelection, OverridesOfModel, ModelSelectionOptions } from '../common/voidSettingsTypes.js'
|
||||
import { gitCommitMessage_systemMessage, gitCommitMessage_userMessage } from '../common/prompt/prompts.js'
|
||||
import { LLMChatMessage } from '../common/sendLLMMessageTypes.js'
|
||||
import { ISCMRepository } from '../../../../workbench/contrib/scm/common/scm.js'
|
||||
import { generateUuid } from '../../../../base/common/uuid.js'
|
||||
import { ThrottledDelayer } from '../../../../base/common/async.js'
|
||||
import { CancellationError, isCancellationError } from '../../../../base/common/errors.js'
|
||||
|
|
@ -21,6 +20,9 @@ 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
|
||||
|
|
@ -42,7 +44,7 @@ class GenerateCommitMessageService extends Disposable implements IGenerateCommit
|
|||
private readonly execute = new ThrottledDelayer(300)
|
||||
private llmRequestId: string | null = null
|
||||
private currentRequestId: string | null = null
|
||||
private voidSCM: IVoidSCM
|
||||
private voidSCM: IVoidSCMService
|
||||
private loadingContextKey: IContextKey<boolean>
|
||||
|
||||
constructor(
|
||||
|
|
@ -56,7 +58,7 @@ class GenerateCommitMessageService extends Disposable implements IGenerateCommit
|
|||
) {
|
||||
super()
|
||||
this.loadingContextKey = this.contextKeyService.createKey(loadingContextKey, false)
|
||||
this.voidSCM = ProxyChannel.toService<IVoidSCM>(mainProcessService.getChannel('void-channel-scm'));
|
||||
this.voidSCM = ProxyChannel.toService<IVoidSCMService>(mainProcessService.getChannel('void-channel-scm'));
|
||||
}
|
||||
|
||||
override dispose() {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js';
|
||||
|
||||
export interface IVoidSCM {
|
||||
export interface IVoidSCMService {
|
||||
readonly _serviceBrand: undefined;
|
||||
/**
|
||||
* Get git diff --stat
|
||||
|
|
@ -28,4 +28,4 @@ export interface IVoidSCM {
|
|||
gitLog(path: string): Promise<string>
|
||||
}
|
||||
|
||||
export const IVoidSCM = createDecorator<IVoidSCM>('voidSCMService')
|
||||
export const IVoidSCMService = createDecorator<IVoidSCMService>('voidSCMService')
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { registerSingleton, InstantiationType } from '../../../../platform/instantiation/common/extensions.js'
|
||||
import { IVoidSCM } from '../common/voidSCM.js'
|
||||
import { IVoidSCMService } from '../common/voidSCMTypes.js'
|
||||
import { promisify } from 'util'
|
||||
import { exec as _exec } from 'child_process'
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ const getSampledDiff = async (file: string, path: string): Promise<string> => {
|
|||
return diff.slice(0, 2000)
|
||||
}
|
||||
|
||||
export class VoidSCM implements IVoidSCM {
|
||||
export class VoidSCMService implements IVoidSCMService {
|
||||
readonly _serviceBrand: undefined
|
||||
|
||||
gitStat(path: string): Promise<string> {
|
||||
|
|
@ -63,4 +63,4 @@ export class VoidSCM implements IVoidSCM {
|
|||
}
|
||||
}
|
||||
|
||||
registerSingleton(IVoidSCM, VoidSCM, InstantiationType.Delayed)
|
||||
registerSingleton(IVoidSCMService, VoidSCMService, InstantiationType.Delayed)
|
||||
Loading…
Reference in a new issue