MCPcopy
hub / github.com/nanbingxyz/5ire / handleContextMenuCommand

Function handleContextMenuCommand

src/renderer/components/ContextMenuProvider.tsx:55–65  ·  view source on GitHub ↗
(command: unknown, params: unknown)

Source from the content-addressed store, hash-verified

53
54 useEffect(() => {
55 const handleContextMenuCommand = (command: unknown, params: unknown) => {
56 const { type, id } = params as { type: string; id: string };
57 const key = `${type}:${id}`;
58 const handler = handlersRef.current.get(key);
59
60 if (handler) {
61 handler(command as string, params);
62 } else {
63 console.warn(`No handler found for key: ${key}`);
64 }
65 };
66
67 // 使用 on 方法返回的 unsubscribe 函数
68 const unsubscribeContextMenu = window.electron.ipcRenderer.on(

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected