Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/src/pages/chat/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ watch(
type="text"
:placeholder="t('chat.typeAMessage')"
class="h-10 w-full border-transparent bg-transparent pl-14 pr-14 text-base text-foreground shadow-none transition-all md:h-14 placeholder:text-foreground/45 focus-visible:ring-0"
@keyup.enter="sendMessage"
@keyup.shift.enter="sendMessage"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This change maps Shift+Enter to send a message, which is a common pattern to allow for multi-line messages. However, the component used here is an <input type="text">, which does not support multi-line input.

As a result, pressing Enter alone now does nothing, and the user cannot create new lines. This creates a confusing user experience where a common key has no effect.

To properly support multi-line messages, you should use a <textarea> instead of an <input type="text">. With a <textarea>, Enter would create a new line, and Shift+Enter could send the message. I'd also recommend using the @keydown event with the .prevent modifier to avoid inserting a newline character when sending the message.

            @keydown.shift.enter.prevent="sendMessage"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent send shortcut between chat pages

Medium Severity

This change makes the regular chat page use Shift+Enter to send, while ai-chat.vue uses Enter (without Shift) to send. These are opposite conventions within the same application, which will confuse users switching between the two chat interfaces. Additionally, using Shift+Enter on a single-line Input (type="text") is unconventional since single-line inputs don't support newlines — the typical reason for a Shift+Enter send pattern.

Fix in Cursor Fix in Web

/>
<div class="absolute right-2 flex items-center gap-1">
<Button
Expand Down
Loading