myagent-ai 1.15.35 → 1.15.36
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/README.md +14 -0
- package/package.json +1 -1
- package/start.js +13 -5
package/README.md
CHANGED
|
@@ -123,6 +123,20 @@ powershell -c "irm https://raw.githubusercontent.com/ctz168/myagent/main/install
|
|
|
123
123
|
curl -fsSL https://raw.githubusercontent.com/ctz168/myagent/main/install/install.sh | bash
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
+
### 一键重装(跳过依赖检查)
|
|
127
|
+
|
|
128
|
+
> 已安装过 MyAgent 的环境下,快速升级/重装,不检查 Python/Node.js 和 pip 依赖。
|
|
129
|
+
|
|
130
|
+
**Windows(PowerShell):**
|
|
131
|
+
```powershell
|
|
132
|
+
powershell -c "& ([scriptblock]::Create((irm https://raw.githubusercontent.com/ctz168/myagent/main/install/install.ps1))) -NoDeps"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**macOS / Linux:**
|
|
136
|
+
```bash
|
|
137
|
+
curl -fsSL https://raw.githubusercontent.com/ctz168/myagent/main/install/install.sh | bash -s -- --no-deps
|
|
138
|
+
```
|
|
139
|
+
|
|
126
140
|
---
|
|
127
141
|
|
|
128
142
|
## 📋 系统要求
|
package/package.json
CHANGED
package/start.js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* myagent-ai setup # 配置向导
|
|
18
18
|
* myagent-ai reinstall # 重新安装依赖到 venv
|
|
19
19
|
* myagent-ai uninstall # 卸载 MyAgent(删除npm包+数据)
|
|
20
|
+
* myagent-ai --skip-deps # 跳过依赖检查,直接启动
|
|
20
21
|
*/
|
|
21
22
|
"use strict";
|
|
22
23
|
|
|
@@ -524,11 +525,18 @@ function main() {
|
|
|
524
525
|
console.log(" \x1b[1m\x1b[36mMyAgent\x1b[0m - 本地桌面端执行型 AI 助手");
|
|
525
526
|
console.log("");
|
|
526
527
|
|
|
528
|
+
// 是否跳过依赖检查
|
|
529
|
+
const skipDeps = userArgs.includes("--skip-deps") || userArgs.includes("--no-deps");
|
|
530
|
+
// 从参数中移除 --skip-deps/--no-deps,避免传入 main.py
|
|
531
|
+
const filteredArgs = userArgs.filter(a => a !== "--skip-deps" && a !== "--no-deps");
|
|
532
|
+
|
|
527
533
|
// 确保 venv 存在
|
|
528
534
|
const { venvDir, venvPython, isNew } = ensureVenv();
|
|
529
535
|
|
|
530
|
-
//
|
|
531
|
-
if (
|
|
536
|
+
// 检查并安装依赖(--skip-deps 时跳过)
|
|
537
|
+
if (skipDeps) {
|
|
538
|
+
console.log(" \x1b[90m[i]\x1b[0m 跳过依赖检查(--skip-deps)");
|
|
539
|
+
} else if (isNew) {
|
|
532
540
|
installDeps(venvPython, getVenvPip(venvDir), pkgDir);
|
|
533
541
|
} else {
|
|
534
542
|
// 即使 venv 已存在,也快速检查核心依赖
|
|
@@ -550,9 +558,9 @@ function main() {
|
|
|
550
558
|
console.log(` \x1b[90m[i]\x1b[0m Python: ${venvPython}`);
|
|
551
559
|
console.log("");
|
|
552
560
|
|
|
553
|
-
// 构建 Python
|
|
554
|
-
let mode =
|
|
555
|
-
let pyArgs = buildArgs(
|
|
561
|
+
// 构建 Python 参数(使用过滤后的参数)
|
|
562
|
+
let mode = filteredArgs[0] || "";
|
|
563
|
+
let pyArgs = buildArgs(filteredArgs);
|
|
556
564
|
|
|
557
565
|
// 首次运行且未指定模式 → 自动选择 web 模式
|
|
558
566
|
if (isFirstRun && !mode) {
|