Skip to content

Commit 16e97ea

Browse files
authored
Fix the incorrect judgment logic under AgentSkill (#64)
1 parent 58aaf90 commit 16e97ea

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/AgentSkillsDotNet/AgentSkill.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ public string GenerateDefinition(AgentSkillAsToolOptions? options = null)
164164
builder.AppendLine(Body);
165165
builder.AppendLine("</instructions>");
166166

167-
if (optionsToUse.IncludeLicenseInformation && string.IsNullOrWhiteSpace(License))
167+
if (optionsToUse.IncludeLicenseInformation && !string.IsNullOrWhiteSpace(License))
168168
{
169169
builder.AppendLine($"<license>{License}</license>");
170170
}
171171

172-
if (optionsToUse.IncludeCompatibilityInformation && string.IsNullOrWhiteSpace(Compatibility))
172+
if (optionsToUse.IncludeCompatibilityInformation && !string.IsNullOrWhiteSpace(Compatibility))
173173
{
174174
builder.AppendLine($"<compatibility>{Compatibility}</compatibility>");
175175
}
@@ -185,7 +185,7 @@ public string GenerateDefinition(AgentSkillAsToolOptions? options = null)
185185
builder.AppendLine("</metadata>");
186186
}
187187

188-
if (optionsToUse.IncludeAllowedTools && string.IsNullOrWhiteSpace(AllowedTools))
188+
if (optionsToUse.IncludeAllowedTools && !string.IsNullOrWhiteSpace(AllowedTools))
189189
{
190190
builder.AppendLine($"<allowedTools>{AllowedTools}</allowedTools>");
191191
}

0 commit comments

Comments
 (0)