CodeAI

AI Chat

Not in Production

This set of components assembles to form our AI chat experiences. Note thatd differences between chat message styles differentiate the TA (Teacher) experience from the Tutor (student) experience.

Teaching Assistant
Can you suggest a warm-up activity for my Unit 3 loops lesson?
Sure! Have students write a loop that prints their name 10 times, then challenge them to add a counter.
Was this helpful?
filename.ext
Attachment
Tutor
Why does my sprite keep disappearing when I click run?
Good question! Take a look at line 4 — what do you think happens when your loop sets the sprite's size to 0?
filename.ext
Attachment

Building Blocks

The individual building blocks that make up the AI chat UI. These components should not typically be used outside of the chat experience.

Can you suggest a warm-up activity for my Unit 3 loops lesson?

Content

Layout & behavior

Props — AI Chat Message
PropTypeDescription
context"TA" | "Tutor"
author"Human" | "AI"
childrenReactNodeMessage body.
fileUploadsReactNodeOptional file chip row above an AI bubble.
hasActionRowboolean
hasLeftActionsboolean
hasDownloadbooleanDownload control in the left action group.
hasRightActionsboolean
hasFlaggingboolean
feedbackLabelReactNode
onCopy() => void
onDownload() => void
helpfulValue"up" | "down" | null
onHelpfulChange(value: "up" | "down" | null) => void
flaggedboolean
onFlagChange(flagged: boolean) => void