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:
DarkSky
2025-06-19 13:17:01 +08:00
committed by GitHub
parent d80bfac1d2
commit bd04930560
28 changed files with 1422 additions and 394 deletions
@@ -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,