@ai-development-environment/control-agent 0.0.107 → 0.0.108
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/control-agent.js +20 -5
- package/package.json +1 -1
package/dist/control-agent.js
CHANGED
|
@@ -17631,7 +17631,7 @@ async function inspectCommits(folder, baseBranch, timeoutMs, signal) {
|
|
|
17631
17631
|
[
|
|
17632
17632
|
"log",
|
|
17633
17633
|
"--max-count=101",
|
|
17634
|
-
"--format=%x1e%H%x1f%s%x1f%an%x1f%aI",
|
|
17634
|
+
"--format=%x1e%H%x1f%s%x1f%an%x1f%aI%x1f%B%x00",
|
|
17635
17635
|
"--numstat",
|
|
17636
17636
|
`refs/remotes/origin/${baseBranch}..HEAD`
|
|
17637
17637
|
],
|
|
@@ -17641,16 +17641,31 @@ async function inspectCommits(folder, baseBranch, timeoutMs, signal) {
|
|
|
17641
17641
|
"Could not inspect base-relative commits"
|
|
17642
17642
|
);
|
|
17643
17643
|
const commits = result.stdout.split("").filter(Boolean).map((block) => {
|
|
17644
|
-
const
|
|
17645
|
-
const [
|
|
17644
|
+
const [header = "", stats = ""] = block.split("\0");
|
|
17645
|
+
const [
|
|
17646
|
+
sha = "",
|
|
17647
|
+
subject = "",
|
|
17648
|
+
authorName = "",
|
|
17649
|
+
authoredAt = "",
|
|
17650
|
+
...messageParts
|
|
17651
|
+
] = header.split("");
|
|
17652
|
+
const message = messageParts.join("").replace(/\n$/, "");
|
|
17646
17653
|
let additions = 0;
|
|
17647
17654
|
let deletions = 0;
|
|
17648
|
-
for (const line of
|
|
17655
|
+
for (const line of stats.trim().split("\n")) {
|
|
17649
17656
|
const [added, deleted] = line.split(" ");
|
|
17650
17657
|
if (/^\d+$/.test(added ?? "")) additions += Number(added);
|
|
17651
17658
|
if (/^\d+$/.test(deleted ?? "")) deletions += Number(deleted);
|
|
17652
17659
|
}
|
|
17653
|
-
return {
|
|
17660
|
+
return {
|
|
17661
|
+
sha,
|
|
17662
|
+
subject,
|
|
17663
|
+
message,
|
|
17664
|
+
authorName,
|
|
17665
|
+
authoredAt,
|
|
17666
|
+
additions,
|
|
17667
|
+
deletions
|
|
17668
|
+
};
|
|
17654
17669
|
});
|
|
17655
17670
|
return { commits: commits.slice(0, 100), truncated: commits.length > 100 };
|
|
17656
17671
|
}
|