git-coco 0.3.4 → 0.4.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/dist/commands/changelog/handler.d.ts +3 -0
- package/dist/commands/changelog/index.d.ts +10 -0
- package/dist/commands/changelog/options.d.ts +16 -0
- package/dist/index.esm.mjs +203 -36
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.js +203 -36
- package/dist/lib/langchain/prompts/changelog.d.ts +3 -0
- package/dist/lib/simple-git/getCommitLogRange.d.ts +7 -0
- package/dist/lib/simple-git/getDiff.d.ts +2 -2
- package/dist/lib/simple-git/getStatus.d.ts +1 -1
- package/dist/lib/simple-git/getSummaryText.d.ts +1 -1
- package/dist/lib/ui/generateAndReviewLoop.d.ts +2 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -353,25 +353,25 @@ function validatePromptTemplate(text, inputVariables) {
|
|
|
353
353
|
return true;
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
const template$
|
|
356
|
+
const template$2 = `GOAL: Use functional abstractions to summarize the following text
|
|
357
357
|
|
|
358
358
|
RULES: Avoid phrases like "this change", "this code", or "this function" etc. Instead refer to the function, variable, or class by name.
|
|
359
359
|
|
|
360
360
|
TEXT:"""{text}"""
|
|
361
361
|
`;
|
|
362
|
-
const inputVariables$
|
|
362
|
+
const inputVariables$2 = ['text'];
|
|
363
363
|
const SUMMARIZE_PROMPT = new prompts.PromptTemplate({
|
|
364
|
-
template: template$
|
|
365
|
-
inputVariables: inputVariables$
|
|
364
|
+
template: template$2,
|
|
365
|
+
inputVariables: inputVariables$2,
|
|
366
366
|
});
|
|
367
367
|
|
|
368
|
-
|
|
368
|
+
async function parseDefaultFileDiff(nodeFile, commit = '--staged', git) {
|
|
369
369
|
if (commit !== '--staged') {
|
|
370
370
|
return await git.diff([`${commit}~1..${commit}`, '--', nodeFile.filePath]);
|
|
371
371
|
}
|
|
372
372
|
return await git.diff([commit, nodeFile.filePath]);
|
|
373
|
-
}
|
|
374
|
-
|
|
373
|
+
}
|
|
374
|
+
async function parseRenamedFileDiff(nodeFile, commit, git, logger) {
|
|
375
375
|
let result = '';
|
|
376
376
|
const oldFilePath = nodeFile?.oldFilePath || nodeFile.filePath;
|
|
377
377
|
let previousCommitHash = 'HEAD';
|
|
@@ -408,8 +408,8 @@ const parseRenamedFileDiff = async (nodeFile, commit, git, logger) => {
|
|
|
408
408
|
result = 'Error comparing file contents.';
|
|
409
409
|
}
|
|
410
410
|
return result;
|
|
411
|
-
}
|
|
412
|
-
|
|
411
|
+
}
|
|
412
|
+
async function getDiff(nodeFile, commit, { git, logger, }) {
|
|
413
413
|
if (nodeFile.status === 'deleted') {
|
|
414
414
|
return 'This file has been deleted.';
|
|
415
415
|
}
|
|
@@ -420,7 +420,7 @@ const getDiff = async (nodeFile, commit, { git, logger, }) => {
|
|
|
420
420
|
// If not deleted or renamed, get the diff from the index
|
|
421
421
|
const defaultDiff = await parseDefaultFileDiff(nodeFile, commit, git);
|
|
422
422
|
return defaultDiff;
|
|
423
|
-
}
|
|
423
|
+
}
|
|
424
424
|
|
|
425
425
|
const MAX_TOKENS_PER_SUMMARY = 2048;
|
|
426
426
|
async function fileChangeParser({ changes, commit, options: { tokenizer, git, model, logger }, }) {
|
|
@@ -523,7 +523,7 @@ class Logger {
|
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
|
|
526
|
-
const template = `Write informative git commit message, in the imperative, based on the diffs & file changes provided in the "Diff Summary" section.
|
|
526
|
+
const template$1 = `Write informative git commit message, in the imperative, based on the diffs & file changes provided in the "Diff Summary" section.
|
|
527
527
|
Commit Messages must have a short description that is less than 50 characters followed by a newline character and then a more verbose detailed description.
|
|
528
528
|
|
|
529
529
|
- Typically a hyphen or asterisk is used for the bullet
|
|
@@ -536,13 +536,13 @@ Commit Messages must have a short description that is less than 50 characters fo
|
|
|
536
536
|
"""{summary}"""
|
|
537
537
|
|
|
538
538
|
Commit:`;
|
|
539
|
-
const inputVariables = ['summary'];
|
|
539
|
+
const inputVariables$1 = ['summary'];
|
|
540
540
|
const COMMIT_PROMPT = new prompts.PromptTemplate({
|
|
541
|
-
template,
|
|
542
|
-
inputVariables,
|
|
541
|
+
template: template$1,
|
|
542
|
+
inputVariables: inputVariables$1,
|
|
543
543
|
});
|
|
544
544
|
|
|
545
|
-
|
|
545
|
+
function getStatus(file, location = 'index') {
|
|
546
546
|
if ('index' in file && 'working_dir' in file) {
|
|
547
547
|
const statusCode = file[location];
|
|
548
548
|
switch (statusCode) {
|
|
@@ -574,11 +574,11 @@ const getStatus = (file, location = 'index') => {
|
|
|
574
574
|
return 'unknown';
|
|
575
575
|
}
|
|
576
576
|
else {
|
|
577
|
-
throw new Error(
|
|
577
|
+
throw new Error('Invalid file type');
|
|
578
578
|
}
|
|
579
|
-
}
|
|
579
|
+
}
|
|
580
580
|
|
|
581
|
-
|
|
581
|
+
function getSummaryText(file, change) {
|
|
582
582
|
const status = change.status || getStatus(file);
|
|
583
583
|
let filePath;
|
|
584
584
|
if ('path' in file) {
|
|
@@ -588,13 +588,13 @@ const getSummaryText = (file, change) => {
|
|
|
588
588
|
filePath = change?.filePath || file.file;
|
|
589
589
|
}
|
|
590
590
|
else {
|
|
591
|
-
throw new Error(
|
|
591
|
+
throw new Error('Invalid file type');
|
|
592
592
|
}
|
|
593
593
|
if (change.oldFilePath) {
|
|
594
594
|
return `${status}: ${change.oldFilePath} -> ${filePath}`;
|
|
595
595
|
}
|
|
596
596
|
return `${status}: ${filePath}`;
|
|
597
|
-
}
|
|
597
|
+
}
|
|
598
598
|
|
|
599
599
|
/**
|
|
600
600
|
* Returns a new object with all undefined keys removed
|
|
@@ -734,7 +734,6 @@ const DEFAULT_CONFIG = {
|
|
|
734
734
|
model: 'openai/gpt-4',
|
|
735
735
|
verbose: false,
|
|
736
736
|
tokenLimit: 1024,
|
|
737
|
-
prompt: COMMIT_PROMPT.template,
|
|
738
737
|
summarizePrompt: SUMMARIZE_PROMPT.template,
|
|
739
738
|
temperature: 0.4,
|
|
740
739
|
mode: 'stdout',
|
|
@@ -922,7 +921,7 @@ async function editPrompt(options) {
|
|
|
922
921
|
});
|
|
923
922
|
}
|
|
924
923
|
|
|
925
|
-
async function generateAndReviewLoop({ factory, parser, noResult, agent, options, }) {
|
|
924
|
+
async function generateAndReviewLoop({ label, factory, parser, noResult, agent, options, }) {
|
|
926
925
|
const { logger } = options;
|
|
927
926
|
let continueLoop = true;
|
|
928
927
|
let modifyPrompt = false;
|
|
@@ -944,19 +943,19 @@ async function generateAndReviewLoop({ factory, parser, noResult, agent, options
|
|
|
944
943
|
if (modifyPrompt) {
|
|
945
944
|
options.prompt = await editPrompt(options);
|
|
946
945
|
}
|
|
947
|
-
logger.startTimer().startSpinner(`Generating
|
|
946
|
+
logger.startTimer().startSpinner(`Generating ${label}\n`, {
|
|
948
947
|
color: 'blue',
|
|
949
948
|
});
|
|
950
949
|
result = await agent(context, options);
|
|
951
950
|
if (!result) {
|
|
952
|
-
logger.stopSpinner('💀 Agent failed to
|
|
951
|
+
logger.stopSpinner('💀 Agent failed to return content.', {
|
|
953
952
|
mode: 'fail',
|
|
954
953
|
color: 'red',
|
|
955
954
|
});
|
|
956
955
|
process.exit(0);
|
|
957
956
|
}
|
|
958
957
|
logger
|
|
959
|
-
.stopSpinner(
|
|
958
|
+
.stopSpinner(`Generated ${label}`, {
|
|
960
959
|
color: 'green',
|
|
961
960
|
mode: 'succeed',
|
|
962
961
|
})
|
|
@@ -1041,8 +1040,8 @@ const handleResult = async (result, { mode, git }) => {
|
|
|
1041
1040
|
};
|
|
1042
1041
|
|
|
1043
1042
|
const tokenizer = getTokenizer();
|
|
1044
|
-
const git = simpleGit.simpleGit();
|
|
1045
|
-
async function handler(argv) {
|
|
1043
|
+
const git$1 = simpleGit.simpleGit();
|
|
1044
|
+
async function handler$1(argv) {
|
|
1046
1045
|
const options = loadConfig(argv);
|
|
1047
1046
|
const logger = new Logger(options);
|
|
1048
1047
|
const key = getApiKeyForModel(options.model, options);
|
|
@@ -1056,17 +1055,18 @@ async function handler(argv) {
|
|
|
1056
1055
|
});
|
|
1057
1056
|
const INTERACTIVE = isInteractive(options);
|
|
1058
1057
|
async function factory() {
|
|
1059
|
-
const changes = await getChanges({ git });
|
|
1058
|
+
const changes = await getChanges({ git: git$1 });
|
|
1060
1059
|
return changes.staged;
|
|
1061
1060
|
}
|
|
1062
1061
|
async function parser(changes) {
|
|
1063
1062
|
return await fileChangeParser({
|
|
1064
1063
|
changes,
|
|
1065
1064
|
commit: '--staged',
|
|
1066
|
-
options: { tokenizer, git, model, logger },
|
|
1065
|
+
options: { tokenizer, git: git$1, model, logger },
|
|
1067
1066
|
});
|
|
1068
1067
|
}
|
|
1069
1068
|
const commitMsg = await generateAndReviewLoop({
|
|
1069
|
+
label: 'Commit Message',
|
|
1070
1070
|
factory,
|
|
1071
1071
|
parser,
|
|
1072
1072
|
agent: async (context, options) => {
|
|
@@ -1081,11 +1081,12 @@ async function handler(argv) {
|
|
|
1081
1081
|
});
|
|
1082
1082
|
},
|
|
1083
1083
|
noResult: async () => {
|
|
1084
|
-
await noResult({ git, logger });
|
|
1084
|
+
await noResult({ git: git$1, logger });
|
|
1085
1085
|
process.exit(0);
|
|
1086
1086
|
},
|
|
1087
1087
|
options: {
|
|
1088
1088
|
...options,
|
|
1089
|
+
prompt: options.prompt || COMMIT_PROMPT.template,
|
|
1089
1090
|
logger,
|
|
1090
1091
|
interactive: INTERACTIVE,
|
|
1091
1092
|
},
|
|
@@ -1093,14 +1094,14 @@ async function handler(argv) {
|
|
|
1093
1094
|
const MODE = (INTERACTIVE && 'interactive') || (options.commit && 'interactive') || options?.mode || 'stdout';
|
|
1094
1095
|
handleResult(commitMsg, {
|
|
1095
1096
|
mode: MODE,
|
|
1096
|
-
git,
|
|
1097
|
+
git: git$1,
|
|
1097
1098
|
});
|
|
1098
1099
|
}
|
|
1099
1100
|
|
|
1100
1101
|
/**
|
|
1101
1102
|
* Command line options via yargs
|
|
1102
1103
|
*/
|
|
1103
|
-
const options = {
|
|
1104
|
+
const options$1 = {
|
|
1104
1105
|
model: { type: 'string', description: 'LLM/Model-Name' },
|
|
1105
1106
|
openAIApiKey: {
|
|
1106
1107
|
type: 'string',
|
|
@@ -1146,20 +1147,186 @@ const options = {
|
|
|
1146
1147
|
description: 'Ignored extensions',
|
|
1147
1148
|
},
|
|
1148
1149
|
};
|
|
1149
|
-
const builder = (yargs) => {
|
|
1150
|
-
return yargs.options(options);
|
|
1150
|
+
const builder$1 = (yargs) => {
|
|
1151
|
+
return yargs.options(options$1);
|
|
1151
1152
|
};
|
|
1152
1153
|
|
|
1153
1154
|
var commit = {
|
|
1154
1155
|
command: 'commit',
|
|
1155
1156
|
desc: 'Generate commit message',
|
|
1157
|
+
builder: builder$1,
|
|
1158
|
+
handler: handler$1,
|
|
1159
|
+
options: options$1,
|
|
1160
|
+
};
|
|
1161
|
+
|
|
1162
|
+
const template = `Write informative git changelog, in the imperative, based on a series of individual messages.
|
|
1163
|
+
|
|
1164
|
+
- Typically a hyphen or asterisk is used for the bullet
|
|
1165
|
+
- Summarize dependency updates
|
|
1166
|
+
|
|
1167
|
+
"""{summary}"""
|
|
1168
|
+
|
|
1169
|
+
Changelog:`;
|
|
1170
|
+
const inputVariables = ['summary'];
|
|
1171
|
+
const CHANGELOG_PROMPT = new prompts.PromptTemplate({
|
|
1172
|
+
template,
|
|
1173
|
+
inputVariables,
|
|
1174
|
+
});
|
|
1175
|
+
|
|
1176
|
+
async function getCommitLogRange(from, to, { noMerges, git }) {
|
|
1177
|
+
try {
|
|
1178
|
+
const output = await git.raw([
|
|
1179
|
+
'log',
|
|
1180
|
+
`${from}..${to}`,
|
|
1181
|
+
'--pretty=format:%s',
|
|
1182
|
+
// Include '--no-merges' here if you want to exclude merge commits.
|
|
1183
|
+
noMerges ? '--no-merges' : null,
|
|
1184
|
+
].filter(Boolean)); // filter(Boolean) removes any null values from the array
|
|
1185
|
+
const messages = output.split('\n').filter(Boolean);
|
|
1186
|
+
return messages;
|
|
1187
|
+
}
|
|
1188
|
+
catch (error) {
|
|
1189
|
+
// If there's an error, handle it appropriately
|
|
1190
|
+
console.error('Error getting commit messages:', error);
|
|
1191
|
+
throw error;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
const git = simpleGit.simpleGit();
|
|
1196
|
+
async function handler(argv) {
|
|
1197
|
+
const options = loadConfig(argv);
|
|
1198
|
+
const logger = new Logger(options);
|
|
1199
|
+
const key = getApiKeyForModel(options.model, options);
|
|
1200
|
+
if (!key) {
|
|
1201
|
+
logger.log(`No API Key found. 🗝️🚪`, { color: 'red' });
|
|
1202
|
+
process.exit(1);
|
|
1203
|
+
}
|
|
1204
|
+
const model = getModel(options.model, key, {
|
|
1205
|
+
temperature: 0.4,
|
|
1206
|
+
maxConcurrency: 10,
|
|
1207
|
+
});
|
|
1208
|
+
const INTERACTIVE = isInteractive(options);
|
|
1209
|
+
const [from, to] = options.range?.split(':');
|
|
1210
|
+
if (!from || !to) {
|
|
1211
|
+
logger.log(`Invalid range provided. Expected format is <from>:<to>`, { color: 'red' });
|
|
1212
|
+
process.exit(1);
|
|
1213
|
+
}
|
|
1214
|
+
async function factory() {
|
|
1215
|
+
const messages = await getCommitLogRange(from, to, { git, noMerges: true });
|
|
1216
|
+
return messages;
|
|
1217
|
+
}
|
|
1218
|
+
async function parser(messages) {
|
|
1219
|
+
const result = messages.join('\n');
|
|
1220
|
+
return result;
|
|
1221
|
+
}
|
|
1222
|
+
const changelogMsg = await generateAndReviewLoop({
|
|
1223
|
+
label: 'Changelog',
|
|
1224
|
+
factory,
|
|
1225
|
+
parser,
|
|
1226
|
+
agent: async (context, options) => {
|
|
1227
|
+
const prompt = getPrompt({
|
|
1228
|
+
template: options.prompt,
|
|
1229
|
+
variables: CHANGELOG_PROMPT.inputVariables,
|
|
1230
|
+
fallback: CHANGELOG_PROMPT,
|
|
1231
|
+
});
|
|
1232
|
+
return await executeChain({
|
|
1233
|
+
llm: model,
|
|
1234
|
+
prompt,
|
|
1235
|
+
variables: { summary: context },
|
|
1236
|
+
});
|
|
1237
|
+
},
|
|
1238
|
+
noResult: async () => {
|
|
1239
|
+
await noResult({ git, logger });
|
|
1240
|
+
process.exit(0);
|
|
1241
|
+
},
|
|
1242
|
+
options: {
|
|
1243
|
+
...options,
|
|
1244
|
+
prompt: options.prompt || CHANGELOG_PROMPT.template,
|
|
1245
|
+
logger,
|
|
1246
|
+
interactive: INTERACTIVE,
|
|
1247
|
+
},
|
|
1248
|
+
});
|
|
1249
|
+
const MODE = (INTERACTIVE && 'interactive') || (options.commit && 'interactive') || options?.mode || 'stdout';
|
|
1250
|
+
handleResult(changelogMsg, {
|
|
1251
|
+
mode: MODE,
|
|
1252
|
+
git,
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* Command line options via yargs
|
|
1258
|
+
*/
|
|
1259
|
+
const options = {
|
|
1260
|
+
range: {
|
|
1261
|
+
type: 'string',
|
|
1262
|
+
alias: 'r',
|
|
1263
|
+
description: 'Commit range e.g `HEAD~2:HEAD`',
|
|
1264
|
+
demandOption: true,
|
|
1265
|
+
},
|
|
1266
|
+
model: { type: 'string', description: 'LLM/Model-Name' },
|
|
1267
|
+
openAIApiKey: {
|
|
1268
|
+
type: 'string',
|
|
1269
|
+
description: 'OpenAI API Key',
|
|
1270
|
+
conflicts: 'huggingFaceHubApiKey',
|
|
1271
|
+
},
|
|
1272
|
+
huggingFaceHubApiKey: {
|
|
1273
|
+
type: 'string',
|
|
1274
|
+
description: 'HuggingFace Hub API Key',
|
|
1275
|
+
conflicts: 'openAIApiKey',
|
|
1276
|
+
},
|
|
1277
|
+
tokenLimit: { type: 'number', description: 'Token limit' },
|
|
1278
|
+
prompt: {
|
|
1279
|
+
type: 'string',
|
|
1280
|
+
alias: 'p',
|
|
1281
|
+
description: 'Prompt for llm',
|
|
1282
|
+
},
|
|
1283
|
+
i: {
|
|
1284
|
+
type: 'boolean',
|
|
1285
|
+
alias: 'interactive',
|
|
1286
|
+
description: 'Toggle interactive mode',
|
|
1287
|
+
},
|
|
1288
|
+
e: {
|
|
1289
|
+
type: 'boolean',
|
|
1290
|
+
alias: 'edit',
|
|
1291
|
+
description: 'Open generated changelog message in editor before proceeding',
|
|
1292
|
+
},
|
|
1293
|
+
summarizePrompt: {
|
|
1294
|
+
type: 'string',
|
|
1295
|
+
description: 'Prompt for summarizing large files',
|
|
1296
|
+
},
|
|
1297
|
+
ignoredFiles: {
|
|
1298
|
+
type: 'array',
|
|
1299
|
+
description: 'Ignored files',
|
|
1300
|
+
},
|
|
1301
|
+
ignoredExtensions: {
|
|
1302
|
+
type: 'array',
|
|
1303
|
+
description: 'Ignored extensions',
|
|
1304
|
+
},
|
|
1305
|
+
};
|
|
1306
|
+
const builder = (yargs) => {
|
|
1307
|
+
return yargs.options(options);
|
|
1308
|
+
};
|
|
1309
|
+
|
|
1310
|
+
var changelog = {
|
|
1311
|
+
command: 'changelog',
|
|
1312
|
+
desc: 'Generate a changelog from a commit range',
|
|
1156
1313
|
builder,
|
|
1157
1314
|
handler,
|
|
1158
1315
|
options,
|
|
1159
1316
|
};
|
|
1160
1317
|
|
|
1161
|
-
yargs
|
|
1318
|
+
yargs
|
|
1319
|
+
.scriptName('coco')
|
|
1320
|
+
.usage('$0 <cmd> [args]')
|
|
1321
|
+
.command([commit.command, '$0'], commit.desc,
|
|
1322
|
+
// TODO: fix type on builder
|
|
1323
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1324
|
+
// @ts-ignore
|
|
1325
|
+
commit.builder, commit.handler)
|
|
1326
|
+
.command(changelog.command, changelog.desc,
|
|
1162
1327
|
// TODO: fix type on builder
|
|
1163
1328
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1164
1329
|
// @ts-ignore
|
|
1165
|
-
|
|
1330
|
+
changelog.builder, changelog.handler)
|
|
1331
|
+
.demandCommand()
|
|
1332
|
+
.help().argv;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SimpleGit } from 'simple-git';
|
|
2
|
+
type GetCommitLogRangeOptions = {
|
|
3
|
+
git: SimpleGit;
|
|
4
|
+
noMerges?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function getCommitLogRange(from: string, to: string, { noMerges, git }: GetCommitLogRangeOptions): Promise<string[]>;
|
|
7
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SimpleGit } from 'simple-git';
|
|
2
2
|
import { FileChange } from '../types';
|
|
3
3
|
import { Logger } from '../utils/logger';
|
|
4
|
-
export declare
|
|
4
|
+
export declare function getDiff(nodeFile: FileChange, commit: string, { git, logger, }: {
|
|
5
5
|
git: SimpleGit;
|
|
6
6
|
logger: Logger;
|
|
7
|
-
})
|
|
7
|
+
}): Promise<string>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FileChangeStatus } from '../types';
|
|
2
2
|
import { DiffResultBinaryFile, DiffResultTextFile, FileStatusResult } from 'simple-git';
|
|
3
|
-
export declare
|
|
3
|
+
export declare function getStatus(file: FileStatusResult | DiffResultTextFile | DiffResultBinaryFile, location?: 'index' | 'working_dir'): FileChangeStatus;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DiffResultBinaryFile, DiffResultTextFile, FileStatusResult } from 'simple-git';
|
|
2
2
|
import { FileChange } from '../types';
|
|
3
|
-
export declare
|
|
3
|
+
export declare function getSummaryText(file: FileStatusResult | DiffResultTextFile | DiffResultBinaryFile, change: Partial<FileChange>): string;
|
|
@@ -6,10 +6,11 @@ export type GenerateReviewLoopOptions = {
|
|
|
6
6
|
openInEditor?: boolean;
|
|
7
7
|
};
|
|
8
8
|
export type GenerateReviewLoopInput<T> = {
|
|
9
|
+
label: string;
|
|
9
10
|
factory: () => Promise<T[]>;
|
|
10
11
|
parser: (changes: T[], commit: string, options: GenerateReviewLoopOptions) => Promise<string>;
|
|
11
12
|
noResult: (options: GenerateReviewLoopOptions) => Promise<void>;
|
|
12
13
|
agent: (context: string, options: GenerateReviewLoopOptions) => Promise<string>;
|
|
13
14
|
options: GenerateReviewLoopOptions;
|
|
14
15
|
};
|
|
15
|
-
export declare function generateAndReviewLoop<T>({ factory, parser, noResult, agent, options, }: GenerateReviewLoopInput<T>): Promise<string>;
|
|
16
|
+
export declare function generateAndReviewLoop<T>({ label, factory, parser, noResult, agent, options, }: GenerateReviewLoopInput<T>): Promise<string>;
|
package/dist/stats.html
CHANGED
|
@@ -5285,7 +5285,7 @@ var drawChart = (function (exports) {
|
|
|
5285
5285
|
</script>
|
|
5286
5286
|
<script>
|
|
5287
5287
|
/*<!--*/
|
|
5288
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"lib","children":[{"name":"utils","children":[{"uid":"87a3-96","name":"getPathFromFilePath.ts"},{"uid":"87a3-114","name":"getTokenizer.ts"},{"uid":"87a3-116","name":"logger.ts"},{"uid":"87a3-124","name":"removeUndefined.ts"}]},{"name":"langchain","children":[{"name":"chains/summarize.ts","uid":"87a3-98"},{"uid":"87a3-106","name":"utils.ts"},{"name":"prompts","children":[{"uid":"87a3-108","name":"summarize.ts"},{"uid":"87a3-118","name":"commitDefault.ts"}]},{"uid":"87a3-154","name":"executeChain.ts"}]},{"name":"parsers","children":[{"name":"default","children":[{"name":"utils","children":[{"uid":"87a3-100","name":"summarizeDiffs.ts"},{"uid":"87a3-102","name":"createDiffTree.ts"},{"uid":"87a3-104","name":"collectDiffs.ts"}]},{"uid":"87a3-112","name":"index.ts"}]},{"uid":"87a3-140","name":"noResult.ts"}]},{"name":"simple-git","children":[{"uid":"87a3-110","name":"getDiff.ts"},{"uid":"87a3-120","name":"getStatus.ts"},{"uid":"87a3-122","name":"getSummaryText.ts"},{"uid":"87a3-138","name":"getChanges.ts"},{"uid":"87a3-156","name":"createCommit.ts"}]},{"name":"config","children":[{"name":"services","children":[{"uid":"87a3-126","name":"env.ts"},{"uid":"87a3-128","name":"git.ts"},{"uid":"87a3-130","name":"ignore.ts"},{"uid":"87a3-132","name":"project.ts"},{"uid":"87a3-134","name":"xdg.ts"}]},{"uid":"87a3-136","name":"loadConfig.ts"}]},{"name":"ui","children":[{"uid":"87a3-142","name":"helpers.ts"},{"uid":"87a3-144","name":"logResult.ts"},{"uid":"87a3-146","name":"editResult.ts"},{"uid":"87a3-148","name":"getUserReviewDecision.ts"},{"uid":"87a3-150","name":"editPrompt.ts"},{"uid":"87a3-152","name":"generateAndReviewLoop.ts"},{"uid":"87a3-158","name":"logSuccess.ts"},{"uid":"87a3-160","name":"handleResult.ts"}]}]},{"name":"commands/commit","children":[{"uid":"87a3-162","name":"handler.ts"},{"uid":"87a3-164","name":"options.ts"},{"uid":"87a3-166","name":"index.ts"}]},{"uid":"87a3-168","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"87a3-96":{"renderedLength":256,"gzipLength":0,"brotliLength":151,"metaUid":"87a3-95"},"87a3-98":{"renderedLength":442,"gzipLength":0,"brotliLength":201,"metaUid":"87a3-97"},"87a3-100":{"renderedLength":3917,"gzipLength":0,"brotliLength":1170,"metaUid":"87a3-99"},"87a3-102":{"renderedLength":1861,"gzipLength":0,"brotliLength":515,"metaUid":"87a3-101"},"87a3-104":{"renderedLength":1186,"gzipLength":0,"brotliLength":416,"metaUid":"87a3-103"},"87a3-106":{"renderedLength":2445,"gzipLength":0,"brotliLength":706,"metaUid":"87a3-105"},"87a3-108":{"renderedLength":403,"gzipLength":0,"brotliLength":232,"metaUid":"87a3-107"},"87a3-110":{"renderedLength":2197,"gzipLength":0,"brotliLength":643,"metaUid":"87a3-109"},"87a3-112":{"renderedLength":1153,"gzipLength":0,"brotliLength":469,"metaUid":"87a3-111"},"87a3-114":{"renderedLength":573,"gzipLength":0,"brotliLength":239,"metaUid":"87a3-113"},"87a3-116":{"renderedLength":1634,"gzipLength":0,"brotliLength":400,"metaUid":"87a3-115"},"87a3-118":{"renderedLength":979,"gzipLength":0,"brotliLength":368,"metaUid":"87a3-117"},"87a3-120":{"renderedLength":1090,"gzipLength":0,"brotliLength":308,"metaUid":"87a3-119"},"87a3-122":{"renderedLength":467,"gzipLength":0,"brotliLength":210,"metaUid":"87a3-121"},"87a3-124":{"renderedLength":258,"gzipLength":0,"brotliLength":141,"metaUid":"87a3-123"},"87a3-126":{"renderedLength":990,"gzipLength":0,"brotliLength":352,"metaUid":"87a3-125"},"87a3-128":{"renderedLength":1356,"gzipLength":0,"brotliLength":377,"metaUid":"87a3-127"},"87a3-130":{"renderedLength":927,"gzipLength":0,"brotliLength":271,"metaUid":"87a3-129"},"87a3-132":{"renderedLength":367,"gzipLength":0,"brotliLength":172,"metaUid":"87a3-131"},"87a3-134":{"renderedLength":539,"gzipLength":0,"brotliLength":260,"metaUid":"87a3-133"},"87a3-136":{"renderedLength":1029,"gzipLength":0,"brotliLength":406,"metaUid":"87a3-135"},"87a3-138":{"renderedLength":2586,"gzipLength":0,"brotliLength":552,"metaUid":"87a3-137"},"87a3-140":{"renderedLength":1265,"gzipLength":0,"brotliLength":413,"metaUid":"87a3-139"},"87a3-142":{"renderedLength":147,"gzipLength":0,"brotliLength":109,"metaUid":"87a3-141"},"87a3-144":{"renderedLength":141,"gzipLength":0,"brotliLength":121,"metaUid":"87a3-143"},"87a3-146":{"renderedLength":350,"gzipLength":0,"brotliLength":172,"metaUid":"87a3-145"},"87a3-148":{"renderedLength":1322,"gzipLength":0,"brotliLength":355,"metaUid":"87a3-147"},"87a3-150":{"renderedLength":321,"gzipLength":0,"brotliLength":167,"metaUid":"87a3-149"},"87a3-152":{"renderedLength":2247,"gzipLength":0,"brotliLength":565,"metaUid":"87a3-151"},"87a3-154":{"renderedLength":687,"gzipLength":0,"brotliLength":275,"metaUid":"87a3-153"},"87a3-156":{"renderedLength":87,"gzipLength":0,"brotliLength":71,"metaUid":"87a3-155"},"87a3-158":{"renderedLength":94,"gzipLength":0,"brotliLength":98,"metaUid":"87a3-157"},"87a3-160":{"renderedLength":371,"gzipLength":0,"brotliLength":167,"metaUid":"87a3-159"},"87a3-162":{"renderedLength":1743,"gzipLength":0,"brotliLength":608,"metaUid":"87a3-161"},"87a3-164":{"renderedLength":1341,"gzipLength":0,"brotliLength":372,"metaUid":"87a3-163"},"87a3-166":{"renderedLength":116,"gzipLength":0,"brotliLength":79,"metaUid":"87a3-165"},"87a3-168":{"renderedLength":238,"gzipLength":0,"brotliLength":159,"metaUid":"87a3-167"}},"nodeMetas":{"87a3-95":{"id":"/src/lib/utils/getPathFromFilePath.ts","moduleParts":{"index.js":"87a3-96"},"imported":[],"importedBy":[{"uid":"87a3-99"}]},"87a3-97":{"id":"/src/lib/langchain/chains/summarize.ts","moduleParts":{"index.js":"87a3-98"},"imported":[{"uid":"87a3-189"}],"importedBy":[{"uid":"87a3-99"}]},"87a3-99":{"id":"/src/lib/parsers/default/utils/summarizeDiffs.ts","moduleParts":{"index.js":"87a3-100"},"imported":[{"uid":"87a3-183"},{"uid":"87a3-95"},{"uid":"87a3-97"}],"importedBy":[{"uid":"87a3-111"}]},"87a3-101":{"id":"/src/lib/parsers/default/utils/createDiffTree.ts","moduleParts":{"index.js":"87a3-102"},"imported":[],"importedBy":[{"uid":"87a3-111"}]},"87a3-103":{"id":"/src/lib/parsers/default/utils/collectDiffs.ts","moduleParts":{"index.js":"87a3-104"},"imported":[],"importedBy":[{"uid":"87a3-111"}]},"87a3-105":{"id":"/src/lib/langchain/utils.ts","moduleParts":{"index.js":"87a3-106"},"imported":[{"uid":"87a3-177"},{"uid":"87a3-176"},{"uid":"87a3-178"},{"uid":"87a3-179"},{"uid":"87a3-180"}],"importedBy":[{"uid":"87a3-161"},{"uid":"87a3-111"},{"uid":"87a3-149"}]},"87a3-107":{"id":"/src/lib/langchain/prompts/summarize.ts","moduleParts":{"index.js":"87a3-108"},"imported":[{"uid":"87a3-176"}],"importedBy":[{"uid":"87a3-111"},{"uid":"87a3-135"}]},"87a3-109":{"id":"/src/lib/simple-git/getDiff.ts","moduleParts":{"index.js":"87a3-110"},"imported":[{"uid":"87a3-184"}],"importedBy":[{"uid":"87a3-111"}]},"87a3-111":{"id":"/src/lib/parsers/default/index.ts","moduleParts":{"index.js":"87a3-112"},"imported":[{"uid":"87a3-99"},{"uid":"87a3-101"},{"uid":"87a3-103"},{"uid":"87a3-105"},{"uid":"87a3-107"},{"uid":"87a3-109"}],"importedBy":[{"uid":"87a3-161"}]},"87a3-113":{"id":"/src/lib/utils/getTokenizer.ts","moduleParts":{"index.js":"87a3-114"},"imported":[{"uid":"87a3-171"}],"importedBy":[{"uid":"87a3-161"}]},"87a3-115":{"id":"/src/lib/utils/logger.ts","moduleParts":{"index.js":"87a3-116"},"imported":[{"uid":"87a3-172"},{"uid":"87a3-173"},{"uid":"87a3-174"},{"uid":"87a3-175"}],"importedBy":[{"uid":"87a3-161"}]},"87a3-117":{"id":"/src/lib/langchain/prompts/commitDefault.ts","moduleParts":{"index.js":"87a3-118"},"imported":[{"uid":"87a3-176"}],"importedBy":[{"uid":"87a3-161"},{"uid":"87a3-135"},{"uid":"87a3-149"}]},"87a3-119":{"id":"/src/lib/simple-git/getStatus.ts","moduleParts":{"index.js":"87a3-120"},"imported":[],"importedBy":[{"uid":"87a3-137"},{"uid":"87a3-121"}]},"87a3-121":{"id":"/src/lib/simple-git/getSummaryText.ts","moduleParts":{"index.js":"87a3-122"},"imported":[{"uid":"87a3-119"}],"importedBy":[{"uid":"87a3-137"}]},"87a3-123":{"id":"/src/lib/utils/removeUndefined.ts","moduleParts":{"index.js":"87a3-124"},"imported":[],"importedBy":[{"uid":"87a3-125"}]},"87a3-125":{"id":"/src/lib/config/services/env.ts","moduleParts":{"index.js":"87a3-126"},"imported":[{"uid":"87a3-123"}],"importedBy":[{"uid":"87a3-135"}]},"87a3-127":{"id":"/src/lib/config/services/git.ts","moduleParts":{"index.js":"87a3-128"},"imported":[{"uid":"87a3-185"},{"uid":"87a3-186"},{"uid":"87a3-181"},{"uid":"87a3-187"}],"importedBy":[{"uid":"87a3-135"}]},"87a3-129":{"id":"/src/lib/config/services/ignore.ts","moduleParts":{"index.js":"87a3-130"},"imported":[{"uid":"87a3-185"}],"importedBy":[{"uid":"87a3-135"}]},"87a3-131":{"id":"/src/lib/config/services/project.ts","moduleParts":{"index.js":"87a3-132"},"imported":[{"uid":"87a3-185"}],"importedBy":[{"uid":"87a3-135"}]},"87a3-133":{"id":"/src/lib/config/services/xdg.ts","moduleParts":{"index.js":"87a3-134"},"imported":[{"uid":"87a3-185"},{"uid":"87a3-181"},{"uid":"87a3-186"}],"importedBy":[{"uid":"87a3-135"}]},"87a3-135":{"id":"/src/lib/config/loadConfig.ts","moduleParts":{"index.js":"87a3-136"},"imported":[{"uid":"87a3-125"},{"uid":"87a3-127"},{"uid":"87a3-129"},{"uid":"87a3-131"},{"uid":"87a3-133"},{"uid":"87a3-107"},{"uid":"87a3-117"}],"importedBy":[{"uid":"87a3-161"},{"uid":"87a3-137"}]},"87a3-137":{"id":"/src/lib/simple-git/getChanges.ts","moduleParts":{"index.js":"87a3-138"},"imported":[{"uid":"87a3-181"},{"uid":"87a3-182"},{"uid":"87a3-119"},{"uid":"87a3-121"},{"uid":"87a3-135"}],"importedBy":[{"uid":"87a3-161"},{"uid":"87a3-139"}]},"87a3-139":{"id":"/src/lib/parsers/noResult.ts","moduleParts":{"index.js":"87a3-140"},"imported":[{"uid":"87a3-137"}],"importedBy":[{"uid":"87a3-161"}]},"87a3-141":{"id":"/src/lib/ui/helpers.ts","moduleParts":{"index.js":"87a3-142"},"imported":[{"uid":"87a3-172"}],"importedBy":[{"uid":"87a3-161"},{"uid":"87a3-143"}]},"87a3-143":{"id":"/src/lib/ui/logResult.ts","moduleParts":{"index.js":"87a3-144"},"imported":[{"uid":"87a3-172"},{"uid":"87a3-141"}],"importedBy":[{"uid":"87a3-151"}]},"87a3-145":{"id":"/src/lib/ui/editResult.ts","moduleParts":{"index.js":"87a3-146"},"imported":[{"uid":"87a3-188"}],"importedBy":[{"uid":"87a3-151"}]},"87a3-147":{"id":"/src/lib/ui/getUserReviewDecision.ts","moduleParts":{"index.js":"87a3-148"},"imported":[{"uid":"87a3-188"}],"importedBy":[{"uid":"87a3-151"}]},"87a3-149":{"id":"/src/lib/ui/editPrompt.ts","moduleParts":{"index.js":"87a3-150"},"imported":[{"uid":"87a3-188"},{"uid":"87a3-117"},{"uid":"87a3-105"}],"importedBy":[{"uid":"87a3-151"}]},"87a3-151":{"id":"/src/lib/ui/generateAndReviewLoop.ts","moduleParts":{"index.js":"87a3-152"},"imported":[{"uid":"87a3-143"},{"uid":"87a3-145"},{"uid":"87a3-147"},{"uid":"87a3-149"}],"importedBy":[{"uid":"87a3-161"}]},"87a3-153":{"id":"/src/lib/langchain/executeChain.ts","moduleParts":{"index.js":"87a3-154"},"imported":[{"uid":"87a3-178"}],"importedBy":[{"uid":"87a3-161"}]},"87a3-155":{"id":"/src/lib/simple-git/createCommit.ts","moduleParts":{"index.js":"87a3-156"},"imported":[],"importedBy":[{"uid":"87a3-159"}]},"87a3-157":{"id":"/src/lib/ui/logSuccess.ts","moduleParts":{"index.js":"87a3-158"},"imported":[{"uid":"87a3-172"}],"importedBy":[{"uid":"87a3-159"}]},"87a3-159":{"id":"/src/lib/ui/handleResult.ts","moduleParts":{"index.js":"87a3-160"},"imported":[{"uid":"87a3-155"},{"uid":"87a3-157"}],"importedBy":[{"uid":"87a3-161"}]},"87a3-161":{"id":"/src/commands/commit/handler.ts","moduleParts":{"index.js":"87a3-162"},"imported":[{"uid":"87a3-111"},{"uid":"87a3-113"},{"uid":"87a3-115"},{"uid":"87a3-117"},{"uid":"87a3-105"},{"uid":"87a3-139"},{"uid":"87a3-137"},{"uid":"87a3-170"},{"uid":"87a3-135"},{"uid":"87a3-141"},{"uid":"87a3-151"},{"uid":"87a3-153"},{"uid":"87a3-159"}],"importedBy":[{"uid":"87a3-165"}]},"87a3-163":{"id":"/src/commands/commit/options.ts","moduleParts":{"index.js":"87a3-164"},"imported":[],"importedBy":[{"uid":"87a3-165"}]},"87a3-165":{"id":"/src/commands/commit/index.ts","moduleParts":{"index.js":"87a3-166"},"imported":[{"uid":"87a3-161"},{"uid":"87a3-163"}],"importedBy":[{"uid":"87a3-167"}]},"87a3-167":{"id":"/src/index.ts","moduleParts":{"index.js":"87a3-168"},"imported":[{"uid":"87a3-169"},{"uid":"87a3-165"}],"importedBy":[],"isEntry":true},"87a3-169":{"id":"yargs","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-167"}],"isExternal":true},"87a3-170":{"id":"simple-git","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-161"}],"isExternal":true},"87a3-171":{"id":"gpt3-tokenizer","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-113"}],"isExternal":true},"87a3-172":{"id":"chalk","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-115"},{"uid":"87a3-141"},{"uid":"87a3-143"},{"uid":"87a3-157"}],"isExternal":true},"87a3-173":{"id":"ora","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-115"}],"isExternal":true},"87a3-174":{"id":"performance-now","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-115"}],"isExternal":true},"87a3-175":{"id":"pretty-ms","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-115"}],"isExternal":true},"87a3-176":{"id":"langchain/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-117"},{"uid":"87a3-105"},{"uid":"87a3-107"}],"isExternal":true},"87a3-177":{"id":"langchain/llms/hf","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-105"}],"isExternal":true},"87a3-178":{"id":"langchain/chains","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-105"},{"uid":"87a3-153"}],"isExternal":true},"87a3-179":{"id":"langchain/llms/openai","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-105"}],"isExternal":true},"87a3-180":{"id":"langchain/text_splitter","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-105"}],"isExternal":true},"87a3-181":{"id":"path","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-137"},{"uid":"87a3-127"},{"uid":"87a3-133"}],"isExternal":true},"87a3-182":{"id":"minimatch","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-137"}],"isExternal":true},"87a3-183":{"id":"p-queue","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-99"}],"isExternal":true},"87a3-184":{"id":"diff","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-109"}],"isExternal":true},"87a3-185":{"id":"fs","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-127"},{"uid":"87a3-129"},{"uid":"87a3-131"},{"uid":"87a3-133"}],"isExternal":true},"87a3-186":{"id":"os","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-127"},{"uid":"87a3-133"}],"isExternal":true},"87a3-187":{"id":"ini","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-127"}],"isExternal":true},"87a3-188":{"id":"@inquirer/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-145"},{"uid":"87a3-147"},{"uid":"87a3-149"}],"isExternal":true},"87a3-189":{"id":"langchain/document","moduleParts":{},"imported":[],"importedBy":[{"uid":"87a3-97"}],"isExternal":true}},"env":{"rollup":"3.26.3"},"options":{"gzip":false,"brotli":true,"sourcemap":false}};
|
|
5288
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"lib","children":[{"name":"utils","children":[{"uid":"91d1-106","name":"getPathFromFilePath.ts"},{"uid":"91d1-124","name":"getTokenizer.ts"},{"uid":"91d1-126","name":"logger.ts"},{"uid":"91d1-134","name":"removeUndefined.ts"}]},{"name":"langchain","children":[{"name":"chains/summarize.ts","uid":"91d1-108"},{"uid":"91d1-116","name":"utils.ts"},{"name":"prompts","children":[{"uid":"91d1-118","name":"summarize.ts"},{"uid":"91d1-128","name":"commitDefault.ts"},{"uid":"91d1-178","name":"changelog.ts"}]},{"uid":"91d1-164","name":"executeChain.ts"}]},{"name":"parsers","children":[{"name":"default","children":[{"name":"utils","children":[{"uid":"91d1-110","name":"summarizeDiffs.ts"},{"uid":"91d1-112","name":"createDiffTree.ts"},{"uid":"91d1-114","name":"collectDiffs.ts"}]},{"uid":"91d1-122","name":"index.ts"}]},{"uid":"91d1-150","name":"noResult.ts"}]},{"name":"simple-git","children":[{"uid":"91d1-120","name":"getDiff.ts"},{"uid":"91d1-130","name":"getStatus.ts"},{"uid":"91d1-132","name":"getSummaryText.ts"},{"uid":"91d1-148","name":"getChanges.ts"},{"uid":"91d1-166","name":"createCommit.ts"},{"uid":"91d1-180","name":"getCommitLogRange.ts"}]},{"name":"config","children":[{"name":"services","children":[{"uid":"91d1-136","name":"env.ts"},{"uid":"91d1-138","name":"git.ts"},{"uid":"91d1-140","name":"ignore.ts"},{"uid":"91d1-142","name":"project.ts"},{"uid":"91d1-144","name":"xdg.ts"}]},{"uid":"91d1-146","name":"loadConfig.ts"}]},{"name":"ui","children":[{"uid":"91d1-152","name":"helpers.ts"},{"uid":"91d1-154","name":"logResult.ts"},{"uid":"91d1-156","name":"editResult.ts"},{"uid":"91d1-158","name":"getUserReviewDecision.ts"},{"uid":"91d1-160","name":"editPrompt.ts"},{"uid":"91d1-162","name":"generateAndReviewLoop.ts"},{"uid":"91d1-168","name":"logSuccess.ts"},{"uid":"91d1-170","name":"handleResult.ts"}]}]},{"name":"commands","children":[{"name":"commit","children":[{"uid":"91d1-172","name":"handler.ts"},{"uid":"91d1-174","name":"options.ts"},{"uid":"91d1-176","name":"index.ts"}]},{"name":"changelog","children":[{"uid":"91d1-182","name":"handler.ts"},{"uid":"91d1-184","name":"options.ts"},{"uid":"91d1-186","name":"index.ts"}]}]},{"uid":"91d1-188","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"91d1-106":{"renderedLength":256,"gzipLength":0,"brotliLength":151,"metaUid":"91d1-105"},"91d1-108":{"renderedLength":442,"gzipLength":0,"brotliLength":201,"metaUid":"91d1-107"},"91d1-110":{"renderedLength":3917,"gzipLength":0,"brotliLength":1170,"metaUid":"91d1-109"},"91d1-112":{"renderedLength":1861,"gzipLength":0,"brotliLength":515,"metaUid":"91d1-111"},"91d1-114":{"renderedLength":1186,"gzipLength":0,"brotliLength":416,"metaUid":"91d1-113"},"91d1-116":{"renderedLength":2445,"gzipLength":0,"brotliLength":706,"metaUid":"91d1-115"},"91d1-118":{"renderedLength":403,"gzipLength":0,"brotliLength":232,"metaUid":"91d1-117"},"91d1-120":{"renderedLength":2185,"gzipLength":0,"brotliLength":628,"metaUid":"91d1-119"},"91d1-122":{"renderedLength":1153,"gzipLength":0,"brotliLength":469,"metaUid":"91d1-121"},"91d1-124":{"renderedLength":573,"gzipLength":0,"brotliLength":239,"metaUid":"91d1-123"},"91d1-126":{"renderedLength":1634,"gzipLength":0,"brotliLength":400,"metaUid":"91d1-125"},"91d1-128":{"renderedLength":1013,"gzipLength":0,"brotliLength":380,"metaUid":"91d1-127"},"91d1-130":{"renderedLength":1086,"gzipLength":0,"brotliLength":291,"metaUid":"91d1-129"},"91d1-132":{"renderedLength":463,"gzipLength":0,"brotliLength":217,"metaUid":"91d1-131"},"91d1-134":{"renderedLength":258,"gzipLength":0,"brotliLength":141,"metaUid":"91d1-133"},"91d1-136":{"renderedLength":990,"gzipLength":0,"brotliLength":352,"metaUid":"91d1-135"},"91d1-138":{"renderedLength":1356,"gzipLength":0,"brotliLength":377,"metaUid":"91d1-137"},"91d1-140":{"renderedLength":927,"gzipLength":0,"brotliLength":271,"metaUid":"91d1-139"},"91d1-142":{"renderedLength":367,"gzipLength":0,"brotliLength":172,"metaUid":"91d1-141"},"91d1-144":{"renderedLength":539,"gzipLength":0,"brotliLength":260,"metaUid":"91d1-143"},"91d1-146":{"renderedLength":993,"gzipLength":0,"brotliLength":392,"metaUid":"91d1-145"},"91d1-148":{"renderedLength":2586,"gzipLength":0,"brotliLength":552,"metaUid":"91d1-147"},"91d1-150":{"renderedLength":1265,"gzipLength":0,"brotliLength":413,"metaUid":"91d1-149"},"91d1-152":{"renderedLength":147,"gzipLength":0,"brotliLength":109,"metaUid":"91d1-151"},"91d1-154":{"renderedLength":141,"gzipLength":0,"brotliLength":121,"metaUid":"91d1-153"},"91d1-156":{"renderedLength":350,"gzipLength":0,"brotliLength":172,"metaUid":"91d1-155"},"91d1-158":{"renderedLength":1322,"gzipLength":0,"brotliLength":355,"metaUid":"91d1-157"},"91d1-160":{"renderedLength":321,"gzipLength":0,"brotliLength":167,"metaUid":"91d1-159"},"91d1-162":{"renderedLength":2247,"gzipLength":0,"brotliLength":571,"metaUid":"91d1-161"},"91d1-164":{"renderedLength":687,"gzipLength":0,"brotliLength":275,"metaUid":"91d1-163"},"91d1-166":{"renderedLength":87,"gzipLength":0,"brotliLength":71,"metaUid":"91d1-165"},"91d1-168":{"renderedLength":94,"gzipLength":0,"brotliLength":98,"metaUid":"91d1-167"},"91d1-170":{"renderedLength":371,"gzipLength":0,"brotliLength":167,"metaUid":"91d1-169"},"91d1-172":{"renderedLength":1870,"gzipLength":0,"brotliLength":639,"metaUid":"91d1-171"},"91d1-174":{"renderedLength":1347,"gzipLength":0,"brotliLength":379,"metaUid":"91d1-173"},"91d1-176":{"renderedLength":149,"gzipLength":0,"brotliLength":84,"metaUid":"91d1-175"},"91d1-178":{"renderedLength":358,"gzipLength":0,"brotliLength":201,"metaUid":"91d1-177"},"91d1-180":{"renderedLength":667,"gzipLength":0,"brotliLength":304,"metaUid":"91d1-179"},"91d1-182":{"renderedLength":1961,"gzipLength":0,"brotliLength":664,"metaUid":"91d1-181"},"91d1-184":{"renderedLength":1348,"gzipLength":0,"brotliLength":381,"metaUid":"91d1-183"},"91d1-186":{"renderedLength":139,"gzipLength":0,"brotliLength":87,"metaUid":"91d1-185"},"91d1-188":{"renderedLength":478,"gzipLength":0,"brotliLength":197,"metaUid":"91d1-187"}},"nodeMetas":{"91d1-105":{"id":"/src/lib/utils/getPathFromFilePath.ts","moduleParts":{"index.js":"91d1-106"},"imported":[],"importedBy":[{"uid":"91d1-109"}]},"91d1-107":{"id":"/src/lib/langchain/chains/summarize.ts","moduleParts":{"index.js":"91d1-108"},"imported":[{"uid":"91d1-209"}],"importedBy":[{"uid":"91d1-109"}]},"91d1-109":{"id":"/src/lib/parsers/default/utils/summarizeDiffs.ts","moduleParts":{"index.js":"91d1-110"},"imported":[{"uid":"91d1-203"},{"uid":"91d1-105"},{"uid":"91d1-107"}],"importedBy":[{"uid":"91d1-121"}]},"91d1-111":{"id":"/src/lib/parsers/default/utils/createDiffTree.ts","moduleParts":{"index.js":"91d1-112"},"imported":[],"importedBy":[{"uid":"91d1-121"}]},"91d1-113":{"id":"/src/lib/parsers/default/utils/collectDiffs.ts","moduleParts":{"index.js":"91d1-114"},"imported":[],"importedBy":[{"uid":"91d1-121"}]},"91d1-115":{"id":"/src/lib/langchain/utils.ts","moduleParts":{"index.js":"91d1-116"},"imported":[{"uid":"91d1-197"},{"uid":"91d1-196"},{"uid":"91d1-198"},{"uid":"91d1-199"},{"uid":"91d1-200"}],"importedBy":[{"uid":"91d1-171"},{"uid":"91d1-181"},{"uid":"91d1-121"},{"uid":"91d1-159"}]},"91d1-117":{"id":"/src/lib/langchain/prompts/summarize.ts","moduleParts":{"index.js":"91d1-118"},"imported":[{"uid":"91d1-196"}],"importedBy":[{"uid":"91d1-121"},{"uid":"91d1-145"}]},"91d1-119":{"id":"/src/lib/simple-git/getDiff.ts","moduleParts":{"index.js":"91d1-120"},"imported":[{"uid":"91d1-204"}],"importedBy":[{"uid":"91d1-121"}]},"91d1-121":{"id":"/src/lib/parsers/default/index.ts","moduleParts":{"index.js":"91d1-122"},"imported":[{"uid":"91d1-109"},{"uid":"91d1-111"},{"uid":"91d1-113"},{"uid":"91d1-115"},{"uid":"91d1-117"},{"uid":"91d1-119"}],"importedBy":[{"uid":"91d1-171"}]},"91d1-123":{"id":"/src/lib/utils/getTokenizer.ts","moduleParts":{"index.js":"91d1-124"},"imported":[{"uid":"91d1-191"}],"importedBy":[{"uid":"91d1-171"}]},"91d1-125":{"id":"/src/lib/utils/logger.ts","moduleParts":{"index.js":"91d1-126"},"imported":[{"uid":"91d1-192"},{"uid":"91d1-193"},{"uid":"91d1-194"},{"uid":"91d1-195"}],"importedBy":[{"uid":"91d1-171"},{"uid":"91d1-181"}]},"91d1-127":{"id":"/src/lib/langchain/prompts/commitDefault.ts","moduleParts":{"index.js":"91d1-128"},"imported":[{"uid":"91d1-196"}],"importedBy":[{"uid":"91d1-171"},{"uid":"91d1-159"}]},"91d1-129":{"id":"/src/lib/simple-git/getStatus.ts","moduleParts":{"index.js":"91d1-130"},"imported":[],"importedBy":[{"uid":"91d1-147"},{"uid":"91d1-131"}]},"91d1-131":{"id":"/src/lib/simple-git/getSummaryText.ts","moduleParts":{"index.js":"91d1-132"},"imported":[{"uid":"91d1-129"}],"importedBy":[{"uid":"91d1-147"}]},"91d1-133":{"id":"/src/lib/utils/removeUndefined.ts","moduleParts":{"index.js":"91d1-134"},"imported":[],"importedBy":[{"uid":"91d1-135"}]},"91d1-135":{"id":"/src/lib/config/services/env.ts","moduleParts":{"index.js":"91d1-136"},"imported":[{"uid":"91d1-133"}],"importedBy":[{"uid":"91d1-145"}]},"91d1-137":{"id":"/src/lib/config/services/git.ts","moduleParts":{"index.js":"91d1-138"},"imported":[{"uid":"91d1-205"},{"uid":"91d1-206"},{"uid":"91d1-201"},{"uid":"91d1-207"}],"importedBy":[{"uid":"91d1-145"}]},"91d1-139":{"id":"/src/lib/config/services/ignore.ts","moduleParts":{"index.js":"91d1-140"},"imported":[{"uid":"91d1-205"}],"importedBy":[{"uid":"91d1-145"}]},"91d1-141":{"id":"/src/lib/config/services/project.ts","moduleParts":{"index.js":"91d1-142"},"imported":[{"uid":"91d1-205"}],"importedBy":[{"uid":"91d1-145"}]},"91d1-143":{"id":"/src/lib/config/services/xdg.ts","moduleParts":{"index.js":"91d1-144"},"imported":[{"uid":"91d1-205"},{"uid":"91d1-201"},{"uid":"91d1-206"}],"importedBy":[{"uid":"91d1-145"}]},"91d1-145":{"id":"/src/lib/config/loadConfig.ts","moduleParts":{"index.js":"91d1-146"},"imported":[{"uid":"91d1-135"},{"uid":"91d1-137"},{"uid":"91d1-139"},{"uid":"91d1-141"},{"uid":"91d1-143"},{"uid":"91d1-117"}],"importedBy":[{"uid":"91d1-171"},{"uid":"91d1-181"},{"uid":"91d1-147"}]},"91d1-147":{"id":"/src/lib/simple-git/getChanges.ts","moduleParts":{"index.js":"91d1-148"},"imported":[{"uid":"91d1-201"},{"uid":"91d1-202"},{"uid":"91d1-129"},{"uid":"91d1-131"},{"uid":"91d1-145"}],"importedBy":[{"uid":"91d1-171"},{"uid":"91d1-149"}]},"91d1-149":{"id":"/src/lib/parsers/noResult.ts","moduleParts":{"index.js":"91d1-150"},"imported":[{"uid":"91d1-147"}],"importedBy":[{"uid":"91d1-171"},{"uid":"91d1-181"}]},"91d1-151":{"id":"/src/lib/ui/helpers.ts","moduleParts":{"index.js":"91d1-152"},"imported":[{"uid":"91d1-192"}],"importedBy":[{"uid":"91d1-171"},{"uid":"91d1-181"},{"uid":"91d1-153"}]},"91d1-153":{"id":"/src/lib/ui/logResult.ts","moduleParts":{"index.js":"91d1-154"},"imported":[{"uid":"91d1-192"},{"uid":"91d1-151"}],"importedBy":[{"uid":"91d1-161"}]},"91d1-155":{"id":"/src/lib/ui/editResult.ts","moduleParts":{"index.js":"91d1-156"},"imported":[{"uid":"91d1-208"}],"importedBy":[{"uid":"91d1-161"}]},"91d1-157":{"id":"/src/lib/ui/getUserReviewDecision.ts","moduleParts":{"index.js":"91d1-158"},"imported":[{"uid":"91d1-208"}],"importedBy":[{"uid":"91d1-161"}]},"91d1-159":{"id":"/src/lib/ui/editPrompt.ts","moduleParts":{"index.js":"91d1-160"},"imported":[{"uid":"91d1-208"},{"uid":"91d1-127"},{"uid":"91d1-115"}],"importedBy":[{"uid":"91d1-161"}]},"91d1-161":{"id":"/src/lib/ui/generateAndReviewLoop.ts","moduleParts":{"index.js":"91d1-162"},"imported":[{"uid":"91d1-153"},{"uid":"91d1-155"},{"uid":"91d1-157"},{"uid":"91d1-159"}],"importedBy":[{"uid":"91d1-171"},{"uid":"91d1-181"}]},"91d1-163":{"id":"/src/lib/langchain/executeChain.ts","moduleParts":{"index.js":"91d1-164"},"imported":[{"uid":"91d1-198"}],"importedBy":[{"uid":"91d1-171"},{"uid":"91d1-181"}]},"91d1-165":{"id":"/src/lib/simple-git/createCommit.ts","moduleParts":{"index.js":"91d1-166"},"imported":[],"importedBy":[{"uid":"91d1-169"}]},"91d1-167":{"id":"/src/lib/ui/logSuccess.ts","moduleParts":{"index.js":"91d1-168"},"imported":[{"uid":"91d1-192"}],"importedBy":[{"uid":"91d1-169"}]},"91d1-169":{"id":"/src/lib/ui/handleResult.ts","moduleParts":{"index.js":"91d1-170"},"imported":[{"uid":"91d1-165"},{"uid":"91d1-167"}],"importedBy":[{"uid":"91d1-171"},{"uid":"91d1-181"}]},"91d1-171":{"id":"/src/commands/commit/handler.ts","moduleParts":{"index.js":"91d1-172"},"imported":[{"uid":"91d1-121"},{"uid":"91d1-123"},{"uid":"91d1-125"},{"uid":"91d1-127"},{"uid":"91d1-115"},{"uid":"91d1-149"},{"uid":"91d1-147"},{"uid":"91d1-190"},{"uid":"91d1-145"},{"uid":"91d1-151"},{"uid":"91d1-161"},{"uid":"91d1-163"},{"uid":"91d1-169"}],"importedBy":[{"uid":"91d1-175"}]},"91d1-173":{"id":"/src/commands/commit/options.ts","moduleParts":{"index.js":"91d1-174"},"imported":[],"importedBy":[{"uid":"91d1-175"}]},"91d1-175":{"id":"/src/commands/commit/index.ts","moduleParts":{"index.js":"91d1-176"},"imported":[{"uid":"91d1-171"},{"uid":"91d1-173"}],"importedBy":[{"uid":"91d1-187"}]},"91d1-177":{"id":"/src/lib/langchain/prompts/changelog.ts","moduleParts":{"index.js":"91d1-178"},"imported":[{"uid":"91d1-196"}],"importedBy":[{"uid":"91d1-181"}]},"91d1-179":{"id":"/src/lib/simple-git/getCommitLogRange.ts","moduleParts":{"index.js":"91d1-180"},"imported":[],"importedBy":[{"uid":"91d1-181"}]},"91d1-181":{"id":"/src/commands/changelog/handler.ts","moduleParts":{"index.js":"91d1-182"},"imported":[{"uid":"91d1-125"},{"uid":"91d1-115"},{"uid":"91d1-190"},{"uid":"91d1-145"},{"uid":"91d1-151"},{"uid":"91d1-161"},{"uid":"91d1-163"},{"uid":"91d1-149"},{"uid":"91d1-169"},{"uid":"91d1-177"},{"uid":"91d1-179"}],"importedBy":[{"uid":"91d1-185"}]},"91d1-183":{"id":"/src/commands/changelog/options.ts","moduleParts":{"index.js":"91d1-184"},"imported":[],"importedBy":[{"uid":"91d1-185"}]},"91d1-185":{"id":"/src/commands/changelog/index.ts","moduleParts":{"index.js":"91d1-186"},"imported":[{"uid":"91d1-181"},{"uid":"91d1-183"}],"importedBy":[{"uid":"91d1-187"}]},"91d1-187":{"id":"/src/index.ts","moduleParts":{"index.js":"91d1-188"},"imported":[{"uid":"91d1-189"},{"uid":"91d1-175"},{"uid":"91d1-185"}],"importedBy":[],"isEntry":true},"91d1-189":{"id":"yargs","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-187"}],"isExternal":true},"91d1-190":{"id":"simple-git","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-171"},{"uid":"91d1-181"}],"isExternal":true},"91d1-191":{"id":"gpt3-tokenizer","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-123"}],"isExternal":true},"91d1-192":{"id":"chalk","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-125"},{"uid":"91d1-151"},{"uid":"91d1-153"},{"uid":"91d1-167"}],"isExternal":true},"91d1-193":{"id":"ora","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-125"}],"isExternal":true},"91d1-194":{"id":"performance-now","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-125"}],"isExternal":true},"91d1-195":{"id":"pretty-ms","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-125"}],"isExternal":true},"91d1-196":{"id":"langchain/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-127"},{"uid":"91d1-115"},{"uid":"91d1-177"},{"uid":"91d1-117"}],"isExternal":true},"91d1-197":{"id":"langchain/llms/hf","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-115"}],"isExternal":true},"91d1-198":{"id":"langchain/chains","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-115"},{"uid":"91d1-163"}],"isExternal":true},"91d1-199":{"id":"langchain/llms/openai","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-115"}],"isExternal":true},"91d1-200":{"id":"langchain/text_splitter","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-115"}],"isExternal":true},"91d1-201":{"id":"path","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-147"},{"uid":"91d1-137"},{"uid":"91d1-143"}],"isExternal":true},"91d1-202":{"id":"minimatch","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-147"}],"isExternal":true},"91d1-203":{"id":"p-queue","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-109"}],"isExternal":true},"91d1-204":{"id":"diff","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-119"}],"isExternal":true},"91d1-205":{"id":"fs","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-137"},{"uid":"91d1-139"},{"uid":"91d1-141"},{"uid":"91d1-143"}],"isExternal":true},"91d1-206":{"id":"os","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-137"},{"uid":"91d1-143"}],"isExternal":true},"91d1-207":{"id":"ini","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-137"}],"isExternal":true},"91d1-208":{"id":"@inquirer/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-155"},{"uid":"91d1-157"},{"uid":"91d1-159"}],"isExternal":true},"91d1-209":{"id":"langchain/document","moduleParts":{},"imported":[],"importedBy":[{"uid":"91d1-107"}],"isExternal":true}},"env":{"rollup":"3.26.3"},"options":{"gzip":false,"brotli":true,"sourcemap":false}};
|
|
5289
5289
|
|
|
5290
5290
|
const run = () => {
|
|
5291
5291
|
const width = window.innerWidth;
|