MCPcopy
hub / github.com/ZToolsCenter/ZTools / pinCommand

Function pinCommand

src/renderer/src/stores/commandDataStore.ts:1533–1538  ·  view source on GitHub ↗
(command: Command)

Source from the content-addressed store, hash-verified

1531
1532 // 固定指令
1533 async function pinCommand(command: Command): Promise<void> {
1534 // 将 Vue 响应式对象转换为纯对象,避免 IPC 传递时的克隆错误
1535 const plainCommand = JSON.parse(JSON.stringify(command))
1536 await window.ztools.pinApp(plainCommand)
1537 // 后端会发送 pinned-changed 事件,触发重新加载
1538 }
1539
1540 /**
1541 * 取消固定指定指令。

Callers

nothing calls this directly

Calls 2

stringifyMethod · 0.80
pinAppMethod · 0.80

Tested by

no test coverage detected