@@ -9,9 +9,6 @@ import axios from "axios"
99import pWaitFor from "p-wait-for"
1010import * as vscode from "vscode"
1111
12- // Small delay used for incremental message delivery to the webview
13- const INCREMENTAL_SEND_DELAY_MS = 10
14-
1512import {
1613 type GlobalState ,
1714 type ProviderName ,
@@ -1343,26 +1340,7 @@ export class ClineProvider
13431340
13441341 async postStateToWebview ( ) {
13451342 const state = await this . getStateToPostToWebview ( )
1346-
1347- // Check if we're loading an existing task with messages
1348- const currentCline = this . getCurrentCline ( )
1349- const hasExistingMessages = currentCline && currentCline . clineMessages . length > 0
1350-
1351- if ( hasExistingMessages ) {
1352- // Send state without messages first
1353- const stateWithoutMessages = { ...state , clineMessages : [ ] }
1354- await this . postMessageToWebview ( { type : "state" , state : stateWithoutMessages } )
1355-
1356- // Then send messages incrementally with a small delay for smooth rendering
1357- for ( const message of currentCline . clineMessages ) {
1358- await this . postMessageToWebview ( { type : "messageCreated" , clineMessage : message } )
1359- // Small delay to prevent overwhelming the webview
1360- await delay ( INCREMENTAL_SEND_DELAY_MS )
1361- }
1362- } else {
1363- // Normal state update for new tasks or tasks without messages
1364- await this . postMessageToWebview ( { type : "state" , state } )
1365- }
1343+ await this . postMessageToWebview ( { type : "state" , state } )
13661344
13671345 // Check MDM compliance and send user to account tab if not compliant
13681346 if ( ! this . checkMdmCompliance ( ) ) {
0 commit comments