@empiricalrun/test-gen 0.38.48 → 0.38.49
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/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo-edit.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/repo-edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAcrD,wBAAsB,aAAa,CAAC,EAClC,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,
|
|
1
|
+
{"version":3,"file":"repo-edit.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/repo-edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAcrD,wBAAsB,aAAa,CAAC,EAClC,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,iBA+JA"}
|
|
@@ -166,7 +166,6 @@ Task: ${task}
|
|
|
166
166
|
fileChanges: updatedFileChanges,
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
// TODO: identify new file updates
|
|
170
169
|
const newFileUpdates = updates.filter((f) => !fsSync.existsSync(f.filePath));
|
|
171
170
|
await Promise.all(newFileUpdates.map((f) => {
|
|
172
171
|
return (async () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-update-feedback.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/test-update-feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAKxE,wBAAsB,wBAAwB,CAAC,EAC7C,KAAK,EACL,SAAS,EACT,SAAS,EACT,aAAa,GACd,EAAE;IACD,SAAS,EAAE,0BAA0B,EAAE,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;QAC7B,YAAY,EAAE,MAAM,CAAC;KACtB,EAAE,CAAC;IACJ,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;;;;;
|
|
1
|
+
{"version":3,"file":"test-update-feedback.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/test-update-feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAKxE,wBAAsB,wBAAwB,CAAC,EAC7C,KAAK,EACL,SAAS,EACT,SAAS,EACT,aAAa,GACd,EAAE;IACD,SAAS,EAAE,0BAA0B,EAAE,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;QAC7B,YAAY,EAAE,MAAM,CAAC;KACtB,EAAE,CAAC;IACJ,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;;;;;KA4CA"}
|
|
@@ -7,6 +7,11 @@ const utils_1 = require("./utils");
|
|
|
7
7
|
async function applyTestUpdateFeedbacks({ trace, oldPrompt, feedbacks, agentResponse, }) {
|
|
8
8
|
const applyTestUpdateFeedbacksSpan = trace?.span({
|
|
9
9
|
name: "apply-test-update-feedbacks",
|
|
10
|
+
input: {
|
|
11
|
+
oldPrompt,
|
|
12
|
+
feedbacks,
|
|
13
|
+
agentResponse,
|
|
14
|
+
},
|
|
10
15
|
});
|
|
11
16
|
const llm = new llm_1.LLM({
|
|
12
17
|
trace: applyTestUpdateFeedbacksSpan,
|
|
@@ -38,8 +43,8 @@ Fix the above failures and respond with same format as the previous response`,
|
|
|
38
43
|
});
|
|
39
44
|
const updatedResponse = response?.content || "";
|
|
40
45
|
const fileChanges = (0, utils_1.extractTestUpdates)(updatedResponse);
|
|
41
|
-
const filteredFileChanges = fileChanges.filter((f) =>
|
|
42
|
-
applyTestUpdateFeedbacksSpan?.end({ output: {
|
|
46
|
+
const filteredFileChanges = fileChanges.filter((f) => feedbacks.some((e) => e?.filePath === f.filePath));
|
|
47
|
+
applyTestUpdateFeedbacksSpan?.end({ output: { fileChanges } });
|
|
43
48
|
return filteredFileChanges;
|
|
44
49
|
}
|
|
45
50
|
exports.applyTestUpdateFeedbacks = applyTestUpdateFeedbacks;
|