# Connected Apps Chat block

> AI chat welcome screen where connected work apps set the answer scope

A centered new chat screen whose composer sits in a ReUI Frame: the panel is the box you type into and the frame footer is a live integrations strip of Google Drive, Slack, Calendar, Dropbox, OneDrive, Box, Zoom and Loom. Switching a logo on or off changes what the assistant may read, four job modes rewrite the prompt, and sending returns a receipt per source with a Connect action on anything that was skipped.

- Type: Pro block
- Category: [AI Chat](https://reui.io/blocks/ai-agents/ai-chat.md)
- Page: https://reui.io/blocks/ai-agents/ai-chat/ai-chat-5
- MCP: `get_block("ai-chat-5")`
- Built with: Attachment, Button, Combobox, Dropdown Menu, Empty, Field, Frame, Input Group, Item, Kbd, Radio Group, Select, Spinner, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://reui.io/docs/license-setup

## Best for

A one run screen where a Combobox in the composer footer scopes 9 apps, then marks each source read or skipped with a Connect button

## Agent notes

- Replace `APPS`, `MODES` and `CONNECTED_AT_START` in data.tsx; `RunPanel` ticks each mode's fixed `steps` on `STEP_MS`, then streams its fixed `answer`
- Connect, the logo remove buttons and the `Combobox` only call `handleToggleApp` to edit `connected`; no OAuth or integration API is called
- Attach stages entries from the fixed `COMPOSER_FILES`, and `handleSend` keeps only a prompt and the mode, so `modelId` never reaches `RunPanel`

## When not to use

- Scoping answers to individual files on the ask box rather than whole apps: use [Structured Answers](https://reui.io/blocks/ai-agents/ai-chat/ai-chat-10.md) (`get_block("ai-chat-10")`)
- A standalone prompt box with attach, voice and search tools and no answer area: use [Input Group](https://reui.io/components/input-group.md) (`get_component("input-group")`)

## Install

```bash
npx shadcn@latest add @reui/ai-chat-5
```

## About AI Chat blocks

### When to use

- A full page assistant chat, new chat welcome screen or 2 model comparison inside an AI product
- A copilot docked beside the page it works on, or opened from a launcher in the page corner
- Answers that show the work behind them: sources read, tool steps, plans to approve and run cost

### When not to use

- The product layout around the chat: a sidebar of threads, workspaces and account menus: use the [App Shell blocks](https://reui.io/blocks/application/app-shell.md)
- A plain overlay chat panel opened from a button, with suggestion chips and a composer: use the [Sheet blocks](https://reui.io/blocks/application/sheet.md)
- A highlighted snippet with a filename header and copy button, outside any conversation: use [Code Block](https://reui.io/components/code-block.md) (`get_component("code-block")`)

### Agent notes

- Each `AiChat` root sizes itself to the viewport with `h-svh`, or `min-h-svh` in ai-chat-5; give it your layout's height inside an app shell
- Every reply is canned content from the block's data file, played back on `setTimeout` and `setInterval` timers; stream your model's output there instead

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
