refactor: improve alert error context and copy action

This commit is contained in:
世界
2026-02-08 18:25:55 +08:00
parent a86dfc26d1
commit 8897e6deeb
32 changed files with 125 additions and 82 deletions
@@ -204,7 +204,7 @@ public struct CoreView: View {
try await environments.extensionProfile!.stop()
await destroyWorkingDirectory()
} catch {
alert = AlertState(error: error)
alert = AlertState(action: "stop service before destroying working directory", error: error)
}
}
@@ -233,7 +233,7 @@ public struct CoreView: View {
#endif
isLoading = true
} catch {
alert = AlertState(error: error)
alert = AlertState(action: "destroy working directory", error: error)
}
}
@@ -281,7 +281,7 @@ public struct CoreView: View {
try await manager.signalEnumerator(for: .workingSet)
} catch {
await MainActor.run {
alert = AlertState(error: error)
alert = AlertState(action: "notify Files app about working directory changes", error: error)
}
}
}
@@ -300,7 +300,7 @@ public struct CoreView: View {
}
} catch {
await MainActor.run {
alert = AlertState(error: error)
alert = AlertState(action: "open working directory in Files", error: error)
}
}
}