@@ -101,20 +101,13 @@ export class CodexApprovalHandler implements ApprovalHandler {
101101 params : CommandExecutionRequestApprovalParams
102102 ) : acp . RequestPermissionRequest {
103103 const options = this . buildCommandOptions ( params ) . map ( ( { option } ) => option ) ;
104- const content = this . createContent ( [
105- params . reason ?? null ,
106- this . formatNetworkApprovalContext ( params ) ,
107- this . formatExecpolicyAmendment ( params ) ,
108- this . formatNetworkPolicyAmendments ( params ) ,
109- ] ) ;
110104 return {
111105 sessionId,
112106 toolCall : {
113107 toolCallId : params . itemId ,
114108 kind : "execute" ,
115109 status : "pending" ,
116110 rawInput : params . command ? { command : stripShellPrefix ( params . command ) , cwd : params . cwd } : null ,
117- ...( content ? { content } : { } ) ,
118111 } ,
119112 options,
120113 _meta : { codex : { params } }
@@ -126,17 +119,12 @@ export class CodexApprovalHandler implements ApprovalHandler {
126119 params : FileChangeRequestApprovalParams
127120 ) : acp . RequestPermissionRequest {
128121 const options = this . buildFileChangeOptions ( params ) . map ( ( { option } ) => option ) ;
129- const content = this . createContent ( [
130- params . reason ?? null ,
131- params . grantRoot ? `Grant Root: ${ params . grantRoot } ` : null ,
132- ] ) ;
133122 return {
134123 sessionId,
135124 toolCall : {
136125 toolCallId : params . itemId ,
137126 kind : "edit" ,
138127 status : "pending" ,
139- ...( content ? { content } : { } ) ,
140128 } ,
141129 options,
142130 _meta : { codex : { params } }
@@ -363,26 +351,6 @@ export class CodexApprovalHandler implements ApprovalHandler {
363351 : `Block ${ amendment . host } in the Future` ;
364352 }
365353
366- private formatNetworkApprovalContext ( params : CommandExecutionRequestApprovalParams ) : string | null {
367- const context = params . networkApprovalContext ;
368- if ( ! context ) return null ;
369- return `Network Approval Context: ${ context . protocol } ${ context . host } ` ;
370- }
371-
372- private formatExecpolicyAmendment ( params : CommandExecutionRequestApprovalParams ) : string | null {
373- const amendment = params . proposedExecpolicyAmendment ;
374- if ( ! amendment || amendment . length === 0 ) return null ;
375- return `Proposed Command Pattern: ${ amendment . join ( " " ) } ` ;
376- }
377-
378- private formatNetworkPolicyAmendments ( params : CommandExecutionRequestApprovalParams ) : string | null {
379- const amendments = params . proposedNetworkPolicyAmendments ;
380- if ( ! amendments || amendments . length === 0 ) return null ;
381- return `Proposed Network Policy Amendments: ${ amendments
382- . map ( ( amendment ) => `${ amendment . action } ${ amendment . host } ` )
383- . join ( ", " ) } `;
384- }
385-
386354 private formatRequestedPermissions ( permissions : RequestPermissionProfile ) : string | null {
387355 const content : string [ ] = [ ] ;
388356 if ( permissions . network ?. enabled !== undefined && permissions . network . enabled !== null ) {
0 commit comments