dshbase

插件目录 / Developer / dsh-better-sidebar-jupyter

dsh-better-sidebar-jupyter

已验证 · 实测可装 dong-victor

✓ 持续维护 基于 2 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-19最近推送
跨平台平台

功能简介

Developer 类别的 DeepSeek Harness 插件。

✅
我们的评价
可用 — 实测通过,早期项目

Developer 类别的 DeepSeek Harness 插件。 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

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

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-better-sidebar-jupyter」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:dong-victor/dsh-better-sidebar-jupyter

Headless(CLI)profile:

dsh plugin --profile headless add github:dong-victor/dsh-better-sidebar-jupyter

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7819 个插件 →