AI Prompt Input
Input components and interaction patterns for users to provide instructions, queries, and context to AI features.
Input Component Anatomy
The prompt input component consists of several key parts: the text input field where users type their query, a send button to submit the prompt, a context area displaying attached references, a character count indicator, and an optional suggestions dropdown that appears as the user types.
Prompt Field Variants
Single-line
Use the single-line variant for quick, simple queries where the expected input is short. This variant is ideal for search-like interactions, inline commands, and brief instructions.
Multi-line
Use the multi-line variant when users need to provide detailed instructions, longer context, or multi-step prompts. The field auto-expands as the user types and supports line breaks.
Contextual
The contextual variant pre-fills part of the prompt with relevant context from the current view, such as a selected record, active filters, or page state. Users can edit the pre-filled context before submitting.
Auto-suggestions
The auto-suggestion dropdown appears beneath the input field as the user types, offering relevant prompt completions, recently used prompts, and contextually appropriate queries. Users can navigate suggestions with arrow keys and accept with Tab or click.
Context Chips
Context chips attach to the prompt input to provide additional parameters, filters, or entity references that scope the AI query. They use the existing Chip component and can be added manually or auto-populated based on the current view context. Each chip is removable and editable.
Character & Token Limits
| Limit Type | Value | Visual Indicator | Behavior at Limit |
|---|---|---|---|
| Character limit | 2,000 characters | Counter turns red at 90% | Input is blocked; user is notified |
| Token limit | 500 tokens | Token estimate shown below input | Warning displayed; submit still allowed |
| Context window | 4,096 tokens (prompt + context) | Progress bar in context area | Oldest context chips are trimmed automatically |
Keyboard Shortcuts
| Key | Action |
|---|---|
| Enter | Submit prompt |
| Shift+Enter | New line |
| Escape | Clear input |
| Up Arrow | Previous prompt |
| Tab | Accept suggestion |