Code Assistant
Streaming code with syntax highlighting. AgentsKit's CodeBlock component renders code beautifully as it streams in.
With AgentsKit
import { useChat, ChatContainer, Message, CodeBlock, Markdown } from '@agentskit/react'
function CodeChat() {
const chat = useChat({ adapter })
return (
<ChatContainer>
{chat.messages.map(msg => (
<Message key={msg.id} message={msg}>
<Markdown content={msg.content} streaming={msg.status === 'streaming'} />
</Message>
))}
<InputBar chat={chat} placeholder="Ask about code..." />
</ChatContainer>
)
}