Eidetic

AI Thread Options

AI
Settings
Block

Thread management component for controlling conversation context. Switch between continuing, starting fresh, or branching threads.

Card Variant

Full card with mode selection, threads, and context usage

Thread Options

Active: Code review discussion

Context window usage65% of 128k tokens

Inline Variant

Compact mode selector

Thread:

Popover Variant

Dropdown-style panel

Thread Mode
Context usage82% of 128k

Props

Component API reference

PropTypeDefaultDescription
mode*'continue' | 'fresh' | 'branch'Current thread mode
threadsThreadInfo[]Available threads
activeThreadIdstringCurrently active thread ID
variant'card' | 'inline' | 'popover''card'Display variant
onModeChange(mode: ThreadMode) => voidCallback when mode changes
onThreadSelect(threadId: string) => voidCallback when thread selected
onNewThread() => voidCallback for creating new thread
contextUsagenumberCurrent context usage (0-100)
maxContextnumberMax context length in k tokens

Usage

Import and examples

import { AIThreadOptions } from '@/blocks/ai-tools/ai-thread-options'
const [mode, setMode] = useState<ThreadMode>('continue')
<AIThreadOptions
mode={mode}
onModeChange={setMode}
threads={threads}
contextUsage={65}
maxContext={128}
onNewThread={() => createThread()}
/>

Built With

2 components

This block uses the following UI components from the design system:

Features

Built-in functionality

  • Three modes: Continue, fresh start, and branch thread modes
  • Context usage: Visual context window usage indicator with color coding
  • Thread management: Pin, archive, and delete threads
  • Active state: Highlights the currently active thread
  • Dark mode: Full dark mode support

Accessibility

Accessibility considerations

ARIA Attributes

Mode buttons are focusableThread list navigable via keyboard

Keyboard Navigation

KeyAction
TabNavigate between modes and threads
Enter / SpaceSelect mode or thread

Notes

  • Context usage percentage announced as text
  • Mode descriptions visible for clarity