mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 04:33:44 +00:00
chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -15,10 +15,7 @@ type LogLine = ReturnType<typeof parseLogLine>;
|
||||
|
||||
const DEFAULT_LIMIT = 200;
|
||||
const MAX_BYTES = 1_000_000;
|
||||
const CHANNELS = new Set<string>([
|
||||
...listChannelPlugins().map((plugin) => plugin.id),
|
||||
"all",
|
||||
]);
|
||||
const CHANNELS = new Set<string>([...listChannelPlugins().map((plugin) => plugin.id), "all"]);
|
||||
|
||||
function parseChannelFilter(raw?: string) {
|
||||
const trimmed = raw?.trim().toLowerCase();
|
||||
@@ -65,8 +62,7 @@ export async function channelsLogsCommand(
|
||||
runtime: RuntimeEnv = defaultRuntime,
|
||||
) {
|
||||
const channel = parseChannelFilter(opts.channel);
|
||||
const limitRaw =
|
||||
typeof opts.lines === "string" ? Number(opts.lines) : opts.lines;
|
||||
const limitRaw = typeof opts.lines === "string" ? Number(opts.lines) : opts.lines;
|
||||
const limit =
|
||||
typeof limitRaw === "number" && Number.isFinite(limitRaw) && limitRaw > 0
|
||||
? Math.floor(limitRaw)
|
||||
|
||||
Reference in New Issue
Block a user