Skip to content

armgit / Ix

Public Imported from GitHub
0

Understand any codebase instantly. System intelligence for codebases, built for humans and AI.

feat: consistent name display across all formatters

riley02277b2cace2742d
diff --git a/ix-cli/src/cli/format.ts b/ix-cli/src/cli/format.ts
index 7fa0ebc6..787abd33 100644
--- a/ix-cli/src/cli/format.ts
+++ b/ix-cli/src/cli/format.ts
@@ -110,7 +110,7 @@ export function formatDecisions(nodes: any[], format: string): void {
}
for (const n of nodes) {
const shortId = n.id.length > 8 ? n.id.slice(0, 8) : n.id;
- const title = n.attrs?.title ?? n.name ?? "(untitled)";
+ const title = n.name || n.attrs?.title || n.attrs?.name || "(untitled)";
const rationale = n.attrs?.rationale ?? "";
console.log(
` ${chalk.blue("*")} ${chalk.dim(shortId)} ${chalk.bold(title)}`
@@ -320,8 +320,8 @@ export function formatEdgeResults(nodes: any[], relation: string, symbol: string
console.log(`${chalk.bold(relation)} of ${chalk.cyan(symbol)}:`);
for (const n of nodes) {
const shortId = n.id?.slice(0, 8) ?? "";
- const name = n.attrs?.name ?? n.name ?? n.id;
- console.log(` ${chalk.cyan(n.kind)} ${chalk.dim(shortId)} ${name}`);
+ const name = n.name || n.attrs?.name || n.id;
+ console.log(` ${chalk.cyan((n.kind ?? "").padEnd(10))} ${chalk.dim(shortId)} ${chalk.bold(name)}`);
}
}