Wire send tool into main.ts
This commit is contained in:
@@ -13,6 +13,7 @@ import { Outbound } from "./telegram/outbound.js";
|
|||||||
import { createCalendarTool } from "./tools/calendar.js";
|
import { createCalendarTool } from "./tools/calendar.js";
|
||||||
import { createPlaywrightMcpBridge } from "./agent/playwright-mcp.js";
|
import { createPlaywrightMcpBridge } from "./agent/playwright-mcp.js";
|
||||||
import { createScheduleTool } from "./tools/schedule.js";
|
import { createScheduleTool } from "./tools/schedule.js";
|
||||||
|
import { createSendTool } from "./tools/send.js";
|
||||||
import { ensureWorkspace } from "./workspace.js";
|
import { ensureWorkspace } from "./workspace.js";
|
||||||
|
|
||||||
function sleep(ms: number): Promise<void> {
|
function sleep(ms: number): Promise<void> {
|
||||||
@@ -77,6 +78,11 @@ async function main(): Promise<void> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const customTools: CustomTools = [createScheduleTool(scheduler, config.timezone)];
|
const customTools: CustomTools = [createScheduleTool(scheduler, config.timezone)];
|
||||||
|
customTools.push(createSendTool({
|
||||||
|
bot: bot.api,
|
||||||
|
chatId: config.telegramOwnerId,
|
||||||
|
workspaceDir: config.workspaceDir,
|
||||||
|
}));
|
||||||
if (config.google) {
|
if (config.google) {
|
||||||
customTools.push(createCalendarTool(config.google, config.timezone));
|
customTools.push(createCalendarTool(config.google, config.timezone));
|
||||||
logger.info("calendar tool enabled");
|
logger.info("calendar tool enabled");
|
||||||
|
|||||||
Reference in New Issue
Block a user