Improve automatic and manual asset selection#90
Open
gdevenyi wants to merge 3 commits intomarwanhawari:mainfrom
Open
Improve automatic and manual asset selection#90gdevenyi wants to merge 3 commits intomarwanhawari:mainfrom
gdevenyi wants to merge 3 commits intomarwanhawari:mainfrom
Conversation
When automatic asset detection fails, the manual selection prompt now shows a smart filtered list based on what matched: - Multiple OS+arch matches: show only those assets - OS match but no arch match: show OS-matched assets - No matches: show checksum-filtered list This reduces cognitive load by presenting only relevant options to users.
Add a new --show-all-assets flag to install, search, and upgrade commands that allows users to manually select from all available release assets instead of relying on automatic OS/architecture detection. Changes: - Add --show-all-assets CLI flag to install, search, and upgrade commands - Modify DetectAsset() to accept bypassDetection bool parameter - When bypassDetection is true, show all assets (excluding checksums) via manual selection prompt - Thread showAllAssets parameter through command handlers and core logic - Update TestDetectAsset to use new function signature The flag is useful when automatic detection fails or when users need to select a specific asset variant (e.g., different build, musl vs glibc). Bulk operations (upgrade --all, lockfile/Stewfile installs) continue to use auto-detection to avoid excessive prompts.
Add automatic asset selection preference for Linux binaries to reduce manual selection prompts when projects release multiple Linux variants. Preference order: 1. GNU (explicitly tagged with "gnu") 2. Unspecified (no gnu/musl tag, assumed to be gnu, preferred over musl) 3. MUSL (explicitly tagged with "musl") Changes: - Add RegexLinuxGnu and RegexLinuxMusl patterns to constants/constants.go - Implement linuxGnuMuslPreference() function in lib/github.go - Integrate preference logic into DetectAsset() function for Linux assets - Add comprehensive tests (4 test cases for DetectAsset, 7 for linuxGnuMuslPreference) The implementation only applies to Linux assets and is fully backward compatible. Non-Linux platforms (darwin, windows) are unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improvements to manual selection
Built using oh-my-pi using GLM-4.7