agent: Include context with first message that introduced it (#27925)

We were including the context at the end which meant it never got
cached. We'll now include it with the first message that introduced it
so it's cached as long as it doesn't change.

This is an improvement, but we probably still need to think of ways to
optimize caching for cases where files in context change.

Release Notes:

- N/A
2eed94ff23Agus Zubiaga committed on 4/2/2025, 3:14:48 PM· committed by GitHubparent7a54dd7
2 files changedLine totals unavailable