ThreadSidebarProps
Unpublished development API. This package is under development and is not available as a published release.
A thread directory with selection callbacks, feature switches, row slots and labels.
import type { ThreadSidebarProps } from '@threadplane/react/chat';Declaration
export interface ThreadSidebarProps {
readonly activeThreadId?: string | null;
readonly after?: ReactNode;
readonly before?: ReactNode;
readonly className?: string;
readonly directory: ThreadDirectory;
readonly extraActions?: ThreadListProps['extraActions'];
readonly features?: ThreadSidebarFeatures;
readonly labels?: Partial<Record<'newChat' | 'projects' | 'recent' | 'archived' | 'archivedEmpty' | 'loadError' | 'retry' | 'empty', string>>;
readonly onActiveRemoved?: () => void;
readonly onNewChat?: () => void;
readonly onProjectSelect?: (projectId: string | null) => void;
readonly onSelect: (threadId: string) => void;
readonly renderThread?: ThreadListProps['renderItem'];
readonly selectedProjectId?: string | null;
readonly session?: Pick<AgentSession, 'getSnapshot' | 'subscribe'>;
}Members
activeThreadId
readonly activeThreadId?: string | null;after
App content after the built-in sections.
readonly after?: ReactNode;before
App content before the built-in sections.
readonly before?: ReactNode;className
readonly className?: string;directory
App-owned; the sidebar never disposes it.
readonly directory: ThreadDirectory;extraActions
App commands appended to each conversation row menu.
readonly extraActions?: ThreadListProps['extraActions'];features
readonly features?: ThreadSidebarFeatures;labels
readonly labels?: Partial<Record<'newChat' | 'projects' | 'recent' | 'archived' | 'archivedEmpty' | 'loadError' | 'retry' | 'empty', string>>;onActiveRemoved
Called after the active thread is deleted.
readonly onActiveRemoved?: () => void;onNewChat
Replaces the default New chat, which creates a thread and selects it.
readonly onNewChat?: () => void;onProjectSelect
Called with the project the user picked; the app owns selectedProjectId.
readonly onProjectSelect?: (projectId: string | null) => void;onSelect
readonly onSelect: (threadId: string) => void;renderThread
Replaces each conversation row; see ThreadListProps.renderItem.
readonly renderThread?: ThreadListProps['renderItem'];selectedProjectId
When a project id, Recent and Archived list only that project's threads;
null or omitted lists every thread.
readonly selectedProjectId?: string | null;session
Refreshes the directory each time a run ends.
readonly session?: Pick<AgentSession, 'getSnapshot' | 'subscribe'>;