diff --git a/packages/coding-agent/src/export-html.ts b/packages/coding-agent/src/export-html.ts
index 86578bc8..5728f8b3 100644
--- a/packages/coding-agent/src/export-html.ts
+++ b/packages/coding-agent/src/export-html.ts
@@ -116,14 +116,29 @@ function formatToolExecution(
const displayLines = lines.slice(0, maxLines);
const remaining = lines.length - maxLines;
- html += '
";
}
}
} else if (toolName === "read") {
@@ -137,14 +152,29 @@ function formatToolExecution(
const displayLines = lines.slice(0, maxLines);
const remaining = lines.length - maxLines;
- html += '";
}
} else if (toolName === "write") {
const path = shortenPath(args?.file_path || args?.path || "");
@@ -163,14 +193,29 @@ function formatToolExecution(
const displayLines = lines.slice(0, maxLines);
const remaining = lines.length - maxLines;
- html += '";
}
if (result) {
@@ -449,6 +494,81 @@ export function exportSessionToHtml(sessionManager: SessionManager, state: Agent
color: inherit;
}
+ /* Expandable tool output */
+ .tool-output.expandable {
+ cursor: pointer;
+ }
+
+ .tool-output.expandable:hover {
+ opacity: 0.9;
+ }
+
+ .tool-output.expandable .output-full {
+ display: none;
+ }
+
+ .tool-output.expandable.expanded .output-preview {
+ display: none;
+ }
+
+ .tool-output.expandable.expanded .output-full {
+ display: block;
+ }
+
+ .expand-hint {
+ color: ${COLORS.cyan};
+ font-style: italic;
+ margin-top: 4px;
+ }
+
+ /* System prompt section */
+ .system-prompt {
+ background: rgb(60, 55, 40);
+ padding: 12px 16px;
+ border-radius: 4px;
+ margin-bottom: 16px;
+ }
+
+ .system-prompt-header {
+ font-weight: bold;
+ color: ${COLORS.yellow};
+ margin-bottom: 8px;
+ }
+
+ .system-prompt-content {
+ color: ${COLORS.textDim};
+ white-space: pre-wrap;
+ word-wrap: break-word;
+ font-size: 13px;
+ }
+
+ .tools-list {
+ background: rgb(60, 55, 40);
+ padding: 12px 16px;
+ border-radius: 4px;
+ margin-bottom: 16px;
+ }
+
+ .tools-header {
+ font-weight: bold;
+ color: ${COLORS.yellow};
+ margin-bottom: 8px;
+ }
+
+ .tools-content {
+ color: ${COLORS.textDim};
+ font-size: 13px;
+ }
+
+ .tool-item {
+ margin: 4px 0;
+ }
+
+ .tool-item-name {
+ font-weight: bold;
+ color: ${COLORS.text};
+ }
+
/* Diff styling */
.tool-diff {
margin-top: 12px;
@@ -541,6 +661,23 @@ export function exportSessionToHtml(sessionManager: SessionManager, state: Agent
+
+
+
${escapeHtml(sessionHeader?.systemPrompt || state.systemPrompt)}
+
+
+
+
${messagesHtml}