@@ -110,25 +110,25 @@ export class OpenAIDeepResearchMCPServer extends BaseMCPServer {
110110 const isDeepResearch = deepResearchRegex . exec ( query ) ?. groups ?. isDeepResearch ;
111111 console . log ( "[DEBUG] callSearch: isDeepResearch: " , isDeepResearch , "datasourceId: " , datasourceId , "queryWithoutDatasourceId: " , queryWithoutDatasourceId ) ;
112112
113- if ( ! isDeepResearch ) {
114- // If the query is not for deep research, get the answer for the question
115- if ( ! datasourceId ) {
116- return this . createErrorResponse ( "No datasource id provided" , "No datasource id provided" ) ;
117- }
118- const answer = await this . getThoughtSpotService ( ) . getAnswerForQuestion ( queryWithoutDatasourceId , datasourceId ! , false ) ;
119- if ( answer . error ) {
120- return this . createErrorResponse ( answer . error . message , `Error getting answer ${ answer . error . message } ` ) ;
121- }
122- console . log ( "[DEBUG] returning from non deep research callSearch: answer: " , answer ) ;
123- const result = {
124- id : `${ datasourceId } : ${ queryWithoutDatasourceId } ` ,
125- title : queryWithoutDatasourceId ,
126- text : answer . data ,
127- url : `${ this . ctx . props . instanceUrl } /#/insights/conv-assist?query=${ queryWithoutDatasourceId . trim ( ) } &worksheet=${ datasourceId } &executeSearch=true` ,
128- }
113+ // if (!isDeepResearch) {
114+ // // If the query is not for deep research, get the answer for the question
115+ // if (!datasourceId) {
116+ // return this.createErrorResponse("No datasource id provided", "No datasource id provided");
117+ // }
118+ // const answer = await this.getThoughtSpotService().getAnswerForQuestion(queryWithoutDatasourceId, datasourceId!, false);
119+ // if (answer.error) {
120+ // return this.createErrorResponse(answer.error.message, `Error getting answer ${answer.error.message}`);
121+ // }
122+ // console.log("[DEBUG] returning from non deep research callSearch: answer: ", answer);
123+ // const result = {
124+ // id: `${datasourceId}: ${queryWithoutDatasourceId}`,
125+ // title: queryWithoutDatasourceId,
126+ // // text: answer.data,
127+ // url: `${this.ctx.props.instanceUrl}/#/insights/conv-assist?query=${queryWithoutDatasourceId.trim()}&worksheet=${datasourceId}&executeSearch=true`,
128+ // }
129129
130- return this . createStructuredContentSuccessResponse ( result , "Answer found" ) ;
131- }
130+ // return this.createStructuredContentSuccessResponse(result, "Answer found");
131+ // }
132132
133133 if ( datasourceId ) {
134134 const relevantQuestions = await this . getThoughtSpotService ( ) . getRelevantQuestions ( queryWithoutDatasourceId , [ datasourceId ] , "" ) ;
@@ -143,7 +143,7 @@ export class OpenAIDeepResearchMCPServer extends BaseMCPServer {
143143 const results = relevantQuestions . questions . map ( q => ( {
144144 id : `${ datasourceId } : ${ q . question } ` ,
145145 title : q . question ,
146- text : q . question ,
146+ // text: q.question,
147147 url : "" ,
148148 } ) ) ;
149149
0 commit comments