Skip to content

Align CLI and VS Code tool rendering in HTML export #54

@Arithmomaniac

Description

@Arithmomaniac

Problem

CLI and VS Code chat sessions use fundamentally different data shapes for equivalent operations. While the HTML exporter normalizes both into the same template, significant visual divergences remain in exported HTML.

Analysis report: Generated via scripts/analyze_rendering_divergences.py using real session data (713MB DB, 994 sessions). Report at temp_export/rendering_divergences_report.html.

Key Divergences

Category CLI VS Code Impact
Status values success/error completed only Low (CSS handles both)
Terminal commands Rich CommandRun with command+output Generic run_in_terminal ToolInvocation High
Content block description Tool name (view, grep) None Low
Invocation messages Specific: Viewing file.py Generic: Using "Replace String in File" Medium
Input data Always JSON NULL for built-in tools Medium
Source type None/mcp internal/mcp/extension None (template handles)
CLI-only blocks intent, skill, ask_user N/A None (correctly CLI-specific)

Approach

All changes are in src/copilot_session_tools/scanner/vscode.py — upgrading the VS Code scanner to produce richer, CLI-compatible output. No changes needed to the HTML template or CLI scanner.

Sub-issues

Coordination

Must avoid conflicts with feature/avilevin/agent-nested-collapsibles branch (adds sub-agent collapsibles). All changes are designed to be fully additive — no restructuring of existing flow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions