@@ -301,58 +301,6 @@ export const webviewMessageHandler = async (
301301 case "customInstructions" :
302302 await provider . updateCustomInstructions ( message . text )
303303 break
304- case "alwaysAllowReadOnly" :
305- await updateGlobalState ( "alwaysAllowReadOnly" , message . bool ?? undefined )
306- await provider . postStateToWebview ( )
307- break
308- case "alwaysAllowReadOnlyOutsideWorkspace" :
309- await updateGlobalState ( "alwaysAllowReadOnlyOutsideWorkspace" , message . bool ?? undefined )
310- await provider . postStateToWebview ( )
311- break
312- case "alwaysAllowWrite" :
313- await updateGlobalState ( "alwaysAllowWrite" , message . bool ?? undefined )
314- await provider . postStateToWebview ( )
315- break
316- case "alwaysAllowWriteOutsideWorkspace" :
317- await updateGlobalState ( "alwaysAllowWriteOutsideWorkspace" , message . bool ?? undefined )
318- await provider . postStateToWebview ( )
319- break
320- case "alwaysAllowWriteProtected" :
321- await updateGlobalState ( "alwaysAllowWriteProtected" , message . bool ?? undefined )
322- await provider . postStateToWebview ( )
323- break
324- case "alwaysAllowExecute" :
325- await updateGlobalState ( "alwaysAllowExecute" , message . bool ?? undefined )
326- await provider . postStateToWebview ( )
327- break
328- case "alwaysAllowBrowser" :
329- await updateGlobalState ( "alwaysAllowBrowser" , message . bool ?? undefined )
330- await provider . postStateToWebview ( )
331- break
332- case "alwaysAllowMcp" :
333- await updateGlobalState ( "alwaysAllowMcp" , message . bool )
334- await provider . postStateToWebview ( )
335- break
336- case "alwaysAllowModeSwitch" :
337- await updateGlobalState ( "alwaysAllowModeSwitch" , message . bool )
338- await provider . postStateToWebview ( )
339- break
340- case "allowedMaxRequests" :
341- await updateGlobalState ( "allowedMaxRequests" , message . value )
342- await provider . postStateToWebview ( )
343- break
344- case "allowedMaxCost" :
345- await updateGlobalState ( "allowedMaxCost" , message . value )
346- await provider . postStateToWebview ( )
347- break
348- case "alwaysAllowSubtasks" :
349- await updateGlobalState ( "alwaysAllowSubtasks" , message . bool )
350- await provider . postStateToWebview ( )
351- break
352- case "alwaysAllowUpdateTodoList" :
353- await updateGlobalState ( "alwaysAllowUpdateTodoList" , message . bool )
354- await provider . postStateToWebview ( )
355- break
356304 case "askResponse" :
357305 provider . getCurrentTask ( ) ?. handleWebviewAskResponse ( message . askResponse ! , message . text , message . images )
358306 break
@@ -948,40 +896,6 @@ export const webviewMessageHandler = async (
948896 }
949897 break
950898 }
951- // playSound handler removed - now handled directly in the webview
952- case "soundEnabled" :
953- const soundEnabled = message . bool ?? true
954- await updateGlobalState ( "soundEnabled" , soundEnabled )
955- await provider . postStateToWebview ( )
956- break
957- case "soundVolume" :
958- const soundVolume = message . value ?? 0.5
959- await updateGlobalState ( "soundVolume" , soundVolume )
960- await provider . postStateToWebview ( )
961- break
962- case "ttsEnabled" :
963- const ttsEnabled = message . bool ?? true
964- await updateGlobalState ( "ttsEnabled" , ttsEnabled )
965- setTtsEnabled ( ttsEnabled ) // Add this line to update the tts utility
966- await provider . postStateToWebview ( )
967- break
968- case "ttsSpeed" :
969- const ttsSpeed = message . value ?? 1.0
970- await updateGlobalState ( "ttsSpeed" , ttsSpeed )
971- setTtsSpeed ( ttsSpeed )
972- await provider . postStateToWebview ( )
973- break
974- case "playTts" :
975- if ( message . text ) {
976- playTts ( message . text , {
977- onStart : ( ) => provider . postMessageToWebview ( { type : "ttsStart" , text : message . text } ) ,
978- onStop : ( ) => provider . postMessageToWebview ( { type : "ttsStop" , text : message . text } ) ,
979- } )
980- }
981- break
982- case "stopTts" :
983- stopTts ( )
984- break
985899 case "diffEnabled" :
986900 const diffEnabled = message . bool ?? true
987901 await updateGlobalState ( "diffEnabled" , diffEnabled )
@@ -1085,11 +999,6 @@ export const webviewMessageHandler = async (
1085999 } )
10861000 }
10871001 }
1088-
1089- break
1090- case "alwaysApproveResubmit" :
1091- await updateGlobalState ( "alwaysApproveResubmit" , message . bool ?? false )
1092- await provider . postStateToWebview ( )
10931002 break
10941003 case "requestDelaySeconds" :
10951004 await updateGlobalState ( "requestDelaySeconds" , message . value ?? 5 )
@@ -1275,10 +1184,6 @@ export const webviewMessageHandler = async (
12751184 await updateGlobalState ( "maxWorkspaceFiles" , fileCount )
12761185 await provider . postStateToWebview ( )
12771186 break
1278- case "alwaysAllowFollowupQuestions" :
1279- await updateGlobalState ( "alwaysAllowFollowupQuestions" , message . bool ?? false )
1280- await provider . postStateToWebview ( )
1281- break
12821187 case "followupAutoApproveTimeoutMs" :
12831188 await updateGlobalState ( "followupAutoApproveTimeoutMs" , message . value )
12841189 await provider . postStateToWebview ( )
0 commit comments