gpt-engineer-app[bot] commited on
Commit ·
a4d9be7
1
Parent(s): f83a0e8
Changes
Browse files
src/routes/dashboard.branch-debug.tsx
CHANGED
|
@@ -872,15 +872,23 @@ function AuditModalTrigger({ audit, stats }: { audit: DebugResult["audit"]; stat
|
|
| 872 |
<div className="rounded-lg border border-yellow-500/30 bg-yellow-500/5 overflow-hidden">
|
| 873 |
<div className="px-3 py-1.5 text-[10px] font-mono uppercase tracking-widest bg-yellow-500/10 border-b border-yellow-500/30 text-yellow-500">Sent to AI (sanitized)</div>
|
| 874 |
<pre className="text-[11px] font-mono p-3 leading-relaxed whitespace-pre overflow-x-auto">
|
| 875 |
-
{sampleSanitizedLines.map((l, i) =>
|
| 876 |
-
|
| 877 |
-
|
| 878 |
-
<
|
| 879 |
-
|
| 880 |
-
|
| 881 |
-
|
| 882 |
-
|
| 883 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 884 |
</pre>
|
| 885 |
</div>
|
| 886 |
</div>
|
|
|
|
| 872 |
<div className="rounded-lg border border-yellow-500/30 bg-yellow-500/5 overflow-hidden">
|
| 873 |
<div className="px-3 py-1.5 text-[10px] font-mono uppercase tracking-widest bg-yellow-500/10 border-b border-yellow-500/30 text-yellow-500">Sent to AI (sanitized)</div>
|
| 874 |
<pre className="text-[11px] font-mono p-3 leading-relaxed whitespace-pre overflow-x-auto">
|
| 875 |
+
{sampleSanitizedLines.map((l, i) => {
|
| 876 |
+
const safe = (l || " ")
|
| 877 |
+
.replace(/&/g, "&")
|
| 878 |
+
.replace(/</g, "<")
|
| 879 |
+
.replace(/>/g, ">")
|
| 880 |
+
.replace(/"/g, """)
|
| 881 |
+
.replace(/'/g, "'");
|
| 882 |
+
const html = safe
|
| 883 |
+
.replace(/(fn_\d{4})/g, '<span class="text-primary">$1</span>')
|
| 884 |
+
.replace(/(\[SECRET_REDACTED\])/g, '<span class="text-severity-critical font-bold">$1</span>');
|
| 885 |
+
return (
|
| 886 |
+
<div key={i} className="flex">
|
| 887 |
+
<span className="text-muted-foreground/40 w-8 shrink-0 select-none">{i + 1}</span>
|
| 888 |
+
<span dangerouslySetInnerHTML={{ __html: html }} />
|
| 889 |
+
</div>
|
| 890 |
+
);
|
| 891 |
+
})}
|
| 892 |
</pre>
|
| 893 |
</div>
|
| 894 |
</div>
|