const selectedOption = resolveSelectedOption(tc.options, action.selectedOptionId);
if (action.approved) {
status: ToolCallStatus.Running,
...base,
invocationMessage: tc.invocationMessage,
toolInput: action.editedToolInput ?? tc.toolInput,
confirmed: action.confirmed,
...(selectedOption ? { selectedOption } : {}),
};
}
return {
status: ToolCallStatus.Cancelled,