You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
componentName: z.string().describe('The name of the component.'),
18
-
props: z.object({}).describe('The props of the component.'),
19
-
children: z.array(z.lazy(()=>nodeArraySchema)).describe('The children of the component')
20
-
})
21
-
22
7
constinputSchema=z.object({
23
8
parentId: z
24
9
.string()
25
10
.optional()
26
11
.describe(
27
12
'The id of the parent node. If not provided, the new node will be added to the root. if you don\'t know the parentId, you can use the tool "get_page_schema" to get the page schema. if you want to add to page root, just don\'t provide the parentId.'
28
13
),
29
-
newNodeData: z.lazy(()=>nodeSchema).describe('The new node data.'),
14
+
newNodeData: z.object({
15
+
componentName: z.string().describe('The name of the component.'),
16
+
props: z.record(z.string(),z.any()).describe('The props of the component.'),
17
+
children: z
18
+
.array(z.record(z.string(),z.any()))
19
+
.describe('Array of child nodes; each child has the same shape as newNodeData (recursive tree).')
20
+
}),
30
21
position: z
31
22
.enum(['before','after'])
32
23
.optional()
@@ -60,11 +51,6 @@ export const addNode = {
60
51
const{ props ={}, children =[]}=newNodeData
61
52
62
53
constvalidateResult=validateParams(args,{
63
-
componentName: {
64
-
required: true,
65
-
message:
66
-
'Component name is required, if you don\'t know the component name, you can use the tool "get_component_list" to get the component detail.'
id: z.string().describe('The id of the node to change the props of.'),
5
+
id: z
6
+
.string()
7
+
.describe(
8
+
'The id of the node to change the props of. if you don\'t know the id, you can use the tool "get_current_selected_node" to get the current selected node. or you can use the tool "get_page_schema" to get the page schema. when get the page schema, you can find the id in the "id" field.'
9
+
),
6
10
props: z
7
-
.object({})
11
+
.record(z.string(),z.any())
8
12
.describe(
9
13
'The props of the component. if you don\'t know available props, you can use the "get_component_detail" tool to get component detail and available props.'
10
14
),
@@ -13,6 +17,7 @@ const inputSchema = z.object({
13
17
14
18
exportconstchangeNodeProps={
15
19
name: 'change_node_props',
20
+
title: '修改节点属性',
16
21
description:
17
22
'Change the props of a node in the current TinyEngine low-code application. Use this when you need to change the props of a node in your application.',
id: z.string().describe('The id of the node to delete.')
5
+
id: z
6
+
.string()
7
+
.describe(
8
+
'The id of the node to delete. if you don\'t know the id, you can use the tool "get_current_selected_node" to get the current selected node. or you can use the tool "get_page_schema" to get the page schema. when get the page schema, you can find the id in the "id" field.'
9
+
)
6
10
})
7
11
8
12
exportconstdelNode={
9
13
name: 'del_node',
14
+
title: '删除节点',
10
15
description:
11
16
'Delete a node from the current TinyEngine low-code application. Use this when you need to delete a node from your application.',
0 commit comments