Adding session id as part of json o/p (#14504)

This commit is contained in:
Jainam M
2025-12-04 22:36:20 +05:30
committed by GitHub
parent 645c95352e
commit 86daca4828
8 changed files with 126 additions and 27 deletions

View File

@@ -428,7 +428,9 @@ export async function runNonInteractive({
} else if (config.getOutputFormat() === OutputFormat.JSON) {
const formatter = new JsonFormatter();
const stats = uiTelemetryService.getMetrics();
textOutput.write(formatter.format(responseText, stats));
textOutput.write(
formatter.format(config.getSessionId(), responseText, stats),
);
} else {
textOutput.ensureTrailingNewline(); // Ensure a final newline
}