mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
feat(server): allow chat session dangling & pin session support (#12849)
fix AI-181 fix AI-179 fix AI-178 fix PD-2682 fix PD-2683
This commit is contained in:
@@ -643,6 +643,10 @@ export const USER_FRIENDLY_ERRORS = {
|
||||
type: 'resource_not_found',
|
||||
message: `Copilot session not found.`,
|
||||
},
|
||||
copilot_session_invalid_input: {
|
||||
type: 'invalid_input',
|
||||
message: `Copilot session input is invalid.`,
|
||||
},
|
||||
copilot_session_deleted: {
|
||||
type: 'action_forbidden',
|
||||
message: `Copilot session has been deleted.`,
|
||||
|
||||
@@ -657,6 +657,12 @@ export class CopilotSessionNotFound extends UserFriendlyError {
|
||||
}
|
||||
}
|
||||
|
||||
export class CopilotSessionInvalidInput extends UserFriendlyError {
|
||||
constructor(message?: string) {
|
||||
super('invalid_input', 'copilot_session_invalid_input', message);
|
||||
}
|
||||
}
|
||||
|
||||
export class CopilotSessionDeleted extends UserFriendlyError {
|
||||
constructor(message?: string) {
|
||||
super('action_forbidden', 'copilot_session_deleted', message);
|
||||
@@ -1145,6 +1151,7 @@ export enum ErrorNames {
|
||||
WORKSPACE_ID_REQUIRED_FOR_TEAM_SUBSCRIPTION,
|
||||
WORKSPACE_ID_REQUIRED_TO_UPDATE_TEAM_SUBSCRIPTION,
|
||||
COPILOT_SESSION_NOT_FOUND,
|
||||
COPILOT_SESSION_INVALID_INPUT,
|
||||
COPILOT_SESSION_DELETED,
|
||||
NO_COPILOT_PROVIDER_AVAILABLE,
|
||||
COPILOT_FAILED_TO_GENERATE_TEXT,
|
||||
|
||||
Reference in New Issue
Block a user