Feature/semantic similarity (#36)
* fix: mixed up migrations * feat: semantic similarity first take * feat: semantic similarity first round of fixes * feat: more work on making semantic similarity work properly * feat: getPostBySlug for the AI * feat: show similarity in post-link-insert-modal * chore: remove done doc --------- Co-authored-by: hugo <hugoms@me.com>
This commit is contained in:
@@ -1295,6 +1295,26 @@ describe('main bootstrap preview behavior', () => {
|
||||
}; }),
|
||||
}));
|
||||
|
||||
vi.doMock('../../src/main/engine/EmbeddingEngine', () => ({
|
||||
EmbeddingEngine: vi.fn().mockImplementation(function() { return {
|
||||
setProjectContext: vi.fn().mockResolvedValue(undefined),
|
||||
initialize: vi.fn().mockResolvedValue(undefined),
|
||||
shutdown: vi.fn().mockResolvedValue(undefined),
|
||||
indexUnindexedPosts: vi.fn().mockResolvedValue(undefined),
|
||||
}; }),
|
||||
}));
|
||||
|
||||
vi.doMock('../../src/main/engine/BlogmarkTransformService', () => ({
|
||||
BlogmarkTransformService: vi.fn().mockImplementation(function() { return {
|
||||
applyTransforms: vi.fn(async (input: { post: { title: string; content: string; categories: string[]; tags: string[] } }) => ({
|
||||
post: input.post,
|
||||
appliedScriptIds: [],
|
||||
errors: [],
|
||||
toasts: [],
|
||||
})),
|
||||
}; }),
|
||||
}));
|
||||
|
||||
await import('../../src/main/main');
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user