Package uno.anahata.ai.swing


package uno.anahata.ai.swing
Provides a comprehensive and well-structured Swing-based user interface for the AI assistant.

This package is highly modular, with a clear separation of concerns between different UI components, data models, and rendering logic.

Key Architectural Concepts:

  • Main Entry Point: Main is the application's entry point, responsible for setting up the main JFrame and initializing the core ChatPanel.
  • Core UI Component: ChatPanel is the central UI container, bringing together all the other panels (conversation, status, input, etc.) into a cohesive user experience.
  • Conversation Display: ConversationPanel is responsible for displaying the chat history. It uses a sophisticated rendering system to handle different types of message parts (text, code, function calls, etc.).
  • Part Rendering: The uno.anahata.ai.swing.render package provides a flexible and extensible rendering framework. ContentRenderer iterates through the parts of a ChatMessage and delegates the rendering of each part to a specialized PartRenderer (e.g., TextPartRenderer, CodeBlockRenderer, FunctionCallPartRenderer). This allows for easy addition of new part types without modifying the core rendering logic.
  • Configuration and Settings: The uno.anahata.ai.swing.config package provides UI panels for configuring the application, such as GeminiKeysPanel for managing API keys.
  • Context Visualization: ContextHeatmapPanel and ContextUsageBar provide visual representations of the context window's state, helping the user understand the conversation's memory usage.
  • Tool Integration: ToolsPanel allows the user to manage the permissions for each available tool, while SwingFunctionPrompter provides a UI for confirming tool executions.
  • Status and Feedback: StatusPanel displays the real-time status of the application, providing feedback on API calls, tool executions, and other background processes.
  • Utilities: The uno.anahata.ai.swing.util package contains various helper classes for Swing-related tasks, such as SwingUtils for common UI operations.