Skills Plugins MCP Prompt Model 导航 博客 资讯 我的中心
界面增强 #deepseek-harness#dsh-plugin#dsh-plugin-ecosystem#notebook#sidebar

dsh-notebook

侧边栏记事本:带标题与正文的记事,可插入图片(拒收视频);点标题把正文复制到剪贴板;输入框里可用 @ 引用某条记事;可选在新会话时自动打开记事本。

wyzh0117 @wyzh0117 ⬇ 1 ★ 0 main

安装

dsh plugin --profile web add github:wyzh0117/dsh-notebook
下载安装清单

需要可复现安装时,可在仓库后追加 #commit 固定提交。

侧边栏记事本:带标题与正文的记事,可插入图片(拒收视频);点标题把正文复制到剪贴板;输入框里可用 @ 引用某条记事;可选在新会话时自动打开记事本。

该插件未提供要点说明,请参考仓库 README。

deepseek-harnessdsh-plugindsh-plugin-ecosystemnotebooksidebar
  1. 安装并启动 DeepSeek Harness:npx @deepseek-ai/dsh web
  2. 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
  3. 用 dsh plugins list 确认已安装,必要时重启 Harness 生效

插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。

代码仓库github.com/wyzh0117/dsh-notebook
许可证MIT
主要语言main
下载量1
GitHub 星标0
最近推送2026-09-16
收录日期2026-09-19
分类界面增强

事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。

以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。

# dsh-notebook

**A notebook in DSH's sidebar.**

`+` a note → title + body → paste images → **Done** files it under its title.
Click a title to copy the body · type `@` to reference a note · **Edit** reuses the same container.

[![CI](https://github.com/wyzh0117/dsh-notebook/actions/workflows/ci.yml/badge.svg)](https://github.com/wyzh0117/dsh-notebook/actions/workflows/ci.yml)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
[![node](https://img.shields.io/badge/node-%3E%3D20-3c873a.svg)](https://nodejs.org)
[![dsh](https://img.shields.io/badge/dsh-%3E%3D0.1.1--rc.2-6b4fbb.svg)](#compatibility)
[![tests](https://img.shields.io/badge/tests-vitest-6da55f.svg)](./test)

`dsh-plugin` · `deepseek-harness` · `notebook` · `notes` · `sidebar`

**English** · [中文](./README.zh-CN.md)

**What's new**

- **v0.2.0** — the conversation can write notes too: select text for a floating **“To notebook”** action, or click the notebook icon at the end of any answer to save the whole reply. Both on by default.
- **v0.2.1** — the body box sizes itself: it grows as you type, shrinks as you delete, stops at 60 % of the window height.
- **v0.2.2** — no more native confirm prompts (a native modal can freeze an embedded host); every string follows the shell's language.
- **v0.2.3** — “Open the notebook for new sessions” now really opens the sidebar.

**Jump to** · [Features](#features) · [Install](#install) · [Usage](#usage) · [Compatibility](#compatibility) · [Settings](#settings) · [Under the hood](#under-the-hood) · [Limitations](#known-limitations) · [FAQ](#faq) · [Development](#development)

> **Suggested GitHub topics:** `dsh-plugin` `deepseek-harness` `notebook` `notes` `sidebar`

---

## What it is

`dsh-notebook` is a Web plugin for [DSH (DeepSeek Harness)](https://github.com/deepseek-ai/dsh) that puts a small notebook in the sidebar.

It does one thing: jot down a note with a title, a body and a few images, then use it from the composer — click a title to copy the body, type `@` to reference a note.

No rich-text editor, no cloud sync, no version history. Notes are **global** (not per conversation) and images are stored as **real files on the host disk**.

## Features

| Feature | Detail |
|---|---|
| **`+` creates an entry** | Top-right of the panel; the editor opens **inside the panel** — no new window, no second tab |
| **Title + body + images** | Single-line title, content-sized body, image thumbnail strip in one scrollable container |
| **Images yes, videos no** | Paste, drag & drop and “Insert image” share one validation path: `video/*` and `mp4/mov/webm/mkv/avi/m4v/ogv` are refused inline |
| **“Done” files it under its title** | The list shows one row per note, newest first, with “time · N images” as secondary metadata |
| **Click the title to copy** | Copies the **body only** — never the title — with images as `[image: name]` lines and a “body copied (N chars)” toast. It never writes into the composer |
| **`@`-reference a note** | Typing `@` lists notes under the localized “Notebook” heading (title + snippet, newest first, max 8). Picking one inserts an atomic chip; only the **body** reaches the model |
| **“Reference” row button** | Same as an `@` pick, from the row itself; with no reachable composer it says so instead of pretending |
| **Select text → “To notebook”** (v0.2.0, on) | A floating action beside the selection files it verbatim as a note titled `未命名1`, `未命名2`, … Selections inside the composer or in the panel itself are not offered |
| **Every answer → “save to notebook”** (v0.2.0, on) | One icon at the end of the answer's action row saves the whole reply, titled with the **session's own title** |
| **Both captures are switchable** | `selectionToNotebook` / `messageToNotebook` in settings; a change applies on the next render, no reload |
| **Auto-open for new sessions** (off by default) | Opens the Notebook whenever a session becomes current — including the one a page load restores. All three tiers honour it |
| **“Edit” reuses the same container** | The DOM never holds more than one editor |
| **Images land on disk** | Uploaded as `dataURL`, decoded by the host into `$DSH_HOME/storages/notebook-attachments//`; deleting a note deletes them too |
| **Atomic writes, no silent loss** | Temp file → `fsync` → `.bak` → `rename`, serialized by a mutex. If `$DSH_HOME` is not writable the host degrades to memory and every response carries `degraded: true`, which the UI shows as a banner |
| **Keyboard** | `Cmd/Ctrl+Enter` = Done, `Esc` = Cancel (a dirty draft asks first) |

Longer, deeper notes on the design live in [Under the hood](#under-the-hood).

## Screenshots

> Real screenshots from a live run — the tier 3 rows come from an environment with no sidebar product installed.

| | |
|---|---|
| ![Notebook panel](docs/images/panel-open.png) | ![Editor container](docs/images/editor.png) |
| The Notebook list in the sidebar (`+` in the top-right); expanding pushes the conversation column 400 px | The editor container: title, body and image thumbnails (paste / drop / picker) |
| ![Copy body](docs/images/list-and-copy.png) | ![Standalone panel](docs/images/collapsed-button.png) |
| The “body copied” toast after clicking a title — the body only, never the title | The self-drawn panel (tier 3): the toggle is pinned to the viewport's top-right corner |

Folded into `dsh-better-sidebar` instead (tier 2) — see [Compatibility](#compatibility):

![Notebook inside better-sidebar](docs/images/tier2-better-sidebar.png)

## Install

| | |
|---|---|
| DSH | `>=0.1.1-rc.2` |
| Node | `>=20` |
| Package manager | **pnpm** — this repo does not support npm |

**From the repository:**

```sh
dsh plugin --profile web add github:wyzh0117/dsh-notebook
```

**From source (development):**

```sh
git clone https://github.com/wyzh0117/dsh-notebook.git
cd dsh-notebook
pnpm install
pnpm build            # emits lib/index.js, lib/client.js, lib/types/**

dsh plugin --profile web add "link:$PWD"
```

The manual equivalent — in `~/.dsh/profiles/web/package.json`:

```jsonc
{
  "dependencies": { "dsh-notebook": "link:/abs/path/to/dsh-notebook" },
  "dsh": { "profile": { "bundles": [ /* … */, "dsh-notebook" ] } }
}
```

Then `pnpm install` inside the profile directory. `dsh.profile.bundles` must contain `dsh-notebook`, otherwise the plugin is never loaded.

> **While developing, never restart the DSH instance you are working in** (e.g. the Web GUI on port 3080 — restarting it kills the current session). For a real end-to-end check, start an isolated environment:
> ```sh
> DSH_HOME=/tmp/dshnb-home npx -y --package @deepseek-ai/dsh dsh web --port 3099
> ```

## Usage

1. Expand the right sidebar and open **Notebook**.
2. Click **`+`** in the top-right — the editor opens inside the panel.
3. Write a **title** and a **body**. The body box follows its content (up to 60 % of the window height, then it scrolls inside). Add images by pasting, dropping, or “Insert image” — videos are refused; one image is capped at 10 MB and a note at 20 images (both adjustable).
4. Click **Done** (or `Cmd/Ctrl+Enter`) — the note is filed under its **title**.
5. Click the **title text** to copy the body to the clipboard.
6. To let the model read a note, type **`@`** in the composer and pick it, or click **`Reference`** at the end of its row. Only the **body** is sent; re-insert a reference after a page reload.
7. **`Edit`** reloads a note into the same container; **`Delete`** asks in the panel's own dialog first.
8. Let the conversation write notes for you (v0.2.0):
   - **Select text in the session** → click the floating **“To notebook”** action.
   - **Click the notebook icon at the end of an answer** → the whole reply is saved under the session's title.

   Both confirm with the same toast and can be switched off in settings.

## Compatibility

| | |
|---|---|
| DSH | Minimum `>=0.1.1-rc.2`; the development machine runs `0.1.5-rc.2` with `@deepseek-ai/dsh-client-ui-sidebar-right`, where **tier 1 is the live tier** |
| Node | `>=20` |
| `dsh-better-sidebar` | Optional. Tier 2 targets 0.4.0–0.18.x; 0.19+ is handled by tier 1 |
| Optional DSH plugins | Without `conversation`, `inputTriggers` or `sessions`, the matching integration simply turns off and the v1 behaviour returns |
| Older shells | Every feature registers through optional seams and degrades instead of breaking: a missing slot means the capture entry never appears, an unreadable locale falls back to the plugin's own `zh` dictionaries, and the panel keeps rendering without `window.confirm` or any dialog API |

### How it adapts — the three tiers

DSH's right column changed owner around `0.1.5-rc.1`: before that, plugins such as `dsh-better-sidebar` drew it themselves; afterwards DSH owns it and plugins register tabs. So the client probes once and settles on one of three tiers — **at most one Notebook entry exists on the page**:

| Priority | Tier | Trigger | Registration |
|---|---|---|---|
| 1 | **`native`** | `ctx.get('sidebarRightTabs')` exists (DSH ≥ 0.1.5-rc.1) | `sidebarRightTabs.register({ id, kind, priority:'extension', title, guide })` + the tab body into the keyed slot `sidebar.right.pane.tab` |
| 2 | **`service`** | `ctx.get('betterSidebar')` exists (better-sidebar 0.4.0–0.18.x and similar) | `ctx.betterSidebar.registerTab({ id:'dsh-notebook:notebook', single:true, settings:{…} })` |
| 3 | **`standalone`** | neither of the above | Draws its own right panel, matched to `dsh-better-sidebar` 0.12.1 |

Deliberate choices:

- `betterSidebar` is **never** in `export const inject` — a missing service in `inject` would stop the plugin from activating and kill tier 3.
- Detection is “sync first, async fallback”: if neither `ctx.get` hits, the plugin watches `ctx.inject` and arms a **700 ms fallback timer** that mounts standalone.
- **Late upgrade**: a service appearing after standalone is mounted tears standalone down *first*; the two are never live at once.
- Every registration sits in `ctx.effect(() => { …; return dispose })`, so HMR and disable are clean.

### The tier-3 self-drawn panel

| Item | Spec |
|---|---|
| Expand button | 28×28, pinned to the viewport's top-right corner, 16 px linear icon, delayed tooltip, state-following `aria-label` |
| Geometry | `PANEL_MIN=280` / `PANEL_MAX=640` / `PANEL_DEFAULT=400`, clamped against the viewport |
| Width drag | 6 px grab strip on the panel's left edge (`setPointerCapture` + `clientX` delta) |
| Narrow viewport | `innerWidth < 768` becomes a full-width `100vw` drawer with no drag strip |
| Layout push | Sets `--dsh-notebook-width` and `data-dsh-notebook-collapsed` / `-dragging`, consumed by one namespaced `

数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。