chore: remove user store

This commit is contained in:
Steven
2023-03-19 23:40:06 +08:00
parent d11648f2bb
commit d2427f4e5f
6 changed files with 19 additions and 36 deletions

View File

@ -1,4 +1,4 @@
import { User, UserRole } from "../types";
import { Id, User, UserRole } from "../types";
// Assistant is a special user.
export const assistantList: User[] = [
@ -11,6 +11,11 @@ export const assistantList: User[] = [
},
];
export const getAssistantById = (id: Id) => {
const user = assistantList.find((user) => user.id === id);
return user || undefined;
};
// getPromptOfAssistant define the special prompt for each assistant.
export const getPromptOfAssistant = (assistant: User) => {
if (assistant.id === "assistant-dba") {