constMessage=UiSchema.TaggedEnum({ReviewedTurn:{},OpenedTurnFile:{path:Schema.String}})// at the end of a turn: Review opens the whole change, a file opens its own diffexportconstTurnChanges=(h:Html.H<typeofMessage.Type>,turn: string,files:ReadonlyArray<ChangedFileStat>)=>ChangeSummary(h,{key: turn,props:{id: turn, files },onEmit:{RequestedReview:()=>Message.ReviewedTurn(),RequestedOpen:({ path })=>Message.OpenedTurnFile({ path })},})
API reference
Props
ChangeSummary props
Name
Type
Default
Description
idrequired
string
—
—
filesrequired
ChangedFileStat[]
—
—
limit
number
3
Files shown before "+N more"; 3 by default
reviewLabel
string
"Review"
"Review" by default; leave can without "review" for no button
can
("review" | "open")[]
—
"review" shows the button; "open" makes each file a button
agentId
string
—
—
locale
string
—
—
Events
ChangeSummary events
Event
Payload
Description
RequestedReview
{ id: string }
Review the whole change
RequestedOpen
{ id: string; path: string }
Open one file's change
Agent actions
What agents can do with ChangeSummary
Action
Description
ClickedReview
Review the whole change
ClickedFile
Open one file's change, by its path
Accessibility
The card is a section named by its heading, "Edited 6 files"; Review and each file are real buttons.
+N more is a button with aria-expanded. A new or deleted file says so in words.