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

@@ -1,7 +1,4 @@
import {
getChannelPlugin,
normalizeChannelId,
} from "../channels/plugins/index.js";
import { getChannelPlugin, normalizeChannelId } from "../channels/plugins/index.js";
export type MessagingToolSend = {
tool: string;
@@ -35,15 +32,11 @@ export function isMessagingToolSendAction(
return Boolean(plugin.actions.extractToolSend({ args })?.to);
}
export function normalizeTargetForProvider(
provider: string,
raw?: string,
): string | undefined {
export function normalizeTargetForProvider(provider: string, raw?: string): string | undefined {
if (!raw) return undefined;
const providerId = normalizeChannelId(provider);
const plugin = providerId ? getChannelPlugin(providerId) : undefined;
const normalized =
plugin?.messaging?.normalizeTarget?.(raw) ??
(raw.trim().toLowerCase() || undefined);
plugin?.messaging?.normalizeTarget?.(raw) ?? (raw.trim().toLowerCase() || undefined);
return normalized || undefined;
}