MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getUserBindingsForValidation

Function getUserBindingsForValidation

src/keybindings/validate.ts:405–420  ·  view source on GitHub ↗

* Parse user blocks into bindings for validation. * This is separate from the main parser to avoid importing it.

(
  userBlocks: KeybindingBlock[],
)

Source from the content-addressed store, hash-verified

403 * This is separate from the main parser to avoid importing it.
404 */
405function getUserBindingsForValidation(
406 userBlocks: KeybindingBlock[],
407): ParsedBinding[] {
408 const bindings: ParsedBinding[] = []
409 for (const block of userBlocks) {
410 for (const [key, action] of Object.entries(block.bindings)) {
411 const chord = key.split(' ').map(k => parseKeystroke(k))
412 bindings.push({
413 chord,
414 action,
415 context: block.context,
416 })
417 }
418 }
419 return bindings
420}
421
422/**
423 * Run all validations and return combined warnings.

Callers 1

validateBindingsFunction · 0.85

Calls 3

parseKeystrokeFunction · 0.85
entriesMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected