Skip to content
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

ListView in Predictive IntelliSense should order predictors by last accepted #2922

Open
theJasonHelmick opened this issue Oct 14, 2021 · 2 comments
Assignees
Labels
Area-Predictors Label for issues related to predictors Issue-Enhancement It's a feature request. Issue-Triaged It indicates an issue was triaged

Comments

@theJasonHelmick
Copy link
Collaborator

theJasonHelmick commented Oct 14, 2021

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.

Screen Shot 2021-10-14 at 8 13 59 AM

  • 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.
@theJasonHelmick theJasonHelmick added the Issue-Enhancement It's a feature request. label Oct 14, 2021
@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Oct 14, 2021
@theJasonHelmick theJasonHelmick added Issue-Triaged It indicates an issue was triaged and removed Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. labels Oct 14, 2021
@theJasonHelmick theJasonHelmick added this to the 2.2.0-Consider milestone Oct 14, 2021
@daxian-dbw
Copy link
Member

Quoted from Yevhen from an internal thread:

The proposed changes seem to make the psReadLine experience more flexible and adaptable to user needs. Hovewer, one can think of scenarios where such a change may be far from optimal. For example, if users pay attention only to the top predictions, lower displayed predictors may not have a chance to swim up when needed; or users may get used to the location of predictors and search for them, if line locations allocated to predictos change, that may create a frustrating experience. It would be beneficial to be have tools enabling a/b testing and measuring results for the whole psReadLine. If not for powershell, at least for cloudshell.

@StevenBucher98 StevenBucher98 added the Area-Predictors Label for issues related to predictors label Jan 6, 2023
@StevenBucher98
Copy link
Collaborator

I think implementing something like recommending different predictions from the most recently accepted prediction source would require more detailed information about each prediction, similar to that proposed in #1886

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Predictors Label for issues related to predictors Issue-Enhancement It's a feature request. Issue-Triaged It indicates an issue was triaged
Projects
None yet
Development

No branches or pull requests

3 participants