595
596
case ActionType.ChatToolCallAuthRequired:
597
>
return refreshSummaryStatus(updateToolCallInParts(state, action.turnId, action.toolCallId, tc => {
reducer.ts
598
>
if (tc.status !== ToolCallStatus.Running) {
599
return tc;
600
}
601
>
// Invariant: auth-required only applies to MCP-contributed tool calls.
reducer.ts
602
>
if (!tc.contributor || tc.contributor.kind !== ToolCallContributorKind.MCP) {
603
return tc;
604
}
605
>
const base = tcBaseWithMeta(tc, action._meta);
reducer.ts
606
>
return {
607
>
status: ToolCallStatus.AuthRequired,
608
>
...base,
609
>
contributor: tc.contributor,
610
>
invocationMessage: tc.invocationMessage,
611
>
toolInput: tc.toolInput,
612
>
confirmed: tc.confirmed,
613
>
...(tc.selectedOption ? { selectedOption: tc.selectedOption } : {}),
614
>
...(tc.content ? { content: tc.content } : {}),
615
>
auth: action.auth,
616
>
};
617
>
}));
618
619
case ActionType.ChatToolCallAuthResolved: