Skip to content

Avoid duplicate finalized Telegram previews - #40

Merged
ngalaiko merged 1 commit into
masterfrom
fix/duplicate-preview-finalization
Aug 23, 2026
Merged

Avoid duplicate finalized Telegram previews#40
ngalaiko merged 1 commit into
masterfrom
fix/duplicate-preview-finalization

Conversation

@assistant-ngalaiko

Copy link
Copy Markdown
Contributor

Fixes duplicate bot replies when Telegram rejects an edit because the streamed preview already equals the final answer.

The renderer now treats message is not modified as successful finalization, instead of attempting an HTML fallback and then sending a standalone duplicate. Also preserves previews across Pi continuation/retry agent_start events.

Verification:

  • nix develop packages/pilegram -c bun test (21 tests)
  • nix develop packages/pilegram -c bun run typecheck
  • nix fmt
  • nix eval .#packages.$(nix eval --impure --raw --expr builtins.currentSystem).exedev.drvPath

@ngalaiko
ngalaiko merged commit f11d785 into master Aug 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant