Skip to content

Releases

dsh-prompt-reforge 0.3.0

Choose a tag to compare

@Cloud017 Cloud017 released this 29 Oct 11:36

dsh-prompt-reforge 0.3.0

在 DSH 输入栏放一个「重铸」按钮:把正在写的草稿就地改写成更精准的提示词,再点一下恢复原文。

  • 结果整段替换草稿,只占一步撤销;
  • 重铸期间继续打字会丢弃结果而不覆盖你,并说明原因;
  • 走该会话已选中的模型与提供方,草稿不外发;
  • 取消、超时、宿主掉线都有明确状态,草稿永远不被动坏。

安装

plugin_manager action=install_bundle target=dsh-prompt-reforge

或指向本页的 tarball:

plugin_manager action=install_bundle target=https://github.com/Cloud017/dsh-prompt-reforge/releases/download/v0.3.0/dsh-prompt-reforge-0.3.0.tgz

本版变化

  • README 全部改为中文(GitHub 与 npm 展示的就是中文版),英文移到 docs/README.en.md;
  • 宿主半:请求体读取改为单次结算,被拒请求不会再挂住;超限改为排空而非销毁连接,浏览器能看到真实原因;非 JSON Content-Type 在读字节前就返回 415;模型调用抽成可单测的 reforge();
  • LLM 半:llm.stream() 兼容 thenable 与 async iterable;无 reason.kind 的 finish 不再误判为错误;已 abort 的调用不再消耗模型请求;超时优先于 abort 分类;
  • 浏览器半:状态订阅按会话分键,一个会话重铸不会唤醒另一个会话的按钮;
  • 测试从 71 项增至 84 项,含 415 路径、charset 参数、创建即抛的 stream、thenable stream、已 abort 的调用、会话隔离、抛错的 setDraft、销毁时取消在途请求。

完整变更见 CHANGELOG.md。

v0.2.2

Choose a tag to compare

@Cloud017 Cloud017 released this 21 Oct 07:46

Packaging-only release: the code is byte-identical to 0.2.1.

Fixed

  • The registry page rendered in Chinese because npm picks the first file matching {README,README.*} as the package readme, and that glob sorts README.zh.md ahead of README.md. The Chinese file now lives in docs/, so only the English one is in the root.
  • The files check in the manifest suite now compares the first path segment, so a nested entry is accepted.

Install

plugin_manager action=install_bundle target=dsh-prompt-reforge

Two tarballs are attached: dsh-prompt-reforge-0.2.2.tgz (pinned) and dsh-prompt-reforge.tgz (follows the newest release, safe for .../latest/download/).

v0.2.1

Choose a tag to compare

@Cloud017 Cloud017 released this 21 Oct 06:33

Rewrites the composer draft into a sharper prompt, in place, with one-click revert.

Button — a 28px control in the composer toolbar. It is inert until the draft is writable and a model route is resolved, and reports the reason in its tooltip when it is not.

Interaction

state click does
idle, draft ready rewrites the draft in place
rewriting cancels the request
rewritten restores the original draft

The rewrite lands as one insertText edit, so it is a single undo step. If you keep typing while it is in flight, the late result is dropped and the control says so instead of overwriting you.

Request contract

POST /plugins/dsh-prompt-reforge/enhance
{ "draft": "...", "provider": "yourapp", "model": "yourmodel", "sessionId": "..." }
-> { "ok": true, "text": "..." }

400 invalid_body | empty_draft | missing_route, 403 request_not_trusted, 405 method_not_allowed, 413 body_too_large | draft_too_long, 499 aborted, 502, 503 llm_unavailable, 504 timeout.

The host half calls whatever LLM route the caller names through ctx.llm.stream(). It ships no provider and no key.

Install

plugin_manager action=install_bundle target=https://github.com/Cloud017/dsh-prompt-reforge/releases/download/v0.2.1/dsh-prompt-reforge-0.2.1.tgz

Or point target at a local clone.

Compatibility — DSH >=0.2.1-rc.1 <0.3.0-0 || >=0.2.2-0 <0.3.0-0. Client peers are optional: without them the host route still answers.

MIT.