DeepSeek Harness 插件

dsh-better-sidebar-jupyter

Jupyter notebook support for the dsh-better-sidebar editor: .ipynb opens inline as a runnable notebook viewer with IDEA/PyCharm-style run mode (Ctrl+Enter / Shift+Enter / run-all shortcuts, IDEA(英文原文)

跳到安装方式

来源信息

GitHub 仓库
dong-victor/dsh-better-sidebar-jupyter
最近更新
2026年8月19日
分类
界面增强
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/dong-victor/dsh-better-sidebar-jupyter
插件名:dsh-better-sidebar-jupyter
作者:dong-victor

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器2 个文件
README.md来源说明 · 只读预览

dsh-better-sidebar-jupyter

Jupyter notebook support for dsh-better-sidebar: .ipynb files open inline in the sidebar editor as a runnable notebook view — Python syntax highlighting, cell execution through a lazy-start Python kernel (jupyter_client + ipykernel via python/bridge.py), streaming outputs, and save-back.

Merged from the Jupyter support of @dong-victor/dsh-explorer, adapted to the better-sidebar plugin architecture: the viewer registers through the ctx.betterSidebar.registerFileViewer service, and every route is session-scoped — the notebook must live inside the conversation's working directory.

Requirements

  • dsh-better-sidebar ≥ 0.13.0 (the registerFileViewer service)
  • Python with jupyter_client and ipykernel for cell execution:

pip install jupyter_client ipykernel

Install

cd ~/.dsh && dsh plugin --profile web add @dong-victor/dsh-better-sidebar-jupyter

(or add it from the Side card settings → 文件预览 → “添加预览插件”.)

What you get

  • .ipynb opens in the sidebar editor (single-click in the explorer / any

open-path flow), rendered by the inline notebook viewer.

  • IDEA/PyCharm-style run mode — shortcuts and toolbar mirror IntelliJ's

Jupyter support (Windows keymap): - Ctrl+Enter — run the current cell (stays in the cell for editing). - Shift+Enter — run the current cell and select the cell below; when there is no cell below, a new one is created (IDEA behavior). - Ctrl+Alt+Shift+Enter — run all code cells. - Ctrl+F2 — interrupt the running kernel. - Ctrl+Home / Ctrl+End — move the caret to the start/end of the current cell; outside an editor, focus the first/last cell of the notebook. - Ctrl/Cmd+S — save.

  • IDEA toolbar: ▶ Run cell and select below · ▶▶ Run all · ■ Interrupt ·

↻ Restart · ⏻ Shutdown · 🧹 Clear all outputs · + Add cell below · ↑/↓ Move cell · cell-type selector (Code/Markdown/Raw) · ⇡/⇣ select above/below · kernel status widget (state + kernel name) · save.

  • Per-cell IDEA affordances: green ▶ gutter run button on every code cell

(hover/selected), In [n] execution counter, Out[n] on results, and the execution duration in the cell's lower-left corner (hover shows the completion date/time). Error outputs render as collapsible tracebacks (IDEA-style summary row + expand toggle).

  • Lazy kernel: the Python bridge starts on the first run — no startup cost for

plain browsing. Kernels keep running in the background while the editor is closed, and finished executions are written back into the .ipynb file (run-all survives tab switches / session switches / reconnects). Reopening a notebook — or coming back after switching sessions — re-syncs the whole batch: the executing cell shows as running with its latest partial output, and the queued tail of a run-all batch shows as queued.

  • Explorer indicator: notebooks whose kernel is alive get a green dot

next to their file name in the sidebar file browser (pulsing while a cell executes), so a background run is visible even with the notebook closed.

  • Syntax highlighting follows the app theme (IDEA/Darcula-style Python

highlighting, --dsw-* tokens).

Architecture

  • src/index.ts (host half): mounts the fenced routes

/api/dsh-better-sidebar-jupyter/* (env / notebook GET+PUT / kernel lifecycle) and the kernel WebSocket upgrade, with one KernelManager per notebook path. Every request carries sessionId (+ optional cwd) and a path; src/host/gate.ts requires the canonical path to live inside the session's authoritative working directory.

  • python/bridge.py: a JSON-lines RPC shim that owns the real Jupyter kernel

(all ZeroMQ handling stays in Python — no native ZMQ bindings in Node).

  • src/client/ (client half): the .ipynb file viewer (NotebookView) wraps

the notebook editor UI (EditorView + cells + outputs), talking to the host through a session-scoped JupyterApi.

Security

All routes pass the same browser-trust fence as the DSH /api gateway (Host-header loopback or trustedHosts), and notebook paths are gated to the session's cwd — a cross-site page cannot reach the kernel or read/write files outside the conversation's directory.

License

MIT