Skip to content

Commit 467fcfe

Browse files
committed
fix(shell-docs): restore stripped import lines in reference docs
The initial shell-docs content-import left 21 reference pages with missing import statements: 8 component pages had empty `## Import` code fences, and 13 hook pages had `## Signature` fences whose leading `import { X } from "@copilotkit/react-core/v2";` line was stripped. This commit restores the import(s) in the Import and Signature fences only. Usage examples and other code blocks are intentionally not touched. - 8 components: fill empty Import fence with named (or default for CopilotChatView) import + styles.css side-effect import - 13 hooks: prepend import line(s) at the top of the Signature fence. - useComponent: 3 imports (z, type ComponentType, useComponent) - useRenderTool: imports injected into both Wildcard and Named overload fences - useCopilotChatConfiguration: imports injected into both Provider and hook ### Signature subblocks
1 parent fe76378 commit 467fcfe

21 files changed

Lines changed: 46 additions & 8 deletions

showcase/shell-docs/src/content/reference/components/CopilotChat.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ description: "High-level chat component that connects an agent to a chat view"
1212
## Import
1313

1414
```tsx
15-
15+
import { CopilotChat } from "@copilotkit/react-core/v2";
16+
import "@copilotkit/react-core/v2/styles.css";
1617
```
1718

1819
## Props

showcase/shell-docs/src/content/reference/components/CopilotChatAssistantMessage.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ description: "Component for displaying assistant messages with Markdown, tool ca
1010
## Import
1111

1212
```tsx
13-
13+
import { CopilotChatAssistantMessage } from "@copilotkit/react-core/v2";
14+
import "@copilotkit/react-core/v2/styles.css";
1415
```
1516

1617
## Props

showcase/shell-docs/src/content/reference/components/CopilotChatInput.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ The component operates in three modes: `"input"` (default text entry), `"transcr
1212
## Import
1313

1414
```tsx
15-
15+
import { CopilotChatInput } from "@copilotkit/react-core/v2";
16+
import "@copilotkit/react-core/v2/styles.css";
1617
```
1718

1819
## Props

showcase/shell-docs/src/content/reference/components/CopilotChatMessageView.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ description: "Component for rendering a list of chat messages"
1010
## Import
1111

1212
```tsx
13-
13+
import { CopilotChatMessageView } from "@copilotkit/react-core/v2";
14+
import "@copilotkit/react-core/v2/styles.css";
1415
```
1516

1617
## Props

showcase/shell-docs/src/content/reference/components/CopilotChatUserMessage.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ description: "Component for displaying user-authored messages with branch naviga
1010
## Import
1111

1212
```tsx
13-
13+
import { CopilotChatUserMessage } from "@copilotkit/react-core/v2";
14+
import "@copilotkit/react-core/v2/styles.css";
1415
```
1516

1617
## Props

showcase/shell-docs/src/content/reference/components/CopilotChatView.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ Every visual piece of `CopilotChatView` is exposed as a **slot**, so you can rep
1212
## Import
1313

1414
```tsx
15-
15+
import CopilotChatView from "@copilotkit/react-core/v2";
16+
import "@copilotkit/react-core/v2/styles.css";
1617
```
1718

1819
<Callout type="info">

showcase/shell-docs/src/content/reference/components/CopilotPopup.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ See [`CopilotSidebar`](/reference/components/CopilotSidebar) for a sidebar varia
1212
## Import
1313

1414
```tsx
15-
15+
import { CopilotPopup } from "@copilotkit/react-core/v2";
16+
import "@copilotkit/react-core/v2/styles.css";
1617
```
1718

1819
## Props

showcase/shell-docs/src/content/reference/components/CopilotSidebar.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ See [`CopilotPopup`](/reference/components/CopilotPopup) for a popup variant of
1212
## Import
1313

1414
```tsx
15-
15+
import { CopilotSidebar } from "@copilotkit/react-core/v2";
16+
import "@copilotkit/react-core/v2/styles.css";
1617
```
1718

1819
## Props

showcase/shell-docs/src/content/reference/hooks/useAgent.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ description: "React hook for accessing AG-UI agent instances"
1212
## Signature
1313

1414
```tsx
15+
import { useAgent } from "@copilotkit/react-core/v2";
16+
1517
function useAgent(options?: UseAgentProps): { agent: AbstractAgent };
1618
```
1719

showcase/shell-docs/src/content/reference/hooks/useAgentContext.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Update the incoming context object to refresh what the agent sees. This is the v
1212
## Signature
1313

1414
```tsx
15+
import { useAgentContext } from "@copilotkit/react-core/v2";
16+
1517
function useAgentContext(context: AgentContextInput): void;
1618
```
1719

0 commit comments

Comments
 (0)