@monotykamary/pi-retry 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/retry.ts +0 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monotykamary/pi-retry",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Extension suite for pi coding agent that handles 400/413 errors and connection errors with automatic retry",
5
5
  "type": "module",
6
6
  "author": "Tom X Nguyen",
package/retry.ts CHANGED
@@ -363,14 +363,6 @@ export default function (pi: ExtensionAPI) {
363
363
  // waited. agent.state.isStreaming is authoritative.
364
364
  if (_agent.state.isStreaming) return;
365
365
 
366
- // Remove the error assistant message from the transcript so the LLM
367
- // can retry from the same context. (The session's _prepareRetry does
368
- // the same thing for built-in retries.)
369
- const messages = _agent.state.messages;
370
- if (messages.length > 0 && messages[messages.length - 1].role === "assistant") {
371
- _agent.state.messages = messages.slice(0, -1);
372
- }
373
-
374
366
  // Guard 4: .catch() swallows the "already processing" error as a
375
367
  // last resort. agent.prompt() is async, so errors become rejected
376
368
  // Promises — a try/catch around an un-awaited call catches nothing.