@@ -31,6 +31,13 @@ export const AssistantContext = createContext<AssistantContextType | null>(
3131) ;
3232
3333type AssistantActionsContextType = {
34+ interpretExplainPlan : ( {
35+ namespace,
36+ explainPlan,
37+ } : {
38+ namespace : string ;
39+ explainPlan : string ;
40+ } ) => void ;
3441 interpretConnectionError : ( {
3542 connectionInfo,
3643 error,
@@ -39,7 +46,6 @@ type AssistantActionsContextType = {
3946 error : Error ;
4047 } ) => void ;
4148 clearChat : ( ) => void ;
42- interpretExplainPlan : ( explainPlan : string ) => void ;
4349} ;
4450export const AssistantActionsContext =
4551 createContext < AssistantActionsContextType > ( {
@@ -83,7 +89,7 @@ export const AssistantProvider: React.FunctionComponent<
8389 } >
8490> = ( { chat, children } ) => {
8591 const assistantActionsContext = useRef < AssistantActionsContextType > ( {
86- interpretExplainPlan : ( explainPlan : string ) => {
92+ interpretExplainPlan : ( { explainPlan } ) => {
8793 openDrawer ( ASSISTANT_DRAWER_ID ) ;
8894 const { prompt, displayText } = buildExplainPlanPrompt ( {
8995 explainPlan,
@@ -151,7 +157,7 @@ export const CompassAssistantProvider = registerCompassPlugin(
151157 transport : new DocsProviderTransport ( {
152158 baseUrl : atlasService . assistantApiEndpoint ( ) ,
153159 } ) ,
154- onError : ( err : any ) => {
160+ onError : ( err ) => {
155161 logger . log . error (
156162 logger . mongoLogId ( 1_001_000_370 ) ,
157163 'Assistant' ,
0 commit comments