chore: format partially staged files
This commit is contained in:
parent
c1dfc074fc
commit
0ec276d421
@ -59,8 +59,8 @@ const WebSearchSchema = Type.Object({
|
||||
|
||||
type WebSearchConfig = NonNullable<ClawdbotConfig["tools"]>["web"] extends infer Web
|
||||
? Web extends { search?: infer Search }
|
||||
? Search
|
||||
: undefined
|
||||
? Search
|
||||
: undefined
|
||||
: undefined;
|
||||
|
||||
type BraveSearchResult = {
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
// Zoho Cliq Channel Plugin - Core Stub
|
||||
// Full implementation is in extensions/zoho-cliq
|
||||
|
||||
import {
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
normalizeAccountId,
|
||||
} from "../../routing/session-key.js";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../../routing/session-key.js";
|
||||
import type { ChannelMeta } from "./types.js";
|
||||
import type { ChannelPlugin } from "./types.js";
|
||||
|
||||
@ -66,7 +63,10 @@ export const zohoCliqPlugin: ChannelPlugin<ResolvedZohoCliqAccount> = {
|
||||
const resolvedAccountId = normalizeAccountId(accountId);
|
||||
const channelCfg = (cfg as any).channels?.["zoho-cliq"];
|
||||
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 clientSecret = accountCfg.clientSecret ?? process.env.ZOHO_CLIQ_CLIENT_SECRET ?? "";
|
||||
@ -89,9 +89,7 @@ export const zohoCliqPlugin: ChannelPlugin<ResolvedZohoCliqAccount> = {
|
||||
defaultAccountId: (cfg) => {
|
||||
const accounts = (cfg as any).channels?.["zoho-cliq"]?.accounts;
|
||||
if (!accounts) return DEFAULT_ACCOUNT_ID;
|
||||
const enabled = Object.entries(accounts).filter(
|
||||
([_, a]) => (a as any).enabled ?? true,
|
||||
);
|
||||
const enabled = Object.entries(accounts).filter(([_, a]) => (a as any).enabled ?? true);
|
||||
if (enabled.length === 1) return enabled[0][0];
|
||||
if (Object.hasOwn(accounts, DEFAULT_ACCOUNT_ID)) {
|
||||
return DEFAULT_ACCOUNT_ID;
|
||||
|
||||
@ -1,10 +1,4 @@
|
||||
import {
|
||||
Editor,
|
||||
type EditorTheme,
|
||||
type TUI,
|
||||
Key,
|
||||
matchesKey,
|
||||
} from "@mariozechner/pi-tui";
|
||||
import { Editor, type EditorTheme, type TUI, Key, matchesKey } from "@mariozechner/pi-tui";
|
||||
|
||||
export class CustomEditor extends Editor {
|
||||
onEscape?: () => void;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user