-
Notifications
You must be signed in to change notification settings - Fork 57
feat: ai debug mode #3036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ai debug mode #3036
Conversation
…ext handling across multiple components
…improved context management
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request introduces an AI debug mode feature that enhances AI-powered explanations and debugging across the application. The main focus is on improving context handling for AI agents by setting and clearing AIAgentContext appropriately, and enriching AI prompts with detailed metadata about resources, events, and application states.
Key Changes:
- Added
debugAgentContextalongsideintelligenceConfigfor improved AI debugging capabilities with richer contextual information - Set and clear
AIAgentContextin external app detail components (Helm, Argo, Flux) to provide AI with current application state - Updated dependency
@devtron-labs/devtron-fe-common-libfrom1.22.0-beta-4to1.22.0-beta-5and enabled Athena debug mode feature flag
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated devtron-fe-common-lib dependency to version 1.22.0-beta-5 |
| yarn.lock | Updated lockfile to reflect the new dependency version and checksums |
| .env | Enabled FEATURE_ATHENA_DEBUG_MODE_ENABLE feature flag |
| src/index.tsx | Added FEATURE_ATHENA_DEBUG_MODE_ENABLE to default environment configuration |
| src/config/routes.ts | Refactored to use COMMON_URLS constants for external app routes |
| src/components/common/navigation/NavigationRoutes.tsx | Added debugAgentContext state management to MainContext |
| src/components/v2/appDetails/ea/EAAppDetail.component.tsx | Set and clear AIAgentContext for external Helm app details |
| src/components/externalArgoApps/ExternalArgoAppDetail.tsx | Set and clear AIAgentContext for external Argo app details |
| src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetails.tsx | Set and clear AIAgentContext for external Flux app details |
| src/components/app/details/appDetails/AppDetails.tsx | Removed optional chaining for appDetails properties in AIAgentContext |
| src/components/app/details/appDetails/AppStatusCard.tsx | Added debugAgentContext with enriched metadata for AI debugging |
| src/components/v2/appDetails/k8Resource/nodeType/Node.component.tsx | Added debugAgentContext for resource-level AI explanations |
| src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/EventsTable.tsx | Added debugAgentContext for event-level AI explanations with HTML-formatted prompts |
| src/components/ResourceBrowser/ResourceList/K8sResourceListTableCellComponent.tsx | Enhanced AI context for resource browser events and resources |
| src/components/ResourceBrowser/ResourceList/EventList.tsx | Removed unused EventList component |
| src/components/ResourceBrowser/Types.ts | Removed unused EventListType interface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/components/ResourceBrowser/ResourceList/K8sResourceListTableCellComponent.tsx
Outdated
Show resolved
Hide resolved
src/components/v2/appDetails/k8Resource/nodeType/Node.component.tsx
Outdated
Show resolved
Hide resolved
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/EventsTable.tsx
Outdated
Show resolved
Hide resolved
src/components/ResourceBrowser/ResourceList/K8sResourceListTableCellComponent.tsx
Outdated
Show resolved
Hide resolved
src/components/ResourceBrowser/ResourceList/K8sResourceListTableCellComponent.tsx
Show resolved
Hide resolved
|



Description
This pull request introduces improvements to AI agent context handling and debugging capabilities throughout the application, especially for resource and event listings, and updates a core dependency. The changes ensure that relevant context is consistently set and cleared, and that AI-powered explanations and debugging prompts are more informative and tailored to the user's current view. Additionally, some code cleanup and dependency updates are included.
AI Agent Context and Debugging Enhancements:
AIAgentContextinExternalFluxAppDetailsto provide detailed context for AI explanations and ensure cleanup on component unmount. [1] [2] [3]intelligenceConfiganddebugAgentContextfor AI explanations in resource and event lists, making prompts more descriptive and including relevant metadata. [1] [2] [3] [4]aiAgentContextin app details and status card components for more accurate AI-powered debugging. [1] [2]Dependency Updates:
@devtron-labs/devtron-fe-common-libto version1.22.0-beta-5inpackage.jsonfor improved features and bug fixes.Code Cleanup:
EventList.tsxcomponent and related type definitions from the codebase. [1] [2]Configuration Changes:
FEATURE_ATHENA_DEBUG_MODE_ENABLE=trueto.env.Fixes # (issue)
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: