microsoft / autogen

A programming framework for agentic AI. Discord: https://aka.ms/autogen-dc. Roadmap: https://aka.ms/autogen-roadmap
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
28.12k stars 4.11k forks source link

[.Net] Update FunctionCallTemplate.tt to encode `"` #3068

Open prithvi2226 opened 2 days ago

prithvi2226 commented 2 days ago

Changed the description assigning to handle double quotes in comments and prevent the generated code from breaking.

Why are these changes needed?

When the content in structural comments contains ", the generated code won't get compiled because the " breaks the string.

Modified the FunctionCallTemplate.tt file to properly encode double quotes in descriptions by doubling them. By doubling the double quotes in the description, we ensure that the generated code will compile correctly, even when comments include double quotes.

Related issue number

Closes #2872

Checks

prithvi2226 commented 10 hours ago

Hi! @LittleLittleCloud , I have updated some changes for your review. Thanks for the support!