mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 17:30:46 +00:00
P1 bugs for copilot (#1689)
* P1 bugs for copilot * P1 bugs for copilot * P1 bugs for copilot * Update branding and AFEC * Update branding and AFEC * add timeout for ARM calls * increase test timeout * fix formatting * fix formatting * fix formatting * fix formatting * don't call ARM when connectionstring login
This commit is contained in:
@@ -1385,11 +1385,15 @@ export default class Explorer {
|
||||
}
|
||||
|
||||
public async configureCopilot(): Promise<void> {
|
||||
if (userContext.apiType !== "SQL") {
|
||||
if (userContext.apiType !== "SQL" || !userContext.subscriptionId) {
|
||||
return;
|
||||
}
|
||||
const copilotEnabled = await getCopilotEnabled();
|
||||
const copilotUserDBEnabled = await isCopilotFeatureRegistered(userContext.subscriptionId);
|
||||
const copilotEnabledPromise = getCopilotEnabled();
|
||||
const copilotUserDBEnabledPromise = isCopilotFeatureRegistered(userContext.subscriptionId);
|
||||
const [copilotEnabled, copilotUserDBEnabled] = await Promise.all([
|
||||
copilotEnabledPromise,
|
||||
copilotUserDBEnabledPromise,
|
||||
]);
|
||||
useQueryCopilot.getState().setCopilotEnabled(copilotEnabled);
|
||||
useQueryCopilot.getState().setCopilotUserDBEnabled(copilotUserDBEnabled);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user