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

Function addCommand

src/cm/commandRegistry.js:1255–1263  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

1253}
1254
1255function addCommand(entry) {
1256 const command = {
1257 ...entry,
1258 defaultDescription: entry.description || entry.name,
1259 defaultKey: entry.key ?? null,
1260 key: entry.key ?? null,
1261 };
1262 commandMap.set(entry.name, command);
1263}
1264
1265function resolveView(view) {
1266 return view || editorManager?.editor || null;

Callers 5

registerCoreCommandsFunction · 0.70
registerLspCommandsFunction · 0.70
registerLintCommandsFunction · 0.70
registerExternalCommandFunction · 0.70

Calls 1

setMethod · 0.80

Tested by

no test coverage detected