File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -343,15 +343,3 @@ export function getRemoteControllerRepo(): string | undefined {
343343export async function setRemoteControllerRepo ( repo : string | undefined ) {
344344 await REMOTE_CONTROLLER_REPO . updateValue ( repo , ConfigurationTarget . Global ) ;
345345}
346-
347- /**
348- * Whether to insecurely load ML models from CodeQL packs.
349- *
350- * This setting is for internal users only.
351- */
352- const SHOULD_INSECURELY_LOAD_MODELS_FROM_PACKS =
353- new Setting ( 'shouldInsecurelyLoadModelsFromPacks' , RUNNING_QUERIES_SETTING ) ;
354-
355- export function shouldInsecurelyLoadMlModelsFromPacks ( ) : boolean {
356- return SHOULD_INSECURELY_LOAD_MODELS_FROM_PACKS . getValue < boolean > ( ) ;
357- }
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ import {
1010 TextDocument ,
1111 TextEditor ,
1212 Uri ,
13- window ,
14- workspace
13+ window
1514} from 'vscode' ;
1615import { ErrorCodes , ResponseError } from 'vscode-languageclient' ;
1716
@@ -643,13 +642,7 @@ export async function compileAndRunQueryAgainstDatabase(
643642 const metadata = await tryGetQueryMetadata ( cliServer , qlProgram . queryPath ) ;
644643
645644 let availableMlModels : cli . MlModelInfo [ ] = [ ] ;
646- // The `capabilities.untrustedWorkspaces.restrictedConfigurations` entry in package.json doesn't
647- // work with hidden settings, so we manually check that the workspace is trusted before looking at
648- // whether the `shouldInsecurelyLoadMlModelsFromPacks` setting is enabled.
649- if ( workspace . isTrusted &&
650- config . isCanary ( ) &&
651- config . shouldInsecurelyLoadMlModelsFromPacks ( ) &&
652- await cliServer . cliConstraints . supportsResolveMlModels ( ) ) {
645+ if ( await cliServer . cliConstraints . supportsResolveMlModels ( ) ) {
653646 try {
654647 availableMlModels = ( await cliServer . resolveMlModels ( diskWorkspaceFolders ) ) . models ;
655648 void logger . log ( `Found available ML models at the following paths: ${ availableMlModels . map ( x => `'${ x . path } '` ) . join ( ', ' ) } .` ) ;
You can’t perform that action at this time.
0 commit comments