fix(core): fix error when server not support ai (#6796)

This commit is contained in:
EYHN
2024-05-07 08:25:27 +00:00
parent a0e0b6b53b
commit 35ce4adffe
13 changed files with 226 additions and 97 deletions
@@ -1,4 +1,4 @@
query getCopilotQuota {
query copilotQuota {
currentUser {
copilot {
quota {
+18 -24
View File
@@ -94,6 +94,24 @@ mutation changePassword($token: String!, $newPassword: String!) {
}`,
};
export const copilotQuotaQuery = {
id: 'copilotQuotaQuery' as const,
operationName: 'copilotQuota',
definitionName: 'currentUser',
containsFile: false,
query: `
query copilotQuota {
currentUser {
copilot {
quota {
limit
used
}
}
}
}`,
};
export const createCheckoutSessionMutation = {
id: 'createCheckoutSessionMutation' as const,
operationName: 'createCheckoutSession',
@@ -238,24 +256,6 @@ query getCopilotHistories($workspaceId: String!, $docId: String, $options: Query
}`,
};
export const getCopilotQuotaQuery = {
id: 'getCopilotQuotaQuery' as const,
operationName: 'getCopilotQuota',
definitionName: 'currentUser',
containsFile: false,
query: `
query getCopilotQuota {
currentUser {
copilot {
quota {
limit
used
}
}
}
}`,
};
export const getCopilotSessionsQuery = {
id: 'getCopilotSessionsQuery' as const,
operationName: 'getCopilotSessions',
@@ -607,12 +607,6 @@ export const quotaQuery = {
query quota {
currentUser {
id
copilot {
quota {
limit
used
}
}
quota {
name
blobLimit
@@ -1,12 +1,6 @@
query quota {
currentUser {
id
copilot {
quota {
limit
used
}
}
quota {
name
blobLimit