feat(cli): migrate nonInteractiveCli to LegacyAgentSession (#22987)

This commit is contained in:
Adam Weidman
2026-04-02 16:21:40 -04:00
committed by GitHub
parent 7c3469713d
commit 6fb58bd31f
15 changed files with 3241 additions and 106 deletions
+2 -1
View File
@@ -6,6 +6,7 @@
import stripAnsi from 'strip-ansi';
import type { SessionMetrics } from '../telemetry/uiTelemetry.js';
import { getErrorType } from '../utils/errors.js';
import type { JsonError, JsonOutput } from './types.js';
export class JsonFormatter {
@@ -42,7 +43,7 @@ export class JsonFormatter {
sessionId?: string,
): string {
const jsonError: JsonError = {
type: error.constructor.name,
type: getErrorType(error),
message: stripAnsi(error.message),
...(code && { code }),
};