feat: expose stop_reason on SDKResultMessage (#30)

This commit is contained in:
Cameron
2026-02-10 10:13:56 -08:00
committed by GitHub
parent 2fff691f5b
commit b0b82a2a3d
2 changed files with 3 additions and 0 deletions

View File

@@ -408,12 +408,14 @@ export class Session implements AsyncDisposable {
duration_ms: number;
total_cost_usd?: number;
conversation_id: string;
stop_reason?: string;
};
return {
type: "result",
success: msg.subtype === "success",
result: msg.result,
error: msg.subtype !== "success" ? msg.subtype : undefined,
stopReason: msg.stop_reason,
durationMs: msg.duration_ms,
totalCostUsd: msg.total_cost_usd,
conversationId: msg.conversation_id,

View File

@@ -279,6 +279,7 @@ export interface SDKResultMessage {
success: boolean;
result?: string;
error?: string;
stopReason?: string;
durationMs: number;
totalCostUsd?: number;
conversationId: string | null;