Conversation
A conversation with an agent, as a screen: the transcript and the parts in it. The transcript opens at its end and follows a reply while you are at the end. When you scroll up, it stops following. It anchors each of your messages near the top, so you read each reply from its start. A button takes you back to the latest message. Under this, it is a MessageScroller on the scroller of the pane. Your message sits on the right on a tint, with its attachments above it. The reply of the agent has no bubble. The tool calls between replies fold into one line. While they run, the line tells you what happens. When they are done, it tells you how much happened. The pictures that a turn made stay out of the fold. When the agent wants to spend something, it stops and asks at the composer, as a Confirmation in its notices. The transcript records only the answer. A failure that ends the turn is a notice with the one action that fixes it. Every word comes from the app, including the counts, because a copied file cannot localise.
import { Stack } from "@kushagradhawan/kookie-ui-react";import { Conversation, Pictures, Reply, Step, Steps, Turn, UserMessage } from "../../blocks/conversation";import { ArrowDownIcon } from "../../app/icons";export default function Example() { return ( <Conversation aria-label="Conversation" jumpLabel="Jump to the latest" jumpIcon={<ArrowDownIcon />}> <Turn id="u1" from="person"> <UserMessage attachments={<div role="img" aria-label="Product shot" style={{ aspectRatio: "4 / 3" }} />}> Launch images for a new sneaker, from this product shot </UserMessage> </Turn> <Turn id="a1" from="agent"> <Stack gap="5"> <Steps summary="3 steps"> <Step>Read the graph</Step> <Step>Added 10 nodes</Step> <Step>Ran 4 nodes</Step> </Steps> <Pictures> <div role="img" aria-label="Draft 1" /> <div role="img" aria-label="Draft 2" /> </Pictures> <Reply>Two directions. Which one should the final follow?</Reply> </Stack> </Turn> </Conversation> );}