Skip to content

Conversation

@AbhishekA1509
Copy link
Member

@AbhishekA1509 AbhishekA1509 commented Jan 5, 2026

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

  • Test A
  • Test B

Checklist

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@AbhishekA1509 AbhishekA1509 self-assigned this Jan 5, 2026
Copilot AI review requested due to automatic review settings January 5, 2026 07:58
Copy link

Copilot AI left a 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 PR refactors the AI context handling system by replacing the previous generic AIAgentContextType with a strongly-typed discriminated union pattern. The changes introduce structured context types for different AI agent sources, improving type safety and making the context data more explicit.

Key Changes

  • Introduced AIAgentContextSourceType enum to define context sources (app-details and resource-browser-cluster)
  • Refactored AIAgentContextType from a generic object to a discriminated union with source-specific data structures
  • Exported the new enum and type from the MainContextProvider index

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Shared/Providers/MainContextProvider/types.ts Defines the new enum and discriminated union type for AI agent context with source-specific data schemas
src/Shared/Providers/MainContextProvider/index.ts Exports the newly introduced AIAgentContextSourceType enum and AIAgentContextType for external use

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants