@@ -281,9 +281,9 @@ export class ClineProvider implements vscode.WebviewViewProvider {
281281 }
282282
283283 webviewView . webview . html =
284- this . context . extensionMode === vscode . ExtensionMode . Production
285- ? this . getHtmlContent ( webviewView . webview )
286- : this . getHMRHtmlContent ( webviewView . webview )
284+ this . context . extensionMode === vscode . ExtensionMode . Development
285+ ? this . getHMRHtmlContent ( webviewView . webview )
286+ : this . getHtmlContent ( webviewView . webview )
287287
288288 // Sets up an event listener to listen for messages passed from the webview view context
289289 // and executes code based on the message that is recieved
@@ -424,10 +424,8 @@ export class ClineProvider implements vscode.WebviewViewProvider {
424424 const localServerUrl = `localhost:${ localPort } `
425425 const scriptUri = `http://${ localServerUrl } /${ file } `
426426
427- const reactRefreshHash = "sha256-YmMpkm5ow6h+lfI3ZRp0uys+EUCt6FOyLkJERkfVnTY="
428-
429427 const reactRefresh = /*html*/ `
430- <script sha256=" ${ reactRefreshHash } " nonce="${ nonce } " type="module">
428+ <script nonce="${ nonce } " type="module">
431429 import RefreshRuntime from "http://localhost:${ localPort } /@react-refresh"
432430 RefreshRuntime.injectIntoGlobalHook(window)
433431 window.$RefreshReg$ = () => {}
@@ -441,7 +439,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
441439 `font-src ${ webview . cspSource } ` ,
442440 `style-src ${ webview . cspSource } 'unsafe-inline' https://* http://${ localServerUrl } http://0.0.0.0:${ localPort } ` ,
443441 `img-src ${ webview . cspSource } data:` ,
444- `script-src 'unsafe-eval' https://* http://${ localServerUrl } http://0.0.0.0:${ localPort } '${ reactRefreshHash } ' ' nonce-${ nonce } '` ,
442+ `script-src 'unsafe-eval' https://* http://${ localServerUrl } http://0.0.0.0:${ localPort } 'nonce-${ nonce } '` ,
445443 `connect-src https://* ws://${ localServerUrl } ws://0.0.0.0:${ localPort } http://${ localServerUrl } http://0.0.0.0:${ localPort } ` ,
446444 ]
447445
0 commit comments