dsh-mailbox-local 0.3.1 → 0.3.3

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
@@ -6,6 +6,8 @@
6
6
 
7
7
  ## 它做的事
8
8
 
9
+ ![同机信箱的工单看板](assets/screenshot-1.png)
10
+
9
11
  - **发信**:`mailbox_send` 给某条会话留一封(派活 / 留言 / 问一句),落成 `inbox/` 下的一个 `.md`
10
12
  - **收信**:收件方在它自己的会话里收到一条 notice,正文是「谁给你留了一封信(派活):前 60 字」
11
13
  - **抢锁**:处理前先 `mailbox_done`——用 `rename` 把信搬进 `done/`,两只同时点只有一个成功,谁搬走谁处理
Binary file
package/client.js CHANGED
@@ -89,6 +89,20 @@ window.__ModuleLoader__.load({
89
89
  loadCfg()
90
90
  }, [])
91
91
 
92
+ // 原文浮层开着时,Esc 只关浮层:用 window 捕获阶段拦下来,别让它冒泡到设置面板把整个插件页关掉
93
+ useEffect(() => {
94
+ if (!docView) return undefined
95
+ const onKey = (e) => {
96
+ if (e.key !== 'Escape' && e.key !== 'Esc') return
97
+ e.preventDefault()
98
+ e.stopPropagation()
99
+ if (typeof e.stopImmediatePropagation === 'function') e.stopImmediatePropagation()
100
+ setDocView(null)
101
+ }
102
+ window.addEventListener('keydown', onKey, true)
103
+ return () => window.removeEventListener('keydown', onKey, true)
104
+ }, [docView])
105
+
92
106
  const savePath = async (value) => {
93
107
  setSavingPath(true)
94
108
  try {
@@ -161,10 +175,7 @@ window.__ModuleLoader__.load({
161
175
  h('button', { style: S.btn, onClick: load }, '刷新'),
162
176
  ),
163
177
  h('div', { style: { fontSize: 12, color: '#555', lineHeight: 1.7, marginBottom: 10 } },
164
- '同一台机器上的两只 agent 互相留信的地方:一只把事写成信投进去,另一只在它那段对话里收到一句提醒,点开就是全文。谁先搬走那封信,谁负责回执——人不用在窗口之间来回搬运,也不用复制粘贴。',
165
- ),
166
- h('div', { style: { fontSize: 12, color: '#555', lineHeight: 1.7, marginBottom: 10 } },
167
- '下面这块看板只读一个 markdown 表格:一行一件事,状态是进行中 / 待办 / 搁置 / 已完成,后面跟回执、最近改动和文件名。点每行右边「原文」能看那一份的全文。',
178
+ '一行一件事;点右边「原文」看那一份的全文(Esc 关掉)。',
168
179
  ),
169
180
  h('div', { style: S.card },
170
181
  h('div', { style: { ...S.dim, marginBottom: 6 } }, '看板文件'),
@@ -215,7 +226,6 @@ window.__ModuleLoader__.load({
215
226
  h('pre', { style: { flex: 1, margin: 0, overflow: 'auto', background: '#0f1620', color: '#dbe4ee', border: '1px solid #2a3644', borderRadius: 6, padding: 12, fontSize: 12, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, docView.text),
216
227
  )
217
228
  : null,
218
- h('div', { style: S.dim }, '这个面板只读一个 markdown 看板:表格里「状态」那列是进行中 / 待办 / 搁置 / 已完成,一行一件事,后面跟回执、最近改动、文件名。谁生成、放在哪都能配——默认找信箱目录下的「工单看板.md」。'),
219
229
  )
220
230
  }
221
231
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mailbox-local",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "同机信箱:同一台机器上的两只 agent 互相留信、派活、回执,不靠人转手;附一个只读的工单看板。Mailbox for agents on one machine, plus a read-only work-order board.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -17,6 +17,8 @@
17
17
  "cordis.patch.yml",
18
18
  "lib",
19
19
  "locale/*.json",
20
+ "assets/*",
21
+ "screenshots.json",
20
22
  "README.md"
21
23
  ],
22
24
  "engines": {
@@ -0,0 +1,3 @@
1
+ [
2
+ "assets/screenshot-1.png"
3
+ ]