Share the composer and attention reply editor

This commit is contained in:
Ian Gulliver
2026-10-21 10:57:08 -07:00
parent bcf2556e35
commit 01edc09385
2 changed files with 49 additions and 56 deletions
+2 -28
View File
@@ -78,35 +78,9 @@ private struct OtherEntry: View {
if otherOpen(store, key) {
VStack(alignment: .leading, spacing: 6) {
Thumbnails(key: key)
TextEditor(text: $text)
.font(Fonts.font(13))
.scrollContentBackground(.hidden)
.writingToolsBehavior(.disabled)
.focused($editing)
AgentEditor(text: $text, placeholder: placeholder, key: key, height: 66,
focus: $editing, border: editing ? Palette.accent : Palette.border, send: send)
.disabled(busy)
.onKeyPress(.return, phases: .down) { press in
let marked = (NSApp.keyWindow?.firstResponder as? NSTextView)?.hasMarkedText() ?? false
if press.modifiers.contains(.shift) || marked {
return .ignored
}
send()
return .handled
}
.padding(.horizontal, 5)
.padding(.vertical, 6)
.frame(height: 66)
.background(Palette.raised, in: RoundedRectangle(cornerRadius: 6))
.overlay(alignment: .topLeading) {
if text.isEmpty {
Text(placeholder)
.foregroundStyle(Palette.muted)
.padding(.horizontal, 10)
.padding(.vertical, 6)
.allowsHitTesting(false)
}
}
.overlay(RoundedRectangle(cornerRadius: 6).stroke(editing ? Palette.accent : Palette.border))
.imageInput(key)
}
.onChange(of: editing) {
if !editing {