# Application AI Assistant: Context Sources Panel

Data access panel listing assistant readable sources with icon, item count, last sync time, and a switch, plus one excluded source.

- Page: https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/context-sources-panel
- Collection: [Application](https://www.shadcn-ui-blocks.com/blocks/application-pro), Standard tier
- Group: [AI Assistant](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant)
- Created: 2026-07-04
- Preview image: https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/context-sources-panel.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/application-pro-ai-assistant-context-sources-panel
```

Needs an API key from a Pro or Team plan: add `@shadcn-ui-blocks` to the registries in components.json with the key as an `Authorization: Bearer` header. Setup: https://www.shadcn-ui-blocks.com/docs/shadcn-cli. The MCP server installs it without the setup: https://www.shadcn-ui-blocks.com/docs/mcp.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: badge, switch
- Installs to: `@/components/blocks/application-pro/ai-assistant/context-sources-panel`

## About this block

Context Sources Panel is the access control surface for the
data an assistant may read. Four ruled rows list workspace
docs, CRM records, support tickets, and code repositories,
each with a source icon, its indexed item count, a last sync
line, and a switch. Three sources are on and freshly synced;
the code repositories row is switched off, tagged with an
Excluded badge, and its index was removed on Jun 28. The
footer is plain about consequence: turning a source off
deletes its index within minutes, the assistant never reads
a source that is off, and answers will say when a question
needs one you have excluded.

Sources is one typed array; the excluded flag renders the
badge and the enabled flag sets the switch default. Pairing
the toggle with a live item count and sync time is what
makes the access decision concrete instead of abstract.

## When to use

Reach for this block in an assistant settings pane or in a
workspace admin area where an owner controls retrieval scope.
Wire each switch to your indexing service so flipping a
source off actually drops it from retrieval, not just the UI.

A natural flow around it on an Application Pro page:

**Before**

- [Model picker card](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant)

**After**

- [Integrations directory](https://www.shadcn-ui-blocks.com/blocks/application-pro/integrations)
- [Settings page](https://www.shadcn-ui-blocks.com/blocks/application-pro/settings-pages)

## What you can display

One strong use is the assistant retrieval scope control.
Other source-toggle shapes:

- **Connected apps.** Third-party integrations with a sync
  status and a per-app read toggle.
- **Knowledge base sections.** Doc spaces the assistant may
  cite, each with a document count.
- **Data residency view.** Sources grouped by region with a
  compliance badge on restricted rows.

> Tip: state what happens to the index when a source is off
> so users trust the toggle means what it says.

## More in Application AI Assistant

- [Action Approval Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/action-approval-card)
- [Agent Run Trace](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/agent-run-trace)
- [Ai Usage Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/ai-usage-card)
- [Assistant Chat Panel](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/assistant-chat-panel)
- [Assistant Empty State](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/assistant-empty-state)
- [Citations Panel](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/citations-panel)
- [Conversation History List](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/conversation-history-list)
- [Feedback Thumbs Row](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/feedback-thumbs-row)
- [Guardrails Panel](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/guardrails-panel)
- [Inline Suggestion Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/inline-suggestion-card)
- [Memory Panel](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/memory-panel)
- [Model Picker Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/model-picker-card)
- [Prompt Composer](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/prompt-composer)
- [Prompt Library Grid](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/prompt-library-grid)
- [Response Compare](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/response-compare)
- [Scheduled Agents List](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/scheduled-agents-list)
- [Thread Summary Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/ai-assistant/thread-summary-card)
