macOS client panes and transcript
This commit is contained in:
@@ -5,30 +5,6 @@ import SwiftUI
|
||||
let exitedCode = 4000
|
||||
let internalErrorCode = 1011
|
||||
|
||||
struct TerminalSpike: View {
|
||||
@Environment(Store.self) private var store
|
||||
@ViewState private var status = ""
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Text("Shell in the task's worktree")
|
||||
Text(status)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
if let taskId = store.selectedTaskId {
|
||||
if store.findTask(taskId)?.status != .active {
|
||||
Text("The task is closed; its worktree is gone.")
|
||||
} else {
|
||||
TerminalHost(api: store.api, taskId: taskId, status: $status)
|
||||
}
|
||||
} else {
|
||||
Text("No task selected.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct TerminalHost: NSViewRepresentable {
|
||||
let api: API
|
||||
let taskId: String
|
||||
|
||||
Reference in New Issue
Block a user