From 2befb719f1324799f2122477fe416f91ba825b7f Mon Sep 17 00:00:00 2001 From: Joone Hur Date: Sat, 16 Mar 2024 02:51:54 -0700 Subject: [PATCH] Add prompt method back to CommandLinePrompt The prompt method was removed earlier, but it is necessary for functionality. This commit adds the prompt method back to the CommandLinePrompt class. Generated by gpt-3.5-turbo --- src/prompt/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/prompt/index.ts b/src/prompt/index.ts index 12816f4..0789793 100644 --- a/src/prompt/index.ts +++ b/src/prompt/index.ts @@ -9,10 +9,6 @@ export class CommandLinePrompt implements PromptInterface { private callback: (input: string) => Promise; private timer: any; - public prompt(): void { - this.rl.prompt(); - } - constructor(callback: (input: string) => Promise) { // ... this.callback = callback; @@ -22,6 +18,10 @@ export class CommandLinePrompt implements PromptInterface { }); } + public prompt(): void { + this.rl.prompt(); + } + public async start(blinking?: boolean): Promise { // Set the prompt to display before each input this.rl.setPrompt("> ");