Conversation History

Chat history sidebar list grouped into Pinned, Today, Yesterday, Previous 7 days and Older from a now read after mount, with search, a spring-gliding active highlight, hover or focus row actions to pin, rename in place through InlineEdit and delete with a slide-out exit while neighbours glide up, and new chats that drop in at the top with a streaming title caret.

Preview

Conversation History preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/conversation-history
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

conversations?
Conversation[]
—
defaultConversations?
Conversation[]
[]
onConversationsChange?
((conversations: Conversation[]) => void)
—
activeId?
string | null
—
defaultActiveId?
string | null
null
onActiveIdChange?
((id: string) => void)
—
onRename?
((id: string, title: string) => unknown)

Called after a rename commits; return a promise to keep the editor's spinner until it settles.

—
onPinChange?
((id: string, pinned: boolean) => void)
—
onDelete?
((id: string) => void)
—
onNewChat?
(() => void)

Renders the "New chat" button. The parent inserts the conversation (usually `streaming`).

—
now?
Date

Override "today" (otherwise read after mount so server and client markup match).

—
searchable?
boolean
true
labels?
Partial<Record<ConversationGroup, string>>
—
maxHeight?
number

Max height of the scrolling list. Default 320.

320
emptyState?
ReactNode
—
className?
string
—

Updated