@@ -45,7 +45,7 @@ import { Repository } from '../api/api';
4545import { GitApiImpl } from '../api/api1' ;
4646import { AuthProvider , GitHubServerType } from '../common/authentication' ;
4747import { COPILOT_ACCOUNTS , IComment , IReviewThread , SubjectType } from '../common/comment' ;
48- import { COPILOT_SWE_AGENT } from '../common/copilot' ;
48+ import { COPILOT_REVIEWER , COPILOT_SWE_AGENT } from '../common/copilot' ;
4949import { DiffHunk , parseDiffHunk } from '../common/diffHunk' ;
5050import { emojify } from '../common/emoji' ;
5151import { GitHubRef } from '../common/githubRef' ;
@@ -1060,9 +1060,9 @@ export function parseSelectRestTimelineEvents(
10601060
10611061 let sessionIndex = 0 ;
10621062 for ( const event of events ) {
1063- const eventNode = event as { created_at ?: string ; node_id ?: string ; actor : RestAccount } ;
1063+ const eventNode = event as { created_at ?: string ; node_id ?: string ; actor : RestAccount , performed_via_github_app ?: { slug : string } | null } ;
10641064 if ( eventNode . created_at && eventNode . node_id ) {
1065- if ( event . event === 'copilot_work_started' ) {
1065+ if ( event . event === 'copilot_work_started' && eventNode . performed_via_github_app ?. slug === COPILOT_SWE_AGENT ) {
10661066 parsedEvents . push ( {
10671067 id : eventNode . node_id ,
10681068 event : Common . EventType . CopilotStarted ,
@@ -1073,7 +1073,7 @@ export function parseSelectRestTimelineEvents(
10731073 sessionIndex
10741074 }
10751075 } ) ;
1076- } else if ( event . event === 'copilot_work_finished' ) {
1076+ } else if ( event . event === 'copilot_work_finished' && eventNode . performed_via_github_app ?. slug === COPILOT_SWE_AGENT ) {
10771077 parsedEvents . push ( {
10781078 id : eventNode . node_id ,
10791079 event : Common . EventType . CopilotFinished ,
@@ -1093,6 +1093,12 @@ export function parseSelectRestTimelineEvents(
10931093 sessionIndex
10941094 }
10951095 } ) ;
1096+ } else if ( event . event === 'copilot_work_started' && eventNode . performed_via_github_app ?. slug === COPILOT_REVIEWER ) {
1097+ parsedEvents . push ( {
1098+ id : eventNode . node_id ,
1099+ event : Common . EventType . CopilotReviewStarted ,
1100+ createdAt : eventNode . created_at ,
1101+ } ) ;
10961102 }
10971103 }
10981104 }
@@ -1114,6 +1120,7 @@ export function eventTime(event: Common.TimelineEvent): Date | undefined {
11141120 case Common . EventType . CopilotStarted :
11151121 case Common . EventType . CopilotFinished :
11161122 case Common . EventType . CopilotFinishedError :
1123+ case Common . EventType . CopilotReviewStarted :
11171124 return new Date ( event . createdAt ) ;
11181125 case Common . EventType . Reviewed :
11191126 return new Date ( event . submittedAt ) ;
0 commit comments