chore: migrate to oxlint and oxfmt

Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-14 14:31:43 +00:00
parent 912ebffc63
commit c379191f80
1480 changed files with 28608 additions and 43547 deletions

View File

@@ -13,9 +13,7 @@ import {
resolveGatewaySessionStoreTarget,
} from "./session-utils.js";
export type SessionsResolveResult =
| { ok: true; key: string }
| { ok: false; error: ErrorShape };
export type SessionsResolveResult = { ok: true; key: string } | { ok: false; error: ErrorShape };
export function resolveSessionKeyFromResolveParams(params: {
cfg: ClawdbotConfig;
@@ -29,19 +27,13 @@ export function resolveSessionKeyFromResolveParams(params: {
if (hasKey && hasLabel) {
return {
ok: false,
error: errorShape(
ErrorCodes.INVALID_REQUEST,
"Provide either key or label (not both)",
),
error: errorShape(ErrorCodes.INVALID_REQUEST, "Provide either key or label (not both)"),
};
}
if (!hasKey && !hasLabel) {
return {
ok: false,
error: errorShape(
ErrorCodes.INVALID_REQUEST,
"Either key or label is required",
),
error: errorShape(ErrorCodes.INVALID_REQUEST, "Either key or label is required"),
};
}
@@ -52,10 +44,7 @@ export function resolveSessionKeyFromResolveParams(params: {
if (!existingKey) {
return {
ok: false,
error: errorShape(
ErrorCodes.INVALID_REQUEST,
`No session found: ${key}`,
),
error: errorShape(ErrorCodes.INVALID_REQUEST, `No session found: ${key}`),
};
}
return { ok: true, key: target.canonicalKey };