mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 11:01:24 +00:00
chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -29,11 +29,8 @@ export function maybeHandleQueueDirective(params: {
|
||||
sessionEntry: params.sessionEntry,
|
||||
});
|
||||
const debounceLabel =
|
||||
typeof settings.debounceMs === "number"
|
||||
? `${settings.debounceMs}ms`
|
||||
: "default";
|
||||
const capLabel =
|
||||
typeof settings.cap === "number" ? String(settings.cap) : "default";
|
||||
typeof settings.debounceMs === "number" ? `${settings.debounceMs}ms` : "default";
|
||||
const capLabel = typeof settings.cap === "number" ? String(settings.cap) : "default";
|
||||
const dropLabel = settings.dropPolicy ?? "default";
|
||||
return {
|
||||
text: withOptions(
|
||||
@@ -44,23 +41,13 @@ export function maybeHandleQueueDirective(params: {
|
||||
}
|
||||
|
||||
const queueModeInvalid =
|
||||
!directives.queueMode &&
|
||||
!directives.queueReset &&
|
||||
Boolean(directives.rawQueueMode);
|
||||
!directives.queueMode && !directives.queueReset && Boolean(directives.rawQueueMode);
|
||||
const queueDebounceInvalid =
|
||||
directives.rawDebounce !== undefined &&
|
||||
typeof directives.debounceMs !== "number";
|
||||
const queueCapInvalid =
|
||||
directives.rawCap !== undefined && typeof directives.cap !== "number";
|
||||
const queueDropInvalid =
|
||||
directives.rawDrop !== undefined && !directives.dropPolicy;
|
||||
directives.rawDebounce !== undefined && typeof directives.debounceMs !== "number";
|
||||
const queueCapInvalid = directives.rawCap !== undefined && typeof directives.cap !== "number";
|
||||
const queueDropInvalid = directives.rawDrop !== undefined && !directives.dropPolicy;
|
||||
|
||||
if (
|
||||
queueModeInvalid ||
|
||||
queueDebounceInvalid ||
|
||||
queueCapInvalid ||
|
||||
queueDropInvalid
|
||||
) {
|
||||
if (queueModeInvalid || queueDebounceInvalid || queueCapInvalid || queueDropInvalid) {
|
||||
const errors: string[] = [];
|
||||
if (queueModeInvalid) {
|
||||
errors.push(
|
||||
|
||||
Reference in New Issue
Block a user