@assistant-ui/react
Version:
TypeScript/React library for AI Chat
87 lines • 2.39 kB
JavaScript
import { BaseSubscribable } from "../remote-thread-list/BaseSubscribable.js";
const EMPTY_ARRAY = Object.freeze([]);
const DEFAULT_THREAD_ID = "__DEFAULT_ID__";
const DEFAULT_THREAD_DATA = Object.freeze({
[DEFAULT_THREAD_ID]: {
id: DEFAULT_THREAD_ID,
remoteId: undefined,
externalId: undefined,
status: "regular",
title: undefined,
},
});
export class LocalThreadListRuntimeCore extends BaseSubscribable {
_mainThread;
constructor(_threadFactory) {
super();
this._mainThread = _threadFactory();
}
get isLoading() {
return false;
}
getMainThreadRuntimeCore() {
return this._mainThread;
}
get newThreadId() {
throw new Error("Method not implemented.");
}
get threadIds() {
throw EMPTY_ARRAY;
}
get archivedThreadIds() {
throw EMPTY_ARRAY;
}
get mainThreadId() {
return DEFAULT_THREAD_ID;
}
get threadData() {
return DEFAULT_THREAD_DATA;
}
getThreadRuntimeCore() {
throw new Error("Method not implemented.");
}
getLoadThreadsPromise() {
throw new Error("Method not implemented.");
}
getItemById(threadId) {
if (threadId === this.mainThreadId) {
return {
status: "regular",
id: this.mainThreadId,
remoteId: this.mainThreadId,
externalId: undefined,
title: undefined,
isMain: true,
};
}
throw new Error("Method not implemented");
}
async switchToThread() {
throw new Error("Method not implemented.");
}
switchToNewThread() {
throw new Error("Method not implemented.");
}
rename() {
throw new Error("Method not implemented.");
}
archive() {
throw new Error("Method not implemented.");
}
detach() {
throw new Error("Method not implemented.");
}
unarchive() {
throw new Error("Method not implemented.");
}
delete() {
throw new Error("Method not implemented.");
}
initialize(threadId) {
return Promise.resolve({ remoteId: threadId, externalId: undefined });
}
generateTitle() {
throw new Error("Method not implemented.");
}
}
//# sourceMappingURL=LocalThreadListRuntimeCore.js.map