Branchwell

OpenTalon / app / native / Sources / OpenTalon / ConnectionIntroduction.swift

1import AppKit
2import SwiftUI
3
4struct ConnectionIntroduction: View {
5 @Environment(WorkspaceModel.self) private var model
6 @Environment(\.palette) private var palette
7
8 var body: some View {
9 VStack(alignment: .leading, spacing: 16) {
10 Image(nsImage: NSApp.applicationIconImage)
11 .resizable().frame(width: 48, height: 48).accessibilityHidden(true)
12 Text("Use OpenTalon from your agent")
13 .font(palette.display(30)).accessibilityAddTraits(.isHeader)
14 Text("Use MCP to let Claude Code, Codex, Gemini CLI, or Claude chat read and edit your projects and tasks on this Mac.")
15 .fixedSize(horizontal: false, vertical: true)
16 VStack(alignment: .leading, spacing: 8) {
17 Text("Try asking").font(.headline)
18 Text("“List my OpenTalon projects.”")
19 Text("“Which tasks are marked urgent?”")
20 Text("“Show me the latest comments on my most recent task.”")
21 }
22 .textSelection(.enabled)
23 Divider()
24 Text("Your AI provider may receive the task details your agent reads. You can turn access off in Settings → Agent connection.")
25 .font(.callout).foregroundStyle(palette.muted)
26 HStack {
27 Button("Not now") { model.sheet = nil }.keyboardShortcut(.cancelAction)
28 Spacer()
29 Button("Set up connection") { model.sheet = .connectionSetup }
30 .buttonStyle(GlassActionStyle(prominent: true)).keyboardShortcut(.defaultAction)
31 }
32 }
33 .padding(26).frame(width: 480, alignment: .leading)
34 }
35}