Skip to content

Commit

Permalink
patch notio (#3185)
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu authored Jan 12, 2024
1 parent 8c0d171 commit 8807e91
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions connectors/src/connectors/notion/temporal/activities.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { CoreAPIDataSourceDocumentSection, ModelId } from "@dust-tt/types";
import {
CoreAPIDataSourceDocumentSection,
ModelId,
sectionFullText,
} from "@dust-tt/types";
import { isFullBlock, isFullPage, isNotionClientError } from "@notionhq/client";
import { Context } from "@temporalio/activity";
import { Op } from "sequelize";
Expand Down Expand Up @@ -1733,13 +1737,19 @@ export async function renderAndUpsertPageFromCache({
runTimestamp.toString()
);

const contentFlat = sectionFullText(renderedPageSection);

const content = renderDocumentTitleAndContent({
title: title ?? null,
createdAt: createdAt,
updatedAt: updatedAt,
author,
lastEditor,
content: renderedPageSection,
content: {
prefix: null,
content: contentFlat,
sections: [],
},
});

localLogger.info(
Expand Down

0 comments on commit 8807e91

Please sign in to comment.