diff --git a/DesktopAI.xcodeproj/project.pbxproj b/DesktopAI.xcodeproj/project.pbxproj index a7fcfd5..6aa166f 100644 --- a/DesktopAI.xcodeproj/project.pbxproj +++ b/DesktopAI.xcodeproj/project.pbxproj @@ -18,7 +18,7 @@ 278836962BEEE0B2003FEB01 /* GroqProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 278836952BEEE0B2003FEB01 /* GroqProvider.swift */; }; 278836982BEEE0C2003FEB01 /* BaseProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 278836972BEEE0C2003FEB01 /* BaseProvider.swift */; }; 2788369A2BEEE1AB003FEB01 /* AIModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 278836992BEEE1AB003FEB01 /* AIModel.swift */; }; - 2CAF55412BEEEE8A00EFEB83 /* DisplayChats.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CAF55402BEEEE8A00EFEB83 /* DisplayChats.swift */; }; + 2CAF55412BEEEE8A00EFEB83 /* DisplayChatsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CAF55402BEEEE8A00EFEB83 /* DisplayChatsView.swift */; }; 2CE55CF52BEEC2D3000A95C8 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CE55CF42BEEC2D3000A95C8 /* SettingsView.swift */; }; 2CE55CF72BEEC568000A95C8 /* GeneralSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CE55CF62BEEC568000A95C8 /* GeneralSettingsView.swift */; }; 2CE55CF92BEEC602000A95C8 /* APIKeysSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CE55CF82BEEC602000A95C8 /* APIKeysSettingsView.swift */; }; @@ -39,7 +39,7 @@ 278836952BEEE0B2003FEB01 /* GroqProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroqProvider.swift; sourceTree = ""; }; 278836972BEEE0C2003FEB01 /* BaseProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseProvider.swift; sourceTree = ""; }; 278836992BEEE1AB003FEB01 /* AIModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AIModel.swift; sourceTree = ""; }; - 2CAF55402BEEEE8A00EFEB83 /* DisplayChats.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayChats.swift; sourceTree = ""; }; + 2CAF55402BEEEE8A00EFEB83 /* DisplayChatsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayChatsView.swift; sourceTree = ""; }; 2CE55CF42BEEC2D3000A95C8 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; }; 2CE55CF62BEEC568000A95C8 /* GeneralSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralSettingsView.swift; sourceTree = ""; }; 2CE55CF82BEEC602000A95C8 /* APIKeysSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIKeysSettingsView.swift; sourceTree = ""; }; @@ -76,20 +76,13 @@ 2747DE082BEDC12500626C4F /* DesktopAI */ = { isa = PBXGroup; children = ( + 27CC33D22BF665730084DEC6 /* Utils */, + 27CC33D12BF664D40084DEC6 /* Views */, 278836942BEEE09F003FEB01 /* Providers */, 2747DE092BEDC12500626C4F /* DesktopAIApp.swift */, - 2747DE0B2BEDC12500626C4F /* ContentView.swift */, - 2747DE0D2BEDC12500626C4F /* Item.swift */, - 2CE55CF42BEEC2D3000A95C8 /* SettingsView.swift */, - 2CE55CF62BEEC568000A95C8 /* GeneralSettingsView.swift */, - 2CE55CF82BEEC602000A95C8 /* APIKeysSettingsView.swift */, - 278836992BEEE1AB003FEB01 /* AIModel.swift */, - 2CAF55402BEEEE8A00EFEB83 /* DisplayChats.swift */, 2747DE0F2BEDC12600626C4F /* Assets.xcassets */, 2747DE142BEDC12600626C4F /* DesktopAI.entitlements */, 2747DE112BEDC12600626C4F /* Preview Content */, - 2702F2332BEF07D80056B4A9 /* ChatMessage.swift */, - 2CFFBECF2BF0765A00881BDB /* SystemPromptSettingsView.swift */, ); path = DesktopAI; sourceTree = ""; @@ -105,14 +98,37 @@ 278836942BEEE09F003FEB01 /* Providers */ = { isa = PBXGroup; children = ( - 278836952BEEE0B2003FEB01 /* GroqProvider.swift */, 278836972BEEE0C2003FEB01 /* BaseProvider.swift */, + 278836952BEEE0B2003FEB01 /* GroqProvider.swift */, 274D39A12BEEF147004228FF /* OpenAIProvider.swift */, 274D39A32BEEF4AF004228FF /* CloudflareAIProvider.swift */, ); path = Providers; sourceTree = ""; }; + 27CC33D12BF664D40084DEC6 /* Views */ = { + isa = PBXGroup; + children = ( + 2CE55CF42BEEC2D3000A95C8 /* SettingsView.swift */, + 2CE55CF62BEEC568000A95C8 /* GeneralSettingsView.swift */, + 2CE55CF82BEEC602000A95C8 /* APIKeysSettingsView.swift */, + 2CFFBECF2BF0765A00881BDB /* SystemPromptSettingsView.swift */, + 2CAF55402BEEEE8A00EFEB83 /* DisplayChatsView.swift */, + 2747DE0B2BEDC12500626C4F /* ContentView.swift */, + ); + path = Views; + sourceTree = ""; + }; + 27CC33D22BF665730084DEC6 /* Utils */ = { + isa = PBXGroup; + children = ( + 2747DE0D2BEDC12500626C4F /* Item.swift */, + 278836992BEEE1AB003FEB01 /* AIModel.swift */, + 2702F2332BEF07D80056B4A9 /* ChatMessage.swift */, + ); + path = Utils; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -194,7 +210,7 @@ 2CE55CF52BEEC2D3000A95C8 /* SettingsView.swift in Sources */, 2747DE0E2BEDC12500626C4F /* Item.swift in Sources */, 2747DE0A2BEDC12500626C4F /* DesktopAIApp.swift in Sources */, - 2CAF55412BEEEE8A00EFEB83 /* DisplayChats.swift in Sources */, + 2CAF55412BEEEE8A00EFEB83 /* DisplayChatsView.swift in Sources */, 2CFFBED02BF0765A00881BDB /* SystemPromptSettingsView.swift in Sources */, 278836982BEEE0C2003FEB01 /* BaseProvider.swift in Sources */, ); diff --git a/DesktopAI/AIModel.swift b/DesktopAI/Utils/AIModel.swift similarity index 100% rename from DesktopAI/AIModel.swift rename to DesktopAI/Utils/AIModel.swift diff --git a/DesktopAI/ChatMessage.swift b/DesktopAI/Utils/ChatMessage.swift similarity index 100% rename from DesktopAI/ChatMessage.swift rename to DesktopAI/Utils/ChatMessage.swift diff --git a/DesktopAI/Item.swift b/DesktopAI/Utils/Item.swift similarity index 100% rename from DesktopAI/Item.swift rename to DesktopAI/Utils/Item.swift diff --git a/DesktopAI/APIKeysSettingsView.swift b/DesktopAI/Views/APIKeysSettingsView.swift similarity index 100% rename from DesktopAI/APIKeysSettingsView.swift rename to DesktopAI/Views/APIKeysSettingsView.swift diff --git a/DesktopAI/ContentView.swift b/DesktopAI/Views/ContentView.swift similarity index 93% rename from DesktopAI/ContentView.swift rename to DesktopAI/Views/ContentView.swift index 4eed053..d556b26 100644 --- a/DesktopAI/ContentView.swift +++ b/DesktopAI/Views/ContentView.swift @@ -25,10 +25,10 @@ struct ContentView: View { NavigationSplitView { List(items) { item in NavigationLink(item.model, - destination: DisplayChats(selectedItemId: self.$selectedItemId), - tag: item.id, - selection: self.$selectedItemId -).contextMenu { + destination: DisplayChatsView(selectedItemId: self.$selectedItemId), + tag: item.id, + selection: self.$selectedItemId + ).contextMenu { Button(action: { withAnimation { modelContext.delete(item) diff --git a/DesktopAI/DisplayChats.swift b/DesktopAI/Views/DisplayChatsView.swift similarity index 98% rename from DesktopAI/DisplayChats.swift rename to DesktopAI/Views/DisplayChatsView.swift index d69cd65..ea07eaf 100644 --- a/DesktopAI/DisplayChats.swift +++ b/DesktopAI/Views/DisplayChatsView.swift @@ -9,7 +9,7 @@ import Foundation import SwiftUI import SwiftData -struct DisplayChats: View { +struct DisplayChatsView: View { @State private var userMessage = "" @Binding var selectedItemId: UUID? @Query private var items: [Item] diff --git a/DesktopAI/GeneralSettingsView.swift b/DesktopAI/Views/GeneralSettingsView.swift similarity index 100% rename from DesktopAI/GeneralSettingsView.swift rename to DesktopAI/Views/GeneralSettingsView.swift diff --git a/DesktopAI/SettingsView.swift b/DesktopAI/Views/SettingsView.swift similarity index 100% rename from DesktopAI/SettingsView.swift rename to DesktopAI/Views/SettingsView.swift diff --git a/DesktopAI/SystemPromptSettingsView.swift b/DesktopAI/Views/SystemPromptSettingsView.swift similarity index 100% rename from DesktopAI/SystemPromptSettingsView.swift rename to DesktopAI/Views/SystemPromptSettingsView.swift