npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@max1997/dsh-notebook

v0.1.2

Published

Per-session notepad for the dsh web GUI: a header button opens a dropdown panel where you collect AI answers/copy as notes, edit them, sync to the composer or send directly. Selecting text in the chat shows an "Add to notebook" affordance. Notes are store

Readme

dsh-notebook

会话级记事本 —— DSH Web GUI 头部的一个「记事本」按钮,点开是下拉面板。 随手把 AI 对话的回答/文案收集进记事本,统一整理,再一键发送到输入框或直接发送。

A per-session notepad for the dsh web GUI. A header button drops a panel where you collect chat answers/copy as notes, edit them, sync them into the composer or send them directly. Select text in the chat to surface an "Add to notebook" button.

预览 / Previews

在会话标签栏右侧的「📖 记事本」标签点开面板:左侧列表、右侧编辑(自动保存)、底部「发送到输入框 / 直接发送」。

Click the "Notebook" tab next to the session tabs to drop the panel: note list on the left, auto-saved editor on the right, and send/sync actions at the bottom.

面板总览 / Panel overview

在聊天内容中选中文本,会在鼠标旁出现橙色描边的「+ 添加到记事本」按钮。

Select chat text and an orange "Add to notebook" button appears next to the cursor.

选中文本 → 添加到记事本 / Select text → add to notebook

点击后弹出目标选择:选已有记事本,或点「+」新建——新建的记事本自动作为目标;写入模式支持追加(默认,自动加空行分隔)/ 覆盖。

Pick an existing note or create a new one with "+" (the target switches to it automatically); choose Append (default, blank-line separated) or Overwrite.

添加弹窗 / Add popup

功能 / Features

  • 每个会话独立一份记事本:数据按 sessionId 隔离,互不影响;重开/刷新同一会话内容还在(除非自己删除)。新会话首次打开时是空白状态。
  • 下拉面板:点击头部「记事本」按钮像帘子一样展开;右上角「×」或点击面板外任意处收起,不用切换页面。
  • 左侧列表:新增 / 重命名 / 删除(二次确认)/ 当前选中高亮 / 空状态引导。
  • 右侧编辑:直接编辑,内容自动保存(防抖 600ms,切换/关闭/失焦时立即落盘)。
  • 直接发送:把当前记事本内容作为消息发送到当前会话(生成中自动排队);发送到输入框:同步到 composer(追加/覆盖可选),不自动发送。
  • 添加到记事本:在聊天内容中选中文本 → 出现「添加到记事本」按钮 → 选择目标记事本 + 写入模式(追加/覆盖,默认追加,追加自动加空行分隔)。
  • 内容存在官方 settings 文档(notebook namespace,host 由 dsh-settings-file 落盘),清浏览器缓存不丢失。

安装 / Install

# 方式一:本地目录(开发)
dsh plugin --profile web add /Users/kc/Documents/project/dsh-notebook

# 方式二:npm(发布后)
dsh plugin --profile web add @max1997/dsh-notebook

安装后重启 dsh 进程(host 半区注册 settings section),再刷新 Web GUI 页面

升级dsh plugin --profile web update @max1997/dsh-notebook,然后重启 dsh + 刷新页面。

数据 / Data

保存在 settings namespace notebook(schema 驱动):

{
  "sessions": [
    {
      "sessionId": "…",
      "notes": [
        { "id": "…", "name": "标题", "content": "内容", "createdAt": 0, "updatedAt": 0 }
      ],
      "activeNoteId": "…"
    }
  ]
}

开发 / Development

pnpm build      # tsc 类型检查 + lib 构建
pnpm watch      # 增量构建 lib/client.js

结构:

  • src/index.ts — host 半区:注册 notebook settings namespace
  • src/client/ — 浏览器半区:conversation.session.header.actions slot
    • NotebookButton.tsx — 头部按钮 + 下拉面板开关 + 选中文本监听
    • NotebookPanel.tsx — 左右分栏面板(列表 / 编辑 / 发送 / 同步到输入框)
    • AddToNotebookPopup.tsx — 添加到记事本弹窗(选择 + 追加/覆盖)
    • note-store.ts — 按会话隔离的数据层(内存镜像 + 防抖持久化)
    • selection.ts — document 级选中文本监听与浮层定位

License

MIT