testdriverai 4.1.22 → 4.1.24
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 +2 -2
- package/lib/focus-application.js +7 -7
- package/package.json +1 -1
package/agent.js
CHANGED
|
@@ -350,7 +350,7 @@ const runCommand = async (command, depth) => {
|
|
|
350
350
|
return await actOnMarkdown(response, depth);
|
|
351
351
|
}
|
|
352
352
|
} catch (error) {
|
|
353
|
-
if (
|
|
353
|
+
if (thisCommand == "run") {
|
|
354
354
|
console.log("");
|
|
355
355
|
log.log("info", chalk.red("Fatal Error") + `\n${error.message}`);
|
|
356
356
|
await summarize(error.message);
|
|
@@ -954,7 +954,7 @@ const setTerminalApp = async (win) => {
|
|
|
954
954
|
if (process.platform === "win32") {
|
|
955
955
|
terminalApp = win?.title || "";
|
|
956
956
|
} else {
|
|
957
|
-
terminalApp = win?.owner?.
|
|
957
|
+
terminalApp = win?.owner?.bundleId || "";
|
|
958
958
|
}
|
|
959
959
|
};
|
|
960
960
|
|
package/lib/focus-application.js
CHANGED
|
@@ -16,12 +16,12 @@ end tell`;
|
|
|
16
16
|
// set value of attribute "AXMinimized" of every window of application process "${windowName}" to true
|
|
17
17
|
// end tell`;
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
const appleScriptActivate = (windowName) => `
|
|
20
|
+
tell application id "${windowName}"
|
|
21
|
+
set miniaturized of every window to false
|
|
22
|
+
reopen
|
|
23
|
+
activate
|
|
24
|
+
end tell
|
|
25
25
|
`;
|
|
26
26
|
|
|
27
27
|
const runPwsh = (appName, method) => {
|
|
@@ -60,7 +60,7 @@ async function hideTerminal(appName) {
|
|
|
60
60
|
async function showTerminal(appName) {
|
|
61
61
|
try {
|
|
62
62
|
if (platform() == "mac") {
|
|
63
|
-
return await execSync(
|
|
63
|
+
return await execSync(`osascript -e '${appleScriptActivate(appName)}'`);
|
|
64
64
|
} else if (platform() == "windows") {
|
|
65
65
|
return runPwsh(appName, "Restore");
|
|
66
66
|
}
|