mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-09 18:04:55 +00:00
fix(chat): allow failed turns to be forked
Failed turns can end in Paseo-generated timeline items without provider message IDs. Anchor forks to canonical timeline positions while retaining legacy boundaries for compatibility. Place the fork summary before the new prompt and delimit it as structured chat history.
This commit is contained in:
@@ -538,6 +538,7 @@ function normalizeListCommandsOptions(
|
||||
return { agentId: input, ...legacyOptions };
|
||||
}
|
||||
export interface AgentForkContextOptions {
|
||||
boundaryCursor?: FetchAgentTimelineCursor;
|
||||
boundaryMessageId?: string;
|
||||
requestId?: string;
|
||||
}
|
||||
@@ -2555,6 +2556,7 @@ export class DaemonClient {
|
||||
type: "agent.fork_context.request",
|
||||
agentId,
|
||||
requestId: resolvedRequestId,
|
||||
...(options.boundaryCursor ? { boundaryCursor: options.boundaryCursor } : {}),
|
||||
...(options.boundaryMessageId ? { boundaryMessageId: options.boundaryMessageId } : {}),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user