Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Dec 13, 2025

Description

Fixes #13543

Read description as markdown and convert to C# XML docs.
I haven't regenerated output files in the repo.

Example:

image

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@JamesNK JamesNK added the area-integrations Issues pertaining to Aspire Integrations packages label Dec 13, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 13, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13548

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13548"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the AI model code generator to convert markdown descriptions from the Azure AI Foundry model catalog into properly formatted C# XML documentation comments. Instead of simply escaping and inserting text, it now parses markdown and converts it to appropriate XML doc tags (like <para>, <list>, <c>, <b>, <see>, etc.).

Key changes:

  • Adds Markdig dependency for markdown parsing
  • Implements comprehensive markdown-to-XML conversion supporting paragraphs, headings, lists, code blocks, emphasis, links, and line breaks
  • Improves description cleaning to handle BOM characters and use culture-aware string replacements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve AI Foundry model generation

1 participant