mirror of
https://github.com/wassname/pi-telegram.git
synced 2026-06-27 17:31:23 +08:00
skip [telegram] prefix for ! commands so pi handles them natively as shell
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -65,7 +65,8 @@ export function buildTelegramTurnPrompt(options: {
|
||||
files: DownloadedTelegramTurnFileLike[];
|
||||
historyTurns?: Pick<PendingTelegramTurn, "historyText">[];
|
||||
}): 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:";
|
||||
|
||||
Reference in New Issue
Block a user