File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed
Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change 11import { PluginConfig } from "../config"
22import { Logger } from "../logger"
33import 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-
9278function createToolSignature ( tool : string , parameters ?: any ) : string {
9379 if ( ! parameters ) {
9480 return tool
You can’t perform that action at this time.
0 commit comments