@alibaba-group/open-code-review 1.1.4 → 1.1.6

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.
Files changed (2) hide show
  1. package/README.zh-CN.md +10 -0
  2. package/package.json +1 -1
package/README.zh-CN.md CHANGED
@@ -103,6 +103,7 @@ ocr review --commit abc123
103
103
  | 命令 | 别名 | 描述 |
104
104
  |------|------|------|
105
105
  | `ocr review` | `ocr r` | 开始代码审查 |
106
+ | `ocr rules check <file>` | — | 预览某个文件路径生效的审查规则 |
106
107
  | `ocr config set <key> <value>` | — | 设置配置项 |
107
108
  | `ocr llm test` | — | 测试 LLM 连通性 |
108
109
  | `ocr viewer` | `ocr v` | 启动 WebUI 会话查看器,地址 `localhost:5483` |
@@ -116,6 +117,7 @@ ocr review --commit abc123
116
117
  | `--from` | — | — | 源引用(如 `main`) |
117
118
  | `--to` | — | — | 目标引用(如 `feature-branch`) |
118
119
  | `--commit` | `-c` | — | 审查单个提交 |
120
+ | `--preview` | `-p` | `false` | 预览将被审查的文件列表,不调用 LLM |
119
121
  | `--format` | `-f` | `text` | 输出格式:`text` 或 `json` |
120
122
  | `--concurrency` | — | `8` | 最大并发文件审查数 |
121
123
  | `--timeout` | — | `10` | 并发任务超时时间(分钟) |
@@ -126,6 +128,10 @@ ocr review --commit abc123
126
128
  ## 示例
127
129
 
128
130
  ```bash
131
+ # 预览将被审查的文件(不调用 LLM)
132
+ ocr review --preview
133
+ ocr review -c abc123 -p
134
+
129
135
  # 使用默认设置审查工作区变更
130
136
  ocr review
131
137
 
@@ -138,6 +144,10 @@ ocr review --commit abc123 --format json --audience agent
138
144
  # 使用自定义审查规则
139
145
  ocr review --rule /path/to/my-rules.json
140
146
 
147
+ # 预览某个文件路径生效的规则
148
+ ocr rules check src/main/java/com/example/Foo.java
149
+ ocr rules check --rule custom.json src/main/resources/mapper/UserMapper.xml
150
+
141
151
  # 在浏览器中查看审查会话历史
142
152
  ocr viewer
143
153
  ocr viewer --addr :3000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alibaba-group/open-code-review",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "OpenCodeReview CLI — AI-powered code review tool",
5
5
  "bin": {
6
6
  "ocr": "bin/ocr.js"