feat: follow up plan-review-pass changes#15
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 introduces a significant enhancement to the agent loop runner by adding an automatic plan review step for plain-text prompts, allowing for better validation of initial task plans. It also refactors the internal handling of Codex agent output into a dedicated rendering module, improving modularity and maintainability. These changes streamline the workflow for users and provide more control over the planning and review phases of agent execution. 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
|
53afd5f to
19095e5
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a plan review pass, making the --proof argument optional and adding a new --review-plan argument. The implementation includes extracting codex rendering logic into a new src/loop/codex-render.ts file, which is a great improvement for modularity. The argument parsing, task running logic, and prompts are all updated accordingly. The changes are well-tested, with new test files and updates to existing ones. Overall, this is a solid contribution. I have one suggestion to improve the argument parsing logic for better clarity and maintainability.
| try { | ||
| opts.reviewPlan = parsePlanReviewValue(next); | ||
| return index + 1; | ||
| } catch { | ||
| opts.reviewPlan = "other"; | ||
| return index; | ||
| } |
There was a problem hiding this comment.
Using a try-catch block for control flow can make the code harder to understand and maintain. It's generally better to use explicit checks. In this case, you can directly check if the next argument is one of the valid values for --review-plan.
This change makes the logic for handling the presence or absence of a value for --review-plan more explicit and readable.
| try { | |
| opts.reviewPlan = parsePlanReviewValue(next); | |
| return index + 1; | |
| } catch { | |
| opts.reviewPlan = "other"; | |
| return index; | |
| } | |
| if (next === "other" || next === "claude" || next === "codex" || next === "none") { | |
| opts.reviewPlan = next; | |
| return index + 1; | |
| } else { | |
| opts.reviewPlan = "other"; | |
| return index; | |
| } |
Summary
src/loop/codex-render.tsand wire it into the runner flowValidation
bun run check