@capekai/core 1.0.7 → 1.0.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capekai/core",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Bun-native composable agent runtime and framework for Capek.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -682,10 +682,21 @@ export async function handleChat<Origin>(
682
682
  return;
683
683
  }
684
684
 
685
- if (result.isFatal || result.interrupted) {
685
+ if (result.isFatal) {
686
686
  return;
687
687
  }
688
688
 
689
+ if (result.interrupted) {
690
+ // The old turn has finished cleanup; queued input starts a fresh turn.
691
+ const next = await drainQueue(ctx, sessionId);
692
+ if (!next) {
693
+ return;
694
+ }
695
+ currentContent = next.content;
696
+ currentAttachments = next.attachments;
697
+ continue;
698
+ }
699
+
689
700
  if (result.isQueueDrainable) {
690
701
  const next = await drainQueue(ctx, sessionId);
691
702
  if (next) {