Refine quota guidance, dedupe diagnostics, and webhook readiness check
This commit is contained in:
1 parent
3253fd71fc
commit
f6230b8261
4 files changed
+87
-71
No files matched your search
@@ -157,7 +157,7 @@ export async function diagnoseTenantContract(
|
||||
status: "fail",
|
||||
summary: `当前额度已耗尽 (余量 0 点),无法执行审批模拟或回归测试`,
|
||||
details: { balance, deductionAmount, estimatedRuns },
|
||||
recommendation: "请联系管理员为企业充值 AI 审批额度"
|
||||
recommendation: `请前往后台充值补充额度 (可通过 seal-use auth link --corp ${corp.id} 免密直达)`
|
||||
});
|
||||
} else if (estimatedRuns < 10) {
|
||||
quotaInfo.status = "low";
|
||||
@@ -167,7 +167,7 @@ export async function diagnoseTenantContract(
|
||||
status: "warn",
|
||||
summary: `额度偏低:剩余 ${balance} 点 (单笔扣除 ${deductionAmount} 点),仅可支持约 ${estimatedRuns} 笔审核`,
|
||||
details: { balance, deductionAmount, estimatedRuns },
|
||||
recommendation: "建议在发起大规模自动化回归前充值补充额度"
|
||||
recommendation: `建议补充额度 (可通过 seal-use auth link --corp ${corp.id} 免密直达)`
|
||||
});
|
||||
} else {
|
||||
quotaInfo.status = "sufficient";
|
||||
@@ -275,10 +275,9 @@ export async function diagnoseTenantContract(
|
||||
checks.push({
|
||||
id: "webhook_integrations",
|
||||
name: "单据推送 Webhook 通道",
|
||||
status: "warn",
|
||||
summary: "未配置任何 Webhook 集成通道,执行重放测试时将自动创建临时回放通道",
|
||||
details: { integrationCount: 0 },
|
||||
recommendation: "可运行 seal-use webhook add --name (回放通道) 手动注册专属通道"
|
||||
status: "pass",
|
||||
summary: "未配置任何 Webhook 集成通道 (日常审批无影响;若需自动化系统推流或单据重放将自动创建)",
|
||||
details: { integrationCount: 0 }
|
||||
});
|
||||
} else {
|
||||
checks.push({
|
||||
@@ -418,6 +417,9 @@ export function formatTenantDoctorDashboard(diagnosis: TenantDoctorDiagnosis): s
|
||||
|
||||
lines.push(" " + "─".repeat(60));
|
||||
lines.push(` 检查汇总: 通过 ${summary.passedChecks} · 告警 ${summary.warningChecks} · 失败 ${summary.failedChecks}`);
|
||||
if (quota.status === "exhausted" || quota.status === "low") {
|
||||
lines.push(` 👉 Next action: seal-use auth link --corp ${corp.id}`);
|
||||
}
|
||||
lines.push("");
|
||||
|
||||
return lines.join("\n");
|
||||
|
||||
Reference in new issue
Block a user