Skip to content

Commit 8a18f39

Browse files
fix the issue (microsoft#4388)
1 parent db48f8c commit 8a18f39

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

dotnet/src/Microsoft.Agents.AI/Skills/FileAgentSkillsProvider.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ private async Task<string> ReadSkillResourceAsync(string skillName, string resou
174174
{
175175
try
176176
{
177-
promptTemplate = string.Format(optionsInstructions, string.Empty);
177+
_ = string.Format(optionsInstructions, string.Empty);
178+
promptTemplate = optionsInstructions;
178179
}
179180
catch (FormatException ex)
180181
{

dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/FileAgentSkillsProviderTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ public async Task InvokingCoreAsync_CustomPromptTemplate_UsesCustomTemplateAsync
108108
// Assert
109109
Assert.NotNull(result.Instructions);
110110
Assert.StartsWith("Custom template:", result.Instructions);
111+
Assert.Contains("custom-prompt-skill", result.Instructions);
112+
Assert.Contains("Custom prompt", result.Instructions);
111113
}
112114

113115
[Fact]

0 commit comments

Comments
 (0)