Skip to content

Commit f245a02

Browse files
committed
Fix: context pruner tool params
1 parent 2418661 commit f245a02

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

agents/context-pruner.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ const definition: AgentDefinition = {
176176
return path ? `Listed dir: ${path}` : 'Listed directory'
177177
}
178178
case 'find_files': {
179-
const pattern = input.pattern as string | undefined
180-
return pattern ? `Find files: "${pattern}"` : 'Find files'
179+
const prompt = input.prompt as string | undefined
180+
return prompt ? `Find files: "${prompt}"` : 'Find files'
181181
}
182182
case 'run_terminal_command': {
183183
const command = input.command as string | undefined
@@ -289,8 +289,12 @@ const definition: AgentDefinition = {
289289
return query ? `Web search: "${query}"` : 'Web search'
290290
}
291291
case 'read_docs': {
292-
const query = input.query as string | undefined
293-
return query ? `Read docs: "${query}"` : 'Read docs'
292+
const libraryTitle = input.libraryTitle as string | undefined
293+
const topic = input.topic as string | undefined
294+
if (libraryTitle && topic) {
295+
return `Read docs: ${libraryTitle} - ${topic}`
296+
}
297+
return libraryTitle ? `Read docs: ${libraryTitle}` : 'Read docs'
294298
}
295299
case 'set_output':
296300
return 'Set output'

0 commit comments

Comments
 (0)