Skip to content

Commit 7e347e6

Browse files
feat: ensure permission rule is rendered in new line
1 parent 08c0e27 commit 7e347e6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/CodexApprovalHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,11 @@ export class CodexApprovalHandler implements ApprovalHandler {
397397
if (permissions.fileSystem?.entries?.length) {
398398
content.push(`File System Entries: ${JSON.stringify(permissions.fileSystem.entries)}`);
399399
}
400-
return content.length > 0 ? content.join("\n") : null;
400+
return content.length > 0 ? content.join("\n\n") : null;
401401
}
402402

403403
private createContent(lines: Array<string | null | undefined>): acp.ToolCallContent[] | undefined {
404-
const text = lines.filter((line): line is string => !!line).join("\n");
404+
const text = lines.filter((line): line is string => !!line).join("\n\n");
405405
if (!text) return undefined;
406406
return [{
407407
type: "content",

src/__tests__/CodexACPAgent/data/approval-permissions-request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"type": "content",
3535
"content": {
3636
"type": "text",
37-
"text": "Need extra access\nNetwork Access: true\nFile System Read Access: /home/user/project\nFile System Write Access: /home/user/project/tmp"
37+
"text": "Need extra access\n\nNetwork Access: true\n\nFile System Read Access: /home/user/project\n\nFile System Write Access: /home/user/project/tmp"
3838
}
3939
}
4040
]

0 commit comments

Comments
 (0)