Skills Plugins MCP Prompt Model 导航 博客 资讯 我的中心
工具与能力 #deepseek#deepseek-harness#deepseek-harness-plugin#dsh#dsh-desktop#dsh-plugin

dsh-vision-toggle

Per-model vision (image input) toggle for DeepSeek Harness (dsh): list every configured model and flip a switch to enable/disable image support without hand-editing settings.yaml. 为 DeepSeek Harness 提供按模型的「支持图片」开关:无需手改 settings.yaml。

lijian-ui @lijian-ui ⬇ 2 ★ 0 main

安装

dsh plugin --profile web add github:lijian-ui/dsh-vision-toggle
下载安装清单

需要可复现安装时,可在仓库后追加 #commit 固定提交。

Per-model vision (image input) toggle for DeepSeek Harness (dsh): list every configured model and flip a switch to enable/disable image support without hand-editing settings.yaml. 为 DeepSeek Harness 提供按模型的「支持图片」开关:无需手改 settings.yaml。

该插件未提供要点说明,请参考仓库 README。

deepseekdeepseek-harnessdeepseek-harness-plugindshdsh-desktopdsh-plugin
  1. 安装并启动 DeepSeek Harness:npx @deepseek-ai/dsh web
  2. 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
  3. 用 dsh plugins list 确认已安装,必要时重启 Harness 生效

插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。

代码仓库github.com/lijian-ui/dsh-vision-toggle
许可证MIT
主要语言main
下载量2
GitHub 星标0
最近推送2026-08-28
收录日期2026-09-19
分类工具与能力

事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。

以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。

# dsh-vision-toggle · Model Vision Switch Plugin

**English** | [中文](./README.zh-CN.md)

> A model vision toggle plugin for DeepSeek Harness (dsh) desktop: let users control whether each configured model supports image input — flip a switch to enable/disable vision per model, no config file editing and no restart required.

## Features

| Feature | Description |
|---|---|
| Model List | Read every model declared in the `llm-pi-ai` provider routes, grouped by provider |
| Vision Switch | Per-model toggle to turn image input on (`['text','image']`) or off (`['text']`) |
| Immediate Effect | Writes into the official config; `llm-pi-ai` re-registers on change — takes effect instantly, no restart |
| Optimistic UI | Switch flips immediately; rolls back if the host write fails |
| i18n | Chinese / English, follows the dsh desktop language setting |

## Background

dsh officially supports multimodal (image understanding) with its own `deepseek-v4-vision-exp` model. However, the **settings page offers no way to declare the input modalities** (`input`) of custom providers or third-party models. If you add your own provider (e.g. an OpenAI-compatible service via LM Studio / vLLM / Ollama) whose model actually supports vision, sending an image still fails with:

```
当前模型不支持图片  (this model does not support images)
```

The only workaround today is to hand-edit `settings.yaml` and add `input: [text, image]` for the model — which is fragile and easy to get wrong.

This plugin removes that friction: it exposes the official `llm-pi-ai` settings namespace so each model gets a **"Support image"** switch in the settings page. Toggling it rewrites the model's `input` modalities for you.

## Installation

### Prerequisites

- DeepSeek Harness (dsh) desktop
- Node.js >= 18

### Integration in dsh-desktop

1. Install the plugin:

```bash
dsh plugin add @lijian-ui/dsh-vision-toggle
```

2. Restart the desktop app.

### Local Development

```bash
# Enter the plugin directory
cd extensions/dsh-vision-toggle

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run watch

# Type check
npm run typecheck
```

Build output goes to `lib/` and is automatically synced to `node_modules/@lijian-ui/dsh-vision-toggle` via junction. Restart the desktop app after each build to load the new bundle.

## Usage

1. Open dsh desktop
2. Navigate to **Settings** → **Model Vision** (modeled after the other settings sections)
3. The section lists every configured model, grouped by provider. Next to each model there is a "Support image" switch:
   - **On**: the model accepts image input; you can now attach images in chat
   - **Off**: the model is text-only

> Turning the switch on simply sets that model's `input` to `['text', 'image']`; turning it off sets it back to `['text']`. This matches exactly how dsh decides whether a model supports images.

## Technical Architecture

### Directory Structure

```
extensions/dsh-vision-toggle/
├── src/
│   ├── index.ts                    # Host entry (registers the remote service + typert contract)
│   ├── remote.ts                   # Host RPC: listModels / setVision (reads & writes llm-pi-ai config)
│   └── client/
│       ├── index.ts                # Client entry (SECTION_ID, RPC registration, inject)
│       ├── VisionToggleSection.ts  # Settings component (model list grouped by provider + toggles)
│       └── client-i18n.ts          # Client i18n (zh/en)
├── lib/                            # Build output (index.mjs + client.js)
├── package.json
├── tsdown.config.ts
└── cordis.patch.yml
```

### Host Side (`src/remote.ts`)

Provides the following RPC methods:

| Method | Function |
|---|---|
| `listModels()` | List all models declared in `providers[*].models`, with their current `input` modalities and whether they support vision |
| `setVision(provider, modelId, enabled)` | Rewrite one model's `input` to `['text', 'image']` (on) or `['text']` (off) and persist |

### Config Read / Write

The plugin operates on the **official `llm-pi-ai` settings namespace** (`settingsNamespace('llm-pi-ai')`) owned by `@deepseek-ai/dsh-llm-pi-ai` — the same config that backs model selection and the "this model does not support images" error:

- **Read**: `settings.get('llm-pi-ai')` returns the provider routes; each model's effective `input` falls back to the provider's `defaultInput`.
- **Write**: uses `settings.update('llm-pi-ai', { providers: ... })` with a **rebuilt full `models` array**. The path-based `settings.mutate` API cannot navigate array indexes (it would replace the whole array), so we rebuild the array instead.

Because `llm-pi-ai` resolves `input` per request and re-registers on settings change, a flip takes effect immediately with no restart.

### Toggle Mechanism

```
User clicks the switch
  → Client optimistically updates the row (immediate flip)
  → RPC call to host setVision(provider, modelId, enabled)
  → Host: read config, rebuild models[], settings.update('llm-pi-ai', …)
  → llm-pi-ai detects the change and re-registers the model route
  → Config persisted to settings.yaml; next message uses the new modalities
```

If the host write fails, the client restores the previous switch state and shows an error.

## Internationalization

Supports Chinese and English. Translation files are in `src/client/client-i18n.ts`. Language follows the dsh desktop language setting.

## Tech Stack

- **Language**: TypeScript
- **Build**: tsdown (rolldown)
- **Frontend**: React 18
- **RPC**: `@deepseek-ai/dsh-typert-protocol` / `@deepseek-ai/dsh-typert-registry` (host remote)
- **Config**: `@deepseek-ai/dsh-settings` (namespace `llm-pi-ai`)

## License

MIT

## Related Links

- [DeepSeek Harness (dsh)](https://github.com/deepseek-ai/dsh)

数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。