Commit 577045e
committed
feat(acp): rank command popup results by prefix match
Substring matches were previously hidden entirely; now they appear
below exact-prefix matches instead of being discarded.
- Introduce appendCommandItem() to eliminate duplicated label/data
build logic across showCommandPopup and filterCommandPopup
- Rebuild the list on each filter pass (two-pass: starts-with tier
then contains tier) so ordering reflects match quality rather than
relying on setHidden which couldn't express rank
- Empty prefix skips the second pass, preserving original order for
the unfiltered state1 parent c602d34 commit 577045e
2 files changed
Lines changed: 27 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2062 | 2062 | | |
2063 | 2063 | | |
2064 | 2064 | | |
2065 | | - | |
2066 | | - | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
| 2065 | + | |
2070 | 2066 | | |
2071 | 2067 | | |
2072 | 2068 | | |
| |||
2114 | 2110 | | |
2115 | 2111 | | |
2116 | 2112 | | |
2117 | | - | |
2118 | | - | |
2119 | | - | |
2120 | | - | |
2121 | | - | |
2122 | | - | |
2123 | | - | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
2124 | 2126 | | |
2125 | 2127 | | |
2126 | | - | |
| 2128 | + | |
2127 | 2129 | | |
2128 | 2130 | | |
2129 | | - | |
2130 | | - | |
| 2131 | + | |
2131 | 2132 | | |
2132 | 2133 | | |
2133 | 2134 | | |
2134 | 2135 | | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
2135 | 2146 | | |
2136 | 2147 | | |
2137 | 2148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| |||
0 commit comments