| 304 | } |
| 305 | |
| 306 | private async onChooseMacroType( |
| 307 | macroChoice: IMacroChoice, |
| 308 | originLeaf: WorkspaceLeaf | null, |
| 309 | ) { |
| 310 | const macroEngine = new MacroChoiceEngine( |
| 311 | this.app, |
| 312 | this.plugin, |
| 313 | macroChoice, |
| 314 | this, |
| 315 | this.variables, |
| 316 | this.preloadedUserScripts, |
| 317 | undefined, |
| 318 | originLeaf, |
| 319 | ); |
| 320 | await macroEngine.run(); |
| 321 | |
| 322 | Object.entries(macroEngine.params.variables).forEach(([key, value]) => { |
| 323 | this.variables.set(key, value as string); |
| 324 | }); |
| 325 | } |
| 326 | |
| 327 | private onChooseMultiType(multiChoice: IMultiChoice) { |
| 328 | // An empty folder run via command/URI would otherwise open a dead, item-less |