801
}
802
: undefined;
804
>
const tc: ToolCallCompletedState = {
805
>
status: ToolCallStatus.Completed,
806
>
toolCallId: d.toolCallId,
807
>
toolName: info.toolName,
808
>
displayName: info.displayName,
809
>
intention: info.intention,
810
>
...(mcpServerName ? { contributor: { kind: ToolCallContributorKind.MCP, customizationId: buildMcpTopLevelCustomizationId(providerId, rawSessionId, mcpServerName) } } : {}),
811
>
invocationMessage: info.invocationMessage,
812
>
toolInput: info.toolInput,
813
>
success: d.success,
814
>
pastTenseMessage: getPastTenseMessage(info.toolName, info.displayName, info.parameters, d.success, d.success ? toolOutput : undefined),
815
>
content: content.length > 0 ? content : undefined,
816
>
error: d.error,
817
>
confirmed: ToolCallConfirmationReason.NotNeeded,
818
>
_meta: toToolCallMeta({
819
>
toolKind: info.toolKind,
820
>
language: info.language,
821
>
subagentDescription: info.subagentDescription,
822
>
subagentAgentName: info.subagentAgentName,
823
>
mcpServerName,
824
>
mcpToolName,
825
>
ui: mcpUi,
826
>
}),
827
>
};
828
>
return { kind: ResponsePartKind.ToolCall, toolCall: tc };
829
>
}