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

Function extractIconQueued

src/main/core/iconProtocol.ts:46–54  ·  view source on GitHub ↗

* 通过串行队列提取图标,确保原生调用不并发执行

(iconPath: string)

Source from the content-addressed store, hash-verified

44 * 通过串行队列提取图标,确保原生调用不并发执行
45 */
46function extractIconQueued(iconPath: string): Promise<Buffer> {
47 const task = extractionQueue.then(() => extractIcon(iconPath))
48 // 更新队列尾部,忽略错误不阻塞后续任务
49 extractionQueue = task.then(
50 () => undefined,
51 () => undefined
52 )
53 return task
54}
55
56/**
57 * 创建图标 Response

Callers 2

getFileIconAsBase64Function · 0.85

Calls 1

extractIconFunction · 0.85

Tested by

no test coverage detected