summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/InputPrompt.tsx
AgeCommit message (Collapse)Author
2025-05-20feat: Allow Esc to exit shell modeTaylor Mullen
- Update InputPrompt.tsx to handle Esc key for exiting shell mode. - Modify ShellModeIndicator.tsx to reflect the new keybinding. Fixes https://buganizer.corp.google.com/issues/419087952
2025-05-20Merge InputPrompt and multiline-editor and move autocomplete logic directly ↵Jacob Richman
into InputPrompt (#453)
2025-05-20Implement additional readline-like keybindings, including alt-left arrow and ↵DeWitt Clinton
alt-right arrow. (#443) This change adds keybinding support for: - `Ctrl+B`: Moves the cursor backward one character. - `Ctrl+F`: Moves the cursor forward one character. - `Alt+Left Arrow`: Moves the cursor backward one word. - `Alt+Right Arrow`: Moves the cursor forward one word. Closes b/411469305.
2025-05-19ui tweaks (#442)Olcan
2025-05-18feat(cli): Introduce toggleable shell mode with enhanced UITaylor Mullen
- Implements a toggleable shell mode, removing the need to prefix every command with `!`. - Users can now enter and exit shell mode by typing `!` as the first character in an empty input prompt. - The input prompt visually indicates active shell mode with a distinct color and `! ` prefix. - Shell command history items (`user_shell`) are now visually differentiated from regular user messages. - This provides a cleaner and more streamlined user experience for frequent shell interactions. Fixes https://b.corp.google.com/issues/418509745
2025-05-14Add readline-like keybindings to the input prompts. (#354)DeWitt Clinton
New keybindings in the main input prompt (when auto-suggestions are not active): - `Ctrl+L`: Clears the entire screen. - `Ctrl+A`: Moves the cursor to the beginning of the current input line. - `Ctrl+E`: Moves the cursor to the end of the current input line. - `Ctrl+P`: Navigates to the previous command in the input history. - `Ctrl+N`: Navigates to the next command in the input history. In the multiline text editor (e.g., when editing a previous message): - `Ctrl+K`: Deletes text from the current cursor position to the end of the line ("kill line right").
2025-05-14Improvements to suggestions & slash commands (#344)Miguel Solorio
Co-authored-by: N. Taylor Mullen <[email protected]>
2025-05-13First step refactoring InputPrompt (#335)Jacob Richman
2025-05-13Use `Enter` on slash commands to execute (#334)Miguel Solorio
2025-05-13Multiline editor (#302)Jacob Richman
Co-authored-by: Taylor Mullen <[email protected]>
2025-05-07Refactor: Enhance @-command, Autocomplete, and Input Stability (#279)Allen Hutchison
2025-05-02Cleanup low value comments. (#248)Jacob Richman
2025-05-02Add autocomplete for slash commandsSeth Troisi
2025-05-01Support escaping spaces in file paths. (#241)Jacob Richman
2025-04-30Add @ command suggestions in the UI. (#219)Allen Hutchison
2025-04-26Follow up fixes from flickering PR.Taylor Mullen
- The push for these changes didn't make it through.... Just doing a quick fix here which should have been in: https://github.com/google-gemini/gemini-code/pull/181
2025-04-26feat: Fix flickering in iTerm + scrolling + performance issues.Taylor Mullen
- Refactors history display using Ink's <Static> component to prevent flickering and improve performance by rendering completed items statically. - Introduces ConsolePatcher component to capture and display console.log, console.warn, and console.error output within the Ink UI, addressing native handling issues. - Introduce a new content splitting mechanism to work better for static items. Basically when content gets too long we will now split content into multiple blocks for Gemini messages to ensure that we can statically cache larger pieces of history. Fixes: - https://b.corp.google.com/issues/411450097 - https://b.corp.google.com/issues/412716309
2025-04-19Give Gemini Code a face lift.Taylor Mullen
- This utilizes `ink-gradient` to render GEMINI CODE in amazing colors. - Added a shared color configuration for UX (should this be in config?). It's very possible that we shouldn't be talking about the specific colors and instead be mentioning "foreground"/"background"/inlineCode etc. type colors. - Updated existing color usages to utilize `Colors.*` Fixes https://b.corp.google.com/issues/411385593
2025-04-19Starting to modularize into separate cli / server packages. (#55)Evan Senter
* Starting to move a lot of code into packages/server * More of the massive refactor, builds and runs, some issues though. * Fixing outstanding issue with double messages. * Fixing a minor UI issue. * Fixing the build post-merge. * Running formatting. * Addressing comments.
2025-04-19Adding in a history buffer (#38)Evan Senter
Up and down arrows traverse the command history.
2025-04-18Add apache2 SPDX headers to all source files (#48)Tyler
2025-04-18Fix remaining tslint errors (YAY).Taylor Mullen
- Also updated ci.yml to ensure that linting failures will break the build. Fully fixes https://b.corp.google.com/issues/411384603
2025-04-18Run `npm run format`Taylor Mullen
- This has the entirety of the changes. Part of https://b.corp.google.com/issues/411720532
2025-04-18Introduce a config module to manage configuration (#22)Jaana Dogan
* Introduce a config module to manage configuration * Remove public modifier
2025-04-18Revert "Including a test harness for it, and making sure the cursor is ↵Evan Senter
always at the end." This reverts commit 97db77997fd6369031d2f1cf750051999fb0b5b5.
2025-04-18Including a test harness for it, and making sure the cursor is always at the ↵Evan Senter
end.
2025-04-18Initial auto-fixing of linting errors.Taylor Mullen
- This is the result of runing `npm lint -- -fix`
2025-04-18Adding a new parameter for model, and updating the default to 2.5 Flash. (#18)Evan Senter
2025-04-17Run `npm run format`Taylor Mullen
- Also updated README.md accordingly. Part of https://b.corp.google.com/issues/411384603
2025-04-17Initial commit of Gemini Code CLITaylor Mullen
This commit introduces the initial codebase for the Gemini Code CLI, a command-line interface designed to facilitate interaction with the Gemini API for software engineering tasks. The code was migrated from a previous git repository as a single squashed commit. Core Features & Components: * **Gemini Integration:** Leverages the `@google/genai` SDK to interact with the Gemini models, supporting chat history, streaming responses, and function calling (tools). * **Terminal UI:** Built with Ink (React for CLIs) providing an interactive chat interface within the terminal, including input prompts, message display, loading indicators, and tool interaction elements. * **Tooling Framework:** Implements a robust tool system allowing Gemini to interact with the local environment. Includes tools for: * File system listing (`ls`) * File reading (`read-file`) * Content searching (`grep`) * File globbing (`glob`) * File editing (`edit`) * File writing (`write-file`) * Executing bash commands (`terminal`) * **State Management:** Handles the streaming state of Gemini responses and manages the conversation history. * **Configuration:** Parses command-line arguments (`yargs`) and loads environment variables (`dotenv`) for setup. * **Project Structure:** Organized into `core`, `ui`, `tools`, `config`, and `utils` directories using TypeScript. Includes basic build (`tsc`) and start scripts. This initial version establishes the foundation for a powerful CLI tool enabling developers to use Gemini for coding assistance directly in their terminal environment. --- Created by yours truly: __Gemini Code__