Skip to content

Commit 1103b96

Browse files
author
Gautam Kumar
committed
fix: correct tautological uppercase check in tool description summarizer
The isToolDocBlockStart function checked normalized === normalized.toUpperCase() but normalized is already uppercased from line 24, making the condition always true. This caused mixed-case lines ending with ':' to be incorrectly detected as doc block starts, truncating tool descriptions unnecessarily. Compare the original line instead to correctly detect all-uppercase headings.
1 parent 257d540 commit 1103b96

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/agents/tool-description-summary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function isToolDocBlockStart(line: string): boolean {
4040
return true;
4141
}
4242
return (
43-
normalized.endsWith(":") && normalized === normalized.toUpperCase() && normalized.length > 12
43+
normalized.endsWith(":") && line.trim() === line.trim().toUpperCase() && normalized.length > 12
4444
);
4545
}
4646

0 commit comments

Comments
 (0)