更新命令前缀为'npx -y dpml-prompt',移除快照版本,确保一致性和简化使用说明。

This commit is contained in:
sean
2025-06-02 11:45:47 +08:00
parent 4759ba12f7
commit fc217ec5da
2 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@
### 启动指令 ### 启动指令
```bash ```bash
npx -y dpml-prompt@snapshot init npx -y dpml-prompt init
``` ```
## 👤 快速开始(人类阅读区) ## 👤 快速开始(人类阅读区)

View File

@ -53,9 +53,9 @@ function detectCommandPrefix() {
// 3. npm环境变量检测 // 3. npm环境变量检测
if (process.env.npm_execpath?.includes('npx') || if (process.env.npm_execpath?.includes('npx') ||
process.env.npm_config_user_agent?.includes('npx')) { process.env.npm_config_user_agent?.includes('npx')) {
_cachedPrefix = 'npx dpml-prompt@snapshot' _cachedPrefix = 'npx -y dpml-prompt'
} else { } else {
_cachedPrefix = 'npx dpml-prompt@snapshot' // 默认值保持安全 _cachedPrefix = 'npx -y dpml-prompt' // 默认值保持安全
} }
return _cachedPrefix return _cachedPrefix
@ -88,7 +88,7 @@ function reconstructCommandPrefix() {
// 如果找不到 init 或解析失败,使用环境变量判断 // 如果找不到 init 或解析失败,使用环境变量判断
if (process.env.npm_execpath && process.env.npm_execpath.includes('npx')) { if (process.env.npm_execpath && process.env.npm_execpath.includes('npx')) {
return 'npx dpml-prompt@snapshot' return 'npx -y dpml-prompt'
} }
return 'dpml-prompt' return 'dpml-prompt'