GULI-lab/DSH-element-source1

dsh-element-source

Click any UI element in your running dev page to jump to its Vue / React / Svelte / Angular source in the DSH chat. A click-to-source inspector for DeepSeek Harness, compatible with dsh-better-sidebar.

AI 분석

核心用途是实现“点击即定位源码”的前端开发辅助功能。适合进行网页开发调试、需要快速修改对应组件代码的开发者。兼容dsh-better-sidebar的本地预览标签页。

패키지
dsh-element-source
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 8. 15.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:GULI-lab/DSH-element-source

Usage

  1. 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);
  2. Enter http://localhost:3000 (your dev server) and press Enter;
  3. Watch the probe status icon (wifi) turn green — ready automatically in proxy mode;
  4. Click the select icon (crosshair), move the mouse — the target highlights; click to locate the source;
  5. The panel shows the location: file:line and the source snippet;
  6. 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.

Esc cancels 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)