@jayyuen66/dsh-dir-prep-organize

uinpmMIT

Two buttons beside the chat input: one rewrites the draft with the current directory in view, the other inserts a role template from 85 curated entries generated from the bundled `agents/` role library, which the settings card can extend with your own `.md` role files.

下载量 / Downloads
395

Install

dsh plugin --profile web add @jayyuen66/dsh-dir-prep-organize

Sandbox test

This plugin has not been tested yet. Submit a test →

README

<p align="center">

<img src="https://cdn.jsdelivr.net/gh/JayYuen666/dsh-dir-prep-organize@main/icon.svg" width="96" height="96" alt="dsh-dir-prep-organize logo" />

</p>

<h1 align="center">dsh-dir-prep-organize</h1>

<p align="center"><em>Two buttons beside the dsh chat input: rewrite the draft with the current directory in view, and insert a role template at the caret.</em></p>

<p align="center">

<a href="https://www.npmjs.com/package/@jayyuen66/dsh-dir-prep-organize"><img src="https://img.shields.io/npm/v/@jayyuen66/dsh-dir-prep-organize?style=flat-square&logo=npm&logoColor=white" alt="npm version" /></a>

<a href="https://www.npmjs.com/package/@jayyuen66/dsh-dir-prep-organize"><img src="https://img.shields.io/npm/d18m/@jayyuen66/dsh-dir-prep-organize?style=flat-square" alt="npm downloads (18 months)" /></a>

<a href="https://github.com/JayYuen666/dsh-dir-prep-organize/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/JayYuen666/dsh-dir-prep-organize/ci.yml?branch=main&style=flat-square&label=ci" alt="ci" /></a>

<img src="https://img.shields.io/badge/license-MIT-4c1?style=flat-square" alt="MIT" />

<img src="https://img.shields.io/badge/node-%3E%3D24.9-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />

<img src="https://img.shields.io/badge/dsh-%5E0.2.1--rc.5-658EFF?style=flat-square" alt="dsh" />

<a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/powered_by_dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white" alt="powered by dsh" /></a>

</p>

<p align="center">

<img src="https://skillicons.dev/icons?i=typescript,react,nodejs" alt="tech stack" />

</p>

<p align="center">

<a href="https://github.com/JayYuen666"><img src="https://img.shields.io/badge/GitHub-JayYuen666-181717?style=flat-square&logo=github&logoColor=white" alt="GitHub" /></a>

<a href="mailto:cqwkkj@gmail.com"><img src="https://img.shields.io/badge/Email-cqwkkj@gmail.com-EA4335?style=flat-square&logo=gmail&logoColor=white" alt="Email" /></a>

<a href="https://twitter.com/JayYuen666"><img src="https://img.shields.io/badge/Twitter-X%2FJayYuen666-000000?style=flat-square&logo=x&logoColor=white" alt="Twitter/X" /></a>

<a href="./README.zh-CN.md"><img src="https://img.shields.io/badge/lang-简体中文-658EFF?style=flat-square" alt="简体中文" /></a>

</p>

A dsh plugin: a split "Polish" button that hands your draft, the top level of the session directory and the recent real turns to the model selected for that conversation (falling back to the host default) for a rewrite, plus a "Template" dropdown of role templates. Zero model tools, zero HTTP routes of its own.

<img src="https://api.iconify.design/lucide/file-text.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> Contents

  • [What it does](#what-it-does)
  • [Install](#install)
  • [Verify it is live](#verify-it-is-live)
  • [What it does not provide](#what-it-does-not-provide)
  • [Enabling it in dsh](#enabling-it-in-dsh)
  • [The polish call](#the-polish-call)
  • [Templates](#templates)
  • [Settings](#settings)
  • [Public interface](#public-interface)
  • [Data and privacy](#data-and-privacy)
  • [Known boundaries](#known-boundaries)
  • [FAQ](#faq)
  • [Development](#development)
  • [License](#license)

<img src="https://api.iconify.design/lucide/shield.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> What it does

  • Adds two controls to the right of the web chat input: a split "Polish" button (main key + caret) and a "Template" dropdown.
  • The main key polishes directly; the caret key offers "polish in a role's style".
  • The dropdown groups entries by their group field; an entry with an empty group lands in "General".
  • Polish sends the draft, the top level of the session cwd (file names, sizes, and the full text of key text files), and the session's real user/assistant turns to the model selected for that conversation (falling back to the host default), then replaces the draft with the rewrite. The result is written back only while the session, draft revision and input phase are unchanged.
  • On failure the draft is never touched: the button shows an error state for 4 seconds with the reason in its tooltip.
  • Templates insert text at the caret through the input box's insert face: quoted blocks and attachments stay intact, and a stale insertion is refused instead of replacing the draft. Both controls are disabled while the input box is submitting.
  • The built-in set is 85 curated role templates, generated by scripts/gen-defaults.mjs from this package's agents/ role library - a vendored collection of several hundred role .md files across more than twenty department directories. The curated 85 is the number that matters to a user; the library size is not pinned here because it changes whenever the upstream project is refreshed.
  • That table stays host-side: the client bundle no longer inlines it. The generated file is ~640 KB and used to push client.js to ~711 KB.
  • The browser calls the Remote defaults method once, lazily (first menu open or first settings-card visit) and reuses it in-process. Nothing is fetched at all when the user already has their own templates.
  • While it has not arrived the menu shows a loading row - not the "no templates" hint. A failure surfaces the host's own reason plus a Retry button.
  • The settings card's "Role library" section covers per-entry add/edit/delete, a two-step restore of the defaults, one-click import of the whole built-in library, import of a local .md or directory by path, and registration of extra allowed import directories. That section is one list feeding two places: the input-box "Template" dropdown and the "Polish" ▾ role menu.
  • Templates and allowed directories are read and written through the host settings with zero LLM calls, and *

…(truncated)

Rendered from the README published on npm. Formatted only, not edited.

Versions

Published on npm::11,最后更新 2026-11-05

Links

GitHub · Homepage · npm

Same category