feat(server): adapt context model (#11028)

expose more field in listContextObject
This commit is contained in:
darkskygit
2025-03-21 05:36:45 +00:00
parent a5b975ac46
commit 5acba9d5a0
25 changed files with 537 additions and 377 deletions

View File

@@ -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' },

View File

@@ -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,