dsh-ide-git 0.18.2 → 0.18.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/dsh.plugin.json +1 -1
- package/package.json +1 -1
- package/src/client.js +48 -15
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-ide-git",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.4",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"description": "IDE 级 Git 操作面板:分支树 + 提交图谱 + 变更/暂存/提交 + 提交详情。装了 dsh-better-sidebar 时挂成它的原生 tab(右侧栏 + 底部工作台);没装时直接挂 DSH 原生右侧栏,单独安装即可用。JetBrains 风格 Git 工具窗口 for DeepSeek Harness.",
|
|
6
6
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-ide-git",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.4",
|
|
4
4
|
"description": "DSH plugin: an IDE-grade Git tool window as a native dsh-better-sidebar tab — branch tree, commit graph, changes, commit details, JetBrains-style actions, in the right sidebar and the bottom panel. | DSH 插件:IDE 级 Git 工具窗口,以 dsh-better-sidebar 原生 Tab 挂载——分支树 / 提交图谱 / 变更与提交详情 / JetBrains 风格操作,右侧栏与底部面板双布局自适应。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/client.js
CHANGED
|
@@ -9996,9 +9996,11 @@ window.__ModuleLoader__.load({
|
|
|
9996
9996
|
return E('div', {
|
|
9997
9997
|
className: 'dig-row dig-row-file' + (props.selected === true ? ' dig-row-selected' : ''),
|
|
9998
9998
|
title: item.origPath === undefined ? item.path : item.origPath + ' → ' + item.path,
|
|
9999
|
-
/* The click is handled ONE level up (ChangesPanel): plain click
|
|
10000
|
-
opens the diff
|
|
9999
|
+
/* The click is handled ONE level up (ChangesPanel): plain click only
|
|
10000
|
+
selects, DOUBLE-click opens the diff (v0.18.3 — one interaction model
|
|
10001
|
+
across every list). */
|
|
10001
10002
|
onClick: (event) => props.onRowClick(event, item, props.group),
|
|
10003
|
+
onDoubleClick: () => props.onDblClick(item, props.group),
|
|
10002
10004
|
onContextMenu: (event) => { event.preventDefault(); props.onMenu(event, item, props.group) },
|
|
10003
10005
|
},
|
|
10004
10006
|
FileTypeGlyph({ path: item.path }),
|
|
@@ -10108,8 +10110,10 @@ window.__ModuleLoader__.load({
|
|
|
10108
10110
|
return
|
|
10109
10111
|
}
|
|
10110
10112
|
anchorRef.current = key
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
+
/* Plain click only SELECTS (single-replace, the branch tree's model):
|
|
10114
|
+
the diff moved to DOUBLE-click — a stray click mid-multi-select must
|
|
10115
|
+
not yank the pane away (v0.18.3). */
|
|
10116
|
+
setSelection((previous) => previous.size === 1 && previous.has(key) === true ? previous : new Set([key]))
|
|
10113
10117
|
}, [setSelection, anchorRef, props.onDiff])
|
|
10114
10118
|
/* ---- rubber-band selection over the windowed list: the fixed row
|
|
10115
10119
|
heights + the prefix-sum offsets turn a pixel span back into the
|
|
@@ -10251,6 +10255,7 @@ window.__ModuleLoader__.load({
|
|
|
10251
10255
|
key: key + ':' + item.path, item: item, group: key, t: t,
|
|
10252
10256
|
selected: selection.has(key + ':' + item.path) === true,
|
|
10253
10257
|
onRowClick: handleRowClick,
|
|
10258
|
+
onDblClick: props.onDiff,
|
|
10254
10259
|
onStage: props.onStage, onUnstage: props.onUnstage, onDiscard: props.onDiscard, onDiff: props.onDiff, onMenu: props.onChangeMenu,
|
|
10255
10260
|
})
|
|
10256
10261
|
const folderOf = (item) => {
|
|
@@ -10438,7 +10443,6 @@ window.__ModuleLoader__.load({
|
|
|
10438
10443
|
return E('div', { className: 'dig-changes' },
|
|
10439
10444
|
aiConfirmDialog,
|
|
10440
10445
|
head,
|
|
10441
|
-
selectionBar,
|
|
10442
10446
|
E('div', { className: 'dig-changes-body' },
|
|
10443
10447
|
E('div', {
|
|
10444
10448
|
className: 'dig-changes-list', ref: changesScrollRef,
|
|
@@ -10463,6 +10467,7 @@ window.__ModuleLoader__.load({
|
|
|
10463
10467
|
winLast < changeItems.length ? E('div', { key: 'pad-bottom', style: { height: String(changeOffsets[changeItems.length] - changeOffsets[winLast]) + 'px' } }) : null,
|
|
10464
10468
|
]),
|
|
10465
10469
|
composer),
|
|
10470
|
+
selectionBar,
|
|
10466
10471
|
marquee === null ? null : E('div', {
|
|
10467
10472
|
className: 'dig-marquee',
|
|
10468
10473
|
style: { left: marquee.x + 'px', top: marquee.y + 'px', width: marquee.w + 'px', height: marquee.h + 'px' },
|
|
@@ -10591,8 +10596,10 @@ window.__ModuleLoader__.load({
|
|
|
10591
10596
|
'data-lane': String(props.row.lane),
|
|
10592
10597
|
className: 'dig-commit' + (props.selected === true ? ' dig-commit-selected' : ''),
|
|
10593
10598
|
/* Modifier handling lives in HistoryList (it owns the rendered row
|
|
10594
|
-
order the Shift-range walks); a plain click
|
|
10599
|
+
order the Shift-range walks); a plain click only selects and the
|
|
10600
|
+
DOUBLE-click opens the detail (v0.18.3, same model as the tree). */
|
|
10595
10601
|
onClick: (event) => props.onRowClick(event, commit),
|
|
10602
|
+
onDoubleClick: () => props.onOpenDetail(commit),
|
|
10596
10603
|
onContextMenu: (event) => { event.preventDefault(); props.onMenu(event, commit) },
|
|
10597
10604
|
},
|
|
10598
10605
|
E('span', { className: 'dig-commit-date', title: shortDate(commit.date) }, relativeTime(commit.date)),
|
|
@@ -10698,10 +10705,12 @@ window.__ModuleLoader__.load({
|
|
|
10698
10705
|
const rows = useMemo(() => buildRows(filtered), [filtered])
|
|
10699
10706
|
/* Multi-select gestures (issue #13): the rendered row order is what the
|
|
10700
10707
|
Shift-range walks, and the range is computed over the FILTERED rows —
|
|
10701
|
-
the same list the eye sees.
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
|
|
10708
|
+
the same list the eye sees. A plain click only SELECTS (single-replace,
|
|
10709
|
+
like the branch tree); it must NOT open the detail view — that killed
|
|
10710
|
+
any multi-select mid-flight and is now the DOUBLE-click's job (user
|
|
10711
|
+
request, v0.18.3). The stale-callback risk is nil: rows change identity
|
|
10712
|
+
with the filters, and every row re-renders whenever its commit
|
|
10713
|
+
reference changes. */
|
|
10705
10714
|
const handleRowClick = (event, commit) => {
|
|
10706
10715
|
const pickedHashes = props.pickedHashes
|
|
10707
10716
|
const setPicks = props.onPicksChange
|
|
@@ -10738,8 +10747,13 @@ window.__ModuleLoader__.load({
|
|
|
10738
10747
|
return
|
|
10739
10748
|
}
|
|
10740
10749
|
pickAnchor.current = commit.hash
|
|
10741
|
-
|
|
10742
|
-
|
|
10750
|
+
/* Plain click only SELECTS (single-replace, the changes list's
|
|
10751
|
+
model): the detail view moved to DOUBLE-click. v0.18.3 updated the
|
|
10752
|
+
comment but left props.onSelect(commit) on this path, so single
|
|
10753
|
+
clicks kept yanking the pane away (user report) — the call is gone
|
|
10754
|
+
for real now; row highlight comes from the picked set, Enter is the
|
|
10755
|
+
keyboard twin of the double-click. */
|
|
10756
|
+
setPicks((previous) => previous.size === 1 && previous.has(commit.hash) === true ? previous : new Set([commit.hash]))
|
|
10743
10757
|
}
|
|
10744
10758
|
/* Ctrl+A selects the whole filtered list; everything else (Ctrl+C, Esc)
|
|
10745
10759
|
belongs to the Panel-level handler that owns the picked set. */
|
|
@@ -10857,7 +10871,7 @@ window.__ModuleLoader__.load({
|
|
|
10857
10871
|
commit: row.commit, row: row, t: t,
|
|
10858
10872
|
selected: props.selectedHash === row.commit.hash
|
|
10859
10873
|
|| (props.pickedHashes !== undefined && props.pickedHashes.has(row.commit.hash) === true),
|
|
10860
|
-
onRowClick: handleRowClick, onMenu: props.onMenu, openMenuAt: props.openMenuAt,
|
|
10874
|
+
onRowClick: handleRowClick, onOpenDetail: props.onSelect, onMenu: props.onMenu, openMenuAt: props.openMenuAt,
|
|
10861
10875
|
})),
|
|
10862
10876
|
winEnd < rows.length ? E('div', { key: 'pad-bottom', style: { height: String((rows.length - winEnd) * HISTORY_ROW_H) + 'px' } }) : null,
|
|
10863
10877
|
props.hasMore === true
|
|
@@ -10884,7 +10898,10 @@ window.__ModuleLoader__.load({
|
|
|
10884
10898
|
key: file.path,
|
|
10885
10899
|
className: 'dig-row dig-row-file' + (props.selectedPath === file.path ? ' dig-row-selected' : ''),
|
|
10886
10900
|
title: file.path,
|
|
10901
|
+
/* Same click model as everywhere else (v0.18.3): plain click only
|
|
10902
|
+
selects, DOUBLE-click opens the diff. */
|
|
10887
10903
|
onClick: () => props.onSelectFile(file),
|
|
10904
|
+
onDoubleClick: () => props.onOpenFile(file),
|
|
10888
10905
|
onContextMenu: props.onFileMenu === undefined ? undefined : (event) => { event.preventDefault(); props.onFileMenu(event, file) },
|
|
10889
10906
|
},
|
|
10890
10907
|
FileTypeGlyph({ path: file.path }),
|
|
@@ -11809,6 +11826,15 @@ window.__ModuleLoader__.load({
|
|
|
11809
11826
|
copyValues(Array.from(pickedCommits))
|
|
11810
11827
|
return
|
|
11811
11828
|
}
|
|
11829
|
+
/* Enter = the keyboard twin of the double-click: open the picked
|
|
11830
|
+
commit's detail. Exactly one pick — with several, the intent is
|
|
11831
|
+
ambiguous, so Enter does nothing. */
|
|
11832
|
+
if (event.key === 'Enter' && pickedCommits.size === 1) {
|
|
11833
|
+
event.preventDefault()
|
|
11834
|
+
const hash = pickedCommits.values().next().value
|
|
11835
|
+
const commit = commits.find((entry) => entry.hash === hash)
|
|
11836
|
+
if (commit !== undefined) { void selectCommit(commit); return }
|
|
11837
|
+
}
|
|
11812
11838
|
if (event.key === 'Escape') setPickedCommits(new Set())
|
|
11813
11839
|
}
|
|
11814
11840
|
/* Branch-tree Delete: group the picked refs by kind and hand them to ONE
|
|
@@ -12241,7 +12267,10 @@ window.__ModuleLoader__.load({
|
|
|
12241
12267
|
? E(CommitDetail, {
|
|
12242
12268
|
t: t, detail: detail, selectedPath: selectedPath,
|
|
12243
12269
|
onBack: () => { setView('history'); setSelectedPath(null); setPatch(''); setDiffContext(null) },
|
|
12244
|
-
|
|
12270
|
+
/* Plain click only highlights the file; the DOUBLE-click opens its
|
|
12271
|
+
diff (v0.18.3, one click model across every list). */
|
|
12272
|
+
onSelectFile: (file) => { setSelectedPath(file.path) },
|
|
12273
|
+
onOpenFile: (file) => {
|
|
12245
12274
|
setSelectedPath(file.path)
|
|
12246
12275
|
showDiff({
|
|
12247
12276
|
hash: detail === null || detail === undefined ? undefined : detail.hash,
|
|
@@ -13331,7 +13360,11 @@ window.__ModuleLoader__.load({
|
|
|
13331
13360
|
VIEWPORT-space .dig-changes (invariant 13: position:fixed would be
|
|
13332
13361
|
captured by the workbench's contain:layout and flung off-panel). */
|
|
13333
13362
|
'.dig-marquee{position:absolute;border:1px solid var(--dsw-alias-brand-primary);background:color-mix(in srgb,var(--dsw-alias-brand-primary) 14%,transparent);pointer-events:none;z-index:6}',
|
|
13334
|
-
|
|
13363
|
+
/* The selection bar FLOATS over the top of the list (absolute, solid
|
|
13364
|
+
surface): as an in-flow bar it shoved the whole list down one row on
|
|
13365
|
+
the first selection — the second click of every double-click then
|
|
13366
|
+
landed on the shifted group head and the dblclick died (v0.18.3). */
|
|
13367
|
+
'.dig-selection-bar{position:absolute;top:0;left:0;right:0;z-index:6;display:flex;align-items:center;gap:12px;padding:3px 10px;font-size:11px;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-layer-1));border-bottom:1px solid var(--dsw-alias-border-subtle,transparent);box-shadow:var(--dsw-elevation-prominent,0 4px 14px rgba(0,0,0,.3))}',
|
|
13335
13368
|
'.dig-selection-bar .dig-link{margin-left:0}',
|
|
13336
13369
|
'.dig-selection-bar .dig-link-danger{color:var(--dsw-alias-state-error-primary)}',
|
|
13337
13370
|
'.dig-selection-count{color:var(--dsw-alias-label-secondary);white-space:nowrap}',
|