Closed keegancsmith closed 3 months ago
Note: I skimmed over all uses of vscode.Uri.file and couldn't find any other example we did this. All other examples seem to be on actual file paths or on "fake" files like when we need a uri for terminal output.
agreed, there is no reason for this old behavior
We already have a uri passed in and I am unsure why we converted that into a uri which was just the filepath. I am assuming it was due to code evolution.
In particular this makes it so that cody can understand context from unsaved files.
Test Plan: create a new unsaved file with the word "hello world" in it. Start a cody chat and ask cody about the file. Expect cody mentions hello world in the response. Before this change we got an error.
Fixes https://linear.app/sourcegraph/issue/CODY-2469/a-new-chat-with-an-unsaved-buffer-as-context-shows-an-error