AI Assistant Integration
Karcytics features an integrated AI Assistant (karcytics.ui.ai.service.AIService) designed to provide contextual documentation retrieval and operational guidance within the application.
Core Functionality
- Context-Aware Retrieval: The assistant utilizes a context panel (
karcytics.ui.ai.context_panel.ContextPanel) to allow users to select which internal documentation or plugin-specific manuals are included in the prompt context. - Asynchronous Execution: Queries are executed via the
StreamingAIThread, ensuring the primary UI thread remains responsive during LLM generation. - Session Isolation: Chat history is managed by the
AIServiceand can be explicitly cleared (clear_history()). Sessions do not persist across project closures.
Managing Context
To optimize prompt fidelity and remain within token limits, Karcytics relies on explicit context selection.
Core Documentation
Users can select specific core manuals to include in the context window.
Plugin Documentation
When an analysis module is active, the Context Panel detects and allows the inclusion of plugin-specific documentation.
Technical Specifications
- Execution Threading: The
StreamingAIThreadinherits fromQThreadand emitschunk_received(str),finished(dict), anderror(str)signals to stream responses to the UI asynchronously. - Service Orchestration: The
AIServicecoordinates the underlyingAIAssistantSDK integration, managing the chat Markdown state and the selected context file references.