(commands: CommandPaletteContextCommand[], scopeId: string)
| 113 | } |
| 114 | |
| 115 | function setContextCommands(commands: CommandPaletteContextCommand[], scopeId: string) { |
| 116 | const nextEntries = contextCommands.value.filter(entry => entry.scopeId !== scopeId) |
| 117 | if (commands.length > 0) { |
| 118 | nextEntries.push({ scopeId, commands }) |
| 119 | } |
| 120 | contextCommands.value = nextEntries |
| 121 | } |
| 122 | |
| 123 | function clearContextCommands(scopeId: string) { |
| 124 | contextCommands.value = contextCommands.value.filter(entry => entry.scopeId !== scopeId) |
no outgoing calls
no test coverage detected