# DeepSeek Harness · Image View

[![npm](https://img.shields.io/npm/v/@fzhiyu/dsh-image-view)](https://www.npmjs.com/package/@fzhiyu/dsh-image-view)
[![license](https://img.shields.io/npm/l/@fzhiyu/dsh-image-view)](./LICENSE)

When the agent reads an image, show the image.

`read_image` already returns the picture — the tool commits the bytes through
the attachment service and hands the model an image block. The web UI just had
nowhere to draw it, so the call rendered as a grey line naming a path, and the
one thing you wanted to see was the one thing that was missing.

This plugin gives that call its own row.

## What changes

```
before   read_image · /tmp/sp-sing.png
after    View image · /tmp/sp-sing.png
         [ the image, right there ]
```

The thumbnail fits a 240px long edge, and clicking it opens the original.
Nothing to expand: a row whose only real content is a picture should not make
you click to find out what the agent saw.

Everything else is untouched. This registers under one key — `read_image` — in
the Tool UI's keyed view slot, so every other tool row renders exactly as it did
before, and removing the plugin restores the generic row on the next boot.

## Install

```bash
dsh plugin --profile web add @fzhiyu/dsh-image-view
# restart DSH
```

## How it behaves

| Call state | Row |
|---|---|
| Running | Summary line with the shipped running sweep |
| Succeeded | Summary line plus the image, loading and retry included |
| Failed | The failure's first line, in the error colour, and no image |
| Interrupted | Marked stopped rather than failed |

A settled result that carries no image block degrades to its summary. The row
reports what the call actually returned; it never invents a picture.

## What it does not do

- **No Host half.** The bytes are already durable session history served by the
  official `session.attachment` route. A second path to that data would be a
  second thing to authorize correctly.
- **No private image stack.** Loading, retry, and the lightbox are the official
  attachment components, resolved from the shell's platform module table — the
  same instance chat history renders. A tool-result image and a pasted image
  behave identically because they are the same component.
- **No other tool.** One key, claimed deliberately.

## Notes

Images are read under the rendering session's own authorization, through the
public session verb, and their object URLs are revoked when the plugin unloads —
a screenshot pinned for the life of the page is a leak, not a cache.

Targets DeepSeek Harness `0.1.0-rc.6`.
