diff options
| author | Sandy Tao <[email protected]> | 2025-07-23 22:37:28 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-24 05:37:28 +0000 |
| commit | 0ef9c0b792f056015d0eee4486480c1f80015fc5 (patch) | |
| tree | dd07e9c5c241362e0f8c395b3cbcedfe92abd736 /packages/core/src/services/loopDetectionService.test.ts | |
| parent | 6380bfe35c80e71f6a43bc7b549e61561d675a07 (diff) | |
Log prompt id when a loop is detected (#4765)
Co-authored-by: N. Taylor Mullen <[email protected]>
Diffstat (limited to 'packages/core/src/services/loopDetectionService.test.ts')
| -rw-r--r-- | packages/core/src/services/loopDetectionService.test.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/core/src/services/loopDetectionService.test.ts b/packages/core/src/services/loopDetectionService.test.ts index bf3afd32..b2863168 100644 --- a/packages/core/src/services/loopDetectionService.test.ts +++ b/packages/core/src/services/loopDetectionService.test.ts @@ -168,21 +168,21 @@ describe('LoopDetectionService', () => { ); } - service.reset(); + service.reset(''); for (let i = 0; i < CONTENT_LOOP_THRESHOLD + 2; i++) { expect(service.addAndCheck(createContentEvent('obj.method()'))).toBe( false, ); } - service.reset(); + service.reset(''); for (let i = 0; i < CONTENT_LOOP_THRESHOLD + 2; i++) { expect( service.addAndCheck(createContentEvent('arr.filter().map()')), ).toBe(false); } - service.reset(); + service.reset(''); for (let i = 0; i < CONTENT_LOOP_THRESHOLD + 2; i++) { expect( service.addAndCheck( @@ -203,7 +203,7 @@ describe('LoopDetectionService', () => { service.addAndCheck(createContentEvent('This is a sentence.')), ).toBe(true); - service.reset(); + service.reset(''); for (let i = 0; i < CONTENT_LOOP_THRESHOLD - 1; i++) { expect( service.addAndCheck(createContentEvent('Is this a question? ')), @@ -213,7 +213,7 @@ describe('LoopDetectionService', () => { service.addAndCheck(createContentEvent('Is this a question? ')), ).toBe(true); - service.reset(); + service.reset(''); for (let i = 0; i < CONTENT_LOOP_THRESHOLD - 1; i++) { expect( service.addAndCheck(createContentEvent('What excitement!\n')), |
