@ksw8954/git-ai-commit 1.1.8 → 1.2.1

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 (53) hide show
  1. package/.github/workflows/publish.yml +31 -5
  2. package/CHANGELOG.md +16 -0
  3. package/README.md +25 -4
  4. package/dist/commands/ai.d.ts +7 -1
  5. package/dist/commands/ai.d.ts.map +1 -1
  6. package/dist/commands/ai.js +108 -11
  7. package/dist/commands/ai.js.map +1 -1
  8. package/dist/commands/commit.d.ts +1 -0
  9. package/dist/commands/commit.d.ts.map +1 -1
  10. package/dist/commands/commit.js +37 -34
  11. package/dist/commands/commit.js.map +1 -1
  12. package/dist/commands/completion.d.ts.map +1 -1
  13. package/dist/commands/completion.js +15 -5
  14. package/dist/commands/completion.js.map +1 -1
  15. package/dist/commands/config.d.ts +7 -2
  16. package/dist/commands/config.d.ts.map +1 -1
  17. package/dist/commands/config.js +37 -15
  18. package/dist/commands/config.js.map +1 -1
  19. package/dist/commands/configCommand.d.ts +5 -1
  20. package/dist/commands/configCommand.d.ts.map +1 -1
  21. package/dist/commands/configCommand.js +30 -3
  22. package/dist/commands/configCommand.js.map +1 -1
  23. package/dist/commands/git.js +3 -3
  24. package/dist/commands/hookCommand.d.ts +14 -0
  25. package/dist/commands/hookCommand.d.ts.map +1 -0
  26. package/dist/commands/hookCommand.js +180 -0
  27. package/dist/commands/hookCommand.js.map +1 -0
  28. package/dist/commands/prCommand.d.ts.map +1 -1
  29. package/dist/commands/prCommand.js +3 -1
  30. package/dist/commands/prCommand.js.map +1 -1
  31. package/dist/commands/tag.d.ts.map +1 -1
  32. package/dist/commands/tag.js +9 -3
  33. package/dist/commands/tag.js.map +1 -1
  34. package/dist/index.js +3 -0
  35. package/dist/index.js.map +1 -1
  36. package/package.json +2 -1
  37. package/src/__tests__/ai.test.ts +486 -7
  38. package/src/__tests__/commitCommand.test.ts +111 -0
  39. package/src/__tests__/config.test.ts +24 -6
  40. package/src/__tests__/git.test.ts +421 -98
  41. package/src/__tests__/preCommit.test.ts +19 -0
  42. package/src/__tests__/tagCommand.test.ts +510 -17
  43. package/src/commands/ai.ts +128 -13
  44. package/src/commands/commit.ts +40 -34
  45. package/src/commands/completion.ts +15 -5
  46. package/src/commands/config.ts +46 -23
  47. package/src/commands/configCommand.ts +41 -8
  48. package/src/commands/git.ts +3 -3
  49. package/src/commands/hookCommand.ts +193 -0
  50. package/src/commands/prCommand.ts +3 -1
  51. package/src/commands/tag.ts +10 -4
  52. package/src/index.ts +3 -0
  53. package/src/schema/config.schema.json +72 -0
@@ -43,9 +43,12 @@ describe('ConfigService', () => {
43
43
  apiKey: 'test-api-key',
44
44
  baseURL: 'https://api.test.com',
45
45
  model: 'gpt-4',
46
+ fallbackModel: undefined,
47
+ reasoningEffort: undefined,
46
48
  mode: 'custom',
47
49
  language: 'ko',
48
- autoPush: false
50
+ autoPush: false,
51
+ coAuthor: 'git-ai-commit <git-ai-commit@users.noreply.github.com>',
49
52
  });
50
53
  });
51
54
 
@@ -60,9 +63,12 @@ describe('ConfigService', () => {
60
63
  apiKey: 'fallback-api-key',
61
64
  baseURL: 'https://fallback.test.com',
62
65
  model: 'claude-3',
66
+ fallbackModel: undefined,
67
+ reasoningEffort: undefined,
63
68
  mode: 'custom',
64
69
  language: 'ko',
65
- autoPush: false
70
+ autoPush: false,
71
+ coAuthor: 'git-ai-commit <git-ai-commit@users.noreply.github.com>',
66
72
  });
67
73
  });
68
74
 
@@ -78,9 +84,12 @@ describe('ConfigService', () => {
78
84
  apiKey: 'ai-key',
79
85
  baseURL: 'ai-url',
80
86
  model: 'zai-org/GLM-4.5-FP8',
87
+ fallbackModel: undefined,
88
+ reasoningEffort: undefined,
81
89
  mode: 'custom',
82
90
  language: 'ko',
83
- autoPush: false
91
+ autoPush: false,
92
+ coAuthor: 'git-ai-commit <git-ai-commit@users.noreply.github.com>',
84
93
  });
85
94
  });
86
95
 
@@ -99,9 +108,12 @@ describe('ConfigService', () => {
99
108
  apiKey: 'openai-key',
100
109
  baseURL: 'openai-url',
101
110
  model: 'gpt-4',
111
+ fallbackModel: undefined,
112
+ reasoningEffort: undefined,
102
113
  mode: 'openai',
103
114
  language: 'ko',
104
- autoPush: false
115
+ autoPush: false,
116
+ coAuthor: 'git-ai-commit <git-ai-commit@users.noreply.github.com>',
105
117
  });
106
118
  });
107
119
 
@@ -117,9 +129,12 @@ describe('ConfigService', () => {
117
129
  apiKey: 'ai-key',
118
130
  baseURL: 'ai-url',
119
131
  model: 'claude-3',
132
+ fallbackModel: undefined,
133
+ reasoningEffort: undefined,
120
134
  mode: 'openai',
121
135
  language: 'ko',
122
- autoPush: false
136
+ autoPush: false,
137
+ coAuthor: 'git-ai-commit <git-ai-commit@users.noreply.github.com>',
123
138
  });
124
139
  });
125
140
 
@@ -154,9 +169,12 @@ describe('ConfigService', () => {
154
169
  apiKey: 'file-key',
155
170
  baseURL: 'https://file.example',
156
171
  model: 'file-model',
172
+ fallbackModel: undefined,
173
+ reasoningEffort: undefined,
157
174
  mode: 'openai',
158
175
  language: 'en',
159
- autoPush: true
176
+ autoPush: true,
177
+ coAuthor: 'git-ai-commit <git-ai-commit@users.noreply.github.com>',
160
178
  });
161
179
  });
162
180