Commit 9c136e8
committed
feat(prediction): support dynamic list height and remove history caps
Replace hardcoded prediction list limits with user-configurable sizing.
Summary:
- Remove the fixed 10-line cap and legacy auto-adjustment logic
- Prediction list height and capacity now scale based on user settings
- History suggestions are no longer artificially capped when plugins are active
Key changes:
- Convert ListMaxCount and HistoryMaxCount into dynamic properties
on PredictionListView
- Introduce layout constraints:
- PhysicalMax: based on console buffer height (-2 for jitter protection)
- PredictionViewHeight: limited by screen space and list capacity
- HistoryMaxCount: adjusted to fill the visible view
- Remove history cap in AggregateSuggestions (previously limited to 3)
Configuration:
Add new PSConsoleReadLineOptions properties:
- PredictionViewHeight: visible list height
- PredictionListCount: total scrollable items
- PredictionHistoryCount: history fetch limit
Signed-off-by: Konstantin Glukhov <KGlukhov@Hotmail.com>1 parent 2984546 commit 9c136e8
4 files changed
Lines changed: 84 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
115 | 130 | | |
116 | 131 | | |
117 | 132 | | |
| |||
202 | 217 | | |
203 | 218 | | |
204 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
205 | 223 | | |
206 | 224 | | |
207 | 225 | | |
| |||
342 | 360 | | |
343 | 361 | | |
344 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
345 | 366 | | |
346 | 367 | | |
347 | 368 | | |
| |||
655 | 676 | | |
656 | 677 | | |
657 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
658 | 706 | | |
659 | 707 | | |
660 | 708 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
29 | 41 | | |
30 | 42 | | |
31 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
212 | | - | |
213 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
214 | 226 | | |
215 | 227 | | |
216 | 228 | | |
| |||
327 | 339 | | |
328 | 340 | | |
329 | 341 | | |
330 | | - | |
| 342 | + | |
331 | 343 | | |
332 | 344 | | |
333 | 345 | | |
334 | 346 | | |
335 | 347 | | |
336 | 348 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
343 | 353 | | |
344 | 354 | | |
345 | 355 | | |
| |||
444 | 454 | | |
445 | 455 | | |
446 | 456 | | |
447 | | - | |
| 457 | + | |
448 | 458 | | |
449 | 459 | | |
450 | 460 | | |
| |||
0 commit comments