agentgui 1.0.611 → 1.0.613
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.js +9 -13
- package/static/index.html +46 -46
- package/static/js/streaming-renderer.js +30 -30
- package/static/js/ui-components.js +2 -2
- package/static/templates/agent-metadata-panel.html +2 -2
- package/static/templates/code-suggestion-panel.html +1 -1
- package/static/templates/error-recovery-options.html +1 -1
- package/static/templates/error-stack-trace.html +1 -1
- package/static/templates/error-summary.html +1 -1
- package/static/templates/file-diff-viewer.html +1 -1
- package/static/templates/file-read-panel.html +1 -1
- package/static/templates/file-write-panel.html +1 -1
- package/static/templates/git-diff-list.html +1 -1
- package/static/templates/git-status-panel.html +1 -1
- package/static/templates/terminal-output-panel.html +1 -1
- package/static/templates/test-results-display.html +2 -2
- package/static/theme.js +2 -0
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -39,7 +39,13 @@ process.on('unhandledRejection', (reason, promise) => {
|
|
|
39
39
|
if (reason instanceof Error) console.error(reason.stack);
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
process.on('SIGINT', () => {
|
|
42
|
+
process.on('SIGINT', () => {
|
|
43
|
+
console.log('[SIGNAL] SIGINT received - graceful shutdown');
|
|
44
|
+
try { pm2Manager.disconnect(); } catch (_) {}
|
|
45
|
+
stopACPTools().catch(() => {}).finally(() => {
|
|
46
|
+
try { wss.close(() => server.close(() => process.exit(0))); } catch (_) { process.exit(0); }
|
|
47
|
+
});
|
|
48
|
+
});
|
|
43
49
|
process.on('SIGHUP', () => { console.log('[SIGNAL] SIGHUP received (ignored - uncrashable)'); });
|
|
44
50
|
process.on('beforeExit', (code) => { console.log('[PROCESS] beforeExit with code:', code); });
|
|
45
51
|
process.on('exit', (code) => { console.log('[PROCESS] exit with code:', code); });
|
|
@@ -4493,18 +4499,8 @@ if (watch) {
|
|
|
4493
4499
|
process.on('SIGTERM', () => {
|
|
4494
4500
|
console.log('[SIGNAL] SIGTERM received - graceful shutdown');
|
|
4495
4501
|
try { pm2Manager.disconnect(); } catch (_) {}
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
wss.close(() => server.close(() => process.exit(0)));
|
|
4499
|
-
}).catch(() => {
|
|
4500
|
-
wss.close(() => server.close(() => process.exit(0)));
|
|
4501
|
-
});
|
|
4502
|
-
}).catch(() => {
|
|
4503
|
-
stopACPTools().then(() => {
|
|
4504
|
-
wss.close(() => server.close(() => process.exit(0)));
|
|
4505
|
-
}).catch(() => {
|
|
4506
|
-
wss.close(() => server.close(() => process.exit(0)));
|
|
4507
|
-
});
|
|
4502
|
+
stopACPTools().catch(() => {}).finally(() => {
|
|
4503
|
+
try { wss.close(() => server.close(() => process.exit(0))); } catch (_) { process.exit(0); }
|
|
4508
4504
|
});
|
|
4509
4505
|
});
|
|
4510
4506
|
|
package/static/index.html
CHANGED
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
html.dark {
|
|
46
|
-
--color-bg-primary: #
|
|
47
|
-
--color-bg-secondary: #
|
|
48
|
-
--color-text-primary: #
|
|
49
|
-
--color-text-secondary: #
|
|
50
|
-
--color-border: #
|
|
51
|
-
--color-primary: #
|
|
52
|
-
--color-primary-dark: #
|
|
46
|
+
--color-bg-primary: #1a1a1a;
|
|
47
|
+
--color-bg-secondary: #242424;
|
|
48
|
+
--color-text-primary: #e5e5e5;
|
|
49
|
+
--color-text-secondary: #a3a3a3;
|
|
50
|
+
--color-border: #333333;
|
|
51
|
+
--color-primary: #737373;
|
|
52
|
+
--color-primary-dark: #525252;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
html, body {
|
|
@@ -1007,7 +1007,7 @@
|
|
|
1007
1007
|
overflow-x: auto;
|
|
1008
1008
|
}
|
|
1009
1009
|
|
|
1010
|
-
html.dark .html-content { background: #
|
|
1010
|
+
html.dark .html-content { background: #262626; }
|
|
1011
1011
|
|
|
1012
1012
|
.html-content table { border-collapse: collapse; width: 100%; margin: 0.5rem 0; }
|
|
1013
1013
|
.html-content th, .html-content td { padding: 0.5rem 0.75rem; text-align: left; font-size: 0.875rem; }
|
|
@@ -1777,7 +1777,7 @@
|
|
|
1777
1777
|
background: #f3f4f6;
|
|
1778
1778
|
}
|
|
1779
1779
|
html.dark .folded-tool {
|
|
1780
|
-
background: #
|
|
1780
|
+
background: #262626;
|
|
1781
1781
|
}
|
|
1782
1782
|
.folded-tool-bar {
|
|
1783
1783
|
display: flex;
|
|
@@ -1793,7 +1793,7 @@
|
|
|
1793
1793
|
transition: background 0.15s;
|
|
1794
1794
|
}
|
|
1795
1795
|
html.dark .folded-tool-bar {
|
|
1796
|
-
background: #
|
|
1796
|
+
background: #404040;
|
|
1797
1797
|
}
|
|
1798
1798
|
.folded-tool-bar::-webkit-details-marker { display: none; }
|
|
1799
1799
|
.folded-tool-bar::marker { display: none; content: ''; }
|
|
@@ -1806,10 +1806,10 @@
|
|
|
1806
1806
|
color: #6b7280;
|
|
1807
1807
|
flex-shrink: 0;
|
|
1808
1808
|
}
|
|
1809
|
-
html.dark .folded-tool-bar::before { color: #
|
|
1809
|
+
html.dark .folded-tool-bar::before { color: #a3a3a3; }
|
|
1810
1810
|
.folded-tool[open] > .folded-tool-bar::before { transform: rotate(90deg); }
|
|
1811
1811
|
.folded-tool-bar:hover { background: #d1d5db; }
|
|
1812
|
-
html.dark .folded-tool-bar:hover { background: #
|
|
1812
|
+
html.dark .folded-tool-bar:hover { background: #525252; }
|
|
1813
1813
|
.folded-tool-icon {
|
|
1814
1814
|
display: flex;
|
|
1815
1815
|
align-items: center;
|
|
@@ -1818,7 +1818,7 @@
|
|
|
1818
1818
|
height: 1rem;
|
|
1819
1819
|
flex-shrink: 0;
|
|
1820
1820
|
}
|
|
1821
|
-
html.dark .folded-tool-icon { color: #
|
|
1821
|
+
html.dark .folded-tool-icon { color: #a3a3a3; }
|
|
1822
1822
|
.folded-tool-icon svg { width: 1rem; height: 1rem; }
|
|
1823
1823
|
.folded-tool-name {
|
|
1824
1824
|
font-weight: 600;
|
|
@@ -1827,7 +1827,7 @@
|
|
|
1827
1827
|
font-size: 0.8rem;
|
|
1828
1828
|
flex-shrink: 0;
|
|
1829
1829
|
}
|
|
1830
|
-
html.dark .folded-tool-name { color: #
|
|
1830
|
+
html.dark .folded-tool-name { color: #d4d4d4; }
|
|
1831
1831
|
.folded-tool-desc {
|
|
1832
1832
|
color: #6b7280;
|
|
1833
1833
|
font-family: 'Monaco','Menlo','Ubuntu Mono', monospace;
|
|
@@ -1839,13 +1839,13 @@
|
|
|
1839
1839
|
min-width: 0;
|
|
1840
1840
|
opacity: 0.8;
|
|
1841
1841
|
}
|
|
1842
|
-
html.dark .folded-tool-desc { color: #
|
|
1842
|
+
html.dark .folded-tool-desc { color: #a3a3a3; }
|
|
1843
1843
|
.folded-tool-body {
|
|
1844
1844
|
padding: 0.5rem 0.75rem;
|
|
1845
1845
|
font-size: 0.75rem;
|
|
1846
1846
|
border-top: 1px solid #d1d5db;
|
|
1847
1847
|
}
|
|
1848
|
-
html.dark .folded-tool-body { border-top-color: #
|
|
1848
|
+
html.dark .folded-tool-body { border-top-color: #525252; }
|
|
1849
1849
|
.folded-tool-body .tool-input-pre {
|
|
1850
1850
|
margin: 0;
|
|
1851
1851
|
padding: 0.375rem 0.5rem;
|
|
@@ -2126,9 +2126,9 @@
|
|
|
2126
2126
|
.block-type-tool_result .folded-tool-icon { color: #16a34a; }
|
|
2127
2127
|
html.dark .block-type-tool_result .folded-tool-icon { color: #4ade80; }
|
|
2128
2128
|
.block-type-tool_result .folded-tool-name { color: #374151; }
|
|
2129
|
-
html.dark .block-type-tool_result .folded-tool-name { color: #
|
|
2129
|
+
html.dark .block-type-tool_result .folded-tool-name { color: #d4d4d4; }
|
|
2130
2130
|
.block-type-tool_result > .folded-tool-body { border-top-color: #d1d5db; }
|
|
2131
|
-
html.dark .block-type-tool_result > .folded-tool-body { border-top-color: #
|
|
2131
|
+
html.dark .block-type-tool_result > .folded-tool-body { border-top-color: #525252; }
|
|
2132
2132
|
.block-type-tool_result.tool-result-error { }
|
|
2133
2133
|
html.dark .block-type-tool_result.tool-result-error { }
|
|
2134
2134
|
.block-type-tool_result.tool-result-error .tool-result-status { }
|
|
@@ -2136,7 +2136,7 @@
|
|
|
2136
2136
|
.block-type-tool_result.tool-result-error .folded-tool-icon { color: #dc2626; }
|
|
2137
2137
|
html.dark .block-type-tool_result.tool-result-error .folded-tool-icon { color: #f87171; }
|
|
2138
2138
|
.block-type-tool_result.tool-result-error .folded-tool-name { color: #374151; }
|
|
2139
|
-
html.dark .block-type-tool_result.tool-result-error .folded-tool-name { color: #
|
|
2139
|
+
html.dark .block-type-tool_result.tool-result-error .folded-tool-name { color: #d4d4d4; }
|
|
2140
2140
|
|
|
2141
2141
|
|
|
2142
2142
|
|
|
@@ -2230,12 +2230,12 @@
|
|
|
2230
2230
|
padding: 0.4rem 0.75rem;
|
|
2231
2231
|
}
|
|
2232
2232
|
html.dark .tool-result-success .tool-result-status {
|
|
2233
|
-
background: #
|
|
2233
|
+
background: #404040;
|
|
2234
2234
|
}
|
|
2235
2235
|
.tool-result-success .folded-tool-icon { color: #16a34a; }
|
|
2236
2236
|
html.dark .tool-result-success .folded-tool-icon { color: #4ade80; }
|
|
2237
2237
|
.tool-result-success .folded-tool-name { color: #374151; font-weight: 600; }
|
|
2238
|
-
html.dark .tool-result-success .folded-tool-name { color: #
|
|
2238
|
+
html.dark .tool-result-success .folded-tool-name { color: #d4d4d4; }
|
|
2239
2239
|
|
|
2240
2240
|
/* --- Tool_use parent: has-success / has-error indicators (icon/arrow only, preserves tool colors) --- */
|
|
2241
2241
|
.folded-tool.has-success > .folded-tool-bar::before { color: #16a34a; }
|
|
@@ -3007,31 +3007,31 @@
|
|
|
3007
3007
|
.toast-success { background: var(--color-success); color: white; }
|
|
3008
3008
|
.toast-error { background: var(--color-error); color: white; }
|
|
3009
3009
|
.toast-warning { background: var(--color-warning); color: white; }
|
|
3010
|
-
|
|
3011
|
-
.inline-code {
|
|
3012
|
-
background: #f3f4f6;
|
|
3013
|
-
padding: 0.125rem 0.375rem;
|
|
3014
|
-
border-radius: 0.25rem;
|
|
3015
|
-
font-size: 0.875rem;
|
|
3016
|
-
font-family: ui-monospace, monospace;
|
|
3017
|
-
color: #dc2626;
|
|
3018
|
-
}
|
|
3019
|
-
|
|
3020
|
-
html.dark .inline-code {
|
|
3021
|
-
background: #
|
|
3022
|
-
color: #f87171;
|
|
3023
|
-
}
|
|
3024
|
-
|
|
3025
|
-
.html-rendered-container {
|
|
3026
|
-
border-radius: 0.5rem;
|
|
3027
|
-
overflow: hidden;
|
|
3028
|
-
border: 1px solid #e5e7eb;
|
|
3029
|
-
}
|
|
3030
|
-
|
|
3031
|
-
html.dark .html-rendered-container {
|
|
3032
|
-
border-color: #
|
|
3033
|
-
}
|
|
3034
|
-
|
|
3010
|
+
|
|
3011
|
+
.inline-code {
|
|
3012
|
+
background: #f3f4f6;
|
|
3013
|
+
padding: 0.125rem 0.375rem;
|
|
3014
|
+
border-radius: 0.25rem;
|
|
3015
|
+
font-size: 0.875rem;
|
|
3016
|
+
font-family: ui-monospace, monospace;
|
|
3017
|
+
color: #dc2626;
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
html.dark .inline-code {
|
|
3021
|
+
background: #262626;
|
|
3022
|
+
color: #f87171;
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
.html-rendered-container {
|
|
3026
|
+
border-radius: 0.5rem;
|
|
3027
|
+
overflow: hidden;
|
|
3028
|
+
border: 1px solid #e5e7eb;
|
|
3029
|
+
}
|
|
3030
|
+
|
|
3031
|
+
html.dark .html-rendered-container {
|
|
3032
|
+
border-color: #262626;
|
|
3033
|
+
}
|
|
3034
|
+
|
|
3035
3035
|
</style>
|
|
3036
3036
|
<link rel="stylesheet" href="/gm/css/tools-popup.css">
|
|
3037
3037
|
</head>
|
|
@@ -453,17 +453,17 @@ class StreamingRenderer {
|
|
|
453
453
|
let html = this.escapeHtml(text);
|
|
454
454
|
|
|
455
455
|
// Render markdown bold: **text** -> <strong>text</strong>
|
|
456
|
-
html = html.replace(/\*\*([^*]+)\*\*/g, '<strong class="font-semibold text-
|
|
456
|
+
html = html.replace(/\*\*([^*]+)\*\*/g, '<strong class="font-semibold text-base-content">$1</strong>');
|
|
457
457
|
|
|
458
458
|
// Render markdown italic: *text* or _text_
|
|
459
|
-
html = html.replace(/\*([^*]+)\*/g, '<em class="italic text-
|
|
460
|
-
html = html.replace(/_([^_]+)_/g, '<em class="italic text-
|
|
459
|
+
html = html.replace(/\*([^*]+)\*/g, '<em class="italic text-base-content/70">$1</em>');
|
|
460
|
+
html = html.replace(/_([^_]+)_/g, '<em class="italic text-base-content/70">$1</em>');
|
|
461
461
|
|
|
462
462
|
// Render inline code: `code`
|
|
463
463
|
html = html.replace(/`([^`]+)`/g, '<code class="inline-code">$1</code>');
|
|
464
464
|
|
|
465
465
|
// Render markdown links: [text](url)
|
|
466
|
-
html = html.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" class="
|
|
466
|
+
html = html.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" class="link link-primary" target="_blank">$1</a>');
|
|
467
467
|
|
|
468
468
|
// Convert line breaks
|
|
469
469
|
html = html.replace(/\n/g, '<br>');
|
|
@@ -1565,20 +1565,20 @@ class StreamingRenderer {
|
|
|
1565
1565
|
*/
|
|
1566
1566
|
renderStreamingStart(event) {
|
|
1567
1567
|
const div = document.createElement('div');
|
|
1568
|
-
div.className = 'event-streaming-start card mb-3 p-4
|
|
1568
|
+
div.className = 'event-streaming-start card mb-3 p-4 alert alert-info';
|
|
1569
1569
|
div.dataset.eventId = event.id || event.sessionId || '';
|
|
1570
1570
|
div.dataset.eventType = 'streaming_start';
|
|
1571
1571
|
|
|
1572
1572
|
const time = new Date(event.timestamp).toLocaleTimeString();
|
|
1573
1573
|
div.innerHTML = `
|
|
1574
1574
|
<div class="flex items-center gap-2">
|
|
1575
|
-
<svg class="w-5 h-5 text-
|
|
1575
|
+
<svg class="w-5 h-5 text-info animate-spin" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1576
1576
|
<circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="2" fill="none" opacity="0.25"></circle>
|
|
1577
1577
|
<path d="M4 12a8 8 0 018-8" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path>
|
|
1578
1578
|
</svg>
|
|
1579
1579
|
<div class="flex-1">
|
|
1580
|
-
<h4 class="font-semibold text-
|
|
1581
|
-
<p class="text-sm text-
|
|
1580
|
+
<h4 class="font-semibold text-info-content">Streaming Started</h4>
|
|
1581
|
+
<p class="text-sm text-info-content/70">${time}</p>
|
|
1582
1582
|
</div>
|
|
1583
1583
|
</div>
|
|
1584
1584
|
`;
|
|
@@ -1604,8 +1604,8 @@ class StreamingRenderer {
|
|
|
1604
1604
|
div.innerHTML = `
|
|
1605
1605
|
<div class="flex items-center gap-2 text-sm">
|
|
1606
1606
|
<span class="text-secondary">${percentage}%</span>
|
|
1607
|
-
<div class="
|
|
1608
|
-
<div class="
|
|
1607
|
+
<div class="progress progress-primary flex-1">
|
|
1608
|
+
<div class="progress-bar" style="width: ${percentage}%"></div>
|
|
1609
1609
|
</div>
|
|
1610
1610
|
</div>
|
|
1611
1611
|
`;
|
|
@@ -1617,7 +1617,7 @@ class StreamingRenderer {
|
|
|
1617
1617
|
*/
|
|
1618
1618
|
renderStreamingComplete(event) {
|
|
1619
1619
|
const div = document.createElement('div');
|
|
1620
|
-
div.className = 'event-streaming-complete card mb-3 p-4
|
|
1620
|
+
div.className = 'event-streaming-complete card mb-3 p-4 alert alert-success rounded-lg';
|
|
1621
1621
|
div.dataset.eventId = event.id || event.sessionId || '';
|
|
1622
1622
|
div.dataset.eventType = 'streaming_complete';
|
|
1623
1623
|
|
|
@@ -1627,19 +1627,19 @@ class StreamingRenderer {
|
|
|
1627
1627
|
div.innerHTML = `
|
|
1628
1628
|
<div class="flex items-start gap-3">
|
|
1629
1629
|
<div class="flex-shrink-0 mt-0.5">
|
|
1630
|
-
<svg class="w-6 h-6 text-
|
|
1630
|
+
<svg class="w-6 h-6 text-success animate-bounce" fill="currentColor" viewBox="0 0 20 20">
|
|
1631
1631
|
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path>
|
|
1632
1632
|
</svg>
|
|
1633
1633
|
</div>
|
|
1634
1634
|
<div class="flex-1">
|
|
1635
|
-
<h4 class="font-bold text-lg text-
|
|
1635
|
+
<h4 class="font-bold text-lg text-success-content">✨ Execution Complete</h4>
|
|
1636
1636
|
<div class="mt-2 grid grid-cols-2 gap-3 text-sm">
|
|
1637
1637
|
<div>
|
|
1638
|
-
<span class="text-
|
|
1639
|
-
<span class="text-
|
|
1638
|
+
<span class="text-success font-semibold">${eventCount}</span>
|
|
1639
|
+
<span class="text-success/70">events processed</span>
|
|
1640
1640
|
</div>
|
|
1641
1641
|
<div class="text-right">
|
|
1642
|
-
<span class="text-
|
|
1642
|
+
<span class="text-success/70">${time}</span>
|
|
1643
1643
|
</div>
|
|
1644
1644
|
</div>
|
|
1645
1645
|
</div>
|
|
@@ -1764,7 +1764,7 @@ class StreamingRenderer {
|
|
|
1764
1764
|
|
|
1765
1765
|
div.innerHTML = `
|
|
1766
1766
|
<div class="flex items-center gap-3 mb-2">
|
|
1767
|
-
<svg class="w-4 h-4 text-
|
|
1767
|
+
<svg class="w-4 h-4 text-warning" fill="currentColor" viewBox="0 0 20 20">
|
|
1768
1768
|
<path fill-rule="evenodd" d="M9.243 3.03a1 1 0 01.727 1.155L9.53 6h2.94l.56-2.243a1 1 0 111.94.486L14.53 6H17a1 1 0 110 2h-2.97l-.5 2H17a1 1 0 110 2h-3.03l-.56 2.243a1 1 0 11-1.94-.486L12.47 14H9.53l-.56 2.243a1 1 0 11-1.94-.486L7.47 14H4a1 1 0 110-2h3.03l.5-2H4a1 1 0 110-2h2.97l.56-2.243a1 1 0 011.155-.727zM9.03 8l.5 2h2.94l-.5-2H9.03z" clip-rule="evenodd"></path>
|
|
1769
1769
|
</svg>
|
|
1770
1770
|
<div class="flex-1">
|
|
@@ -1773,9 +1773,9 @@ class StreamingRenderer {
|
|
|
1773
1773
|
</div>
|
|
1774
1774
|
</div>
|
|
1775
1775
|
<div class="flex gap-4 text-xs">
|
|
1776
|
-
${changes.added ? `<span class="text-
|
|
1777
|
-
${changes.modified ? `<span class="text-
|
|
1778
|
-
${changes.deleted ? `<span class="text-
|
|
1776
|
+
${changes.added ? `<span class="text-success">+${changes.added}</span>` : ''}
|
|
1777
|
+
${changes.modified ? `<span class="text-info">~${changes.modified}</span>` : ''}
|
|
1778
|
+
${changes.deleted ? `<span class="text-error">-${changes.deleted}</span>` : ''}
|
|
1779
1779
|
${total === 0 ? '<span class="text-secondary">no changes</span>' : ''}
|
|
1780
1780
|
</div>
|
|
1781
1781
|
`;
|
|
@@ -1897,16 +1897,16 @@ class StreamingRenderer {
|
|
|
1897
1897
|
if (part.type === 'html') {
|
|
1898
1898
|
html += `<div class="html-content mb-3">${part.content}</div>`;
|
|
1899
1899
|
} else if (part.type === 'text') {
|
|
1900
|
-
html += `<div class="
|
|
1900
|
+
html += `<div class="card card-body mb-3 leading-relaxed text-sm">${this.parseAndRenderMarkdown(part.content)}</div>`;
|
|
1901
1901
|
} else if (part.type === 'code') {
|
|
1902
1902
|
if (part.language.toLowerCase() === 'html') {
|
|
1903
1903
|
html += `<div class="html-rendered-container mb-3">
|
|
1904
1904
|
<div class="html-rendered-label">Rendered HTML</div>
|
|
1905
|
-
<div class="html-content bg-
|
|
1905
|
+
<div class="html-content bg-base-100 p-4 overflow-x-auto">${part.code}</div>
|
|
1906
1906
|
</div>`;
|
|
1907
1907
|
} else {
|
|
1908
1908
|
const partLineCount = part.code.split('\n').length;
|
|
1909
|
-
html += `<div class="mb-3 rounded-lg overflow-hidden
|
|
1909
|
+
html += `<div class="card mb-3 rounded-lg overflow-hidden">
|
|
1910
1910
|
<details class="collapsible-code">
|
|
1911
1911
|
<summary class="collapsible-code-summary">
|
|
1912
1912
|
<span>${this.escapeHtml(part.language)} - ${partLineCount} line${partLineCount !== 1 ? 's' : ''}</span>
|
|
@@ -1916,7 +1916,7 @@ class StreamingRenderer {
|
|
|
1916
1916
|
</svg>
|
|
1917
1917
|
</button>
|
|
1918
1918
|
</summary>
|
|
1919
|
-
<pre class="bg-
|
|
1919
|
+
<pre class="bg-base-300 text-base-content p-4 overflow-x-auto" style="margin:0;border-radius:0 0 0.375rem 0.375rem"><code class="language-${this.escapeHtml(part.language)}">${this.escapeHtml(part.code)}</code></pre>
|
|
1920
1920
|
</details>
|
|
1921
1921
|
</div>`;
|
|
1922
1922
|
}
|
|
@@ -1957,7 +1957,7 @@ class StreamingRenderer {
|
|
|
1957
1957
|
// Render HTML code blocks as actual HTML elements
|
|
1958
1958
|
if (language === 'html') {
|
|
1959
1959
|
div.innerHTML = `
|
|
1960
|
-
<div class="html-rendered-container alert-info text-xs mb-2
|
|
1960
|
+
<div class="html-rendered-container alert alert-info text-xs mb-2">
|
|
1961
1961
|
Rendered HTML
|
|
1962
1962
|
</div>
|
|
1963
1963
|
<div class="html-content">
|
|
@@ -1969,7 +1969,7 @@ class StreamingRenderer {
|
|
|
1969
1969
|
div.innerHTML = `
|
|
1970
1970
|
<details class="collapsible-code">
|
|
1971
1971
|
<summary class="collapsible-code-summary">${this.escapeHtml(language)} - ${codeLineCount} line${codeLineCount !== 1 ? 's' : ''}</summary>
|
|
1972
|
-
<pre class="bg-
|
|
1972
|
+
<pre class="bg-base-300 text-base-content p-4 overflow-x-auto" style="margin:0;border-radius:0 0 0.375rem 0.375rem"><code class="language-${this.escapeHtml(language)}">${this.escapeHtml(code)}</code></pre>
|
|
1973
1973
|
</details>
|
|
1974
1974
|
`;
|
|
1975
1975
|
}
|
|
@@ -1981,15 +1981,15 @@ class StreamingRenderer {
|
|
|
1981
1981
|
*/
|
|
1982
1982
|
renderThinking(event) {
|
|
1983
1983
|
const div = document.createElement('div');
|
|
1984
|
-
div.className = 'event-thinking mb-3 p-4
|
|
1984
|
+
div.className = 'event-thinking mb-3 p-4 alert rounded';
|
|
1985
1985
|
div.dataset.eventId = event.id || '';
|
|
1986
1986
|
div.dataset.eventType = 'thinking_block';
|
|
1987
1987
|
|
|
1988
1988
|
const text = event.thinking || event.content || '';
|
|
1989
1989
|
div.innerHTML = `
|
|
1990
1990
|
<details>
|
|
1991
|
-
<summary class="cursor-pointer font-semibold text-
|
|
1992
|
-
<p class="mt-3 text-sm text-
|
|
1991
|
+
<summary class="cursor-pointer font-semibold text-base-content">Thinking</summary>
|
|
1992
|
+
<p class="mt-3 text-sm text-base-content/80 whitespace-pre-wrap">${this.escapeHtml(text)}</p>
|
|
1993
1993
|
</details>
|
|
1994
1994
|
`;
|
|
1995
1995
|
return div;
|
|
@@ -2024,7 +2024,7 @@ class StreamingRenderer {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
|
|
2026
2026
|
const div = document.createElement('div');
|
|
2027
|
-
div.className = 'event-generic mb-3 p-3 bg-
|
|
2027
|
+
div.className = 'event-generic mb-3 p-3 bg-base-200 rounded text-sm';
|
|
2028
2028
|
div.dataset.eventId = event.id || '';
|
|
2029
2029
|
div.dataset.eventType = event.type;
|
|
2030
2030
|
|
|
@@ -194,7 +194,7 @@ class UIComponents {
|
|
|
194
194
|
container.className = 'flex items-center gap-3 justify-center p-4';
|
|
195
195
|
container.innerHTML = `
|
|
196
196
|
<div class="spinner-simple spinner-primary ${sizeClasses[size] || sizeClasses['medium']}"></div>
|
|
197
|
-
<span class="text-
|
|
197
|
+
<span class="text-base-content">${UIComponents.escapeHtml(text)}</span>
|
|
198
198
|
`;
|
|
199
199
|
return container;
|
|
200
200
|
}
|
|
@@ -240,7 +240,7 @@ class UIComponents {
|
|
|
240
240
|
|
|
241
241
|
container.innerHTML = `
|
|
242
242
|
<details ${isOpen ? 'open' : ''}>
|
|
243
|
-
<summary class="cursor-pointer font-semibold hover:bg-
|
|
243
|
+
<summary class="cursor-pointer font-semibold hover:bg-base-200 px-2 py-1 rounded transition-colors">
|
|
244
244
|
${UIComponents.escapeHtml(title)}
|
|
245
245
|
</summary>
|
|
246
246
|
<div class="content mt-2 ml-4">
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- Agent Metadata Panel with Status Badge -->
|
|
2
2
|
<div class="agent-metadata-card card" role="region" aria-label="Agent Status and Metadata">
|
|
3
|
-
<div class="card-header
|
|
3
|
+
<div class="card-header gap-3">
|
|
4
4
|
<div class="flex items-center gap-3">
|
|
5
|
-
<div class="
|
|
5
|
+
<div class="avatar avatar-ring avatar-square bg-primary text-white" aria-hidden="true">
|
|
6
6
|
{{ agentIcon }}
|
|
7
7
|
</div>
|
|
8
8
|
<div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Code Suggestion Panel with Before/After -->
|
|
2
2
|
<div class="code-suggestion-panel card" role="region" aria-label="Code suggestion">
|
|
3
|
-
<div class="card-header
|
|
3
|
+
<div class="card-header mb-3 pb-3 border-b">
|
|
4
4
|
<div class="flex-1">
|
|
5
5
|
<h4 class="font-semibold">{{ suggestionTitle }}</h4>
|
|
6
6
|
<p class="text-xs text-secondary mt-1">In {{ fileName }} at line {{ lineNumber }}</p>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
</div>
|
|
41
41
|
|
|
42
42
|
<!-- Recovery Info -->
|
|
43
|
-
<div class="recovery-info text-xs text-secondary mt-3 pt-3
|
|
43
|
+
<div class="recovery-info text-xs text-secondary mt-3 pt-3 divider-y space-y-1">
|
|
44
44
|
<p><strong>Error ID:</strong> <code class="font-mono">{{ errorId }}</code></p>
|
|
45
45
|
<p><strong>Last Checkpoint:</strong> {{ checkpointTime }}</p>
|
|
46
46
|
{{ if suggestedAction }}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Error Stack Trace Display (Collapsible) -->
|
|
2
2
|
<div class="error-stack-trace">
|
|
3
3
|
<details class="stack-trace-accordion card">
|
|
4
|
-
<summary class="cursor-pointer font-semibold py-3 px-4 border-b flex items-center gap-2 hover:bg-
|
|
4
|
+
<summary class="cursor-pointer font-semibold py-3 px-4 border-b flex items-center gap-2 hover:bg-base-200">
|
|
5
5
|
<svg class="w-4 h-4 chevron" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
|
|
6
6
|
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"/>
|
|
7
7
|
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Error Summary Card -->
|
|
2
2
|
<div class="error-summary card" role="region" aria-label="Error summary">
|
|
3
|
-
<div class="card-header
|
|
3
|
+
<div class="card-header mb-3 pb-3 border-b">
|
|
4
4
|
<div class="flex-1">
|
|
5
5
|
<h4 class="font-semibold">Error: {{ errorType }}</h4>
|
|
6
6
|
<p class="text-sm text-secondary mt-1">{{ errorCode }}</p>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- File Diff Visualization Panel -->
|
|
2
2
|
<div class="file-diff-viewer card" role="region" aria-label="Code diff viewer">
|
|
3
|
-
<div class="card-header
|
|
3
|
+
<div class="card-header mb-3 pb-3 border-b">
|
|
4
4
|
<h4 class="font-semibold">Changes in {{ fileName }}</h4>
|
|
5
5
|
<div class="flex gap-2">
|
|
6
6
|
<button class="btn-icon" data-view="unified" title="Unified diff view" aria-label="Show unified diff">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- File Read Operation Display -->
|
|
2
2
|
<div class="file-read-panel card" role="region" aria-label="File read operation: {{ filePath }}">
|
|
3
|
-
<div class="card-header
|
|
3
|
+
<div class="card-header gap-3 mb-3 pb-3 border-b">
|
|
4
4
|
<div class="flex items-center gap-2 flex-1 min-w-0">
|
|
5
5
|
<svg class="w-4 h-4 text-primary flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
|
|
6
6
|
<path d="M5.5 13a3 3 0 01.369-1.618l1.83-1.83a3 3 0 015.604 0l.83 1.83A3 3 0 0113.5 13H11V9.413l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 001.414 1.414L9 9.414V13H5.5z"/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- File Write Operation Display with Before/After Comparison -->
|
|
2
2
|
<div class="file-write-panel card" role="region" aria-label="File write operation: {{ filePath }}">
|
|
3
|
-
<div class="card-header
|
|
3
|
+
<div class="card-header gap-3 mb-3 pb-3 border-b">
|
|
4
4
|
<div class="flex items-center gap-2 flex-1 min-w-0">
|
|
5
5
|
<svg class="w-4 h-4 text-primary flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
|
|
6
6
|
<path d="M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM15.657 14.243a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM11 17a1 1 0 102 0v-1a1 1 0 10-2 0v1zM5.757 15.657a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414l-.707.707zM2 10a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.757 4.343a1 1 0 00-1.414 1.414l.707.707a1 1 0 001.414-1.414l-.707-.707z"/>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div class="diff-items space-y-3">
|
|
9
9
|
{{ for file in diffs }}
|
|
10
10
|
<details class="diff-item">
|
|
11
|
-
<summary class="cursor-pointer font-medium py-2 px-3 bg-
|
|
11
|
+
<summary class="cursor-pointer font-medium py-2 px-3 bg-base-200 hover:bg-base-300 rounded flex items-center justify-between">
|
|
12
12
|
<div class="flex items-center gap-2 flex-1 min-w-0">
|
|
13
13
|
<svg class="w-4 h-4 chevron" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
|
|
14
14
|
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Git Status Panel -->
|
|
2
2
|
<div class="git-status-panel card" role="region" aria-label="Git repository status">
|
|
3
|
-
<div class="card-header
|
|
3
|
+
<div class="card-header mb-3 pb-3 border-b">
|
|
4
4
|
<div>
|
|
5
5
|
<h4 class="font-semibold">{{ repoName }}</h4>
|
|
6
6
|
<p class="text-xs text-secondary">{{ currentBranch }} @ {{ commitHash }}</p>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Terminal-like Output Panel with ANSI Color Support -->
|
|
2
2
|
<div class="terminal-output-panel card" role="region" aria-label="Terminal output">
|
|
3
|
-
<div class="card-header
|
|
3
|
+
<div class="card-header mb-3 pb-3 border-b">
|
|
4
4
|
<div>
|
|
5
5
|
<h4 class="font-semibold text-sm">{{ commandName }}</h4>
|
|
6
6
|
<p class="text-xs text-secondary font-mono">$ {{ command }}</p>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Test Results Display -->
|
|
2
2
|
<div class="test-results-display card" role="region" aria-label="Test execution results">
|
|
3
|
-
<div class="card-header
|
|
3
|
+
<div class="card-header mb-3 pb-3 border-b">
|
|
4
4
|
<h4 class="font-semibold">Test Results</h4>
|
|
5
5
|
<div class="test-summary flex gap-2">
|
|
6
6
|
<span class="badge-result passed" aria-label="Passed tests">{{ passedCount }}</span>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<div class="test-list space-y-1">
|
|
34
34
|
{{ for suite in testSuites }}
|
|
35
35
|
<details class="test-suite">
|
|
36
|
-
<summary class="cursor-pointer py-2 px-3 rounded hover:bg-
|
|
36
|
+
<summary class="cursor-pointer py-2 px-3 rounded hover:bg-base-200 flex items-center gap-2">
|
|
37
37
|
<svg class="w-4 h-4 chevron" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
|
|
38
38
|
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"/>
|
|
39
39
|
</svg>
|
package/static/theme.js
CHANGED
|
@@ -40,6 +40,8 @@ class ThemeManager {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
document.documentElement.setAttribute('data-theme', theme);
|
|
43
|
+
document.documentElement.classList.remove('light', 'dark');
|
|
44
|
+
document.documentElement.classList.add(theme);
|
|
43
45
|
localStorage.setItem(this.THEME_KEY, theme);
|
|
44
46
|
this.updateThemeIcon(theme);
|
|
45
47
|
}
|