Interactive follow-up loop and worktree improvements#2
Conversation
Summary of ChangesHello @axeldelafosse, 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 Highlights
Changelog
Activity
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. 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces an interactive follow-up loop and enhances worktree creation by adding nesting detection and ensuring PLAN.md portability. The changes are well-implemented and include corresponding tests. My review focuses on a few opportunities to improve code clarity and reduce duplication, which will enhance the long-term maintainability of the new features.
Extract iteration logic into runIterations helper to keep runLoop focused on the interactive prompt shell. After iterations complete, users at a TTY (or inside tmux) are prompted for follow-up tasks instead of the process exiting immediately. Worktree improvements: - Detect when already inside a worktree to avoid nesting - Move PLAN.md from the original cwd into the new worktree - Remove redundant pathExists guard (git handles conflicts)
2acd941 to
3cc2865
Compare
…etection, extract test helper - Differentiate interactive vs non-interactive log when hitting max iterations - Consolidate two separate worktree detection blocks into a single boolean check - Extract makeWorktreeRunGit() helper to reduce duplication in PLAN.md tests
Summary
runIterationshelper to keeprunLoopfocused on the interactive prompt shell.rev-parse --show-superproject-working-treeand--git-dirto avoid nesting worktrees inside worktrees.PLAN.mdfrom the original cwd into the new worktree so the task context follows the user.pathExistsguard intryCreateWorktree— git's own conflict detection is more reliable.env: {}to therunInTmuxtest mock.Test plan
bun test tests/loop/main.test.ts— all 5 existing tests pass (readline mock prevents hangs)bun test tests/loop/worktree.test.ts— 3 new worktree detection tests + 2 PLAN.md move tests passbun run check— lint, types, and style passloopin a TTY and verify follow-up prompt appears after iteration completes