优化生成SQL查询语句的HTML输出格式,使用JSON序列化包装内容
This commit is contained in:
@@ -322,11 +322,14 @@ public class SmartHandleService(
|
|||||||
logger.LogInformation("AI生成的SQL: {Sql}", sqlText);
|
logger.LogInformation("AI生成的SQL: {Sql}", sqlText);
|
||||||
|
|
||||||
chunkAction(
|
chunkAction(
|
||||||
$"""
|
JsonSerializer.Serialize(new
|
||||||
<pre style="max-height: 150px; font-size: 12px; overflow-y: auto; padding: 8px; border: none;">
|
{
|
||||||
生成的SQL查询语句:
|
content = $"""
|
||||||
{System.Net.WebUtility.HtmlEncode(sqlText)}
|
<pre style="max-height: 150px; font-size: 12px; overflow-y: auto; padding: 8px; border: none;">
|
||||||
"""
|
{System.Net.WebUtility.HtmlEncode(sqlText)}
|
||||||
|
</pre>
|
||||||
|
"""
|
||||||
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
// 第二步:执行动态SQL查询
|
// 第二步:执行动态SQL查询
|
||||||
|
|||||||
Reference in New Issue
Block a user