3 instantiations of SkillDefinition
aspire (3)
Agents\SkillDefinition.cs (3)
19
public static readonly SkillDefinition PlaywrightCli =
new
(
31
public static readonly SkillDefinition DotnetInspect =
new
(
54
return
new
(
89 references to SkillDefinition
aspire (23)
Agents\AspireSkills\AspireSkillsBundle.cs (3)
30
public Task<IReadOnlyList<SkillAssetFile>> GetSkillFilesAsync(
SkillDefinition
skill, CancellationToken cancellationToken)
60
public IReadOnlyList<
SkillDefinition
> GetSkillDefinitions()
69
SkillDefinition
Definition,
Agents\AspireSkills\AspireSkillsBundleProvider.cs (2)
217
var
definition =
SkillDefinition
.CreateAspireSkillsBundle(
Agents\SkillDefinition.cs (4)
19
public static readonly
SkillDefinition
PlaywrightCli = new(
31
public static readonly
SkillDefinition
DotnetInspect = new(
45
internal static
SkillDefinition
CreateAspireSkillsBundle(
177
public static IReadOnlyList<
SkillDefinition
> CliDefined { get; } = [PlaywrightCli, DotnetInspect];
Commands\AgentInitCommand.cs (14)
73
string.Join(",",
SkillDefinition
.CliDefined.Select(s => s.Name)),
236
IReadOnlyList<
SkillDefinition
> selectedSkills = [];
242
IReadOnlyList<
SkillDefinition
> availableSkills;
245
availableSkills =
SkillDefinition
.CliDefined
320
foreach (
var
skill in selectedSkills)
368
if (selectedSkills.Contains(
SkillDefinition
.PlaywrightCli) && selectedLocations.Count > 0)
501
private async Task<(IReadOnlyList<
SkillDefinition
> Skills, AspireSkillsBundle? Bundle, string? FailureMessage)> ResolveAvailableSkillsAsync(LanguageId? detectedLanguage, CancellationToken cancellationToken)
503
var skills = new List<
SkillDefinition
>();
524
skills.AddRange(
SkillDefinition
.CliDefined);
531
private static bool HasUnknownBundleSkillCandidate(string requestedSkills, IReadOnlyList<
SkillDefinition
> availableSkills)
591
return
SkillDefinition
.CliDefined.Any(skill => skill.HasName(name, StringComparison.OrdinalIgnoreCase));
661
SkillDefinition
skill,
754
private static async Task<IReadOnlyList<SkillAssetFile>> GetSkillFilesAsync(
SkillDefinition
skill, AspireSkillsBundle? aspireSkillsBundle, CancellationToken cancellationToken)
782
IReadOnlyList<
SkillDefinition
> SelectedSkills);
Aspire.Cli.Tests (66)
Agents\AspireSkillsBundleTests.cs (6)
20
private static
SkillDefinition
AspireSkillDefinition =>
SkillDefinition
.CreateAspireSkillsBundle(
25
private static
SkillDefinition
AspireifySkillDefinition =>
SkillDefinition
.CreateAspireSkillsBundle(
102
var
skill = Assert.Single(bundle.GetSkillDefinitions());
173
var
skill = Assert.Single(bundle.GetSkillDefinitions());
Agents\AspireSkillsInstallerTests.cs (10)
232
var
skill = Assert.Single(result.Bundle.GetSkillDefinitions());
353
var
skill = Assert.Single(result.Bundle.GetSkillDefinitions());
499
var
skill = Assert.Single(result.Bundle.GetSkillDefinitions());
1201
var
skill = Assert.Single(result.Bundle.GetSkillDefinitions());
1250
var
skill = Assert.Single(result.Bundle.GetSkillDefinitions());
1305
var
skill = Assert.Single(result.Bundle.GetSkillDefinitions());
1367
var
skill = Assert.Single(result.Bundle.GetSkillDefinitions());
1662
var
skill = Assert.Single(result.Bundle.GetSkillDefinitions());
1717
var
skill = Assert.Single(result.Bundle.GetSkillDefinitions());
1779
var
skill = Assert.Single(result.Bundle.GetSkillDefinitions());
Agents\CommonAgentApplicatorsTests.cs (29)
51
Assert.Equal(2,
SkillDefinition
.CliDefined.Count);
52
Assert.Contains(
SkillDefinition
.CliDefined, s => s ==
SkillDefinition
.PlaywrightCli);
53
Assert.Contains(
SkillDefinition
.CliDefined, s => s ==
SkillDefinition
.DotnetInspect);
59
Assert.All(
SkillDefinition
.CliDefined, static skill => Assert.False(skill.IsDefault));
65
Assert.Equal([KnownLanguageId.CSharp],
SkillDefinition
.DotnetInspect.ApplicableLanguages);
66
Assert.Empty(
SkillDefinition
.PlaywrightCli.ApplicableLanguages);
72
var
bundleSkill =
SkillDefinition
.CreateAspireSkillsBundle(
85
Assert.False(
SkillDefinition
.DotnetInspect.IsApplicableToLanguage(null)); // no language detected => excluded
86
Assert.True(
SkillDefinition
.DotnetInspect.IsApplicableToLanguage(new LanguageId(KnownLanguageId.CSharp)));
87
Assert.False(
SkillDefinition
.DotnetInspect.IsApplicableToLanguage(new LanguageId(KnownLanguageId.TypeScript)));
88
Assert.False(
SkillDefinition
.DotnetInspect.IsApplicableToLanguage(new LanguageId(KnownLanguageId.Python)));
94
Assert.Null(
SkillDefinition
.PlaywrightCli.SkillContent);
95
Assert.Equal(SkillSourceKind.ExternalInstaller,
SkillDefinition
.PlaywrightCli.SourceKind);
96
Assert.False(
SkillDefinition
.PlaywrightCli.HasInstallableFiles);
104
SkillDefinition
.CreateAspireSkillsBundle(CommonAgentApplicators.AspireSkillName, "Aspire CLI commands and workflows for distributed apps"),
105
SkillDefinition
.CreateAspireSkillsBundle(CommonAgentApplicators.AspireifySkillName, "One-time setup: wire up AppHost with discovered projects"),
106
SkillDefinition
.CreateAspireSkillsBundle(CommonAgentApplicators.AspireDeploymentSkillName, "Aspire deployment target selection, preflight, publish, and deploy workflows")
119
var installableSkills =
SkillDefinition
.CliDefined
122
foreach (
var
skill in installableSkills)
139
var
bundleSkill =
SkillDefinition
.CreateAspireSkillsBundle(
152
Assert.NotNull(
SkillDefinition
.DotnetInspect.SkillContent);
153
Assert.Equal(SkillSourceKind.Static,
SkillDefinition
.DotnetInspect.SourceKind);
154
Assert.True(
SkillDefinition
.DotnetInspect.HasInstallableFiles);
155
Assert.Contains("# dotnet-inspect",
SkillDefinition
.DotnetInspect.SkillContent);
158
private static async Task<IReadOnlyList<SkillAssetFile>> GetInstallableSkillFilesAsync(
SkillDefinition
skill)
Commands\AgentInitCommandTests.cs (14)
33
SkillDefinition
skill => skill.HasName(CommonAgentApplicators.AspireSkillName),
111
SkillDefinition
skill => skill.HasName(CommonAgentApplicators.AspireSkillName),
192
promptedSkillNames.AddRange(items.OfType<
SkillDefinition
>().Select(static skill => skill.Name));
234
var
skill = Assert.Single(items.OfType<
SkillDefinition
>(), static skill => skill.HasName(FakeAspireSkillsInstaller.AspireMonitoringSkillName));
298
var
skill = Assert.Single(items.OfType<
SkillDefinition
>(), static skill => skill.HasName(FakeAspireSkillsInstaller.AspireMonitoringSkillName));
346
promptedSkillNames.AddRange(items.OfType<
SkillDefinition
>().Select(static skill => skill.Name));
424
(
SkillDefinition
.PlaywrightCli.Name, "Bundle-provided Playwright collision"));
425
var promptedSkills = new List<
SkillDefinition
>();
436
promptedSkills.AddRange(items.OfType<
SkillDefinition
>());
455
var
playwrightSkill = Assert.Single(promptedSkills, static skill => skill.HasName(
SkillDefinition
.PlaywrightCli.Name, StringComparison.OrdinalIgnoreCase));
456
Assert.Same(
SkillDefinition
.PlaywrightCli, playwrightSkill);
Commands\InitCommandTests.cs (3)
679
Assert.All(items, static item => Assert.IsType<
SkillDefinition
>(item));
681
.OfType<
SkillDefinition
>()
731
.OfType<
SkillDefinition
>()
Commands\NewCommandTests.cs (4)
3230
var promptedSkills = new List<
SkillDefinition
>();
3239
Assert.All(items, static item => Assert.IsType<
SkillDefinition
>(item));
3240
promptedSkills.AddRange(items.Cast<
SkillDefinition
>());
3242
.Cast<
SkillDefinition
>()