-
-
Notifications
You must be signed in to change notification settings - Fork 10
Add new west config command with UI integration and optimize workspace setup #134
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
Conversation
@rijesha 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
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.
Please see if the WorkspaceSetupFromCurrentDirectory function can be further optimized.
|
||
if (!selectedOption) { | ||
return false; | ||
switch (westConfigResult.option) { |
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.
Can't this entire switch statement be handled by the new function.
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.
You're absolutely right! I've moved the entire switch statement logic into the westConfig
function itself. The westConfig
function now prepares the westSelection
internally and returns it ready to use, eliminating the redundant switch statement in WorkspaceSetupFromCurrentDirectory
. This optimization reduced the function by 22 lines while maintaining all functionality. (commit db941d5)
@copilot please see comments and make changes |
…to westConfig Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
I've optimized the |
@copilot can you do a review now. |
…ernal installation handling Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
I've completed a comprehensive review and implemented an additional optimization. The Key improvements made:
Review results: The function is now highly optimized and maintainable while preserving all existing functionality. (commit 3bff5cc) |
* Pre release (#133) * Prerelease branch prep (#131) (#132) * Changed the way releases work * More fixes to prerelease * Fixed wording * Update release.yml to hopefully fix release with Haaleo action * Update release.yml * Add comprehensive GitHub Copilot instructions with expanded repository structure for Zephyr IDE development (#136) * Initial plan * Create comprehensive .github/copilot-instructions.md Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * Expand Repository Structure section with detailed file descriptions and architecture patterns Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * Added new bump patches (#137) * Bump esbuild from 0.20.2 to 0.25.0 (#140) Bumps [esbuild](https://github.com/evanw/esbuild) from 0.20.2 to 0.25.0. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md) - [Commits](evanw/esbuild@v0.20.2...v0.25.0) --- updated-dependencies: - dependency-name: esbuild dependency-version: 0.25.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump serialize-javascript and mocha (#139) Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) and [mocha](https://github.com/mochajs/mocha). These dependencies needed to be updated together. Updates `serialize-javascript` from 6.0.0 to 6.0.2 - [Release notes](https://github.com/yahoo/serialize-javascript/releases) - [Commits](yahoo/serialize-javascript@v6.0.0...v6.0.2) Updates `mocha` from 10.4.0 to 10.8.2 - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md) - [Commits](mochajs/mocha@v10.4.0...v10.8.2) --- updated-dependencies: - dependency-name: serialize-javascript dependency-version: 6.0.2 dependency-type: indirect - dependency-name: mocha dependency-version: 10.8.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump brace-expansion from 1.1.11 to 1.1.12 (#138) Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12. - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@1.1.11...v1.1.12) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 1.1.12 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * More fixes to bump workflow (#141) * Bump fix (#142) * More fixes to bump workflow * Another fix * Bump fix (#143) * More fixes to bump workflow * Another fix * Added write permission to bump workflow * Bump fix (#144) * More fixes to bump workflow * Another fix * Added write permission to bump workflow * added pullrequest permission to bump workflow * Add new west config command with UI integration and optimize workspace setup (#134) * Initial plan * Initial analysis and plan for west config command Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * Implement west config command with UI buttons and integration Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * Optimize WorkspaceSetupFromCurrentDirectory by moving switch logic into westConfig Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * Minor fixes * Removed out of tree setup function * Reworked gui elements * Further optimize WorkspaceSetupFromCurrentDirectory by extracting external installation handling Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * removed repeated id * Trying to fix failing test * Changed the way the global install pick is defined * Another attempt at fixing test * Another attempt at fixing test * Added debugging of tools folder * More error logging * More error logging * Ensured tools directory exists --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> Co-authored-by: Rijesh Augustine <rijeshaugustine@gmail.com> * 1.10.19 (#145) Co-authored-by: github-actions <github-actions@github.com> * Automated bump pr approve (#146) * Added make prerelease and make release workflows * More fixes to bump workflow * Automated bump pr approve (#148) * Added make prerelease and make release workflows * More fixes to bump workflow * Using different token for PR approval * 1.10.20 (#149) Co-authored-by: github-actions <github-actions@github.com> * Manually Fixing make pre-release.yml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Rijesh Augustine <7819200+rijesha@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Rijesh Augustine <rijeshaugustine@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com>
* Fixing test errors (#124) * Attempting to fix test errors * another attempt that probably wont work * Added some small delays * More tries to fix * Added explicit check if sdk is installed * Fixing up a few changes * More test fixes * Maybe now the tests are fixed * Fixed incorrect command name * Fixed multiple reprints of packages installed completed * Fixed sdk interactions being missed * Moved sdk mock ui bits back into workspace setup: * A few more minor changes * Fixing release workflow (#127) * Fixing release workflow (#128) * Fixing release workflow (#129) * Update release.yml * Update release.yml * Update package.json * Update release.yml * Update package.json * Update release.yml * Update release.yml * Changed the way releases work (#130) * Prerelease branch prep (#131) * Changed the way releases work * More fixes to prerelease * Fixed wording * Prerelease branch prep (#131) (#132) * Changed the way releases work * More fixes to prerelease * Fixed wording * Update release.yml to hopefully fix release with Haaleo action * Update release.yml * Pre release (#133) * Prerelease branch prep (#131) (#132) * Changed the way releases work * More fixes to prerelease * Fixed wording * Update release.yml to hopefully fix release with Haaleo action * Update release.yml * Add comprehensive GitHub Copilot instructions with expanded repository structure for Zephyr IDE development (#136) * Initial plan * Create comprehensive .github/copilot-instructions.md Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * Expand Repository Structure section with detailed file descriptions and architecture patterns Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * Added new bump patches (#137) * Bump esbuild from 0.20.2 to 0.25.0 (#140) Bumps [esbuild](https://github.com/evanw/esbuild) from 0.20.2 to 0.25.0. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md) - [Commits](evanw/esbuild@v0.20.2...v0.25.0) --- updated-dependencies: - dependency-name: esbuild dependency-version: 0.25.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump serialize-javascript and mocha (#139) Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) and [mocha](https://github.com/mochajs/mocha). These dependencies needed to be updated together. Updates `serialize-javascript` from 6.0.0 to 6.0.2 - [Release notes](https://github.com/yahoo/serialize-javascript/releases) - [Commits](yahoo/serialize-javascript@v6.0.0...v6.0.2) Updates `mocha` from 10.4.0 to 10.8.2 - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md) - [Commits](mochajs/mocha@v10.4.0...v10.8.2) --- updated-dependencies: - dependency-name: serialize-javascript dependency-version: 6.0.2 dependency-type: indirect - dependency-name: mocha dependency-version: 10.8.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump brace-expansion from 1.1.11 to 1.1.12 (#138) Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12. - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@1.1.11...v1.1.12) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 1.1.12 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * More fixes to bump workflow (#141) * Bump fix (#142) * More fixes to bump workflow * Another fix * Bump fix (#143) * More fixes to bump workflow * Another fix * Added write permission to bump workflow * Bump fix (#144) * More fixes to bump workflow * Another fix * Added write permission to bump workflow * added pullrequest permission to bump workflow * Add new west config command with UI integration and optimize workspace setup (#134) * Initial plan * Initial analysis and plan for west config command Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * Implement west config command with UI buttons and integration Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * Optimize WorkspaceSetupFromCurrentDirectory by moving switch logic into westConfig Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * Minor fixes * Removed out of tree setup function * Reworked gui elements * Further optimize WorkspaceSetupFromCurrentDirectory by extracting external installation handling Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> * removed repeated id * Trying to fix failing test * Changed the way the global install pick is defined * Another attempt at fixing test * Another attempt at fixing test * Added debugging of tools folder * More error logging * More error logging * Ensured tools directory exists --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com> Co-authored-by: Rijesh Augustine <rijeshaugustine@gmail.com> * 1.10.19 (#145) Co-authored-by: github-actions <github-actions@github.com> * Automated bump pr approve (#146) * Added make prerelease and make release workflows * More fixes to bump workflow * Automated bump pr approve (#148) * Added make prerelease and make release workflows * More fixes to bump workflow * Using different token for PR approval * 1.10.20 (#149) Co-authored-by: github-actions <github-actions@github.com> * Manually Fixing make pre-release.yml * More fixes to automated workflows * Fixed pre-release flow wording * Added git add -A * Updated Changelog * 2.0.0 * Ignore committing if there are no new file * Removed automatic PR approval * 2.0.0 (#154) Co-authored-by: github-actions <github-actions@github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Rijesh Augustine <7819200+rijesha@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Rijesh Augustine <rijeshaugustine@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com>
This PR implements a new
zephyr-ide.west-config
command that provides users with flexible options for configuring west in their workspace, along with significant optimizations to the workspace setup process.Key Features
West Configuration Analysis: The new
westConfig
function automatically detects:.west
folders in the current directorywest.yml
files in subdirectories (with configurable search depth)Configurable Options: Users can choose from up to 4 options based on what's available:
.west
folder is detectedwest.yml
files (with file picker for multiple files)UI Integration: Added west config buttons to both:
Workspace Setup Optimization
Significantly optimized the
WorkspaceSetupFromCurrentDirectory
function through:westConfig
functionhandleExternalInstallation
functionTechnical Implementation
package.json
andextension.ts
westConfig
function withWestConfigOptions
andWestConfigResult
interfacesWestConfigResult
interface to include preparedwestSelection
The implementation provides granular control over configuration options through the
WestConfigOptions
parameter, making it suitable for different workflow scenarios while significantly improving code organization and performance.Fixes #125.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.