dsh-vim: A Vim-Style Interaction Plugin for DeepSeek Harness

Introduction

DeepSeek Harness is a plugin-centric agent development environment. In long conversations, clicking into the input box with a mouse or scrolling through messages one by one is inefficient. dsh-vim takes over keyboard interaction in the input box and conversation area, allowing users to edit and navigate using Vim’s operating semantics.

Plugin Scope

dsh-vim is a client-side plugin for DeepSeek Harness, developed by maintainer wuRDmemory. It does not modify DSH’s server-side behavior; it only takes over input box editing, conversation area browsing, and left/right sidebar navigation. The plugin operates in NORMAL, INSERT, VISUAL, VISUAL-LINE, and SEARCH modes, supporting standard Vim motions, operators, text objects, registers, and repeat commands.

Core Features

The plugin implements Vim’s modal editing in the input box. After clicking the input box, it enters NORMAL mode by default. Press i to enter INSERT mode for typing, and press Esc to return to NORMAL. In NORMAL mode, standard Vim motions and editing commands are available.

Common motion keys:

h j k l       left / down / up / right
w b e         word-wise motion
0 ^ $         line start / first non-blank / line end
gg G          first line / last line

Common editing keys:

i a           insert before / after cursor
A I           insert at end of line / start of line
o O           open a new line below / above
u             undo
Ctrl-r        redo
.             repeat last change

The plugin supports four modes — NORMAL, INSERT, VISUAL, and VISUAL-LINE — plus SEARCH mode entered via / or ?.

Conversation Area Navigation

Press Ctrl-2 to enter the conversation area. Use j/k to scroll down/up by 160px. Ctrl-d/Ctrl-u performs half-page scrolling, gg (press g twice) jumps to the top, and G jumps to the bottom. h/l switches between the three tabs: “Conversation / Trace / Context.”

In the conversation area, yy (press y twice) copies the message at the center of the viewport. Press / to incrementally search content, and Esc to return to the input box.

The conversation area uses scroll-based semantics: each scroll step is fixed at 160px, and no message selection box is shown. Message lines are detected via page structure heuristics; when switching tabs or right after the page loads, a brief “locating…” indicator may appear.

Four-Pane Switching

The plugin divides the interface into four panes, switched via Ctrl-1 through Ctrl-4:

Shortcut Pane
Ctrl-1 Left sidebar: sessions, projects, or file tree
Ctrl-2 Conversation area
Ctrl-3 Input box
Ctrl-4 Right sidebar

On desktop, the native layer may intercept Ctrl+digit. In that case, use Space 1 through Space 4 in NORMAL mode.

In the sidebar or menus:

j / k        next / previous entry
l / o        open current entry
Enter        open current entry; in the left sidebar this also jumps to the input box
g / G        first / last entry
r            re-detect panes
Esc          return to input box

The sidebar treats each entire row as an entry unit. j/k selects and highlights the whole row, and Enter triggers the open action for that row.

Ctrl-4 expands the right sidebar if it is collapsed. If already focused on the right sidebar, pressing Ctrl-4 again collapses it and returns to the input box. Right sidebar behavior depends on the active tab:

  • Tab bar: h/l switches tabs, Enter enters
  • File tree, start page, task manager: j/k selects, Enter opens
  • Documents, Markdown, plain text: j/k scrolls
  • Diff: j/k scrolls, h/l switches files
  • Images: j/k zooms
  • Terminal, browser: Enter enters input mode, keypresses are passed to the content; bare Esc returns to the tab bar
  • Side conversation: j/k scrolls, Enter focuses the input box

Press q, :q, or :q! in the right sidebar to close the current tab.

Installation & Activation

Prerequisites

  • DeepSeek Harness 0.2.0-rc.1 or a later 0.2.x release
  • Node.js 20 or higher
  • Local plugin directory: D:\DSH\dsh-vim

Installing a Local Plugin

Run in PowerShell:

dsh plugin --profile <profile> add D:\DSH\dsh-vim

Replace <profile> with the name of the DSH profile you want to use. After installation, reopen DSH or refresh the client page.

The local directory install is a linked installation. After modifying the plugin’s client.js, simply refresh the page to verify changes — no need to reinstall.

Uninstalling

dsh plugin --profile <profile> remove dsh-vim

Verifying the Installation

  1. Open a DSH conversation page.
  2. Click the input box.
  3. If you see a NORMAL badge and a block cursor, the plugin has loaded successfully.
  4. Press i, type some text, then press Esc; the badge should return to NORMAL.
  5. Press Ctrl-2; the status bar should confirm you are in the conversation area.

If the badge does not appear, refresh the page first. If it still doesn’t work, confirm that the install command uses the same profile currently running.

Typical Workflows

Editing and Sending a Message

  1. Click the input box. Each time you re-enter the input box, it starts in NORMAL.
  2. Press i to enter INSERT.
  3. Type normally; Chinese IME, Enter, and Shift+Enter retain their native browser behavior in INSERT mode.
  4. Press Esc to return to NORMAL.
  5. Use Vim operations for further editing; when ready to send, press i again and then Enter.

Browsing the Conversation

  1. Press Ctrl-2 to enter the conversation area.
  2. Use j/k to scroll through messages.
  3. Use h/l to switch between Conversation / Trace / Context tabs.
  4. Use / to search content.
  5. Press Esc to return to the input box.

Using Vim Editing Commands

In NORMAL mode:

  • d + motion: delete the selected region
  • c + motion: change the selected region
  • y + motion: yank (copy) the selected region
  • dd: delete the entire line
  • cc: change the entire line
  • yy: yank the entire line
  • p / P: paste after / before the cursor
  • r: replace the current character
  • x / X: delete the current character or the character before the cursor

Use Cases & Caveats

dsh-vim is designed for users who are comfortable with Vim’s operating semantics and want fast message browsing, editing, and navigation within DSH.

The plugin uses DOM heuristic detection to identify page structure. Changes to DSH themes or layouts may require updated detection rules. When detection fails, it will not silently scroll the wrong area; instead, it explains the reason in the badge or status bar.

When the plugin detects that DSH has already claimed a bare letter shortcut, it yields and does not intercept that shortcut. Desktop-native shortcuts may be intercepted before the keypress reaches the web page; in such cases the plugin cannot observe them.

Development & Verification

The plugin includes unit tests and a build script:

node --test "test/*.test.mjs"
node test/core.test.mjs
node test/shortcuts.test.mjs
node test/adapter-input-direct.mjs
node tools/build.mjs

The build script writes the bundle to stdout. On local machines, use PowerShell to write to disk to avoid terminal security features converting Node’s output into an unloadable file:

$t = (node tools/build.mjs) -join "`n"
[System.IO.File]::WriteAllText("D:\DSH\dsh-vim\client.js", $t, (New-Object System.Text.UTF8Encoding($false)))

Browser fixture verification:

node tools/dev-server.mjs D:\DSH\dsh-vim 5900
# Open http://127.0.0.1:5900/tools/dev-harness.html

See tools/verify.mjs for full CDP scenarios and performance diagnostics; see docs/design.md and docs/requirements.md for source structure and design trade-offs.

Ecosystem Context

The DeepSeek Harness philosophy is “everything is a plugin.” The community directory is an independent site with no official affiliation to DeepSeek / 幻方 (High-Flyer). Plugins run with the privileges of the current dsh process; review the source code and license before installing.

Version Info

Current version 0.2.1 (2026-11-22, tag v0.2.1). Fixes in this release: selection box in pane 1 now snaps back to the full row; long lists follow scrolling and only wrap around after truly reaching the bottom; the selection box no longer sticks to user controls at the bottom.

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

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

Xiaoye