gitcoach-cli 1.0.12 → 1.0.13

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 (86) hide show
  1. package/dist/commands/index.d.ts.map +1 -1
  2. package/dist/commands/index.js +3 -6
  3. package/dist/commands/index.js.map +1 -1
  4. package/dist/commands/init.js +4 -4
  5. package/dist/commands/init.js.map +1 -1
  6. package/dist/commands/quick.d.ts.map +1 -1
  7. package/dist/commands/quick.js +2 -1
  8. package/dist/commands/quick.js.map +1 -1
  9. package/dist/i18n/locales/en.json +48 -3
  10. package/dist/i18n/locales/es.json +48 -3
  11. package/dist/i18n/locales/fr.json +48 -3
  12. package/dist/services/copilot-service.d.ts +1 -0
  13. package/dist/services/copilot-service.d.ts.map +1 -1
  14. package/dist/services/copilot-service.js +53 -24
  15. package/dist/services/copilot-service.js.map +1 -1
  16. package/dist/services/git-service.d.ts +10 -1
  17. package/dist/services/git-service.d.ts.map +1 -1
  18. package/dist/services/git-service.js +93 -2
  19. package/dist/services/git-service.js.map +1 -1
  20. package/dist/services/prevention-service.d.ts +5 -0
  21. package/dist/services/prevention-service.d.ts.map +1 -1
  22. package/dist/services/prevention-service.js +103 -5
  23. package/dist/services/prevention-service.js.map +1 -1
  24. package/dist/ui/components/prompt.d.ts +0 -1
  25. package/dist/ui/components/prompt.d.ts.map +1 -1
  26. package/dist/ui/components/prompt.js +0 -8
  27. package/dist/ui/components/prompt.js.map +1 -1
  28. package/dist/ui/menus/add-menu.d.ts.map +1 -1
  29. package/dist/ui/menus/add-menu.js +3 -1
  30. package/dist/ui/menus/add-menu.js.map +1 -1
  31. package/dist/ui/menus/branch-menu.d.ts.map +1 -1
  32. package/dist/ui/menus/branch-menu.js +2 -1
  33. package/dist/ui/menus/branch-menu.js.map +1 -1
  34. package/dist/ui/menus/commit-menu.d.ts.map +1 -1
  35. package/dist/ui/menus/commit-menu.js +3 -1
  36. package/dist/ui/menus/commit-menu.js.map +1 -1
  37. package/dist/ui/menus/config-menu.d.ts +1 -1
  38. package/dist/ui/menus/config-menu.d.ts.map +1 -1
  39. package/dist/ui/menus/config-menu.js +18 -2
  40. package/dist/ui/menus/config-menu.js.map +1 -1
  41. package/dist/ui/menus/detached-head-menu.d.ts.map +1 -1
  42. package/dist/ui/menus/detached-head-menu.js +2 -1
  43. package/dist/ui/menus/detached-head-menu.js.map +1 -1
  44. package/dist/ui/menus/help-menu.js +1 -0
  45. package/dist/ui/menus/help-menu.js.map +1 -1
  46. package/dist/ui/menus/history-menu.d.ts.map +1 -1
  47. package/dist/ui/menus/history-menu.js +23 -18
  48. package/dist/ui/menus/history-menu.js.map +1 -1
  49. package/dist/ui/menus/main-menu.d.ts.map +1 -1
  50. package/dist/ui/menus/main-menu.js +4 -3
  51. package/dist/ui/menus/main-menu.js.map +1 -1
  52. package/dist/ui/menus/pull-menu.d.ts.map +1 -1
  53. package/dist/ui/menus/pull-menu.js +163 -50
  54. package/dist/ui/menus/pull-menu.js.map +1 -1
  55. package/dist/ui/menus/push-menu.d.ts.map +1 -1
  56. package/dist/ui/menus/push-menu.js +3 -4
  57. package/dist/ui/menus/push-menu.js.map +1 -1
  58. package/dist/ui/menus/remote-menu.d.ts.map +1 -1
  59. package/dist/ui/menus/remote-menu.js +6 -4
  60. package/dist/ui/menus/remote-menu.js.map +1 -1
  61. package/dist/ui/menus/setup-menu.d.ts.map +1 -1
  62. package/dist/ui/menus/setup-menu.js +3 -6
  63. package/dist/ui/menus/setup-menu.js.map +1 -1
  64. package/dist/ui/menus/stash-menu.d.ts.map +1 -1
  65. package/dist/ui/menus/stash-menu.js +6 -15
  66. package/dist/ui/menus/stash-menu.js.map +1 -1
  67. package/dist/ui/menus/undo-menu.d.ts.map +1 -1
  68. package/dist/ui/menus/undo-menu.js +5 -12
  69. package/dist/ui/menus/undo-menu.js.map +1 -1
  70. package/dist/utils/error-mapper.d.ts +7 -0
  71. package/dist/utils/error-mapper.d.ts.map +1 -0
  72. package/dist/utils/error-mapper.js +96 -0
  73. package/dist/utils/error-mapper.js.map +1 -0
  74. package/dist/utils/helpers.d.ts.map +1 -1
  75. package/dist/utils/helpers.js +5 -3
  76. package/dist/utils/helpers.js.map +1 -1
  77. package/dist/utils/logger.d.ts +3 -0
  78. package/dist/utils/logger.d.ts.map +1 -1
  79. package/dist/utils/logger.js +26 -14
  80. package/dist/utils/logger.js.map +1 -1
  81. package/dist/utils/validators.d.ts.map +1 -1
  82. package/dist/utils/validators.js +4 -2
  83. package/dist/utils/validators.js.map +1 -1
  84. package/dist/utils/version.d.ts +1 -1
  85. package/dist/utils/version.js +1 -1
  86. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AA6BtC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IACxC,OAAgB,WAAW,SAA+C;IAE1E,OAAgB,QAAQ,WAKtB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;YAkDZ,eAAe;YA0Cf,YAAY;CA8D3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AA8BtC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IACxC,OAAgB,WAAW,SAA+C;IAE1E,OAAgB,QAAQ,WAKtB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;YAgDZ,eAAe;YAwCf,YAAY;CA8D3B"}
@@ -3,6 +3,7 @@ import { initI18n, t } from '../i18n/index.js';
3
3
  import { userConfig } from '../config/user-config.js';
4
4
  import { gitService } from '../services/git-service.js';
5
5
  import { logger } from '../utils/logger.js';
6
+ import { mapGitError } from '../utils/error-mapper.js';
6
7
  import { getTheme } from '../ui/themes/index.js';
7
8
  import { showMainMenu, showStatusScreen } from '../ui/menus/main-menu.js';
8
9
  import { showAddMenu } from '../ui/menus/add-menu.js';
@@ -59,9 +60,7 @@ export default class Index extends Command {
59
60
  running = false;
60
61
  }
61
62
  else {
62
- logger.error(t('errors.generic', {
63
- message: error instanceof Error ? error.message : 'Unknown error'
64
- }));
63
+ logger.error(mapGitError(error));
65
64
  }
66
65
  }
67
66
  }
@@ -99,9 +98,7 @@ export default class Index extends Command {
99
98
  running = false;
100
99
  }
101
100
  else {
102
- logger.error(t('errors.generic', {
103
- message: error instanceof Error ? error.message : 'Unknown error'
104
- }));
101
+ logger.error(mapGitError(error));
105
102
  }
106
103
  }
107
104
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAEjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD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AAO;gBACV,MAAM,aAAa,EAAE,CAAC;gBACtB,OAAO,IAAI,CAAC;YAEd,KAAK,QAAQ;gBACX,MAAM,cAAc,EAAE,CAAC;gBACvB,OAAO,IAAI,CAAC;YAEd,KAAK,OAAO;gBACV,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACtC,OAAO,IAAI,CAAC;YAEd,KAAK,MAAM;gBACT,MAAM,YAAY,EAAE,CAAC;gBACrB,OAAO,IAAI,CAAC;YAEd,KAAK,MAAM;gBACT,OAAO,KAAK,CAAC;YAEf;gBACE,OAAO,IAAI,CAAC;QAChB,CAAC;IACH,CAAC"}
@@ -26,16 +26,16 @@ export default class Init extends Command {
26
26
  await initI18n();
27
27
  // Select theme
28
28
  const selectedTheme = await promptSelect(t('setup.selectTheme'), THEMES.map(th => ({
29
- name: th.theme === 'colored' ? 'Colored (with syntax highlighting)' : 'Monochrome (plain text)',
29
+ name: t(`themes.${th.theme}`),
30
30
  value: th.theme,
31
- description: th.description
31
+ description: t(`themes.${th.theme}Desc`)
32
32
  })));
33
33
  userConfig.setTheme(selectedTheme);
34
34
  // Select experience level
35
35
  const level = await promptSelect(t('setup.selectLevel'), EXPERIENCE_LEVELS.map(l => ({
36
- name: l.level.charAt(0).toUpperCase() + l.level.slice(1),
36
+ name: t(`levels.${l.level}`),
37
37
  value: l.level,
38
- description: l.description
38
+ description: t(`levels.${l.level}Desc`)
39
39
  })));
40
40
  userConfig.setExperienceLevel(level);
41
41
  // Check for Copilot CLI availability
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACL,mBAAmB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AC,yBAAyB,CAAC,EAAE,CAAC,CAAC;QACtE,OAAO,CAAC,KAAK,EAAE,CAAC;QAEhB,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,iBAAiB,EAAE,CAAC;QAExD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC;YAClD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;QAC7D,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC;YAC9C,MAAM,CAAC,GAAG,CAAC,UAAU,CACnB,CAAC,CAAC,kCAAkC,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,4BAA4B,CAAC,EAChF,CAAC,CAAC,gBAAgB,CAAC,CACpB,CAAC,CAAC;QACL,CAAC;IACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"quick.d.ts","sourceRoot":"","sources":["../../src/commands/quick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAY7C,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IACxC,OAAgB,WAAW,SAAyC;IAEpE,OAAgB,QAAQ,WAItB;IAEF,OAAgB,KAAK;;;;MAenB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2G3B"}
1
+ {"version":3,"file":"quick.d.ts","sourceRoot":"","sources":["../../src/commands/quick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAa7C,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IACxC,OAAgB,WAAW,SAAyC;IAEpE,OAAgB,QAAQ,WAItB;IAEF,OAAgB,KAAK;;;;MAenB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyG3B"}
@@ -9,6 +9,7 @@ import { getTheme } from '../ui/themes/index.js';
9
9
  import { successBox, errorBox, warningBox } from '../ui/components/box.js';
10
10
  import { withSpinner } from '../ui/components/spinner.js';
11
11
  import { promptConfirm, promptInput } from '../ui/components/prompt.js';
12
+ import { mapGitError } from '../utils/error-mapper.js';
12
13
  export default class Quick extends Command {
13
14
  static description = 'Quick commit and push (expert mode)';
14
15
  static examples = [
@@ -105,7 +106,7 @@ export default class Quick extends Command {
105
106
  logger.raw('\n' + successBox('Quick commit complete!'));
106
107
  }
107
108
  catch (error) {
108
- logger.raw(errorBox(t('errors.generic', { message: error instanceof Error ? error.message : 'Unknown error' })));
109
+ logger.raw(errorBox(mapGitError(error)));
109
110
  }
110
111
  }
111
112
  }
@@ -1 +1 @@
1
- {"version":3,"file":"quick.js","sourceRoot":"","sources":["../../src/commands/quick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAExE,MAAM,CAAC,OAAO,OAAO,KAAM,SAA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WAAW,CAC5B,eAAe,EACf,KAAK,IAAI,EAAE;gBACT,OAAO,UAAU,CAAC,MAAM,CAAC,aAAuB,CAAC,CAAC;YACpD,CAAC,EACD,wBAAwB,CACzB,CAAC;YAEF,UAAU,CAAC,qBAAqB,EAAE,CAAC;YACnC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YAE/D,oBAAoB;YACpB,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;gBACf,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;gBAE/D,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACnC,KAAK,MAAM,OAAO,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;wBAC1C,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;oBAC1C,CAAC;gBACH,CAAC;gBAED,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;oBAC1B,MAAM,WAAW,CACf,sBAAsB,EACtB,KAAK,IAAI,EAAE;wBACT,MAAM,UAAU,CAAC,IAAI,EAAE,CAAC;oBAC1B,CAAC,EACD,qBAAqB,CACtB,CAAC;gBACJ,CAAC;YACH,CAAC;YAED,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC,CAAC;QAC1D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC"}
@@ -189,7 +189,30 @@
189
189
  "success": "Successfully pulled {{count}} commit(s).",
190
190
  "upToDate": "Already up to date.",
191
191
  "conflicts": "Merge conflicts detected. Please resolve them manually.",
192
- "failed": "Pull failed: {{error}}"
192
+ "failed": "Pull failed: {{error}}",
193
+ "noRemoteConfigured": "No remote repository configured. You need to add a remote to pull from.",
194
+ "selectRemote": "Select the remote to pull from:",
195
+ "noUpstream": "Branch '{{branch}}' has no upstream tracking branch configured.",
196
+ "setUpstreamQuestion": "Set upstream to {{remote}}/{{branch}}?",
197
+ "diverged": "Your branch and the remote have diverged.",
198
+ "divergedExplain": "You have {{ahead}} local commit(s) and {{behind}} remote commit(s) to integrate.",
199
+ "mergeOrRebase": "How would you like to integrate the remote changes?",
200
+ "optionMerge": "Merge (creates a merge commit)",
201
+ "optionRebase": "Rebase (replay your commits on top)",
202
+ "conflictsDetected": "{{count}} file(s) have merge conflicts that need to be resolved.",
203
+ "conflictedFiles": "Files with conflicts:",
204
+ "resolveInstructions": "To resolve: edit the conflicted files, then run 'git add' and 'git commit'.",
205
+ "resolveOptions": "What would you like to do?",
206
+ "abortMerge": "Abort merge and restore previous state",
207
+ "abortSuccess": "Merge aborted successfully. Your branch is back to its previous state.",
208
+ "continueMerge": "I'll resolve the conflicts manually",
209
+ "mergeInProgress": "A merge is currently in progress.",
210
+ "rebaseInProgress": "A rebase is currently in progress.",
211
+ "uncommittedWarning": "You have uncommitted changes. They may be lost during pull.",
212
+ "uncommittedOptions": "What would you like to do with your uncommitted changes?",
213
+ "optionCommit": "Commit changes first",
214
+ "optionStash": "Stash changes temporarily",
215
+ "optionContinue": "Continue anyway (risky)"
193
216
  },
194
217
  "branch": {
195
218
  "title": "Branch Management",
@@ -337,7 +360,15 @@
337
360
  "detachedHeadAction": "Create a branch to save your work.",
338
361
  "noRemote": "No remote repository configured.",
339
362
  "notGitRepo": "This directory is not a Git repository.",
340
- "copilotUnavailable": "GitHub Copilot CLI is not available. Some features may be limited."
363
+ "copilotUnavailable": "GitHub Copilot CLI is not available. Some features may be limited.",
364
+ "mergeInProgress": "A merge is currently in progress.",
365
+ "mergeInProgressAction": "Complete the merge with 'git commit' or abort with 'git merge --abort'.",
366
+ "rebaseInProgress": "A rebase is currently in progress.",
367
+ "rebaseInProgressAction": "Continue with 'git rebase --continue' or abort with 'git rebase --abort'.",
368
+ "cherryPickInProgress": "A cherry-pick is currently in progress.",
369
+ "cherryPickInProgressAction": "Continue with 'git cherry-pick --continue' or abort with 'git cherry-pick --abort'.",
370
+ "bisectInProgress": "A bisect session is currently in progress.",
371
+ "bisectInProgressAction": "Continue bisecting or end with 'git bisect reset'."
341
372
  },
342
373
  "errors": {
343
374
  "title": "Error",
@@ -349,6 +380,16 @@
349
380
  "branchExists": "Branch '{{branch}}' already exists.",
350
381
  "branchNotFound": "Branch '{{branch}}' not found.",
351
382
  "mergeConflict": "Merge conflict in {{file}}.",
383
+ "unknownError": "An unknown error occurred.",
384
+ "authenticationFailed": "Authentication failed. Check your credentials or SSH key. Run 'git config --list' to verify your remote URL.",
385
+ "pushRejected": "Push was rejected. The remote contains commits you don't have locally. Pull first, then push again.",
386
+ "alreadyExists": "The resource already exists. Choose a different name or delete the existing one first.",
387
+ "fileNotFound": "File or path not found. Check the file name and make sure it exists in the repository.",
388
+ "diskFull": "No disk space left. Free up some space and try again.",
389
+ "lockFileExists": "A Git lock file exists (.git/index.lock). Another Git process may be running. If not, delete the lock file manually.",
390
+ "timeout": "The operation timed out. Check your network connection and try again.",
391
+ "rateLimited": "Rate limit reached. Wait a moment and try again.",
392
+ "detachedHead": "You are in a detached HEAD state. Create a branch to save your work before continuing.",
352
393
  "explainWithAI": "Would you like an AI explanation of this error?",
353
394
  "analyzing": "Analyzing error...",
354
395
  "explanation": "Explanation",
@@ -420,7 +461,11 @@
420
461
  "autoCommitMsg": "Auto-generate Commit Messages",
421
462
  "defaultBranch": "Default Branch",
422
463
  "reset": "Reset to Defaults",
423
- "resetConfirm": "Reset all settings to defaults?"
464
+ "resetConfirm": "Reset all settings to defaults?",
465
+ "copilotRefresh": "Re-check Copilot CLI",
466
+ "copilotAvailable": "GitHub Copilot CLI is available and ready!",
467
+ "copilotNotAvailable": "GitHub Copilot CLI is not available.",
468
+ "copilotChecking": "Checking Copilot CLI availability..."
424
469
  },
425
470
  "stats": {
426
471
  "title": "Your Statistics",
@@ -189,7 +189,30 @@
189
189
  "success": "{{count}} commit(s) descargado(s) exitosamente.",
190
190
  "upToDate": "Ya esta actualizado.",
191
191
  "conflicts": "Conflictos de fusion detectados. Por favor, resuelvalos manualmente.",
192
- "failed": "Fallo al descargar: {{error}}"
192
+ "failed": "Fallo al descargar: {{error}}",
193
+ "noRemoteConfigured": "No hay repositorio remoto configurado. Necesitas agregar un remote para hacer pull.",
194
+ "selectRemote": "Selecciona el remote del cual descargar:",
195
+ "noUpstream": "La rama '{{branch}}' no tiene una rama de seguimiento configurada.",
196
+ "setUpstreamQuestion": "Configurar seguimiento hacia {{remote}}/{{branch}}?",
197
+ "diverged": "Tu rama y el remoto han divergido.",
198
+ "divergedExplain": "Tienes {{ahead}} commit(s) local(es) y {{behind}} commit(s) remoto(s) por integrar.",
199
+ "mergeOrRebase": "Como quieres integrar los cambios remotos?",
200
+ "optionMerge": "Merge (crea un commit de fusion)",
201
+ "optionRebase": "Rebase (reaplica tus commits encima)",
202
+ "conflictsDetected": "{{count}} archivo(s) tienen conflictos de fusion que necesitan ser resueltos.",
203
+ "conflictedFiles": "Archivos con conflictos:",
204
+ "resolveInstructions": "Para resolver: edita los archivos en conflicto, luego ejecuta 'git add' y 'git commit'.",
205
+ "resolveOptions": "Que te gustaria hacer?",
206
+ "abortMerge": "Abortar merge y restaurar el estado anterior",
207
+ "abortSuccess": "Merge abortado exitosamente. Tu rama volvio a su estado anterior.",
208
+ "continueMerge": "Resolvere los conflictos manualmente",
209
+ "mergeInProgress": "Un merge esta actualmente en progreso.",
210
+ "rebaseInProgress": "Un rebase esta actualmente en progreso.",
211
+ "uncommittedWarning": "Tienes cambios sin commitear. Podrian perderse durante el pull.",
212
+ "uncommittedOptions": "Que quieres hacer con tus cambios sin commitear?",
213
+ "optionCommit": "Commitear primero",
214
+ "optionStash": "Guardar temporalmente (stash)",
215
+ "optionContinue": "Continuar de todos modos (riesgoso)"
193
216
  },
194
217
  "branch": {
195
218
  "title": "Gestion de Ramas",
@@ -337,7 +360,15 @@
337
360
  "detachedHeadAction": "Crea una rama para guardar tu trabajo.",
338
361
  "noRemote": "No hay repositorio remoto configurado.",
339
362
  "notGitRepo": "Este directorio no es un repositorio Git.",
340
- "copilotUnavailable": "GitHub Copilot CLI no esta disponible. Algunas funciones pueden estar limitadas."
363
+ "copilotUnavailable": "GitHub Copilot CLI no esta disponible. Algunas funciones pueden estar limitadas.",
364
+ "mergeInProgress": "Un merge esta actualmente en progreso.",
365
+ "mergeInProgressAction": "Completa el merge con 'git commit' o aborta con 'git merge --abort'.",
366
+ "rebaseInProgress": "Un rebase esta actualmente en progreso.",
367
+ "rebaseInProgressAction": "Continua con 'git rebase --continue' o aborta con 'git rebase --abort'.",
368
+ "cherryPickInProgress": "Un cherry-pick esta actualmente en progreso.",
369
+ "cherryPickInProgressAction": "Continua con 'git cherry-pick --continue' o aborta con 'git cherry-pick --abort'.",
370
+ "bisectInProgress": "Una sesion de bisect esta en progreso.",
371
+ "bisectInProgressAction": "Continua el bisect o termina con 'git bisect reset'."
341
372
  },
342
373
  "errors": {
343
374
  "title": "Error",
@@ -349,6 +380,16 @@
349
380
  "branchExists": "La rama '{{branch}}' ya existe.",
350
381
  "branchNotFound": "Rama '{{branch}}' no encontrada.",
351
382
  "mergeConflict": "Conflicto de fusion en {{file}}.",
383
+ "unknownError": "Ocurrio un error desconocido.",
384
+ "authenticationFailed": "Error de autenticacion. Verifica tus credenciales o tu clave SSH. Ejecuta 'git config --list' para verificar la URL del remote.",
385
+ "pushRejected": "El push fue rechazado. El remoto contiene commits que no tienes. Haz pull primero y luego intenta el push de nuevo.",
386
+ "alreadyExists": "El recurso ya existe. Elige otro nombre o elimina el existente primero.",
387
+ "fileNotFound": "Archivo o ruta no encontrado. Verifica el nombre del archivo y asegurate de que existe en el repositorio.",
388
+ "diskFull": "No queda espacio en disco. Libera espacio e intentalo de nuevo.",
389
+ "lockFileExists": "Existe un archivo de bloqueo Git (.git/index.lock). Otro proceso Git puede estar ejecutandose. Si no, elimina el archivo manualmente.",
390
+ "timeout": "La operacion expiro. Verifica tu conexion de red e intentalo de nuevo.",
391
+ "rateLimited": "Limite de solicitudes alcanzado. Espera un momento e intentalo de nuevo.",
392
+ "detachedHead": "Estas en un estado HEAD separado. Crea una rama para guardar tu trabajo antes de continuar.",
352
393
  "explainWithAI": "Te gustaria una explicacion IA de este error?",
353
394
  "analyzing": "Analizando error...",
354
395
  "explanation": "Explicacion",
@@ -420,7 +461,11 @@
420
461
  "autoCommitMsg": "Auto-generar Mensajes de Commit",
421
462
  "defaultBranch": "Rama por Defecto",
422
463
  "reset": "Restablecer Valores Predeterminados",
423
- "resetConfirm": "Restablecer todas las configuraciones?"
464
+ "resetConfirm": "Restablecer todas las configuraciones?",
465
+ "copilotRefresh": "Re-verificar Copilot CLI",
466
+ "copilotAvailable": "GitHub Copilot CLI esta disponible y listo!",
467
+ "copilotNotAvailable": "GitHub Copilot CLI no esta disponible.",
468
+ "copilotChecking": "Verificando Copilot CLI..."
424
469
  },
425
470
  "stats": {
426
471
  "title": "Tus Estadisticas",
@@ -189,7 +189,30 @@
189
189
  "success": "{{count}} commit(s) recupere(s) avec succes.",
190
190
  "upToDate": "Deja a jour.",
191
191
  "conflicts": "Conflits de fusion detectes. Veuillez les resoudre manuellement.",
192
- "failed": "Echec de la recuperation : {{error}}"
192
+ "failed": "Echec de la recuperation : {{error}}",
193
+ "noRemoteConfigured": "Aucun depot distant configure. Ajoutez un remote pour pouvoir pull.",
194
+ "selectRemote": "Selectionnez le remote depuis lequel recuperer :",
195
+ "noUpstream": "La branche '{{branch}}' n'a pas de branche de suivi configuree.",
196
+ "setUpstreamQuestion": "Configurer le suivi vers {{remote}}/{{branch}} ?",
197
+ "diverged": "Votre branche et le remote ont diverge.",
198
+ "divergedExplain": "Vous avez {{ahead}} commit(s) local(aux) et {{behind}} commit(s) distant(s) a integrer.",
199
+ "mergeOrRebase": "Comment souhaitez-vous integrer les modifications distantes ?",
200
+ "optionMerge": "Merge (cree un commit de fusion)",
201
+ "optionRebase": "Rebase (rejoue vos commits par-dessus)",
202
+ "conflictsDetected": "{{count}} fichier(s) ont des conflits de fusion a resoudre.",
203
+ "conflictedFiles": "Fichiers en conflit :",
204
+ "resolveInstructions": "Pour resoudre : editez les fichiers en conflit, puis lancez 'git add' et 'git commit'.",
205
+ "resolveOptions": "Que souhaitez-vous faire ?",
206
+ "abortMerge": "Annuler le merge et restaurer l'etat precedent",
207
+ "abortSuccess": "Merge annule avec succes. Votre branche est revenue a son etat precedent.",
208
+ "continueMerge": "Je vais resoudre les conflits manuellement",
209
+ "mergeInProgress": "Un merge est actuellement en cours.",
210
+ "rebaseInProgress": "Un rebase est actuellement en cours.",
211
+ "uncommittedWarning": "Vous avez des modifications non commitees. Elles pourraient etre perdues pendant le pull.",
212
+ "uncommittedOptions": "Que faire de vos modifications non commitees ?",
213
+ "optionCommit": "Commiter d'abord",
214
+ "optionStash": "Mettre de cote temporairement (stash)",
215
+ "optionContinue": "Continuer quand meme (risque)"
193
216
  },
194
217
  "branch": {
195
218
  "title": "Gestion des Branches",
@@ -337,7 +360,15 @@
337
360
  "detachedHeadAction": "Creez une branche pour sauvegarder votre travail.",
338
361
  "noRemote": "Aucun depot distant configure.",
339
362
  "notGitRepo": "Ce repertoire n'est pas un depot Git.",
340
- "copilotUnavailable": "GitHub Copilot CLI n'est pas disponible. Certaines fonctionnalites peuvent etre limitees."
363
+ "copilotUnavailable": "GitHub Copilot CLI n'est pas disponible. Certaines fonctionnalites peuvent etre limitees.",
364
+ "mergeInProgress": "Un merge est actuellement en cours.",
365
+ "mergeInProgressAction": "Terminez le merge avec 'git commit' ou annulez avec 'git merge --abort'.",
366
+ "rebaseInProgress": "Un rebase est actuellement en cours.",
367
+ "rebaseInProgressAction": "Continuez avec 'git rebase --continue' ou annulez avec 'git rebase --abort'.",
368
+ "cherryPickInProgress": "Un cherry-pick est actuellement en cours.",
369
+ "cherryPickInProgressAction": "Continuez avec 'git cherry-pick --continue' ou annulez avec 'git cherry-pick --abort'.",
370
+ "bisectInProgress": "Une session de bisect est en cours.",
371
+ "bisectInProgressAction": "Continuez le bisect ou terminez avec 'git bisect reset'."
341
372
  },
342
373
  "errors": {
343
374
  "title": "Erreur",
@@ -349,6 +380,16 @@
349
380
  "branchExists": "La branche '{{branch}}' existe deja.",
350
381
  "branchNotFound": "Branche '{{branch}}' introuvable.",
351
382
  "mergeConflict": "Conflit de fusion dans {{file}}.",
383
+ "unknownError": "Une erreur inconnue s'est produite.",
384
+ "authenticationFailed": "Echec d'authentification. Verifiez vos identifiants ou votre cle SSH. Lancez 'git config --list' pour verifier l'URL du remote.",
385
+ "pushRejected": "Le push a ete rejete. Le remote contient des commits que vous n'avez pas. Faites un pull d'abord, puis reessayez le push.",
386
+ "alreadyExists": "La ressource existe deja. Choisissez un autre nom ou supprimez celle existante.",
387
+ "fileNotFound": "Fichier ou chemin introuvable. Verifiez le nom du fichier et assurez-vous qu'il existe dans le depot.",
388
+ "diskFull": "Plus d'espace disque disponible. Liberez de l'espace et reessayez.",
389
+ "lockFileExists": "Un fichier de verrouillage Git existe (.git/index.lock). Un autre processus Git est peut-etre en cours. Sinon, supprimez le fichier manuellement.",
390
+ "timeout": "L'operation a expire. Verifiez votre connexion reseau et reessayez.",
391
+ "rateLimited": "Limite de requetes atteinte. Attendez un moment et reessayez.",
392
+ "detachedHead": "Vous etes en etat HEAD detache. Creez une branche pour sauvegarder votre travail avant de continuer.",
352
393
  "explainWithAI": "Voulez-vous une explication IA de cette erreur ?",
353
394
  "analyzing": "Analyse de l'erreur...",
354
395
  "explanation": "Explication",
@@ -420,7 +461,11 @@
420
461
  "autoCommitMsg": "Generer les Messages Automatiquement",
421
462
  "defaultBranch": "Branche par Defaut",
422
463
  "reset": "Reinitialiser par Defaut",
423
- "resetConfirm": "Reinitialiser tous les parametres ?"
464
+ "resetConfirm": "Reinitialiser tous les parametres ?",
465
+ "copilotRefresh": "Re-verifier Copilot CLI",
466
+ "copilotAvailable": "GitHub Copilot CLI est disponible et pret !",
467
+ "copilotNotAvailable": "GitHub Copilot CLI n'est pas disponible.",
468
+ "copilotChecking": "Verification de Copilot CLI..."
424
469
  },
425
470
  "stats": {
426
471
  "title": "Vos Statistiques",
@@ -29,6 +29,7 @@ declare class CopilotService {
29
29
  * Explain a Git error and suggest solutions
30
30
  */
31
31
  explainGitError(errorMessage: string, command?: string): Promise<CopilotSuggestion>;
32
+ private executeWithRetry;
32
33
  private parseAnswer;
33
34
  private parseCommitMessage;
34
35
  private parseSuggestion;
@@ -1 +1 @@
1
- {"version":3,"file":"copilot-service.d.ts","sourceRoot":"","sources":["../../src/services/copilot-service.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,cAAM,cAAc;IAClB,OAAO,CAAC,SAAS,CAAwB;IAEnC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAwBrC,iBAAiB,IAAI,IAAI;IAIzB;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAoCnE,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAuDrE,OAAO,CAAC,aAAa;IAuCrB,OAAO,CAAC,cAAc;IAUhB,cAAc,CAClB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EAAE,EACrB,aAAa,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,iBAAiB,CAAC;IA+BvB,eAAe,CACnB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,OAAO,GACtB,OAAO,CAAC,iBAAiB,CA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iBAAiB,CAAC;IA+BvB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA8BjE;;OAEG;IACG,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA0ClE;;OAEG;IACG,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;YA8C3E,gBAAgB;IAiB9B,OAAO,CAAC,WAAW;IAuCnB,OAAO,CAAC,kBAAkB;IAuE1B,OAAO,CAAC,eAAe;CAiCxB;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAC;AACnD,eAAe,cAAc,CAAC"}
@@ -1,5 +1,18 @@
1
- import { executeCommand } from '../utils/helpers.js';
1
+ import { executeCommand, sleep } from '../utils/helpers.js';
2
2
  import { logger } from '../utils/logger.js';
3
+ import { t } from '../i18n/index.js';
4
+ const COPILOT_TIMEOUT_MS = 30000;
5
+ const COPILOT_RETRY_DELAY_MS = 1000;
6
+ const COPILOT_MAX_RETRIES = 1;
7
+ const COPILOT_INSTALL_TIMEOUT_MS = 120000;
8
+ const MAX_DIFF_FILES = 5;
9
+ const MAX_COMMIT_MSG_LENGTH = 100;
10
+ const MIN_COMMIT_MSG_LENGTH = 10;
11
+ const MIN_LINE_LENGTH = 5;
12
+ const MAX_SUGGESTION_LENGTH = 500;
13
+ function getCopilotCommand() {
14
+ return process.env.COPILOT_CLI_PATH || 'copilot';
15
+ }
3
16
  class CopilotService {
4
17
  available = null;
5
18
  async isAvailable() {
@@ -8,7 +21,7 @@ class CopilotService {
8
21
  }
9
22
  try {
10
23
  // Use the new GitHub Copilot CLI (not gh copilot extension)
11
- const { stdout, stderr } = await executeCommand('copilot --version');
24
+ const { stdout, stderr } = await executeCommand(`${getCopilotCommand()} --version`);
12
25
  // Check for version number in output (e.g., "0.0.393")
13
26
  const hasVersion = /\d+\.\d+/.test(stdout);
14
27
  const hasError = stderr.includes('not found') || stderr.includes('not recognized');
@@ -33,8 +46,7 @@ class CopilotService {
33
46
  async installCopilotCli() {
34
47
  try {
35
48
  // Install the GitHub Copilot CLI package globally
36
- const { stdout, stderr } = await executeCommand('npm install -g @githubnext/github-copilot-cli', 120000 // 2 minute timeout for installation
37
- );
49
+ const { stdout, stderr } = await executeCommand('npm install -g @githubnext/github-copilot-cli', COPILOT_INSTALL_TIMEOUT_MS);
38
50
  logger.debug('Copilot CLI installation output:', { stdout, stderr });
39
51
  // Reset cached availability to force re-check
40
52
  this.resetAvailability();
@@ -57,7 +69,7 @@ class CopilotService {
57
69
  logger.debug('Copilot CLI installation failed:', error);
58
70
  return {
59
71
  success: false,
60
- message: error instanceof Error ? error.message : 'Installation failed'
72
+ message: error instanceof Error ? error.message : t('errors.unknownError')
61
73
  };
62
74
  }
63
75
  }
@@ -81,8 +93,11 @@ class CopilotService {
81
93
  const prompt = `Generate a conventional commit message for these file changes: ${diffSummary}. Use format type: description where type is feat fix docs refactor test or chore. Reply with only the commit message.`;
82
94
  logger.debug('Copilot prompt:', prompt);
83
95
  // Use copilot CLI in non-interactive mode with silent output
84
- const { stdout, stderr } = await executeCommand(`copilot -p "${this.escapeForShell(prompt)}" -s`, 60000 // 60 second timeout for AI response
85
- );
96
+ const result = await this.executeWithRetry(`${getCopilotCommand()} -p "${this.escapeForShell(prompt)}" -s`, COPILOT_TIMEOUT_MS);
97
+ if (!result) {
98
+ return { success: false, message: 'Could not generate a commit message' };
99
+ }
100
+ const { stdout, stderr } = result;
86
101
  logger.debug('Copilot CLI response:', { stdout: stdout.substring(0, 500), stderr });
87
102
  // Parse the response to extract the suggested commit message
88
103
  const message = this.parseCommitMessage(stdout, stderr);
@@ -101,7 +116,7 @@ class CopilotService {
101
116
  logger.debug('Copilot CLI suggestion failed:', error);
102
117
  return {
103
118
  success: false,
104
- message: error instanceof Error ? error.message : 'Unknown error'
119
+ message: error instanceof Error ? error.message : t('errors.unknownError')
105
120
  };
106
121
  }
107
122
  }
@@ -130,7 +145,7 @@ class CopilotService {
130
145
  const parts = [];
131
146
  if (files.length > 0) {
132
147
  // Clean file names (remove special chars)
133
- const cleanFiles = files.slice(0, 5).map(f => f.replace(/[^a-zA-Z0-9._/-]/g, ''));
148
+ const cleanFiles = files.slice(0, MAX_DIFF_FILES).map(f => f.replace(/[^a-zA-Z0-9._/-]/g, ''));
134
149
  parts.push(`Files: ${cleanFiles.join(', ')}`);
135
150
  }
136
151
  if (additions > 0 || deletions > 0) {
@@ -157,7 +172,7 @@ class CopilotService {
157
172
  try {
158
173
  const context = `Branch: ${branch}. Staged files: ${stagedFiles.join(', ') || 'none'}. Modified files: ${modifiedFiles.join(', ') || 'none'}.`;
159
174
  const prompt = `Given this git state: ${context} What should the user do next? Reply with a single brief suggestion in one sentence.`;
160
- const { stdout, stderr } = await executeCommand(`copilot -p "${this.escapeForShell(prompt)}" -s`, 30000);
175
+ const { stdout, stderr } = await executeCommand(`${getCopilotCommand()} -p "${this.escapeForShell(prompt)}" -s`, COPILOT_TIMEOUT_MS);
161
176
  const suggestion = this.parseSuggestion(stdout, stderr);
162
177
  return {
163
178
  success: !!suggestion,
@@ -167,7 +182,7 @@ class CopilotService {
167
182
  catch (error) {
168
183
  return {
169
184
  success: false,
170
- message: error instanceof Error ? error.message : 'Unknown error'
185
+ message: error instanceof Error ? error.message : t('errors.unknownError')
171
186
  };
172
187
  }
173
188
  }
@@ -181,7 +196,7 @@ class CopilotService {
181
196
  try {
182
197
  const context = `Action: ${action}. Branch: ${currentBranch}. Uncommitted changes: ${hasUncommitted}.`;
183
198
  const prompt = `Will this git action cause problems? ${context} Reply briefly in one sentence.`;
184
- const { stdout, stderr } = await executeCommand(`copilot -p "${this.escapeForShell(prompt)}" -s`, 30000);
199
+ const { stdout, stderr } = await executeCommand(`${getCopilotCommand()} -p "${this.escapeForShell(prompt)}" -s`, COPILOT_TIMEOUT_MS);
185
200
  const prediction = this.parseSuggestion(stdout, stderr);
186
201
  return {
187
202
  success: true,
@@ -191,7 +206,7 @@ class CopilotService {
191
206
  catch (error) {
192
207
  return {
193
208
  success: false,
194
- message: error instanceof Error ? error.message : 'Unknown error'
209
+ message: error instanceof Error ? error.message : t('errors.unknownError')
195
210
  };
196
211
  }
197
212
  }
@@ -204,7 +219,7 @@ class CopilotService {
204
219
  }
205
220
  try {
206
221
  const prompt = `Explain this Git concept briefly for a beginner in 2-3 sentences: ${concept}`;
207
- const { stdout, stderr } = await executeCommand(`copilot -p "${this.escapeForShell(prompt)}" -s`, 30000);
222
+ const { stdout, stderr } = await executeCommand(`${getCopilotCommand()} -p "${this.escapeForShell(prompt)}" -s`, COPILOT_TIMEOUT_MS);
208
223
  const explanation = this.parseSuggestion(stdout, stderr);
209
224
  return {
210
225
  success: !!explanation,
@@ -214,7 +229,7 @@ class CopilotService {
214
229
  catch (error) {
215
230
  return {
216
231
  success: false,
217
- message: error instanceof Error ? error.message : 'Unknown error'
232
+ message: error instanceof Error ? error.message : t('errors.unknownError')
218
233
  };
219
234
  }
220
235
  }
@@ -240,7 +255,7 @@ class CopilotService {
240
255
  Question: ${question}
241
256
 
242
257
  Provide a helpful answer in 2-4 sentences. If relevant, include the Git command.`;
243
- const { stdout, stderr } = await executeCommand(`copilot -p "${this.escapeForShell(prompt)}" -s`, 45000);
258
+ const { stdout, stderr } = await executeCommand(`${getCopilotCommand()} -p "${this.escapeForShell(prompt)}" -s`, COPILOT_TIMEOUT_MS);
244
259
  const answer = this.parseAnswer(stdout, stderr);
245
260
  return {
246
261
  success: !!answer,
@@ -251,7 +266,7 @@ Provide a helpful answer in 2-4 sentences. If relevant, include the Git command.
251
266
  logger.debug('askGitQuestion failed:', error);
252
267
  return {
253
268
  success: false,
254
- message: error instanceof Error ? error.message : 'Unknown error'
269
+ message: error instanceof Error ? error.message : t('errors.unknownError')
255
270
  };
256
271
  }
257
272
  }
@@ -281,7 +296,7 @@ ${commandContext}Error message: ${errorMessage}
281
296
  2. Provide the solution or command to fix it (1-2 sentences)
282
297
 
283
298
  Be concise and practical.`;
284
- const { stdout, stderr } = await executeCommand(`copilot -p "${this.escapeForShell(prompt)}" -s`, 45000);
299
+ const { stdout, stderr } = await executeCommand(`${getCopilotCommand()} -p "${this.escapeForShell(prompt)}" -s`, COPILOT_TIMEOUT_MS);
285
300
  const explanation = this.parseAnswer(stdout, stderr);
286
301
  return {
287
302
  success: !!explanation,
@@ -292,10 +307,24 @@ Be concise and practical.`;
292
307
  logger.debug('explainGitError failed:', error);
293
308
  return {
294
309
  success: false,
295
- message: error instanceof Error ? error.message : 'Unknown error'
310
+ message: error instanceof Error ? error.message : t('errors.unknownError')
296
311
  };
297
312
  }
298
313
  }
314
+ async executeWithRetry(command, timeout) {
315
+ for (let attempt = 0; attempt <= COPILOT_MAX_RETRIES; attempt++) {
316
+ try {
317
+ return await executeCommand(command, timeout);
318
+ }
319
+ catch (error) {
320
+ logger.debug(`Copilot attempt ${attempt + 1} failed:`, error);
321
+ if (attempt < COPILOT_MAX_RETRIES) {
322
+ await sleep(COPILOT_RETRY_DELAY_MS);
323
+ }
324
+ }
325
+ }
326
+ return null;
327
+ }
299
328
  parseAnswer(output, stderr) {
300
329
  const combined = `${output}\n${stderr || ''}`.trim();
301
330
  const lines = combined.split('\n');
@@ -318,7 +347,7 @@ Be concise and practical.`;
318
347
  if (filterPatterns.some(pattern => pattern.test(trimmed))) {
319
348
  continue;
320
349
  }
321
- if (trimmed.length >= 5) {
350
+ if (trimmed.length >= MIN_LINE_LENGTH) {
322
351
  meaningfulLines.push(trimmed);
323
352
  }
324
353
  }
@@ -356,7 +385,7 @@ Be concise and practical.`;
356
385
  // Match conventional commit format
357
386
  if (/^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?!?:\s*.+/i.test(trimmed)) {
358
387
  // Clean up the message (remove quotes, backticks)
359
- return trimmed.replace(/^["'`]|["'`]$/g, '').substring(0, 100);
388
+ return trimmed.replace(/^["'`]|["'`]$/g, '').substring(0, MAX_COMMIT_MSG_LENGTH);
360
389
  }
361
390
  }
362
391
  // Second pass: look for any meaningful commit-like message
@@ -367,7 +396,7 @@ Be concise and practical.`;
367
396
  continue;
368
397
  }
369
398
  // Accept lines that look like commit messages (start with verb, reasonable length)
370
- if (trimmed.length >= 10 && trimmed.length <= 100) {
399
+ if (trimmed.length >= MIN_COMMIT_MSG_LENGTH && trimmed.length <= MAX_COMMIT_MSG_LENGTH) {
371
400
  // Check if it starts with a common commit verb
372
401
  if (/^(add|update|fix|remove|refactor|implement|create|delete|change|improve|move|rename)/i.test(trimmed)) {
373
402
  return trimmed.replace(/^["'`]|["'`]$/g, '');
@@ -380,7 +409,7 @@ Be concise and practical.`;
380
409
  if (filterPatterns.some(pattern => pattern.test(trimmed))) {
381
410
  continue;
382
411
  }
383
- if (trimmed.length >= 5 && trimmed.length <= 100) {
412
+ if (trimmed.length >= MIN_LINE_LENGTH && trimmed.length <= MAX_COMMIT_MSG_LENGTH) {
384
413
  return trimmed.replace(/^["'`]|["'`]$/g, '');
385
414
  }
386
415
  }
@@ -408,7 +437,7 @@ Be concise and practical.`;
408
437
  if (filterPatterns.some(pattern => pattern.test(trimmed))) {
409
438
  continue;
410
439
  }
411
- if (trimmed.length >= 10 && trimmed.length <= 500) {
440
+ if (trimmed.length >= MIN_COMMIT_MSG_LENGTH && trimmed.length <= MAX_SUGGESTION_LENGTH) {
412
441
  return trimmed;
413
442
  }
414
443
  }