mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-12 14:22:00 -07:00
Override Gemini CLI trust with VScode workspace trust when in IDE (#7433)
This commit is contained in:
15
packages/core/src/utils/ide-trust.ts
Normal file
15
packages/core/src/utils/ide-trust.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user