mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-09 17:28:58 +00:00
docs(pages): deduplicate scan preview section and add review preview card (#255)
Merge the redundant scan --preview standalone section into its existing card with richer copy, and add a matching Dry-Run Preview card to the ocr review advanced usage section. Updates en/zh/ja i18n files.
This commit is contained in:
parent
2301ee00cc
commit
2a5c894635
4 changed files with 23 additions and 16 deletions
|
|
@ -156,6 +156,8 @@ export const en: TranslationKeys = {
|
|||
'docs.reviewJsonDesc': 'Output results in structured JSON format for programmatic processing.',
|
||||
'docs.reviewAgent': 'Agent Mode',
|
||||
'docs.reviewAgentDesc': 'Output only the final summary without execution process, suitable for automation pipelines.',
|
||||
'docs.reviewPreviewLabel': 'Dry-Run Preview',
|
||||
'docs.reviewPreviewDesc': 'Lists the files that would be reviewed along with stats (file count, changed lines) — no LLM calls, no cost. Useful for checking scope before a full review.',
|
||||
'docs.reviewFlags': 'Flag Reference',
|
||||
'docs.reviewFlagCol1': 'Flag',
|
||||
'docs.reviewFlagCol2': 'Description',
|
||||
|
|
@ -189,10 +191,8 @@ export const en: TranslationKeys = {
|
|||
'docs.scanUsagePathDesc': 'Pass a repo-relative directory to narrow the scan.',
|
||||
'docs.scanUsageFile': 'Scan Specific Files',
|
||||
'docs.scanUsageFileDesc': 'Comma-separated file paths also work.',
|
||||
'docs.scanUsagePreviewLabel': 'Preview Without Calling the LLM',
|
||||
'docs.scanUsagePreviewDesc': 'List which files would be scanned first — no LLM calls, no cost.',
|
||||
'docs.scanPreview': 'Dry-Run with --preview',
|
||||
'docs.scanPreviewDesc': '<code>--preview</code> (<code>-p</code>) enumerates every file the scan would touch and applies the same include/exclude filtering as a real run, but stops before any LLM call. It reports the total file count, how many are reviewable vs. excluded (and why), and total line count - useful for checking scope before spending tokens on a large repository.',
|
||||
'docs.scanUsagePreviewLabel': 'Dry-Run Preview',
|
||||
'docs.scanUsagePreviewDesc': 'Lists every file in scope and reports stats (total count, reviewable vs. excluded with reasons, total lines) — no LLM calls, no cost. Useful for checking scope before spending tokens on a large repository.',
|
||||
'docs.scanBatching': 'Batching Strategies',
|
||||
'docs.scanBatchingDesc': 'The <code>--batch</code> flag controls how files are grouped into review batches. The scan template defaults to <code>by-language</code>; an empty or unrecognized value falls back to <code>none</code>.',
|
||||
'docs.scanBatchingNone': 'none',
|
||||
|
|
|
|||
|
|
@ -158,6 +158,8 @@ export const ja: TranslationKeys = {
|
|||
'docs.reviewJsonDesc': '構造化 JSON 形式で結果を出力し、プログラム処理に対応します。',
|
||||
'docs.reviewAgent': 'Agent モード',
|
||||
'docs.reviewAgentDesc': '実行プロセスを表示せず最終サマリーのみ出力。自動化パイプラインに適しています。',
|
||||
'docs.reviewPreviewLabel': 'Dry-Run プレビュー',
|
||||
'docs.reviewPreviewDesc': 'レビュー対象のファイル一覧と統計情報(ファイル数、変更行数)を表示します。LLM 呼び出しなし、コストなし —— 本番レビュー前にスコープを確認するのに役立ちます。',
|
||||
'docs.reviewFlags': 'フラグリファレンス',
|
||||
'docs.reviewFlagCol1': 'フラグ',
|
||||
'docs.reviewFlagCol2': '説明',
|
||||
|
|
@ -191,10 +193,8 @@ export const ja: TranslationKeys = {
|
|||
'docs.scanUsagePathDesc': 'リポジトリ相対のディレクトリを指定してスキャン範囲を絞り込みます。',
|
||||
'docs.scanUsageFile': '特定のファイルをスキャン',
|
||||
'docs.scanUsageFileDesc': 'カンマ区切りの複数ファイルパスも指定できます。',
|
||||
'docs.scanUsagePreviewLabel': 'LLM を呼び出さずにプレビュー',
|
||||
'docs.scanUsagePreviewDesc': 'まずスキャン対象のファイル一覧を表示します —— LLM 呼び出しなし、コストなし。',
|
||||
'docs.scanPreview': '--preview による Dry-Run',
|
||||
'docs.scanPreviewDesc': '<code>--preview</code>(<code>-p</code>)は、スキャン対象となるすべてのファイルを列挙し、実際の実行と同じ包含/除外フィルタリングを適用しますが、LLM 呼び出しの前に停止します。ファイルの総数、レビュー対象と除外対象の数(および理由)、総行数を報告します。大きなリポジトリでトークンを消費する前にスコープを確認するのに役立ちます。',
|
||||
'docs.scanUsagePreviewLabel': 'Dry-Run プレビュー',
|
||||
'docs.scanUsagePreviewDesc': 'スキャン範囲内のすべてのファイルを列挙し、統計情報(ファイル総数、レビュー対象/除外数と理由、総行数)を報告します。LLM 呼び出しなし、コストなし —— 大きなリポジトリでトークンを消費する前にスコープを確認するのに役立ちます。',
|
||||
'docs.scanBatching': 'バッチ処理戦略',
|
||||
'docs.scanBatchingDesc': '<code>--batch</code> フラグは、ファイルがどのようにレビューバッチへグループ化されるかを制御します。スキャンテンプレートのデフォルトは <code>by-language</code> です。空の値や認識できない値は <code>none</code> にフォールバックします。',
|
||||
'docs.scanBatchingNone': 'none',
|
||||
|
|
|
|||
|
|
@ -158,6 +158,8 @@ export const zh: TranslationKeys = {
|
|||
'docs.reviewJsonDesc': '以结构化 JSON 格式输出结果,便于程序化处理。',
|
||||
'docs.reviewAgent': 'Agent 模式',
|
||||
'docs.reviewAgentDesc': '仅输出最终摘要,不显示执行过程,适用于自动化流水线。',
|
||||
'docs.reviewPreviewLabel': 'Dry-Run 预览',
|
||||
'docs.reviewPreviewDesc': '列出将被审查的文件及统计信息(文件总数、变更行数),但不调用 LLM,不产生费用 —— 适合在正式审查前确认范围。',
|
||||
'docs.reviewFlags': '参数参考',
|
||||
'docs.reviewFlagCol1': '参数',
|
||||
'docs.reviewFlagCol2': '描述',
|
||||
|
|
@ -191,10 +193,8 @@ export const zh: TranslationKeys = {
|
|||
'docs.scanUsagePathDesc': '传入相对于仓库根目录的目录以缩小扫描范围。',
|
||||
'docs.scanUsageFile': '扫描指定文件',
|
||||
'docs.scanUsageFileDesc': '也支持以逗号分隔的多个文件路径。',
|
||||
'docs.scanUsagePreviewLabel': '预览而不调用 LLM',
|
||||
'docs.scanUsagePreviewDesc': '先列出将被扫描的文件 —— 不调用 LLM,不产生费用。',
|
||||
'docs.scanPreview': '使用 --preview 进行 Dry-Run',
|
||||
'docs.scanPreviewDesc': '<code>--preview</code>(<code>-p</code>)会枚举扫描将涉及的每个文件,并应用与实际运行相同的包含/排除过滤逻辑,但会在调用 LLM 之前停止。它会报告文件总数、可审查与被排除的数量(及原因)以及总行数 —— 便于在大型仓库上花费 token 之前检查扫描范围。',
|
||||
'docs.scanUsagePreviewLabel': 'Dry-Run 预览',
|
||||
'docs.scanUsagePreviewDesc': '列出扫描范围内的所有文件并报告统计信息(文件总数、可审查/被排除数量及原因、总行数),但不调用 LLM,不产生费用 —— 适合在大型仓库上正式扫描前确认范围。',
|
||||
'docs.scanBatching': '批处理策略',
|
||||
'docs.scanBatchingDesc': '<code>--batch</code> 参数控制文件如何被分组为审查批次。扫描模板默认使用 <code>by-language</code>;空值或无法识别的值会回退为 <code>none</code>。',
|
||||
'docs.scanBatchingNone': 'none',
|
||||
|
|
|
|||
|
|
@ -360,6 +360,17 @@ const DocsPage: React.FC = () => {
|
|||
</div>
|
||||
<CodeBlock code="ocr review --audience agent" onCopy={() => handleCopy('ocr review --audience agent')} />
|
||||
</div>
|
||||
{/* Dry-Run Preview */}
|
||||
<div style={{ background: 'rgba(255,255,255,0.04)', borderRadius: 12, padding: 16, border: '1px solid rgba(255,255,255,0.16)' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 12, marginBottom: 12 }}>
|
||||
<IconBox icon={docCheckCircleIcon} />
|
||||
<div style={{ display: 'flex', flex: 1, flexDirection: 'column' }}>
|
||||
<span style={{ fontSize: 14, fontWeight: 500, color: '#FFFFFF' }}>{t('docs.reviewPreviewLabel')}</span>
|
||||
<p style={{ margin: 0, fontSize: 13, color: 'rgba(255,255,255,0.5)', lineHeight: '20px' }}>{t('docs.reviewPreviewDesc')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<CodeBlock code="ocr review --preview" onCopy={() => handleCopy('ocr review --preview')} />
|
||||
</div>
|
||||
|
||||
<p style={subTitle}>{t('docs.reviewFlags')}</p>
|
||||
{/* Flags table */}
|
||||
|
|
@ -468,10 +479,6 @@ const DocsPage: React.FC = () => {
|
|||
<CodeBlock code="ocr scan --preview" onCopy={() => handleCopy('ocr scan --preview')} />
|
||||
</div>
|
||||
|
||||
<p style={subTitle}>{t('docs.scanPreview')}</p>
|
||||
<p style={desc}>{t('docs.scanPreviewDesc').replace(/<\/?code>/g, '')}</p>
|
||||
<CodeBlock code="ocr scan --preview" onCopy={() => handleCopy('ocr scan --preview')} />
|
||||
|
||||
<p style={subTitle}>{t('docs.scanBatching')}</p>
|
||||
<p style={desc}>{t('docs.scanBatchingDesc').replace(/<\/?code>/g, '')}</p>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 4, marginBottom: 16 }}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue