mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-25 04:24:51 -07:00
Revert "Ignore workspace settings for untrusted folders" (#6672)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { useState, useCallback, useEffect, useContext } from 'react';
|
||||
import { useState, useCallback, useEffect } from 'react';
|
||||
import { Settings, LoadedSettings } from '../../config/settings.js';
|
||||
import { FolderTrustChoice } from '../components/FolderTrustDialog.js';
|
||||
import {
|
||||
@@ -13,7 +13,6 @@ import {
|
||||
isWorkspaceTrusted,
|
||||
} from '../../config/trustedFolders.js';
|
||||
import * as process from 'process';
|
||||
import { SettingsContext } from '../contexts/SettingsContext.js';
|
||||
|
||||
export const useFolderTrust = (
|
||||
settings: LoadedSettings,
|
||||
@@ -21,7 +20,6 @@ export const useFolderTrust = (
|
||||
) => {
|
||||
const [isTrusted, setIsTrusted] = useState<boolean | undefined>(undefined);
|
||||
const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = useState(false);
|
||||
const settingsContext = useContext(SettingsContext);
|
||||
|
||||
const { folderTrust, folderTrustFeature } = settings.merged;
|
||||
useEffect(() => {
|
||||
@@ -62,9 +60,8 @@ export const useFolderTrust = (
|
||||
setIsTrusted(trusted);
|
||||
setIsFolderTrustDialogOpen(false);
|
||||
onTrustChange(trusted);
|
||||
settingsContext?.recomputeSettings();
|
||||
},
|
||||
[onTrustChange, folderTrust, folderTrustFeature, settingsContext],
|
||||
[onTrustChange, folderTrust, folderTrustFeature],
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user