fix: derive prefixes from routed identity (#578) (thanks @p6l-richard)
This commit is contained in:
@@ -6,7 +6,10 @@ import { apiThrottler } from "@grammyjs/transformer-throttler";
|
||||
import type { ApiClientOptions, Message } from "grammy";
|
||||
import { Bot, InputFile, webhookCallback } from "grammy";
|
||||
import { resolveDefaultAgentId } from "../agents/agent-scope.js";
|
||||
import { resolveAckReaction } from "../agents/identity.js";
|
||||
import {
|
||||
resolveAckReaction,
|
||||
resolveResponsePrefix,
|
||||
} from "../agents/identity.js";
|
||||
import { EmbeddedBlockChunker } from "../agents/pi-embedded-block-chunker.js";
|
||||
import {
|
||||
chunkMarkdownText,
|
||||
@@ -726,7 +729,7 @@ export function createTelegramBot(opts: TelegramBotOptions) {
|
||||
|
||||
const { dispatcher, replyOptions, markDispatchIdle } =
|
||||
createReplyDispatcherWithTyping({
|
||||
responsePrefix: cfg.messages?.responsePrefix,
|
||||
responsePrefix: resolveResponsePrefix(cfg, route.agentId),
|
||||
deliver: async (payload, info) => {
|
||||
if (info.kind === "final") {
|
||||
await flushDraft();
|
||||
|
||||
Reference in New Issue
Block a user