testdriverai 5.6.4 → 5.6.5
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 +17 -15
- package/package.json +1 -1
- package/testdriver/spotify.yaml +5 -0
package/agent.js
CHANGED
|
@@ -1092,14 +1092,6 @@ let run = async (file = thisFile, shouldSave = false, shouldExit = true) => {
|
|
|
1092
1092
|
logger.info(``, null);
|
|
1093
1093
|
logger.info(chalk.yellow(`> ${step.prompt || "no prompt"}`), null);
|
|
1094
1094
|
|
|
1095
|
-
if (!step.commands && !step.prompt) {
|
|
1096
|
-
logger.info(chalk.red("No commands or prompt found"));
|
|
1097
|
-
return await exit(true);
|
|
1098
|
-
} else if (!step.commands) {
|
|
1099
|
-
logger.info(chalk.yellow("No commands found, running exploratory"));
|
|
1100
|
-
return await exploratoryLoop(step.prompt, false, true);
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
1095
|
if (shouldSave) {
|
|
1104
1096
|
executionHistory.push({
|
|
1105
1097
|
prompt: step.prompt,
|
|
@@ -1107,15 +1099,25 @@ let run = async (file = thisFile, shouldSave = false, shouldExit = true) => {
|
|
|
1107
1099
|
});
|
|
1108
1100
|
}
|
|
1109
1101
|
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1102
|
+
if (!step.commands && !step.prompt) {
|
|
1103
|
+
logger.info(chalk.red("No commands or prompt found"));
|
|
1104
|
+
await exit(true);
|
|
1105
|
+
} else if (!step.commands) {
|
|
1106
|
+
logger.info(chalk.yellow("No commands found, running exploratory"));
|
|
1107
|
+
await exploratoryLoop(step.prompt, false, true, false);
|
|
1108
|
+
} else {
|
|
1113
1109
|
|
|
1114
|
-
|
|
1115
|
-
|
|
1110
|
+
let markdown = `\`\`\`yaml
|
|
1111
|
+
${yaml.dump(step)}
|
|
1112
|
+
\`\`\``;
|
|
1113
|
+
|
|
1114
|
+
logger.debug(markdown);
|
|
1115
|
+
logger.debug("load calling actOnMarkdown");
|
|
1116
|
+
|
|
1117
|
+
lastPrompt = step.prompt;
|
|
1118
|
+
await actOnMarkdown(markdown, 0, true, false, shouldSave);
|
|
1119
|
+
}
|
|
1116
1120
|
|
|
1117
|
-
lastPrompt = step.prompt;
|
|
1118
|
-
await actOnMarkdown(markdown, 0, true, false, shouldSave);
|
|
1119
1121
|
|
|
1120
1122
|
if (shouldSave) {
|
|
1121
1123
|
await save({ silent: true });
|
package/package.json
CHANGED