@tencent-ai/codebuddy-code 2.8.0-next.e98bdc1.20251124 → 2.8.1-next.fdcba47.20251125

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/CHANGELOG.md CHANGED
@@ -6,10 +6,33 @@ CodeBuddy Code 的所有重要更新都会记录在这里。
6
6
 
7
7
  ## [未发布]
8
8
 
9
+ ## [2.8.1] - 2025-11-24
10
+
11
+ ### 🔧 功能改进
12
+
13
+ - **运行环境检查**: 启动时自动检查 Node.js 版本,确保运行环境满足最低要求,避免因版本过低导致的问题
14
+ - **ACP 命令列表推送**: 在创建新会话时自动向客户端推送可用命令列表,支持命令自动补全和提示功能
15
+ - **ACP 认证方式优化**: 根据网络环境自动过滤可用的登录方式,提升用户体验
16
+ - **Plan模式重构**: Plan 模式改为使用 Sub-Agent 方式实现
17
+ - **模型图片支持检测**: 自动检测当前模型是否支持图片输入,在不支持时智能过滤图片内容并提示用户,提升跨模型使用体验
18
+ - **权限命令风险调整**: 优化 sudo、su 等权限提升命令的风险分级,从极高风险调整为高风险,充分利用系统自身的密码保护机制,减少不必要的二次确认
19
+ - **设置控制器调试增强**: 增强配置管理相关接口的调试日志输出,便于问题排查
20
+
9
21
  ### 🐛 Bug修复
10
22
 
23
+ - **命令风险检测优化**: 改进 Git 危险命令的正则匹配规则,提升强制推送和删除分支等高风险操作的检测准确性
24
+ - **Windows 路径处理**: 修复 Windows 系统下路径验证的大小写敏感问题,提升路径处理的准确性和稳定性
11
25
  - **用户交互工具控制**: 修复用户问答工具在非交互模式下的启用逻辑,确保工具仅在交互式且非 ACP 模式下可用
12
26
  - **专享版配置**: 修复专享版环境识别错误导致的配置加载异常
27
+ - **粘贴检测兼容性**: 临时禁用在部分环境中不准确的粘贴检测功能,避免误触发剪贴板读取
28
+
29
+ ### 📝 文档更新
30
+
31
+ - **非交互模式使用指南**: 大幅增强非交互模式文档说明,详细说明 `--dangerously-skip-permissions` 参数的使用场景和重要性,提供完整的使用示例和判断规则
32
+ - **快速开始指南**: 补充非交互模式的关键配置说明,帮助用户快速上手
33
+ - **CLI 参考手册**: 完善命令行参数说明,增加安全提示和最佳实践
34
+ - **ACP 协议文档**: 更新 ACP 文档,说明命令列表推送功能
35
+ - **CodeBuddy 指南**: 更新 CodeBuddy 配置文件
13
36
 
14
37
  ## [2.8.0] - 2025-11-24
15
38
 
package/bin/codebuddy CHANGED
@@ -1,3 +1,39 @@
1
1
  #!/usr/bin/env node
2
+
3
+ // Exit early if on an older version of Node.js (< 18.20.8)
4
+ const PRODUCT_CLI_NAME = 'CodeBuddy Code';
5
+ const minNode = '18.20.8';
6
+
7
+ function compareVersions(current, required) {
8
+ // Extract numeric version parts, ignoring pre-release identifiers (e.g., '14.19.0-rc.0' -> '14.19.0')
9
+ const currentVersion = current.split('-')[0];
10
+ const currentParts = currentVersion.split('.').map(Number);
11
+ const requiredParts = required.split('.').map(Number);
12
+
13
+ // If version format is invalid (e.g., less than 3 parts or contains NaN), skip check
14
+ if (currentParts.length < 3 || currentParts.some(isNaN)) {
15
+ return 0; // Treat as passing the check
16
+ }
17
+
18
+ for (let i = 0; i < 3; i++) {
19
+ const curr = currentParts[i] || 0;
20
+ const req = requiredParts[i] || 0;
21
+ if (curr < req) return -1;
22
+ if (curr > req) return 1;
23
+ }
24
+ return 0;
25
+ }
26
+
27
+ if (compareVersions(process.versions.node, minNode) < 0) {
28
+ // eslint-disable-next-line no-console
29
+ console.error(
30
+ '\n' +
31
+ `${PRODUCT_CLI_NAME} requires Node.js v${minNode} or newer.\n` +
32
+ `You are running Node.js v${process.versions.node}.\n` +
33
+ 'Please upgrade Node.js: https://nodejs.org/en/download/\n',
34
+ );
35
+ process.exit(1);
36
+ }
37
+
2
38
  require('events').EventEmitter.defaultMaxListeners = 50;
3
39
  require('../dist/codebuddy');