Skip to content

v1.3.0 - UI渲染优化与Chat提示词重构

Choose a tag to compare

@IvanLark IvanLark released this 18 Dec 06:43
· 29 commits to main since this release

🎨 主要改动

UI 渲染优化

  • ✅ 修复超长命令导致的渲染错乱(自动换行、限制终端宽度)
  • ✅ 修复取消执行时的重复提示
  • ✅ 新增智能换行函数 wrapText()

Chat 提示词架构重构

  • ✅ 完全重构提示词系统(XML 格式、静态/动态分离)
  • ✅ 新增 CHAT_SYSTEM_PROMPT 静态常量
  • ✅ 新增 buildChatUserContext() 动态构建函数
  • ✅ 系统信息实时更新,每次对话都使用最新上下文
  • ✅ 历史记录优化(只保存纯问答,不含 XML)

Debug 功能修复

  • ✅ 修复 pls chat --debug 不显示调试信息的问题
  • ✅ Workaround Commander.js 14.x option 解析 bug
  • ✅ Debug 信息显示历史对话和 User Context

History Limit 完整修复

  • ✅ 修复 shellHistoryLimit 配置不生效的问题
  • ✅ Hook 代码从配置读取限制(不再硬编码)
  • ✅ 修改配置后自动重装 Hook
  • ✅ 支持本地和远程 Hook

配置优化

  • ✅ 优化默认配置值:
    • chatHistoryLimit: 10 → 5
    • commandHistoryLimit: 10 → 5
    • shellHistoryLimit: 15 → 10

⚠️ 破坏性变更

  • 删除 pls chat clear 命令(请使用 pls history chat clear 代替)

📦 安装方式

npm 安装

```bash
npm install -g @yivan-lab/pretty-please
```

一键安装脚本(无需 Node.js)

```bash

Linux / macOS

curl -fsSL https://raw.githubusercontent.com/IvanLark/pretty-please/main/install.sh | bash

Windows PowerShell

irm https://raw.githubusercontent.com/IvanLark/pretty-please/main/install.ps1 | iex
```

🔄 升级

```bash
pls upgrade
```