Skip to content

[Request] Multiple lines text input #312

Open
@alexgleason

Description

@alexgleason

Is your feature request related to a problem? Please describe.

I'm developing an AI chat application in the terminal.

At first I just used readlines, but I needed to use clack for other parts of the TUI (configuration, prompts to the user, etc), so I ended up using clack in the chat interface too for consistency. But then later I realized I cannot insert multiple lines of text in here:

Image

Describe the solution you'd like

Maybe a separate multiline component, or allow text to accept multiple lines with an option.

For inserting newlines, Shift+Enter would be the best, but I know it's hard to capture the Shift key. Ctrl+J to insert a newline would also be acceptable.

Most of all, I would like the ability to paste text into the terminal without the newline itself (\n) triggering the end of input. I want the Enter key to submit the text.

Describe alternatives you've considered

Using readlines directly for the chat flow of the TUI, using it to simulate the appearance of clack (this is probably what I'll do).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions