From 23bfdecbb878d342c86b0b2a2853b97ee747b801 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Sun, 2 Aug 2026 20:36:31 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E8=BF=87=E6=97=B6?= =?UTF-8?q?=E7=9A=84=20PowerShell=20=E7=89=88=E6=9C=AC/=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - edge/AGENTS.md:硬编码的 WindowsApps MSIX 路径 Microsoft.PowerShell_7.6.0.0 已过时,改为用 PATH 中的 pwsh(当前 7.6.4,位于 C:\Program Files\PowerShell\7) - control/AGENTS.md:版本号 v7.6.1 → v7.6.4 --- control/AGENTS.md | 2 +- edge/AGENTS.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/control/AGENTS.md b/control/AGENTS.md index 629e705..ec0ba67 100644 --- a/control/AGENTS.md +++ b/control/AGENTS.md @@ -112,7 +112,7 @@ The config preview rendering pipeline: merge template + profile + overlays → r - **No tabs**: use spaces for indentation in all source files. - **No `fetch()` in templates** for page data — all API calls must go through Go server-side handlers. JS is only for UI interactivity (modals, carousels, confirm dialogs). - **No inline `onclick` with complex quoting** — use `data-*` attributes + event delegation instead. -- **Use `pwsh`** for PowerShell commands (v7.6.1 in PATH, not `powershell.exe`). +- **Use `pwsh`** for PowerShell commands (v7.6.4 in PATH — `C:\Program Files\PowerShell\7`, not `powershell.exe`). - **重启服务**:统一用 `pwsh -File scripts/safesightd.ps1 restart`,它会先编译、停旧进程、再启动新进程并做健康检查。不要手动 kill + build + start。 - **如无必要,不使用数据库事务**:SQLite 只允许一个写者,事务会阻塞所有其他写操作。单个 `Exec` 已是原子操作,绝大多数场景不需要包裹事务。仅模板重命名等必须原子完成的多步操作才用事务。 - **调试时只加日志,不改代码**:遇到 bug 先用 `fmt.Printf` 全量打印关键路径的状态和数据流,定位根因后再动手修。不要猜测、不要加 workaround(重试、超时、锁之类)。 diff --git a/edge/AGENTS.md b/edge/AGENTS.md index 39e05c6..b5b6a3d 100644 --- a/edge/AGENTS.md +++ b/edge/AGENTS.md @@ -24,8 +24,8 @@ This repository is a plugin-based C++ video analytics system for RK3588. Develop ## Shell Environment Rules -- For agent-run shell commands on this workstation, use PowerShell 7.6 instead of Windows PowerShell 5.1. -- Prefer explicit invocation via `C:\Program Files\WindowsApps\Microsoft.PowerShell_7.6.0.0_x64__8wekyb3d8bbwe\pwsh.exe` when running commands. +- For agent-run shell commands on this workstation, use PowerShell 7.6 (current: 7.6.4, installed at `C:\Program Files\PowerShell\7\pwsh.exe`, first in user PATH) instead of Windows PowerShell 5.1. +- Prefer invoking `pwsh` from PATH (resolves to 7.6.4); do not hardcode old WindowsApps MSIX paths (`Microsoft.PowerShell_7.6.0.0` is obsolete). - Do not rely on the system-default `powershell.exe` resolving to the desired version. ## Plugin and Architecture Rules