Interface: ThreadSidebarProps
Props for ThreadSidebar.
Properties
Section titled “Properties”activeThreadId?
Section titled “activeThreadId?”
optionalactiveThreadId?:string
Id of the active thread, rendered highlighted.
className?
Section titled “className?”
optionalclassName?:string
Extra classes merged onto the sidebar root.
isLoading?
Section titled “isLoading?”
optionalisLoading?:boolean
True while the initial list loads (shows a spinner in place of the list).
onCancel?
Section titled “onCancel?”
optionalonCancel?: (threadId) =>void
Cancel a thread’s in-flight run. When provided, a streaming row (one in streamingThreadIds) shows a stop button in place of its spinner on hover, so a background run can be cancelled without switching to it.
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
Returns
Section titled “Returns”void
onDelete?
Section titled “onDelete?”
optionalonDelete?: (threadId) =>void
Delete a thread. Per-row trash affordance hidden when omitted.
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
Returns
Section titled “Returns”void
onHide?
Section titled “onHide?”
optionalonHide?: () =>void
Collapse the sidebar. Renders the hide button in the header when provided.
Returns
Section titled “Returns”void
onNew?
Section titled “onNew?”
optionalonNew?: () =>void
Start a fresh conversation. Hidden when omitted.
Returns
Section titled “Returns”void
onRename?
Section titled “onRename?”
optionalonRename?: (threadId,title) =>void
Rename a thread. Per-row edit affordance (inline text field) hidden when omitted.
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
string
Returns
Section titled “Returns”void
onSelect
Section titled “onSelect”onSelect: (
threadId) =>void
Switch to a thread.
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
Returns
Section titled “Returns”void
optionalside?:"left"|"right"
Edge the sidebar is docked to. Only affects framing - which side carries
the divider, and which way the collapse icon points. Defaults to left.
streamingThreadIds?
Section titled “streamingThreadIds?”
optionalstreamingThreadIds?:string[]
Thread ids with a generation still in flight in the background.
threads
Section titled “threads”threads:
ThreadSummary[]
Threads to list, newest first.