Build AI Studio 1.1 for macOS #1
+21
-20
@@ -165,7 +165,6 @@ struct ChatView: View {
|
|||||||
}
|
}
|
||||||
.disabled(studio.conversations.count < 2 && !showingComparison)
|
.disabled(studio.conversations.count < 2 && !showingComparison)
|
||||||
Button("Performance", systemImage: "chart.xyaxis.line") { showingPerformance = true }
|
Button("Performance", systemImage: "chart.xyaxis.line") { showingPerformance = true }
|
||||||
SettingsLink { Label("Settings", systemImage: "gear") }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.toolbar(mode == .zen ? .hidden : .visible, for: .windowToolbar)
|
.toolbar(mode == .zen ? .hidden : .visible, for: .windowToolbar)
|
||||||
@@ -1812,7 +1811,7 @@ enum StudioFont: String, CaseIterable, Identifiable {
|
|||||||
|
|
||||||
struct StudioSettingsView: View {
|
struct StudioSettingsView: View {
|
||||||
@ObservedObject var studio: StudioModel
|
@ObservedObject var studio: StudioModel
|
||||||
@State private var page: String? = "Models"
|
@AppStorage("studioSettingsPane") private var page = "Models"
|
||||||
private let pages = [
|
private let pages = [
|
||||||
("Models", "cpu"), ("Model Library", "square.stack"), ("Generation", "slider.horizontal.3"),
|
("Models", "cpu"), ("Model Library", "square.stack"), ("Generation", "slider.horizontal.3"),
|
||||||
("Toolbox", "wrench.and.screwdriver"), ("Local Tools", "terminal"), ("Runtime", "waveform.path"),
|
("Toolbox", "wrench.and.screwdriver"), ("Local Tools", "terminal"), ("Runtime", "waveform.path"),
|
||||||
@@ -1820,28 +1819,30 @@ struct StudioSettingsView: View {
|
|||||||
]
|
]
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
HSplitView {
|
TabView(selection: $page) {
|
||||||
List(selection: $page) {
|
ForEach(pages, id: \.0) { name, icon in
|
||||||
ForEach(pages, id: \.0) { name, icon in Label(name, systemImage: icon).tag(name) }
|
pane(name)
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
.tabItem { Label(name, systemImage: icon) }
|
||||||
|
.tag(name)
|
||||||
}
|
}
|
||||||
.listStyle(.sidebar)
|
|
||||||
.frame(minWidth: 160, idealWidth: 180, maxWidth: 210)
|
|
||||||
Group {
|
|
||||||
switch page {
|
|
||||||
case "Model Library": ModelCatalogView(studio: studio)
|
|
||||||
case "Generation": GenerationSettingsView()
|
|
||||||
case "Toolbox": MCPSettings(studio: studio)
|
|
||||||
case "Local Tools": LocalToolsView(studio: studio)
|
|
||||||
case "Runtime": RuntimeSettingsView(studio: studio)
|
|
||||||
case "Appearance": StudioAppearanceView()
|
|
||||||
case "Workspace Data": WorkspaceDataView(studio: studio)
|
|
||||||
default: BackendSettings(studio: studio)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.frame(minWidth: 570, maxWidth: .infinity, maxHeight: .infinity)
|
|
||||||
}
|
}
|
||||||
|
.navigationTitle(page)
|
||||||
.frame(width: 780, height: 610)
|
.frame(width: 780, height: 610)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ViewBuilder private func pane(_ name: String) -> some View {
|
||||||
|
switch name {
|
||||||
|
case "Model Library": ModelCatalogView(studio: studio)
|
||||||
|
case "Generation": GenerationSettingsView()
|
||||||
|
case "Toolbox": MCPSettings(studio: studio)
|
||||||
|
case "Local Tools": LocalToolsView(studio: studio)
|
||||||
|
case "Runtime": RuntimeSettingsView(studio: studio)
|
||||||
|
case "Appearance": StudioAppearanceView()
|
||||||
|
case "Workspace Data": WorkspaceDataView(studio: studio)
|
||||||
|
default: BackendSettings(studio: studio)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum StudioShortcut: String, CaseIterable, Identifiable {
|
private enum StudioShortcut: String, CaseIterable, Identifiable {
|
||||||
|
|||||||
Reference in New Issue
Block a user