ListView in Predictive IntelliSense should order predictors by last accepted
@theJasonHelmick is already working on this.
Since Oct 14, 2021.
Assessment
This issue has not been assessed yet.
Description
Description of the new feature/enhancement
PowerShell users should expect that the most relevant predictions are displayed first in ListView. This issue proposes changing the sort order of predictions to display predictions from the most recently accepted predictor first.
Current ListView display order
Currently, The ListView in Predictive IntelliSense provides a list of up to 10 predictions from history and/or additional predictors.
- Note - two predictors are displayed above, History and AZ Predictor.
Currently, ListView displays predictions based on the following:
- History is displayed first unless disabled. History gets a maximum of 3 lines.
- To disable: Set-PSReadLineOption -PredictionSource Plugin
- History-based predictions are treated special and are always listed at the top in the first 3 lines.
- After history, the remaining lines are allocated to the imported predictors.
- Example:
- If history only needs 2 lines, then 8 lines are available for additional predictors.
- If two predictors are imported, then P1 and P2 will each be allocated 4 lines.
- If P1 only needs 3 lines, the remaining lines are allocated to the remaining predictors - in this case P2 would get 5 lines.
- What is displayed first, after History?
- Additional predictors are displayed in the order in which their modules are loaded. (Either manually or in the users profile)
Proposed technical implementation details (optional)
Proposal:
PowerShell users using domain specific predictors would benefit from having the current working domain listed first in Listview. For instance, a user working with Azure may select a prediction beginning with New-AzResourceGroup. This user would benefit from having ListView display the AZ Predictor first in the list until another domain specific predictor is accepted. Currently, the user must remove, then import, the predictors in the order which they want displayed.
The order of the displayed predictions should be based on most recently accepted
- The History predictor should be treated as any other predictor and subject to being re-ordered.
- Predictors should be listed in the order of most recently accepted
- Note- an accepted predictions is a prediction from a predictor that is displayed, selected and executed by the user.
- ListView should display the most recently accepted predictor at the top.
- When the user accepts a prediction from a different predictor, the new accepted predictor is now displayed at the top of ListView.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 341
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PowerShell/PSReadLine
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Difficulty 1/5 Under an hour Newbie friendliness 68/100
PowerShell/PSReadLine#3470 · 3 reactions ·