From 0139a77e94f744fdac07aa25896add23d7715b8d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 24 Dec 2025 00:57:11 +0000 Subject: [PATCH] fix: resolve ts build errors --- src/agents/pi-tools.ts | 2 +- src/auto-reply/templating.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agents/pi-tools.ts b/src/agents/pi-tools.ts index f489c45e0..5d69a49b7 100644 --- a/src/agents/pi-tools.ts +++ b/src/agents/pi-tools.ts @@ -115,7 +115,7 @@ function normalizeToolParameters(tool: AnyAgentTool): AnyAgentTool { properties: schema.properties ?? {}, additionalProperties: "additionalProperties" in schema ? schema.additionalProperties : true, - } as TSchema, + } as unknown as TSchema, }; } diff --git a/src/auto-reply/templating.ts b/src/auto-reply/templating.ts index a4519a94b..00dc4a9a7 100644 --- a/src/auto-reply/templating.ts +++ b/src/auto-reply/templating.ts @@ -30,6 +30,6 @@ export function applyTemplate(str: string | undefined, ctx: TemplateContext) { if (!str) return ""; return str.replace(/{{\s*(\w+)\s*}}/g, (_, key) => { const value = ctx[key as keyof TemplateContext]; - return value ?? ""; + return value == null ? "" : String(value); }); }