Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# DiffVisualizer — visual diffs in Agent Zero chat

<!-- BADGES:START (generated by the devkit — `make badges`) -->

[![plugin-e2e](https://github.com/agent-zero-plugins/agent-zero-plugin-diff-visualizer/actions/workflows/plugin-e2e.yml/badge.svg?branch=main)](https://github.com/agent-zero-plugins/agent-zero-plugin-diff-visualizer/actions/workflows/plugin-e2e.yml) [![BDD scenarios](https://img.shields.io/badge/tests-BDD%20e2e-brightgreen)](https://github.com/agent-zero-plugins/agent-zero-plugin-diff-visualizer/tree/main/tests/e2e/features) [![Release](https://img.shields.io/github/v/tag/agent-zero-plugins/agent-zero-plugin-diff-visualizer?label=release&sort=semver)](https://github.com/agent-zero-plugins/agent-zero-plugin-diff-visualizer/tags) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/agent-zero-plugins/agent-zero-plugin-diff-visualizer/blob/main/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/agent-zero-plugins/agent-zero-plugin-diff-visualizer/blob/main/CONTRIBUTING.md)

<!-- BADGES:END -->

Renders unified-diff fenced code blocks as **side-by-side visual diffs** directly in the
Agent Zero chat UI — with a fullscreen maximize view, a copy-raw-source button, and
theme-aware styling. It also ships an agent **skill** that teaches the agent to emit
Expand Down Expand Up @@ -110,4 +116,4 @@ trace to those IDs.

## License

Apache-2.0 — see [LICENSE](LICENSE).
Apache-2.0 — see [LICENSE](LICENSE).
63 changes: 63 additions & 0 deletions docs/BEHAVIOUR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# DiffVisualizer — behaviour

<!-- GENERATED by the devkit (`make docs`) from this plugin's own e2e run.
Do not edit by hand: every screenshot below is the asserted end state of a
passing BDD scenario, so it cannot show behaviour the plugin no longer has.
Captions are the scenario titles verbatim — reword them in tests/e2e/features/. -->

Each section is one scenario from `tests/e2e/features/`, with the screenshot the
test captured at its final assertion. 10 of 10 scenarios have one.

## Rendering diffs

### A diff block in the chat is rendered as a visual diff
<sub>BEH-1, BEH-3</sub>

![A diff block in the chat is rendered as a visual diff](screenshots/a-diff-block-in-the-chat-is-rendered-as-a-visual-diff.png)

### The rendered diff offers maximize and copy
<sub>BEH-2</sub>

![The rendered diff offers maximize and copy](screenshots/the-rendered-diff-offers-maximize-and-copy.png)

## Diff overlay, copy, and edge-case handling

### Maximizing a rendered diff opens a single fullscreen overlay
<sub>BEH-4</sub>

![Maximizing a rendered diff opens a single fullscreen overlay](screenshots/maximizing-a-rendered-diff-opens-a-single-fullscreen-overlay.png)

### The overlay closes via its close button and the inline diff survives
<sub>BEH-5</sub>

![The overlay closes via its close button and the inline diff survives](screenshots/the-overlay-closes-via-its-close-button-and-the-inline-diff-survives.png)

### The overlay closes via a backdrop click
<sub>BEH-5</sub>

![The overlay closes via a backdrop click](screenshots/the-overlay-closes-via-a-backdrop-click.png)

### The overlay closes via the Escape key
<sub>BEH-5</sub>

![The overlay closes via the Escape key](screenshots/the-overlay-closes-via-the-escape-key.png)

### Copying a rendered diff puts the raw diff text on the clipboard
<sub>BEH-6</sub>

![Copying a rendered diff puts the raw diff text on the clipboard](screenshots/copying-a-rendered-diff-puts-the-raw-diff-text-on-the-clipboard.png)

### A multi-file diff renders both files inside one visual diff
<sub>BEH-1</sub>

![A multi-file diff renders both files inside one visual diff](screenshots/a-multi-file-diff-renders-both-files-inside-one-visual-diff.png)

### Malformed diff text falls back to the readable plain code block
<sub>BEH-3</sub>

![Malformed diff text falls back to the readable plain code block](screenshots/malformed-diff-text-falls-back-to-the-readable-plain-code-block.png)

### A non-diff code fence is left untouched
<sub>BEH-1</sub>

![A non-diff code fence is left untouched](screenshots/a-non-diff-code-fence-is-left-untouched.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading