Add support for trustedFolders.json config file (#6073)

This commit is contained in:
shrutip90
2025-08-13 11:06:31 -07:00
committed by GitHub
parent b61a63aef4
commit 38876b738f
8 changed files with 644 additions and 63 deletions

View File

@@ -35,6 +35,8 @@ import { getCliVersion } from '../utils/version.js';
import { loadSandboxConfig } from './sandboxConfig.js';
import { resolvePath } from '../utils/resolvePath.js';
import { isWorkspaceTrusted } from './trustedFolders.js';
// Simple console logger for now - replace with actual logger if available
const logger = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -317,8 +319,9 @@ export async function loadCliConfig(
const ideMode = settings.ideMode ?? false;
const folderTrustFeature = settings.folderTrustFeature ?? false;
const folderTrustSetting = settings.folderTrust ?? false;
const folderTrustSetting = settings.folderTrust ?? true;
const folderTrust = folderTrustFeature && folderTrustSetting;
const trustedFolder = folderTrust ? isWorkspaceTrusted() : true;
const allExtensions = annotateActiveExtensions(
extensions,
@@ -523,6 +526,7 @@ export async function loadCliConfig(
folderTrustFeature,
folderTrust,
interactive,
trustedFolder,
});
}