@@ -181,69 +181,12 @@ final class ChatViewModel {
181181- ` LanguageService.swift ` - ` @MainActor @Observable ` for language detection/management
182182- ` HealthDataManager.swift ` - Shared instance pattern for health data
183183
184- ### Directory Structure
185-
186- ```
187- Foundation Lab/
188- ├── AppIntents/ # Siri Shortcuts integration (OpenChatIntent)
189- ├── Assets.xcassets/ # App assets and icons
190- ├── Extensions/
191- │ ├── Color+Extensions.swift
192- │ └── Transcript+TokenCounting.swift
193- ├── FoundationLabApp.swift # App entry point
194- ├── Models/
195- │ ├── AppConfiguration.swift # Constants (maxTokens, temperature)
196- │ ├── DataModels.swift # @Generable structs
197- │ ├── FoundationModelsError.swift
198- │ ├── NavigationCoordinator.swift
199- │ └── TabSelection.swift
200- ├── Playgrounds/ # 37 learning examples (Chapter 2, 3, 8, 13)
201- ├── Services/
202- │ ├── ConversationContextBuilder.swift
203- │ ├── LanguageService.swift
204- │ ├── RAGService.swift
205- │ └── ToolExecutor.swift
206- ├── ViewModels/
207- │ ├── ChatViewModel.swift
208- │ ├── RAGChatViewModel.swift
209- │ └── VoiceViewModel.swift
210- ├── Views/
211- │ ├── AdaptiveNavigationView.swift
212- │ ├── Chat/
213- │ │ ├── ChatView.swift
214- │ │ ├── ChatInputView.swift
215- │ │ ├── ChatInstructionsView.swift
216- │ │ └── RAGDocumentPickerView.swift
217- │ ├── Components/
218- │ │ ├── CodeDisclosure.swift
219- │ │ ├── GenericCardView.swift
220- │ │ ├── ExampleViewBase.swift
221- │ │ └── Spacing.swift
222- │ ├── Examples/
223- │ │ ├── ExamplesView.swift
224- │ │ ├── BasicChatView.swift
225- │ │ ├── RAGChatView.swift
226- │ │ ├── RAGChatView+Types.swift
227- │ │ ├── DynamicSchemas/
228- │ │ └── ...
229- │ ├── Languages/
230- │ │ ├── LanguagesView.swift
231- │ │ └── ProductionLanguageExampleView.swift
232- │ ├── SidebarView.swift
233- │ ├── Tools/
234- │ │ ├── ToolsView.swift
235- │ │ └── HealthToolView.swift
236- │ └── Voice/
237- │ ├── VoiceView.swift
238- │ └── PermissionRequestView.swift
239- ```
240-
241184### Localization (` Localizable.xcstrings ` )
242185
243186- 10 languages: English, German, Spanish, French, Italian, Japanese, Korean, Portuguese (Brazil), Chinese (Simplified), Chinese (Traditional)
244187- ~ 450KB file with all translations
245188
246- ### Playground Examples (` Playgrounds /` )
189+ ### Playground Examples (` BookPlaygrounds /` )
247190
248191Run directly in Xcode using the ` #Playground ` directive:
249192- Chapter 2: 16 examples (Getting Started with Sessions)
0 commit comments