Address out-of-bounds panic in inline completion button (#26394)

Closes #26350

Release Notes:

- Git Beta: Fixed a panic that could occur when using the project diff
0df1e4a489Cole Miller committed on 3/11/2025, 7:04:56 AM· committed by GitHubparent9bd3e15
2 files changedLine totals unavailable