From 7d557df4e0db664fc04a346a30c19e024cd2e934 Mon Sep 17 00:00:00 2001 From: "Sung-Hyun Kang (from Dev Box)" Date: Thu, 9 Nov 2023 20:43:43 -0600 Subject: [PATCH] P1 bugs for copilot --- src/Explorer/Explorer.tsx | 5 ++++- .../QueryCopilot/Modal/QueryCopilotFeedbackModal.tsx | 2 +- src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Explorer/Explorer.tsx b/src/Explorer/Explorer.tsx index 755e4a6ab..9107e728f 100644 --- a/src/Explorer/Explorer.tsx +++ b/src/Explorer/Explorer.tsx @@ -1390,7 +1390,10 @@ export default class Explorer { } const copilotEnabledPromise = getCopilotEnabled(); const copilotUserDBEnabledPromise = isCopilotFeatureRegistered(userContext.subscriptionId); - const [copilotEnabled, copilotUserDBEnabled] = await Promise.all([copilotEnabledPromise, copilotUserDBEnabledPromise]) + const [copilotEnabled, copilotUserDBEnabled] = await Promise.all([ + copilotEnabledPromise, + copilotUserDBEnabledPromise, + ]); useQueryCopilot.getState().setCopilotEnabled(copilotEnabled); useQueryCopilot.getState().setCopilotUserDBEnabled(copilotUserDBEnabled); } diff --git a/src/Explorer/QueryCopilot/Modal/QueryCopilotFeedbackModal.tsx b/src/Explorer/QueryCopilot/Modal/QueryCopilotFeedbackModal.tsx index cab440efa..d8d68f4cc 100644 --- a/src/Explorer/QueryCopilot/Modal/QueryCopilotFeedbackModal.tsx +++ b/src/Explorer/QueryCopilot/Modal/QueryCopilotFeedbackModal.tsx @@ -7,7 +7,7 @@ import { PrimaryButton, Stack, Text, - TextField + TextField, } from "@fluentui/react"; import Explorer from "Explorer/Explorer"; import { useCopilotStore } from "Explorer/QueryCopilot/QueryCopilotContext"; diff --git a/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx b/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx index 974bc2045..60c5d9e41 100644 --- a/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx +++ b/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx @@ -107,7 +107,7 @@ export const QueryCopilotPromptbar: React.FC = ({ setGeneratedQueryComments, setQueryResults, setErrorMessage, - errorMessage + errorMessage, } = useCopilotStore(); const sampleProps: SamplePromptsProps = { @@ -244,7 +244,7 @@ export const QueryCopilotPromptbar: React.FC = ({ handleError(JSON.stringify(generateSQLQueryResponse), "copilotTooManyRequestError"); useTabs.getState().setIsQueryErrorThrown(true); setShowErrorMessageBar(true); - setErrorMessage("Ratelimit exceeded 5 per 1 minute. Please try again after sometime") + setErrorMessage("Ratelimit exceeded 5 per 1 minute. Please try again after sometime"); TelemetryProcessor.traceFailure(Action.QueryGenerationFromCopilotPrompt, { databaseName: databaseId, collectionId: containerId,