feat: chat widget
Build and Push Image / build-backend (push) Successful in 2m42s
Build and Push Image / build-frontend (push) Successful in 4m1s
Build and Push Image / push (push) Successful in 2m5s

This commit is contained in:
2026-07-28 11:24:20 +07:00 Unverified
parent d9f988de9b
commit 4d0f459bdb
5 changed files with 85 additions and 6 deletions
+15
View File
@@ -72,3 +72,18 @@ export function parseSearchString(
export function pausePass<R>(time: number): (res: R) => Promise<R> {
return (res) => new Promise((r) => setTimeout(() => r(res), time));
}
// taken from astral/api
export class ResponseNotOkError extends Error {
constructor(
readonly status: number,
readonly response: Response,
) {
super(`RESPONSE_NOT_OK: Got status ${status}`);
}
}
export function throwNotOk(res: Response) {
if (!res.ok) throw new ResponseNotOkError(res.status, res);
return res;
}