- Replace ConsolePatcher with centralized debugLogger utility
- Refactor errorReporting to use debugLogger instead of file-based reporting
- Remove user-facing console message components:
- Delete ConsolePatcher.ts, useConsoleMessages.ts/hook
- Delete ConsoleSummaryDisplay.tsx, DetailedMessagesDisplay.tsx
- Update all tests in packages/core and packages/cli:
- Mock debugLogger where needed
- Remove assertions for console output on non-critical errors
- Keep debugLogger assertions for fatal/network errors
- Use HOME directory mocking for hermetic file system tests
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Fix contextWindowSize not updating when switching models via setModel()
- Fix ACP agent to respect provider-configured contextWindowSize before auto-detection
- Simplify getTruncateToolOutputThreshold to use static threshold
- Add support for GLM-4.7, Kimi-2.5, and MiniMax-M2.1 models
- Update context usage display to require explicit contextWindowSize
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Remove legacy childKey field from settingsSchema
- Add contextWindowSize and maxOutputTokens to documentation
- Refactor ContextUsageDisplay to accept contextWindowSize directly instead of Config object
- Add useMemo optimization for contextWindowSize in Footer component
- Fix logic gaps in contentGenerator for contextWindowSize and maxOutputTokens initialization
- Increase DEFAULT_OUTPUT_TOKEN_LIMIT from 4K to 8K for better usability
- Add fallback to default values when model is not available
Resolved conflicts in:
- packages/cli/src/ui/components/ContextUsageDisplay.tsx
- packages/cli/src/ui/components/Footer.tsx
- packages/cli/src/ui/components/Footer.test.tsx
- docs/users/configuration/settings.md
Changes:
- Merged main branch UI improvements with rightItems architecture
- Updated contextWindowSize documentation to be more concise
- Preserved all main branch features and functionality
- Add contextWindowSize field to ContentGeneratorConfig interface
- Update tokenLimit function to accept contentGeneratorConfig parameter
- Implement priority logic: user config > auto-detection
- Update chatCompressionService to use new API via getContentGeneratorConfig()
- Add contextWindowSize to MODEL_GENERATION_CONFIG_FIELDS for config resolution
- Add contextWindowSize to CLI settings schema (model.generationConfig)
- Update UI components (Footer, ContextUsageDisplay) to use new config API
- Fix test mocks to include getContentGeneratorConfig method
This refactor avoids modifying 71+ test files by moving the config
to the generator level instead of the Config class level.
Modified files:
- packages/core/src/core/contentGenerator.ts
- packages/core/src/core/tokenLimits.ts
- packages/core/src/services/chatCompressionService.ts
- packages/core/src/services/chatCompressionService.test.ts
- packages/core/src/models/constants.ts
- packages/cli/src/config/settingsSchema.ts
- packages/cli/src/ui/components/ContextUsageDisplay.tsx
- packages/cli/src/ui/components/Footer.tsx