testdriverai 4.1.7 → 4.1.9

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 CHANGED
@@ -62,6 +62,11 @@ let rl;
62
62
  // list of prompts that the user has given us
63
63
  let tasks = [];
64
64
 
65
+ let isInteractive = false;
66
+ emitter.on(events.interactive, (data) => {
67
+ isInteractive = data;
68
+ });
69
+
65
70
  // get args from terminal
66
71
  const args = process.argv.slice(2);
67
72
 
@@ -640,10 +645,10 @@ const firstPrompt = async () => {
640
645
  // this is how we parse user input
641
646
  // notice that the AI is only called if the input is not a command
642
647
  rl.on("line", async (input) => {
648
+ if (!isInteractive) return;
643
649
  emitter.emit(events.interactive, false);
644
650
  await setTerminalApp();
645
-
646
- setTerminalWindowTransparency(true);
651
+ // setTerminalWindowTransparency(true);
647
652
  errorCounts = {};
648
653
 
649
654
  // append this to commandHistoryFile
@@ -676,7 +681,7 @@ const firstPrompt = async () => {
676
681
  await humanInput(input, true);
677
682
  }
678
683
 
679
- setTerminalWindowTransparency(false);
684
+ // setTerminalWindowTransparency(false);
680
685
  promptUser();
681
686
  });
682
687
 
@@ -991,15 +996,6 @@ const embed = async (file, depth) => {
991
996
  log.log("info", `${file} (end)`);
992
997
  };
993
998
 
994
- emitter.on(events.interactive, (data) => {
995
- if (!terminalApp) return;
996
- if (data) {
997
- showTerminal(terminalApp);
998
- } else {
999
- hideTerminal(terminalApp);
1000
- }
1001
- });
1002
-
1003
999
  (async () => {
1004
1000
  // console.log(await system.getPrimaryDisplay());
1005
1001
 
package/lib/redraw.js CHANGED
@@ -128,9 +128,9 @@ async function checkCondition(resolve, startTime, timeoutMs) {
128
128
  }
129
129
 
130
130
  // // log redraw as output
131
- let redrawText = screenHasRedrawn ? chalk.green(`✓`) : chalk.dim(`${diffPercent}/${redrawThresholdPercent}%`);
132
- let networkText = networkSettled ? chalk.green(`✓`) : chalk.dim(`${Math.floor((networkCooldownMs - (Date.now() - lastUnsettled)) / 1000)}/${Math.floor(networkCooldownMs/1000)}s`);
133
- let timeoutText = isTimeout ? chalk.green(`✓`) : chalk.dim(`${Math.floor((timeElapsed)/1000)}/${(timeoutMs / 1000)}s`);
131
+ let redrawText = screenHasRedrawn ? chalk.green(`y`) : chalk.dim(`${diffPercent}/${redrawThresholdPercent}%`);
132
+ let networkText = networkSettled ? chalk.green(`y`) : chalk.dim(`${Math.floor((networkCooldownMs - (Date.now() - lastUnsettled)) / 1000)}/${Math.floor(networkCooldownMs/1000)}s`);
133
+ let timeoutText = isTimeout ? chalk.green(`y`) : chalk.dim(`${Math.floor((timeElapsed)/1000)}/${(timeoutMs / 1000)}s`);
134
134
 
135
135
  console.log(` `, chalk.dim('redraw='), redrawText, chalk.dim('network='), networkText, chalk.dim('timeout='), timeoutText);
136
136
 
@@ -13,7 +13,7 @@ module.exports = (inputVersion) => {
13
13
  // Compare major and minor versions
14
14
  if (
15
15
  inputParsed.major === currentParsed.major &&
16
- inputParsed.minor >= currentParsed.minor
16
+ inputParsed.minor <= currentParsed.minor
17
17
  ) {
18
18
  return true;
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "4.1.7",
3
+ "version": "4.1.9",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {