Eliminated the two-stage compression system that attempted to preserve original
tool schemas and only simplified when exceeding size limits. The provider now
applies consistent description truncation for all tools without conditional
schema processing or size calculations.
Removed:
- TARGET_TOTAL_SIZE constant and size checking logic
- simplifySchema helper function
- Conditional schema simplification based on total size
This change reduces complexity and ensures uniform handling of tool descriptions
regardless of total payload size.
The code refactors the tool building process in initializeAuth to handle
description truncation and size limits more efficiently. It introduces
per-tool description truncation using a fixed max length, and simplifies
the compression logic by removing the iterative description adjustment
loop. This improves code clarity and performance.
Add comprehensive support for Claude's extended thinking feature in Kiro provider:
- Add thinking block parsing and streaming with proper tag detection
- Implement thinking prefix injection in system prompts with budget validation
- Add bidirectional conversion between Kiro text format and Claude content blocks
- Enhance token estimation with detailed breakdown for thinking, tools, and content types
- Fix streaming to properly handle thinking blocks with start/stop events
- Improve context usage percentage handling and input token calculation
- Add helper functions for quote-aware tag detection to avoid false positives