You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(workflows): add maxSessionTurns to all workflows (#62)
This commit introduces the `maxSessionTurns` setting to all Gemini CLI
workflows, providing granular control over the conversation length for
each use case. This enhancement allows for more tailored and efficient
interactions with the Gemini assistant, preventing runaway conversations
and ensuring that the AI's focus remains on the specific task at hand.
The following changes are included in this commit:
- **`maxSessionTurns` added to all workflows:** Each of the three
primary workflows (issue triage, pull request review, and the general
CLI) now has a `maxSessionTurns` value configured in its corresponding
workflow file. These values have been set to reasonable defaults for
each use case:
- Issue Triage: 25
- Pull Request Review: 20
- General CLI: 50
- **Documentation updated:** The `workflows/README.md` file has been
updated to include a new "Configuration" section that explains how to
use the `maxSessionTurns` setting. This documentation provides a clear
example of how to modify the setting and links to the comprehensive
Gemini CLI documentation for more information.
By providing this level of control, we empower users to fine-tune the
behavior of the Gemini CLI to better suit their specific needs and
preferences, leading to a more efficient and effective AI-assisted
workflow.
| GEMINI_CLI_VERSION | Controls which version of the Gemini CLI is installed. Supports `npm` versions (e.g., `0.1.0`, `latest`), a branch name (e.g., `main`), or a commit hash. | Variable | No | To pin or override the CLI version |
81
-
| GCP_WIF_PROVIDER | Full resource name of the Workload Identity Provider. | Variable | No | When using observability|
82
-
| OTLP_GOOGLE_CLOUD_PROJECT | Google Cloud project for telemetry. | Variable | No | When using observability|
83
-
| GOOGLE_CLOUD_PROJECT | Google Cloud project for Vertex AI authentication. | Variable | No | When using Vertex AI authentication|
84
-
| GOOGLE_CLOUD_LOCATION | Geographic location of the Google Cloud project for Vertex AI authentication. | Variable | No | When using Vertex AI authentication|
85
-
| GOOGLE_GENAI_USE_VERTEXAI | Set to 'true' to use Vertex AI | Variable | No | When using Vertex AI authentication|
86
-
| APP_ID | GitHub App ID for custom authentication. | Variable | No | When using a custom GitHub App|
78
+
| Name | Description | Type | Required | When Required|
| GEMINI_CLI_VERSION | Controls which version of the Gemini CLI is installed. Supports `npm` versions (e.g., `0.1.0`, `latest`), a branch name (e.g., `main`), or a commit hash. | Variable | No | To pin or override the CLI version |
81
+
| GCP_WIF_PROVIDER | Full resource name of the Workload Identity Provider. | Variable | No | When using observability |
82
+
| OTLP_GOOGLE_CLOUD_PROJECT | Google Cloud project for telemetry. | Variable | No | When using observability |
83
+
| GOOGLE_CLOUD_PROJECT | Google Cloud project for Vertex AI authentication. | Variable | No | When using Vertex AI authentication |
84
+
| GOOGLE_CLOUD_LOCATION | Geographic location of the Google Cloud project for Vertex AI authentication. | Variable | No | When using Vertex AI authentication |
85
+
| GOOGLE_GENAI_USE_VERTEXAI | Set to 'true' to use Vertex AI | Variable | No | When using Vertex AI authentication |
86
+
| APP_ID | GitHub App ID for custom authentication. | Variable | No | When using a custom GitHub App |
87
87
88
88
89
89
To add an environment variable: 1) Go to your repository's **Settings > Secrets and
@@ -95,10 +95,10 @@ For organization-wide or environment-specific variables, refer to the
You can configure the [`maxSessionTurns`](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md#available-settings-in-settingsjson)
141
-
when running the Gemini CLI in the workflow's YAML configuration file if you want to restrict
142
-
the maximum number of session turns for each of the `yolo` Gemini CLI runs. In the 'Run Gemini' step ,
143
-
you can configure the `maxSessionTurns` in the settings.
144
-
145
140
## Authentication
146
141
147
142
This action requires a GitHub token to interact with the GitHub API. You can
Copy file name to clipboardExpand all lines: workflows/README.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,16 @@
2
2
3
3
This directory contains a collection of example workflows that demonstrate how to use the [Google Gemini CLI GitHub Action](https://github.com/google-github-actions/run-gemini-cli). These workflows are designed to be reusable and customizable for your own projects.
4
4
5
+
-[Gemini CLI Workflows](#gemini-cli-workflows)
6
+
-[Available Workflows](#available-workflows)
7
+
-[Configuration](#configuration)
8
+
-[Workflows](#workflows)
9
+
-[Timeouts](#timeouts)
10
+
-[Settings](#settings)
11
+
-[`maxSessionTurns`](#maxsessionturns)
12
+
-[Contributing](#contributing)
13
+
14
+
5
15
## Available Workflows
6
16
7
17
***[Issue Triage](./issue-triage)**: Automatically triage GitHub issues using Gemini. This workflow can be configured to run on a schedule or be triggered by issue events.
@@ -24,6 +34,36 @@ jobs:
24
34
timeout-minutes: 10
25
35
```
26
36
37
+
### Settings
38
+
39
+
You can customize the behavior of the Gemini CLI by modifying the `settings` input in your workflow files.
40
+
41
+
For more information on all available settings, please see the [Gemini CLI documentation](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md#available-settings-in-settingsjson).
42
+
43
+
#### `maxSessionTurns`
44
+
45
+
This setting controls the maximum number of turns in a conversation.
46
+
47
+
**Defaults:**
48
+
49
+
The default `maxSessionTurns` for each workflow is as follows:
We encourage you to contribute to this collection of workflows! If you have a workflow that you would like to share with the community, please open a pull request.
0 commit comments