dsh-file-activity 0.5.6 → 0.5.7
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/CHANGELOG.md +8 -0
- package/lib/index.js +20 -0
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
本文件记录 dsh-file-activity 的所有版本变更。格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## [0.5.7] - 2026-09-07
|
|
6
|
+
|
|
7
|
+
### 变更
|
|
8
|
+
|
|
9
|
+
- fix(deps): update package-lock.json to fix CI/CD failures
|
|
10
|
+
- feat(observability): #155 插件状态查询聚合——统一 status-query 事件 + /plugin-status API (#170)
|
|
11
|
+
- chore(plugins): #165 清理失效的 dsh.client.inject 声明(13 插件) (#167)
|
|
12
|
+
|
|
5
13
|
## [0.5.6] - 2026-09-04
|
|
6
14
|
|
|
7
15
|
### 变更
|
package/lib/index.js
CHANGED
|
@@ -91,6 +91,26 @@ export function apply(ctx) {
|
|
|
91
91
|
'dsh-file-activity: /file-activity/file media route',
|
|
92
92
|
)
|
|
93
93
|
|
|
94
|
+
// 插件状态查询(#155 聚合层)
|
|
95
|
+
ctx.on('plugin:status-query', ({ plugin }) => {
|
|
96
|
+
if (plugin !== 'dsh-file-activity') return undefined
|
|
97
|
+
const sessions = store.state?.sessions ?? {}
|
|
98
|
+
const totalFiles = Object.values(sessions).reduce((n, s) => n + Object.keys(s.known ?? {}).length, 0)
|
|
99
|
+
const allRecent = Object.values(sessions).flatMap((s) => s.recent ?? [])
|
|
100
|
+
allRecent.sort((a, b) => (b.time ?? 0) - (a.time ?? 0))
|
|
101
|
+
const lastActions = allRecent.slice(0, 5).map((e) => ({ time: e.time, type: e.op ?? 'activity', detail: e.path }))
|
|
102
|
+
return {
|
|
103
|
+
ok: true,
|
|
104
|
+
value: {
|
|
105
|
+
plugin: 'dsh-file-activity',
|
|
106
|
+
config: { keys: [] },
|
|
107
|
+
running: true,
|
|
108
|
+
stats: { sessions: Object.keys(sessions).length, totalFiles },
|
|
109
|
+
lastActions,
|
|
110
|
+
},
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
|
|
94
114
|
// Tear down on unload: flush pending persistence.
|
|
95
115
|
ctx.effect(() => store.dispose, 'dsh-file-activity: persistence teardown')
|
|
96
116
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-file-activity",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"description": "DSH 侧边栏文件活动插件:按 LRU 记录文件读取/新增/修改事件(最近访问),按绝对路径树形统计(文件统计),点击文件浮窗预览(代码高亮/Markdown/图片/PDF)。DSH web plugin: file activity tracker — LRU recent-access list plus per-file read/create/modify counts in a folder tree, with floating preview.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -37,14 +37,11 @@
|
|
|
37
37
|
"patch": "./cordis.patch.yml"
|
|
38
38
|
},
|
|
39
39
|
"client": {
|
|
40
|
-
"platform": "web"
|
|
41
|
-
"inject": [
|
|
42
|
-
"@deepseek-ai/dsh-client-runtime"
|
|
43
|
-
]
|
|
40
|
+
"platform": "web"
|
|
44
41
|
}
|
|
45
42
|
},
|
|
46
43
|
"dependencies": {
|
|
47
|
-
"dsh-better-sidebar": ">=0.14.0
|
|
44
|
+
"dsh-better-sidebar": ">=0.14.0",
|
|
48
45
|
"dsh-shared": "^0.1.0"
|
|
49
46
|
},
|
|
50
47
|
"peerDependencies": {
|