Add commenter targeting mode

This commit is contained in:
Jamie Brunton committed 2026-08-14 08:51:27 +01:00
1 parent 0dfdda61fd
commit e9a4c965ee
23 files changed
+374 -10

No files matched your search

+21
View File
@@ -99,6 +99,27 @@ describe('ProcessorService', () => {
expect(result.scripted).toBe(false);
});
it('passes a commenter-specific context without treating the source image as theirs', async () => {
await processor.processPost({
...mockPost,
id: 't1_comment',
author: 'commenter',
targetComment: {
body: "I'd love that to be done to me",
permalink: '/r/test/comments/abc/test/comment/',
sourcePostId: 't3_test',
sourcePostAuthor: 'testuser',
expressedGender: 'unknown',
confidence: 0.95,
},
});
expect(aiClient.generateMessage).toHaveBeenCalledWith(
'Beautiful woman', 'Test Post', 'commenter', [], undefined, null, undefined, undefined, [],
expect.stringContaining("I'd love that to be done to me"),
);
});
it('returns null when no image URL', async () => {
redditApi = createMockRedditApi(null);
const config = getTestConfig();