Skip to content

fix(chat): support Shift+Enter for multi-line input and proper newline display#1176

Open
nimitbhardwaj wants to merge 1 commit into
RightNow-AI:mainfrom
nimitbhardwaj:fix/new-line-chat
Open

fix(chat): support Shift+Enter for multi-line input and proper newline display#1176
nimitbhardwaj wants to merge 1 commit into
RightNow-AI:mainfrom
nimitbhardwaj:fix/new-line-chat

Conversation

@nimitbhardwaj
Copy link
Copy Markdown
Contributor

Summary

Fixes #1141 - Add Shift+Enter to insert new line in chat input

Changes

  • Web UI textarea: Modified @keydown.enter handler to only call preventDefault() when Shift is NOT held, allowing Shift+Enter to insert newlines naturally
  • escapeHtml function: Added .replace(/\n/g, '
    ') to convert newlines to
    tags so user messages display with proper line breaks in the chat UI

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes
  • Live integration tested (if applicable)

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries (sanitization already exists in sanitize_user_input() / sanitize_text())

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Shift+Enter to insert new line in chat input

1 participant