mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 02:24:09 -07:00
feat: Enforce unified folder trust for /directory add (#17359)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
|
||||
import { useKeypress } from '../hooks/useKeypress.js';
|
||||
import { loadTrustedFolders, TrustLevel } from '../../config/trustedFolders.js';
|
||||
import { expandHomeDir } from '../utils/directoryUtils.js';
|
||||
import * as path from 'node:path';
|
||||
import { MessageType, type HistoryItem } from '../types.js';
|
||||
import type { Config } from '@google/gemini-cli-core';
|
||||
|
||||
@@ -120,7 +121,7 @@ export const MultiFolderTrustDialog: React.FC<MultiFolderTrustDialogProps> = ({
|
||||
} else {
|
||||
for (const dir of folders) {
|
||||
try {
|
||||
const expandedPath = expandHomeDir(dir);
|
||||
const expandedPath = path.resolve(expandHomeDir(dir));
|
||||
if (choice === MultiFolderTrustChoice.YES_AND_REMEMBER) {
|
||||
trustedFolders.setValue(expandedPath, TrustLevel.TRUST_FOLDER);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user