Skip to content

Commit 6b60889

Browse files
committed
docs(showcase/shell-docs): HITL as proper sub-section + better titles + gate residual LangGraph code
Three follow-ups to the previous HITL nav restoration after visual review: 1. Make Human-in-the-Loop a proper collapsible subsection (matches the prebuilt-components / custom-look-and-feel pattern): - Move human-in-the-loop.mdx -> human-in-the-loop/index.mdx - Add human-in-the-loop/meta.json with title + page order - Root meta.json: collapse the three flat entries to a single 'human-in-the-loop' line (the section's own meta.json drives children) 2. Rename useInterrupt page title from 'useInterrupt' (a React hook name, framework-implementation-leaky) to 'Pausing the agent for input' — describes the action, neutral across native and promise-based patterns. Description tightened to match. 3. Gate the residual 'Key props', 'Multiple interrupts', and 'Preprocess with handler' sections in useInterrupt.mdx behind <WhenFrameworkHas equals="native">. Those code blocks reference useInterrupt({...}) directly — they only make sense on LangGraph. On promise-based frameworks they would have rendered alongside the gated promise intro, leaving readers with mixed-framework code on the same page. Note: 'Missing snippet' yellow boxes still render on the hub page for 12 frameworks where hitl-in-chat cell is unshipped (ms-agent-{python, dotnet}, agno, google-adk, pydantic-ai, llamaindex, claude-sdk-{python, typescript}, langgraph-{typescript,fastapi}, langroid, spring-ai). That's the dashboard's D-unshipped class — engineering work tracked in the post-PR snippet-coverage audit Notion doc, not a docs-side gap.
1 parent 59dea87 commit 6b60889

5 files changed

Lines changed: 14 additions & 7 deletions

File tree

showcase/shell-docs/src/content/docs/human-in-the-loop/headless.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Headless interrupts
2+
title: Headless Interrupts
33
icon: "lucide/SquareDashedBottomCode"
44
description: Resolve agent interrupts from any UI, without a useInterrupt render slot.
55
hideTOC: true

showcase/shell-docs/src/content/docs/human-in-the-loop.mdx renamed to showcase/shell-docs/src/content/docs/human-in-the-loop/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Human-in-the-Loop
2+
title: HITL Overview
33
icon: "lucide/User"
44
description: Allow your agent and users to collaborate on complex tasks.
55
hideTOC: true
@@ -15,7 +15,7 @@ into a collaborative one: the agent keeps its context, the user keeps
1515
the steering wheel.
1616

1717
<video
18-
src="https://cdn.copilotkit.ai/docs/copilotkit/images/langgraph/human-in-the-loop-example.mp4"
18+
src="https://cdn.copilotkit.ai/docs/copilotkit/images/coagents/human-in-the-loop-example.mp4"
1919
className="rounded-lg shadow-xl"
2020
loop
2121
playsInline
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"title": "Human-in-the-Loop",
3+
"icon": "lucide/User",
4+
"pages": ["index", "useInterrupt", "headless"]
5+
}

showcase/shell-docs/src/content/docs/human-in-the-loop/useInterrupt.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: useInterrupt
2+
title: Pausing the Agent for Input
33
icon: "lucide/CirclePause"
4-
description: Pause an agent run for user input, then resume with their answer.
4+
description: Pause an agent run mid-tool, hand control to a custom React component, and resume with the user's answer.
55
hideTOC: true
66
snippet_cell: gen-ui-interrupt
77
---
@@ -113,6 +113,8 @@ the Promise-returning handler takes over:
113113

114114
</WhenFrameworkHas>
115115

116+
<WhenFrameworkHas flag="interrupt_pattern" equals="native">
117+
116118
### Key props
117119

118120
- **`agentId`** — must match a runtime-registered agent. If omitted, the
@@ -176,6 +178,8 @@ useInterrupt({
176178
});
177179
```
178180

181+
</WhenFrameworkHas>
182+
179183
## Going further
180184

181185
- [Tool-based HITL with `useHumanInTheLoop`](../human-in-the-loop) — for

showcase/shell-docs/src/content/docs/meta.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
"frontend-tools",
1717
"shared-state",
1818
"human-in-the-loop",
19-
"human-in-the-loop/useInterrupt",
20-
"human-in-the-loop/headless",
2119
"multi-agent/subagents",
2220
"programmatic-control",
2321
"---Agents & Backends---",

0 commit comments

Comments
 (0)