dsh-dock 0.24.0 → 0.25.1

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/index.js CHANGED
@@ -19,6 +19,7 @@
19
19
  // - modelconfig 模型能力:模型目录的输入模态与思考强度(写回官方配置)
20
20
  // - providerconfig 模型管理:Provider 增删改 + API Key + 拉取上游模型列表
21
21
  // - mobile-relay 远程访问:账号密码登录的远程入口(网关 + 账号 + 浏览模式目录选择器)
22
+ // - git Git 管理:仓库提交记录查询(默认当前会话目录,可含子目录仓库)
22
23
  import { DockConfig, sendJson, readBody, rejectUntrustedRequest, migrateNotifyConfig, migrateModelsFeatureId, migrateImportedFeatures, migrateImportedSections, bindDockConfig, readDockRoot, mutateDockSection } from './src/host-core.js'
23
24
  import { injectWelcomeAck } from './src/welcome-ack.js'
24
25
  import { feature as fModels } from './features/modelconfig/host.js'
@@ -33,6 +34,7 @@ import { feature as fTts } from './features/tts/host.js'
33
34
  import { feature as fMobileRelay } from './features/mobile-relay/host.js'
34
35
  import { feature as fMcpConfig } from './features/mcpconfig/host.js'
35
36
  import { feature as fDshTools } from './features/dshtools/host.js'
37
+ import { feature as fGit } from './features/git/host.js'
36
38
 
37
39
  export const name = 'dsh-dock'
38
40
 
@@ -78,6 +80,7 @@ export function apply(ctx, config) {
78
80
  fMobileRelay,
79
81
  fMcpConfig,
80
82
  fDshTools,
83
+ fGit,
81
84
  ]
82
85
 
83
86
  // 绑定 Config 镜像(替代已移除的 settings.get);volatile 字段热更时重绑。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-dock",
3
- "version": "0.24.0",
4
- "description": "DeepSeek Harness 功能坞插件(dsh-dock):模块化功能中枢——每个功能一个 features/ 模块(可单独提取成包发布,又可经 dockBridge 装回面板)。含用量记录(LLM 调用记账/费用统计,支持各模型自定义单价、多段分时价与周末/节假日谷价)、模型能力、图片理解代理、模型余额、任务动画(19 种运行动画 + 桌面伙伴 3D 场景)、任务通知(完成/异常/需确认通知、提示音、语音播报可选音色、系统通知、钉钉/飞书推送)、运行状态(进行中任务与最近完成一览)、语音朗读(浏览器 TTS 读回复:回合下方喇叭按钮 + 自动朗读)、DSH功能(给 DSH 自带界面补能力:文件右键大文件流式下载);侧栏入口 + 可拖拽弹窗(最大化/最小化/缩放)。",
3
+ "version": "0.25.1",
4
+ "description": "DeepSeek Harness 功能坞插件(dsh-dock):模块化功能中枢——每个功能一个 features/ 模块(可单独提取成包发布,又可经 dockBridge 装回面板)。含用量记录(LLM 调用记账/费用统计,支持各模型自定义单价、多段分时价与周末/节假日谷价)、模型能力、图片理解代理、模型余额、任务动画(19 种运行动画 + 桌面伙伴 3D 场景)、任务通知(完成/异常/需确认通知、提示音、语音播报可选音色、系统通知、钉钉/飞书推送)、运行状态(进行中任务与最近完成一览)、语音朗读(浏览器 TTS 读回复:回合下方喇叭按钮 + 自动朗读)、DSH功能(给 DSH 自带界面补能力:文件右键大文件流式下载、右侧抽屉 Git 仓库操作面板)、Git 管理(提交历史表格与逐行差异、子仓库多选、时间段与提交人筛选、暂存/提交/推送);侧栏入口 + 可拖拽弹窗(最大化/最小化/缩放)。",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -42,7 +42,7 @@
42
42
  "scripts": {
43
43
  "build:client": "node scripts/build-client.mjs",
44
44
  "test:client": "node scripts/test-client-views.mjs && node scripts/test-dshtools-client.mjs",
45
- "test:host": "node scripts/test-task-host.mjs && node scripts/test-mcpconfig-host.mjs && node scripts/test-tokenlog-host.mjs && node scripts/test-balance-host.mjs && node scripts/test-route-trust-host.mjs && node scripts/test-tts-host.mjs && node scripts/test-legacy-import.mjs && node scripts/test-mobile-relay-host.mjs && node scripts/test-mobile-relay.mjs && node scripts/test-welcome-ack.mjs && node scripts/test-dshtools-host.mjs",
45
+ "test:host": "node scripts/test-task-host.mjs && node scripts/test-mcpconfig-host.mjs && node scripts/test-tokenlog-host.mjs && node scripts/test-balance-host.mjs && node scripts/test-route-trust-host.mjs && node scripts/test-tts-host.mjs && node scripts/test-legacy-import.mjs && node scripts/test-mobile-relay-host.mjs && node scripts/test-mobile-relay.mjs && node scripts/test-welcome-ack.mjs && node scripts/test-dshtools-host.mjs && node scripts/test-git-host.mjs",
46
46
  "dev:client": "node scripts/watch-client.mjs",
47
47
  "dev:link": "node scripts/dev-link-deps.mjs"
48
48
  },
package/src/client.jsx CHANGED
@@ -30,9 +30,10 @@ import { feature as fGames } from "../features/games/view.jsx";
30
30
  import { feature as fMobileRelay } from "../features/mobile-relay/view.jsx";
31
31
  import { feature as fMcpConfig } from "../features/mcpconfig/view.js";
32
32
  import { feature as fDshTools, installClient as installDshTools } from "../features/dshtools/view.jsx";
33
+ import { installClient as installGit, css as GIT_CSS, DirBrowser as GitDirBrowser, GitView as GitPanelView } from "../features/git/view.jsx";
33
34
 
34
35
  const name = "dsh-dock";
35
- const DOCK_VERSION = "0.24.0";
36
+ const DOCK_VERSION = "0.25.1";
36
37
 
37
38
  // ---- 内置功能注册表:新功能 = features/<id>/ 加模块 + 这里 import 一行 ----
38
39
  const BUILTIN_FEATURES = [fTokenlog, fModelconfig, fProviderConfig, fMcpConfig, fBalance, fAnimation, fNotify, fRunState, fTts, fGames, fMobileRelay, fDshTools];
@@ -270,6 +271,9 @@ function cancelInitialCssSchedule() {
270
271
  function fullDockCss() {
271
272
  const parts = [SHELL_CSS];
272
273
  for (const f of BUILTIN_FEATURES) if (f.css) parts.push(f.css);
274
+ // Git 面板不再是功能坞里的功能项(改成 DSH功能 的开关 + 抽屉页签),
275
+ // 但样式仍并入这同一个 <style data-plugin="dsh-dock">:单独注入会被别的插件 claim 走。
276
+ if (GIT_CSS) parts.push(GIT_CSS);
273
277
  for (const f of externalDefs) if (f.css) parts.push(f.css);
274
278
  return parts.join("\n");
275
279
  }
@@ -307,7 +311,7 @@ function scheduleInitialCss() {
307
311
  if (typeof document === "undefined" || initialCssSchedule || (dockCssTag && dockCssTag.isConnected && dockCssTag.dataset.plugin === "dsh-dock")) return;
308
312
  const run = () => {
309
313
  initialCssSchedule = null;
310
- ensureCss();
314
+ ensureCss();
311
315
  };
312
316
  if (typeof window !== "undefined" && typeof window.requestIdleCallback === "function") {
313
317
  initialCssSchedule = { type: "idle", id: window.requestIdleCallback(run, { timeout: 350 }) };
@@ -787,7 +791,21 @@ export function apply(ctx) {
787
791
  (owner) => react.createElement(FeatureTurnTail, owner)));
788
792
  // 【DSH功能】的全局接线(右键菜单等):模块自带延迟注入,功能开关在菜单解析时判断
789
793
  installDshTools(ctx);
794
+ installGit(ctx);
790
795
  }
791
796
 
792
797
  export const inject = ["timer"];
793
798
  export { dockBridge };
799
+ // 测试探针:目录浏览器单独导出,便于用例直接渲染校验(不参与运行逻辑)
800
+ export { GitDirBrowser as DirBrowser };
801
+ // 测试探针:Git 面板开关(验证「没勾选就不注册入口」)
802
+ export { gitPanelEnabled } from "../features/git/view.jsx";
803
+ export { GitPanelView as GitView };
804
+ // 测试探针:会话目录读取函数(验证按 sessionId 取值,而非全局当前会话)
805
+ export { currentSessionDir as readSessionDir } from "../features/git/rpc.js";
806
+ // 测试探针:时间格式化(验证列表里的绝对时间精确到秒)
807
+ export { fmtDateTime } from "../features/git/rpc.js";
808
+ // 测试探针:提交表格的列定义与列宽计算(验证「列可勾选」)
809
+ export { COMMIT_COLUMNS, DEFAULT_VISIBLE_COLUMNS, columnsTemplate, toggleRepoSelection } from "../features/git/view.jsx";
810
+ // 测试探针:拖动分隔条(验证上下拖动确实改变高度比例)
811
+ export { DragSplitter as GitDragSplitter, clampPercent, splitterStep, dragToPercent } from "../features/git/view.jsx";
package/src/host-core.js CHANGED
@@ -193,6 +193,19 @@ export const DockConfig = z.object({
193
193
  /** 大文件下载(流式):文件超过 32 MiB 时右键多出「下载(大文件)」。 */
194
194
  streamingDownload: z.boolean().default(true),
195
195
  }).default({}),
196
+ /**
197
+ * 界面增强:给 DSH 自带界面补的入口。
198
+ *
199
+ * 这里必须与 features/dshtools/host.js 的 DSH_TOOL_GROUPS 逐项对齐——
200
+ * 写入时是整段回写(next 会带上所有分组),schema 里没声明的分组会让
201
+ * settings.describe 算不出该条目的表单,取消勾选时报
202
+ * 「Plugin entry "dsh-dock" is no longer configurable」。
203
+ */
204
+ interface: z.object({
205
+ /** Git 仓库操作:右侧抽屉页签 + 工作区文件右键「查看 Git 历史」。 */
206
+ // 默认开启:装好即可用;不想要的人在功能坞里取消勾选。
207
+ gitPanel: z.boolean().default(true),
208
+ }).default({}),
196
209
  }).default({}).volatile(),
197
210
  })
198
211