mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-26 21:14:35 -07:00
Don't commit unless user asks us to. (#16902)
This commit is contained in:
committed by
GitHub
parent
1998a713e2
commit
e03042657b
@@ -489,6 +489,7 @@ You are running outside of a sandbox container, directly on the user's system. F
|
||||
|
||||
# Git Repository
|
||||
- The current working (project) directory is being managed by a git repository.
|
||||
- NEVER stage or commit changes, unless explicitly instructed to.
|
||||
- When asked to commit changes or prepare a commit, always start by gathering information using shell commands:
|
||||
- \`git status\` to ensure that all relevant files are tracked and staged, using \`git add ...\` as needed.
|
||||
- \`git diff HEAD\` to review all changes (including unstaged changes) to tracked files in work tree since last commit.
|
||||
|
||||
@@ -54,6 +54,7 @@ describe('Core System Prompt (prompts.ts)', () => {
|
||||
let mockConfig: Config;
|
||||
beforeEach(() => {
|
||||
vi.resetAllMocks();
|
||||
vi.stubEnv('SANDBOX', undefined);
|
||||
vi.stubEnv('GEMINI_SYSTEM_MD', undefined);
|
||||
vi.stubEnv('GEMINI_WRITE_SYSTEM_MD', undefined);
|
||||
mockConfig = {
|
||||
|
||||
@@ -334,6 +334,7 @@ ${(function () {
|
||||
return `
|
||||
# Git Repository
|
||||
- The current working (project) directory is being managed by a git repository.
|
||||
- NEVER stage or commit changes, unless explicitly instructed to.
|
||||
- When asked to commit changes or prepare a commit, always start by gathering information using shell commands:
|
||||
- \`git status\` to ensure that all relevant files are tracked and staged, using \`git add ...\` as needed.
|
||||
- \`git diff HEAD\` to review all changes (including unstaged changes) to tracked files in work tree since last commit.
|
||||
|
||||
Reference in New Issue
Block a user