Commit Graph

54 Commits

Author SHA1 Message Date
Jerop Kipruto c822082ac2 Refactor OTEL logging for API calls (#991)
Refactor OpenTelemetry logging for API requests, responses, and errors. Moved logging responsibility from GeminiClient to GeminiChat for more detailed logging.

#750
2025-06-12 16:36:51 -07:00
Eddie Santos 930168cd84 GitHub MCP warning (#979) 2025-06-12 22:23:45 +00:00
Jerop Kipruto 650881237c telemetry: include user decisions in tool call logs (#966)
Add the user's decision (accept, reject, modify) to tool call telemetry to better understand user intent. The decision provides crucial context to the `success` metric, as a user can reject a call that would have succeeded or accept one that fails. 

Also prettify the arguments json.

Example: 
![image](https://github.com/user-attachments/assets/251cb9fc-ceaa-4cdd-929c-8de47031aca8)

#750
2025-06-12 20:48:10 +00:00
starsandskies 2db03869ad Edit pass of docs/architecture.md (#971) 2025-06-12 16:44:55 +00:00
Mark McDonald a155d9a4fb Added note about using MCP/tools with a sandbox (#933) 2025-06-11 22:49:58 -07:00
Jerop Kipruto 72b9e1a414 Telemetry: Improve clarity of user prompt event (#967) 2025-06-11 21:43:00 -04:00
Leo cb4b803f5b feat: External editor settings (#882) 2025-06-11 18:21:54 -07:00
JingboWang1997-1 1418c37801 add excludeTools flag to settings.json config (#957) 2025-06-11 14:32:23 -07:00
matt korwel d41d58afa5 Extensibility: Gemini.md files (#944) 2025-06-11 20:34:35 +00:00
jerop 759e87c623 feat(telemetry): expand cli configuration event
Adds the following attributes to the  event:
- embedding_model
- api_key_enabled
- code_assist_enabled
- debug_mode
- mcp_servers

This additional data will provide more insight into user configurations.
2025-06-11 16:22:35 -04:00
jerop 6fed4a26c0 feat(telemetry): Update API response in telemetry
Adds the text content of the API response to the  telemetry event. This provides more context for debugging and analysis without logging the entire, potentially large, response object.

- Adds an optional  field to the  type.
- Updates  to include the  field in the logged attributes.
- Modifies the  to extract the response text using  and pass it to the logger.
- Adds a new test file for the telemetry loggers, including tests for the  function to verify the new functionality.
2025-06-11 14:18:16 -04:00
jerop 47b87a05f1 refactor(telemetry): pass config object to telemetry functions
This commit refactors the telemetry system to pass a  object to various logging and metrics functions. This change centralizes configuration management within the telemetry system, making it more modular and easier to maintain.

The  constructor and various tool execution functions have been updated to accept the  object, which is then passed down to the telemetry functions. This eliminates the need to pass individual configuration values, such as , through multiple layers of the application.
2025-06-11 13:24:41 -04:00
jerop 1d55180091 update token usage with types 2025-06-11 10:38:07 -04:00
jerop 727b4075e9 update from metrics and logs prefix from gemini_code to gemini_cli 2025-06-11 01:28:26 -04:00
jerop 36a3fbfee9 docs(telemetry): Refine OTEL Collector setup instructions
Standardizes on the  distribution for local and Google Cloud setups.

Restructures the guide to present Docker and standalone binary as clear, parallel options and makes the Google Cloud command more robust.
2025-06-10 20:04:05 -04:00
Tommaso Sciortino 6a0f6f9f90 Allow simple extensions for registering MCPservers (#890) 2025-06-10 15:48:39 -07:00
jerop 6c92141127 update documentation for otel 2025-06-10 18:14:04 -04:00
jerop d220654cce docs(telemetry): improve telemetry documentation
This commit enhances the telemetry documentation with several key improvements for clarity and usability.

- Adds a prominent note clarifying that telemetry is currently incompatible with sandbox mode.
- Updates the example JSON configuration to explicitly include sandbox: false to prevent user confusion.
- Introduces a new Configurations section with instructions to create the  directory.
- Adds a new step for setting necessary environment variables for the Google Cloud setup.
- Makes the  command for Google Cloud more portable by using the  environment variable instead of a hardcoded path.
- Re-numbers the steps in the Google Cloud setup guide to maintain a logical flow.
2025-06-10 16:51:46 -04:00
anj-s f1f25367d7 Fix null pointer for traces field and use the batch processor (#884) 2025-06-10 09:24:27 -07:00
Olcan 42f146f820 restricted networking for all sandboxing methods, new seatbelt profiles, updated docs, fixes to sandbox build, debugging through sandbox (#891) 2025-06-10 08:58:37 -07:00
Brandon Keiji b6c9b18300 docs: add deployment documentation (#874) 2025-06-09 19:58:24 +00:00
matt korwel 920aa861cf Windows: Refactor Shell Scripts to Node.js for Cross-Platform Compatibility (#784) 2025-06-09 12:19:42 -07:00
Olcan 7c24d46085 rename shell tool more intuitively as run_shell_command (from historical name of execute_bash_command inherited from terminal tool) (#869) 2025-06-09 08:57:30 -07:00
N. Taylor Mullen cf7c1e5e1d Revert "Add batch editing capabilities to Edit Tool (#648)" (#857) 2025-06-08 23:20:43 +00:00
Bryan Morgan bdc3ba4bde Bryanmorgan/add mcp description support (#825) 2025-06-07 18:30:56 -04:00
cperry-goog eeaff25857 docs: update and reorganize documentation (#806) 2025-06-07 10:47:30 -07:00
Keith Ballinger 7ad5f52437 Add batch editing capabilities to Edit Tool (#648)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-06-06 22:54:37 -07:00
jerop 725166b2bb docs: Initialize tutorials section with MCP server example
This commit adds a new `tutorials.md` file to the CLI documentation.
This section is intended to house various tutorials for using Gemini CLI.

The initial content includes a tutorial on setting up Model Context
Protocol (MCP) servers, using the GitHub MCP server as an example.

The `docs/cli/index.md` has been updated to include a link to this
new tutorials section.
2025-06-06 13:05:13 -04:00
jerop afa72a00fa feat: Enable environment variable substitution in settings
This commit introduces the ability to use system environment variables
within the settings files (e.g., `settings.json`). Users can now
reference environment variables using the `${VAR_NAME}` syntax.

This enhancement improves security and flexibility, particularly
for configurations like MCP server settings, which often require
sensitive tokens.

Previously, to configure an MCP server, a token might be directly
embedded:
```json
"mcpServers": {
  "github": {
    "env": {
      "GITHUB_PERSONAL_ACCESS_TOKEN": "pat_abc123"
    }
    // ...
  }
}
```

With this change, the same configuration can securely reference an
environment variable:
```json
"mcpServers": {
  "github": {
    "env": {
      "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_ACCESS_TOKEN}"
    }
    // ...
  }
}
```

This allows users to avoid storing secrets directly in configuration files.
2025-06-06 11:47:37 -04:00
Jerop Kipruto d0de44824f OpenTelemetry Integration & Telemetry Control Flag (#762) 2025-06-05 13:04:25 -07:00
Eddie Santos 6b745dd861 Bump default model to gemini-2.5-pro-preview-06-05 (#765) 2025-06-05 11:52:36 -07:00
Tolik Malibroda c90b7a0a3f fix: Disable automatic image building if BUILD_SANDBOX is not provided (#764) 2025-06-05 18:47:39 +02:00
Tolik Malibroda 95917b22da feat: Add multi-stage docker build support for custom sandbox.Dockerfile (#746) 2025-06-05 17:46:54 +02:00
Miguel Solorio 2e8beb0c72 Add Theme docs (#753) 2025-06-05 08:10:05 -07:00
Riccardo Carlesso 7a1774a8ae Docs: Update architecture diagram with Google colors (for future aricles) (#718) 2025-06-04 12:33:07 -07:00
Keith Ballinger 813f5d9f16 Fix broken documentation links after server->core folder rename (#740) 2025-06-04 10:02:07 -07:00
Keith Ballinger 906f716d3e Ignore folders files (#651)
# Add .gitignore-Aware File Filtering to gemini-cli

This pull request introduces .gitignore-based file filtering to the gemini-cli, ensuring that git-ignored files are automatically excluded from file-related operations and suggestions throughout the CLI. The update enhances usability, reduces noise from build artifacts and dependencies, and provides new configuration options for fine-tuning file discovery.

Key Improvements
.gitignore File Filtering

All @ (at) commands, file completions, and core discovery tools now honor .gitignore patterns by default.
Git-ignored files (such as node_modules/, dist/, .env, and .git) are excluded from results unless explicitly overridden.
The behavior can be customized via a new fileFiltering section in settings.json, including options for:
Turning .gitignore respect on/off.
Adding custom ignore patterns.
Allowing or excluding build artifacts.
Configuration & Documentation Updates

settings.json schema extended with fileFiltering options.
Documentation updated to explain new filtering controls and usage patterns.
Testing

New and updated integration/unit tests for file filtering logic, configuration merging, and edge cases.
Test coverage ensures .gitignore filtering works as intended across different workflows.
Internal Refactoring

Core file discovery logic refactored for maintainability and extensibility.
Underlying tools (ls, glob, read-many-files) now support git-aware filtering out of the box.


Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-06-04 04:40:46 +00:00
Cindy Xing f8605638e9 Update configuration.md (#722) 2025-06-03 21:33:02 -07:00
Olcan bcd856a339 link tool discovery/call docs from core configuration doc (#720) 2025-06-03 10:22:43 -07:00
Olcan a99064d5f9 document mcp server trust option (#719) 2025-06-03 10:08:34 -07:00
Olcan e0eb947f75 allow toolDiscoveryCommand to return function declarations with or without a tool wrapper; fully document both toolDiscoveryCommand and toolCallCommand with examples and pointers to API docs (#696) 2025-06-02 13:41:49 -07:00
Sandy Tao 19037f40b4 Add documentation about debugging using React DevTools (#679) 2025-06-02 09:16:03 -07:00
Allen Hutchison b78c320cbd feat: allow custom filename for context files (#654)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-05-31 12:49:28 -07:00
Tommaso Sciortino 64bd136f42 Rename server->core (#638) 2025-05-30 18:25:47 -07:00
cperry-goog f91e7c8449 docs: Update README, CONTRIBUTING, and CLI configuration docs (#591)
cleaning up for now, will take another pass
2025-05-30 12:20:12 -07:00
Jacob Richman 2d5f781de6 Refactor read-file and support images. (#480) 2025-05-29 15:30:18 -07:00
Jacob Richman 125d12c368 Update docs and tool description for read-many-files. (#456) 2025-05-20 16:32:49 -07:00
Olcan e569f8f6e2 coreTools doc tweak (#452) 2025-05-20 12:35:44 -07:00
cperry-goog a4a7c5ee64 Docs: Update CLI and Server documentation for recent features (#430) 2025-05-20 10:37:21 -07:00
Olcan 769e7dac8e rename env vars GEMINI_CODE_{MODEL,SANDBOX,SANDBOX_IMAGE} (#411) 2025-05-17 17:28:44 -07:00