dsh-media-studio: Generate Images and Videos Directly in DeepSeek Harness Chat

Preface

DeepSeek Harness (DSH) extends functionality through a plugin system. Generating images or videos in the chat interface typically requires context switching or writing complex instructions. The dsh-media-studio plugin integrates media generation capabilities directly into the conversation flow. Through background tasks and inline galleries, it allows the model to output results directly within the session.

Installation and Activation

Runtime Requirements:
* DeepSeek Harness 0.2.0-rc.2
* Node.js >= 22.19.0

  1. Open the Plugins page in DSH.
  2. Click ”+ Add Plugin” in the top right corner.
  3. Enter the GitHub address:
https://github.com/1497105876/dsh-media-studio

After installation and activation, a settings card will appear on the plugin details page.

Core Features

  • Text-to-Image / Image-to-Image: Supports local paths, HTTPS URLs, and Data URIs as reference images.
  • Text-to-Video: Supports text generation with keyframe and reference image modes.
  • Send Local Media: Sends existing image or video files to the session via galleries or file cards.
  • Slash Commands: Provides /image and /video commands.
  • Background Generation: Defaults to using ctx.jobs for background tasks, returning a handle immediately and pushing updates automatically upon completion.
  • Rich Rendering: Tool rows and command rows support inline galleries and video players, including support for download, lightbox viewing, and opening with system default applications.
  • Auto-save: Generation results are written to ~/.dsh/media-studio by default.
  • Credential Security: API Keys are managed via environment variables or credential cards and are not written to configuration files.
  • Settings Card: An official-style configuration card within the plugin details page, supporting model selection and parameter configuration.

Configuration and Credentials

Model Configuration

The Agnes model is built-in by default (includes a free quota; supports Text-to-Image, Image-to-Image, and Text-to-Video). Other service providers (such as OpenAI, Gemini, Silicon Flow, and Alibaba Cloud Model Studio) can be selected via the settings card, with support for custom baseURL + model.

Credential Management

Each model entry references an environment variable name via apiKeyEnv, which is resolved at runtime. For example, to use Agnes:

export AGNES_API_KEY=sk-...

Alternatively, you can fill in the Key directly in the settings card on the plugin details page; the Key will be saved to the dsh credential library.

Output Directory

Generation results are saved to ~/.dsh/media-studio by default (~ expands to the user’s home directory).

Typical Usage

Slash Commands

  • /image <prompt>: Generates in the background and pushes the result upon completion.
  • /image --wait <prompt>: Waits synchronously and displays the result inline within the command card.
  • /video <prompt>: Generates video in the background (typically takes a few minutes).
  • /video --wait <prompt>: Waits synchronously and plays the video inline within the card.

Tool Invocation

The plugin exposes three tools to the model:
* generate_image: Required prompt; optional model, resolution (1K–4K), aspect_ratio, reference_images.
* generate_video: Required prompt; optional model, seconds (4–12), size (720P–2K), mode (text / keyframe / reference).
* send_media: Parameter paths (array of local file paths) + optional caption.

Notes

The plugin runs with the permissions of the current DSH process. Please inspect the source code and license before installation. Ensure that the Node.js version meets the requirements (>= 22.19.0).

羽毛球分组比赛记分
小程序二维码

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

Xiaoye