@elsikora/commitizen-plugin-commitlint-ai 2.0.0-dev.1 → 2.0.0-dev.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 (336) hide show
  1. package/README.md +71 -58
  2. package/dist/cjs/application/constant/config-file-directory.constant.d.ts +0 -1
  3. package/dist/cjs/application/constant/config-module-name.constant.d.ts +0 -1
  4. package/dist/cjs/application/constant/index.d.ts +2 -3
  5. package/dist/cjs/application/index.d.ts +2 -3
  6. package/dist/cjs/application/interface/cli-interface-service-select-options.interface.d.ts +0 -1
  7. package/dist/cjs/application/interface/cli-interface-service.interface.d.ts +1 -2
  8. package/dist/cjs/application/interface/command-service.interface.d.ts +0 -1
  9. package/dist/cjs/application/interface/commit-repository.interface.d.ts +1 -2
  10. package/dist/cjs/application/interface/commit-validator.interface.d.ts +2 -3
  11. package/dist/cjs/application/interface/config-service.interface.d.ts +2 -3
  12. package/dist/cjs/application/interface/config.interface.d.ts +2 -3
  13. package/dist/cjs/application/interface/file-system-service.interface.d.ts +0 -1
  14. package/dist/cjs/application/interface/index.d.ts +9 -10
  15. package/dist/cjs/application/interface/llm-service.interface.d.ts +2 -3
  16. package/dist/cjs/application/use-case/configure-llm.use-case.d.ts +11 -11
  17. package/dist/cjs/application/use-case/configure-llm.use-case.js +25 -19
  18. package/dist/cjs/application/use-case/configure-llm.use-case.js.map +1 -1
  19. package/dist/cjs/application/use-case/generate-commit-message.use-case.d.ts +8 -9
  20. package/dist/cjs/application/use-case/generate-commit-message.use-case.js +5 -5
  21. package/dist/cjs/application/use-case/index.d.ts +4 -5
  22. package/dist/cjs/application/use-case/manual-commit.use-case.d.ts +5 -6
  23. package/dist/cjs/application/use-case/manual-commit.use-case.js +4 -2
  24. package/dist/cjs/application/use-case/manual-commit.use-case.js.map +1 -1
  25. package/dist/cjs/application/use-case/validate-commit-message.use-case.d.ts +11 -12
  26. package/dist/cjs/application/use-case/validate-commit-message.use-case.js +9 -8
  27. package/dist/cjs/application/use-case/validate-commit-message.use-case.js.map +1 -1
  28. package/dist/cjs/domain/constant/index.d.ts +1 -2
  29. package/dist/cjs/domain/constant/numeric.constant.d.ts +0 -1
  30. package/dist/cjs/domain/entity/commit-message.entity.d.ts +19 -7
  31. package/dist/cjs/domain/entity/commit-message.entity.js +19 -4
  32. package/dist/cjs/domain/entity/commit-message.entity.js.map +1 -1
  33. package/dist/cjs/domain/entity/index.d.ts +2 -3
  34. package/dist/cjs/domain/entity/llm-configuration.entity.d.ts +25 -18
  35. package/dist/cjs/domain/entity/llm-configuration.entity.js +27 -16
  36. package/dist/cjs/domain/entity/llm-configuration.entity.js.map +1 -1
  37. package/dist/cjs/domain/enum/anthropic-model.enum.d.ts +0 -1
  38. package/dist/cjs/domain/enum/aws-bedrock-model.enum.d.ts +0 -1
  39. package/dist/cjs/domain/enum/azure-openai-model.enum.d.ts +0 -1
  40. package/dist/cjs/domain/enum/commit-mode.enum.d.ts +0 -1
  41. package/dist/cjs/domain/enum/google-model.enum.d.ts +0 -1
  42. package/dist/cjs/domain/enum/index.d.ts +9 -10
  43. package/dist/cjs/domain/enum/llm-provider.enum.d.ts +0 -1
  44. package/dist/cjs/domain/enum/log-level.enum.d.ts +0 -1
  45. package/dist/cjs/domain/enum/ollama-model.enum.d.ts +0 -1
  46. package/dist/cjs/domain/enum/openai-model.enum.d.ts +0 -1
  47. package/dist/cjs/domain/index.d.ts +3 -4
  48. package/dist/cjs/domain/value-object/api-key.value-object.d.ts +5 -4
  49. package/dist/cjs/domain/value-object/api-key.value-object.js +5 -3
  50. package/dist/cjs/domain/value-object/api-key.value-object.js.map +1 -1
  51. package/dist/cjs/domain/value-object/commit-body.value-object.d.ts +7 -1
  52. package/dist/cjs/domain/value-object/commit-body.value-object.js +7 -0
  53. package/dist/cjs/domain/value-object/commit-body.value-object.js.map +1 -1
  54. package/dist/cjs/domain/value-object/commit-header.value-object.d.ts +6 -1
  55. package/dist/cjs/domain/value-object/commit-header.value-object.js +6 -0
  56. package/dist/cjs/domain/value-object/commit-header.value-object.js.map +1 -1
  57. package/dist/cjs/domain/value-object/index.d.ts +3 -4
  58. package/dist/cjs/index.d.ts +15 -4
  59. package/dist/cjs/index.js +17 -3
  60. package/dist/cjs/index.js.map +1 -1
  61. package/dist/cjs/infrastructure/commit-validator/commitlint-validator.service.d.ts +15 -16
  62. package/dist/cjs/infrastructure/commit-validator/commitlint-validator.service.js +13 -13
  63. package/dist/cjs/infrastructure/commit-validator/commitlint-validator.service.js.map +1 -1
  64. package/dist/cjs/infrastructure/commit-validator/index.d.ts +1 -2
  65. package/dist/cjs/infrastructure/di/container.d.ts +1 -2
  66. package/dist/cjs/infrastructure/di/container.js +1 -1
  67. package/dist/cjs/infrastructure/di/index.d.ts +1 -2
  68. package/dist/cjs/infrastructure/git/git-commit.repository.d.ts +9 -10
  69. package/dist/cjs/infrastructure/git/git-commit.repository.js +6 -6
  70. package/dist/cjs/infrastructure/git/index.d.ts +1 -2
  71. package/dist/cjs/infrastructure/index.d.ts +4 -5
  72. package/dist/cjs/infrastructure/llm/anthropic-llm.service.d.ts +14 -15
  73. package/dist/cjs/infrastructure/llm/anthropic-llm.service.js +25 -12
  74. package/dist/cjs/infrastructure/llm/anthropic-llm.service.js.map +1 -1
  75. package/dist/cjs/infrastructure/llm/aws-bedrock-llm.service.d.ts +23 -24
  76. package/dist/cjs/infrastructure/llm/aws-bedrock-llm.service.js +44 -35
  77. package/dist/cjs/infrastructure/llm/aws-bedrock-llm.service.js.map +1 -1
  78. package/dist/cjs/infrastructure/llm/azure-openai-llm.service.d.ts +16 -17
  79. package/dist/cjs/infrastructure/llm/azure-openai-llm.service.js +29 -16
  80. package/dist/cjs/infrastructure/llm/azure-openai-llm.service.js.map +1 -1
  81. package/dist/cjs/infrastructure/llm/google-llm.service.d.ts +16 -17
  82. package/dist/cjs/infrastructure/llm/google-llm.service.js +27 -14
  83. package/dist/cjs/infrastructure/llm/google-llm.service.js.map +1 -1
  84. package/dist/cjs/infrastructure/llm/index.d.ts +6 -7
  85. package/dist/cjs/infrastructure/llm/ollama-llm.service.d.ts +16 -17
  86. package/dist/cjs/infrastructure/llm/ollama-llm.service.js +39 -21
  87. package/dist/cjs/infrastructure/llm/ollama-llm.service.js.map +1 -1
  88. package/dist/cjs/infrastructure/llm/openai-llm.service.d.ts +16 -17
  89. package/dist/cjs/infrastructure/llm/openai-llm.service.js +27 -14
  90. package/dist/cjs/infrastructure/llm/openai-llm.service.js.map +1 -1
  91. package/dist/cjs/infrastructure/service/cosmic-config.service.d.ts +20 -19
  92. package/dist/cjs/infrastructure/service/cosmic-config.service.js +17 -15
  93. package/dist/cjs/infrastructure/service/cosmic-config.service.js.map +1 -1
  94. package/dist/cjs/infrastructure/service/index.d.ts +4 -5
  95. package/dist/cjs/infrastructure/service/node-command.service.d.ts +14 -13
  96. package/dist/cjs/infrastructure/service/node-command.service.js +12 -10
  97. package/dist/cjs/infrastructure/service/node-command.service.js.map +1 -1
  98. package/dist/cjs/infrastructure/service/node-file-system.service.d.ts +22 -23
  99. package/dist/cjs/infrastructure/service/node-file-system.service.js +21 -21
  100. package/dist/cjs/infrastructure/service/prompts-cli-interface.service.d.ts +39 -37
  101. package/dist/cjs/infrastructure/service/prompts-cli-interface.service.js +37 -34
  102. package/dist/cjs/infrastructure/service/prompts-cli-interface.service.js.map +1 -1
  103. package/dist/cjs/presentation/commitizen.adapter.d.ts +7 -3
  104. package/dist/cjs/presentation/commitizen.adapter.js +23 -11
  105. package/dist/cjs/presentation/commitizen.adapter.js.map +1 -1
  106. package/dist/cjs/presentation/index.d.ts +1 -2
  107. package/dist/esm/application/constant/config-file-directory.constant.d.ts +0 -1
  108. package/dist/esm/application/constant/config-module-name.constant.d.ts +0 -1
  109. package/dist/esm/application/constant/index.d.ts +2 -3
  110. package/dist/esm/application/index.d.ts +2 -3
  111. package/dist/esm/application/interface/cli-interface-service-select-options.interface.d.ts +0 -1
  112. package/dist/esm/application/interface/cli-interface-service.interface.d.ts +1 -2
  113. package/dist/esm/application/interface/command-service.interface.d.ts +0 -1
  114. package/dist/esm/application/interface/commit-repository.interface.d.ts +1 -2
  115. package/dist/esm/application/interface/commit-validator.interface.d.ts +2 -3
  116. package/dist/esm/application/interface/config-service.interface.d.ts +2 -3
  117. package/dist/esm/application/interface/config.interface.d.ts +2 -3
  118. package/dist/esm/application/interface/file-system-service.interface.d.ts +0 -1
  119. package/dist/esm/application/interface/index.d.ts +9 -10
  120. package/dist/esm/application/interface/llm-service.interface.d.ts +2 -3
  121. package/dist/esm/application/use-case/configure-llm.use-case.d.ts +11 -11
  122. package/dist/esm/application/use-case/configure-llm.use-case.js +25 -19
  123. package/dist/esm/application/use-case/configure-llm.use-case.js.map +1 -1
  124. package/dist/esm/application/use-case/generate-commit-message.use-case.d.ts +8 -9
  125. package/dist/esm/application/use-case/generate-commit-message.use-case.js +5 -5
  126. package/dist/esm/application/use-case/index.d.ts +4 -5
  127. package/dist/esm/application/use-case/manual-commit.use-case.d.ts +5 -6
  128. package/dist/esm/application/use-case/manual-commit.use-case.js +4 -2
  129. package/dist/esm/application/use-case/manual-commit.use-case.js.map +1 -1
  130. package/dist/esm/application/use-case/validate-commit-message.use-case.d.ts +11 -12
  131. package/dist/esm/application/use-case/validate-commit-message.use-case.js +9 -8
  132. package/dist/esm/application/use-case/validate-commit-message.use-case.js.map +1 -1
  133. package/dist/esm/domain/constant/index.d.ts +1 -2
  134. package/dist/esm/domain/constant/numeric.constant.d.ts +0 -1
  135. package/dist/esm/domain/entity/commit-message.entity.d.ts +19 -7
  136. package/dist/esm/domain/entity/commit-message.entity.js +19 -4
  137. package/dist/esm/domain/entity/commit-message.entity.js.map +1 -1
  138. package/dist/esm/domain/entity/index.d.ts +2 -3
  139. package/dist/esm/domain/entity/llm-configuration.entity.d.ts +25 -18
  140. package/dist/esm/domain/entity/llm-configuration.entity.js +27 -16
  141. package/dist/esm/domain/entity/llm-configuration.entity.js.map +1 -1
  142. package/dist/esm/domain/enum/anthropic-model.enum.d.ts +0 -1
  143. package/dist/esm/domain/enum/aws-bedrock-model.enum.d.ts +0 -1
  144. package/dist/esm/domain/enum/azure-openai-model.enum.d.ts +0 -1
  145. package/dist/esm/domain/enum/commit-mode.enum.d.ts +0 -1
  146. package/dist/esm/domain/enum/google-model.enum.d.ts +0 -1
  147. package/dist/esm/domain/enum/index.d.ts +9 -10
  148. package/dist/esm/domain/enum/llm-provider.enum.d.ts +0 -1
  149. package/dist/esm/domain/enum/log-level.enum.d.ts +0 -1
  150. package/dist/esm/domain/enum/ollama-model.enum.d.ts +0 -1
  151. package/dist/esm/domain/enum/openai-model.enum.d.ts +0 -1
  152. package/dist/esm/domain/index.d.ts +3 -4
  153. package/dist/esm/domain/value-object/api-key.value-object.d.ts +5 -4
  154. package/dist/esm/domain/value-object/api-key.value-object.js +5 -3
  155. package/dist/esm/domain/value-object/api-key.value-object.js.map +1 -1
  156. package/dist/esm/domain/value-object/commit-body.value-object.d.ts +7 -1
  157. package/dist/esm/domain/value-object/commit-body.value-object.js +7 -0
  158. package/dist/esm/domain/value-object/commit-body.value-object.js.map +1 -1
  159. package/dist/esm/domain/value-object/commit-header.value-object.d.ts +6 -1
  160. package/dist/esm/domain/value-object/commit-header.value-object.js +6 -0
  161. package/dist/esm/domain/value-object/commit-header.value-object.js.map +1 -1
  162. package/dist/esm/domain/value-object/index.d.ts +3 -4
  163. package/dist/esm/index.d.ts +15 -4
  164. package/dist/esm/index.js +15 -4
  165. package/dist/esm/index.js.map +1 -1
  166. package/dist/esm/infrastructure/commit-validator/commitlint-validator.service.d.ts +15 -16
  167. package/dist/esm/infrastructure/commit-validator/commitlint-validator.service.js +13 -13
  168. package/dist/esm/infrastructure/commit-validator/commitlint-validator.service.js.map +1 -1
  169. package/dist/esm/infrastructure/commit-validator/index.d.ts +1 -2
  170. package/dist/esm/infrastructure/di/container.d.ts +1 -2
  171. package/dist/esm/infrastructure/di/container.js +1 -1
  172. package/dist/esm/infrastructure/di/index.d.ts +1 -2
  173. package/dist/esm/infrastructure/git/git-commit.repository.d.ts +9 -10
  174. package/dist/esm/infrastructure/git/git-commit.repository.js +6 -6
  175. package/dist/esm/infrastructure/git/index.d.ts +1 -2
  176. package/dist/esm/infrastructure/index.d.ts +4 -5
  177. package/dist/esm/infrastructure/llm/anthropic-llm.service.d.ts +14 -15
  178. package/dist/esm/infrastructure/llm/anthropic-llm.service.js +25 -12
  179. package/dist/esm/infrastructure/llm/anthropic-llm.service.js.map +1 -1
  180. package/dist/esm/infrastructure/llm/aws-bedrock-llm.service.d.ts +23 -24
  181. package/dist/esm/infrastructure/llm/aws-bedrock-llm.service.js +37 -28
  182. package/dist/esm/infrastructure/llm/aws-bedrock-llm.service.js.map +1 -1
  183. package/dist/esm/infrastructure/llm/azure-openai-llm.service.d.ts +16 -17
  184. package/dist/esm/infrastructure/llm/azure-openai-llm.service.js +29 -16
  185. package/dist/esm/infrastructure/llm/azure-openai-llm.service.js.map +1 -1
  186. package/dist/esm/infrastructure/llm/google-llm.service.d.ts +16 -17
  187. package/dist/esm/infrastructure/llm/google-llm.service.js +27 -14
  188. package/dist/esm/infrastructure/llm/google-llm.service.js.map +1 -1
  189. package/dist/esm/infrastructure/llm/index.d.ts +6 -7
  190. package/dist/esm/infrastructure/llm/ollama-llm.service.d.ts +16 -17
  191. package/dist/esm/infrastructure/llm/ollama-llm.service.js +39 -21
  192. package/dist/esm/infrastructure/llm/ollama-llm.service.js.map +1 -1
  193. package/dist/esm/infrastructure/llm/openai-llm.service.d.ts +16 -17
  194. package/dist/esm/infrastructure/llm/openai-llm.service.js +27 -14
  195. package/dist/esm/infrastructure/llm/openai-llm.service.js.map +1 -1
  196. package/dist/esm/infrastructure/service/cosmic-config.service.d.ts +20 -19
  197. package/dist/esm/infrastructure/service/cosmic-config.service.js +17 -15
  198. package/dist/esm/infrastructure/service/cosmic-config.service.js.map +1 -1
  199. package/dist/esm/infrastructure/service/index.d.ts +4 -5
  200. package/dist/esm/infrastructure/service/node-command.service.d.ts +14 -13
  201. package/dist/esm/infrastructure/service/node-command.service.js +12 -10
  202. package/dist/esm/infrastructure/service/node-command.service.js.map +1 -1
  203. package/dist/esm/infrastructure/service/node-file-system.service.d.ts +22 -23
  204. package/dist/esm/infrastructure/service/node-file-system.service.js +21 -21
  205. package/dist/esm/infrastructure/service/prompts-cli-interface.service.d.ts +39 -37
  206. package/dist/esm/infrastructure/service/prompts-cli-interface.service.js +37 -34
  207. package/dist/esm/infrastructure/service/prompts-cli-interface.service.js.map +1 -1
  208. package/dist/esm/package.json +19 -0
  209. package/dist/esm/presentation/commitizen.adapter.d.ts +7 -3
  210. package/dist/esm/presentation/commitizen.adapter.js +23 -11
  211. package/dist/esm/presentation/commitizen.adapter.js.map +1 -1
  212. package/dist/esm/presentation/index.d.ts +1 -2
  213. package/package.json +11 -3
  214. package/dist/cjs/application/constant/config-file-directory.constant.d.ts.map +0 -1
  215. package/dist/cjs/application/constant/config-module-name.constant.d.ts.map +0 -1
  216. package/dist/cjs/application/constant/index.d.ts.map +0 -1
  217. package/dist/cjs/application/index.d.ts.map +0 -1
  218. package/dist/cjs/application/interface/cli-interface-service-select-options.interface.d.ts.map +0 -1
  219. package/dist/cjs/application/interface/cli-interface-service.interface.d.ts.map +0 -1
  220. package/dist/cjs/application/interface/command-service.interface.d.ts.map +0 -1
  221. package/dist/cjs/application/interface/commit-repository.interface.d.ts.map +0 -1
  222. package/dist/cjs/application/interface/commit-validator.interface.d.ts.map +0 -1
  223. package/dist/cjs/application/interface/config-service.interface.d.ts.map +0 -1
  224. package/dist/cjs/application/interface/config.interface.d.ts.map +0 -1
  225. package/dist/cjs/application/interface/file-system-service.interface.d.ts.map +0 -1
  226. package/dist/cjs/application/interface/index.d.ts.map +0 -1
  227. package/dist/cjs/application/interface/llm-service.interface.d.ts.map +0 -1
  228. package/dist/cjs/application/use-case/configure-llm.use-case.d.ts.map +0 -1
  229. package/dist/cjs/application/use-case/generate-commit-message.use-case.d.ts.map +0 -1
  230. package/dist/cjs/application/use-case/index.d.ts.map +0 -1
  231. package/dist/cjs/application/use-case/manual-commit.use-case.d.ts.map +0 -1
  232. package/dist/cjs/application/use-case/validate-commit-message.use-case.d.ts.map +0 -1
  233. package/dist/cjs/domain/constant/index.d.ts.map +0 -1
  234. package/dist/cjs/domain/constant/numeric.constant.d.ts.map +0 -1
  235. package/dist/cjs/domain/entity/commit-message.entity.d.ts.map +0 -1
  236. package/dist/cjs/domain/entity/index.d.ts.map +0 -1
  237. package/dist/cjs/domain/entity/llm-configuration.entity.d.ts.map +0 -1
  238. package/dist/cjs/domain/enum/anthropic-model.enum.d.ts.map +0 -1
  239. package/dist/cjs/domain/enum/aws-bedrock-model.enum.d.ts.map +0 -1
  240. package/dist/cjs/domain/enum/azure-openai-model.enum.d.ts.map +0 -1
  241. package/dist/cjs/domain/enum/commit-mode.enum.d.ts.map +0 -1
  242. package/dist/cjs/domain/enum/google-model.enum.d.ts.map +0 -1
  243. package/dist/cjs/domain/enum/index.d.ts.map +0 -1
  244. package/dist/cjs/domain/enum/llm-provider.enum.d.ts.map +0 -1
  245. package/dist/cjs/domain/enum/log-level.enum.d.ts.map +0 -1
  246. package/dist/cjs/domain/enum/ollama-model.enum.d.ts.map +0 -1
  247. package/dist/cjs/domain/enum/openai-model.enum.d.ts.map +0 -1
  248. package/dist/cjs/domain/index.d.ts.map +0 -1
  249. package/dist/cjs/domain/value-object/api-key.value-object.d.ts.map +0 -1
  250. package/dist/cjs/domain/value-object/commit-body.value-object.d.ts.map +0 -1
  251. package/dist/cjs/domain/value-object/commit-header.value-object.d.ts.map +0 -1
  252. package/dist/cjs/domain/value-object/index.d.ts.map +0 -1
  253. package/dist/cjs/index.d.ts.map +0 -1
  254. package/dist/cjs/infrastructure/commit-validator/commitlint-validator.service.d.ts.map +0 -1
  255. package/dist/cjs/infrastructure/commit-validator/index.d.ts.map +0 -1
  256. package/dist/cjs/infrastructure/di/container.d.ts.map +0 -1
  257. package/dist/cjs/infrastructure/di/index.d.ts.map +0 -1
  258. package/dist/cjs/infrastructure/git/git-commit.repository.d.ts.map +0 -1
  259. package/dist/cjs/infrastructure/git/index.d.ts.map +0 -1
  260. package/dist/cjs/infrastructure/index.d.ts.map +0 -1
  261. package/dist/cjs/infrastructure/llm/anthropic-llm.service.d.ts.map +0 -1
  262. package/dist/cjs/infrastructure/llm/aws-bedrock-llm.service.d.ts.map +0 -1
  263. package/dist/cjs/infrastructure/llm/azure-openai-llm.service.d.ts.map +0 -1
  264. package/dist/cjs/infrastructure/llm/google-llm.service.d.ts.map +0 -1
  265. package/dist/cjs/infrastructure/llm/index.d.ts.map +0 -1
  266. package/dist/cjs/infrastructure/llm/ollama-llm.service.d.ts.map +0 -1
  267. package/dist/cjs/infrastructure/llm/openai-llm.service.d.ts.map +0 -1
  268. package/dist/cjs/infrastructure/service/cosmic-config.service.d.ts.map +0 -1
  269. package/dist/cjs/infrastructure/service/index.d.ts.map +0 -1
  270. package/dist/cjs/infrastructure/service/node-command.service.d.ts.map +0 -1
  271. package/dist/cjs/infrastructure/service/node-file-system.service.d.ts.map +0 -1
  272. package/dist/cjs/infrastructure/service/prompts-cli-interface.service.d.ts.map +0 -1
  273. package/dist/cjs/presentation/commitizen.adapter.d.ts.map +0 -1
  274. package/dist/cjs/presentation/index.d.ts.map +0 -1
  275. package/dist/esm/application/constant/config-file-directory.constant.d.ts.map +0 -1
  276. package/dist/esm/application/constant/config-module-name.constant.d.ts.map +0 -1
  277. package/dist/esm/application/constant/index.d.ts.map +0 -1
  278. package/dist/esm/application/index.d.ts.map +0 -1
  279. package/dist/esm/application/interface/cli-interface-service-select-options.interface.d.ts.map +0 -1
  280. package/dist/esm/application/interface/cli-interface-service.interface.d.ts.map +0 -1
  281. package/dist/esm/application/interface/command-service.interface.d.ts.map +0 -1
  282. package/dist/esm/application/interface/commit-repository.interface.d.ts.map +0 -1
  283. package/dist/esm/application/interface/commit-validator.interface.d.ts.map +0 -1
  284. package/dist/esm/application/interface/config-service.interface.d.ts.map +0 -1
  285. package/dist/esm/application/interface/config.interface.d.ts.map +0 -1
  286. package/dist/esm/application/interface/file-system-service.interface.d.ts.map +0 -1
  287. package/dist/esm/application/interface/index.d.ts.map +0 -1
  288. package/dist/esm/application/interface/llm-service.interface.d.ts.map +0 -1
  289. package/dist/esm/application/use-case/configure-llm.use-case.d.ts.map +0 -1
  290. package/dist/esm/application/use-case/generate-commit-message.use-case.d.ts.map +0 -1
  291. package/dist/esm/application/use-case/index.d.ts.map +0 -1
  292. package/dist/esm/application/use-case/manual-commit.use-case.d.ts.map +0 -1
  293. package/dist/esm/application/use-case/validate-commit-message.use-case.d.ts.map +0 -1
  294. package/dist/esm/domain/constant/index.d.ts.map +0 -1
  295. package/dist/esm/domain/constant/numeric.constant.d.ts.map +0 -1
  296. package/dist/esm/domain/entity/commit-message.entity.d.ts.map +0 -1
  297. package/dist/esm/domain/entity/index.d.ts.map +0 -1
  298. package/dist/esm/domain/entity/llm-configuration.entity.d.ts.map +0 -1
  299. package/dist/esm/domain/enum/anthropic-model.enum.d.ts.map +0 -1
  300. package/dist/esm/domain/enum/aws-bedrock-model.enum.d.ts.map +0 -1
  301. package/dist/esm/domain/enum/azure-openai-model.enum.d.ts.map +0 -1
  302. package/dist/esm/domain/enum/commit-mode.enum.d.ts.map +0 -1
  303. package/dist/esm/domain/enum/google-model.enum.d.ts.map +0 -1
  304. package/dist/esm/domain/enum/index.d.ts.map +0 -1
  305. package/dist/esm/domain/enum/llm-provider.enum.d.ts.map +0 -1
  306. package/dist/esm/domain/enum/log-level.enum.d.ts.map +0 -1
  307. package/dist/esm/domain/enum/ollama-model.enum.d.ts.map +0 -1
  308. package/dist/esm/domain/enum/openai-model.enum.d.ts.map +0 -1
  309. package/dist/esm/domain/index.d.ts.map +0 -1
  310. package/dist/esm/domain/value-object/api-key.value-object.d.ts.map +0 -1
  311. package/dist/esm/domain/value-object/commit-body.value-object.d.ts.map +0 -1
  312. package/dist/esm/domain/value-object/commit-header.value-object.d.ts.map +0 -1
  313. package/dist/esm/domain/value-object/index.d.ts.map +0 -1
  314. package/dist/esm/index.d.ts.map +0 -1
  315. package/dist/esm/infrastructure/commit-validator/commitlint-validator.service.d.ts.map +0 -1
  316. package/dist/esm/infrastructure/commit-validator/index.d.ts.map +0 -1
  317. package/dist/esm/infrastructure/di/container.d.ts.map +0 -1
  318. package/dist/esm/infrastructure/di/index.d.ts.map +0 -1
  319. package/dist/esm/infrastructure/git/git-commit.repository.d.ts.map +0 -1
  320. package/dist/esm/infrastructure/git/index.d.ts.map +0 -1
  321. package/dist/esm/infrastructure/index.d.ts.map +0 -1
  322. package/dist/esm/infrastructure/llm/anthropic-llm.service.d.ts.map +0 -1
  323. package/dist/esm/infrastructure/llm/aws-bedrock-llm.service.d.ts.map +0 -1
  324. package/dist/esm/infrastructure/llm/azure-openai-llm.service.d.ts.map +0 -1
  325. package/dist/esm/infrastructure/llm/google-llm.service.d.ts.map +0 -1
  326. package/dist/esm/infrastructure/llm/index.d.ts.map +0 -1
  327. package/dist/esm/infrastructure/llm/ollama-llm.service.d.ts.map +0 -1
  328. package/dist/esm/infrastructure/llm/openai-llm.service.d.ts.map +0 -1
  329. package/dist/esm/infrastructure/service/cosmic-config.service.d.ts.map +0 -1
  330. package/dist/esm/infrastructure/service/index.d.ts.map +0 -1
  331. package/dist/esm/infrastructure/service/node-command.service.d.ts.map +0 -1
  332. package/dist/esm/infrastructure/service/node-file-system.service.d.ts.map +0 -1
  333. package/dist/esm/infrastructure/service/prompts-cli-interface.service.d.ts.map +0 -1
  334. package/dist/esm/presentation/commitizen.adapter.d.ts.map +0 -1
  335. package/dist/esm/presentation/index.d.ts.map +0 -1
  336. package/dist/tsconfig.tsbuildinfo +0 -1
package/README.md CHANGED
@@ -51,15 +51,18 @@ The plugin is built using clean architecture principles with clear separation of
51
51
  ### Layers
52
52
 
53
53
  - **Domain Layer**: Core business logic, entities, and value objects
54
+
54
55
  - Entities: `CommitMessage`, `LLMConfiguration`
55
56
  - Value Objects: `ApiKey`, `CommitBody`, `CommitHeader`
56
57
  - Enums: `ECommitMode`, `ELLMProvider`, `ELogLevel`
57
58
 
58
59
  - **Application Layer**: Use cases and interfaces
60
+
59
61
  - Use Cases: `GenerateCommitMessageUseCase`, `ValidateCommitMessageUseCase`, `ConfigureLLMUseCase`
60
62
  - Interfaces: `ILLMService`, `ICommitValidator`, `IConfigService`, etc.
61
63
 
62
64
  - **Infrastructure Layer**: External services and implementations
65
+
63
66
  - LLM Services: `OpenAILLMService`, `AnthropicLLMService`, `GoogleLLMService`, `AzureOpenAILLMService`, `AWSBedrockLLMService`, `OllamaLLMService`
64
67
  - Services: `CommitlintValidatorService`, `CosmicConfigService`, `PromptsCliInterface`
65
68
  - Repositories: `GitCommitRepository`
@@ -98,6 +101,7 @@ git cz
98
101
  ```
99
102
 
100
103
  The plugin will:
104
+
101
105
  1. Ask for your commit mode preference (auto/manual)
102
106
  2. If auto mode and no API key is configured, guide you through configuration
103
107
  3. Generate or help you write a commit message
@@ -130,6 +134,7 @@ The plugin supports multiple configuration methods using [Cosmiconfig](https://g
130
134
  ### Configuration File Locations
131
135
 
132
136
  Create a configuration file in any of these locations:
137
+
133
138
  - `.commitlintairc`
134
139
  - `.commitlintairc.json`
135
140
  - `.commitlintairc.yaml`
@@ -145,29 +150,29 @@ Create a configuration file in any of these locations:
145
150
  ```javascript
146
151
  // commitlintai.config.js
147
152
  module.exports = {
148
- // AI provider: 'openai', 'anthropic', 'google', 'azure-openai', 'aws-bedrock', or 'ollama'
149
- provider: 'openai',
150
-
151
- // Model to use (auto-migrates deprecated models)
152
- model: 'gpt-4o',
153
-
154
- // Mode: 'auto' or 'manual'
155
- mode: 'auto',
156
-
157
- // API key (optional - env vars recommended)
158
- // Format varies by provider:
159
- // - OpenAI/Anthropic/Google: 'your-api-key'
160
- // - Azure OpenAI: 'endpoint|api-key|deployment-name'
161
- // - AWS Bedrock: 'region|access-key-id|secret-access-key'
162
- // - Ollama: 'host:port' or 'host:port|custom-model-name'
163
- apiKey: 'your-api-key',
164
-
165
- // Retry configuration
166
- maxGenerationRetries: 3,
167
- maxValidationRetries: 3,
168
-
169
- // Custom instructions for AI
170
- instructions: 'Focus on user-facing changes'
153
+ // AI provider: 'openai', 'anthropic', 'google', 'azure-openai', 'aws-bedrock', or 'ollama'
154
+ provider: "openai",
155
+
156
+ // Model to use (auto-migrates deprecated models)
157
+ model: "gpt-4o",
158
+
159
+ // Mode: 'auto' or 'manual'
160
+ mode: "auto",
161
+
162
+ // API key (optional - env vars recommended)
163
+ // Format varies by provider:
164
+ // - OpenAI/Anthropic/Google: 'your-api-key'
165
+ // - Azure OpenAI: 'endpoint|api-key|deployment-name'
166
+ // - AWS Bedrock: 'region|access-key-id|secret-access-key'
167
+ // - Ollama: 'host:port' or 'host:port|custom-model-name'
168
+ apiKey: "your-api-key",
169
+
170
+ // Retry configuration
171
+ maxGenerationRetries: 3,
172
+ maxValidationRetries: 3,
173
+
174
+ // Custom instructions for AI
175
+ instructions: "Focus on user-facing changes",
171
176
  };
172
177
  ```
173
178
 
@@ -176,19 +181,21 @@ module.exports = {
176
181
  ## Supported LLM Providers
177
182
 
178
183
  ### OpenAI
184
+
179
185
  - `gpt-4.1` (Latest 2025, most capable)
180
186
  - `gpt-4.1-nano` (Fastest 4.1 model)
181
187
  - `gpt-4.1-mini` (Balanced performance)
182
188
  - `gpt-4o` (Enhanced creative writing)
183
189
  - `gpt-4o-mini` (Faster, cost-effective)
184
- - `gpt-4-turbo`
190
+ - `gpt-4-turbo`
185
191
  - `gpt-4` (Original)
186
192
  - `gpt-3.5-turbo` (Fastest, most economical)
187
193
  - `o1` (Enhanced reasoning)
188
194
  - `o1-mini` (Fast reasoning)
189
195
 
190
196
  ### Anthropic
191
- - `claude-opus-4-20250514` (Latest 2025, most capable)
197
+
198
+ - `claude-opus-4-20250514` (Latest 2025, most capable)
192
199
  - `claude-sonnet-4-20250514` (Latest 2025, high-performance)
193
200
  - `claude-3-7-sonnet-latest` (Extended thinking capabilities)
194
201
  - `claude-3-5-sonnet-latest` (Previous flagship)
@@ -196,6 +203,7 @@ module.exports = {
196
203
  - `claude-3-opus-latest` (Complex tasks)
197
204
 
198
205
  ### Google (Gemini)
206
+
199
207
  - `gemini-2.5-pro` (Latest 2025, most capable)
200
208
  - `gemini-2.5-flash` (Latest 2025, fast)
201
209
  - `gemini-2.0-flash-exp` (Experimental)
@@ -205,12 +213,14 @@ module.exports = {
205
213
  - `gemini-1.0-pro`
206
214
 
207
215
  ### Google (Gemma - Open Models for Vertex AI)
216
+
208
217
  - `gemma-3-27b` (Most capable open model)
209
218
  - `gemma-3-12b` (Strong language capabilities)
210
219
  - `gemma-3-4b` (Balanced, multimodal support)
211
220
  - `gemma-3-1b` (Lightweight for edge deployment)
212
221
 
213
222
  ### Azure OpenAI
223
+
214
224
  - `gpt-4.1-turbo-2024-12-17` (Latest 2025, most capable)
215
225
  - `gpt-4.1-preview-2024-12-17` (Latest preview)
216
226
  - `gpt-4.1-mini-2024-12-17` (Fast 4.1 model)
@@ -222,6 +232,7 @@ module.exports = {
222
232
  - `o4-mini-2024-12-17` (Fast reasoning)
223
233
 
224
234
  ### AWS Bedrock
235
+
225
236
  - `anthropic.claude-opus-4-20250514-v1:0` (Claude Opus 4 - Latest 2025, most capable)
226
237
  - `anthropic.claude-sonnet-4-20250514-v1:0` (Claude Sonnet 4 - Latest 2025, balanced)
227
238
  - `anthropic.claude-3-5-sonnet-20241022-v2:0` (Claude 3.5 Sonnet v2)
@@ -233,6 +244,7 @@ module.exports = {
233
244
  - `mistral.mistral-large-2411-v1:0` (Latest Mistral)
234
245
 
235
246
  ### Ollama (Local Models)
247
+
236
248
  - `llama3.2` (Latest Llama)
237
249
  - `llama3.1`
238
250
  - `llama3`
@@ -246,14 +258,14 @@ module.exports = {
246
258
  ```javascript
247
259
  // commitlint.config.js
248
260
  export default {
249
- extends: ['@commitlint/config-conventional'],
250
- rules: {
251
- 'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'style', 'refactor']],
252
- 'scope-case': [2, 'always', 'lower-case'],
253
- 'subject-max-length': [2, 'always', 72],
254
- 'body-max-line-length': [2, 'always', 100]
255
- }
256
- }
261
+ extends: ["@commitlint/config-conventional"],
262
+ rules: {
263
+ "type-enum": [2, "always", ["feat", "fix", "docs", "style", "refactor"]],
264
+ "scope-case": [2, "always", "lower-case"],
265
+ "subject-max-length": [2, "always", 72],
266
+ "body-max-line-length": [2, "always", 100],
267
+ },
268
+ };
257
269
  ```
258
270
 
259
271
  ### Manual Mode
@@ -270,36 +282,36 @@ touch .elsikora/manual
270
282
 
271
283
  ```json
272
284
  {
273
- "commitlintai": {
274
- "provider": "anthropic",
275
- "model": "claude-3-5-sonnet-20241022",
276
- "mode": "auto",
277
- "maxGenerationRetries": 5
278
- }
285
+ "commitlintai": {
286
+ "provider": "anthropic",
287
+ "model": "claude-3-5-sonnet-20241022",
288
+ "mode": "auto",
289
+ "maxGenerationRetries": 5
290
+ }
279
291
  }
280
292
  ```
281
293
 
282
294
  ## 🛣 Roadmap
283
295
 
284
- | Task / Feature | Status |
285
- | ------------------------------------------------------------------------- | ----------- |
286
- | AI-powered commit message generation using OpenAI or Anthropic models | ✅ Complete |
287
- | Full integration with Commitlint rules and configuration | ✅ Complete |
288
- | Support for both manual and automatic commit modes | ✅ Complete |
289
- | Clean architecture implementation | ✅ Complete |
290
- | Cosmiconfig support for flexible configuration | ✅ Complete |
291
- | Environment variable support with priority over config | ✅ Complete |
292
- | Automatic model migration for deprecated models | ✅ Complete |
293
- | Configurable retry mechanism with UI feedback | ✅ Complete |
294
- | Dependency injection with @elsikora/cladi | ✅ Complete |
295
- | Support for more AI providers (Google, Azure, AWS, Ollama) | ✅ Complete |
296
- | Enhanced diff analysis for better commit suggestions | 🚧 Planned |
297
- | Custom prompt templates per project | 🚧 Planned |
298
- | Integration with more Git hosting platforms | 🚧 Planned |
299
- | Performance optimizations for large codebases | 🚧 Planned |
300
- | Multi-language support for commit messages | 🚧 Planned |
301
- | Team collaboration features | 🚧 Planned |
302
- | Web UI for configuration management | 🚧 Planned |
296
+ | Task / Feature | Status |
297
+ | --------------------------------------------------------------------- | ----------- |
298
+ | AI-powered commit message generation using OpenAI or Anthropic models | ✅ Complete |
299
+ | Full integration with Commitlint rules and configuration | ✅ Complete |
300
+ | Support for both manual and automatic commit modes | ✅ Complete |
301
+ | Clean architecture implementation | ✅ Complete |
302
+ | Cosmiconfig support for flexible configuration | ✅ Complete |
303
+ | Environment variable support with priority over config | ✅ Complete |
304
+ | Automatic model migration for deprecated models | ✅ Complete |
305
+ | Configurable retry mechanism with UI feedback | ✅ Complete |
306
+ | Dependency injection with @elsikora/cladi | ✅ Complete |
307
+ | Support for more AI providers (Google, Azure, AWS, Ollama) | ✅ Complete |
308
+ | Enhanced diff analysis for better commit suggestions | 🚧 Planned |
309
+ | Custom prompt templates per project | 🚧 Planned |
310
+ | Integration with more Git hosting platforms | 🚧 Planned |
311
+ | Performance optimizations for large codebases | 🚧 Planned |
312
+ | Multi-language support for commit messages | 🚧 Planned |
313
+ | Team collaboration features | 🚧 Planned |
314
+ | Web UI for configuration management | 🚧 Planned |
303
315
 
304
316
  ## ❓ FAQ
305
317
 
@@ -323,6 +335,7 @@ A: Set the model to `custom` and include the model name in your API key: `localh
323
335
 
324
336
  **Q: What's the difference between provider API key formats?**
325
337
  A: Each provider has specific requirements:
338
+
326
339
  - OpenAI/Anthropic/Google: Simple API key string
327
340
  - Azure OpenAI: `endpoint|api-key|deployment-name`
328
341
  - AWS Bedrock: `region|access-key-id|secret-access-key`
@@ -2,4 +2,3 @@
2
2
  * Directory where configuration files are stored
3
3
  */
4
4
  export declare const CONFIG_FILE_DIRECTORY: string;
5
- //# sourceMappingURL=config-file-directory.constant.d.ts.map
@@ -2,4 +2,3 @@
2
2
  * Module name for configuration
3
3
  */
4
4
  export declare const CONFIG_MODULE_NAME: string;
5
- //# sourceMappingURL=config-module-name.constant.d.ts.map
@@ -1,3 +1,2 @@
1
- export * from "./config-file-directory.constant.js";
2
- export * from "./config-module-name.constant.js";
3
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './config-file-directory.constant';
2
+ export * from './config-module-name.constant';
@@ -1,3 +1,2 @@
1
- export type * from "./interface/index.js";
2
- export * from "./use-case/index.js";
3
- //# sourceMappingURL=index.d.ts.map
1
+ export type * from './interface/index';
2
+ export * from './use-case/index';
@@ -19,4 +19,3 @@ export interface ICliInterfaceServiceSelectOptions {
19
19
  */
20
20
  value: string;
21
21
  }
22
- //# sourceMappingURL=cli-interface-service-select-options.interface.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { ICliInterfaceServiceSelectOptions } from "./cli-interface-service-select-options.interface.js";
1
+ import type { ICliInterfaceServiceSelectOptions } from './cli-interface-service-select-options.interface';
2
2
  /**
3
3
  * Interface for CLI user interaction services.
4
4
  * Provides methods for displaying information and collecting input from users.
@@ -103,4 +103,3 @@ export interface ICliInterfaceService {
103
103
  */
104
104
  warn(message: string): void;
105
105
  }
106
- //# sourceMappingURL=cli-interface-service.interface.d.ts.map
@@ -17,4 +17,3 @@ export interface ICommandService {
17
17
  */
18
18
  executeWithOutput(command: string): Promise<string>;
19
19
  }
20
- //# sourceMappingURL=command-service.interface.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { CommitMessage } from "../../domain/entity/commit-message.entity.js";
1
+ import type { CommitMessage } from '../../domain/entity/commit-message.entity';
2
2
  /**
3
3
  * Interface for commit repository operations
4
4
  */
@@ -30,4 +30,3 @@ export interface ICommitRepository {
30
30
  */
31
31
  hasStagedChanges(): Promise<boolean>;
32
32
  }
33
- //# sourceMappingURL=commit-repository.interface.d.ts.map
@@ -1,5 +1,5 @@
1
- import type { CommitMessage } from "../../domain/entity/commit-message.entity.js";
2
- import type { ILlmPromptContext } from "./llm-service.interface.js";
1
+ import type { CommitMessage } from '../../domain/entity/commit-message.entity';
2
+ import type { ILlmPromptContext } from './llm-service.interface';
3
3
  /**
4
4
  * Validation result for a commit message
5
5
  */
@@ -27,4 +27,3 @@ export interface ICommitValidator {
27
27
  */
28
28
  validate(message: CommitMessage): Promise<ICommitValidationResult>;
29
29
  }
30
- //# sourceMappingURL=commit-validator.interface.d.ts.map
@@ -1,5 +1,5 @@
1
- import type { IConfig } from "./config.interface.js";
2
- import type { IFileSystemService } from "./file-system-service.interface.js";
1
+ import type { IConfig } from './config.interface';
2
+ import type { IFileSystemService } from './file-system-service.interface';
3
3
  /**
4
4
  * Interface for managing application configuration.
5
5
  * Defines contract for reading, writing, and manipulating configuration settings.
@@ -45,4 +45,3 @@ export interface IConfigService {
45
45
  */
46
46
  setProperty<K extends keyof IConfig>(property: K, value: IConfig[K]): Promise<void>;
47
47
  }
48
- //# sourceMappingURL=config-service.interface.d.ts.map
@@ -1,5 +1,5 @@
1
- import type { ECommitMode } from "../../domain/enum/commit-mode.enum.js";
2
- import type { ELLMProvider } from "../../domain/enum/llm-provider.enum.js";
1
+ import type { ECommitMode } from '../../domain/enum/commit-mode.enum';
2
+ import type { ELLMProvider } from '../../domain/enum/llm-provider.enum';
3
3
  /**
4
4
  * Main configuration interface
5
5
  */
@@ -25,4 +25,3 @@ export interface IConfig {
25
25
  */
26
26
  validationMaxRetries?: number;
27
27
  }
28
- //# sourceMappingURL=config.interface.d.ts.map
@@ -59,4 +59,3 @@ export interface IFileSystemService {
59
59
  */
60
60
  writeFile(path: string, content: string, encoding?: BufferEncoding): Promise<void>;
61
61
  }
62
- //# sourceMappingURL=file-system-service.interface.d.ts.map
@@ -1,10 +1,9 @@
1
- export type * from "./cli-interface-service-select-options.interface.js";
2
- export type * from "./cli-interface-service.interface.js";
3
- export type * from "./command-service.interface.js";
4
- export type * from "./commit-repository.interface.js";
5
- export type * from "./commit-validator.interface.js";
6
- export type * from "./config-service.interface.js";
7
- export type * from "./config.interface.js";
8
- export type * from "./file-system-service.interface.js";
9
- export type * from "./llm-service.interface.js";
10
- //# sourceMappingURL=index.d.ts.map
1
+ export type * from './cli-interface-service-select-options.interface';
2
+ export type * from './cli-interface-service.interface';
3
+ export type * from './command-service.interface';
4
+ export type * from './commit-repository.interface';
5
+ export type * from './commit-validator.interface';
6
+ export type * from './config-service.interface';
7
+ export type * from './config.interface';
8
+ export type * from './file-system-service.interface';
9
+ export type * from './llm-service.interface';
@@ -1,5 +1,5 @@
1
- import type { CommitMessage } from "../../domain/entity/commit-message.entity.js";
2
- import type { LLMConfiguration } from "../../domain/entity/llm-configuration.entity.js";
1
+ import type { CommitMessage } from '../../domain/entity/commit-message.entity';
2
+ import type { LLMConfiguration } from '../../domain/entity/llm-configuration.entity';
3
3
  /**
4
4
  * Context for generating commit messages
5
5
  */
@@ -41,4 +41,3 @@ export interface ILlmService {
41
41
  */
42
42
  supports(configuration: LLMConfiguration): boolean;
43
43
  }
44
- //# sourceMappingURL=llm-service.interface.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { ECommitMode } from "../../domain/enum/commit-mode.enum.js";
2
- import type { ICliInterfaceService } from "../interface/cli-interface-service.interface.js";
3
- import type { IConfigService } from "../interface/config-service.interface.js";
4
- import { LLMConfiguration } from "../../domain/entity/llm-configuration.entity.js";
1
+ import type { ICliInterfaceService } from '../interface/cli-interface-service.interface';
2
+ import type { IConfigService } from '../interface/config-service.interface';
3
+ import { LLMConfiguration } from '../../domain/entity/llm-configuration.entity';
4
+ import { ECommitMode } from '../../domain/enum/commit-mode.enum';
5
5
  /**
6
6
  * Use case for configuring LLM settings
7
7
  */
@@ -11,29 +11,29 @@ export declare class ConfigureLLMUseCase {
11
11
  constructor(configService: IConfigService, cliInterface: ICliInterfaceService);
12
12
  /**
13
13
  * Configure LLM settings interactively
14
- * @returns Promise resolving to the new configuration
14
+ * @returns {Promise<LLMConfiguration>} Promise resolving to the new configuration
15
15
  */
16
16
  configureInteractively(): Promise<LLMConfiguration>;
17
17
  /**
18
18
  * Get the current LLM configuration
19
- * @returns Promise resolving to the current configuration or null if not configured
19
+ * @returns {Promise<LLMConfiguration | null>} Promise resolving to the current configuration or null if not configured
20
20
  */
21
21
  getCurrentConfiguration(): Promise<LLMConfiguration | null>;
22
22
  /**
23
23
  * Check if the current configuration needs LLM details
24
- * @returns Promise resolving to true if LLM details are needed
24
+ * @returns {Promise<boolean>} Promise resolving to true if LLM details are needed
25
25
  */
26
26
  needsLLMDetails(): Promise<boolean>;
27
27
  /**
28
28
  * Save LLM configuration
29
- * @param configuration - The configuration to save
29
+ * @param {LLMConfiguration} configuration - The configuration to save
30
+ * @returns {Promise<void>} Promise that resolves when configuration is saved
30
31
  */
31
32
  saveConfiguration(configuration: LLMConfiguration): Promise<void>;
32
33
  /**
33
34
  * Update the commit mode
34
- * @param mode - The new commit mode
35
- * @returns Promise resolving to the updated configuration
35
+ * @param {ECommitMode} mode - The new commit mode
36
+ * @returns {Promise<LLMConfiguration | null>} Promise resolving to the updated configuration
36
37
  */
37
38
  updateMode(mode: ECommitMode): Promise<LLMConfiguration | null>;
38
39
  }
39
- //# sourceMappingURL=configure-llm.use-case.d.ts.map
@@ -5,6 +5,7 @@ var llmConfiguration_entity = require('../../domain/entity/llm-configuration.ent
5
5
  var anthropicModel_enum = require('../../domain/enum/anthropic-model.enum.js');
6
6
  var awsBedrockModel_enum = require('../../domain/enum/aws-bedrock-model.enum.js');
7
7
  var azureOpenaiModel_enum = require('../../domain/enum/azure-openai-model.enum.js');
8
+ var commitMode_enum = require('../../domain/enum/commit-mode.enum.js');
8
9
  var googleModel_enum = require('../../domain/enum/google-model.enum.js');
9
10
  var llmProvider_enum = require('../../domain/enum/llm-provider.enum.js');
10
11
  var ollamaModel_enum = require('../../domain/enum/ollama-model.enum.js');
@@ -23,16 +24,16 @@ class ConfigureLLMUseCase {
23
24
  }
24
25
  /**
25
26
  * Configure LLM settings interactively
26
- * @returns Promise resolving to the new configuration
27
+ * @returns {Promise<LLMConfiguration>} Promise resolving to the new configuration
27
28
  */
28
29
  async configureInteractively() {
29
30
  // First, select mode
30
31
  const mode = await this.CLI_INTERFACE.select("Select commit mode:", [
31
- { label: "Auto (AI-powered)", value: "auto" },
32
- { label: "Manual", value: "manual" },
33
- ], "auto");
32
+ { label: "Auto (AI-powered)", value: commitMode_enum.ECommitMode.AUTO },
33
+ { label: "Manual", value: commitMode_enum.ECommitMode.MANUAL },
34
+ ], commitMode_enum.ECommitMode.AUTO);
34
35
  // If manual mode, create a minimal configuration
35
- if (mode === "manual") {
36
+ if (mode === commitMode_enum.ECommitMode.MANUAL) {
36
37
  // Create configuration with dummy values for manual mode
37
38
  const configuration = new llmConfiguration_entity.LLMConfiguration("openai", // Default provider (won't be used)
38
39
  new apiKey_valueObject.ApiKey("manual-mode"), // Dummy API key
@@ -146,7 +147,7 @@ class ConfigureLLMUseCase {
146
147
  }
147
148
  }
148
149
  // Get API key
149
- let apiKeyValue;
150
+ let credentialValue;
150
151
  // Check environment variables first
151
152
  const environmentVariableNames = {
152
153
  anthropic: "ANTHROPIC_API_KEY",
@@ -156,11 +157,11 @@ class ConfigureLLMUseCase {
156
157
  ollama: "OLLAMA_API_KEY",
157
158
  openai: "OPENAI_API_KEY",
158
159
  };
159
- const environmentVariableName = environmentVariableNames[provider] || "";
160
+ const environmentVariableName = environmentVariableNames[provider] ?? "";
160
161
  const environmentApiKey = process.env[environmentVariableName];
161
162
  if (environmentApiKey && environmentApiKey.trim().length > 0) {
162
163
  this.CLI_INTERFACE.success(`Found API key in environment variable: ${environmentVariableName}`);
163
- apiKeyValue = environmentApiKey;
164
+ credentialValue = environmentApiKey;
164
165
  }
165
166
  else {
166
167
  // Inform user about environment variable and format requirements
@@ -201,7 +202,7 @@ class ConfigureLLMUseCase {
201
202
  }
202
203
  this.CLI_INTERFACE.info(`API key will be read from ${environmentVariableName} environment variable${keyFormatInfo} or prompted each time.`);
203
204
  // Use dummy value for configuration
204
- apiKeyValue = "will-prompt-on-use";
205
+ credentialValue = "will-prompt-on-use";
205
206
  }
206
207
  // Ask for retry configuration (advanced settings)
207
208
  const shouldConfigureAdvanced = await this.CLI_INTERFACE.confirm("Would you like to configure advanced settings (retry counts)?", false);
@@ -213,6 +214,8 @@ class ConfigureLLMUseCase {
213
214
  if (Number.isNaN(parsedNumber) || parsedNumber < numeric_constant.MIN_RETRY_COUNT || parsedNumber > numeric_constant.MAX_RETRY_COUNT) {
214
215
  return "Please enter a number between 1 and 10";
215
216
  }
217
+ // eslint-disable-next-line @elsikora/sonar/no-redundant-jump
218
+ return;
216
219
  });
217
220
  maxRetries = Number.parseInt(retriesString, 10);
218
221
  const validationRetriesString = await this.CLI_INTERFACE.text("Max retries for validation fixes (default: 3):", "3", "3", (value) => {
@@ -220,12 +223,14 @@ class ConfigureLLMUseCase {
220
223
  if (Number.isNaN(parsedNumber) || parsedNumber < numeric_constant.MIN_RETRY_COUNT || parsedNumber > numeric_constant.MAX_RETRY_COUNT) {
221
224
  return "Please enter a number between 1 and 10";
222
225
  }
226
+ // eslint-disable-next-line @elsikora/sonar/no-redundant-jump
227
+ return;
223
228
  });
224
229
  validationMaxRetries = Number.parseInt(validationRetriesString, 10);
225
230
  }
226
231
  // Create configuration
227
232
  // Create configuration - will save without API key
228
- const configuration = new llmConfiguration_entity.LLMConfiguration(provider, new apiKey_valueObject.ApiKey(apiKeyValue), mode, model, maxRetries, validationMaxRetries);
233
+ const configuration = new llmConfiguration_entity.LLMConfiguration(provider, new apiKey_valueObject.ApiKey(credentialValue), mode, model, maxRetries, validationMaxRetries);
229
234
  // Save configuration (without API key)
230
235
  await this.saveConfiguration(configuration);
231
236
  this.CLI_INTERFACE.success("Configuration saved successfully!");
@@ -235,7 +240,7 @@ class ConfigureLLMUseCase {
235
240
  }
236
241
  /**
237
242
  * Get the current LLM configuration
238
- * @returns Promise resolving to the current configuration or null if not configured
243
+ * @returns {Promise<LLMConfiguration | null>} Promise resolving to the current configuration or null if not configured
239
244
  */
240
245
  async getCurrentConfiguration() {
241
246
  const config = await this.CONFIG_SERVICE.get();
@@ -290,7 +295,7 @@ class ConfigureLLMUseCase {
290
295
  }
291
296
  }
292
297
  // For manual mode, return configuration with dummy API key
293
- if (config.mode === "manual") {
298
+ if (config.mode === commitMode_enum.ECommitMode.MANUAL) {
294
299
  return new llmConfiguration_entity.LLMConfiguration(config.provider, new apiKey_valueObject.ApiKey("manual-mode"), config.mode, migratedModel, config.maxRetries ?? numeric_constant.DEFAULT_MAX_RETRIES, config.validationMaxRetries ?? numeric_constant.DEFAULT_VALIDATION_MAX_RETRIES);
295
300
  }
296
301
  // For auto mode, check environment variables
@@ -302,7 +307,7 @@ class ConfigureLLMUseCase {
302
307
  ollama: "OLLAMA_API_KEY",
303
308
  openai: "OPENAI_API_KEY",
304
309
  };
305
- const environmentVariableName = environmentVariableNames[config.provider] || "";
310
+ const environmentVariableName = environmentVariableNames[config.provider] ?? "";
306
311
  const environmentApiKey = process.env[environmentVariableName];
307
312
  // If no API key in environment, return null (will prompt later)
308
313
  if (!environmentApiKey || environmentApiKey.trim().length === 0) {
@@ -312,11 +317,11 @@ class ConfigureLLMUseCase {
312
317
  }
313
318
  /**
314
319
  * Check if the current configuration needs LLM details
315
- * @returns Promise resolving to true if LLM details are needed
320
+ * @returns {Promise<boolean>} Promise resolving to true if LLM details are needed
316
321
  */
317
322
  async needsLLMDetails() {
318
323
  const config = await this.CONFIG_SERVICE.get();
319
- if (!config.mode || config.mode === "manual") {
324
+ if (!config.mode || config.mode === commitMode_enum.ECommitMode.MANUAL) {
320
325
  return false;
321
326
  }
322
327
  // For auto mode, check if API key is in environment
@@ -328,14 +333,15 @@ class ConfigureLLMUseCase {
328
333
  ollama: "OLLAMA_API_KEY",
329
334
  openai: "OPENAI_API_KEY",
330
335
  };
331
- const environmentVariableName = environmentVariableNames[config.provider] || "";
336
+ const environmentVariableName = environmentVariableNames[config.provider] ?? "";
332
337
  const environmentApiKey = process.env[environmentVariableName];
333
338
  // Need details if no API key in environment
334
339
  return !environmentApiKey || environmentApiKey.trim().length === 0;
335
340
  }
336
341
  /**
337
342
  * Save LLM configuration
338
- * @param configuration - The configuration to save
343
+ * @param {LLMConfiguration} configuration - The configuration to save
344
+ * @returns {Promise<void>} Promise that resolves when configuration is saved
339
345
  */
340
346
  async saveConfiguration(configuration) {
341
347
  const config = {
@@ -349,8 +355,8 @@ class ConfigureLLMUseCase {
349
355
  }
350
356
  /**
351
357
  * Update the commit mode
352
- * @param mode - The new commit mode
353
- * @returns Promise resolving to the updated configuration
358
+ * @param {ECommitMode} mode - The new commit mode
359
+ * @returns {Promise<LLMConfiguration | null>} Promise resolving to the updated configuration
354
360
  */
355
361
  async updateMode(mode) {
356
362
  const current = await this.getCurrentConfiguration();