UNPKG

@assistant-ui/react

Version:

React components for AI chat.

35 lines 1.55 kB
import type { Unsubscribe } from "../../types"; import { ExternalStoreThreadRuntimeCore } from "./ExternalStoreThreadRuntimeCore"; import { ThreadListRuntimeCore } from "../core/ThreadListRuntimeCore"; import { ExternalStoreThreadListAdapter } from "./ExternalStoreAdapter"; export type ExternalStoreThreadFactory = (threadId: string) => ExternalStoreThreadRuntimeCore; export declare class ExternalStoreThreadListRuntimeCore implements ThreadListRuntimeCore { private adapter; private threadFactory; get threads(): readonly Readonly<{ threadId: string; title?: string; }>[]; get archivedThreads(): readonly Readonly<{ threadId: string; title?: string; }>[]; private _mainThread; get mainThread(): ExternalStoreThreadRuntimeCore; constructor(adapter: ExternalStoreThreadListAdapter | undefined, threadFactory: ExternalStoreThreadFactory); getThreadMetadataById(threadId: string): Readonly<{ threadId: string; title?: string; }> | undefined; setAdapter(adapter: ExternalStoreThreadListAdapter): void; switchToThread(threadId: string): void; switchToNewThread(): void; 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=ExternalStoreThreadListRuntimeCore.d.ts.map