Chat ThreadNew
The message list of an assistant chat: replies in light markdown that stream in with Stop, then Copy, Regenerate, rate and Share.
Pro pattern · recorded from Pro
The SwiftUI source comes with SwiftPieces Pro.
Every Pro pattern installs with one command once your license is signed in, and re-skins with Pro's design system.
Open it in the Pro library ↗Needs a SwiftPieces Pro license: npx swiftpieces login first.
- Type
- ChatThreadBlock
- Inside
- Streaming replies with Stop, Light markdown with Copy, Copy, Regenerate and feedback, Failed reply with Retry
- Install, with a Pro license
- npx swiftpieces add ChatThreadBlock
- Depends on
- Pro's Design System, which installs with it
The thread of an assistant conversation. The person's turns sit on the fill and replies are plain text with paragraphs, bold, lists, inline code and code blocks with Copy, streamed from an AsyncThrowingStream your app provides, with Stop. Finished replies get Copy, Regenerate, thumbs up and down and Share; a failed reply shows its error with Retry, and the thread exposes an anchor so your scroll view can follow the stream or offer Jump to latest.
Its SwiftUI source comes with SwiftPieces Pro: Chat Thread in the Pro library.