MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / buildAppBindings

Function buildAppBindings

src/lib/keyBindings.js:587–609  ·  view source on GitHub ↗
(configs)

Source from the content-addressed store, hash-verified

585export default keyBindings;
586
587function buildAppBindings(configs) {
588 return Object.fromEntries(
589 configs.map(
590 ({
591 name,
592 description,
593 key = null,
594 action,
595 readOnly = true,
596 editorOnly,
597 }) => [
598 name,
599 {
600 description: description ?? humanizeCommandName(name),
601 key,
602 readOnly,
603 ...(editorOnly !== undefined ? { editorOnly } : {}),
604 ...(action ? { action } : {}),
605 },
606 ],
607 ),
608 );
609}
610
611function buildCodemirrorKeyBindings(appBindings) {
612 const commandEntries = Object.entries(cmCommands).filter(

Callers 1

keyBindings.jsFile · 0.85

Calls 1

humanizeCommandNameFunction · 0.70

Tested by

no test coverage detected