Generated
A reply, with its sources
Suggested
Written by the booking assistant from this enquiry and the hire rules.
It can be wrong. Check it before you send it.
Before you arrive
Ask @Aisha Khan to confirm the address for B-1042 Garden room before .
Read the hire terms first, then use 4721 at the gate.
Bring your own chairs.
Leave the hall by ten.
Ring the bell by the side gate.
Wait for the caretaker.
- Done
Deposit paid
- Not done
Key returned
The side door sticks in the cold.
Gate: 4721
Alarm: 0990Floor plan: garden-room-plan.pdf
A reply while its actions wait
Suggested
Wait for the reply to save to see how it was made.
Written by the booking assistant from this enquiry and the hire rules.
It can be wrong. Check it before you send it.
Hello Aisha,
The Garden room is free on the evenings you rehearse that week. I have held it for the choir until Friday.
Oakmere Village Hall
Wait for the reply to save before copying.
Wait for the reply to save before trying again.
Wait for the reply to save before using it.
A summary, with no sources
Summary
Written by the booking assistant from the messages in this conversation.
It can be wrong. Check it against the messages.
The choir asks to move its rehearsals to the Garden room while the hall floor is sealed. The Garden room is free those evenings.
A field a model filled
Suggested
Chosen by the booking assistant from the rooms free that week.
It can be wrong. Check the room before you save.
A model’s turn
Summary
Written by the booking assistant from the messages in this conversation.
It can be wrong. Check it against the messages.
The choir asks to move its rehearsals to the Garden room while the hall floor is sealed. The Garden room is free those evenings.
A fact a model wrote
- Access notes
Suggested
Written by the booking assistant from the hirer’s messages.
It can be wrong. Check it with the hirer.
Use the side door. The key is under the blue planter.
An open expansion
Enquiry ·
Enquiry summary
Summary
Written by the booking assistant from this enquiry.
It can be wrong. Check it against the enquiry.
The school asks for the main hall on two Fridays for its spring concert.
Source
let lines = (texts): KitReact.AuthoredText.shown => {
value: texts->Array.map((line): KitReact.AuthoredText.block => Paragraph([Text(line, [])])),
reader: Specimen_Reader.reader,
mentionLink: (_, _) => None,
fileLink: _ => None,
}
let note: KitReact.AuthoredText.shown = {
value: [
Heading([Text("Before you arrive", [])]),
Paragraph([
Text("Ask ", []),
Mention({kind: Person, id: "aisha-khan", label: "Aisha Khan"}),
Text(" to confirm ", []),
Text("the address", [Bold]),
Text(" for ", []),
Mention({kind: Subject, id: "b-1042", label: "B-1042 Garden room"}),
Text(" before ", []),
Date({year: 2025, month: 3, day: 14}),
Text(".", []),
HardBreak,
Text("Read the ", []),
Text("hire terms", [Link("https://example.com/hire-terms")]),
Text(" first, ", []),
Text("then", [Italic]),
Text(" use ", []),
Text("4721", [Code]),
Text(" at the gate.", []),
]),
BulletList([[[Text("Bring your own chairs.", [])]], [[Text("Leave the hall by ten.", [])]]]),
OrderedList([[[Text("Ring the bell by the side gate.", [])]], [[Text("Wait for the caretaker.", [])]]]),
TaskList([{checked: true, content: [[Text("Deposit paid", [])]]}, {checked: false, content: [[Text("Key returned", [])]]}]),
Blockquote([[Text("The side door sticks in the cold.", [])]]),
CodeBlock("Gate: 4721\nAlarm: 0990"),
Paragraph([Text("Floor plan: ", []), File({id: "floor-plan", name: "garden-room-plan.pdf"})]),
],
reader: Specimen_Reader.reader,
mentionLink: (kind, _) =>
switch kind {
| Person => Some("#role-generated")
| Subject => None
},
fileLink: _ => Some("#role-generated"),
}
let reply: KitReact.Roles.Generated.mark = {
id: "role-generated-reply",
word: "Suggested",
madeBy: [Text("Written by the booking assistant from this enquiry and the hire rules.")],
madeAt: KitReact.Time.moment(Specimen_Reader.reader, Date.fromString("2025-02-03T09:14:00Z")),
sources: [{name: "Aisha Khan’s enquiry", href: "#role-generated"}, {name: "Hire rules", href: "#role-generated"}],
caution: [Text("It can be wrong. Check it before you send it.")],
}
let summary: KitReact.Roles.Generated.mark = {
id: "role-generated-summary",
word: "Summary",
madeBy: [Text("Written by the booking assistant from the messages in this conversation.")],
madeAt: KitReact.Time.moment(Specimen_Reader.reader, Date.fromString("2025-02-03T11:42:00Z")),
sources: [],
caution: [Text("It can be wrong. Check it against the messages.")],
}
let field: KitReact.Roles.Generated.mark = {
id: "role-generated-field",
word: "Suggested",
madeBy: [Text("Chosen by the booking assistant from the rooms free that week.")],
madeAt: KitReact.Time.moment(Specimen_Reader.reader, Date.fromString("2025-02-03T09:14:00Z")),
sources: [],
caution: [Text("It can be wrong. Check the room before you save.")],
}
let turn: KitReact.Roles.Generated.mark = {
id: "role-generated-turn",
word: "Summary",
madeBy: [Text("Written by the booking assistant from the messages in this conversation.")],
madeAt: KitReact.Time.moment(Specimen_Reader.reader, Date.fromString("2025-02-03T11:42:00Z")),
sources: [],
caution: [Text("It can be wrong. Check it against the messages.")],
}
let fact: KitReact.Roles.Generated.mark = {
id: "role-generated-fact",
word: "Suggested",
madeBy: [Text("Written by the booking assistant from the hirer’s messages.")],
madeAt: KitReact.Time.moment(Specimen_Reader.reader, Date.fromString("2025-02-03T09:14:00Z")),
sources: [],
caution: [Text("It can be wrong. Check it with the hirer.")],
}
let expansion: KitReact.Roles.Generated.mark = {
id: "role-generated-expansion",
word: "Summary",
madeBy: [Text("Written by the booking assistant from this enquiry.")],
madeAt: KitReact.Time.moment(Specimen_Reader.reader, Date.fromString("2025-02-03T09:14:00Z")),
sources: [],
caution: [Text("It can be wrong. Check it against the enquiry.")],
}
let waiting: KitReact.Roles.Generated.mark = {
id: "role-generated-waiting",
word: "Suggested",
madeBy: [Text("Written by the booking assistant from this enquiry and the hire rules.")],
madeAt: KitReact.Time.moment(Specimen_Reader.reader, Date.fromString("2025-02-03T09:14:00Z")),
sources: [{name: "Aisha Khan’s enquiry", href: "#role-generated"}, {name: "Hire rules", href: "#role-generated"}],
caution: [Text("It can be wrong. Check it before you send it.")],
state: Inert({id: "role-generated-waiting-how", words: [Text("Wait for the reply to save to see how it was made.")]}),
}
@react.component
let make = () =>
<>
<details>
<summary> {React.string("A reply, with its sources")} </summary>
<KitReact.Roles.Generated value={{mark: reply, state: Whole({retry: {}, use: {}})}} text=note />
</details>
<details>
<summary> {React.string("A reply while its actions wait")} </summary>
<KitReact.Roles.Generated
value={{
mark: waiting,
state: Whole({
retry: {},
use: {},
copyState: Inert({id: "role-generated-waiting-copy", words: [Text("Wait for the reply to save before copying.")]}),
retryState: Inert({id: "role-generated-waiting-retry", words: [Text("Wait for the reply to save before trying again.")]}),
useState: Inert({id: "role-generated-waiting-use", words: [Text("Wait for the reply to save before using it.")]}),
}),
}} text={lines(["Hello Aisha,", "The Garden room is free on the evenings you rehearse that week. I have held it for the choir until Friday.", "Oakmere Village Hall"])} />
</details>
<details>
<summary> {React.string("A summary, with no sources")} </summary>
<KitReact.Roles.Generated value={{mark: summary, state: Whole({retry: {}})}} text={lines(["The choir asks to move its rehearsals to the Garden room while the hall floor is sealed. The Garden room is free those evenings."])} />
</details>
<details>
<summary> {React.string("A field a model filled")} </summary>
<KitReact.Roles.FormGroup id="role-generated-room"
label={React.string("Room")}
generated=field
controlProps={{name: "room"}} controlValue="Garden room" printedValue={React.string("Garden room")}
kind=Text(Medium)
/>
</details>
<details>
<summary> {React.string("A model’s turn")} </summary>
<KitReact.Roles.MessageEntry
author={React.string("Booking assistant")}
turn={Model({mark: turn, state: Whole({retry: {}})})}
time={KitReact.Time.moment(Specimen_Reader.reader, Date.fromString("2025-02-03T11:42:00Z"))}
body={lines(["The choir asks to move its rehearsals to the Garden room while the hall floor is sealed. The Garden room is free those evenings."])}
/>
</details>
<details>
<summary> {React.string("A fact a model wrote")} </summary>
<KitReact.Roles.FactGroup>
<KitReact.Roles.LabelledFact
name={React.string("Access notes")}
value={Generated({mark: fact, state: Whole({retry: {}})}, lines(["Use the side door. The key is under the blue planter."]))}
/>
</KitReact.Roles.FactGroup>
</details>
<details>
<summary> {React.string("An open expansion")} </summary>
<KitReact.Roles.Row
subject={React.string("Oakmere Primary School")}
subjectHref={"#role-generated"}
facts=[{key: "enquiry", content: Words([KitReact.Words.Text("Enquiry · "), KitReact.Words.Time(KitReact.Time.day(Specimen_Reader.reader, {year: 2025, month: 2, day: 3}))]), props: {}}]
expansion={{
summary: React.string("Enquiry summary"),
content: Generated({
value: {mark: expansion, state: Whole({retry: {}})},
text: lines(["The school asks for the main hall on two Fridays for its spring concert."]),
}),
expanded: true,
}}
/>
</details>
</>
Generated, streaming
Suggested
Written by the booking assistant from this enquiry and the hire rules.
It can be wrong. Check it before you send it.
Hello Aisha,
The Garden room is free on both evenings you asked about, and it seats up to forty. I can hold it for you
While the page loads, Stop and How this was made wait.
Suggested
Wait for the page to load to see how this was made.
Written by the booking assistant from this enquiry and the hire rules.
It can be wrong. Check it before you send it.
Hello Aisha,
The Garden room is free on both evenings you asked about, and it seats up to forty. I can hold it for you
Wait for the page to load before stopping the reply.
Source
let lines = (texts): KitReact.AuthoredText.shown => {
value: texts->Array.map((line): KitReact.AuthoredText.block => Paragraph([Text(line, [])])),
reader: Specimen_Reader.reader,
mentionLink: (_, _) => None,
fileLink: _ => None,
}
@react.component
let make = () =>
<>
<KitReact.Roles.Generated
value={{
mark: {
id: "role-generated-streaming-reply",
word: "Suggested",
madeBy: [Text("Written by the booking assistant from this enquiry and the hire rules.")],
madeAt: KitReact.Time.moment(Specimen_Reader.reader, Date.fromString("2025-02-03T09:14:00Z")),
sources: [{name: "Aisha Khan’s enquiry", href: "#role-generated-streaming"}, {name: "Hire rules", href: "#role-generated-streaming"}],
caution: [Text("It can be wrong. Check it before you send it.")],
},
state: Streaming({stop: {}}),
}} text={lines(["Hello Aisha,", "The Garden room is free on both evenings you asked about, and it seats up to forty. I can hold it for you"])} />
<p className="specimen-case-line"> {React.string("While the page loads, Stop and How this was made wait.")} </p>
<KitReact.Roles.Generated
value={{
mark: {
id: "role-generated-streaming-waiting",
word: "Suggested",
madeBy: [Text("Written by the booking assistant from this enquiry and the hire rules.")],
madeAt: KitReact.Time.moment(Specimen_Reader.reader, Date.fromString("2025-02-03T09:14:00Z")),
sources: [{name: "Aisha Khan’s enquiry", href: "#role-generated-streaming"}, {name: "Hire rules", href: "#role-generated-streaming"}],
caution: [Text("It can be wrong. Check it before you send it.")],
state: Inert({id: "role-generated-streaming-waiting-how", words: [Text("Wait for the page to load to see how this was made.")]}),
},
state: Streaming({
stop: {},
stopState: Inert({id: "role-generated-streaming-waiting-stop", words: [Text("Wait for the page to load before stopping the reply.")]}),
}),
}} text={lines(["Hello Aisha,", "The Garden room is free on both evenings you asked about, and it seats up to forty. I can hold it for you"])} />
</>