Support user prompts in Fizzy do, move parsing logic to context

This commit is contained in:
Jorge Manrubia
2025-07-01 14:06:39 +02:00
parent 0f7b45ab38
commit 93be9e945f
10 changed files with 81 additions and 33 deletions
@@ -41,9 +41,9 @@ export default class extends Controller {
this.#hideOutput()
}
submitCommand() {
this.formTarget.requestSubmit()
this.#reset()
submitCommand({ target }) {
console.debug("Es", target);
this.#submitCommand()
}
handleKeyPress(event) {
@@ -183,7 +183,12 @@ export default class extends Controller {
this.inputTarget.value = this.originalInputValue
this.confirmationTarget.value = "confirmed"
this.#hideOutput()
this.submitCommand()
this.#submitCommand()
}
#submitCommand() {
this.formTarget.requestSubmit()
this.#reset()
}
#showOutput(markdown) {