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
957957
958958const AUTOFIX_SETTING = new Setting ( "autofix" , ROOT_SETTING ) ;
959959
960- const AUTOFIX_PATH = new Setting ( "path" , AUTOFIX_SETTING ) ;
960+ export const AUTOFIX_PATH = new Setting ( "path" , AUTOFIX_SETTING ) ;
961961
962962export function getAutofixPath ( ) : string | undefined {
963963 return AUTOFIX_PATH . getValue < string > ( ) || undefined ;
964964}
965965
966- const AUTOFIX_MODEL = new Setting ( "model" , AUTOFIX_SETTING ) ;
966+ export const AUTOFIX_MODEL = new Setting ( "model" , AUTOFIX_SETTING ) ;
967967
968968export function getAutofixModel ( ) : string | undefined {
969969 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";
3535import { tryOpenExternalFile } from "../common/vscode/external-files" ;
3636import type { VariantAnalysisManager } from "./variant-analysis-manager" ;
3737import 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" ;
3945import { getErrorMessage } from "../common/helpers-pure" ;
4046import { createTimeoutSignal } from "../common/fetch-stream" ;
4147import { unzipToDirectoryConcurrently } from "../common/unzip-concurrently" ;
@@ -140,7 +146,7 @@ async function findLocalAutofix(): Promise<string> {
140146 const localAutofixPath = getAutofixPath ( ) ;
141147 if ( ! localAutofixPath ) {
142148 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.` ,
144150 ) ;
145151 }
146152 if ( ! ( await pathExists ( localAutofixPath ) ) ) {
@@ -709,7 +715,9 @@ async function runAutofixOnResults(
709715 // Get autofix model from user settings.
710716 const autofixModel = getAutofixModel ( ) ;
711717 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+ ) ;
713721 }
714722 // Set up args for autofix command.
715723 const autofixArgs = [
You can’t perform that action at this time.
0 commit comments