Skip to content

Commit 50b99d4

Browse files
committed
deduplicate the very first cache point
1 parent d7d3622 commit 50b99d4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

worker/src/agent/index.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,12 @@ Users will primarily request software engineering assistance including bug fixes
161161
const items = [...initialItems, ...appendedItems];
162162
const { totalTokenCount, messages } = await noOpFiltering(items);
163163
secondCachePoint = messages.length - 1;
164-
[firstCachePoint, secondCachePoint].forEach((cp) => {
164+
[...new Set([firstCachePoint, secondCachePoint])].forEach((cp) => {
165165
const message = messages[cp];
166166
if (message?.content) {
167167
message.content = [...message.content, { cachePoint: { type: 'default' } }];
168168
}
169169
});
170-
console.log(JSON.stringify(messages));
171170
firstCachePoint = secondCachePoint;
172171

173172
const res = await pRetry(

0 commit comments

Comments
 (0)