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

Allow a prediction result to label tokens in it specially to indicate additional information for attention #3690

Open
1 task done
StevenBucher98 opened this issue May 16, 2023 · 1 comment
Labels
Area-Predictors Label for issues related to predictors Issue-Enhancement It's a feature request.
Milestone

Comments

@StevenBucher98
Copy link
Collaborator

StevenBucher98 commented May 16, 2023

Prerequisites

  • Write a descriptive title.

Description of the new feature/enhancement

Currently there is no way to render different colors for predictions results. Predictors may want to be able to highlight particular parts of their prediction in order to bring the users attention to it for them to change or check before execution. One example scenario may be for Az Predictor when they give a parameter result that may be important for the user to review before execution like size of a VM. This is a simple mock up of the scenario.

image

Proposed technical implementation details (optional)

There are 2 options from the implementation perspective:

  1. Allow a prediction result to have a new field to store substring spans for labeling substrings, which then will be rendered differently by PSReadLine to indicate "attention needed".

  2. Allow a prediction result to provide "presentation text" along with the plain "suggestion text". The "presentation text" is VT decorated suggestion text, and when it's provided, PSReadLine simply using it for rendering. When it's not provided, PSReadLine do the same rendering as of today based on the "suggestion text".

@StevenBucher98 StevenBucher98 added the Issue-Enhancement It's a feature request. label May 16, 2023
@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label May 16, 2023
@StevenBucher98 StevenBucher98 added the Area-Predictors Label for issues related to predictors label May 16, 2023
@daxian-dbw daxian-dbw changed the title Enable prediction results to have colors in ListView Allow a prediction result to label tokens in it specially to indicate additional information for attention May 16, 2023
@daxian-dbw
Copy link
Member

daxian-dbw commented May 16, 2023

I prefer to the option (1) for 2 reasons:

  1. In the long term, it may be good for PSReadLine to be aware of the additional metadata about the prediction result to be rendered, which may light up new scenarios.

  2. Letting PSReadLine own the rendering is better as it will provide a unified user experience -- e.g. the same color will be used indicating "attention needed", instead of letting individual predictor to define their own color that indicates "attention needed".

@StevenBucher98 StevenBucher98 added this to the Future milestone Aug 28, 2023
@StevenBucher98 StevenBucher98 removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Aug 28, 2023
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.
Projects
None yet
Development

No branches or pull requests

2 participants