Home Explore Blog CI



zed

crates/eval/docs/explorer.md
00b94b7965b943f0dec1c78479e1aeeb38d832e4b19fb9a500000003000007c6
# Explorer

Threads Explorer is a single self-contained HTML file that gives an overview of
evaluation runs, while allowing for some interactivity.

When you open a file, it gives you a _thread overview_, which looks like this:

| Turn | Text                                 | Tool                                         | Result                                        |
| ---- | ------------------------------------ | -------------------------------------------- | --------------------------------------------- |
|      | Fix the bug: kwargs not passed...    |                                              |                                               |
| 2    | I'll help you fix that bug.          | **list_directory**(path="fastmcp")           | `fastmcp/src [...]`                           |
|      |                                      |                                              |                                               |
| 3    | Let's examine the code.              | **read_file**(path="fastmcp/main.py", [...]) | `def run_application(app, \*\*kwargs): [...]` |
| 4    | I found the issue.                   | **edit_file**(path="fastmcp/core.py", [...]) | `Made edit to fastmcp/core.py`                |
| 5    | Let's check if there are any errors. | **diagnostics**()                            | `No errors found`                             |

### Implementation details

`src/explorer.html` contains the template. You can open this template in a
browser as is, and it will show some dummy values. But the main use is to set
the `threadsData` variable with real data, which then will be used instead of
the dummy values.

`src/explorer.rs` takes one or more JSON files as generated by `cargo run -p
eval`, and outputs an HTML file for rendering these threads. Refer dummy data
in `explorer.html` for a sample format.

Chunks
7cf62988 (1st chunk of `crates/eval/docs/explorer.md`)
Title: Threads Explorer: Overview and Implementation
Summary
The Threads Explorer is a self-contained HTML file that provides an overview of evaluation runs with some interactivity. It displays a thread overview with turns, text, tools, and results. The implementation involves an HTML template (src/explorer.html) and a Rust file (src/explorer.rs) that converts JSON data into an HTML file for rendering.