Skip to content

Tags: Zibri/gemini-cli

Tags

2.3.3

Toggle 2.3.3's commit message
feat: Set 5-minute timeout for cURL requests

This commit introduces a 300-second (5-minute) timeout to all major cURL requests within the application.

Previously, network requests had no timeout, which could cause the command-line tool to hang indefinitely if a server response was not received.

By setting CURLOPT_TIMEOUT, we ensure that the application will stop waiting for a response after a reasonable period, improving its robustness and preventing it from getting stuck on network issues. This has been applied consistently across the free API, GET, and general cURL request functions.

2.3.2

Toggle 2.3.2's commit message
feat: Add argument handling for /savelast command

This commit enhances the `/savelast` command by adding argument parsing and validation.

The changes include:
- A check to ensure a filename is provided. If not, a "Usage: /savelast filename" message is printed to stderr.
- Trimming of trailing whitespace from the provided filename to prevent potential errors when creating the file.

2.3.1

Toggle 2.3.1's commit message
feat: Add interactive flag and improve input handling

This commit introduces several improvements to enhance user experience and application stability.

- **Force Interactive Mode:** A new `-i` or `--interactive` command-line flag has been added. This allows users to force the application into interactive mode, even when stdin or stdout is not a terminal.

- **Trim Whitespace on Save:** Trailing whitespace is now automatically trimmed from filenames when using the `/save` and `/session save` commands. This prevents errors and unexpected behavior caused by accidental spaces in user input.

- **Prevent Path Overflow:** A pre-calculation check has been added to the `get_sessions_path` function to ensure the constructed path does not exceed the buffer size, preventing potential buffer overflows.

2.3.0

Toggle 2.3.0's commit message
feat(media): Add support for media resolution control

This commit introduces the ability to specify the resolution for media processing.

Two new command-line flags have been added:
- `--mm`: Sets media resolution to medium.
- `--ml`: Sets media resolution to low.

This setting is then included in the `generationConfig` of the API request to the backend. By default, no resolution is specified.

2.2.9

Toggle 2.2.9's commit message
feat(cli): Add short aliases for session management options

This commit introduces shorter, more convenient aliases for the session management command-line flags.

The following aliases have been added:
- `--sl` for `--list-sessions`
- `--ls` for `--load-session`
- `--ss` for `--save-session`

Additionally, whitespace has been adjusted in the help message for better alignment and readability.

2.2.8

Toggle 2.2.8's commit message
Feat: Add short aliases for session management options

This commit introduces shorter aliases for the session-related command-line options to improve user experience and reduce typing.

The following aliases have been added:
- `--sl` for `--list-sessions`
- `--ss` for `--save-session`
- `--ls` for `--load-session`

2.2.7

Toggle 2.2.7's commit message
Refactor: Remove Windows support and simplify build

This commit removes the Windows compatibility layer to streamline the codebase and focus on POSIX-compliant systems. This simplifies maintenance and eliminates the need for platform-specific conditional compilation.

Key changes:
- Deleted the `compat.h` header and all `_WIN32` preprocessor blocks from `gemini-cli.c`.
- Removed the embedded `linenoise` library, making `readline` a hard dependency.
- Simplified the `Makefile` to a single-step, POSIX-only build process. The executable is now stripped during linking via `LDFLAGS = -s`.
- Replaced Windows-specific API calls (for paths, terminal I/O, etc.) with their POSIX equivalents.
- Unified the API error handling to retry on any non-200/403 HTTP status code, rather than specific 5xx errors.

2.2.6

Toggle 2.2.6's commit message
feat: Add more MIME types and handle 524 errors

This commit enhances the `gemini-cli` tool by:

- Adding a significant number of new MIME types for audio, video, and image formats, improving its ability to handle various file uploads correctly.
- Updating the retry logic for API requests to also handle the HTTP 524 "A Timeout Occurred" error, making the tool more resilient to different types of transient network issues. The error message now also includes the specific HTTP code.

2.2.5

Toggle 2.2.5's commit message
Feat: Add support for interrupting API calls

This commit introduces the ability to gracefully interrupt in-progress API calls using Ctrl+C.

When an API request is in flight, pressing Ctrl+C once will set an interrupt flag. This causes the cURL write callback to signal an abort, stopping the current request and printing an "[Interrupted]" message without terminating the program.

Pressing Ctrl+C a second time will trigger the default SIGINT behavior, immediately exiting the application. The interrupt flag is reset before each new prompt in interactive mode.

2.2.4

Toggle 2.2.4's commit message
feat(cli): Allow optional prompt with /attach command

This commit enhances the `/attach` command to accept an optional text prompt immediately following the filename. This allows users to attach a file and ask a question about it in a single command, improving the interactive workflow.

The implementation handles this by:
1.  Robustly parsing the filename from the input string using `sscanf`.
2.  Attaching the file as usual using the existing `handle_attachment_from_stream` function.
3.  Checking for any text that follows the filename.
4.  If a prompt is found, the original command line buffer is replaced with just the prompt text.
5.  The `is_command` flag is then set to false, causing the main loop to process the buffer as a regular prompt to be sent to the model.

This provides a more intuitive and efficient way to interact with file attachments.

Example usage:
`/attach image.jpeg Describe this image for me.`