@jingyi0605/codingns4dsh 0.2.0-beta.1 → 0.2.0-rc.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.
Files changed (872) hide show
  1. package/README.en.md +29 -12
  2. package/README.md +22 -13
  3. package/assets/provider-icons/minimax-code.svg +4 -0
  4. package/assets/provider-icons/zcode.svg +14 -0
  5. package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts +1 -1
  6. package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts.map +1 -0
  7. package/data/build/dist/bootstrap/dsh-connection-adapter.js.map +1 -0
  8. package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts +50 -0
  9. package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts.map +1 -0
  10. package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js +239 -0
  11. package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js.map +1 -0
  12. package/data/build/dist/bootstrap/index.d.ts +3 -1
  13. package/data/build/dist/bootstrap/index.d.ts.map +1 -0
  14. package/data/build/dist/bootstrap/index.js +1 -0
  15. package/data/build/dist/bootstrap/index.js.map +1 -0
  16. package/data/build/dist/client/account-bar.d.ts +8 -1
  17. package/data/build/dist/client/account-bar.d.ts.map +1 -0
  18. package/data/build/dist/client/account-bar.js +166 -79
  19. package/data/build/dist/client/account-bar.js.map +1 -0
  20. package/data/build/dist/client/bundle.js +16641 -8889
  21. package/data/build/dist/client/bundle.js.map +1 -0
  22. package/data/build/dist/client/cli-catalog.d.ts.map +1 -0
  23. package/data/build/dist/client/cli-catalog.js.map +1 -0
  24. package/data/build/dist/client/cli-slots.d.ts.map +1 -0
  25. package/data/build/dist/client/cli-slots.js +32 -13
  26. package/data/build/dist/client/cli-slots.js.map +1 -0
  27. package/data/build/dist/client/context-breakdown-dom.d.ts.map +1 -0
  28. package/data/build/dist/client/context-breakdown-dom.js.map +1 -0
  29. package/data/build/dist/client/debug/ui.d.ts +2 -1
  30. package/data/build/dist/client/debug/ui.d.ts.map +1 -0
  31. package/data/build/dist/client/debug/ui.js +40 -33
  32. package/data/build/dist/client/debug/ui.js.map +1 -0
  33. package/data/build/dist/client/delegate-command.d.ts +16 -0
  34. package/data/build/dist/client/delegate-command.d.ts.map +1 -0
  35. package/data/build/dist/client/delegate-command.js +138 -0
  36. package/data/build/dist/client/delegate-command.js.map +1 -0
  37. package/data/build/dist/client/delegate-plan.d.ts +31 -0
  38. package/data/build/dist/client/delegate-plan.d.ts.map +1 -0
  39. package/data/build/dist/client/delegate-plan.js +59 -0
  40. package/data/build/dist/client/delegate-plan.js.map +1 -0
  41. package/data/build/dist/client/delegate-ui-dom.d.ts +40 -0
  42. package/data/build/dist/client/delegate-ui-dom.d.ts.map +1 -0
  43. package/data/build/dist/client/delegate-ui-dom.js +363 -0
  44. package/data/build/dist/client/delegate-ui-dom.js.map +1 -0
  45. package/data/build/dist/client/dsh-h5-bootstrap.d.ts.map +1 -0
  46. package/data/build/dist/client/dsh-h5-bootstrap.js +12 -5
  47. package/data/build/dist/client/dsh-h5-bootstrap.js.map +1 -0
  48. package/data/build/dist/client/dsh-runtime-version.d.ts +3 -2
  49. package/data/build/dist/client/dsh-runtime-version.d.ts.map +1 -0
  50. package/data/build/dist/client/dsh-runtime-version.js +7 -6
  51. package/data/build/dist/client/dsh-runtime-version.js.map +1 -0
  52. package/data/build/dist/client/external-tool-stream.d.ts.map +1 -0
  53. package/data/build/dist/client/external-tool-stream.js +44 -36
  54. package/data/build/dist/client/external-tool-stream.js.map +1 -0
  55. package/data/build/dist/client/features/cli-adapters.d.ts +7 -2
  56. package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -0
  57. package/data/build/dist/client/features/cli-adapters.js +59 -105
  58. package/data/build/dist/client/features/cli-adapters.js.map +1 -0
  59. package/data/build/dist/client/features/debug.d.ts.map +1 -0
  60. package/data/build/dist/client/features/debug.js +6 -4
  61. package/data/build/dist/client/features/debug.js.map +1 -0
  62. package/data/build/dist/client/features/file-management-panel.d.ts.map +1 -0
  63. package/data/build/dist/client/features/file-management-panel.js.map +1 -0
  64. package/data/build/dist/client/features/file-management.d.ts.map +1 -0
  65. package/data/build/dist/client/features/file-management.js +8 -5
  66. package/data/build/dist/client/features/file-management.js.map +1 -0
  67. package/data/build/dist/client/features/index.d.ts +4 -2
  68. package/data/build/dist/client/features/index.d.ts.map +1 -0
  69. package/data/build/dist/client/features/index.js +5 -2
  70. package/data/build/dist/client/features/index.js.map +1 -0
  71. package/data/build/dist/client/features/lan-access-panel.d.ts.map +1 -0
  72. package/data/build/dist/client/features/lan-access-panel.js +89 -11
  73. package/data/build/dist/client/features/lan-access-panel.js.map +1 -0
  74. package/data/build/dist/client/features/lan-access-status.d.ts +40 -0
  75. package/data/build/dist/client/features/lan-access-status.d.ts.map +1 -0
  76. package/data/build/dist/client/features/lan-access-status.js +118 -0
  77. package/data/build/dist/client/features/lan-access-status.js.map +1 -0
  78. package/data/build/dist/client/features/lan-access.d.ts +4 -1
  79. package/data/build/dist/client/features/lan-access.d.ts.map +1 -0
  80. package/data/build/dist/client/features/lan-access.js +35 -5
  81. package/data/build/dist/client/features/lan-access.js.map +1 -0
  82. package/data/build/dist/client/features/login-protection-panel.d.ts.map +1 -0
  83. package/data/build/dist/client/features/login-protection-panel.js +9 -7
  84. package/data/build/dist/client/features/login-protection-panel.js.map +1 -0
  85. package/data/build/dist/client/features/login-protection-session.d.ts.map +1 -0
  86. package/data/build/dist/client/features/login-protection-session.js.map +1 -0
  87. package/data/build/dist/client/features/login-protection.d.ts.map +1 -0
  88. package/data/build/dist/client/features/login-protection.js +3 -3
  89. package/data/build/dist/client/features/login-protection.js.map +1 -0
  90. package/data/build/dist/client/features/mobile-access-panel.d.ts +12 -0
  91. package/data/build/dist/client/features/mobile-access-panel.d.ts.map +1 -0
  92. package/data/build/dist/client/features/mobile-access-panel.js +259 -0
  93. package/data/build/dist/client/features/mobile-access-panel.js.map +1 -0
  94. package/data/build/dist/client/features/mobile-access.d.ts +13 -0
  95. package/data/build/dist/client/features/mobile-access.d.ts.map +1 -0
  96. package/data/build/dist/client/features/mobile-access.js +79 -0
  97. package/data/build/dist/client/features/mobile-access.js.map +1 -0
  98. package/data/build/dist/client/features/peer-host.d.ts +35 -1
  99. package/data/build/dist/client/features/peer-host.d.ts.map +1 -0
  100. package/data/build/dist/client/features/peer-host.js +599 -56
  101. package/data/build/dist/client/features/peer-host.js.map +1 -0
  102. package/data/build/dist/client/features/reverse-proxy-panel.d.ts.map +1 -0
  103. package/data/build/dist/client/features/reverse-proxy-panel.js +2 -1
  104. package/data/build/dist/client/features/reverse-proxy-panel.js.map +1 -0
  105. package/data/build/dist/client/features/reverse-proxy.d.ts.map +1 -0
  106. package/data/build/dist/client/features/reverse-proxy.js +3 -3
  107. package/data/build/dist/client/features/reverse-proxy.js.map +1 -0
  108. package/data/build/dist/client/features/subscription-usage-panel.d.ts.map +1 -0
  109. package/data/build/dist/client/features/subscription-usage-panel.js.map +1 -0
  110. package/data/build/dist/client/features/terminal-enhancement-panel.d.ts.map +1 -0
  111. package/data/build/dist/client/features/terminal-enhancement-panel.js.map +1 -0
  112. package/data/build/dist/client/features/terminal-enhancement.d.ts.map +1 -0
  113. package/data/build/dist/client/features/terminal-enhancement.js +3 -3
  114. package/data/build/dist/client/features/terminal-enhancement.js.map +1 -0
  115. package/data/build/dist/client/features/types.d.ts +12 -0
  116. package/data/build/dist/client/features/types.d.ts.map +1 -0
  117. package/data/build/dist/client/features/types.js.map +1 -0
  118. package/data/build/dist/client/features/workspace-session-enhancement-panel.d.ts.map +1 -0
  119. package/data/build/dist/client/features/workspace-session-enhancement-panel.js +5 -2
  120. package/data/build/dist/client/features/workspace-session-enhancement-panel.js.map +1 -0
  121. package/data/build/dist/client/features/workspace-session-enhancement.d.ts.map +1 -0
  122. package/data/build/dist/client/features/workspace-session-enhancement.js +24 -6
  123. package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -0
  124. package/data/build/dist/client/file-management-dom.d.ts +5 -0
  125. package/data/build/dist/client/file-management-dom.d.ts.map +1 -0
  126. package/data/build/dist/client/file-management-dom.js +78 -38
  127. package/data/build/dist/client/file-management-dom.js.map +1 -0
  128. package/data/build/dist/client/git-history-graph.d.ts +81 -0
  129. package/data/build/dist/client/git-history-graph.d.ts.map +1 -0
  130. package/data/build/dist/client/git-history-graph.js +195 -0
  131. package/data/build/dist/client/git-history-graph.js.map +1 -0
  132. package/data/build/dist/client/git-management.d.ts +2 -0
  133. package/data/build/dist/client/git-management.d.ts.map +1 -0
  134. package/data/build/dist/client/git-management.js +284 -108
  135. package/data/build/dist/client/git-management.js.map +1 -0
  136. package/data/build/dist/client/git-panel-styles.d.ts +28 -0
  137. package/data/build/dist/client/git-panel-styles.d.ts.map +1 -0
  138. package/data/build/dist/client/git-panel-styles.js +95 -0
  139. package/data/build/dist/client/git-panel-styles.js.map +1 -0
  140. package/data/build/dist/client/git-workspace-events.d.ts +7 -0
  141. package/data/build/dist/client/git-workspace-events.d.ts.map +1 -0
  142. package/data/build/dist/client/git-workspace-events.js +32 -0
  143. package/data/build/dist/client/git-workspace-events.js.map +1 -0
  144. package/data/build/dist/client/h5-bootstrap-entry.d.ts.map +1 -0
  145. package/data/build/dist/client/h5-bootstrap-entry.js.map +1 -0
  146. package/data/build/dist/client/host-router.d.ts.map +1 -0
  147. package/data/build/dist/client/host-router.js.map +1 -0
  148. package/data/build/dist/client/index.d.ts +7 -4
  149. package/data/build/dist/client/index.d.ts.map +1 -0
  150. package/data/build/dist/client/index.js +16 -9
  151. package/data/build/dist/client/index.js.map +1 -0
  152. package/data/build/dist/client/lan-access.d.ts.map +1 -0
  153. package/data/build/dist/client/lan-access.js.map +1 -0
  154. package/data/build/dist/client/locale.d.ts +7 -0
  155. package/data/build/dist/client/locale.d.ts.map +1 -0
  156. package/data/build/dist/client/locale.js +231 -47
  157. package/data/build/dist/client/locale.js.map +1 -0
  158. package/data/build/dist/client/locales/debug.d.ts +9 -0
  159. package/data/build/dist/client/locales/debug.d.ts.map +1 -0
  160. package/data/build/dist/client/locales/debug.js +163 -0
  161. package/data/build/dist/client/locales/debug.js.map +1 -0
  162. package/data/build/dist/client/locales/fileWorkspace.d.ts +9 -0
  163. package/data/build/dist/client/locales/fileWorkspace.d.ts.map +1 -0
  164. package/data/build/dist/client/locales/fileWorkspace.js +139 -0
  165. package/data/build/dist/client/locales/fileWorkspace.js.map +1 -0
  166. package/data/build/dist/client/locales/git.d.ts +9 -0
  167. package/data/build/dist/client/locales/git.d.ts.map +1 -0
  168. package/data/build/dist/client/locales/git.js +223 -0
  169. package/data/build/dist/client/locales/git.js.map +1 -0
  170. package/data/build/dist/client/locales/panels.d.ts +9 -0
  171. package/data/build/dist/client/locales/panels.d.ts.map +1 -0
  172. package/data/build/dist/client/locales/panels.js +33 -0
  173. package/data/build/dist/client/locales/panels.js.map +1 -0
  174. package/data/build/dist/client/locales/peerHost.d.ts +9 -0
  175. package/data/build/dist/client/locales/peerHost.d.ts.map +1 -0
  176. package/data/build/dist/client/locales/peerHost.js +153 -0
  177. package/data/build/dist/client/locales/peerHost.js.map +1 -0
  178. package/data/build/dist/client/locales/peerHostWorkspace.d.ts +9 -0
  179. package/data/build/dist/client/locales/peerHostWorkspace.d.ts.map +1 -0
  180. package/data/build/dist/client/locales/peerHostWorkspace.js +69 -0
  181. package/data/build/dist/client/locales/peerHostWorkspace.js.map +1 -0
  182. package/data/build/dist/client/locales/terminalAuth.d.ts +9 -0
  183. package/data/build/dist/client/locales/terminalAuth.d.ts.map +1 -0
  184. package/data/build/dist/client/locales/terminalAuth.js +67 -0
  185. package/data/build/dist/client/locales/terminalAuth.js.map +1 -0
  186. package/data/build/dist/client/locales/usage.d.ts +9 -0
  187. package/data/build/dist/client/locales/usage.d.ts.map +1 -0
  188. package/data/build/dist/client/locales/usage.js +195 -0
  189. package/data/build/dist/client/locales/usage.js.map +1 -0
  190. package/data/build/dist/client/mobile-session-interaction.d.ts +44 -0
  191. package/data/build/dist/client/mobile-session-interaction.d.ts.map +1 -0
  192. package/data/build/dist/client/mobile-session-interaction.js +291 -0
  193. package/data/build/dist/client/mobile-session-interaction.js.map +1 -0
  194. package/data/build/dist/client/mobile-settings-modal-dom.d.ts +49 -0
  195. package/data/build/dist/client/mobile-settings-modal-dom.d.ts.map +1 -0
  196. package/data/build/dist/client/mobile-settings-modal-dom.js +152 -0
  197. package/data/build/dist/client/mobile-settings-modal-dom.js.map +1 -0
  198. package/data/build/dist/client/mobile-sidebar-gestures.d.ts +97 -0
  199. package/data/build/dist/client/mobile-sidebar-gestures.d.ts.map +1 -0
  200. package/data/build/dist/client/mobile-sidebar-gestures.js +316 -0
  201. package/data/build/dist/client/mobile-sidebar-gestures.js.map +1 -0
  202. package/data/build/dist/client/mobile-sidebar-logo.d.ts +18 -0
  203. package/data/build/dist/client/mobile-sidebar-logo.d.ts.map +1 -0
  204. package/data/build/dist/client/mobile-sidebar-logo.js +15 -0
  205. package/data/build/dist/client/mobile-sidebar-logo.js.map +1 -0
  206. package/data/build/dist/client/mobile-sidebar-rail-dom.d.ts +114 -0
  207. package/data/build/dist/client/mobile-sidebar-rail-dom.d.ts.map +1 -0
  208. package/data/build/dist/client/mobile-sidebar-rail-dom.js +452 -0
  209. package/data/build/dist/client/mobile-sidebar-rail-dom.js.map +1 -0
  210. package/data/build/dist/client/mobile-vibration.d.ts +16 -0
  211. package/data/build/dist/client/mobile-vibration.d.ts.map +1 -0
  212. package/data/build/dist/client/mobile-vibration.js +20 -0
  213. package/data/build/dist/client/mobile-vibration.js.map +1 -0
  214. package/data/build/dist/client/native-workspace-store.d.ts +29 -0
  215. package/data/build/dist/client/native-workspace-store.d.ts.map +1 -0
  216. package/data/build/dist/client/native-workspace-store.js +64 -0
  217. package/data/build/dist/client/native-workspace-store.js.map +1 -0
  218. package/data/build/dist/client/peer-host-aggregate-refresh.d.ts +13 -0
  219. package/data/build/dist/client/peer-host-aggregate-refresh.d.ts.map +1 -0
  220. package/data/build/dist/client/peer-host-aggregate-refresh.js +14 -0
  221. package/data/build/dist/client/peer-host-aggregate-refresh.js.map +1 -0
  222. package/data/build/dist/client/peer-host-color.d.ts +13 -0
  223. package/data/build/dist/client/peer-host-color.d.ts.map +1 -0
  224. package/data/build/dist/client/peer-host-color.js +57 -0
  225. package/data/build/dist/client/peer-host-color.js.map +1 -0
  226. package/data/build/dist/client/peer-host-connection-button.d.ts +14 -1
  227. package/data/build/dist/client/peer-host-connection-button.d.ts.map +1 -0
  228. package/data/build/dist/client/peer-host-connection-button.js +18 -7
  229. package/data/build/dist/client/peer-host-connection-button.js.map +1 -0
  230. package/data/build/dist/client/peer-host-management-api.d.ts +34 -0
  231. package/data/build/dist/client/peer-host-management-api.d.ts.map +1 -0
  232. package/data/build/dist/client/peer-host-management-api.js +12 -0
  233. package/data/build/dist/client/peer-host-management-api.js.map +1 -0
  234. package/data/build/dist/client/peer-host-management-panel.d.ts +4 -1
  235. package/data/build/dist/client/peer-host-management-panel.d.ts.map +1 -0
  236. package/data/build/dist/client/peer-host-management-panel.js +533 -94
  237. package/data/build/dist/client/peer-host-management-panel.js.map +1 -0
  238. package/data/build/dist/client/peer-host-native-projection.d.ts +47 -0
  239. package/data/build/dist/client/peer-host-native-projection.d.ts.map +1 -0
  240. package/data/build/dist/client/peer-host-native-projection.js +142 -0
  241. package/data/build/dist/client/peer-host-native-projection.js.map +1 -0
  242. package/data/build/dist/client/peer-host-native-store-projection.d.ts +21 -0
  243. package/data/build/dist/client/peer-host-native-store-projection.d.ts.map +1 -0
  244. package/data/build/dist/client/peer-host-native-store-projection.js +114 -0
  245. package/data/build/dist/client/peer-host-native-store-projection.js.map +1 -0
  246. package/data/build/dist/client/peer-host-scoped-client.d.ts.map +1 -0
  247. package/data/build/dist/client/peer-host-scoped-client.js +5 -5
  248. package/data/build/dist/client/peer-host-scoped-client.js.map +1 -0
  249. package/data/build/dist/client/peer-host-session-controller.d.ts.map +1 -0
  250. package/data/build/dist/client/peer-host-session-controller.js.map +1 -0
  251. package/data/build/dist/client/peer-host-workspace-tab.d.ts +52 -0
  252. package/data/build/dist/client/peer-host-workspace-tab.d.ts.map +1 -0
  253. package/data/build/dist/client/peer-host-workspace-tab.js +492 -0
  254. package/data/build/dist/client/peer-host-workspace-tab.js.map +1 -0
  255. package/data/build/dist/client/peer-host-workspace-tag.d.ts +47 -0
  256. package/data/build/dist/client/peer-host-workspace-tag.d.ts.map +1 -0
  257. package/data/build/dist/client/peer-host-workspace-tag.js +207 -0
  258. package/data/build/dist/client/peer-host-workspace-tag.js.map +1 -0
  259. package/data/build/dist/client/popup-dismiss.d.ts +48 -0
  260. package/data/build/dist/client/popup-dismiss.d.ts.map +1 -0
  261. package/data/build/dist/client/popup-dismiss.js +93 -0
  262. package/data/build/dist/client/popup-dismiss.js.map +1 -0
  263. package/data/build/dist/client/provider-icon-assets.d.ts.map +1 -0
  264. package/data/build/dist/client/provider-icon-assets.js +4 -0
  265. package/data/build/dist/client/provider-icon-assets.js.map +1 -0
  266. package/data/build/dist/client/provider-icons.d.ts +18 -3
  267. package/data/build/dist/client/provider-icons.d.ts.map +1 -0
  268. package/data/build/dist/client/provider-icons.js +30 -14
  269. package/data/build/dist/client/provider-icons.js.map +1 -0
  270. package/data/build/dist/client/pwa-install-prompt.d.ts +76 -0
  271. package/data/build/dist/client/pwa-install-prompt.d.ts.map +1 -0
  272. package/data/build/dist/client/pwa-install-prompt.js +179 -0
  273. package/data/build/dist/client/pwa-install-prompt.js.map +1 -0
  274. package/data/build/dist/client/pwa-notifications.d.ts +105 -0
  275. package/data/build/dist/client/pwa-notifications.d.ts.map +1 -0
  276. package/data/build/dist/client/pwa-notifications.js +192 -0
  277. package/data/build/dist/client/pwa-notifications.js.map +1 -0
  278. package/data/build/dist/client/quick-phrase-layout.d.ts +11 -0
  279. package/data/build/dist/client/quick-phrase-layout.d.ts.map +1 -0
  280. package/data/build/dist/client/quick-phrase-layout.js +20 -0
  281. package/data/build/dist/client/quick-phrase-layout.js.map +1 -0
  282. package/data/build/dist/client/quick-phrase-slot.d.ts.map +1 -0
  283. package/data/build/dist/client/quick-phrase-slot.js +20 -8
  284. package/data/build/dist/client/quick-phrase-slot.js.map +1 -0
  285. package/data/build/dist/client/remote-web-context.d.ts.map +1 -0
  286. package/data/build/dist/client/remote-web-context.js.map +1 -0
  287. package/data/build/dist/client/session-adapter-cache.d.ts.map +1 -0
  288. package/data/build/dist/client/session-adapter-cache.js.map +1 -0
  289. package/data/build/dist/client/session-changed-files-view.d.ts +8 -1
  290. package/data/build/dist/client/session-changed-files-view.d.ts.map +1 -0
  291. package/data/build/dist/client/session-changed-files-view.js +71 -28
  292. package/data/build/dist/client/session-changed-files-view.js.map +1 -0
  293. package/data/build/dist/client/settings-anchor.d.ts +73 -0
  294. package/data/build/dist/client/settings-anchor.d.ts.map +1 -0
  295. package/data/build/dist/client/settings-anchor.js +70 -0
  296. package/data/build/dist/client/settings-anchor.js.map +1 -0
  297. package/data/build/dist/client/settings-bridge.d.ts.map +1 -0
  298. package/data/build/dist/client/settings-bridge.js.map +1 -0
  299. package/data/build/dist/client/settings-section.d.ts.map +1 -0
  300. package/data/build/dist/client/settings-section.js +19 -5
  301. package/data/build/dist/client/settings-section.js.map +1 -0
  302. package/data/build/dist/client/subscription-slot.d.ts +4 -1
  303. package/data/build/dist/client/subscription-slot.d.ts.map +1 -0
  304. package/data/build/dist/client/subscription-slot.js +328 -69
  305. package/data/build/dist/client/subscription-slot.js.map +1 -0
  306. package/data/build/dist/client/terminal/index.d.ts.map +1 -0
  307. package/data/build/dist/client/terminal/index.js.map +1 -0
  308. package/data/build/dist/client/terminal/model.d.ts +13 -2
  309. package/data/build/dist/client/terminal/model.d.ts.map +1 -0
  310. package/data/build/dist/client/terminal/model.js +27 -7
  311. package/data/build/dist/client/terminal/model.js.map +1 -0
  312. package/data/build/dist/client/terminal/recovery.d.ts.map +1 -0
  313. package/data/build/dist/client/terminal/recovery.js.map +1 -0
  314. package/data/build/dist/client/terminal/styles.d.ts.map +1 -0
  315. package/data/build/dist/client/terminal/styles.js.map +1 -0
  316. package/data/build/dist/client/terminal/ui.d.ts.map +1 -0
  317. package/data/build/dist/client/terminal/ui.js +3 -1
  318. package/data/build/dist/client/terminal/ui.js.map +1 -0
  319. package/data/build/dist/client/terminal/xterm-view.d.ts +4 -1
  320. package/data/build/dist/client/terminal/xterm-view.d.ts.map +1 -0
  321. package/data/build/dist/client/terminal/xterm-view.js +19 -17
  322. package/data/build/dist/client/terminal/xterm-view.js.map +1 -0
  323. package/data/build/dist/client/theme.d.ts +17 -5
  324. package/data/build/dist/client/theme.d.ts.map +1 -0
  325. package/data/build/dist/client/theme.js +35 -13
  326. package/data/build/dist/client/theme.js.map +1 -0
  327. package/data/build/dist/client/workspace-session-archive-dom.d.ts +17 -0
  328. package/data/build/dist/client/workspace-session-archive-dom.d.ts.map +1 -0
  329. package/data/build/dist/client/workspace-session-archive-dom.js +192 -47
  330. package/data/build/dist/client/workspace-session-archive-dom.js.map +1 -0
  331. package/data/build/dist/client/workspace-session-fiber.d.ts.map +1 -0
  332. package/data/build/dist/client/workspace-session-fiber.js.map +1 -0
  333. package/data/build/dist/client/workspace-session-logo-dom.d.ts +3 -0
  334. package/data/build/dist/client/workspace-session-logo-dom.d.ts.map +1 -0
  335. package/data/build/dist/client/workspace-session-logo-dom.js +3 -1
  336. package/data/build/dist/client/workspace-session-logo-dom.js.map +1 -0
  337. package/data/build/dist/client/workspace-session-rightbar-dom.d.ts.map +1 -0
  338. package/data/build/dist/client/workspace-session-rightbar-dom.js.map +1 -0
  339. package/data/build/dist/client/workspace-session-visibility-dom.d.ts +3 -0
  340. package/data/build/dist/client/workspace-session-visibility-dom.d.ts.map +1 -0
  341. package/data/build/dist/client/workspace-session-visibility-dom.js +46 -17
  342. package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -0
  343. package/data/build/dist/dsh-capabilities/client/config-forms-adapter.d.ts.map +1 -0
  344. package/data/build/dist/dsh-capabilities/client/config-forms-adapter.js.map +1 -0
  345. package/data/build/dist/dsh-capabilities/client/conversation-adapter.d.ts.map +1 -0
  346. package/data/build/dist/dsh-capabilities/client/conversation-adapter.js.map +1 -0
  347. package/data/build/dist/dsh-capabilities/client/locale-adapter.d.ts.map +1 -0
  348. package/data/build/dist/dsh-capabilities/client/locale-adapter.js.map +1 -0
  349. package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +10 -0
  350. package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts.map +1 -0
  351. package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +20 -0
  352. package/data/build/dist/dsh-capabilities/client/primitives-adapter.js.map +1 -0
  353. package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.d.ts.map +1 -0
  354. package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.js.map +1 -0
  355. package/data/build/dist/dsh-capabilities/client/sidebar-adapter.d.ts.map +1 -0
  356. package/data/build/dist/dsh-capabilities/client/sidebar-adapter.js.map +1 -0
  357. package/data/build/dist/dsh-capabilities/client/theme-adapter.d.ts.map +1 -0
  358. package/data/build/dist/dsh-capabilities/client/theme-adapter.js.map +1 -0
  359. package/data/build/dist/dsh-capabilities/client/typert-adapter.d.ts.map +1 -0
  360. package/data/build/dist/dsh-capabilities/client/typert-adapter.js.map +1 -0
  361. package/data/build/dist/dsh-capabilities/host/config-forms-adapter.d.ts.map +1 -0
  362. package/data/build/dist/dsh-capabilities/host/config-forms-adapter.js.map +1 -0
  363. package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.d.ts.map +1 -0
  364. package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.js.map +1 -0
  365. package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.d.ts.map +1 -0
  366. package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.js.map +1 -0
  367. package/data/build/dist/dsh-capabilities/host/typert-adapter.d.ts.map +1 -0
  368. package/data/build/dist/dsh-capabilities/host/typert-adapter.js.map +1 -0
  369. package/data/build/dist/dsh-capabilities/index.d.ts.map +1 -0
  370. package/data/build/dist/dsh-capabilities/index.js.map +1 -0
  371. package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -0
  372. package/data/build/dist/dsh-capabilities/matrix.js +44 -31
  373. package/data/build/dist/dsh-capabilities/matrix.js.map +1 -0
  374. package/data/build/dist/dsh-capabilities/registry.d.ts.map +1 -0
  375. package/data/build/dist/dsh-capabilities/registry.js +6 -2
  376. package/data/build/dist/dsh-capabilities/registry.js.map +1 -0
  377. package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -0
  378. package/data/build/dist/dsh-capabilities/routes.js +96 -11
  379. package/data/build/dist/dsh-capabilities/routes.js.map +1 -0
  380. package/data/build/dist/dsh-capabilities/settings-store.d.ts.map +1 -0
  381. package/data/build/dist/dsh-capabilities/settings-store.js.map +1 -0
  382. package/data/build/dist/dsh-capabilities/types.d.ts +1 -1
  383. package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -0
  384. package/data/build/dist/dsh-capabilities/types.js.map +1 -0
  385. package/data/build/dist/features/host-router.d.ts.map +1 -0
  386. package/data/build/dist/features/host-router.js.map +1 -0
  387. package/data/build/dist/features/index.d.ts.map +1 -0
  388. package/data/build/dist/features/index.js.map +1 -0
  389. package/data/build/dist/features/registry.d.ts.map +1 -0
  390. package/data/build/dist/features/registry.js.map +1 -0
  391. package/data/build/dist/features/resource-scope/index.d.ts.map +1 -0
  392. package/data/build/dist/features/resource-scope/index.js.map +1 -0
  393. package/data/build/dist/host/auth-session.d.ts.map +1 -0
  394. package/data/build/dist/host/auth-session.js.map +1 -0
  395. package/data/build/dist/host/browser-text.d.ts +30 -0
  396. package/data/build/dist/host/browser-text.d.ts.map +1 -0
  397. package/data/build/dist/host/browser-text.js +105 -0
  398. package/data/build/dist/host/browser-text.js.map +1 -0
  399. package/data/build/dist/host/cli-adapters/attachment-utils.d.ts +14 -0
  400. package/data/build/dist/host/cli-adapters/attachment-utils.d.ts.map +1 -0
  401. package/data/build/dist/host/cli-adapters/attachment-utils.js +78 -0
  402. package/data/build/dist/host/cli-adapters/attachment-utils.js.map +1 -0
  403. package/data/build/dist/host/cli-adapters/claude-driver.d.ts +28 -2
  404. package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -0
  405. package/data/build/dist/host/cli-adapters/claude-driver.js +78 -5
  406. package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -0
  407. package/data/build/dist/host/cli-adapters/claude-model-options.d.ts.map +1 -0
  408. package/data/build/dist/host/cli-adapters/claude-model-options.js +22 -9
  409. package/data/build/dist/host/cli-adapters/claude-model-options.js.map +1 -0
  410. package/data/build/dist/host/cli-adapters/codex-driver.d.ts +10 -0
  411. package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -0
  412. package/data/build/dist/host/cli-adapters/codex-driver.js +352 -49
  413. package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -0
  414. package/data/build/dist/host/cli-adapters/command-code-driver.d.ts +24 -2
  415. package/data/build/dist/host/cli-adapters/command-code-driver.d.ts.map +1 -0
  416. package/data/build/dist/host/cli-adapters/command-code-driver.js +296 -34
  417. package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -0
  418. package/data/build/dist/host/cli-adapters/command-code-subscription.d.ts.map +1 -0
  419. package/data/build/dist/host/cli-adapters/command-code-subscription.js.map +1 -0
  420. package/data/build/dist/host/cli-adapters/delegate-dispatch.d.ts +47 -0
  421. package/data/build/dist/host/cli-adapters/delegate-dispatch.d.ts.map +1 -0
  422. package/data/build/dist/host/cli-adapters/delegate-dispatch.js +158 -0
  423. package/data/build/dist/host/cli-adapters/delegate-dispatch.js.map +1 -0
  424. package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts +32 -0
  425. package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts.map +1 -0
  426. package/data/build/dist/host/cli-adapters/desktop-app-runtime.js +121 -0
  427. package/data/build/dist/host/cli-adapters/desktop-app-runtime.js.map +1 -0
  428. package/data/build/dist/host/cli-adapters/driver.d.ts.map +1 -0
  429. package/data/build/dist/host/cli-adapters/driver.js.map +1 -0
  430. package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -0
  431. package/data/build/dist/host/cli-adapters/dsh-message-projector.js +5 -4
  432. package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -0
  433. package/data/build/dist/host/cli-adapters/dsh-tool-history.d.ts.map +1 -0
  434. package/data/build/dist/host/cli-adapters/dsh-tool-history.js +49 -1
  435. package/data/build/dist/host/cli-adapters/dsh-tool-history.js.map +1 -0
  436. package/data/build/dist/host/cli-adapters/dsh-virtual-providers.d.ts +16 -0
  437. package/data/build/dist/host/cli-adapters/dsh-virtual-providers.d.ts.map +1 -0
  438. package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js +73 -0
  439. package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js.map +1 -0
  440. package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -0
  441. package/data/build/dist/host/cli-adapters/feature.js +348 -19
  442. package/data/build/dist/host/cli-adapters/feature.js.map +1 -0
  443. package/data/build/dist/host/cli-adapters/gemini-driver.d.ts.map +1 -0
  444. package/data/build/dist/host/cli-adapters/gemini-driver.js +27 -8
  445. package/data/build/dist/host/cli-adapters/gemini-driver.js.map +1 -0
  446. package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -0
  447. package/data/build/dist/host/cli-adapters/grok-driver.js +27 -9
  448. package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -0
  449. package/data/build/dist/host/cli-adapters/http-sse-client.d.ts.map +1 -0
  450. package/data/build/dist/host/cli-adapters/http-sse-client.js.map +1 -0
  451. package/data/build/dist/host/cli-adapters/interaction-events.d.ts.map +1 -0
  452. package/data/build/dist/host/cli-adapters/interaction-events.js.map +1 -0
  453. package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts +22 -6
  454. package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts.map +1 -0
  455. package/data/build/dist/host/cli-adapters/json-rpc-process.js +118 -21
  456. package/data/build/dist/host/cli-adapters/json-rpc-process.js.map +1 -0
  457. package/data/build/dist/host/cli-adapters/kimi-driver.d.ts.map +1 -0
  458. package/data/build/dist/host/cli-adapters/kimi-driver.js +33 -7
  459. package/data/build/dist/host/cli-adapters/kimi-driver.js.map +1 -0
  460. package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts +11 -2
  461. package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts.map +1 -0
  462. package/data/build/dist/host/cli-adapters/legacy-session-adapter.js +15 -6
  463. package/data/build/dist/host/cli-adapters/legacy-session-adapter.js.map +1 -0
  464. package/data/build/dist/host/cli-adapters/legacy-session-settings.d.ts.map +1 -0
  465. package/data/build/dist/host/cli-adapters/legacy-session-settings.js.map +1 -0
  466. package/data/build/dist/host/cli-adapters/mcode-catalog.d.ts +23 -0
  467. package/data/build/dist/host/cli-adapters/mcode-catalog.d.ts.map +1 -0
  468. package/data/build/dist/host/cli-adapters/mcode-catalog.js +120 -0
  469. package/data/build/dist/host/cli-adapters/mcode-catalog.js.map +1 -0
  470. package/data/build/dist/host/cli-adapters/mcode-driver.d.ts +56 -0
  471. package/data/build/dist/host/cli-adapters/mcode-driver.d.ts.map +1 -0
  472. package/data/build/dist/host/cli-adapters/mcode-driver.js +544 -0
  473. package/data/build/dist/host/cli-adapters/mcode-driver.js.map +1 -0
  474. package/data/build/dist/host/cli-adapters/model-catalog.d.ts +30 -5
  475. package/data/build/dist/host/cli-adapters/model-catalog.d.ts.map +1 -0
  476. package/data/build/dist/host/cli-adapters/model-catalog.js +83 -8
  477. package/data/build/dist/host/cli-adapters/model-catalog.js.map +1 -0
  478. package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts +51 -0
  479. package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts.map +1 -0
  480. package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js +193 -0
  481. package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js.map +1 -0
  482. package/data/build/dist/host/cli-adapters/native-subagent-holder.d.ts +4 -0
  483. package/data/build/dist/host/cli-adapters/native-subagent-holder.d.ts.map +1 -0
  484. package/data/build/dist/host/cli-adapters/native-subagent-holder.js +4 -0
  485. package/data/build/dist/host/cli-adapters/native-subagent-holder.js.map +1 -0
  486. package/data/build/dist/host/cli-adapters/native-team-proxy.d.ts.map +1 -0
  487. package/data/build/dist/host/cli-adapters/native-team-proxy.js +18 -15
  488. package/data/build/dist/host/cli-adapters/native-team-proxy.js.map +1 -0
  489. package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts +45 -0
  490. package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts.map +1 -0
  491. package/data/build/dist/host/cli-adapters/native-team-subagent.js +107 -0
  492. package/data/build/dist/host/cli-adapters/native-team-subagent.js.map +1 -0
  493. package/data/build/dist/host/cli-adapters/official-provider-subscription.d.ts.map +1 -0
  494. package/data/build/dist/host/cli-adapters/official-provider-subscription.js.map +1 -0
  495. package/data/build/dist/host/cli-adapters/opencode-driver.d.ts.map +1 -0
  496. package/data/build/dist/host/cli-adapters/opencode-driver.js +20 -4
  497. package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -0
  498. package/data/build/dist/host/cli-adapters/pi-driver.d.ts.map +1 -0
  499. package/data/build/dist/host/cli-adapters/pi-driver.js +30 -8
  500. package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -0
  501. package/data/build/dist/host/cli-adapters/process-utils.d.ts.map +1 -0
  502. package/data/build/dist/host/cli-adapters/process-utils.js.map +1 -0
  503. package/data/build/dist/host/cli-adapters/provider-registry.d.ts.map +1 -0
  504. package/data/build/dist/host/cli-adapters/provider-registry.js.map +1 -0
  505. package/data/build/dist/host/cli-adapters/provider-subscription.d.ts +8 -1
  506. package/data/build/dist/host/cli-adapters/provider-subscription.d.ts.map +1 -0
  507. package/data/build/dist/host/cli-adapters/provider-subscription.js +98 -2
  508. package/data/build/dist/host/cli-adapters/provider-subscription.js.map +1 -0
  509. package/data/build/dist/host/cli-adapters/registry-holder.d.ts +4 -0
  510. package/data/build/dist/host/cli-adapters/registry-holder.d.ts.map +1 -0
  511. package/data/build/dist/host/cli-adapters/registry-holder.js +9 -0
  512. package/data/build/dist/host/cli-adapters/registry-holder.js.map +1 -0
  513. package/data/build/dist/host/cli-adapters/registry.d.ts +13 -0
  514. package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -0
  515. package/data/build/dist/host/cli-adapters/registry.js +37 -0
  516. package/data/build/dist/host/cli-adapters/registry.js.map +1 -0
  517. package/data/build/dist/host/cli-adapters/rpc-driver-utils.d.ts.map +1 -0
  518. package/data/build/dist/host/cli-adapters/rpc-driver-utils.js.map +1 -0
  519. package/data/build/dist/host/cli-adapters/session-probe.d.ts.map +1 -0
  520. package/data/build/dist/host/cli-adapters/session-probe.js.map +1 -0
  521. package/data/build/dist/host/cli-adapters/session-store.d.ts +6 -1
  522. package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -0
  523. package/data/build/dist/host/cli-adapters/session-store.js +42 -4
  524. package/data/build/dist/host/cli-adapters/session-store.js.map +1 -0
  525. package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts +2 -0
  526. package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts.map +1 -0
  527. package/data/build/dist/host/cli-adapters/standard-stream-driver.js +30 -4
  528. package/data/build/dist/host/cli-adapters/standard-stream-driver.js.map +1 -0
  529. package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts.map +1 -0
  530. package/data/build/dist/host/cli-adapters/stream-normalizer.js.map +1 -0
  531. package/data/build/dist/host/cli-adapters/subagent-tool.d.ts +5 -0
  532. package/data/build/dist/host/cli-adapters/subagent-tool.d.ts.map +1 -0
  533. package/data/build/dist/host/cli-adapters/subagent-tool.js +66 -0
  534. package/data/build/dist/host/cli-adapters/subagent-tool.js.map +1 -0
  535. package/data/build/dist/host/cli-adapters/tool-observation.d.ts.map +1 -0
  536. package/data/build/dist/host/cli-adapters/tool-observation.js.map +1 -0
  537. package/data/build/dist/host/cli-adapters/zcode-driver.d.ts +57 -0
  538. package/data/build/dist/host/cli-adapters/zcode-driver.d.ts.map +1 -0
  539. package/data/build/dist/host/cli-adapters/zcode-driver.js +843 -0
  540. package/data/build/dist/host/cli-adapters/zcode-driver.js.map +1 -0
  541. package/data/build/dist/host/cli-adapters/zcode-subscription.d.ts +28 -0
  542. package/data/build/dist/host/cli-adapters/zcode-subscription.d.ts.map +1 -0
  543. package/data/build/dist/host/cli-adapters/zcode-subscription.js +212 -0
  544. package/data/build/dist/host/cli-adapters/zcode-subscription.js.map +1 -0
  545. package/data/build/dist/host/cli-bridge/bridge-holder.d.ts +27 -0
  546. package/data/build/dist/host/cli-bridge/bridge-holder.d.ts.map +1 -0
  547. package/data/build/dist/host/cli-bridge/bridge-holder.js +51 -0
  548. package/data/build/dist/host/cli-bridge/bridge-holder.js.map +1 -0
  549. package/data/build/dist/host/cli-bridge/bridge-server.d.ts +34 -0
  550. package/data/build/dist/host/cli-bridge/bridge-server.d.ts.map +1 -0
  551. package/data/build/dist/host/cli-bridge/bridge-server.js +135 -0
  552. package/data/build/dist/host/cli-bridge/bridge-server.js.map +1 -0
  553. package/data/build/dist/host/cli-bridge/command-code-mod.d.ts +25 -0
  554. package/data/build/dist/host/cli-bridge/command-code-mod.d.ts.map +1 -0
  555. package/data/build/dist/host/cli-bridge/command-code-mod.js +60 -0
  556. package/data/build/dist/host/cli-bridge/command-code-mod.js.map +1 -0
  557. package/data/build/dist/host/cli-bridge/dispatch.d.ts +19 -0
  558. package/data/build/dist/host/cli-bridge/dispatch.d.ts.map +1 -0
  559. package/data/build/dist/host/cli-bridge/dispatch.js +90 -0
  560. package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -0
  561. package/data/build/dist/host/cli-bridge/injections.d.ts +28 -0
  562. package/data/build/dist/host/cli-bridge/injections.d.ts.map +1 -0
  563. package/data/build/dist/host/cli-bridge/injections.js +131 -0
  564. package/data/build/dist/host/cli-bridge/injections.js.map +1 -0
  565. package/data/build/dist/host/cli-bridge/mcp-stdio-entry.d.ts +8 -0
  566. package/data/build/dist/host/cli-bridge/mcp-stdio-entry.d.ts.map +1 -0
  567. package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js +151 -0
  568. package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js.map +1 -0
  569. package/data/build/dist/host/control-api-client.d.ts.map +1 -0
  570. package/data/build/dist/host/control-api-client.js.map +1 -0
  571. package/data/build/dist/host/credential-store.d.ts.map +1 -0
  572. package/data/build/dist/host/credential-store.js.map +1 -0
  573. package/data/build/dist/host/debug.d.ts.map +1 -0
  574. package/data/build/dist/host/debug.js.map +1 -0
  575. package/data/build/dist/host/dsh-device-runtime.d.ts.map +1 -0
  576. package/data/build/dist/host/dsh-device-runtime.js.map +1 -0
  577. package/data/build/dist/host/dsh-gateway-feature.d.ts.map +1 -0
  578. package/data/build/dist/host/dsh-gateway-feature.js.map +1 -0
  579. package/data/build/dist/host/dsh-runtime-version.d.ts.map +1 -0
  580. package/data/build/dist/host/dsh-runtime-version.js.map +1 -0
  581. package/data/build/dist/host/features/auth.d.ts.map +1 -0
  582. package/data/build/dist/host/features/auth.js.map +1 -0
  583. package/data/build/dist/host/features/debug.d.ts.map +1 -0
  584. package/data/build/dist/host/features/debug.js.map +1 -0
  585. package/data/build/dist/host/features/file-management.d.ts.map +1 -0
  586. package/data/build/dist/host/features/file-management.js.map +1 -0
  587. package/data/build/dist/host/features/git-management.d.ts.map +1 -0
  588. package/data/build/dist/host/features/git-management.js +97 -10
  589. package/data/build/dist/host/features/git-management.js.map +1 -0
  590. package/data/build/dist/host/features/host-status.d.ts.map +1 -0
  591. package/data/build/dist/host/features/host-status.js.map +1 -0
  592. package/data/build/dist/host/features/index.d.ts.map +1 -0
  593. package/data/build/dist/host/features/index.js.map +1 -0
  594. package/data/build/dist/host/features/lan-access-dsh.d.ts.map +1 -0
  595. package/data/build/dist/host/features/lan-access-dsh.js +34 -1
  596. package/data/build/dist/host/features/lan-access-dsh.js.map +1 -0
  597. package/data/build/dist/host/features/peer-host.d.ts.map +1 -0
  598. package/data/build/dist/host/features/peer-host.js +341 -20
  599. package/data/build/dist/host/features/peer-host.js.map +1 -0
  600. package/data/build/dist/host/features/terminal-process.d.ts.map +1 -0
  601. package/data/build/dist/host/features/terminal-process.js.map +1 -0
  602. package/data/build/dist/host/features/terminal-status.d.ts.map +1 -0
  603. package/data/build/dist/host/features/terminal-status.js.map +1 -0
  604. package/data/build/dist/host/features/types.d.ts +3 -0
  605. package/data/build/dist/host/features/types.d.ts.map +1 -0
  606. package/data/build/dist/host/features/types.js.map +1 -0
  607. package/data/build/dist/host/host-router.d.ts.map +1 -0
  608. package/data/build/dist/host/host-router.js.map +1 -0
  609. package/data/build/dist/host/index-injection.d.ts +15 -0
  610. package/data/build/dist/host/index-injection.d.ts.map +1 -0
  611. package/data/build/dist/host/index-injection.js +45 -0
  612. package/data/build/dist/host/index-injection.js.map +1 -0
  613. package/data/build/dist/host/index.d.ts +12 -2
  614. package/data/build/dist/host/index.d.ts.map +1 -0
  615. package/data/build/dist/host/index.js +75 -3
  616. package/data/build/dist/host/index.js.map +1 -0
  617. package/data/build/dist/host/lan-access-dsh.d.ts +93 -2
  618. package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -0
  619. package/data/build/dist/host/lan-access-dsh.js +438 -27
  620. package/data/build/dist/host/lan-access-dsh.js.map +1 -0
  621. package/data/build/dist/host/login-attempt-guard.d.ts +55 -0
  622. package/data/build/dist/host/login-attempt-guard.d.ts.map +1 -0
  623. package/data/build/dist/host/login-attempt-guard.js +201 -0
  624. package/data/build/dist/host/login-attempt-guard.js.map +1 -0
  625. package/data/build/dist/host/modules/peer-host/aggregated-host-transport.d.ts +146 -0
  626. package/data/build/dist/host/modules/peer-host/aggregated-host-transport.d.ts.map +1 -0
  627. package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js +322 -0
  628. package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js.map +1 -0
  629. package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.d.ts +8 -0
  630. package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.d.ts.map +1 -0
  631. package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.js +120 -0
  632. package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.js.map +1 -0
  633. package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts +25 -0
  634. package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts.map +1 -0
  635. package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js +26 -3
  636. package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js.map +1 -0
  637. package/data/build/dist/host/modules/peer-host/host-ws-connector.d.ts.map +1 -0
  638. package/data/build/dist/host/modules/peer-host/host-ws-connector.js.map +1 -0
  639. package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.d.ts.map +1 -0
  640. package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.js.map +1 -0
  641. package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts +10 -0
  642. package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts.map +1 -0
  643. package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js +27 -12
  644. package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js.map +1 -0
  645. package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.d.ts.map +1 -0
  646. package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js +3 -0
  647. package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js.map +1 -0
  648. package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts +2 -0
  649. package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts.map +1 -0
  650. package/data/build/dist/host/modules/peer-host/peer-host-handshake.js +6 -0
  651. package/data/build/dist/host/modules/peer-host/peer-host-handshake.js.map +1 -0
  652. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts +17 -0
  653. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts.map +1 -0
  654. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js +52 -0
  655. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js.map +1 -0
  656. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts +25 -0
  657. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts.map +1 -0
  658. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js +187 -0
  659. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js.map +1 -0
  660. package/data/build/dist/host/modules/peer-host/peer-host-native-transport.d.ts +30 -0
  661. package/data/build/dist/host/modules/peer-host/peer-host-native-transport.d.ts.map +1 -0
  662. package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js +120 -0
  663. package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js.map +1 -0
  664. package/data/build/dist/host/modules/peer-host/peer-host-relay.d.ts.map +1 -0
  665. package/data/build/dist/host/modules/peer-host/peer-host-relay.js.map +1 -0
  666. package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.d.ts +60 -0
  667. package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.d.ts.map +1 -0
  668. package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js +181 -0
  669. package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js.map +1 -0
  670. package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts +20 -1
  671. package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts.map +1 -0
  672. package/data/build/dist/host/modules/peer-host/peer-host-session.js +118 -37
  673. package/data/build/dist/host/modules/peer-host/peer-host-session.js.map +1 -0
  674. package/data/build/dist/host/modules/peer-host/peer-host-store.d.ts +21 -0
  675. package/data/build/dist/host/modules/peer-host/peer-host-store.d.ts.map +1 -0
  676. package/data/build/dist/host/modules/peer-host/peer-host-store.js +65 -3
  677. package/data/build/dist/host/modules/peer-host/peer-host-store.js.map +1 -0
  678. package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts +49 -0
  679. package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts.map +1 -0
  680. package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js +174 -0
  681. package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js.map +1 -0
  682. package/data/build/dist/host/modules/peer-host/peer-host-ws-gateway.d.ts.map +1 -0
  683. package/data/build/dist/host/modules/peer-host/peer-host-ws-gateway.js.map +1 -0
  684. package/data/build/dist/host/modules/pwa/index.d.ts +7 -0
  685. package/data/build/dist/host/modules/pwa/index.d.ts.map +1 -0
  686. package/data/build/dist/host/modules/pwa/index.js +7 -0
  687. package/data/build/dist/host/modules/pwa/index.js.map +1 -0
  688. package/data/build/dist/host/modules/pwa/pwa-assets.d.ts +50 -0
  689. package/data/build/dist/host/modules/pwa/pwa-assets.d.ts.map +1 -0
  690. package/data/build/dist/host/modules/pwa/pwa-assets.js +182 -0
  691. package/data/build/dist/host/modules/pwa/pwa-assets.js.map +1 -0
  692. package/data/build/dist/host/modules/pwa/pwa-client-script.d.ts +10 -0
  693. package/data/build/dist/host/modules/pwa/pwa-client-script.d.ts.map +1 -0
  694. package/data/build/dist/host/modules/pwa/pwa-client-script.js +38 -0
  695. package/data/build/dist/host/modules/pwa/pwa-client-script.js.map +1 -0
  696. package/data/build/dist/host/modules/pwa/pwa-icons.d.ts +10 -0
  697. package/data/build/dist/host/modules/pwa/pwa-icons.d.ts.map +1 -0
  698. package/data/build/dist/host/modules/pwa/pwa-icons.js +185 -0
  699. package/data/build/dist/host/modules/pwa/pwa-icons.js.map +1 -0
  700. package/data/build/dist/host/modules/pwa/pwa-push.d.ts +74 -0
  701. package/data/build/dist/host/modules/pwa/pwa-push.d.ts.map +1 -0
  702. package/data/build/dist/host/modules/pwa/pwa-push.js +288 -0
  703. package/data/build/dist/host/modules/pwa/pwa-push.js.map +1 -0
  704. package/data/build/dist/host/modules/pwa/pwa-session-notifications.d.ts +17 -0
  705. package/data/build/dist/host/modules/pwa/pwa-session-notifications.d.ts.map +1 -0
  706. package/data/build/dist/host/modules/pwa/pwa-session-notifications.js +82 -0
  707. package/data/build/dist/host/modules/pwa/pwa-session-notifications.js.map +1 -0
  708. package/data/build/dist/host/modules/pwa/pwa-viewport.d.ts +12 -0
  709. package/data/build/dist/host/modules/pwa/pwa-viewport.d.ts.map +1 -0
  710. package/data/build/dist/host/modules/pwa/pwa-viewport.js +47 -0
  711. package/data/build/dist/host/modules/pwa/pwa-viewport.js.map +1 -0
  712. package/data/build/dist/host/native-session-bridge.d.ts.map +1 -0
  713. package/data/build/dist/host/native-session-bridge.js +86 -55
  714. package/data/build/dist/host/native-session-bridge.js.map +1 -0
  715. package/data/build/dist/host/relay-tunnel-runtime.d.ts +33 -0
  716. package/data/build/dist/host/relay-tunnel-runtime.d.ts.map +1 -0
  717. package/data/build/dist/host/relay-tunnel-runtime.js +71 -19
  718. package/data/build/dist/host/relay-tunnel-runtime.js.map +1 -0
  719. package/data/build/dist/host/remote-web-runtime.d.ts.map +1 -0
  720. package/data/build/dist/host/remote-web-runtime.js.map +1 -0
  721. package/data/build/dist/host/rpc-table.d.ts.map +1 -0
  722. package/data/build/dist/host/rpc-table.js.map +1 -0
  723. package/data/build/dist/host/rpc.d.ts.map +1 -0
  724. package/data/build/dist/host/rpc.js +21 -6
  725. package/data/build/dist/host/rpc.js.map +1 -0
  726. package/data/build/dist/host/session-changes.d.ts.map +1 -0
  727. package/data/build/dist/host/session-changes.js.map +1 -0
  728. package/data/build/dist/host/session-migration-repair.d.ts.map +1 -0
  729. package/data/build/dist/host/session-migration-repair.js.map +1 -0
  730. package/data/build/dist/host/settings.d.ts.map +1 -0
  731. package/data/build/dist/host/settings.js +33 -1
  732. package/data/build/dist/host/settings.js.map +1 -0
  733. package/data/build/dist/host/terminal/attachment-registry.d.ts.map +1 -0
  734. package/data/build/dist/host/terminal/attachment-registry.js.map +1 -0
  735. package/data/build/dist/host/terminal/backends/conpty-backend.d.ts.map +1 -0
  736. package/data/build/dist/host/terminal/backends/conpty-backend.js.map +1 -0
  737. package/data/build/dist/host/terminal/backends/local-pty-backend.d.ts.map +1 -0
  738. package/data/build/dist/host/terminal/backends/local-pty-backend.js.map +1 -0
  739. package/data/build/dist/host/terminal/backends/tmux-backend.d.ts.map +1 -0
  740. package/data/build/dist/host/terminal/backends/tmux-backend.js.map +1 -0
  741. package/data/build/dist/host/terminal/broker/conpty-broker-client.d.ts.map +1 -0
  742. package/data/build/dist/host/terminal/broker/conpty-broker-client.js.map +1 -0
  743. package/data/build/dist/host/terminal/broker/conpty-broker-process.d.ts.map +1 -0
  744. package/data/build/dist/host/terminal/broker/conpty-broker-process.js.map +1 -0
  745. package/data/build/dist/host/terminal/broker/conpty-broker-protocol.d.ts.map +1 -0
  746. package/data/build/dist/host/terminal/broker/conpty-broker-protocol.js.map +1 -0
  747. package/data/build/dist/host/terminal/controller-factory.d.ts.map +1 -0
  748. package/data/build/dist/host/terminal/controller-factory.js.map +1 -0
  749. package/data/build/dist/host/terminal/index.d.ts.map +1 -0
  750. package/data/build/dist/host/terminal/index.js.map +1 -0
  751. package/data/build/dist/host/terminal/runtime-adapter.d.ts.map +1 -0
  752. package/data/build/dist/host/terminal/runtime-adapter.js.map +1 -0
  753. package/data/build/dist/host/terminal/runtime-manager.d.ts.map +1 -0
  754. package/data/build/dist/host/terminal/runtime-manager.js.map +1 -0
  755. package/data/build/dist/host/terminal/shell-detection.d.ts.map +1 -0
  756. package/data/build/dist/host/terminal/shell-detection.js.map +1 -0
  757. package/data/build/dist/host/terminal/startup.d.ts.map +1 -0
  758. package/data/build/dist/host/terminal/startup.js.map +1 -0
  759. package/data/build/dist/host/terminal/terminal-controller.d.ts.map +1 -0
  760. package/data/build/dist/host/terminal/terminal-controller.js.map +1 -0
  761. package/data/build/dist/host/terminal/terminal-process-service.d.ts.map +1 -0
  762. package/data/build/dist/host/terminal/terminal-process-service.js.map +1 -0
  763. package/data/build/dist/host/terminal/terminal-process-store.d.ts.map +1 -0
  764. package/data/build/dist/host/terminal/terminal-process-store.js.map +1 -0
  765. package/data/build/dist/host/terminal/terminal-service.d.ts.map +1 -0
  766. package/data/build/dist/host/terminal/terminal-service.js.map +1 -0
  767. package/data/build/dist/host/terminal/terminal-store.d.ts.map +1 -0
  768. package/data/build/dist/host/terminal/terminal-store.js.map +1 -0
  769. package/data/build/dist/index.d.ts +2 -2
  770. package/data/build/dist/index.d.ts.map +1 -0
  771. package/data/build/dist/index.js +2 -2
  772. package/data/build/dist/index.js.map +1 -0
  773. package/data/build/dist/shared/contracts/auth.d.ts.map +1 -0
  774. package/data/build/dist/shared/contracts/auth.js.map +1 -0
  775. package/data/build/dist/shared/contracts/cli-adapter.d.ts +35 -0
  776. package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -0
  777. package/data/build/dist/shared/contracts/cli-adapter.js.map +1 -0
  778. package/data/build/dist/shared/contracts/command-code.d.ts.map +1 -0
  779. package/data/build/dist/shared/contracts/command-code.js.map +1 -0
  780. package/data/build/dist/shared/contracts/config.d.ts +89 -0
  781. package/data/build/dist/shared/contracts/config.d.ts.map +1 -0
  782. package/data/build/dist/shared/contracts/config.js +92 -0
  783. package/data/build/dist/shared/contracts/config.js.map +1 -0
  784. package/data/build/dist/shared/contracts/debug-config.d.ts.map +1 -0
  785. package/data/build/dist/shared/contracts/debug-config.js.map +1 -0
  786. package/data/build/dist/shared/contracts/debug.d.ts.map +1 -0
  787. package/data/build/dist/shared/contracts/debug.js.map +1 -0
  788. package/data/build/dist/shared/contracts/dsh-device.d.ts.map +1 -0
  789. package/data/build/dist/shared/contracts/dsh-device.js.map +1 -0
  790. package/data/build/dist/shared/contracts/errors.d.ts +2 -2
  791. package/data/build/dist/shared/contracts/errors.d.ts.map +1 -0
  792. package/data/build/dist/shared/contracts/errors.js.map +1 -0
  793. package/data/build/dist/shared/contracts/feature.d.ts.map +1 -0
  794. package/data/build/dist/shared/contracts/feature.js.map +1 -0
  795. package/data/build/dist/shared/contracts/file-management.d.ts.map +1 -0
  796. package/data/build/dist/shared/contracts/file-management.js.map +1 -0
  797. package/data/build/dist/shared/contracts/git.d.ts +15 -1
  798. package/data/build/dist/shared/contracts/git.d.ts.map +1 -0
  799. package/data/build/dist/shared/contracts/git.js.map +1 -0
  800. package/data/build/dist/shared/contracts/host-status.d.ts.map +1 -0
  801. package/data/build/dist/shared/contracts/host-status.js.map +1 -0
  802. package/data/build/dist/shared/contracts/lan-access-dsh.d.ts +23 -0
  803. package/data/build/dist/shared/contracts/lan-access-dsh.d.ts.map +1 -0
  804. package/data/build/dist/shared/contracts/lan-access-dsh.js.map +1 -0
  805. package/data/build/dist/shared/contracts/peer-host.d.ts +160 -1
  806. package/data/build/dist/shared/contracts/peer-host.d.ts.map +1 -0
  807. package/data/build/dist/shared/contracts/peer-host.js +73 -0
  808. package/data/build/dist/shared/contracts/peer-host.js.map +1 -0
  809. package/data/build/dist/shared/contracts/signaling.d.ts.map +1 -0
  810. package/data/build/dist/shared/contracts/signaling.js.map +1 -0
  811. package/data/build/dist/shared/contracts/subscription.d.ts +15 -0
  812. package/data/build/dist/shared/contracts/subscription.d.ts.map +1 -0
  813. package/data/build/dist/shared/contracts/subscription.js.map +1 -0
  814. package/data/build/dist/shared/contracts/terminal-process.d.ts.map +1 -0
  815. package/data/build/dist/shared/contracts/terminal-process.js.map +1 -0
  816. package/data/build/dist/shared/contracts/terminal.d.ts.map +1 -0
  817. package/data/build/dist/shared/contracts/terminal.js.map +1 -0
  818. package/data/build/dist/shared/contracts/transport.d.ts.map +1 -0
  819. package/data/build/dist/shared/contracts/transport.js.map +1 -0
  820. package/data/build/dist/shared/contracts/version.d.ts +14 -6
  821. package/data/build/dist/shared/contracts/version.d.ts.map +1 -0
  822. package/data/build/dist/shared/contracts/version.js +23 -8
  823. package/data/build/dist/shared/contracts/version.js.map +1 -0
  824. package/data/build/dist/shared/debug.d.ts.map +1 -0
  825. package/data/build/dist/shared/debug.js.map +1 -0
  826. package/data/build/dist/shared/index.d.ts +6 -6
  827. package/data/build/dist/shared/index.d.ts.map +1 -0
  828. package/data/build/dist/shared/index.js +3 -3
  829. package/data/build/dist/shared/index.js.map +1 -0
  830. package/data/build/dist/transport/carrier.d.ts.map +1 -0
  831. package/data/build/dist/transport/carrier.js.map +1 -0
  832. package/data/build/dist/transport/debug.d.ts.map +1 -0
  833. package/data/build/dist/transport/debug.js +2 -0
  834. package/data/build/dist/transport/debug.js.map +1 -0
  835. package/data/build/dist/transport/dsh-envelope.d.ts.map +1 -0
  836. package/data/build/dist/transport/dsh-envelope.js.map +1 -0
  837. package/data/build/dist/transport/dsh-gateway.d.ts.map +1 -0
  838. package/data/build/dist/transport/dsh-gateway.js.map +1 -0
  839. package/data/build/dist/transport/dsh-session.d.ts.map +1 -0
  840. package/data/build/dist/transport/dsh-session.js.map +1 -0
  841. package/data/build/dist/transport/dsh-transport.d.ts.map +1 -0
  842. package/data/build/dist/transport/dsh-transport.js.map +1 -0
  843. package/data/build/dist/transport/frame.d.ts.map +1 -0
  844. package/data/build/dist/transport/frame.js.map +1 -0
  845. package/data/build/dist/transport/index.d.ts +1 -1
  846. package/data/build/dist/transport/index.d.ts.map +1 -0
  847. package/data/build/dist/transport/index.js +1 -1
  848. package/data/build/dist/transport/index.js.map +1 -0
  849. package/data/build/dist/transport/multiplexer.d.ts.map +1 -0
  850. package/data/build/dist/transport/multiplexer.js.map +1 -0
  851. package/data/build/dist/transport/webrtc-client.d.ts +8 -0
  852. package/data/build/dist/transport/webrtc-client.d.ts.map +1 -0
  853. package/data/build/dist/transport/webrtc-client.js +135 -9
  854. package/data/build/dist/transport/webrtc-client.js.map +1 -0
  855. package/data/build/dist/transport/webrtc-host.d.ts.map +1 -0
  856. package/data/build/dist/transport/webrtc-host.js +5 -1
  857. package/data/build/dist/transport/webrtc-host.js.map +1 -0
  858. package/data/build/dist/typert.host.d.ts.map +1 -0
  859. package/data/build/dist/typert.host.js.map +1 -0
  860. package/data/build/dist/typert.remote-client.d.ts.map +1 -0
  861. package/data/build/dist/typert.remote-client.js.map +1 -0
  862. package/package.json +36 -19
  863. package/profile/README.md +18 -5
  864. package/profile/package.json +3 -3
  865. package/profile/scripts/check-dsh-install.mjs +100 -9
  866. package/profile/version.json +3 -3
  867. package/scripts/check-dsh-install.mjs +98 -17
  868. package/version.json +3 -3
  869. package/data/build/dist/client/host-navigation.d.ts +0 -29
  870. package/data/build/dist/client/host-navigation.js +0 -29
  871. package/data/build/dist/client/peer-host-native-session-ui.d.ts +0 -60
  872. package/data/build/dist/client/peer-host-native-session-ui.js +0 -372
@@ -1,16 +1,35 @@
1
1
  import { createElement, useEffect, useRef, useState, useSyncExternalStore } from 'react';
2
+ import { buildHistoryGraph, GRAPH_DASH_ARRAY, GRAPH_LANE_WIDTH, GRAPH_ROW_HEIGHT, laneCenterX, laneColor, laneStroke, laneDashed, isUnpushed, segmentStroke } from './git-history-graph.js';
2
3
  import { CODINGNS_RPC_CHANNEL } from '../shared/contracts/transport.js';
4
+ import { backdropPointerDownHandler, useDismissOnOutsidePointer } from './popup-dismiss.js';
3
5
  import { debugWarn } from '../shared/debug.js';
4
6
  import { dshSettingsToastStyle, dshThemeColor } from './theme.js';
7
+ import { gitPanelClass, installGitPanelStyles } from './git-panel-styles.js';
8
+ import { resolveCodingNsTranslator } from './locale.js';
9
+ import { notifyGitWorkspaceChanged } from './git-workspace-events.js';
10
+ // 单列 Git 视图需要一个稳定的分段控件;这里保持 React 结构简单,避免引入额外依赖。
11
+ function SegmentedControl({ id, value, options, onChange, label, disabled }) {
12
+ const index = Math.max(0, options.findIndex((option) => option.value === value));
13
+ return createElement('div', { role: 'tablist', 'aria-label': label, className: gitPanelClass.segmented, style: { '--dsh-segment-count': options.length, '--dsh-segment-index': index } }, createElement('span', { 'aria-hidden': 'true', className: gitPanelClass.segmentedIndicator }), ...options.map((option) => createElement('button', {
14
+ key: option.value, type: 'button', role: 'tab', id: `${id}-${option.value}`, 'aria-selected': option.value === value,
15
+ tabIndex: option.value === value ? 0 : -1, disabled: disabled === true || option.disabled === true,
16
+ className: gitPanelClass.segment, title: option.title, onClick: () => onChange(option.value),
17
+ }, option.label)));
18
+ }
5
19
  export const GIT_PROVIDER_ID = 'codingns4dsh/git';
6
20
  export const GIT_KIND = 'git';
7
21
  const INITIAL_HISTORY_LIMIT = 50;
8
22
  const HISTORY_PAGE_SIZE = 100;
9
23
  /** 兼容早期调用方使用的面板标识;实际注册已迁移到右侧 Sidebar。 */
10
24
  export const GIT_PANEL_ID = GIT_PROVIDER_ID;
25
+ function gitOperationLabel(operation, t) {
26
+ return operation === 'fetch' ? t('git.opFetch') : operation === 'pull' ? t('git.opPull') : operation === 'push' ? t('git.opPush') : operation === 'undo' ? t('git.opUndo') : t('git.refresh');
27
+ }
11
28
  /** 注册 DSH 右侧 Sidebar 的 Git 标签类型,数据按 Workspace 复用。 */
12
29
  export function registerGitManagementUi(ctx, services) {
30
+ const t = resolveCodingNsTranslator(services.locale);
13
31
  const disposers = [];
32
+ disposers.push(installGitPanelStyles());
14
33
  const sidebarRight = ctx.sidebarRight;
15
34
  try {
16
35
  disposers.push(ctx.sidebarRightTabs.register({
@@ -18,15 +37,16 @@ export function registerGitManagementUi(ctx, services) {
18
37
  kind: GIT_KIND,
19
38
  multiple: false,
20
39
  priority: 'extension',
21
- title: () => 'Git',
22
- guide: [{ id: 'git', order: 40, title: () => 'Git', description: () => '查看改动、提交和版本历史', icon: GitPanelIcon }],
40
+ title: () => t('git.tabTitle'),
41
+ guide: [{ id: 'git', order: 40, title: () => t('git.tabTitle'), description: () => t('git.guideDescription'), icon: createGitPanelIcon(t) }],
23
42
  }));
24
43
  disposers.push(ctx.slots.inject('sidebar.right.pane.tab', () => ctx.slots.register({
25
44
  name: 'sidebar.right.pane.tab', key: GIT_PROVIDER_ID,
26
- inject: () => ({ rpc: services.rpc, remote: services.remote }),
45
+ inject: () => ({ rpc: services.rpc, remote: services.remote, t }),
27
46
  }, GitPanel)));
28
47
  disposers.push(ctx.slots.inject('sidebar.right.pane.tab.title', () => ctx.slots.register({
29
48
  name: 'sidebar.right.pane.tab.title', key: GIT_PROVIDER_ID,
49
+ inject: () => ({ t }),
30
50
  }, GitTabTitle)));
31
51
  disposers.push(ctx.slots.inject('shell.overlay', () => ctx.slots.register({
32
52
  name: 'shell.overlay', id: 'codingns4dsh-git-workspace-recovery', order: 990,
@@ -51,17 +71,20 @@ export function registerGitManagementUi(ctx, services) {
51
71
  function isDuplicateGitRegistration(error) {
52
72
  return error instanceof Error && /sidebarRight: (?:tab type id|tab kind) .* already registered/u.test(error.message);
53
73
  }
54
- function GitPanelIcon({ size = 16 }) {
55
- return createElement('span', {
56
- title: 'Git 仓库管理', 'aria-label': 'Git 仓库管理', style: { display: 'inline-flex', width: size, height: size, alignItems: 'center', justifyContent: 'center', color: dshThemeColor.labelSecondary, fontSize: Math.max(12, size - 2), fontWeight: 700 },
57
- }, '⑂');
74
+ function createGitPanelIcon(t) {
75
+ return function GitPanelIcon({ size = 16 }) {
76
+ return createElement('span', {
77
+ title: t('git.panelLabel'), 'aria-label': t('git.panelLabel'), style: { display: 'inline-flex', width: size, height: size, alignItems: 'center', justifyContent: 'center', color: dshThemeColor.labelSecondary, fontSize: Math.max(12, size - 2), fontWeight: 700 },
78
+ }, '⑂');
79
+ };
58
80
  }
59
- function GitTabTitle({ useTabInfo }) {
81
+ function GitTabTitle({ useTabInfo, t }) {
60
82
  useTabInfo();
61
- return createElement('span', { title: 'Git 仓库管理', 'aria-label': 'Git 仓库管理', style: tabTitleStyle }, 'Git');
83
+ return createElement('span', { title: t('git.panelLabel'), 'aria-label': t('git.panelLabel'), style: tabTitleStyle }, t('git.tabTitle'));
62
84
  }
63
85
  function GitPanel(props) {
64
86
  const sessionId = String(props.sessionId);
87
+ const t = props.t;
65
88
  const tabInfo = props.useTabInfo();
66
89
  const [workspaceId, setWorkspaceId] = useState();
67
90
  const [status, setStatus] = useState(null);
@@ -69,11 +92,13 @@ function GitPanel(props) {
69
92
  const [branches, setBranches] = useState(null);
70
93
  const [subject, setSubject] = useState('');
71
94
  const [busy, setBusy] = useState(false);
95
+ const [activeOperation, setActiveOperation] = useState(null);
72
96
  const [toast, setToast] = useState(null);
73
97
  const [diffView, setDiffView] = useState(null);
74
98
  const [fileDiff, setFileDiff] = useState(null);
75
99
  const [singleColumn, setSingleColumn] = useState(false);
76
100
  const [activeColumn, setActiveColumn] = useState('files');
101
+ const [historyScope, setHistoryScope] = useState('all');
77
102
  const [historyTotalCount, setHistoryTotalCount] = useState(0);
78
103
  const [historyLoadingMore, setHistoryLoadingMore] = useState(false);
79
104
  const contentGridRef = useRef(null);
@@ -140,7 +165,7 @@ function GitPanel(props) {
140
165
  return;
141
166
  }
142
167
  const [nextHistory, nextBranches] = await Promise.all([
143
- historyExpanded.current ? Promise.resolve(null) : call(props.rpc, 'git/history', { workspaceId: resolvedWorkspaceId, limit: INITIAL_HISTORY_LIMIT, offset: 0 }),
168
+ historyExpanded.current ? Promise.resolve(null) : call(props.rpc, 'git/history', { workspaceId: resolvedWorkspaceId, limit: INITIAL_HISTORY_LIMIT, offset: 0, scope: historyScope }),
144
169
  call(props.rpc, 'git/branches', { workspaceId: resolvedWorkspaceId }),
145
170
  ]);
146
171
  if (disposed)
@@ -153,7 +178,6 @@ function GitPanel(props) {
153
178
  }
154
179
  setStatus(nextStatus);
155
180
  setBranches(normalizedBranches);
156
- setToast(null);
157
181
  }
158
182
  catch (error) {
159
183
  if (!disposed)
@@ -164,7 +188,7 @@ function GitPanel(props) {
164
188
  if (disposed)
165
189
  return;
166
190
  if (resolvedWorkspaceId === undefined) {
167
- notify('error', '当前没有可用的工作区');
191
+ notify('error', t('git.noWorkspace'));
168
192
  return;
169
193
  }
170
194
  rememberGitWorkspaceSession(sessionId, resolvedWorkspaceId);
@@ -176,7 +200,7 @@ function GitPanel(props) {
176
200
  }).catch((error) => { if (!disposed)
177
201
  notify('error', error instanceof Error ? error.message : String(error)); });
178
202
  return () => { disposed = true; cleanupTimer?.(); };
179
- }, [props.remote, props.rpc, sessionId]);
203
+ }, [props.remote, props.rpc, sessionId, historyScope]);
180
204
  useEffect(() => {
181
205
  const close = () => {
182
206
  if (!tabInfo.tab.signal.aborted)
@@ -191,26 +215,33 @@ function GitPanel(props) {
191
215
  tabInfo.tab.signal.addEventListener('abort', close, { once: true });
192
216
  return () => tabInfo.tab.signal.removeEventListener('abort', close);
193
217
  }, [sessionId, tabInfo.tab.signal]);
194
- const run = async (action, payload, onSuccess) => {
195
- setBusy(true);
196
- setToast(null);
218
+ const run = async (action, payload, onSuccess, operation) => {
197
219
  if (workspaceId === undefined) {
198
- notify('error', '当前没有可用的工作区');
199
- setBusy(false);
220
+ notify('error', t('git.noWorkspace'));
200
221
  return;
201
222
  }
223
+ setBusy(true);
224
+ if (operation !== undefined) {
225
+ setActiveOperation(operation);
226
+ setToast({ kind: 'info', message: t('git.operationRunning', { operation: gitOperationLabel(operation, t) }) });
227
+ }
228
+ else {
229
+ setToast(null);
230
+ }
202
231
  const targetWorkspaceId = workspaceId;
203
232
  const preserveExpandedHistory = action === 'git/status' && historyExpanded.current;
204
233
  if (!preserveExpandedHistory)
205
234
  historyExpanded.current = false;
206
235
  try {
207
236
  const value = await call(props.rpc, action, { workspaceId: targetWorkspaceId, ...payload });
237
+ if (action !== 'git/status')
238
+ notifyGitWorkspaceChanged(targetWorkspaceId);
208
239
  onSuccess?.(value);
209
240
  const nextStatus = await call(props.rpc, 'git/status', { workspaceId: targetWorkspaceId });
210
241
  setStatus(nextStatus);
211
242
  if (nextStatus.snapshot.enabled !== false) {
212
243
  const [nextHistory, nextBranches] = await Promise.all([
213
- preserveExpandedHistory ? Promise.resolve(null) : call(props.rpc, 'git/history', { workspaceId: targetWorkspaceId, limit: INITIAL_HISTORY_LIMIT, offset: 0 }),
244
+ preserveExpandedHistory ? Promise.resolve(null) : call(props.rpc, 'git/history', { workspaceId: targetWorkspaceId, limit: INITIAL_HISTORY_LIMIT, offset: 0, scope: historyScope }),
214
245
  call(props.rpc, 'git/branches', { workspaceId: targetWorkspaceId }),
215
246
  ]);
216
247
  const normalizedBranches = normalizeBranchSnapshot(nextBranches);
@@ -227,34 +258,37 @@ function GitPanel(props) {
227
258
  setBranches(null);
228
259
  writeCache(targetWorkspaceId, { status: nextStatus, history: [], historyTotalCount: 0, branches: null });
229
260
  }
230
- notify('success', '操作已完成');
261
+ notify('success', operation === undefined ? t('git.operationCompleted') : t('git.operationDone', { operation: gitOperationLabel(operation, t) }));
231
262
  }
232
263
  catch (error) {
233
264
  notify('error', error instanceof Error ? error.message : String(error));
234
265
  }
235
266
  finally {
236
267
  setBusy(false);
268
+ if (operation !== undefined) {
269
+ setActiveOperation(null);
270
+ }
237
271
  }
238
272
  };
239
273
  const commit = () => {
240
274
  const value = subject.trim();
241
275
  if (!value) {
242
- notify('error', '请输入提交说明');
276
+ notify('error', t('git.commitMessageRequired'));
243
277
  return;
244
278
  }
245
279
  void run('git/commit', { subject: value }, () => setSubject(''));
246
280
  };
247
281
  const copyCommitHash = (commitHash) => {
248
- void copyText(commitHash).then((copied) => notify(copied ? 'success' : 'error', copied ? 'Git 版本号已复制' : '当前环境不支持复制'));
282
+ void copyText(commitHash).then((copied) => notify(copied ? 'success' : 'error', copied ? t('git.commitHashCopied') : t('git.copyUnsupported')));
249
283
  };
250
284
  const copyCommitMessage = (value) => {
251
- void copyText(value).then((copied) => notify(copied ? 'success' : 'error', copied ? '提交信息已复制' : '当前环境不支持复制'));
285
+ void copyText(value).then((copied) => notify(copied ? 'success' : 'error', copied ? t('git.commitMessageCopied') : t('git.copyUnsupported')));
252
286
  };
253
287
  const openCommitDiff = (commitHash) => {
254
288
  if (workspaceId === undefined)
255
289
  return;
256
290
  setBusy(true);
257
- notify('info', '正在读取提交 Diff…');
291
+ notify('info', t('git.readingCommitDiff'));
258
292
  void call(props.rpc, 'git/commit-diff', { workspaceId, commitHash }).then((value) => {
259
293
  setDiffView(value);
260
294
  setToast(null);
@@ -264,7 +298,7 @@ function GitPanel(props) {
264
298
  if (workspaceId === undefined)
265
299
  return;
266
300
  setBusy(true);
267
- notify('info', '正在读取文件 Diff…');
301
+ notify('info', t('git.readingFileDiff'));
268
302
  void call(props.rpc, 'git/diff', { workspaceId, path, staged }).then((value) => {
269
303
  setFileDiff({ path, staged, diff: value });
270
304
  setToast(null);
@@ -275,7 +309,7 @@ function GitPanel(props) {
275
309
  return;
276
310
  setHistoryLoadingMore(true);
277
311
  historyExpanded.current = true;
278
- void call(props.rpc, 'git/history', { workspaceId, limit: HISTORY_PAGE_SIZE, offset: history.length }).then((page) => {
312
+ void call(props.rpc, 'git/history', { workspaceId, limit: HISTORY_PAGE_SIZE, offset: history.length, scope: historyScope }).then((page) => {
279
313
  setHistory((current) => [...current, ...page.items.filter((item) => !current.some((existing) => existing.commitHash === item.commitHash))]);
280
314
  setHistoryTotalCount(page.totalCount);
281
315
  }).catch((error) => { historyExpanded.current = history.length > INITIAL_HISTORY_LIMIT; notify('error', error instanceof Error ? error.message : String(error)); }).finally(() => setHistoryLoadingMore(false));
@@ -285,48 +319,64 @@ function GitPanel(props) {
285
319
  const unstaged = changes.filter((item) => hasUnstagedChanges(item));
286
320
  const runGitOperation = (action) => {
287
321
  if (action === 'refresh') {
288
- void run('git/status', {}, (value) => setStatus(value));
322
+ void run('git/status', {}, (value) => setStatus(value), action);
289
323
  return;
290
324
  }
291
- void run(`git/${action}`, {});
325
+ void run(`git/${action}`, {}, undefined, action);
292
326
  };
293
327
  const stageAll = () => { void run('git/stage', { targets: unstaged.map((item) => item.path) }); };
294
328
  const discardAll = () => { void run('git/discard', { targets: changes.map((item) => item.path) }); };
295
- return createElement('section', { style: panelStyle, 'data-git-management-panel': 'true' }, createElement('header', { style: headerStyle }, createElement('div', { style: { minWidth: 0 } }, createElement('h1', { style: titleStyle }, 'Git')), createElement('div', { style: headerActionsStyle }, singleColumn ? createElement('div', { style: columnSwitchStyle, role: 'group', 'aria-label': '切换文件与版本视图' }, createElement('button', { type: 'button', onClick: () => setActiveColumn('files'), style: activeColumn === 'files' ? columnSwitchActiveButtonStyle : columnSwitchButtonStyle, title: '切换文件', 'aria-label': '切换文件', 'aria-pressed': activeColumn === 'files' }, '切换文件'), createElement('button', { type: 'button', onClick: () => setActiveColumn('history'), style: activeColumn === 'history' ? columnSwitchActiveButtonStyle : columnSwitchButtonStyle, title: '切换版本', 'aria-label': '切换版本', 'aria-pressed': activeColumn === 'history' }, '切换版本')) : null, createElement(GitOperationsMenu, { busy, hasRemote: Boolean(status?.snapshot.hasRemote || branches?.remote.length), canUndo: history.length > 0, hasMoreVersions: history.length < historyTotalCount, stagedCount: staged.length, unstagedCount: unstaged.length, onStageAll: stageAll, onDiscardAll: discardAll, onLoadMore: loadMoreHistory, onOperation: runGitOperation }))), toast === null ? null : createElement('div', { role: toast.kind === 'error' ? 'alert' : 'status', 'aria-live': 'polite', style: { ...dshSettingsToastStyle, position: 'absolute', top: 8, right: 'auto', left: '50%', transform: 'translateX(-50%)', width: 'min(300px, calc(100% - 24px))', pointerEvents: 'none', borderColor: toast.kind === 'error' ? dshThemeColor.error : toast.kind === 'success' ? dshThemeColor.success : dshThemeColor.border } }, toast.message), status === null ? createElement('div', { style: emptyStyle }, '正在读取 Git 状态…') : null, status !== null && status.snapshot.enabled === false ? createElement('section', { style: sectionStyle }, createElement('strong', undefined, '当前目录还没有 Git 仓库'), createElement('div', { style: mutedStyle }, '初始化后即可查看改动、提交和版本历史。'), createElement('button', { type: 'button', disabled: busy, onClick: () => void run('git/init', {}), style: primaryButtonStyle }, '初始化 Git')) : null, status !== null ? createElement('div', { style: summaryStyle }, `${staged.length} 个已暂存 · ${unstaged.length} 个未暂存 · ${historyTotalCount} 条提交`) : null, diffView !== null ? createElement(DiffViewer, { diff: diffView, onClose: () => setDiffView(null) }) : null, fileDiff !== null ? createElement(FileDiffViewer, { path: fileDiff.path, staged: fileDiff.staged, diff: fileDiff.diff, onClose: () => setFileDiff(null) }) : null, status !== null && status.snapshot.enabled !== false ? createElement('div', { ref: contentGridRef, style: contentGridStyle }, singleColumn && activeColumn !== 'files' ? null : createElement('div', { style: columnStyle }, createElement('section', { style: commitSectionStyle }, createElement('div', { style: commitEditorRowStyle }, createElement('textarea', { value: subject, disabled: busy || workspaceId === undefined, onChange: (event) => setSubject(event.currentTarget.value), onKeyDown: (event) => { if (event.key === 'Enter')
296
- event.preventDefault(); }, placeholder: '在这里输入提交信息', rows: 1, style: commitSubjectStyle }), createElement('button', { type: 'button', disabled: busy || workspaceId === undefined, onClick: () => notify('info', '生成提交信息功能暂未开放'), style: draftButtonStyle, title: '生成提交信息', 'aria-label': '生成提交信息' }, '✦')), createElement('div', { style: commitActionsStyle }, createElement('button', { type: 'button', disabled: busy || workspaceId === undefined, onClick: () => void run('git/status', {}, (value) => setStatus(value)), style: refreshActionStyle }, '刷新'), createElement('button', { type: 'button', disabled: busy || workspaceId === undefined || staged.length === 0 || subject.trim().length === 0, onClick: commit, style: submitActionStyle }, '提交'))), staged.length > 0 ? createElement(ChangeSection, { title: '暂存文件', items: staged, busy, onOpenDiff: openFileDiff, onAction: (action, path) => void run(`git/${action}`, { targets: [path] }), onBatchAction: (action, paths) => void run(`git/${action}`, { targets: paths }), onBulkAction: () => void run('git/unstage', { targets: staged.map((item) => item.path) }) }) : null, unstaged.length > 0 ? createElement(ChangeSection, { title: '未提交文件', items: unstaged, busy, onOpenDiff: openFileDiff, onAction: (action, path) => void run(`git/${action}`, { targets: [path] }), onBatchAction: (action, paths) => void run(`git/${action}`, { targets: paths }), onBulkAction: () => void run('git/stage', { targets: unstaged.map((item) => item.path) }) }) : null), singleColumn && activeColumn !== 'history' ? null : createElement('div', { style: columnStyle }, createElement(HistorySection, { history, totalCount: historyTotalCount, hasMore: history.length < historyTotalCount, loadingMore: historyLoadingMore, onLoadMore: loadMoreHistory, branches, busy, onSwitch: (branchName) => void run('git/switch', { branchName, create: false }, (value) => setBranches(normalizeBranchSnapshot(value))), onCopy: copyCommitHash, onCopyMessage: copyCommitMessage, onViewDiff: openCommitDiff, onUndo: () => runGitOperation('undo') }))) : null);
297
- }
298
- function ChangeSection({ title, items, busy, onOpenDiff, onAction, onBatchAction, onBulkAction }) {
329
+ return createElement('section', { style: panelStyle, 'data-git-management-panel': 'true' },
330
+ // 面板标题已由 Sidebar 标签页渲染,这里不再重复;只保留视图切换与操作菜单。
331
+ createElement('header', { style: headerStyle }, singleColumn ? createElement('div', { style: columnSwitchStyle }, createElement((SegmentedControl), {
332
+ id: 'codingns4dsh-git-view', value: activeColumn, onChange: setActiveColumn, label: t('git.viewSwitcherLabel'),
333
+ options: [
334
+ { value: 'files', label: t('git.switchToFiles'), title: t('git.switchToFiles') },
335
+ { value: 'history', label: t('git.switchToHistory'), title: t('git.switchToHistory') },
336
+ ],
337
+ })) : null, createElement('div', { style: headerActionsStyle }, createElement(GitOperationsMenu, { busy, activeOperation, hasRemote: Boolean(status?.snapshot.hasRemote || branches?.remote.length), canUndo: history.length > 0, hasMoreVersions: history.length < historyTotalCount, stagedCount: staged.length, unstagedCount: unstaged.length, onStageAll: stageAll, onDiscardAll: discardAll, onLoadMore: loadMoreHistory, onOperation: runGitOperation, t }))), toast === null ? null : createElement('div', { role: toast.kind === 'error' ? 'alert' : 'status', 'aria-live': 'polite', style: { ...dshSettingsToastStyle, position: 'absolute', top: 8, right: 'auto', left: '50%', transform: 'translateX(-50%)', width: 'min(300px, calc(100% - 24px))', pointerEvents: 'none', borderColor: toast.kind === 'error' ? dshThemeColor.error : toast.kind === 'success' ? dshThemeColor.success : dshThemeColor.border } }, toast.message), status === null ? createElement('div', { style: emptyStyle }, t('git.readingStatus')) : null, status !== null && status.snapshot.enabled === false ? createElement('section', { style: sectionStyle }, createElement('strong', undefined, t('git.noRepository')), createElement('div', { style: mutedStyle }, t('git.initHint')), createElement('button', { type: 'button', disabled: busy, onClick: () => void run('git/init', {}), className: `${gitPanelClass.button} ${gitPanelClass.buttonPrimary}`, style: primaryButtonStyle }, t('git.init'))) : null, status !== null ? createElement('div', { style: summaryStyle }, t('git.summary', { staged: staged.length, unstaged: unstaged.length, total: historyTotalCount, scope: historyScope === 'all' ? t('git.allBranches') : t('git.currentBranch') })) : null, diffView !== null ? createElement(DiffViewer, { diff: diffView, onClose: () => setDiffView(null), t }) : null, fileDiff !== null ? createElement(FileDiffViewer, { path: fileDiff.path, staged: fileDiff.staged, diff: fileDiff.diff, onClose: () => setFileDiff(null), t }) : null, status !== null && status.snapshot.enabled !== false ? createElement('div', { ref: contentGridRef, style: contentGridStyle }, singleColumn && activeColumn !== 'files' ? null : createElement('div', { style: columnStyle }, createElement('section', { style: commitSectionStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', undefined, t('git.commitChanges')), createElement('span', { style: mutedStyle }, staged.length === 0 ? t('git.stagingEmpty') : t('git.stagedCount', { count: staged.length }))), createElement('div', { style: commitEditorRowStyle }, createElement('textarea', { value: subject, disabled: busy || workspaceId === undefined, className: gitPanelClass.field, onChange: (event) => setSubject(event.currentTarget.value), onKeyDown: (event) => { if (event.key === 'Enter')
338
+ event.preventDefault(); }, placeholder: t('git.commitPlaceholder'), rows: 1, style: commitSubjectStyle }), createElement('button', { type: 'button', disabled: busy || workspaceId === undefined, onClick: () => notify('info', t('git.draftUnavailable')), className: `${gitPanelClass.button} ${gitPanelClass.field}`, style: draftButtonStyle, title: t('git.draftMessage'), 'aria-label': t('git.draftMessage') }, '✦')), createElement('div', { style: commitActionsStyle }, createElement('button', { type: 'button', disabled: busy || workspaceId === undefined, onClick: () => void run('git/status', {}, (value) => setStatus(value)), className: `${gitPanelClass.button} ${gitPanelClass.field}`, style: refreshActionStyle }, t('git.refresh')), createElement('button', { type: 'button', disabled: busy || workspaceId === undefined || staged.length === 0 || subject.trim().length === 0, onClick: commit, className: `${gitPanelClass.button} ${gitPanelClass.buttonPrimary}`, style: submitActionStyle }, t('git.commit')))), staged.length > 0 ? createElement(ChangeSection, { title: t('git.stagedFiles'), staged: true, items: staged, busy, onOpenDiff: openFileDiff, onAction: (action, path) => void run(`git/${action}`, { targets: [path] }), onBatchAction: (action, paths) => void run(`git/${action}`, { targets: paths }), onBulkAction: () => void run('git/unstage', { targets: staged.map((item) => item.path) }), t }) : null, unstaged.length > 0 ? createElement(ChangeSection, { title: t('git.unstagedFiles'), staged: false, items: unstaged, busy, onOpenDiff: openFileDiff, onAction: (action, path) => void run(`git/${action}`, { targets: [path] }), onBatchAction: (action, paths) => void run(`git/${action}`, { targets: paths }), onBulkAction: () => void run('git/stage', { targets: unstaged.map((item) => item.path) }), t }) : null), singleColumn && activeColumn !== 'history' ? null : createElement('div', { style: columnStyle }, createElement(HistorySection, { history, totalCount: historyTotalCount, hasMore: history.length < historyTotalCount, loadingMore: historyLoadingMore, onLoadMore: loadMoreHistory, branches, busy, scope: historyScope, hasRemote: Boolean(status?.snapshot.hasRemote || branches?.remote.length), onScopeChange: setHistoryScope, onSwitch: (branchName) => void run('git/switch', { branchName, create: false }, (value) => setBranches(normalizeBranchSnapshot(value))), onCopy: copyCommitHash, onCopyMessage: copyCommitMessage, onViewDiff: openCommitDiff, onUndo: () => runGitOperation('undo'), t }))) : null);
339
+ }
340
+ function ChangeSection({ title, staged, items, busy, onOpenDiff, onAction, onBatchAction, onBulkAction, t }) {
299
341
  const [hoveredPath, setHoveredPath] = useState(null);
300
342
  const nodes = buildChangeTree(items);
301
- const staged = title === '暂存文件';
302
343
  const renderNode = (node, depth) => {
303
344
  if (node.kind === 'directory') {
304
345
  const directoryKey = `dir:${node.path}`;
305
346
  const directoryTargets = collectTreeTargets(node);
306
347
  const isHovered = hoveredPath === directoryKey;
307
- return createElement('details', { key: `dir:${node.path}`, open: true, style: treeDirectoryStyle }, createElement('summary', { style: { ...treeRowStyle, paddingLeft: 8 + depth * 14 }, onMouseEnter: () => setHoveredPath(directoryKey), onMouseLeave: () => setHoveredPath(null) }, createElement('span', { style: treeChevronStyle }, '⌄'), createElement('span', { style: folderIconStyle }, '▰'), createElement('span', { style: fileNameStyle, title: node.path }, node.name), createElement('span', { style: mutedStyle }, countTreeFiles(node)), isHovered ? createElement('div', { style: rowActionsStyle }, createElement('button', { type: 'button', disabled: busy, onClick: (event) => { event.preventDefault(); event.stopPropagation(); onBatchAction(staged ? 'unstage' : 'stage', directoryTargets); }, style: iconButtonStyle, title: staged ? '撤销目录暂存' : '将目录添加到暂存区', 'aria-label': staged ? '撤销目录暂存' : '将目录添加到暂存区' }, staged ? '↶' : '+'), !staged ? createElement('button', { type: 'button', disabled: busy, onClick: (event) => { event.preventDefault(); event.stopPropagation(); onBatchAction('discard', directoryTargets); }, style: dangerIconButtonStyle, title: '撤销目录变更', 'aria-label': '撤销目录变更' }, '×') : null) : null), createElement('div', undefined, ...node.children.map((child) => renderNode(child, depth + 1))));
348
+ return createElement('details', { key: `dir:${node.path}`, open: true, style: treeDirectoryStyle }, createElement('summary', { className: gitPanelClass.row, style: { ...treeRowStyle, paddingLeft: 8 + depth * 14 }, onMouseEnter: () => setHoveredPath(directoryKey), onMouseLeave: () => setHoveredPath(null) }, createElement('span', { style: treeChevronStyle }, '⌄'), createElement('span', { style: folderIconStyle }, '▰'), createElement('span', { style: fileNameStyle, title: node.path }, node.name), createElement('span', { style: mutedStyle }, countTreeFiles(node)), isHovered ? createElement('div', { style: rowActionsStyle }, createElement('button', { type: 'button', disabled: busy, onClick: (event) => { event.preventDefault(); event.stopPropagation(); onBatchAction(staged ? 'unstage' : 'stage', directoryTargets); }, className: gitPanelClass.action, style: iconActionStyle, title: staged ? t('git.unstageDirectory') : t('git.stageDirectory'), 'aria-label': staged ? t('git.unstageDirectory') : t('git.stageDirectory') }, staged ? '↶' : '+'), !staged ? createElement('button', { type: 'button', disabled: busy, onClick: (event) => { event.preventDefault(); event.stopPropagation(); onBatchAction('discard', directoryTargets); }, className: `${gitPanelClass.action} ${gitPanelClass.actionDanger}`, style: iconActionStyle, title: t('git.discardDirectory'), 'aria-label': t('git.discardDirectory') }, '×') : null) : null), createElement('div', undefined, ...node.children.map((child) => renderNode(child, depth + 1))));
308
349
  }
309
350
  const isHovered = hoveredPath === node.path;
310
- return createElement('div', { key: `file:${node.path}`, style: { ...treeRowStyle, paddingLeft: 28 + depth * 14 }, onMouseEnter: () => setHoveredPath(node.path), onMouseLeave: () => setHoveredPath(null), onDoubleClick: () => onOpenDiff(node.path, staged) }, createElement('span', { style: fileIconStyle }, fileIcon(node.name)), createElement('span', { title: node.path, style: fileNameStyle }, node.name), createElement('span', { style: fileStatusStyle }, changeStatus(node.item, staged)), isHovered ? createElement('div', { style: rowActionsStyle }, createElement('button', { type: 'button', disabled: busy, onClick: () => onAction(staged ? 'unstage' : 'stage', node.path), style: iconButtonStyle, title: staged ? '撤销暂存' : '添加到暂存区', 'aria-label': staged ? '撤销暂存' : '添加到暂存区' }, staged ? '↶' : '+'), !staged ? createElement('button', { type: 'button', disabled: busy, onClick: () => onAction('discard', node.path), style: dangerIconButtonStyle, title: '撤销变更', 'aria-label': '撤销变更' }, '×') : null) : null);
351
+ return createElement('div', { key: `file:${node.path}`, className: gitPanelClass.row, style: { ...treeRowStyle, paddingLeft: 28 + depth * 14 }, onMouseEnter: () => setHoveredPath(node.path), onMouseLeave: () => setHoveredPath(null), onDoubleClick: () => onOpenDiff(node.path, staged) }, createElement('span', { style: fileIconStyle }, fileIcon(node.name)), createElement('span', { title: node.path, style: fileNameStyle }, node.name), createElement('span', { style: fileStatusStyle }, changeStatus(node.item, staged)), isHovered ? createElement('div', { style: rowActionsStyle }, createElement('button', { type: 'button', disabled: busy, onClick: () => onAction(staged ? 'unstage' : 'stage', node.path), className: gitPanelClass.action, style: iconActionStyle, title: staged ? t('git.unstageFile') : t('git.stageFile'), 'aria-label': staged ? t('git.unstageFile') : t('git.stageFile') }, staged ? '↶' : '+'), !staged ? createElement('button', { type: 'button', disabled: busy, onClick: () => onAction('discard', node.path), className: `${gitPanelClass.action} ${gitPanelClass.actionDanger}`, style: iconActionStyle, title: t('git.discardFile'), 'aria-label': t('git.discardFile') }, '×') : null) : null);
311
352
  };
312
- return createElement('section', { style: sectionStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', undefined, `${title} (${items.length})`), createElement('button', { type: 'button', disabled: busy, onClick: onBulkAction, style: iconButtonStyle, title: staged ? '取消全部暂存' : '全部添加到暂存区', 'aria-label': staged ? '取消全部暂存' : '全部添加到暂存区' }, staged ? '↶' : '+')), createElement('div', { style: treeStyle }, ...nodes.map((node) => renderNode(node, 0))));
313
- }
314
- function GitOperationsMenu({ busy, hasRemote, canUndo, hasMoreVersions, stagedCount, unstagedCount, onStageAll, onDiscardAll, onLoadMore, onOperation }) {
315
- return createElement('details', { style: menuStyle }, createElement('summary', { style: menuSummaryStyle, title: 'Git 操作菜单', 'aria-label': 'Git 操作菜单' }, '⋯'), createElement('div', { style: menuPopupStyle }, createElement('button', { type: 'button', disabled: busy || unstagedCount === 0, onClick: onStageAll, style: menuButtonStyle }, '暂存全部'), createElement('button', { type: 'button', disabled: busy || stagedCount + unstagedCount === 0, onClick: onDiscardAll, style: dangerMenuButtonStyle }, '放弃全部改动'), createElement('button', { type: 'button', disabled: busy || !hasRemote, onClick: () => onOperation('fetch'), style: menuButtonStyle }, 'Fetch'), createElement('button', { type: 'button', disabled: busy || !hasRemote, onClick: () => onOperation('pull'), style: menuButtonStyle }, 'Pull'), createElement('button', { type: 'button', disabled: busy || !hasRemote || stagedCount > 0 || unstagedCount > 0, onClick: () => onOperation('push'), style: menuButtonStyle }, 'Push'), createElement('button', { type: 'button', disabled: busy || !hasMoreVersions, onClick: onLoadMore, style: menuButtonStyle, title: '查看所有版本' }, '查看更多版本(每次 100 条)'), createElement('button', { type: 'button', disabled: busy || !canUndo, onClick: () => onOperation('undo'), style: menuButtonStyle }, '撤销上次提交'), createElement('button', { type: 'button', disabled: busy, onClick: () => onOperation('refresh'), style: menuButtonStyle }, '刷新')));
316
- }
317
- function DiffViewer({ diff, onClose }) {
353
+ return createElement('section', { style: sectionStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', undefined, `${title} (${items.length})`), createElement('button', { type: 'button', disabled: busy, onClick: onBulkAction, className: gitPanelClass.action, style: iconActionStyle, title: staged ? t('git.unstageAll') : t('git.addAllToStaging'), 'aria-label': staged ? t('git.unstageAll') : t('git.addAllToStaging') }, staged ? '↶' : '+')), createElement('div', { style: treeStyle }, ...nodes.map((node) => renderNode(node, 0))));
354
+ }
355
+ function GitOperationsMenu({ busy, activeOperation, hasRemote, canUndo, hasMoreVersions, stagedCount, unstagedCount, onStageAll, onDiscardAll, onLoadMore, onOperation, t }) {
356
+ const [open, setOpen] = useState(false);
357
+ const rootRef = useRef(null);
358
+ useDismissOnOutsidePointer(rootRef, open, () => setOpen(false));
359
+ // 菜单项统一在点击后收起;关闭动作与具体操作解耦,避免每个按钮各写一次。
360
+ const run = (action) => () => { setOpen(false); action(); };
361
+ const operationText = activeOperation === null ? null : t('git.operationInProgress', { operation: gitOperationLabel(activeOperation, t) });
362
+ const operationBadge = operationText === null ? null : createElement('span', { role: 'status', 'aria-live': 'polite', style: operationStatusStyle }, createElement('span', { className: gitPanelClass.progress, 'aria-hidden': 'true' }, '⟳'), operationText);
363
+ return createElement('div', { ref: rootRef, style: menuStyle }, operationBadge, createElement('button', { type: 'button', disabled: busy, className: gitPanelClass.menuTrigger, style: iconActionStyle, title: t('git.operationsMenu'), 'aria-label': t('git.operationsMenu'), 'aria-haspopup': 'menu', 'aria-expanded': open, onClick: () => setOpen((value) => !value) }, '⋯'), open && createElement('div', { role: 'menu', 'aria-label': t('git.operationsMenu'), className: gitPanelClass.menu, style: menuPopupStyle }, createElement('button', { type: 'button', role: 'menuitem', disabled: busy || unstagedCount === 0, onClick: run(onStageAll), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.stageAll')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy || stagedCount + unstagedCount === 0, onClick: run(onDiscardAll), className: `${gitPanelClass.menuItem} ${gitPanelClass.menuItemDanger}`, style: menuItemStyle }, t('git.discardAllChanges')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy || !hasRemote, onClick: run(() => onOperation('fetch')), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.opFetch')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy || !hasRemote, 'aria-busy': activeOperation === 'pull', onClick: run(() => onOperation('pull')), className: gitPanelClass.menuItem, style: menuItemStyle }, activeOperation === 'pull' ? t('git.pullRunning') : t('git.opPull')),
364
+ // 工作区有未提交改动不影响已提交对象的 Push;Git Push 只发送提交记录。
365
+ createElement('button', { type: 'button', role: 'menuitem', disabled: busy || !hasRemote, 'aria-busy': activeOperation === 'push', onClick: run(() => onOperation('push')), className: gitPanelClass.menuItem, style: menuItemStyle }, activeOperation === 'push' ? t('git.pushRunning') : t('git.opPush')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy || !hasMoreVersions, onClick: run(onLoadMore), className: gitPanelClass.menuItem, style: menuItemStyle, title: t('git.viewAllVersions') }, t('git.loadMoreVersions')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy || !canUndo, onClick: run(() => onOperation('undo')), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.undoLastCommit')), createElement('button', { type: 'button', role: 'menuitem', disabled: busy, onClick: run(() => onOperation('refresh')), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.refresh'))));
366
+ }
367
+ function DiffViewer({ diff, onClose, t }) {
318
368
  const providedFiles = diff.files ?? [];
319
369
  const files = providedFiles.length > 0 ? providedFiles : parseDiffFiles(diff.content);
320
- return createElement('div', { style: diffOverlayStyle }, createElement('section', { role: 'dialog', 'aria-modal': true, 'aria-label': '提交 Diff', style: diffStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', undefined, `提交 Diff · ${diff.commitHash.slice(0, 8)}`), createElement('button', { type: 'button', onClick: onClose, style: iconButtonStyle, title: '关闭 Diff', 'aria-label': '关闭 Diff' }, '×')), createElement('div', { style: diffBodyStyle }, createElement('section', { style: diffFilesSectionStyle }, createElement('div', { style: diffSectionHeaderStyle }, createElement('strong', undefined, '变更文件'), createElement('span', { style: diffCountStyle }, String(files.length))), files.length === 0 ? createElement('div', { style: diffEmptyStyle }, '没有检测到文件变更。') : createElement('div', { style: diffFileListStyle }, ...files.map((file) => createElement('div', { key: `${file.status}:${file.oldPath ?? ''}:${file.path}`, style: diffFileRowStyle }, createElement('span', { style: diffFileStatusStyle, 'data-status': file.status }, diffFileStatusLabel(file.status)), createElement('div', { style: diffFileNameStyle }, createElement('strong', undefined, file.path), file.oldPath ? createElement('span', { style: diffFileOldPathStyle }, `原路径:${file.oldPath}`) : null), file.binary ? createElement('span', { style: diffBinaryStyle }, '二进制') : null)))), createElement('section', { style: diffDiffSectionStyle }, createElement('div', { style: diffSectionHeaderStyle }, createElement('strong', undefined, 'Diff'), diff.truncated ? createElement('span', { style: diffTruncatedStyle }, '内容已截断') : null), createElement(DiffLines, { content: diff.content })))));
370
+ return createElement('div', { style: diffOverlayStyle, onPointerDown: backdropPointerDownHandler(onClose) }, createElement('section', { role: 'dialog', 'aria-modal': true, 'aria-label': t('git.commitDiff'), style: diffStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', undefined, t('git.commitDiffTitle', { hash: diff.commitHash.slice(0, 8) })), createElement('button', { type: 'button', onClick: onClose, className: gitPanelClass.action, style: iconActionStyle, title: t('git.closeDiff'), 'aria-label': t('git.closeDiff') }, '×')), createElement('div', { style: diffBodyStyle }, createElement('section', { style: diffFilesSectionStyle }, createElement('div', { style: diffSectionHeaderStyle }, createElement('strong', undefined, t('git.changedFiles')), createElement('span', { style: diffCountStyle }, String(files.length))), files.length === 0 ? createElement('div', { style: diffEmptyStyle }, t('git.noFileChanges')) : createElement('div', { style: diffFileListStyle }, ...files.map((file) => createElement('div', { key: `${file.status}:${file.oldPath ?? ''}:${file.path}`, style: diffFileRowStyle }, createElement('span', { style: diffFileStatusStyle, 'data-status': file.status }, diffFileStatusLabel(file.status, t)), createElement('div', { style: diffFileNameStyle }, createElement('strong', undefined, file.path), file.oldPath ? createElement('span', { style: diffFileOldPathStyle }, t('git.originalPath', { path: file.oldPath })) : null), file.binary ? createElement('span', { style: diffBinaryStyle }, t('git.binary')) : null)))), createElement('section', { style: diffDiffSectionStyle }, createElement('div', { style: diffSectionHeaderStyle }, createElement('strong', undefined, 'Diff'), diff.truncated ? createElement('span', { style: diffTruncatedStyle }, t('git.truncated')) : null), createElement(DiffLines, { content: diff.content, t })))));
321
371
  }
322
- function DiffLines({ content }) {
372
+ function DiffLines({ content, t }) {
323
373
  const lines = parseDiffLines(content);
324
374
  if (lines.length === 0)
325
- return createElement('div', { style: diffEmptyStyle }, '当前没有可显示的文本差异。');
375
+ return createElement('div', { style: diffEmptyStyle }, t('git.noTextDiff'));
326
376
  return createElement('div', { style: diffLinesStyle }, ...lines.map((line, index) => createElement('div', { key: `${index}:${line.kind}:${line.text}`, style: diffLineStyle(line.kind) }, createElement('span', { style: diffLineNumberStyle }, line.oldLineNo === null ? '' : String(line.oldLineNo)), createElement('span', { style: diffLineNumberStyle }, line.newLineNo === null ? '' : String(line.newLineNo)), createElement('code', { style: diffCodeStyle }, `${diffLinePrefix(line.kind)}${line.text}`))));
327
377
  }
328
- function FileDiffViewer({ path, staged, diff, onClose }) {
329
- return createElement('div', { style: diffOverlayStyle }, createElement('section', { role: 'dialog', 'aria-modal': true, 'aria-label': '文件 Diff', style: diffStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', { style: fileDiffTitleStyle, title: path }, `文件 Diff · ${path}`), createElement('div', { style: rowActionsStyle }, createElement('span', { style: diffCountStyle }, staged ? '已暂存' : '未暂存'), createElement('button', { type: 'button', onClick: onClose, style: iconButtonStyle, title: '关闭 Diff', 'aria-label': '关闭 Diff' }, '×'))), createElement('div', { style: diffBodyStyle }, createElement('section', { style: diffDiffSectionStyle }, createElement('div', { style: diffSectionHeaderStyle }, createElement('strong', undefined, staged ? '暂存区 Diff(相对 HEAD)' : '工作区 Diff'), diff.binary ? createElement('span', { style: diffBinaryStyle }, '二进制文件') : null, diff.truncated ? createElement('span', { style: diffTruncatedStyle }, '内容已截断') : null), createElement(DiffLines, { content: diff.content })))));
378
+ function FileDiffViewer({ path, staged, diff, onClose, t }) {
379
+ return createElement('div', { style: diffOverlayStyle, onPointerDown: backdropPointerDownHandler(onClose) }, createElement('section', { role: 'dialog', 'aria-modal': true, 'aria-label': t('git.fileDiff'), style: diffStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', { style: fileDiffTitleStyle, title: path }, t('git.fileDiffTitle', { path })), createElement('div', { style: rowActionsStyle }, createElement('span', { style: diffCountStyle }, staged ? t('git.staged') : t('git.unstaged')), createElement('button', { type: 'button', onClick: onClose, className: gitPanelClass.action, style: iconActionStyle, title: t('git.closeDiff'), 'aria-label': t('git.closeDiff') }, '×'))), createElement('div', { style: diffBodyStyle }, createElement('section', { style: diffDiffSectionStyle }, createElement('div', { style: diffSectionHeaderStyle }, createElement('strong', undefined, staged ? t('git.stagedDiffHead') : t('git.worktreeDiff')), diff.binary ? createElement('span', { style: diffBinaryStyle }, t('git.binaryFile')) : null, diff.truncated ? createElement('span', { style: diffTruncatedStyle }, t('git.truncated')) : null), createElement(DiffLines, { content: diff.content, t })))));
330
380
  }
331
381
  function parseDiffLines(content) {
332
382
  const lines = [];
@@ -377,28 +427,135 @@ function parseDiffFiles(content) {
377
427
  }
378
428
  return result;
379
429
  }
380
- function diffFileStatusLabel(status) { return status === 'A' ? '新增' : status === 'D' ? '删除' : status === 'R' ? '重命名' : status === 'C' ? '复制' : '修改'; }
430
+ function diffFileStatusLabel(status, t) { return status === 'A' ? t('git.statusAdded') : status === 'D' ? t('git.statusDeleted') : status === 'R' ? t('git.statusRenamed') : status === 'C' ? t('git.statusCopied') : t('git.statusModified'); }
381
431
  function diffLinePrefix(kind) { return kind === 'add' ? '+' : kind === 'remove' ? '-' : kind === 'context' ? ' ' : ''; }
432
+ /** Diff 行的配色与 DSH 内置 DiffBlock 完全对齐:同一组状态色 + 行底色 + 左侧 3px 色条。 */
382
433
  function diffLineStyle(kind) {
383
434
  if (kind === 'add')
384
- return { ...diffLineBaseStyle, color: '#1f9d55', background: 'color-mix(in srgb, #22c55e 13%, transparent)' };
435
+ return { ...diffLineBaseStyle, color: dshThemeColor.success, background: dshThemeColor.diffAddedBackground, boxShadow: `inset 3px 0 0 ${dshThemeColor.success}` };
385
436
  if (kind === 'remove')
386
- return { ...diffLineBaseStyle, color: '#e05252', background: 'color-mix(in srgb, #ef4444 13%, transparent)' };
437
+ return { ...diffLineBaseStyle, color: dshThemeColor.error, background: dshThemeColor.diffDeletedBackground, boxShadow: `inset 3px 0 0 ${dshThemeColor.error}` };
387
438
  if (kind === 'hunk')
388
- return { ...diffLineBaseStyle, color: dshThemeColor.accent, background: 'color-mix(in srgb, currentColor 10%, transparent)', fontWeight: 600 };
439
+ return { ...diffLineBaseStyle, color: dshThemeColor.accent, background: dshThemeColor.surfaceSubtle, fontWeight: 600 };
389
440
  if (kind === 'meta')
390
441
  return { ...diffLineBaseStyle, color: dshThemeColor.labelTertiary };
391
442
  return diffLineBaseStyle;
392
443
  }
393
- function HistorySection({ history, totalCount, hasMore, loadingMore, onLoadMore, branches, busy, onSwitch, onCopy, onCopyMessage, onViewDiff, onUndo }) {
394
- const rows = groupHistoryByDate(history).flatMap((group) => [
395
- createElement('div', { key: `date:${group.key}`, style: historyDateHeaderStyle }, createElement('time', { dateTime: group.key, style: historyDateHeaderTextStyle }, group.label)),
396
- ...group.items.map(({ item, index, timeLabel }) => {
397
- const refs = item.refs ?? [];
398
- return createElement('div', { key: item.commitHash, style: historyRowStyle }, createElement('div', { style: historyRowMainStyle }, createElement('code', { style: hashStyle }, item.commitHash.slice(0, 8)), createElement('span', { style: fileNameStyle, title: item.subject }, item.subject), createElement('time', { style: historyTimeStyle, dateTime: item.authoredAt }, timeLabel), createElement('details', { style: menuStyle }, createElement('summary', { style: menuSummaryStyle, title: '版本操作菜单', 'aria-label': '版本操作菜单' }, '⋯'), createElement('div', { style: menuPopupStyle }, createElement('button', { type: 'button', onClick: () => onViewDiff(item.commitHash), style: menuButtonStyle }, '查看更改文件与 Diff'), createElement('button', { type: 'button', onClick: () => onCopy(item.commitHash), style: menuButtonStyle }, '复制 Commit Hash'), createElement('button', { type: 'button', onClick: () => onCopyMessage(buildCommitMessageText(item.subject, item.body)), style: menuButtonStyle }, '复制提交信息'), createElement('button', { type: 'button', onClick: () => onCopy(item.commitHash), style: menuButtonStyle }, '复制 Git 版本号'), index === 0 ? createElement('button', { type: 'button', disabled: busy, onClick: onUndo, style: dangerMenuButtonStyle }, '撤销上次提交') : null))), refs.length === 0 ? null : createElement('div', { style: historyRefListStyle }, ...refs.map((ref) => createElement('span', { key: `${ref.kind}:${ref.name}`, title: ref.name, style: historyRefPillStyle(ref.kind, ref.remoteName) }, ref.name))));
399
- }),
400
- ]);
401
- return createElement('section', { style: sectionStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', undefined, `Git 版本 (${totalCount})`), branches === null ? null : createElement('select', { value: branches.currentBranch, disabled: busy, onChange: (event) => onSwitch(event.currentTarget.value), style: branchSelectStyle }, ...branches.local.map((branch) => createElement('option', { key: branch.name, value: branch.name }, branch.name)))), history.length === 0 ? createElement('div', { style: mutedStyle }, '暂无提交') : rows, hasMore ? createElement('button', { type: 'button', disabled: busy || loadingMore, onClick: onLoadMore, style: loadMoreButtonStyle }, loadingMore ? '正在加载…' : '查看更多版本(每次 100 条)') : null);
444
+ function HistorySection({ history, totalCount, hasMore, loadingMore, onLoadMore, branches, busy, scope, hasRemote, onScopeChange, onSwitch, onCopy, onCopyMessage, onViewDiff, onUndo, t }) {
445
+ const graph = buildHistoryGraph(history);
446
+ const graphWidth = graph.laneCount * GRAPH_LANE_WIDTH;
447
+ const rows = [];
448
+ for (const group of groupHistoryByDate(history, t)) {
449
+ const firstIndex = group.items[0]?.index ?? 0;
450
+ rows.push(createElement('div', { key: `date:${group.key}`, style: historyDateHeaderStyle }, createElement(GitGraphRails, { lanes: graph.rows[firstIndex]?.top ?? [], width: graphWidth, minHeight: 16 }), createElement('time', { dateTime: group.key, style: historyDateHeaderTextStyle }, group.label)));
451
+ for (const { item, index, timeLabel } of group.items) {
452
+ rows.push(createElement(HistoryGraphRow, {
453
+ key: item.commitHash, item, timeLabel, row: graph.rows[index] ?? EMPTY_GRAPH_ROW, width: graphWidth,
454
+ busy, hasRemote, isHead: hasHeadRef(item), onCopy, onCopyMessage, onViewDiff, onUndo, t,
455
+ }));
456
+ }
457
+ }
458
+ return createElement('section', { style: sectionStyle }, createElement('div', { style: sectionHeaderStyle }, createElement('strong', { title: t('git.graphLegend') }, t('git.versionCount', { count: totalCount })), createElement('div', { style: historyHeaderActionsStyle }, createElement('select', {
459
+ value: scope, disabled: busy, className: gitPanelClass.select, style: scopeSelectStyle, title: t('git.scopeHint'), 'aria-label': t('git.scopeLabel'),
460
+ onChange: (event) => onScopeChange(event.currentTarget.value === 'all' ? 'all' : 'head'),
461
+ }, createElement('option', { value: 'head' }, t('git.currentBranch')), createElement('option', { value: 'all' }, t('git.allBranches'))), branches === null ? null : createElement('select', { value: branches.currentBranch, disabled: busy, className: gitPanelClass.select, style: branchSelectStyle, title: t('git.switchBranch'), 'aria-label': t('git.switchBranch'), onChange: (event) => onSwitch(event.currentTarget.value) }, ...branches.local.map((branch) => createElement('option', { key: branch.name, value: branch.name }, branch.name))))), history.length === 0
462
+ ? createElement('div', { style: mutedStyle }, t('git.noCommits'))
463
+ // 行间不能留间距:每行的竖线只画到行底,一旦行与行之间有缝隙,泳道就会断成一段一段。
464
+ : createElement('div', { style: historyListStyle }, ...rows), hasMore ? createElement('button', { type: 'button', disabled: busy || loadingMore, onClick: onLoadMore, className: `${gitPanelClass.button} ${gitPanelClass.field}`, style: loadMoreButtonStyle }, loadingMore ? t('git.loading') : t('git.loadMoreVersions')) : null);
465
+ }
466
+ const EMPTY_GRAPH_ROW = { lane: 0, color: 0, through: [], merges: [], branches: [], top: [], bottom: [] };
467
+ function HistoryGraphRow({ item, timeLabel, row, width, busy, hasRemote, isHead, onCopy, onCopyMessage, onViewDiff, onUndo, t }) {
468
+ const refs = sortHistoryRefs(item.refs ?? []);
469
+ const nodeTitle = describeCommitNode(item, refs, hasRemote, t);
470
+ const [menuOpen, setMenuOpen] = useState(false);
471
+ const menuRef = useRef(null);
472
+ useDismissOnOutsidePointer(menuRef, menuOpen, () => setMenuOpen(false));
473
+ const runMenu = (action) => () => { setMenuOpen(false); action(); };
474
+ return createElement('div', { className: gitPanelClass.row, style: historyRowStyle }, createElement('div', { style: { ...graphGutterStyle, width }, 'aria-hidden': 'true' }, createElement(GitGraphTrack, { row, width, head: isHead, title: nodeTitle }), refs.length === 0 ? null : createElement(GitGraphRails, { lanes: row.bottom, width, fill: true })), createElement('div', { style: historyRowBodyStyle }, createElement('div', { style: historyRowMainStyle }, createElement('code', { style: hashStyle }, item.commitHash.slice(0, 8)), createElement('span', { style: fileNameStyle, title: item.subject }, item.subject), createElement('time', {
475
+ style: historyTimeStyle, dateTime: item.authoredAt,
476
+ title: item.authorName === '' ? item.authoredAt : t('git.authorSuffix', { date: item.authoredAt, author: item.authorName }),
477
+ }, timeLabel), createElement('div', { ref: menuRef, style: menuStyle }, createElement('button', { type: 'button', className: gitPanelClass.menuTrigger, style: iconActionStyle, title: t('git.versionMenu'), 'aria-label': t('git.versionMenu'), 'aria-haspopup': 'menu', 'aria-expanded': menuOpen, onClick: () => setMenuOpen((value) => !value) }, '⋯'), menuOpen && createElement('div', { role: 'menu', 'aria-label': t('git.versionMenu'), className: gitPanelClass.menu, style: menuPopupStyle }, createElement('button', { type: 'button', role: 'menuitem', onClick: runMenu(() => onViewDiff(item.commitHash)), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.viewChangesAndDiff')), createElement('button', { type: 'button', role: 'menuitem', onClick: runMenu(() => onCopy(item.commitHash)), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.copyCommitHash')), createElement('button', { type: 'button', role: 'menuitem', onClick: runMenu(() => onCopyMessage(buildCommitMessageText(item.subject, item.body))), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.copyCommitMessage')), createElement('button', { type: 'button', role: 'menuitem', onClick: runMenu(() => onCopy(item.commitHash)), className: gitPanelClass.menuItem, style: menuItemStyle }, t('git.copyVersionHash')), isHead ? createElement('button', { type: 'button', role: 'menuitem', disabled: busy, onClick: runMenu(onUndo), className: `${gitPanelClass.menuItem} ${gitPanelClass.menuItemDanger}`, style: menuItemStyle }, t('git.undoLastCommit')) : null))), refs.length === 0 ? null : createElement('div', { style: historyRefListStyle }, ...refs.map((ref) => createElement('span', { key: `${ref.kind}:${ref.name}`, title: refTitle(ref, t), className: gitPanelClass.ref, style: historyRefPillStyle(ref.kind, ref.remoteName) }, `${refGlyph(ref.kind)} ${ref.name}`)))));
478
+ }
479
+ /** 标签顺序对齐 VS Code:当前分支 → 本地分支 → 远程分支 → 标签,同一提交的多个引用顺序稳定。 */
480
+ function sortHistoryRefs(refs) {
481
+ const rank = (kind) => kind === 'head' ? 0 : kind === 'local' ? 1 : kind === 'remote' ? 2 : 3;
482
+ return [...refs].sort((left, right) => rank(left.kind) - rank(right.kind) || left.name.localeCompare(right.name));
483
+ }
484
+ /** 未推送的线段画虚线:颜色说明「是谁的提交」,线型说明「还没进任何远程」。 */
485
+ function dashProps(origin) {
486
+ return isUnpushed(origin) ? { strokeDasharray: GRAPH_DASH_ARRAY } : {};
487
+ }
488
+ /** 提交节点与它这一行的连线;坐标按 GRAPH_ROW_HEIGHT 计算,与主行高度严格对齐。 */
489
+ function GitGraphTrack({ row, width, head, title }) {
490
+ const mid = GRAPH_ROW_HEIGHT / 2;
491
+ const nodeX = laneCenterX(row.lane);
492
+ // 节点保持泳道色:颜色负责拓扑,蓝虚线负责「未推送」,两者不互相覆盖。
493
+ const color = laneColor(row.color);
494
+ const children = [];
495
+ if (row.top.some((lane) => lane.lane === row.lane)) {
496
+ children.push(createElement('line', { key: 'node-in', x1: nodeX, y1: 0, x2: nodeX, y2: mid, stroke: segmentStroke(row.incomingOrigin, row.color), strokeWidth: 1.5, ...dashProps(row.incomingOrigin) }));
497
+ }
498
+ for (const lane of row.through) {
499
+ const x = laneCenterX(lane.lane);
500
+ children.push(createElement('line', { key: `through:${lane.lane}`, x1: x, y1: 0, x2: x, y2: GRAPH_ROW_HEIGHT, stroke: laneStroke(lane), strokeWidth: 1.5, ...dashProps(lane.origin) }));
501
+ }
502
+ for (const merge of row.merges) {
503
+ const x = laneCenterX(merge.lane);
504
+ children.push(createElement('path', { key: `merge:${merge.lane}`, d: `M ${x} 0 C ${x} 5 ${nodeX} ${mid - 5} ${nodeX} ${mid}`, fill: 'none', stroke: laneStroke(merge), strokeWidth: 1.5, strokeLinecap: 'round', ...dashProps(merge.origin) }));
505
+ }
506
+ for (const branch of row.branches) {
507
+ const x = laneCenterX(branch.lane);
508
+ if (branch.lane === row.lane)
509
+ children.push(createElement('line', { key: `branch:${branch.lane}`, x1: x, y1: mid, x2: x, y2: GRAPH_ROW_HEIGHT, stroke: laneStroke(branch), strokeWidth: 1.5, ...dashProps(branch.origin) }));
510
+ else
511
+ children.push(createElement('path', { key: `branch:${branch.lane}`, d: `M ${nodeX} ${mid} C ${nodeX} ${mid + 5} ${x} ${GRAPH_ROW_HEIGHT - 5} ${x} ${GRAPH_ROW_HEIGHT}`, fill: 'none', stroke: laneStroke(branch), strokeWidth: 1.5, strokeLinecap: 'round', ...dashProps(branch.origin) }));
512
+ }
513
+ // 与 VS Code 一致:普通提交是实心圆点,当前提交(HEAD)是带外环的靶心,一眼可辨。
514
+ const nodeTitle = title === null ? undefined : createElement('title', { key: 'node-title' }, title);
515
+ if (head) {
516
+ children.push(createElement('circle', { key: 'head-ring', cx: nodeX, cy: mid, r: 6, fill: 'none', stroke: color, strokeWidth: 1.5 }));
517
+ children.push(createElement('circle', { key: 'node', cx: nodeX, cy: mid, r: 3, fill: color, stroke: dshThemeColor.menuBackground, strokeWidth: 1.5 }, nodeTitle));
518
+ }
519
+ else {
520
+ children.push(createElement('circle', { key: 'node', cx: nodeX, cy: mid, r: 3.6, fill: color, stroke: dshThemeColor.menuBackground, strokeWidth: 1.5 }, nodeTitle));
521
+ }
522
+ return createElement('svg', { width, height: GRAPH_ROW_HEIGHT, viewBox: `0 0 ${width} ${GRAPH_ROW_HEIGHT}`, 'aria-hidden': 'true', style: graphTrackStyle }, ...children);
523
+ }
524
+ /** 只画竖直贯穿线:日期分隔行与分支标签行用它延续泳道,避免提交图被行高切断。 */
525
+ function GitGraphRails({ lanes, width, minHeight, fill = false }) {
526
+ return createElement('div', { style: { ...graphRailsStyle, width, ...(minHeight === undefined ? {} : { minHeight }), ...(fill ? { flex: '1 1 auto' } : {}) }, 'aria-hidden': 'true' }, ...lanes.map((lane) => createElement('span', { key: lane.lane, style: graphRailStyle(lane.lane, laneStroke(lane), laneDashed(lane)) })));
527
+ }
528
+ function hasHeadRef(item) {
529
+ return (item.refs ?? []).some((ref) => ref.kind === 'head');
530
+ }
531
+ function refGlyph(kind) {
532
+ return kind === 'head' ? '●' : kind === 'remote' ? '☁' : kind === 'tag' ? '⚑' : '⑂';
533
+ }
534
+ function refTitle(ref, t) {
535
+ const kind = ref.kind === 'head' ? t('git.currentBranch') : ref.kind === 'remote' ? t('git.remoteBranch') : ref.kind === 'tag' ? t('git.tag') : t('git.localBranch');
536
+ return t('git.refTitle', { kind, name: ref.name });
537
+ }
538
+ /** 归属不单独显示文字,只作为节点 tooltip:颜色与虚实已经表达了归属,说明放在悬浮提示里。 */
539
+ function describeCommitOrigin(origin, hasRemote, t) {
540
+ if (origin === undefined)
541
+ return null;
542
+ if (origin === 'local')
543
+ return hasRemote ? t('git.originLocalWithRemote') : t('git.originLocalOnly');
544
+ if (origin === 'synced')
545
+ return t('git.originSynced');
546
+ if (origin === 'remote')
547
+ return t('git.originRemote');
548
+ return t('git.originOtherBranch');
549
+ }
550
+ /** 悬浮节点时显示:短哈希、归属状态、该提交上的分支与标签名称。 */
551
+ function describeCommitNode(item, refs, hasRemote, t) {
552
+ const status = describeCommitOrigin(item.origin, hasRemote, t) ?? t('git.originUnknown');
553
+ const parts = [`${item.commitHash.slice(0, 8)} ${item.subject}`, status];
554
+ if (refs.length > 0)
555
+ parts.push(t('git.branchesAndTags', { refs: refs.map((ref) => refTitle(ref, t)).join(t('git.refSeparator')) }));
556
+ if (item.authorName !== '')
557
+ parts.push(t('git.author', { name: item.authorName }));
558
+ return parts.join('\n');
402
559
  }
403
560
  function buildChangeTree(items) {
404
561
  const root = new Map();
@@ -722,10 +879,10 @@ async function copyText(value) { try {
722
879
  catch {
723
880
  return false;
724
881
  } }
725
- function groupHistoryByDate(history) {
882
+ function groupHistoryByDate(history, t) {
726
883
  const groups = [];
727
884
  for (const [index, item] of history.entries()) {
728
- const timestamp = formatHistoryTimestamp(item.authoredAt);
885
+ const timestamp = formatHistoryTimestamp(item.authoredAt, t);
729
886
  const current = groups.at(-1);
730
887
  if (current?.key === timestamp.key) {
731
888
  current.items.push({ item, index, timeLabel: timestamp.timeLabel });
@@ -735,13 +892,13 @@ function groupHistoryByDate(history) {
735
892
  }
736
893
  return groups;
737
894
  }
738
- function formatHistoryTimestamp(value) {
895
+ function formatHistoryTimestamp(value, t) {
739
896
  const timestamp = Date.parse(value);
740
897
  if (Number.isNaN(timestamp))
741
- return { key: 'unknown', dateLabel: '未知日期', timeLabel: '未知时间' };
898
+ return { key: 'unknown', dateLabel: t('git.unknownDate'), timeLabel: t('git.unknownTime') };
742
899
  const parts = new Intl.DateTimeFormat('zh-CN', { year: 'numeric', month: 'numeric', day: 'numeric', hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }).formatToParts(timestamp);
743
900
  const get = (type) => parts.find((part) => part.type === type)?.value ?? '';
744
- return { key: `${get('year')}-${get('month')}-${get('day')}`, dateLabel: `${get('month')}月${get('day')}日`, timeLabel: `${get('hour')}:${get('minute')}` };
901
+ return { key: `${get('year')}-${get('month')}-${get('day')}`, dateLabel: t('git.dateLabel', { month: get('month'), day: get('day') }), timeLabel: `${get('hour')}:${get('minute')}` };
745
902
  }
746
903
  function buildCommitMessageText(subject, body) { const normalizedSubject = subject.trim(); const normalizedBody = body.trim(); return normalizedBody ? `${normalizedSubject}\n\n${normalizedBody}` : normalizedSubject; }
747
904
  const REMOTE_REF_PALETTE = ['#8b5cf6', '#ef4444', '#10b981', '#f59e0b', '#06b6d4', '#ec4899'];
@@ -753,58 +910,74 @@ function resolveRemotePaletteIndex(remoteName) {
753
910
  hash = (hash * 33 + character.charCodeAt(0)) >>> 0;
754
911
  return hash % REMOTE_REF_PALETTE.length;
755
912
  }
913
+ /**
914
+ * 分支标签的配色按「在哪」分色,而不是按名称:当前分支=品牌蓝,本地分支=绿,
915
+ * 远程分支=按远程名散列到固定调色板,标签=琥珀。色相拉开后,一眼就能区分本地与远程。
916
+ */
756
917
  function historyRefPillStyle(kind, remoteName) {
757
918
  if (kind === 'remote') {
758
919
  const color = REMOTE_REF_PALETTE[resolveRemotePaletteIndex(remoteName)];
759
- return { ...historyRefPillBaseStyle, border: `1px solid color-mix(in srgb, ${color} 34%, transparent)`, background: `color-mix(in srgb, ${color} 14%, transparent)`, color };
920
+ return { ...historyRefPillBaseStyle, border: `.5px solid color-mix(in srgb, ${color} 40%, transparent)`, background: `color-mix(in srgb, ${color} 14%, transparent)`, color };
760
921
  }
761
- const color = kind === 'head' ? '#4f9cff' : '#67b0ff';
762
- const mix = kind === 'head' ? { border: 36, background: 18 } : { border: 28, background: 12 };
763
- return { ...historyRefPillBaseStyle, border: `1px solid color-mix(in srgb, ${color} ${mix.border}%, transparent)`, background: `color-mix(in srgb, ${color} ${mix.background}%, transparent)`, color: '#2b74d8' };
764
- }
765
- const panelStyle = { position: 'relative', userSelect: 'none', boxSizing: 'border-box', display: 'flex', flexDirection: 'column', gap: 12, minHeight: '100%', padding: '16px 18px 24px', overflow: 'auto', background: dshThemeColor.pageBackground, color: dshThemeColor.labelPrimary };
766
- const headerStyle = { display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: 12, paddingBottom: 10, borderBottom: `1px solid ${dshThemeColor.border}` };
767
- const titleStyle = { margin: 0, fontSize: 20, lineHeight: 1.2 };
922
+ if (kind === 'tag')
923
+ return { ...historyRefPillBaseStyle, border: '.5px solid color-mix(in srgb, #d98324 42%, transparent)', background: 'color-mix(in srgb, #d98324 15%, transparent)', color: '#b26a12' };
924
+ // 本地分支用绿色,与远程调色板中的绿区分开:本地分支恒为绿,远程绿只出现在同名远程上。
925
+ if (kind === 'local')
926
+ return { ...historyRefPillBaseStyle, border: '.5px solid color-mix(in srgb, #10b981 40%, transparent)', background: 'color-mix(in srgb, #10b981 14%, transparent)', color: '#0f8a63' };
927
+ return { ...historyRefPillBaseStyle, border: '.5px solid color-mix(in srgb, #4f9cff 42%, transparent)', background: 'color-mix(in srgb, #4f9cff 16%, transparent)', color: '#2b74d8' };
928
+ }
929
+ function graphRailStyle(lane, stroke, dashed = false) {
930
+ const background = dashed ? `repeating-linear-gradient(to bottom, ${stroke} 0 3px, transparent 3px 6px)` : stroke;
931
+ return { position: 'absolute', top: 0, bottom: 0, left: laneCenterX(lane) - 0.75, width: 1.5, borderRadius: dashed ? 0 : 1, background };
932
+ }
933
+ // 面板根节点不再铺底色:DSH 右侧栏的其它面板都是透明的,继承 Sidebar 表面色才不会出现色块接缝。
934
+ const panelStyle = { position: 'relative', userSelect: 'none', boxSizing: 'border-box', display: 'flex', flexDirection: 'column', gap: 12, minHeight: '100%', padding: '12px 14px 20px', overflow: 'auto', color: dshThemeColor.labelPrimary };
935
+ const headerStyle = { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12, minHeight: 28 };
768
936
  const tabTitleStyle = { display: 'inline-flex', alignItems: 'center', minWidth: 0, color: dshThemeColor.labelPrimary, fontSize: 12 };
769
937
  const headerActionsStyle = { display: 'inline-flex', alignItems: 'center', gap: 4 };
770
- const columnSwitchStyle = { display: 'inline-flex', alignItems: 'center', gap: 2, padding: 2, border: `1px solid ${dshThemeColor.border}`, borderRadius: 5, background: dshThemeColor.pageBackground };
771
- const columnSwitchButtonStyle = { border: 0, borderRadius: 3, padding: '3px 6px', color: dshThemeColor.labelSecondary, background: 'transparent', cursor: 'pointer', fontSize: 11, whiteSpace: 'nowrap' };
772
- const columnSwitchActiveButtonStyle = { ...columnSwitchButtonStyle, color: dshThemeColor.accent, background: 'color-mix(in srgb, currentColor 12%, transparent)', fontWeight: 600 };
938
+ // SegmentedControl 自带 indicator 与键盘走查;外层占满面板宽度后再将控件居中。
939
+ const columnSwitchStyle = { display: 'flex', alignItems: 'center', justifyContent: 'center', width: '100%', minWidth: 0 };
773
940
  const summaryStyle = { color: dshThemeColor.labelSecondary, fontSize: 12 };
774
941
  const contentGridStyle = { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', alignItems: 'start', gap: 12 };
775
942
  const columnStyle = { display: 'flex', flexDirection: 'column', gap: 12, minWidth: 0 };
776
- const sectionStyle = { display: 'flex', flexDirection: 'column', gap: 8, padding: 10, border: `1px solid ${dshThemeColor.border}`, borderRadius: 6, background: dshThemeColor.menuBackground };
777
- const sectionHeaderStyle = { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8, fontSize: 12 };
943
+ // 卡片用 layer-1:与 DSH 内置卡片同层,暗色下只比侧栏表面亮一档。
944
+ const sectionStyle = { display: 'flex', flexDirection: 'column', gap: 8, padding: 10, border: `.5px solid ${dshThemeColor.menuBorder}`, borderRadius: 8, background: dshThemeColor.cardBackground };
945
+ const sectionHeaderStyle = { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8, minHeight: 24, fontSize: 12 };
778
946
  const treeStyle = { display: 'flex', flexDirection: 'column', gap: 1 };
779
947
  const treeDirectoryStyle = { minWidth: 0 };
780
- const treeRowStyle = { display: 'flex', alignItems: 'center', gap: 7, minHeight: 28, fontSize: 12 };
948
+ const treeRowStyle = { display: 'flex', alignItems: 'center', gap: 7, minHeight: 28, paddingLeft: 4, paddingRight: 2, borderRadius: 4, fontSize: 12 };
781
949
  const treeChevronStyle = { width: 12, color: dshThemeColor.labelTertiary, fontSize: 12 };
782
950
  const folderIconStyle = { color: dshThemeColor.accent, fontSize: 11 };
783
951
  const fileIconStyle = { width: 12, color: dshThemeColor.labelTertiary, fontSize: 12, textAlign: 'center' };
784
952
  const fileNameStyle = { minWidth: 0, flex: 1, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
785
- const fileStatusStyle = { color: dshThemeColor.labelTertiary, fontFamily: 'monospace', fontSize: 11 };
786
- const historyRowStyle = { display: 'flex', flexDirection: 'column', gap: 3, fontSize: 12 };
787
- const historyRowMainStyle = { display: 'flex', alignItems: 'center', gap: 8, minWidth: 0, minHeight: 28 };
953
+ const fileStatusStyle = { color: dshThemeColor.labelTertiary, fontFamily: dshThemeColor.codeFont, fontSize: 11 };
954
+ const historyListStyle = { display: 'flex', flexDirection: 'column', gap: 0, minWidth: 0 };
955
+ const historyRowStyle = { display: 'flex', alignItems: 'stretch', minWidth: 0, fontSize: 12 };
956
+ const historyRowBodyStyle = { display: 'flex', flexDirection: 'column', gap: 3, minWidth: 0, flex: '1 1 auto' };
957
+ const historyRowMainStyle = { display: 'flex', alignItems: 'center', gap: 8, minWidth: 0, minHeight: 28, paddingLeft: 4, paddingRight: 2, borderRadius: 4 };
958
+ const graphGutterStyle = { display: 'flex', flexDirection: 'column', flex: '0 0 auto', alignSelf: 'stretch', marginRight: 6 };
959
+ const graphTrackStyle = { display: 'block', flex: '0 0 auto', overflow: 'visible' };
960
+ const graphRailsStyle = { position: 'relative', flex: '0 0 auto', alignSelf: 'stretch', minHeight: 0 };
961
+ const historyHeaderActionsStyle = { display: 'inline-flex', alignItems: 'center', gap: 6, flexWrap: 'wrap', justifyContent: 'flex-end' };
788
962
  const historyRefListStyle = { display: 'flex', flexWrap: 'wrap', gap: '4px 6px', paddingLeft: 2 };
789
- const historyRefPillBaseStyle = { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', minHeight: 18, padding: '0 8px', borderRadius: 999, fontSize: 10, lineHeight: 1, whiteSpace: 'nowrap' };
790
- const historyDateHeaderStyle = { paddingTop: 6, color: dshThemeColor.labelSecondary, fontSize: 11, fontWeight: 600 };
791
- const historyDateHeaderTextStyle = { display: 'block' };
792
- const hashStyle = { color: dshThemeColor.labelTertiary, fontSize: 11 };
963
+ // 尺寸对齐 DSH Pill:20px 高、11px 字号;颜色仍按来源区分,颜色是唯一的语义载体。
964
+ const historyRefPillBaseStyle = { justifyContent: 'center', height: 20, padding: '0 8px', fontSize: 11, lineHeight: '17px' };
965
+ const historyDateHeaderStyle = { display: 'flex', alignItems: 'stretch', color: dshThemeColor.labelSecondary, fontSize: 11, fontWeight: 600 };
966
+ const historyDateHeaderTextStyle = { display: 'block', minWidth: 0, paddingTop: 8 };
967
+ const hashStyle = { color: dshThemeColor.labelTertiary, fontFamily: dshThemeColor.codeFont, fontSize: 11 };
793
968
  const rowActionsStyle = { display: 'inline-flex', alignItems: 'center', gap: 2, flex: '0 0 auto' };
794
- const iconButtonStyle = { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 24, height: 24, border: 0, borderRadius: 4, padding: 0, color: dshThemeColor.labelSecondary, background: 'transparent', cursor: 'pointer', fontSize: 16 };
795
- const dangerIconButtonStyle = { ...iconButtonStyle, color: dshThemeColor.error };
796
969
  const mutedStyle = { color: dshThemeColor.labelTertiary, fontSize: 11 };
797
970
  const historyTimeStyle = { ...mutedStyle, flex: '0 0 auto', fontVariantNumeric: 'tabular-nums' };
798
971
  const emptyStyle = { padding: 16, color: dshThemeColor.labelSecondary, fontSize: 12 };
799
- const diffOverlayStyle = { position: 'fixed', inset: 0, zIndex: 1000, display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 20, boxSizing: 'border-box', background: 'color-mix(in srgb, #000 28%, transparent)' };
800
- const diffStyle = { ...sectionStyle, width: 'min(1000px, 100%)', maxHeight: 'min(88vh, 760px)', overflow: 'hidden', boxShadow: dshThemeColor.subtleShadow };
972
+ const diffOverlayStyle = { position: 'fixed', inset: 0, zIndex: 1000, display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 20, boxSizing: 'border-box', background: dshThemeColor.overlay };
973
+ const diffStyle = { ...sectionStyle, width: 'min(1000px, 100%)', maxHeight: 'min(88vh, 760px)', overflow: 'hidden', background: dshThemeColor.menuBackground, boxShadow: dshThemeColor.prominentShadow };
801
974
  const diffBodyStyle = { display: 'flex', flexDirection: 'column', gap: 12, minHeight: 0, overflow: 'auto', paddingRight: 2 };
802
975
  const diffFilesSectionStyle = { ...sectionStyle, gap: 6, padding: 10, background: dshThemeColor.pageBackground };
803
976
  const diffDiffSectionStyle = { ...sectionStyle, gap: 6, padding: 10, background: dshThemeColor.pageBackground };
804
977
  const diffSectionHeaderStyle = { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8, minHeight: 24, fontSize: 12 };
805
- const diffCountStyle = { minWidth: 20, padding: '2px 6px', borderRadius: 10, color: dshThemeColor.labelSecondary, background: dshThemeColor.menuBackground, fontSize: 11, textAlign: 'center' };
978
+ const diffCountStyle = { minWidth: 20, padding: '2px 6px', borderRadius: 999, color: dshThemeColor.labelSecondary, background: dshThemeColor.surfaceSubtle, fontSize: 11, textAlign: 'center' };
806
979
  const diffFileListStyle = { display: 'flex', flexDirection: 'column', gap: 2 };
807
- const diffFileRowStyle = { display: 'flex', alignItems: 'center', gap: 8, minHeight: 30, padding: '4px 6px', borderRadius: 4, background: dshThemeColor.menuBackground, fontSize: 12 };
980
+ const diffFileRowStyle = { display: 'flex', alignItems: 'center', gap: 8, minHeight: 30, padding: '4px 6px', borderRadius: 4, background: dshThemeColor.surfaceSubtle, fontSize: 12 };
808
981
  const diffFileStatusStyle = { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 42, flex: '0 0 auto', color: dshThemeColor.accent, fontSize: 11, fontWeight: 700 };
809
982
  const diffFileNameStyle = { display: 'flex', flexDirection: 'column', minWidth: 0, flex: 1, overflow: 'hidden' };
810
983
  const diffFileOldPathStyle = { overflow: 'hidden', color: dshThemeColor.labelTertiary, textOverflow: 'ellipsis', whiteSpace: 'nowrap', fontSize: 11 };
@@ -812,35 +985,38 @@ const diffBinaryStyle = { color: dshThemeColor.labelTertiary, fontSize: 11 };
812
985
  const fileDiffTitleStyle = { ...fileNameStyle, fontSize: 12 };
813
986
  const diffTruncatedStyle = { color: dshThemeColor.labelTertiary, fontSize: 11 };
814
987
  const diffEmptyStyle = { padding: 10, color: dshThemeColor.labelTertiary, fontSize: 12 };
815
- const diffLinesStyle = { overflow: 'auto', border: `1px solid ${dshThemeColor.border}`, borderRadius: 4, background: dshThemeColor.pageBackground, fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace', fontSize: 12 };
988
+ const diffLinesStyle = { overflow: 'auto', border: `.5px solid ${dshThemeColor.menuBorder}`, borderRadius: 8, background: dshThemeColor.pageBackground, fontFamily: dshThemeColor.codeFont, fontSize: 12 };
816
989
  const diffLineBaseStyle = { display: 'grid', gridTemplateColumns: '42px 42px minmax(0, 1fr)', minHeight: 21, alignItems: 'stretch', padding: '0 8px', whiteSpace: 'pre', overflowWrap: 'normal', lineHeight: 1.5 };
817
- const diffLineNumberStyle = { paddingRight: 8, color: dshThemeColor.labelTertiary, borderRight: `1px solid ${dshThemeColor.border}`, textAlign: 'right', userSelect: 'none' };
990
+ const diffLineNumberStyle = { paddingRight: 8, color: dshThemeColor.labelTertiary, borderRight: `.5px solid ${dshThemeColor.menuBorder}`, textAlign: 'right', userSelect: 'none' };
818
991
  const diffCodeStyle = { minWidth: 0, paddingLeft: 10, color: 'inherit', font: 'inherit', overflow: 'visible' };
819
- const commitSectionStyle = { ...sectionStyle, gap: 14, padding: '16px 14px 12px' };
820
- const commitEditorRowStyle = { display: 'flex', alignItems: 'center', gap: 8, minWidth: 0 };
821
- const commitSubjectStyle = { width: '100%', minHeight: 30, boxSizing: 'border-box', resize: 'none', border: 0, outline: 'none', padding: '3px 0', color: dshThemeColor.labelPrimary, background: 'transparent', font: 'inherit', fontSize: 16 };
822
- const draftButtonStyle = { ...iconButtonStyle, width: 30, height: 30, color: dshThemeColor.labelSecondary, fontSize: 21 };
992
+ const commitSectionStyle = { ...sectionStyle, gap: 10 };
993
+ /** 提交框与「生成提交信息」按钮同高,输入面沿用面板的表单风格(边框 + 输入底色 + 8px 圆角)。 */
994
+ const commitEditorRowStyle = { display: 'flex', alignItems: 'stretch', gap: 8, minWidth: 0 };
995
+ const commitSubjectStyle = { width: '100%', minHeight: 34, boxSizing: 'border-box', resize: 'none', padding: '7px 10px', borderRadius: 8, font: 'inherit', fontSize: 12, lineHeight: '16px' };
996
+ const draftButtonStyle = { width: 34, flex: '0 0 auto', padding: 0, borderRadius: 8, fontSize: 16, lineHeight: 1 };
823
997
  const commitActionsStyle = { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 };
824
- const refreshActionStyle = { minHeight: 30, border: 0, borderRadius: 5, background: 'transparent', color: dshThemeColor.labelSecondary, cursor: 'pointer', fontSize: 13 };
825
- const submitActionStyle = { ...refreshActionStyle, color: dshThemeColor.accent, fontWeight: 600 };
826
- const primaryButtonStyle = { minHeight: 28, border: 0, borderRadius: 5, padding: '4px 9px', color: '#fff', background: dshThemeColor.accent, cursor: 'pointer', fontSize: 12 };
827
- const branchSelectStyle = { maxWidth: 150, border: `1px solid ${dshThemeColor.border}`, borderRadius: 4, padding: '3px 5px', color: dshThemeColor.labelSecondary, background: dshThemeColor.pageBackground, fontSize: 11 };
828
- const loadMoreButtonStyle = { minHeight: 30, border: `1px solid ${dshThemeColor.border}`, borderRadius: 5, padding: '4px 9px', color: dshThemeColor.labelSecondary, background: 'transparent', cursor: 'pointer', fontSize: 12 };
998
+ const refreshActionStyle = { minHeight: 32, padding: '6px 12px', borderRadius: 8, fontSize: 12, lineHeight: '16px' };
999
+ // 主按钮沿用 DSH 品牌填充与前景色,暗色下自动变成浅底深字,与内置主按钮一致。
1000
+ const submitActionStyle = { ...refreshActionStyle };
1001
+ const primaryButtonStyle = { minHeight: 30, padding: '5px 12px', borderRadius: 8, fontSize: 12 };
1002
+ const branchSelectStyle = { maxWidth: 150, borderRadius: 8, padding: '3px 5px', fontSize: 11 };
1003
+ const scopeSelectStyle = { ...branchSelectStyle, maxWidth: 92 };
1004
+ const loadMoreButtonStyle = { minHeight: 30, borderRadius: 8, padding: '4px 9px', fontSize: 12 };
829
1005
  const menuStyle = { position: 'relative', flex: '0 0 auto' };
830
- const menuSummaryStyle = { listStyle: 'none', cursor: 'pointer', padding: '0 4px', color: dshThemeColor.labelSecondary, fontSize: 16 };
831
- const menuPopupStyle = { position: 'absolute', right: 0, zIndex: 2, display: 'flex', flexDirection: 'column', gap: 2, minWidth: 100, padding: 4, border: `1px solid ${dshThemeColor.border}`, borderRadius: 5, background: dshThemeColor.menuBackground, boxShadow: dshThemeColor.subtleShadow };
832
- const menuButtonStyle = { border: 0, padding: '5px 7px', color: dshThemeColor.labelPrimary, background: 'transparent', textAlign: 'left', cursor: 'pointer', fontSize: 11 };
833
- const dangerMenuButtonStyle = { ...menuButtonStyle, color: dshThemeColor.error };
1006
+ const operationStatusStyle = { display: 'inline-flex', alignItems: 'center', gap: 5, color: dshThemeColor.labelSecondary, fontSize: 11, whiteSpace: 'nowrap' };
1007
+ const menuPopupStyle = { position: 'absolute', right: 0, zIndex: 2, display: 'flex', flexDirection: 'column', gap: 2, minWidth: 120, padding: 4 };
1008
+ const iconActionStyle = { width: 28, height: 28 };
1009
+ const menuItemStyle = { padding: '6px 8px' };
834
1010
  export const gitManagementFeature = {
835
1011
  descriptor: {
836
1012
  name: 'gitManagement', version: '0.1.0', enabledByDefault: true, dependencies: [], runtime: 'client',
837
- ui: { label: 'Git 仓库管理', description: '在右侧 Sidebar 标签页查看提交、暂存文件、未提交文件和 Git 版本历史。', order: 40, defaultOpen: false },
1013
+ ui: { label: 'Git repository management', labelKey: 'feature.gitManagement.label', description: 'View changes and manage commits', descriptionKey: 'feature.gitManagement.description', order: 40, defaultOpen: false },
838
1014
  },
839
1015
  start(context) {
840
1016
  const uiContext = context.services.uiContext;
841
1017
  if (uiContext === undefined)
842
1018
  throw new Error('Git 管理模块缺少 DSH UI 上下文');
843
- context.resources.add(registerGitManagementUi(uiContext, { rpc: context.services.rpc, remote: context.services.remote }));
1019
+ context.resources.add(registerGitManagementUi(uiContext, { rpc: context.services.rpc, remote: context.services.remote, locale: context.services.locale }));
844
1020
  },
845
1021
  };
846
1022
  //# sourceMappingURL=git-management.js.map