File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -957,13 +957,13 @@ export class GitHubDatabaseConfigListener
957
957
958
958
const AUTOFIX_SETTING = new Setting ( "autofix" , ROOT_SETTING ) ;
959
959
960
- const AUTOFIX_PATH = new Setting ( "path" , AUTOFIX_SETTING ) ;
960
+ export const AUTOFIX_PATH = new Setting ( "path" , AUTOFIX_SETTING ) ;
961
961
962
962
export function getAutofixPath ( ) : string | undefined {
963
963
return AUTOFIX_PATH . getValue < string > ( ) || undefined ;
964
964
}
965
965
966
- const AUTOFIX_MODEL = new Setting ( "model" , AUTOFIX_SETTING ) ;
966
+ export const AUTOFIX_MODEL = new Setting ( "model" , AUTOFIX_SETTING ) ;
967
967
968
968
export function getAutofixModel ( ) : string | undefined {
969
969
return AUTOFIX_MODEL . getValue < string > ( ) || undefined ;
Original file line number Diff line number Diff line change @@ -35,7 +35,13 @@ import type { execFileSync } from "child_process";
35
35
import { tryOpenExternalFile } from "../common/vscode/external-files" ;
36
36
import type { VariantAnalysisManager } from "./variant-analysis-manager" ;
37
37
import type { VariantAnalysisResultsManager } from "./variant-analysis-results-manager" ;
38
- import { getAutofixPath , getAutofixModel , downloadTimeout } from "../config" ;
38
+ import {
39
+ getAutofixPath ,
40
+ getAutofixModel ,
41
+ downloadTimeout ,
42
+ AUTOFIX_PATH ,
43
+ AUTOFIX_MODEL ,
44
+ } from "../config" ;
39
45
import { getErrorMessage } from "../common/helpers-pure" ;
40
46
import { createTimeoutSignal } from "../common/fetch-stream" ;
41
47
import { unzipToDirectoryConcurrently } from "../common/unzip-concurrently" ;
@@ -140,7 +146,7 @@ async function findLocalAutofix(): Promise<string> {
140
146
const localAutofixPath = getAutofixPath ( ) ;
141
147
if ( ! localAutofixPath ) {
142
148
throw new Error (
143
- " Path to local autofix installation not found. Internal GitHub access required." ,
149
+ ` Path to local autofix installation not found. Make sure ${ AUTOFIX_PATH . qualifiedName } is set correctly. Internal GitHub access required.` ,
144
150
) ;
145
151
}
146
152
if ( ! ( await pathExists ( localAutofixPath ) ) ) {
@@ -709,7 +715,9 @@ async function runAutofixOnResults(
709
715
// Get autofix model from user settings.
710
716
const autofixModel = getAutofixModel ( ) ;
711
717
if ( ! autofixModel ) {
712
- throw new Error ( "Autofix model not found." ) ;
718
+ throw new Error (
719
+ `Autofix model not found. Make sure ${ AUTOFIX_MODEL . qualifiedName } is set correctly.` ,
720
+ ) ;
713
721
}
714
722
// Set up args for autofix command.
715
723
const autofixArgs = [
You can’t perform that action at this time.
0 commit comments