MCPcopy
hub / github.com/npmx-dev/npmx.dev / setContextCommands

Function setContextCommands

app/composables/useCommandPalette.ts:115–121  ·  view source on GitHub ↗
(commands: CommandPaletteContextCommand[], scopeId: string)

Source from the content-addressed store, hash-verified

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)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected