chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -22,10 +22,7 @@ export function createGatewayHooksRequestHandler(params: {
|
||||
}) {
|
||||
const { deps, getHooksConfig, bindHost, port, logHooks } = params;
|
||||
|
||||
const dispatchWakeHook = (value: {
|
||||
text: string;
|
||||
mode: "now" | "next-heartbeat";
|
||||
}) => {
|
||||
const dispatchWakeHook = (value: { text: string; mode: "now" | "next-heartbeat" }) => {
|
||||
const sessionKey = resolveMainSessionKeyFromConfig();
|
||||
enqueueSystemEvent(value.text, { sessionKey });
|
||||
if (value.mode === "now") {
|
||||
@@ -45,9 +42,7 @@ export function createGatewayHooksRequestHandler(params: {
|
||||
thinking?: string;
|
||||
timeoutSeconds?: number;
|
||||
}) => {
|
||||
const sessionKey = value.sessionKey.trim()
|
||||
? value.sessionKey.trim()
|
||||
: `hook:${randomUUID()}`;
|
||||
const sessionKey = value.sessionKey.trim() ? value.sessionKey.trim() : `hook:${randomUUID()}`;
|
||||
const mainSessionKey = resolveMainSessionKeyFromConfig();
|
||||
const jobId = randomUUID();
|
||||
const now = Date.now();
|
||||
@@ -85,12 +80,9 @@ export function createGatewayHooksRequestHandler(params: {
|
||||
sessionKey,
|
||||
lane: "cron",
|
||||
});
|
||||
const summary =
|
||||
result.summary?.trim() || result.error?.trim() || result.status;
|
||||
const summary = result.summary?.trim() || result.error?.trim() || result.status;
|
||||
const prefix =
|
||||
result.status === "ok"
|
||||
? `Hook ${value.name}`
|
||||
: `Hook ${value.name} (${result.status})`;
|
||||
result.status === "ok" ? `Hook ${value.name}` : `Hook ${value.name} (${result.status})`;
|
||||
enqueueSystemEvent(`${prefix}: ${summary}`.trim(), {
|
||||
sessionKey: mainSessionKey,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user