Translator: take the whole copied text, keep the translation when the notch is stretched
Browsers report only part of a selection over Accessibility; when the clipboard holds a longer text containing it, translate the clipboard. Dragging the handle moved the home view to the chat and dropped the card; now the translation goes into the chat (after it finishes, if still loading). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -449,6 +449,9 @@ struct ChatResizeHandle: View {
|
||||
DragGesture(minimumDistance: 2, coordinateSpace: .global)
|
||||
.onChanged { g in
|
||||
if startHeight == nil {
|
||||
// A translation card on the home view goes along into the chat
|
||||
// instead of disappearing.
|
||||
if state.translation != nil { TranslatorRun.moveToChat(state: state) }
|
||||
if state.view != .prompt {
|
||||
state.chatDetent = 0
|
||||
state.view = .prompt
|
||||
|
||||
Reference in New Issue
Block a user