import { ChatAgentService, ChatService, ChatSessionMetadata } from '@theia/ai-chat'; import { Event } from '@theia/core'; import { HoverService } from '@theia/core/lib/browser'; import { MarkdownRenderer } from '@theia/core/lib/browser/markdown-rendering/markdown-renderer'; import * as React from '@theia/core/shared/react'; import { ChatSessionItemAction } from './chat-session-item-action-contribution'; /** Minimal view of the unread state that React components can subscribe to. */ export interface UnreadStateProvider { isUnread(sessionId: string): boolean; readonly onUnreadChanged: Event; } export interface ChatSessionItemProps { session: ChatSessionMetadata; /** Whether the session is restored from disk (true) or actively loaded in the chat service (false). */ isRestored: boolean; chatService: ChatService; chatAgentService: ChatAgentService; hoverService: HoverService; markdownRenderer: MarkdownRenderer; unreadState: UnreadStateProvider; onClick: () => void; /** Actions shown in the item's action bar on hover/focus, already filtered and sorted. */ actions?: ChatSessionItemAction[]; /** Invoked when an action is triggered, with the action and this item's session. */ onAction?: (action: ChatSessionItemAction, session: ChatSessionMetadata) => void; /** * Whether this session has child sessions. The children themselves are rendered separately by * the parent list; this only drives the expand/collapse toggle. */ hasChildSessions?: boolean; /** Whether this item is a child of a parent session. */ isChildSession?: boolean; /** Depth level for indentation. */ depth?: number; /** Whether the parent session is expanded. */ isExpanded?: boolean; /** Whether any descendant session needs user action; shows a warning badge on this row. */ descendantNeedsAttention?: boolean; /** Called when the user toggles the expand/collapse state. */ onToggleExpand?: () => void; } export interface ChatSessionItemComponentProps extends ChatSessionItemProps { formatTimeAgo: (date: number) => string; } export declare function ChatSessionItem(props: ChatSessionItemComponentProps): React.ReactElement; //# sourceMappingURL=chat-session-item.d.ts.map