Skip to content
Open
Show file tree
Hide file tree
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 src/renderer/features/agents/main/active-chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4178,7 +4178,7 @@ const ChatViewInner = memo(function ChatViewInner({
removeFromQueue(subChatId, itemId)
}, [subChatId, removeFromQueue])

// Force send - stop stream and send immediately, bypassing queue (Opt+Enter)
// Force send - stop stream and send immediately, bypassing queue (Opt+Shift+Enter)
const handleForceSend = useCallback(async () => {
// Block sending while sandbox is still being set up
if (sandboxSetupStatus !== "ready") {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/features/agents/main/chat-input-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export interface ChatInputAreaProps {
fileInputRef: React.RefObject<HTMLInputElement | null>
// Core callbacks
onSend: () => void
onForceSend: () => void // Opt+Enter: stop stream and send immediately, bypassing queue
onForceSend: () => void // Opt+Shift+Enter: stop stream and send immediately, bypassing queue
onStop: () => Promise<void>
onCompact: () => void
onCreateNewSubChat?: () => void
Expand Down Expand Up @@ -1075,7 +1075,7 @@ export const ChatInputArea = memo(function ChatInputArea({
}

// For all other commands (builtin prompts and custom):
// insert the command and let user add arguments or press Enter to send
// insert the command and let user add arguments or press Shift+Enter to send
editorRef.current?.setValue(`/${command.name} `)
},
[subChatMode, updateMode, onCreateNewSubChat, onCompact, editorRef],
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/features/agents/main/new-chat-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ export function NewChatForm({
}

// For all other commands (builtin prompts and custom):
// insert the command and let user add arguments or press Enter to send
// insert the command and let user add arguments or press Shift+Enter to send
editorRef.current?.setValue(`/${command.name} `)
},
[agentMode],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ type AgentsMentionsEditorProps = {
placeholder?: string
className?: string
onSubmit?: () => void
onForceSubmit?: () => void // Opt+Enter: bypass queue, stop stream and send immediately
onForceSubmit?: () => void // Opt+Shift+Enter: bypass queue, stop stream and send immediately
disabled?: boolean
onPaste?: (e: React.ClipboardEvent) => void
onShiftTab?: () => void // callback for Shift+Tab (e.g., mode switching)
Expand Down Expand Up @@ -1042,13 +1042,13 @@ export const AgentsMentionsEditor = memo(
}

// Prevent submission during IME composition (e.g., Chinese/Japanese/Korean input)
if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing) {
if (e.key === "Enter" && e.shiftKey && !e.nativeEvent.isComposing) {
if (triggerActive.current || slashTriggerActive.current) {
// Let dropdown handle Enter
return
}
e.preventDefault()
// Opt+Enter = force submit (bypass queue, stop stream and send immediately)
// Opt+Shift+Enter = force submit (bypass queue, stop stream and send immediately)
if (e.altKey && onForceSubmit) {
onForceSubmit()
} else {
Expand Down