Skip to content

Commit f4ce1b4

Browse files
bloveclaude
andauthored
fixup(langgraph): canonical regenerate JSDoc to unblock api-docs gate (#208)
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 <noreply@anthropic.com>
1 parent 0639cdd commit f4ce1b4

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

libs/langgraph/src/lib/agent.types.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,13 @@ export interface LangGraphAgent<T = unknown, ResolvedBag extends BagTemplate = B
312312
reload: () => void;
313313

314314
/**
315-
* Truncate the thread at the given assistant-message index and re-submit the
316-
* preceding user message. Used by `<ngaf-chat>`'s regenerate action and any
317-
* custom UI that wants the same semantics. Rejects if the agent is currently
318-
* loading, if the index does not point at an assistant message, or if no
319-
* preceding user message exists.
315+
* Discards the assistant message at the given index AND all messages after
316+
* it, then re-runs the agent against the trimmed conversation tail. The
317+
* preceding user message (at index - 1) is preserved and re-submitted as
318+
* the agent's input. No new user message is added to the history.
319+
*
320+
* Throws if the message at `index` is not 'assistant' role, or if the
321+
* agent is currently loading another response.
320322
*/
321323
regenerate: (assistantMessageIndex: number) => Promise<void>;
322324

0 commit comments

Comments
 (0)