mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-22 11:18:32 +00:00
Fix: incremental space summary
This commit is contained in:
parent
ba53605572
commit
be64630819
@ -292,7 +292,7 @@ async function generateSpaceSummary(
|
|||||||
spaceId: space.uuid,
|
spaceId: space.uuid,
|
||||||
spaceName: space.name,
|
spaceName: space.name,
|
||||||
spaceDescription: space.description as string,
|
spaceDescription: space.description as string,
|
||||||
statementCount: statements.length,
|
statementCount: existingSummary?.statementCount ? existingSummary?.statementCount + statements.length : statements.length,
|
||||||
summary: summaryResult.summary,
|
summary: summaryResult.summary,
|
||||||
keyEntities: summaryResult.keyEntities || [],
|
keyEntities: summaryResult.keyEntities || [],
|
||||||
themes: summaryResult.themes,
|
themes: summaryResult.themes,
|
||||||
@ -485,6 +485,7 @@ async function getExistingSummary(spaceId: string): Promise<{
|
|||||||
summary: string;
|
summary: string;
|
||||||
themes: string[];
|
themes: string[];
|
||||||
lastUpdated: Date;
|
lastUpdated: Date;
|
||||||
|
statementCount: number;
|
||||||
} | null> {
|
} | null> {
|
||||||
try {
|
try {
|
||||||
const existingSummary = await getSpace(spaceId);
|
const existingSummary = await getSpace(spaceId);
|
||||||
@ -493,7 +494,8 @@ async function getExistingSummary(spaceId: string): Promise<{
|
|||||||
return {
|
return {
|
||||||
summary: existingSummary.summary,
|
summary: existingSummary.summary,
|
||||||
themes: existingSummary.themes,
|
themes: existingSummary.themes,
|
||||||
lastUpdated: existingSummary.updatedAt,
|
lastUpdated: existingSummary.lastPatternTrigger,
|
||||||
|
statementCount: existingSummary.statementCount,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user