You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/specs/2026-06-01-177-smart-input-parser.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,29 @@ Concretely:
70
70
71
71
This approach has zero external dependencies, keeps locale data declarative, makes every token type independently unit-testable, and mirrors the existing code structure closely enough to minimize migration risk.
72
72
73
+
## Visual feedback via QuickPick validation severity
74
+
75
+
The tokenizer produces a typed `Token[]` stream, which makes parse confidence explicit for the first time. Use that to drive `validationMessage` on the existing `QuickPick` in `Dialogues` (`src/vscode/dialogues.ts`):
76
+
77
+
| Tokenizer result |`validationMessage.severity`| Border color | Condition |
`QuickInputSeverity` is the correct enum for `QuickPick` (not `InputBoxValidationSeverity`). Available since VS Code 1.70; well below the extension's 1.118 minimum.
93
+
94
+
The tokenizer must expose a `confidence` field (or equivalent) on its result: `'resolved' | 'ambiguous' | 'text-only'`. This is the only new public surface added by the visual-feedback slice.
95
+
73
96
## Acceptance criteria
74
97
75
98
### Design phase (this spec)
@@ -86,6 +109,7 @@ This approach has zero external dependencies, keeps locale data declarative, mak
86
109
- A new property-based test suite (`src/test/suite/match-input-vocab.test.ts`) sweeps all weekday and month abbreviations across all supported locales and asserts no false-positive match against a corpus of common everyday words that share prefixes.
87
110
-`npm run check` (lint + compile + full test) green on CI.
88
111
- No change to the exported `Input` type or the `parseInput(inputString: string): Promise<Input>` signature.
112
+
-`QuickPick` shows blue border (`QuickInputSeverity.Info`) on unambiguous parse, yellow border (`QuickInputSeverity.Warning`) on ambiguous parse, no border on free-text-only input.
89
113
90
114
## Migration plan
91
115
@@ -105,6 +129,9 @@ No feature-flag needed — the parallel phase is purely internal to `parseInput(
105
129
| New vocab property-based sweep | Zero false-positive weekday/month matches |
| Visual feedback — no border on free-text input | Pass |
108
135
109
136
## Constraints
110
137
@@ -115,7 +142,7 @@ No feature-flag needed — the parallel phase is purely internal to `parseInput(
115
142
116
143
## Out of scope
117
144
118
-
- QuickPick/InputBox surface changes.
145
+
-Structural changes to QuickPick/InputBox layout, item format, or command wiring (color severity feedback via `validationMessage` IS in scope — see above).
119
146
- Localization of UI strings (handled by `vscode.l10n`, issue #176).
120
147
- Moment.js removal (PLAN.md Phase 3).
121
148
- Adding new syntax forms (tracked separately in #230 — but the new tokenizer must be extensible enough to absorb those changes without structural surgery).
0 commit comments