aboutsummaryrefslogtreecommitdiff
path: root/modules/core/terminal.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core/terminal.js')
-rw-r--r--modules/core/terminal.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/core/terminal.js b/modules/core/terminal.js
index 123c224..425c5d6 100644
--- a/modules/core/terminal.js
+++ b/modules/core/terminal.js
@@ -1857,9 +1857,17 @@
for (const modName in this.moduleManager.modules) {
const mod = this.moduleManager.modules[modName];
if (mod.commands && mod.commands[cmd]) {
+ if (cmd !== 'course') {
+ for (const _m of Object.values(this.moduleManager.modules)) {
+ if (typeof _m.onCommandStart === 'function') { try { _m.onCommandStart(cmd, args); } catch (_e) {} }
+ }
+ }
try { await mod.commands[cmd](args);
- // Notify tutorial module for quest tracking
- if (this.tutorialModule && cmd !== 'tutorial') this.tutorialModule.onCommandExecuted(cmd, args);
+ if (cmd !== 'tutorial' && cmd !== 'course') {
+ for (const _m of Object.values(this.moduleManager.modules)) {
+ if (typeof _m.onCommandExecuted === 'function') { try { _m.onCommandExecuted(cmd, args); } catch (_e) {} }
+ }
+ }
// Memory graph: record file access for read/file commands
if (cmd === 'cat' || cmd === 'view_module' || cmd === 'edit_module') {
try {