Skip to content

Commit c06e71f

Browse files
authored
refactor(docs): upgrade and fix issues (CopilotKit#2811)
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
1 parent b5931c3 commit c06e71f

15 files changed

Lines changed: 1142 additions & 792 deletions

File tree

docs/components/react/coagents/coagents-diagram.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
export const CoAgentsDiagram: React.FC = (): JSX.Element => {
3+
export const CoAgentsDiagram: React.FC = () => {
44
return (
55
<div className="flex flex-col items-center">
66
<div className="flex items-center">
@@ -21,7 +21,7 @@ interface DiagramNodeProps {
2121
variant?: 'default' | 'colored';
2222
}
2323

24-
const DiagramNode: React.FC<DiagramNodeProps> = ({ title, variant = 'default' }): JSX.Element => {
24+
const DiagramNode: React.FC<DiagramNodeProps> = ({ title, variant = 'default' }) => {
2525
const bgColor = variant === 'colored'
2626
? "bg-blue-100 dark:bg-blue-900"
2727
: "bg-gray-50 dark:bg-neutral-900";
@@ -33,7 +33,7 @@ const DiagramNode: React.FC<DiagramNodeProps> = ({ title, variant = 'default' })
3333
);
3434
};
3535

36-
const DiagramArrow: React.FC = (): JSX.Element => {
36+
const DiagramArrow: React.FC = () => {
3737
return (
3838
<div className="mx-2">
3939
<svg

docs/components/react/frame.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ export function Frame({
1414
<div
1515
className={`flex space-x-4 w-full mx-auto justify-center ${className}`}
1616
>
17-
{React.Children.map(children, (child) =>
18-
React.isValidElement(child)
19-
? React.cloneElement(child as React.ReactElement<any>, {
20-
className: `border border-foreground-muted rounded-md shadow-lg ${
21-
child.props.className || ""
22-
}`,
23-
})
24-
: child
25-
)}
17+
{React.Children.map(children, (child) => {
18+
if (React.isValidElement(child)) {
19+
const element = child as React.ReactElement<any>;
20+
return React.cloneElement(element, {
21+
className: `border border-foreground-muted rounded-md shadow-lg ${
22+
element.props.className || ""
23+
}`,
24+
});
25+
}
26+
return child;
27+
})}
2628
</div>
2729
{description && <p className="text-sm text-neutral-500 text-center">{description}</p>}
2830
</>

docs/components/react/multi-provider-content/multi-provider-content.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ export function Interpolate({ children }: { children: React.ReactNode; }) {
105105

106106
// Handle React elements
107107
if (isValidElement(element)) {
108-
const processedChildren = React.Children.map(element.props.children, processElement);
109-
return React.cloneElement(element, { ...element.props, children: processedChildren });
108+
const reactElement = element as React.ReactElement<any>;
109+
const processedChildren = React.Children.map(reactElement.props.children, processElement);
110+
return React.cloneElement(reactElement, { ...reactElement.props, children: processedChildren });
110111
}
111112

112113
// Handle arrays

docs/components/react/tailored-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function TailoredContent({ children, className, defaultOptionIndex = 0, i
8181
>
8282
<div className="my-0">
8383
{React.isValidElement(option.props.icon)
84-
? React.cloneElement(option.props.icon as React.ReactElement, {
84+
? React.cloneElement(option.props.icon as React.ReactElement<any>, {
8585
className: cn(iconCn, selectedIndex === index, "my-0"),
8686
})
8787
: (

docs/content/docs/agno/generative-ui/backend-tools.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ when your agent is calling tools. CopilotKit allows you to fully customize how t
6565
tools=[get_weather], # [!code highlight]
6666
description="A helpful assistant that can answer questions and provide information.",
6767
instructions="Be helpful and friendly. Format your responses using markdown where appropriate.",
68-
show_tool_calls=True,
6968
)
7069
```
7170
</Tab>

docs/content/docs/aws-strands/generative-ui/agentic.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ is a situation where a user and an agent are working together to solve a problem
3939
Configure your Strands agent to maintain state. Here's an example that tracks searches:
4040

4141
```python title="agent/my_agent.py"
42-
from aws_strands import Agent, Tool
42+
from strands import Agent, Tool
4343
from typing import TypedDict, List
4444

4545
# Define the agent state schema

docs/content/docs/aws-strands/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ icon: "custom/awsStrands"
44
description: Bring your AWS Strands agents to your users with CopilotKit via AG-UI.
55
hideHeader: true
66
---
7-
import { AwsStrandsIcon } from "/lib/icons/custom-icons";
7+
import { AwsStrandsIcon } from "@/lib/icons/custom-icons";
88
import { FrameworkOverview } from "@/components/content/landing-pages/framework-overview";
99

1010
<FrameworkOverview

docs/content/docs/aws-strands/shared-state/in-app-agent-read.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ state updates, you can reflect these updates natively in your application.
4242
Define your agent's state schema. AWS Strands maintains state throughout execution.
4343

4444
```python title="agent/my_agent.py"
45-
from aws_strands import Agent
45+
from strands import Agent
4646
from typing import TypedDict
4747

4848
# 1. Define the agent state schema

docs/content/docs/aws-strands/shared-state/in-app-agent-write.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ You can use this when you want to provide user input or control to your agent's
4141
Define your agent's state schema. AWS Strands maintains state throughout execution.
4242

4343
```python title="agent/my_agent.py"
44-
from aws_strands import Agent
44+
from strands import Agent
4545
from typing import TypedDict
4646

4747
# 1. Define the agent state schema

docs/eslint.config.mjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
2+
import nextTypescript from "eslint-config-next/typescript";
3+
4+
const eslintConfig = [
5+
...nextCoreWebVitals,
6+
...nextTypescript,
7+
{
8+
ignores: [
9+
"node_modules/**",
10+
".next/**",
11+
"out/**",
12+
"build/**",
13+
"next-env.d.ts",
14+
],
15+
},
16+
];
17+
18+
export default eslintConfig;

0 commit comments

Comments
 (0)