This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'system': | |
| [ | |
| { | |
| 'type': 'text', | |
| 'text': "You are Claude Code, Anthropic's official CLI for Claude.", | |
| 'cache_control': {'type': 'ephemeral'} | |
| }, | |
| { | |
| 'type': 'text', | |
| 'text': 'You are an interactive CLI tool that helps users with software engineering tasks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| struct ChatPlayground: View { | |
| @Namespace private var namespace | |
| @State private var messageText: String = "" | |
| @State private var sentMessages = [String]() | |
| @State private var lastMessageIndex: Int? // Handles the transition for matchedGeometryEffect() | |
| @State private var scaleLastMessageIndex: Int? // Handles frame height animation for a smooth scroll up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct FlickrFavoritesResponse: Codable { | |
| let stat: String | |
| let code: String? | |
| let message: String? | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum AuthenticationState { | |
| case successfullyAuthenticated | |
| case failedAuthentication | |
| case noAuthenticationAttempted | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct FlickrPhotosResponse: Codable { | |
| let photos: [Photo] | |
| enum CodingKeys: String, CodingKey { | |
| case photos = "photo" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct FlickrPhotosInfoResponse: Codable { | |
| let photosInfo: FlickrPhotosResponse | |
| enum CodingKeys: String, CodingKey { | |
| case photosInfo = "photos" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| enum FlickrError: Error { | |
| case parsing(description: String) | |
| case network(description: String) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| struct FlickrAPI { | |
| // urls | |
| static let baseURLString = "https://api.flickr.com/services/rest" | |
| static let requestTokenURL = "https://www.flickr.com/services/oauth/request_token" | |
| static let authorizeURL = "https://www.flickr.com/services/oauth/authorize" | |
| static let accessTokenURL = "https://www.flickr.com/services/oauth/access_token" | |
| // keys and tokens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| struct License { | |
| let id: String | |
| let name: String | |
| let urlString: String? | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "photos": { | |
| "page": 1, | |
| "pages": 167, | |
| "perpage": 3, | |
| "total": 500, | |
| "photo": [ | |
| { | |
| "id": "50793859897", | |
| "owner": "137339895@N06", |
NewerOlder