mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-10 08:48:29 +00:00
* feat: space v3 * feat: connected space creation * fix: * fix: session_id for memory ingestion * chore: simplify gitignore patterns for agent directories --------- Co-authored-by: Manoj <saimanoj58@gmail.com>
31 lines
625 B
TypeScript
31 lines
625 B
TypeScript
import { prisma } from "./prisma";
|
|
|
|
export const getSpace = async (spaceId: string) => {
|
|
const space = await prisma.space.findFirst({
|
|
where: {
|
|
id: spaceId,
|
|
},
|
|
});
|
|
|
|
return space;
|
|
};
|
|
|
|
export const updateSpace = async (summaryData: {
|
|
spaceId: string;
|
|
summary: string;
|
|
themes: string[];
|
|
contextCount: number;
|
|
}) => {
|
|
return await prisma.space.update({
|
|
where: {
|
|
id: summaryData.spaceId,
|
|
},
|
|
data: {
|
|
summary: summaryData.summary,
|
|
themes: summaryData.themes,
|
|
contextCount: summaryData.contextCount,
|
|
summaryGeneratedAt: new Date().toISOString(),
|
|
},
|
|
});
|
|
};
|