MCPcopy
hub / github.com/CopyTranslator/CopyTranslator / dispatch

Method dispatch

src/common/action.ts:82–98  ·  view source on GitHub ↗
(...args: any[])

Source from the content-addressed store, hash-verified

80 }
81
82 dispatch(...args: any[]) {
83 const { identifier, param } = decompose(...args);
84
85 if (alias.get(identifier) != undefined) {
86 for (const id of alias.get(identifier) as string[]) {
87 this.dispatch(id);
88 }
89 return;
90 }
91 const action = this.getAction(identifier);
92 bus.at("callback", {
93 identifier,
94 param,
95 type: action.actionType,
96 isMain,
97 });
98 }
99
100 getAction(identifier: Identifier): ActionView {
101 if (!this.actions.has(identifier)) {

Callers 12

constructorMethod · 0.95
getCallbackMethod · 0.80
syncSupportLanguagesMethod · 0.80
setStatusMethod · 0.80
syncDictMethod · 0.80
syncMethod · 0.80
installMethod · 0.80
updateLocaleMethod · 0.80
showDragCopyWarningFunction · 0.80
setMethod · 0.80
loadFromConfigMethod · 0.80
syncMethod · 0.80

Calls 3

getActionMethod · 0.95
decomposeFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected