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:
@@ -737,10 +737,6 @@ const LLM_GENERATION_DEV_ENDPOINT = new Setting(
|
|||||||
const MODEL_EVALUATION = new Setting("evaluation", MODEL_SETTING);
|
const MODEL_EVALUATION = new Setting("evaluation", MODEL_SETTING);
|
||||||
const MODEL_PACK_LOCATION = new Setting("packLocation", MODEL_SETTING);
|
const MODEL_PACK_LOCATION = new Setting("packLocation", MODEL_SETTING);
|
||||||
const ENABLE_PYTHON = new Setting("enablePython", MODEL_SETTING);
|
const ENABLE_PYTHON = new Setting("enablePython", MODEL_SETTING);
|
||||||
const ENABLE_ACCESS_PATH_SUGGESTIONS = new Setting(
|
|
||||||
"enableAccessPathSuggestions",
|
|
||||||
MODEL_SETTING,
|
|
||||||
);
|
|
||||||
|
|
||||||
export type ModelConfigPackVariables = {
|
export type ModelConfigPackVariables = {
|
||||||
database: string;
|
database: string;
|
||||||
@@ -758,7 +754,6 @@ export interface ModelConfig {
|
|||||||
variables: ModelConfigPackVariables,
|
variables: ModelConfigPackVariables,
|
||||||
): string;
|
): string;
|
||||||
enablePython: boolean;
|
enablePython: boolean;
|
||||||
enableAccessPathSuggestions: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ModelConfigListener extends ConfigListener implements ModelConfig {
|
export class ModelConfigListener extends ConfigListener implements ModelConfig {
|
||||||
@@ -813,10 +808,6 @@ export class ModelConfigListener extends ConfigListener implements ModelConfig {
|
|||||||
public get enablePython(): boolean {
|
public get enablePython(): boolean {
|
||||||
return !!ENABLE_PYTHON.getValue<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);
|
const GITHUB_DATABASE_SETTING = new Setting("githubDatabase", ROOT_SETTING);
|
||||||
|
|||||||
@@ -348,17 +348,11 @@ export class ModelEditorView extends AbstractWebview<
|
|||||||
withProgress((progress) => this.loadMethods(progress), {
|
withProgress((progress) => this.loadMethods(progress), {
|
||||||
cancellable: false,
|
cancellable: false,
|
||||||
}),
|
}),
|
||||||
// Only load access path suggestions if the feature is enabled
|
withProgress((progress) => this.loadAccessPathSuggestions(progress), {
|
||||||
this.modelConfig.enableAccessPathSuggestions
|
cancellable: false,
|
||||||
? withProgress(
|
location: ProgressLocation.Window,
|
||||||
(progress) => this.loadAccessPathSuggestions(progress),
|
title: "Loading access path suggestions",
|
||||||
{
|
}),
|
||||||
cancellable: false,
|
|
||||||
location: ProgressLocation.Window,
|
|
||||||
title: "Loading access path suggestions",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
: undefined,
|
|
||||||
]);
|
]);
|
||||||
void telemetryListener?.sendUIInteraction("model-editor-switch-modes");
|
void telemetryListener?.sendUIInteraction("model-editor-switch-modes");
|
||||||
|
|
||||||
@@ -416,14 +410,11 @@ export class ModelEditorView extends AbstractWebview<
|
|||||||
await this.generateModeledMethodsOnStartup();
|
await this.generateModeledMethodsOnStartup();
|
||||||
}),
|
}),
|
||||||
this.loadExistingModeledMethods(),
|
this.loadExistingModeledMethods(),
|
||||||
// Only load access path suggestions if the feature is enabled
|
withProgress((progress) => this.loadAccessPathSuggestions(progress), {
|
||||||
this.modelConfig.enableAccessPathSuggestions
|
cancellable: false,
|
||||||
? withProgress((progress) => this.loadAccessPathSuggestions(progress), {
|
location: ProgressLocation.Window,
|
||||||
cancellable: false,
|
title: "Loading access path suggestions",
|
||||||
location: ProgressLocation.Window,
|
}),
|
||||||
title: "Loading access path suggestions",
|
|
||||||
})
|
|
||||||
: undefined,
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user