Override Gemini CLI trust with VScode workspace trust when in IDE (#7433)

This commit is contained in:
shrutip90
2025-09-03 11:44:26 -07:00
committed by GitHub
parent 5ccf46b5a0
commit 7c667e100e
16 changed files with 248 additions and 30 deletions

View File

@@ -0,0 +1,15 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { ideContext } from '../ide/ideContext.js';
/**
* Gets the workspace trust from the IDE if available.
* @returns A boolean if the IDE provides a trust value, otherwise undefined.
*/
export function getIdeTrust(): boolean | undefined {
return ideContext.getIdeContext()?.workspaceState?.isTrusted;
}