China and Pakistan need to expand their influence in Afghanistan which India is exploiting to finance these anti Pakistan element. It was good sign that Afghan president Ghani cancelled an arms deal with Delhi before visiting India in April 2015 and did prefer Saudi Arabia, China and Pakistan for his first overseas visits. India cannot afford to be confrontational with Pakistan militarily because of its nuclear weapons and it cannot Isolate Pakistan politically or economically as it enjoys strong ties with China and other major economies so yes overcoming this terrorism within country and stable economy should be priority at any cost
Mate India's role in Afghanistan is already over. Read the article named 'Raheel doctrine that was published in June 2014 in The News to understand current situation.
What I know from my own reliable sources is that the USA has accepted the new role for China and its ally Pakistan and there for China has agreed to allow US to hold a few airbases till 2032. India will be sidelined. Ghani visited Pakistan, China and Saudu Arab before visiting India and that was already the writing on the walll.
After the Peshawar school attack last December, Raheel travelled to Kabul the next day and had serious talk with Ghani about terrorist financings and facilities On their side of the border. That was las last major terrorist attack. Pakistan has been allowed to induct hot persues into the Afghan territories and have started training their army.
A lot is happening behind closed doors but in few years you'll already see the new geo-political landscape in the region.