style: format gmail hooks and tools
This commit is contained in:
@@ -150,7 +150,7 @@ function normalizeToolParameters(tool: AnyAgentTool): AnyAgentTool {
|
|||||||
properties:
|
properties:
|
||||||
Object.keys(mergedProperties).length > 0
|
Object.keys(mergedProperties).length > 0
|
||||||
? mergedProperties
|
? mergedProperties
|
||||||
: schema.properties ?? {},
|
: (schema.properties ?? {}),
|
||||||
...(mergedRequired && mergedRequired.length > 0
|
...(mergedRequired && mergedRequired.length > 0
|
||||||
? { required: mergedRequired }
|
? { required: mergedRequired }
|
||||||
: {}),
|
: {}),
|
||||||
|
|||||||
@@ -145,13 +145,13 @@ export async function runGmailSetup(opts: GmailSetupOptions) {
|
|||||||
const servePath = normalizeServePath(
|
const servePath = normalizeServePath(
|
||||||
tailscaleMode !== "off" && !configuredServePath
|
tailscaleMode !== "off" && !configuredServePath
|
||||||
? "/"
|
? "/"
|
||||||
: configuredServePath ?? DEFAULT_GMAIL_SERVE_PATH,
|
: (configuredServePath ?? DEFAULT_GMAIL_SERVE_PATH),
|
||||||
);
|
);
|
||||||
const tailscalePath = normalizeServePath(
|
const tailscalePath = normalizeServePath(
|
||||||
opts.tailscalePath ??
|
opts.tailscalePath ??
|
||||||
baseConfig.hooks?.gmail?.tailscale?.path ??
|
baseConfig.hooks?.gmail?.tailscale?.path ??
|
||||||
(tailscaleMode !== "off"
|
(tailscaleMode !== "off"
|
||||||
? configuredServePath ?? DEFAULT_GMAIL_SERVE_PATH
|
? (configuredServePath ?? DEFAULT_GMAIL_SERVE_PATH)
|
||||||
: servePath),
|
: servePath),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ export function resolveGmailHookRuntimeConfig(
|
|||||||
? hasExplicitServePath
|
? hasExplicitServePath
|
||||||
? servePathRaw
|
? servePathRaw
|
||||||
: DEFAULT_GMAIL_SERVE_PATH
|
: DEFAULT_GMAIL_SERVE_PATH
|
||||||
: tailscalePathRaw ?? servePath,
|
: (tailscalePathRaw ?? servePath),
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user