forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray.ts
More file actions
29 lines (28 loc) · 617 Bytes
/
Copy patharray.ts
File metadata and controls
29 lines (28 loc) · 617 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { useCopilotAction } from "@copilotkit/react-core";
useCopilotAction({
name: "object",
parameters: [
{
name: "arg",
type: "object[]",
description: "The object argument to display.",
attributes: [
{
name: "x",
type: "string",
description: "The x attribute.",
},
{
name: "y",
type: "number",
description: "The y attribute.",
},
],
},
],
handler: async ({ arg }) => {
const x: string = arg[0].x;
const y: number = arg[0].y;
const z: boolean = arg[0].z;
},
});