From 343ee5eb9483993b163cb1310717dcca2e465ebd Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Thu, 13 Feb 2025 22:59:59 -0800 Subject: [PATCH] Apply name --- .../workbench/contrib/void/browser/inlineDiffsService.ts | 4 ++-- .../workbench/contrib/void/common/voidSettingsService.ts | 4 ++-- src/vs/workbench/contrib/void/common/voidSettingsTypes.ts | 8 +++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts b/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts index ed436b61..f8449720 100644 --- a/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts +++ b/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts @@ -1238,7 +1238,7 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService { // TODO turn this into a service and provide it streamRequestIdRef.current = this._llmMessageService.sendLLMMessage({ messagesType: 'chatMessages', - useProviderFor: 'FastApply', + useProviderFor: 'Apply', logging: { loggingName: `generateSearchAndReplace` }, messages, onText: ({ fullText }) => { @@ -1478,7 +1478,7 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService { streamRequestIdRef.current = this._llmMessageService.sendLLMMessage({ messagesType: 'chatMessages', - useProviderFor: opts.from === 'ClickApply' ? 'FastApply' : 'Ctrl+K', + useProviderFor: opts.from === 'ClickApply' ? 'Apply' : 'Ctrl+K', logging: { loggingName: `startApplying - ${from}` }, messages, onText: ({ newText: newText_ }) => { diff --git a/src/vs/workbench/contrib/void/common/voidSettingsService.ts b/src/vs/workbench/contrib/void/common/voidSettingsService.ts index 4322eaf4..59089230 100644 --- a/src/vs/workbench/contrib/void/common/voidSettingsService.ts +++ b/src/vs/workbench/contrib/void/common/voidSettingsService.ts @@ -131,7 +131,7 @@ const _updatedValidatedState = (state: Omit) const defaultState = () => { const d: VoidSettingsState = { settingsOfProvider: deepClone(defaultSettingsOfProvider), - modelSelectionOfFeature: { 'Ctrl+L': null, 'Ctrl+K': null, 'Autocomplete': null, 'FastApply': null }, + modelSelectionOfFeature: { 'Ctrl+L': null, 'Ctrl+K': null, 'Autocomplete': null, 'Apply': null }, globalSettings: deepClone(defaultGlobalSettings), _modelOptions: [], // computed later } @@ -189,7 +189,7 @@ class VoidSettingsService extends Disposable implements IVoidSettingsService { const newModelSelectionOfFeature = { // A HACK BECAUSE WE ADDED FastApply - ...{ 'FastApply': null }, + ...{ 'Apply': null }, ...readS.modelSelectionOfFeature, } diff --git a/src/vs/workbench/contrib/void/common/voidSettingsTypes.ts b/src/vs/workbench/contrib/void/common/voidSettingsTypes.ts index 0a5bdc64..a31eb771 100644 --- a/src/vs/workbench/contrib/void/common/voidSettingsTypes.ts +++ b/src/vs/workbench/contrib/void/common/voidSettingsTypes.ts @@ -436,18 +436,20 @@ export const modelSelectionsEqual = (m1: ModelSelection, m2: ModelSelection) => } // this is a state -export const featureNames = ['Ctrl+L', 'Ctrl+K', 'Autocomplete', 'FastApply'] as const +export const featureNames = ['Ctrl+L', 'Ctrl+K', 'Autocomplete', 'Apply'] as const export type ModelSelectionOfFeature = Record<(typeof featureNames)[number], ModelSelection | null> export type FeatureName = keyof ModelSelectionOfFeature export const displayInfoOfFeatureName = (featureName: FeatureName) => { + // editor: if (featureName === 'Autocomplete') return 'Autocomplete' else if (featureName === 'Ctrl+K') - return 'Quick-Edit' + return 'Quick Edit' + // sidebar: else if (featureName === 'Ctrl+L') return 'Chat' - else if (featureName === 'FastApply') + else if (featureName === 'Apply') return 'Apply' else throw new Error(`Feature Name ${featureName} not allowed`)