@@ -14,7 +14,7 @@ import { GitHubRemote } from '../common/remote';
1414import { CODING_AGENT , CODING_AGENT_AUTO_COMMIT_AND_PUSH , CODING_AGENT_ENABLED } from '../common/settingKeys' ;
1515import { toOpenPullRequestWebviewUri } from '../common/uri' ;
1616import { OctokitCommon } from './common' ;
17- import { CopilotApi , RemoteAgentJobPayload } from './copilotApi' ;
17+ import { CopilotApi , RemoteAgentJobPayload , SessionInfo } from './copilotApi' ;
1818import { CopilotPRWatcher , CopilotStateModel } from './copilotPrWatcher' ;
1919import { CredentialStore } from './credentials' ;
2020import { FolderRepositoryManager } from './folderRepositoryManager' ;
@@ -27,8 +27,8 @@ type RemoteAgentErrorResult = { error: string; state: 'error' };
2727type RemoteAgentResult = RemoteAgentSuccessResult | RemoteAgentErrorResult ;
2828
2929export interface IAPISessionLogs {
30- sessionId : string ;
31- logs : string ;
30+ readonly info : SessionInfo ;
31+ readonly logs : string ;
3232}
3333
3434export interface ICopilotRemoteAgentCommandArgs {
@@ -443,7 +443,7 @@ export class CopilotRemoteAgentManager extends Disposable {
443443 }
444444
445445 const logs = await capi . getLogsFromSession ( session . id ) ;
446- return { sessionId : session . id , logs } ;
446+ return { info : session , logs } ;
447447 }
448448
449449 async getSessionUrlFromPullRequest ( pullRequest : PullRequestModel ) : Promise < string | undefined > {
@@ -459,16 +459,6 @@ export class CopilotRemoteAgentManager extends Disposable {
459459 return sessions . html_url ;
460460 }
461461
462- async getSessionLogsFromSessionId ( sessionId : string ) : Promise < IAPISessionLogs > {
463- const capi = await this . copilotApi ;
464- if ( ! capi ) {
465- return { sessionId : '' , logs : '' } ;
466- }
467-
468- const logs = await capi . getLogsFromSession ( sessionId ) ;
469- return { sessionId, logs } ;
470- }
471-
472462 private getLatestRun < T extends { last_updated_at ?: string ; updated_at ?: string } > ( runs : T [ ] ) : T {
473463 return runs
474464 . slice ( )
0 commit comments