feat: 扩展 Sub2API 成本与余额运维

This commit is contained in:
Codex
2026-07-15 03:39:57 +02:00
parent 430538eb67
commit ef09b1d0a8
20 changed files with 584 additions and 44 deletions
@@ -29,6 +29,15 @@ export function renderRuntimeMutationResult(ok: boolean, options: RuntimeOptions
stringValue(write.error) ?? stringValue(item.reconcileError) ?? "-",
]),
]));
else if (options.kind === "account-name") lines.push(renderTable([
["ACCOUNT", "ID", "CHANGE", "WRITE", "RECONCILED", "BEFORE_NAME", "DESIRED_NAME", "ACTUAL_NAME", "FAILURE"],
...fields.map(({ item, write, before, desired, actual }) => [
stringValue(item.accountName) ?? "-", String(item.accountId ?? "-"), stringValue(item.change) ?? "-",
stringValue(write.status) ?? "-", item.reconciled === true ? "true" : item.reconciled === false ? "false" : "-",
stringValue(before.name) ?? "-", stringValue(desired.name) ?? "-", stringValue(actual.name) ?? "-",
stringValue(write.error) ?? stringValue(item.reconcileError) ?? "-",
]),
]));
else lines.push(renderTable([
["ACCOUNT", "ID", "CHANGE", "WRITE", "RECONCILED", "BEFORE", "DESIRED", "ACTUAL", "BEFORE_CODES", "DESIRED_CODES", "ACTUAL_CODES", "FAILURE"],
...fields.map(({ item, write, before, desired, actual }) => {