testdriverai 6.1.3-canary.3479900.0 → 6.1.3

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 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,
@@ -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
- file: Args.string({
204
- description: "Base test file to run before generating (optional)",
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
- // The file argument is already handled by thisFile in the agent constructor
231
- // Just call generate with the count
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "6.1.3-canary.3479900.0",
3
+ "version": "6.1.3",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {