From e7d4b1e769a654d740fbc226d413fb11a1e8ab5b Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Tue, 7 Apr 2026 08:21:36 -0500 Subject: [PATCH] docs(web): patch up comments for prior commit's changes --- .../worker-thread/src/main/model-compositor.ts | 6 +++--- .../worker-thread/src/main/predict-helpers.ts | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/web/src/engine/predictive-text/worker-thread/src/main/model-compositor.ts b/web/src/engine/predictive-text/worker-thread/src/main/model-compositor.ts index c036d879b2..a518642d2c 100644 --- a/web/src/engine/predictive-text/worker-thread/src/main/model-compositor.ts +++ b/web/src/engine/predictive-text/worker-thread/src/main/model-compositor.ts @@ -171,11 +171,11 @@ export class ModelCompositor { const deduplicatedSuggestionTuples = dedupeSuggestions(this.lexicalModel, rawPredictions, context); // Needs "casing" to be applied first. - // - // Will also add a 'keep' suggestion (with `.matchesModel = false`) matching - // the current state of context if there is no such matching prediction. const hasExistingKeep = processSimilarity(this.lexicalModel, deduplicatedSuggestionTuples, context, transformDistribution[0]); + // If no existing suggestion directly matches the user-visible version of + // the token, also add a 'keep' suggestion (with `.matchesModel = false`) + // matching it. if(!hasExistingKeep) { const baseTuple = createDefaultKeep(this.lexicalModel, context, transformDistribution[0]); diff --git a/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts b/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts index 9b25957826..e3ca0762c2 100644 --- a/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts +++ b/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts @@ -752,9 +752,7 @@ export function dedupeSuggestions( /** * This function checks for any suggestions that directly match the actual - * context in some manner and ranks suggestions accordingly. Additionally, if - * there is no such suggestion, a stand-in is generated and added to the list, - * though marked as "not matching the model". + * context in some manner and ranks suggestions accordingly. * * The suggestion "ranks", from highest to lowest: * - the suggestion produces an exact match for the user's current text