gitpt 1.6.1 → 1.7.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.
- package/README.md +34 -167
- package/dist/commands/commit/commitFlags.js +7 -0
- package/dist/commands/commit/context/buildPrompt.js +13 -10
- package/dist/commands/commit/context/summaryPrompt.js +5 -2
- package/dist/commands/commit/context/systemPrompt.js +4 -1
- package/dist/commands/commit/context/userPrompt.js +4 -1
- package/dist/commands/commit/generateCommitMessage.js +14 -17
- package/dist/commands/commit/index.js +186 -179
- package/dist/commands/commit/summarizeDiff.js +183 -162
- package/dist/commands/config.js +24 -9
- package/dist/commands/hook/index.js +68 -0
- package/dist/commands/middleware/capabilitiesMiddleware/ghCapability.js +20 -20
- package/dist/commands/middleware/capabilitiesMiddleware/gitCapability.js +13 -10
- package/dist/commands/middleware/capabilitiesMiddleware/index.js +12 -11
- package/dist/commands/middleware/hasStagedChangesMiddleware.js +9 -6
- package/dist/commands/middleware/setupMiddleware/defaultModels.js +14 -10
- package/dist/commands/middleware/setupMiddleware/index.js +65 -71
- package/dist/commands/model.js +7 -4
- package/dist/commands/passthroughArgs.js +11 -0
- package/dist/commands/pr/context/systemPrompt.js +4 -1
- package/dist/commands/pr/context/userPrompt.js +4 -1
- package/dist/commands/pr/generatePRDetails.js +24 -23
- package/dist/commands/pr/getPRContext.js +37 -62
- package/dist/commands/pr/index.js +57 -62
- package/dist/commands/reset.js +23 -23
- package/dist/commands/review/index.js +31 -0
- package/dist/commands/setup.js +38 -13
- package/dist/config.js +63 -60
- package/dist/index.js +30 -67
- package/dist/llm/budget.js +10 -0
- package/dist/llm/index.js +12 -7
- package/dist/llm/providers/anthropic/index.js +30 -30
- package/dist/llm/providers/apiKey.js +36 -35
- package/dist/llm/providers/apple/client.js +73 -83
- package/dist/llm/providers/apple/index.js +64 -72
- package/dist/llm/providers/apple/models.js +27 -19
- package/dist/llm/providers/base.js +36 -36
- package/dist/llm/providers/local/index.js +79 -91
- package/dist/llm/providers/openai/index.js +19 -16
- package/dist/llm/providers/openaiCompatible.js +59 -62
- package/dist/llm/providers/openrouter/index.js +18 -15
- package/dist/llm/registry.js +30 -34
- package/dist/llm/setup/getAvailableModels.js +15 -9
- package/dist/llm/setup/selectModel.js +36 -44
- package/dist/llm/tokenCount.js +4 -3
- package/dist/package.js +67 -0
- package/dist/services/gh/createPullRequest.js +38 -58
- package/dist/services/gh/index.js +6 -3
- package/dist/services/gh/isAvailable.js +10 -8
- package/dist/services/git/executeGitAdd.js +11 -12
- package/dist/services/git/executeGitCommit.js +10 -11
- package/dist/services/git/getAmendChanges.js +23 -0
- package/dist/services/git/getChangedFiles.js +28 -61
- package/dist/services/git/getCommitsSinceBaseBranch.js +28 -56
- package/dist/services/git/getCurrentBranch.js +10 -8
- package/dist/services/git/getDefaultBranch.js +35 -60
- package/dist/services/git/getStagedChanges.js +10 -8
- package/dist/services/git/getStagedFiles.js +10 -9
- package/dist/services/git/hasStagedChanges.js +9 -8
- package/dist/services/git/index.js +17 -12
- package/dist/services/git/isAvailable.js +10 -8
- package/dist/services/git/isGitRepository.js +10 -8
- package/dist/utils/commitlint.js +97 -135
- package/dist/utils/formatBaseURL.js +7 -6
- package/dist/utils/maskApiKey.js +6 -7
- package/package.json +14 -4
- package/dist/commands/commit/context/buildPrompt.d.ts +0 -4
- package/dist/commands/commit/context/summaryPrompt.d.ts +0 -2
- package/dist/commands/commit/context/systemPrompt.d.ts +0 -1
- package/dist/commands/commit/context/userPrompt.d.ts +0 -1
- package/dist/commands/commit/generateCommitMessage.d.ts +0 -1
- package/dist/commands/commit/index.d.ts +0 -7
- package/dist/commands/commit/summarizeDiff.d.ts +0 -1
- package/dist/commands/config.d.ts +0 -1
- package/dist/commands/middleware/capabilitiesMiddleware/ghCapability.d.ts +0 -1
- package/dist/commands/middleware/capabilitiesMiddleware/gitCapability.d.ts +0 -1
- package/dist/commands/middleware/capabilitiesMiddleware/index.d.ts +0 -3
- package/dist/commands/middleware/hasStagedChangesMiddleware.d.ts +0 -1
- package/dist/commands/middleware/setupMiddleware/defaultModels.d.ts +0 -8
- package/dist/commands/middleware/setupMiddleware/index.d.ts +0 -4
- package/dist/commands/model.d.ts +0 -1
- package/dist/commands/pr/context/systemPrompt.d.ts +0 -1
- package/dist/commands/pr/context/userPrompt.d.ts +0 -1
- package/dist/commands/pr/generatePRDetails.d.ts +0 -4
- package/dist/commands/pr/getPRContext.d.ts +0 -1
- package/dist/commands/pr/index.d.ts +0 -10
- package/dist/commands/reset.d.ts +0 -3
- package/dist/commands/setup.d.ts +0 -3
- package/dist/config.d.ts +0 -14
- package/dist/index.d.ts +0 -2
- package/dist/llm/client.d.ts +0 -24
- package/dist/llm/client.js +0 -1
- package/dist/llm/index.d.ts +0 -6
- package/dist/llm/providers/anthropic/index.d.ts +0 -9
- package/dist/llm/providers/apiKey.d.ts +0 -3
- package/dist/llm/providers/apple/client.d.ts +0 -3
- package/dist/llm/providers/apple/index.d.ts +0 -13
- package/dist/llm/providers/apple/models.d.ts +0 -14
- package/dist/llm/providers/base.d.ts +0 -30
- package/dist/llm/providers/local/index.d.ts +0 -11
- package/dist/llm/providers/openai/index.d.ts +0 -10
- package/dist/llm/providers/openaiCompatible.d.ts +0 -15
- package/dist/llm/providers/openrouter/index.d.ts +0 -9
- package/dist/llm/registry.d.ts +0 -8
- package/dist/llm/setup/getAvailableModels.d.ts +0 -5
- package/dist/llm/setup/selectModel.d.ts +0 -5
- package/dist/llm/setup/types.d.ts +0 -13
- package/dist/llm/setup/types.js +0 -1
- package/dist/llm/tokenCount.d.ts +0 -3
- package/dist/services/gh/createPullRequest.d.ts +0 -1
- package/dist/services/gh/index.d.ts +0 -4
- package/dist/services/gh/isAvailable.d.ts +0 -1
- package/dist/services/git/executeGitAdd.d.ts +0 -1
- package/dist/services/git/executeGitCommit.d.ts +0 -1
- package/dist/services/git/getChangedFiles.d.ts +0 -1
- package/dist/services/git/getCommitsSinceBaseBranch.d.ts +0 -1
- package/dist/services/git/getCurrentBranch.d.ts +0 -1
- package/dist/services/git/getDefaultBranch.d.ts +0 -1
- package/dist/services/git/getStagedChanges.d.ts +0 -1
- package/dist/services/git/getStagedFiles.d.ts +0 -1
- package/dist/services/git/hasStagedChanges.d.ts +0 -1
- package/dist/services/git/index.d.ts +0 -13
- package/dist/services/git/isAvailable.d.ts +0 -1
- package/dist/services/git/isGitRepository.d.ts +0 -1
- package/dist/utils/commitlint.d.ts +0 -25
- package/dist/utils/formatBaseURL.d.ts +0 -1
- package/dist/utils/maskApiKey.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gitpt",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "CLI tool that helps you write commit messages & pull request descriptions using AI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -14,11 +14,16 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"typecheck": "tsc --noEmit",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"lint": "oxlint",
|
|
18
|
+
"build": "vite build",
|
|
19
|
+
"test": "vitest run",
|
|
20
|
+
"test:watch": "vitest",
|
|
19
21
|
"test:apple": "npm run build && node tests/apple-foundation-models/run.mjs",
|
|
20
22
|
"bench:apple": "npm run build && node tests/apple-foundation-models/benchmark.mjs",
|
|
23
|
+
"bench:local": "npm run build && node tests/local-model/run.mjs",
|
|
24
|
+
"bench:all": "npm run build && node tests/run-all.mjs",
|
|
21
25
|
"check:prompt": "npm run build && node tests/snapshots/check.mjs",
|
|
26
|
+
"build:demo": "node scripts/build-demo.mjs",
|
|
22
27
|
"prepublishOnly": "npm run build"
|
|
23
28
|
},
|
|
24
29
|
"repository": {
|
|
@@ -41,8 +46,13 @@
|
|
|
41
46
|
"@types/inquirer": "^9.0.7",
|
|
42
47
|
"@types/node": "^22.14.1",
|
|
43
48
|
"@types/node-fetch": "^2.6.12",
|
|
49
|
+
"ffmpeg-static": "^5.3.0",
|
|
50
|
+
"oxlint": "^1.71.0",
|
|
51
|
+
"pngjs": "^7.0.0",
|
|
44
52
|
"tsc-alias": "^1.8.16",
|
|
45
|
-
"typescript": "^5.8.3"
|
|
53
|
+
"typescript": "^5.8.3",
|
|
54
|
+
"vite": "^8.1.0",
|
|
55
|
+
"vitest": "^4.1.9"
|
|
46
56
|
},
|
|
47
57
|
"dependencies": {
|
|
48
58
|
"@commitlint/cli": "^19.8.1",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const summarySystemPrompt = "\nYou are condensing a fragment of a git diff so a commit message can be written afterwards.\n\nOutput exactly one line per changed file, in this format:\n<path>: <what changed>\n\nRules:\n- One line per file \u2014 no more, no less.\n- Keep each description under ~12 words.\n- Describe the functional change (what was added, removed, refactored, or fixed), not file mechanics.\n- Output ONLY these lines. No preamble, no commentary, no code fences, no headings, no blank lines.\n";
|
|
2
|
-
export declare const summaryUserPrompt: (diffChunk: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const systemPrompt = "\nYou are a helpful assistant that generates concise, informative Git commit messages.\n\nFollow these strict rules:\n1. Use conventional commit format: type: description\n2. Types are: feat, fix, docs, style, refactor, test, chore\n3. NO scopes in parentheses - do not use feat(scope)\n4. Keep the entire message under 100 characters\n5. Use present tense (e.g., \"add feature\" not \"added feature\")\n6. Be brief but descriptive about WHAT changed\n7. Do not include detailed explanations\n\nCritical Rules:\n- Return a SINGLE LINE commit message only, with no additional explanations or paragraphs\n- Do NOT include a detailed message body section, just the commit title line\n- Do NOT use multiple lines, even for a single message\n\nExamples of Good Commit Messages:\n- feat: add user authentication system\n- fix: resolve crash when opening settings menu\n- refactor: simplify data processing pipeline\n- docs: update installation instructions in README\n- chore: update npm dependencies to latest versions\n- style: fix indentation in CSS files\n- test: add unit tests for payment processing\n- perf: optimize database queries for faster loading\n- build: update webpack configuration\n- ci: fix GitHub Actions workflow\n\nExamples of Bad Commit Messages:\n- added login screen \u274C (missing type prefix)\n- feat(auth): implement OAuth login \u274C (using scope parentheses)\n- This is a really long commit message that exceeds the limit and contains too much information \u274C (too long)\n- feat: Adding user auth\n \n This implements the login page... \u274C (contains multiple lines)\n- \"fix: update styling\" \u274C (includes quotes)\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const userPrompt: (diff: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const generateCommitMessage: (diff: string, validationErrors?: string) => Promise<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const prepareCommitContext: (diff: string) => Promise<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const configCommand: () => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ghCapability: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const gitCapability: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const hasStagedChangesMiddleware: () => void;
|
package/dist/commands/model.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const modelCommand: () => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const systemPrompt = "\nYou are a helpful assistant that generates clear, informative GitHub pull request titles and descriptions.\n\nFor the title:\n- Keep it concise (under 80 characters)\n- Start with a verb in present tense (e.g., \"Add\", \"Fix\", \"Update\")\n- Clearly summarize the main purpose of the changes\n\nFor the description:\n- Start with a brief summary (1-2 sentences) of what the PR accomplishes\n- Include a more detailed explanation of changes if needed\n- List key changes as bullet points if there are multiple components\n- Include any relevant context that reviewers should know\n- End with any testing instructions if applicable\n\nFormat the description in Markdown with sections.\nDo not include \"PR\" or \"Pull Request\" in the title.\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const userPrompt: (context: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getPRContext: () => string[];
|
package/dist/commands/reset.d.ts
DELETED
package/dist/commands/setup.d.ts
DELETED
package/dist/config.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface GitPTConfig {
|
|
2
|
-
provider?: "openrouter" | "local" | "apple" | "openai" | "anthropic";
|
|
3
|
-
customLLMEndpoint?: string;
|
|
4
|
-
model?: string;
|
|
5
|
-
apiKey?: string;
|
|
6
|
-
apiKeys?: Record<string, string>;
|
|
7
|
-
contextWindow?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare const getConfig: () => GitPTConfig;
|
|
10
|
-
export declare const saveConfig: (newConfig: GitPTConfig) => void;
|
|
11
|
-
export declare const clearConfig: () => void;
|
|
12
|
-
export declare const getAcceptedDefault: () => string | undefined;
|
|
13
|
-
export declare const setAcceptedDefault: (id: string) => void;
|
|
14
|
-
export declare const clearAcceptedDefault: () => void;
|
package/dist/index.d.ts
DELETED
package/dist/llm/client.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type OpenAI from "openai";
|
|
2
|
-
export type ChatCompletionCreateParams = OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming;
|
|
3
|
-
export interface LLMChatCompletion {
|
|
4
|
-
choices: Array<{
|
|
5
|
-
message: {
|
|
6
|
-
content: string | null;
|
|
7
|
-
};
|
|
8
|
-
}>;
|
|
9
|
-
}
|
|
10
|
-
export interface LLMModelsPage {
|
|
11
|
-
data: OpenAI.Models.Model[];
|
|
12
|
-
hasNextPage(): boolean;
|
|
13
|
-
getNextPage(): Promise<LLMModelsPage>;
|
|
14
|
-
}
|
|
15
|
-
export interface LLMClient {
|
|
16
|
-
chat: {
|
|
17
|
-
completions: {
|
|
18
|
-
create(body: ChatCompletionCreateParams): Promise<LLMChatCompletion>;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
models: {
|
|
22
|
-
list(): Promise<LLMModelsPage>;
|
|
23
|
-
};
|
|
24
|
-
}
|
package/dist/llm/client.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/llm/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GitPTConfig } from "../../../config.js";
|
|
2
|
-
import { OpenAICompatibleProvider } from "../openaiCompatible.js";
|
|
3
|
-
export declare class AnthropicProvider extends OpenAICompatibleProvider {
|
|
4
|
-
static readonly id = "anthropic";
|
|
5
|
-
static readonly label = "Anthropic";
|
|
6
|
-
static readonly baseURL = "https://api.anthropic.com/v1";
|
|
7
|
-
static setup(existingConfig: GitPTConfig): Promise<GitPTConfig>;
|
|
8
|
-
protected baseURL(): string;
|
|
9
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { GitPTConfig } from "../../../config.js";
|
|
2
|
-
import type { LLMClient } from "../../client.js";
|
|
3
|
-
import { Provider } from "../base.js";
|
|
4
|
-
export declare class AppleProvider extends Provider {
|
|
5
|
-
static readonly id = "apple";
|
|
6
|
-
static readonly label = "Apple Foundation Models (macOS 27+)";
|
|
7
|
-
static isAvailable(): boolean;
|
|
8
|
-
static setup(existingConfig: GitPTConfig): Promise<GitPTConfig>;
|
|
9
|
-
constructor(model: string);
|
|
10
|
-
getContextWindow(): Promise<number>;
|
|
11
|
-
countTokens(text: string): number;
|
|
12
|
-
protected getClient(): LLMClient;
|
|
13
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const CANDIDATE_MODELS: ({
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
context_length: number;
|
|
5
|
-
} | {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
context_length?: undefined;
|
|
9
|
-
})[];
|
|
10
|
-
export declare const probeModel: (modelId: string) => {
|
|
11
|
-
available: boolean;
|
|
12
|
-
reason?: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const isAppleModelAvailable: (modelId: string) => boolean;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { GitPTConfig } from "../../config.js";
|
|
2
|
-
import type { LLMClient } from "../client.js";
|
|
3
|
-
export interface CompletionRequest {
|
|
4
|
-
system: string;
|
|
5
|
-
user: string;
|
|
6
|
-
maxTokens: number;
|
|
7
|
-
}
|
|
8
|
-
export declare abstract class Provider {
|
|
9
|
-
readonly model: string;
|
|
10
|
-
static readonly requiresApiKey: boolean;
|
|
11
|
-
static readonly requiresEndpoint: boolean;
|
|
12
|
-
static isAvailable(): boolean;
|
|
13
|
-
readonly maxOutputTokens: number;
|
|
14
|
-
protected readonly usesCompletionTokensParam: boolean;
|
|
15
|
-
constructor(model: string);
|
|
16
|
-
getContextWindow(): Promise<number>;
|
|
17
|
-
countTokens(text: string): number;
|
|
18
|
-
protected abstract getClient(): LLMClient;
|
|
19
|
-
complete(req: CompletionRequest): Promise<string>;
|
|
20
|
-
}
|
|
21
|
-
export type ProviderClass = {
|
|
22
|
-
new (model: string): Provider;
|
|
23
|
-
readonly id: string;
|
|
24
|
-
readonly label: string;
|
|
25
|
-
readonly requiresApiKey: boolean;
|
|
26
|
-
readonly requiresEndpoint: boolean;
|
|
27
|
-
readonly baseURL?: string;
|
|
28
|
-
isAvailable(): boolean;
|
|
29
|
-
setup(existingConfig: GitPTConfig): Promise<GitPTConfig>;
|
|
30
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { GitPTConfig } from "../../../config.js";
|
|
2
|
-
import { OpenAICompatibleProvider } from "../openaiCompatible.js";
|
|
3
|
-
export declare class LocalProvider extends OpenAICompatibleProvider {
|
|
4
|
-
static readonly id = "local";
|
|
5
|
-
static readonly label = "Local LLM";
|
|
6
|
-
static readonly requiresApiKey = false;
|
|
7
|
-
static readonly requiresEndpoint = true;
|
|
8
|
-
static setup(existingConfig: GitPTConfig): Promise<GitPTConfig>;
|
|
9
|
-
getContextWindow(): Promise<number>;
|
|
10
|
-
protected baseURL(): string;
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { GitPTConfig } from "../../../config.js";
|
|
2
|
-
import { OpenAICompatibleProvider } from "../openaiCompatible.js";
|
|
3
|
-
export declare class OpenAIProvider extends OpenAICompatibleProvider {
|
|
4
|
-
static readonly id = "openai";
|
|
5
|
-
static readonly label = "OpenAI";
|
|
6
|
-
static readonly baseURL = "https://api.openai.com/v1";
|
|
7
|
-
protected readonly usesCompletionTokensParam = true;
|
|
8
|
-
static setup(existingConfig: GitPTConfig): Promise<GitPTConfig>;
|
|
9
|
-
protected baseURL(): string;
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { GitPTConfig } from "../../config.js";
|
|
2
|
-
import type { LLMClient } from "../client.js";
|
|
3
|
-
import { Model } from "../setup/types.js";
|
|
4
|
-
import { Provider } from "./base.js";
|
|
5
|
-
export declare abstract class OpenAICompatibleProvider extends Provider {
|
|
6
|
-
static readonly requiresApiKey: boolean;
|
|
7
|
-
readonly maxOutputTokens = 2048;
|
|
8
|
-
protected abstract baseURL(): string;
|
|
9
|
-
protected getClient(): LLMClient;
|
|
10
|
-
}
|
|
11
|
-
export declare const setupApiKeyProvider: (existingConfig: GitPTConfig, opts: {
|
|
12
|
-
baseURL: string;
|
|
13
|
-
label: string;
|
|
14
|
-
listModels?: (apiKey: string) => Promise<Model[]>;
|
|
15
|
-
}) => Promise<GitPTConfig>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GitPTConfig } from "../../../config.js";
|
|
2
|
-
import { OpenAICompatibleProvider } from "../openaiCompatible.js";
|
|
3
|
-
export declare class OpenRouterProvider extends OpenAICompatibleProvider {
|
|
4
|
-
static readonly id = "openrouter";
|
|
5
|
-
static readonly label = "OpenRouter (remote)";
|
|
6
|
-
static readonly baseURL = "https://openrouter.ai/api/v1";
|
|
7
|
-
static setup(existingConfig: GitPTConfig): Promise<GitPTConfig>;
|
|
8
|
-
protected baseURL(): string;
|
|
9
|
-
}
|
package/dist/llm/registry.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Provider, ProviderClass } from "./providers/base.js";
|
|
2
|
-
export declare const PROVIDERS: ProviderClass[];
|
|
3
|
-
export declare const getProviderClass: (id: string | undefined) => ProviderClass | undefined;
|
|
4
|
-
export declare const getProvider: () => Provider;
|
|
5
|
-
export declare const validateConfig: () => {
|
|
6
|
-
isValid: boolean;
|
|
7
|
-
errors: string[];
|
|
8
|
-
};
|
package/dist/llm/setup/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/llm/tokenCount.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createPullRequest: (title: string, body: string, baseBranch: string, draft: boolean) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isAvailable: () => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const executeGitAdd: (files: string[]) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const executeGitCommit: (message: string, additionalArgs?: string[]) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getChangedFiles: (baseBranch: string) => string[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getCommitsSinceBaseBranch: (baseBranch: string) => string[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getCurrentBranch: () => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getDefaultBranch: () => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getStagedChanges: () => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getStagedFiles: () => string[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const hasStagedChanges: () => boolean;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const git: {
|
|
2
|
-
add: (files: string[]) => void;
|
|
3
|
-
commit: (message: string, additionalArgs?: string[]) => void;
|
|
4
|
-
getChangedFiles: (baseBranch: string) => string[];
|
|
5
|
-
getCommitsSinceBaseBranch: (baseBranch: string) => string[];
|
|
6
|
-
getCurrentBranch: () => string;
|
|
7
|
-
getDefaultBranch: () => string;
|
|
8
|
-
hasStagedChanges: () => boolean;
|
|
9
|
-
getStagedChanges: () => string;
|
|
10
|
-
getStagedFiles: () => string[];
|
|
11
|
-
isAvailable: () => boolean;
|
|
12
|
-
isGitRepository: () => boolean;
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isAvailable: () => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isGitRepository: () => boolean;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface CommitlintConfig {
|
|
2
|
-
rules?: Record<string, any>;
|
|
3
|
-
extends?: string | string[];
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Check if a commitlint configuration exists in the repository
|
|
7
|
-
*/
|
|
8
|
-
export declare function hasCommitlintConfig(): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Read commitlint config file (using @commitlint/load) and print it out
|
|
11
|
-
*/
|
|
12
|
-
export declare function readCommitlintConfig(): Promise<any>;
|
|
13
|
-
/**
|
|
14
|
-
* Get the commitlint configuration format rules as a string
|
|
15
|
-
*/
|
|
16
|
-
export declare function getCommitlintRules(): string;
|
|
17
|
-
/**
|
|
18
|
-
* Validate a commit message against commitlint rules
|
|
19
|
-
* @param message The commit message to validate
|
|
20
|
-
* @returns An object with success status and error message if applicable
|
|
21
|
-
*/
|
|
22
|
-
export declare function validateCommitMessage(message: string): Promise<{
|
|
23
|
-
valid: boolean;
|
|
24
|
-
errors?: string;
|
|
25
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const formatBaseURL: (baseURL: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const maskApiKey: (apiKey: string) => string;
|