@@ -13,6 +13,7 @@ import { TabsStorage, TabType } from '../storages/tabsStorage'
1313import { TestMessageType } from '../../../../amazonqTest/chat/views/connector/connector'
1414import { ChatPayload } from '../connector'
1515import { BaseConnector , BaseConnectorProps } from './baseConnector'
16+ import { FollowUpTypes } from '../../../commons/types'
1617
1718export interface ConnectorProps extends BaseConnectorProps {
1819 sendMessageToExtension : ( message : ExtensionMessage ) => void
@@ -35,6 +36,7 @@ export interface MessageData {
3536}
3637// TODO: Refactor testChatConnector, scanChatConnector and other apps connector files post RIV
3738export class Connector extends BaseConnector {
39+ connector : any
3840 override getTabType ( ) : TabType {
3941 return 'testgen'
4042 }
@@ -107,15 +109,40 @@ export class Connector extends BaseConnector {
107109 }
108110
109111 onFileDiff = ( tabID : string , filePath : string , deleted : boolean , messageId ?: string ) : void => {
110- // TODO: add this back once we can advance flow from here
111- // this.sendMessageToExtension({
112- // command: 'open-diff',
113- // tabID,
114- // filePath,
115- // deleted,
116- // messageId,
117- // tabType: 'testgen',
118- // })
112+ // Open diff view
113+ this . sendMessageToExtension ( {
114+ command : 'open-diff' ,
115+ tabID,
116+ filePath,
117+ deleted,
118+ messageId,
119+ tabType : 'testgen' ,
120+ } )
121+ this . onChatAnswerReceived ?.(
122+ tabID ,
123+ {
124+ type : ChatItemType . ANSWER ,
125+ messageId : messageId ,
126+ followUp : {
127+ text : ' ' ,
128+ options : [
129+ {
130+ type : FollowUpTypes . AcceptCode ,
131+ pillText : 'Accept' ,
132+ status : 'success' ,
133+ icon : MynahIcons . OK ,
134+ } ,
135+ {
136+ type : FollowUpTypes . RejectCode ,
137+ pillText : 'Reject' ,
138+ status : 'error' ,
139+ icon : MynahIcons . REVERT ,
140+ } ,
141+ ] ,
142+ } ,
143+ } ,
144+ { }
145+ )
119146 }
120147
121148 private processChatMessage = async ( messageData : any ) : Promise < void > => {
0 commit comments