AI Prompt Input

Input components and interaction patterns for users to provide instructions, queries, and context to AI features.

Input Component Anatomy

[Insert annotated anatomy diagram: input field, send button, context area, character count, suggestions dropdown]

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.

[Insert single-line prompt input example]

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.

[Insert multi-line prompt input example]

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.

[Insert contextual prompt input with pre-filled context]

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.

[Insert auto-suggestion dropdown example]

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.

[Insert context chips example: selected filters, entities, parameters]

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