Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more
fix(clipboard): conceal temporary dictation entries
altic-deva2d6ef32f0d8
diff --git a/Sources/Fluid/Services/PasteDeliveryCoordinator.swift b/Sources/Fluid/Services/PasteDeliveryCoordinator.swiftindex e7a64f5c..3d71276c 100644--- a/Sources/Fluid/Services/PasteDeliveryCoordinator.swift+++ b/Sources/Fluid/Services/PasteDeliveryCoordinator.swift@@ -73,6 +73,7 @@ final class SystemPasteboardManager: PasteboardManaging {private static let sourceType = NSPasteboard.PasteboardType("org.nspasteboard.source")private static let transientType = NSPasteboard.PasteboardType("org.nspasteboard.TransientType")private static let autoGeneratedType = NSPasteboard.PasteboardType("org.nspasteboard.AutoGeneratedType")+ private static let concealedType = NSPasteboard.PasteboardType("org.nspasteboard.ConcealedType")private static let sessionType = NSPasteboard.PasteboardType("\(Bundle.main.bundleIdentifier ?? "com.FluidApp.Fluid").PasteSession")@@ -187,6 +188,7 @@ final class SystemPasteboardManager: PasteboardManaging {item.setString(Bundle.main.bundleIdentifier ?? "com.FluidApp.Fluid", forType: Self.sourceType),item.setData(Data(), forType: Self.transientType),item.setData(Data(), forType: Self.autoGeneratedType),+ item.setData(Data(), forType: Self.concealedType),item.setString(sessionID, forType: Self.sessionType)else {return falsediff --git a/Tests/FluidDictationIntegrationTests/TypingServiceTransientPasteboardTests.swift b/Tests/FluidDictationIntegrationTests/TypingServiceTransientPasteboardTests.swiftindex f77a0d1b..088df1e1 100644--- a/Tests/FluidDictationIntegrationTests/TypingServiceTransientPasteboardTests.swift+++ b/Tests/FluidDictationIntegrationTests/TypingServiceTransientPasteboardTests.swift@@ -64,7 +64,7 @@ final class TypingServiceTransientPasteboardTests: XCTestCase {XCTAssertEqual(item.string(forType: sessionType), "session")}- func testTemporaryPasteboardWriteIsNotMarkedConcealed() throws {+ func testTemporaryPasteboardWriteIsConcealedButStillPasteable() throws {let pasteboard = self.makePasteboard()defer { pasteboard.releaseGlobally() }@@ -74,10 +74,12 @@ final class TypingServiceTransientPasteboardTests: XCTestCase {)let item = try XCTUnwrap(pasteboard.pasteboardItems?.first)let types = item.types.map(\.rawValue)- XCTAssertFalse(+ XCTAssertTrue(types.contains("org.nspasteboard.ConcealedType"),- "ConcealedType signals sensitive content and must not be applied to a transcript"+ "temporary dictation must be concealed from clipboard history")+ XCTAssertEqual(item.data(forType: NSPasteboard.PasteboardType("org.nspasteboard.ConcealedType")), Data())+ XCTAssertEqual(item.string(forType: .string), "hello world")}func testRecoveryActivationDoesNotRaiseAllWindowsOfTargetApp() {@@ -137,6 +139,7 @@ final class TypingServiceTransientPasteboardTests: XCTestCase {XCTAssertEqual(Array(restoredItem.types.prefix(sourceTypes.count)), sourceTypes)XCTAssertTrue(restoredItem.types.contains(Self.transientType))XCTAssertTrue(restoredItem.types.contains(Self.autoGeneratedType))+ XCTAssertFalse(restoredItem.types.contains(NSPasteboard.PasteboardType("org.nspasteboard.ConcealedType")))}XCTAssertEqual(zip(restoredItems, originalTypes).map { item, types in