解决lint警告和错误

This commit is contained in:
xintaofei
2026-03-11 17:37:39 +08:00
parent 346fcd2217
commit e23bea9393

View File

@@ -365,8 +365,9 @@ export const ToolOutput = ({
<CodeBlock code={JSON.stringify(output, null, 2)} language="json" />
)
} else if (typeof output === "string") {
const lang = detectOutputLanguage(output)
const shouldRenderMd =
renderAsMarkdown ?? (detectOutputLanguage(output) === "log" && looksLikeMarkdown(output))
renderAsMarkdown ?? (lang === "log" && looksLikeMarkdown(output))
if (shouldRenderMd) {
Output = (
<div className="prose prose-sm dark:prose-invert max-w-none p-3 text-sm [&_ul]:list-inside [&_ol]:list-inside">