Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

chore: clean up LOBE-XXX code annotations (#15249)

Arvin Xu35052416ccbf
diff --git a/src/server/modules/AgentRuntime/RuntimeExecutors.ts b/src/server/modules/AgentRuntime/RuntimeExecutors.ts
index 181af89e20f..812faa32edc 100644
--- a/src/server/modules/AgentRuntime/RuntimeExecutors.ts
+++ b/src/server/modules/AgentRuntime/RuntimeExecutors.ts
@@ -1355,11 +1355,13 @@ export const createRuntimeExecutors = (
continue;
}
- // LOBE-9523: cancel/interrupt path — the model-runtime stream was aborted
- // before reaching the post-stream finalize, so the DB row is still the
- // LOADING_FLAT placeholder. Persist whatever partial content the stream
- // callbacks already accumulated so reload/end snapshots do not clobber
- // the client's in-memory streamed content.
+ // Cancel/interrupt path: when the user stops mid-stream, the model-runtime
+ // stream is aborted before reaching the post-stream finalize (line ~1078),
+ // so the DB row remains a LOADING_FLAT placeholder. Without this fix,
+ // agent_runtime_end would push the placeholder as the source-of-truth
+ // to the client, clobbering the streamed content accumulated in memory.
+ // We persist whatever partial content the stream callbacks already
+ // accumulated so that reload/end snapshots reflect actual progress.
if (interrupted && (content || thinkingContent || toolsCalling.length > 0)) {
try {
const persistedTools =