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

@khalilhsu/dsh-ui-conversation-folded

v0.1.2

Published

Fork of the conversation domain with per-turn folding: each round's assistant activity (CoT + tool calls) is bounded to a max-height scroll container with collapse and streaming auto-scroll. UI-only.

Readme

@khalilhsu/dsh-ui-conversation-folded

npm version License: MIT

UI-only fork of @deepseek-ai/dsh-client-ui-conversation for DeepSeek Harness. Folds each round's assistant activity — intermediate CoT ("Think" rows), tool calls, and in-between narration — into a bounded, scrollable container per turn.


🚀 Installation & Uninstallation

1. Install (via npm)

# Add the plugin to your Harness web profile
dsh plugin --profile web add @khalilhsu/dsh-ui-conversation-folded

# Restart dsh web and refresh your browser
dsh web

2. Uninstall

dsh plugin --profile web remove @khalilhsu/dsh-ui-conversation-folded

✨ Features & Behavior

| Feature | Description | |---|---| | Bounded Height | Scroll area for intermediate actions is capped at --cot-fold-max-height (default 288px) with an internal scrollbar. | | Fold & Unfold | Slim clickable bar with 收起 / 展开 showing N tool calls · M thinking · duration. | | Streaming Auto-Scroll | Follows the newest tokens/tool outputs while running; scrolling up pauses follow, returning to bottom resumes it. | | Auto-Collapse on Final | Automatically collapses the fold once the final closing response begins streaming. | | Questions Stay Visible | ask_user_question rows are treated like the turn-tail: they render OUTSIDE the fold, so a pending "提问·等待回答" row is never hidden (or unmounted) by a collapsed fold. | | Session Toggle | Header button (思考折叠 / 思考展开) turns the fold behavior on/off globally, saved in localStorage. | | Full Interaction Preserved | Inspecting tool calls, per-tool expansion, code copying, and markdown features work unchanged. |


🏗️ Architecture: Why a replacement fork?

The chat flow in DSH is a keyed React list (order.map(nodeKey => <ChatNodeSeat/>)). Wrapping individual rows via DOM mutation plugins breaks React's reconciliation during paging, older message prepend, and compaction markers.

The fold is therefore implemented directly inside ChatView as a React-level turn grouping. This fork is registered via patch.yml to replace the default ui-conversation package seamlessly.

patch.yml            disables shipped ui-conversation, injects this fork
src/client/chat/
  ChatView.tsx       turn segmentation (slots: plain rows vs fold units)
  TurnFold.tsx       the fold: bar + capped scroller + running auto-scroll
  CotFoldToggle.tsx  session-header on/off switch
  fold-store.ts      preference state (useSyncExternalStore)
  ChatView.module.css

🛠️ Build from Source

# 1. Symlink dependencies from a DeepSeek Harness checkout
ln -s /path/to/deepseek-harness/packages/client/ui-conversation/node_modules node_modules

# 2. Build client & host bundles
#    lightningcss is resolved dynamically (no hardcoded machine path): the
#    symlink above points into the checkout, so `npm run bundle` works as-is;
#    alternatively set DSH_ROOT=/path/to/deepseek-harness or run tsdown from
#    inside the checkout.
npm run bundle

# 3. Add local package to profile
dsh plugin --profile web add /path/to/ui-conversation-folded

License

MIT