@@ -7,7 +7,7 @@ import { CancellationToken } from 'vs/base/common/cancellation';
77import { toDisposable } from 'vs/base/common/lifecycle' ;
88import { URI , UriComponents } from 'vs/base/common/uri' ;
99import { ISelection } from 'vs/editor/common/core/selection' ;
10- import { IInlineChatSession , IInlineChatRequest , InlineChatResponseFeedbackKind , InlineChatResponseType , InteractiveEditorReplyFollowup } from 'vs/workbench/contrib/inlineChat/common/inlineChat' ;
10+ import { IInlineChatSession , IInlineChatRequest , InlineChatResponseFeedbackKind , InlineChatResponseType } from 'vs/workbench/contrib/inlineChat/common/inlineChat' ;
1111import { IRelaxedExtensionDescription } from 'vs/platform/extensions/common/extensions' ;
1212import { ILogService } from 'vs/platform/log/common/log' ;
1313import { ExtHostInlineChatShape , IInlineChatResponseDto , IMainContext , MainContext , MainThreadInlineChatShape } from 'vs/workbench/api/common/extHost.protocol' ;
@@ -19,6 +19,7 @@ import { ApiCommand, ApiCommandArgument, ApiCommandResult, ExtHostCommands } fro
1919import { IRange } from 'vs/editor/common/core/range' ;
2020import { IPosition } from 'vs/editor/common/core/position' ;
2121import { raceCancellation } from 'vs/base/common/async' ;
22+ import { IChatReplyFollowup } from 'vs/workbench/contrib/chat/common/chatService' ;
2223
2324class ProviderWrapper {
2425
@@ -223,18 +224,14 @@ export class ExtHostInteractiveEditor implements ExtHostInlineChatShape {
223224 } ;
224225 }
225226
226- async $provideFollowups ( handle : number , sessionId : number , responseId : number , token : CancellationToken ) : Promise < InteractiveEditorReplyFollowup [ ] | undefined > {
227+ async $provideFollowups ( handle : number , sessionId : number , responseId : number , token : CancellationToken ) : Promise < IChatReplyFollowup [ ] | undefined > {
227228 const entry = this . _inputProvider . get ( handle ) ;
228229 const sessionData = this . _inputSessions . get ( sessionId ) ;
229230 const response = sessionData ?. responses [ responseId ] ;
230- if ( entry && response ) {
231- const task = Promise . resolve ( entry . provider . provideFollowups ?.( sessionData . session , response , token ) ) ;
232- const res = await raceCancellation ( task , token ) ;
233- if ( res ) {
234- return res . map ( f => ( {
235- message : typeConvert . MarkdownString . from ( f . contents ) ,
236- } ) ) ;
237- }
231+ if ( entry && response && entry . provider . provideFollowups ) {
232+ const task = Promise . resolve ( entry . provider . provideFollowups ( sessionData . session , response , token ) ) ;
233+ const followups = await raceCancellation ( task , token ) ;
234+ return followups ?. map ( typeConvert . ChatReplyFollowup . from ) ;
238235 }
239236 return undefined ;
240237 }
0 commit comments