Remove enableAccessPathSuggestions config

Access path suggestions will now be enabled for all languages which
support it (which is currently only Ruby).
This commit is contained in:
Koen Vlaswinkel
2024-04-10 15:46:26 +02:00
parent 8a3a6d7e7e
commit acb6b8b490
2 changed files with 10 additions and 28 deletions

View File

@@ -737,10 +737,6 @@ const LLM_GENERATION_DEV_ENDPOINT = new Setting(
const MODEL_EVALUATION = new Setting("evaluation", MODEL_SETTING);
const MODEL_PACK_LOCATION = new Setting("packLocation", MODEL_SETTING);
const ENABLE_PYTHON = new Setting("enablePython", MODEL_SETTING);
const ENABLE_ACCESS_PATH_SUGGESTIONS = new Setting(
"enableAccessPathSuggestions",
MODEL_SETTING,
);
export type ModelConfigPackVariables = {
database: string;
@@ -758,7 +754,6 @@ export interface ModelConfig {
variables: ModelConfigPackVariables,
): string;
enablePython: boolean;
enableAccessPathSuggestions: boolean;
}
export class ModelConfigListener extends ConfigListener implements ModelConfig {
@@ -813,10 +808,6 @@ export class ModelConfigListener extends ConfigListener implements ModelConfig {
public get enablePython(): boolean {
return !!ENABLE_PYTHON.getValue<boolean>();
}
public get enableAccessPathSuggestions(): boolean {
return !!ENABLE_ACCESS_PATH_SUGGESTIONS.getValue<boolean>();
}
}
const GITHUB_DATABASE_SETTING = new Setting("githubDatabase", ROOT_SETTING);

View File

@@ -348,17 +348,11 @@ export class ModelEditorView extends AbstractWebview<
withProgress((progress) => this.loadMethods(progress), {
cancellable: false,
}),
// Only load access path suggestions if the feature is enabled
this.modelConfig.enableAccessPathSuggestions
? withProgress(
(progress) => this.loadAccessPathSuggestions(progress),
{
cancellable: false,
location: ProgressLocation.Window,
title: "Loading access path suggestions",
},
)
: undefined,
withProgress((progress) => this.loadAccessPathSuggestions(progress), {
cancellable: false,
location: ProgressLocation.Window,
title: "Loading access path suggestions",
}),
]);
void telemetryListener?.sendUIInteraction("model-editor-switch-modes");
@@ -416,14 +410,11 @@ export class ModelEditorView extends AbstractWebview<
await this.generateModeledMethodsOnStartup();
}),
this.loadExistingModeledMethods(),
// Only load access path suggestions if the feature is enabled
this.modelConfig.enableAccessPathSuggestions
? withProgress((progress) => this.loadAccessPathSuggestions(progress), {
cancellable: false,
location: ProgressLocation.Window,
title: "Loading access path suggestions",
})
: undefined,
withProgress((progress) => this.loadAccessPathSuggestions(progress), {
cancellable: false,
location: ProgressLocation.Window,
title: "Loading access path suggestions",
}),
]);
}