import Foundation @main struct StreamedCodeChecks { static func main() throws { let source = ["export function paint({write}) {", #" write("bell 🔔 \\");"#, "}"].joined(separator: "\n") let json = String(data: try JSONSerialization.data(withJSONObject: ["source": source, "note": "bell"]), encoding: .utf8)! for size in [1, 2, 7, 32] { let session = Session() session.receive(["type": "source", "source": "last working piece"]) let chars = Array(json) for start in stride(from: 0, to: chars.count, by: size) { let delta = String(chars[start..