testdriverai 6.1.3-canary.3479900.0 → 6.1.3-canary.4aa7788.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/agent/index.js +2 -2
- package/agent/interface.js +4 -5
- package/package.json +1 -1
package/agent/index.js
CHANGED
|
@@ -891,7 +891,7 @@ commands:
|
|
|
891
891
|
// based on the current state of the system (primarily the current screenshot)
|
|
892
892
|
// it will generate files that contain only "prompts"
|
|
893
893
|
// @todo revit the generate command
|
|
894
|
-
async generate(count = 1) {
|
|
894
|
+
async generate(count = 1, prompt = null) {
|
|
895
895
|
this.emitter.emit(events.log.debug, `generate called with count: ${count}`);
|
|
896
896
|
|
|
897
897
|
await this.runLifecycle("prerun");
|
|
@@ -909,7 +909,7 @@ commands:
|
|
|
909
909
|
let message = await this.sdk.req(
|
|
910
910
|
"generate",
|
|
911
911
|
{
|
|
912
|
-
prompt: "make sure to do a spellcheck",
|
|
912
|
+
prompt: prompt || "make sure to do a spellcheck",
|
|
913
913
|
image,
|
|
914
914
|
mousePosition: mouse,
|
|
915
915
|
activeWindow: activeWindow,
|
package/agent/interface.js
CHANGED
|
@@ -200,8 +200,8 @@ function createCommandDefinitions(agent) {
|
|
|
200
200
|
generate: {
|
|
201
201
|
description: "Generate test files based on current screen state",
|
|
202
202
|
args: {
|
|
203
|
-
|
|
204
|
-
description: "
|
|
203
|
+
prompt: Args.string({
|
|
204
|
+
description: "Multi-line text prompt describing what to generate",
|
|
205
205
|
required: false,
|
|
206
206
|
}),
|
|
207
207
|
},
|
|
@@ -227,9 +227,8 @@ function createCommandDefinitions(agent) {
|
|
|
227
227
|
}),
|
|
228
228
|
},
|
|
229
229
|
handler: async (args, flags) => {
|
|
230
|
-
//
|
|
231
|
-
|
|
232
|
-
await agent.generate(flags.count || 3);
|
|
230
|
+
// Call generate with the count and prompt
|
|
231
|
+
await agent.generate(flags.count || 3, args.prompt);
|
|
233
232
|
},
|
|
234
233
|
},
|
|
235
234
|
};
|