To understand the problem there are a few fundamental conditions we need to realise. First, we can look at the climatic aspect of a glacier. In this example I will focus on mountain or valley glaciers in temperate to polar regions where we have a clear winter and summer season.
In winter snow accumulates on the glacier due to a combination of many sources but primarily snow fall, avalanching and snow drifting. Snow will accumulate across the surface but often with larger snow depths at the upper part of the glacier. The reason for this is that glacier form in places with excess snow accumulating, snow-catching areas, if you wish. So after the winter the glacier is snow covered with possibly deeper snow packs at higher elevation.
In summer melting will occur. Melting is largely an effect of air temperature which decreases with altitude due to the atmospheric lapse rate(s). This means less melting will occur at high elevations and more at lower elevations.
The net result is that the glacier is growing in thickness at higher elevations and decreasing in thickness at lower elevations. Clearly if no movement of the ice would occur the lower part of the glacier would vanish and the upper part be "infinitely" high. Enter ice dynamics.
Ice deforms as a plastic material when its thickness is about 30-40 m of ice. This means that the ice can move by the ice body deforming akin to a dough. Hence the changes in glacier thickness due to accumulation and melting can be counteracted by the glacier moving excess mass from the upper part of the glacier to its lower part.
As long as the climate is stable the glacier will receive roughly the same amount of snow every year and the loss of ice from melting would also be constant over years. The glacier will then be stable in size because the glacier flow compensates the gains and losses in different areas every year.
If we get a change in climate the amount of snow accumulation and the melting will change due to changes in winter precipitation and summer temperature. This will affect the amounts of excess and deficit in the upper and lower parts of the glacier and also its dynamics.
Looking at the terminus of the glacier we can view this as follows. A stable glacier is one where the melting at the terminus is compensated by ice flow replacing the ice loss by moving new ice into the position of the ice lost. If the melt at the terminus is larger (due to warming), then the ice loss will be larger than the ice flow trying to compensate the loss and the glacier terminus retreats. Note that ice flow continues (down valley) while the glacier retreats up-valley. For a climate cooling the melt decreases and ice will over-compensate the loss giving an advance of the glacier.
Hence the answer is that you cannot split dynamics from climate in the response of a glacier. The simple description above can be complicated further but that is probably worthy of a course in glaciology or deeper study of a book on glaciology such as The Physics of Glaciers by Kurt Cuffey and W.S.B. Paterson (Academic Press 2006).