DeepSeek Harness plugin

dsh-custom-context-menu

DSH Web 自定义右键菜单:全局拦截 contextmenu,提供可扩展菜单框架,并内置“打开工作区文件夹”功能

Jump to install

Source facts

Repository
sulfide2085/dsh-custom-context-menu
Latest update
Aug 16, 2026
Category
Tools & Capabilities
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/sulfide2085/dsh-custom-context-menu
Plugin: dsh-custom-context-menu
Author: sulfide2085

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.en.mdSource · read only
README language

dsh-custom-context-menu

English · 中文

> A custom right-click context menu for DeepSeek Harness (DSH) Web UI: intercept the browser context menu, expose an extensible provider API, and ship a built-in "Open Workspace Folder" action.

Features

  • Global contextmenu interception in the capture phase, except for inputs, textareas, and editable elements
  • Extensible providers: register menu items with one register() call; supports separators, group labels, disabled items, danger items, and hints
  • Keyboard navigation: ArrowUp/ArrowDown cycle, Enter/Space activates
  • Smart placement: flips when near the right/bottom viewport edge
  • No placeholder noise: when no provider matches, the native browser menu is allowed through
  • Open workspace folder: right-click a workspace row in the sidebar and choose "Open Folder"

- Windows: explorer.exe <path> with path normalization and foreground activation - macOS: open <path> - Linux: xdg-open <path>

  • No false success: the host validates that the directory exists before opening

Install

Local

cd dsh-custom-context-menu
pnpm install
cd ..
dsh plugin --profile web add ./dsh-custom-context-menu

Restart DSH Web.

From GitHub

dsh plugin --profile web add "https://github.com/sulfide2085/dsh-custom-context-menu.git"

Usage

In the browser console (F12) or from another plugin:

window.dshContextMenu.register((target, event) => {
  const row = target.closest("[data-session-row]");
  if (row === null) return null;

  return [
    { type: "label", text: row.dataset.title },
    { label: "Copy title", onClick: () => navigator.clipboard.writeText(row.dataset.title) },
    { type: "separator" },
    { label: "Delete session", danger: true, onClick: () => { /* ... */ } }
  ];
});

Item model

ShapeMeaning
"string"shorthand item
{ label, onClick?, disabled?, danger?, hint? }regular item; onClick(item, ctx) receives { target, x, y }
{ type: "separator" }separator
{ type: "label", text }read-only group label

Full API (window.dshContextMenu)

| Member | Description | | --- | --- | | register(provider) | register (target, event) => items[] \| null; returns an unregister function | | setEnabled(bool) / enabled | global switch | | open(x, y, items) | open a menu imperatively | | close() / isOpen / itemCount | close / state | | debug() | diagnostics |

Development

pnpm install
pnpm test

File layout

FileRole
lib/client.jsbrowser half: interception, menu framework, workspace provider
lib/index.jshost half: folderOpener Typert remote service
cordis.patch.ymlbundle patch
test/node:test unit tests

Limitations

  • Single-level menu (no submenus)
  • Workspace detection depends on the DSH Web workspace row DOM and ctx.workspaces
  • Requires the browser contextmenu event

License

MIT