Skip to content

feat(sessions): record interactive-only errors and warnings to chat recording JSON files#13300

Merged
mrcabbage972 merged 7 commits intogoogle-gemini:mainfrom
Piebald-AI:record-interactive-ui-error-warning-messages
Nov 19, 2025
Merged

feat(sessions): record interactive-only errors and warnings to chat recording JSON files#13300
mrcabbage972 merged 7 commits intogoogle-gemini:mainfrom
Piebald-AI:record-interactive-ui-error-warning-messages

Conversation

@bl-ue
Copy link
Copy Markdown
Contributor

@bl-ue bl-ue commented Nov 18, 2025

This PR implements recording of interactive-only messages (e.g. ℹ Request cancelled. and ✕ [API Error: ...]), and makes the /clear command start a new chat recording session so that subsequent messages are written to a new JSON file.


Note: This PR is the 5th in a series of PRs that implement automatic chat recording and resuming in both interactive and non-interactive modes, with command line flags for non-interactive resuming and session management, and an interactive session browser.

PR #4401 was the original monolithic PR, which implemented this feature from the ground up. It's too large to merge as-is, however, and so it was broken up into several smaller PRs, of which this PR is the 5th.

Please see #4401's description for the full context of this PR. The original monolithic PR's description contains a detailed analysis of the entire system, with an example of the recording JSON and a demo video.

@bl-ue bl-ue requested a review from a team as a code owner November 18, 2025 18:14
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @bl-ue, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the chat recording functionality by ensuring that the /clear command properly starts a new recording session, isolating conversation history. It also expands the scope of recorded messages to include interactive-only UI feedback like info, warning, and error messages, providing a more comprehensive log of user interactions. These changes are part of a larger effort to implement robust automatic chat recording and session management.

Highlights

  • New Chat Recording Session on Clear: The /clear command now initiates a new chat recording session, ensuring that subsequent messages are saved to a distinct JSON file. This improves session management and data integrity for recorded conversations.
  • Interactive-Only Message Recording: The system now records interactive-only messages, such as informational messages (ℹ Request cancelled.), warnings, and API errors (✕ [API Error: ...]), providing a more complete record of the user's interaction experience.
  • History Manager Integration: The useHistory hook has been updated to integrate with the ChatRecordingService, allowing it to record UI-specific messages (info, warning, error) when a session is not being resumed.
  • Session Resume Behavior: When resuming a session, the addItem function in the history manager now correctly flags messages as being part of a resumed session, preventing them from being re-recorded as new interactive messages.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully implements chat recording for UI-specific messages and creates new recording sessions upon using the /clear command. The changes are well-structured and cover session resumption and browser compatibility. However, I found a critical issue in slashCommandProcessor.ts where adding a new parameter to handleSlashCommand has broken the argument passing for recursive calls, which affects commands requiring user confirmation. This needs to be addressed to prevent regressions in functionality.

Comment thread packages/cli/src/ui/hooks/slashCommandProcessor.ts Outdated
@bl-ue bl-ue changed the title feat: make /clear start a new chat recording session feat(sessions): record interactive-only errors and warnings to chat recording JSON files Nov 18, 2025
@bl-ue
Copy link
Copy Markdown
Contributor Author

bl-ue commented Nov 19, 2025

Next: #13351

@mrcabbage972 mrcabbage972 added this pull request to the merge queue Nov 19, 2025
Merged via the queue into google-gemini:main with commit e1c711f Nov 19, 2025
21 checks passed
@bl-ue bl-ue deleted the record-interactive-ui-error-warning-messages branch November 19, 2025 16:44
danpalmer pushed a commit to danpalmer/gemini-cli that referenced this pull request Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants