mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-23 03:24:42 -07:00
feat(cli): implement atomic writes and safety checks for trusted folders (#18406)
This commit is contained in:
@@ -48,7 +48,7 @@ export const useFolderTrust = (
|
||||
}, [folderTrust, onTrustChange, settings.merged, addItem]);
|
||||
|
||||
const handleFolderTrustSelect = useCallback(
|
||||
(choice: FolderTrustChoice) => {
|
||||
async (choice: FolderTrustChoice) => {
|
||||
const trustLevelMap: Record<FolderTrustChoice, TrustLevel> = {
|
||||
[FolderTrustChoice.TRUST_FOLDER]: TrustLevel.TRUST_FOLDER,
|
||||
[FolderTrustChoice.TRUST_PARENT]: TrustLevel.TRUST_PARENT,
|
||||
@@ -62,7 +62,7 @@ export const useFolderTrust = (
|
||||
const trustedFolders = loadTrustedFolders();
|
||||
|
||||
try {
|
||||
trustedFolders.setValue(cwd, trustLevel);
|
||||
await trustedFolders.setValue(cwd, trustLevel);
|
||||
} catch (_e) {
|
||||
coreEvents.emitFeedback(
|
||||
'error',
|
||||
|
||||
Reference in New Issue
Block a user