Skip to content

Commit 9a45c98

Browse files
Merge branch 'dev' into fix-compacted-filter
2 parents 8a95101 + 9b23955 commit 9a45c98

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

lib/strategies/deduplication.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { PluginConfig } from "../config"
22
import { Logger } from "../logger"
33
import type { SessionState, WithParts } from "../state"
4-
import { calculateTokensSaved } from "../utils"
4+
import { buildToolIdList, calculateTokensSaved } from "../utils"
55

66
/**
77
* Deduplication strategy - prunes older tool calls that have identical
@@ -75,20 +75,6 @@ export const deduplicate = (
7575
}
7676
}
7777

78-
function buildToolIdList(messages: WithParts[]): string[] {
79-
const toolIds: string[] = []
80-
for (const msg of messages) {
81-
if (msg.parts) {
82-
for (const part of msg.parts) {
83-
if (part.type === 'tool' && part.callID && part.tool) {
84-
toolIds.push(part.callID)
85-
}
86-
}
87-
}
88-
}
89-
return toolIds
90-
}
91-
9278
function createToolSignature(tool: string, parameters?: any): string {
9379
if (!parameters) {
9480
return tool

0 commit comments

Comments
 (0)