3096
3097
async resourceRead(uri: URI): Promise<ResourceReadResult> {
3098
>
// Handle session-db: URIs that reference file-edit content stored
agentService.ts
3099
>
// in a per-session SQLite database.
3100
>
const dbFields = parseSessionDbUri(uri.toString());
3101
>
if (dbFields) {
3102
return this._fetchSessionDbContent(dbFields);
3103
}
3105
>
// Handle git-blob: URIs that reference file content at a specific
3106
>
// git commit (the merge-base used as diff baseline). The URI
3107
>
// encodes the session it belongs to so we can find the right
3108
>
// working directory to run `git show` from.
3109
>
const blobFields = parseGitBlobUri(uri.toString());
3110
>
if (blobFields) {
3111
return this._fetchGitBlobContent(blobFields);
3112
}
3114
>
try {
3115
>
const content = await this._fileService.readFile(uri);
3116
return {
3117
data: content.value.toString(),