MCPcopy Create free account
hub / github.com/anomalyco/opencode / upsertCommandRegistration

Function upsertCommandRegistration

packages/app/src/context/command.tsx:105–108  ·  view source on GitHub ↗
(registrations: CommandRegistration[], entry: CommandRegistration)

Source from the content-addressed store, hash-verified

103}
104
105export function upsertCommandRegistration(registrations: CommandRegistration[], entry: CommandRegistration) {
106 if (entry.key === undefined) return [entry, ...registrations]
107 return [entry, ...registrations.filter((x) => x.key !== entry.key)]
108}
109
110export function parseKeybind(config: string): Keybind[] {
111 if (!config || config === "none") return []

Callers 2

command.test.tsFile · 0.90
registerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected