Skip to content

Commit b110d2c

Browse files
committed
refactor: Remove 'type' property from rootNode and childNode in object chat creation for cleaner structure
1 parent ce466e7 commit b110d2c

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

src/renderer/src/store/helpers.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ export const createNewObjectChat = (
121121
const rootNode: ObjectNode = {
122122
id: rootNodeId,
123123
name: '根对象',
124-
type: 'object',
125124
description: '对象的根节点',
126125
children: [],
127126
expanded: true,

src/renderer/src/store/reducers/chatReducer.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,7 @@ ${cellContent}
306306
return childNode
307307
? {
308308
name: childNode.name,
309-
type: childNode.type,
310309
description: childNode.description,
311-
value: childNode.value
312310
}
313311
: { name: childName }
314312
}),
@@ -320,9 +318,7 @@ ${cellContent}
320318
return childNode
321319
? {
322320
name: childNode.name,
323-
type: childNode.type,
324321
description: childNode.description,
325-
value: childNode.value
326322
}
327323
: { name: childName }
328324
})
@@ -616,8 +612,7 @@ ${cellContent}
616612
.filter(
617613
(node) =>
618614
node.name.toLowerCase().includes(query.toLowerCase()) ||
619-
node.description?.toLowerCase().includes(query.toLowerCase()) ||
620-
node.type.toLowerCase().includes(query.toLowerCase())
615+
node.description?.toLowerCase().includes(query.toLowerCase())
621616
)
622617
.map((node) => node.id)
623618
: undefined

0 commit comments

Comments
 (0)