testdriverai 4.1.42 → 4.1.44
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/agent.js +8 -5
- package/lib/config.js +1 -1
- package/package.json +1 -1
package/agent.js
CHANGED
|
@@ -202,8 +202,11 @@ if (!commandHistory.length) {
|
|
|
202
202
|
];
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
const exit = async (failed = true) => {
|
|
206
|
-
|
|
205
|
+
const exit = async (failed = true, shouldSave = false) => {
|
|
206
|
+
|
|
207
|
+
if (shouldSave) {
|
|
208
|
+
await save();
|
|
209
|
+
}
|
|
207
210
|
|
|
208
211
|
analytics.track("exit", { failed });
|
|
209
212
|
|
|
@@ -681,7 +684,7 @@ const firstPrompt = async () => {
|
|
|
681
684
|
if (input.indexOf("/summarize") == 0) {
|
|
682
685
|
await summarize();
|
|
683
686
|
} else if (input.indexOf("/quit") == 0) {
|
|
684
|
-
await exit();
|
|
687
|
+
await exit(false, true);
|
|
685
688
|
} else if (input.indexOf("/save") == 0) {
|
|
686
689
|
await save({ filepath: commands[1] });
|
|
687
690
|
} else if (input.indexOf("/undo") == 0) {
|
|
@@ -862,7 +865,7 @@ ${regression}
|
|
|
862
865
|
// this will load a regression test from a file location
|
|
863
866
|
// it parses the markdown file and executes the codeblocks exactly as if they were
|
|
864
867
|
// generated by the AI in a single prompt
|
|
865
|
-
let run = async (file,
|
|
868
|
+
let run = async (file, shouldSave = false, shouldExit = true) => {
|
|
866
869
|
|
|
867
870
|
setTerminalWindowTransparency(true);
|
|
868
871
|
|
|
@@ -934,7 +937,7 @@ ${yaml.dump(step)}
|
|
|
934
937
|
await actOnMarkdown(markdown, 0, true);
|
|
935
938
|
}
|
|
936
939
|
|
|
937
|
-
if (
|
|
940
|
+
if (shouldSave || shouldSave == "true") {
|
|
938
941
|
await save({ filepath: file });
|
|
939
942
|
}
|
|
940
943
|
|
package/lib/config.js
CHANGED