Skip to content

Commit 6308d66

Browse files
authored
add getFileChangesMultiDiffPart trace logging (microsoft/vscode#265170) (#7768)
1 parent ae2144a commit 6308d66

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/github/copilotRemoteAgent.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,13 +1306,15 @@ export class CopilotRemoteAgentManager extends Disposable {
13061306
private async getFileChangesMultiDiffPart(pullRequest: PullRequestModel): Promise<vscode.ChatResponseMultiDiffPart | undefined> {
13071307
try {
13081308
const changeModels = await this.getChangeModels(pullRequest);
1309+
Logger.warn('No file changes found for pull request, not showing diff.', CopilotRemoteAgentManager.ID);
13091310
if (changeModels.length === 0) {
13101311
return undefined;
13111312
}
13121313

13131314
const diffEntries: vscode.ChatResponseDiffEntry[] = [];
13141315
for (const changeModel of changeModels) {
13151316
const { added, removed } = await changeModel.calculateChangedLinesCount();
1317+
Logger.trace(`DiffEntry -> original='${changeModel.parentFilePath}' modified='${changeModel.filePath}' (+${added} -${removed})`, CopilotRemoteAgentManager.ID);
13161318
diffEntries.push({
13171319
originalUri: changeModel.parentFilePath,
13181320
modifiedUri: changeModel.filePath,

src/github/pullRequestModel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,7 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
15301530

15311531
if (!this.base) {
15321532
Logger.appendLine('No base branch found for PR, fetching it now', PullRequestModel.ID);
1533+
Logger.trace(`Fetching from ${remote.owner}/${remote.repositoryName}. PR #${this.number}`, PullRequestModel.ID);
15331534
const info = await octokit.call(octokit.api.pulls.get, {
15341535
owner: remote.owner,
15351536
repo: remote.repositoryName,

0 commit comments

Comments
 (0)