dsh-py-nav
gipbear/dsh-py-nav
Python code navigation via ty, basedpyright, or pyright with Go to Definition, Find References, Hover, and Outline across local, WSL, and SSH/dsh-remote workspaces. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Установка
dsh plugin --profile web add github:gipbear/dsh-py-navREADME
dsh-py-nav
Python code navigation plugin for DeepSeek Harness (DSH) — brings VS Code-style Ctrl+Click / F12 Go to Definition, Shift+F12 Find All References, Hover type signatures & docstrings, Document Symbols, and Alt+←/→ history to local (Ubuntu/Linux/macOS/Windows), WSL, and SSH / dsh-remote Python workspaces.
Features
- Works directly inside
dsh-remotefile viewer & IDE mode: Automatically attaches todsh-remote's.py/.pyieditor (both read-only highlight view and edit mode) and auto-reads$DSH_HOME/remote-workspaces/*/*/.dsh-remote-meta.jsonso multi-host / multi-repo SSH projects need zero duplicate setup. - Native DSH
.py/.pyiDocument Preview (Monaco Editor): Replaces static read-only previews with an offline-bundled Monaco Editor wired to persistent Python LSP. - Dedicated
Python NavSidebar Tab: Browse and navigate local, WSL, or SSH Python repositories directly from DSH's right sidebar. - Zero-config Local Linux / Ubuntu mode: When running directly on Ubuntu / Linux, defaults to
transport: 'local'and automatically discovers & switches Python project roots (pyproject.toml,pyrightconfig.json,ty.toml,setup.py,.venv,.git). - Dual-carrier compatible: Registers
/api/py-navonctx.connection.fetch(Electron Desktop IPC + Web HTTP) withwebServerfallback. - Fast persistent Python LSP: Auto-detects
ty(Astral's Rust Python LSP),python3 -m ty,basedpyright-langserver, orpyright-langserveracross.venv,~/.local/bin, uv tools, pipx, pyenv, conda, and systemPATH. - Smart Environment Diagnostics & One-Click Install: Proactively probes the target host (local / WSL / SSH) when opening
.pyfiles. If no Python LSP is installed, the status badge alerts you (⚠ PyNav: 缺 LSP) and opens an interactive setup card tailored to the host's actual tools (uv,pip --user, auto--trusted-hostfor internalhttp://PyPI mirrors, ornpm) with a one-click Install button and fullPATH/candidate probe details.
Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+Click / F12 | Go to Definition (same file, cross-file, or external .venv / typeshed) |
Shift+F12 | Find All References across the workspace |
Ctrl + Hover | Type signature & docstring tooltip |
Alt+Left / Alt+Right | Navigate Back / Forward |
Esc | Dismiss References drawer or Definition picker |
Prerequisites (on the host running Python)
Install at least one Python LSP server (recommended: ty, no Node.js required):
uv tool install ty
# or without uv:
pip install --user ty
# or with an internal http:// pip mirror:
pip install --user --trusted-host <mirror-host> ty
If the target host doesn't have one installed yet, dsh-py-nav detects the host's available package manager (uv / pip3 / pip / python3 -m pip / npm) and pip mirror settings, and offers a one-click Install action directly inside the UI.
You can also point server in ~/.dsh/py-nav.json directly to an executable path (e.g. "server": "/opt/tools/bin/ty" or "server": "~/.local/bin/ty").
Build & Pack
npm install
npm run typecheck
npm run build
npm pack --pack-destination dist
Install into DSH
# DSH Web (Ubuntu / Linux / macOS / Windows)
dsh plugin --profile web add dsh-py-nav
# Or install directly from a GitHub Release tarball
dsh plugin --profile web add https://github.com/Gipbear/dsh-py-nav/releases/download/v0.2.1/dsh-py-nav-0.2.1.tgz
In DSH Desktop, open Plugins and install dsh-py-nav, then restart DSH.
Settings are persisted to ~/.dsh/py-nav.json.
Integration Tests
npm run test:probe # Environment probe, http:// trusted-host, direct server path
npm run test:local # Local Ubuntu/Linux zero-config + Fetch API
npm run test:wsl # Windows -> WSL Ubuntu transport
npm run test:ssh # Windows -> OpenSSH + dsh-remote mirror auto-binding
Похожие плагины
deepseek-harness
deepseek-ai/deepseek-harness
dsh-market
dsh-market/dsh-market
dsh-web (dsh-plugin-manager)
zhu1090093659/dsh-web
dsh-web
zhu1090093659/dsh-web