Skip to content

Commit d2ca7a7

Browse files
authored
Merge branch 'main' into rohit/fix/vscode-setting-json-update
2 parents a1a53e1 + 12957ea commit d2ca7a7

File tree

454 files changed

+15808
-5584
lines changed

Some content is hidden

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

454 files changed

+15808
-5584
lines changed

.gemini/skills/docs-writer/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ Write precisely to ensure your instructions are unambiguous.
4545
specific verbs.
4646
- **Examples:** Use meaningful names in examples; avoid placeholders like
4747
"foo" or "bar."
48+
- **Quota and limit terminology:** For any content involving resource capacity
49+
or using the word "quota" or "limit", strictly adhere to the guidelines in
50+
the `quota-limit-style-guide.md` resource file. Generally, Use "quota" for the
51+
administrative bucket and "limit" for the numerical ceiling.
4852

4953
### Formatting and syntax
5054
Apply consistent formatting to make documentation visually organized and
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Style Guide: Quota vs. Limit
2+
3+
This guide defines the usage of "quota," "limit," and related terms in
4+
user-facing interfaces.
5+
6+
## TL;DR
7+
8+
- **`quota`**: The administrative "bucket." Use for settings, billing, and
9+
requesting increases. (e.g., "Adjust your storage **quota**.")
10+
- **`limit`**: The real-time numerical "ceiling." Use for error messages when a
11+
user is blocked. (e.g., "You've reached your request **limit**.")
12+
- **When blocked, combine them:** Explain the **limit** that was hit and the
13+
**quota** that is the remedy. (e.g., "You've reached the request **limit** for
14+
your developer **quota**.")
15+
- **Related terms:** Use `usage` for consumption tracking, `restriction` for
16+
fixed rules, and `reset` for when a limit refreshes.
17+
18+
---
19+
20+
## Detailed Guidelines
21+
22+
### Definitions
23+
24+
- **Quota is the "what":** It identifies the category of resource being managed
25+
(e.g., storage quota, GPU quota, request/prompt quota).
26+
- **Limit is the "how much":** It defines the numerical boundary.
27+
28+
Use **quota** when referring to the administrative concept or the request for
29+
more. Use **limit** when discussing the specific point of exhaustion.
30+
31+
### When to use "quota"
32+
33+
Use this term for **account management, billing, and settings.** It describes
34+
the entitlement the user has purchased or been assigned.
35+
36+
**Examples:**
37+
38+
- **Navigation label:** Quota and usage
39+
- **Contextual help:** Your **usage quota** is managed by your organization. To
40+
request an increase, contact your administrator.
41+
42+
### When to use "limit"
43+
44+
Use this term for **real-time feedback, notifications, and error messages.** It
45+
identifies the specific wall the user just hit.
46+
47+
**Examples:**
48+
49+
- **Error message:** You’ve reached the 50-request-per-minute **limit**.
50+
- **Inline warning:** Input exceeds the 32k token **limit**.
51+
52+
### How to use both together
53+
54+
When a user is blocked, combine both terms to explain the **event** (limit) and
55+
the **remedy** (quota).
56+
57+
**Example:**
58+
59+
- **Heading:** Daily usage limit reached
60+
- **Body:** You've reached the maximum daily capacity for your developer quota.
61+
To continue working today, upgrade your quota.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414

1515
# Docs have a dedicated approver group in addition to maintainers
1616
/docs/ @google-gemini/gemini-cli-maintainers @google-gemini/gemini-cli-docs
17+
/README.md @google-gemini/gemini-cli-maintainers @google-gemini/gemini-cli-docs

.github/workflows/chained_e2e.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ jobs:
290290
with:
291291
ref: '${{ needs.parse_run_context.outputs.sha }}'
292292
repository: '${{ needs.parse_run_context.outputs.repository }}'
293+
fetch-depth: 0
293294

294295
- name: 'Set up Node.js 20.x'
295296
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions-node@v4
@@ -302,7 +303,14 @@ jobs:
302303
- name: 'Build project'
303304
run: 'npm run build'
304305

306+
- name: 'Check if evals should run'
307+
id: 'check_evals'
308+
run: |
309+
SHOULD_RUN=$(node scripts/changed_prompt.js)
310+
echo "should_run=$SHOULD_RUN" >> "$GITHUB_OUTPUT"
311+
305312
- name: 'Run Evals (Required to pass)'
313+
if: "${{ steps.check_evals.outputs.should_run == 'true' }}"
306314
env:
307315
GEMINI_API_KEY: '${{ secrets.GEMINI_API_KEY }}'
308316
run: 'npm run test:always_passing_evals'

.github/workflows/deflake.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ jobs:
117117
name: 'Slow E2E - Win'
118118
runs-on: 'gemini-cli-windows-16-core'
119119
if: "github.repository == 'google-gemini/gemini-cli'"
120-
121120
steps:
122121
- name: 'Checkout'
123122
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5

.github/workflows/gemini-scheduled-stale-pr-closer.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
steps:
2424
- name: 'Generate GitHub App Token'
2525
id: 'generate_token'
26+
env:
27+
APP_ID: '${{ secrets.APP_ID }}'
28+
if: |-
29+
${{ env.APP_ID != '' }}
2630
uses: 'actions/create-github-app-token@v2'
2731
with:
2832
app-id: '${{ secrets.APP_ID }}'
@@ -33,7 +37,7 @@ jobs:
3337
env:
3438
DRY_RUN: '${{ inputs.dry_run }}'
3539
with:
36-
github-token: '${{ steps.generate_token.outputs.token }}'
40+
github-token: '${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}'
3741
script: |
3842
const dryRun = process.env.DRY_RUN === 'true';
3943
const thirtyDaysAgo = new Date();

.github/workflows/gemini-self-assign-issue.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
if: |-
2626
github.repository == 'google-gemini/gemini-cli' &&
2727
github.event_name == 'issue_comment' &&
28-
contains(github.event.comment.body, '/assign')
28+
(contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/unassign'))
2929
runs-on: 'ubuntu-latest'
3030
steps:
3131
- name: 'Generate GitHub App Token'
@@ -38,6 +38,7 @@ jobs:
3838
permission-issues: 'write'
3939

4040
- name: 'Assign issue to user'
41+
if: "contains(github.event.comment.body, '/assign')"
4142
uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea'
4243
with:
4344
github-token: '${{ steps.generate_token.outputs.token }}'
@@ -108,3 +109,42 @@ jobs:
108109
issue_number: issueNumber,
109110
body: `👋 @${commenter}, you've been assigned to this issue! Thank you for taking the time to contribute. Make sure to check out our [contributing guidelines](https://github.com/google-gemini/gemini-cli/blob/main/CONTRIBUTING.md).`
110111
});
112+
113+
- name: 'Unassign issue from user'
114+
if: "contains(github.event.comment.body, '/unassign')"
115+
uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea'
116+
with:
117+
github-token: '${{ steps.generate_token.outputs.token }}'
118+
script: |
119+
const issueNumber = context.issue.number;
120+
const commenter = context.actor;
121+
const owner = context.repo.owner;
122+
const repo = context.repo.repo;
123+
const commentBody = context.payload.comment.body.trim();
124+
125+
if (commentBody !== '/unassign') {
126+
return;
127+
}
128+
129+
const issue = await github.rest.issues.get({
130+
owner: owner,
131+
repo: repo,
132+
issue_number: issueNumber,
133+
});
134+
135+
const isAssigned = issue.data.assignees.some(assignee => assignee.login === commenter);
136+
137+
if (isAssigned) {
138+
await github.rest.issues.removeAssignees({
139+
owner: owner,
140+
repo: repo,
141+
issue_number: issueNumber,
142+
assignees: [commenter]
143+
});
144+
await github.rest.issues.createComment({
145+
owner: owner,
146+
repo: repo,
147+
issue_number: issueNumber,
148+
body: `👋 @${commenter}, you have been unassigned from this issue.`
149+
});
150+
}
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
name: 'Test Build Binary'
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: 'read'
8+
9+
defaults:
10+
run:
11+
shell: 'bash'
12+
13+
jobs:
14+
build-node-binary:
15+
name: 'Build Binary (${{ matrix.os }})'
16+
runs-on: '${{ matrix.os }}'
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- os: 'ubuntu-latest'
22+
platform_name: 'linux-x64'
23+
arch: 'x64'
24+
- os: 'windows-latest'
25+
platform_name: 'win32-x64'
26+
arch: 'x64'
27+
- os: 'macos-latest' # Apple Silicon (ARM64)
28+
platform_name: 'darwin-arm64'
29+
arch: 'arm64'
30+
- os: 'macos-latest' # Intel (x64) running on ARM via Rosetta
31+
platform_name: 'darwin-x64'
32+
arch: 'x64'
33+
34+
steps:
35+
- name: 'Checkout'
36+
uses: 'actions/checkout@v4'
37+
38+
- name: 'Optimize Windows Performance'
39+
if: "matrix.os == 'windows-latest'"
40+
run: |
41+
Set-MpPreference -DisableRealtimeMonitoring $true
42+
Stop-Service -Name "wsearch" -Force -ErrorAction SilentlyContinue
43+
Set-Service -Name "wsearch" -StartupType Disabled
44+
Stop-Service -Name "SysMain" -Force -ErrorAction SilentlyContinue
45+
Set-Service -Name "SysMain" -StartupType Disabled
46+
shell: 'powershell'
47+
48+
- name: 'Set up Node.js'
49+
uses: 'actions/setup-node@v4'
50+
with:
51+
node-version-file: '.nvmrc'
52+
architecture: '${{ matrix.arch }}'
53+
cache: 'npm'
54+
55+
- name: 'Install dependencies'
56+
run: 'npm ci'
57+
58+
- name: 'Check Secrets'
59+
id: 'check_secrets'
60+
run: |
61+
echo "has_win_cert=${{ secrets.WINDOWS_PFX_BASE64 != '' }}" >> "$GITHUB_OUTPUT"
62+
echo "has_mac_cert=${{ secrets.MACOS_CERT_P12_BASE64 != '' }}" >> "$GITHUB_OUTPUT"
63+
64+
- name: 'Setup Windows SDK (Windows)'
65+
if: "matrix.os == 'windows-latest'"
66+
uses: 'microsoft/setup-msbuild@v2'
67+
68+
- name: 'Add Signtool to Path (Windows)'
69+
if: "matrix.os == 'windows-latest'"
70+
run: |
71+
$signtoolPath = Get-ChildItem -Path "C:\Program Files (x86)\Windows Kits\10\bin" -Recurse -Filter "signtool.exe" | Sort-Object FullName -Descending | Select-Object -First 1 -ExpandProperty DirectoryName
72+
echo "Found signtool at: $signtoolPath"
73+
echo "$signtoolPath" >> $env:GITHUB_PATH
74+
shell: 'pwsh'
75+
76+
- name: 'Setup macOS Keychain'
77+
if: "startsWith(matrix.os, 'macos') && steps.check_secrets.outputs.has_mac_cert == 'true' && github.event_name != 'pull_request'"
78+
env:
79+
BUILD_CERTIFICATE_BASE64: '${{ secrets.MACOS_CERT_P12_BASE64 }}'
80+
P12_PASSWORD: '${{ secrets.MACOS_CERT_PASSWORD }}'
81+
KEYCHAIN_PASSWORD: 'temp-password'
82+
run: |
83+
# Create the P12 file
84+
echo "$BUILD_CERTIFICATE_BASE64" | base64 --decode > certificate.p12
85+
86+
# Create a temporary keychain
87+
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
88+
security default-keychain -s build.keychain
89+
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
90+
91+
# Import the certificate
92+
security import certificate.p12 -k build.keychain -P "$P12_PASSWORD" -T /usr/bin/codesign
93+
94+
# Allow codesign to access it
95+
security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" build.keychain
96+
97+
# Set Identity for build script
98+
echo "APPLE_IDENTITY=${{ secrets.MACOS_CERT_IDENTITY }}" >> "$GITHUB_ENV"
99+
100+
- name: 'Setup Windows Certificate'
101+
if: "matrix.os == 'windows-latest' && steps.check_secrets.outputs.has_win_cert == 'true' && github.event_name != 'pull_request'"
102+
env:
103+
PFX_BASE64: '${{ secrets.WINDOWS_PFX_BASE64 }}'
104+
PFX_PASSWORD: '${{ secrets.WINDOWS_PFX_PASSWORD }}'
105+
run: |
106+
$pfx_cert_byte = [System.Convert]::FromBase64String("$env:PFX_BASE64")
107+
$certPath = Join-Path (Get-Location) "cert.pfx"
108+
[IO.File]::WriteAllBytes($certPath, $pfx_cert_byte)
109+
echo "WINDOWS_PFX_FILE=$certPath" >> $env:GITHUB_ENV
110+
echo "WINDOWS_PFX_PASSWORD=$env:PFX_PASSWORD" >> $env:GITHUB_ENV
111+
shell: 'pwsh'
112+
113+
- name: 'Build Binary'
114+
run: 'npm run build:binary'
115+
116+
- name: 'Build Core Package'
117+
run: 'npm run build -w @google/gemini-cli-core'
118+
119+
- name: 'Verify Output Exists'
120+
run: |
121+
if [ -f "dist/${{ matrix.platform_name }}/gemini" ]; then
122+
echo "Binary found at dist/${{ matrix.platform_name }}/gemini"
123+
elif [ -f "dist/${{ matrix.platform_name }}/gemini.exe" ]; then
124+
echo "Binary found at dist/${{ matrix.platform_name }}/gemini.exe"
125+
else
126+
echo "Error: Binary not found in dist/${{ matrix.platform_name }}/"
127+
ls -R dist/
128+
exit 1
129+
fi
130+
131+
- name: 'Smoke Test Binary'
132+
run: |
133+
echo "Running binary smoke test..."
134+
if [ -f "dist/${{ matrix.platform_name }}/gemini.exe" ]; then
135+
"./dist/${{ matrix.platform_name }}/gemini.exe" --version
136+
else
137+
"./dist/${{ matrix.platform_name }}/gemini" --version
138+
fi
139+
140+
- name: 'Run Integration Tests'
141+
if: "github.event_name != 'pull_request'"
142+
env:
143+
GEMINI_API_KEY: '${{ secrets.GEMINI_API_KEY }}'
144+
run: |
145+
echo "Running integration tests with binary..."
146+
if [[ "${{ matrix.os }}" == 'windows-latest' ]]; then
147+
BINARY_PATH="$(cygpath -m "$(pwd)/dist/${{ matrix.platform_name }}/gemini.exe")"
148+
else
149+
BINARY_PATH="$(pwd)/dist/${{ matrix.platform_name }}/gemini"
150+
fi
151+
echo "Using binary at $BINARY_PATH"
152+
export INTEGRATION_TEST_GEMINI_BINARY_PATH="$BINARY_PATH"
153+
npm run test:integration:sandbox:none -- --testTimeout=600000
154+
155+
- name: 'Upload Artifact'
156+
uses: 'actions/upload-artifact@v4'
157+
with:
158+
name: 'gemini-cli-${{ matrix.platform_name }}'
159+
path: 'dist/${{ matrix.platform_name }}/'
160+
retention-days: 5

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ gemini-debug.log
6161
.genkit
6262
.gemini-clipboard/
6363
.eslintcache
64-
evals/logs/
64+
evals/logs/

CONTRIBUTING.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,14 @@ Replace `<PR_NUMBER>` with your pull request number. Authors are encouraged to
7575
run this on their own PRs for self-review, and reviewers should use it to
7676
augment their manual review process.
7777

78-
### Self assigning issues
78+
### Self-assigning and unassigning issues
7979

80-
To assign an issue to yourself, simply add a comment with the text `/assign`.
81-
The comment must contain only that text and nothing else. This command will
82-
assign the issue to you, provided it is not already assigned.
80+
To assign an issue to yourself, simply add a comment with the text `/assign`. To
81+
unassign yourself from an issue, add a comment with the text `/unassign`.
82+
83+
The comment must contain only that text and nothing else. These commands will
84+
assign or unassign the issue as requested, provided the conditions are met
85+
(e.g., an issue must be unassigned to be assigned).
8386

8487
Please note that you can have a maximum of 3 issues assigned to you at any given
8588
time.

0 commit comments

Comments
 (0)