@lixiangzhong/dsh-suggestion 0.0.0-stage → 0.1.2

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.md CHANGED
@@ -1,3 +1,51 @@
1
- # Temporary Holding Version
1
+ # dsh-suggestion
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ DSH 插件:每轮任务结束后,用模型生成一句「下一步建议」写进输入框占位文字,<kbd>Tab</kbd> 一键填入草稿。
4
+
5
+ ```text
6
+ ┌────────────────────────────────────────────────┐
7
+ │ 修复 go test 的 3 个失败用例 │ ← 建议(占位文字)
8
+ │ │
9
+ │ + 发消息… ↑ │
10
+ └────────────────────────────────────────────────┘
11
+ ```
12
+
13
+ ## 安装
14
+
15
+ 从 npm 安装:
16
+
17
+ ```text
18
+ plugin_manager install_bundle target=@lixiangzhong/dsh-suggestion
19
+ ```
20
+
21
+ 本地开发(以符号链接方式装进 profile):
22
+
23
+ ```text
24
+ plugin_manager install_bundle target=link:/path/to/dsh-suggestion
25
+ ```
26
+
27
+ 安装后在 Plugins 页启用 `输入框建议`(bundle 名 `@lixiangzhong/dsh-suggestion`,插件行 id `dsh-suggestion`)。配置见 [docs/DETAIL.md](docs/DETAIL.md)。
28
+
29
+ ## 结构
30
+
31
+ | 文件 | 作用 |
32
+ | --- | --- |
33
+ | `index.js` | Host 入口:配置归一化、服务装配、路由注册 |
34
+ | `lib/route.js` | 鉴权 HTTP 路由 `GET /dsh-suggestion/suggest` |
35
+ | `lib/service.js` | 建议生成、按轮次去重缓存、近期建议记忆 |
36
+ | `lib/session-context.js` | 从会话事件折出最后一轮上下文与工具摘要 |
37
+ | `lib/summary.js` | 早期对话的增量摘要 |
38
+ | `lib/prompt.js` | 提示词构造与输出归一化 |
39
+ | `client.js` | 浏览器半边:触发、占位文字接管、Tab 接受、降级建议条 |
40
+
41
+ ## 开发
42
+
43
+ ```sh
44
+ npm test # node --check + 纯函数单测
45
+ ```
46
+
47
+ 无构建步骤:`client.js` 直接以 `window.__ModuleLoader__` 工厂形式加载。
48
+
49
+ ## License
50
+
51
+ MIT