feat(cli): report opt-in command timings (#7042)

* feat(cli): report opt-in command timings

* fix(cli): time standalone MCP doctor

* fix(cli): retain timing on doctor errors

* fix(cli): preserve formatted version output with command timings

---------

Co-authored-by: dhruvac29 <dhruvac29@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-10-28 11:53:29 +08:00
1 parent 3d5c73f35c
commit d3b31a0e29
7 files changed
+178 -15

No files matched your search

+5 -1
View File
@@ -180,7 +180,11 @@ export const parseCliOutputArguments = (
const next = arguments_[index + 1];
if (next === undefined || next.startsWith("-")) rootVersion = true;
else versionEligible = false;
} else if (argument !== "--json" && argument !== "--format")
} else if (
argument !== "--json" &&
argument !== "--format" &&
argument !== "--timings"
)
versionEligible = false;
// Incur scans builtins across `--` and reads spaced value forms, which
// normalizeCliArguments has produced. Mirror those effective values.