MCPcopy Create free account
hub / github.com/chhoumann/quickadd / constructor

Method constructor

src/engine/MacroChoiceEngine.ts:242–266  ·  view source on GitHub ↗
(
		app: App,
		plugin: QuickAdd,
		choice: IMacroChoice,
		choiceExecutor: IChoiceExecutor,
		variables: Map<string, unknown>,
		preloadedUserScripts?: Map<string, unknown>,
		promptLabel?: string,
		private readonly originLeaf: WorkspaceLeaf | null = null,
	)

Source from the content-addressed store, hash-verified

240 }
241
242 constructor(
243 app: App,
244 plugin: QuickAdd,
245 choice: IMacroChoice,
246 choiceExecutor: IChoiceExecutor,
247 variables: Map<string, unknown>,
248 preloadedUserScripts?: Map<string, unknown>,
249 promptLabel?: string,
250 private readonly originLeaf: WorkspaceLeaf | null = null,
251 ) {
252 super(app);
253 this.choice = choice;
254 this.plugin = plugin;
255 this.macro = choice?.macro;
256 this.choiceExecutor = choiceExecutor;
257 this.preloadedUserScripts = preloadedUserScripts ?? new Map();
258 this.promptLabel = promptLabel;
259 this.userScriptSettingsDefinition = undefined;
260 const sharedVariables = this.initSharedVariables(
261 choiceExecutor,
262 variables
263 );
264 this.choiceExecutor.variables = sharedVariables;
265 this.params = this.buildParams(app, plugin, choiceExecutor, sharedVariables);
266 }
267
268 async run(): Promise<void> {
269 if (!this.macro || !this.macro.commands) {

Callers

nothing calls this directly

Calls 2

initSharedVariablesMethod · 0.95
buildParamsMethod · 0.95

Tested by

no test coverage detected