Skip to content

Commit 79de340

Browse files
committed
chore: add uv to CI
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
1 parent ee43d47 commit 79de340

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.github/workflows/smoke.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ jobs:
3333
with:
3434
python-version: ${{ matrix.python }}
3535

36+
- name: Setup uv
37+
uses: astral-sh/setup-uv@v5
38+
with:
39+
enable-cache: true
40+
3641
- name: Install Node.js dependencies (root)
3742
run: npm install
3843

@@ -44,7 +49,7 @@ jobs:
4449
- name: Install Python dependencies (agent)
4550
run: |
4651
cd agent
47-
pip install -r requirements.txt
52+
uv sync
4853
4954
- name: Build frontend
5055
run: npm run build

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"postinstall": "npm run install:agent"
1515
},
1616
"dependencies": {
17+
"@copilotkit/react-core": "^1.50.0",
1718
"@copilotkit/react-ui": "1.50.0",
18-
"@copilotkit/react-core": "1.50.0",
1919
"@copilotkit/runtime": "1.50.0",
2020
"next": "16.0.8",
2121
"react": "^19.2.1",

src/app/page.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
"use client";
22

3-
import { useCoAgent, useCopilotAction } from "@copilotkit/react-core";
3+
import {
4+
useCoAgent,
5+
useFrontendTool,
6+
useRenderToolCall,
7+
} from "@copilotkit/react-core";
48
import { CopilotKitCSSProperties, CopilotSidebar } from "@copilotkit/react-ui";
59
import { useState } from "react";
610

711
export default function CopilotKitPage() {
812
const [themeColor, setThemeColor] = useState("#6366f1");
913

1014
// 🪁 Frontend Actions: https://docs.copilotkit.ai/guides/frontend-actions
11-
useCopilotAction({
15+
useFrontendTool({
1216
name: "setThemeColor",
1317
parameters: [
1418
{
@@ -59,7 +63,7 @@ function YourMainContent({ themeColor }: { themeColor: string }) {
5963
});
6064

6165
// 🪁 Frontend Actions: https://docs.copilotkit.ai/langgraph/frontend-actions
62-
useCopilotAction({
66+
useFrontendTool({
6367
name: "addProverb",
6468
parameters: [
6569
{
@@ -77,10 +81,9 @@ function YourMainContent({ themeColor }: { themeColor: string }) {
7781
});
7882

7983
//🪁 Generative UI: https://docs.copilotkit.ai/langgraph/generative-ui
80-
useCopilotAction({
84+
useRenderToolCall({
8185
name: "get_weather",
8286
description: "Get the weather for a given location.",
83-
available: "disabled",
8487
parameters: [{ name: "location", type: "string", required: true }],
8588
render: ({ args }) => {
8689
return <WeatherCard location={args.location} themeColor={themeColor} />;

0 commit comments

Comments
 (0)