@klarkxy/dsh-git-commit 0.3.0 → 0.3.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 +11 -8
- package/docs/README.zh-CN.md +10 -7
- package/lib/client.inner.cjs +819 -112
- package/lib/client.inner.cjs.map +1 -1
- package/lib/client.js +819 -112
- package/lib/contracts.d.ts +1801 -5
- package/lib/contracts.js +2 -35
- package/lib/contracts2.d.ts +2 -0
- package/lib/contracts2.js +85 -0
- package/lib/contracts2.js.map +1 -0
- package/lib/index.d.ts +10 -3
- package/lib/index.js +3935 -22
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
- package/lib/contracts.js.map +0 -1
package/lib/contracts.js
CHANGED
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const PLUGIN_NAME = "@klarkxy/dsh-git-commit";
|
|
4
|
-
const FEATURE_ID = "git-commit";
|
|
5
|
-
const PURPOSE_ID = "git-commit.plan";
|
|
6
|
-
const RPC_CHANNEL = "/dsh-git-commit";
|
|
7
|
-
const GIT_COMMIT_CLIENT_SERVICE = "dshGitCommitClient";
|
|
8
|
-
const PROMPT_VERSION = "git-commit.v1";
|
|
9
|
-
const SCHEMA_VERSION = "commit-plan-json.v1";
|
|
10
|
-
const CONTRACT_VERSION = 1;
|
|
11
|
-
const DEFAULT_MAX_OUTPUT_TOKENS = 2048;
|
|
12
|
-
/** Total character budget for the change manifest sent to the model. */
|
|
13
|
-
const MAX_MANIFEST_CHARS = 48e3;
|
|
14
|
-
/** Per-file preview cap for untracked files. */
|
|
15
|
-
const MAX_UNTRACKED_PREVIEW_CHARS = 2e3;
|
|
16
|
-
/** Recent commit subjects supplied as style reference. */
|
|
17
|
-
const RECENT_LOG_COUNT = 10;
|
|
18
|
-
/** Hard cap for one generated commit message line. */
|
|
19
|
-
const MAX_MESSAGE_CHARS = 120;
|
|
20
|
-
/** git subprocess timeout. */
|
|
21
|
-
const GIT_TIMEOUT_MS = 3e4;
|
|
22
|
-
const SETTINGS_KEY = "current";
|
|
23
|
-
const defaultSettings = () => ({
|
|
24
|
-
revision: 0,
|
|
25
|
-
model: defaultModelRoute(),
|
|
26
|
-
allowFallback: false
|
|
27
|
-
});
|
|
28
|
-
/** Untrusted stored flags stay opt-in: anything but a literal true is false. */
|
|
29
|
-
function normalizeFallback(value) {
|
|
30
|
-
return value === true;
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
export { CONTRACT_VERSION, DEFAULT_MAX_OUTPUT_TOKENS, FEATURE_ID, GIT_COMMIT_CLIENT_SERVICE, GIT_TIMEOUT_MS, MAX_MANIFEST_CHARS, MAX_MESSAGE_CHARS, MAX_UNTRACKED_PREVIEW_CHARS, PLUGIN_NAME, PROMPT_VERSION, PURPOSE_ID, RECENT_LOG_COUNT, RPC_CHANNEL, SCHEMA_VERSION, SETTINGS_KEY, defaultModelRoute, defaultSettings, normalizeFallback, normalizeModelRoute };
|
|
34
|
-
|
|
35
|
-
//# sourceMappingURL=contracts.js.map
|
|
1
|
+
import { _ as defaultSettings, a as GIT_COMMIT_CLIENT_SERVICE, c as MAX_MESSAGE_CHARS, d as PROMPT_VERSION, f as PURPOSE_ID, g as SETTINGS_KEY, h as SCHEMA_VERSION, i as FEATURE_ID, l as MAX_UNTRACKED_PREVIEW_CHARS, m as RPC_CHANNEL, n as CONTRACT_VERSION, o as GIT_TIMEOUT_MS, p as RECENT_LOG_COUNT, r as DEFAULT_MAX_OUTPUT_TOKENS, s as MAX_MANIFEST_CHARS, t as COMMIT_PLAN_FEATURE, u as PLUGIN_NAME, v as normalizeFallback, x as normalizeModelRoute, y as defaultModelRoute } from "./contracts2.js";
|
|
2
|
+
export { COMMIT_PLAN_FEATURE, CONTRACT_VERSION, DEFAULT_MAX_OUTPUT_TOKENS, FEATURE_ID, GIT_COMMIT_CLIENT_SERVICE, GIT_TIMEOUT_MS, MAX_MANIFEST_CHARS, MAX_MESSAGE_CHARS, MAX_UNTRACKED_PREVIEW_CHARS, PLUGIN_NAME, PROMPT_VERSION, PURPOSE_ID, RECENT_LOG_COUNT, RPC_CHANNEL, SCHEMA_VERSION, SETTINGS_KEY, defaultModelRoute, defaultSettings, normalizeFallback, normalizeModelRoute };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as SCHEMA_VERSION, E as normalizeFallback, O as defaultModelRoute, S as RpcResult, T as defaultSettings, _ as PROMPT_VERSION, a as CommitModelRoute, b as RECENT_LOG_COUNT, c as FEATURE_ID, d as GitCommitSettings, f as GitCommitStatus, g as PLUGIN_NAME, h as MAX_UNTRACKED_PREVIEW_CHARS, i as CommitModelInfo, k as normalizeModelRoute, l as GIT_COMMIT_CLIENT_SERVICE, m as MAX_MESSAGE_CHARS, n as CONTRACT_VERSION, o as CommitRunResult, p as MAX_MANIFEST_CHARS, r as CommitGroupResult, s as DEFAULT_MAX_OUTPUT_TOKENS, t as COMMIT_PLAN_FEATURE, u as GIT_TIMEOUT_MS, v as PURPOSE_ID, w as SETTINGS_KEY, x as RPC_CHANNEL, y as PartialCommitResult } from "./contracts.js";
|
|
2
|
+
export { COMMIT_PLAN_FEATURE, CONTRACT_VERSION, CommitGroupResult, CommitModelInfo, CommitModelRoute, CommitRunResult, DEFAULT_MAX_OUTPUT_TOKENS, FEATURE_ID, GIT_COMMIT_CLIENT_SERVICE, GIT_TIMEOUT_MS, GitCommitSettings, GitCommitStatus, MAX_MANIFEST_CHARS, MAX_MESSAGE_CHARS, MAX_UNTRACKED_PREVIEW_CHARS, PLUGIN_NAME, PROMPT_VERSION, PURPOSE_ID, PartialCommitResult, RECENT_LOG_COUNT, RPC_CHANNEL, RpcResult, SCHEMA_VERSION, SETTINGS_KEY, defaultModelRoute, defaultSettings, normalizeFallback, normalizeModelRoute };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
//#region ../dsh-model-route/src/route.ts
|
|
2
|
+
/** Empty route: no explicit model, the feature follows the host default. */
|
|
3
|
+
function defaultModelRoute() {
|
|
4
|
+
return {
|
|
5
|
+
provider: "",
|
|
6
|
+
model: ""
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
const MAX_ID_CHARS = 250;
|
|
10
|
+
const MAX_EFFORT_CHARS = 80;
|
|
11
|
+
function asText(value) {
|
|
12
|
+
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Coerce a stored value into a ModelRoute. Anything malformed collapses to the
|
|
16
|
+
* empty route, matching the per-plugin normalizers this contract replaces.
|
|
17
|
+
*/
|
|
18
|
+
function normalizeModelRoute(value) {
|
|
19
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return defaultModelRoute();
|
|
20
|
+
const row = value;
|
|
21
|
+
const provider = asText(row.provider) ?? "";
|
|
22
|
+
const model = asText(row.model) ?? "";
|
|
23
|
+
const effort = asText(row.reasoningEffort);
|
|
24
|
+
if (!provider || !model || provider.length > MAX_ID_CHARS || model.length > MAX_ID_CHARS) return defaultModelRoute();
|
|
25
|
+
return effort && effort.length <= MAX_EFFORT_CHARS ? {
|
|
26
|
+
provider,
|
|
27
|
+
model,
|
|
28
|
+
reasoningEffort: effort
|
|
29
|
+
} : {
|
|
30
|
+
provider,
|
|
31
|
+
model
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** The override to actually call with: undefined when the route is empty. */
|
|
35
|
+
function modelRouteOverride(route) {
|
|
36
|
+
const provider = route?.provider?.trim();
|
|
37
|
+
const model = route?.model?.trim();
|
|
38
|
+
if (!provider || !model) return void 0;
|
|
39
|
+
const effort = route?.reasoningEffort?.trim();
|
|
40
|
+
return effort ? {
|
|
41
|
+
provider,
|
|
42
|
+
model,
|
|
43
|
+
reasoningEffort: effort
|
|
44
|
+
} : {
|
|
45
|
+
provider,
|
|
46
|
+
model
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/contracts.ts
|
|
51
|
+
const PLUGIN_NAME = "@klarkxy/dsh-git-commit";
|
|
52
|
+
const FEATURE_ID = "git-commit";
|
|
53
|
+
const PURPOSE_ID = "git-commit.plan";
|
|
54
|
+
const RPC_CHANNEL = "/dsh-git-commit";
|
|
55
|
+
const GIT_COMMIT_CLIENT_SERVICE = "dshGitCommitClient";
|
|
56
|
+
const PROMPT_VERSION = "git-commit.v1";
|
|
57
|
+
/** Feature id stamped on the auxiliary-context envelope for this call. */
|
|
58
|
+
const COMMIT_PLAN_FEATURE = "git-commit-plan";
|
|
59
|
+
const SCHEMA_VERSION = "commit-plan-json.v1";
|
|
60
|
+
const CONTRACT_VERSION = 1;
|
|
61
|
+
const DEFAULT_MAX_OUTPUT_TOKENS = 2048;
|
|
62
|
+
/** Total character budget for the change manifest sent to the model. */
|
|
63
|
+
const MAX_MANIFEST_CHARS = 48e3;
|
|
64
|
+
/** Per-file preview cap for untracked files. */
|
|
65
|
+
const MAX_UNTRACKED_PREVIEW_CHARS = 2e3;
|
|
66
|
+
/** Recent commit subjects supplied as style reference. */
|
|
67
|
+
const RECENT_LOG_COUNT = 10;
|
|
68
|
+
/** Hard cap for one generated commit message line. */
|
|
69
|
+
const MAX_MESSAGE_CHARS = 120;
|
|
70
|
+
/** git subprocess timeout. */
|
|
71
|
+
const GIT_TIMEOUT_MS = 3e4;
|
|
72
|
+
const SETTINGS_KEY = "current";
|
|
73
|
+
const defaultSettings = () => ({
|
|
74
|
+
revision: 0,
|
|
75
|
+
model: defaultModelRoute(),
|
|
76
|
+
allowFallback: false
|
|
77
|
+
});
|
|
78
|
+
/** Untrusted stored flags stay opt-in: anything but a literal true is false. */
|
|
79
|
+
function normalizeFallback(value) {
|
|
80
|
+
return value === true;
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
export { defaultSettings as _, GIT_COMMIT_CLIENT_SERVICE as a, modelRouteOverride as b, MAX_MESSAGE_CHARS as c, PROMPT_VERSION as d, PURPOSE_ID as f, SETTINGS_KEY as g, SCHEMA_VERSION as h, FEATURE_ID as i, MAX_UNTRACKED_PREVIEW_CHARS as l, RPC_CHANNEL as m, CONTRACT_VERSION as n, GIT_TIMEOUT_MS as o, RECENT_LOG_COUNT as p, DEFAULT_MAX_OUTPUT_TOKENS as r, MAX_MANIFEST_CHARS as s, COMMIT_PLAN_FEATURE as t, PLUGIN_NAME as u, normalizeFallback as v, normalizeModelRoute as x, defaultModelRoute as y };
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=contracts2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts2.js","names":[],"sources":["../../dsh-model-route/src/route.ts","../src/contracts.ts"],"sourcesContent":["/**\n * Shared model-route value contract.\n *\n * A feature plugin stores its model override as a ModelRoute on its own\n * settings page. Empty provider/model means \"follow the host default model\".\n * Pure and browser-safe: no cordis, no React, no schema library.\n */\n\n/** A concrete provider model a feature call should use. */\nexport interface ModelRoute {\n provider: string\n model: string\n reasoningEffort?: string\n}\n\n/** Empty route: no explicit model, the feature follows the host default. */\nexport function defaultModelRoute(): ModelRoute {\n return { provider: '', model: '' }\n}\n\n/** Structural check: both id fields are strings (either may be empty). */\nexport function isModelRouteValue(value: unknown): value is ModelRoute {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return false\n const row = value as Record<string, unknown>\n return typeof row.provider === 'string' && typeof row.model === 'string'\n}\n\nconst MAX_ID_CHARS = 250\nconst MAX_EFFORT_CHARS = 80\n\nfunction asText(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() ? value.trim() : undefined\n}\n\n/**\n * Coerce a stored value into a ModelRoute. Anything malformed collapses to the\n * empty route, matching the per-plugin normalizers this contract replaces.\n */\nexport function normalizeModelRoute(value: unknown): ModelRoute {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return defaultModelRoute()\n const row = value as Record<string, unknown>\n const provider = asText(row.provider) ?? ''\n const model = asText(row.model) ?? ''\n const effort = asText(row.reasoningEffort)\n if (!provider || !model || provider.length > MAX_ID_CHARS || model.length > MAX_ID_CHARS) return defaultModelRoute()\n return effort && effort.length <= MAX_EFFORT_CHARS ? { provider, model, reasoningEffort: effort } : { provider, model }\n}\n\n/** The override to actually call with: undefined when the route is empty. */\nexport function modelRouteOverride(route: ModelRoute | undefined): ModelRoute | undefined {\n const provider = route?.provider?.trim()\n const model = route?.model?.trim()\n if (!provider || !model) return undefined\n const effort = route?.reasoningEffort?.trim()\n return effort ? { provider, model, reasoningEffort: effort } : { provider, model }\n}\n\nconst KEY_SEPARATOR = '\\u001f'\n\n/** Stable key for one route, safe to use as a select-option value. */\nexport function modelRouteKey(provider: string, model: string): string {\n return provider && model ? `${provider}${KEY_SEPARATOR}${model}` : ''\n}\n\n/** Inverse of modelRouteKey; undefined for malformed keys. */\nexport function parseModelRouteKey(value: string): { provider: string; model: string } | undefined {\n const index = value.indexOf(KEY_SEPARATOR)\n if (index <= 0) return undefined\n const provider = value.slice(0, index)\n const model = value.slice(index + KEY_SEPARATOR.length)\n if (!provider || !model) return undefined\n return { provider, model }\n}\n\n/** True when both routes name the same target; two empty routes are equal. */\nexport function sameModelRoute(a: ModelRoute | undefined, b: ModelRoute | undefined): boolean {\n const left = modelRouteOverride(a)\n const right = modelRouteOverride(b)\n if (!left || !right) return !left === !right\n return left.provider === right.provider && left.model === right.model\n && (left.reasoningEffort ?? '') === (right.reasoningEffort ?? '')\n}\n","import { defaultModelRoute, normalizeModelRoute, type ModelRoute } from '@klarkxy/dsh-model-route'\nexport { defaultModelRoute, normalizeModelRoute }\n\n/** Browser-safe contracts. Shared RPC/result types stay on @klarkxy/dsh-plugin-kit. */\nimport type { RpcResult as SharedRpcResult } from '@klarkxy/dsh-plugin-kit/contracts'\nexport type RpcResult<T = unknown> = Extract<SharedRpcResult<T>, { ok: true }> | {\n ok: false\n error: { code: string; message: string; partial?: PartialCommitResult }\n}\n\nexport const PLUGIN_NAME = '@klarkxy/dsh-git-commit'\nexport const FEATURE_ID = 'git-commit'\nexport const PURPOSE_ID = 'git-commit.plan'\nexport const RPC_CHANNEL = '/dsh-git-commit'\nexport const GIT_COMMIT_CLIENT_SERVICE = 'dshGitCommitClient'\nexport const PROMPT_VERSION = 'git-commit.v1'\n/** Feature id stamped on the auxiliary-context envelope for this call. */\nexport const COMMIT_PLAN_FEATURE = 'git-commit-plan'\nexport const SCHEMA_VERSION = 'commit-plan-json.v1'\nexport const CONTRACT_VERSION = 1\n\nexport const DEFAULT_MAX_OUTPUT_TOKENS = 2048\n/** Total character budget for the change manifest sent to the model. */\nexport const MAX_MANIFEST_CHARS = 48_000\n/** Per-file preview cap for untracked files. */\nexport const MAX_UNTRACKED_PREVIEW_CHARS = 2_000\n/** Recent commit subjects supplied as style reference. */\nexport const RECENT_LOG_COUNT = 10\n/** Hard cap for one generated commit message line. */\nexport const MAX_MESSAGE_CHARS = 120\n/** git subprocess timeout. */\nexport const GIT_TIMEOUT_MS = 30_000\nexport const SETTINGS_KEY = 'current'\n\n/**\n * Plugin-page model selection. Empty provider/model means \"follow the default\".\n * The value shape, empty default, and 250/80 normalizer live in\n * @klarkxy/dsh-model-route; this alias keeps the commit-specific name.\n */\nexport type CommitModelRoute = ModelRoute\n\nexport interface GitCommitSettings {\n readonly revision: number\n readonly model: CommitModelRoute\n /**\n * Opt-in single commit when the model produced no usable plan. Off by\n * default: an unplanned commit is one the user never reviewed, so a failed\n * or unusable model call rejects the run instead of writing to the index.\n */\n readonly allowFallback: boolean\n}\n\nexport const defaultSettings = (): GitCommitSettings => ({\n revision: 0, model: defaultModelRoute(), allowFallback: false,\n})\n\n/** Untrusted stored flags stay opt-in: anything but a literal true is false. */\nexport function normalizeFallback(value: unknown): boolean {\n return value === true\n}\n\nexport interface CommitModelInfo {\n readonly provider: string\n readonly model: string\n /** 'page' is the plugin-page selection; 'aux' the shared default auxiliary model; 'default' follows the session or host chat model. */\n readonly source: 'page' | 'aux' | 'default'\n}\n\nexport interface GitCommitStatus {\n readonly available: boolean\n /** Machine-readable reason when unavailable: 'no-session' | 'no-cwd' | 'not-a-repo' | 'no-git'. */\n readonly reason?: string\n readonly detail?: string\n readonly root?: string\n readonly branch?: string\n readonly workspace: { readonly files: number }\n readonly model?: CommitModelInfo\n}\n\nexport interface CommitGroupResult {\n /** Empty only when a created commit's hash could not be read. */\n readonly hash: string\n readonly message: string\n readonly files: readonly string[]\n}\n\nexport interface CommitRunResult {\n readonly branch: string\n readonly commits: readonly CommitGroupResult[]\n /** True when the model plan was unavailable and a single fallback commit was used. */\n readonly fallback: boolean\n readonly model?: CommitModelInfo\n}\n\n/**\n * Commits that already exist when a later group fails or the run is cancelled.\n * `commits` is the durable outcome; `failure` is why the rest did not run.\n * A recorded commit is never rolled back and never retried by this plugin.\n */\nexport interface PartialCommitResult {\n readonly branch: string\n readonly commits: readonly CommitGroupResult[]\n readonly fallback: boolean\n readonly model?: CommitModelInfo\n readonly failure: { readonly code: string; readonly message: string }\n readonly remaining: readonly { readonly message: string; readonly files: readonly string[] }[]\n /** After a rejected commit command, unchanged HEAD could not be proved; completion and ownership are unconfirmed. */\n readonly uncertain?: readonly { readonly message: string; readonly files: readonly string[] }[]\n}\n"],"mappings":";;AAgBA,SAAgB,oBAAgC;CAC9C,OAAO;EAAE,UAAU;EAAI,OAAO;CAAG;AACnC;AASA,MAAM,eAAe;AACrB,MAAM,mBAAmB;AAEzB,SAAS,OAAO,OAAoC;CAClD,OAAO,OAAO,UAAU,YAAY,MAAM,KAAK,IAAI,MAAM,KAAK,IAAI,KAAA;AACpE;;;;;AAMA,SAAgB,oBAAoB,OAA4B;CAC9D,IAAI,CAAC,SAAS,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GAAG,OAAO,kBAAkB;CAC1F,MAAM,MAAM;CACZ,MAAM,WAAW,OAAO,IAAI,QAAQ,KAAK;CACzC,MAAM,QAAQ,OAAO,IAAI,KAAK,KAAK;CACnC,MAAM,SAAS,OAAO,IAAI,eAAe;CACzC,IAAI,CAAC,YAAY,CAAC,SAAS,SAAS,SAAS,gBAAgB,MAAM,SAAS,cAAc,OAAO,kBAAkB;CACnH,OAAO,UAAU,OAAO,UAAU,mBAAmB;EAAE;EAAU;EAAO,iBAAiB;CAAO,IAAI;EAAE;EAAU;CAAM;AACxH;;AAGA,SAAgB,mBAAmB,OAAuD;CACxF,MAAM,WAAW,OAAO,UAAU,KAAK;CACvC,MAAM,QAAQ,OAAO,OAAO,KAAK;CACjC,IAAI,CAAC,YAAY,CAAC,OAAO,OAAO,KAAA;CAChC,MAAM,SAAS,OAAO,iBAAiB,KAAK;CAC5C,OAAO,SAAS;EAAE;EAAU;EAAO,iBAAiB;CAAO,IAAI;EAAE;EAAU;CAAM;AACnF;;;AC7CA,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,4BAA4B;AACzC,MAAa,iBAAiB;;AAE9B,MAAa,sBAAsB;AACnC,MAAa,iBAAiB;AAC9B,MAAa,mBAAmB;AAEhC,MAAa,4BAA4B;;AAEzC,MAAa,qBAAqB;;AAElC,MAAa,8BAA8B;;AAE3C,MAAa,mBAAmB;;AAEhC,MAAa,oBAAoB;;AAEjC,MAAa,iBAAiB;AAC9B,MAAa,eAAe;AAoB5B,MAAa,yBAA4C;CACvD,UAAU;CAAG,OAAO,kBAAkB;CAAG,eAAe;AAC1D;;AAGA,SAAgB,kBAAkB,OAAyB;CACzD,OAAO,UAAU;AACnB"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LlmTextCaller } from "@klarkxy/dsh-plugin-kit";
|
|
1
|
+
import { D as LlmRuntime, E as normalizeFallback, S as RpcResult, T as defaultSettings, d as GitCommitSettings, f as GitCommitStatus, k as normalizeModelRoute, o as CommitRunResult } from "./contracts.js";
|
|
3
2
|
import { Context } from "@deepseek-ai/cordis";
|
|
3
|
+
//#region ../dsh-plugin-kit/src/llm-call.d.ts
|
|
4
|
+
type LlmTextCaller = Pick<LlmRuntime, 'prepareCall' | 'resolveCallConfig'>;
|
|
5
|
+
//#endregion
|
|
4
6
|
//#region src/git.d.ts
|
|
5
7
|
interface GitRunOptions {
|
|
6
8
|
readonly cwd: string;
|
|
@@ -105,6 +107,11 @@ interface PlanInput {
|
|
|
105
107
|
readonly diff: string;
|
|
106
108
|
readonly untracked: readonly UntrackedPreview[];
|
|
107
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* The complete single-message input kept for callers that cannot split
|
|
112
|
+
* stable context from the live request; identical material to
|
|
113
|
+
* buildPlanContext + buildPlanText laid out in the same order as before.
|
|
114
|
+
*/
|
|
108
115
|
declare function buildPlanInput(input: PlanInput): string;
|
|
109
116
|
/**
|
|
110
117
|
* Validate the model plan against the exact change set. Returns undefined when
|
|
@@ -121,7 +128,7 @@ declare module '@deepseek-ai/cordis' {
|
|
|
121
128
|
}
|
|
122
129
|
}
|
|
123
130
|
declare function handleRpc(service: GitCommitService, endpoint: string, payload: unknown, signal: AbortSignal): Promise<RpcResult>;
|
|
124
|
-
declare function apply(ctx: Context): void
|
|
131
|
+
declare function apply(ctx: Context): Promise<void>;
|
|
125
132
|
//#endregion
|
|
126
133
|
export { GitCommitService, apply, buildPlanInput, defaultSettings, handleRpc, inject, name, normalizeFallback, normalizeModelRoute, parsePlan, parsePorcelain };
|
|
127
134
|
//# sourceMappingURL=index.d.ts.map
|