This commit is contained in:
Kim Ravn Hansen
2025-10-23 09:37:39 +02:00
parent cda8392795
commit 4c2b2dcdfe
8 changed files with 281 additions and 263 deletions

View File

@@ -1,5 +1,4 @@
/** @typedef {import("../models/session.js").Session} Session */
/** @typedef {import("../utils/message.js").MessageType} MessageType */
/** @typedef {import("../utils/message.js").WebsocketMessage} WebsocketMessage */
/** @typedef {import("./scene.js").Scene} Scene */
@@ -65,7 +64,7 @@ export class Prompt {
/** @type {Session} */
get session() {
return this.scene.session;
return this._scene.session;
}
/** @param {Scene} scene */
@@ -80,6 +79,7 @@ export class Prompt {
*/
execute() {
this.prepareProperties();
this.beforeExecute();
this.sendPrompt(this.message, this.options);
}
@@ -98,6 +98,8 @@ export class Prompt {
}
}
beforeExecute() {}
/** Triggered when user types `:help [some optional topic]` */
onHelp(topic) {
if (!this.help) {