Skip to content

Commit 92e74bf

Browse files
committed
fix(gemini): bypass tool permissions and fix trustedFolders format
1 parent 1730be4 commit 92e74bf

File tree

1 file changed

+6
-18
lines changed
  • packages/lib/src/core/templates-entrypoint

1 file changed

+6
-18
lines changed

packages/lib/src/core/templates-entrypoint/gemini.ts

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -99,31 +99,19 @@ if [[ ! -f "$GEMINI_CONFIG_SETTINGS_FILE" ]]; then
9999
"folderTrust": {
100100
"enabled": false
101101
}
102-
}
102+
},
103+
"approvalPolicy": "never"
103104
}
104105
EOF
105106
fi
106107
107108
# Pre-trust important directories in trustedFolders.json
109+
# Use flat mapping as required by recent Gemini CLI versions
108110
cat <<'EOF' > "$GEMINI_TRUST_SETTINGS_FILE"
109111
{
110-
"folders": [
111-
{
112-
"path": "/",
113-
"trustState": "trusted",
114-
"isRecursive": true
115-
},
116-
{
117-
"path": "${config.geminiHome}",
118-
"trustState": "trusted",
119-
"isRecursive": true
120-
},
121-
{
122-
"path": "${config.targetDir}",
123-
"trustState": "trusted",
124-
"isRecursive": true
125-
}
126-
]
112+
"/": "TRUST_FOLDER",
113+
"${config.geminiHome}": "TRUST_FOLDER",
114+
"${config.targetDir}": "TRUST_FOLDER"
127115
}
128116
EOF
129117

0 commit comments

Comments
 (0)