mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
feat(server): adapt context model (#11028)
expose more field in listContextObject
This commit is contained in:
@@ -650,6 +650,10 @@ export const USER_FRIENDLY_ERRORS = {
|
||||
args: { docId: 'string' },
|
||||
message: ({ docId }) => `Doc ${docId} not found.`,
|
||||
},
|
||||
copilot_docs_not_found: {
|
||||
type: 'resource_not_found',
|
||||
message: () => `Some docs not found.`,
|
||||
},
|
||||
copilot_message_not_found: {
|
||||
type: 'resource_not_found',
|
||||
args: { messageId: 'string' },
|
||||
|
||||
@@ -664,6 +664,12 @@ export class CopilotDocNotFound extends UserFriendlyError {
|
||||
super('resource_not_found', 'copilot_doc_not_found', message, args);
|
||||
}
|
||||
}
|
||||
|
||||
export class CopilotDocsNotFound extends UserFriendlyError {
|
||||
constructor(message?: string) {
|
||||
super('resource_not_found', 'copilot_docs_not_found', message);
|
||||
}
|
||||
}
|
||||
@ObjectType()
|
||||
class CopilotMessageNotFoundDataType {
|
||||
@Field() messageId!: string
|
||||
@@ -997,6 +1003,7 @@ export enum ErrorNames {
|
||||
UNSPLASH_IS_NOT_CONFIGURED,
|
||||
COPILOT_ACTION_TAKEN,
|
||||
COPILOT_DOC_NOT_FOUND,
|
||||
COPILOT_DOCS_NOT_FOUND,
|
||||
COPILOT_MESSAGE_NOT_FOUND,
|
||||
COPILOT_PROMPT_NOT_FOUND,
|
||||
COPILOT_PROMPT_INVALID,
|
||||
|
||||
Reference in New Issue
Block a user