[00:00] So you'll run into these scenarios where your AI agent has been working on the project for a while and you can see it's made a bunch of tiny little changes and sometimes it's broken something that you lost track of because you hadn't clicked a button or something. A nice solution in this scenario is to ask the AI agent to diff against how it used to be, because your project used to be working, find what it changed, and then isolate that change and bring it back. So git diff for the entire project, find the specific lines that have changed that would impact the behavior of the text streaming into the editor and restore the previous functionality. And then in the agent once you run this, it can generate the git diff command itself, get its own output, check to see what changed, and find the issue. And this gives you a chance to compare what your project used to be in a working state versus what it may have done in this specific workflow.
[00:52] Now unfortunately this didn't fix it. Sometimes this model just isn't smart enough and what you can do in that situation is I'm going to go into a new terminal. I'll hit command-k and I'll say git diff the entire project and copy the diff to a clipboard. Hit submit, command enter, we'll run this and I'll just show in a file I can have the entire diff here of things that have changed. And the reason I copied it to the clipboard is now you can take it into an even smarter reasoning model.
[01:16] Like I can go into AI Studio and select Flash Thinking Experimental, paste this in, and then ask it that similar question. Something in this git diff broke the feature where my editor was being updated every time text was streaming in. Can you please find the specific issue and tell me how to fix it?" And then let this run and reason through it. And then after 15 seconds I can come up here, copy the markdown, bring this into the agent, paste it, and then see if a smarter model is able to fix this. The key takeaway here is that as agents start working they make a lot of changes, So Git diff is going to be an awesome tool to take all of their work and show it to other tools when things go completely wrong.