dsh-html-inspector: Click to select HTML elements in DSH, with positioning information written to the conversation input box

Preface

When modifying local HTML demos or preview pages in DeepSeek Harness (DSH), the common approach is to verbally describe “change that button in the navigation bar” or paste entire HTML blocks, which often leads the agent to target the wrong node or modify the wrong scope. If the CSS selector, visible text, and HTML snippet corresponding to “the element you clicked on” could be directly written into the current conversation input box, subsequent edits would be more precise, without needing to touch the source files on disk.

The following introduces the community plugin dsh-html-inspector (maintainer robin421, GitHub: robin421/dsh-html-inspector). It provides a selection mode in DSH’s HTML preview and browser tabs: after enabling it, clicking an element on the local page automatically places the locating information into the chat input box, so the agent can modify based on the pick result.

What is this

dsh-html-inspector is a client-side class plugin for DSH (dsh.client, platform web). In one sentence: it provides “click-to-locate” for HTML preview and browser tabs, writing the element’s locating information into the current session input box, without modifying any files on disk.

The plugin registers a proxy route on the host side, intercepts local addresses on the client side, handles iframe previews, and works with an optional toolbar switch; neither part sends data to external networks other than accessing the local loopback.

Core Features

The following capabilities come from the plugin README and package.json description.

Click-to-locate

After enabling selection mode, mouse hover highlights the current element with a blue outline; a single click collects:

  • Tag, id, class
  • CSS selector path based on nth-of-type
  • Visible text of up to about 1200 characters
  • Element outer HTML of up to about 4000 characters

The collection result is written to the input box of the current conversation. Pressing Esc cancels it. The plugin does not modify HTML files in your project.

Browser tabs (local addresses)

When you enter a loopback address (localhost / 127.0.0.1) in the address bar of a DSH browser tab, the plugin loads the page via an injected proxy route (GET /inspector/proxy?url=…) and injects the inspector script into the page; after navigating within the same session, selection capability remains available.

File tree HTML preview

When opening HTML from the file tree (the /sidebar/html editor iframe preview), the preview frame is replaced with a copy of the same content with the inspector added (preserving <base> so that relative-path resources load normally), and the selection result carries a “file preview” source marker, making it easy to distinguish whether it comes from a file preview or a browser tab.

Selection mode toolbar button (optional)

If dsh-better-sidebar is installed, the plugin injects a selection mode on/off button into the browser tab toolbar; the switch state is remembered within each tab session, enabled by default. Without that sidebar plugin, address bar local interception and file preview selection remain available, just without the button.

Loopback only, read-only

The proxy only accepts local targets (precise matching rules for localhost, 127.0.0.0/8, ::1, 0.0.0.0) and rejects other addresses; it only performs a GET on the page you request, injects the script, and returns it to the GUI, without persisting or transmitting it externally.

Installation and enabling

The official installation command (web profile) is as follows. Before installing, please review the repository source code and the MIT license yourself; the plugin runs with the current DSH process permissions.

dsh plugin --profile web add github:robin421/dsh-html-inspector

You can also install it with one click from dsh-market (Settings → Plugin Market) once it is listed there.

After installation, restart the Web GUI (or refresh the page). If dsh-better-sidebar is installed, you can find the selection mode button in the browser tab toolbar; otherwise, just enter a local URL starting with localhost in the browser tab to go through the proxy and selection logic.

Runtime environment: package.json requires Node >=20; applicable to Web GUIs with the dsh client runtime and similar desktop clients.

Typical usage

  1. Install using the command above and refresh the DSH Web interface.
  2. Start a static service or dev server locally (e.g., the page is at http://127.0.0.1:8080).
  3. Enter that loopback URL in the DSH browser tab address bar, or open the HTML from the file tree to use the preview.
  4. Enable selection mode (toolbar button, or rely on the default-enabled behavior); move the mouse over the page to confirm highlighting, then click the target element.
  5. Check the selector, text, and HTML snippet written into the conversation input box, then ask the agent to modify the code according to that locating information.

To cancel the current selection operation: press Esc.

Use cases and notes

Who it’s for: Developers who frequently debug local HTML/CSS/small demos in DSH and want to use “click-to-pick” instead of manually describing DOM positions.

Architecture highlights (to help with troubleshooting):

  • Host-side index.js: a Cordis plugin registering GET /inspector/proxy?url=…, fetching loopback pages, rewriting same-origin links so navigation stays within the proxy, and injecting a self-contained inspector script; no dependencies beyond the dsh runtime.
  • Client-side client.js: intercepts loopback address bar input, listens for postMessage selections from proxy pages, writes to the chat composer, and manages the toolbar switch.

Security and permissions: The proxy only serves local loopback and does not write to disk. It is still recommended to read the GitHub repository source before installing to confirm the behavior meets your environment policy.

Ecosystem note: DSH adopts an “everything is a plugin” extension approach; the community catalog entry on skillhub.cn and the GitHub repository are maintained by the community and have no official affiliation with DeepSeek / High-Flyer.

Conclusion

dsh-html-inspector turns “clicking once on a local HTML page” into quotable locating information in the conversation input box, suitable for precise DOM-level modifications in conjunction with the DSH agent, while keeping read-only preview/proxy access to source files.

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

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

Xiaoye