/ Jade / Support / SampleData.swift
SampleData.swift
 1  //
 2  //  SampleData.swift
 3  //  MLXChatExample
 4  //
 5  //  Created by İbrahim Çetin on 20.04.2025.
 6  //
 7  
 8  @MainActor
 9  struct SampleData {
10      static let conversation: [Message] = [
11          .system("You are a helpful assistant specializing in SwiftUI development."),
12          .user("I need help building a weather app in SwiftUI. Where should I start?"),
13          .assistant(
14              "I'll help you create a weather app! Let's break it down into steps. First, we'll need to design the main view to display current weather conditions. Would you like to start with that?"
15          ),
16          .user("Yes, that sounds good. What components should I use for the main view?"),
17          .assistant(
18              "For the main weather view, I recommend using a VStack as the container. You can include:\n\n1. An Image view for the weather icon\n2. Text views for temperature and conditions\n3. HStack for additional metrics like humidity and wind speed"
19          ),
20          .user("How do I make the UI look modern and polished?"),
21          .assistant(
22              "To create a modern UI, try these techniques:\n\n- Use SF Symbols for weather icons\n- Add subtle gradients with .background()\n- Include padding and spacing for better layout\n- Implement dark mode support\n\nWould you like to see some example code?"
23          ),
24          .user("Yes, please show me an example for the main weather view."),
25          .assistant(
26              "Here's a basic example:\n\nVStack(spacing: 20) {\n    Image(systemName: \"sun.max.fill\")\n        .symbolRenderingMode(.multicolor)\n        .font(.system(size: 64))\n    \n    Text(\"72°\")\n        .font(.largeTitle)\n        .bold()\n    \n    Text(\"Sunny\")\n        .font(.title2)\n}\n.padding()\n.background(.ultraThinMaterial)\n.clipShape(RoundedRectangle(cornerRadius: 20))"
27          ),
28          .user("That looks great! How would I add animations to this?"),
29          .assistant(
30              "We can add smooth animations using SwiftUI's animation modifiers. For example:\n\n1. Use withAnimation for state changes\n2. Add .animation() modifier to views\n3. Implement transitions\n\nWould you like to see how to animate the weather changes?"
31          ),
32      ]
33  }