@y1x1n/dsh-prompt-optimizer 0.3.13 → 0.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -3,6 +3,7 @@
3
3
  [中文](README.md) | **English**
4
4
 
5
5
  [![CI](https://github.com/Y1X1n/dsh-prompt-optimizer/actions/workflows/ci.yml/badge.svg)](https://github.com/Y1X1n/dsh-prompt-optimizer/actions/workflows/ci.yml)
6
+ [![npm](https://img.shields.io/npm/v/@y1x1n/dsh-prompt-optimizer?label=npm&color=cb3837)](https://www.npmjs.com/package/@y1x1n/dsh-prompt-optimizer)
6
7
 
7
8
  A DeepSeek Harness plugin that adds an **Optimize** button (✨) next to the composer, one click analyzes and rewrites the prompt draft in your input box, with results **streamed section by section over SSE**. The optimization call reuses the current session's model route by default (read live on every click — switching models in the session takes effect immediately).
8
9
 
@@ -173,6 +174,12 @@ dsh-prompt-optimizer/
173
174
  - Both routes enforce an **origin fence**: requests carrying an `Origin` header (browser POSTs always do) must match `Host`, and `Host` must be a loopback address or the machine's actual local address — cross-site forged requests (CSRF) and DNS rebinding get a 403; command-line calls without `Origin` are unaffected.
174
175
  - The plugin holds no API keys: every model call goes through the Harness-configured `ctx.llm` routes.
175
176
 
177
+ ## Contributors
178
+
179
+ Thanks to the following contributors for improvements to this project (see the [contributing guide](CONTRIBUTING.md)):
180
+
181
+ - [@ruijiaang-lab](https://github.com/ruijiaang-lab) — contributing guide ([#2](https://github.com/Y1X1n/dsh-prompt-optimizer/pull/2))
182
+
176
183
  ## License
177
184
 
178
185
  MIT
package/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  **中文** | [English](README.en.md)
4
4
 
5
5
  [![CI](https://github.com/Y1X1n/dsh-prompt-optimizer/actions/workflows/ci.yml/badge.svg)](https://github.com/Y1X1n/dsh-prompt-optimizer/actions/workflows/ci.yml)
6
+ [![npm](https://img.shields.io/npm/v/@y1x1n/dsh-prompt-optimizer?label=npm&color=cb3837)](https://www.npmjs.com/package/@y1x1n/dsh-prompt-optimizer)
6
7
 
7
8
  DeepSeek Harness 插件:在会话输入框(发送栏)旁提供一个「优化」按钮(✨ 图标),一键分析并优化当前输入的提示词草稿,**结果经 SSE 流式逐段上屏**。优化调用默认复用当前会话的模型路由(每次点击实时读取,会话里切换模型立即生效)。
8
9
 
@@ -175,6 +176,12 @@ dsh-prompt-optimizer/
175
176
  - 两条路由均带**来源围栏**:带 `Origin` 头的请求(浏览器 POST 必带)必须与 `Host` 同源,且 `Host` 必须是回环地址或本机实际地址——网页侧的跨站伪造请求(CSRF)与 DNS rebinding 会被 403 拒绝;不带 `Origin` 的命令行调用不受影响。
176
177
  - 插件不持有任何 API Key:模型调用全部经由 Harness 已配置的 `ctx.llm` 路由。
177
178
 
179
+ ## 贡献者
180
+
181
+ 感谢以下贡献者为本项目提交改进(见 [贡献指南](CONTRIBUTING.md)):
182
+
183
+ - [@ruijiaang-lab](https://github.com/ruijiaang-lab) — 贡献指南([#2](https://github.com/Y1X1n/dsh-prompt-optimizer/pull/2))
184
+
178
185
  ## License
179
186
 
180
187
  MIT
package/lib/client.js CHANGED
@@ -1230,7 +1230,7 @@ function createSettingsCard(ctx, scope) {
1230
1230
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1231
1231
  "a",
1232
1232
  {
1233
- className: "dsh-po-btn",
1233
+ className: "dsh-po-btn dsh-po-repo-link",
1234
1234
  href: REPO_URL,
1235
1235
  target: "_blank",
1236
1236
  rel: "noopener noreferrer",
@@ -1448,7 +1448,7 @@ function ensureFocusStyles() {
1448
1448
  if (document.getElementById(ID)) return;
1449
1449
  const style = document.createElement("style");
1450
1450
  style.id = ID;
1451
- style.textContent = ".dsh-po-btn:focus-visible{outline:2px solid var(--dsw-alias-state-focus-ring, #4f7cf7);outline-offset:2px;border-radius:4px;}";
1451
+ style.textContent = ".dsh-po-btn:focus-visible{outline:2px solid var(--dsw-alias-state-focus-ring, #4f7cf7);outline-offset:2px;border-radius:4px;}.dsh-po-repo-link{transition:color 0.15s ease,background-color 0.15s ease;}.dsh-po-repo-link:hover{color:var(--dsw-alias-label-primary, inherit);background-color:var(--dsw-alias-fill-secondary, rgba(128,128,128,0.12));}";
1452
1452
  document.head.appendChild(style);
1453
1453
  }
1454
1454
  function apply(ctx) {
package/package.json CHANGED
@@ -1,10 +1,30 @@
1
1
  {
2
2
  "name": "@y1x1n/dsh-prompt-optimizer",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
4
4
  "description": "DeepSeek Harness 插件:在发送栏旁一键分析并优化提示词(复用当前会话模型)",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/Y1X1n/dsh-prompt-optimizer.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/Y1X1n/dsh-prompt-optimizer/issues"
14
+ },
15
+ "homepage": "https://github.com/Y1X1n/dsh-prompt-optimizer#readme",
16
+ "keywords": [
17
+ "deepseek",
18
+ "dsh",
19
+ "harness",
20
+ "prompt",
21
+ "optimizer",
22
+ "plugin",
23
+ "cordis"
24
+ ],
25
+ "engines": {
26
+ "node": ">=18"
27
+ },
8
28
  "exports": {
9
29
  ".": "./lib/index.js",
10
30
  "./client": "./lib/client.js",