@@ -964,7 +964,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
964964 step . code ??= data . code ;
965965 step . output ??= data . output ;
966966 step . canceled = data . canceled ;
967- if ( isAiAssistanceChangeSummariesEnabled ( ) && this . #currentAgent && ! this . #currentAgent. isHistoryEntry ) {
967+ if ( isAiAssistancePatchingEnabled ( ) && this . #currentAgent && ! this . #currentAgent. isHistoryEntry ) {
968968 this . #viewProps. changeSummary = this . #changeManager. formatChanges ( this . #currentAgent. id ) ;
969969 }
970970 commitStep ( ) ;
@@ -1058,16 +1058,9 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
10581058 }
10591059}
10601060
1061- function setAiAssistanceChangeSummariesEnabled ( enabled : true ) : void {
1062- if ( enabled ) {
1063- localStorage . setItem ( 'aiAssistance_changeSummariesEnabled' , 'true' ) ;
1064- } else {
1065- localStorage . setItem ( 'aiAssistance_changeSummariesEnabled' , 'false' ) ;
1066- }
1067- }
1068-
1069- function isAiAssistanceChangeSummariesEnabled ( ) : boolean {
1070- return localStorage . getItem ( 'aiAssistance_changeSummariesEnabled' ) === 'true' ;
1061+ function isAiAssistancePatchingEnabled ( ) : boolean {
1062+ const config = Common . Settings . Settings . instance ( ) . getHostConfig ( ) ;
1063+ return Boolean ( config . devToolsFreestyler ?. patching ) ;
10711064}
10721065
10731066function setAiAssistanceServerSideLoggingEnabled ( enabled : boolean ) : void {
@@ -1101,6 +1094,4 @@ function isAiAssistanceStylingWithFunctionCallingEnabled(): boolean {
11011094// @ts -ignore
11021095globalThis . setAiAssistanceServerSideLoggingEnabled = setAiAssistanceServerSideLoggingEnabled ;
11031096// @ts -ignore
1104- globalThis . setAiAssistanceChangeSummariesEnabled = setAiAssistanceChangeSummariesEnabled ;
1105- // @ts -ignore
11061097globalThis . setAiAssistanceStylingWithFunctionCalling = setAiAssistanceStylingWithFunctionCalling ;
0 commit comments