TurnConcepts — AI Chat

AI Chat
Interfaces

Conversational AI interface patterns — from simple chatbots to multi-turn assistants with code output, tool use, and multimodal inputs. The building blocks of modern AI products.

ChatGPT Assistant Code Chat Multimodal RAG Agent System Prompt Streaming
Code Copilot
Write a debounce function in TypeScript
Here's a typed debounce:
function debounce<T extends (...args: any[]) => void>(
fn: T, ms: number
): (...args: Parameters<T>) => void {
let id: ReturnType<typeof setTimeout>;
return (...args) => {
clearTimeout(id);
id = setTimeout(() => fn(...args), ms);
};
}
code

Code Assistant

An AI chat optimized for code generation with syntax-highlighted code blocks, monospace formatting, and a developer-focused aesthetic. Think GitHub Copilot Chat.

Code GenSyntax HighlightCopilotIDE
Stream AI
Explain quantum computing in simple terms
Quantum computing uses qubits that can be 0 and 1 simultaneously (superposition). When qubits are entangled, measuring one instantly…
streaming

Streaming Response

Shows token-by-token streaming with animated typing dots. The response appears progressively, giving users immediate feedback that the model is generating output.

StreamingSSETyping IndicatorProgressive
Design brainstorm
How should I structure my component library?
I'd recommend an atomic design approach: atoms → molecules → organisms → templates → pages.
What about theming?
Use CSS custom properties at the :root level. Create a theme file that maps design tokens to CSS vars.
multi-turn

Multi-turn with History

A ChatGPT-style interface with a conversation history sidebar on the left. Users can switch between past conversations while maintaining context in the current thread.

Multi-turnHistorySidebarContext
Vision AI
What's in this image?
The image shows a gradient visualization transitioning from deep blue to purple. It appears to be a UI design element — possibly a hero section background or a card gradient swatch.
multimodal

Multimodal Input

A chat interface that accepts images, files, and other media alongside text. The AI can analyze visual content and respond with structured descriptions — like GPT-4 Vision.

MultimodalVisionImage UploadGPT-4V
Agent Mode
Find all TypeScript files with unused imports
⚡ TOOL: grep_search
Searching for unused imports across 42 files…
Found 7 files with unused imports. I'll fix them now.
✓ TOOL: edit_file × 7
agent

Tool Use / Agent

An AI agent that can invoke external tools — file search, code edit, API calls. Shows tool invocation badges and results inline with the conversation flow.

AgentTool UseFunction CallingAgentic
SYSTEM
You are a helpful coding assistant. Always respond with working code examples.
TEMP
0.7
Playground
Sort an array
arr.sort((a, b) => a - b);
system

System Prompt Panel

A playground-style interface with an editable system prompt sidebar and temperature controls. Used in OpenAI Playground, Anthropic Console, and developer testing tools.

System PromptPlaygroundTemperatureDeveloper
Knowledge Base AI
What's our refund policy?
📄 SOURCES: refund-policy.md, faq.md
Based on your documentation, refunds are available within 30 days of purchase for unused licenses. Contact [email protected] to initiate.
rag

RAG / Retrieval Chat

Retrieval-Augmented Generation — the AI retrieves context from a knowledge base before answering. Responses include source citations linking back to the original documents.

RAGRetrievalCitationsKnowledge Base