agentgui 1.0.37 → 1.0.38
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/bin/gmgui.cjs +7 -5
- package/package.json +1 -1
package/bin/gmgui.cjs
CHANGED
|
@@ -48,17 +48,19 @@ async function gmgui(args = []) {
|
|
|
48
48
|
stdio: 'inherit'
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
-
ps.on('error',
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
ps.on('error', (err) => {
|
|
52
|
+
console.error(`Failed to start server: ${err.message}`);
|
|
53
|
+
reject(err);
|
|
54
|
+
});
|
|
55
55
|
|
|
56
|
-
// If server exits, keep this process alive
|
|
57
56
|
ps.on('exit', (code) => {
|
|
58
57
|
if (code !== 0) {
|
|
59
58
|
console.error(`Server exited with code ${code}`);
|
|
59
|
+
// Don't reject - keep the promise pending so process stays alive
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
+
|
|
63
|
+
// Never resolve this promise - keeps the process alive indefinitely
|
|
62
64
|
});
|
|
63
65
|
} else {
|
|
64
66
|
throw new Error(`Unknown command: ${command}`);
|