(
scopeId: string,
group: CommandPaletteGroup,
resolve: (query: string) => CommandPaletteCommand[] | null,
)
| 162 | } |
| 163 | |
| 164 | function setQueryOverride( |
| 165 | scopeId: string, |
| 166 | group: CommandPaletteGroup, |
| 167 | resolve: (query: string) => CommandPaletteCommand[] | null, |
| 168 | ) { |
| 169 | queryOverrideRegistry.set(`${scopeId}:${group}`, resolve) |
| 170 | queryOverrides.value = [ |
| 171 | ...queryOverrides.value.filter( |
| 172 | entry => !(entry.scopeId === scopeId && entry.group === group), |
| 173 | ), |
| 174 | { scopeId, group }, |
| 175 | ] |
| 176 | } |
| 177 | |
| 178 | function clearQueryOverride(scopeId: string, group: CommandPaletteGroup) { |
| 179 | queryOverrideRegistry.delete(`${scopeId}:${group}`) |
no test coverage detected