Skip to content

Remove AssistantChat, AssistantModalDialog, AssistantSidebarDialog, and Model/Assistant code - #18726

Merged
James Newton-King (JamesNK) merged 9 commits into
mainfrom
jamesnk/remove-assistant-chat
Jul 13, 2026
Merged

Remove AssistantChat, AssistantModalDialog, AssistantSidebarDialog, and Model/Assistant code#18726
James Newton-King (JamesNK) merged 9 commits into
mainfrom
jamesnk/remove-assistant-chat

Conversation

@JamesNK

Copy link
Copy Markdown
Member

Description

Remove the AI Assistant chat feature from the dashboard. This removes AssistantChat, AssistantModalDialog, AssistantSidebarDialog, ExplainErrorsButton, and the entire Model/Assistant directory along with all related configuration, services, telemetry, resources, translations, and tests.

What's removed

  • Model/Assistant/AIContextProvider, AIHelpers, ChatClientFactory, AssistantChatViewModel, IceBreakersBuilder, prompt builders, markdown enrichment, GHCP integration (~30 files)
  • ComponentsAssistantChat, AssistantModalDialog, AssistantSidebarDialog, ExplainErrorsButton
  • ResourcesAIAssistant.resx, AIPrompts.resx, and all 26 xlf translation files
  • PackagesMicrosoft.Extensions.AI, Microsoft.Extensions.AI.OpenAI, OpenAI
  • ConfigurationAIOptions, DashboardAIDisabled config constant, post-configure AI disabled logic
  • UI — Assistant header button, sidebar dialog rendering, sidebar spacer CSS, mobile nav assistant entry
  • Menu items — "Ask GitHub Copilot" context menu items from ResourceMenuBuilder, SpanMenuBuilder, StructuredLogMenuBuilder, TraceMenuBuilder
  • AI context trackingAIContext usage from all pages (Resources, ConsoleLogs, StructuredLogs, Traces, TraceDetail) and detail controls (ResourceDetails, SpanDetails, StructuredLogDetails)
  • AI sidebar width trackingisAISidebarOpen parameter from BrowserDimensionWatcher, DimensionManager, GridColumnManager
  • TelemetryAIAssistantEnabled, AIAssistantChatMessageCount, AIAssistantSelectedModel, AIAssistantToolCalls, AIAssistantFeedbackType property keys; AIAssistantFeedback event key
  • TestsAIAssistant/ test directory, AssistantChatTests, TestAIContextProvider, assistant-specific test methods in MainLayoutTests and StartupTests

What's preserved

  • AIAgentsDialog — separate feature, untouched (inlined GetDashboardUrl helper that was previously in deleted AIHelpers)
  • GenAI visualizer (Model/GenAI/) — separate feature, untouched
  • TelemetryApiService — inlined TryResolveResourceForTelemetry helper (was in deleted AIHelpers)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

…nd Model/Assistant code

Remove the entire AI Assistant chat feature from the dashboard including:
- Model/Assistant directory (AIContextProvider, AIHelpers, ChatClientFactory, etc.)
- AssistantChat, AssistantModalDialog, AssistantSidebarDialog components
- ExplainErrorsButton component
- AIAssistant/AIPrompts resource and xlf translation files
- AI-related service registrations in DashboardWebApplication
- AIOptions configuration and DashboardAIDisabled config constant
- Microsoft.Extensions.AI, Microsoft.Extensions.AI.OpenAI, OpenAI packages
- Assistant button and sidebar from MainLayout
- IsAIEnabled and LaunchAIAssistantAsync from MobileNavMenu
- AI sidebar width tracking from BrowserDimensionWatcher/DimensionManager
- Ask GitHub Copilot menu items from 4 menu builders
- AIContext usage from all pages and detail controls
- AI telemetry property and event constants
- Related test files and test infrastructure

The separate AIAgentsDialog and GenAI visualizer features are preserved.
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18726

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18726"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the dashboard AI Assistant feature while preserving the separate AI Agents dialog and GenAI visualizer.

Changes:

  • Removes Assistant UI, models, prompts, localization, telemetry, configuration, dependencies, and tests.
  • Removes Assistant integration from dashboard pages, menus, layout, and resize handling.
  • Inlines retained URL and telemetry-resource resolution logic.

Reviewed changes

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

Show a summary per file
File Description
tests/Shared/TestAIContextProvider.cs Removes Assistant test provider.
tests/Aspire.Dashboard.Tests/Model/ResourceMenuBuilderTests.cs Removes Assistant menu dependencies.
tests/Aspire.Dashboard.Tests/Model/AIAssistant/InvariantStringLocalizerTests.cs Removes Assistant localization tests.
tests/Aspire.Dashboard.Tests/Model/AIAssistant/AssistantChatDataContextTests.cs Removes chat data tests.
tests/Aspire.Dashboard.Tests/Model/AIAssistant/AIContextProviderTests.cs Removes context provider tests.
tests/Aspire.Dashboard.Tests/Markdown/MarkdownProcessorTests.cs Removes Assistant markdown enrichment tests.
tests/Aspire.Dashboard.Tests/Integration/StartupTests.cs Removes AI configuration tests.
tests/Aspire.Dashboard.Tests/Aspire.Dashboard.Tests.csproj Unlinks Assistant test provider.
tests/Aspire.Dashboard.Components.Tests/Shared/StructuredLogsSetupHelpers.cs Removes Assistant import.
tests/Aspire.Dashboard.Components.Tests/Shared/ResourceSetupHelpers.cs Removes Assistant import.
tests/Aspire.Dashboard.Components.Tests/Shared/FluentUISetupHelpers.cs Removes Assistant service registrations.
tests/Aspire.Dashboard.Components.Tests/Layout/MobileNavMenuTests.cs Removes Assistant parameters.
tests/Aspire.Dashboard.Components.Tests/Layout/MainLayoutTests.cs Removes Assistant layout tests.
tests/Aspire.Dashboard.Components.Tests/GridColumnManagerTests.cs Removes sidebar-width scenarios.
tests/Aspire.Dashboard.Components.Tests/Controls/AssistantChatTests.cs Removes chat component tests.
tests/Aspire.Dashboard.Components.Tests/Aspire.Dashboard.Components.Tests.csproj Unlinks Assistant test provider.
src/Shared/KnownConfigNames.cs Removes AI-disabled environment variable.
src/Shared/DashboardConfigNames.cs Removes AI configuration mapping.
src/Aspire.Dashboard/Utils/BrowserStorageKeys.cs Removes Assistant settings key.
src/Aspire.Dashboard/Telemetry/TelemetryPropertyKeys.cs Removes Assistant telemetry properties.
src/Aspire.Dashboard/Telemetry/TelemetryEventKeys.cs Removes Assistant feedback event.
src/Aspire.Dashboard/Resources/xlf/AIPrompts.zh-Hant.xlf Removes Traditional Chinese prompts.
src/Aspire.Dashboard/Resources/xlf/AIPrompts.zh-Hans.xlf Removes Simplified Chinese prompts.
src/Aspire.Dashboard/Resources/xlf/AIPrompts.tr.xlf Removes Turkish prompts.
src/Aspire.Dashboard/Resources/xlf/AIPrompts.ru.xlf Removes Russian prompts.
src/Aspire.Dashboard/Resources/xlf/AIPrompts.pt-BR.xlf Removes Portuguese prompts.
src/Aspire.Dashboard/Resources/xlf/AIPrompts.ko.xlf Removes Korean prompts.
src/Aspire.Dashboard/Resources/xlf/AIPrompts.it.xlf Removes Italian prompts.
src/Aspire.Dashboard/Resources/xlf/AIPrompts.fr.xlf Removes French prompts.
src/Aspire.Dashboard/Resources/xlf/AIPrompts.es.xlf Removes Spanish prompts.
src/Aspire.Dashboard/Model/TraceMenuBuilder.cs Removes Copilot trace action.
src/Aspire.Dashboard/Model/StructuredLogMenuBuilder.cs Removes Copilot log action.
src/Aspire.Dashboard/Model/SpanMenuBuilder.cs Removes Copilot span action.
src/Aspire.Dashboard/Model/ResourceMenuBuilder.cs Removes Copilot resource action.
src/Aspire.Dashboard/Model/Assistant/Prompts/PromptContextsBuilder.cs Removes prompt-context construction.
src/Aspire.Dashboard/Model/Assistant/OtelAttributeHelpers.cs Removes Assistant OTLP helpers.
src/Aspire.Dashboard/Model/Assistant/Markdown/ResourceInlineRenderer.cs Removes resource renderer.
src/Aspire.Dashboard/Model/Assistant/Markdown/ResourceInline.cs Removes resource inline model.
src/Aspire.Dashboard/Model/Assistant/Markdown/LogEntryInlineRenderer.cs Removes log renderer.
src/Aspire.Dashboard/Model/Assistant/Markdown/LogEntryInline.cs Removes log inline model.
src/Aspire.Dashboard/Model/Assistant/Markdown/AspireEnrichmentParser.cs Removes enrichment parser.
src/Aspire.Dashboard/Model/Assistant/Markdown/AspireEnrichmentOptions.cs Removes enrichment options.
src/Aspire.Dashboard/Model/Assistant/Markdown/AspireEnrichmentExtension.cs Removes markdown extension.
src/Aspire.Dashboard/Model/Assistant/InvariantStringLocalizer.cs Removes invariant localizer.
src/Aspire.Dashboard/Model/Assistant/InitialPrompt.cs Removes initial prompt model.
src/Aspire.Dashboard/Model/Assistant/IAssistantDisplayContext.cs Removes display contract.
src/Aspire.Dashboard/Model/Assistant/IAIContextProvider.cs Removes Assistant context contract.
src/Aspire.Dashboard/Model/Assistant/Ghcp/GhcpState.cs Removes GHCP state model.
src/Aspire.Dashboard/Model/Assistant/Ghcp/GhcpModelResponse.cs Removes GHCP model response.
src/Aspire.Dashboard/Model/Assistant/Ghcp/GhcpInfoResponse.cs Removes GHCP information response.
src/Aspire.Dashboard/Model/Assistant/FollowUpPromptViewModel.cs Removes follow-up prompt model.
src/Aspire.Dashboard/Model/Assistant/ChatViewModelBuilder.cs Removes chat builder.
src/Aspire.Dashboard/Model/Assistant/ChatViewModel.cs Removes chat message model.
src/Aspire.Dashboard/Model/Assistant/ChatAssistantFormModel.cs Removes chat form model.
src/Aspire.Dashboard/Model/Assistant/AssistantDialogViewModel.cs Removes dialog model.
src/Aspire.Dashboard/Model/Assistant/AssistantChatAssistantSettings.cs Removes persisted settings model.
src/Aspire.Dashboard/Model/Assistant/AIContext.cs Removes page AI context.
src/Aspire.Dashboard/DashboardWebApplication.cs Removes Assistant DI registrations.
src/Aspire.Dashboard/Configuration/PostConfigureDashboardOptions.cs Removes AI post-configuration.
src/Aspire.Dashboard/Configuration/DashboardOptions.cs Removes AI options.
src/Aspire.Dashboard/Components/Resize/GridColumnManager.razor.cs Removes sidebar width adjustment.
src/Aspire.Dashboard/Components/Resize/DimensionManager.cs Removes sidebar state tracking.
src/Aspire.Dashboard/Components/Resize/BrowserDimensionWatcher.cs Removes Assistant display subscription.
src/Aspire.Dashboard/Components/Pages/Traces.razor.cs Removes trace Assistant behavior.
src/Aspire.Dashboard/Components/Pages/Traces.razor Removes explain-errors control.
src/Aspire.Dashboard/Components/Pages/TraceDetail.razor.cs Removes trace explanation context.
src/Aspire.Dashboard/Components/Pages/TraceDetail.razor Removes explain-trace button.
src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor.cs Removes structured-log Assistant behavior.
src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor Removes explain-errors control.
src/Aspire.Dashboard/Components/Pages/Resources.razor.cs Removes resource AI context.
src/Aspire.Dashboard/Components/Pages/ConsoleLogs.razor.cs Removes console-log AI context.
src/Aspire.Dashboard/Components/Layout/MobileNavMenu.razor.cs Removes mobile Assistant entry.
src/Aspire.Dashboard/Components/Layout/MobileNavMenu.razor Removes Assistant parameters.
src/Aspire.Dashboard/Components/Layout/MainLayout.razor.css Removes sidebar spacer styling.
src/Aspire.Dashboard/Components/Layout/MainLayout.razor.cs Removes Assistant lifecycle logic.
src/Aspire.Dashboard/Components/Layout/MainLayout.razor Removes Assistant header and sidebar UI.
src/Aspire.Dashboard/Components/Dialogs/AssistantSidebarDialog.razor.css Removes sidebar styling.
src/Aspire.Dashboard/Components/Dialogs/AssistantSidebarDialog.razor.cs Removes sidebar implementation.
src/Aspire.Dashboard/Components/Dialogs/AssistantSidebarDialog.razor Removes sidebar markup.
src/Aspire.Dashboard/Components/Dialogs/AssistantModalDialog.razor.css Removes modal styling.
src/Aspire.Dashboard/Components/Dialogs/AssistantModalDialog.razor.cs Removes modal implementation.
src/Aspire.Dashboard/Components/Dialogs/AssistantModalDialog.razor Removes modal markup.
src/Aspire.Dashboard/Components/Dialogs/AIAgentsDialog.razor.cs Inlines retained dashboard URL logic.
src/Aspire.Dashboard/Components/Controls/StructuredLogDetails.razor.cs Removes log-detail AI context.
src/Aspire.Dashboard/Components/Controls/SpanDetails.razor.cs Removes span-detail AI context.
src/Aspire.Dashboard/Components/Controls/ResourceDetails.razor.cs Removes resource-detail AI context.
src/Aspire.Dashboard/Components/Controls/ExplainErrorsButton.razor.cs Removes explain-errors implementation.
src/Aspire.Dashboard/Components/Controls/ExplainErrorsButton.razor Removes explain-errors markup.
src/Aspire.Dashboard/Aspire.Dashboard.csproj Removes AI dependencies and resources.
src/Aspire.Dashboard/Api/TelemetryApiService.cs Inlines telemetry resource resolution.
Files not reviewed (2)
  • src/Aspire.Dashboard/Resources/AIAssistant.Designer.cs: Generated file
  • src/Aspire.Dashboard/Resources/AIPrompts.Designer.cs: Generated file

Comment thread src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor.cs
Comment thread src/Aspire.Dashboard/Api/TelemetryApiService.cs Outdated
@github-actions

This comment has been minimized.

Copilot AI review requested due to automatic review settings July 10, 2026 11:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 124 out of 126 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • src/Aspire.Dashboard/Resources/AIAssistant.Designer.cs: Generated file
  • src/Aspire.Dashboard/Resources/AIPrompts.Designer.cs: Generated file

Comment thread src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor.cs
@github-actions

This comment has been minimized.

@JamesNK
James Newton-King (JamesNK) marked this pull request as draft July 10, 2026 11:35
@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Copilot AI review requested due to automatic review settings July 11, 2026 00:59
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

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

Files not reviewed (2)
  • src/Aspire.Dashboard/Resources/AIAssistant.Designer.cs: Generated file
  • src/Aspire.Dashboard/Resources/AIPrompts.Designer.cs: Generated file

Comment thread src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor.cs
Comment thread src/Aspire.Dashboard/Components/Layout/MainLayout.razor
@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

…ion, remove CSS/JS remnants, add tests

- Restore accidentally removed TelemetryRepository.MarkViewedErrorLogs call in StructuredLogs
- Fix TryResolveResourceForTelemetry to handle replicated resources without
  throwing (use manual single-match search instead of SingleOrDefault)
- Remove remaining assistant CSS/JS remnants: chat CSS variables, #chat-modal-dialog
  styles, header-button-selected style, attachChatClickEvent JS function
- Rename --chat-codeblock-background-color to --codeblock-background-color
  (still used by GenAI visualizer markdown code blocks)
- Remove leftover Size16 GitHubCopilot icon
- Add 3 tests for resource resolution with replicas in TelemetryApiServiceTests
Copilot AI review requested due to automatic review settings July 11, 2026 01:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 128 out of 130 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • src/Aspire.Dashboard/Resources/AIAssistant.Designer.cs: Generated file
  • src/Aspire.Dashboard/Resources/AIPrompts.Designer.cs: Generated file

Comment thread src/Aspire.Dashboard/Api/TelemetryApiService.cs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

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

Files not reviewed (2)
  • src/Aspire.Dashboard/Resources/AIAssistant.Designer.cs: Generated file
  • src/Aspire.Dashboard/Resources/AIPrompts.Designer.cs: Generated file

Comment thread src/Aspire.Dashboard/Api/TelemetryApiService.cs Outdated
Comment thread tests/Aspire.Dashboard.Tests/Aspire.Dashboard.Tests.csproj
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 136 out of 138 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • src/Aspire.Dashboard/Resources/AIAssistant.Designer.cs: Generated file
  • src/Aspire.Dashboard/Resources/AIPrompts.Designer.cs: Generated file

Comment thread src/Shared/Otlp/OtlpHelpers.cs Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Copilot AI review requested due to automatic review settings July 13, 2026 02:14
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

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

Files not reviewed (2)
  • src/Aspire.Dashboard/Resources/AIAssistant.Designer.cs: Generated file
  • src/Aspire.Dashboard/Resources/AIPrompts.Designer.cs: Generated file

Comment thread src/Shared/Otlp/OtlpHelpers.cs
Comment thread tests/Aspire.Cli.Tests/Commands/TelemetryCommandTests.cs
Copilot AI review requested due to automatic review settings July 13, 2026 04:09
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector (audit mode)

The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement.

Runs the full test matrix + all jobs (ALL) — run-all fallback: 'tests/Shared/TestAIContextProvider.cs' is neither Layer-1-owned nor matched by a Layer 2 rule


Selection computed for commit e151efa.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 136 out of 138 changed files in this pull request and generated no new comments.

Files not reviewed (2)
  • src/Aspire.Dashboard/Resources/AIAssistant.Designer.cs: Generated file
  • src/Aspire.Dashboard/Resources/AIPrompts.Designer.cs: Generated file

@mitchdenny Mitch Denny (mitchdenny) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the full diff. This is a clean, complete removal of the AI assistant chat feature with no dangling references. The one piece of substantive new logic — centralized telemetry resource-name resolution (OtlpHelpers.ResolveResourceNameMatches) — is correct and well-covered by tests on both the dashboard and CLI surfaces. AIAgentsDialog.GetDashboardUrl is an exact equivalent of the removed helper. LGTM.

@JamesNK
James Newton-King (JamesNK) merged commit 0a1a54a into main Jul 13, 2026
339 checks passed
@JamesNK
James Newton-King (JamesNK) deleted the jamesnk/remove-assistant-chat branch July 13, 2026 05:35
@github-actions github-actions Bot added this to the 13.5 milestone Jul 13, 2026
@aspire-repo-bot

This comment has been minimized.

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1442 targeting release/13.5.

Removed the stale Dashboard:AI:Disabled row from dashboard/configuration.mdx (the config option and its backing AIOptions/DashboardAIDisabled code were deleted), and added a "Dashboard and telemetry improvements" bullet plus a breaking-change entry to whats-new/aspire-13-5.mdx describing the AI Assistant chat UI removal (AssistantChat, AssistantModalDialog, AssistantSidebarDialog, ExplainErrorsButton).

Note

This draft PR needs human review before merging.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants