@codemieai/code 0.0.2 → 0.0.4

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 (360) hide show
  1. package/README.md +357 -719
  2. package/bin/codemie-claude.js +145 -0
  3. package/bin/codemie-code.js +128 -15
  4. package/bin/codemie-codex.js +137 -0
  5. package/bin/codemie.js +1 -1
  6. package/dist/agents/adapters/claude-code.d.ts +7 -2
  7. package/dist/agents/adapters/claude-code.d.ts.map +1 -1
  8. package/dist/agents/adapters/claude-code.js +94 -58
  9. package/dist/agents/adapters/claude-code.js.map +1 -1
  10. package/dist/agents/adapters/codemie-code.d.ts +11 -2
  11. package/dist/agents/adapters/codemie-code.d.ts.map +1 -1
  12. package/dist/agents/adapters/codemie-code.js +93 -25
  13. package/dist/agents/adapters/codemie-code.js.map +1 -1
  14. package/dist/agents/adapters/codex.d.ts +7 -2
  15. package/dist/agents/adapters/codex.d.ts.map +1 -1
  16. package/dist/agents/adapters/codex.js +104 -39
  17. package/dist/agents/adapters/codex.js.map +1 -1
  18. package/dist/agents/codemie-code/agent.d.ts +89 -0
  19. package/dist/agents/codemie-code/agent.d.ts.map +1 -0
  20. package/dist/agents/codemie-code/agent.js +689 -0
  21. package/dist/agents/codemie-code/agent.js.map +1 -0
  22. package/dist/agents/codemie-code/config.d.ts +40 -0
  23. package/dist/agents/codemie-code/config.d.ts.map +1 -0
  24. package/dist/agents/codemie-code/config.js +278 -0
  25. package/dist/agents/codemie-code/config.js.map +1 -0
  26. package/dist/agents/codemie-code/filters.d.ts +91 -0
  27. package/dist/agents/codemie-code/filters.d.ts.map +1 -0
  28. package/dist/agents/codemie-code/filters.js +328 -0
  29. package/dist/agents/codemie-code/filters.js.map +1 -0
  30. package/dist/agents/codemie-code/index.d.ts +92 -0
  31. package/dist/agents/codemie-code/index.d.ts.map +1 -0
  32. package/dist/agents/codemie-code/index.js +327 -0
  33. package/dist/agents/codemie-code/index.js.map +1 -0
  34. package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts +87 -0
  35. package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts.map +1 -0
  36. package/dist/agents/codemie-code/modes/contextAwarePlanning.js +957 -0
  37. package/dist/agents/codemie-code/modes/contextAwarePlanning.js.map +1 -0
  38. package/dist/agents/codemie-code/modes/planMode.d.ts +116 -0
  39. package/dist/agents/codemie-code/modes/planMode.d.ts.map +1 -0
  40. package/dist/agents/codemie-code/modes/planMode.js +537 -0
  41. package/dist/agents/codemie-code/modes/planMode.js.map +1 -0
  42. package/dist/agents/codemie-code/prompts.d.ts +40 -0
  43. package/dist/agents/codemie-code/prompts.d.ts.map +1 -0
  44. package/dist/agents/codemie-code/prompts.js +160 -0
  45. package/dist/agents/codemie-code/prompts.js.map +1 -0
  46. package/dist/agents/codemie-code/storage/todoStorage.d.ts +78 -0
  47. package/dist/agents/codemie-code/storage/todoStorage.d.ts.map +1 -0
  48. package/dist/agents/codemie-code/storage/todoStorage.js +225 -0
  49. package/dist/agents/codemie-code/storage/todoStorage.js.map +1 -0
  50. package/dist/agents/codemie-code/tokenUtils.d.ts +108 -0
  51. package/dist/agents/codemie-code/tokenUtils.d.ts.map +1 -0
  52. package/dist/agents/codemie-code/tokenUtils.js +220 -0
  53. package/dist/agents/codemie-code/tokenUtils.js.map +1 -0
  54. package/dist/agents/codemie-code/toolMetadata.d.ts +15 -0
  55. package/dist/agents/codemie-code/toolMetadata.d.ts.map +1 -0
  56. package/dist/agents/codemie-code/toolMetadata.js +315 -0
  57. package/dist/agents/codemie-code/toolMetadata.js.map +1 -0
  58. package/dist/agents/codemie-code/tools/index.d.ts +45 -0
  59. package/dist/agents/codemie-code/tools/index.d.ts.map +1 -0
  60. package/dist/agents/codemie-code/tools/index.js +407 -0
  61. package/dist/agents/codemie-code/tools/index.js.map +1 -0
  62. package/dist/agents/codemie-code/tools/planning.d.ts +53 -0
  63. package/dist/agents/codemie-code/tools/planning.d.ts.map +1 -0
  64. package/dist/agents/codemie-code/tools/planning.js +224 -0
  65. package/dist/agents/codemie-code/tools/planning.js.map +1 -0
  66. package/dist/agents/codemie-code/types.d.ts +418 -0
  67. package/dist/agents/codemie-code/types.d.ts.map +1 -0
  68. package/dist/agents/codemie-code/types.js +35 -0
  69. package/dist/agents/codemie-code/types.js.map +1 -0
  70. package/dist/agents/codemie-code/ui/progressTracker.d.ts +125 -0
  71. package/dist/agents/codemie-code/ui/progressTracker.d.ts.map +1 -0
  72. package/dist/agents/codemie-code/ui/progressTracker.js +343 -0
  73. package/dist/agents/codemie-code/ui/progressTracker.js.map +1 -0
  74. package/dist/agents/codemie-code/ui/todoPanel.d.ts +112 -0
  75. package/dist/agents/codemie-code/ui/todoPanel.d.ts.map +1 -0
  76. package/dist/agents/codemie-code/ui/todoPanel.js +318 -0
  77. package/dist/agents/codemie-code/ui/todoPanel.js.map +1 -0
  78. package/dist/agents/codemie-code/ui.d.ts +179 -0
  79. package/dist/agents/codemie-code/ui.d.ts.map +1 -0
  80. package/dist/agents/codemie-code/ui.js +1408 -0
  81. package/dist/agents/codemie-code/ui.js.map +1 -0
  82. package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts +87 -0
  83. package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts.map +1 -0
  84. package/dist/agents/codemie-code/utils/progressionEnforcer.js +293 -0
  85. package/dist/agents/codemie-code/utils/progressionEnforcer.js.map +1 -0
  86. package/dist/agents/codemie-code/utils/todoParser.d.ts +41 -0
  87. package/dist/agents/codemie-code/utils/todoParser.d.ts.map +1 -0
  88. package/dist/agents/codemie-code/utils/todoParser.js +305 -0
  89. package/dist/agents/codemie-code/utils/todoParser.js.map +1 -0
  90. package/dist/agents/codemie-code/utils/todoValidator.d.ts +65 -0
  91. package/dist/agents/codemie-code/utils/todoValidator.d.ts.map +1 -0
  92. package/dist/agents/codemie-code/utils/todoValidator.js +249 -0
  93. package/dist/agents/codemie-code/utils/todoValidator.js.map +1 -0
  94. package/dist/agents/codemie-code/validators/planValidator.d.ts +94 -0
  95. package/dist/agents/codemie-code/validators/planValidator.d.ts.map +1 -0
  96. package/dist/agents/codemie-code/validators/planValidator.js +281 -0
  97. package/dist/agents/codemie-code/validators/planValidator.js.map +1 -0
  98. package/dist/agents/registry.d.ts +1 -1
  99. package/dist/agents/registry.d.ts.map +1 -1
  100. package/dist/agents/registry.js +11 -15
  101. package/dist/agents/registry.js.map +1 -1
  102. package/dist/cli/commands/auth.d.ts +3 -0
  103. package/dist/cli/commands/auth.d.ts.map +1 -0
  104. package/dist/cli/commands/auth.js +170 -0
  105. package/dist/cli/commands/auth.js.map +1 -0
  106. package/dist/cli/commands/config.d.ts +3 -0
  107. package/dist/cli/commands/config.d.ts.map +1 -0
  108. package/dist/cli/commands/config.js +350 -0
  109. package/dist/cli/commands/config.js.map +1 -0
  110. package/dist/cli/commands/doctor.d.ts.map +1 -1
  111. package/dist/cli/commands/doctor.js +308 -71
  112. package/dist/cli/commands/doctor.js.map +1 -1
  113. package/dist/cli/commands/env.d.ts +3 -0
  114. package/dist/cli/commands/env.d.ts.map +1 -0
  115. package/dist/cli/commands/env.js +19 -0
  116. package/dist/cli/commands/env.js.map +1 -0
  117. package/dist/cli/commands/install.d.ts.map +1 -1
  118. package/dist/cli/commands/install.js +28 -33
  119. package/dist/cli/commands/install.js.map +1 -1
  120. package/dist/cli/commands/list.js +18 -24
  121. package/dist/cli/commands/list.js.map +1 -1
  122. package/dist/cli/commands/run.d.ts.map +1 -1
  123. package/dist/cli/commands/run.js +297 -31
  124. package/dist/cli/commands/run.js.map +1 -1
  125. package/dist/cli/commands/setup.d.ts +3 -0
  126. package/dist/cli/commands/setup.d.ts.map +1 -0
  127. package/dist/cli/commands/setup.js +523 -0
  128. package/dist/cli/commands/setup.js.map +1 -0
  129. package/dist/cli/commands/tools.d.ts +6 -0
  130. package/dist/cli/commands/tools.d.ts.map +1 -0
  131. package/dist/cli/commands/tools.js +244 -0
  132. package/dist/cli/commands/tools.js.map +1 -0
  133. package/dist/cli/commands/uninstall.js +24 -30
  134. package/dist/cli/commands/uninstall.js.map +1 -1
  135. package/dist/cli/commands/version.d.ts.map +1 -1
  136. package/dist/cli/commands/version.js +11 -16
  137. package/dist/cli/commands/version.js.map +1 -1
  138. package/dist/cli/commands/workflow.d.ts +6 -0
  139. package/dist/cli/commands/workflow.d.ts.map +1 -0
  140. package/dist/cli/commands/workflow.js +424 -0
  141. package/dist/cli/commands/workflow.js.map +1 -0
  142. package/dist/cli/index.js +85 -35
  143. package/dist/cli/index.js.map +1 -1
  144. package/dist/clients/adapters/github.d.ts +17 -0
  145. package/dist/clients/adapters/github.d.ts.map +1 -0
  146. package/dist/clients/adapters/github.js +150 -0
  147. package/dist/clients/adapters/github.js.map +1 -0
  148. package/dist/clients/adapters/gitlab.d.ts +17 -0
  149. package/dist/clients/adapters/gitlab.d.ts.map +1 -0
  150. package/dist/clients/adapters/gitlab.js +147 -0
  151. package/dist/clients/adapters/gitlab.js.map +1 -0
  152. package/dist/clients/registry.d.ts +20 -0
  153. package/dist/clients/registry.d.ts.map +1 -0
  154. package/dist/clients/registry.js +27 -0
  155. package/dist/clients/registry.js.map +1 -0
  156. package/dist/env/manager.js +9 -46
  157. package/dist/env/manager.js.map +1 -1
  158. package/dist/index.d.ts +6 -13
  159. package/dist/index.d.ts.map +1 -1
  160. package/dist/index.js +6 -43
  161. package/dist/index.js.map +1 -1
  162. package/dist/tools/detector.d.ts +33 -0
  163. package/dist/tools/detector.d.ts.map +1 -0
  164. package/dist/tools/detector.js +145 -0
  165. package/dist/tools/detector.js.map +1 -0
  166. package/dist/tools/index.d.ts +8 -0
  167. package/dist/tools/index.d.ts.map +1 -0
  168. package/dist/tools/index.js +8 -0
  169. package/dist/tools/index.js.map +1 -0
  170. package/dist/tools/manager.d.ts +21 -0
  171. package/dist/tools/manager.d.ts.map +1 -0
  172. package/dist/tools/manager.js +104 -0
  173. package/dist/tools/manager.js.map +1 -0
  174. package/dist/tools/registry.d.ts +8 -0
  175. package/dist/tools/registry.d.ts.map +1 -0
  176. package/dist/tools/registry.js +36 -0
  177. package/dist/tools/registry.js.map +1 -0
  178. package/dist/tools/types.d.ts +41 -0
  179. package/dist/tools/types.d.ts.map +1 -0
  180. package/dist/tools/types.js +5 -0
  181. package/dist/tools/types.js.map +1 -0
  182. package/dist/types/sso.d.ts +42 -0
  183. package/dist/types/sso.d.ts.map +1 -0
  184. package/dist/types/sso.js +2 -0
  185. package/dist/types/sso.js.map +1 -0
  186. package/dist/utils/agent-compatibility.d.ts +32 -0
  187. package/dist/utils/agent-compatibility.d.ts.map +1 -0
  188. package/dist/utils/agent-compatibility.js +140 -0
  189. package/dist/utils/agent-compatibility.js.map +1 -0
  190. package/dist/utils/async-tips.d.ts.map +1 -1
  191. package/dist/utils/async-tips.js +16 -55
  192. package/dist/utils/async-tips.js.map +1 -1
  193. package/dist/utils/clipboard.d.ts +16 -0
  194. package/dist/utils/clipboard.d.ts.map +1 -0
  195. package/dist/utils/clipboard.js +179 -0
  196. package/dist/utils/clipboard.js.map +1 -0
  197. package/dist/utils/codemie-integration-validator.d.ts +17 -0
  198. package/dist/utils/codemie-integration-validator.d.ts.map +1 -0
  199. package/dist/utils/codemie-integration-validator.js +105 -0
  200. package/dist/utils/codemie-integration-validator.js.map +1 -0
  201. package/dist/utils/codemie-model-fetcher.d.ts +11 -0
  202. package/dist/utils/codemie-model-fetcher.d.ts.map +1 -0
  203. package/dist/utils/codemie-model-fetcher.js +242 -0
  204. package/dist/utils/codemie-model-fetcher.js.map +1 -0
  205. package/dist/utils/config-loader.d.ts +118 -0
  206. package/dist/utils/config-loader.d.ts.map +1 -0
  207. package/dist/utils/config-loader.js +397 -0
  208. package/dist/utils/config-loader.js.map +1 -0
  209. package/dist/utils/credential-store.d.ts +16 -0
  210. package/dist/utils/credential-store.d.ts.map +1 -0
  211. package/dist/utils/credential-store.js +109 -0
  212. package/dist/utils/credential-store.js.map +1 -0
  213. package/dist/utils/dirname.d.ts +7 -0
  214. package/dist/utils/dirname.d.ts.map +1 -0
  215. package/dist/utils/dirname.js +11 -0
  216. package/dist/utils/dirname.js.map +1 -0
  217. package/dist/utils/errors.js +7 -17
  218. package/dist/utils/errors.js.map +1 -1
  219. package/dist/utils/exec.js +3 -6
  220. package/dist/utils/exec.js.map +1 -1
  221. package/dist/utils/first-time.d.ts +34 -0
  222. package/dist/utils/first-time.d.ts.map +1 -0
  223. package/dist/utils/first-time.js +226 -0
  224. package/dist/utils/first-time.js.map +1 -0
  225. package/dist/utils/health-checker.d.ts +20 -0
  226. package/dist/utils/health-checker.d.ts.map +1 -0
  227. package/dist/utils/health-checker.js +172 -0
  228. package/dist/utils/health-checker.js.map +1 -0
  229. package/dist/utils/logger.js +12 -18
  230. package/dist/utils/logger.js.map +1 -1
  231. package/dist/utils/model-fetcher.d.ts +21 -0
  232. package/dist/utils/model-fetcher.d.ts.map +1 -0
  233. package/dist/utils/model-fetcher.js +150 -0
  234. package/dist/utils/model-fetcher.js.map +1 -0
  235. package/dist/utils/sso-auth.d.ts +15 -0
  236. package/dist/utils/sso-auth.d.ts.map +1 -0
  237. package/dist/utils/sso-auth.js +207 -0
  238. package/dist/utils/sso-auth.js.map +1 -0
  239. package/dist/utils/sso-gateway.d.ts +47 -0
  240. package/dist/utils/sso-gateway.d.ts.map +1 -0
  241. package/dist/utils/sso-gateway.js +298 -0
  242. package/dist/utils/sso-gateway.js.map +1 -0
  243. package/dist/utils/tips.d.ts.map +1 -1
  244. package/dist/utils/tips.js +13 -52
  245. package/dist/utils/tips.js.map +1 -1
  246. package/dist/workflows/detector.d.ts +37 -0
  247. package/dist/workflows/detector.d.ts.map +1 -0
  248. package/dist/workflows/detector.js +160 -0
  249. package/dist/workflows/detector.js.map +1 -0
  250. package/dist/workflows/index.d.ts +8 -0
  251. package/dist/workflows/index.d.ts.map +1 -0
  252. package/dist/workflows/index.js +8 -0
  253. package/dist/workflows/index.js.map +1 -0
  254. package/dist/workflows/installer.d.ts +24 -0
  255. package/dist/workflows/installer.d.ts.map +1 -0
  256. package/dist/workflows/installer.js +105 -0
  257. package/dist/workflows/installer.js.map +1 -0
  258. package/dist/workflows/registry.d.ts +29 -0
  259. package/dist/workflows/registry.d.ts.map +1 -0
  260. package/dist/workflows/registry.js +54 -0
  261. package/dist/workflows/registry.js.map +1 -0
  262. package/dist/workflows/templates/github/metadata.d.ts +6 -0
  263. package/dist/workflows/templates/github/metadata.d.ts.map +1 -0
  264. package/dist/workflows/templates/github/metadata.js +111 -0
  265. package/dist/workflows/templates/github/metadata.js.map +1 -0
  266. package/dist/workflows/templates/gitlab/metadata.d.ts +6 -0
  267. package/dist/workflows/templates/gitlab/metadata.d.ts.map +1 -0
  268. package/dist/workflows/templates/gitlab/metadata.js +14 -0
  269. package/dist/workflows/templates/gitlab/metadata.js.map +1 -0
  270. package/dist/workflows/types.d.ts +71 -0
  271. package/dist/workflows/types.d.ts.map +1 -0
  272. package/dist/workflows/types.js +5 -0
  273. package/dist/workflows/types.js.map +1 -0
  274. package/package.json +32 -25
  275. package/src/workflows/templates/github/code-ci.yml +529 -0
  276. package/src/workflows/templates/github/inline-fix.yml +665 -0
  277. package/src/workflows/templates/github/pr-review.yml +677 -0
  278. package/.claude/agents/README.md +0 -298
  279. package/.claude/agents/release-manager.md +0 -857
  280. package/.codemie/guides/git-workflow.md +0 -493
  281. package/CLAUDE.md +0 -855
  282. package/dist/agents/adapters/aider.d.ts +0 -12
  283. package/dist/agents/adapters/aider.d.ts.map +0 -1
  284. package/dist/agents/adapters/aider.js +0 -80
  285. package/dist/agents/adapters/aider.js.map +0 -1
  286. package/dist/cli/cli.d.ts +0 -4
  287. package/dist/cli/cli.d.ts.map +0 -1
  288. package/dist/cli/cli.js +0 -107
  289. package/dist/cli/cli.js.map +0 -1
  290. package/dist/cli/commands/mcp.d.ts +0 -3
  291. package/dist/cli/commands/mcp.d.ts.map +0 -1
  292. package/dist/cli/commands/mcp.js +0 -459
  293. package/dist/cli/commands/mcp.js.map +0 -1
  294. package/dist/code/agent-events.d.ts +0 -39
  295. package/dist/code/agent-events.d.ts.map +0 -1
  296. package/dist/code/agent-events.js +0 -4
  297. package/dist/code/agent-events.js.map +0 -1
  298. package/dist/code/agent.d.ts +0 -19
  299. package/dist/code/agent.d.ts.map +0 -1
  300. package/dist/code/agent.js +0 -144
  301. package/dist/code/agent.js.map +0 -1
  302. package/dist/code/config.d.ts +0 -13
  303. package/dist/code/config.d.ts.map +0 -1
  304. package/dist/code/config.js +0 -41
  305. package/dist/code/config.js.map +0 -1
  306. package/dist/code/index.d.ts +0 -19
  307. package/dist/code/index.d.ts.map +0 -1
  308. package/dist/code/index.js +0 -400
  309. package/dist/code/index.js.map +0 -1
  310. package/dist/code/prompts.d.ts +0 -2
  311. package/dist/code/prompts.d.ts.map +0 -1
  312. package/dist/code/prompts.js +0 -45
  313. package/dist/code/prompts.js.map +0 -1
  314. package/dist/code/tools/command.d.ts +0 -8
  315. package/dist/code/tools/command.d.ts.map +0 -1
  316. package/dist/code/tools/command.js +0 -83
  317. package/dist/code/tools/command.js.map +0 -1
  318. package/dist/code/tools/diff-utils.d.ts +0 -2
  319. package/dist/code/tools/diff-utils.d.ts.map +0 -1
  320. package/dist/code/tools/diff-utils.js +0 -45
  321. package/dist/code/tools/diff-utils.js.map +0 -1
  322. package/dist/code/tools/filesystem.d.ts +0 -11
  323. package/dist/code/tools/filesystem.d.ts.map +0 -1
  324. package/dist/code/tools/filesystem.js +0 -442
  325. package/dist/code/tools/filesystem.js.map +0 -1
  326. package/dist/code/tools/git.d.ts +0 -7
  327. package/dist/code/tools/git.d.ts.map +0 -1
  328. package/dist/code/tools/git.js +0 -111
  329. package/dist/code/tools/git.js.map +0 -1
  330. package/dist/code/tools/mcp.d.ts +0 -13
  331. package/dist/code/tools/mcp.d.ts.map +0 -1
  332. package/dist/code/tools/mcp.js +0 -230
  333. package/dist/code/tools/mcp.js.map +0 -1
  334. package/dist/data/tips.json +0 -118
  335. package/dist/ui/terminal-ui.d.ts +0 -73
  336. package/dist/ui/terminal-ui.d.ts.map +0 -1
  337. package/dist/ui/terminal-ui.js +0 -900
  338. package/dist/ui/terminal-ui.js.map +0 -1
  339. package/dist/utils/env-mapper.d.ts +0 -40
  340. package/dist/utils/env-mapper.d.ts.map +0 -1
  341. package/dist/utils/env-mapper.js +0 -122
  342. package/dist/utils/env-mapper.js.map +0 -1
  343. package/docs/USER_GUIDE.md +0 -573
  344. package/eslint.config.mjs +0 -43
  345. package/tests/agent-direct.test.mjs +0 -45
  346. package/tests/agent-output.test.mjs +0 -64
  347. package/tests/codemie-code.test.mjs +0 -42
  348. package/tests/context7-only.test.mjs +0 -42
  349. package/tests/conversation-flow.test.mjs +0 -63
  350. package/tests/interactive-simulation.test.mjs +0 -60
  351. package/tests/live-output.test.mjs +0 -53
  352. package/tests/mcp-context7.test.mjs +0 -105
  353. package/tests/mcp-e2e.test.mjs +0 -109
  354. package/tests/mcp-time-server.test.mjs +0 -58
  355. package/tests/streaming.test.mjs +0 -57
  356. package/tests/test-helpers.mjs +0 -94
  357. package/tests/text-wrapping.test.mjs +0 -33
  358. package/tests/tool-count.test.mjs +0 -81
  359. package/tests/ui-format.test.mjs +0 -39
  360. package/tests/ui-state.test.mjs +0 -72
@@ -0,0 +1,665 @@
1
+ name: '🔧 CodeMie Inline Code Fix'
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ pull_request_review:
9
+ types: [submitted]
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.event.issue.number || github.event.pull_request.number }}-${{ github.event.comment.id || github.event.review.id }}
13
+ cancel-in-progress: false # Don't cancel - each fix request is independent
14
+
15
+ defaults:
16
+ run:
17
+ shell: bash
18
+
19
+ permissions:
20
+ contents: write
21
+ pull-requests: write
22
+ issues: write
23
+
24
+ jobs:
25
+ codemie-fix:
26
+ # Only run if @codemie is mentioned but NOT @codemie-review or @codemie-ai-review (which trigger the review workflow)
27
+ if: |
28
+ (github.event_name == 'issue_comment' &&
29
+ github.event.issue.pull_request != null &&
30
+ (contains(github.event.comment.body, '@codemie') ||
31
+ contains(github.event.comment.body, '@CodeMie') ||
32
+ contains(github.event.comment.body, '@CODEMIE')) &&
33
+ !(contains(github.event.comment.body, '@codemie-review') ||
34
+ contains(github.event.comment.body, '@codemie-ai-review') ||
35
+ contains(github.event.comment.body, '@CodeMie-review') ||
36
+ contains(github.event.comment.body, '@CODEMIE-REVIEW'))) ||
37
+ (github.event_name == 'pull_request_review_comment' &&
38
+ (contains(github.event.comment.body, '@codemie') ||
39
+ contains(github.event.comment.body, '@CodeMie') ||
40
+ contains(github.event.comment.body, '@CODEMIE')) &&
41
+ !(contains(github.event.comment.body, '@codemie-review') ||
42
+ contains(github.event.comment.body, '@codemie-ai-review') ||
43
+ contains(github.event.comment.body, '@CodeMie-review') ||
44
+ contains(github.event.comment.body, '@CODEMIE-REVIEW'))) ||
45
+ (github.event_name == 'pull_request_review' &&
46
+ (contains(github.event.review.body, '@codemie') ||
47
+ contains(github.event.review.body, '@CodeMie') ||
48
+ contains(github.event.review.body, '@CODEMIE')) &&
49
+ !(contains(github.event.review.body, '@codemie-review') ||
50
+ contains(github.event.review.body, '@codemie-ai-review') ||
51
+ contains(github.event.review.body, '@CodeMie-review') ||
52
+ contains(github.event.review.body, '@CODEMIE-REVIEW')))
53
+
54
+ timeout-minutes: 10
55
+ runs-on: ubuntu-latest
56
+ environment: dev
57
+
58
+ steps:
59
+ - name: Add "eyes" reaction to show we're working
60
+ uses: actions/github-script@v7
61
+ continue-on-error: true
62
+ with:
63
+ github-token: ${{ secrets.GITHUB_TOKEN }}
64
+ script: |
65
+ try {
66
+ let commentId;
67
+ let reactionType;
68
+
69
+ if (context.eventName === 'pull_request_review_comment') {
70
+ // For PR review comments (inline), use different API
71
+ commentId = context.payload.comment.id;
72
+ reactionType = 'createForPullRequestReviewComment';
73
+ } else if (context.eventName === 'issue_comment') {
74
+ // For issue/PR conversation comments
75
+ commentId = context.payload.comment.id;
76
+ reactionType = 'createForIssueComment';
77
+ } else if (context.eventName === 'pull_request_review') {
78
+ // For review summaries - can't add reaction, skip
79
+ console.log('Cannot add reaction to review summary, skipping');
80
+ return;
81
+ }
82
+
83
+ if (commentId) {
84
+ await github.rest.reactions[reactionType]({
85
+ owner: context.repo.owner,
86
+ repo: context.repo.repo,
87
+ comment_id: commentId,
88
+ content: 'eyes'
89
+ });
90
+ console.log('Added eyes reaction to comment', commentId);
91
+ }
92
+ } catch (error) {
93
+ console.log('Failed to add reaction (non-critical):', error.message);
94
+ }
95
+
96
+ - name: Extract PR and branch information
97
+ id: pr_info
98
+ uses: actions/github-script@v7
99
+ with:
100
+ github-token: ${{ secrets.GITHUB_TOKEN }}
101
+ script: |
102
+ let prNumber, branchName, commentBody, commentUrl, commentPath, commentLine, isReply;
103
+
104
+ // Get PR number and comment details based on event type
105
+ if (context.eventName === 'issue_comment' && context.payload.issue.pull_request) {
106
+ // Comment on PR conversation (includes replies)
107
+ prNumber = context.payload.issue.number;
108
+ commentBody = context.payload.comment.body;
109
+ commentUrl = context.payload.comment.html_url;
110
+
111
+ // Check if this is a reply to another comment
112
+ if (context.payload.comment.in_reply_to_id) {
113
+ isReply = true;
114
+ console.log('This is a reply to comment:', context.payload.comment.in_reply_to_id);
115
+ }
116
+
117
+ // Get PR details to find branch
118
+ const pr = await github.rest.pulls.get({
119
+ owner: context.repo.owner,
120
+ repo: context.repo.repo,
121
+ pull_number: prNumber
122
+ });
123
+ branchName = pr.data.head.ref;
124
+
125
+ } else if (context.eventName === 'pull_request_review_comment') {
126
+ // Inline comment on PR diff (or reply to inline comment)
127
+ prNumber = context.payload.pull_request.number;
128
+ branchName = context.payload.pull_request.head.ref;
129
+ commentBody = context.payload.comment.body;
130
+ commentUrl = context.payload.comment.html_url;
131
+ commentPath = context.payload.comment.path;
132
+ commentLine = context.payload.comment.line || context.payload.comment.original_line;
133
+
134
+ // Check if this is a reply
135
+ if (context.payload.comment.in_reply_to_id) {
136
+ isReply = true;
137
+ console.log('This is a reply to inline comment:', context.payload.comment.in_reply_to_id);
138
+ }
139
+
140
+ } else if (context.eventName === 'pull_request_review') {
141
+ // Review comment
142
+ prNumber = context.payload.pull_request.number;
143
+ branchName = context.payload.pull_request.head.ref;
144
+ commentBody = context.payload.review.body;
145
+ commentUrl = context.payload.review.html_url;
146
+ }
147
+
148
+ // Extract instructions after @codemie or @codemie-ai (case-insensitive)
149
+ const instructions = commentBody.replace(/@codemie(-ai)?\s*/i, '').trim();
150
+
151
+ core.setOutput('pr_number', prNumber);
152
+ core.setOutput('branch_name', branchName);
153
+ core.setOutput('comment_body', commentBody);
154
+ core.setOutput('comment_url', commentUrl);
155
+ core.setOutput('instructions', instructions);
156
+ core.setOutput('comment_path', commentPath || '');
157
+ core.setOutput('comment_line', commentLine || '');
158
+ core.setOutput('is_reply', isReply || false);
159
+
160
+ console.log('='.repeat(50));
161
+ console.log('PR Number:', prNumber);
162
+ console.log('Branch:', branchName);
163
+ console.log('Is Reply:', isReply || false);
164
+ console.log('Instructions:', instructions);
165
+ console.log('File:', commentPath || 'N/A');
166
+ console.log('Line:', commentLine || 'N/A');
167
+ console.log('Comment URL:', commentUrl);
168
+ console.log('='.repeat(50));
169
+
170
+ - name: Checkout PR branch
171
+ uses: actions/checkout@v4
172
+ with:
173
+ ref: ${{ steps.pr_info.outputs.branch_name }}
174
+ fetch-depth: 0
175
+ token: ${{ secrets.GITHUB_TOKEN }}
176
+
177
+ - name: Set up Node.js
178
+ uses: actions/setup-node@v4
179
+ with:
180
+ node-version: '24'
181
+
182
+ - name: Install CodeMie CLI
183
+ run: npm install -g @codemieai/code
184
+
185
+ - name: Install Claude Code
186
+ run: codemie install claude
187
+
188
+ - name: Set up Python
189
+ uses: actions/setup-python@v5
190
+ with:
191
+ python-version: '3.11'
192
+
193
+ - name: Install Poetry
194
+ uses: snok/install-poetry@v1
195
+ with:
196
+ version: '1.8.0'
197
+ virtualenvs-create: true
198
+ virtualenvs-in-project: true
199
+
200
+ - name: Cache Poetry dependencies
201
+ uses: actions/cache@v4
202
+ with:
203
+ path: ~/.cache/pypoetry
204
+ key: poetry-cache-${{ runner.os }}-py3.11-${{ hashFiles('**/poetry.lock') }}
205
+ restore-keys: |
206
+ poetry-cache-${{ runner.os }}-py3.11-
207
+
208
+ - name: Load cached venv
209
+ id: cached-poetry-dependencies
210
+ uses: actions/cache@v4
211
+ with:
212
+ path: .venv
213
+ key: venv-${{ runner.os }}-py3.11-${{ hashFiles('**/poetry.lock') }}
214
+ restore-keys: |
215
+ venv-${{ runner.os }}-py3.11-
216
+
217
+ - name: Install dependencies
218
+ if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
219
+ run: poetry install --no-interaction
220
+
221
+ - name: Configure Git
222
+ run: |
223
+ git config --global user.email "codemie-bot[bot]@users.noreply.github.com"
224
+ git config --global user.name "CodeMie Bot"
225
+
226
+ - name: Verify AWS Credentials
227
+ run: |
228
+ if [ -z "${{ secrets.AWS_REGION }}" ]; then
229
+ echo "❌ ERROR: AWS_REGION secret is not set"
230
+ exit 1
231
+ fi
232
+ if [ -z "${{ secrets.AWS_ACCESS_KEY_ID }}" ]; then
233
+ echo "❌ ERROR: AWS_ACCESS_KEY_ID secret is not set"
234
+ exit 1
235
+ fi
236
+ if [ -z "${{ secrets.AWS_SECRET_ACCESS_KEY }}" ]; then
237
+ echo "❌ ERROR: AWS_SECRET_ACCESS_KEY secret is not set"
238
+ exit 1
239
+ fi
240
+ echo "✅ AWS credentials configured"
241
+
242
+ - name: Run CodeMie Inline Fix
243
+ id: codemie_fix
244
+ env:
245
+ # AWS Bedrock Configuration
246
+ CLAUDE_CODE_USE_BEDROCK: "1"
247
+ AWS_REGION: ${{ secrets.AWS_REGION }}
248
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
249
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
250
+ AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
251
+ # Project Configuration
252
+ PYTHONPATH: "src"
253
+ POETRY_VIRTUALENVS_IN_PROJECT: "true"
254
+ # CI Configuration
255
+ CI: "true"
256
+ GITHUB_ACTIONS: "true"
257
+ # Claude Configuration
258
+ MAX_TURNS: ${{ vars.CODEMIE_MAX_TURNS || '50' }}
259
+ # Context
260
+ PR_NUMBER: ${{ steps.pr_info.outputs.pr_number }}
261
+ BRANCH_NAME: ${{ steps.pr_info.outputs.branch_name }}
262
+ INSTRUCTIONS: ${{ steps.pr_info.outputs.instructions }}
263
+ COMMENT_PATH: ${{ steps.pr_info.outputs.comment_path }}
264
+ COMMENT_LINE: ${{ steps.pr_info.outputs.comment_line }}
265
+ COMMENT_URL: ${{ steps.pr_info.outputs.comment_url }}
266
+ run: |
267
+ set -euo pipefail
268
+
269
+ # Determine model
270
+ MODEL="${{ secrets.ANTHROPIC_MODEL }}"
271
+ if [ -z "$MODEL" ]; then
272
+ MODEL="anthropic.claude-3-5-sonnet-20241022-v2:0"
273
+ fi
274
+
275
+ echo "================================================"
276
+ echo "CodeMie Inline Fix"
277
+ echo "================================================"
278
+ echo "PR: #${PR_NUMBER}"
279
+ echo "Branch: ${BRANCH_NAME}"
280
+ echo "Model: ${MODEL}"
281
+ echo "Instructions: ${INSTRUCTIONS}"
282
+ if [ -n "${COMMENT_PATH}" ]; then
283
+ echo "File: ${COMMENT_PATH}:${COMMENT_LINE}"
284
+ fi
285
+ echo "Comment: ${COMMENT_URL}"
286
+ echo "================================================"
287
+
288
+ # Create focused prompt for quick inline fix
289
+ cat > /tmp/fix-prompt.txt << 'PROMPT_EOF'
290
+ ## Your Role
291
+
292
+ You are CodeMie, a focused code assistant that makes quick, precise code changes based on comments.
293
+
294
+ ## Your Task
295
+
296
+ Someone has commented on code in a Pull Request asking you to make a change. Your job is to:
297
+ 1. Understand the request
298
+ 2. Make the specific change requested
299
+ 3. Commit it
300
+ 4. Keep it simple and focused
301
+
302
+ ## Context
303
+
304
+ - **PR Number**: ${PR_NUMBER}
305
+ - **Branch**: ${BRANCH_NAME}
306
+ - **Request**: ${INSTRUCTIONS}
307
+ PROMPT_EOF
308
+
309
+ # Add file context if this is an inline comment
310
+ if [ -n "${COMMENT_PATH}" ]; then
311
+ cat >> /tmp/fix-prompt.txt << PROMPT_EOF2
312
+
313
+ - **File commented on**: ${COMMENT_PATH}
314
+ - **Line number**: ${COMMENT_LINE}
315
+ - **Comment location**: ${COMMENT_URL}
316
+
317
+ ## Instructions
318
+
319
+ 1. First, read the file that was commented on:
320
+ \`\`\`bash
321
+ cat "${COMMENT_PATH}"
322
+ \`\`\`
323
+
324
+ 2. Look at the specific line (around line ${COMMENT_LINE}) and understand the context
325
+
326
+ 3. Make the change requested: ${INSTRUCTIONS}
327
+
328
+ 4. The change should be focused on the commented code area
329
+ PROMPT_EOF2
330
+ else
331
+ cat >> /tmp/fix-prompt.txt << 'PROMPT_EOF3'
332
+
333
+ ## Instructions
334
+
335
+ 1. Review the PR changes to understand context:
336
+ ```bash
337
+ git diff origin/main...HEAD
338
+ ```
339
+
340
+ 2. Understand what needs to be changed: ${INSTRUCTIONS}
341
+
342
+ 3. Make the requested changes
343
+ PROMPT_EOF3
344
+ fi
345
+
346
+ # Add common instructions
347
+ cat >> /tmp/fix-prompt.txt << 'PROMPT_EOF4'
348
+
349
+ ## Guidelines
350
+
351
+ **DO:**
352
+ - ✅ Make the exact change requested
353
+ - ✅ Keep it simple and focused
354
+ - ✅ Follow existing code style
355
+ - ✅ Test your change if possible (run relevant commands)
356
+ - ✅ Commit with a clear message
357
+
358
+ **DON'T:**
359
+ - ❌ Make unrelated changes
360
+ - ❌ Refactor surrounding code
361
+ - ❌ Add unnecessary features
362
+ - ❌ Change code style unnecessarily
363
+ - ❌ Over-engineer the solution
364
+
365
+ ## Commit Message Format
366
+
367
+ Use this format:
368
+ ```
369
+ fix: [brief description of the change]
370
+
371
+ Requested by: ${COMMENT_URL}
372
+
373
+ Co-authored-by: CodeMie AI <codemie.ai@gmail.com>
374
+ ```
375
+
376
+ ## Important
377
+
378
+ - You're on branch: ${BRANCH_NAME}
379
+ - Changes will be committed directly to this branch
380
+ - Keep it quick: this is a focused inline fix, not a feature implementation
381
+ - If you need to activate venv: `source .venv/bin/activate`
382
+ - Follow DEV_GUIDE.md patterns if they exist
383
+
384
+ ## Start
385
+
386
+ Begin by understanding the request and the code context, then make the change.
387
+ PROMPT_EOF4
388
+
389
+ # Replace environment variables in prompt
390
+ sed -i "s|\${PR_NUMBER}|${PR_NUMBER}|g" /tmp/fix-prompt.txt
391
+ sed -i "s|\${BRANCH_NAME}|${BRANCH_NAME}|g" /tmp/fix-prompt.txt
392
+ sed -i "s|\${INSTRUCTIONS}|${INSTRUCTIONS}|g" /tmp/fix-prompt.txt
393
+ sed -i "s|\${COMMENT_PATH}|${COMMENT_PATH}|g" /tmp/fix-prompt.txt
394
+ sed -i "s|\${COMMENT_LINE}|${COMMENT_LINE}|g" /tmp/fix-prompt.txt
395
+ sed -i "s|\${COMMENT_URL}|${COMMENT_URL}|g" /tmp/fix-prompt.txt
396
+
397
+ echo ""
398
+ echo "Running CodeMie fix with max-turns: ${MAX_TURNS}..."
399
+ echo ""
400
+
401
+ # Run CodeMie Code with focused permissions for quick fixes
402
+ timeout 10m claude \
403
+ -p "$(cat /tmp/fix-prompt.txt)" \
404
+ --model "${MODEL}" \
405
+ --max-turns "${MAX_TURNS}" \
406
+ --dangerously-skip-permissions \
407
+ --allowedTools "Bash(*),Read(*),Write(*),Edit(*),Grep(*),Glob(*)" \
408
+ --debug \
409
+ 2>&1 | tee /tmp/codemie-fix-output.log || {
410
+ EXIT_CODE=$?
411
+ echo "CodeMie exited with code: ${EXIT_CODE}"
412
+ if [ ${EXIT_CODE} -eq 124 ]; then
413
+ echo "Error: CodeMie timed out after 10 minutes"
414
+ exit 1
415
+ fi
416
+ exit ${EXIT_CODE}
417
+ }
418
+
419
+ echo "✅ CodeMie fix completed"
420
+
421
+ - name: Upload CodeMie Output
422
+ if: always()
423
+ uses: actions/upload-artifact@v4
424
+ with:
425
+ name: codemie-fix-output-${{ github.run_number }}
426
+ path: /tmp/codemie-fix-output.log
427
+ retention-days: 7
428
+
429
+ - name: Commit any uncommitted changes
430
+ id: commit_changes
431
+ run: |
432
+ # Check if there are uncommitted changes (modified or new files)
433
+ if ! git diff --quiet || ! git diff --cached --quiet || [ -n "$(git ls-files --others --exclude-standard)" ]; then
434
+ echo "Found uncommitted changes, committing them..."
435
+
436
+ # Stage all changes
437
+ git add -A
438
+
439
+ # Create commit message
440
+ COMMIT_MSG="fix: apply CodeMie requested changes
441
+
442
+ Requested by: ${{ steps.pr_info.outputs.comment_url }}
443
+
444
+ Co-authored-by: CodeMie AI <codemie.ai@gmail.com>"
445
+
446
+ # Commit changes
447
+ git commit -m "$COMMIT_MSG" || echo "Commit may have been done by Claude already"
448
+
449
+ echo "has_changes=true" >> $GITHUB_OUTPUT
450
+ echo "✅ Changes committed"
451
+ else
452
+ echo "No uncommitted changes"
453
+ echo "has_changes=false" >> $GITHUB_OUTPUT
454
+ fi
455
+
456
+ - name: Check if there are commits to push
457
+ id: check_push
458
+ run: |
459
+ # Check if local branch is ahead of remote
460
+ git fetch origin ${{ steps.pr_info.outputs.branch_name }}
461
+
462
+ LOCAL=$(git rev-parse HEAD)
463
+ REMOTE=$(git rev-parse origin/${{ steps.pr_info.outputs.branch_name }} 2>/dev/null || echo "")
464
+
465
+ if [ "$LOCAL" != "$REMOTE" ]; then
466
+ echo "has_commits=true" >> $GITHUB_OUTPUT
467
+ echo "Local branch is ahead of remote, push needed"
468
+
469
+ # Show what will be pushed
470
+ if [ -n "$REMOTE" ]; then
471
+ echo "Commits to push:"
472
+ git log --oneline origin/${{ steps.pr_info.outputs.branch_name }}..HEAD
473
+ else
474
+ echo "New branch will be pushed"
475
+ fi
476
+ else
477
+ echo "has_commits=false" >> $GITHUB_OUTPUT
478
+ echo "Local branch is up to date with remote"
479
+ fi
480
+
481
+ - name: Push changes to PR branch with retry
482
+ if: steps.check_push.outputs.has_commits == 'true'
483
+ run: |
484
+ BRANCH="${{ steps.pr_info.outputs.branch_name }}"
485
+ MAX_ATTEMPTS=3
486
+
487
+ for i in $(seq 1 $MAX_ATTEMPTS); do
488
+ echo "================================================"
489
+ echo "Push attempt $i of $MAX_ATTEMPTS"
490
+ echo "================================================"
491
+
492
+ # Fetch latest changes from remote
493
+ echo "Fetching latest changes from origin/$BRANCH..."
494
+ git fetch origin "$BRANCH"
495
+
496
+ # Try to push
497
+ echo "Attempting to push to $BRANCH..."
498
+ if git push origin HEAD 2>&1; then
499
+ echo "✅ Changes pushed successfully on attempt $i"
500
+ exit 0
501
+ fi
502
+
503
+ # Push failed, check if we should retry
504
+ if [ $i -lt $MAX_ATTEMPTS ]; then
505
+ echo "⚠️ Push failed (likely non-fast-forward), attempting rebase..."
506
+
507
+ # Try to rebase on top of remote changes
508
+ if git rebase "origin/$BRANCH"; then
509
+ echo "✅ Rebased successfully on origin/$BRANCH"
510
+ echo "Retrying push..."
511
+ else
512
+ echo "❌ Rebase failed due to conflicts"
513
+ git rebase --abort
514
+ echo ""
515
+ echo "This usually means:"
516
+ echo "- Multiple CodeMie workflows modified the same lines"
517
+ echo "- Manual intervention needed to resolve conflicts"
518
+ exit 1
519
+ fi
520
+ else
521
+ echo "❌ Failed to push after $MAX_ATTEMPTS attempts"
522
+ exit 1
523
+ fi
524
+
525
+ echo ""
526
+ done
527
+
528
+ echo "❌ Unexpected: Loop completed without success or failure"
529
+ exit 1
530
+
531
+ - name: Reply to comment with success
532
+ if: success() && steps.check_push.outputs.has_commits == 'true'
533
+ uses: actions/github-script@v7
534
+ continue-on-error: true
535
+ with:
536
+ github-token: ${{ secrets.GITHUB_TOKEN }}
537
+ script: |
538
+ const prNumber = ${{ steps.pr_info.outputs.pr_number }};
539
+ const branchName = '${{ steps.pr_info.outputs.branch_name }}';
540
+ const runUrl = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}';
541
+
542
+ // Get list of changed files
543
+ const { execSync } = require('child_process');
544
+ const changedFiles = execSync('git diff HEAD~1 --name-only').toString().trim();
545
+
546
+ const reply = `✅ **Fixed by CodeMie!**
547
+
548
+ Changes have been committed to branch \`${branchName}\`.
549
+
550
+ **Files modified:**
551
+ \`\`\`
552
+ ${changedFiles}
553
+ \`\`\`
554
+
555
+ **Commit**: ${context.sha.substring(0, 7)}
556
+
557
+ [View workflow run](${runUrl}) | [View changes](https://github.com/${{ github.repository }}/pull/${prNumber}/files)
558
+
559
+ ---
560
+ 🤖 *CodeMie - Your inline code assistant*`;
561
+
562
+ try {
563
+ // Try to post as regular PR comment (works for all cases)
564
+ await github.rest.issues.createComment({
565
+ owner: context.repo.owner,
566
+ repo: context.repo.repo,
567
+ issue_number: prNumber,
568
+ body: reply
569
+ });
570
+ console.log('Posted success reply to PR #' + prNumber);
571
+
572
+ // Try to add thumbs up reaction to original comment
573
+ try {
574
+ const commentId = context.payload.comment?.id || context.payload.review?.id;
575
+ if (commentId) {
576
+ if (context.eventName === 'pull_request_review_comment') {
577
+ await github.rest.reactions.createForPullRequestReviewComment({
578
+ owner: context.repo.owner,
579
+ repo: context.repo.repo,
580
+ comment_id: commentId,
581
+ content: '+1'
582
+ });
583
+ } else if (context.eventName === 'issue_comment') {
584
+ await github.rest.reactions.createForIssueComment({
585
+ owner: context.repo.owner,
586
+ repo: context.repo.repo,
587
+ comment_id: commentId,
588
+ content: '+1'
589
+ });
590
+ }
591
+ console.log('Added thumbs up reaction');
592
+ }
593
+ } catch (reactionError) {
594
+ console.log('Could not add reaction (non-critical):', reactionError.message);
595
+ }
596
+ } catch (error) {
597
+ console.log('Failed to post reply:', error.message);
598
+ }
599
+
600
+ - name: Reply to comment with no changes
601
+ if: success() && steps.check_push.outputs.has_commits == 'false'
602
+ uses: actions/github-script@v7
603
+ continue-on-error: true
604
+ with:
605
+ github-token: ${{ secrets.GITHUB_TOKEN }}
606
+ script: |
607
+ const prNumber = ${{ steps.pr_info.outputs.pr_number }};
608
+ const runUrl = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}';
609
+
610
+ const reply = `ℹ️ **CodeMie completed**
611
+
612
+ No changes were needed, or the requested change couldn't be applied.
613
+
614
+ This might mean:
615
+ - The change was already present in the code
616
+ - The request wasn't clear enough
617
+ - The change couldn't be made safely
618
+
619
+ [View workflow run](${runUrl}) for details.
620
+
621
+ ---
622
+ 🤖 *CodeMie - Your inline code assistant*`;
623
+
624
+ await github.rest.issues.createComment({
625
+ owner: context.repo.owner,
626
+ repo: context.repo.repo,
627
+ issue_number: prNumber,
628
+ body: reply
629
+ });
630
+
631
+ - name: Reply to comment with failure
632
+ if: failure()
633
+ uses: actions/github-script@v7
634
+ continue-on-error: true
635
+ with:
636
+ github-token: ${{ secrets.GITHUB_TOKEN }}
637
+ script: |
638
+ const prNumber = ${{ steps.pr_info.outputs.pr_number }};
639
+ const runUrl = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}';
640
+
641
+ const reply = `❌ **CodeMie encountered an error**
642
+
643
+ I wasn't able to complete the requested change due to an error.
644
+
645
+ **Common issues:**
646
+ - AWS Bedrock credentials not configured
647
+ - Request was too complex for quick fix
648
+ - Code conflicts or merge issues
649
+
650
+ [View workflow logs](${runUrl}) for details.
651
+
652
+ **Try:**
653
+ - Simplify the request (one specific change at a time)
654
+ - Make sure the file/line still exists
655
+ - Check if there are merge conflicts
656
+
657
+ ---
658
+ 🤖 *CodeMie - Your inline code assistant*`;
659
+
660
+ await github.rest.issues.createComment({
661
+ owner: context.repo.owner,
662
+ repo: context.repo.repo,
663
+ issue_number: prNumber,
664
+ body: reply
665
+ });