feat(app): add chat outline navigation (#2792)
* feat(app): add chat outline navigation Long agent sessions need prompt navigation without coupling viewport movement to disposable server windows. Keep fetched timeline pages in client state so repeated jumps stay local, and settle prompt jumps against virtualized row measurement changes. * fix(app): preserve chat outline timeline coverage * fix(app): reconcile outline window submissions * fix(app): harden outline timeline navigation
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import {
|
||||
AgentTimelineListPromptsResponseMessageSchema,
|
||||
AgentStreamMessageSchema,
|
||||
FetchAgentTimelineResponseMessageSchema,
|
||||
SessionInboundMessageSchema,
|
||||
@@ -9,6 +10,33 @@ import {
|
||||
} from "./messages.js";
|
||||
|
||||
describe("shared messages stream parsing", () => {
|
||||
it("parses a full timeline prompt index response", () => {
|
||||
const parsed = AgentTimelineListPromptsResponseMessageSchema.parse({
|
||||
type: "agent.timeline.list_prompts.response",
|
||||
payload: {
|
||||
requestId: "req-prompts-1",
|
||||
agentId: "agent_live",
|
||||
epoch: "epoch-1",
|
||||
prompts: [
|
||||
{
|
||||
seq: 42,
|
||||
timestamp: "2026-02-08T20:10:00.000Z",
|
||||
preview: "Review the pagination behavior",
|
||||
},
|
||||
],
|
||||
error: null,
|
||||
},
|
||||
});
|
||||
|
||||
expect(parsed.payload.prompts).toEqual([
|
||||
{
|
||||
seq: 42,
|
||||
timestamp: "2026-02-08T20:10:00.000Z",
|
||||
preview: "Review the pagination behavior",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("parses representative fetch_agent_timeline_response payload", () => {
|
||||
const parsed = FetchAgentTimelineResponseMessageSchema.parse({
|
||||
type: "fetch_agent_timeline_response",
|
||||
|
||||
Reference in New Issue
Block a user