From d8efe9695c1507d365dcda6fd20aade200ac1cf2 Mon Sep 17 00:00:00 2001 From: gituser865 Date: Mon, 20 Apr 2026 00:33:53 +0200 Subject: [PATCH 1/3] Rename project and update compatibility date --- wrangler.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrangler.toml b/wrangler.toml index 72fdc2f4cb..4da56e7211 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,6 +1,6 @@ #:schema node_modules/wrangler/config-schema.json -name = "bolt" +name = "opens" compatibility_flags = ["nodejs_compat"] -compatibility_date = "2025-03-28" +compatibility_date = "2026-04-18" pages_build_output_dir = "./build/client" send_metrics = false From f953fc4297a09557b1343f74488699b67df2ff6c Mon Sep 17 00:00:00 2001 From: gituser865 Date: Mon, 20 Apr 2026 04:20:26 +0200 Subject: [PATCH 2/3] Delete wrangler.toml --- wrangler.toml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 wrangler.toml diff --git a/wrangler.toml b/wrangler.toml deleted file mode 100644 index 4da56e7211..0000000000 --- a/wrangler.toml +++ /dev/null @@ -1,6 +0,0 @@ -#:schema node_modules/wrangler/config-schema.json -name = "opens" -compatibility_flags = ["nodejs_compat"] -compatibility_date = "2026-04-18" -pages_build_output_dir = "./build/client" -send_metrics = false From 7f29cbeea32b608cdad85ae4dfeb5e081ed0324e Mon Sep 17 00:00:00 2001 From: "circleci-app[bot]" <127350680+circleci-app[bot]@users.noreply.github.com> Date: Mon, 20 Apr 2026 15:04:52 +0000 Subject: [PATCH 3/3] fix: reset only specific message state instead of entire parser ## Summary - Added `resetMessage(messageId: string)` method to `StreamingMessageParser` that clears only a single message's state from the internal messages map - Added `resetMessage(messageId: string)` override to `EnhancedStreamingMessageParser` that delegates to the parent and also clears the message's processed code blocks - Replaced the global `this.reset()` call (which wiped all message state) with the targeted `this.resetMessage(messageId)` when re-parsing with enhanced input ## Details Previously, when the enhanced parser detected and wrapped code blocks in a message, it called `this.reset()` which cleared the entire parser state for **all** messages before re-parsing. This was too broad and could discard valid state from other in-flight messages. The fix introduces a scoped `resetMessage` method at both the base and enhanced parser levels, ensuring only the specific message being re-parsed has its state cleared. --- app/lib/runtime/enhanced-message-parser.ts | 9 +++++++-- app/lib/runtime/message-parser.ts | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/lib/runtime/enhanced-message-parser.ts b/app/lib/runtime/enhanced-message-parser.ts index 0c96313687..a07a323769 100644 --- a/app/lib/runtime/enhanced-message-parser.ts +++ b/app/lib/runtime/enhanced-message-parser.ts @@ -41,8 +41,8 @@ export class EnhancedStreamingMessageParser extends StreamingMessageParser { const enhancedInput = this._detectAndWrapCodeBlocks(messageId, input); if (enhancedInput !== input) { - // Reset and reparse with enhanced input - this.reset(); + // Reset only this message's state and reparse with enhanced input + this.resetMessage(messageId); output = super.parse(messageId, enhancedInput); } } @@ -524,4 +524,9 @@ ${content.trim()} this._processedCodeBlocks.clear(); this._artifactCounter = 0; } + + resetMessage(messageId: string) { + super.resetMessage(messageId); + this._processedCodeBlocks.delete(messageId); + } } diff --git a/app/lib/runtime/message-parser.ts b/app/lib/runtime/message-parser.ts index 47769e2589..976ae2011f 100644 --- a/app/lib/runtime/message-parser.ts +++ b/app/lib/runtime/message-parser.ts @@ -335,6 +335,10 @@ export class StreamingMessageParser { this.#messages.clear(); } + resetMessage(messageId: string) { + this.#messages.delete(messageId); + } + #parseActionTag(input: string, actionOpenIndex: number, actionEndIndex: number) { const actionTag = input.slice(actionOpenIndex, actionEndIndex + 1);