MCPcopy Index your code
hub / github.com/anomalyco/opencode / valueFor

Function valueFor

packages/app/src/components/settings-keybinds.tsx:351–360  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

349 }
350
351 const valueFor = (id: string) => {
352 const custom = settings.keybinds.get(id)
353 if (typeof custom === "string") return custom
354
355 const live = command.options.find((x) => x.id === id)
356 if (live?.keybind) return live.keybind
357
358 const meta = command.catalog.find((x) => x.id === id)
359 return meta?.keybind
360 }
361
362 for (const id of list().keys()) {
363 if (id === PALETTE_ID) continue

Callers 1

SettingsKeybindsFunction · 0.85

Calls 2

getMethod · 0.65
findMethod · 0.65

Tested by

no test coverage detected