mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-26 07:26:58 +00:00
P1 bugs for copilot
This commit is contained in:
parent
b4d6ad172b
commit
7d557df4e0
@ -1390,7 +1390,10 @@ export default class Explorer {
|
|||||||
}
|
}
|
||||||
const copilotEnabledPromise = getCopilotEnabled();
|
const copilotEnabledPromise = getCopilotEnabled();
|
||||||
const copilotUserDBEnabledPromise = isCopilotFeatureRegistered(userContext.subscriptionId);
|
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().setCopilotEnabled(copilotEnabled);
|
||||||
useQueryCopilot.getState().setCopilotUserDBEnabled(copilotUserDBEnabled);
|
useQueryCopilot.getState().setCopilotUserDBEnabled(copilotUserDBEnabled);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import {
|
|||||||
PrimaryButton,
|
PrimaryButton,
|
||||||
Stack,
|
Stack,
|
||||||
Text,
|
Text,
|
||||||
TextField
|
TextField,
|
||||||
} from "@fluentui/react";
|
} from "@fluentui/react";
|
||||||
import Explorer from "Explorer/Explorer";
|
import Explorer from "Explorer/Explorer";
|
||||||
import { useCopilotStore } from "Explorer/QueryCopilot/QueryCopilotContext";
|
import { useCopilotStore } from "Explorer/QueryCopilot/QueryCopilotContext";
|
||||||
|
@ -107,7 +107,7 @@ export const QueryCopilotPromptbar: React.FC<QueryCopilotPromptProps> = ({
|
|||||||
setGeneratedQueryComments,
|
setGeneratedQueryComments,
|
||||||
setQueryResults,
|
setQueryResults,
|
||||||
setErrorMessage,
|
setErrorMessage,
|
||||||
errorMessage
|
errorMessage,
|
||||||
} = useCopilotStore();
|
} = useCopilotStore();
|
||||||
|
|
||||||
const sampleProps: SamplePromptsProps = {
|
const sampleProps: SamplePromptsProps = {
|
||||||
@ -244,7 +244,7 @@ export const QueryCopilotPromptbar: React.FC<QueryCopilotPromptProps> = ({
|
|||||||
handleError(JSON.stringify(generateSQLQueryResponse), "copilotTooManyRequestError");
|
handleError(JSON.stringify(generateSQLQueryResponse), "copilotTooManyRequestError");
|
||||||
useTabs.getState().setIsQueryErrorThrown(true);
|
useTabs.getState().setIsQueryErrorThrown(true);
|
||||||
setShowErrorMessageBar(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, {
|
TelemetryProcessor.traceFailure(Action.QueryGenerationFromCopilotPrompt, {
|
||||||
databaseName: databaseId,
|
databaseName: databaseId,
|
||||||
collectionId: containerId,
|
collectionId: containerId,
|
||||||
|
Loading…
Reference in New Issue
Block a user