diff --git a/src/aipro-cli.ts b/src/aipro-cli.ts index 3f2b0f0..f7be385 100644 --- a/src/aipro-cli.ts +++ b/src/aipro-cli.ts @@ -147,8 +147,8 @@ export async function runAiProCli(rawArgs: string[]): Promise<{ stdout: string; }); const scopes = repo.listScopes().map((s) => ({ - index: s.index, - scope: s.scope, + 索引号: s.index, + 适用场景: s.scope, })); return { stdout: JSON.stringify(scopes, null, 2) + "\n", stderr: "", exitCode: 0 }; } @@ -297,7 +297,7 @@ export async function runAiProCli(rawArgs: string[]): Promise<{ stdout: string; }; } - const rulesMap = new Map(); + const rulesMap = new Map(); const notFound: number[] = []; for (const idx of uniqueIndexes) { @@ -309,8 +309,9 @@ export async function runAiProCli(rawArgs: string[]): Promise<{ stdout: string; for (const r of detail.rules) { if (!rulesMap.has(r.code)) { rulesMap.set(r.code, { - code: r.code, - text: r.body, + 编号: r.code, + 适用场景: detail.scope, + 规则明细: r.body, }); } } @@ -324,8 +325,8 @@ export async function runAiProCli(rawArgs: string[]): Promise<{ stdout: string; }; } - // 按照 code 顺序平铺规则 (形态 1) - const flattenedRules = Array.from(rulesMap.values()).sort((a, b) => a.code - b.code); + // 按照 编号 顺序平铺规则 + const flattenedRules = Array.from(rulesMap.values()).sort((a, b) => a.编号 - b.编号); repo.logAiProAction({ action: "rules", diff --git a/src/domains/approval/repository.ts b/src/domains/approval/repository.ts index c4901be..35aae7f 100644 --- a/src/domains/approval/repository.ts +++ b/src/domains/approval/repository.ts @@ -697,7 +697,7 @@ export interface CreateAiProLogInput { documentSn?: string | null; operator?: string | null; args?: string | null; - status: "SUCCESS" | "BLOCKED" | "ERROR"; + status?: "SUCCESS" | "BLOCKED" | "ERROR"; decision?: ApprovalDecision | null; summary?: string | null; }