Show full error messages.
Browse files- chat-full.html +11 -0
- chat-full.js +1 -1
chat-full.html
CHANGED
|
@@ -115,6 +115,17 @@
|
|
| 115 |
border-style: dashed;
|
| 116 |
color: var(--muted);
|
| 117 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
form#composer {
|
| 120 |
position: sticky;
|
|
|
|
| 115 |
border-style: dashed;
|
| 116 |
color: var(--muted);
|
| 117 |
}
|
| 118 |
+
.error-details {
|
| 119 |
+
font-size: .88em;
|
| 120 |
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
| 121 |
+
background: color-mix(in oklab, var(--bg) 96%, var(--fg) 4%);
|
| 122 |
+
color: var(--muted);
|
| 123 |
+
margin: 6px 0 0 0;
|
| 124 |
+
padding: 7px 10px;
|
| 125 |
+
border-radius: 7px;
|
| 126 |
+
white-space: pre-wrap;
|
| 127 |
+
overflow-x: auto;
|
| 128 |
+
}
|
| 129 |
|
| 130 |
form#composer {
|
| 131 |
position: sticky;
|
chat-full.js
CHANGED
|
@@ -28,7 +28,7 @@
|
|
| 28 |
div.className = `msg ${role}`;
|
| 29 |
if (role === 'sys' && details) {
|
| 30 |
// Показати повідомлення з розгортанням stack trace
|
| 31 |
-
|
| 32 |
} else {
|
| 33 |
div.textContent = text;
|
| 34 |
}
|
|
|
|
| 28 |
div.className = `msg ${role}`;
|
| 29 |
if (role === 'sys' && details) {
|
| 30 |
// Показати повідомлення з розгортанням stack trace
|
| 31 |
+
div.innerHTML = `<span>${text}</span><pre class="error-details">${escapeHtml(details)}</pre>`;
|
| 32 |
} else {
|
| 33 |
div.textContent = text;
|
| 34 |
}
|