dsh-ide-git 0.19.1 → 0.19.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-ide-git",
3
- "version": "0.19.1",
3
+ "version": "0.19.2",
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.19.1",
3
+ "version": "0.19.2",
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
@@ -14372,7 +14372,8 @@ window.__ModuleLoader__.load({
14372
14372
  '.dig-cs-item[data-current=true]{color:var(--dsw-alias-brand-primary)}',
14373
14373
  '.dig-cs-item svg{flex:none}',
14374
14374
  '.dig-cs-item-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}',
14375
- '.dig-cs-item-path{margin-left:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-size:11px;max-width:140px}',
14375
+ '.dig-cs-item-main{display:flex;flex-direction:column;min-width:0;flex:1}',
14376
+ '.dig-cs-item-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:12px}',
14376
14377
  '.dig-cs-item-note{color:var(--dsw-alias-label-tertiary);font-size:11px;flex:none}',
14377
14378
  '.dig-cs-item-counts{display:inline-flex;gap:5px;margin-left:auto;flex:none;font-variant-numeric:tabular-nums;font-size:11px}',
14378
14379
  '.dig-cs-static{color:var(--dsw-alias-label-tertiary);cursor:default}',
@@ -14793,17 +14794,27 @@ window.__ModuleLoader__.load({
14793
14794
  ahead > 0 ? E('span', { className: 'dig-cs-badge dig-cs-ahead', title: t('composer.aheadHint') }, '↑' + String(ahead)) : null,
14794
14795
  error !== '' ? E('span', { className: 'dig-cs-error', title: error }, '×') : null,
14795
14796
  menu === 'repo' ? E('div', { className: 'dig-cs-menu', 'data-cordis-panel': '' },
14796
- repoPaths.map((path) => E('button', {
14797
- key: path,
14798
- type: 'button',
14799
- className: 'dig-cs-item',
14800
- 'data-current': path === repoRoot ? 'true' : 'false',
14801
- title: path,
14802
- onClick: () => pickRepoRoot(path),
14803
- },
14804
- E(Icon, { name: 'commit', size: 11 }),
14805
- E('span', { className: 'dig-cs-item-name' }, baseNameOf(path)),
14806
- E('span', { className: 'dig-cs-item-path' }, path))))
14797
+ /* v0.19.2: one row per checkout — the repository's own name first
14798
+ (origin URL basename, falling back to the directory name), and the
14799
+ single-level directory name as a small sub line only when the two
14800
+ differ (two clones of one repository stay tellable apart). The
14801
+ full path lives in the tooltip, not in the row. */
14802
+ data.repos.map((row) => {
14803
+ const dirName = baseNameOf(row.path)
14804
+ const displayName = row.origin !== undefined && row.origin !== '' ? row.origin : dirName
14805
+ return E('button', {
14806
+ key: row.path,
14807
+ type: 'button',
14808
+ className: 'dig-cs-item',
14809
+ 'data-current': row.path === repoRoot ? 'true' : 'false',
14810
+ title: row.path,
14811
+ onClick: () => pickRepoRoot(row.path),
14812
+ },
14813
+ E(Icon, { name: 'commit', size: 11 }),
14814
+ E('span', { className: 'dig-cs-item-main' },
14815
+ E('span', { className: 'dig-cs-item-name' }, displayName),
14816
+ dirName !== displayName ? E('span', { className: 'dig-cs-item-sub' }, dirName) : null))
14817
+ }))
14807
14818
  : null,
14808
14819
  menu === 'branch' ? (branchLoading === true || branchList === null
14809
14820
  ? E('div', { className: 'dig-cs-menu', 'data-cordis-panel': '' }, E('div', { className: 'dig-cs-item dig-cs-static' }, '…'))
package/src/index.js CHANGED
@@ -1434,6 +1434,12 @@ function repoRow(root, submodulePath, kind) {
1434
1434
  name: submodulePath === undefined ? path.basename(root) : submodulePath,
1435
1435
  label: submodulePath === undefined ? path.basename(root) : submodulePath.split('/').pop(),
1436
1436
  branch: null,
1437
+ /** The checkout's own repository name, cut from its origin URL (v0.19.2):
1438
+ * the picker shows this first and falls back to the directory name, with
1439
+ * the directory name as the small sub line whenever the two differ — so
1440
+ * two clones of one repository stay tellable apart. Filled in by the
1441
+ * scan below (an origin-less checkout keeps the empty string). */
1442
+ origin: '',
1437
1443
  kind,
1438
1444
  ...(submodulePath === undefined ? {} : { submodulePath }),
1439
1445
  }
@@ -1540,6 +1546,11 @@ async function scanRepos(cwd) {
1540
1546
  const capped = rows.slice(0, REPO_LIST_LIMIT).map((row) => ({ ...row }))
1541
1547
  const branches = await Promise.all(capped.map((row) => branchOrNull(row.path)))
1542
1548
  for (let index = 0; index < capped.length; index += 1) capped[index].branch = branches[index]
1549
+ /* Origin names ride the same one-call-per-row pass as the branches: a local
1550
+ `git remote get-url` read, cheap, and the 15s cache means repeated picker
1551
+ opens pay for it once. */
1552
+ const origins = await Promise.all(capped.map((row) => originNameOf(row.path)))
1553
+ for (let index = 0; index < capped.length; index += 1) capped[index].origin = origins[index]
1543
1554
  repoScanCache.set(cwd, { at: Date.now(), rows: capped })
1544
1555
  return { cached: false, rows: capped.map((row) => ({ ...row })) }
1545
1556
  }