dsh-zhanshi: Inline display of the current turn's images and videos at the end of the conversation turn

Introduction

In the DeepSeek Harness (DSH) desktop environment, models or tools may successfully save images or videos during the current turn, but the default conversation area may not directly provide clickable previews at the end of the turn. Official delivery cards handle the display for some files at the same path; for the remaining “artifacts of the current turn,” you often have to remember the path yourself or open them via file interfaces or external programs. For agent developers writing code or running generation-type tools daily, lacking a layer of “in-turn visible media summary” slows down the verification workflow.

The zhanshi plugin introduced below (repository yueyexiayu/dsh-zhanshi) is a community-maintained client-side DSH desktop plugin. It displays this-turn successfully saved or explicitly delivered images and videos that do not have an official delivery card at the same path, appearing at the end of the turn. It does not write to the model context, nor is it responsible for generating media. Reading old images (e.g., read_image merely viewing historical files) is not considered a current-turn artifact and will not enter the preview area.

What is this

  • Name: zhanshi (npm package name zhanshi, current version 0.1.3, see repository package.json)
  • Maintainer: yueyexiayu
  • Category: Client-side (Host + Client collaboration; does not modify official DSH source code, does not replace the official conversation renderer)
  • Directory Page: skillhub.cn/plugins/yueyexiayu/dsh-zhanshi
  • One-liner: DSH desktop plugin — show this-turn images and videos inline in the conversation.

The preview is registered to the conversation.chat.turnTail list with the id: zhanshi, sitting at the same level as official delivery cards, and will not be folded into the tool call list. It does not render when there is no media.

Core Features

Display Location and Interaction

  • Images and videos appear at the tail of the current turn, at the same hierarchical level as official delivery cards.
  • Images are clickable to open; videos use native playback controls.
  • If image or video loading fails, a visible file card is retained, providing retry and open actions; videos use preload="metadata" and do not actively preload the entire content.

Collection Rules (What enters the preview)

  1. Only collects results from present, write, edit, and supported media generation/screenshot tools that are explicitly successful and free of structural errors in the current turn.
  2. read_image only indicates viewing an old file and does not enter the artifact area.
  3. If official deliverables.presented already handles file cards at the same path, this plugin normalizes by cwd and deduplicates; it only suppresses official cards appearing before the current closing seq, without suppressing un-materialized presents, independently generated images, or media with the same name in other directories. Official produced entries can still serve as sources for real current-turn artifacts.
  4. Supports shengcheng_result structured paths (prioritizing the preservation of spaces, quotes, and Unicode); if structured records are corrupted, it does not disguise success via fuzzy text fallback; compatible with legacy standalone saved … lines.
  5. bash non-zero exits, timeouts, terminations, cancellations, or commands still running in the background are not treated as completed; it does not treat old files appearing at the end of compound commands as targets, nor does it parse examples from session logs.
  6. Relative paths are resolved by the session cwd, then normalized and deduplicated; files with the same name in different directories are still displayed separately; for the same path, the latest sequence number is retained.
  7. Displays a maximum of 16 items per turn: prioritizing explicitly delivered finished products, then newer other media; if the limit is exceeded, the remaining quantity is shown. This limit only affects this plugin’s preview and does not delete official delivery records.
  8. Ignores node_modules, .git, parent directory jumps, globs, and unsupported extensions (product filtering rules, not a replacement for official file permission controls).

File Reading and Video Preview Boundaries

  • Images: Read via the official relative URL /api/file (compatible with desktop dsh-app://); authentication is handled by the DSH connection, and the plugin does not bypass authentication.
  • Videos: Accessed via /api/zhanshi/file; path resolution and bounded reading are completed via the composed ctx.fs using resolve, processPath, stat, and readByteRange; using local Node fs or full-file snapshots to bypass the provider is prohibited.
  • Video GET/Range reads a maximum 64 KiB window on demand; 64 MiB is the preview product limit (not a generation limit). shengcheng can save videos up to 256 MiB; when the preview limit is exceeded, HEAD/GET returns 413 with X-Zhanshi-Preview: open-file / X-Zhanshi-File-Size; the client uses HEAD to identify large files, displaying the actual MiB and “Open File” without increasing the memory limit.

Host depends on connection and fs; Client depends on slots and uiConversation.

Installation and Enablement

Community plugins are manually integrated following DSH’s “everything is a plugin” approach; do not construct dsh plugin add commands based solely on repository names if they do not appear in the documentation. The steps provided in the README are as follows:

  1. Place the plugin package in $DSH_HOME/plugins/zhanshi (consistent with the “Package Location” description in the README; specific acquisition methods are subject to the GitHub Repository and directory page instructions).
  2. Edit $DSH_HOME/profiles/desktop/cordis.patch.yml and add the following to insert:
- id: zhanshi
  name: ../../plugins/zhanshi/lib/index.js
  1. Fully quit DeepSeek Harness (macOS: ⌘Q) and then reopen it; refreshing the page alone will not reload the Host. After restart, previews for historical turns can be reconstructed from events.
  2. Uninstall: Remove the insert item above, then fully quit and reopen.

Before installation, please review the repository source code and license yourself, and understand that the plugin runs under the permissions of the current DSH process.

Typical Usage

This plugin is not responsible for generating images or videos, nor does it have a separate CLI. The typical flow is:

  1. In a DSH desktop session where zhanshi is enabled, have the agent successfully save images or videos in the current turn via write/edit/present or the supported media tools listed in the README.
  2. After the turn ends, view the zhanshi preview area at the end of the turn in the conversation area: click images to expand them, and use controls to play videos.
  3. If the official UI already displays a delivery card at the same path, the plugin deduplicates to avoid duplicate cards; independently pathed or generated images will still be displayed.
  4. Oversized videos (exceeding the 64 MiB preview limit but potentially saved up to 256 MiB) will prompt handling via “Open File” rather than preloading the entire segment within the page.

The README notes: Pending runtime acceptance — Unit tests or independent browser fixtures do not equal real acceptance after a desktop restart; after a full quit and reopen, you still need to confirm in an actual session that the new plugin has loaded and that image and video display meets expectations.

Applicable Scenarios and Notes

Who is it for

  • Developers who frequently run image/video generation or screenshot tools in DSH Desktop and want to quickly verify artifacts at the end of the same turn without memorizing paths.
  • Scenarios requiring coexistence with official delivery cards while deduplicating “duplicate displays of the same path not covered by official cards.”

Precautions

  • The plugin only displays media it determines to be successfully produced in the current turn; false positives/negatives relate to tool output formats, bash completion states, and the completeness of structured fields (see README “Collection and Display Rules” for details).
  • Video previews have size and windowed reading strategies; large files depend on Host capabilities like openFile, and if missing, the path and normal file links are retained.
  • The community directory skillhub.cn has no official affiliation with DeepSeek / High-Flyer; installation and audit responsibilities lie with the user side.

Conclusion

zhanshi consolidates “images and videos successfully saved or delivered in the current turn” into an inline preview at the end of the turn, sitting at the same level as official delivery cards, and does not write to the model context. If you frequently produce media files in desktop DSH, you can install it via the README patch and verify it in a real session after a full restart.

  • Directory Page: https://www.skillhub.cn/plugins/yueyexiayu/dsh-zhanshi
  • GitHub: https://github.com/yueyexiayu/dsh-zhanshi
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye