Conversation
Summary of ChangesHello, 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 refines the automated handling of Claude's startup prompts within a tmux environment. The primary goal is to ensure that the system reliably detects and confirms Claude's bypass and development channel prompts, even when text wrapping occurs in the terminal. This improves the stability and user experience when interacting with Claude in automated workflows. Highlights
Using Gemini Code AssistThe 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
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 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request enhances the handling of Claude prompts within tmux. It introduces new constants for specific prompt strings, refactors the detectClaudePrompt function to be more robust by normalizing pane text and expanding the bypass prompt detection logic. Crucially, it modifies the unblockClaudePane function to introduce a delay between sending 'Down' and 'Enter' keys when confirming the bypass prompt, addressing potential race conditions. New and updated unit tests have been added to cover these changes, including tests for wrapped dev-channel prompts, the updated bypass prompt wording, and the correct command for launching Claude in bypass mode. There is no specific feedback to provide on the code changes.
| deps.sendKeys(pane, ["Down"]); | ||
| await deps.sleep(CLAUDE_PROMPT_POLL_DELAY_MS); | ||
| deps.sendKeys(pane, ["Enter"]); |
There was a problem hiding this comment.
Separating the sendKeys for "Down" and "Enter" with a sleep call is a crucial improvement. This ensures that the UI has sufficient time to register the "Down" key press and update the selection before the "Enter" key is sent, preventing potential race conditions or incorrect selections in the Claude prompt. This significantly enhances the reliability of the bypass confirmation process.
Summary
DownandEnteras separate tmux key eventsTesting