@assistant-ui/react
Version:
React components for AI chat.
20 lines • 817 B
TypeScript
import { Unsubscribe } from "../../types";
import { ThreadRuntimeCore } from "./ThreadRuntimeCore";
export type ThreadListMetadata = Readonly<{
threadId: string;
title?: string;
}>;
export type ThreadListRuntimeCore = {
mainThread: ThreadRuntimeCore;
threads: readonly ThreadListMetadata[];
archivedThreads: readonly ThreadListMetadata[];
getThreadMetadataById(threadId: string): ThreadListMetadata | undefined;
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>;
subscribe(callback: () => void): Unsubscribe;
};
//# sourceMappingURL=ThreadListRuntimeCore.d.ts.map