@dsh-xhl/dsh-git-gui 0.1.3 → 0.1.4
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 +2 -2
- package/lib/client.js +49 -30
- package/package.json +68 -68
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ If you do want a `link:` dev loop, run `scripts/link-host-deps.ps1` after every
|
|
|
75
75
|
|
|
76
76
|
## Where to start
|
|
77
77
|
|
|
78
|
-
After installing the plugin, open the DeepSeek Harness Web UI and click the
|
|
78
|
+
After installing the plugin, open the DeepSeek Harness Web UI and click the Git button (with a changed-files count badge) in the top-right corner of the conversation header to open the floating panel.
|
|
79
79
|
|
|
80
80
|
## Structure
|
|
81
81
|
|
|
@@ -85,7 +85,7 @@ Host (Node): GitService (@Remote, namespace `git`, Typert SRC mode → git/* en
|
|
|
85
85
|
├─ parse.js porcelain v2 / unified diff / log / refs / stash parsing
|
|
86
86
|
└─ activity.js session/event → (session, turn, tool, file) timeline (Stage 2)
|
|
87
87
|
|
|
88
|
-
Client (Browser):
|
|
88
|
+
Client (Browser): conversation.session.header.utilities entry button (uncommitted-count badge) + shell.overlay floating panel
|
|
89
89
|
├─ control.js session cwd synchronization + polling + operation runner + confirmation dialogs
|
|
90
90
|
├─ v-*.js view components (React.createElement, no JSX)
|
|
91
91
|
└─ styles.js theme tokens (--dsw-alias-*) and styles, adaptive to light/dark mode
|
package/lib/client.js
CHANGED
|
@@ -325,8 +325,20 @@ function icon(pathData, size) {
|
|
|
325
325
|
}, h('path', { d: pathData }))
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
+
/** Inline SVG icon (fill = currentColor, iconfont-style 1024 viewBox). */
|
|
329
|
+
function fillIcon(pathData, size) {
|
|
330
|
+
return h('svg', {
|
|
331
|
+
className: 'gg-icon',
|
|
332
|
+
width: size ?? 14,
|
|
333
|
+
height: size ?? 14,
|
|
334
|
+
viewBox: '0 0 1024 1024',
|
|
335
|
+
fill: 'currentColor',
|
|
336
|
+
'aria-hidden': 'true',
|
|
337
|
+
}, h('path', { d: pathData }))
|
|
338
|
+
}
|
|
339
|
+
|
|
328
340
|
const ICONS = {
|
|
329
|
-
git:
|
|
341
|
+
git: fillIcon('M110.933333 451.84 357.546667 204.8 429.653333 277.333333C419.413333 313.6 436.053333 353.28 469.333333 372.48L469.333333 608.853333C443.733333 623.36 426.666667 651.093333 426.666667 682.666667 426.666667 729.6 465.066667 768 512 768 558.933333 768 597.333333 729.6 597.333333 682.666667 597.333333 651.093333 580.266667 623.36 554.666667 608.853333L554.666667 401.493333 642.986667 490.666667C640 497.066667 640 504.32 640 512 640 558.933333 678.4 597.333333 725.333333 597.333333 772.266667 597.333333 810.666667 558.933333 810.666667 512 810.666667 465.066667 772.266667 426.666667 725.333333 426.666667 717.653333 426.666667 710.4 426.666667 704 429.653333L594.346667 320C605.44 280.32 584.96 236.8 545.28 220.16 526.933333 213.333333 507.733333 211.626667 490.666667 216.32L418.133333 144.213333 451.84 110.933333C485.12 77.226667 538.88 77.226667 572.16 110.933333L913.066667 451.84C946.773333 485.12 946.773333 538.88 913.066667 572.16L572.16 913.066667C538.88 946.773333 485.12 946.773333 451.84 913.066667L110.933333 572.16C77.226667 538.88 77.226667 485.12 110.933333 451.84Z', 16),
|
|
330
342
|
refresh: icon('M13.5 8a5.5 5.5 0 1 1-1.6-3.9M13.5 1.5v3h-3', 13),
|
|
331
343
|
close: icon('M4 4l8 8M12 4l-8 8', 13),
|
|
332
344
|
check: icon('M2.5 8.5 6 12l7.5-8', 13),
|
|
@@ -346,7 +358,7 @@ const ICONS = {
|
|
|
346
358
|
globe: icon('M8 14.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13ZM1.5 8h13M8 1.5c1.8 1.8 2.7 4 2.7 6.5s-.9 4.7-2.7 6.5C6.2 12.7 5.3 10.5 5.3 8S6.2 3.3 8 1.5Z', 14),
|
|
347
359
|
}
|
|
348
360
|
|
|
349
|
-
module.exports = { h, cx, icon, ICONS, React }
|
|
361
|
+
module.exports = { h, cx, icon, fillIcon, ICONS, React }
|
|
350
362
|
|
|
351
363
|
},
|
|
352
364
|
"./i18n.js": function (module, exports, require) {
|
|
@@ -606,7 +618,7 @@ module.exports = { t, lang }
|
|
|
606
618
|
|
|
607
619
|
const { startController } = require('./control')
|
|
608
620
|
const { makeGitApi } = require('./api')
|
|
609
|
-
const {
|
|
621
|
+
const { HeaderButton } = require('./v-header')
|
|
610
622
|
const { GitPanel } = require('./v-panel')
|
|
611
623
|
const { css } = require('./styles')
|
|
612
624
|
const PKG_ID = require('./pkg-id')
|
|
@@ -631,16 +643,16 @@ function apply(ctx) {
|
|
|
631
643
|
startController(api)
|
|
632
644
|
|
|
633
645
|
ctx.effect(() => {
|
|
634
|
-
const
|
|
635
|
-
{ name: '
|
|
636
|
-
(props) =>
|
|
646
|
+
const disposeHeader = ctx.slots.inject('conversation.session.header.utilities', () => ctx.slots.register(
|
|
647
|
+
{ name: 'conversation.session.header.utilities', id: 'dsh-git-gui', order: 20 },
|
|
648
|
+
(props) => HeaderButton(props),
|
|
637
649
|
))
|
|
638
650
|
const disposePanel = ctx.slots.inject('shell.overlay', () => ctx.slots.register(
|
|
639
651
|
{ name: 'shell.overlay', id: 'dsh-git-gui' },
|
|
640
652
|
(props) => GitPanel(props),
|
|
641
653
|
))
|
|
642
654
|
return () => {
|
|
643
|
-
|
|
655
|
+
disposeHeader()
|
|
644
656
|
disposePanel()
|
|
645
657
|
}
|
|
646
658
|
})
|
|
@@ -1059,25 +1071,31 @@ body[data-ds-dark-theme] { --gg-on-accent: #10141b; }
|
|
|
1059
1071
|
.gg-toast-err { border-color: var(--dsw-alias-state-error-primary); color: var(--dsw-alias-state-error-primary); }
|
|
1060
1072
|
.gg-toast-warn { border-color: var(--dsw-alias-state-warn-primary); color: var(--dsw-alias-state-warn-primary); }
|
|
1061
1073
|
|
|
1062
|
-
/*
|
|
1063
|
-
.gg-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
+
/* conversation header entry (top-right) */
|
|
1075
|
+
.gg-header-btn {
|
|
1076
|
+
position: relative;
|
|
1077
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
1078
|
+
width: 28px; height: 28px;
|
|
1079
|
+
border: .5px solid var(--dsw-alias-border-l3);
|
|
1080
|
+
border-radius: 14px;
|
|
1081
|
+
background: transparent;
|
|
1082
|
+
cursor: pointer;
|
|
1083
|
+
color: var(--dsw-alias-label-secondary);
|
|
1084
|
+
padding: 0;
|
|
1085
|
+
}
|
|
1086
|
+
.gg-header-btn:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); }
|
|
1087
|
+
.gg-header-btn:active:not(:disabled) { background: var(--dsw-alias-interactive-bg-active); }
|
|
1088
|
+
.gg-header-btn.gg-active { color: var(--dsw-alias-label-primary); background: var(--dsw-alias-interactive-bg-hover); }
|
|
1089
|
+
.gg-header-icon { display: inline-flex; align-items: center; justify-content: center; }
|
|
1090
|
+
.gg-header-btn .gg-badge {
|
|
1091
|
+
position: absolute; top: -4px; right: -4px;
|
|
1074
1092
|
min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px;
|
|
1075
1093
|
background: var(--dsw-alias-brand-primary); color: var(--gg-on-accent);
|
|
1076
1094
|
font-size: 10px; font-weight: 700;
|
|
1077
1095
|
display: inline-flex; align-items: center; justify-content: center;
|
|
1078
1096
|
box-sizing: border-box;
|
|
1079
1097
|
}
|
|
1080
|
-
.gg-badge-err { background: var(--dsw-alias-state-error-primary); }
|
|
1098
|
+
.gg-header-btn .gg-badge-err { background: var(--dsw-alias-state-error-primary); }
|
|
1081
1099
|
|
|
1082
1100
|
.gg-icon { flex: none; }
|
|
1083
1101
|
`
|
|
@@ -1333,10 +1351,11 @@ function FilesView() {
|
|
|
1333
1351
|
module.exports = { FilesView }
|
|
1334
1352
|
|
|
1335
1353
|
},
|
|
1336
|
-
"./v-
|
|
1354
|
+
"./v-header.js": function (module, exports, require) {
|
|
1337
1355
|
/**
|
|
1338
|
-
*
|
|
1339
|
-
*
|
|
1356
|
+
* Conversation header entry: a single compact Git button with a
|
|
1357
|
+
* changed-files badge (角标), registered into
|
|
1358
|
+
* `conversation.session.header.utilities` (session scope, top-right).
|
|
1340
1359
|
*/
|
|
1341
1360
|
const { h, cx, ICONS, React } = require('./dom')
|
|
1342
1361
|
const { useStore, setState } = require('./store')
|
|
@@ -1348,7 +1367,8 @@ function changedCount(status) {
|
|
|
1348
1367
|
return status.files.length
|
|
1349
1368
|
}
|
|
1350
1369
|
|
|
1351
|
-
function
|
|
1370
|
+
function HeaderButton(props) {
|
|
1371
|
+
// session-scoped slot: bind the active session's workspace via useSessions.
|
|
1352
1372
|
const sessions = props.useSessions((s) => s)
|
|
1353
1373
|
React.useEffect(() => {
|
|
1354
1374
|
applySession(sessions)
|
|
@@ -1357,7 +1377,6 @@ function FooterButton(props) {
|
|
|
1357
1377
|
const count = useStore((s) => changedCount(s.status))
|
|
1358
1378
|
const statusError = useStore((s) => s.statusError)
|
|
1359
1379
|
const check = useStore((s) => s.check)
|
|
1360
|
-
const wide = props.wide === true
|
|
1361
1380
|
|
|
1362
1381
|
const title = t('panel.title')
|
|
1363
1382
|
const onClick = () => setState({ open: !open })
|
|
@@ -1371,18 +1390,18 @@ function FooterButton(props) {
|
|
|
1371
1390
|
|
|
1372
1391
|
return h('button', {
|
|
1373
1392
|
type: 'button',
|
|
1374
|
-
className: cx('gg-
|
|
1393
|
+
className: cx('gg-header-btn', open && 'gg-active'),
|
|
1375
1394
|
title,
|
|
1376
1395
|
onClick,
|
|
1377
1396
|
'aria-label': title,
|
|
1378
1397
|
},
|
|
1379
|
-
h('span', { className: 'gg-
|
|
1380
|
-
|
|
1381
|
-
|
|
1398
|
+
h('span', { className: 'gg-header-icon' }, ICONS.git),
|
|
1399
|
+
badge,
|
|
1400
|
+
dot,
|
|
1382
1401
|
)
|
|
1383
1402
|
}
|
|
1384
1403
|
|
|
1385
|
-
module.exports = {
|
|
1404
|
+
module.exports = { HeaderButton }
|
|
1386
1405
|
|
|
1387
1406
|
},
|
|
1388
1407
|
"./v-log.js": function (module, exports, require) {
|
package/package.json
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dsh-xhl/dsh-git-gui",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Git GUI panel for the DeepSeek Harness web surface: visualize working-tree changes (including every modification the agent makes), stage/commit/branch/merge/log/pull/push/stash/revert — all from the browser.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"default": "./lib/index.js"
|
|
10
|
-
},
|
|
11
|
-
"./client": {
|
|
12
|
-
"default": "./lib/client.js"
|
|
13
|
-
},
|
|
14
|
-
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
15
|
-
"./package.json": "./package.json"
|
|
16
|
-
},
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/wojiaoxiaomayun/dsh-git-gui.git"
|
|
20
|
-
},
|
|
21
|
-
"files": [
|
|
22
|
-
"lib/index.js",
|
|
23
|
-
"lib/service.js",
|
|
24
|
-
"lib/runner.js",
|
|
25
|
-
"lib/parse.js",
|
|
26
|
-
"lib/activity.js",
|
|
27
|
-
"lib/client.js",
|
|
28
|
-
"scripts/build-client.mjs",
|
|
29
|
-
"package.json",
|
|
30
|
-
"README.md",
|
|
31
|
-
"cordis.patch.yml",
|
|
32
|
-
"cordis.patch.example.yml"
|
|
33
|
-
],
|
|
34
|
-
"dsh": {
|
|
35
|
-
"bundle": {
|
|
36
|
-
"patch": "./cordis.patch.yml"
|
|
37
|
-
},
|
|
38
|
-
"client": {
|
|
39
|
-
"platform": "web",
|
|
40
|
-
"inject": [
|
|
41
|
-
"@deepseek-ai/dsh-client-connection",
|
|
42
|
-
"@deepseek-ai/dsh-client-runtime",
|
|
43
|
-
"@deepseek-ai/dsh-client-ui-
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"scripts": {
|
|
48
|
-
"build:client": "node scripts/build-client.mjs",
|
|
49
|
-
"watch:client": "node scripts/build-client.mjs --watch",
|
|
50
|
-
"test": "node --test",
|
|
51
|
-
"prepack": "node scripts/build-client.mjs"
|
|
52
|
-
},
|
|
53
|
-
"peerDependencies": {
|
|
54
|
-
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
55
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.1.0-rc.6"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@deepseek-ai/cordis": "^4.0.1",
|
|
59
|
-
"@deepseek-ai/dsh-llm": "0.1.0-rc.6",
|
|
60
|
-
"@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.6",
|
|
61
|
-
"react": "^18.3.1",
|
|
62
|
-
"react-dom": "^18.3.1"
|
|
63
|
-
},
|
|
64
|
-
"license": "MIT",
|
|
65
|
-
"publishConfig": {
|
|
66
|
-
"access": "public"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dsh-xhl/dsh-git-gui",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Git GUI panel for the DeepSeek Harness web surface: visualize working-tree changes (including every modification the agent makes), stage/commit/branch/merge/log/pull/push/stash/revert — all from the browser.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"default": "./lib/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./client": {
|
|
12
|
+
"default": "./lib/client.js"
|
|
13
|
+
},
|
|
14
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/wojiaoxiaomayun/dsh-git-gui.git"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"lib/index.js",
|
|
23
|
+
"lib/service.js",
|
|
24
|
+
"lib/runner.js",
|
|
25
|
+
"lib/parse.js",
|
|
26
|
+
"lib/activity.js",
|
|
27
|
+
"lib/client.js",
|
|
28
|
+
"scripts/build-client.mjs",
|
|
29
|
+
"package.json",
|
|
30
|
+
"README.md",
|
|
31
|
+
"cordis.patch.yml",
|
|
32
|
+
"cordis.patch.example.yml"
|
|
33
|
+
],
|
|
34
|
+
"dsh": {
|
|
35
|
+
"bundle": {
|
|
36
|
+
"patch": "./cordis.patch.yml"
|
|
37
|
+
},
|
|
38
|
+
"client": {
|
|
39
|
+
"platform": "web",
|
|
40
|
+
"inject": [
|
|
41
|
+
"@deepseek-ai/dsh-client-connection",
|
|
42
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
43
|
+
"@deepseek-ai/dsh-client-ui-conversation"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build:client": "node scripts/build-client.mjs",
|
|
49
|
+
"watch:client": "node scripts/build-client.mjs --watch",
|
|
50
|
+
"test": "node --test",
|
|
51
|
+
"prepack": "node scripts/build-client.mjs"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
55
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.0-rc.6"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
59
|
+
"@deepseek-ai/dsh-llm": "0.1.0-rc.6",
|
|
60
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.6",
|
|
61
|
+
"react": "^18.3.1",
|
|
62
|
+
"react-dom": "^18.3.1"
|
|
63
|
+
},
|
|
64
|
+
"license": "MIT",
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
}
|
|
68
|
+
}
|