From 89e827d7c7d842e257ec20da10e93e8f1802a33e Mon Sep 17 00:00:00 2001 From: Brian Love Date: Thu, 7 May 2026 13:28:16 -0700 Subject: [PATCH] fixup(langgraph): canonical regenerate JSDoc to unblock api-docs gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #207 merged with admin override while CI's stale-api-docs gate was red — the gate is now red on main. The shorter JSDoc on LangGraphAgent.regenerate (added in #207) caused TypeDoc to emit a description that diverges from the committed agent/api/api-docs.json. Match the canonical text from libs/chat/src/lib/agent/agent.ts:38-46 so the regenerated docs are byte-identical to what's already on main. Co-Authored-By: Claude Opus 4.7 --- libs/langgraph/src/lib/agent.types.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/langgraph/src/lib/agent.types.ts b/libs/langgraph/src/lib/agent.types.ts index 6d1c02412..de3e729c8 100644 --- a/libs/langgraph/src/lib/agent.types.ts +++ b/libs/langgraph/src/lib/agent.types.ts @@ -312,11 +312,13 @@ export interface LangGraphAgent void; /** - * Truncate the thread at the given assistant-message index and re-submit the - * preceding user message. Used by ``'s regenerate action and any - * custom UI that wants the same semantics. Rejects if the agent is currently - * loading, if the index does not point at an assistant message, or if no - * preceding user message exists. + * Discards the assistant message at the given index AND all messages after + * it, then re-runs the agent against the trimmed conversation tail. The + * preceding user message (at index - 1) is preserved and re-submitted as + * the agent's input. No new user message is added to the history. + * + * Throws if the message at `index` is not 'assistant' role, or if the + * agent is currently loading another response. */ regenerate: (assistantMessageIndex: number) => Promise;