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