@@ -29,7 +29,6 @@ import { McpHub } from "../../services/mcp/McpHub"
2929import { McpServerManager } from "../../services/mcp/McpServerManager"
3030import { ShadowCheckpointService } from "../../services/checkpoints/ShadowCheckpointService"
3131import { fileExistsAtPath } from "../../utils/fs"
32- import { setSoundEnabled } from "../../utils/sound"
3332import { setTtsEnabled , setTtsSpeed } from "../../utils/tts"
3433import { ContextProxy } from "../config/ContextProxy"
3534import { ProviderSettingsManager } from "../config/ProviderSettingsManager"
@@ -327,7 +326,6 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
327326 // Initialize out-of-scope variables that need to recieve persistent global state values
328327 this . getState ( ) . then (
329328 ( {
330- soundEnabled = false ,
331329 terminalShellIntegrationTimeout = Terminal . defaultShellIntegrationTimeout ,
332330 terminalShellIntegrationDisabled = false ,
333331 terminalCommandDelay = 0 ,
@@ -337,7 +335,6 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
337335 terminalPowershellCounter = false ,
338336 terminalZdotdir = false ,
339337 } ) => {
340- setSoundEnabled ( soundEnabled )
341338 Terminal . setShellIntegrationTimeout ( terminalShellIntegrationTimeout )
342339 Terminal . setShellIntegrationDisabled ( terminalShellIntegrationDisabled )
343340 Terminal . setCommandDelay ( terminalCommandDelay )
@@ -579,6 +576,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
579576 ] )
580577
581578 const imagesUri = getUri ( webview , this . contextProxy . extensionUri , [ "assets" , "images" ] )
579+ const audioUri = getUri ( webview , this . contextProxy . extensionUri , [ "webview-ui" , "audio" ] )
582580
583581 const file = "src/index.tsx"
584582 const scriptUri = `http://${ localServerUrl } /${ file } `
@@ -598,6 +596,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
598596 `font-src ${ webview . cspSource } ` ,
599597 `style-src ${ webview . cspSource } 'unsafe-inline' https://* http://${ localServerUrl } http://0.0.0.0:${ localPort } ` ,
600598 `img-src ${ webview . cspSource } data:` ,
599+ `media-src ${ webview . cspSource } ` ,
601600 `script-src 'unsafe-eval' ${ webview . cspSource } https://* https://*.posthog.com http://${ localServerUrl } http://0.0.0.0:${ localPort } 'nonce-${ nonce } '` ,
602601 `connect-src https://* https://*.posthog.com ws://${ localServerUrl } ws://0.0.0.0:${ localPort } http://${ localServerUrl } http://0.0.0.0:${ localPort } ` ,
603602 ]
@@ -613,6 +612,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
613612 <link href="${ codiconsUri } " rel="stylesheet" />
614613 <script nonce="${ nonce } ">
615614 window.IMAGES_BASE_URI = "${ imagesUri } "
615+ window.AUDIO_BASE_URI = "${ audioUri } "
616616 window.MATERIAL_ICONS_BASE_URI = "${ materialIconsUri } "
617617 </script>
618618 <title>Roo Code</title>
@@ -672,6 +672,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
672672 ] )
673673
674674 const imagesUri = getUri ( webview , this . contextProxy . extensionUri , [ "assets" , "images" ] )
675+ const audioUri = getUri ( webview , this . contextProxy . extensionUri , [ "webview-ui" , "audio" ] )
675676
676677 // const scriptUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "assets", "main.js"))
677678
@@ -702,11 +703,12 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
702703 <meta charset="utf-8">
703704 <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
704705 <meta name="theme-color" content="#000000">
705- <meta http-equiv="Content-Security-Policy" content="default-src 'none'; font-src ${ webview . cspSource } ; style-src ${ webview . cspSource } 'unsafe-inline'; img-src ${ webview . cspSource } data:; script-src ${ webview . cspSource } 'wasm-unsafe-eval' 'nonce-${ nonce } ' https://us-assets.i.posthog.com 'strict-dynamic'; connect-src https://openrouter.ai https://api.requesty.ai https://us.i.posthog.com https://us-assets.i.posthog.com; ">
706+ <meta http-equiv="Content-Security-Policy" content="default-src 'none'; font-src ${ webview . cspSource } ; style-src ${ webview . cspSource } 'unsafe-inline'; img-src ${ webview . cspSource } data:; media-src ${ webview . cspSource } ; script-src ${ webview . cspSource } 'wasm-unsafe-eval' 'nonce-${ nonce } ' https://us-assets.i.posthog.com 'strict-dynamic'; connect-src https://openrouter.ai https://api.requesty.ai https://us.i.posthog.com https://us-assets.i.posthog.com">
706707 <link rel="stylesheet" type="text/css" href="${ stylesUri } ">
707708 <link href="${ codiconsUri } " rel="stylesheet" />
708709 <script nonce="${ nonce } ">
709710 window.IMAGES_BASE_URI = "${ imagesUri } "
711+ window.AUDIO_BASE_URI = "${ audioUri } "
710712 window.MATERIAL_ICONS_BASE_URI = "${ materialIconsUri } "
711713 </script>
712714 <title>Roo Code</title>
0 commit comments