Skip to content

Commit 54dd010

Browse files
committed
chore: remove namespace, update text
1 parent 8c1436e commit 54dd010

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/compass-assistant/src/compass-assistant-provider.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,9 @@ export const AssistantProvider: React.FunctionComponent<
5555
}>
5656
> = ({ chat, children }) => {
5757
const assistantActionsContext = useRef<AssistantActionsContextType>({
58-
interpretExplainPlan: ({ namespace, explainPlan }) => {
58+
interpretExplainPlan: ({ explainPlan }) => {
5959
openDrawer(ASSISTANT_DRAWER_ID);
6060
const { prompt, displayText } = buildExplainPlanPrompt({
61-
namespace,
6261
explainPlan,
6362
});
6463
void chat.sendMessage(
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
export const buildExplainPlanPrompt = ({
2-
namespace,
32
explainPlan,
43
}: {
5-
namespace: string;
64
explainPlan: string;
75
}) => {
86
return {
97
prompt: `Given the MongoDB explain plan output below, provide a concise human readable explanation that explains the query execution plan and highlights aspects of the plan that might impact query performance. Respond with as much concision and clarity as possible.
108
If a clear optimization should be made, please suggest the optimization and describe how it can be accomplished in MongoDB Compass. Do not advise users to create indexes without weighing the pros and cons.
119
Explain output:
1210
${explainPlan}`,
13-
displayText: `Given this MongoDB explain plan for **${namespace}**, provide a concise human readable explanation that explains the query execution plan and highlights aspects of the plan that might impact query performance.`,
11+
displayText: 'Provide an explanation of this explain plan.',
1412
};
1513
};

0 commit comments

Comments
 (0)