Skip to content

Add backslash continuation for multi-line input in chat composer #3556

Closed as not planned

Description

@carlosarraes

What feature would you like to see?

Add support for backslash continuation in the chat composer, allowing users to insert newlines without submitting their message. When a line ends with a backslash (\) and the user presses Enter, the backslash is replaced with a newline instead of submitting the message.

This follows the standard shell/terminal convention for line continuation that many developers are already familiar with from bash, Python, and other tools.

Key behaviors:

  • Trailing \ + Enter → converts to newline (doesn't submit)
  • Trailing \\\ (escaped backslash) + Enter → submits normally with \\\
  • Trailing \ with spaces after it + Enter → submits normally (spaces cancel continuation)
  • Works with any odd number of trailing backslashes (continuation)
  • Even number of trailing backslashes are treated as escaped (no continuation)

Why is this useful?

This provides a terminal-consistent way to enter multi-line messages without requiring special key combinations that may conflict with IDE or terminal shortcuts. It uses a convention that developers already know from working with shells and scripting languages.

Are you interested in implementing this feature?

Yes, I have already implemented this feature with comprehensive test coverage (8 test cases covering all edge cases). The implementation is ready for review once this feature proposal is approved.

Additional information

The implementation maintains compatibility with existing paste-burst behavior and doesn't interfere with any existing keybindings or slash commands.

Activity

  1. added
    enhancement
    TUI
    on Nov 5, 2025
  2. etraut-openai commented on Dec 18, 2025

    @etraut-openai
    Contributor

    This feature request hasn't received many upvotes or any additional posts in a long time, so I'm going to close it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions