Skip to content

Commit 7f7cad4

Browse files
authored
Don't get full timeline when populating sessions view (#7619)
1 parent 278c00d commit 7f7cad4

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/github/copilotRemoteAgent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ export class CopilotRemoteAgentManager extends Disposable {
687687

688688
const codingAgentPRs = await capi.getAllCodingAgentPRs(this.repositoriesManager);
689689
return await Promise.all(codingAgentPRs.map(async session => {
690-
const timeline = await session.getTimelineEvents(session);
690+
const timeline = await session.getCopilotTimelineEvents(session);
691691
const status = copilotEventToStatus(mostRecentCopilotEvent(timeline));
692692
if (status !== CopilotPRStatus.Completed && status !== CopilotPRStatus.Failed) {
693693
const disposable = session.onDidChange(() => {

src/github/issueModel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ export class IssueModel<TItem extends Issue = Issue> extends Disposable {
533533
}
534534
issueModel.timelineEvents = allEvents;
535535
}
536+
Logger.debug(`Fetch Copilot timeline events of issue #${issueModel.number} - exit`, GitHubRepository.ID);
536537
return timelineEvents;
537538
} catch (e) {
538539
Logger.error(`Error fetching Copilot timeline events of issue #${issueModel.number} - ${formatError(e)}`, GitHubRepository.ID);

src/github/pullRequestModel.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,8 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
11931193
}
11941194

11951195
private async getRawReviewComments(): Promise<ReviewThread[]> {
1196+
Logger.debug(`Fetching review comments for PR #${this.number} - enter`, PullRequestModel.ID);
1197+
11961198
const { remote, query, schema } = await this.githubRepository.ensure();
11971199
let after: string | null = null;
11981200
let hasNextPage = false;
@@ -1214,6 +1216,7 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
12141216
hasNextPage = data.repository.pullRequest.reviewThreads.pageInfo.hasNextPage;
12151217
after = data.repository.pullRequest.reviewThreads.pageInfo.endCursor;
12161218
} while (hasNextPage && reviewThreads.length < 1000);
1219+
Logger.debug(`Fetching review comments for PR #${this.number} - exit`, PullRequestModel.ID);
12171220

12181221
return reviewThreads;
12191222
} catch (e) {

0 commit comments

Comments
 (0)