feat: expose stop_reason on SDKResultMessage (#30)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -279,6 +279,7 @@ export interface SDKResultMessage {
|
||||
success: boolean;
|
||||
result?: string;
|
||||
error?: string;
|
||||
stopReason?: string;
|
||||
durationMs: number;
|
||||
totalCostUsd?: number;
|
||||
conversationId: string | null;
|
||||
|
||||
Reference in New Issue
Block a user