Massive style changes

This commit is contained in:
Meleki committed 2026-02-27 23:39:06 +01:00
1 parent bd34d119b5
commit b07e776b7a
16 files changed
+235 -217

No files matched your search

+3 -12
View File
@@ -52,7 +52,7 @@ function addErrorBubble(text, streamed = false) {
const div = document.createElement('div');
div.className = 'msg system-info';
if (streamed) div.classList.add('streamed');
div.style.color = '#ff6b6b';
div.style.color = 'var(--dangerous)';
div.textContent = (text || '').trim();
chatEl().appendChild(div);
scrollDown();
@@ -62,7 +62,7 @@ function addWarningBubble(text, streamed = false) {
const div = document.createElement('div');
div.className = 'msg system-info';
if (streamed) div.classList.add('streamed');
div.style.color = '#f0a500';
div.style.color = 'var(--warning)';
div.textContent = (text || '').trim();
chatEl().appendChild(div);
scrollDown();
@@ -243,13 +243,11 @@ function buildEditDiff(oldText, newText) {
function buildWritePreview(content) {
const lines = content.split('\n');
const maxLines = 20;
const shown = lines.slice(0, maxLines);
const container = document.createElement('div');
container.className = 'tool-diff';
for (const line of shown) {
for (const line of lines) {
const row = document.createElement('div');
row.className = 'diff-line diff-added';
const marker = document.createElement('span');
@@ -263,13 +261,6 @@ function buildWritePreview(content) {
container.appendChild(row);
}
if (lines.length > maxLines) {
const more = document.createElement('div');
more.className = 'diff-more';
more.textContent = '… ' + (lines.length - maxLines) + ' weitere Zeilen';
container.appendChild(more);
}
return container;
}