ChatSidenavSectionsProps

Unpublished development API. This package is under development and is not available as a published release.

Supplies the conversations, archived conversations and projects a sidebar shows, with their selection callbacks and row actions.

import type { ChatSidenavSectionsProps } from '@threadplane/react/chat';

Declaration

export interface ChatSidenavSectionsProps  {
  readonly activeThreadId?: string | null;
  readonly archivedEmptyLabel?: string;
  readonly archivedLabel?: string;
  readonly archivedThreads?: readonly ThreadListItem[] | null;
  readonly children?: ReactNode;
  readonly className?: string;
  readonly newChatLabel?: string;
  readonly now?: number;
  readonly onNewChat?: () => void;
  readonly onProjectSelect?: (projectId: string) => void;
  readonly onThreadSelect?: (threadId: string) => void;
  readonly projectActions?: ProjectActionAdapter | null;
  readonly projects?: readonly ProjectListItem[] | null;
  readonly projectsLabel?: string;
  readonly recentLabel?: string;
  readonly selectedProjectId?: string | null;
  readonly threadActions?: ThreadActionAdapter | null;
  readonly threads?: readonly ThreadListItem[] | null;
}

Members

activeThreadId

readonly activeThreadId?: string | null;

archivedEmptyLabel

readonly archivedEmptyLabel?: string;

archivedLabel

readonly archivedLabel?: string;

archivedThreads

Archived conversations in a collapsed "Archived" section. Null or absent omits it.

readonly archivedThreads?: readonly ThreadListItem[] | null;

children

App-owned content after the built-in sections.

readonly children?: ReactNode;

className

readonly className?: string;

newChatLabel

readonly newChatLabel?: string;

now

The reference time for relative update times; see ThreadListProps.now.

readonly now?: number;

onNewChat

Starts a new conversation; adds the "New chat" button.

readonly onNewChat?: () => void;

onProjectSelect

readonly onProjectSelect?: (projectId: string) => void;

onThreadSelect

Required for conversations to be selectable.

readonly onThreadSelect?: (threadId: string) => void;

projectActions

Row actions for projects; create adds "+ New project". See ProjectListProps.actions.

readonly projectActions?: ProjectActionAdapter | null;

projects

Projects, listed under "Projects" and offered as move destinations. Null or absent omits the section.

readonly projects?: readonly ProjectListItem[] | null;

projectsLabel

readonly projectsLabel?: string;

recentLabel

readonly recentLabel?: string;

selectedProjectId

readonly selectedProjectId?: string | null;

threadActions

Row actions for both conversation lists; see ThreadListProps.actions.

readonly threadActions?: ThreadActionAdapter | null;

threads

Active conversations, listed under "Recent". Null or absent omits the section.

readonly threads?: readonly ThreadListItem[] | null;