GULI-lab/DSH-element-source

在开发页面点击任意 UI 元素,一键定位 Vue / React / Svelte / Angular 源码。DSH 点击定位源码检查器,兼容 dsh-better-sidebar:预览本地 dev server,点击元素,源码直达 DSH 聊天,交给助手微调。

Project Overview项目介绍

This is a native DSH plugin that adds click-to-source functionality for frontend development workflows. When working on a locally running frontend dev server, you can click any UI element on the page, and the plugin will automatically resolve the corresponding source file and line number, then insert that location as a draft message in DSH’s chat composer for the AI agent to read and modify. It supports all major frameworks including React, Vue 2/3, Svelte, and Angular, with a generic full-text search fallback for any other frontend framework. You do not need to install a separate browser extension to use this plugin.

To use the plugin, first navigate to the local preview entry, which will open your dev page in an embedded iframe inside DSH. If you have dsh-better-sidebar installed, the plugin uses that extension’s existing Local Preview tab for a clean integrated experience, otherwise it adds its own full-height, collapsible right sidebar to the DSH interface. Once the preview loads, enable pick mode, hover over your target element to highlight it, then click to confirm your selection. The plugin will resolve the source location and fill your chat composer draft automatically, so you can just review and send the request to the DSH agent.

The plugin is released under the permissive MIT license, and all local development uses the pnpm package manager. To test a local development build, clone the repository, run pnpm install and pnpm build, then add it to your local DSH web profile with the command dsh plugin --profile web add link:/path/to/your/local/repo. There are several documented known limitations: it only works with development builds (production strips runtime source metadata), it cannot embed the DSH UI itself in the preview iframe, and Vue line number resolution relies on text matching which can sometimes be approximate.

这是一个专为DeepSeek Harness(DSH)打造的原生插件,功能是点击前端开发页面上的任意UI元素,自动定位到该元素对应的源码文件和行号,并把定位信息填充到DSH的聊天输入框中,方便AI代理修改代码。它支持Vue、React、Svelte、Angular等主流前端框架,也兼容通用的后备搜索方案,可配合dsh-better-sidebar使用,也可独立运行。

使用流程非常简单,开发者先打开本地开发服务器运行的前端页面,在DSH的本地预览入口进入页面预览。如果安装了dsh-better-sidebar,就使用它的本地预览标签页,否则插件自带一个可折叠的右侧侧边栏承载预览面板。开启拾取模式后,hover高亮目标元素再点击,插件就会自动解析对应源码位置。整个过程无需安装额外浏览器扩展,适合日常前端开发调试和AI辅助改码场景。

本插件采用MIT许可证开源,免费供开发使用,开发依赖pnpm进行包管理,本地测试可通过dsh plugin命令添加本地克隆的插件路径进行调试。已知限制包括:仅支持开发构建版本(生产构建不保留源码元信息),本地预览不支持嵌入DSH本身,相对路径API请求会受同源策略影响,Vue行号定位依赖文本匹配可能存在偏差。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 7 stars - very few users, little community feedback星标只有 7,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:GULI-lab/DSH-element-source

把 GULI-lab/DSH-element-source 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-element-source

Click any UI element in your running dev page to jump to its Vue / React / Svelte / Angular source. A click-to-source inspector for DeepSeek Harness (DSH), compatible with dsh-better-sidebar: preview local dev servers, pick an element, and the source location lands in the DSH chat for the agent to tweak.

dsh plugin, dsh-better-sidebar compatible npm version license

English | 中文

What it does

Finding "that button on the page" ↔ "the line of code that renders it" becomes a single click:

  1. Open your frontend page (dev server) in the Local preview entry — a tab this plugin registers in dsh-better-sidebar, or its own right-docked sidebar when the sidebar is not installed;
  2. Enable Pick mode, hover to highlight the target, click it;
  3. The plugin resolves the matching source file + line and fills the chat composer with an [元素定位] message (nothing is sent — you decide);
  4. The agent reads the file with the read tool, shows the code in the dialog, and waits for your change request.

No browser extension required, and it works for Vue / React / Svelte / Angular plus any other framework (generic fallback).

Framework support

Framework File Line How
React (dev build) ✅ exact ✅ exact Reads the JSX __source on the fiber (@vitejs/plugin-react / CRA inject it)
Vue 2 / Vue 3 (dev build) ✅ exact ~exact __file gives the file; the line comes from template-text matching
Svelte (dev build) ✅ exact ✅ exact Reads dev-mode __svelte_meta
Angular best effort best effort Detects ng-reflect-* markers, then component/text search
Any framework + code-inspector-plugin installed ✅ exact ✅ exact Reads its injected data-insp-* DOM attributes directly
Other / unknown ✅ ~ Full-text search of the session workspace for the clicked text / class / id

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-gateway 下一个 Next dsh-kiro →