Repository navigation
What's Changed
Test Coverage Improvements
- ChatConfiguration: Increased coverage from 0% to 100% with new test for streamingChatClient bean
- StreamingRequestBuilder: Increased coverage from 32.3% to 90.4% with comprehensive execute() method tests
- ChatCompletionEmitter: Added callback registration tests and static factory method tests
- Total test count increased from 56 to 70 tests
Code Quality Fixes
- Fixed all 19+ SonarQube code quality issues:
- Removed unused variables and imports
- Replaced lambdas with method references where appropriate
- Changed
ThrowabletoExceptionin catch blocks - Removed
Thread.sleep()from concurrent tests - Chained assertions for better readability
- Consolidated duplicate tests properly
New Features
- Prompt History Navigation in demo UI with up/down arrow keys
- StreamingChatClient: New high-level abstraction for SSE streaming with fluent builder API
- Handler-based API with
onStart(),onChunk(), andonComplete()callbacks - Support for both static and dynamic system prompts
- Auto-generated conversation IDs when null/empty/whitespace
- Easy SSE timeout configuration
Architecture Improvements
- Refactored
StreamingRequestBuilder.execute()to reduce cognitive complexity with 6 helper methods - Simplified
ChatControllerfrom 14 lines to 7 lines using new streaming client - Removed
UncheckedSseEmitterin favor of enhancedChatCompletionEmitter - Improved conversation ID validation with idiomatic Java 11+ Optional pattern
Full Changelog
Commits:
- 492246f Add prompt history navigation with up/down arrows in demo UI
- 9d4ab7a Add comprehensive unit tests for ChatCompletionEmitter and remove UncheckedSseEmitter
- dc5f8f3 Add StreamingChatClient wrapper for simplified SSE streaming
- c24b033 Handle empty/whitespace conversation IDs by generating UUIDs
- 2409d39 Refactor conversation ID validation to use ensureConversationId method
- 52ba0fb Improve test coverage and code quality
- 109af3b Add comprehensive tests for ChatCompletionEmitter callbacks
- 37804b1 Fix all SonarQube code quality issues
- 7545786 Fix: Replace fake parameterized test with single test
Full Diff: 0.0.5...0.0.6