We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1ec087 commit 551f0d8Copy full SHA for 551f0d8
lib/strategies/prune-tool.ts
@@ -72,8 +72,7 @@ export function createPruneTool(
72
const toolIdList: string[] = buildToolIdList(messages)
73
74
// Validate that all numeric IDs are within bounds
75
- const invalidIds = numericToolIds.filter(id => id < 0 || id >= toolIdList.length)
76
- if (invalidIds.length > 0) {
+ if (numericToolIds.some(id => id < 0 || id >= toolIdList.length)) {
77
return "Invalid IDs provided. Only use numeric IDs from the <prunable-tools> list."
78
}
79
0 commit comments