(
Welcome to the assistant
{suggestionView}
{input}
)}
/>
);
}
```
### Overriding the Chat View Slot
```tsx
function App() {
return (
);
}
```
## Behavior
- **Agent wiring**: On mount, `CopilotChat` calls `useAgent` with the provided `agentId` and binds the agent's `messages`, `isRunning`, and suggestion state to `CopilotChatView`.
- **Initial run**: If the agent has not been run yet, `CopilotChat` triggers `runAgent` automatically so the agent can send an initial greeting or set up state.
- **Auto-clear input**: After a message is submitted, the input field is cleared automatically.
- **Configuration context**: Wraps children in `CopilotChatConfigurationProvider`, making `labels`, `agentId`, `threadId`, and modal state available to all descendant components via `useCopilotChatConfiguration`.
- **Suggestion management**: Subscribes to the agent's suggestion system and passes suggestions, loading states, and selection callbacks down to `CopilotChatView`.
## Related
- [`CopilotChatView`](/reference/components/CopilotChatView) -- the layout component used internally
- [`CopilotPopup`](/reference/components/CopilotPopup) -- popup variant of `CopilotChat`
- [`CopilotSidebar`](/reference/components/CopilotSidebar) -- sidebar variant of `CopilotChat`
- [`useAgent`](/reference/hooks/useAgent) -- hook used internally to access the agent