PyVizAST Prerelease 1.0.0-beta
Pre-release
Pre-release
LLM AI Refactoring & Bug Fixes
LLM Explanation Panel Refactoring:
- Redesigned AI explanation panel with premium black/white minimalist theme
- Added unavailable state UI with helpful messages when LLM not configured
- Added fullscreen modal for detailed reading
- Improved loading states and error handling
- Auto-retry on failure (up to 2 times)
Backend LLM Service Refactoring:
- Improved prompt templates with clearer JSON output format requirements
- Multi-strategy JSON parsing with fallback mechanisms
- Thread-safe caching with TTL for explanation caching
- Case-insensitive model name matching (codeLlama:7b vs codellama:7b)
- Separated error handling for availability check and model listing
- Added shorter timeouts to avoid UI hanging
Frontend LLM Integration Improvements:
- Added custom event system (
llmConfigChanged) for cross-component communication - Fixed React Hooks order issue (useMemo before early return)
- Fixed incorrect default status value (
'ready'→'unavailable') - Improved SSE parsing with type annotations
- Better error feedback and loading states
Files Added:
frontend/src/components/LLMExplanationPanel.js- AI explanation panel componentfrontend/src/components/LLMExplanationPanel.css- Black/white minimalist styles
Files Modified:
backend/llm/prompts.py- Improved prompt templatesbackend/llm/service.py- Multi-strategy parsing, caching, status handlingbackend/llm/ollama_client.py- Shorter timeoutsbackend/routers/llm.py- Unified error responses, detailed loggingfrontend/src/api.js- SSE parsing, shorter timeoutsfrontend/src/components/LLMSettings.js- Event dispatching, improved status handlingfrontend/src/components/ASTVisualizer.js- Event listeners, fixed default statusfrontend/src/components/ASTVisualizer3D.js- Event listeners, fixed default statusfrontend/src/components/components.css- LLM explanation panel styles
Bug Fixes:
- Fixed model not loading when clicking Load button
- Fixed UI stuck at loading state (timeout optimization)
- Fixed false "loaded" display when model not actually loaded
- Fixed React Hooks error (useMemo called after early return)
- Fixed model name case sensitivity matching