UNPKG

@assistant-ui/react

Version:

React components for AI chat.

43 lines 1.67 kB
import type { Unsubscribe } from "../../types"; import { ThreadListMetadata, ThreadListRuntimeCore } from "../core/ThreadListRuntimeCore"; import { ExportedMessageRepository } from "../utils/MessageRepository"; import { LocalThreadRuntimeCore } from "./LocalThreadRuntimeCore"; export type LocalThreadData = { data: ExportedMessageRepository; metadata: ThreadListMetadata; isArchived: boolean; }; export type LocalThreadFactory = (threadId: string, data: ExportedMessageRepository) => LocalThreadRuntimeCore; export declare class LocalThreadListRuntimeCore implements ThreadListRuntimeCore { private _threadFactory; private _threadData; private _threads; private _archivedThreads; get threads(): readonly Readonly<{ threadId: string; title?: string; }>[]; get archivedThreads(): readonly Readonly<{ threadId: string; title?: string; }>[]; private _mainThread; get mainThread(): LocalThreadRuntimeCore; constructor(_threadFactory: LocalThreadFactory); getThreadMetadataById(threadId: string): Readonly<{ threadId: string; title?: string; }> | undefined; switchToThread(threadId: string): void; switchToNewThread(): void; private _performThreadSwitch; private _performMoveOp; rename(threadId: string, newTitle: string): Promise<void>; archive(threadId: string): Promise<void>; unarchive(threadId: string): Promise<void>; delete(threadId: string): Promise<void>; private _subscriptions; subscribe(callback: () => void): Unsubscribe; private _notifySubscribers; } //# sourceMappingURL=LocalThreadListRuntimeCore.d.ts.map