@farazirfan/costar-server-executor 1.7.44 → 1.7.45
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/public/index.html +55 -58
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -1313,7 +1313,7 @@
|
|
|
1313
1313
|
|
|
1314
1314
|
<!-- Parsed conversation view -->
|
|
1315
1315
|
<div id="sessions-parsed-view" style="max-height:70vh;overflow:auto;padding:8px 0;">
|
|
1316
|
-
<div id="sessions-parsed-content" style="display:flex;flex-direction:column;gap:
|
|
1316
|
+
<div id="sessions-parsed-content" style="display:flex;flex-direction:column;gap:2px;">
|
|
1317
1317
|
<div class="loading-center"><div class="spinner"></div></div>
|
|
1318
1318
|
</div>
|
|
1319
1319
|
</div>
|
|
@@ -2679,96 +2679,93 @@
|
|
|
2679
2679
|
const el = document.getElementById('sessions-parsed-content');
|
|
2680
2680
|
let html = '';
|
|
2681
2681
|
|
|
2682
|
-
// Session header
|
|
2682
|
+
// Session header — single line
|
|
2683
2683
|
if (data.session) {
|
|
2684
|
-
html += `<div style="padding:8px
|
|
2685
|
-
|
|
2684
|
+
html += `<div style="padding:3px 8px;font-size:10px;color:var(--text-muted);font-family:var(--mono);border-bottom:1px solid var(--border);">
|
|
2685
|
+
${escHtml(data.session.id || '').slice(0,8)}.. | v${data.session.version || '?'} | ${escHtml(data.session.cwd || '')} | ${new Date(data.session.timestamp || '').toLocaleString()}
|
|
2686
2686
|
</div>`;
|
|
2687
2687
|
}
|
|
2688
2688
|
|
|
2689
|
-
// Track if we've shown the context boundary divider
|
|
2690
2689
|
let shownContextBoundary = false;
|
|
2691
2690
|
let lastWasOutOfContext = false;
|
|
2692
2691
|
|
|
2693
|
-
// Turns
|
|
2694
2692
|
const turns = data.turns || [];
|
|
2695
2693
|
for (let i = 0; i < turns.length; i++) {
|
|
2696
2694
|
const turn = turns[i];
|
|
2697
2695
|
const time = new Date(turn.timestamp);
|
|
2698
2696
|
const timeStr = time.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
|
2699
2697
|
const dateStr = time.toLocaleDateString([], { month: 'short', day: 'numeric' });
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
const tokensStr = turn.usage ? `${(turn.usage.totalTokens || 0).toLocaleString()} tok` : '';
|
|
2704
|
-
|
|
2705
|
-
// Show context boundary: compaction divider when transitioning from out-of-context to in-context
|
|
2706
|
-
if (!turn.inContext && data.hasCompaction) {
|
|
2707
|
-
lastWasOutOfContext = true;
|
|
2708
|
-
}
|
|
2698
|
+
|
|
2699
|
+
// Context boundary
|
|
2700
|
+
if (!turn.inContext && data.hasCompaction) lastWasOutOfContext = true;
|
|
2709
2701
|
if (turn.inContext && lastWasOutOfContext && !shownContextBoundary) {
|
|
2710
2702
|
shownContextBoundary = true;
|
|
2711
|
-
// Show compaction summary
|
|
2712
2703
|
if (data.compactions && data.compactions.length > 0) {
|
|
2713
|
-
const c = data.compactions[data.compactions.length - 1];
|
|
2714
|
-
html += `<div style="padding:
|
|
2715
|
-
<
|
|
2716
|
-
<
|
|
2704
|
+
const c = data.compactions[data.compactions.length - 1];
|
|
2705
|
+
html += `<div style="padding:4px 8px;background:#a855f712;border-left:2px solid #a855f7;margin:2px 0;font-size:10px;">
|
|
2706
|
+
<span style="color:#a855f7;font-weight:600;">COMPACTION</span>
|
|
2707
|
+
<span style="color:var(--text-muted);"> ${new Date(c.timestamp).toLocaleString()}${c.tokensBefore ? ' \u2014 ' + c.tokensBefore.toLocaleString() + ' tok' : ''}</span>
|
|
2708
|
+
<div style="color:var(--text-secondary);margin-top:2px;line-height:1.3;white-space:pre-wrap;max-height:80px;overflow:hidden;">${escHtml(c.summary || '').slice(0, 500)}${(c.summary || '').length > 500 ? '...' : ''}</div>
|
|
2717
2709
|
</div>`;
|
|
2718
2710
|
}
|
|
2719
|
-
html += `<div style="display:flex;align-items:center;gap:
|
|
2720
|
-
<div style="flex:1;height:1px;background:#
|
|
2721
|
-
<span style="font-size:
|
|
2722
|
-
<div style="flex:1;height:1px;background:#
|
|
2711
|
+
html += `<div style="display:flex;align-items:center;gap:6px;margin:2px 0;">
|
|
2712
|
+
<div style="flex:1;height:1px;background:#10b98140;"></div>
|
|
2713
|
+
<span style="font-size:9px;color:#10b981;font-weight:700;letter-spacing:0.5px;">ACTIVE CONTEXT</span>
|
|
2714
|
+
<div style="flex:1;height:1px;background:#10b98140;"></div>
|
|
2723
2715
|
</div>`;
|
|
2724
2716
|
}
|
|
2725
2717
|
|
|
2726
|
-
const
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2718
|
+
const dim = !turn.inContext && data.hasCompaction ? 'opacity:0.35;' : '';
|
|
2719
|
+
const hbBadge = turn.isHeartbeat ? '<span style="color:#f59e0b;font-size:8px;font-weight:700;margin-left:3px;">HB</span>' : '';
|
|
2720
|
+
const compBadge = !turn.inContext && data.hasCompaction ? '<span style="color:#ef4444;font-size:8px;margin-left:3px;">OLD</span>' : '';
|
|
2721
|
+
|
|
2722
|
+
// Tool calls summary — inline
|
|
2723
|
+
const toolStr = turn.toolCalls && turn.toolCalls.length > 0
|
|
2724
|
+
? turn.toolCalls.map(tc => tc.name).join(', ')
|
|
2725
|
+
: '';
|
|
2726
|
+
|
|
2727
|
+
// Tokens / cost
|
|
2728
|
+
const metaRight = [];
|
|
2729
|
+
if (turn.model) metaRight.push(escHtml(turn.model).replace('claude-', '').replace('-20250514',''));
|
|
2730
|
+
if (turn.usage) metaRight.push((turn.usage.totalTokens || 0).toLocaleString() + 't');
|
|
2731
|
+
if (turn.usage?.cost) metaRight.push('$' + turn.usage.cost.toFixed(3));
|
|
2732
|
+
|
|
2733
|
+
// Single compact turn block
|
|
2734
|
+
html += `<div style="border-left:2px solid var(--accent);padding:3px 8px;${dim}">`;
|
|
2735
|
+
|
|
2736
|
+
// Header line: #N time USER message-preview
|
|
2737
|
+
const userPreview = escHtml(turn.userMessage).replace(/\n/g, ' ').slice(0, 120);
|
|
2738
|
+
html += `<div style="display:flex;justify-content:space-between;align-items:baseline;gap:4px;">
|
|
2739
|
+
<div style="font-size:10px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">
|
|
2740
|
+
<span style="color:var(--text-muted);font-family:var(--mono);">#${turn.turnNumber}</span>
|
|
2741
|
+
<span style="color:var(--text-muted);font-family:var(--mono);margin:0 2px;">${dateStr} ${timeStr}</span>${hbBadge}${compBadge}
|
|
2742
|
+
<span style="color:var(--accent);font-weight:600;margin-left:3px;">USER</span>
|
|
2743
|
+
<span style="color:var(--text-primary);margin-left:4px;">${userPreview}</span>
|
|
2735
2744
|
</div>
|
|
2736
|
-
<div style="font-size:
|
|
2745
|
+
<div style="font-size:9px;color:var(--text-muted);white-space:nowrap;flex-shrink:0;">${metaRight.join(' \u00b7 ')}</div>
|
|
2737
2746
|
</div>`;
|
|
2738
2747
|
|
|
2739
|
-
// Tool calls
|
|
2740
|
-
if (
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
const resultStr = tc.result ? escHtml(tc.result) : '<span style="color:var(--text-muted);">no result</span>';
|
|
2744
|
-
return `<div style="padding:4px 0;border-bottom:1px solid var(--border);">
|
|
2745
|
-
<code style="font-size:11px;color:#3b82f6;font-weight:600;">${escHtml(tc.name)}</code>
|
|
2746
|
-
${inputStr ? `<div style="font-size:11px;color:var(--text-muted);margin-top:2px;font-family:var(--mono);white-space:pre-wrap;max-height:60px;overflow:hidden;">${inputStr}</div>` : ''}
|
|
2747
|
-
<div style="font-size:11px;color:var(--text-secondary);margin-top:2px;font-family:var(--mono);white-space:pre-wrap;max-height:60px;overflow:hidden;">${resultStr}</div>
|
|
2748
|
-
</div>`;
|
|
2749
|
-
}).join('');
|
|
2750
|
-
|
|
2751
|
-
html += `<div style="padding:6px 12px;background:#3b82f610;border-left:3px solid #3b82f6;border-radius:4px;${dimStyle}">
|
|
2752
|
-
<div style="font-size:10px;color:#3b82f6;font-weight:600;margin-bottom:4px;">${turn.toolCalls.length} TOOL CALL${turn.toolCalls.length > 1 ? 'S' : ''}</div>
|
|
2753
|
-
${toolsHtml}
|
|
2748
|
+
// Tool calls — collapsed single line
|
|
2749
|
+
if (toolStr) {
|
|
2750
|
+
html += `<div style="font-size:9px;color:#3b82f6;font-family:var(--mono);padding:1px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">
|
|
2751
|
+
\u2514 ${turn.toolCalls.length} tool${turn.toolCalls.length > 1 ? 's' : ''}: ${escHtml(toolStr).slice(0, 100)}
|
|
2754
2752
|
</div>`;
|
|
2755
2753
|
}
|
|
2756
2754
|
|
|
2757
|
-
// Assistant response
|
|
2755
|
+
// Assistant response — single line preview
|
|
2758
2756
|
if (turn.assistantMessages && turn.assistantMessages.length > 0) {
|
|
2759
|
-
const
|
|
2760
|
-
html += `<div style="padding:
|
|
2761
|
-
<
|
|
2762
|
-
|
|
2763
|
-
<div style="font-size:10px;color:var(--text-muted);">${tokensStr}${costStr ? ' \u00b7 ' + costStr : ''}</div>
|
|
2764
|
-
</div>
|
|
2765
|
-
<div style="font-size:12px;white-space:pre-wrap;color:var(--text-primary);line-height:1.4;">${escHtml(fullText).slice(0, 2000)}${fullText.length > 2000 ? '...' : ''}</div>
|
|
2757
|
+
const aPreview = escHtml(turn.assistantMessages.join(' ').replace(/\n/g, ' ')).slice(0, 150);
|
|
2758
|
+
html += `<div style="font-size:10px;padding:1px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">
|
|
2759
|
+
<span style="color:#10b981;font-weight:600;">ASST</span>
|
|
2760
|
+
<span style="color:var(--text-secondary);margin-left:4px;">${aPreview}${turn.assistantMessages.join('').length > 150 ? '...' : ''}</span>
|
|
2766
2761
|
</div>`;
|
|
2767
2762
|
}
|
|
2763
|
+
|
|
2764
|
+
html += `</div>`;
|
|
2768
2765
|
}
|
|
2769
2766
|
|
|
2770
2767
|
if (turns.length === 0) {
|
|
2771
|
-
html += '<div style="text-align:center;color:var(--text-muted);padding:
|
|
2768
|
+
html += '<div style="text-align:center;color:var(--text-muted);padding:20px;font-size:12px;">No conversation turns found.</div>';
|
|
2772
2769
|
}
|
|
2773
2770
|
|
|
2774
2771
|
el.innerHTML = html;
|