forked from intitni/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatWindowView.swift
More file actions
34 lines (30 loc) · 1.01 KB
/
ChatWindowView.swift
File metadata and controls
34 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import ActiveApplicationMonitor
import AppKit
import ChatTab
import ComposableArchitecture
import SwiftUI
private let r: Double = 8
struct ChatWindowView: View {
let store: StoreOf<ChatPanelFeature>
var body: some View {
WithViewStore(store, observe: { $0 }) { viewStore in
Group {
if let chat = viewStore.chat {
ChatPanel(chat: chat)
.background {
Button(action: {
viewStore.send(.hideButtonClicked)
}) {
EmptyView()
}
.keyboardShortcut("M", modifiers: [.command])
}
}
}
.xcodeStyleFrame()
.opacity(viewStore.isPanelDisplayed ? 1 : 0)
.frame(minWidth: Style.panelWidth, minHeight: Style.panelHeight)
.preferredColorScheme(viewStore.colorScheme)
}
}
}