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