opencode-prompt-recorder 1.3.8 → 1.3.9

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
@@ -30,43 +30,41 @@ bun add -g opencode-prompt-recorder
30
30
  }
31
31
  ```
32
32
 
33
- ## 工作原理
34
-
35
- 1. 插件监听 OpenCode 聊天事件(`chat.message`)
36
- 2. 每次用户消息时,提取提示词文本和会话 ID
37
- 3. 提示词保存到 `.agent/prompts/` 目录,按日期组织
38
- 4. 每个提示词保存为带有时间戳和会话信息的 markdown 文件
33
+ ## 工作原理
34
+
35
+ 1. 插件监听 OpenCode 消息事件(`message.updated` 和 `message.part.updated`)
36
+ 2. 每次用户消息时,提取提示词文本和会话 ID
37
+ 3. 提示词保存到 `.agent/prompts/` 目录,按日期组织
38
+ 4. 每个提示词保存为带有时间戳和会话信息的 markdown 文件
39
39
 
40
40
  ## 文件结构
41
41
 
42
42
  插件创建有组织的目录结构:
43
43
 
44
- ```
45
- .agent/
46
- └── prompts/
47
- └── 2026/
48
- └── 02/
49
- └── 22/
50
- ├── 1005-abc123-什么是AI.md
51
- ├── 1050-def456-如何编程.md
52
- └── 1120-ghi789-复制README.md
53
- ```
44
+ ```
45
+ .agent/
46
+ └── prompts/
47
+ └── 2026/
48
+ └── 03/
49
+ └── 04/
50
+ ├── 20260304-0943-ses_abc123-什么是AI.md
51
+ ├── 20260304-1005-ses_def456-如何编程.md
52
+ └── 20260304-1120-ses_ghi789-复制README.md
53
+ ```
54
54
 
55
55
  ## 文件格式
56
56
 
57
57
  每个提示词文件遵循以下格式:
58
58
 
59
- ```markdown
60
- ============ 10:05 ============
61
-
62
- 什么是 AI?
63
-
64
- ---
65
-
66
- ============ 10:50 ============
67
-
68
- 如何编写 hello world 程序?
69
- ```
59
+ ```markdown
60
+ ============ 10:05 ============
61
+
62
+ 什么是 AI?
63
+
64
+ ============ 10:50 ============
65
+
66
+ 如何编写 hello world 程序?
67
+ ```
70
68
 
71
69
  ## 配置
72
70
 
@@ -76,13 +74,13 @@ bun add -g opencode-prompt-recorder
76
74
  - 使用当前工作目录作为基础路径
77
75
  - 根据需要创建目录
78
76
 
79
- ## 会话管理
80
-
81
- - 每个唯一的 `sessionId` 获得自己的文件
82
- - 相同的会话 ID 追加到现有文件
83
- - 不同的会话 ID 创建新文件
84
- - 会话 ID 来自 `chat.message` 事件输入
85
- - 跨天合并:无论何时,只要 sessionId 相同,都会追加到同一文件(自动搜索所有日期目录)
77
+ ## 会话管理
78
+
79
+ - 每个唯一的 `sessionId` 获得自己的文件
80
+ - 相同的会话 ID 追加到现有文件
81
+ - 不同的会话 ID 创建新文件
82
+ - 会话 ID 来自 `message.part.updated` 事件输入
83
+ - 跨天合并:无论何时,只要 sessionId 相同,都会追加到同一文件(自动搜索所有日期目录)
86
84
 
87
85
  ## 使用场景
88
86
 
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-prompt-recorder",
3
- "version": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "description": "OpenCode plugin for recording user prompts. Automatically saves user messages to a local file system with organized directory structure.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-prompt-recorder",
3
- "version": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "description": "OpenCode plugin for recording user prompts. Automatically saves user messages to a local file system with organized directory structure.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",