@@ -142,7 +142,7 @@ function runDelegationTransition<T>(
142142
143143 locks . set ( parentTaskId , tail )
144144
145- tail . finally ( ( ) => {
145+ void tail . finally ( ( ) => {
146146 if ( locks . get ( parentTaskId ) === tail ) {
147147 locks . delete ( parentTaskId )
148148 }
@@ -234,7 +234,7 @@ export class ClineProvider
234234 ClineProvider . activeInstances . add ( this )
235235
236236 this . mdmService = mdmService
237- this . updateGlobalState ( "codebaseIndexModels" , EMBEDDING_MODEL_PROFILES )
237+ void this . updateGlobalState ( "codebaseIndexModels" , EMBEDDING_MODEL_PROFILES )
238238
239239 // Initialize the per-task file-based history store.
240240 // The globalState write-through is debounced separately (not on every mutation)
@@ -687,7 +687,7 @@ export class ClineProvider
687687 this . mcpHub = undefined
688688 await this . skillsManager ?. dispose ( )
689689 this . skillsManager = undefined
690- this . marketplaceManager ?. cleanup ( )
690+ await this . marketplaceManager ?. cleanup ( )
691691 this . customModesManager ?. dispose ( )
692692 this . taskHistoryStore . dispose ( )
693693 this . flushGlobalStateWriteThrough ( )
@@ -822,9 +822,27 @@ export class ClineProvider
822822 setPanel ( webviewView , "sidebar" )
823823 }
824824
825+ // Set up webview options with proper resource roots
826+ const resourceRoots = [ this . contextProxy . extensionUri ]
827+
828+ // Add workspace folders to allow access to workspace files
829+ if ( vscode . workspace . workspaceFolders ) {
830+ resourceRoots . push ( ...vscode . workspace . workspaceFolders . map ( ( folder ) => folder . uri ) )
831+ }
832+
833+ webviewView . webview . options = {
834+ enableScripts : true ,
835+ localResourceRoots : resourceRoots ,
836+ }
837+
838+ webviewView . webview . html =
839+ this . contextProxy . extensionMode === vscode . ExtensionMode . Development
840+ ? await this . getHMRHtmlContent ( webviewView . webview )
841+ : await this . getHtmlContent ( webviewView . webview )
842+
825843 // Initialize out-of-scope variables that need to receive persistent
826844 // global state values.
827- this . getState ( ) . then (
845+ await this . getState ( ) . then (
828846 ( {
829847 terminalShellIntegrationTimeout = Terminal . defaultShellIntegrationTimeout ,
830848 terminalShellIntegrationDisabled = false ,
@@ -852,24 +870,6 @@ export class ClineProvider
852870 } ,
853871 )
854872
855- // Set up webview options with proper resource roots
856- const resourceRoots = [ this . contextProxy . extensionUri ]
857-
858- // Add workspace folders to allow access to workspace files
859- if ( vscode . workspace . workspaceFolders ) {
860- resourceRoots . push ( ...vscode . workspace . workspaceFolders . map ( ( folder ) => folder . uri ) )
861- }
862-
863- webviewView . webview . options = {
864- enableScripts : true ,
865- localResourceRoots : resourceRoots ,
866- }
867-
868- webviewView . webview . html =
869- this . contextProxy . extensionMode === vscode . ExtensionMode . Development
870- ? await this . getHMRHtmlContent ( webviewView . webview )
871- : await this . getHtmlContent ( webviewView . webview )
872-
873873 // Sets up an event listener to listen for messages passed from the webview view context
874874 // and executes code based on the message that is received.
875875 this . setWebviewMessageListener ( webviewView . webview )
@@ -892,7 +892,7 @@ export class ClineProvider
892892 // for this visibility listener panel.
893893 const viewStateDisposable = webviewView . onDidChangeViewState ( ( ) => {
894894 if ( this . view ?. visible ) {
895- this . postMessageToWebview ( { type : "action" , action : "didBecomeVisible" } )
895+ void this . postMessageToWebview ( { type : "action" , action : "didBecomeVisible" } )
896896 } else {
897897 this . logWebviewHiddenDiagnostics ( )
898898 }
@@ -903,7 +903,7 @@ export class ClineProvider
903903 // sidebar
904904 const visibilityDisposable = webviewView . onDidChangeVisibility ( ( ) => {
905905 if ( this . view ?. visible ) {
906- this . postMessageToWebview ( { type : "action" , action : "didBecomeVisible" } )
906+ void this . postMessageToWebview ( { type : "action" , action : "didBecomeVisible" } )
907907 } else {
908908 this . logWebviewHiddenDiagnostics ( )
909909 }
@@ -2107,7 +2107,7 @@ export class ClineProvider
21072107 const state = await this . getStateToPostToWebview ( )
21082108 this . clineMessagesSeq ++
21092109 state . clineMessagesSeq = this . clineMessagesSeq
2110- this . postMessageToWebview ( { type : "state" , state } )
2110+ await this . postMessageToWebview ( { type : "state" , state } )
21112111 }
21122112
21132113 /**
@@ -2123,7 +2123,7 @@ export class ClineProvider
21232123 this . clineMessagesSeq ++
21242124 state . clineMessagesSeq = this . clineMessagesSeq
21252125 const { taskHistory : _omit , ...rest } = state
2126- this . postMessageToWebview ( { type : "state" , state : rest } )
2126+ await this . postMessageToWebview ( { type : "state" , state : rest } )
21272127 }
21282128
21292129 /**
@@ -2140,7 +2140,7 @@ export class ClineProvider
21402140 async postStateToWebviewWithoutClineMessages ( ) : Promise < void > {
21412141 const state = await this . getStateToPostToWebview ( )
21422142 const { clineMessages : _omitMessages , taskHistory : _omitHistory , ...rest } = state
2143- this . postMessageToWebview ( { type : "state" , state : rest } )
2143+ await this . postMessageToWebview ( { type : "state" , state : rest } )
21442144 }
21452145
21462146 /**
@@ -2160,7 +2160,7 @@ export class ClineProvider
21602160 ] )
21612161
21622162 // Send marketplace data separately
2163- this . postMessageToWebview ( {
2163+ await this . postMessageToWebview ( {
21642164 type : "marketplaceData" ,
21652165 organizationMcps : marketplaceResult . organizationMcps || [ ] ,
21662166 marketplaceItems : marketplaceResult . marketplaceItems || [ ] ,
@@ -2171,7 +2171,7 @@ export class ClineProvider
21712171 console . error ( "Failed to fetch marketplace data:" , error )
21722172
21732173 // Send empty data on error to prevent UI from hanging
2174- this . postMessageToWebview ( {
2174+ await this . postMessageToWebview ( {
21752175 type : "marketplaceData" ,
21762176 organizationMcps : [ ] ,
21772177 marketplaceItems : [ ] ,
@@ -2954,7 +2954,7 @@ export class ClineProvider
29542954 if ( currentManager === this . getCurrentWorkspaceCodeIndexManager ( ) ) {
29552955 // Get the full status from the manager to ensure we have all fields correctly formatted
29562956 const fullStatus = currentManager . getCurrentStatus ( )
2957- this . postMessageToWebview ( {
2957+ void this . postMessageToWebview ( {
29582958 type : "indexingStatusUpdate" ,
29592959 values : fullStatus ,
29602960 } )
@@ -2966,7 +2966,7 @@ export class ClineProvider
29662966 }
29672967
29682968 // Send initial status for the current workspace
2969- this . postMessageToWebview ( {
2969+ void this . postMessageToWebview ( {
29702970 type : "indexingStatusUpdate" ,
29712971 values : currentManager . getCurrentStatus ( ) ,
29722972 } )
0 commit comments