<!-- source-hash: c87e4b417e41397ff1753b0ea0848f78 -->
Portable, lib-safe port of the hub's `<GlobalAskAI>` chat panel component, decoupled from all hub-only imports by routing navigation, identity, and transport decisions through a `useRequiredChatRuntime()` context hook.

## Key Components

| Export | Type | Description |
|--------|------|-------------|
| `EmbeddableChat` | Component | Main embeddable chat panel with controlled/uncontrolled open state |
| `EmbeddableChatProps` | Interface | Full prop surface for the component |
| `dispatchSlashCommandAction` | Function | Maps slash-command action IDs (`browse`, `search`, `find`, `display`) to `ChatInputRef` mutations |
| `resolveChipIcon` | Function | Resolves a `ChatSource` to a Lucide icon via the icon registry |
| `SKELETON_ROW_VARIANTS` | Constant | Deterministic width palette for loading skeleton rows |
| `FALLBACK_TOP_RETRIEVED` | Constant | Number of fallback source chips shown when the model cites no sources (default: `3`) |

## Usage Example

```typescript
// Host wires the runtime once at root
<HubRuntimeProvider source="hub" user={currentUser}>
  <EmbeddableChat
    emptyStateGreeting="How can I help you today?"
    suggestedQueries={['How do I reset a password?', 'Show open tickets']}
    enabledRagTableIds={enabledTableIds}
    modes={{
      guide: { tableIdForDocumentType },
      mingo: { agentId: 'mingo-agent' },
    }}
    defaultActiveMode="guide"
    extras={{ buildProgramProps, buildProductReleaseProps }}
  />
</HubRuntimeProvider>

// Controlled open state
<EmbeddableChat
  open={isOpen}
  onOpenChange={setIsOpen}
  showInternalTrigger={false}
/>
```

## Runtime Substitutions

| Hub Original | Lib Replacement |
|---|---|
| `useAuth()` | `useRequiredChatRuntime().user` |
| `currentPlatform()` | `useRequiredChatRuntime().source` |
| `useNavLink` / `NavLinkAnchor` | `handleChatNavClick` + `NavLinkAnchorViaRuntime` |
| `useDocChat(source)` | `useSseChatAdapter()` (source from runtime) |