Skip to content

Add support for removing TextPrompt after text entry #1154

@alexcodito

Description

@alexcodito

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo 🕑

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions