Skip to content

Commit b43f31d

Browse files
krsjenmtwerdnumNTaylorMullenSandyTao520galdawave
authored
Merge to commit Pull of request into krsjenmt/patch-1 (#31)
* Fix newline insertion bug in replace tool (google-gemini#18595) * fix(evals): update save_memory evals and simplify tool description (google-gemini#18610) * chore(evals): update validation_fidelity_pre_existing_errors to USUALLY_PASSES (google-gemini#18617) * fix: shorten tool call IDs and fix duplicate tool name in truncated output filenames (google-gemini#18600) * feat(cli): implement atomic writes and safety checks for trusted folders (google-gemini#18406) * Remove relative docs links (google-gemini#18650) * docs: add legacy snippets convention to GEMINI.md (google-gemini#18597) * fix(chore): Support linting for cjs (google-gemini#18639) Co-authored-by: Gal Zahavi <[email protected]> * feat: move shell efficiency guidelines to tool description (google-gemini#18614) * Added "" as default value, since getText() used to expect a string only and thus crashed when undefined... Fixes google-gemini#18076 (google-gemini#18099) * Allow @-includes outside of workspaces (with permission) (google-gemini#18470) * chore: make `ask_user` header description more clear (google-gemini#18657) * bug(core): Fix minor bug in migration logic. (google-gemini#18661) * Harded code assist converter. (google-gemini#18656) * refactor(core): model-dependent tool definitions (google-gemini#18563) * feat: enable plan mode experiment in settings (google-gemini#18636) * refactor: push isValidPath() into parsePastedPaths() (google-gemini#18664) * fix(cli): correct 'esc to cancel' position and restore duration display (google-gemini#18534) * feat(cli): add DevTools integration with gemini-cli-devtools (google-gemini#18648) * chore: remove unused exports and redundant hook files (google-gemini#18681) * Fix number of lines being reported in rewind confirmation dialog (google-gemini#18675) * feat(cli): disable folder trust in headless mode (google-gemini#18407) * Disallow unsafe type assertions (google-gemini#18688) * Change event type for release (google-gemini#18693) * feat: handle multiple dynamic context filenames in system prompt (google-gemini#18598) * Properly parse at-commands with narrow non-breaking spaces (google-gemini#18677) * refactor(core): centralize core tool definitions and support model-specific schemas (google-gemini#18662) * feat(core): Render memory hierarchically in context. (google-gemini#18350) * feat: Ctrl+O to expand paste placeholder (google-gemini#18103) * fix(cli): Improve header spacing (google-gemini#18531) * Feature/quota visibility 16795 (google-gemini#18203) * docs: remove TOC marker from Plan Mode header (google-gemini#18678) * Inline thinking bubbles with summary/full modes (google-gemini#18033) Co-authored-by: Jacob Richman <[email protected]> * fix(ui): remove redundant newlines in Gemini messages (google-gemini#18538) * test(cli): fix AppContainer act() warnings and improve waitFor resilience (google-gemini#18676) * refactor(core): refine Security & System Integrity section in system prompt (google-gemini#18601) * Fix layout rounding. (google-gemini#18667) * docs(skills): enhance pr-creator safety and interactivity (google-gemini#18616) * test(core): remove hardcoded model from TestRig (google-gemini#18710) * feat(core): optimize sub-agents system prompt intro (google-gemini#18608) * feat(cli): update approval mode labels and shortcuts per latest UX spec (google-gemini#18698) * fix(plan): update persistent approval mode setting (google-gemini#18638) Co-authored-by: Sandy Tao <[email protected]> * fix: move toasts location to left side (google-gemini#18705) * feat(routing): restrict numerical routing to Gemini 3 family (google-gemini#18478) * fix(ide): fix ide nudge setting (google-gemini#18733) * fix(core): standardize tool formatting in system prompts (google-gemini#18615) * chore: consolidate to green in ask user dialog (google-gemini#18734) * feat: add `extensionsExplore` setting to enable extensions explore UI. (google-gemini#18686) * feat(cli): defer devtools startup and integrate with F12 (google-gemini#18695) * ui: update & subdue footer colors and animate progress indicator (google-gemini#18570) * test: add model-specific snapshots for coreTools (google-gemini#18707) Co-authored-by: matt korwel <[email protected]> * ci: shard windows tests and fix event listener leaks (google-gemini#18670) * fix: allow `ask_user` tool in yolo mode (google-gemini#18541) * feat: redact disabled tools from system prompt (google-gemini#13597) (google-gemini#18613) * Update Gemini.md to use the curent year on creating new files (google-gemini#18460) * Code review cleanup for thinking display (google-gemini#18720) * fix(cli): hide scrollbars when in alternate buffer copy mode (google-gemini#18354) Co-authored-by: Jacob Richman <[email protected]> * Fix issues with rip grep (google-gemini#18756) * fix(cli): fix history navigation regression after prompt autocomplete (google-gemini#18752) * chore: cleanup unused and add unlisted dependencies in packages/cli (google-gemini#18749) * Fix issue where Gemini CLI creates tests in a new file (google-gemini#18409) * feat(telemetry): Ensure experiment IDs are included in OpenTelemetry logs (google-gemini#18747) * feat(ux): added text wrapping capabilities to markdown tables (google-gemini#18240) Co-authored-by: jacob314 <[email protected]> * Revert "fix(mcp): ensure MCP transport is closed to prevent memory leaks" (google-gemini#18771) * chore(release): bump version to 0.30.0-nightly.20260210.a2174751d (google-gemini#18772) * chore: cleanup unused and add unlisted dependencies in packages/core (google-gemini#18762) * chore(core): update activate_skill prompt verbiage to be more direct (google-gemini#18605) * Add autoconfigure memory usage setting to the dialog (google-gemini#18510) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(core): prevent race condition in policy persistence (google-gemini#18506) Co-authored-by: Allen Hutchison <[email protected]> * fix(evals): prevent false positive in hierarchical memory test (google-gemini#18777) * test(evals): mark all `save_memory` evals as `USUALLY_PASSES` due to unreliability (google-gemini#18786) * feat(cli): add setting to hide shortcuts hint UI (google-gemini#18562) * feat(core): formalize 5-phase sequential planning workflow (google-gemini#18759) * Introduce limits for search results. (google-gemini#18767) --------- Co-authored-by: Andrew Garrett <[email protected]> Co-authored-by: N. Taylor Mullen <[email protected]> Co-authored-by: Sandy Tao <[email protected]> Co-authored-by: Gal Zahavi <[email protected]> Co-authored-by: christine betts <[email protected]> Co-authored-by: Aswin Ashok <[email protected]> Co-authored-by: Abhijith V Ashok <[email protected]> Co-authored-by: Tommaso Sciortino <[email protected]> Co-authored-by: Jack Wotherspoon <[email protected]> Co-authored-by: joshualitt <[email protected]> Co-authored-by: Jacob Richman <[email protected]> Co-authored-by: Aishanee Shah <[email protected]> Co-authored-by: Jerop Kipruto <[email protected]> Co-authored-by: Adib234 <[email protected]> Co-authored-by: Christian Gunderman <[email protected]> Co-authored-by: g-samroberts <[email protected]> Co-authored-by: Spencer <[email protected]> Co-authored-by: Dmitry Lyalin <[email protected]> Co-authored-by: matt korwel <[email protected]> Co-authored-by: Shreya Keshive <[email protected]> Co-authored-by: Sri Pasumarthi <[email protected]> Co-authored-by: Keith Guerin <[email protected]> Co-authored-by: Sehoon Shon <[email protected]> Co-authored-by: Adam Weidman <[email protected]> Co-authored-by: Kevin Ramdass <[email protected]> Co-authored-by: Dev Randalpura <[email protected]> Co-authored-by: gemini-cli-robot <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Brad Dux <[email protected]> Co-authored-by: Allen Hutchison <[email protected]> Co-authored-by: Abhijit Balaji <[email protected]>
1 parent de1fbf3 commit b43f31d

435 files changed

Lines changed: 12172 additions & 5296 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gemini/commands/fix-behavioral-eval.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You are an expert at fixing behavioral evaluations.
2525
the same scenario. We don't want to lose test fidelity by making the prompts too
2626
direct (i.e.: easy).
2727
- Your primary mechanism for improving the agent's behavior is to make changes to
28-
tool instructions, prompt.ts, and/or modules that contribute to the prompt.
28+
tool instructions, system prompt (snippets.ts), and/or modules that contribute to the prompt.
2929
- If prompt and description changes are unsuccessful, use logs and debugging to
3030
confirm that everything is working as expected.
3131
- If unable to fix the test, you can make recommendations for architecture changes

‎.gemini/settings.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
"experimental": {
33
"toolOutputMasking": {
44
"enabled": true
5-
}
5+
},
6+
"plan": true
7+
},
8+
"general": {
9+
"devtools": true
610
}
711
}

‎.gemini/skills/pr-creator/SKILL.md‎

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,34 @@ repository's standards.
1414

1515
Follow these steps to create a Pull Request:
1616

17-
1. **Branch Management**: Check the current branch to avoid working directly
18-
on `main`.
17+
1. **Branch Management**: **CRITICAL:** Ensure you are NOT working on the
18+
`main` branch.
1919
- Run `git branch --show-current`.
20-
- If the current branch is `main`, create and switch to a new descriptive
21-
branch:
20+
- If the current branch is `main`, you MUST create and switch to a new
21+
descriptive branch:
2222
```bash
2323
git checkout -b <new-branch-name>
2424
```
2525

26-
2. **Locate Template**: Search for a pull request template in the repository.
26+
2. **Commit Changes**: Verify that all intended changes are committed.
27+
- Run `git status` to check for unstaged or uncommitted changes.
28+
- If there are uncommitted changes, stage and commit them with a descriptive
29+
message before proceeding. NEVER commit directly to `main`.
30+
```bash
31+
git add .
32+
git commit -m "type(scope): description"
33+
```
34+
35+
3. **Locate Template**: Search for a pull request template in the repository.
2736
- Check `.github/pull_request_template.md`
2837
- Check `.github/PULL_REQUEST_TEMPLATE.md`
2938
- If multiple templates exist (e.g., in `.github/PULL_REQUEST_TEMPLATE/`),
3039
ask the user which one to use or select the most appropriate one based on
3140
the context (e.g., `bug_fix.md` vs `feature.md`).
3241

33-
3. **Read Template**: Read the content of the identified template file.
42+
4. **Read Template**: Read the content of the identified template file.
3443

35-
4. **Draft Description**: Create a PR description that strictly follows the
44+
5. **Draft Description**: Create a PR description that strictly follows the
3645
template's structure.
3746
- **Headings**: Keep all headings from the template.
3847
- **Checklists**: Review each item. Mark with `[x]` if completed. If an item
@@ -44,14 +53,24 @@ Follow these steps to create a Pull Request:
4453
- **Related Issues**: Link any issues fixed or related to this PR (e.g.,
4554
"Fixes #123").
4655

47-
5. **Preflight Check**: Before creating the PR, run the workspace preflight
56+
6. **Preflight Check**: Before creating the PR, run the workspace preflight
4857
script to ensure all build, lint, and test checks pass.
4958
```bash
5059
npm run preflight
5160
```
5261
If any checks fail, address the issues before proceeding to create the PR.
5362

54-
6. **Create PR**: Use the `gh` CLI to create the PR. To avoid shell escaping
63+
7. **Push Branch**: Push the current branch to the remote repository.
64+
**CRITICAL SAFETY RAIL:** Double-check your branch name before pushing.
65+
NEVER push if the current branch is `main`.
66+
```bash
67+
# Verify current branch is NOT main
68+
git branch --show-current
69+
# Push non-interactively
70+
git push -u origin HEAD
71+
```
72+
73+
8. **Create PR**: Use the `gh` CLI to create the PR. To avoid shell escaping
5574
issues with multi-line Markdown, write the description to a temporary file
5675
first.
5776
```bash
@@ -68,6 +87,7 @@ Follow these steps to create a Pull Request:
6887

6988
## Principles
7089

90+
- **Safety First**: NEVER push to `main`. This is your highest priority.
7191
- **Compliance**: Never ignore the PR template. It exists for a reason.
7292
- **Completeness**: Fill out all relevant sections.
7393
- **Accuracy**: Don't check boxes for tasks you haven't done.

‎.github/scripts/sync-maintainer-labels.cjs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
/* eslint-disable @typescript-eslint/no-require-imports */
2-
/* global process, console, require */
1+
/**
2+
* @license
3+
* Copyright 2026 Google LLC
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
37
const { Octokit } = require('@octokit/rest');
48

59
/**

‎.github/workflows/ci.yml‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,17 @@ jobs:
356356
clean-script: 'clean'
357357

358358
test_windows:
359-
name: 'Slow Test - Win'
359+
name: 'Slow Test - Win - ${{ matrix.shard }}'
360360
runs-on: 'gemini-cli-windows-16-core'
361361
needs: 'merge_queue_skipper'
362362
if: "${{needs.merge_queue_skipper.outputs.skip == 'false'}}"
363363
continue-on-error: true
364+
timeout-minutes: 60
365+
strategy:
366+
matrix:
367+
shard:
368+
- 'cli'
369+
- 'others'
364370

365371
steps:
366372
- name: 'Checkout'
@@ -411,7 +417,14 @@ jobs:
411417
NODE_OPTIONS: '--max-old-space-size=32768 --max-semi-space-size=256'
412418
UV_THREADPOOL_SIZE: '32'
413419
NODE_ENV: 'test'
414-
run: 'npm run test:ci -- --coverage.enabled=false'
420+
run: |
421+
if ("${{ matrix.shard }}" -eq "cli") {
422+
npm run test:ci --workspace @google/gemini-cli -- --coverage.enabled=false
423+
} else {
424+
# Explicitly list non-cli packages to ensure they are sharded correctly
425+
npm run test:ci --workspace @google/gemini-cli-core --workspace @google/gemini-cli-a2a-server --workspace gemini-cli-vscode-ide-companion --workspace @google/gemini-cli-test-utils --if-present -- --coverage.enabled=false
426+
npm run test:scripts
427+
}
415428
shell: 'pwsh'
416429

417430
- name: 'Bundle'

‎.github/workflows/release-notes.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: 'Generate Release Notes'
44

55
on:
66
release:
7-
types: ['created']
7+
types: ['published']
88
workflow_dispatch:
99
inputs:
1010
version:

‎GEMINI.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ powerful tool for developers.
5252

5353
## Development Conventions
5454

55+
- **Legacy Snippets:** `packages/core/src/prompts/snippets.legacy.ts` is a
56+
snapshot of an older system prompt. Avoid changing the prompting verbiage to
57+
preserve its historical behavior; however, structural changes to ensure
58+
compilation or simplify the code are permitted.
5559
- **Contributions:** Follow the process outlined in `CONTRIBUTING.md`. Requires
5660
signing the Google CLA.
5761
- **Pull Requests:** Keep PRs small, focused, and linked to an existing issue.
@@ -63,6 +67,9 @@ powerful tool for developers.
6367
and `packages/core` (Backend logic).
6468
- **Imports:** Use specific imports and avoid restricted relative imports
6569
between packages (enforced by ESLint).
70+
- **License Headers:** For all new source code files (`.ts`, `.tsx`, `.js`),
71+
include the Apache-2.0 license header with the current year. (e.g.,
72+
`Copyright 2026 Google LLC`). This is enforced by ESLint.
6673

6774
## Testing Conventions
6875

‎docs/cli/keyboard-shortcuts.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ available combinations.
106106
| Toggle YOLO (auto-approval) mode for tool calls. | `Ctrl + Y` |
107107
| Cycle through approval modes: default (prompt), auto_edit (auto-approve edits), and plan (read-only). | `Shift + Tab` |
108108
| Expand a height-constrained response to show additional lines when not in alternate buffer mode. | `Ctrl + O`<br />`Ctrl + S` |
109+
| Expand or collapse a paste placeholder when cursor is over placeholder. | `Ctrl + O` |
109110
| Toggle current background shell visibility. | `Ctrl + B` |
110111
| Toggle background shell list. | `Ctrl + L` |
111112
| Kill the active background shell. | `Ctrl + K` |
@@ -130,7 +131,8 @@ available combinations.
130131
- `!` on an empty prompt: Enter or exit shell mode.
131132
- `?` on an empty prompt: Toggle the shortcuts panel above the input. Press
132133
`Esc`, `Backspace`, or any printable key to close it. Press `?` again to close
133-
the panel and insert a `?` into the prompt.
134+
the panel and insert a `?` into the prompt. You can hide only the hint text
135+
via `ui.showShortcutsHint`, without changing this keyboard behavior.
134136
- `\` (at end of a line) + `Enter`: Insert a newline without leaving single-line
135137
mode.
136138
- `Esc` pressed twice quickly: Clear the input prompt if it is not empty,
@@ -139,6 +141,7 @@ available combinations.
139141
single-line input, navigate backward or forward through prompt history.
140142
- `Number keys (1-9, multi-digit)` inside selection dialogs: Jump directly to
141143
the numbered radio option and confirm when the full number is entered.
142-
- `Double-click` on a paste placeholder (`[Pasted Text: X lines]`) in alternate
143-
buffer mode: Expand to view full content inline. Double-click again to
144-
collapse.
144+
- `Ctrl + O`: Expand or collapse paste placeholders (`[Pasted Text: X lines]`)
145+
inline when the cursor is over the placeholder.
146+
- `Double-click` on a paste placeholder (alternate buffer mode only): Expand to
147+
view full content inline. Double-click again to collapse.

‎docs/cli/plan-mode.md‎

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Plan Mode (experimental) <!-- omit in toc -->
1+
# Plan Mode (experimental)
22

33
Plan Mode is a safe, read-only mode for researching and designing complex
44
changes. It prevents modifications while you research, design and plan an
@@ -36,7 +36,7 @@ implementation strategy.
3636
You can configure Gemini CLI to start directly in Plan Mode by default:
3737
3838
1. Type `/settings` in the CLI.
39-
2. Search for `Approval Mode`.
39+
2. Search for `Default Approval Mode`.
4040
3. Set the value to `Plan`.
4141
4242
Other ways to start in Plan Mode:
@@ -46,8 +46,8 @@ Other ways to start in Plan Mode:
4646
4747
```json
4848
{
49-
"tools": {
50-
"approvalMode": "plan"
49+
"general": {
50+
"defaultApprovalMode": "plan"
5151
}
5252
}
5353
```
@@ -68,8 +68,10 @@ You can enter Plan Mode in three ways:
6868
1. **Requirements:** The agent clarifies goals using `ask_user`.
6969
2. **Exploration:** The agent uses read-only tools (like [`read_file`]) to map
7070
the codebase and validate assumptions.
71-
3. **Planning:** A detailed plan is written to a temporary Markdown file.
72-
4. **Review:** You review the plan.
71+
3. **Design:** The agent proposes alternative approaches with a recommended
72+
solution for you to choose from.
73+
4. **Planning:** A detailed plan is written to a temporary Markdown file.
74+
5. **Review:** You review the plan.
7375
- **Approve:** Exit Plan Mode and start implementation (switching to
7476
Auto-Edit or Default approval mode).
7577
- **Iterate:** Provide feedback to refine the plan.
@@ -96,11 +98,11 @@ These are the only allowed tools:
9698
- **Planning (Write):** [`write_file`] and [`replace`] ONLY allowed for `.md`
9799
files in the `~/.gemini/tmp/<project>/plans/` directory.
98100

99-
[`list_directory`]: ../tools/file-system.md#1-list_directory-readfolder
100-
[`read_file`]: ../tools/file-system.md#2-read_file-readfile
101-
[`grep_search`]: ../tools/file-system.md#5-grep_search-searchtext
102-
[`write_file`]: ../tools/file-system.md#3-write_file-writefile
103-
[`glob`]: ../tools/file-system.md#4-glob-findfiles
104-
[`google_web_search`]: ../tools/web-search.md
105-
[`replace`]: ../tools/file-system.md#6-replace-edit
106-
[MCP tools]: ../tools/mcp-server.md
101+
[`list_directory`]: /docs/tools/file-system.md#1-list_directory-readfolder
102+
[`read_file`]: /docs/tools/file-system.md#2-read_file-readfile
103+
[`grep_search`]: /docs/tools/file-system.md#5-grep_search-searchtext
104+
[`write_file`]: /docs/tools/file-system.md#3-write_file-writefile
105+
[`glob`]: /docs/tools/file-system.md#4-glob-findfiles
106+
[`google_web_search`]: /docs/tools/web-search.md
107+
[`replace`]: /docs/tools/file-system.md#6-replace-edit
108+
[MCP tools]: /docs/tools/mcp-server.md

0 commit comments

Comments
 (0)