-
Notifications
You must be signed in to change notification settings - Fork 89
use CLI output value as path of generate directory (if an output value is provided)
#1622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @keaton22, 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 addresses a usability issue where the CLI --output parameter was not being utilized as the default path for the 'Generate' directory within the application's user interface. My changes ensure that this CLI-provided path is properly propagated through the Electron main and UI processes, allowing the frontend to use it as the default, thereby improving the consistency and user experience when interacting with the application via the command line.
Highlights
- CLI Output Path Propagation: I've updated the application's startup process to ensure that the
--outputvalue provided via the command line interface (CLI) is correctly passed from the main Electron process down to the UI components. This involves modifying several functions insrc-electron/main-process/startup.js,src-electron/ui/main-ui.js,src-electron/ui/ui-util.js, andsrc-electron/ui/window.jsto accept and forward this new parameter. - Default Generation Directory in UI: The UI component
ZCLToolbar.vuenow leverages the propagated--outputvalue. Specifically, thegenerationDirectoryproperty is initialized with this CLI-provided path. Furthermore, when a new generation directory is reported (e.g., via a file dialog), the UI will now fall back to the CLI--outputvalue if the reported path is null or undefined, ensuring a consistent default.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| 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 issue 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 is currently in preview and 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 to provide feedback.
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
-
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. ↩
There was a problem hiding this 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 correctly implements the feature to use the --output CLI argument as the default generation directory in the UI. The value is plumbed from the main process to the renderer process via a query string parameter, which is a reasonable approach. The changes are consistent across the affected files.
My main feedback is to update the JSDoc comments for the functions whose signatures have been changed to include the new output parameter. This is important for maintaining code clarity and documentation consistency.
| function enableUi( | ||
| port, | ||
| zapFiles, | ||
| uiMode, | ||
| standalone, | ||
| zapFileExtensions, | ||
| output | ||
| ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the commit to fix this
| * @param {*} port | ||
| */ | ||
| export function windowCreateIfNotThere(port) { | ||
| export function windowCreateIfNotThere(port, output) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the commit to fix this
| restPort, | ||
| zapFileExtensions | ||
| zapFileExtensions, | ||
| output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the commit to fix this
4646345 to
a6d7bb6
Compare
96b1592 to
263d2ce
Compare
|
@paulr34 @tecimovic @brdandu I want to be respectful of your time and availability, but I would be very appreciative if I could get some feedback on this pull request. Thank you! |
|
@keaton22 the workflow is not running. That needs to pass. |
Thank you @paulr34! I've merged the latest changes from main into this branch, which I believe triggered the |
Problem
--output/--out/--o, that value does not get used as the default path for theGeneratedirectory. I believe it should.Solution
--output/--out/--oquery-able from the front-end by passing it as a parameter in theuiFunction()instartup.js.Notes
--output/--out/--omust use escaped backslashes (e.g.C:\\Users\\username\\zap-projects)