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

@@ -2,14 +2,9 @@ import type { AgentToolResult } from "@mariozechner/pi-agent-core";
import type { ClawdbotConfig } from "../../config/config.js";
import { getChannelPlugin, listChannelPlugins } from "./index.js";
import type {
ChannelMessageActionContext,
ChannelMessageActionName,
} from "./types.js";
import type { ChannelMessageActionContext, ChannelMessageActionName } from "./types.js";
export function listChannelMessageActions(
cfg: ClawdbotConfig,
): ChannelMessageActionName[] {
export function listChannelMessageActions(cfg: ClawdbotConfig): ChannelMessageActionName[] {
const actions = new Set<ChannelMessageActionName>(["send"]);
for (const plugin of listChannelPlugins()) {
const list = plugin.actions?.listActions?.({ cfg });
@@ -31,10 +26,7 @@ export async function dispatchChannelMessageAction(
): Promise<AgentToolResult<unknown> | null> {
const plugin = getChannelPlugin(ctx.channel);
if (!plugin?.actions?.handleAction) return null;
if (
plugin.actions.supportsAction &&
!plugin.actions.supportsAction({ action: ctx.action })
) {
if (plugin.actions.supportsAction && !plugin.actions.supportsAction({ action: ctx.action })) {
return null;
}
return await plugin.actions.handleAction(ctx);