Update the command prediction interface when the right time comes

Aperta
#3,548 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
cli

Direzione di ricerca

Start by reviewing the OnSuggestionDisplayed interface and the filtering changes in PR #3543. Determine the required interface update when a broader predictor change is prioritized, such as OpenAI model support, and confirm the compatibility impact across supported PowerShell versions. Done means the interface communicates accurate displayed-result information without leaving existing consumers unsupported.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Area-Predictors Issue-Enhancement
Prerequisites
  • Write a descriptive title.
Description of the new feature/enhancement

With the changes from the PR https://github.com/PowerShell/PSReadLine/pull/3543, the results from a predictor now may be filtered out and thus don't get displayed even if there are available slots in the list view. So, this sort of breaks the assumption when designing the OnSuggestionDisplayed interface method.

// NOTE: when any duplicate results were skipped, the 'count' passed in here won't be accurate as it still includes
// those skipped ones. This is due to the limitation of the 'OnSuggestionDisplayed' interface method, which didn't
// assume any prediction results from a predictor could be filtered out at the initial design time. We will have to
// change the predictor interface to pass in accurate information, such as:
//   void OnSuggestionDisplayed(Guid predictorId, uint session, int countOrIndex, int[] skippedIndices)
//
// However, an interface change has huge impacts. At least, a newer version of PSReadLine will stop working on the
// existing PowerShell 7+ versions. For this particular issue, the chance that it could happen is low and the impact
// of the inaccurate feedback is also low, so we should delay this interface change until another highly-demanded
// change to the interface is required in future (e.g. changes related to supporting OpenAI models).

Open this issue to track the interface change regarding OnSuggestionDisplayed, when another highly-demanded change to the interface is required in future (e.g. changes related to supporting OpenAI models).

Proposed technical implementation details (optional)

No response

Lingua principale
C#
Stelle
4.4k
Fork
341
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PowerShell/PSReadLine

Tutte le issue di PowerShell/PSReadLine

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.