Intermediate
Show Progress from a Data Part
The route sends a plan as a data-plan part and updates it after every step. Its data is a list of { label, done } objects. When #start is clicked, send Refund ORD-1042.
Show #progress as N of 3 done, where N is the number of plan items with done: true, using the latest data-plan part of the assistant message. When all three are done, show Finished in #status; before that, show Working.
What Check tests
- Before the click,
#progresssays0 of 3 done - After the run,
#progresssays3 of 3 done #statussaysFinished- The code reads
data-planparts
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.