feat: more work on mcp server integration

This commit is contained in:
2026-02-28 12:36:13 +01:00
parent e71e478776
commit 6c22e69805
36 changed files with 1420 additions and 635 deletions

View File

@@ -59,7 +59,7 @@ function makeEngine(posts: PostData[], snapshotsById: Record<string, PostData |
}
if (filter.month !== undefined && filter.year !== undefined) {
result = result.filter((post) => post.createdAt.getMonth() === filter.month);
result = result.filter((post) => post.createdAt.getMonth() === filter.month - 1);
}
if (filter.startDate) {
@@ -110,7 +110,7 @@ describe('SharedSnapshotService', () => {
engine,
'my-post',
{ useDraftContent: true, draftPostId: 'draft-1' },
{ year: 2025, month: 2, day: 21 },
{ year: 2025, month: 3, day: 21 },
);
expect(result?.id).toBe('draft-1');
@@ -125,7 +125,7 @@ describe('SharedSnapshotService', () => {
findPublishedBySlug,
};
const result = await findSinglePostBySlug(engineWithShortcut, 'shortcut', undefined, { year: 2025, month: 0, day: 2 });
const result = await findSinglePostBySlug(engineWithShortcut, 'shortcut', undefined, { year: 2025, month: 1, day: 2 });
expect(result?.id).toBe('x1');
expect(findPublishedBySlug).toHaveBeenCalled();