Persist sidebar visibility; add language-matching rule to default prompt
- ContentView now reads/writes SettingsService.sidebarVisible so the NavigationSplitView sidebar's shown/hidden state survives relaunch, matching the existing window size/position persistence. - Default system prompt gains a rule: always reply in the user's language, even for requests (e.g. translation) targeting another one.
This commit is contained in:
@@ -29,7 +29,8 @@ import Darwin // uname, sysctlbyname
|
||||
struct ContentView: View {
|
||||
@Environment(ChatViewModel.self) var chatViewModel
|
||||
private var updateService = UpdateCheckService.shared
|
||||
@State private var columnVisibility: NavigationSplitViewVisibility = .all
|
||||
@State private var columnVisibility: NavigationSplitViewVisibility =
|
||||
SettingsService.shared.sidebarVisible ? .all : .detailOnly
|
||||
@State private var showIntelWarning = false
|
||||
|
||||
var body: some View {
|
||||
@@ -46,6 +47,9 @@ struct ContentView: View {
|
||||
)
|
||||
}
|
||||
.frame(minWidth: 860, minHeight: 560)
|
||||
.onChange(of: columnVisibility) { _, newValue in
|
||||
SettingsService.shared.sidebarVisible = newValue != .detailOnly
|
||||
}
|
||||
#if os(macOS)
|
||||
.onAppear {
|
||||
NSApplication.shared.windows.forEach { $0.tabbingMode = .disallowed }
|
||||
|
||||
Reference in New Issue
Block a user