72 references to AgentInstructionsFileChange
aspire (19)
Agents\AgentInstructionsFile.cs (19)
204internal static async Task<AgentInstructionsFileChange> WriteAsync( 225return AgentInstructionsFileChange.SkippedExternalLinkTarget; 236return AgentInstructionsFileChange.Created; 241return AgentInstructionsFileChange.SkippedUnsupportedEncoding; 257return AgentInstructionsFileChange.Appended; 303? AgentInstructionsFileChange.SkippedUnclosedCodeFence 304: AgentInstructionsFileChange.SkippedMalformedSection; 313return AgentInstructionsFileChange.Unchanged; 318return AgentInstructionsFileChange.SkippedUnclosedCodeFence; 322return AgentInstructionsFileChange.Updated; 337AgentInstructionsFileChange change; 342if (change is AgentInstructionsFileChange.SkippedExternalLinkTarget) 358AgentInstructionsFileChange.Created => (KnownEmojis.PageFacingUp, SharedCommandStrings.AgentInstructionsFileCreated, null), 359AgentInstructionsFileChange.Appended => (KnownEmojis.PageFacingUp, SharedCommandStrings.AgentInstructionsFileAppended, null), 360AgentInstructionsFileChange.Updated => (KnownEmojis.PageFacingUp, SharedCommandStrings.AgentInstructionsFileUpdated, null), 361AgentInstructionsFileChange.SkippedMalformedSection => (KnownEmojis.PoliceCarLight, SharedCommandStrings.AgentInstructionsFileSkippedMalformedSection, SectionEndMarker), 362AgentInstructionsFileChange.SkippedExternalLinkTarget => (KnownEmojis.PoliceCarLight, SharedCommandStrings.AgentInstructionsFileSkippedExternalLinkTarget, externalLinkTarget ?? string.Empty), 363AgentInstructionsFileChange.SkippedUnsupportedEncoding => (KnownEmojis.PoliceCarLight, SharedCommandStrings.AgentInstructionsFileSkippedUnsupportedEncoding, null), 364AgentInstructionsFileChange.SkippedUnclosedCodeFence => (KnownEmojis.PoliceCarLight, SharedCommandStrings.AgentInstructionsFileSkippedUnclosedCodeFence, null),
Aspire.Cli.Tests (53)
Agents\AgentInstructionsFileTests.cs (53)
22var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, aspireSkillsPluginRegistered: true, CancellationToken.None); 24Assert.Equal(AgentInstructionsFileChange.Created, change); 36var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 38Assert.Equal(AgentInstructionsFileChange.Appended, change); 52var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, aspireSkillsPluginRegistered: true, CancellationToken.None); 53var unchanged = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, aspireSkillsPluginRegistered: true, CancellationToken.None); 55Assert.Equal(AgentInstructionsFileChange.Updated, change); 56Assert.Equal(AgentInstructionsFileChange.Unchanged, unchanged); 71var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 73Assert.Equal(AgentInstructionsFileChange.Appended, change); 91var change = await AgentInstructionsFile.WriteAsync(new DirectoryInfo(link), appHost, false, CancellationToken.None); 93Assert.Equal(AgentInstructionsFileChange.Created, change); 108var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, Path.Combine(link, "apphost.cs"), false, CancellationToken.None); 110Assert.Equal(AgentInstructionsFileChange.Created, change); 125var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 127Assert.Equal(AgentInstructionsFileChange.Created, change); 143var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 145Assert.Equal(AgentInstructionsFileChange.SkippedMalformedSection, change); 159var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 161Assert.Equal(AgentInstructionsFileChange.Updated, change); 179var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 180var unchanged = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 182Assert.Equal(AgentInstructionsFileChange.Appended, change); 183Assert.Equal(AgentInstructionsFileChange.Unchanged, unchanged); 200var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 202Assert.Equal(AgentInstructionsFileChange.SkippedUnclosedCodeFence, change); 213var change = await AgentInstructionsFile.WriteAsync( 216Assert.Equal(AgentInstructionsFileChange.SkippedUnclosedCodeFence, change); 228var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 230Assert.Equal(AgentInstructionsFileChange.Updated, change); 244var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 246Assert.Equal(AgentInstructionsFileChange.SkippedMalformedSection, change); 258var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 260Assert.Equal(AgentInstructionsFileChange.Updated, change); 274var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 276Assert.Equal(AgentInstructionsFileChange.SkippedMalformedSection, change); 288var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 290Assert.Equal(AgentInstructionsFileChange.SkippedMalformedSection, change); 302var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 304Assert.Equal(AgentInstructionsFileChange.SkippedMalformedSection, change); 316var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 318Assert.Equal(AgentInstructionsFileChange.Appended, change); 331var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 333Assert.Equal(AgentInstructionsFileChange.Updated, change); 380Assert.Equal(AgentInstructionsFileChange.SkippedExternalLinkTarget, 399var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 401Assert.Equal(AgentInstructionsFileChange.Appended, change); 414var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 416Assert.Equal(AgentInstructionsFileChange.Appended, change); 430var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 432Assert.Equal(AgentInstructionsFileChange.SkippedUnsupportedEncoding, change); 448var change = await AgentInstructionsFile.WriteAsync(workspace.WorkspaceRoot, appHost, false, CancellationToken.None); 450Assert.Equal(AgentInstructionsFileChange.SkippedUnsupportedEncoding, change);