Skip to content

Conversation

@Hahihula
Copy link
Collaborator

@Hahihula Hahihula commented Dec 12, 2025

2025-12-11717136157 082498-0100 - DEBUG - starting new comectles Mtpsiraw githubusercentent com image

@gemini-code-assist
Copy link

Summary of Changes

Hello @Hahihula, 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 comprehensive tool selection feature for the ESP-IDF installation wizard. It provides both command-line and graphical user interface options for users to specify which development tools they wish to install alongside their chosen ESP-IDF versions. This enhancement aims to give users more control over their installation environment, allowing for more tailored and efficient setups.

Highlights

  • Tool Selection Feature: Introduced a new tool selection mechanism for ESP-IDF installations, allowing users to choose specific development tools for each IDF version, distinguishing between required and optional tools.
  • CLI Argument for Tools: Added a new --idf-tools argument to the CLI, enabling non-interactive specification of tools to be installed.
  • GUI Integration: A new ToolsSelect.vue component has been added to the wizard, providing an interactive UI for tool selection, including tabs for multiple IDF versions, and options to select/deselect optional tools.
  • Backend Logic: New Rust modules and modifications to existing ones handle fetching tool metadata, filtering by platform/target, managing tool selection state, and integrating with the installation process.
  • Localization: New localization strings have been added for English and Chinese to support the new tool selection UI and related 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

@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 introduces a new feature for selecting which tools to install with ESP-IDF, both in the CLI wizard and the GUI. The implementation is quite comprehensive, covering backend logic in Rust and a new UI component in Vue.

Overall, the changes are well-structured. I've left a few comments with suggestions for minor improvements, such as removing redundant code, simplifying some logic for better readability and performance, and refactoring a Vue component to reduce duplication.

Please also note the typo in the PR title ('implelmentation').

Comment on lines 13 to 17
use idf_im_lib::tool_selection::{
fetch_tools_file, get_tools_for_selection, get_tools_json_url,
select_tools_interactive, select_tools_non_interactive,
get_required_tools, ToolSelectionInfo,
};

Choose a reason for hiding this comment

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

medium

The imports get_required_tools and ToolSelectionInfo are not used in this file. They should be removed to keep the code clean.

use idf_im_lib::tool_selection::{
    fetch_tools_file, get_tools_for_selection, get_tools_json_url,
    select_tools_interactive, select_tools_non_interactive,
};

}
};

let targets = settings.target.clone();

Choose a reason for hiding this comment

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

medium

The targets variable is cloned here, but it's only used immutably within the loop. To avoid an unnecessary allocation, you can remove this line and use settings.target directly inside the loop when calling get_tools_for_selection.

On line 561, you would change targets.as_ref().map(|t| t.as_slice()) to settings.target.as_ref().map(|t| t.as_slice()).

Comment on lines +475 to +480
config.repo_stub.clone().as_deref(),
&idf_version.to_string(),
config.idf_mirror.clone().as_deref()

Choose a reason for hiding this comment

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

medium

The .clone() calls on config.repo_stub and config.idf_mirror are redundant. as_deref() can operate on &Option<String> directly. You can remove the clones for better performance and cleaner code.

Suggested change
config.repo_stub.clone().as_deref(),
&idf_version.to_string(),
config.idf_mirror.clone().as_deref()
config.repo_stub.as_deref(),
&idf_version.to_string(),
config.idf_mirror.as_deref()

Comment on lines +532 to +552
if config.idf_tools_per_version.is_none() {
config.idf_tools_per_version = Some(HashMap::new());
}
if let Some(ref mut per_version) = config.idf_tools_per_version {
per_version.insert(
idf_version.clone(),
get_tool_names(&selected_tools),
);
}

Choose a reason for hiding this comment

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

medium

This block of code for inserting into the idf_tools_per_version HashMap can be simplified using get_or_insert_with. This makes the code more concise and idiomatic.

            config
                .idf_tools_per_version
                .get_or_insert_with(HashMap::new)
                .insert(idf_version.clone(), get_tool_names(&selected_tools));

}

// Assuming these helper functions exist in your codebase
// use crate::helpers::{get_settings_non_blocking, update_settings, send_message};

Choose a reason for hiding this comment

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

medium

This commented-out use statement should be removed to keep the code clean.

Comment on lines +546 to +549
settings.repo_stub.clone().as_deref(),
&version,
settings.idf_mirror.clone().as_deref()

Choose a reason for hiding this comment

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

medium

The .clone() calls on settings.repo_stub and settings.idf_mirror are redundant. as_deref() can operate on &Option<String> directly, so you can remove the clones for slightly better performance and cleaner code.

Suggested change
settings.repo_stub.clone().as_deref(),
&version,
settings.idf_mirror.clone().as_deref()
settings.repo_stub.as_deref(),
&version,
settings.idf_mirror.as_deref()

@Hahihula Hahihula force-pushed the EIM-123-tools-selection branch from ef8adcc to 1b42339 Compare December 12, 2025 10:02
@Hahihula Hahihula force-pushed the EIM-123-tools-selection branch from 1b42339 to d3f6cb0 Compare January 2, 2026 12:15
@Hahihula
Copy link
Collaborator Author

Hahihula commented Jan 2, 2026

I modified the tools selection so it has for now hardcoded esp-clang as the IDEs needs that to work properly

image

@Hahihula Hahihula changed the title WIP: Added minimal tools selection implelmentation Added minimal tools selection implelmentation Jan 2, 2026
@Hahihula Hahihula changed the title Added minimal tools selection implelmentation EIM-123 Added minimal tools selection implelmentation Jan 5, 2026
forced esp-clang to be required tool
@Hahihula Hahihula force-pushed the EIM-123-tools-selection branch from d3f6cb0 to 2ac0d3f Compare January 5, 2026 12:00
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.

3 participants