openwebui-cli/openwebui_cli
Danny Stocker fbe6832d3e Improve CLI streaming, error handling, and add comprehensive tests
**Core Improvements:**
- Fix Pydantic v2 deprecation warning in config.py by migrating to ConfigDict
- Add graceful Ctrl-C handling for streaming chat responses
- Add connection error handling mid-stream with actionable suggestions
- Implement --history-file support for conversation context
- Enhance all error messages with specific troubleshooting steps

**Chat Command Enhancements:**
- Improved SSE streaming with KeyboardInterrupt handling
- Added --history-file option to load conversation history from JSON
- Support both array and object formats for history files
- Better error messages for missing prompts and invalid history files
- Graceful handling of connection timeouts during streaming

**Error Message Improvements:**
- 401: Clear authentication instructions with token expiry hints
- 403: Detailed permission error with possible causes
- 404: Resource not found with helpful suggestions
- 5xx: Server error with admin troubleshooting tips
- Network errors: Connection, timeout, and request failures with solutions

**Testing:**
- Add comprehensive test suite for chat commands (7 tests)
- Test streaming and non-streaming responses
- Test system prompts, stdin input, and JSON output
- Test conversation history loading
- Test RAG file and collection context
- All 14 tests passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 20:28:21 +01:00
..
commands Improve CLI streaming, error handling, and add comprehensive tests 2025-11-30 20:28:21 +01:00
formatters Initial CLI scaffolding with v1.0 MVP structure 2025-11-30 20:09:19 +01:00
utils Initial CLI scaffolding with v1.0 MVP structure 2025-11-30 20:09:19 +01:00
__init__.py Initial CLI scaffolding with v1.0 MVP structure 2025-11-30 20:09:19 +01:00
config.py Improve CLI streaming, error handling, and add comprehensive tests 2025-11-30 20:28:21 +01:00
errors.py Initial CLI scaffolding with v1.0 MVP structure 2025-11-30 20:09:19 +01:00
http.py Improve CLI streaming, error handling, and add comprehensive tests 2025-11-30 20:28:21 +01:00
main.py Initial CLI scaffolding with v1.0 MVP structure 2025-11-30 20:09:19 +01:00