mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Preserve Codex assistant message ids (#989)
This commit is contained in:
@@ -505,6 +505,7 @@ export const AgentTimelineItemPayloadSchema: z.ZodType<AgentTimelineItem, z.ZodT
|
||||
z.object({
|
||||
type: z.literal("assistant_message"),
|
||||
text: z.string(),
|
||||
messageId: z.string().optional(),
|
||||
}),
|
||||
z.object({
|
||||
type: z.literal("reasoning"),
|
||||
|
||||
@@ -194,6 +194,29 @@ async function emitTimelineResponse(
|
||||
}
|
||||
|
||||
describe("wire compatibility", () => {
|
||||
test("assistant timeline message ids are optional on the wire", () => {
|
||||
expect(
|
||||
AgentTimelineItemPayloadSchema.parse({
|
||||
type: "assistant_message",
|
||||
text: "old daemon shape",
|
||||
}),
|
||||
).toEqual({
|
||||
type: "assistant_message",
|
||||
text: "old daemon shape",
|
||||
});
|
||||
expect(
|
||||
AgentTimelineItemPayloadSchema.parse({
|
||||
type: "assistant_message",
|
||||
text: "new daemon shape",
|
||||
messageId: "msg-1",
|
||||
}),
|
||||
).toEqual({
|
||||
type: "assistant_message",
|
||||
text: "new daemon shape",
|
||||
messageId: "msg-1",
|
||||
});
|
||||
});
|
||||
|
||||
test("downgrades reasoning_merge for clients that do not declare the capability", async () => {
|
||||
const response = await emitTimelineResponse();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user