Skip to content
Merged
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
5 changes: 5 additions & 0 deletions Sources/AgentComposerTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ struct AgentComposerTextView: NSViewRepresentable {
let minimumHeight: CGFloat
let maximumHeight: CGFloat
let isDisabled: Bool
let onShiftSubmit: (() -> Void)?
let onSubmit: () -> Void

func makeCoordinator() -> Coordinator {
Expand Down Expand Up @@ -118,6 +119,10 @@ struct AgentComposerTextView: NSViewRepresentable {
}

if NSApp.currentEvent?.modifierFlags.contains(.shift) == true {
if let onShiftSubmit = parent.onShiftSubmit {
onShiftSubmit()
return true
}
return false
}

Expand Down
Loading