PSReadLine icon indicating copy to clipboard operation
PSReadLine copied to clipboard

Enable prompt to show prediction

Open SteveL-MSFT opened this issue 3 years ago • 1 comments

Prerequisites

  • [X] Write a descriptive title.

Description of the new feature/enhancement

An implementation of both IFeedbackProvider and ICommandPredictor can benefit just showing the prediction at the prompt before a keypress. I realize that PSReadLine is only invoked upon a keypress, so this may require changes to PS7 as well to make this work. We may want to special case it some most predictions still work against key presses.

Proposed technical implementation details (optional)

No response

SteveL-MSFT avatar Dec 27 '22 12:12 SteveL-MSFT

Here are mock ups for the experiences when feedback providers give prediction results:

Inline view

  • (If possible) Predictors will only chose the top most feedback provider to show only after feedback providers have been triggered in some way (is this possible in PSReadLine?)

Screenshot 2023-05-25 at 9 34 39 AM

  • Otherwise if no feedback provider has been trigger then don't show anything until characters are typed (experience now)

ListView

  • ListView will order the prediction sources based on order of feedback providers (import order) image

  • as user begins typing in ListView then history will take higher priority but still will be present

Screenshot 2023-05-25 at 11 17 18 AM

  • If the user has plugin predictors also enabled and only after a feedback provider trigger, then the feedback provider predictor results will be higher in the order
image

cc @daxian-dbw

StevenBucher98 avatar May 30 '23 01:05 StevenBucher98