dsh-r-ide
A four-pane R IDE (Editor / Console / Environment / Plots) integrated into DeepSeek Harness as a tab of [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar), with one dedicated R process per conversation.
- Stars
- 0
- Language
- JavaScript
- Created
- Aug 22, 2026
- Updated
- Aug 22, 2026
Introduction
dsh-r-ide
English | 简体中文
A four-pane R IDE (Editor / Console / Environment / Plots) integrated into DeepSeek Harness as a tab of dsh-better-sidebar, with one dedicated R process per conversation.
┌──────────────┬──────────────┐
│ Editor │ Environment │
│ (CodeMirror)│ (env table) │
├──────────────┼──────────────┤
│ Console │ Plots │
│ (Rterm) │ (png wall) │
└──────────────┴──────────────┘
Features
- Console: a real interactive Rterm session (node-pty + xterm).
- Editor: CodeMirror 6 with R syntax highlighting;
Ctrl/Cmd+Enterruns the selection (or the whole file when nothing is selected),Ctrl/Cmd+Ssaves; open / create / save.Rfiles (with whole-filesystem browsing). - Environment: automatically lists
.GlobalEnvobjects (name / type / size / content preview); click to expand, delete or clear. - Plots: each
plot()produces its own PNG; the thumbnail wall supports zoom, delete, save and clear. - Fullscreen mode; auto-degrades to a single pane on narrow screens (<900px).
Session lifecycle: closing the R tab exits R; reloading the page starts a fresh R session (the environment is not preserved); switching away and back without reloading reuses the same R process.
Usage
- Open the DeepSeek Harness sidebar and pick R from the
+menu to open the IDE. - Write code in the editor and press
Ctrl/Cmd+Enterto run it in the console;plot()calls in the console automatically appear in the Plots pane. - The toolbar can switch between locally installed R versions (switching restarts the current R session and clears the environment).
Installation
Prerequisites: DSH (dsh web) + better-sidebar ≥ 0.13, and R installed locally (an empty rPath auto-probes; the toolbar can also switch R versions manually).
One-command install
dsh plugin --profile web add github:Qiwei-QW/dsh-r-ide#v0.1.1
- Automatically installs and mounts the plugin (writes
dsh.profile.bundles; the plugin's own patch is applied automatically) — no manual file edits. - Restart
dsh webafterwards; the R tab appears in the sidebar+menu.
If pnpm warns that node-pty's build script was ignored, add
allowBuilds: node-pty: trueto the profile'spnpm-workspace.yaml(usually already present when better-sidebar is installed).
Manual install (equivalent)
# Edit ~/.dsh/profiles/web/package.json:
# add to dependencies "dsh-r-ide": "github:Qiwei-QW/dsh-r-ide#v0.1.1"
# append to dsh.profile.bundles "dsh-r-ide"
cd %USERPROFILE%\.dsh\profiles\web
pnpm install
To apply: hard-refresh the browser for client-side changes; restart dsh web for host-side updates (Node ESM module cache).
⚠️ If you previously installed via a hand-written
insert, remove the- id: r-iderow from the profile'scordis.patch.ymlfirst to avoid double mounting.
Alternative: clone + offline copy
git clone https://github.com/Qiwei-QW/dsh-r-ide
cd dsh-r-ide && node build.mjs # build (zero-dependency; inlines xterm/CodeMirror)
copy dsh-r-ide %USERPROFILE%\.dsh\profiles\web\node_modules\dsh-r-ide # real copy, not a junction/symlink
# then append to the profile's cordis.patch.yml:
# - insert:
# - id: r-ide
# name: 'dsh-r-ide'
# config:
# rPath: '' # empty = auto-probe; or an absolute Rterm path
Configuration
r-ide.config (in cordis.patch.yml):
| Field | Default | Description |
|---|---|---|
rPath | empty (auto-probe) | Absolute path of the R console, e.g. D:\R\R-4.5.3\bin\x64\Rterm.exe |
rArgs | ['--no-save'] | Extra arguments for Rterm |
maxPerSession | 1 | Max R processes per session |
reconnectGraceMs | 30 min | How long an R process is kept alive after a disconnect |
Known Limitations
- Host-side code updates require restarting
dsh web. - Fullscreen mode is recommended for narrow sidebars.
- R highlighting uses a hand-written tokenizer, less precise than
@codemirror/lang-r(swappable). - No breakpoint debugging / incremental environment sync (ark-level) yet.
License
MIT