MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / runCommand

Function runCommand

packages/app-core/src/components/Editor.tsx:977–982  ·  view source on GitHub ↗
(cmd: Command)

Source from the content-addressed store, hash-verified

975 */
976function registerCommandPaletteEx(): void {
977 const runCommand = (cmd: Command): void => {
978 // Re-check `when` at invocation time so `:note-save` doesn't silently
979 // fire when nothing is selected, for example.
980 if (cmd.when && !cmd.when()) return
981 void cmd.run()
982 }
983
984 const names = new Set<string>(MANUAL_EX_NAMES)
985 for (const cmd of buildCommands()) {

Callers 1

registerCommandPaletteExFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected