From fc217ec5daba1aae8103666e49e4a21d8d9b9267 Mon Sep 17 00:00:00 2001 From: sean Date: Mon, 2 Jun 2025 11:45:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=91=BD=E4=BB=A4=E5=89=8D?= =?UTF-8?q?=E7=BC=80=E4=B8=BA'npx=20-y=20dpml-prompt'=EF=BC=8C=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E5=BF=AB=E7=85=A7=E7=89=88=E6=9C=AC=EF=BC=8C=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E4=B8=80=E8=87=B4=E6=80=A7=E5=92=8C=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E8=AF=B4=E6=98=8E=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- src/constants.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cfd3654..015917d 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ### 启动指令 ```bash -npx -y dpml-prompt@snapshot init +npx -y dpml-prompt init ``` ## 👤 快速开始(人类阅读区) diff --git a/src/constants.js b/src/constants.js index 970ae6c..d82f563 100644 --- a/src/constants.js +++ b/src/constants.js @@ -53,9 +53,9 @@ function detectCommandPrefix() { // 3. npm环境变量检测 if (process.env.npm_execpath?.includes('npx') || process.env.npm_config_user_agent?.includes('npx')) { - _cachedPrefix = 'npx dpml-prompt@snapshot' + _cachedPrefix = 'npx -y dpml-prompt' } else { - _cachedPrefix = 'npx dpml-prompt@snapshot' // 默认值保持安全 + _cachedPrefix = 'npx -y dpml-prompt' // 默认值保持安全 } return _cachedPrefix @@ -88,7 +88,7 @@ function reconstructCommandPrefix() { // 如果找不到 init 或解析失败,使用环境变量判断 if (process.env.npm_execpath && process.env.npm_execpath.includes('npx')) { - return 'npx dpml-prompt@snapshot' + return 'npx -y dpml-prompt' } return 'dpml-prompt'