feat(ai): add ai chat to dashboard

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-04-15 14:30:21 +02:00
parent 804a9c8056
commit 34769a5d58
46 changed files with 2624 additions and 1449 deletions

View File

@@ -13,3 +13,27 @@ export class LogError extends Error {
Object.setPrototypeOf(this, new.target.prototype);
}
}
export class HttpError extends Error {
public readonly status: number;
public readonly fingerprint?: string;
public readonly extra?: Record<string, unknown>;
public readonly error?: Error | unknown;
constructor(
message: string,
options?: {
status?: number;
fingerprint?: string;
extra?: Record<string, unknown>;
error?: Error | unknown;
},
) {
super(message);
this.name = 'HttpError';
this.status = options?.status ?? 500;
this.fingerprint = options?.fingerprint;
this.extra = options?.extra;
this.error = options?.error;
Object.setPrototypeOf(this, new.target.prototype);
}
}