Good question. And luckily, this scene was adapted directly from the book.
At this point in the book, the wildlings had asked Jon to kill the old man. Jon hesitated, and Ygritte killed him instead. There is a giant lightning strike close by:
“And death leapt down amongst them.
The lightning flash left Jon night-blind, but he glimpsed the hurtling shadow half a heartbeat before he heard the shriek. The first Thenn died as the old man had, blood gushing from his torn throat. Then the light was gone and the shape was spinning away, snarling, and another man went down in the dark. There were curses, shouts, howls of pain. Jon saw Big Boil stumble backward and knock down three men behind him. Ghost, he thought for one mad instant. Ghost leapt the Wall. Then the lightning turned the night to day, and he saw the wolf standing on Del’s chest, blood running black from his jaws. Grey. He’s grey. Darkness descended with the thunderclap.
The Thenns were jabbing with their spears as the wolf darted between them. The old man’s mare reared, maddened by the smell of slaughter, and lashed out with her hooves. Longclaw was still in his hand. All at once Jon Snow knew he would never get a better chance.”
- A Storm of Swords - Jon V
Jon proceeds to fight his way out, and shortly after:
“Long hours later, the rain stopped. Jon found himself alone in a sea of tall black grass. There was a deep throbbing ache in his right thigh. When he looked down, he was surprised to see an arrow jutting out the back of it. When did that happen? He grabbed hold of the shaft and gave it a tug, but the arrowhead was sunk deep in the meat of his leg, and the pain when he pulled on it was excruciating. He tried to think back on the madness at the inn, but all he could remember was the beast, gaunt and grey and terrible. It was too large to be a common wolf. A direwolf, then. It had to be. He had never seen an animal move so fast. Like a grey wind … Could Robb have returned to the north?
Jon shook his head. He had no answers. It was too hard to think … about the wolf, the old man, Ygritte, any of it …”
- A Storm of Swords - Jon V
So in short, he simply never thought of Summer, but he knew it was a direwolf.