dsh-ide-git 0.6.0 → 0.7.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/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-ide-git",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
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/icon.svg ADDED
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" fill="none">
2
+ <circle cx="10" cy="8.5" r="3.2" stroke="#4493f8" stroke-width="1.7"/>
3
+ <circle cx="10" cy="27.5" r="3.2" stroke="#4493f8" stroke-width="1.7"/>
4
+ <circle cx="25" cy="13.5" r="3.2" stroke="#f0883e" stroke-width="1.7"/>
5
+ <path d="M10 11.7v12.6M10 18c0-4 6.4-4.5 11.8-4.5" stroke="#4493f8" stroke-width="1.7" stroke-linecap="round"/>
6
+ <circle cx="25" cy="26" r="3.2" stroke="#4493f8" stroke-width="1.7"/>
7
+ <path d="M25 16.7v6.1" stroke="#f0883e" stroke-width="1.7" stroke-linecap="round"/>
8
+ </svg>
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Git Tool Window",
4
+ "description": "An IDE-style Git tool window as a native sidebar tab: branch tree, commit graph, changes and commit details with staged/unstaged diffs, submodules as repos, destructive-action guards with undo handles, and the full argv-only git surface served same-origin."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Git 工具窗口",
4
+ "description": "IDE 风格的 Git 工具窗口,作为侧边栏原生标签页:分支树、提交图谱、变更与提交详情(暂存/未暂存 diff)、子模块作为独立仓库、破坏性操作守卫与撤回句柄,git 调用全部 argv 化并走同源信任围栏。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ide-git",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
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": {
@@ -14,7 +14,8 @@
14
14
  "exports": {
15
15
  ".": "./src/index.js",
16
16
  "./client": "./src/client.js",
17
- "./package.json": "./package.json"
17
+ "./package.json": "./package.json",
18
+ "./locale/*.json": "./locale/*.json"
18
19
  },
19
20
  "engines": {
20
21
  "node": ">=18",
@@ -35,6 +36,8 @@
35
36
  }
36
37
  },
37
38
  "files": [
39
+ "icon.svg",
40
+ "locale",
38
41
  "src/index.js",
39
42
  "src/client.js",
40
43
  "cordis.patch.yml",
@@ -72,5 +75,6 @@
72
75
  "homepage": "https://github.com/KannaKuron/dsh-ide-git",
73
76
  "bugs": {
74
77
  "url": "https://github.com/KannaKuron/dsh-ide-git/issues"
75
- }
78
+ },
79
+ "icon": "./icon.svg"
76
80
  }
package/src/client.js CHANGED
@@ -28,7 +28,15 @@ window.__ModuleLoader__.load({
28
28
  const useCallback = React.useCallback
29
29
  const useLayoutEffect = React.useLayoutEffect
30
30
 
31
- const API_BASE = '/dsh-ide-git/api'
31
+ /* API base is MOUNT-RELATIVE (no leading slash). dsh 0.1.7 serves the
32
+ shell with <base href="./">, so document.baseURI is the mount the page
33
+ was loaded from — the origin root, or a prefix-stripping proxy's sub-path
34
+ (issue #4). fetch() resolves this relative path against the document
35
+ base, so the panel's calls land on /dsh-ide-git/api at the origin root
36
+ and on <mount>/dsh-ide-git/api under a sub-path, both matching the route
37
+ the host half registered at its upstream path. An origin-absolute base
38
+ would escape the mount and 404 behind any strict proxy. */
39
+ const API_BASE = 'dsh-ide-git/api'
32
40
  const TAB_ID = 'dsh-ide-git:panel'
33
41
  /* The namespace this plugin's dictionaries are published under in the DSH
34
42
  locale registry. */
package/src/index.js CHANGED
@@ -1063,7 +1063,17 @@ const REPO_LIST_LIMIT = 60
1063
1063
  * collapses to one row. */
1064
1064
  function pathIdentity(value) {
1065
1065
  const normalized = value.replace(/\\/g, '/').replace(/\/+$/, '')
1066
- return process.platform === 'win32' ? normalized.toLowerCase() : normalized
1066
+ const key = process.platform === 'win32' ? normalized.toLowerCase() : normalized
1067
+ /* realpath collapses producer spellings of one checkout: git's
1068
+ * --show-toplevel resolves symlinks (/private/var on macOS) while a
1069
+ * directory walk keeps the spelling it was handed (/var), and without this
1070
+ * the same submodule arrived as two rows. An unresolvable path falls back
1071
+ * to the slash-normalized form. */
1072
+ try {
1073
+ return realpathSync(key).replace(/\\/g, '/').replace(/\/+$/, '')
1074
+ } catch {
1075
+ return key
1076
+ }
1067
1077
  }
1068
1078
 
1069
1079
  /** One repository row shipped to the client (`kind` drives the picker badge). */