Skip to main content

Architecture

The frontend uses the Vercel AI SDK’s useChat hook. API routes proxy requests to Terminal Use and stream responses back.

Setup

Creating Tasks

Sending Messages

Loading Message History

When resuming an existing task, fetch and display previous messages.

Handling Message Parts

The following is a sample implementation. See the Vercel AI SDK documentation for more details on displaying UIMessage parts.

Environment Variables