dsh-intellij-integration
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Fail
- process.env — Environment variable access in runtime-helper/build.mjs
- exec() — Shell command execution in runtime-helper/main.ts
- process.env — Environment variable access in runtime-helper/main.ts
- network request — Outbound network request in runtime-helper/main.ts
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
DeepSeek Harness (DSH) for JetBrains IDEs — AI coding with native diffs, tool approvals, sessions, Trace analysis, and balance tracking. | IntelliJ IDEA / PyCharm AI 编程助手:原生 Diff、工具审批、会话与 Trace 分析。
DeepSeek Harness for JetBrains IDEs
Bring DeepSeek Harness into JetBrains IDEs — chat with your code, review native diffs, and inspect every run.
English | 简体中文
Install plugin · Releases · Feedback · VS Code edition
An independent community plugin for IntelliJ IDEA, PyCharm, and other IntelliJ Platform IDEs. Explain unfamiliar code, investigate a bug, or review a change from the same place you write it.
Quick start
- Install — in Settings → Plugins → Marketplace, search for DeepSeek Harness Integration, or open the Marketplace page. Restart the IDE if prompted.
- Connect — open a project and the DSH tool window. The plugin discovers a compatible local
dsh, including the command registered by the official DeepSeek Desktop app; the bundled lifecycle helper still needs Node.js 24+. The plugin starts the Runtime automatically by default. Configure the launch command or an existing Runtime's Server URL in Settings → Tools → DeepSeek Harness. - Configure credentials — find DSH: Configure API Key via Find Action. Restart the local Runtime after changing the key so it receives the new value. An existing external Runtime uses its own credentials.
- Try it — select a function, right-click DSH → Explain Selection, or ask a question in the chat. Inspect tool cards and proposed diffs when an approval is requested.
Requires: IntelliJ Platform 2024.3+ with JCEF (the embedded browser). The build targets IntelliJ IDEA Community and PyCharm Community 2024.3.6 for compatibility verification. Other IntelliJ Platform IDEs need the same platform APIs and JCEF support.
From question to reviewed change
| What you want to do | What DSH brings into your IDE |
|---|---|
| Understand or improve code | Explain, fix, review, and document selected code from the editor's context menu. |
| Inspect an agent's edits | Open supported tool diff cards in JetBrains' native side-by-side viewer, including proposed changes awaiting approval. |
| Keep track of a task | Chat history, session switching, tool cards, and runtime status in the DSH tool window. |
| Understand a run | Built-in Trace analysis for inspecting session events and tool activity. |
| Watch usage | A status-bar balance indicator with DeepSeek pricing information when available. |
| Resume across editors | Reuse a compatible local Harness Runtime across IDE windows and the companion VS Code extension. |
Native diffs, even without Git
Review file edits in the IDE's own diff viewer. For supported tool diff cards, DSH reconstructs before/after content from session history, so the preview does not depend on a Git repository. Proposed edits can be previewed before approval. If later file changes make reconstruction unreliable, the plugin reports that instead of showing a misleading comparison.
Before an approval can release a structured file edit, DSH checks IntelliJ's unsaved editor buffers against the proposed paths. Overlapping edits keep the approval pending until you save or revert the document.
How do I review the agent's changes in JetBrains?
Native change review is enabled by default. In the DSH tool window:
- Choose Review changes from the chat menu, or DSH: Review Changes from Find Action, to browse supported pending tool edits, completed tool edits, and captured turns in one native dialog. Tool-card and Changes file links open the same review surface.
- For an edit awaiting approval, use Approve tool call or Reject tool call. Each decision applies to the entire tool call, including its other files. Close leaves approval pending. Loaded previews are checked again before approval; save or revert overlapping unsaved editor documents first.
- Edit the right side of a pending preview to draft a correction. Request revision rejects the original call and attaches your edited contents to chat. Send a message to ask the Agent for a revised edit and a new approval. The draft does not write files or change the original tool arguments; ordinary approval is disabled while that call has edited drafts.
- Turn snapshots require Git and a local Runtime managed by this IDE. Keep the session selected before starting the turn. Captured text comparisons are saved in the IDE system directory, scoped to this project and Runtime endpoint, for up to 30 days within bounded storage. Reopened snapshots are read-only and cannot restore files. Older turns that were never captured cannot be reconstructed as turn snapshots.
For a captured local Git turn, Revert file restores one file, including captured creation, deletion or rename. Revert block… selects one remaining line block in a modified UTF-8 file of up to 1 MiB. Rollback preserves line endings and POSIX read/write permissions and rechecks disk contents, unsaved editor documents, Runtime identity and active-turn state. Partially reverted turns still support whole-turn restore. Saved history from a previous window stays read-only.
Uncheck Enable native change review in Settings → Tools → DeepSeek Harness to disable the review center, revision drafts and snapshot capture. Changes take effect immediately; tool-card links still open ordinary read-only diffs. The Runtime's own approval policy remains separately configurable.
Tool-card diffs use the connected Host's file preview API and can work without Git or a matching local file. They require supported structured edit data; shell edits may have no tool-card diff. A missing capability, binary or oversized file, or content that cannot be reconstructed reliably produces an error instead of a guessed comparison.
If these entries are missing, report the plugin version, Harness version, whether the session uses a local or remote Runtime, and the edit tool name (or the displayed error) in issue #28.
Put the right context into the conversation
Use DSH: Ask About Selection for an open-ended question, or the DSH context menu for explain / fix / review / documentation tasks. The context picker also supports attaching the current unstaged Git diff. Editor context is bounded by the configurable byte limit.
The composer accepts files pasted from the clipboard, dropped from the desktop, or chosen with the file picker. Files are uploaded to the connected Runtime and represented in the prompt by session-scoped receipts; the host never sends a client file path to the model. Use the copy button on a user or assistant message to place its text on the system clipboard.
Use the /template slash command to choose a bounded Markdown draft from .dsh/prompts and place it in the composer. The template is visible and editable; it is never sent until you submit it.
The native Conversation Outline command jumps to a selected turn. Finalized assistant messages also expose optional Runtime-backed feedback controls (rating, note, and session feedback); older Runtimes hide the controls without affecting chat. From a finalized message you can fork the session, restore that turn's code changes, or do both after the host revalidates the checkpoint.
Plan before implementing
Use the composer's Plan toggle or /plan to enter plan mode; /plan off leaves it.
The toggle changes the session mode without sending a task or consuming attached IDE context.
When the agent submits a plan for review, approve it or provide feedback with Continue planning.
The subagent tree and preview show active and completed execution time when the Runtime supplies it.
The Activity Dock also shows validated active reminders and, when the Runtime exposes them, a
read-only plugin inventory and dynamic Cordis plugin state. Dynamic plugin stop/remove/decline
actions are host-validated; the IDE never executes an untrusted Client-half plugin.
Chat and debug from the editor
Use DSH: Open Chat in Editor Tab from Find Action or the chat menu. The tab mirrors
its tool window: both share the selected Session, messages, controls and Runtime.
Closing a tab releases its view. Question drafts are saved in the project's local
IDE settings, including across IDE restarts; idle views do not overwrite edits.
Enable Allow Agent to control this IDE debugger in plugin settings, then restart
its locally owned Runtime. The Agent can start an existing Run/Debug configuration,
manage source breakpoints, pause/resume/step, select paused threads and frames, and
read bounded call stacks, current source and diagnostics through a local authenticated MCP
endpoint. Source diagnostics reuse existing IDE highlights. Runtime variable values are
not collected; attach any values needed for analysis manually.
The endpoint cannot create arbitrary launch configurations or evaluate expressions.
Externally managed Runtimes retain their own integrations.
debug_control can list bridge-owned executions and stop or restart one by its executionId, or by the debug sessionId returned from debug_start. These actions cover configurations launched through this bridge, including noDebug runs. Restart waits for the exact prior process to exit and reuses the existing configuration. A timeout reports failure before a replacement is started.
Product-specific debugger options and terminal context on the 2024.3 baseline are
listed with API evidence in TODO.
Keep the Runtime close to your tools
The plugin manages local Runtime startup, shutdown, and restart. Automatic startup discovers a compatible installed dsh; if none is available, it offers the official DeepSeek Desktop download. Explicit pnpm/npx launch commands remain available for advanced setups and use the configured Runtime version. You can also connect to an existing Runtime or open its Web UI in a browser.
Runtime 0.1.5 support includes transient assistant streaming across reconnects, V3 history and compaction records, submitted attachments, queued subagent prompts, and explicit Goal resume after reconnect. Mode selection follows Runtime policy, and skill menus show source paths on hover. The context ring still shows statistics on hover; click the model name to switch models.
The default Runtime is now 0.2.2-rc.1. The chat menu opens native Manage sessions, Manage DeepSeek account, and Manage schedules dialogs. Session management supports pinning and restoring archived sessions. Account management uses the Runtime's browser sign-in flow and shows profile and wallet balances. It reads generic account notices when the Host exposes them and supports legacy bonus notices. Schedule management creates and edits Host tasks, pauses or resumes them, runs a task after confirmation, and shows delivery history. Timing includes one-time, interval, daily, weekly, Cron and RRULE rules. Delivery can use the current session, one reusable new session, or a fresh session each time. In projects without a folder, the first explicit session can initialize the Runtime's default Workspace.
The IDE also bundles the shared Laya/Jev Runtime integration and mounts it into local Runtimes it starts. It is disabled by default. Enable it and selected decision features under Settings → Tools → DeepSeek Harness, configure a System One API key from the chat menu, then restart the Runtime. The key is stored in IntelliJ Password Safe. The endpoint accepts HTTPS or localhost/127.0.0.1 HTTP for local Laya; externally managed Runtimes are not modified.
Owned local Runtimes retry after crashes and can recover through isolated validation, bounded repair attempts, and reversible bundle isolation. The status banner offers cancellation, restoration, and redacted diagnostics export. Both automatic recovery and persistent bundle isolation can be disabled in settings. The bundled Node helper runs locally; it needs Node.js 24+ even with an installed standalone dsh.
Only a compatible Runtime advertised by an editor is reused automatically. The plugin reads dsh-ide Runtime advertisements and publishes only its own discovery record; legacy editor locks are read-only hints and never block startup. A short loopback gate reduces simultaneous startup races. A wrapper that exits while its Runtime still serves relinquishes ownership without causing a duplicate launch. Updating a verified local npm installation requires a native confirmation dialog. Manually configured external Runtimes remain externally managed. Upgrade old Runtimes before connecting; 0.1.5 history migrations are not a downgrade path.
Optional Agent Teams show members, tasks, dependencies, and write-scope warnings in the Activity Dock. Team members use the existing subagent history, follow-up, and interrupt controls. Enable the official Team profile bundle in the Runtime to use this feature; the plugin reads its Session projection.
The Session center offers live search with requests needing attention first, grouped by Harness Workspace. It also previews conversation text and supports rename, pin/unpin, archive/restore, and ordering within a Harness Workspace. The chat header shows the current working directory; historical file links and tool diffs resolve against the directory at the time of the operation. Current-file Problems can be selected from the attachment menu or @diagnostics, and Jobs include read-only execution history.
Native choice dialogs for models, providers, presets, plugins, schedules, Workspaces and templates support keyword filtering. Use the arrow keys to select a result and Enter to confirm; Escape cancels.
Use Open Runtime terminal in the chat menu to create or reattach a Host PTY. It retains its identity across session switching, restores its screen after reconnecting, and closes the Host process when its view is closed. Pending input is discarded on disconnect. Use Attach selection to chat or Attach screen to chat for an explicit one-shot context attachment of up to 64 KiB. This terminal is separate from the IDE terminal context feature.
Install, update or remove plugins uses the Runtime's official package manager, with package inspection, explicit install/removal confirmation, build-script approval, progress and cancellation. Settings now offer guided Web search/fetch configuration, and custom providers expose schema-defined model reasoning levels. Registry updates offer compatible newer versions. Git updates accept an explicit commit-pinned spec and version. Updates show progress, support cancellation, and report any recovery of the prior version. Runtime access grants govern available actions; readers cannot submit prompts or answer interactive requests without the corresponding permissions.
Timed questions show the Host countdown and preserve answer drafts through reconnects and view recreation. Questions that continue after timeout can still be answered in the next turn. Jobs expose live output and cancellation, with bounded output tails and reconnect cursors. Plugin settings show Bundle selections and plugin switches, including read-only reasons and whether a change needs a restart. Current Runtimes include the Host Schedule service. Older deployments may require enabling the Schedule bundle in plugin settings.
Use DSH: Headless Tasks from Find Action or Tools, or Headless tasks from the chat menu, to run a local one-shot task. Choose its local directory, optional permission preset and timeout. Tasks use the configured CLI and the headless profile. The prompt goes through stdin. The window shows answers, run events, diagnostics and explicit truncation notices, and supports cancellation, running again in a fresh Session, continuing an ended Session, copying answers and exporting a retained JSON snapshot.
Closing the task window keeps its tasks running. Closing the project cancels active tasks. Up to four tasks and twenty recent runs are retained in the project service during this IDE session. The Harness Session itself persists in its configured home. An optional Session id lets you continue it later, subject to the CLI's directory and profile checks. Headless permissions and interaction outcomes follow its noninteractive profile policy. API-key credentials come from the plugin's Password Safe entry or the launch environment and .env configuration. The shipped headless profile's credential rules are documented upstream. Headless profile reference
Choose Export conversation from the chat menu or DSH: Export Conversation from Find Action to save Markdown or JSON through the IDE's save dialog. Markdown contains conversation text and attachment markers. JSON retains the bounded event history and projections. Exports report incomplete history when the Session exceeds the history limit.
Enable the Runtime's Change requests & worktrees bundle, then use Changes and worktrees in the chat menu or DSH: Changes and Worktrees in Find Action. The native panel shows the Host checkout, bound change requests, checks and review threads. It reads local Git changes by scope and change request patches, and can track a change request URL. Before the first turn, request a worktree from HEAD or a chosen base branch. Pending requests can be cancelled and failed creation can be retried. The Host applies its sandbox and validates each operation.
Use DSH: Browse Runtime Workspace Files from Find Action or /ide to browse the selected Session’s Host files. Native previews are read-only UTF-8 text up to 1 MiB, refresh on Host file changes, and remain bound to their Runtime. DSH: Refresh Runtime File Previews provides manual refresh.
In the Forge panel, Review and merge actions publishes reviews and line comments, replies to or resolves discussions, submits or discards pending reviews, marks drafts ready, and merges with a repository-supported method. Available Host capabilities also offer failed-check reruns, reviewer selection and branch updates. Each write shows the URL, reviewed head and action for confirmation. Head changes reject stale actions. An unconfirmed outcome asks you to check the code host before another attempt.
API keys are stored in IntelliJ Password Safe and passed to a newly started local Runtime. The UI includes English and Simplified Chinese resources.
Configuration
Open Settings | Tools | DeepSeek Harness.
| Setting | Default | What it does |
|---|---|---|
| Command / Args | auto / empty |
Discover a compatible local or Desktop-registered dsh; explicit pnpm/npx launch commands remain supported. Automatic standalone Runtime download is deprecated. |
| Server URL / Port | "" / 0 |
Prefer an already running DSH Runtime; port 0 selects an available port for local startup. |
| Auto start | true |
Start or connect to the Runtime when the project opens. |
| Send with Enter | Disabled | Enable Enter to send and Shift+Enter to insert a new line. Ctrl/Cmd+Enter sends in either mode; changes apply immediately. |
| Native change review | Enabled | Review pending edits, draft corrections and capture local Git turns. Disable without restarting the Runtime. |
| Runtime version | 0.2.2-rc.1 |
Version for explicit package-manager launch commands; the minimum supported local Runtime is 0.1.5-rc.1. |
| Autonomous debugger | Disabled | Local MCP access to existing IDE configurations and public debugger controls; restart an owned Runtime after enabling. |
| Laya/Jev integration | Disabled | Bundled System One integration for locally started Runtimes; the endpoint, model, and optional policies are configurable. |
| npm registry | https://registry.npmmirror.com |
Registry mirror used as a download fallback. |
| Timeouts | 30s startup, 600s request |
How long to wait for startup and individual RPC calls. |
| Context bytes | 120000 |
Maximum UTF-8 bytes of <ide_context> included per prompt. |
| API key env | DEEPSEEK_API_KEY |
Environment variable the stored key is injected as. |
Troubleshooting
| Symptom | Where to start |
|---|---|
| Runtime does not start | Run DSH: Diagnose Environment and DSH: Open Runtime Logs via Find Action; check the command and package manager in settings. |
| Chat reports JCEF is unavailable | Use an IDE runtime with JCEF. The fallback panel provides a browser entry point. |
| A changed API key is not taking effect | Restart the local Runtime. For an external Runtime, update its credentials directly. |
Install from a release or build locally
Download the plugin .zip from GitHub Releases, then choose Settings → Plugins → ⚙ → Install Plugin from Disk…. Select the archive without unpacking it.
To build from source, use JDK 21 and the included Gradle wrapper:
git submodule update --init --recursive
./gradlew format # apply the repository's Java formatting rules
./gradlew lint # verify formatting and run Checkstyle
./gradlew verifyPlugin # structure and compatibility checks
./gradlew buildPlugin # produce the installable zip
On Windows, use gradlew.bat. The first build downloads Gradle and the IntelliJ Platform dependencies.
Gradle bundles Jev from the compiled distribution in vendor/dsh-jev-integration.
The parent repository pins its commit; initialize the submodule before building.
Jev requires no separate npm install or build for plugin packaging.
Data use and privacy
The plugin does not collect telemetry. Prompts and attached context are sent through the DSH Runtime to your configured model provider; that provider's terms and privacy policy apply. API keys stored by the plugin remain in IntelliJ Password Safe and are passed to newly started local Runtime processes.
Feedback and contributing
Report a bug or suggest a feature. For bugs, include your IDE and plugin versions, OS, Runtime version, and reproduction steps. Remove API keys and private code from any logs you share. Documentation improvements and focused pull requests are welcome; see repository rules before contributing.
If DSH helps your workflow, a GitHub star helps others discover it. For release history and attribution, see Releases and Third-party notices.
This community project is not endorsed or maintained by DeepSeek or JetBrains. Licensed under MIT.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found