chore: format partially staged files

This commit is contained in:
Kastrah 2026-01-26 11:35:13 +01:00
parent c1dfc074fc
commit 0ec276d421
3 changed files with 9 additions and 17 deletions

View File

@ -59,8 +59,8 @@ const WebSearchSchema = Type.Object({
type WebSearchConfig = NonNullable<ClawdbotConfig["tools"]>["web"] extends infer Web type WebSearchConfig = NonNullable<ClawdbotConfig["tools"]>["web"] extends infer Web
? Web extends { search?: infer Search } ? Web extends { search?: infer Search }
? Search ? Search
: undefined : undefined
: undefined; : undefined;
type BraveSearchResult = { type BraveSearchResult = {

View File

@ -1,10 +1,7 @@
// Zoho Cliq Channel Plugin - Core Stub // Zoho Cliq Channel Plugin - Core Stub
// Full implementation is in extensions/zoho-cliq // Full implementation is in extensions/zoho-cliq
import { import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../../routing/session-key.js";
DEFAULT_ACCOUNT_ID,
normalizeAccountId,
} from "../../routing/session-key.js";
import type { ChannelMeta } from "./types.js"; import type { ChannelMeta } from "./types.js";
import type { ChannelPlugin } from "./types.js"; import type { ChannelPlugin } from "./types.js";
@ -66,7 +63,10 @@ export const zohoCliqPlugin: ChannelPlugin<ResolvedZohoCliqAccount> = {
const resolvedAccountId = normalizeAccountId(accountId); const resolvedAccountId = normalizeAccountId(accountId);
const channelCfg = (cfg as any).channels?.["zoho-cliq"]; const channelCfg = (cfg as any).channels?.["zoho-cliq"];
const accounts = channelCfg?.accounts; const accounts = channelCfg?.accounts;
const accountCfg = accounts?.[resolvedAccountId] ?? (resolvedAccountId === DEFAULT_ACCOUNT_ID ? channelCfg : undefined) ?? {}; const accountCfg =
accounts?.[resolvedAccountId] ??
(resolvedAccountId === DEFAULT_ACCOUNT_ID ? channelCfg : undefined) ??
{};
const clientId = accountCfg.clientId ?? process.env.ZOHO_CLIQ_CLIENT_ID ?? ""; const clientId = accountCfg.clientId ?? process.env.ZOHO_CLIQ_CLIENT_ID ?? "";
const clientSecret = accountCfg.clientSecret ?? process.env.ZOHO_CLIQ_CLIENT_SECRET ?? ""; const clientSecret = accountCfg.clientSecret ?? process.env.ZOHO_CLIQ_CLIENT_SECRET ?? "";
@ -89,9 +89,7 @@ export const zohoCliqPlugin: ChannelPlugin<ResolvedZohoCliqAccount> = {
defaultAccountId: (cfg) => { defaultAccountId: (cfg) => {
const accounts = (cfg as any).channels?.["zoho-cliq"]?.accounts; const accounts = (cfg as any).channels?.["zoho-cliq"]?.accounts;
if (!accounts) return DEFAULT_ACCOUNT_ID; if (!accounts) return DEFAULT_ACCOUNT_ID;
const enabled = Object.entries(accounts).filter( const enabled = Object.entries(accounts).filter(([_, a]) => (a as any).enabled ?? true);
([_, a]) => (a as any).enabled ?? true,
);
if (enabled.length === 1) return enabled[0][0]; if (enabled.length === 1) return enabled[0][0];
if (Object.hasOwn(accounts, DEFAULT_ACCOUNT_ID)) { if (Object.hasOwn(accounts, DEFAULT_ACCOUNT_ID)) {
return DEFAULT_ACCOUNT_ID; return DEFAULT_ACCOUNT_ID;

View File

@ -1,10 +1,4 @@
import { import { Editor, type EditorTheme, type TUI, Key, matchesKey } from "@mariozechner/pi-tui";
Editor,
type EditorTheme,
type TUI,
Key,
matchesKey,
} from "@mariozechner/pi-tui";
export class CustomEditor extends Editor { export class CustomEditor extends Editor {
onEscape?: () => void; onEscape?: () => void;