File tree Expand file tree Collapse file tree 2 files changed +3072
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3072
-5
lines changed Original file line number Diff line number Diff line change @@ -96,10 +96,8 @@ function renderContentBlock(block: ContentBlock): string {
9696 <pre class="input">${ escapeHtml ( inputJson ) } </pre>
9797</details>` ;
9898 } else if ( block . type === "tool-result" ) {
99- const outputText = block . output ?. content
100- ? block . output . content . map ( ( c ) => c . text || JSON . stringify ( c ) ) . join ( "\n" )
101- : "No output" ;
102- const isError = block . output ?. isError || false ;
99+ const outputText = JSON . stringify ( block . output , null , 2 ) ;
100+ const isError = block . output && typeof block . output === "object" && "error" in block . output ;
103101 const statusIcon = isError ? "✗" : "✓" ;
104102 return `<details class="result ${ isError ? "error" : "" } ">
105103 <summary><span class="status ${ isError ? "error" : "success" } ">${ statusIcon } </span> Output</summary>
@@ -285,7 +283,9 @@ export function generateMultiTestHtml(data: MultiTestResultData): string {
285283 ) ;
286284
287285 const mcpBadge = metadata . mcpEnabled
288- ? `<span class="mcp-badge enabled">MCP: ${ escapeHtml ( metadata . mcpServerUrl || "" ) } </span>`
286+ ? metadata . mcpTransportType === "StdIO"
287+ ? `<span class="mcp-badge enabled">MCP ✓ (StdIO: ${ escapeHtml ( metadata . mcpServerUrl || "" ) } )</span>`
288+ : `<span class="mcp-badge enabled">MCP ✓ (${ escapeHtml ( metadata . mcpServerUrl || "" ) } )</span>`
289289 : `<span class="mcp-badge disabled">MCP ✗</span>` ;
290290
291291 const mcpNotice = ! metadata . mcpEnabled
You can’t perform that action at this time.
0 commit comments