Repository Public
1// Author: Simon-Pierre Boucher — contact@spboucher.ai2// File: SPChat/Features/Workspace/LibraryScreen.swift3// Description: Routes a workspace section of the sidebar to its native screen.4import SwiftUI5import SPChatCore67struct LibraryScreen: View {8 let section: LibrarySection9 @Bindable var window: WindowModel10 var body: some View {11 Group {12 switch section {13 case .projects: ProjectsScreen(window: window)14 case .prompts: PromptsScreen(window: window)15 case .presets: PresetsScreen()16 case .files: FilesScreen()17 case .memory: MemoryScreen()18 case .models: ModelsScreen(window: window)19 case .usage: UsageScreen(window: window)20 case .compare: CompareScreen(window: window)21 case .research: ResearchScreen()22 case .images: ImagesScreen()23 case .constellation: ConstellationScreen(window: window)24 }25 }26 .navigationTitle(section.title)27 .frame(maxWidth: .infinity, maxHeight: .infinity)28 .background(Color(nsColor: .windowBackgroundColor))29 }30}31