@cnbcool/cnb-api-generate 2.7.2 → 2.7.4
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.
|
@@ -84,9 +84,12 @@ function flattenToolOptions(toolInfo) {
|
|
|
84
84
|
? (0, clean_array_desc_1.cleanArrayDesc)((0, trim_summary_1.trimSummary)(prop.description || ''))
|
|
85
85
|
: (0, trim_summary_1.trimSummary)(prop.description || '');
|
|
86
86
|
const arrayHint = isArray ? ' (可多次传入)' : '';
|
|
87
|
+
const fileRefHint = !isArray && prop.type === 'string' && key === 'body'
|
|
88
|
+
? ' (支持 @file 引用)'
|
|
89
|
+
: '';
|
|
87
90
|
const desc = isRequired
|
|
88
|
-
? `[必填] ${rawDesc}${arrayHint}`
|
|
89
|
-
: `${rawDesc}${arrayHint}`;
|
|
91
|
+
? `[必填] ${rawDesc}${arrayHint}${fileRefHint}`
|
|
92
|
+
: `${rawDesc}${arrayHint}${fileRefHint}`;
|
|
90
93
|
const opt = {
|
|
91
94
|
optKey,
|
|
92
95
|
valuePlaceholder,
|
package/package.json
CHANGED
package/skills-template/SKILL.md
CHANGED
|
@@ -16,6 +16,7 @@ description: CNB 平台交互命令,支持仓库、Issue、PR、流水线、
|
|
|
16
16
|
- **参数自动识别**:快捷命令中的 Issue/PR 编号会自动从环境变量识别,无需额外传递。
|
|
17
17
|
- **默认仅需摘要**:默认会精简响应输出结果,只返回核心字段。添加 `--verbose` 输出完整数据。
|
|
18
18
|
- **单引号传参**:传递多行文本参数时,使用单引号可防止命令注入攻击,并减少不必要的转义。
|
|
19
|
+
- **长文本传参**:当 `--body` 内容超过 3 行或包含复杂格式时,**必须**先将内容写入临时文件,再用 `--body @/tmp/comment.md` 文件引用方式传递,避免 shell 参数截断或转义问题。
|
|
19
20
|
- **快捷命令适用范围**: 快捷命令只能操作当前仓库的当前 Issue/PR,跨仓库或跨编号操作请参考 `更多 API`。
|
|
20
21
|
- **npc提及和召唤的区别**: 评论中直接 @npc 会召唤 npc 干活,如果只提及不召唤,应该去掉 `@` 符号,或使用反引号包裹 `@npc`。
|
|
21
22
|
|