diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index fafc814bb5..0e5ab95b39 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -9,9 +9,6 @@ import axios from "axios" import pWaitFor from "p-wait-for" import * as vscode from "vscode" -// Small delay used for incremental message delivery to the webview -const INCREMENTAL_SEND_DELAY_MS = 10 - import { type TaskProviderLike, type TaskProviderEvents, @@ -1561,26 +1558,7 @@ export class ClineProvider async postStateToWebview() { const state = await this.getStateToPostToWebview() - - // Check if we're loading an existing task with messages - const currentCline = this.getCurrentCline() - const hasExistingMessages = currentCline && currentCline.clineMessages.length > 0 - - if (hasExistingMessages) { - // Send state without messages first - const stateWithoutMessages = { ...state, clineMessages: [] } - await this.postMessageToWebview({ type: "state", state: stateWithoutMessages }) - - // Then send messages incrementally with a small delay for smooth rendering - for (const message of currentCline.clineMessages) { - await this.postMessageToWebview({ type: "messageCreated", clineMessage: message }) - // Small delay to prevent overwhelming the webview - await delay(INCREMENTAL_SEND_DELAY_MS) - } - } else { - // Normal state update for new tasks or tasks without messages - await this.postMessageToWebview({ type: "state", state }) - } + await this.postMessageToWebview({ type: "state", state }) // Check MDM compliance and send user to account tab if not compliant if (!this.checkMdmCompliance()) {