myagent-ai 1.24.1 → 1.24.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/start.js +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myagent-ai",
3
- "version": "1.24.1",
3
+ "version": "1.24.2",
4
4
  "description": "本地桌面端执行型AI助手 - Open Interpreter 风格 | Local Desktop Execution-Oriented AI Assistant",
5
5
  "main": "main.py",
6
6
  "bin": {
package/start.js CHANGED
@@ -641,7 +641,13 @@ function cmdUninstall() {
641
641
  if (IS_WIN) {
642
642
  execSync('taskkill /F /IM python.exe /FI "WINDOWTITLE eq myagent*" 2>nul', { encoding: "utf8", timeout: 5000 });
643
643
  } else {
644
- execSync("pkill -f 'myagent|main.py' 2>/dev/null", { encoding: "utf8", timeout: 10000 });
644
+ // 排除当前进程 PID,避免 pkill 杀掉 uninstall 脚本自身
645
+ const selfPid = process.pid;
646
+ execSync(
647
+ `pgrep -f 'myagent|main.py' | grep -v '^${selfPid}$' | xargs -r kill 2>/dev/null; sleep 1; ` +
648
+ `pgrep -f 'myagent|main.py' | grep -v '^${selfPid}$' | xargs -r kill -9 2>/dev/null`,
649
+ { encoding: "utf8", timeout: 10000 }
650
+ );
645
651
  }
646
652
  } catch (_) {}
647
653