ui: move health/cli info to Debug; add single health row in General
This commit is contained in:
@@ -9,6 +9,7 @@ struct DebugSettings: View {
|
||||
@State private var modelsLoading = false
|
||||
@State private var modelsError: String?
|
||||
@ObservedObject private var relayManager = RelayProcessManager.shared
|
||||
@ObservedObject private var healthStore = HealthStore.shared
|
||||
@State private var relayRootInput: String = RelayProcessManager.shared.projectRootPath()
|
||||
@State private var sessionStorePath: String = SessionLoader.defaultStorePath
|
||||
@State private var sessionStoreSaveError: String?
|
||||
@@ -19,6 +20,18 @@ struct DebugSettings: View {
|
||||
var body: some View {
|
||||
ScrollView(.vertical) {
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
LabeledContent("Health") {
|
||||
HStack(spacing: 8) {
|
||||
Circle().fill(self.healthStore.state.tint).frame(width: 10, height: 10)
|
||||
Text(self.healthStore.summaryLine)
|
||||
}
|
||||
}
|
||||
LabeledContent("CLI helper") {
|
||||
let loc = CLIInstaller.installedLocation()
|
||||
Text(loc ?? "missing")
|
||||
.font(.caption.monospaced())
|
||||
.foregroundStyle(loc == nil ? Color.red : Color.secondary)
|
||||
}
|
||||
LabeledContent("PID") { Text("\(ProcessInfo.processInfo.processIdentifier)") }
|
||||
LabeledContent("Log file") {
|
||||
Button("Open pino log") { self.openLog() }
|
||||
|
||||
@@ -61,17 +61,7 @@ var body: some View {
|
||||
}
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("Health")
|
||||
.font(.callout.weight(.semibold))
|
||||
self.healthCard
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text("CLI helper")
|
||||
.font(.callout.weight(.semibold))
|
||||
self.cliInstaller
|
||||
}
|
||||
self.healthRow
|
||||
|
||||
Spacer(minLength: 12)
|
||||
HStack {
|
||||
@@ -317,6 +307,16 @@ private enum RemoteStatus: Equatable {
|
||||
}
|
||||
|
||||
extension GeneralSettings {
|
||||
private var healthRow: some View {
|
||||
HStack(spacing: 10) {
|
||||
Circle()
|
||||
.fill(self.healthStore.state.tint)
|
||||
.frame(width: 10, height: 10)
|
||||
Text(self.healthStore.summaryLine)
|
||||
.font(.callout)
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
fileprivate func testRemote() async {
|
||||
self.remoteStatus = .checking
|
||||
|
||||
Reference in New Issue
Block a user