Skip to content

Commit 619bf4f

Browse files
committed
Add newlines after notifications
1 parent 48cd521 commit 619bf4f

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/CodexEventHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export class CodexEventHandler {
281281
sessionUpdate: "agent_message_chunk",
282282
content: {
283283
type: "text",
284-
text,
284+
text: `${text}\n\n`,
285285
},
286286
};
287287
}
@@ -313,7 +313,7 @@ export class CodexEventHandler {
313313
sessionUpdate: "agent_message_chunk",
314314
content: {
315315
type: "text",
316-
text: "Goal cleared.",
316+
text: "Goal cleared.\n\n",
317317
},
318318
};
319319
}

src/__tests__/CodexACPAgent/data/thread-goal-cleared.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"sessionUpdate": "agent_message_chunk",
88
"content": {
99
"type": "text",
10-
"text": "Goal cleared."
10+
"text": "Goal cleared.\n\n"
1111
}
1212
}
1313
}

src/__tests__/CodexACPAgent/data/thread-goal-updated-multiline.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"sessionUpdate": "agent_message_chunk",
88
"content": {
99
"type": "text",
10-
"text": "Goal updated (budget limited):\nFirst task\nSecond task"
10+
"text": "Goal updated (budget limited):\nFirst task\nSecond task\n\n"
1111
}
1212
}
1313
}

src/__tests__/CodexACPAgent/data/thread-goal-updated.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"sessionUpdate": "agent_message_chunk",
88
"content": {
99
"type": "text",
10-
"text": "Goal updated (active): Ship the goal update"
10+
"text": "Goal updated (active): Ship the goal update\n\n"
1111
}
1212
}
1313
}

src/__tests__/CodexACPAgent/thread-goal-events.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ describe("CodexEventHandler - thread goal events", () => {
123123

124124
const events = mockFixture.getAcpConnectionEvents([]);
125125
expect(events).toHaveLength(1);
126-
expect(events[0]!.args[0].update.content.text).toBe("Goal updated (active): Ship the goal update");
126+
expect(events[0]!.args[0].update.content.text).toBe("Goal updated (active): Ship the goal update\n\n");
127127
});
128128

129129
it("should suppress duplicate thread goal cleared notifications", async () => {
@@ -141,7 +141,7 @@ describe("CodexEventHandler - thread goal events", () => {
141141

142142
const events = mockFixture.getAcpConnectionEvents([]);
143143
expect(events).toHaveLength(1);
144-
expect(events[0]!.args[0].update.content.text).toBe("Goal cleared.");
144+
expect(events[0]!.args[0].update.content.text).toBe("Goal cleared.\n\n");
145145
});
146146

147147
function createSessionState(): SessionState {

0 commit comments

Comments
 (0)