geeto 0.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +152 -0
- package/lib/api/copilot-adapter.d.ts +11 -0
- package/lib/api/copilot-adapter.d.ts.map +1 -0
- package/lib/api/copilot-adapter.js +41 -0
- package/lib/api/copilot-adapter.js.map +1 -0
- package/lib/api/copilot-sdk.d.ts +48 -0
- package/lib/api/copilot-sdk.d.ts.map +1 -0
- package/lib/api/copilot-sdk.js +451 -0
- package/lib/api/copilot-sdk.js.map +1 -0
- package/lib/api/copilot.d.ts +21 -0
- package/lib/api/copilot.d.ts.map +1 -0
- package/lib/api/copilot.js +87 -0
- package/lib/api/copilot.js.map +1 -0
- package/lib/api/gemini-sdk.d.ts +24 -0
- package/lib/api/gemini-sdk.d.ts.map +1 -0
- package/lib/api/gemini-sdk.js +245 -0
- package/lib/api/gemini-sdk.js.map +1 -0
- package/lib/api/gemini.d.ts +21 -0
- package/lib/api/gemini.d.ts.map +1 -0
- package/lib/api/gemini.js +87 -0
- package/lib/api/gemini.js.map +1 -0
- package/lib/api/openrouter-sdk.d.ts +58 -0
- package/lib/api/openrouter-sdk.d.ts.map +1 -0
- package/lib/api/openrouter-sdk.js +341 -0
- package/lib/api/openrouter-sdk.js.map +1 -0
- package/lib/api/openrouter.d.ts +17 -0
- package/lib/api/openrouter.d.ts.map +1 -0
- package/lib/api/openrouter.js +111 -0
- package/lib/api/openrouter.js.map +1 -0
- package/lib/api/trello.d.ts +17 -0
- package/lib/api/trello.d.ts.map +1 -0
- package/lib/api/trello.js +72 -0
- package/lib/api/trello.js.map +1 -0
- package/lib/cli/input.d.ts +39 -0
- package/lib/cli/input.d.ts.map +1 -0
- package/lib/cli/input.js +119 -0
- package/lib/cli/input.js.map +1 -0
- package/lib/cli/menu.d.ts +9 -0
- package/lib/cli/menu.d.ts.map +1 -0
- package/lib/cli/menu.js +201 -0
- package/lib/cli/menu.js.map +1 -0
- package/lib/core/constants.d.ts +22 -0
- package/lib/core/constants.d.ts.map +1 -0
- package/lib/core/constants.js +24 -0
- package/lib/core/constants.js.map +1 -0
- package/lib/core/copilot-setup.d.ts +13 -0
- package/lib/core/copilot-setup.d.ts.map +1 -0
- package/lib/core/copilot-setup.js +447 -0
- package/lib/core/copilot-setup.js.map +1 -0
- package/lib/core/gemini-setup.d.ts +8 -0
- package/lib/core/gemini-setup.d.ts.map +1 -0
- package/lib/core/gemini-setup.js +84 -0
- package/lib/core/gemini-setup.js.map +1 -0
- package/lib/core/menu-constants.d.ts +24 -0
- package/lib/core/menu-constants.d.ts.map +1 -0
- package/lib/core/menu-constants.js +22 -0
- package/lib/core/menu-constants.js.map +1 -0
- package/lib/core/openrouter-setup.d.ts +8 -0
- package/lib/core/openrouter-setup.d.ts.map +1 -0
- package/lib/core/openrouter-setup.js +73 -0
- package/lib/core/openrouter-setup.js.map +1 -0
- package/lib/core/setup.d.ts +21 -0
- package/lib/core/setup.d.ts.map +1 -0
- package/lib/core/setup.js +88 -0
- package/lib/core/setup.js.map +1 -0
- package/lib/core/trello-setup.d.ts +8 -0
- package/lib/core/trello-setup.d.ts.map +1 -0
- package/lib/core/trello-setup.js +107 -0
- package/lib/core/trello-setup.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +250 -0
- package/lib/index.js.map +1 -0
- package/lib/types/index.d.ts +78 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -0
- package/lib/utils/branch-naming.d.ts +11 -0
- package/lib/utils/branch-naming.d.ts.map +1 -0
- package/lib/utils/branch-naming.js +396 -0
- package/lib/utils/branch-naming.js.map +1 -0
- package/lib/utils/colors.d.ts +14 -0
- package/lib/utils/colors.d.ts.map +1 -0
- package/lib/utils/colors.js +14 -0
- package/lib/utils/colors.js.map +1 -0
- package/lib/utils/commit-helpers.d.ts +53 -0
- package/lib/utils/commit-helpers.d.ts.map +1 -0
- package/lib/utils/commit-helpers.js +177 -0
- package/lib/utils/commit-helpers.js.map +1 -0
- package/lib/utils/config.d.ts +87 -0
- package/lib/utils/config.d.ts.map +1 -0
- package/lib/utils/config.js +326 -0
- package/lib/utils/config.js.map +1 -0
- package/lib/utils/display.d.ts +27 -0
- package/lib/utils/display.d.ts.map +1 -0
- package/lib/utils/display.js +116 -0
- package/lib/utils/display.js.map +1 -0
- package/lib/utils/error-helpers.d.ts +27 -0
- package/lib/utils/error-helpers.d.ts.map +1 -0
- package/lib/utils/error-helpers.js +102 -0
- package/lib/utils/error-helpers.js.map +1 -0
- package/lib/utils/exec.d.ts +18 -0
- package/lib/utils/exec.d.ts.map +1 -0
- package/lib/utils/exec.js +96 -0
- package/lib/utils/exec.js.map +1 -0
- package/lib/utils/git-ai-errors.d.ts +10 -0
- package/lib/utils/git-ai-errors.d.ts.map +1 -0
- package/lib/utils/git-ai-errors.js +71 -0
- package/lib/utils/git-ai-errors.js.map +1 -0
- package/lib/utils/git-ai.d.ts +26 -0
- package/lib/utils/git-ai.d.ts.map +1 -0
- package/lib/utils/git-ai.js +603 -0
- package/lib/utils/git-ai.js.map +1 -0
- package/lib/utils/git-commands.d.ts +21 -0
- package/lib/utils/git-commands.d.ts.map +1 -0
- package/lib/utils/git-commands.js +58 -0
- package/lib/utils/git-commands.js.map +1 -0
- package/lib/utils/git-errors.d.ts +76 -0
- package/lib/utils/git-errors.d.ts.map +1 -0
- package/lib/utils/git-errors.js +565 -0
- package/lib/utils/git-errors.js.map +1 -0
- package/lib/utils/git.d.ts +61 -0
- package/lib/utils/git.d.ts.map +1 -0
- package/lib/utils/git.js +245 -0
- package/lib/utils/git.js.map +1 -0
- package/lib/utils/logging.d.ts +25 -0
- package/lib/utils/logging.d.ts.map +1 -0
- package/lib/utils/logging.js +71 -0
- package/lib/utils/logging.js.map +1 -0
- package/lib/utils/menu-builders.d.ts +47 -0
- package/lib/utils/menu-builders.d.ts.map +1 -0
- package/lib/utils/menu-builders.js +34 -0
- package/lib/utils/menu-builders.js.map +1 -0
- package/lib/utils/platform.d.ts +13 -0
- package/lib/utils/platform.d.ts.map +1 -0
- package/lib/utils/platform.js +32 -0
- package/lib/utils/platform.js.map +1 -0
- package/lib/utils/spinner-wrapper.d.ts +16 -0
- package/lib/utils/spinner-wrapper.d.ts.map +1 -0
- package/lib/utils/spinner-wrapper.js +56 -0
- package/lib/utils/spinner-wrapper.js.map +1 -0
- package/lib/utils/state.d.ts +22 -0
- package/lib/utils/state.d.ts.map +1 -0
- package/lib/utils/state.js +75 -0
- package/lib/utils/state.js.map +1 -0
- package/lib/utils/time.d.ts +4 -0
- package/lib/utils/time.d.ts.map +1 -0
- package/lib/utils/time.js +29 -0
- package/lib/utils/time.js.map +1 -0
- package/lib/utils/type-guards.d.ts +10 -0
- package/lib/utils/type-guards.d.ts.map +1 -0
- package/lib/utils/type-guards.js +29 -0
- package/lib/utils/type-guards.js.map +1 -0
- package/lib/workflows/ai-provider.d.ts +13 -0
- package/lib/workflows/ai-provider.d.ts.map +1 -0
- package/lib/workflows/ai-provider.js +55 -0
- package/lib/workflows/ai-provider.js.map +1 -0
- package/lib/workflows/author.d.ts +4 -0
- package/lib/workflows/author.d.ts.map +1 -0
- package/lib/workflows/author.js +80 -0
- package/lib/workflows/author.js.map +1 -0
- package/lib/workflows/branch-helpers.d.ts +9 -0
- package/lib/workflows/branch-helpers.d.ts.map +1 -0
- package/lib/workflows/branch-helpers.js +406 -0
- package/lib/workflows/branch-helpers.js.map +1 -0
- package/lib/workflows/branch-utils.d.ts +9 -0
- package/lib/workflows/branch-utils.d.ts.map +1 -0
- package/lib/workflows/branch-utils.js +61 -0
- package/lib/workflows/branch-utils.js.map +1 -0
- package/lib/workflows/branch.d.ts +12 -0
- package/lib/workflows/branch.d.ts.map +1 -0
- package/lib/workflows/branch.js +555 -0
- package/lib/workflows/branch.js.map +1 -0
- package/lib/workflows/cleanup.d.ts +10 -0
- package/lib/workflows/cleanup.d.ts.map +1 -0
- package/lib/workflows/cleanup.js +287 -0
- package/lib/workflows/cleanup.js.map +1 -0
- package/lib/workflows/commit.d.ts +10 -0
- package/lib/workflows/commit.d.ts.map +1 -0
- package/lib/workflows/commit.js +771 -0
- package/lib/workflows/commit.js.map +1 -0
- package/lib/workflows/main-steps.d.ts +12 -0
- package/lib/workflows/main-steps.d.ts.map +1 -0
- package/lib/workflows/main-steps.js +407 -0
- package/lib/workflows/main-steps.js.map +1 -0
- package/lib/workflows/main.d.ts +8 -0
- package/lib/workflows/main.d.ts.map +1 -0
- package/lib/workflows/main.js +720 -0
- package/lib/workflows/main.js.map +1 -0
- package/lib/workflows/security-gate.d.ts +8 -0
- package/lib/workflows/security-gate.d.ts.map +1 -0
- package/lib/workflows/security-gate.js +447 -0
- package/lib/workflows/security-gate.js.map +1 -0
- package/lib/workflows/settings.d.ts +15 -0
- package/lib/workflows/settings.d.ts.map +1 -0
- package/lib/workflows/settings.js +438 -0
- package/lib/workflows/settings.js.map +1 -0
- package/lib/workflows/trello-menu.d.ts +16 -0
- package/lib/workflows/trello-menu.d.ts.map +1 -0
- package/lib/workflows/trello-menu.js +361 -0
- package/lib/workflows/trello-menu.js.map +1 -0
- package/package.json +112 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { CopilotModel } from '../api/copilot.js';
|
|
2
|
+
import type { GeminiModel } from '../api/gemini.js';
|
|
3
|
+
import type { OpenRouterModel } from '../api/openrouter.js';
|
|
4
|
+
export interface SelectOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
export interface GeetoState {
|
|
9
|
+
step: number;
|
|
10
|
+
workingBranch: string;
|
|
11
|
+
targetBranch: string;
|
|
12
|
+
currentBranch: string;
|
|
13
|
+
timestamp: string;
|
|
14
|
+
aiProvider?: 'gemini' | 'copilot' | 'openrouter' | 'manual';
|
|
15
|
+
copilotModel?: CopilotModel;
|
|
16
|
+
openrouterModel?: OpenRouterModel;
|
|
17
|
+
geminiModel?: GeminiModel;
|
|
18
|
+
skippedCommit?: boolean;
|
|
19
|
+
skippedPush?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface BranchNamingResult {
|
|
22
|
+
workingBranch: string;
|
|
23
|
+
shouldRestart: boolean;
|
|
24
|
+
cancelled: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface TrelloConfig {
|
|
27
|
+
apiKey: string;
|
|
28
|
+
token: string;
|
|
29
|
+
boardId: string;
|
|
30
|
+
}
|
|
31
|
+
export interface TrelloCard {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
desc?: string;
|
|
35
|
+
idShort: number;
|
|
36
|
+
shortLink: string;
|
|
37
|
+
url: string;
|
|
38
|
+
idList: string;
|
|
39
|
+
}
|
|
40
|
+
export interface TrelloList {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
}
|
|
44
|
+
export interface BranchStrategyConfig {
|
|
45
|
+
separator: '-' | '_';
|
|
46
|
+
lastNamingStrategy?: 'title-full' | 'title-ai' | 'ai' | 'trello' | 'manual';
|
|
47
|
+
lastTrelloList?: string;
|
|
48
|
+
}
|
|
49
|
+
export type TaskPlatform = 'trello' | 'none';
|
|
50
|
+
export interface TaskPlatformOption {
|
|
51
|
+
name: string;
|
|
52
|
+
value: TaskPlatform;
|
|
53
|
+
enabled: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface GeminiResponse {
|
|
56
|
+
candidates?: Array<{
|
|
57
|
+
content?: {
|
|
58
|
+
parts?: Array<{
|
|
59
|
+
text?: string;
|
|
60
|
+
}>;
|
|
61
|
+
};
|
|
62
|
+
}>;
|
|
63
|
+
error?: {
|
|
64
|
+
message: string;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export interface BranchNamingResult {
|
|
68
|
+
workingBranch: string;
|
|
69
|
+
shouldRestart: boolean;
|
|
70
|
+
cancelled: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface GeminiConfig {
|
|
73
|
+
apiKey: string;
|
|
74
|
+
}
|
|
75
|
+
export interface OpenRouterConfig {
|
|
76
|
+
apiKey: string;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,QAAQ,CAAA;IAC3D,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,WAAW,CAAC,EAAE,WAAW,CAAA;IAEzB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,OAAO,CAAA;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,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ceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CopilotModel } from '../api/copilot.js';
|
|
2
|
+
import type { GeminiModel } from '../api/gemini.js';
|
|
3
|
+
import type { OpenRouterModel } from '../api/openrouter.js';
|
|
4
|
+
export interface BranchNamingResult {
|
|
5
|
+
workingBranch: string;
|
|
6
|
+
shouldRestart: boolean;
|
|
7
|
+
cancelled: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const handleBranchNaming: (defaultPrefix: string, separator: "-" | "_", trelloCardId: string, currentBranch: string, aiProvider?: "gemini" | "copilot" | "openrouter", model?: CopilotModel | OpenRouterModel | GeminiModel, updateModel?: (provider: "gemini" | "copilot" | "openrouter", model?: CopilotModel | OpenRouterModel | GeminiModel) => void) => Promise<BranchNamingResult>;
|
|
10
|
+
export default handleBranchNaming;
|
|
11
|
+
//# sourceMappingURL=branch-naming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-naming.d.ts","sourceRoot":"","sources":["../../src/utils/branch-naming.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAK3D,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,OAAO,CAAA;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,kBAAkB,GAC7B,eAAe,MAAM,EACrB,WAAW,GAAG,GAAG,GAAG,EACpB,cAAc,MAAM,EACpB,eAAe,MAAM,EACrB,aAAY,QAAQ,GAAG,SAAS,GAAG,YAAuB,EAC1D,QAAQ,YAAY,GAAG,eAAe,GAAG,WAAW,EACpD,cAAc,CACZ,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,YAAY,EAC7C,KAAK,CAAC,EAAE,YAAY,GAAG,eAAe,GAAG,WAAW,KACjD,IAAI,KACR,OAAO,CAAC,kBAAkB,CAqc5B,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { execGit } from './exec.js';
|
|
2
|
+
import { getChangedFiles } from './git.js';
|
|
3
|
+
export const handleBranchNaming = async (defaultPrefix, separator, trelloCardId, currentBranch, aiProvider = 'gemini', model, updateModel) => {
|
|
4
|
+
const { askQuestion } = await import('../cli/input.js');
|
|
5
|
+
const { select } = await import('../cli/menu.js');
|
|
6
|
+
const { exec } = await import('./exec.js');
|
|
7
|
+
const { log } = await import('./logging.js');
|
|
8
|
+
const { colors } = await import('./colors.js');
|
|
9
|
+
const result = {
|
|
10
|
+
workingBranch: '',
|
|
11
|
+
shouldRestart: false,
|
|
12
|
+
cancelled: false,
|
|
13
|
+
};
|
|
14
|
+
let diff = execGit('git diff --cached', true);
|
|
15
|
+
// If there are no staged changes, offer to stage
|
|
16
|
+
if (!diff?.trim()) {
|
|
17
|
+
const changedFiles = getChangedFiles();
|
|
18
|
+
if (changedFiles.length === 0) {
|
|
19
|
+
log.warn('No changes found. Cannot generate a branch name. Aborting.');
|
|
20
|
+
result.cancelled = true;
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
const stageChoice = (await select('What to stage?', [
|
|
24
|
+
{ label: 'Stage all changes', value: 'all' },
|
|
25
|
+
{ label: 'Already staged', value: 'skip' },
|
|
26
|
+
{ label: 'Continue without staging', value: 'without' },
|
|
27
|
+
{ label: 'Cancel', value: 'cancel' },
|
|
28
|
+
]));
|
|
29
|
+
switch (stageChoice) {
|
|
30
|
+
case 'all': {
|
|
31
|
+
exec('git add -A');
|
|
32
|
+
log.success('All changes staged');
|
|
33
|
+
console.log('');
|
|
34
|
+
diff = execGit('git diff --cached', true);
|
|
35
|
+
if (!diff?.trim()) {
|
|
36
|
+
log.error('Still no staged changes after staging. Aborting.');
|
|
37
|
+
result.cancelled = true;
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
case 'without':
|
|
43
|
+
case 'cancel': {
|
|
44
|
+
log.warn('Cancelled.');
|
|
45
|
+
result.cancelled = true;
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
case 'skip': {
|
|
49
|
+
// Re-check if there are actually staged changes
|
|
50
|
+
diff = execGit('git diff --cached', true);
|
|
51
|
+
if (!diff?.trim()) {
|
|
52
|
+
log.error('No staged changes found. Aborting.');
|
|
53
|
+
result.cancelled = true;
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
let correction = '';
|
|
61
|
+
let aiSuffix = null;
|
|
62
|
+
let skipRegenerate = false;
|
|
63
|
+
// Loop until branch name accepted
|
|
64
|
+
while (true) {
|
|
65
|
+
const { getModelDisplayName, getAIProviderShortName, interactiveAIFallback, isTransientAIFailure, isContextLimitFailure, chooseModelForProvider, } = await import('./git-ai.js');
|
|
66
|
+
const modelDisplay = getModelDisplayName(aiProvider, model);
|
|
67
|
+
// Separate this AI generation log from prior output so it stands alone
|
|
68
|
+
if (correction) {
|
|
69
|
+
console.log('');
|
|
70
|
+
}
|
|
71
|
+
const spinner = log.spinner();
|
|
72
|
+
spinner.start(`Generating branch name with ${getAIProviderShortName(aiProvider)}${modelDisplay ? ` (${modelDisplay})` : ''}...`);
|
|
73
|
+
// Only call provider to regenerate when not skipping (e.g., user selected Back)
|
|
74
|
+
if (skipRegenerate) {
|
|
75
|
+
// consume the skip once - will reuse existing aiSuffix
|
|
76
|
+
skipRegenerate = false;
|
|
77
|
+
spinner.stop();
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
aiSuffix = null;
|
|
81
|
+
try {
|
|
82
|
+
switch (aiProvider) {
|
|
83
|
+
case 'gemini': {
|
|
84
|
+
const { generateBranchName } = await import('../api/gemini.js');
|
|
85
|
+
const word = diff;
|
|
86
|
+
aiSuffix = await generateBranchName(word, correction, model);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
case 'copilot': {
|
|
90
|
+
const { generateBranchName } = await import('../api/copilot.js');
|
|
91
|
+
const word = diff;
|
|
92
|
+
aiSuffix = await generateBranchName(word, correction, model);
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
case 'openrouter': {
|
|
96
|
+
const { generateBranchName } = await import('../api/openrouter.js');
|
|
97
|
+
const word = diff;
|
|
98
|
+
aiSuffix = await generateBranchName(word, correction, model);
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
spinner.stop();
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
spinner.stop();
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (!aiSuffix || isTransientAIFailure(aiSuffix) || isContextLimitFailure(aiSuffix)) {
|
|
110
|
+
const safeUpdate = (provider, modelStr) => {
|
|
111
|
+
if (updateModel) {
|
|
112
|
+
// forward to provided updater (cast since caller may use narrower model types)
|
|
113
|
+
updateModel(provider, modelStr);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
aiSuffix = await interactiveAIFallback(aiSuffix, aiProvider ?? 'gemini', model, diff, correction, currentBranch, safeUpdate);
|
|
117
|
+
if (aiSuffix === null) {
|
|
118
|
+
const { getBranchPrefix, validateBranchName } = await import('./git.js');
|
|
119
|
+
const customPrefix = getBranchPrefix(currentBranch);
|
|
120
|
+
let valid = false;
|
|
121
|
+
while (!valid) {
|
|
122
|
+
result.workingBranch = askQuestion('Enter branch name:', `${customPrefix}new-feature`);
|
|
123
|
+
const validation = validateBranchName(result.workingBranch);
|
|
124
|
+
if (validation.valid) {
|
|
125
|
+
valid = true;
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
log.error(`Invalid branch name: ${validation.reason}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const cleanSuffix = aiSuffix
|
|
135
|
+
.toLowerCase()
|
|
136
|
+
.replaceAll(/\W+/g, separator)
|
|
137
|
+
.replace(separator === '-' ? /-+/g : /_+/g, separator)
|
|
138
|
+
.replace(separator === '-' ? /^-|-$/g : /^_|_$/g, '')
|
|
139
|
+
.trim();
|
|
140
|
+
const incompletePatterns = separator === '-'
|
|
141
|
+
? ['-and', '-or', '-with', '-for', '-the', '-a', '-an', '-in', '-on', '-at', '-to', '-of']
|
|
142
|
+
: ['_and', '_or', '_with', '_for', '_the', '_a', '_an', '_in', '_on', '_at', '_to', '_of'];
|
|
143
|
+
// Treat trailing prepositions as incomplete
|
|
144
|
+
const extraIncomplete = separator === '-'
|
|
145
|
+
? ['-from', '-via', '-using', '-per', '-by']
|
|
146
|
+
: ['_from', '_via', '_using', '_per', '_by'];
|
|
147
|
+
incompletePatterns.push(...extraIncomplete);
|
|
148
|
+
const seemsIncomplete = incompletePatterns.some((pattern) => cleanSuffix.endsWith(pattern));
|
|
149
|
+
if (seemsIncomplete) {
|
|
150
|
+
log.warn(`AI response seems incomplete (ends with "${cleanSuffix.slice(-4)}"), regenerating...`);
|
|
151
|
+
correction = 'Generate a complete branch name without truncation';
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
const currentSuggestion = trelloCardId
|
|
155
|
+
? `${defaultPrefix}${trelloCardId}${separator}${cleanSuffix}`
|
|
156
|
+
: `${defaultPrefix}${cleanSuffix}`;
|
|
157
|
+
const contextLimitDetected = isContextLimitFailure(aiSuffix);
|
|
158
|
+
if (!contextLimitDetected) {
|
|
159
|
+
log.ai(`Suggested: ${colors.cyan}${colors.bright}${currentSuggestion}${colors.reset}`);
|
|
160
|
+
log.info('Incorrect Suggestion? check .geeto/last-ai-suggestion.json (possible AI/context limit).\n');
|
|
161
|
+
}
|
|
162
|
+
if (contextLimitDetected) {
|
|
163
|
+
// Force user to change model/provider or edit manually; don't allow accepting this suggestion
|
|
164
|
+
const acceptAi = await select('This model cannot process the input due to token/context limits. Please choose a different model or provider:', [
|
|
165
|
+
{
|
|
166
|
+
label: `Try again with ${getAIProviderShortName(aiProvider)}${modelDisplay ? ` (${modelDisplay})` : ''} model`,
|
|
167
|
+
value: 'try-same',
|
|
168
|
+
},
|
|
169
|
+
{ label: 'Change model', value: 'change-model' },
|
|
170
|
+
{ label: 'Change AI provider', value: 'change-provider' },
|
|
171
|
+
{ label: 'Edit manually', value: 'edit' },
|
|
172
|
+
{ label: 'Back to branch menu', value: 'back' },
|
|
173
|
+
]);
|
|
174
|
+
switch (acceptAi) {
|
|
175
|
+
case 'try-same': {
|
|
176
|
+
// Attempt to retry generation with the same provider/model
|
|
177
|
+
correction = '';
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
case 'change-model': {
|
|
181
|
+
// change only the current provider's model — use centralized helper
|
|
182
|
+
const provKey = (aiProvider ?? 'gemini');
|
|
183
|
+
const provider = (provKey === 'manual' ? 'gemini' : provKey);
|
|
184
|
+
const chosen = await chooseModelForProvider(provider, 'Choose model:', 'Back to suggested branch selection');
|
|
185
|
+
if (!chosen) {
|
|
186
|
+
skipRegenerate = true;
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
if (chosen === 'back') {
|
|
190
|
+
skipRegenerate = true;
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
updateModel?.(provider, chosen);
|
|
194
|
+
model = chosen;
|
|
195
|
+
correction = '';
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
case 'change-provider': {
|
|
199
|
+
const prov = await select('Choose AI provider:', [
|
|
200
|
+
{ label: 'Gemini', value: 'gemini' },
|
|
201
|
+
{ label: 'GitHub Copilot (Recommended)', value: 'copilot' },
|
|
202
|
+
{ label: 'OpenRouter', value: 'openrouter' },
|
|
203
|
+
{ label: 'Back to suggested branch selection', value: 'cancel-prov' },
|
|
204
|
+
]);
|
|
205
|
+
if (prov === 'cancel-prov') {
|
|
206
|
+
// User chose the contextual "Back" option — don't regenerate, return to previous menu
|
|
207
|
+
skipRegenerate = true;
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
// Centralized provider/model selection helper
|
|
211
|
+
const chosen = await chooseModelForProvider(prov, 'Choose model:', 'Back to suggested branch selection');
|
|
212
|
+
if (!chosen) {
|
|
213
|
+
skipRegenerate = true;
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
if (chosen === 'back') {
|
|
217
|
+
skipRegenerate = true;
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
if (prov === 'copilot') {
|
|
221
|
+
updateModel?.('copilot', chosen);
|
|
222
|
+
aiProvider = 'copilot';
|
|
223
|
+
model = chosen;
|
|
224
|
+
}
|
|
225
|
+
else if (prov === 'openrouter') {
|
|
226
|
+
updateModel?.('openrouter', chosen);
|
|
227
|
+
aiProvider = 'openrouter';
|
|
228
|
+
model = chosen;
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
updateModel?.('gemini', chosen);
|
|
232
|
+
aiProvider = 'gemini';
|
|
233
|
+
model = chosen;
|
|
234
|
+
}
|
|
235
|
+
correction = '';
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
case 'edit': {
|
|
239
|
+
const edited = askQuestion(`Edit branch (${currentSuggestion}): `);
|
|
240
|
+
result.workingBranch = edited ?? currentSuggestion;
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
case 'back': {
|
|
244
|
+
result.shouldRestart = true;
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
const acceptAi = await select('Accept this branch name?', [
|
|
251
|
+
{ label: 'Yes, use it', value: 'accept' },
|
|
252
|
+
{ label: 'Regenerate', value: 'regenerate' },
|
|
253
|
+
{ label: 'Correct AI (give feedback)', value: 'correct' },
|
|
254
|
+
{ label: 'Change model', value: 'change-model' },
|
|
255
|
+
{ label: 'Change AI provider', value: 'change-provider' },
|
|
256
|
+
{ label: 'Edit manually', value: 'edit' },
|
|
257
|
+
{ label: 'Back to branch menu', value: 'back' },
|
|
258
|
+
]);
|
|
259
|
+
switch (acceptAi) {
|
|
260
|
+
case 'accept': {
|
|
261
|
+
result.workingBranch = currentSuggestion;
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
case 'regenerate': {
|
|
265
|
+
correction = '';
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
case 'correct': {
|
|
269
|
+
correction = askQuestion('Provide corrections for the AI (e.g., prefer kebab-case, shorten subject): ');
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
case 'change-model': {
|
|
273
|
+
// change only the current provider's model
|
|
274
|
+
const currentProv = aiProvider ?? 'gemini';
|
|
275
|
+
if (currentProv === 'copilot') {
|
|
276
|
+
const cop = await import('../api/copilot.js');
|
|
277
|
+
const models = await cop.getCopilotModels();
|
|
278
|
+
const copOptions = models.some((m) => m.value === 'back')
|
|
279
|
+
? models
|
|
280
|
+
: [...models, { label: 'Back to suggested branch selection', value: 'back' }];
|
|
281
|
+
const chosen = await select('Choose Copilot model:', copOptions);
|
|
282
|
+
if (chosen === 'back') {
|
|
283
|
+
skipRegenerate = true;
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
updateModel?.('copilot', chosen);
|
|
287
|
+
model = chosen;
|
|
288
|
+
}
|
|
289
|
+
else if (currentProv === 'openrouter') {
|
|
290
|
+
const or = await import('../api/openrouter.js');
|
|
291
|
+
const models = await or.getOpenRouterModels();
|
|
292
|
+
const orOptions = models.some((m) => m.value === 'back')
|
|
293
|
+
? models
|
|
294
|
+
: [...models, { label: 'Back to suggested branch selection', value: 'back' }];
|
|
295
|
+
const chosen = await select('Choose OpenRouter model:', orOptions);
|
|
296
|
+
if (chosen === 'back') {
|
|
297
|
+
skipRegenerate = true;
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
updateModel?.('openrouter', chosen);
|
|
301
|
+
model = chosen;
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
const gm = await import('../api/gemini.js');
|
|
305
|
+
const models = await gm.getGeminiModels();
|
|
306
|
+
const gmOptions = models.some((m) => m.value === 'back')
|
|
307
|
+
? models
|
|
308
|
+
: [...models, { label: 'Back to suggested branch selection', value: 'back' }];
|
|
309
|
+
const chosen = await select('Choose Gemini model:', gmOptions);
|
|
310
|
+
if (chosen === 'back') {
|
|
311
|
+
skipRegenerate = true;
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
updateModel?.('gemini', chosen);
|
|
315
|
+
model = chosen;
|
|
316
|
+
}
|
|
317
|
+
correction = '';
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
case 'change-provider': {
|
|
321
|
+
const prov = await select('Choose AI provider:', [
|
|
322
|
+
{ label: 'Gemini', value: 'gemini' },
|
|
323
|
+
{ label: 'GitHub Copilot (Recommended)', value: 'copilot' },
|
|
324
|
+
{ label: 'OpenRouter', value: 'openrouter' },
|
|
325
|
+
{ label: 'Back to suggested branch selection', value: 'cancel-prov' },
|
|
326
|
+
]);
|
|
327
|
+
if (prov === 'cancel-prov') {
|
|
328
|
+
// User chose the contextual "Back" option — don't regenerate, return to previous menu
|
|
329
|
+
skipRegenerate = true;
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
// Centralized provider/model selection helper
|
|
333
|
+
const chosen = await chooseModelForProvider(prov, 'Choose model:', 'Back to suggested branch selection');
|
|
334
|
+
if (!chosen) {
|
|
335
|
+
skipRegenerate = true;
|
|
336
|
+
continue;
|
|
337
|
+
}
|
|
338
|
+
if (chosen === 'back') {
|
|
339
|
+
skipRegenerate = true;
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
if (prov === 'copilot') {
|
|
343
|
+
updateModel?.('copilot', chosen);
|
|
344
|
+
aiProvider = 'copilot';
|
|
345
|
+
model = chosen;
|
|
346
|
+
}
|
|
347
|
+
else if (prov === 'openrouter') {
|
|
348
|
+
updateModel?.('openrouter', chosen);
|
|
349
|
+
aiProvider = 'openrouter';
|
|
350
|
+
model = chosen;
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
updateModel?.('gemini', chosen);
|
|
354
|
+
aiProvider = 'gemini';
|
|
355
|
+
model = chosen;
|
|
356
|
+
}
|
|
357
|
+
correction = '';
|
|
358
|
+
continue;
|
|
359
|
+
}
|
|
360
|
+
case 'edit': {
|
|
361
|
+
const edited = askQuestion(`Edit branch (${currentSuggestion}): `);
|
|
362
|
+
result.workingBranch = edited || currentSuggestion;
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
case 'back': {
|
|
366
|
+
result.shouldRestart = true;
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if (result.workingBranch || result.shouldRestart) {
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
if (result.workingBranch && result.workingBranch !== currentBranch) {
|
|
376
|
+
const { validateBranchName } = await import('./git.js');
|
|
377
|
+
const validation = validateBranchName(result.workingBranch);
|
|
378
|
+
if (!validation.valid) {
|
|
379
|
+
log.error(`Invalid branch name: ${validation.reason}`);
|
|
380
|
+
result.workingBranch = '';
|
|
381
|
+
return result;
|
|
382
|
+
}
|
|
383
|
+
const { branchExists } = await import('./git.js');
|
|
384
|
+
if (branchExists(result.workingBranch)) {
|
|
385
|
+
log.error(`Branch '${result.workingBranch}' already exists locally`);
|
|
386
|
+
result.workingBranch = '';
|
|
387
|
+
return result;
|
|
388
|
+
}
|
|
389
|
+
log.info(`Creating branch: ${result.workingBranch}`);
|
|
390
|
+
exec(`git checkout -b "${result.workingBranch}"`);
|
|
391
|
+
log.success(`Branch created: ${result.workingBranch}`);
|
|
392
|
+
}
|
|
393
|
+
return result;
|
|
394
|
+
};
|
|
395
|
+
export default handleBranchNaming;
|
|
396
|
+
//# sourceMappingURL=branch-naming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-naming.js","sourceRoot":"","sources":["../../src/utils/branch-naming.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAQ1C,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,aAAqB,EACrB,SAAoB,EACpB,YAAoB,EACpB,aAAqB,EACrB,aAAkD,QAAQ,EAC1D,KAAoD,EACpD,WAGS,EACoB,EAAE;IAC/B,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACvD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAA;IACjD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,CAAA;IAC1C,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAA;IAC5C,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAA;IAE9C,MAAM,MAAM,GAAuB;QACjC,aAAa,EAAE,EAAE;QACjB,aAAa,EAAE,KAAK;QACpB,SAAS,EAAE,KAAK;KACjB,CAAA;IAED,IAAI,IAAI,GAAG,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAA;IAC7C,iDAAiD;IACjD,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QAClB,MAAM,YAAY,GAAG,eAAe,EAAE,CAAA;QACtC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,GAAG,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAA;YAC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AC,IAAI,CAAC,oBAAoB,MAAM,CAAC,aAAa,EAAE,CAAC,CAAA;QACpD,IAAI,CAAC,oBAAoB,MAAM,CAAC,aAAa,GAAG,CAAC,CAAA;QACjD,GAAG,CAAC,OAAO,CAAC,mBAAmB,MAAM,CAAC,aAAa,EAAE,CAAC,CAAA;IACxD,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color constants for terminal output
|
|
3
|
+
*/
|
|
4
|
+
export declare const colors: {
|
|
5
|
+
readonly reset: "\u001B[0m";
|
|
6
|
+
readonly bright: "\u001B[1m";
|
|
7
|
+
readonly green: "\u001B[32m";
|
|
8
|
+
readonly yellow: "\u001B[33m";
|
|
9
|
+
readonly blue: "\u001B[34m";
|
|
10
|
+
readonly cyan: "\u001B[36m";
|
|
11
|
+
readonly red: "\u001B[31m";
|
|
12
|
+
readonly gray: "\u001B[90m";
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,MAAM;;;;;;;;;CAST,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color constants for terminal output
|
|
3
|
+
*/
|
|
4
|
+
export const colors = {
|
|
5
|
+
reset: '\u001B[0m',
|
|
6
|
+
bright: '\u001B[1m',
|
|
7
|
+
green: '\u001B[32m',
|
|
8
|
+
yellow: '\u001B[33m',
|
|
9
|
+
blue: '\u001B[34m',
|
|
10
|
+
cyan: '\u001B[36m',
|
|
11
|
+
red: '\u001B[31m',
|
|
12
|
+
gray: '\u001B[90m',
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,YAAY;IAClB,GAAG,EAAE,YAAY;IACjB,IAAI,EAAE,YAAY;CACV,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commit message formatting and validation helpers
|
|
3
|
+
*/
|
|
4
|
+
declare const COMMIT_TYPES: readonly ["feat", "fix", "docs", "style", "refactor", "test", "chore", "perf", "ci", "build", "revert"];
|
|
5
|
+
export type CommitType = (typeof COMMIT_TYPES)[number];
|
|
6
|
+
export declare const getCommitTypes: () => ({
|
|
7
|
+
label: string;
|
|
8
|
+
value: "feat";
|
|
9
|
+
} | {
|
|
10
|
+
label: string;
|
|
11
|
+
value: "fix";
|
|
12
|
+
} | {
|
|
13
|
+
label: string;
|
|
14
|
+
value: "docs";
|
|
15
|
+
} | {
|
|
16
|
+
label: string;
|
|
17
|
+
value: "style";
|
|
18
|
+
} | {
|
|
19
|
+
label: string;
|
|
20
|
+
value: "refactor";
|
|
21
|
+
} | {
|
|
22
|
+
label: string;
|
|
23
|
+
value: "test";
|
|
24
|
+
} | {
|
|
25
|
+
label: string;
|
|
26
|
+
value: "chore";
|
|
27
|
+
} | {
|
|
28
|
+
label: string;
|
|
29
|
+
value: "perf";
|
|
30
|
+
} | {
|
|
31
|
+
label: string;
|
|
32
|
+
value: "ci";
|
|
33
|
+
} | {
|
|
34
|
+
label: string;
|
|
35
|
+
value: "build";
|
|
36
|
+
} | {
|
|
37
|
+
label: string;
|
|
38
|
+
value: "revert";
|
|
39
|
+
} | {
|
|
40
|
+
label: string;
|
|
41
|
+
value: "cancel";
|
|
42
|
+
})[];
|
|
43
|
+
export declare function normalizeAIOutput(input: string): string;
|
|
44
|
+
export declare function extractCommitTitle(text: string): string | null;
|
|
45
|
+
export declare function extractCommitBody(text: string, title: string): string | null;
|
|
46
|
+
export declare function formatCommitBody(body: string): string;
|
|
47
|
+
export declare function isConventionalLine(line: string): boolean;
|
|
48
|
+
export declare function validateCommitMessage(message: string): {
|
|
49
|
+
valid: boolean;
|
|
50
|
+
error?: string;
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=commit-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/commit-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,QAAA,MAAM,YAAY,yGAYR,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AAEtD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAa1B,CAAA;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAsCvD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAyD9D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAU5E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAuBrD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOxD;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAiBzF"}
|