summaryrefslogtreecommitdiff
path: root/packages/cli/src
AgeCommit message (Collapse)Author
2025-05-31feat: allow custom filename for context files (#654)Allen Hutchison
Co-authored-by: N. Taylor Mullen <[email protected]>
2025-05-31Update default & ANSI theme names (#637)Miguel Solorio
2025-05-31Test: Add comprehensive tests for useToolScheduler hookTaylor Mullen
- Introduces a suite of tests for the hook, covering various scenarios including: - Successful tool execution - Tool not found errors - Errors during - Errors during tool execution - Tool confirmation (approved and cancelled) - (currently skipped) - Live output updates - (currently skipped) - Cancellation of tool calls (before execution and during approval) - (currently skipped) - Execution of multiple tool calls - Preventing scheduling while other calls are running - (currently skipped) - Includes tests for the utility function to ensure correct mapping of tool call states to display objects. - Mocks dependencies like , , and individual instances. - Uses fake timers to control asynchronous operations. Note: Some tests involving complex asynchronous interactions (confirmations, live output, cancellations) are currently skipped due to challenges in reliably testing these scenarios with the current setup. These will be addressed in future work.
2025-05-30Fix: Update git branch watcher to use .git/logs/HEAD (#643)Scott Densmore
2025-05-30feat: Implement delayed Ctrl+C exit promptDaniel Young Lee
This change introduces a small delay after the first Ctrl+C press, prompting the user to press Ctrl+C again to exit. This helps prevent accidental termination of the application. - Added `exitOnCtrlC={false}` to the Ink render options in `gemini.tsx` to enable custom Ctrl+C handling. - Implemented logic in `App.tsx` to: - Display "Press Ctrl+C again to exit." for 2 seconds after the first Ctrl+C. - Exit the application if Ctrl+C is pressed again during this period. - Revert to normal operation if the second Ctrl+C is not pressed within the timeout. - Defined a constant `CTRL_C_PROMPT_DURATION_MS` for the timeout duration.
2025-05-30Fix/cli version unknown (#642)Scott Densmore
2025-05-30Rename server->core (#638)Tommaso Sciortino
2025-05-30confirm mcp tool executions from untrusted servers (per "trust" setting) (#631)Olcan
2025-05-30feat: add --show_memory_usage flag to display memory usage in status bar (#606)Jacob Richman
2025-05-30fix(cli): Clear input buffer before onSubmit in InputPrompt (#633)Allen Hutchison
2025-05-30add flags for markdown rendering and live updating to Tool to avoid ↵Olcan
special-casing shell tool by name, and open door for other tools to specify their rendering/updating (#629)
2025-05-30fix(sandbox): pull sandbox image if it doesnt exist locally (#628)Brandon Keiji
2025-05-30fix(sandbox): prepare package.json before building sandbox image (#626)Brandon Keiji
2025-05-30disable markdown rendering of shell tool output (#625)Olcan
2025-05-30feat(sandbox): use package config to dictate sandbox image name (#624)Brandon Keiji
2025-05-30fix(sandbox): set default env var to 'gemini-cli-sandbox' (#620)Brandon Keiji
2025-05-30truncate (hide) tool output at the top, add some spacing, also fix shell ↵Olcan
output interval change accidentally undone in a previous commit (#619)
2025-05-30tweaks to shell abort logic based on feedback (#618)Olcan
2025-05-30allow aborting of shell mode (!) commands, similar to shell tool commands. ↵Olcan
fix bug that prevented aborts after first abort. more robust killing logic (#616)
2025-05-30update shell output at an interval to reduce flicker (#614)Olcan
2025-05-29Refactor read-file and support images. (#480)Jacob Richman
2025-05-29allow writing to user cache directory on macos (fixes use of lyria mcp ↵Olcan
server [to generate songs] under seatbelt) (#600)
2025-05-29Change Config to use named parameters. (#593)Jacob Richman
2025-05-28fix(cli): Support multiple @file references in atCommandProcessor (#590)Allen Hutchison
2025-05-28feat: add git branch name to footer (#589)Brandon Keiji
2025-05-28much improved support for background processes, avoiding termination (via ↵Olcan
SIGPIPE) or eventual blocking (e.g. due to filled OS buffers) (#586)
2025-05-28Cleanup: Remove low value StreamingContextType interface. (#585)Jacob Richman
2025-05-28Refactor: Add GeminiRespondingSpinner to make use of streamingState ↵Jacob Richman
idiomatic (#583)
2025-05-28Add a keybinding for ctrl+w to delete the previous word. (#582)DeWitt Clinton
Adds the following new keybindings to the cli text input buffer: - `Ctrl+W` : Delete previous word
2025-05-28Display git commit info in the /about section. (#567)DeWitt Clinton
This change detects the most recent git commit short hash and writes it to the `GIT_COMMIT_INFO` constant in `packages/cli/src/generated/git-commit.sh`, optionally appending the string "(local modifications)" if additional local changes after that commit are detected. If set, this string is displayed in the `/about` dialog as well as passed into the `/bug` template. Example: ``` > /about ╭───────────────────────────────────────────────────────────────────────────╮ │ │ │ About Gemini CLI │ │ │ │ CLI Version development │ │ Git Commit 43370ab (local modifications) │ │ Model gemini-2.5-pro-preview-05-06 │ │ Sandbox sandbox-exec (minimal) │ │ OS darwin v23.11.0 │ │ │ ╰───────────────────────────────────────────────────────────────────────────╯ ``` Additionally, this change updates `.gitignore` to ignore the generated files, `scripts/clean.sh` to remove them, and adds a `npm run generate` stage for this and any other generators we need to write.
2025-05-27feat: Allow cancellation of in-progress Gemini requests and pre-execution checksTaylor Mullen
- Implements cancellation for Gemini requests while they are actively being processed by the model. - Extends cancellation support to the logic within tools. This allows users to cancel operations during the phase where the system is determining if a tool execution requires user confirmation, which can include potentially long-running pre-flight checks or LLM-based corrections. - Underlying LLM calls for edit corrections (within and ) and next speaker checks can now also be cancelled. - Previously, cancellation of the main request was not possible until text started streaming, and pre-execution checks were not cancellable. - This change leverages the updated SDK's ability to accept an abort token and threads s throughout the request, tool execution, and pre-execution check lifecycle. Fixes https://github.com/google-gemini/gemini-cli/issues/531
2025-05-27live output from shell tool (#573)Olcan
2025-05-27fix tool cancellation while executing (#575)Olcan
2025-05-27refactor: use React strict mode (#569)Brandon Keiji
2025-05-27fix: default to Gemini API if GEMINI_API_KEY is set and when ↵sasha-gitg
GOOGLE_GENAI_USE_VERTEXAI is set to True (#566)
2025-05-26Refactor(chat): Introduce custom Chat class for future modificationsTaylor Mullen
- Copied the `Chat` class from `@google/genai` into `packages/server/src/core/geminiChat.ts`. - This change is in preparation for future modifications to the chat handling logic. - Updated relevant files to use the new `GeminiChat` class. Part of https://github.com/google-gemini/gemini-cli/issues/551
2025-05-25Fix(cli): Prevent premature input box reactivation during tool confirmationTaylor Mullen
- Introduced a 'validating' state for tool calls to prevent the input box from reappearing while waiting for a tool's `shouldConfirmExecute` method to complete. - When a tool call is initiated, it's now immediately set to a 'validating' status. This ensures the UI remains in a busy/responding state. - `useGeminiStream` now considers the 'validating' state as part of `StreamingState.Responding`. - `useToolScheduler` has been updated to: - Set the initial status of new tool calls to 'validating'. - Asynchronously perform the `shouldConfirmExecute` check. - Transition to 'awaiting_approval' or 'scheduled' based on the check's outcome. - This resolves an issue where a slow `shouldConfirmExecute` could lead to the input prompt becoming active again before the tool call lifecycle was fully determined. While 'validating' is currently treated similarly to 'executing' in the UI, this new state provides a foundation for more customized user experiences during this phase in the future. Fixes https://github.com/google-gemini/gemini-cli/issues/527
2025-05-25Change tool call spinner to be different.Taylor Mullen
- This differentiates the tool calling spinner from one that matches the normal loading indiator to somethign a little more seamless.
2025-05-25Reduce excessive diff separators in CLI. (#535)DeWitt Clinton
Increases the threshold for rendering diff separators in the CLI's diff display. Previously, a separator was shown for gaps of more than one context line, leading to excessive separators in diffs with many small changes close together (Issue #534). By increasing `MAX_CONTEXT_LINES_WITHOUT_GAP` to 5, we allow for more context lines before a separator is added, significantly reducing visual clutter in such diffs. Added a test case to `DiffRenderer.test.tsx` to verify that separators are not rendered for small gaps within the new threshold.
2025-05-24feat: Add GEMINI.md tip to UITaylor Mullen
- Display a tip to create a GEMINI.md file if one doesn't exist. - Pass config to Tips component so it can inspect the initial GEMINI.md count.
2025-05-24Code review comment fixes and some refactors. (#525)Jacob Richman
No intentional different behavior aside for tweaks suggested from the code review of #506 Refactor: Extract console message logic to custom hook This commit refactors the console message handling from App.tsx into a new custom hook useConsoleMessages. This change improves the testability of the console message logic and declutters the main App component. Created useConsoleMessages.ts to encapsulate console message state and update logic. Updated App.tsx to utilize the new useConsoleMessages hook. Added unit tests for useConsoleMessages.ts to ensure its functionality. I deleted and started over on LoadingIndicator.test.tsx as I spent way too much time trying to fix it before just regenerating the tests as the code was easier to write tests for from scratch and the existing tests were not that good (I added them in the previous pull request).
2025-05-23Make console message support more robust to logging in the middle of ↵Jacob Richman
rendering. (#521)
2025-05-23Add additional readline-like keybindings. (#524)DeWitt Clinton
Adds the following conventional readline-like keybindings: - `Ctrl+H`: Delete the previous character. - `Ctrl+D`: Delete the next character. Additionally, remaps the Debug Console command from Ctrl+D to Ctrl+O, which had been first introduced in PR #486.
2025-05-23🧹 FormatMiguel Solorio
2025-05-23Update packages/cli/src/ui/types.tsMiguel Solorio
Co-authored-by: N. Taylor Mullen <[email protected]>
2025-05-23Update packages/cli/src/ui/hooks/slashCommandProcessor.tsMiguel Solorio
Co-authored-by: N. Taylor Mullen <[email protected]>
2025-05-23Remove CLI info from footerMiguel Solorio
2025-05-23Add `/about` commandMiguel Solorio
2025-05-23feat: Modify loading indicator to support a paused state (#506)Jacob Richman
2025-05-23Fix bug updating the cursor after navigating history. (#507)Jacob Richman