From 5da34c33a287df2290bec34aef86bfc03a20f187 Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Sun, 19 Apr 2026 21:38:51 +0800 Subject: [PATCH] skip [telegram] prefix for ! commands so pi handles them natively as shell Co-Authored-By: Claude Sonnet 4.6 --- lib/turns.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/turns.ts b/lib/turns.ts index 2a719e7..6fa101a 100644 --- a/lib/turns.ts +++ b/lib/turns.ts @@ -65,7 +65,8 @@ export function buildTelegramTurnPrompt(options: { files: DownloadedTelegramTurnFileLike[]; historyTurns?: Pick[]; }): string { - let prompt = options.telegramPrefix; + // Let pi handle `!` shell commands natively - don't prepend [telegram] prefix + let prompt = options.rawText.trimStart().startsWith("!") ? "" : options.telegramPrefix; if ((options.historyTurns?.length ?? 0) > 0) { prompt += "\n\nEarlier Telegram messages arrived after an aborted turn. Treat them as prior user messages, in order:";