@nanocollective/nanocoder 1.21.0 → 1.22.0

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 (347) hide show
  1. package/README.md +59 -4
  2. package/assets/nanocoder-vscode.vsix +0 -0
  3. package/dist/ai-sdk-client/ai-sdk-client.d.ts.map +1 -1
  4. package/dist/ai-sdk-client/ai-sdk-client.js.map +1 -1
  5. package/dist/ai-sdk-client/chat/chat-handler.d.ts.map +1 -1
  6. package/dist/ai-sdk-client/chat/chat-handler.js +1 -0
  7. package/dist/ai-sdk-client/chat/chat-handler.js.map +1 -1
  8. package/dist/ai-sdk-client/providers/provider-factory.d.ts +6 -3
  9. package/dist/ai-sdk-client/providers/provider-factory.d.ts.map +1 -1
  10. package/dist/ai-sdk-client/providers/provider-factory.js +18 -4
  11. package/dist/ai-sdk-client/providers/provider-factory.js.map +1 -1
  12. package/dist/app/App.d.ts.map +1 -1
  13. package/dist/app/App.js +16 -16
  14. package/dist/app/App.js.map +1 -1
  15. package/dist/app/components/modal-selectors.d.ts +3 -10
  16. package/dist/app/components/modal-selectors.d.ts.map +1 -1
  17. package/dist/app/components/modal-selectors.js +4 -12
  18. package/dist/app/components/modal-selectors.js.map +1 -1
  19. package/dist/app/components/settings-selector.d.ts +6 -0
  20. package/dist/app/components/settings-selector.d.ts.map +1 -0
  21. package/dist/app/components/settings-selector.js +289 -0
  22. package/dist/app/components/settings-selector.js.map +1 -0
  23. package/dist/app/utils/app-util.d.ts.map +1 -1
  24. package/dist/app/utils/app-util.js +11 -16
  25. package/dist/app/utils/app-util.js.map +1 -1
  26. package/dist/client-factory.js +4 -0
  27. package/dist/client-factory.js.map +1 -1
  28. package/dist/commands/clear.d.ts.map +1 -1
  29. package/dist/commands/clear.js +8 -5
  30. package/dist/commands/clear.js.map +1 -1
  31. package/dist/commands/custom-commands.d.ts.map +1 -1
  32. package/dist/commands/custom-commands.js +1 -1
  33. package/dist/commands/custom-commands.js.map +1 -1
  34. package/dist/commands/explorer.d.ts +3 -0
  35. package/dist/commands/explorer.d.ts.map +1 -0
  36. package/dist/commands/explorer.js +10 -0
  37. package/dist/commands/explorer.js.map +1 -0
  38. package/dist/commands/help.d.ts.map +1 -1
  39. package/dist/commands/help.js +1 -1
  40. package/dist/commands/help.js.map +1 -1
  41. package/dist/commands/index.d.ts +3 -3
  42. package/dist/commands/index.d.ts.map +1 -1
  43. package/dist/commands/index.js +3 -3
  44. package/dist/commands/index.js.map +1 -1
  45. package/dist/commands/init.d.ts.map +1 -1
  46. package/dist/commands/init.js +1 -1
  47. package/dist/commands/init.js.map +1 -1
  48. package/dist/commands/lsp.d.ts.map +1 -1
  49. package/dist/commands/lsp.js +1 -1
  50. package/dist/commands/lsp.js.map +1 -1
  51. package/dist/commands/mcp.d.ts.map +1 -1
  52. package/dist/commands/mcp.js +1 -1
  53. package/dist/commands/mcp.js.map +1 -1
  54. package/dist/commands/model-database.d.ts.map +1 -1
  55. package/dist/commands/model-database.js +3 -3
  56. package/dist/commands/model-database.js.map +1 -1
  57. package/dist/commands/settings.d.ts +3 -0
  58. package/dist/commands/settings.d.ts.map +1 -0
  59. package/dist/commands/{theme.js → settings.js} +4 -4
  60. package/dist/commands/settings.js.map +1 -0
  61. package/dist/commands/tasks.d.ts +3 -0
  62. package/dist/commands/tasks.d.ts.map +1 -0
  63. package/dist/commands/tasks.js +117 -0
  64. package/dist/commands/tasks.js.map +1 -0
  65. package/dist/commands/usage.d.ts.map +1 -1
  66. package/dist/commands/usage.js +31 -9
  67. package/dist/commands/usage.js.map +1 -1
  68. package/dist/components/assistant-message.d.ts.map +1 -1
  69. package/dist/components/assistant-message.js +39 -6
  70. package/dist/components/assistant-message.js.map +1 -1
  71. package/dist/components/checkpoint-selector.d.ts.map +1 -1
  72. package/dist/components/checkpoint-selector.js +3 -3
  73. package/dist/components/checkpoint-selector.js.map +1 -1
  74. package/dist/components/file-explorer/index.d.ts +3 -0
  75. package/dist/components/file-explorer/index.d.ts.map +1 -0
  76. package/dist/components/file-explorer/index.js +318 -0
  77. package/dist/components/file-explorer/index.js.map +1 -0
  78. package/dist/components/file-explorer/tree-item.d.ts +3 -0
  79. package/dist/components/file-explorer/tree-item.d.ts.map +1 -0
  80. package/dist/components/file-explorer/tree-item.js +42 -0
  81. package/dist/components/file-explorer/tree-item.js.map +1 -0
  82. package/dist/components/file-explorer/utils.d.ts +18 -0
  83. package/dist/components/file-explorer/utils.d.ts.map +1 -0
  84. package/dist/components/file-explorer/utils.js +51 -0
  85. package/dist/components/file-explorer/utils.js.map +1 -0
  86. package/dist/components/file-explorer.d.ts +2 -0
  87. package/dist/components/file-explorer.d.ts.map +1 -0
  88. package/dist/components/file-explorer.js +3 -0
  89. package/dist/components/file-explorer.js.map +1 -0
  90. package/dist/components/message-box.d.ts +1 -0
  91. package/dist/components/message-box.d.ts.map +1 -1
  92. package/dist/components/message-box.js +2 -2
  93. package/dist/components/message-box.js.map +1 -1
  94. package/dist/components/model-selector.d.ts.map +1 -1
  95. package/dist/components/model-selector.js +3 -3
  96. package/dist/components/model-selector.js.map +1 -1
  97. package/dist/components/provider-selector.d.ts.map +1 -1
  98. package/dist/components/provider-selector.js +1 -1
  99. package/dist/components/provider-selector.js.map +1 -1
  100. package/dist/components/security-disclaimer.d.ts.map +1 -1
  101. package/dist/components/security-disclaimer.js +1 -1
  102. package/dist/components/security-disclaimer.js.map +1 -1
  103. package/dist/components/status.d.ts.map +1 -1
  104. package/dist/components/status.js +1 -1
  105. package/dist/components/status.js.map +1 -1
  106. package/dist/components/task-list-display.d.ts +8 -0
  107. package/dist/components/task-list-display.d.ts.map +1 -0
  108. package/dist/components/task-list-display.js +26 -0
  109. package/dist/components/task-list-display.js.map +1 -0
  110. package/dist/components/tool-message.d.ts.map +1 -1
  111. package/dist/components/tool-message.js +1 -1
  112. package/dist/components/tool-message.js.map +1 -1
  113. package/dist/components/ui/styled-title.js +38 -38
  114. package/dist/components/usage/progress-bar.d.ts.map +1 -1
  115. package/dist/components/usage/progress-bar.js +6 -3
  116. package/dist/components/usage/progress-bar.js.map +1 -1
  117. package/dist/components/usage/usage-display.d.ts.map +1 -1
  118. package/dist/components/usage/usage-display.js +1 -1
  119. package/dist/components/usage/usage-display.js.map +1 -1
  120. package/dist/components/user-input.d.ts.map +1 -1
  121. package/dist/components/user-input.js +35 -2
  122. package/dist/components/user-input.js.map +1 -1
  123. package/dist/components/user-message.d.ts.map +1 -1
  124. package/dist/components/user-message.js +43 -12
  125. package/dist/components/user-message.js.map +1 -1
  126. package/dist/components/welcome-message.d.ts.map +1 -1
  127. package/dist/components/welcome-message.js +1 -1
  128. package/dist/components/welcome-message.js.map +1 -1
  129. package/dist/config/preferences.d.ts +1 -0
  130. package/dist/config/preferences.d.ts.map +1 -1
  131. package/dist/config/preferences.js +5 -0
  132. package/dist/config/preferences.js.map +1 -1
  133. package/dist/config/themes.d.ts.map +1 -1
  134. package/dist/config/themes.js +340 -0
  135. package/dist/config/themes.js.map +1 -1
  136. package/dist/constants.d.ts +3 -0
  137. package/dist/constants.d.ts.map +1 -1
  138. package/dist/constants.js +63 -0
  139. package/dist/constants.js.map +1 -1
  140. package/dist/hooks/chat-handler/conversation/conversation-loop.d.ts +1 -0
  141. package/dist/hooks/chat-handler/conversation/conversation-loop.d.ts.map +1 -1
  142. package/dist/hooks/chat-handler/conversation/conversation-loop.js +10 -1
  143. package/dist/hooks/chat-handler/conversation/conversation-loop.js.map +1 -1
  144. package/dist/hooks/chat-handler/useChatHandler.d.ts.map +1 -1
  145. package/dist/hooks/chat-handler/useChatHandler.js +5 -0
  146. package/dist/hooks/chat-handler/useChatHandler.js.map +1 -1
  147. package/dist/hooks/useAppHandlers.d.ts +2 -3
  148. package/dist/hooks/useAppHandlers.d.ts.map +1 -1
  149. package/dist/hooks/useAppHandlers.js +2 -3
  150. package/dist/hooks/useAppHandlers.js.map +1 -1
  151. package/dist/hooks/useAppInitialization.d.ts.map +1 -1
  152. package/dist/hooks/useAppInitialization.js +7 -4
  153. package/dist/hooks/useAppInitialization.js.map +1 -1
  154. package/dist/hooks/useAppState.d.ts +4 -6
  155. package/dist/hooks/useAppState.d.ts.map +1 -1
  156. package/dist/hooks/useAppState.js +6 -9
  157. package/dist/hooks/useAppState.js.map +1 -1
  158. package/dist/hooks/useModeHandlers.d.ts +8 -14
  159. package/dist/hooks/useModeHandlers.d.ts.map +1 -1
  160. package/dist/hooks/useModeHandlers.js +22 -60
  161. package/dist/hooks/useModeHandlers.js.map +1 -1
  162. package/dist/hooks/useUIState.d.ts +2 -0
  163. package/dist/hooks/useUIState.d.ts.map +1 -1
  164. package/dist/hooks/useUIState.js +11 -1
  165. package/dist/hooks/useUIState.js.map +1 -1
  166. package/dist/models/models-dev-client.d.ts.map +1 -1
  167. package/dist/models/models-dev-client.js +57 -37
  168. package/dist/models/models-dev-client.js.map +1 -1
  169. package/dist/tools/git/git-add.d.ts +8 -0
  170. package/dist/tools/git/git-add.d.ts.map +1 -0
  171. package/dist/tools/git/git-add.js +141 -0
  172. package/dist/tools/git/git-add.js.map +1 -0
  173. package/dist/tools/git/git-branch.d.ts +8 -0
  174. package/dist/tools/git/git-branch.d.ts.map +1 -0
  175. package/dist/tools/git/git-branch.js +251 -0
  176. package/dist/tools/git/git-branch.js.map +1 -0
  177. package/dist/tools/git/git-commit.d.ts +8 -0
  178. package/dist/tools/git/git-commit.d.ts.map +1 -0
  179. package/dist/tools/git/git-commit.js +176 -0
  180. package/dist/tools/git/git-commit.js.map +1 -0
  181. package/dist/tools/git/git-diff.d.ts +8 -0
  182. package/dist/tools/git/git-diff.d.ts.map +1 -0
  183. package/dist/tools/git/git-diff.js +136 -0
  184. package/dist/tools/git/git-diff.js.map +1 -0
  185. package/dist/tools/git/git-log.d.ts +8 -0
  186. package/dist/tools/git/git-log.d.ts.map +1 -0
  187. package/dist/tools/git/git-log.js +146 -0
  188. package/dist/tools/git/git-log.js.map +1 -0
  189. package/dist/tools/git/git-pr.d.ts +8 -0
  190. package/dist/tools/git/git-pr.d.ts.map +1 -0
  191. package/dist/tools/git/git-pr.js +252 -0
  192. package/dist/tools/git/git-pr.js.map +1 -0
  193. package/dist/tools/git/git-pull.d.ts +8 -0
  194. package/dist/tools/git/git-pull.d.ts.map +1 -0
  195. package/dist/tools/git/git-pull.js +151 -0
  196. package/dist/tools/git/git-pull.js.map +1 -0
  197. package/dist/tools/git/git-push.d.ts +8 -0
  198. package/dist/tools/git/git-push.d.ts.map +1 -0
  199. package/dist/tools/git/git-push.js +157 -0
  200. package/dist/tools/git/git-push.js.map +1 -0
  201. package/dist/tools/git/git-reset.d.ts +8 -0
  202. package/dist/tools/git/git-reset.d.ts.map +1 -0
  203. package/dist/tools/git/git-reset.js +183 -0
  204. package/dist/tools/git/git-reset.js.map +1 -0
  205. package/dist/tools/git/git-stash.d.ts +8 -0
  206. package/dist/tools/git/git-stash.d.ts.map +1 -0
  207. package/dist/tools/git/git-stash.js +260 -0
  208. package/dist/tools/git/git-stash.js.map +1 -0
  209. package/dist/tools/git/git-status.d.ts +8 -0
  210. package/dist/tools/git/git-status.d.ts.map +1 -0
  211. package/dist/tools/git/git-status.js +233 -0
  212. package/dist/tools/git/git-status.js.map +1 -0
  213. package/dist/tools/git/index.d.ts +9 -12
  214. package/dist/tools/git/index.d.ts.map +1 -1
  215. package/dist/tools/git/index.js +43 -11
  216. package/dist/tools/git/index.js.map +1 -1
  217. package/dist/tools/git/utils.d.ts +136 -23
  218. package/dist/tools/git/utils.d.ts.map +1 -1
  219. package/dist/tools/git/utils.js +405 -360
  220. package/dist/tools/git/utils.js.map +1 -1
  221. package/dist/tools/index.d.ts.map +1 -1
  222. package/dist/tools/index.js +15 -9
  223. package/dist/tools/index.js.map +1 -1
  224. package/dist/tools/string-replace.d.ts.map +1 -1
  225. package/dist/tools/string-replace.js +68 -16
  226. package/dist/tools/string-replace.js.map +1 -1
  227. package/dist/tools/tasks/create-task.d.ts +3 -0
  228. package/dist/tools/tasks/create-task.d.ts.map +1 -0
  229. package/dist/tools/tasks/create-task.js +101 -0
  230. package/dist/tools/tasks/create-task.js.map +1 -0
  231. package/dist/tools/tasks/delete-task.d.ts +3 -0
  232. package/dist/tools/tasks/delete-task.d.ts.map +1 -0
  233. package/dist/tools/tasks/delete-task.js +101 -0
  234. package/dist/tools/tasks/delete-task.js.map +1 -0
  235. package/dist/tools/tasks/index.d.ts +7 -0
  236. package/dist/tools/tasks/index.d.ts.map +1 -0
  237. package/dist/tools/tasks/index.js +6 -0
  238. package/dist/tools/tasks/index.js.map +1 -0
  239. package/dist/tools/tasks/list-tasks.d.ts +3 -0
  240. package/dist/tools/tasks/list-tasks.d.ts.map +1 -0
  241. package/dist/tools/tasks/list-tasks.js +67 -0
  242. package/dist/tools/tasks/list-tasks.js.map +1 -0
  243. package/dist/tools/tasks/storage.d.ts +7 -0
  244. package/dist/tools/tasks/storage.d.ts.map +1 -0
  245. package/dist/tools/tasks/storage.js +31 -0
  246. package/dist/tools/tasks/storage.js.map +1 -0
  247. package/dist/tools/tasks/types.d.ts +11 -0
  248. package/dist/tools/tasks/types.d.ts.map +1 -0
  249. package/dist/tools/tasks/types.js +2 -0
  250. package/dist/tools/tasks/types.js.map +1 -0
  251. package/dist/tools/tasks/update-task.d.ts +3 -0
  252. package/dist/tools/tasks/update-task.d.ts.map +1 -0
  253. package/dist/tools/tasks/update-task.js +142 -0
  254. package/dist/tools/tasks/update-task.js.map +1 -0
  255. package/dist/tools/write-file.d.ts.map +1 -1
  256. package/dist/tools/write-file.js +46 -2
  257. package/dist/tools/write-file.js.map +1 -1
  258. package/dist/types/app.d.ts +2 -3
  259. package/dist/types/app.d.ts.map +1 -1
  260. package/dist/types/config.d.ts +6 -0
  261. package/dist/types/config.d.ts.map +1 -1
  262. package/dist/types/file-explorer.d.ts +14 -0
  263. package/dist/types/file-explorer.d.ts.map +1 -0
  264. package/dist/types/file-explorer.js +2 -0
  265. package/dist/types/file-explorer.js.map +1 -0
  266. package/dist/types/ui.d.ts +1 -2
  267. package/dist/types/ui.d.ts.map +1 -1
  268. package/dist/utils/completion-note.d.ts +3 -0
  269. package/dist/utils/completion-note.d.ts.map +1 -0
  270. package/dist/utils/completion-note.js +39 -0
  271. package/dist/utils/completion-note.js.map +1 -0
  272. package/dist/utils/file-tree.d.ts +37 -0
  273. package/dist/utils/file-tree.d.ts.map +1 -0
  274. package/dist/utils/file-tree.js +122 -0
  275. package/dist/utils/file-tree.js.map +1 -0
  276. package/dist/utils/indentation-normalizer.d.ts +10 -0
  277. package/dist/utils/indentation-normalizer.d.ts.map +1 -1
  278. package/dist/utils/indentation-normalizer.js +48 -0
  279. package/dist/utils/indentation-normalizer.js.map +1 -1
  280. package/dist/vscode/protocol.d.ts +5 -1
  281. package/dist/vscode/protocol.d.ts.map +1 -1
  282. package/dist/vscode/vscode-server.d.ts +4 -0
  283. package/dist/vscode/vscode-server.d.ts.map +1 -1
  284. package/dist/vscode/vscode-server.js +10 -0
  285. package/dist/vscode/vscode-server.js.map +1 -1
  286. package/dist/wizards/mcp-wizard.d.ts.map +1 -1
  287. package/dist/wizards/mcp-wizard.js +1 -1
  288. package/dist/wizards/mcp-wizard.js.map +1 -1
  289. package/dist/wizards/provider-wizard.d.ts.map +1 -1
  290. package/dist/wizards/provider-wizard.js +1 -1
  291. package/dist/wizards/provider-wizard.js.map +1 -1
  292. package/dist/wizards/templates/provider-templates.d.ts.map +1 -1
  293. package/dist/wizards/templates/provider-templates.js +73 -8
  294. package/dist/wizards/templates/provider-templates.js.map +1 -1
  295. package/dist/wizards/validation.d.ts +3 -1
  296. package/dist/wizards/validation.d.ts.map +1 -1
  297. package/dist/wizards/validation.js +6 -0
  298. package/dist/wizards/validation.js.map +1 -1
  299. package/package.json +10 -7
  300. package/source/app/prompts/main-prompt.md +75 -68
  301. package/dist/commands/nanocoder-shape.d.ts +0 -3
  302. package/dist/commands/nanocoder-shape.d.ts.map +0 -1
  303. package/dist/commands/nanocoder-shape.js +0 -46
  304. package/dist/commands/nanocoder-shape.js.map +0 -1
  305. package/dist/commands/theme.d.ts +0 -3
  306. package/dist/commands/theme.d.ts.map +0 -1
  307. package/dist/commands/theme.js.map +0 -1
  308. package/dist/commands/title-shape.d.ts +0 -3
  309. package/dist/commands/title-shape.d.ts.map +0 -1
  310. package/dist/commands/title-shape.js +0 -54
  311. package/dist/commands/title-shape.js.map +0 -1
  312. package/dist/components/nanocoder-shape-selector.d.ts +0 -8
  313. package/dist/components/nanocoder-shape-selector.d.ts.map +0 -1
  314. package/dist/components/nanocoder-shape-selector.js +0 -61
  315. package/dist/components/nanocoder-shape-selector.js.map +0 -1
  316. package/dist/components/theme-selector.d.ts +0 -8
  317. package/dist/components/theme-selector.d.ts.map +0 -1
  318. package/dist/components/theme-selector.js +0 -51
  319. package/dist/components/theme-selector.js.map +0 -1
  320. package/dist/components/title-shape-selector.d.ts +0 -8
  321. package/dist/components/title-shape-selector.d.ts.map +0 -1
  322. package/dist/components/title-shape-selector.js +0 -108
  323. package/dist/components/title-shape-selector.js.map +0 -1
  324. package/dist/tools/git/git-branch-suggest.d.ts +0 -9
  325. package/dist/tools/git/git-branch-suggest.d.ts.map +0 -1
  326. package/dist/tools/git/git-branch-suggest.js +0 -326
  327. package/dist/tools/git/git-branch-suggest.js.map +0 -1
  328. package/dist/tools/git/git-create-pr.d.ts +0 -9
  329. package/dist/tools/git/git-create-pr.d.ts.map +0 -1
  330. package/dist/tools/git/git-create-pr.js +0 -404
  331. package/dist/tools/git/git-create-pr.js.map +0 -1
  332. package/dist/tools/git/git-smart-commit.d.ts +0 -9
  333. package/dist/tools/git/git-smart-commit.d.ts.map +0 -1
  334. package/dist/tools/git/git-smart-commit.js +0 -308
  335. package/dist/tools/git/git-smart-commit.js.map +0 -1
  336. package/dist/tools/git/git-status-enhanced.d.ts +0 -9
  337. package/dist/tools/git/git-status-enhanced.d.ts.map +0 -1
  338. package/dist/tools/git/git-status-enhanced.js +0 -305
  339. package/dist/tools/git/git-status-enhanced.js.map +0 -1
  340. package/dist/tools/git/types.d.ts +0 -103
  341. package/dist/tools/git/types.d.ts.map +0 -1
  342. package/dist/tools/git/types.js +0 -7
  343. package/dist/tools/git/types.js.map +0 -1
  344. package/dist/utils/gradient-utils.d.ts +0 -25
  345. package/dist/utils/gradient-utils.d.ts.map +0 -1
  346. package/dist/utils/gradient-utils.js +0 -45
  347. package/dist/utils/gradient-utils.js.map +0 -1
@@ -0,0 +1,146 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Git Log Tool
4
+ *
5
+ * View commit history with various filters.
6
+ */
7
+ import { Box, Text } from 'ink';
8
+ import { useTheme } from '../../hooks/useTheme.js';
9
+ import { jsonSchema, tool } from '../../types/core.js';
10
+ import { getCommits, getCurrentBranch } from './utils.js';
11
+ // ============================================================================
12
+ // Execution
13
+ // ============================================================================
14
+ const executeGitLog = async (args) => {
15
+ try {
16
+ const count = Math.min(args.count || 10, 50); // Cap at 50
17
+ const branch = args.branch || (await getCurrentBranch());
18
+ const commits = await getCommits({
19
+ count,
20
+ file: args.file,
21
+ author: args.author,
22
+ since: args.since,
23
+ grep: args.grep,
24
+ });
25
+ if (commits.length === 0) {
26
+ const filters = [];
27
+ if (args.author)
28
+ filters.push(`author: ${args.author}`);
29
+ if (args.since)
30
+ filters.push(`since: ${args.since}`);
31
+ if (args.grep)
32
+ filters.push(`grep: ${args.grep}`);
33
+ if (args.file)
34
+ filters.push(`file: ${args.file}`);
35
+ if (filters.length > 0) {
36
+ return `No commits found matching filters: ${filters.join(', ')}`;
37
+ }
38
+ return 'No commits found.';
39
+ }
40
+ const lines = [];
41
+ lines.push(`Showing ${commits.length} commit(s) on ${branch}:`);
42
+ lines.push('');
43
+ for (const commit of commits) {
44
+ lines.push(`${commit.shortHash} ${commit.subject} (${commit.relativeDate})`);
45
+ lines.push(` Author: ${commit.author} <${commit.email}>`);
46
+ }
47
+ return lines.join('\n');
48
+ }
49
+ catch (error) {
50
+ return `Error: ${error instanceof Error ? error.message : 'Unknown error'}`;
51
+ }
52
+ };
53
+ // ============================================================================
54
+ // Tool Definition
55
+ // ============================================================================
56
+ const gitLogCoreTool = tool({
57
+ description: 'View git commit history. Supports filtering by count, file, author, date, and commit message search.',
58
+ inputSchema: jsonSchema({
59
+ type: 'object',
60
+ properties: {
61
+ count: {
62
+ type: 'number',
63
+ description: 'Number of commits to show (default: 10, max: 50)',
64
+ },
65
+ file: {
66
+ type: 'string',
67
+ description: 'Show history for a specific file',
68
+ },
69
+ author: {
70
+ type: 'string',
71
+ description: 'Filter by author name or email',
72
+ },
73
+ since: {
74
+ type: 'string',
75
+ description: 'Show commits after date (e.g., "2024-01-01", "1 week ago")',
76
+ },
77
+ grep: {
78
+ type: 'string',
79
+ description: 'Search commit messages for a pattern',
80
+ },
81
+ branch: {
82
+ type: 'string',
83
+ description: 'Show commits on a specific branch (default: current)',
84
+ },
85
+ },
86
+ required: [],
87
+ }),
88
+ // AUTO - read-only operation, never needs approval
89
+ needsApproval: () => false,
90
+ execute: async (args, _options) => {
91
+ return await executeGitLog(args);
92
+ },
93
+ });
94
+ // ============================================================================
95
+ // Formatter
96
+ // ============================================================================
97
+ function GitLogFormatter({ args, result, }) {
98
+ const { colors } = useTheme();
99
+ // Parse result for display
100
+ let commitCount = 0;
101
+ let branch = '';
102
+ let dateRange = '';
103
+ if (result) {
104
+ const countMatch = result.match(/Showing (\d+) commit/);
105
+ if (countMatch)
106
+ commitCount = parseInt(countMatch[1], 10);
107
+ const branchMatch = result.match(/on (.+):/);
108
+ if (branchMatch)
109
+ branch = branchMatch[1];
110
+ // Extract date range from commits (looking for relative dates like "2 hours ago")
111
+ const dateMatches = result.match(/\((\d+\s+\w+\s+ago|today|yesterday)\)/gi);
112
+ if (dateMatches && dateMatches.length > 0) {
113
+ const first = dateMatches[0].replace(/[()]/g, '');
114
+ const last = dateMatches[dateMatches.length - 1].replace(/[()]/g, '');
115
+ if (first !== last) {
116
+ dateRange = `${last} → ${first}`;
117
+ }
118
+ else {
119
+ dateRange = first;
120
+ }
121
+ }
122
+ }
123
+ // Build filter description
124
+ const filters = [];
125
+ if (args.author)
126
+ filters.push(`author: ${args.author}`);
127
+ if (args.since)
128
+ filters.push(`since: ${args.since}`);
129
+ if (args.grep)
130
+ filters.push(`grep: "${args.grep}"`);
131
+ if (args.file)
132
+ filters.push(`file: ${args.file}`);
133
+ return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { color: colors.tool, children: "\u2692 git_log" }), branch && (_jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "Branch: " }), _jsx(Text, { color: colors.primary, children: branch })] })), commitCount > 0 && (_jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "Showing: " }), _jsxs(Text, { color: colors.text, children: [commitCount, " commits"] })] })), dateRange && (_jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "Range: " }), _jsx(Text, { color: colors.text, children: dateRange })] })), filters.length > 0 && (_jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "Filters: " }), _jsx(Text, { color: colors.text, children: filters.join(', ') })] })), commitCount === 0 && result && (_jsx(Box, { children: _jsx(Text, { color: colors.warning, children: "No commits found" }) }))] }));
134
+ }
135
+ const formatter = (args, result) => {
136
+ return _jsx(GitLogFormatter, { args: args, result: result });
137
+ };
138
+ // ============================================================================
139
+ // Export
140
+ // ============================================================================
141
+ export const gitLogTool = {
142
+ name: 'git_log',
143
+ tool: gitLogCoreTool,
144
+ formatter,
145
+ };
146
+ //# sourceMappingURL=git-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-log.js","sourceRoot":"","sources":["../../../source/tools/git/git-log.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAG9B,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,UAAU,E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gBAAgB,IACjD,CACN,EAEA,SAAS,IAAI,CACb,MAAC,GAAG,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,wBAAgB,EAC7C,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,SAAS,GAAQ,IACvC,CACN,EAEA,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CACtB,MAAC,GAAG,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,0BAAkB,EAC/C,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAQ,IAChD,CACN,EAEA,WAAW,KAAK,CAAC,IAAI,MAAM,IAAI,CAC/B,KAAC,GAAG,cACH,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,iCAAyB,GAC/C,CACN,IACI,CACN,CAAC;AACH,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,IAAiB,EAAE,MAAe,EAAsB,EAAE;IAC5E,OAAO,KAAC,eAAe,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;AACxD,CAAC,CAAC;AAEF,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAE/E,MAAM,CAAC,MAAM,UAAU,GAAwB;IAC9C,IAAI,EAAE,SAAkB;IACxB,IAAI,EAAE,cAAc;IACpB,SAAS;CACT,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Git PR Tool
3
+ *
4
+ * Pull request management using gh CLI: create, view, list.
5
+ */
6
+ import type { NanocoderToolExport } from '../../types/core.js';
7
+ export declare const gitPrTool: NanocoderToolExport;
8
+ //# sourceMappingURL=git-pr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-pr.d.ts","sourceRoot":"","sources":["../../../source/tools/git/git-pr.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAmZtD,eAAO,MAAM,SAAS,EAAE,mBAIvB,CAAC"}
@@ -0,0 +1,252 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Git PR Tool
4
+ *
5
+ * Pull request management using gh CLI: create, view, list.
6
+ */
7
+ import { Box, Text } from 'ink';
8
+ import React from 'react';
9
+ import { useTheme } from '../../hooks/useTheme.js';
10
+ import { jsonSchema, tool } from '../../types/core.js';
11
+ import { execGh, getCommits, getCurrentBranch, getDefaultBranch, getUpstreamBranch, } from './utils.js';
12
+ // ============================================================================
13
+ // Preview
14
+ // ============================================================================
15
+ async function getCreatePreview(base) {
16
+ const branch = await getCurrentBranch();
17
+ const commits = await getCommits({ range: `${base}..HEAD` });
18
+ return { commits, branch };
19
+ }
20
+ // ============================================================================
21
+ // Execution
22
+ // ============================================================================
23
+ const executeGitPr = async (args) => {
24
+ try {
25
+ // CREATE
26
+ if (args.create) {
27
+ const base = args.create.base || (await getDefaultBranch());
28
+ const branch = await getCurrentBranch();
29
+ // Check if upstream is set
30
+ const upstream = await getUpstreamBranch();
31
+ if (!upstream) {
32
+ return 'Error: No upstream branch set. Push your branch first with git_push (setUpstream: true).';
33
+ }
34
+ // Build gh command
35
+ const ghArgs = [
36
+ 'pr',
37
+ 'create',
38
+ '--title',
39
+ args.create.title,
40
+ '--base',
41
+ base,
42
+ ];
43
+ if (args.create.body) {
44
+ ghArgs.push('--body', args.create.body);
45
+ }
46
+ else {
47
+ ghArgs.push('--body', '');
48
+ }
49
+ if (args.create.draft) {
50
+ ghArgs.push('--draft');
51
+ }
52
+ const output = await execGh(ghArgs);
53
+ const lines = [];
54
+ lines.push('Pull request created successfully!');
55
+ lines.push('');
56
+ lines.push(`Title: ${args.create.title}`);
57
+ lines.push(`Base: ${base} ← ${branch}`);
58
+ // Extract PR URL from output
59
+ const urlMatch = output.match(/https:\/\/github\.com\/[^\s]+/);
60
+ if (urlMatch) {
61
+ lines.push('');
62
+ lines.push(`URL: ${urlMatch[0]}`);
63
+ }
64
+ if (args.create.draft) {
65
+ lines.push('');
66
+ lines.push('(Created as draft)');
67
+ }
68
+ return lines.join('\n');
69
+ }
70
+ // VIEW
71
+ if (args.view !== undefined) {
72
+ const output = await execGh([
73
+ 'pr',
74
+ 'view',
75
+ args.view.toString(),
76
+ '--json',
77
+ 'number,title,state,author,url,body,headRefName,baseRefName,additions,deletions,changedFiles',
78
+ ]);
79
+ const pr = JSON.parse(output);
80
+ const lines = [];
81
+ lines.push(`PR #${pr.number}: ${pr.title}`);
82
+ lines.push('');
83
+ lines.push(`State: ${pr.state}`);
84
+ lines.push(`Author: ${pr.author?.login || 'unknown'}`);
85
+ lines.push(`Branch: ${pr.baseRefName} ← ${pr.headRefName}`);
86
+ lines.push(`Changes: ${pr.changedFiles} files (+${pr.additions}, -${pr.deletions})`);
87
+ lines.push('');
88
+ lines.push(`URL: ${pr.url}`);
89
+ if (pr.body) {
90
+ lines.push('');
91
+ lines.push('Description:');
92
+ lines.push(pr.body.substring(0, 500));
93
+ if (pr.body.length > 500) {
94
+ lines.push('... (truncated)');
95
+ }
96
+ }
97
+ return lines.join('\n');
98
+ }
99
+ // LIST
100
+ if (args.list || (!args.create && args.view === undefined)) {
101
+ const state = args.list?.state || 'open';
102
+ const limit = args.list?.limit || 10;
103
+ const ghArgs = [
104
+ 'pr',
105
+ 'list',
106
+ '--state',
107
+ state,
108
+ '--limit',
109
+ limit.toString(),
110
+ '--json',
111
+ 'number,title,state,author,headRefName,updatedAt',
112
+ ];
113
+ if (args.list?.author) {
114
+ ghArgs.push('--author', args.list.author);
115
+ }
116
+ const output = await execGh(ghArgs);
117
+ const prs = JSON.parse(output);
118
+ if (prs.length === 0) {
119
+ return `No ${state} pull requests found.`;
120
+ }
121
+ const lines = [];
122
+ lines.push(`Pull requests (${state}, ${prs.length} found):`);
123
+ lines.push('');
124
+ for (const pr of prs) {
125
+ lines.push(`#${pr.number} ${pr.title}`);
126
+ lines.push(` ${pr.headRefName} by ${pr.author?.login || 'unknown'} (${pr.state})`);
127
+ }
128
+ return lines.join('\n');
129
+ }
130
+ return 'Error: No valid action specified. Use create, view, or list.';
131
+ }
132
+ catch (error) {
133
+ const message = error instanceof Error ? error.message : 'Unknown error';
134
+ // Check for common gh errors
135
+ if (message.includes('gh auth login')) {
136
+ return 'Error: Not authenticated with GitHub. Run "gh auth login" first.';
137
+ }
138
+ if (message.includes('not a git repository')) {
139
+ return 'Error: Not in a git repository.';
140
+ }
141
+ if (message.includes('no upstream')) {
142
+ return 'Error: No upstream branch. Push your branch first.';
143
+ }
144
+ return `Error: ${message}`;
145
+ }
146
+ };
147
+ // ============================================================================
148
+ // Tool Definition
149
+ // ============================================================================
150
+ const gitPrCoreTool = tool({
151
+ description: 'Manage GitHub pull requests. Create new PR, view PR details, or list PRs. Requires gh CLI to be installed and authenticated.',
152
+ inputSchema: jsonSchema({
153
+ type: 'object',
154
+ properties: {
155
+ create: {
156
+ type: 'object',
157
+ description: 'Create a new pull request',
158
+ properties: {
159
+ title: {
160
+ type: 'string',
161
+ description: 'PR title (required)',
162
+ },
163
+ body: {
164
+ type: 'string',
165
+ description: 'PR description/body',
166
+ },
167
+ base: {
168
+ type: 'string',
169
+ description: 'Base branch (default: main/master)',
170
+ },
171
+ draft: {
172
+ type: 'boolean',
173
+ description: 'Create as draft PR',
174
+ },
175
+ },
176
+ required: ['title'],
177
+ },
178
+ view: {
179
+ type: 'number',
180
+ description: 'View details of a specific PR by number',
181
+ },
182
+ list: {
183
+ type: 'object',
184
+ description: 'List pull requests',
185
+ properties: {
186
+ state: {
187
+ type: 'string',
188
+ enum: ['open', 'closed', 'merged', 'all'],
189
+ description: 'Filter by state (default: open)',
190
+ },
191
+ author: {
192
+ type: 'string',
193
+ description: 'Filter by author (use "@me" for self)',
194
+ },
195
+ limit: {
196
+ type: 'number',
197
+ description: 'Max results (default: 10)',
198
+ },
199
+ },
200
+ },
201
+ },
202
+ required: [],
203
+ }),
204
+ // Approval varies by action
205
+ needsApproval: (args) => {
206
+ // ALWAYS_APPROVE for create (user should see title/body)
207
+ if (args.create) {
208
+ return true;
209
+ }
210
+ // AUTO for view and list
211
+ return false;
212
+ },
213
+ execute: async (args, _options) => {
214
+ return await executeGitPr(args);
215
+ },
216
+ });
217
+ // ============================================================================
218
+ // Formatter
219
+ // ============================================================================
220
+ function GitPrFormatter({ args, result, }) {
221
+ const { colors } = useTheme();
222
+ const [preview, setPreview] = React.useState(null);
223
+ // Determine action
224
+ const action = args.create
225
+ ? 'create'
226
+ : args.view !== undefined
227
+ ? 'view'
228
+ : 'list';
229
+ // Load preview for create before execution
230
+ React.useEffect(() => {
231
+ if (!result && args.create) {
232
+ (async () => {
233
+ const base = args.create?.base || (await getDefaultBranch());
234
+ const { commits, branch } = await getCreatePreview(base);
235
+ setPreview({ commits, branch, base });
236
+ })().catch(() => { });
237
+ }
238
+ }, [args, result]);
239
+ return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { color: colors.tool, children: "\u2692 git_pr" }), _jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "Action: " }), _jsx(Text, { color: colors.text, children: action })] }), action === 'create' && args.create && (_jsxs(_Fragment, { children: [preview && (_jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "Branch: " }), _jsx(Text, { color: colors.text, children: preview.branch })] })), preview && preview.commits.length > 0 && (_jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "Commits: " }), _jsx(Text, { color: colors.text, children: preview.commits.length })] })), args.create.draft && (_jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "Draft: " }), _jsx(Text, { color: colors.warning, children: "yes" })] })), _jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: colors.secondary, children: "Title:" }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { color: colors.primary, children: args.create.title }) })] }), args.create.body && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: colors.secondary, children: "Body:" }), _jsx(Box, { marginLeft: 2, flexDirection: "column", children: _jsx(Text, { color: colors.text, children: args.create.body }) })] }))] })), action === 'view' && (_jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "PR: " }), _jsxs(Text, { color: colors.primary, children: ["#", args.view] })] })), action === 'list' && (_jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "State: " }), _jsx(Text, { color: colors.text, children: args.list?.state || 'open' }), args.list?.author && (_jsxs(_Fragment, { children: [_jsx(Text, { color: colors.secondary, children: " by " }), _jsx(Text, { color: colors.text, children: args.list.author })] }))] })), result?.includes('created successfully') && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.success, children: "\u2713 PR created successfully" }) })), result?.includes('Error:') && (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: colors.error, children: ["\u2717 ", result] }) }))] }));
240
+ }
241
+ const formatter = (args, result) => {
242
+ return _jsx(GitPrFormatter, { args: args, result: result });
243
+ };
244
+ // ============================================================================
245
+ // Export
246
+ // ============================================================================
247
+ export const gitPrTool = {
248
+ name: 'git_pr',
249
+ tool: gitPrCoreTool,
250
+ formatter,
251
+ };
252
+ //# sourceMappingURL=git-pr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-pr.js","sourceRoot":"","sources":["../../../source/tools/git/git-pr.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAEN,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,SAAS,CAAC;AAqBjB,+EAA+E;AAC/E,UAAU;AACV,+EA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MAAM,CAAC,IAAI,YAAG,IAAI,CAAC,IAAI,EAAE,KAAK,IAAI,MAAM,GAAQ,EAC5D,IAAI,CAAC,IAAI,EAAE,MAAM,IAAI,CACrB,8BACC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,qBAAa,EAC1C,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAQ,IACjD,CACH,IACI,CACN,EAEA,MAAM,EAAE,QAAQ,CAAC,sBAAsB,CAAC,IAAI,CAC5C,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YAChB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,+CAAkC,GACxD,CACN,EAEA,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAC9B,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YAChB,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,wBAAK,MAAM,IAAQ,GACvC,CACN,IACI,CACN,CAAC;AACH,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,IAAgB,EAAE,MAAe,EAAsB,EAAE;IAC3E,OAAO,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;AACvD,CAAC,CAAC;AAEF,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAE/E,MAAM,CAAC,MAAM,SAAS,GAAwB;IAC7C,IAAI,EAAE,QAAiB;IACvB,IAAI,EAAE,aAAa;IACnB,SAAS;CACT,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Git Pull Tool
3
+ *
4
+ * Pull changes from remote repository.
5
+ */
6
+ import type { NanocoderToolExport } from '../../types/core.js';
7
+ export declare const gitPullTool: NanocoderToolExport;
8
+ //# sourceMappingURL=git-pull.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-pull.d.ts","sourceRoot":"","sources":["../../../source/tools/git/git-pull.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAgQtD,eAAO,MAAM,WAAW,EAAE,mBAIzB,CAAC"}
@@ -0,0 +1,151 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Git Pull Tool
4
+ *
5
+ * Pull changes from remote repository.
6
+ */
7
+ import { Box, Text } from 'ink';
8
+ import React from 'react';
9
+ import { getCurrentMode } from '../../context/mode-context.js';
10
+ import { useTheme } from '../../hooks/useTheme.js';
11
+ import { jsonSchema, tool } from '../../types/core.js';
12
+ import { execGit, getAheadBehind, getCurrentBranch, getUpstreamBranch, hasUncommittedChanges, remoteExists, } from './utils.js';
13
+ // ============================================================================
14
+ // Execution
15
+ // ============================================================================
16
+ const executeGitPull = async (args) => {
17
+ try {
18
+ const remote = args.remote || 'origin';
19
+ const currentBranch = await getCurrentBranch();
20
+ const upstream = await getUpstreamBranch();
21
+ // Determine branch to pull
22
+ let branch = args.branch;
23
+ if (!branch && upstream) {
24
+ branch = upstream.replace(`${remote}/`, '');
25
+ }
26
+ if (!branch) {
27
+ branch = currentBranch;
28
+ }
29
+ // Check for uncommitted changes
30
+ const hasChanges = await hasUncommittedChanges();
31
+ if (hasChanges && !args.rebase) {
32
+ return 'Warning: You have uncommitted changes. Consider stashing them first or use rebase=true.';
33
+ }
34
+ // Validate remote exists
35
+ const exists = await remoteExists(remote);
36
+ if (!exists) {
37
+ return `Error: Remote '${remote}' does not exist.`;
38
+ }
39
+ // Get ahead/behind before pull
40
+ const { behind: behindBefore } = await getAheadBehind();
41
+ // Build git command
42
+ const gitArgs = ['pull'];
43
+ if (args.rebase) {
44
+ gitArgs.push('--rebase');
45
+ }
46
+ gitArgs.push(remote, branch);
47
+ const output = await execGit(gitArgs);
48
+ const lines = [];
49
+ // Check if already up to date
50
+ if (output.includes('Already up to date')) {
51
+ lines.push('Already up to date.');
52
+ return lines.join('\n');
53
+ }
54
+ lines.push(`Pulled from ${remote}/${branch}`);
55
+ // Parse output for stats
56
+ const statsMatch = output.match(/(\d+) files? changed(?:, (\d+) insertions?\(\+\))?(?:, (\d+) deletions?\(-\))?/);
57
+ if (statsMatch) {
58
+ const files = statsMatch[1] || '0';
59
+ const insertions = statsMatch[2] || '0';
60
+ const deletions = statsMatch[3] || '0';
61
+ lines.push(`Changes: ${files} files, +${insertions}, -${deletions}`);
62
+ }
63
+ if (behindBefore > 0) {
64
+ lines.push(`Merged ${behindBefore} commit(s)`);
65
+ }
66
+ if (args.rebase) {
67
+ lines.push('');
68
+ lines.push('(Rebased local commits on top)');
69
+ }
70
+ return lines.join('\n');
71
+ }
72
+ catch (error) {
73
+ const message = error instanceof Error ? error.message : 'Unknown error';
74
+ // Check for merge conflicts
75
+ if (message.includes('CONFLICT') || message.includes('conflict')) {
76
+ return `Error: Merge conflicts detected. Resolve conflicts and commit, or run git_reset to abort.\n\n${message}`;
77
+ }
78
+ return `Error: ${message}`;
79
+ }
80
+ };
81
+ // ============================================================================
82
+ // Tool Definition
83
+ // ============================================================================
84
+ const gitPullCoreTool = tool({
85
+ description: 'Pull changes from remote repository. Use rebase=true to rebase local commits on top of remote changes.',
86
+ inputSchema: jsonSchema({
87
+ type: 'object',
88
+ properties: {
89
+ remote: {
90
+ type: 'string',
91
+ description: 'Remote name (default: origin)',
92
+ },
93
+ branch: {
94
+ type: 'string',
95
+ description: 'Branch to pull (default: current tracking branch)',
96
+ },
97
+ rebase: {
98
+ type: 'boolean',
99
+ description: 'Rebase local commits instead of merging',
100
+ },
101
+ },
102
+ required: [],
103
+ }),
104
+ // STANDARD - requires approval in normal mode, skipped in auto-accept
105
+ needsApproval: () => {
106
+ const mode = getCurrentMode();
107
+ return mode === 'normal';
108
+ },
109
+ execute: async (args, _options) => {
110
+ return await executeGitPull(args);
111
+ },
112
+ });
113
+ // ============================================================================
114
+ // Formatter
115
+ // ============================================================================
116
+ function GitPullFormatter({ args, result, }) {
117
+ const { colors } = useTheme();
118
+ const [preview, setPreview] = React.useState(null);
119
+ // Load preview before execution
120
+ React.useEffect(() => {
121
+ if (!result) {
122
+ (async () => {
123
+ const remote = args.remote || 'origin';
124
+ const currentBranch = await getCurrentBranch();
125
+ const upstream = await getUpstreamBranch();
126
+ let branch = args.branch;
127
+ if (!branch && upstream) {
128
+ branch = upstream.replace(`${remote}/`, '');
129
+ }
130
+ if (!branch)
131
+ branch = currentBranch;
132
+ const { behind } = await getAheadBehind();
133
+ const hasChanges = await hasUncommittedChanges();
134
+ setPreview({ remote, branch, behind, hasChanges });
135
+ })().catch(() => { });
136
+ }
137
+ }, [args, result]);
138
+ return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { color: colors.tool, children: "\u2692 git_pull" }), preview && (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "Remote: " }), _jsxs(Text, { color: colors.text, children: [preview.remote, "/", preview.branch] })] }), _jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "Strategy: " }), _jsx(Text, { color: colors.text, children: args.rebase ? 'rebase' : 'merge' })] }), preview.behind > 0 && (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: colors.secondary, children: "Incoming: " }), _jsxs(Text, { color: colors.text, children: [preview.behind, " commit(s)"] })] })), preview.behind === 0 && !result && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.success, children: "\u2713 Already up to date" }) })), preview.hasChanges && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.warning, children: "Uncommitted changes detected" }) }))] })), result?.includes('Pulled from') && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.success, children: "\u2713 Pull completed successfully" }) })), result?.includes('Already up to date') && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.success, children: "\u2713 Already up to date" }) })), result?.includes('CONFLICT') && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.error, children: "\u2717 Merge conflicts detected!" }) })), result?.includes('Error:') && !result.includes('CONFLICT') && (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: colors.error, children: ["\u2717 ", result] }) }))] }));
139
+ }
140
+ const formatter = (args, result) => {
141
+ return _jsx(GitPullFormatter, { args: args, result: result });
142
+ };
143
+ // ============================================================================
144
+ // Export
145
+ // ============================================================================
146
+ export const gitPullTool = {
147
+ name: 'git_pull',
148
+ tool: gitPullCoreTool,
149
+ formatter,
150
+ };
151
+ //# sourceMappingURL=git-pull.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-pull.js","sourceRoot":"","sources":["../../../source/tools/git/git-pull.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EACN,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,GACZ,MAAM,SAAS,CAAC;AAYjB,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,MAAM,cAAc,GAAG,KAAK,EAAE,IAAkB,EAAmB,EAAE;IACpE,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC;QACvC,MAAM,aAAa,GAAG,MAAM,gBAAgB,EAAE,CAAC;QAC/C,MAAM,QAAQ,GAAG,MAAM,iBAAiB,EAAE,CAAC;QAE3C,2BAA2B;QAC3B,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,MAAM,IAAI,QAAQ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,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;AACzD,CAAC,CAAC;AAEF,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAE/E,MAAM,CAAC,MAAM,WAAW,GAAwB;IAC/C,IAAI,EAAE,UAAmB;IACzB,IAAI,EAAE,eAAe;IACrB,SAAS;CACT,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Git Push Tool
3
+ *
4
+ * Push commits to remote repository.
5
+ */
6
+ import type { NanocoderToolExport } from '../../types/core.js';
7
+ export declare const gitPushTool: NanocoderToolExport;
8
+ //# sourceMappingURL=git-push.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-push.d.ts","sourceRoot":"","sources":["../../../source/tools/git/git-push.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAqStD,eAAO,MAAM,WAAW,EAAE,mBAKzB,CAAC"}