@maintainer-pro/ai-bridge 0.1.4 → 0.1.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/package.json +1 -1
- package/src/daemon.mjs +12 -9
package/package.json
CHANGED
package/src/daemon.mjs
CHANGED
|
@@ -1100,6 +1100,7 @@ function runLauncher(command, args, extra = {}) {
|
|
|
1100
1100
|
child = spawn(command, args, {
|
|
1101
1101
|
stdio: ["ignore", "pipe", "pipe"],
|
|
1102
1102
|
windowsHide: extra.windowsHide,
|
|
1103
|
+
windowsVerbatimArguments: Boolean(extra.windowsVerbatimArguments),
|
|
1103
1104
|
});
|
|
1104
1105
|
} catch (err) {
|
|
1105
1106
|
done({
|
|
@@ -1163,15 +1164,17 @@ async function openInNewTerminal(opts) {
|
|
|
1163
1164
|
|
|
1164
1165
|
try {
|
|
1165
1166
|
if (process.platform === "win32") {
|
|
1166
|
-
const
|
|
1167
|
-
|
|
1168
|
-
"
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1167
|
+
const safeTitle =
|
|
1168
|
+
String(title || "Maintainer Pro").replace(/["&<>|^]/g, " ").trim() ||
|
|
1169
|
+
"Maintainer Pro";
|
|
1170
|
+
const body = [envWin, `title ${safeTitle}`, command]
|
|
1171
|
+
.filter(Boolean)
|
|
1172
|
+
.join("&& ");
|
|
1173
|
+
const opened = await runLauncher(
|
|
1174
|
+
process.env.ComSpec || "cmd.exe",
|
|
1175
|
+
["/d", "/s", "/c", `start "${safeTitle}" /D "${folder}" cmd.exe /k ${body}`],
|
|
1176
|
+
{ windowsVerbatimArguments: true }
|
|
1177
|
+
);
|
|
1175
1178
|
if (!opened.ok) {
|
|
1176
1179
|
return { ok: false, error: friendlyLaunchError(opened.error, title) };
|
|
1177
1180
|
}
|