@deepseekdev/coder 1.0.76 → 1.0.77

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.
@@ -196,8 +196,6 @@ class InteractiveShell {
196
196
  runCounter = 0;
197
197
  activeRunId = 0;
198
198
  pendingPrompts = [];
199
- pendingInterruptPrompt = null;
200
- interruptStartTimer = null;
201
199
  debugEnabled = false;
202
200
  ctrlCCount = 0;
203
201
  lastCtrlCTime = 0;
@@ -3383,37 +3381,18 @@ Any text response is a failure. Only tool calls are accepted.`;
3383
3381
  this.dismissInlinePanel();
3384
3382
  const busy = this.isProcessing || this.controller.isProcessing();
3385
3383
  if (busy) {
3386
- this.pendingInterruptPrompt = trimmed;
3384
+ // Cancel current processing immediately
3387
3385
  this.controller.cancel('New prompt submitted');
3388
3386
  this.promptController?.getRenderer()?.clearStreamBuffer();
3389
- this.promptController?.setStatusMessage('Interrupting previous request...');
3390
- this.scheduleInterruptPromptStart();
3387
+ this.promptController?.setStatusMessage(' Processing new prompt...');
3388
+ // Start the new prompt immediately with interrupt flag
3389
+ // The interrupt flag bypasses the isProcessing check, allowing immediate start
3390
+ // The old processPrompt() will detect it's no longer the active run and clean up gracefully
3391
+ void this.processPrompt(trimmed, { interrupt: true });
3391
3392
  return;
3392
3393
  }
3393
3394
  void this.processPrompt(trimmed);
3394
3395
  }
3395
- scheduleInterruptPromptStart() {
3396
- if (this.interruptStartTimer) {
3397
- return;
3398
- }
3399
- const attemptStart = () => {
3400
- this.interruptStartTimer = null;
3401
- if (this.shouldExit) {
3402
- return;
3403
- }
3404
- const prompt = this.pendingInterruptPrompt;
3405
- if (!prompt) {
3406
- return;
3407
- }
3408
- if (this.controller.isProcessing()) {
3409
- this.interruptStartTimer = setTimeout(attemptStart, 50);
3410
- return;
3411
- }
3412
- this.pendingInterruptPrompt = null;
3413
- void this.processPrompt(prompt, { interrupt: true });
3414
- };
3415
- this.interruptStartTimer = setTimeout(attemptStart, 0);
3416
- }
3417
3396
  async processPrompt(prompt, options) {
3418
3397
  const interrupting = options?.interrupt ?? false;
3419
3398
  if (this.isProcessing && !interrupting) {
@@ -3833,12 +3812,7 @@ Any text response is a failure. Only tool calls are accepted.`;
3833
3812
  await memory.endEpisode(episodeSuccess, summary);
3834
3813
  if (stillActive) {
3835
3814
  this.currentResponseBuffer = '';
3836
- const interruptPrompt = this.pendingInterruptPrompt;
3837
- if (interruptPrompt && !this.shouldExit) {
3838
- this.pendingInterruptPrompt = null;
3839
- await this.processPrompt(interruptPrompt);
3840
- }
3841
- else if (this.pendingPrompts.length > 0 && !this.shouldExit) {
3815
+ if (this.pendingPrompts.length > 0 && !this.shouldExit) {
3842
3816
  const next = this.pendingPrompts.shift();
3843
3817
  if (next) {
3844
3818
  await this.processPrompt(next);