feat: add agent API and operational analytics
This commit is contained in:
1 parent
720ea0652a
commit
e8b730b592
65 files changed
+2650
-1214
No files matched your search
@@ -194,7 +194,7 @@ describe('ResponseCheckerService', () => {
|
||||
expect(successfulMessagesRepo.insert).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('stores successful messages for learning', async () => {
|
||||
it('does not treat a single inbox reply as an engaged learning example', async () => {
|
||||
const post: ProcessedPostRecord = {
|
||||
id: 'post1',
|
||||
subreddit: 'gonewild',
|
||||
@@ -245,13 +245,8 @@ describe('ResponseCheckerService', () => {
|
||||
});
|
||||
|
||||
await checker.checkForResponses();
|
||||
expect(successfulMessagesRepo.insert).toHaveBeenCalled();
|
||||
|
||||
const insertCall = vi.mocked(successfulMessagesRepo.insert).mock.calls[0][0];
|
||||
expect(insertCall.originalMessage).toBe('Hey gorgeous!');
|
||||
expect(insertCall.imageAnalysis).toBe('Beautiful woman');
|
||||
expect(insertCall.postTitle).toBe('My selfie');
|
||||
expect(insertCall.subreddit).toBe('gonewild');
|
||||
expect(messagesRepo.markGotResponse).toHaveBeenCalledWith(1);
|
||||
expect(successfulMessagesRepo.insert).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('does not turn a declined reply into a learning example', async () => {
|
||||
|
||||
Reference in new issue
Block a user