mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 22:14:52 -07:00
fix: hide tips when folder trust dialog is open (#7394)
Co-authored-by: Hriday Taneja <hridayt@google.com> Co-authored-by: Abhi <43648792+abhipatel12@users.noreply.github.com>
This commit is contained in:
@@ -19,6 +19,7 @@ export const useFolderTrust = (
|
||||
settings: LoadedSettings,
|
||||
config: Config,
|
||||
onTrustChange: (isTrusted: boolean | undefined) => void,
|
||||
refreshStatic: () => void,
|
||||
) => {
|
||||
const [isTrusted, setIsTrusted] = useState<boolean | undefined>(undefined);
|
||||
const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = useState(false);
|
||||
@@ -33,6 +34,12 @@ export const useFolderTrust = (
|
||||
onTrustChange(trusted);
|
||||
}, [folderTrust, onTrustChange, settings.merged]);
|
||||
|
||||
useEffect(() => {
|
||||
// When the folder trust dialog is about to open/close, we need to force a refresh
|
||||
// of the static content to ensure the Tips are hidden/shown correctly.
|
||||
refreshStatic();
|
||||
}, [isFolderTrustDialogOpen, refreshStatic]);
|
||||
|
||||
const handleFolderTrustSelect = useCallback(
|
||||
(choice: FolderTrustChoice) => {
|
||||
const trustedFolders = loadTrustedFolders();
|
||||
|
||||
Reference in New Issue
Block a user