GULI-lab/DSH-element-source ↗★ 1
dsh-element-source
适用于 DeepSeek Harness 的代码元素定位插件,支持在预览页面点击任意 UI 元素直接跳转到对应的源码位置。
AI 分析
核心用途是实现“点击即定位源码”的前端开发辅助功能。适合进行网页开发调试、需要快速修改对应组件代码的开发者。兼容dsh-better-sidebar的本地预览标签页。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:GULI-lab/DSH-element-source說明文件
閱讀完整 README ↗Usage
- Open the entry: with better-sidebar → its Local preview tab; without it → the right-docked sidebar (open by default; collapsible to an edge strip) (note: this previews YOUR page, not the DSH UI itself);
- Enter
http://localhost:3000(your dev server) and press Enter; - Watch the probe status icon (wifi) turn green — ready automatically in proxy mode;
- Click the select icon (crosshair), move the mouse — the target highlights; click to locate the source;
- The panel shows the location:
file:lineand the source snippet; - The pick fills the chat input DRAFT automatically (e.g.
[元素定位] src/components/App.vue:12) — nothing is sent; add your own wording and press Enter.
Esccancels selection. A pick only fills the composer draft; whether to send is entirely your call.
The toolbar also has refresh (reload the page) and open externally (real browser tab).
Configuration
Override the row in your cordis.patch.yml (or the profile patch):
- id: element-source
config:
autoSteer: false # wake the agent right after a pick (default false: only fill the chat draft)
mappings: # source-path prefix mappings (monorepo / node_modules rebasing)
- find: '@app/ui/src'
replacement: 'D:/workspace/my-app/packages/ui/src'
proxyHosts: # extra hosts the preview proxy may fetch (default: loopback only)
- '192.168.1.10'
sessionId: 'fixed-session' # pin a session (usually not needed)