Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

var builder = DistributedApplication.CreateBuilder(args);

var db1 = builder.AddAzurePostgresFlexibleServer("pg")
.RunAsContainer()
.AddDatabase("db1");
var pg = builder.AddPostgres("pg")
.WithPostgresMcp();

var db1 = pg.AddDatabase("db1");

builder.AddProject<Projects.PostgresEndToEnd_ApiService>("api")
.WithExternalHttpEndpoints()
Expand Down
3 changes: 2 additions & 1 deletion playground/Redis/Redis.AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
var redis = builder.AddRedis("redis");
redis.WithDataVolume()
.WithRedisCommander(c => c.WithHostPort(33803).WithParentRelationship(redis))
.WithRedisInsight(c => c.WithHostPort(41567).WithParentRelationship(redis));
.WithRedisInsight(c => c.WithHostPort(41567).WithParentRelationship(redis))
.WithRedisMcp();

var garnet = builder.AddGarnet("garnet")
.WithDataVolume();
Expand Down
19 changes: 18 additions & 1 deletion src/Aspire.Cli/Backchannel/AuxiliaryBackchannelMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,24 @@ internal sealed class AuxiliaryBackchannelMonitor(
/// <summary>
/// Gets or sets the path to the selected AppHost. When set, this AppHost will be used for MCP operations.
/// </summary>
public string? SelectedAppHostPath { get; set; }
public string? SelectedAppHostPath
{
get => _selectedAppHostPath;
set
{
if (_selectedAppHostPath != value)
{
_selectedAppHostPath = value;
SelectedAppHostChanged?.Invoke();
}
}
}
private string? _selectedAppHostPath;

/// <summary>
/// Event raised when the selected AppHost changes.
/// </summary>
public event Action? SelectedAppHostChanged;

protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
Expand Down
5 changes: 5 additions & 0 deletions src/Aspire.Cli/Backchannel/IAuxiliaryBackchannelMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ internal interface IAuxiliaryBackchannelMonitor
/// Gets or sets the path to the selected AppHost. When set, this AppHost will be used for MCP operations.
/// </summary>
string? SelectedAppHostPath { get; set; }

/// <summary>
/// Event raised when the selected AppHost changes.
/// </summary>
event Action? SelectedAppHostChanged;
}
Loading
Loading