feat: integrate i18n error for copilot (#7311)

fix PD-1333 CLOUD-42
This commit is contained in:
darkskygit
2024-06-26 13:36:23 +00:00
parent 6b47c6beda
commit aeb666f95e
6 changed files with 247 additions and 124 deletions

View File

@@ -126,6 +126,13 @@ export interface CopilotPromptType {
name: Scalars['String']['output'];
}
export interface CopilotProviderSideErrorDataType {
__typename?: 'CopilotProviderSideErrorDataType';
kind: Scalars['String']['output'];
message: Scalars['String']['output'];
provider: Scalars['String']['output'];
}
export interface CopilotQuota {
__typename?: 'CopilotQuota';
limit: Maybe<Scalars['SafeInt']['output']>;
@@ -218,6 +225,7 @@ export enum EarlyAccessType {
export type ErrorDataUnion =
| BlobNotFoundDataType
| CopilotPromptNotFoundDataType
| CopilotProviderSideErrorDataType
| DocAccessDeniedDataType
| DocHistoryNotFoundDataType
| DocNotFoundDataType
@@ -248,7 +256,9 @@ export enum ErrorNames {
COPILOT_FAILED_TO_CREATE_MESSAGE = 'COPILOT_FAILED_TO_CREATE_MESSAGE',
COPILOT_FAILED_TO_GENERATE_TEXT = 'COPILOT_FAILED_TO_GENERATE_TEXT',
COPILOT_MESSAGE_NOT_FOUND = 'COPILOT_MESSAGE_NOT_FOUND',
COPILOT_PROMPT_INVALID = 'COPILOT_PROMPT_INVALID',
COPILOT_PROMPT_NOT_FOUND = 'COPILOT_PROMPT_NOT_FOUND',
COPILOT_PROVIDER_SIDE_ERROR = 'COPILOT_PROVIDER_SIDE_ERROR',
COPILOT_QUOTA_EXCEEDED = 'COPILOT_QUOTA_EXCEEDED',
COPILOT_SESSION_DELETED = 'COPILOT_SESSION_DELETED',
COPILOT_SESSION_NOT_FOUND = 'COPILOT_SESSION_NOT_FOUND',