44 *--------------------------------------------------------------------------------------------*/
55import * as OctokitRest from '@octokit/rest' ;
66import { Endpoints } from '@octokit/types' ;
7+ import type { Uri } from 'vscode' ;
8+ import { Repository } from '../api/api' ;
9+ import { GitHubRemote } from '../common/remote' ;
10+ import { SessionInfo , SessionSetupStep } from './copilotApi' ;
11+ import { FolderRepositoryManager } from './folderRepositoryManager' ;
12+ import { GitHubRepository } from './githubRepository' ;
713
814export namespace OctokitCommon {
915 export type IssuesAssignParams = OctokitRest . RestEndpointMethodTypes [ 'issues' ] [ 'addAssignees' ] [ 'parameters' ] ;
@@ -88,4 +94,71 @@ export function mergeQuerySchemaWithShared(sharedSchema: Schema, schema: Schema)
8894 ...sharedSchema ,
8995 definitions : mergedDefinitions
9096 } ;
91- }
97+ }
98+
99+ type RemoteAgentSuccessResult = { link : string ; state : 'success' ; number : number ; webviewUri : Uri ; llmDetails : string } ;
100+ type RemoteAgentErrorResult = { error : string ; state : 'error' } ;
101+ export type RemoteAgentResult = RemoteAgentSuccessResult | RemoteAgentErrorResult ;
102+
103+ export interface IAPISessionLogs {
104+ readonly info : SessionInfo ;
105+ readonly logs : string ;
106+ readonly setupSteps : SessionSetupStep [ ] | undefined ;
107+ }
108+
109+ export interface ICopilotRemoteAgentCommandArgs {
110+ userPrompt : string ;
111+ summary ?: string ;
112+ source ?: string ;
113+ followup ?: string ;
114+ _version ?: number ; // TODO(jospicer): Remove once stabilized/engine version enforced
115+ }
116+
117+ export interface ICopilotRemoteAgentCommandResponse {
118+ uri : string ;
119+ title : string ;
120+ description : string ;
121+ author : string ;
122+ linkTag : string ;
123+ }
124+
125+ export interface AssistantDelta {
126+ content ?: string | undefined ;
127+ role : string ;
128+ tool_calls ?: {
129+ function : {
130+ arguments : string ;
131+ name : string ;
132+ } ;
133+ id : string ;
134+ type : string ;
135+ index : number ;
136+ } [ ] | undefined ;
137+ }
138+
139+ export interface Choice {
140+ finish_reason : string ;
141+ delta : {
142+ content ?: string | undefined ;
143+ role : string ;
144+ tool_calls ?: {
145+ function : {
146+ arguments : string ;
147+ name : string ;
148+ } ;
149+ id : string ;
150+ type : string ;
151+ index : number ;
152+ } [ ] | undefined ;
153+ } ;
154+ }
155+
156+ export interface RepoInfo {
157+ owner : string ;
158+ repo : string ;
159+ baseRef : string ;
160+ remote : GitHubRemote ;
161+ repository : Repository ;
162+ ghRepository : GitHubRepository ;
163+ fm : FolderRepositoryManager ;
164+ }
0 commit comments