Skip to content

Commit 92fcc03

Browse files
committed
Add TELEGRAM_TOPIC_ID to env schema and update notifier agent to use it
1 parent 4773f89 commit 92fcc03

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/agents/sophia/sub-agents/notifier/agent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export async function notifierAgent() {
1818
1919
Your only work is to do the below:
2020
- use this as chat id: ${env.TELEGRAM_CHAT_ID}
21+
- use this as topic id: ${env.TELEGRAM_TOPIC_ID}
2122
- call the send_message tool to send a message with the following format:
2223
2324
If ATP logging was successful (if atp_logger response contains ATP_LOG_COMPLETE):

src/env.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ export const envSchema = z.object({
2020
.optional()
2121
.describe("When given, agents use open-router endpoint instead"),
2222
TELEGRAM_CHAT_ID: z.string(),
23+
TELEGRAM_TOPIC_ID: z
24+
.string()
25+
.optional()
26+
.describe(
27+
"Telegram topic id for logging, Can be useful for sending messages to a specific topic of a forum style group",
28+
),
2329
TELEGRAM_BOT_TOKEN: z.string(),
2430
SOPHIA_ADDRESS: z
2531
.string()

0 commit comments

Comments
 (0)