Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for removing TextPrompt after text entry #1154

Open
alexcodito opened this issue Feb 5, 2023 · 1 comment
Open

Add support for removing TextPrompt after text entry #1154

alexcodito opened this issue Feb 5, 2023 · 1 comment
Labels
feature ⭐ top feature Top feature request. ⭐ top issue Top issue.

Comments

@alexcodito
Copy link

alexcodito commented Feb 5, 2023

Is your feature request related to a problem? Please describe.
The console app that I'm building is interactive, meaning that options appear/disappear as needed. The trouble with TextPrompt is that the line that it occupies remains on the console after entering text and pressing enter.

Describe the solution you'd like
I would like for TextPrompt to disappear after text is entered. This could either be by passing an additional parameter or by calling a method that clears the last prompt.

Describe alternatives you've considered
The only solution to my problem was to clear the console entirely (AnsiConsole.Clear()), and re-initialize the layout.

Additional context
Please see the example below. I'm looking for a way to have the "Please provide your ChatGPT API key? ***************" text to disappear after the key has been entered.

Animation


Please upvote 👍 this issue if you are interested in it.

@patriksvensson patriksvensson changed the title TextPrompt disappears after text entry add support for removing TextPrompt after text entry Feb 5, 2023
@patriksvensson patriksvensson changed the title add support for removing TextPrompt after text entry Add support for removing TextPrompt after text entry Feb 5, 2023
@patriksvensson
Copy link
Contributor

Currently this isn't supported, but we could add it. I personally have no time to add this feature now, but if you would like to give it a try, a PR is always appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⭐ top feature Top feature request. ⭐ top issue Top issue.
Projects
Status: Todo 🕑
Development

No branches or pull requests

2 participants