Skip to content

Commit

Permalink
Add prompt method back to CommandLinePrompt
Browse files Browse the repository at this point in the history
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
  • Loading branch information
joone committed Mar 16, 2024
1 parent 731a37d commit 2befb71
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/prompt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ export class CommandLinePrompt implements PromptInterface {
private callback: (input: string) => Promise<void>;
private timer: any;

public prompt(): void {
this.rl.prompt();
}

constructor(callback: (input: string) => Promise<void>) {
// ...
this.callback = callback;
Expand All @@ -22,6 +18,10 @@ export class CommandLinePrompt implements PromptInterface {
});
}

public prompt(): void {
this.rl.prompt();
}

public async start(blinking?: boolean): Promise<void> {
// Set the prompt to display before each input
this.rl.setPrompt("> ");
Expand Down

0 comments on commit 2befb71

Please sign in to comment.