Files
openclaw/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatReplyPreview.swift
Peter Steinberger bf754b8a34 feat: align native macOS chat with the web chat capability set (#109712)
* feat(macos): wire sessions manager, assistant trace, talk, voice notes, and Listen into native chat

* feat(clients): add input history, reply quoting, and per-session drafts to native chat composer

* fix(clients): capture TTS server lease before gateway check and dedupe restored input-history entries

* docs(clients): document reply-chip consume parity with web accepted-send semantics

* fix(clients): retire sent-text recall stash and keep recall markers stable under prepends

* test(clients): wait for outbox restore before asserting live-send paths

* docs(clients): note cross-session outbox flush scheduling contract

* chore(clients): split oversized chat files to satisfy SwiftLint length caps

* chore(i18n): sync native app i18n inventory for new chat strings

* chore: retrigger ci

* chore(i18n): translate new chat strings and regenerate Apple catalogs

* chore(i18n): regenerate Android localization resources for new chat strings

* test(clients): await lifecycle cleanup before modeling replacement gateway traffic

* chore(clients): split invoke timeout helper to satisfy SwiftLint length cap

* chore(clients): drop unused OpenClawProtocol import from invoke timeout split
2026-07-17 13:44:48 +01:00

33 lines
1.2 KiB
Swift

import SwiftUI
struct ChatReplyPreview: View {
let target: OpenClawChatReplyTarget
let onCancel: () -> Void
var body: some View {
let preview = ChatReplyQuote.previewText(self.target.text)
HStack(spacing: 6) {
Image(systemName: "message")
.foregroundStyle(.secondary)
Text(String(format: String(localized: "Replying to %@"), self.target.senderLabel))
.font(OpenClawChatTypography.captionSemiBold)
.lineLimit(1)
Text(preview.text + (preview.isTruncated ? "..." : ""))
.font(OpenClawChatTypography.caption)
.foregroundStyle(.secondary)
.lineLimit(1)
Spacer(minLength: 4)
Button(action: self.onCancel) {
Image(systemName: "xmark")
.font(OpenClawChatTypography.captionSemiBold)
}
.buttonStyle(.plain)
.accessibilityLabel(String(localized: "Cancel reply"))
.help(String(localized: "Cancel reply"))
}
.padding(.horizontal, 10)
.padding(.vertical, 6)
.background(OpenClawChatTheme.accent.opacity(0.08), in: RoundedRectangle(cornerRadius: 8))
}
}