dsh-ide-git 0.19.12 → 0.19.13

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.12",
3
+ "version": "0.19.13",
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.12",
3
+ "version": "0.19.13",
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
@@ -14991,7 +14991,12 @@ window.__ModuleLoader__.load({
14991
14991
  '.dig-cs-pill{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 8px;border:none;border-radius:var(--dsw-radius-sm,8px);background:transparent;color:var(--dsw-alias-label-secondary);font-family:inherit;font-size:var(--dsh-content-font-size-secondary,13px);line-height:20px;white-space:nowrap;cursor:pointer}',
14992
14992
  '.dig-cs-pill:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}',
14993
14993
  '.dig-cs-pill:disabled{cursor:default}',
14994
- '.dig-cs-name{overflow:hidden;text-overflow:ellipsis;max-width:150px}',
14994
+ '.dig-cs-name{overflow:hidden;text-overflow:ellipsis;max-width:260px;white-space:nowrap;display:inline-block;vertical-align:bottom}',
14995
+ '.dig-cs-mrun{display:inline-flex;text-overflow:clip;-webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 14px),transparent);mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 14px),transparent)}',
14996
+ '.dig-cs-mrun .dig-cs-run{display:inline-flex;flex:none;will-change:transform}',
14997
+ '.dig-cs-mrun .dig-cs-chunk{flex:none;white-space:nowrap;padding-right:28px}',
14998
+ '.dig-cs-mrun:hover .dig-cs-run{animation:dig-cs-marquee var(--dig-cs-marquee-dur,10s) linear infinite}',
14999
+ '@keyframes dig-cs-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}',
14995
15000
  '.dig-cs-pill svg{flex:none}',
14996
15001
  '.dig-cs-badge{display:inline-flex;align-items:center;font-size:12px;line-height:20px;font-variant-numeric:tabular-nums;white-space:nowrap;padding:0 3px;font-weight:500}',
14997
15002
  '.dig-cs-changes{color:var(--dsw-alias-state-warn-primary)}',
@@ -15214,6 +15219,51 @@ window.__ModuleLoader__.load({
15214
15219
  return null
15215
15220
  }
15216
15221
 
15222
+ /* Long repository/branch names: widen the label cap and, past it, run a
15223
+ hover-only seamless marquee (the official sidebar rows scroll hovered
15224
+ titles via useTitleMarquee, which this surface cannot require — this is
15225
+ the CSS twin). The label is measured after paint; only overflowing text
15226
+ switches to the duplicated-chunk structure, so short names keep the
15227
+ plain ellipsis and never animate. Duration follows the text width so a
15228
+ slightly-long name does not crawl. */
15229
+ const COMPOSER_NAME_MAX_PX = 260
15230
+ const MARQUEE_PX_PER_S = 28
15231
+
15232
+ function ComposerMarqueeName(props) {
15233
+ const text = typeof props.text === 'string' ? props.text : ''
15234
+ const boxRef = useRef(null)
15235
+ const [run, setRun] = useState(false)
15236
+ const [dur, setDur] = useState('')
15237
+ useEffect(() => {
15238
+ const box = boxRef.current
15239
+ if (box === null) return undefined
15240
+ const measure = () => {
15241
+ if (boxRef.current !== box) return /* replaced or unmounted */
15242
+ const overflow = box.scrollWidth > box.clientWidth + 1
15243
+ setRun(overflow)
15244
+ /* In the running structure scrollWidth covers BOTH chunks, so one
15245
+ chunk is half of it; the plain structure measures the text alone. */
15246
+ const unit = overflow === true && run === true ? box.scrollWidth / 2 : box.scrollWidth
15247
+ setDur(overflow === true ? (unit / MARQUEE_PX_PER_S).toFixed(2) + 's' : '')
15248
+ }
15249
+ measure()
15250
+ /* Webfonts land after paint and change text metrics — re-measure once. */
15251
+ let frame = 0
15252
+ const fonts = document.fonts
15253
+ if (fonts !== undefined && fonts !== null && fonts.ready !== undefined && typeof fonts.ready.then === 'function') {
15254
+ fonts.ready.then(() => { frame = requestAnimationFrame(measure) }, () => {})
15255
+ }
15256
+ return () => { if (frame !== 0) cancelAnimationFrame(frame) }
15257
+ }, [text, run])
15258
+ if (run !== true) {
15259
+ return E('span', { ref: boxRef, className: 'dig-cs-name' }, text)
15260
+ }
15261
+ return E('span', { ref: boxRef, className: 'dig-cs-name dig-cs-mrun', style: dur !== '' ? { '--dig-cs-marquee-dur': dur } : undefined },
15262
+ E('span', { className: 'dig-cs-run' },
15263
+ E('span', { className: 'dig-cs-chunk' }, text),
15264
+ E('span', { className: 'dig-cs-chunk', 'aria-hidden': 'true' }, text)))
15265
+ }
15266
+
15217
15267
  function ComposerGitStatus(props) {
15218
15268
  const ctx = props.ctx
15219
15269
  const t = props.t
@@ -15476,7 +15526,7 @@ window.__ModuleLoader__.load({
15476
15526
  onClick: singleRepo === true ? undefined : () => { setMenu(menu === 'repo' ? null : 'repo') },
15477
15527
  },
15478
15528
  E(Icon, { name: 'commit', size: 13 }),
15479
- E('span', { className: 'dig-cs-name' }, repoName),
15529
+ E(ComposerMarqueeName, { text: repoName }),
15480
15530
  singleRepo === true ? null : E(Icon, { name: 'chevron', size: 10 })),
15481
15531
  branchName !== null ? E('button', {
15482
15532
  type: 'button',
@@ -15485,7 +15535,7 @@ window.__ModuleLoader__.load({
15485
15535
  onClick: () => { if (menu !== 'branch') void openBranchMenu(); else setMenu(null) },
15486
15536
  },
15487
15537
  E(Icon, { name: 'branch', size: 13 }),
15488
- E('span', { className: 'dig-cs-name' }, detached === true ? t('composer.detached') : branchName),
15538
+ E(ComposerMarqueeName, { text: detached === true ? t('composer.detached') : branchName }),
15489
15539
  E(Icon, { name: 'chevron', size: 10 })) : null,
15490
15540
  changesCount !== null && changesCount > 0
15491
15541
  ? E('span', { className: 'dig-cs-badge dig-cs-changes', title: changesTitle }, '±' + String(changesCount),