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

dsh-session-theme

v0.2.1

Published

DSH web plugin: show every session's theme in the left sidebar on open — warms the session projection cache at startup so session.list carries titles for cold sessions.

Readme

dsh-session-theme(会话主题直显)

English | 简体中文

DSH 网页端插件:打开页面时左侧边栏直接显示每个会话的主题,不用再点进会话。

解决什么问题

DSH 侧边栏的会话列表里,没点开过的会话不显示主题,只显示工作区文件夹名 (或占位 ID),点进某个会话后主题才出现。

根因:session.list 对「本进程从未打开过的冷会话」只读投影缓存的零 I/O 行 (cachedSnapshot);如果某个会话的 title 投影从未被写入缓存,列表行就没有 title,侧边栏就回退到文件夹名。只有打开会话(触发完整冷读梯子)才会恢复出 标题。

原理

插件在启动时对每个持久化会话执行投影缓存的冷读梯子(coldSnapshot): 从存储日志重新折叠出 title 投影并持久化写回缓存。之后 session.list 返回的每一行都带 title 投影 → 侧边栏原生显示每个会话的真实主题,无需点击。

  • 只处理「冷会话」(本进程未打开的);已加载会话的列表行本来就带实时投影。
  • 逐个会话 fail-soft:某个日志损坏不影响其它会话,也不阻塞启动。
  • 写回是幂等的:下次启动直接命中缓存快路径,秒开。

安装

link 安装、零外部依赖(host 端只用标准服务):

dsh plugin --profile web add link:C:/Users/Lie/dsh-session-theme

或从 GitHub 克隆:

git clone https://github.com/Xliecc/dsh-session-theme.git
dsh plugin --profile web add link:./dsh-session-theme

或从 npm 安装:

dsh plugin add dsh-session-theme

安装后硬刷新浏览器(Ctrl/Cmd+Shift+R)重新拉取 session.list

文件

  • lib/index.js — host 侧:启动时预热投影缓存(全部行为)
  • lib/client.js — 浏览器侧占位(无操作,保持注册清单一致)

协议

MIT