feat: AI investigation panel for Kubernetes resources#250
Open
nadaverell wants to merge 1 commit into
Open
Conversation
Adds an AI-powered investigation feature that uses LLM tool calling to diagnose Kubernetes resource issues. Supports OpenAI and Anthropic providers with real-time streaming. Backend: - LLM provider abstraction (OpenAI/Anthropic) with streaming support - Investigation engine with K8s tools (get_resource, get_events, etc.) - SSE endpoint using AI SDK UI Message Stream Protocol - AI config API for provider settings Frontend: - InvestigateButton in WorkloadView header and HomeView problem list - InvestigationPanel (portal) and InvestigationChat (embeddable) - Real-time streaming with tool call interleaving - Dynamic status indicator, follow-up questions, copy/export - Markdown rendering with proper heading hierarchy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Key changes
Backend (
internal/ai/,internal/server/investigate.go):/api/ai/investigateimplementing the AI SDK message stream protocol/api/ai/configfor reading/saving provider settingsFrontend (
web/src/components/ai/):InvestigationChat— reusable chat component with@ai-sdk/reactuseChat hookInvestigationPanel— portal-based standalone panel (used from HomeView)InvestigateButton— sparkle icon button withonInvestigatecallback for inline integrationChatMessage,ToolCall— message rendering with expandable tool call detailsOther:
Markdown.tsx)package.json— addedai,@ai-sdk/reactdependencies