mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix(core): fix error when server not support ai (#6796)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
query getCopilotQuota {
|
||||
query copilotQuota {
|
||||
currentUser {
|
||||
copilot {
|
||||
quota {
|
||||
@@ -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
|
||||
|
||||
@@ -213,6 +213,23 @@ export type ChangePasswordMutation = {
|
||||
changePassword: { __typename?: 'UserType'; id: string };
|
||||
};
|
||||
|
||||
export type CopilotQuotaQueryVariables = Exact<{ [key: string]: never }>;
|
||||
|
||||
export type CopilotQuotaQuery = {
|
||||
__typename?: 'Query';
|
||||
currentUser: {
|
||||
__typename?: 'UserType';
|
||||
copilot: {
|
||||
__typename?: 'Copilot';
|
||||
quota: {
|
||||
__typename?: 'CopilotQuota';
|
||||
limit: number | null;
|
||||
used: number;
|
||||
};
|
||||
};
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type CreateCheckoutSessionMutationVariables = Exact<{
|
||||
input: CreateCheckoutSessionInput;
|
||||
}>;
|
||||
@@ -353,23 +370,6 @@ export type GetCopilotHistoriesQuery = {
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type GetCopilotQuotaQueryVariables = Exact<{ [key: string]: never }>;
|
||||
|
||||
export type GetCopilotQuotaQuery = {
|
||||
__typename?: 'Query';
|
||||
currentUser: {
|
||||
__typename?: 'UserType';
|
||||
copilot: {
|
||||
__typename?: 'Copilot';
|
||||
quota: {
|
||||
__typename?: 'CopilotQuota';
|
||||
limit: number | null;
|
||||
used: number;
|
||||
};
|
||||
};
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type GetCopilotSessionsQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
}>;
|
||||
@@ -677,14 +677,6 @@ export type QuotaQuery = {
|
||||
currentUser: {
|
||||
__typename?: 'UserType';
|
||||
id: string;
|
||||
copilot: {
|
||||
__typename?: 'Copilot';
|
||||
quota: {
|
||||
__typename?: 'CopilotQuota';
|
||||
limit: number | null;
|
||||
used: number;
|
||||
};
|
||||
};
|
||||
quota: {
|
||||
__typename?: 'UserQuota';
|
||||
name: string;
|
||||
@@ -1038,6 +1030,11 @@ export type Queries =
|
||||
variables: ListBlobsQueryVariables;
|
||||
response: ListBlobsQuery;
|
||||
}
|
||||
| {
|
||||
name: 'copilotQuotaQuery';
|
||||
variables: CopilotQuotaQueryVariables;
|
||||
response: CopilotQuotaQuery;
|
||||
}
|
||||
| {
|
||||
name: 'earlyAccessUsersQuery';
|
||||
variables: EarlyAccessUsersQueryVariables;
|
||||
@@ -1048,11 +1045,6 @@ export type Queries =
|
||||
variables: GetCopilotHistoriesQueryVariables;
|
||||
response: GetCopilotHistoriesQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotQuotaQuery';
|
||||
variables: GetCopilotQuotaQueryVariables;
|
||||
response: GetCopilotQuotaQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotSessionsQuery';
|
||||
variables: GetCopilotSessionsQueryVariables;
|
||||
|
||||
Reference in New Issue
Block a user