* Get suggestions based ONLY on current input (no cursor position!)
(input: string)
| 151 | * Get suggestions based ONLY on current input (no cursor position!) |
| 152 | */ |
| 153 | getSuggestions(input: string): SuggestionGroup | null { |
| 154 | const trimmed = input.trim() |
| 155 | |
| 156 | if (!trimmed) { |
| 157 | return this.getFilterKeysList() |
| 158 | } |
| 159 | |
| 160 | if (trimmed.endsWith(':')) { |
| 161 | const key = trimmed.slice(0, -1) |
| 162 | return this.getFilterValues(key) |
| 163 | } |
| 164 | |
| 165 | if (trimmed.includes(':')) { |
| 166 | const [key, partial] = trimmed.split(':') |
| 167 | return this.getFilterValues(key, partial) |
| 168 | } |
| 169 | |
| 170 | return this.getMultiSectionResults(trimmed) |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * Get filter keys list (empty input state) |
no test coverage detected