MCPcopy Create free account
hub / github.com/experdot/pointer / expandNode

Function expandNode

src/renderer/src/stores/helpers/objectNodeHelpers.ts:145–152  ·  view source on GitHub ↗
(objectData: ObjectData, nodeId: string)

Source from the content-addressed store, hash-verified

143
144// 展开节点
145export const expandNode = (objectData: ObjectData, nodeId: string): ObjectData => {
146 if (objectData.expandedNodes.includes(nodeId)) return objectData
147
148 return {
149 ...objectData,
150 expandedNodes: [...objectData.expandedNodes, nodeId]
151 }
152}
153
154// 折叠节点
155export const collapseNode = (objectData: ObjectData, nodeId: string): ObjectData => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected