@dreb/coding-agent 2.23.0 → 2.24.0

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.
@@ -2229,6 +2229,33 @@ export class InteractiveMode {
2229
2229
  this.ui.requestRender();
2230
2230
  break;
2231
2231
  }
2232
+ case "length_retry": {
2233
+ // Remove the ghost streaming component left from the truncated stream
2234
+ if (this.streamingComponent) {
2235
+ this.chatContainer.removeChild(this.streamingComponent);
2236
+ this.streamingComponent = undefined;
2237
+ this.streamingMessage = undefined;
2238
+ }
2239
+ // Clear any pending tool components from the truncated partial
2240
+ for (const [, component] of this.pendingTools.entries()) {
2241
+ this.chatContainer.removeChild(component);
2242
+ }
2243
+ this.pendingTools.clear();
2244
+ // Show retry status
2245
+ this.statusContainer.clear();
2246
+ if (this.loadingAnimation) {
2247
+ this.loadingAnimation.stop();
2248
+ this.loadingAnimation = undefined;
2249
+ }
2250
+ if (this.retryLoader) {
2251
+ this.retryLoader.stop();
2252
+ this.retryLoader = undefined;
2253
+ }
2254
+ this.retryLoader = new Loader(this.ui, (spinner) => theme.fg("warning", spinner), (text) => theme.fg("muted", text), `Response truncated, retrying with larger token budget (${event.attempt}/${event.maxAttempts})... (${keyText("app.interrupt")} to cancel)`);
2255
+ this.statusContainer.addChild(this.retryLoader);
2256
+ this.ui.requestRender();
2257
+ break;
2258
+ }
2232
2259
  case "background_agent_start":
2233
2260
  case "background_agent_end": {
2234
2261
  this.updateBackgroundAgentStatus();