mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-07 00:44:49 +00:00
fix(agent): preserve reasoning order in activity transcripts (#6546)
Format projected text entries in sequence instead of grouping replies ahead of their preceding reasoning. Timeline projection already owns fragment merging. Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
This commit is contained in:
@@ -15,6 +15,18 @@ function collect(items: readonly AgentTimelineItem[], turnId?: string): string {
|
||||
}
|
||||
|
||||
describe("createFollowTranscriptWriter", () => {
|
||||
it("matches one-shot logs when reasoning and assistant text alternate", () => {
|
||||
const items: AgentTimelineItem[] = [
|
||||
{ type: "reasoning", text: "Check " },
|
||||
{ type: "reasoning", text: "the commands." },
|
||||
{ type: "assistant_message", text: "I will list the commands.", messageId: "msg_1" },
|
||||
{ type: "reasoning", text: "Then summarize." },
|
||||
{ type: "assistant_message", text: "Done.", messageId: "msg_2" },
|
||||
];
|
||||
|
||||
expect(collect(items).trimEnd()).toBe(formatAgentActivityTranscript(items));
|
||||
});
|
||||
|
||||
it("keeps a word that arrives split across fragments intact", () => {
|
||||
const output = collect([
|
||||
{ type: "assistant_message", text: "the paseo-pr", messageId: "msg_1" },
|
||||
|
||||
Reference in New Issue
Block a user