title: How to get current intent's name in Dialogflow fulfillment?
body: <p>I want to get the name of the current intent in the fulfillment so I can deal with different response depending on different intent i'm at. But I cannot find a function for it.</p>
  
  <pre><code>function getDateAndTime(agent) {    
      date = agent.parameters.date; 
      time = agent.parameters.time;
  
      // Is there any function like this to help me get current intent's name?
      const intent = agent.getIntent();
  }
  
  // I have two intents are calling the same function getDateAndTime()
  intentMap.set('Start Booking - get date and time', getDateAndTime);
  intentMap.set('Start Cancelling - get date and time', getDateAndTime);
  </code></pre>