Skip to content

sunisstar/AgentLogViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” Agent Log Viewer

Universal AI agent conversation viewer. Right-click any folder to explore.

License: MIT Platform: Windows Browser: Chrome/Edge PowerShell Zero Dependencies

English ยท ไธญๆ–‡ๆ–‡ๆกฃ ยท Report Bug ยท Request Feature


๐ŸŽฏ What Is This?

Agent Log Viewer is a universal conversation history viewer for AI coding agents. Currently supports Claude Code, with more agents coming soon.

It integrates directly into Windows Explorer โ€” right-click any folder, select "View Agent Log", and your conversation history opens in a beautifully rendered ChatGPT-style interface.

๐Ÿ”ฎ Roadmap: Support for Cursor, Copilot, Windsurf, Aider, and other AI coding agents is planned. See Supported Agents for details.

โœจ Features

๐Ÿ–ฑ๏ธ Right-Click to View

Just right-click any folder in Windows Explorer and select "View Agent Log". Your conversation history opens in the browser instantly.

๐ŸŽฏ Smart Project Detection

Automatically matches the clicked folder to its agent project data. Non-agent folders get a friendly notice with a list of known projects.

๐Ÿ’ฌ ChatGPT-Style UI

Beautiful dark/light theme with conversation bubbles, markdown rendering, syntax-highlighted code blocks, and a collapsible sidebar.

๐Ÿ”— Multi-Session Timeline

All sessions from the same project are merged into a single chronological timeline, with clear session dividers and timestamps.

๐Ÿ“ฆ Export Anywhere

Export conversations to Markdown (.md), Plain Text (.txt), or Word Document (.doc) with one click.

๐ŸŒ— Dark / Light Theme

Toggle between dark and light themes. Your preference is remembered across sessions.

More Goodies

Feature Description
๐Ÿ”€ Consecutive Message Merge Same-role messages are grouped into one bubble with dashed separators
๐Ÿ” Search Filter sessions in the sidebar by keyword
๐Ÿ“‹ Copy Code Hover any code block to reveal a one-click copy button
๐Ÿงน Auto Cleanup Temp HTML files older than 1 hour are automatically removed
๐Ÿ” No Admin Required Uses HKCU registry keys โ€” no UAC prompt

๐Ÿค– Supported Agents

Agent Status Data Source
Claude Code โœ… Fully Supported ~/.claude/projects/<path>/<session>.jsonl
Cursor ๐Ÿ”ฎ Planned Workbench session storage
GitHub Copilot ๐Ÿ”ฎ Planned VS Code chat history
Windsurf ๐Ÿ”ฎ Planned Cascade session data
Aider ๐Ÿ”ฎ Planned .aider.chat.history.md

Want to add support for another agent? Open an issue or submit a PR!


๐Ÿš€ Quick Start

Install (takes 5 seconds)

git clone https://github.com/<your-username>/agent-log-viewer.git
cd agent-log-viewer

Then double-click register.bat โœ…

That's it. You'll now see "View Agent Log" in your right-click context menu.

Uninstall

Double-click unregister.bat ๐Ÿงน


๐Ÿ“– How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Windows Explorer                      โ”‚
โ”‚                                                         โ”‚
โ”‚   Right-click any folder โ”€โ”€โ”€โ”€โ”€โ”€โ–บ "View Agent Log"       โ”‚
โ”‚                                                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
                         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    launcher.bat                          โ”‚
โ”‚                                                         โ”‚
โ”‚   Receives folder path (%V or %1)                       โ”‚
โ”‚   Calls PowerShell with the path                        โ”‚
โ”‚                                                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
                         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   generate.ps1                           โ”‚
โ”‚                                                         โ”‚
โ”‚   1. Encode path โ†’ find matching project folder         โ”‚
โ”‚      in ~/.claude/projects/                             โ”‚
โ”‚   2. Fallback: scan JSONL cwd fields                    โ”‚
โ”‚   3. Read all .jsonl session files                      โ”‚
โ”‚   4. Extract user text + assistant text blocks          โ”‚
โ”‚   5. Filter out tool_calls, thinking, attachments       โ”‚
โ”‚   6. Sort by timestamp + line index                     โ”‚
โ”‚   7. Inject data into viewer.html template              โ”‚
โ”‚   8. Open in default browser                            โ”‚
โ”‚                                                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
                         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              Browser (viewer.html)                       โ”‚
โ”‚                                                         โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚   โ”‚ Sidebar   โ”‚  โ”‚  Chat Messages                    โ”‚   โ”‚
โ”‚   โ”‚           โ”‚  โ”‚                                   โ”‚   โ”‚
โ”‚   โ”‚ Session 1 โ”‚  โ”‚  ๐ŸŸฆ User: "Help me build..."     โ”‚   โ”‚
โ”‚   โ”‚ Session 2 โ”‚  โ”‚  ๐ŸŸฉ Assistant: "Sure! Let's..."  โ”‚   โ”‚
โ”‚   โ”‚ Session 3 โ”‚  โ”‚  ๐ŸŸฉ ... (merged)                  โ”‚   โ”‚
โ”‚   โ”‚           โ”‚  โ”‚  โ”€โ”€โ”€ Session Divider โ”€โ”€โ”€          โ”‚   โ”‚
โ”‚   โ”‚ ๐Ÿ” Search โ”‚  โ”‚  ๐ŸŸฆ User: "Now add..."            โ”‚   โ”‚
โ”‚   โ”‚           โ”‚  โ”‚  ๐ŸŸฉ Assistant: "Done! ..."        โ”‚   โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                                                         โ”‚
โ”‚   [โ˜€/โ˜พ Theme] [Export โ–พ]                                โ”‚
โ”‚                                                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ Project Structure

agent-log-viewer/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“„ viewer.html        โ†’ ChatGPT-style UI template (CSS + JS)
โ”œโ”€โ”€ โš™๏ธ generate.ps1       โ†’ Core: JSONL parsing, data extraction, HTML generation
โ”œโ”€โ”€ ๐Ÿ–ฑ๏ธ launcher.bat       โ†’ Context menu entry point (receives folder path)
โ”œโ”€โ”€ ๐Ÿ“ฅ register.bat       โ†’ Install right-click menu (HKCU, no admin needed)
โ”œโ”€โ”€ ๐Ÿ—‘๏ธ unregister.bat     โ†’ Remove right-click menu
โ”œโ”€โ”€ ๐Ÿ“‹ .gitignore
โ”œโ”€โ”€ ๐Ÿ“– README.md          โ†’ English
โ””โ”€โ”€ ๐Ÿ“– README_CN.md       โ†’ ไธญๆ–‡ๆ–‡ๆกฃ

๐Ÿ› ๏ธ Technical Details

Registry Integration

Key Scope Trigger
HKCU\Software\Classes\Directory\shell\AgentLogViewer Per-user, no admin Right-click on folder icon
HKCU\Software\Classes\Directory\Background\shell\AgentLogViewer Per-user, no admin Right-click in folder background

Data Source (Claude Code)

Claude Code stores conversation data as JSONL files in:

~/.claude/projects/<encoded-project-path>/<session-uuid>.jsonl

Each line is a JSON object. Agent Log Viewer extracts:

JSONL type Extracted Content
"user" with string message.content User's text messages
"assistant" with content[].type === "text" Assistant's text responses

Filtered out: thinking, tool_use, tool_result, attachment, permission-mode, etc.

Message Ordering

Messages are sorted by a dual-key scheme:

  1. Primary: ISO 8601 timestamp (string comparison โ€” naturally ordered)
  2. Secondary: Line index within the JSONL file (stable tiebreaker)

This ensures strictly chronological order even when multiple entries share the same millisecond timestamp.

Temp File Management

Generated HTML files are stored in %TEMP%\agent_log_*.html. On each launch, files older than 1 hour are automatically purged.


โš™๏ธ Requirements

Requirement Details
Windows Built-in PowerShell 5.1+ required
Browser For proper CSS custom properties & marked.js
Agent Sessions At least one project with conversation history

Note: No Python, Node.js, or any runtime installation needed. Everything runs on Windows built-in tools.


๐Ÿ—บ๏ธ Roadmap

  • Cursor support โ€” Parse Cursor's workbench session storage
  • Copilot support โ€” Read VS Code GitHub Copilot chat history
  • Windsurf support โ€” Parse Cascade session data
  • Aider support โ€” Read .aider.chat.history.md
  • Multi-agent view โ€” Show conversations from multiple agents in the same project
  • Cross-platform โ€” macOS and Linux support
  • Search full-text โ€” Search within message content, not just session metadata

๐Ÿค Contributing

Contributions are welcome! Especially agent adapters for new AI coding tools.

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฟ Create a feature branch (git checkout -b feature/amazing-feature)
  3. ๐Ÿ’พ Commit your changes (git commit -m 'Add amazing feature')
  4. ๐Ÿ“ค Push to the branch (git push origin feature/amazing-feature)
  5. ๐Ÿ”„ Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.


Made with โค๏ธ for the AI coding agent community

โฌ† Back to Top

About

Universal AI agent conversation viewer. Right-click any folder to explore.

Topics

Resources

License

Stars

Watchers

Forks

Contributors