Skip to content

Commit 00efa07

Browse files
committed
Add newlines after notifications
1 parent ed5cbb7 commit 00efa07

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
@@ -283,7 +283,7 @@ export class CodexEventHandler {
283283
sessionUpdate: "agent_message_chunk",
284284
content: {
285285
type: "text",
286-
text,
286+
text: `${text}\n\n`,
287287
},
288288
};
289289
}
@@ -315,7 +315,7 @@ export class CodexEventHandler {
315315
sessionUpdate: "agent_message_chunk",
316316
content: {
317317
type: "text",
318-
text: "Goal cleared.",
318+
text: "Goal cleared.\n\n",
319319
},
320320
};
321321
}

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)