mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 10:16:44 +00:00
* feat(macos): add Quick Chat power features * docs(macos): document Quick Chat power features * chore(i18n): refresh native locale artifacts for Quick Chat power features * fix(macos): update DEBUG test helper sendProvider to the reasoning-threaded arity
50 lines
1.7 KiB
Swift
50 lines
1.7 KiB
Swift
import OpenClawProtocol
|
|
import SwiftUI
|
|
import Testing
|
|
@testable import OpenClaw
|
|
|
|
@Suite(.serialized)
|
|
@MainActor
|
|
struct QuickChatViewSmokeTests {
|
|
@Test func `quick chat view builds body`() {
|
|
let model = QuickChatModel(
|
|
sessionKeyProvider: { "main" },
|
|
agentsProvider: {
|
|
AgentsListResult(
|
|
defaultid: "main",
|
|
mainkey: "main",
|
|
scope: AnyCodable("per-agent"),
|
|
agents: [AgentSummary(id: "main", name: "Agent")])
|
|
},
|
|
agentIdentityProvider: { _ in QuickChatAgentDisplay(id: "main", name: "Agent", emoji: nil) },
|
|
sendProvider: { _, _, _, _, _, _ in "ok" },
|
|
permissionStatusProvider: { capabilities in
|
|
Dictionary(uniqueKeysWithValues: capabilities.map { ($0, true) })
|
|
},
|
|
permissionGrantProvider: { capabilities in
|
|
Dictionary(uniqueKeysWithValues: capabilities.map { ($0, true) })
|
|
},
|
|
connectionGateProvider: { .available },
|
|
modelControlsProvider: { _ in .testFixture },
|
|
modelPatchProvider: { _, _ in nil })
|
|
let view = QuickChatView(
|
|
model: model,
|
|
replyBinding: QuickChatReplyBinding(),
|
|
onDismiss: {},
|
|
onSendAccepted: { _ in },
|
|
onShowAgentPicker: {},
|
|
onShowModelMenu: {},
|
|
onShowRecentSessions: {},
|
|
onToggleDictation: {},
|
|
onStopDictation: {},
|
|
onCaptureTextContext: {},
|
|
onShowCaptureMenu: {},
|
|
onGrantPermissions: {},
|
|
onPasteReply: {},
|
|
onContentHeightChange: { _ in },
|
|
onTextViewReady: { _ in })
|
|
|
|
_ = view.body
|
|
}
|
|
}
|